From af6f7f4bc825167673e41e32ac8af575dbab8bbf Mon Sep 17 00:00:00 2001 From: Leonardo de Moura Date: Sun, 5 Jan 2020 16:27:05 -0800 Subject: [PATCH] chore: update stage0 --- stage0/src/Init/Data/Array/Basic.lean | 3 + stage0/src/Init/Lean/Attributes.lean | 15 +- stage0/src/Init/Lean/Class.lean | 2 +- stage0/src/Init/Lean/Elab/Command.lean | 151 +- stage0/src/Init/Lean/Elab/DeclModifiers.lean | 128 + stage0/src/Init/Lean/Elab/Declaration.lean | 245 +- stage0/src/Init/Lean/Elab/Definition.lean | 47 + stage0/src/Init/Lean/Elab/Frontend.lean | 2 +- stage0/src/Init/Lean/Elab/Level.lean | 4 +- stage0/src/Init/Lean/Elab/Term.lean | 13 +- stage0/src/Init/Lean/Elab/Util.lean | 2 +- stage0/src/Init/Lean/Expr.lean | 4 +- stage0/src/Init/Lean/Level.lean | 5 + stage0/src/Init/Lean/Meta/Basic.lean | 3 + stage0/src/Init/Lean/Meta/Instances.lean | 2 +- stage0/src/Init/Lean/MetavarContext.lean | 126 +- stage0/src/Init/Lean/Parser/Parser.lean | 2 +- .../Init/Lean/Util/CollectLevelParams.lean | 61 + stage0/stdlib/CMakeLists.txt | 2 +- stage0/stdlib/Init/Data/Array/Basic.c | 31 +- stage0/stdlib/Init/Lean/Attributes.c | 270 +- stage0/stdlib/Init/Lean/Class.c | 32 +- stage0/stdlib/Init/Lean/Compiler/IR/Checker.c | 8 +- .../stdlib/Init/Lean/Compiler/InlineAttrs.c | 8 +- stage0/stdlib/Init/Lean/Compiler/Specialize.c | 8 +- stage0/stdlib/Init/Lean/Elab/Command.c | 10995 +++++++++++----- stage0/stdlib/Init/Lean/Elab/DeclModifiers.c | 2689 ++++ stage0/stdlib/Init/Lean/Elab/Declaration.c | 6855 ++++++---- stage0/stdlib/Init/Lean/Elab/Definition.c | 3430 +++++ .../stdlib/Init/Lean/Elab/ElabStrategyAttrs.c | 8 +- stage0/stdlib/Init/Lean/Elab/Frontend.c | 1096 +- stage0/stdlib/Init/Lean/Elab/Term.c | 446 + stage0/stdlib/Init/Lean/Elab/Util.c | 2 +- stage0/stdlib/Init/Lean/Expr.c | 20 +- stage0/stdlib/Init/Lean/Level.c | 20 +- stage0/stdlib/Init/Lean/Meta/Basic.c | 1194 +- stage0/stdlib/Init/Lean/Meta/Instances.c | 90 +- stage0/stdlib/Init/Lean/MetavarContext.c | 2315 +++- stage0/stdlib/Init/Lean/Parser/Parser.c | 840 +- stage0/stdlib/Init/Lean/ReducibilityAttrs.c | 8 +- .../Init/Lean/Util/CollectLevelParams.c | 2529 ++++ 41 files changed, 25914 insertions(+), 7797 deletions(-) create mode 100644 stage0/src/Init/Lean/Elab/DeclModifiers.lean create mode 100644 stage0/src/Init/Lean/Elab/Definition.lean create mode 100644 stage0/src/Init/Lean/Util/CollectLevelParams.lean create mode 100644 stage0/stdlib/Init/Lean/Elab/DeclModifiers.c create mode 100644 stage0/stdlib/Init/Lean/Elab/Definition.c create mode 100644 stage0/stdlib/Init/Lean/Util/CollectLevelParams.c diff --git a/stage0/src/Init/Data/Array/Basic.lean b/stage0/src/Init/Data/Array/Basic.lean index 54ca8b4bb2..ba80c54af8 100644 --- a/stage0/src/Init/Data/Array/Basic.lean +++ b/stage0/src/Init/Data/Array/Basic.lean @@ -588,6 +588,9 @@ eraseIdxSzAux a (i.val + 1) a rfl def contains [HasBeq α] (as : Array α) (a : α) : Bool := as.any $ fun b => a == b +def elem [HasBeq α] (a : α) (as : Array α) : Bool := +as.contains a + partial def insertAtAux {α} (i : Nat) : Array α → Nat → Array α | as, j => if i == j then as diff --git a/stage0/src/Init/Lean/Attributes.lean b/stage0/src/Init/Lean/Attributes.lean index b374846675..18933384de 100644 --- a/stage0/src/Init/Lean/Attributes.lean +++ b/stage0/src/Init/Lean/Attributes.lean @@ -12,6 +12,14 @@ namespace Lean inductive AttributeApplicationTime | afterTypeChecking | afterCompilation | beforeElaboration +def AttributeApplicationTime.beq : AttributeApplicationTime → AttributeApplicationTime → Bool +| AttributeApplicationTime.afterTypeChecking, AttributeApplicationTime.afterTypeChecking => true +| AttributeApplicationTime.afterCompilation, AttributeApplicationTime.afterCompilation => true +| AttributeApplicationTime.beforeElaboration, AttributeApplicationTime.beforeElaboration => true +| _, _ => false + +instance AttributeApplicationTime.hasBeq : HasBeq AttributeApplicationTime := ⟨AttributeApplicationTime.beq⟩ + -- TODO: after we delete the old frontend, we should use `EIO` with a richer exception kind at AttributeImpl. -- We must perform a similar modification at `PersistentEnvExtension` @@ -28,6 +36,11 @@ structure AttributeImpl := (popScope (env : Environment) : IO Environment := pure env) (applicationTime := AttributeApplicationTime.afterTypeChecking) +/- Auxiliary function for parsing attribute arguments -/ +def Syntax.hasArgs : Syntax → Bool +| Syntax.node _ args => args.size > 0 +| _ => false + instance AttributeImpl.inhabited : Inhabited AttributeImpl := ⟨{ name := arbitrary _, descr := arbitrary _, add := fun env _ _ _ => pure env }⟩ @@ -165,7 +178,7 @@ let attrImpl : AttributeImpl := { name := name, descr := descr, add := fun env decl args persistent => do - unless args.isMissing $ throw (IO.userError ("invalid attribute '" ++ toString name ++ "', unexpected argument")); + when args.hasArgs $ throw (IO.userError ("invalid attribute '" ++ toString name ++ "', unexpected argument")); unless persistent $ throw (IO.userError ("invalid attribute '" ++ toString name ++ "', must be persistent")); unless (env.getModuleIdxFor? decl).isNone $ throw (IO.userError ("invalid attribute '" ++ toString name ++ "', declaration is in an imported module")); diff --git a/stage0/src/Init/Lean/Class.lean b/stage0/src/Init/Lean/Class.lean index 47ade6168d..ab7015cc96 100644 --- a/stage0/src/Init/Lean/Class.lean +++ b/stage0/src/Init/Lean/Class.lean @@ -141,7 +141,7 @@ registerAttribute { name := `class, descr := "type class", add := fun env decl args persistent => do - unless args.isMissing $ throw (IO.userError ("invalid attribute 'class', unexpected argument")); + when args.hasArgs $ throw (IO.userError ("invalid attribute 'class', unexpected argument")); unless persistent $ throw (IO.userError ("invalid attribute 'class', must be persistent")); IO.ofExcept (addClass env decl) } diff --git a/stage0/src/Init/Lean/Elab/Command.lean b/stage0/src/Init/Lean/Elab/Command.lean index 613441b5bc..c1e0e5c654 100644 --- a/stage0/src/Init/Lean/Elab/Command.lean +++ b/stage0/src/Init/Lean/Elab/Command.lean @@ -20,15 +20,16 @@ structure Scope := (opts : Options := {}) (currNamespace : Name := Name.anonymous) (openDecls : List OpenDecl := []) -(univNames : List Name := []) +(levelNames : List Name := []) (varDecls : Array Syntax := #[]) instance Scope.inhabited : Inhabited Scope := ⟨{ kind := "", header := "" }⟩ structure State := -(env : Environment) -(messages : MessageLog := {}) -(scopes : List Scope := [{ kind := "root", header := "" }]) +(env : Environment) +(messages : MessageLog := {}) +(scopes : List Scope := [{ kind := "root", header := "" }]) +(nextMacroScope : Nat := 1) instance State.inhabited : Inhabited State := ⟨{ env := arbitrary _ }⟩ @@ -36,10 +37,11 @@ def mkState (env : Environment) (messages : MessageLog := {}) (opts : Options := { env := env, messages := messages, scopes := [{ kind := "root", header := "", opts := opts }] } structure Context := -(fileName : String) -(fileMap : FileMap) -(stateRef : IO.Ref State) -(cmdPos : String.Pos := 0) +(fileName : String) +(fileMap : FileMap) +(stateRef : IO.Ref State) +(cmdPos : String.Pos := 0) +(currMacroScope : MacroScope := 0) abbrev CommandElabCoreM (ε) := ReaderT Context (EIO ε) abbrev CommandElabM := CommandElabCoreM Exception @@ -49,7 +51,7 @@ def mkMessageAux (ctx : Context) (ref : Syntax) (msgData : MessageData) (severit mkMessageCore ctx.fileName ctx.fileMap msgData severity (ref.getPos.getD ctx.cmdPos) private def ioErrorToMessage (ctx : Context) (ref : Syntax) (err : IO.Error) : Message := -mkMessageAux ctx ref ("IO error, " ++ toString err) MessageSeverity.error +mkMessageAux ctx ref (toString err) MessageSeverity.error @[inline] def liftIOCore {α} (ctx : Context) (ref : Syntax) (x : IO α) : EIO Exception α := EIO.adaptExcept (ioErrorToMessage ctx ref) x @@ -77,6 +79,19 @@ instance CommandElabM.monadLog : MonadLog CommandElabM := getFileName := do ctx ← read; pure ctx.fileName, logMessage := fun msg => modify $ fun s => { messages := s.messages.add msg, .. s } } +protected def getCurrMacroScope : CommandElabM Nat := do +ctx ← read; +pure ctx.currMacroScope + +@[inline] protected def withFreshMacroScope {α} (x : CommandElabM α) : CommandElabM α := do +fresh ← modifyGet (fun st => (st.nextMacroScope, { st with nextMacroScope := st.nextMacroScope + 1 })); +adaptReader (fun (ctx : Context) => { ctx with currMacroScope := fresh }) x + +instance CommandElabM.MonadQuotation : MonadQuotation CommandElabM := { + getCurrMacroScope := Command.getCurrMacroScope, + withFreshMacroScope := @Command.withFreshMacroScope +} + abbrev CommandElabTable := ElabFnTable CommandElab def mkBuiltinCommandElabTable : IO (IO.Ref CommandElabTable) := IO.mkRef {} @[init mkBuiltinCommandElabTable] constant builtinCommandElabTable : IO.Ref CommandElabTable := arbitrary _ @@ -130,36 +145,44 @@ stx.ifNode | none => throwError stx ("command '" ++ toString k ++ "' has not been implemented")) (fun _ => throwError stx ("unexpected command")) +/-- Adapt a syntax transformation to a regular, command-producing elaborator. -/ +def adaptExpander (exp : Syntax → CommandElabM Syntax) : CommandElab := +fun stx => do + stx ← exp stx.val; + elabCommand stx + private def mkTermContext (ctx : Context) (s : State) : Term.Context := let scope := s.scopes.head!; { config := { opts := scope.opts, foApprox := true, ctxApprox := true, quasiPatternApprox := true, isDefEqStuckEx := true }, fileName := ctx.fileName, fileMap := ctx.fileMap, cmdPos := ctx.cmdPos, + currMacroScope := ctx.currMacroScope, currNamespace := scope.currNamespace, - univNames := scope.univNames, + levelNames := scope.levelNames, openDecls := scope.openDecls } private def mkTermState (s : State) : Term.State := -{ env := s.env, - messages := s.messages } +{ env := s.env, + messages := s.messages, + nextMacroScope := s.nextMacroScope } private def getVarDecls (s : State) : Array Syntax := s.scopes.head!.varDecls private def toCommandResult {α} (ctx : Context) (s : State) (result : EStateM.Result Term.Exception Term.State α) : EStateM.Result Exception State α := match result with -| EStateM.Result.ok a newS => EStateM.Result.ok a { env := newS.env, messages := newS.messages, .. s } -| EStateM.Result.error (Term.Exception.error ex) newS => EStateM.Result.error ex { env := newS.env, messages := newS.messages, .. s } +| EStateM.Result.ok a newS => EStateM.Result.ok a { env := newS.env, messages := newS.messages, nextMacroScope := newS.nextMacroScope, .. s } +| EStateM.Result.error (Term.Exception.error ex) newS => EStateM.Result.error ex { env := newS.env, messages := newS.messages, nextMacroScope := newS.nextMacroScope, .. s } | EStateM.Result.error Term.Exception.postpone newS => unreachable! instance CommandElabM.inhabited {α} : Inhabited (CommandElabM α) := ⟨throw $ arbitrary _⟩ -@[inline] def runTermElabM {α} (x : TermElabM α) : CommandElabM α := do +@[inline] def runTermElabM {α} (elab : Array Expr → TermElabM α) : CommandElabM α := do ctx ← read; s ← get; -match ((Term.elabBinders (getVarDecls s) (fun _ => x)) (mkTermContext ctx s)).run (mkTermState s) with +match (Term.elabBinders (getVarDecls s) elab (mkTermContext ctx s)).run (mkTermState s) with | EStateM.Result.ok a newS => do modify $ fun s => { env := newS.env, messages := newS.messages, .. s }; pure a | EStateM.Result.error (Term.Exception.error ex) newS => do modify $ fun s => { env := newS.env, messages := newS.messages, .. s }; throw ex | EStateM.Result.error Term.Exception.postpone newS => unreachable! @@ -194,24 +217,25 @@ modify $ fun s => { scopes := { kind := kind, header := header, currNamespace := newNamespace, .. s.scopes.head! } :: s.scopes, .. s } -private def addScopes (kind : String) (updateNamespace : Bool) : Name → CommandElabM Unit +private def addScopes (ref : Syntax) (kind : String) (updateNamespace : Bool) : Name → CommandElabM Unit | Name.anonymous => pure () | Name.str p header _ => do addScopes p; currNamespace ← getCurrNamespace; addScope kind header (if updateNamespace then currNamespace ++ header else currNamespace) -| _ => unreachable! +| _ => throwError ref "invalid scope" + +private def addNamespace (ref : Syntax) (header : Name) : CommandElabM Unit := +addScopes ref "namespace" true header @[builtinCommandElab «namespace»] def elabNamespace : CommandElab := -fun n => do - let header := n.getIdAt 1; - addScopes "namespace" true header +fun stx => addNamespace stx.val (stx.getIdAt 1) @[builtinCommandElab «section»] def elabSection : CommandElab := -fun n => do - let header? := (n.getArg 1).getOptionalIdent?; +fun stx => do + let header? := (stx.getArg 1).getOptionalIdent?; match header? with - | some header => addScopes "section" false header + | some header => addScopes stx.val "section" false header | none => do currNamespace ← getCurrNamespace; addScope "section" "" currNamespace def getScopes : CommandElabM (List Scope) := do @@ -244,6 +268,12 @@ fun n => do | none => unless (checkAnonymousScope scopes) $ throwError n.val "invalid 'end', name is missing" | some header => unless (checkEndHeader header scopes) $ throwError n.val "invalid 'end', name mismatch" +@[inline] def withNamespace {α} (ref : Syntax) (ns : Name) (elab : CommandElabM α) : CommandElabM α := do +addNamespace ref ns; +a ← elab; +modify $ fun s => { scopes := s.scopes.drop ns.getNumParts, .. s }; +pure a + @[specialize] def modifyScope (f : Scope → Scope) : CommandElabM Unit := modify $ fun s => { scopes := match s.scopes with @@ -251,25 +281,28 @@ modify $ fun s => | [] => unreachable!, .. s } -def getUniverseNames : CommandElabM (List Name) := do -scope ← getScope; pure scope.univNames +def getLevelNames : CommandElabM (List Name) := do +scope ← getScope; pure scope.levelNames -def addUniverse (idStx : Syntax) : CommandElabM Unit := do +def throwAlreadyDeclaredUniverseLevel {α} (ref : Syntax) (u : Name) : CommandElabM α := +throwError ref ("a universe level named '" ++ toString u ++ "' has already been declared") + +def addUnivLevel (idStx : Syntax) : CommandElabM Unit := do let id := idStx.getId; -univs ← getUniverseNames; -if univs.elem id then - throwError idStx ("a universe named '" ++ toString id ++ "' has already been declared in this Scope") +levelNames ← getLevelNames; +if levelNames.elem id then + throwAlreadyDeclaredUniverseLevel idStx id else - modifyScope $ fun scope => { univNames := id :: scope.univNames, .. scope } + modifyScope $ fun scope => { levelNames := id :: scope.levelNames, .. scope } @[builtinCommandElab «universe»] def elabUniverse : CommandElab := fun n => do - addUniverse (n.getArg 1) + addUnivLevel (n.getArg 1) @[builtinCommandElab «universes»] def elabUniverses : CommandElab := fun n => do let idsStx := n.getArg 1; - idsStx.forArgsM addUniverse + idsStx.forArgsM addUnivLevel @[builtinCommandElab «init_quot»] def elabInitQuot : CommandElab := fun stx => do @@ -395,7 +428,7 @@ fun n => do -- `variable` bracktedBinder let binder := n.getArg 1; -- Try to elaborate `binder` for sanity checking - runTermElabM $ Term.elabBinder binder $ fun _ => pure (); + runTermElabM $ fun _ => Term.elabBinder binder $ fun _ => pure (); modifyScope $ fun scope => { varDecls := scope.varDecls.push binder, .. scope } @[builtinCommandElab «variables»] def elabVariables : CommandElab := @@ -403,13 +436,13 @@ fun n => do -- `variables` bracktedBinder+ let binders := (n.getArg 1).getArgs; -- Try to elaborate `binders` for sanity checking - runTermElabM $ Term.elabBinders binders $ fun _ => pure (); + runTermElabM $ fun _ => Term.elabBinders binders $ fun _ => pure (); modifyScope $ fun scope => { varDecls := scope.varDecls ++ binders, .. scope } @[builtinCommandElab «check»] def elabCheck : CommandElab := fun stx => do let term := stx.getArg 1; - runTermElabM $ do + runTermElabM $ fun _ => do e ← Term.elabTerm term none; Term.synthesizeSyntheticMVars false; type ← Term.inferType stx.val e; @@ -418,6 +451,52 @@ fun stx => do logInfo stx.val (e ++ " : " ++ type); pure () +@[inline] def withDeclId (declId : Syntax) (f : Name → CommandElabM Unit) : CommandElabM Unit := do +-- ident >> optional (".{" >> sepBy1 ident ", " >> "}") +let id := declId.getIdAt 0; +let optUnivDeclStx := declId.getArg 1; +savedLevelNames ← getLevelNames; +levelNames ← + if optUnivDeclStx.isNone then + pure savedLevelNames + else do { + let extraLevels := (optUnivDeclStx.getArg 1).getArgs.getEvenElems; + extraLevels.foldlM + (fun levelNames idStx => + let id := idStx.getId; + if levelNames.elem id then + throwAlreadyDeclaredUniverseLevel idStx id + else + pure (id :: levelNames)) + savedLevelNames + }; +let ref := declId; +match id with +| Name.str pre s _ => withNamespace ref pre $ do + modifyScope $ fun scope => { levelNames := levelNames, .. scope }; + finally (f (mkNameSimple s)) (modifyScope $ fun scope => { levelNames := savedLevelNames, .. scope }) +| _ => throwError ref "invalid declaration name" + +/-- + Sort the given list of `usedParams` using the following order: + - If it is an explicit level `explicitParams`, then use user given order. + - Otherwise, use lexicographical. + + Remark: `explicitParams` are in reverse declaration order. That is, the head is the last declared parameter. -/ +def sortDeclLevelParams (explicitParams : List Name) (usedParams : Array Name) : List Name := +let result := explicitParams.foldl (fun result levelName => if usedParams.elem levelName then levelName :: result else result) []; +let remaining := usedParams.filter (fun levelParam => !explicitParams.elem levelParam); +let remaining := remaining.qsort Name.lt; +result ++ remaining.toList + +def addDecl (ref : Syntax) (decl : Declaration) : CommandElabM Unit := do +env ← getEnv; +match env.addDecl decl with +| Except.ok env => modify $ fun s => { env := env, .. s } +| Except.error kex => do + opts ← getOptions; + throwError ref (kex.toMessageData opts) + end Command end Elab end Lean diff --git a/stage0/src/Init/Lean/Elab/DeclModifiers.lean b/stage0/src/Init/Lean/Elab/DeclModifiers.lean new file mode 100644 index 0000000000..7a948c7d7c --- /dev/null +++ b/stage0/src/Init/Lean/Elab/DeclModifiers.lean @@ -0,0 +1,128 @@ +/- +Copyright (c) 2020 Microsoft Corporation. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Leonardo de Moura, Sebastian Ullrich +-/ +prelude +import Init.Lean.Elab.Command + +namespace Lean +namespace Elab +namespace Command + +structure Attribute := +(name : Name) (args : Syntax := Syntax.missing) + +instance Attribute.hasFormat : HasFormat Attribute := +⟨fun attr => Format.bracket "@[" (toString attr.name ++ (if attr.args.isMissing then "" else toString attr.args)) "]"⟩ + +inductive Visibility +| regular | «protected» | «private» + +instance Visibility.hasToString : HasToString Visibility := +⟨fun v => match v with + | Visibility.regular => "regular" + | Visibility.private => "private" + | Visibility.protected => "protected"⟩ + +structure Modifiers := +(docString : Option String := none) +(visibility : Visibility := Visibility.regular) +(isNoncomputable : Bool := false) +(isPartial : Bool := false) +(isUnsafe : Bool := false) +(attrs : Array Attribute := #[]) + +def Modifiers.addAttribute (modifiers : Modifiers) (attr : Attribute) : Modifiers := +{ attrs := modifiers.attrs.push attr, .. modifiers } + +instance Modifiers.hasFormat : HasFormat Modifiers := +⟨fun m => + let components : List Format := + (match m.docString with + | some str => ["/--" ++ str ++ "-/"] + | none => []) + ++ (match m.visibility with + | Visibility.regular => [] + | Visibility.protected => ["protected"] + | Visibility.private => ["private"]) + ++ (if m.isNoncomputable then ["noncomputable"] else []) + ++ (if m.isPartial then ["partial"] else []) + ++ (if m.isUnsafe then ["unsafe"] else []) + ++ m.attrs.toList.map (fun attr => fmt attr); + Format.bracket "{" (Format.joinSep components ("," ++ Format.line)) "}"⟩ + +instance Modifiers.hasToString : HasToString Modifiers := ⟨toString ∘ format⟩ + +def elabAttr (stx : Syntax) : CommandElabM Attribute := do +-- rawIdent >> many attrArg +let nameStx := stx.getArg 0; +attrName ← match nameStx.isIdOrAtom? with + | none => throwError nameStx "identifier expected" + | some str => pure $ mkNameSimple str; +unlessM (liftIO stx (isAttribute attrName)) $ + throwError stx ("unknown attribute [" ++ attrName ++ "]"); +let args := stx.getArg 1; +pure { name := attrName, args := args } + +def elabAttrs (stx : Syntax) : CommandElabM (Array Attribute) := +(stx.getArg 1).foldSepArgsM + (fun stx attrs => do + attr ← elabAttr stx; + pure $ attrs.push attr) + #[] + +def elabModifiers (stx : Syntax) : CommandElabM Modifiers := do +let docCommentStx := stx.getArg 0; +let attrsStx := stx.getArg 1; +let visibilityStx := stx.getArg 2; +let noncompStx := stx.getArg 3; +let unsafeStx := stx.getArg 4; +let partialStx := stx.getArg 5; +docString ← match docCommentStx.getOptional? with + | none => pure none + | some s => match s.getArg 1 with + | Syntax.atom _ val => pure (some (val.extract 0 (val.bsize - 2))) + | _ => throwError s ("unexpected doc string " ++ toString (s.getArg 1)); +visibility ← match visibilityStx.getOptional? with + | none => pure Visibility.regular + | some v => + let kind := v.getKind; + if kind == `Lean.Parser.Command.private then pure Visibility.private + else if kind == `Lean.Parser.Command.protected then pure Visibility.protected + else throwError v "unexpected visibility modifier"; +attrs ← match attrsStx.getOptional? with + | none => pure #[] + | some attrs => elabAttrs attrs; +pure { + docString := docString, + visibility := visibility, + isPartial := !partialStx.isNone, + isUnsafe := !unsafeStx.isNone, + isNoncomputable := !noncompStx.isNone, + attrs := attrs +} + +def mkDeclName (modifiers : Modifiers) (atomicName : Name) : CommandElabM Name := do +currNamespace ← getCurrNamespace; +let declName := currNamespace ++ atomicName; +match modifiers.visibility with +| Visibility.private => do + env ← getEnv; + let (env, declName) := mkPrivateName env declName; + setEnv env; + -- TODO: alias? + pure declName +| _ => pure declName + +def applyAttributes (ref : Syntax) (declName : Name) (attrs : Array Attribute) (applicationTime : AttributeApplicationTime) : CommandElabM Unit := +attrs.forM $ fun attr => do + attrImpl ← liftIO ref $ getAttributeImpl attr.name; + when (attrImpl.applicationTime == applicationTime) $ do + env ← getEnv; + env ← liftIO ref $ attrImpl.add env declName attr.args true; + setEnv env + +end Command +end Elab +end Lean diff --git a/stage0/src/Init/Lean/Elab/Declaration.lean b/stage0/src/Init/Lean/Elab/Declaration.lean index bc61bed227..25464a78ca 100644 --- a/stage0/src/Init/Lean/Elab/Declaration.lean +++ b/stage0/src/Init/Lean/Elab/Declaration.lean @@ -4,130 +4,153 @@ Released under Apache 2.0 license as described in the file LICENSE. Authors: Leonardo de Moura, Sebastian Ullrich -/ prelude -import Init.Lean.Elab.Command +import Init.Lean.Util.CollectLevelParams +import Init.Lean.Elab.Definition namespace Lean namespace Elab namespace Command -inductive AttributeArg -| str (val : String) -| num (val : Nat) -| id (val : Name) +def expandOptDeclSig (stx : Syntax) : Syntax × Option Syntax := +-- many Term.bracktedBinder >> Term.optType +let binders := stx.getArg 0; +let optType := stx.getArg 1; -- optional (parser! " : " >> termParser) +if optType.isNone then + (binders, none) +else + let typeSpec := optType.getArg 0; + (binders, some $ typeSpec.getArg 1) -instance AttributeArg.hasToString : HasToString AttributeArg := -⟨fun arg => match arg with - | AttributeArg.str v => repr v - | AttributeArg.num v => toString v - | AttributeArg.id v => toString v⟩ +def expandDeclSig (stx : Syntax) : Syntax × Syntax := +-- many Term.bracktedBinder >> Term.typeSpec +let binders := stx.getArg 0; +let typeSpec := stx.getArg 1; +(binders, typeSpec.getArg 1) -structure Attribute := -(name : Name) (args : Array AttributeArg) - -instance Attribute.hasFormat : HasFormat Attribute := -⟨fun attr => Format.bracket "@[" (toString attr.name ++ (Format.prefixJoin " " attr.args.toList)) "]"⟩ - -inductive Visibility -| regular | «protected» | «private» - -instance Visibility.hasToString : HasToString Visibility := -⟨fun v => match v with - | Visibility.regular => "regular" - | Visibility.private => "private" - | Visibility.protected => "protected"⟩ - -structure Modifiers := -(docString : Option String := none) -(visibility : Visibility := Visibility.regular) -(isNoncomputable : Bool := false) -(isPartial : Bool := false) -(isUnsafe : Bool := false) -(attrs : Array Attribute := #[]) - -instance Modifiers.hasFormat : HasFormat Modifiers := -⟨fun m => - let components : List Format := - (match m.docString with - | some str => ["/--" ++ str ++ "-/"] - | none => []) - ++ (match m.visibility with - | Visibility.regular => [] - | Visibility.protected => ["protected"] - | Visibility.private => ["private"]) - ++ (if m.isNoncomputable then ["noncomputable"] else []) - ++ (if m.isPartial then ["partial"] else []) - ++ (if m.isUnsafe then ["unsafe"] else []) - ++ m.attrs.toList.map (fun attr => fmt attr); - Format.bracket "{" (Format.joinSep components ("," ++ Format.line)) "}"⟩ - -instance Modifiers.hasToString : HasToString Modifiers := ⟨toString ∘ format⟩ - -def elabAttrArg (stx : Syntax) : CommandElabM AttributeArg := do -match stx.isStrLit? with -| some v => pure $ AttributeArg.str v -| _ => -match stx.isNatLit? with -| some v => pure $ AttributeArg.num v -| _ => -match stx with -| Syntax.ident _ _ v _ => pure $ AttributeArg.id v -| _ => throwError stx "unexpected attribute argument" - -def elabAttr (stx : Syntax) : CommandElabM Attribute := do --- rawIdent >> many attrArg -let nameStx := stx.getArg 0; -attrName ← match nameStx.isIdOrAtom? with - | none => throwError nameStx "identifier expected" - | some str => pure $ mkNameSimple str; -unlessM (liftIO stx (isAttribute attrName)) $ - throwError stx ("unknown attribute [" ++ attrName ++ "]"); -let argStxs := (stx.getArg 1).getArgs; -args ← argStxs.mapM elabAttrArg; -pure { name := attrName, args := args } - -def elabAttrs (stx : Syntax) : CommandElabM (Array Attribute) := -(stx.getArg 1).foldSepArgsM - (fun stx attrs => do - attr ← elabAttr stx; - pure $ attrs.push attr) - #[] - -def elabModifiers (stx : Syntax) : CommandElabM Modifiers := do -let docCommentStx := stx.getArg 0; -let attrsStx := stx.getArg 1; -let visibilityStx := stx.getArg 2; -let noncompStx := stx.getArg 3; -let unsafeStx := stx.getArg 4; -let partialStx := stx.getArg 5; -docString ← match docCommentStx.getOptional? with - | none => pure none - | some s => match s.getArg 1 with - | Syntax.atom _ val => pure (some (val.extract 0 (val.bsize - 2))) - | _ => throwError s ("unexpected doc string " ++ toString (s.getArg 1)); -visibility ← match visibilityStx.getOptional? with - | none => pure Visibility.regular - | some v => - let kind := v.getKind; - if kind == `Lean.Parser.Command.private then pure Visibility.private - else if kind == `Lean.Parser.Command.protected then pure Visibility.protected - else throwError v "unexpected visibility modifier"; -attrs ← match attrsStx.getOptional? with - | none => pure #[] - | some attrs => elabAttrs attrs; -pure { - docString := docString, - visibility := visibility, - isPartial := !partialStx.isNone, - isUnsafe := !unsafeStx.isNone, - isNoncomputable := !noncompStx.isNone, - attrs := attrs +def elabAbbrev (modifiers : Modifiers) (stx : Syntax) : CommandElabM Unit := +-- parser! "abbrev " >> declId >> optDeclSig >> declVal +let (binders, type) := expandOptDeclSig (stx.getArg 2); +let modifiers := modifiers.addAttribute { name := `inline }; +let modifiers := modifiers.addAttribute { name := `reducible }; +elabDefLike { + ref := stx, kind := DefKind.def, modifiers := modifiers, + declId := stx.getArg 1, binders := binders, type? := type, val := stx.getArg 3 } +def elabDef (modifiers : Modifiers) (stx : Syntax) : CommandElabM Unit := +-- parser! "def " >> declId >> optDeclSig >> declVal +let (binders, type) := expandOptDeclSig (stx.getArg 2); +elabDefLike { + ref := stx, kind := DefKind.def, modifiers := modifiers, + declId := stx.getArg 1, binders := binders, type? := type, val := stx.getArg 3 +} + +def elabTheorem (modifiers : Modifiers) (stx : Syntax) : CommandElabM Unit := +-- parser! "theorem " >> declId >> declSig >> declVal +let (binders, type) := expandDeclSig (stx.getArg 2); +elabDefLike { + ref := stx, kind := DefKind.theorem, modifiers := modifiers, + declId := stx.getArg 1, binders := binders, type? := some type, val := stx.getArg 3 +} + +def elabConstant (modifiers : Modifiers) (stx : Syntax) : CommandElabM Unit := do +-- parser! "constant " >> declId >> declSig >> optional declValSimple +let (binders, type) := expandDeclSig (stx.getArg 2); +val ← match (stx.getArg 3).getOptional? with + | some val => pure val + | none => `(arbitrary _); +elabDefLike { + ref := stx, kind := DefKind.opaque, modifiers := modifiers, + declId := stx.getArg 1, binders := binders, type? := some type, val := val +} + +def elabInstance (modifiers : Modifiers) (stx : Syntax) : CommandElabM Unit := do +-- parser! "instance " >> optional declId >> declSig >> declVal +let (binders, type) := expandDeclSig (stx.getArg 2); +let modifiers := modifiers.addAttribute { name := `instance }; +declId ← match (stx.getArg 1).getOptional? with + | some declId => pure declId + | none => throwError stx "not implemented yet"; +elabDefLike { + ref := stx, kind := DefKind.def, modifiers := modifiers, + declId := declId, binders := binders, type? := type, val := stx.getArg 3 +} + +def elabExample (modifiers : Modifiers) (stx : Syntax) : CommandElabM Unit := +-- parser! "example " >> declSig >> declVal +let (binders, type) := expandDeclSig (stx.getArg 1); +let id := mkIdentFrom stx `_example; +let declId := Syntax.node `Lean.Parser.Command.declId #[id, mkNullNode]; +elabDefLike { + ref := stx, kind := DefKind.example, modifiers := modifiers, + declId := declId, binders := binders, type? := some type, val := stx.getArg 2 +} + +def elabAxiom (modifiers : Modifiers) (stx : Syntax) : CommandElabM Unit := +-- parser! "axiom " >> declId >> declSig +let declId := stx.getArg 1; +let (binders, typeStx) := expandDeclSig (stx.getArg 2); +withDeclId declId $ fun name => do + declName ← mkDeclName modifiers name; + applyAttributes stx declName modifiers.attrs AttributeApplicationTime.beforeElaboration; + explictLevelNames ← getLevelNames; + decl ← runTermElabM $ fun vars => Term.elabBinders binders.getArgs $ fun xs => do { + type ← Term.elabType typeStx; + Term.synthesizeSyntheticMVars false; + type ← Term.instantiateMVars typeStx type; + type ← Term.mkForall typeStx xs type; + (type, _) ← Term.mkForallUsedOnly typeStx vars type; + type ← Term.levelMVarToParam type; + let usedParams := collectLevelParams type; + let levelParams := sortDeclLevelParams explictLevelNames usedParams; + pure $ Declaration.axiomDecl { + name := declName, + lparams := levelParams, + type := type, + isUnsafe := modifiers.isUnsafe + } + }; + addDecl stx decl; + applyAttributes stx declName modifiers.attrs AttributeApplicationTime.afterTypeChecking; + applyAttributes stx declName modifiers.attrs AttributeApplicationTime.afterCompilation + +def elabInductive (modifiers : Modifiers) (stx : Syntax) : CommandElabM Unit := +pure () -- TODO + +def elabClassInductive (modifiers : Modifiers) (stx : Syntax) : CommandElabM Unit := +pure () -- TODO + +def elabStructure (modifiers : Modifiers) (stx : Syntax) : CommandElabM Unit := +pure () -- TODO + @[builtinCommandElab declaration] def elabDeclaration : CommandElab := fun stx => do modifiers ← elabModifiers (stx.getArg 0); - throwError stx.val ("wip, modifiers: " ++ toString modifiers) + let decl := stx.getArg 1; + let declKind := decl.getKind; + if declKind == `Lean.Parser.Command.abbrev then + elabAbbrev modifiers decl + else if declKind == `Lean.Parser.Command.def then + elabDef modifiers decl + else if declKind == `Lean.Parser.Command.theorem then + elabTheorem modifiers decl + else if declKind == `Lean.Parser.Command.constant then + elabConstant modifiers decl + else if declKind == `Lean.Parser.Command.instance then + elabInstance modifiers decl + else if declKind == `Lean.Parser.Command.axiom then + elabAxiom modifiers decl + else if declKind == `Lean.Parser.Command.example then + elabExample modifiers decl + else if declKind == `Lean.Parser.Command.inductive then + elabInductive modifiers decl + else if declKind == `Lean.Parser.Command.classInductive then + elabClassInductive modifiers decl + else if declKind == `Lean.Parser.Command.structure then + elabStructure modifiers decl + else + throwError stx.val "unexpected declaration" end Command end Elab diff --git a/stage0/src/Init/Lean/Elab/Definition.lean b/stage0/src/Init/Lean/Elab/Definition.lean new file mode 100644 index 0000000000..f8b5a241f4 --- /dev/null +++ b/stage0/src/Init/Lean/Elab/Definition.lean @@ -0,0 +1,47 @@ +/- +Copyright (c) 2020 Microsoft Corporation. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Leonardo de Moura, Sebastian Ullrich +-/ +prelude +import Init.Lean.Elab.DeclModifiers + +namespace Lean +namespace Elab + +namespace Command + +inductive DefKind +| «def» | «theorem» | «example» | «opaque» + +structure DefView := +(kind : DefKind) +(ref : Syntax) +(modifiers : Modifiers) +(declId : Syntax) +(binders : Syntax) +(type? : Option Syntax) +(val : Syntax) + +def elabDefLike (view : DefView) : CommandElabM Unit := +withDeclId view.declId $ fun name => do + currNamespace ← getCurrNamespace; + runTermElabM $ fun vars => Term.elabBinders view.binders.getArgs $ fun xs => + match view.type? with + | some typeStx => do + type ← Term.elabType typeStx; + Term.synthesizeSyntheticMVars false; + type ← Term.instantiateMVars typeStx type; + defType ← Term.mkForall typeStx xs type; + -- TODO: unassigned universe metavariables to new parameters + -- TODO: if theorem, filter unused vars + Term.dbgTrace (">>> " ++ toString type); + pure () + | none => do + type ← Term.mkFreshTypeMVar view.binders; + + pure () + +end Command +end Elab +end Lean diff --git a/stage0/src/Init/Lean/Elab/Frontend.lean b/stage0/src/Init/Lean/Elab/Frontend.lean index cd8db204fd..b760921370 100644 --- a/stage0/src/Init/Lean/Elab/Frontend.lean +++ b/stage0/src/Init/Lean/Elab/Frontend.lean @@ -79,7 +79,7 @@ open Frontend def IO.processCommands (parserCtx : Parser.ParserContextCore) (parserStateRef : IO.Ref Parser.ModuleParserState) (cmdStateRef : IO.Ref Command.State) : IO Unit := do ps ← parserStateRef.get; cmdPosRef ← IO.mkRef ps.pos; -EIO.adaptExcept (fun (ex : Empty) => unreachable!) $ -- TODO: compiler support for Empty.rec is missing +EIO.adaptExcept (fun (ex : Empty) => Empty.rec _ ex) $ processCommands { commandStateRef := cmdStateRef, parserStateRef := parserStateRef, cmdPosRef := cmdPosRef, parserCtx := parserCtx } def process (input : String) (env : Environment) (opts : Options) (fileName : Option String := none) : IO (Environment × MessageLog) := do diff --git a/stage0/src/Init/Lean/Elab/Level.lean b/stage0/src/Init/Lean/Elab/Level.lean index eaab7ee8ed..cbe326fb62 100644 --- a/stage0/src/Init/Lean/Elab/Level.lean +++ b/stage0/src/Init/Lean/Elab/Level.lean @@ -16,7 +16,7 @@ structure Context := (fileName : String) (fileMap : FileMap) (cmdPos : String.Pos) -(univNames : List Name := []) +(levelNames : List Name) structure State := (ngen : NameGenerator) @@ -70,7 +70,7 @@ partial def elabLevel : Syntax → LevelElabM Level else if kind == `Lean.Parser.Level.ident then do let paramName := stx.getIdAt 0; ctx ← read; - unless (ctx.univNames.contains paramName) $ throwError stx ("unknown universe level " ++ paramName); + unless (ctx.levelNames.contains paramName) $ throwError stx ("unknown universe level " ++ paramName); pure $ mkLevelParam paramName else if kind == `Lean.Parser.Level.addLit then do lvl ← elabLevel (stx.getArg 0); diff --git a/stage0/src/Init/Lean/Elab/Term.lean b/stage0/src/Init/Lean/Elab/Term.lean index 45dbd83f7c..9671b43f48 100644 --- a/stage0/src/Init/Lean/Elab/Term.lean +++ b/stage0/src/Init/Lean/Elab/Term.lean @@ -22,7 +22,7 @@ structure Context extends Meta.Context := (fileMap : FileMap) (cmdPos : String.Pos) (currNamespace : Name) -(univNames : List Name := []) +(levelNames : List Name := []) (openDecls : List OpenDecl := []) (macroStack : List Syntax := []) (currMacroScope : MacroScope := 0) @@ -146,7 +146,7 @@ match expectedMsg with | none => throwError ref ("unexpected syntax" ++ MessageData.nest 2 (Format.line ++ refFmt)) | some ex => throwError ref ("unexpected syntax, expected '" ++ ex ++ "'" ++ MessageData.nest 2 (Format.line ++ refFmt)) -protected def getCurrMacroScope : TermElabM Nat := do +protected def getCurrMacroScope : TermElabM MacroScope := do ctx ← read; pure ctx.currMacroScope @@ -285,6 +285,7 @@ def mkFreshTypeMVar (ref : Syntax) (kind : MetavarKind := MetavarKind.natural) ( liftMetaM ref $ do u ← Meta.mkFreshLevelMVar; Meta.mkFreshExprMVar (mkSort u) userName? kind def getLevel (ref : Syntax) (type : Expr) : TermElabM Level := liftMetaM ref $ Meta.getLevel type def mkForall (ref : Syntax) (xs : Array Expr) (e : Expr) : TermElabM Expr := liftMetaM ref $ Meta.mkForall xs e +def mkForallUsedOnly (ref : Syntax) (xs : Array Expr) (e : Expr) : TermElabM (Expr × Nat) := liftMetaM ref $ Meta.mkForallUsedOnly xs e def mkLambda (ref : Syntax) (xs : Array Expr) (e : Expr) : TermElabM Expr := liftMetaM ref $ Meta.mkLambda xs e def mkLet (ref : Syntax) (x : Expr) (e : Expr) : TermElabM Expr := mkLambda ref #[x] e def trySynthInstance (ref : Syntax) (type : Expr) : TermElabM (LOption Expr) := liftMetaM ref $ Meta.trySynthInstance type @@ -329,6 +330,14 @@ stx.ifNode x (fun _ => throwError stx ("term elaborator failed, unexpected synta def mkExplicitBinder (ident : Syntax) (type : Syntax) : Syntax := mkNode `Lean.Parser.Term.explicitBinder #[mkAtom "(", mkNullNode #[ident], mkNullNode #[mkAtom ":", type], mkNullNode, mkAtom ")"] +/-- Convert unassigned universe level metavariables into parameters. -/ +def levelMVarToParam (e : Expr) : TermElabM Expr := do +ctx ← read; +mctx ← getMCtx; +let r := mctx.levelMVarToParam (fun n => ctx.levelNames.elem n) e; +modify $ fun s => { mctx := r.mctx, .. s }; +pure r.expr + /-- Auxiliary method for creating fresh binder names. Do not confuse with the method for creating fresh free/meta variable ids. -/ diff --git a/stage0/src/Init/Lean/Elab/Util.lean b/stage0/src/Init/Lean/Elab/Util.lean index 9cf1f509c8..661004f48b 100644 --- a/stage0/src/Init/Lean/Elab/Util.lean +++ b/stage0/src/Init/Lean/Elab/Util.lean @@ -60,7 +60,7 @@ table ← builtinTableRef.get; pure { table := table } private def throwUnexpectedElabType {γ} (typeName : Name) (constName : Name) : ExceptT String Id γ := -throw ("unexpected elaborator type at '" ++ toString constName ++ "' `" ++ toString typeName ++ "` expected") +throw ("unexpected elaborator type at '" ++ toString constName ++ "', `" ++ toString typeName ++ "` expected") private unsafe def mkElabFnOfConstantUnsafe (γ) (env : Environment) (typeName : Name) (constName : Name) : ExceptT String Id γ := match env.find? constName with diff --git a/stage0/src/Init/Lean/Expr.lean b/stage0/src/Init/Lean/Expr.lean index 5a7a791de9..ba636d3f42 100644 --- a/stage0/src/Init/Lean/Expr.lean +++ b/stage0/src/Init/Lean/Expr.lean @@ -554,7 +554,9 @@ constant hasLooseBVar (e : @& Expr) (bvarIdx : @& Nat) : Bool := arbitrary _ /-- Lower the loose bound variables `>= s` in `e` by `d`. That is, a loose bound variable `bvar i`. - `i >= s` is mapped into `bvar (i-d)`. -/ + `i >= s` is mapped into `bvar (i-d)`. + + Remark: if `s < d`, then result is `e` -/ @[extern "lean_expr_lower_loose_bvars"] constant lowerLooseBVars (e : @& Expr) (s d : @& Nat) : Expr := arbitrary _ diff --git a/stage0/src/Init/Lean/Level.lean b/stage0/src/Init/Lean/Level.lean index 262aab7309..447f6d2bfd 100644 --- a/stage0/src/Init/Lean/Level.lean +++ b/stage0/src/Init/Lean/Level.lean @@ -7,6 +7,8 @@ prelude import Init.Data.Option.Basic import Init.Data.HashMap import Init.Data.PersistentHashMap +import Init.Data.HashSet +import Init.Data.PersistentHashSet import Init.Lean.Data.Name import Init.Lean.Data.Format @@ -432,6 +434,9 @@ end Level abbrev LevelMap (α : Type) := HashMap Level α abbrev PersistentLevelMap (α : Type) := PHashMap Level α +abbrev LevelSet := HashSet Level +abbrev PersistentLevelSet := PHashSet Level +abbrev PLevelSet := PersistentLevelSet end Lean diff --git a/stage0/src/Init/Lean/Meta/Basic.lean b/stage0/src/Init/Lean/Meta/Basic.lean index 9dfa41838f..ef4f33ffad 100644 --- a/stage0/src/Init/Lean/Meta/Basic.lean +++ b/stage0/src/Init/Lean/Meta/Basic.lean @@ -390,6 +390,9 @@ if xs.isEmpty then pure e else liftMkBindingM $ MetavarContext.mkForall xs e def mkLambda (xs : Array Expr) (e : Expr) : MetaM Expr := if xs.isEmpty then pure e else liftMkBindingM $ MetavarContext.mkLambda xs e +def mkForallUsedOnly (xs : Array Expr) (e : Expr) : MetaM (Expr × Nat) := +if xs.isEmpty then pure (e, 0) else liftMkBindingM $ MetavarContext.mkForallUsedOnly xs e + /-- Save cache, execute `x`, restore cache -/ @[inline] def savingCache {α} (x : MetaM α) : MetaM α := do s ← get; diff --git a/stage0/src/Init/Lean/Meta/Instances.lean b/stage0/src/Init/Lean/Meta/Instances.lean index f78ff50400..4abaaf5dac 100644 --- a/stage0/src/Init/Lean/Meta/Instances.lean +++ b/stage0/src/Init/Lean/Meta/Instances.lean @@ -48,7 +48,7 @@ registerAttribute { name := `instance, descr := "type class instance", add := fun env declName args persistent => do - unless args.isMissing $ throw (IO.userError ("invalid attribute 'instance', unexpected argument")); + when args.hasArgs $ throw (IO.userError ("invalid attribute 'instance', unexpected argument")); unless persistent $ throw (IO.userError ("invalid attribute 'instance', must be persistent")); env ← IO.ofExcept (addGlobalInstanceOld env declName); -- TODO: delete addGlobalInstance env declName diff --git a/stage0/src/Init/Lean/MetavarContext.lean b/stage0/src/Init/Lean/MetavarContext.lean index 053cf2a250..4ef81fa60c 100644 --- a/stage0/src/Init/Lean/MetavarContext.lean +++ b/stage0/src/Init/Lean/MetavarContext.lean @@ -813,49 +813,61 @@ if !e.hasMVar then else withFreshCache $ elimMVarDepsAux xs e -/-- Similar to `Expr.abstractRange`, but handles metavariables correctly. - It uses `elimMVarDeps` to ensure `e` and the type of the free variables `xs` do not - contain a metavariable `?m` s.t. local context of `?m` contains a free variable in `xs`. +/-- + Similar to `Expr.abstractRange`, but handles metavariables correctly. + It uses `elimMVarDeps` to ensure `e` and the type of the free variables `xs` do not + contain a metavariable `?m` s.t. local context of `?m` contains a free variable in `xs`. - `elimMVarDeps` is defined later in this file. -/ + `elimMVarDeps` is defined later in this file. -/ @[inline] private def abstractRange (xs : Array Expr) (i : Nat) (e : Expr) : M Expr := do e ← elimMVarDeps xs e; pure (e.abstractRange i xs) -/-- Similar to `LocalContext.mkBinding`, but handles metavariables correctly. -/ -@[specialize] def mkBinding (isLambda : Bool) (lctx : LocalContext) (xs : Array Expr) (e : Expr) : M Expr := do +/-- + Similar to `LocalContext.mkBinding`, but handles metavariables correctly. + If `usedOnly == false` then `forall` and `lambda` are created only for used variables. -/ +@[specialize] def mkBinding (isLambda : Bool) (lctx : LocalContext) (xs : Array Expr) (e : Expr) (usedOnly : Bool := false) : M (Expr × Nat) := do e ← abstractRange xs xs.size e; xs.size.foldRevM - (fun i e => + (fun i (p : Expr × Nat) => + let (e, num) := p; let x := xs.get! i; match lctx.getFVar! x with - | LocalDecl.cdecl _ _ n type bi => do - type ← abstractRange xs i type; - if isLambda then - pure $ Lean.mkLambda n bi type e + | LocalDecl.cdecl _ _ n type bi => + if !usedOnly || e.hasLooseBVar 0 then do + type ← abstractRange xs i type; + if isLambda then + pure (Lean.mkLambda n bi type e, num + 1) + else + pure (Lean.mkForall n bi type e, num + 1) else - pure $ Lean.mkForall n bi type e + pure (e.lowerLooseBVars 1 1, num) | LocalDecl.ldecl _ _ n type value => do if e.hasLooseBVar 0 then do type ← abstractRange xs i type; value ← abstractRange xs i value; - pure $ mkLet n type value e + pure (mkLet n type value e, num + 1) else - pure e) - e + pure (e.lowerLooseBVars 1 1, num)) + (e, 0) end MkBinding abbrev MkBindingM := ReaderT LocalContext MkBinding.M -def mkBinding (isLambda : Bool) (xs : Array Expr) (e : Expr) : MkBindingM Expr := -fun lctx => MkBinding.mkBinding isLambda lctx xs e +def mkBinding (isLambda : Bool) (xs : Array Expr) (e : Expr) (usedOnly : Bool := false) : MkBindingM (Expr × Nat) := +fun lctx => MkBinding.mkBinding isLambda lctx xs e usedOnly -@[inline] def mkLambda (xs : Array Expr) (e : Expr) : MkBindingM Expr := -mkBinding true xs e +@[inline] def mkLambda (xs : Array Expr) (e : Expr) : MkBindingM Expr := do +(e, _) ← mkBinding true xs e; +pure e -@[inline] def mkForall (xs : Array Expr) (e : Expr) : MkBindingM Expr := -mkBinding false xs e +@[inline] def mkForall (xs : Array Expr) (e : Expr) : MkBindingM Expr := do +(e, _) ← mkBinding false xs e; +pure e + +@[inline] def mkForallUsedOnly (xs : Array Expr) (e : Expr) : MkBindingM (Expr × Nat) := do +mkBinding false xs e true /-- `isWellFormed mctx lctx e` return true if @@ -881,5 +893,77 @@ partial def isWellFormed (mctx : MetavarContext) (lctx : LocalContext) : Expr | Expr.fvar fvarId _ => lctx.contains fvarId | Expr.localE _ _ _ _ => unreachable! + +namespace LevelMVarToParam + +structure Context := +(paramNamePrefix : Name) +(alreadyUsedPred : Name → Bool) + +structure State := +(mctx : MetavarContext) +(paramNames : Array Name := #[]) +(nextParamIdx : Nat) + +abbrev M := ReaderT Context $ StateM State + +partial def mkParamName : Unit → M Name +| _ => do + ctx ← read; + s ← get; + let newParamName := ctx.paramNamePrefix.appendIndexAfter s.nextParamIdx; + if ctx.alreadyUsedPred newParamName then do + modify $ fun s => { nextParamIdx := s.nextParamIdx + 1, .. s}; + mkParamName () + else do + modify $ fun s => { nextParamIdx := s.nextParamIdx + 1, paramNames := s.paramNames.push newParamName, .. s}; + pure newParamName + +partial def visitLevel : Level → M Level +| u@(Level.succ v _) => do v ← visitLevel v; pure (u.updateSucc v rfl) +| u@(Level.max v₁ v₂ _) => do v₁ ← visitLevel v₁; v₂ ← visitLevel v₂; pure (u.updateMax v₁ v₂ rfl) +| u@(Level.imax v₁ v₂ _) => do v₁ ← visitLevel v₁; v₂ ← visitLevel v₂; pure (u.updateIMax v₁ v₂ rfl) +| u@(Level.zero _) => pure u +| u@(Level.param _ _) => pure u +| u@(Level.mvar mvarId _) => do + s ← get; + match s.mctx.getLevelAssignment? mvarId with + | some v => visitLevel v + | none => do + p ← mkParamName (); + let p := mkLevelParam p; + modify $ fun s => { mctx := s.mctx.assignLevel mvarId p, .. s }; + pure p + +@[inline] private def visit (f : Expr → M Expr) (e : Expr) : M Expr := +if e.hasLevelMVar then f e else pure e + +partial def main : Expr → M Expr +| e@(Expr.proj _ _ s _) => do s ← visit main s; pure (e.updateProj! s) +| e@(Expr.forallE _ d b _) => do d ← visit main d; b ← visit main b; pure (e.updateForallE! d b) +| e@(Expr.lam _ d b _) => do d ← visit main d; b ← visit main b; pure (e.updateLambdaE! d b) +| e@(Expr.letE _ t v b _) => do t ← visit main t; v ← visit main v; b ← visit main b; pure (e.updateLet! t v b) +| e@(Expr.app f a _) => do f ← visit main f; a ← visit main a; pure (e.updateApp! f a) +| e@(Expr.mdata _ b _) => do b ← visit main b; pure (e.updateMData! b) +| e@(Expr.const _ us _) => do us ← us.mapM visitLevel; pure (e.updateConst! us) +| e@(Expr.sort u _) => do u ← visitLevel u; pure (e.updateSort! u) +| e => pure e + +end LevelMVarToParam + +structure UnivMVarParamResult := +(mctx : MetavarContext) +(newParamNames : Array Name) +(nextParamIdx : Nat) +(expr : Expr) + +def levelMVarToParam (mctx : MetavarContext) (alreadyUsedPred : Name → Bool) (e : Expr) (paramNamePrefix : Name := `u) (nextParamIdx : Nat := 1) + : UnivMVarParamResult := +let (e, s) := LevelMVarToParam.main e { paramNamePrefix := paramNamePrefix, alreadyUsedPred := alreadyUsedPred } { mctx := mctx, nextParamIdx := nextParamIdx }; +{ mctx := mctx, + newParamNames := s.paramNames, + nextParamIdx := s.nextParamIdx, + expr := e } + end MetavarContext end Lean diff --git a/stage0/src/Init/Lean/Parser/Parser.lean b/stage0/src/Init/Lean/Parser/Parser.lean index ad53336356..aac14e5eb9 100644 --- a/stage0/src/Init/Lean/Parser/Parser.lean +++ b/stage0/src/Init/Lean/Parser/Parser.lean @@ -1515,7 +1515,7 @@ registerAttribute { name := attrName, descr := "Builtin parser", add := fun env declName args persistent => do { - unless args.isMissing $ throw (IO.userError ("invalid attribute '" ++ toString attrName ++ "', unexpected argument")); + when args.hasArgs $ throw (IO.userError ("invalid attribute '" ++ toString attrName ++ "', unexpected argument")); unless persistent $ throw (IO.userError ("invalid attribute '" ++ toString attrName ++ "', must be persistent")); match env.find? declName with | none => throw "unknown declaration" diff --git a/stage0/src/Init/Lean/Util/CollectLevelParams.lean b/stage0/src/Init/Lean/Util/CollectLevelParams.lean new file mode 100644 index 0000000000..53c829e0b2 --- /dev/null +++ b/stage0/src/Init/Lean/Util/CollectLevelParams.lean @@ -0,0 +1,61 @@ +/- +Copyright (c) 2020 Microsoft Corporation. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Leonardo de Moura +-/ +prelude +import Init.Lean.Expr + +namespace Lean + +namespace CollectLevelParams + +structure State := +(visitedLevel : LevelSet := {}) +(visitedExpr : ExprSet := {}) +(params : Array Name := #[]) + +abbrev M := StateM State + +@[inline] def visitLevel (f : Level → M Unit) (u : Level) : M Unit := +if !u.hasParam then pure () +else do + s ← get; + if s.visitedLevel.contains u then pure () + else do + modify $ fun s => { visitedLevel := s.visitedLevel.insert u, .. s }; + f u + +partial def collect : Level → M Unit +| Level.succ v _ => visitLevel collect v +| Level.max u v _ => do visitLevel collect u; visitLevel collect v +| Level.imax u v _ => do visitLevel collect u; visitLevel collect v +| Level.param n _ => modify $ fun s => { params := s.params.push n, .. s } +| _ => pure () + +@[inline] def visitExpr (f : Expr → M Unit) (e : Expr) : M Unit := +if !e.hasLevelParam then pure () +else do + s ← get; + if s.visitedExpr.contains e then pure () + else do + modify $ fun s => { visitedExpr := s.visitedExpr.insert e, .. s }; + f e + +partial def main : Expr → M Unit +| Expr.proj _ _ s _ => visitExpr main s +| Expr.forallE _ d b _ => do visitExpr main d; visitExpr main b +| Expr.lam _ d b _ => do visitExpr main d; visitExpr main b +| Expr.letE _ t v b _ => do visitExpr main t; visitExpr main v; visitExpr main b +| Expr.app f a _ => do visitExpr main f; visitExpr main a +| Expr.mdata _ b _ => visitExpr main b +| Expr.const _ us _ => us.forM (visitLevel collect) +| Expr.sort u _ => visitLevel collect u +| _ => pure () + +end CollectLevelParams + +def collectLevelParams (e : Expr) : Array Name := +(CollectLevelParams.main e {}).2.params + +end Lean diff --git a/stage0/stdlib/CMakeLists.txt b/stage0/stdlib/CMakeLists.txt index 814384b27c..5b9cc58370 100644 --- a/stage0/stdlib/CMakeLists.txt +++ b/stage0/stdlib/CMakeLists.txt @@ -1 +1 @@ -add_library (stage0 OBJECT Init/./Coe.c Init/./Control.c Init/./Control/Alternative.c Init/./Control/Applicative.c Init/./Control/Conditional.c Init/./Control/EState.c Init/./Control/Except.c Init/./Control/Functor.c Init/./Control/Id.c Init/./Control/Lift.c Init/./Control/Monad.c Init/./Control/MonadFail.c Init/./Control/Option.c Init/./Control/Reader.c Init/./Control/State.c Init/./Core.c Init/./Data.c Init/./Data/Array.c Init/./Data/Array/Basic.c Init/./Data/Array/BinSearch.c Init/./Data/Array/QSort.c Init/./Data/AssocList.c Init/./Data/Basic.c Init/./Data/BinomialHeap.c Init/./Data/BinomialHeap/Basic.c Init/./Data/ByteArray.c Init/./Data/ByteArray/Basic.c Init/./Data/Char.c Init/./Data/Char/Basic.c Init/./Data/DList.c Init/./Data/Fin.c Init/./Data/Fin/Basic.c Init/./Data/HashMap.c Init/./Data/HashMap/Basic.c Init/./Data/HashSet.c Init/./Data/Hashable.c Init/./Data/Int.c Init/./Data/Int/Basic.c Init/./Data/List.c Init/./Data/List/Basic.c Init/./Data/List/BasicAux.c Init/./Data/List/Control.c Init/./Data/List/Instances.c Init/./Data/Nat.c Init/./Data/Nat/Basic.c Init/./Data/Nat/Bitwise.c Init/./Data/Nat/Control.c Init/./Data/Nat/Div.c Init/./Data/Option.c Init/./Data/Option/Basic.c Init/./Data/Option/BasicAux.c Init/./Data/Option/Instances.c Init/./Data/PersistentArray.c Init/./Data/PersistentArray/Basic.c Init/./Data/PersistentHashMap.c Init/./Data/PersistentHashMap/Basic.c Init/./Data/PersistentHashSet.c Init/./Data/Queue.c Init/./Data/Queue/Basic.c Init/./Data/RBMap.c Init/./Data/RBMap/Basic.c Init/./Data/RBMap/BasicAux.c Init/./Data/RBTree.c Init/./Data/RBTree/Basic.c Init/./Data/Random.c Init/./Data/Repr.c Init/./Data/Stack.c Init/./Data/Stack/Basic.c Init/./Data/String.c Init/./Data/String/Basic.c Init/./Data/ToString.c Init/./Data/UInt.c Init/./Default.c Init/./Fix.c Init/./Lean.c Init/./Lean/Attributes.c Init/./Lean/AuxRecursor.c Init/./Lean/Class.c Init/./Lean/Compiler.c Init/./Lean/Compiler/ClosedTermCache.c Init/./Lean/Compiler/ConstFolding.c Init/./Lean/Compiler/ExportAttr.c Init/./Lean/Compiler/ExternAttr.c Init/./Lean/Compiler/IR.c Init/./Lean/Compiler/IR/Basic.c Init/./Lean/Compiler/IR/Borrow.c Init/./Lean/Compiler/IR/Boxing.c Init/./Lean/Compiler/IR/Checker.c Init/./Lean/Compiler/IR/CompilerM.c Init/./Lean/Compiler/IR/CtorLayout.c Init/./Lean/Compiler/IR/ElimDeadBranches.c Init/./Lean/Compiler/IR/ElimDeadVars.c Init/./Lean/Compiler/IR/EmitC.c Init/./Lean/Compiler/IR/EmitUtil.c Init/./Lean/Compiler/IR/ExpandResetReuse.c Init/./Lean/Compiler/IR/Format.c Init/./Lean/Compiler/IR/FreeVars.c Init/./Lean/Compiler/IR/LiveVars.c Init/./Lean/Compiler/IR/NormIds.c Init/./Lean/Compiler/IR/PushProj.c Init/./Lean/Compiler/IR/RC.c Init/./Lean/Compiler/IR/ResetReuse.c Init/./Lean/Compiler/IR/SimpCase.c Init/./Lean/Compiler/IR/UnboxResult.c Init/./Lean/Compiler/ImplementedByAttr.c Init/./Lean/Compiler/InitAttr.c Init/./Lean/Compiler/InlineAttrs.c Init/./Lean/Compiler/NameMangling.c Init/./Lean/Compiler/NeverExtractAttr.c Init/./Lean/Compiler/Specialize.c Init/./Lean/Compiler/Util.c Init/./Lean/Data/Format.c Init/./Lean/Data/KVMap.c Init/./Lean/Data/LBool.c Init/./Lean/Data/LOption.c Init/./Lean/Data/Name.c Init/./Lean/Data/NameGenerator.c Init/./Lean/Data/Options.c Init/./Lean/Data/Position.c Init/./Lean/Data/SMap.c Init/./Lean/Data/Trie.c Init/./Lean/Declaration.c Init/./Lean/Elab.c Init/./Lean/Elab/Alias.c Init/./Lean/Elab/BuiltinNotation.c Init/./Lean/Elab/Command.c Init/./Lean/Elab/Declaration.c Init/./Lean/Elab/ElabStrategyAttrs.c Init/./Lean/Elab/Exception.c Init/./Lean/Elab/Frontend.c Init/./Lean/Elab/Import.c Init/./Lean/Elab/Level.c Init/./Lean/Elab/Log.c Init/./Lean/Elab/Quotation.c Init/./Lean/Elab/ResolveName.c Init/./Lean/Elab/Term.c Init/./Lean/Elab/TermApp.c Init/./Lean/Elab/TermBinders.c Init/./Lean/Elab/Util.c Init/./Lean/Environment.c Init/./Lean/EqnCompiler.c Init/./Lean/EqnCompiler/MatchPattern.c Init/./Lean/Eval.c Init/./Lean/Expr.c Init/./Lean/Hygiene.c Init/./Lean/Level.c Init/./Lean/Linter.c Init/./Lean/LocalContext.c Init/./Lean/Meta.c Init/./Lean/Meta/AbstractMVars.c Init/./Lean/Meta/AppBuilder.c Init/./Lean/Meta/Basic.c Init/./Lean/Meta/Check.c Init/./Lean/Meta/DiscrTree.c Init/./Lean/Meta/DiscrTreeTypes.c Init/./Lean/Meta/Exception.c Init/./Lean/Meta/ExprDefEq.c Init/./Lean/Meta/FunInfo.c Init/./Lean/Meta/InferType.c Init/./Lean/Meta/Instances.c Init/./Lean/Meta/LevelDefEq.c Init/./Lean/Meta/Message.c Init/./Lean/Meta/Offset.c Init/./Lean/Meta/Reduce.c Init/./Lean/Meta/SynthInstance.c Init/./Lean/Meta/Tactic.c Init/./Lean/Meta/Tactic/Assumption.c Init/./Lean/Meta/Tactic/Intro.c Init/./Lean/Meta/Tactic/Util.c Init/./Lean/Meta/WHNF.c Init/./Lean/MetavarContext.c Init/./Lean/Modifiers.c Init/./Lean/Parser.c Init/./Lean/Parser/Command.c Init/./Lean/Parser/Identifier.c Init/./Lean/Parser/Level.c Init/./Lean/Parser/Module.c Init/./Lean/Parser/Parser.c Init/./Lean/Parser/Term.c Init/./Lean/Parser/Transform.c Init/./Lean/ProjFns.c Init/./Lean/ReducibilityAttrs.c Init/./Lean/Runtime.c Init/./Lean/Scopes.c Init/./Lean/Structure.c Init/./Lean/Syntax.c Init/./Lean/ToExpr.c Init/./Lean/Util/Message.c Init/./Lean/Util/MonadCache.c Init/./Lean/Util/Path.c Init/./Lean/Util/Profile.c Init/./Lean/Util/Sorry.c Init/./Lean/Util/Trace.c Init/./Lean/Util/WHNF.c Init/./LeanExt.c Init/./System.c Init/./System/FilePath.c Init/./System/IO.c Init/./System/Platform.c Init/./Util.c Init/./WF.c) +add_library (stage0 OBJECT Init/./Coe.c Init/./Control.c Init/./Control/Alternative.c Init/./Control/Applicative.c Init/./Control/Conditional.c Init/./Control/EState.c Init/./Control/Except.c Init/./Control/Functor.c Init/./Control/Id.c Init/./Control/Lift.c Init/./Control/Monad.c Init/./Control/MonadFail.c Init/./Control/Option.c Init/./Control/Reader.c Init/./Control/State.c Init/./Core.c Init/./Data.c Init/./Data/Array.c Init/./Data/Array/Basic.c Init/./Data/Array/BinSearch.c Init/./Data/Array/QSort.c Init/./Data/AssocList.c Init/./Data/Basic.c Init/./Data/BinomialHeap.c Init/./Data/BinomialHeap/Basic.c Init/./Data/ByteArray.c Init/./Data/ByteArray/Basic.c Init/./Data/Char.c Init/./Data/Char/Basic.c Init/./Data/DList.c Init/./Data/Fin.c Init/./Data/Fin/Basic.c Init/./Data/HashMap.c Init/./Data/HashMap/Basic.c Init/./Data/HashSet.c Init/./Data/Hashable.c Init/./Data/Int.c Init/./Data/Int/Basic.c Init/./Data/List.c Init/./Data/List/Basic.c Init/./Data/List/BasicAux.c Init/./Data/List/Control.c Init/./Data/List/Instances.c Init/./Data/Nat.c Init/./Data/Nat/Basic.c Init/./Data/Nat/Bitwise.c Init/./Data/Nat/Control.c Init/./Data/Nat/Div.c Init/./Data/Option.c Init/./Data/Option/Basic.c Init/./Data/Option/BasicAux.c Init/./Data/Option/Instances.c Init/./Data/PersistentArray.c Init/./Data/PersistentArray/Basic.c Init/./Data/PersistentHashMap.c Init/./Data/PersistentHashMap/Basic.c Init/./Data/PersistentHashSet.c Init/./Data/Queue.c Init/./Data/Queue/Basic.c Init/./Data/RBMap.c Init/./Data/RBMap/Basic.c Init/./Data/RBMap/BasicAux.c Init/./Data/RBTree.c Init/./Data/RBTree/Basic.c Init/./Data/Random.c Init/./Data/Repr.c Init/./Data/Stack.c Init/./Data/Stack/Basic.c Init/./Data/String.c Init/./Data/String/Basic.c Init/./Data/ToString.c Init/./Data/UInt.c Init/./Default.c Init/./Fix.c Init/./Lean.c Init/./Lean/Attributes.c Init/./Lean/AuxRecursor.c Init/./Lean/Class.c Init/./Lean/Compiler.c Init/./Lean/Compiler/ClosedTermCache.c Init/./Lean/Compiler/ConstFolding.c Init/./Lean/Compiler/ExportAttr.c Init/./Lean/Compiler/ExternAttr.c Init/./Lean/Compiler/IR.c Init/./Lean/Compiler/IR/Basic.c Init/./Lean/Compiler/IR/Borrow.c Init/./Lean/Compiler/IR/Boxing.c Init/./Lean/Compiler/IR/Checker.c Init/./Lean/Compiler/IR/CompilerM.c Init/./Lean/Compiler/IR/CtorLayout.c Init/./Lean/Compiler/IR/ElimDeadBranches.c Init/./Lean/Compiler/IR/ElimDeadVars.c Init/./Lean/Compiler/IR/EmitC.c Init/./Lean/Compiler/IR/EmitUtil.c Init/./Lean/Compiler/IR/ExpandResetReuse.c Init/./Lean/Compiler/IR/Format.c Init/./Lean/Compiler/IR/FreeVars.c Init/./Lean/Compiler/IR/LiveVars.c Init/./Lean/Compiler/IR/NormIds.c Init/./Lean/Compiler/IR/PushProj.c Init/./Lean/Compiler/IR/RC.c Init/./Lean/Compiler/IR/ResetReuse.c Init/./Lean/Compiler/IR/SimpCase.c Init/./Lean/Compiler/IR/UnboxResult.c Init/./Lean/Compiler/ImplementedByAttr.c Init/./Lean/Compiler/InitAttr.c Init/./Lean/Compiler/InlineAttrs.c Init/./Lean/Compiler/NameMangling.c Init/./Lean/Compiler/NeverExtractAttr.c Init/./Lean/Compiler/Specialize.c Init/./Lean/Compiler/Util.c Init/./Lean/Data/Format.c Init/./Lean/Data/KVMap.c Init/./Lean/Data/LBool.c Init/./Lean/Data/LOption.c Init/./Lean/Data/Name.c Init/./Lean/Data/NameGenerator.c Init/./Lean/Data/Options.c Init/./Lean/Data/Position.c Init/./Lean/Data/SMap.c Init/./Lean/Data/Trie.c Init/./Lean/Declaration.c Init/./Lean/Elab.c Init/./Lean/Elab/Alias.c Init/./Lean/Elab/BuiltinNotation.c Init/./Lean/Elab/Command.c Init/./Lean/Elab/DeclModifiers.c Init/./Lean/Elab/Declaration.c Init/./Lean/Elab/Definition.c Init/./Lean/Elab/ElabStrategyAttrs.c Init/./Lean/Elab/Exception.c Init/./Lean/Elab/Frontend.c Init/./Lean/Elab/Import.c Init/./Lean/Elab/Level.c Init/./Lean/Elab/Log.c Init/./Lean/Elab/Quotation.c Init/./Lean/Elab/ResolveName.c Init/./Lean/Elab/Term.c Init/./Lean/Elab/TermApp.c Init/./Lean/Elab/TermBinders.c Init/./Lean/Elab/Util.c Init/./Lean/Environment.c Init/./Lean/EqnCompiler.c Init/./Lean/EqnCompiler/MatchPattern.c Init/./Lean/Eval.c Init/./Lean/Expr.c Init/./Lean/Hygiene.c Init/./Lean/Level.c Init/./Lean/Linter.c Init/./Lean/LocalContext.c Init/./Lean/Meta.c Init/./Lean/Meta/AbstractMVars.c Init/./Lean/Meta/AppBuilder.c Init/./Lean/Meta/Basic.c Init/./Lean/Meta/Check.c Init/./Lean/Meta/DiscrTree.c Init/./Lean/Meta/DiscrTreeTypes.c Init/./Lean/Meta/Exception.c Init/./Lean/Meta/ExprDefEq.c Init/./Lean/Meta/FunInfo.c Init/./Lean/Meta/InferType.c Init/./Lean/Meta/Instances.c Init/./Lean/Meta/LevelDefEq.c Init/./Lean/Meta/Message.c Init/./Lean/Meta/Offset.c Init/./Lean/Meta/Reduce.c Init/./Lean/Meta/SynthInstance.c Init/./Lean/Meta/Tactic.c Init/./Lean/Meta/Tactic/Assumption.c Init/./Lean/Meta/Tactic/Intro.c Init/./Lean/Meta/Tactic/Util.c Init/./Lean/Meta/WHNF.c Init/./Lean/MetavarContext.c Init/./Lean/Modifiers.c Init/./Lean/Parser.c Init/./Lean/Parser/Command.c Init/./Lean/Parser/Identifier.c Init/./Lean/Parser/Level.c Init/./Lean/Parser/Module.c Init/./Lean/Parser/Parser.c Init/./Lean/Parser/Term.c Init/./Lean/Parser/Transform.c Init/./Lean/ProjFns.c Init/./Lean/ReducibilityAttrs.c Init/./Lean/Runtime.c Init/./Lean/Scopes.c Init/./Lean/Structure.c Init/./Lean/Syntax.c Init/./Lean/ToExpr.c Init/./Lean/Util/CollectLevelParams.c Init/./Lean/Util/Message.c Init/./Lean/Util/MonadCache.c Init/./Lean/Util/Path.c Init/./Lean/Util/Profile.c Init/./Lean/Util/Sorry.c Init/./Lean/Util/Trace.c Init/./Lean/Util/WHNF.c Init/./LeanExt.c Init/./System.c Init/./System/FilePath.c Init/./System/IO.c Init/./System/Platform.c Init/./Util.c Init/./WF.c) diff --git a/stage0/stdlib/Init/Data/Array/Basic.c b/stage0/stdlib/Init/Data/Array/Basic.c index 30ac67307f..eb426f576a 100644 --- a/stage0/stdlib/Init/Data/Array/Basic.c +++ b/stage0/stdlib/Init/Data/Array/Basic.c @@ -25,6 +25,7 @@ lean_object* l_Array_iterateM_u2082Aux___main(lean_object*, lean_object*); lean_object* l_Array_iterate_u2082(lean_object*, lean_object*, lean_object*); lean_object* l_Array_extractAux___rarg___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Array_HasBeq(lean_object*); +lean_object* l_Array_elem___rarg___boxed(lean_object*, lean_object*, lean_object*); lean_object* l_Array_anyRangeMAux___main___at_Array_anyFrom___spec__2___rarg___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Array_indexOfAux___rarg(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Array_anyRangeMAux___main___at_Array_allRangeM___spec__1___boxed(lean_object*, lean_object*); @@ -414,6 +415,7 @@ lean_object* l_List_redLength(lean_object*); lean_object* l_Array_findMAux___boxed(lean_object*, lean_object*); lean_object* l_Array_findRev_x21___rarg(lean_object*, lean_object*, lean_object*); lean_object* l_Array_insertAtAux___rarg___boxed(lean_object*, lean_object*, lean_object*); +uint8_t l_Array_elem___rarg(lean_object*, lean_object*, lean_object*); lean_object* l_Array_find_x21___rarg___boxed(lean_object*, lean_object*, lean_object*); lean_object* l_Array_foldlM___boxed(lean_object*, lean_object*); lean_object* l___private_Init_Data_Array_Basic_1__swapAtPanic_x21___at_Array_swapAt_x21___spec__1___rarg(lean_object*, lean_object*); @@ -525,6 +527,7 @@ lean_object* l___private_Init_Data_Array_Basic_4__foldrRangeMAux___rarg___boxed( lean_object* l_Array_isEqvAux___main(lean_object*); lean_object* l_Array_insertAt(lean_object*); lean_object* l_Array_foldlFromM(lean_object*, lean_object*); +lean_object* l_Array_elem(lean_object*); lean_object* l_Array_filter___rarg(lean_object*, lean_object*); lean_object* l_Array_forRevMAux___main___rarg___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Array_HasRepr(lean_object*); @@ -7243,6 +7246,32 @@ x_5 = lean_box(x_4); return x_5; } } +uint8_t l_Array_elem___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +_start: +{ +uint8_t x_4; +x_4 = l_Array_contains___rarg(x_1, x_3, x_2); +return x_4; +} +} +lean_object* l_Array_elem(lean_object* x_1) { +_start: +{ +lean_object* x_2; +x_2 = lean_alloc_closure((void*)(l_Array_elem___rarg___boxed), 3, 0); +return x_2; +} +} +lean_object* l_Array_elem___rarg___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +_start: +{ +uint8_t x_4; lean_object* x_5; +x_4 = l_Array_elem___rarg(x_1, x_2, x_3); +lean_dec(x_3); +x_5 = lean_box(x_4); +return x_5; +} +} lean_object* l_Array_insertAtAux___main___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3) { _start: { @@ -7321,7 +7350,7 @@ _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4; lean_object* x_5; x_1 = l___private_Init_Data_Array_Basic_1__swapAtPanic_x21___rarg___closed__3; -x_2 = lean_unsigned_to_nat(602u); +x_2 = lean_unsigned_to_nat(605u); x_3 = lean_unsigned_to_nat(20u); x_4 = l_Array_insertAt___rarg___closed__1; x_5 = l___private_Init_Util_1__mkPanicMessage(x_1, x_2, x_3, x_4); diff --git a/stage0/stdlib/Init/Lean/Attributes.c b/stage0/stdlib/Init/Lean/Attributes.c index fe7cd5007f..912530c48a 100644 --- a/stage0/stdlib/Init/Lean/Attributes.c +++ b/stage0/stdlib/Init/Lean/Attributes.c @@ -93,11 +93,14 @@ lean_object* l___private_Init_Data_Array_QSort_1__partitionAux___main___at_Lean_ uint8_t l_AssocList_contains___main___at_Lean_registerAttribute___spec__2(lean_object*, lean_object*); extern lean_object* l_Lean_PersistentEnvExtension_inhabited___rarg___closed__1; lean_object* l_Lean_registerTagAttribute___lambda__4___closed__3; +lean_object* l_Lean_Syntax_hasArgs___boxed(lean_object*); lean_object* l___private_Init_Data_Array_QSort_1__partitionAux___main___at_Lean_registerParametricAttribute___spec__5(lean_object*); lean_object* l_HashMapImp_find_x3f___at_Lean_getAttributeImpl___spec__1(lean_object*, lean_object*); +uint8_t l_Lean_AttributeApplicationTime_beq(uint8_t, uint8_t); lean_object* l_RBNode_insert___at_Lean_NameMap_insert___spec__1___rarg(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_TagAttribute_Inhabited___closed__2; lean_object* l_Lean_registerEnumAttributes___rarg___lambda__2___closed__2; +lean_object* l_Lean_AttributeApplicationTime_hasBeq; lean_object* lean_array_fget(lean_object*, lean_object*); uint8_t lean_nat_dec_eq(lean_object*, lean_object*); lean_object* l_Lean_TagAttribute_Inhabited___closed__1; @@ -112,6 +115,7 @@ lean_object* lean_array_swap(lean_object*, lean_object*, lean_object*); lean_object* l___private_Init_Data_Array_QSort_1__partitionAux___main___at_Lean_registerParametricAttribute___spec__5___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); extern lean_object* l_Lean_PersistentEnvExtension_inhabited___rarg___closed__2; lean_object* l_Lean_AttributeImpl_inhabited___lambda__2(lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_AttributeApplicationTime_hasBeq___closed__1; lean_object* l___private_Init_Data_Array_QSort_1__partitionAux___main___at_Lean_registerEnumAttributes___spec__6___rarg___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* lean_array_get(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_mkAttributeMapRef(lean_object*); @@ -179,7 +183,6 @@ lean_object* l_Array_binSearchAux___main___at_Lean_EnumAttributes_getValue___spe lean_object* l_Lean_AttributeImpl_inhabited___closed__6; extern lean_object* l_Lean_registerPersistentEnvExtensionUnsafe___rarg___closed__3; lean_object* l_AssocList_replace___main___at_Lean_registerAttribute___spec__7(lean_object*, lean_object*, lean_object*); -uint8_t l_Lean_Syntax_isMissing(lean_object*); lean_object* l_Array_qsortAux___main___at_Lean_registerEnumAttributes___spec__2(lean_object*); lean_object* l_Array_qsortAux___main___at_Lean_registerEnumAttributes___spec__2___rarg___boxed(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_AssocList_find___main___at_Lean_getAttributeImpl___spec__2___boxed(lean_object*, lean_object*); @@ -194,6 +197,7 @@ lean_object* l_Lean_AttributeImpl_inhabited___lambda__2___boxed(lean_object*, le extern lean_object* l_Lean_registerSimplePersistentEnvExtension___rarg___lambda__4___closed__2; lean_object* l_Lean_AttributeImpl_inhabited___lambda__1(lean_object*, lean_object*, lean_object*, uint8_t, lean_object*); lean_object* l_Array_anyRangeMAux___main___at_Lean_registerParametricAttribute___spec__8(lean_object*); +uint8_t l_Lean_Syntax_hasArgs(lean_object*); lean_object* l_Lean_registerTagAttribute___lambda__4(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, uint8_t, lean_object*); uint8_t lean_nat_dec_le(lean_object*, lean_object*); lean_object* l_Lean_registerTagAttribute___lambda__4___closed__5; @@ -209,6 +213,7 @@ lean_object* l_Lean_registerTagAttribute___lambda__5___boxed(lean_object*, lean_ lean_object* l_Lean_registerEnumAttributes___rarg___closed__1; lean_object* l_RBNode_fold___main___at_Lean_registerParametricAttribute___spec__1___rarg(lean_object*, lean_object*); lean_object* l_Lean_AttributeImpl_inhabited___closed__1; +lean_object* l_Lean_AttributeApplicationTime_beq___boxed(lean_object*, lean_object*); lean_object* l_Lean_ParametricAttribute_getParam___rarg(lean_object*, lean_object*, lean_object*, lean_object*); extern lean_object* l_Lean_registerPersistentEnvExtensionUnsafe___rarg___closed__4; lean_object* lean_add_attribute(lean_object*, lean_object*, lean_object*, lean_object*, uint8_t, lean_object*); @@ -309,6 +314,127 @@ lean_object* l_Lean_EnumAttributes_getValue(lean_object*); lean_object* l_Lean_registerEnumAttributes___rarg(lean_object*, lean_object*, lean_object*, lean_object*, uint8_t, lean_object*); lean_object* l___private_Init_Data_Array_QSort_1__partitionAux___main___at_Lean_registerParametricAttribute___spec__6___rarg___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); uint8_t lean_nat_dec_lt(lean_object*, lean_object*); +uint8_t l_Lean_AttributeApplicationTime_beq(uint8_t x_1, uint8_t x_2) { +_start: +{ +switch (x_1) { +case 0: +{ +lean_object* x_3; +x_3 = lean_box(x_2); +if (lean_obj_tag(x_3) == 0) +{ +uint8_t x_4; +x_4 = 1; +return x_4; +} +else +{ +uint8_t x_5; +lean_dec(x_3); +x_5 = 0; +return x_5; +} +} +case 1: +{ +lean_object* x_6; +x_6 = lean_box(x_2); +if (lean_obj_tag(x_6) == 1) +{ +uint8_t x_7; +x_7 = 1; +return x_7; +} +else +{ +uint8_t x_8; +lean_dec(x_6); +x_8 = 0; +return x_8; +} +} +default: +{ +lean_object* x_9; +x_9 = lean_box(x_2); +if (lean_obj_tag(x_9) == 2) +{ +uint8_t x_10; +x_10 = 1; +return x_10; +} +else +{ +uint8_t x_11; +lean_dec(x_9); +x_11 = 0; +return x_11; +} +} +} +} +} +lean_object* l_Lean_AttributeApplicationTime_beq___boxed(lean_object* x_1, lean_object* x_2) { +_start: +{ +uint8_t x_3; uint8_t x_4; uint8_t x_5; lean_object* x_6; +x_3 = lean_unbox(x_1); +lean_dec(x_1); +x_4 = lean_unbox(x_2); +lean_dec(x_2); +x_5 = l_Lean_AttributeApplicationTime_beq(x_3, x_4); +x_6 = lean_box(x_5); +return x_6; +} +} +lean_object* _init_l_Lean_AttributeApplicationTime_hasBeq___closed__1() { +_start: +{ +lean_object* x_1; +x_1 = lean_alloc_closure((void*)(l_Lean_AttributeApplicationTime_beq___boxed), 2, 0); +return x_1; +} +} +lean_object* _init_l_Lean_AttributeApplicationTime_hasBeq() { +_start: +{ +lean_object* x_1; +x_1 = l_Lean_AttributeApplicationTime_hasBeq___closed__1; +return x_1; +} +} +uint8_t l_Lean_Syntax_hasArgs(lean_object* x_1) { +_start: +{ +if (lean_obj_tag(x_1) == 1) +{ +lean_object* x_2; lean_object* x_3; lean_object* x_4; uint8_t x_5; +x_2 = lean_ctor_get(x_1, 1); +x_3 = lean_array_get_size(x_2); +x_4 = lean_unsigned_to_nat(0u); +x_5 = lean_nat_dec_lt(x_4, x_3); +lean_dec(x_3); +return x_5; +} +else +{ +uint8_t x_6; +x_6 = 0; +return x_6; +} +} +} +lean_object* l_Lean_Syntax_hasArgs___boxed(lean_object* x_1) { +_start: +{ +uint8_t x_2; lean_object* x_3; +x_2 = l_Lean_Syntax_hasArgs(x_1); +lean_dec(x_1); +x_3 = lean_box(x_2); +return x_3; +} +} lean_object* l_Lean_AttributeImpl_inhabited___lambda__1(lean_object* x_1, lean_object* x_2, lean_object* x_3, uint8_t x_4, lean_object* x_5) { _start: { @@ -3483,7 +3609,7 @@ lean_object* _init_l_Lean_registerTagAttribute___lambda__4___closed__2() { _start: { lean_object* x_1; -x_1 = lean_mk_string("', unexpected argument"); +x_1 = lean_mk_string("', must be persistent"); return x_1; } } @@ -3491,7 +3617,7 @@ lean_object* _init_l_Lean_registerTagAttribute___lambda__4___closed__3() { _start: { lean_object* x_1; -x_1 = lean_mk_string("', must be persistent"); +x_1 = lean_mk_string("', "); return x_1; } } @@ -3499,7 +3625,7 @@ lean_object* _init_l_Lean_registerTagAttribute___lambda__4___closed__4() { _start: { lean_object* x_1; -x_1 = lean_mk_string("', "); +x_1 = lean_mk_string("', declaration is in an imported module"); return x_1; } } @@ -3507,7 +3633,7 @@ lean_object* _init_l_Lean_registerTagAttribute___lambda__4___closed__5() { _start: { lean_object* x_1; -x_1 = lean_mk_string("', declaration is in an imported module"); +x_1 = lean_mk_string("', unexpected argument"); return x_1; } } @@ -3515,9 +3641,11 @@ lean_object* l_Lean_registerTagAttribute___lambda__4(lean_object* x_1, lean_obje _start: { uint8_t x_9; -x_9 = l_Lean_Syntax_isMissing(x_6); +x_9 = l_Lean_Syntax_hasArgs(x_6); if (x_9 == 0) { +if (x_7 == 0) +{ lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_dec(x_5); lean_dec(x_4); @@ -3537,74 +3665,74 @@ return x_16; } else { -if (x_7 == 0) +lean_object* x_17; +x_17 = l_Lean_Environment_getModuleIdxFor_x3f(x_4, x_5); +if (lean_obj_tag(x_17) == 0) { -lean_object* x_17; lean_object* x_18; lean_object* x_19; lean_object* x_20; lean_object* x_21; lean_object* x_22; lean_object* x_23; +lean_object* x_18; +lean_inc(x_5); +lean_inc(x_4); +x_18 = lean_apply_2(x_2, x_4, x_5); +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; lean_object* x_24; lean_object* x_25; lean_object* x_26; lean_object* x_27; +lean_dec(x_5); +lean_dec(x_4); +lean_dec(x_3); +x_19 = lean_ctor_get(x_18, 0); +lean_inc(x_19); +lean_dec(x_18); +x_20 = l_Lean_Name_toString___closed__1; +x_21 = l_Lean_Name_toStringWithSep___main(x_20, x_1); +x_22 = l_Lean_registerTagAttribute___lambda__4___closed__1; +x_23 = lean_string_append(x_22, x_21); +lean_dec(x_21); +x_24 = l_Lean_registerTagAttribute___lambda__4___closed__3; +x_25 = lean_string_append(x_23, x_24); +x_26 = lean_string_append(x_25, x_19); +lean_dec(x_19); +x_27 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_27, 0, x_26); +lean_ctor_set(x_27, 1, x_8); +return x_27; +} +else +{ +lean_object* x_28; lean_object* x_29; +lean_dec(x_18); +lean_dec(x_1); +x_28 = l_Lean_PersistentEnvExtension_addEntry___rarg(x_3, x_4, x_5); +x_29 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_29, 0, x_28); +lean_ctor_set(x_29, 1, x_8); +return x_29; +} +} +else +{ +lean_object* x_30; lean_object* x_31; lean_object* x_32; lean_object* x_33; lean_object* x_34; lean_object* x_35; lean_object* x_36; +lean_dec(x_17); lean_dec(x_5); lean_dec(x_4); lean_dec(x_3); lean_dec(x_2); -x_17 = l_Lean_Name_toString___closed__1; -x_18 = l_Lean_Name_toStringWithSep___main(x_17, x_1); -x_19 = l_Lean_registerTagAttribute___lambda__4___closed__1; -x_20 = lean_string_append(x_19, x_18); -lean_dec(x_18); -x_21 = l_Lean_registerTagAttribute___lambda__4___closed__3; -x_22 = lean_string_append(x_20, x_21); -x_23 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_23, 0, x_22); -lean_ctor_set(x_23, 1, x_8); -return x_23; -} -else -{ -lean_object* x_24; -x_24 = l_Lean_Environment_getModuleIdxFor_x3f(x_4, x_5); -if (lean_obj_tag(x_24) == 0) -{ -lean_object* x_25; -lean_inc(x_5); -lean_inc(x_4); -x_25 = lean_apply_2(x_2, x_4, x_5); -if (lean_obj_tag(x_25) == 0) -{ -lean_object* x_26; lean_object* x_27; lean_object* x_28; lean_object* x_29; lean_object* x_30; lean_object* x_31; lean_object* x_32; lean_object* x_33; lean_object* x_34; -lean_dec(x_5); -lean_dec(x_4); -lean_dec(x_3); -x_26 = lean_ctor_get(x_25, 0); -lean_inc(x_26); -lean_dec(x_25); -x_27 = l_Lean_Name_toString___closed__1; -x_28 = l_Lean_Name_toStringWithSep___main(x_27, x_1); -x_29 = l_Lean_registerTagAttribute___lambda__4___closed__1; -x_30 = lean_string_append(x_29, x_28); -lean_dec(x_28); -x_31 = l_Lean_registerTagAttribute___lambda__4___closed__4; -x_32 = lean_string_append(x_30, x_31); -x_33 = lean_string_append(x_32, x_26); -lean_dec(x_26); -x_34 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_34, 0, x_33); -lean_ctor_set(x_34, 1, x_8); -return x_34; -} -else -{ -lean_object* x_35; lean_object* x_36; -lean_dec(x_25); -lean_dec(x_1); -x_35 = l_Lean_PersistentEnvExtension_addEntry___rarg(x_3, x_4, x_5); -x_36 = lean_alloc_ctor(0, 2, 0); +x_30 = l_Lean_Name_toString___closed__1; +x_31 = l_Lean_Name_toStringWithSep___main(x_30, x_1); +x_32 = l_Lean_registerTagAttribute___lambda__4___closed__1; +x_33 = lean_string_append(x_32, x_31); +lean_dec(x_31); +x_34 = l_Lean_registerTagAttribute___lambda__4___closed__4; +x_35 = lean_string_append(x_33, x_34); +x_36 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_36, 0, x_35); lean_ctor_set(x_36, 1, x_8); return x_36; } } +} else { lean_object* x_37; lean_object* x_38; lean_object* x_39; lean_object* x_40; lean_object* x_41; lean_object* x_42; lean_object* x_43; -lean_dec(x_24); lean_dec(x_5); lean_dec(x_4); lean_dec(x_3); @@ -3623,8 +3751,6 @@ return x_43; } } } -} -} lean_object* l_Lean_registerTagAttribute___lambda__5(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) { _start: { @@ -5353,7 +5479,7 @@ x_11 = l_Lean_Name_toStringWithSep___main(x_10, x_1); x_12 = l_Lean_registerTagAttribute___lambda__4___closed__1; x_13 = lean_string_append(x_12, x_11); lean_dec(x_11); -x_14 = l_Lean_registerTagAttribute___lambda__4___closed__3; +x_14 = l_Lean_registerTagAttribute___lambda__4___closed__2; x_15 = lean_string_append(x_13, x_14); x_16 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_16, 0, x_15); @@ -5385,7 +5511,7 @@ x_21 = l_Lean_Name_toStringWithSep___main(x_20, x_1); x_22 = l_Lean_registerTagAttribute___lambda__4___closed__1; x_23 = lean_string_append(x_22, x_21); lean_dec(x_21); -x_24 = l_Lean_registerTagAttribute___lambda__4___closed__4; +x_24 = l_Lean_registerTagAttribute___lambda__4___closed__3; x_25 = lean_string_append(x_23, x_24); x_26 = lean_string_append(x_25, x_19); lean_dec(x_19); @@ -5418,7 +5544,7 @@ x_34 = l_Lean_Name_toStringWithSep___main(x_33, x_1); x_35 = l_Lean_registerTagAttribute___lambda__4___closed__1; x_36 = lean_string_append(x_35, x_34); lean_dec(x_34); -x_37 = l_Lean_registerTagAttribute___lambda__4___closed__4; +x_37 = l_Lean_registerTagAttribute___lambda__4___closed__3; x_38 = lean_string_append(x_36, x_37); x_39 = lean_string_append(x_38, x_32); lean_dec(x_32); @@ -5456,7 +5582,7 @@ x_44 = l_Lean_Name_toStringWithSep___main(x_43, x_1); x_45 = l_Lean_registerTagAttribute___lambda__4___closed__1; x_46 = lean_string_append(x_45, x_44); lean_dec(x_44); -x_47 = l_Lean_registerTagAttribute___lambda__4___closed__5; +x_47 = l_Lean_registerTagAttribute___lambda__4___closed__4; x_48 = lean_string_append(x_46, x_47); x_49 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_49, 0, x_48); @@ -7440,7 +7566,7 @@ x_11 = l_Lean_Name_toStringWithSep___main(x_10, x_1); x_12 = l_Lean_registerTagAttribute___lambda__4___closed__1; x_13 = lean_string_append(x_12, x_11); lean_dec(x_11); -x_14 = l_Lean_registerTagAttribute___lambda__4___closed__3; +x_14 = l_Lean_registerTagAttribute___lambda__4___closed__2; x_15 = lean_string_append(x_13, x_14); x_16 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_16, 0, x_15); @@ -7473,7 +7599,7 @@ x_21 = l_Lean_Name_toStringWithSep___main(x_20, x_1); x_22 = l_Lean_registerTagAttribute___lambda__4___closed__1; x_23 = lean_string_append(x_22, x_21); lean_dec(x_21); -x_24 = l_Lean_registerTagAttribute___lambda__4___closed__4; +x_24 = l_Lean_registerTagAttribute___lambda__4___closed__3; x_25 = lean_string_append(x_23, x_24); x_26 = lean_string_append(x_25, x_19); lean_dec(x_19); @@ -7511,7 +7637,7 @@ x_32 = l_Lean_Name_toStringWithSep___main(x_31, x_1); x_33 = l_Lean_registerTagAttribute___lambda__4___closed__1; x_34 = lean_string_append(x_33, x_32); lean_dec(x_32); -x_35 = l_Lean_registerTagAttribute___lambda__4___closed__5; +x_35 = l_Lean_registerTagAttribute___lambda__4___closed__4; x_36 = lean_string_append(x_34, x_35); x_37 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_37, 0, x_36); @@ -8550,6 +8676,10 @@ lean_dec_ref(res); res = initialize_Init_Lean_Syntax(lean_io_mk_world()); if (lean_io_result_is_error(res)) return res; lean_dec_ref(res); +l_Lean_AttributeApplicationTime_hasBeq___closed__1 = _init_l_Lean_AttributeApplicationTime_hasBeq___closed__1(); +lean_mark_persistent(l_Lean_AttributeApplicationTime_hasBeq___closed__1); +l_Lean_AttributeApplicationTime_hasBeq = _init_l_Lean_AttributeApplicationTime_hasBeq(); +lean_mark_persistent(l_Lean_AttributeApplicationTime_hasBeq); l_Lean_AttributeImpl_inhabited___lambda__2___closed__1 = _init_l_Lean_AttributeImpl_inhabited___lambda__2___closed__1(); lean_mark_persistent(l_Lean_AttributeImpl_inhabited___lambda__2___closed__1); l_Lean_AttributeImpl_inhabited___lambda__2___closed__2 = _init_l_Lean_AttributeImpl_inhabited___lambda__2___closed__2(); diff --git a/stage0/stdlib/Init/Lean/Class.c b/stage0/stdlib/Init/Lean/Class.c index fef92dd593..ceceae1ca3 100644 --- a/stage0/stdlib/Init/Lean/Class.c +++ b/stage0/stdlib/Init/Lean/Class.c @@ -194,7 +194,6 @@ lean_object* l_Lean_mkClassExtension___closed__2; extern lean_object* l_Lean_registerPersistentEnvExtensionUnsafe___rarg___closed__3; lean_object* l___private_Init_Lean_Class_1__checkOutParam(lean_object*, lean_object*, lean_object*); lean_object* l___private_Init_Lean_Class_1__checkOutParam___main(lean_object*, lean_object*, lean_object*); -uint8_t l_Lean_Syntax_isMissing(lean_object*); lean_object* l_HashMapImp_moveEntries___main___at_Lean_ClassState_addEntry___spec__9(lean_object*, lean_object*, lean_object*); lean_object* l___private_Init_Lean_Class_2__consumeNLambdas___main(lean_object*, lean_object*); lean_object* l_HashMapImp_contains___at_Lean_isClass___spec__2___boxed(lean_object*, lean_object*); @@ -207,6 +206,7 @@ lean_object* l_PersistentHashMap_insert___at_Lean_ClassState_addEntry___spec__2( uint8_t l_PersistentHashMap_contains___at_Lean_isClass___spec__3(lean_object*, lean_object*); lean_object* l_Lean_registerTagAttribute___lambda__6___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_classExtension___closed__4; +uint8_t l_Lean_Syntax_hasArgs(lean_object*); uint8_t lean_nat_dec_le(lean_object*, lean_object*); uint8_t l_USize_decLe(size_t, size_t); lean_object* l_Lean_registerClassAttr___closed__3; @@ -6484,7 +6484,7 @@ lean_object* _init_l_Lean_registerClassAttr___lambda__1___closed__1() { _start: { lean_object* x_1; -x_1 = lean_mk_string("invalid attribute 'class', unexpected argument"); +x_1 = lean_mk_string("invalid attribute 'class', must be persistent"); return x_1; } } @@ -6492,7 +6492,7 @@ lean_object* _init_l_Lean_registerClassAttr___lambda__1___closed__2() { _start: { lean_object* x_1; -x_1 = lean_mk_string("invalid attribute 'class', must be persistent"); +x_1 = lean_mk_string("invalid attribute 'class', unexpected argument"); return x_1; } } @@ -6500,9 +6500,11 @@ lean_object* l_Lean_registerClassAttr___lambda__1(lean_object* x_1, lean_object* _start: { uint8_t x_6; -x_6 = l_Lean_Syntax_isMissing(x_3); +x_6 = l_Lean_Syntax_hasArgs(x_3); if (x_6 == 0) { +if (x_4 == 0) +{ lean_object* x_7; lean_object* x_8; lean_dec(x_2); lean_dec(x_1); @@ -6514,28 +6516,26 @@ return x_8; } else { -if (x_4 == 0) -{ lean_object* x_9; lean_object* x_10; -lean_dec(x_2); -lean_dec(x_1); -x_9 = l_Lean_registerClassAttr___lambda__1___closed__2; -x_10 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_10, 0, x_9); -lean_ctor_set(x_10, 1, x_5); +x_9 = l_Lean_addClass(x_1, x_2); +x_10 = l_IO_ofExcept___at_Lean_registerClassAttr___spec__1(x_9, x_5); +lean_dec(x_9); return x_10; } +} else { lean_object* x_11; lean_object* x_12; -x_11 = l_Lean_addClass(x_1, x_2); -x_12 = l_IO_ofExcept___at_Lean_registerClassAttr___spec__1(x_11, x_5); -lean_dec(x_11); +lean_dec(x_2); +lean_dec(x_1); +x_11 = l_Lean_registerClassAttr___lambda__1___closed__2; +x_12 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_12, 0, x_11); +lean_ctor_set(x_12, 1, x_5); return x_12; } } } -} lean_object* _init_l_Lean_registerClassAttr___closed__1() { _start: { diff --git a/stage0/stdlib/Init/Lean/Compiler/IR/Checker.c b/stage0/stdlib/Init/Lean/Compiler/IR/Checker.c index 7e4dfaa37f..05dc17de33 100644 --- a/stage0/stdlib/Init/Lean/Compiler/IR/Checker.c +++ b/stage0/stdlib/Init/Lean/Compiler/IR/Checker.c @@ -41,6 +41,7 @@ lean_object* l_Lean_IR_Decl_name(lean_object*); lean_object* l_RBNode_findCore___main___at_Lean_IR_Checker_markIndex___spec__1(lean_object*, lean_object*); lean_object* l_Lean_IR_Checker_checkVar___boxed(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_IR_Checker_checkVar___closed__1; +extern lean_object* l_Lean_registerTagAttribute___lambda__4___closed__3; lean_object* l_Array_iterateMAux___main___at_Lean_IR_Checker_checkDecl___spec__2___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_IR_LocalContext_getType(lean_object*, lean_object*); lean_object* l_Lean_IR_Checker_getDecl(lean_object*, lean_object*, lean_object*); @@ -118,7 +119,6 @@ lean_object* l_Array_iterateMAux___main___at_Lean_IR_Checker_withParams___spec__ lean_object* l_Lean_IR_Checker_checkFullApp___closed__3; lean_object* l_Lean_IR_Checker_checkScalarVar(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_IR_Checker_checkFnBody___main(lean_object*, lean_object*, lean_object*); -extern lean_object* l_Lean_registerTagAttribute___lambda__4___closed__4; lean_object* l_Lean_IR_Checker_checkType___boxed(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_IR_Checker_checkDecl(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_IR_Decl_params(lean_object*); @@ -1336,7 +1336,7 @@ x_27 = l_Lean_Name_toStringWithSep___main(x_26, x_1); x_28 = l_Lean_IR_Checker_checkFullApp___closed__1; x_29 = lean_string_append(x_28, x_27); lean_dec(x_27); -x_30 = l_Lean_registerTagAttribute___lambda__4___closed__4; +x_30 = l_Lean_registerTagAttribute___lambda__4___closed__3; x_31 = lean_string_append(x_29, x_30); x_32 = l_Nat_repr(x_22); x_33 = lean_string_append(x_31, x_32); @@ -1385,7 +1385,7 @@ x_48 = l_Lean_Name_toStringWithSep___main(x_47, x_1); x_49 = l_Lean_IR_Checker_checkFullApp___closed__1; x_50 = lean_string_append(x_49, x_48); lean_dec(x_48); -x_51 = l_Lean_registerTagAttribute___lambda__4___closed__4; +x_51 = l_Lean_registerTagAttribute___lambda__4___closed__3; x_52 = lean_string_append(x_50, x_51); x_53 = l_Nat_repr(x_43); x_54 = lean_string_append(x_52, x_53); @@ -1444,7 +1444,7 @@ x_72 = l_Lean_Name_toStringWithSep___main(x_71, x_1); x_73 = l_Lean_IR_Checker_checkFullApp___closed__1; x_74 = lean_string_append(x_73, x_72); lean_dec(x_72); -x_75 = l_Lean_registerTagAttribute___lambda__4___closed__4; +x_75 = l_Lean_registerTagAttribute___lambda__4___closed__3; x_76 = lean_string_append(x_74, x_75); x_77 = l_Nat_repr(x_67); x_78 = lean_string_append(x_76, x_77); diff --git a/stage0/stdlib/Init/Lean/Compiler/InlineAttrs.c b/stage0/stdlib/Init/Lean/Compiler/InlineAttrs.c index 217c07c4ce..b04254e78b 100644 --- a/stage0/stdlib/Init/Lean/Compiler/InlineAttrs.c +++ b/stage0/stdlib/Init/Lean/Compiler/InlineAttrs.c @@ -93,6 +93,7 @@ lean_object* l_Lean_Compiler_mkInlineAttrs___closed__17; lean_object* l_Lean_Compiler_mkInlineAttrs___closed__8; lean_object* l_Lean_PersistentEnvExtension_addEntry___rarg(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Compiler_checkIsDefinition(lean_object*, lean_object*); +extern lean_object* l_Lean_registerTagAttribute___lambda__4___closed__2; lean_object* l_Lean_Compiler_mkInlineAttrs___closed__9; uint8_t lean_has_inline_attribute(lean_object*, lean_object*); lean_object* l_Lean_Compiler_mkInlineAttrs___closed__27; @@ -108,7 +109,6 @@ extern lean_object* l_Lean_EnumAttributes_Inhabited___closed__1; lean_object* l_Lean_Compiler_mkInlineAttrs___closed__1; lean_object* l_Lean_registerTagAttribute___lambda__6___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); uint8_t lean_nat_dec_le(lean_object*, lean_object*); -extern lean_object* l_Lean_registerTagAttribute___lambda__4___closed__5; uint8_t l_Lean_Name_isInternal___main(lean_object*); lean_object* l_Lean_Compiler_mkInlineAttrs___closed__19; uint8_t l___private_Init_Lean_Compiler_InlineAttrs_1__hasInlineAttrAux(lean_object*, uint8_t, lean_object*); @@ -1264,7 +1264,7 @@ x_11 = l_Lean_Name_toStringWithSep___main(x_10, x_1); x_12 = l_Lean_registerTagAttribute___lambda__4___closed__1; x_13 = lean_string_append(x_12, x_11); lean_dec(x_11); -x_14 = l_Lean_registerTagAttribute___lambda__4___closed__3; +x_14 = l_Lean_registerTagAttribute___lambda__4___closed__2; x_15 = lean_string_append(x_13, x_14); x_16 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_16, 0, x_15); @@ -1296,7 +1296,7 @@ x_22 = l_Lean_Name_toStringWithSep___main(x_21, x_1); x_23 = l_Lean_registerTagAttribute___lambda__4___closed__1; x_24 = lean_string_append(x_23, x_22); lean_dec(x_22); -x_25 = l_Lean_registerTagAttribute___lambda__4___closed__4; +x_25 = l_Lean_registerTagAttribute___lambda__4___closed__3; x_26 = lean_string_append(x_24, x_25); x_27 = lean_string_append(x_26, x_20); lean_dec(x_20); @@ -1334,7 +1334,7 @@ x_34 = l_Lean_Name_toStringWithSep___main(x_33, x_1); x_35 = l_Lean_registerTagAttribute___lambda__4___closed__1; x_36 = lean_string_append(x_35, x_34); lean_dec(x_34); -x_37 = l_Lean_registerTagAttribute___lambda__4___closed__5; +x_37 = l_Lean_registerTagAttribute___lambda__4___closed__4; x_38 = lean_string_append(x_36, x_37); x_39 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_39, 0, x_38); diff --git a/stage0/stdlib/Init/Lean/Compiler/Specialize.c b/stage0/stdlib/Init/Lean/Compiler/Specialize.c index f58dd7a202..ea9017f33d 100644 --- a/stage0/stdlib/Init/Lean/Compiler/Specialize.c +++ b/stage0/stdlib/Init/Lean/Compiler/Specialize.c @@ -166,6 +166,7 @@ lean_object* l_PersistentHashMap_insertAtCollisionNodeAux___main___at_Lean_Compi lean_object* l_Lean_PersistentEnvExtension_addEntry___rarg(lean_object*, lean_object*, lean_object*); size_t l_USize_land(size_t, size_t); lean_object* l_Lean_Compiler_SpecializeAttributeKind_beq___boxed(lean_object*, lean_object*); +extern lean_object* l_Lean_registerTagAttribute___lambda__4___closed__2; lean_object* l_Lean_SimplePersistentEnvExtension_getState___rarg(lean_object*, lean_object*); lean_object* l_Array_iterateMAux___main___at_Lean_Compiler_SpecState_addEntry___spec__5(size_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* lean_cache_specialization(lean_object*, lean_object*, lean_object*); @@ -189,7 +190,6 @@ uint8_t lean_has_nospecialize_attribute(lean_object*, lean_object*); lean_object* l___private_Init_Data_Array_QSort_1__partitionAux___main___at_Lean_Compiler_mkSpecializeAttrs___spec__4___closed__1; uint8_t lean_nat_dec_le(lean_object*, lean_object*); uint8_t l_USize_decLe(size_t, size_t); -extern lean_object* l_Lean_registerTagAttribute___lambda__4___closed__5; lean_object* l_Lean_SMap_find_x3f___at_Lean_Compiler_getSpecializationInfo___spec__1(lean_object*, lean_object*); lean_object* l_PersistentHashMap_find_x3f___at_Lean_Compiler_getCachedSpecialization___spec__2(lean_object*, lean_object*); uint8_t l_Lean_Name_isInternal___main(lean_object*); @@ -1345,7 +1345,7 @@ x_11 = l_Lean_Name_toStringWithSep___main(x_10, x_1); x_12 = l_Lean_registerTagAttribute___lambda__4___closed__1; x_13 = lean_string_append(x_12, x_11); lean_dec(x_11); -x_14 = l_Lean_registerTagAttribute___lambda__4___closed__3; +x_14 = l_Lean_registerTagAttribute___lambda__4___closed__2; x_15 = lean_string_append(x_13, x_14); x_16 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_16, 0, x_15); @@ -1377,7 +1377,7 @@ x_22 = l_Lean_Name_toStringWithSep___main(x_21, x_1); x_23 = l_Lean_registerTagAttribute___lambda__4___closed__1; x_24 = lean_string_append(x_23, x_22); lean_dec(x_22); -x_25 = l_Lean_registerTagAttribute___lambda__4___closed__4; +x_25 = l_Lean_registerTagAttribute___lambda__4___closed__3; x_26 = lean_string_append(x_24, x_25); x_27 = lean_string_append(x_26, x_20); lean_dec(x_20); @@ -1415,7 +1415,7 @@ x_34 = l_Lean_Name_toStringWithSep___main(x_33, x_1); x_35 = l_Lean_registerTagAttribute___lambda__4___closed__1; x_36 = lean_string_append(x_35, x_34); lean_dec(x_34); -x_37 = l_Lean_registerTagAttribute___lambda__4___closed__5; +x_37 = l_Lean_registerTagAttribute___lambda__4___closed__4; x_38 = lean_string_append(x_36, x_37); x_39 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_39, 0, x_38); diff --git a/stage0/stdlib/Init/Lean/Elab/Command.c b/stage0/stdlib/Init/Lean/Elab/Command.c index b8adcb64ee..62fd691302 100644 --- a/stage0/stdlib/Init/Lean/Elab/Command.c +++ b/stage0/stdlib/Init/Lean/Elab/Command.c @@ -17,34 +17,33 @@ lean_object* l_Lean_Elab_Command_CommandElabM_monadLog___lambda__1(lean_object*, uint8_t l_AssocList_contains___main___at_Lean_Elab_Command_addBuiltinCommandElab___spec__3(lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_elabVariable(lean_object*, lean_object*, lean_object*); extern lean_object* l_Lean_Name_toString___closed__1; -lean_object* l_Lean_Elab_Command_addUniverse___closed__4; lean_object* l_Lean_Elab_Command_registerBuiltinCommandElabAttr___closed__4; lean_object* l_Lean_Elab_Command_elabSection(lean_object*, lean_object*, lean_object*); -lean_object* l___private_Init_Lean_Elab_Command_10__addScopes___main(lean_object*, uint8_t, lean_object*, lean_object*, lean_object*); +lean_object* l___private_Init_Lean_Elab_Command_10__addScopes___main(lean_object*, lean_object*, uint8_t, lean_object*, lean_object*, lean_object*); lean_object* l___regBuiltinCommandElab_Lean_Elab_Command_elabNamespace(lean_object*); lean_object* l_PersistentHashMap_contains___at_Lean_Elab_Command_addBuiltinCommandElab___spec__4___boxed(lean_object*, lean_object*); lean_object* l_Array_iterateMAux___main___at_Lean_Elab_Command_addBuiltinCommandElab___spec__10___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); size_t l_USize_add(size_t, size_t); -lean_object* l_Lean_Elab_Command_addUniverse___closed__1; lean_object* l_Lean_Elab_Command_commandElabAttribute___closed__3; lean_object* l_Lean_Syntax_foldArgsAuxM___main___at_Lean_Elab_Command_elabUniverses___spec__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_catchExceptions(lean_object*, lean_object*, lean_object*); extern lean_object* l_Lean_Meta_check___closed__1; lean_object* l_Lean_Elab_Command_getOptions(lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_elabCommand___closed__4; +uint8_t l___private_Init_Lean_Elab_Command_12__checkAnonymousScope(lean_object*); extern lean_object* l_Lean_Parser_declareBuiltinParser___closed__8; lean_object* l___regBuiltinCommandElab_Lean_Elab_Command_elabNamespace___closed__3; -lean_object* l_Lean_Elab_Command_getUniverseNames(lean_object*, lean_object*); lean_object* l___regBuiltinCommandElab_Lean_Elab_Command_elabInitQuot___closed__3; -lean_object* l_Lean_Elab_Command_addUniverse___boxed(lean_object*, lean_object*, lean_object*); -uint8_t l___private_Init_Lean_Elab_Command_12__checkEndHeader___main(lean_object*, lean_object*); +lean_object* l_Lean_Elab_Command_addDecl(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___regBuiltinCommandElab_Lean_Elab_Command_elabNotation(lean_object*); lean_object* l_Lean_Elab_Term_instantiateMVars(lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* lean_nat_div(lean_object*, lean_object*); lean_object* l___regBuiltinCommandElab_Lean_Elab_Command_elabReserve(lean_object*); lean_object* l___regBuiltinCommandElab_Lean_Elab_Command_elabSection___closed__2; extern lean_object* l_Lean_nameToExprAux___main___closed__1; lean_object* l___regBuiltinCommandElab_Lean_Elab_Command_elabOpen___closed__3; lean_object* l_unreachable_x21___rarg(lean_object*); +lean_object* l_Lean_Elab_Command_withNamespace(lean_object*); extern lean_object* l_Lean_Elab_Term_throwUnexpectedSyntax___rarg___closed__8; lean_object* l_Lean_Elab_Command_CommandElabCoreM_monadState___closed__1; lean_object* l_Lean_Elab_Command_registerBuiltinCommandElabAttr___closed__1; @@ -56,9 +55,9 @@ lean_object* l___regBuiltinCommandElab_Lean_Elab_Command_elabVariable(lean_objec lean_object* l_Lean_Elab_Term_inferType(lean_object*, lean_object*, lean_object*, lean_object*); extern lean_object* l___private_Init_Lean_Elab_Util_7__regTraceClasses___closed__1; lean_object* l_Lean_Elab_throwError___at_Lean_Elab_Command_elabCommand___spec__1(lean_object*, lean_object*, lean_object*, lean_object*); +uint8_t l_Lean_Name_lt___main(lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_liftIOCore(lean_object*); -lean_object* l_Lean_Elab_Command_addUniverse___closed__2; -lean_object* l___private_Init_Lean_Elab_Command_12__checkEndHeader___boxed(lean_object*, lean_object*); +lean_object* l___private_Init_Lean_Elab_Command_11__addNamespace___boxed(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_elabOpenSimple(lean_object*, lean_object*, lean_object*); lean_object* l_AssocList_find___main___at_Lean_Elab_Command_elabCommand___spec__10(lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_liftIO(lean_object*); @@ -70,18 +69,22 @@ lean_object* l_Lean_Syntax_getIdAt(lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_commandElabAttribute; lean_object* lean_array_uset(lean_object*, size_t, lean_object*); lean_object* l_Lean_Elab_Command_elabUniverse(lean_object*, lean_object*, lean_object*); +lean_object* lean_array_fswap(lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Elab_Command_withNamespace___rarg___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_elabCommand___closed__2; lean_object* l_Lean_Elab_Command_runTermElabM___rarg___closed__1; -lean_object* l_Lean_Elab_Command_elabCheck___lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Elab_Command_elabCheck___lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_logUnknownDecl(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Meta_SynthInstance_SynthM_inhabited___lambda__1___boxed(lean_object*, lean_object*, lean_object*); extern lean_object* l_Lean_stxInh; +lean_object* l_Array_iterateMAux___main___at_Lean_Elab_Command_withDeclId___spec__5___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); size_t l_USize_sub(size_t, size_t); extern lean_object* l_Array_empty___closed__1; lean_object* l_Lean_Elab_Command_CommandElabM_monadLog___lambda__2(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_throwError___at_Lean_Elab_Command_elabEnd___spec__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* lean_environment_find(lean_object*, lean_object*); -lean_object* l___private_Init_Lean_Elab_Command_10__addScopes___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l___private_Init_Lean_Elab_Command_10__addScopes___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Elab_Command_withFreshMacroScope___rarg(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_elabUniverses(lean_object*, lean_object*, lean_object*); lean_object* l___regBuiltinCommandElab_Lean_Elab_Command_elabReserve___closed__2; lean_object* l_Lean_Elab_Command_elabOpen___boxed(lean_object*, lean_object*, lean_object*); @@ -91,11 +94,14 @@ lean_object* l_PersistentHashMap_insertAux___main___at_Lean_Elab_Command_addBuil lean_object* l_Lean_Elab_getPos___at_Lean_Elab_Command_elabCommand___spec__3(lean_object*, lean_object*, lean_object*); lean_object* lean_dbg_trace(lean_object*, lean_object*); lean_object* lean_io_mk_ref(lean_object*, lean_object*); +lean_object* l_List_append___rarg(lean_object*, lean_object*); uint8_t lean_name_eq(lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_registerBuiltinCommandElabAttr___closed__2; lean_object* lean_io_ref_get(lean_object*, lean_object*); lean_object* l___regBuiltinCommandElab_Lean_Elab_Command_elabUniverse(lean_object*); +lean_object* l_Lean_Elab_Command_getCurrMacroScope___boxed(lean_object*, lean_object*); lean_object* l___private_Init_Lean_Elab_Command_7__getVarDecls(lean_object*); +lean_object* l___private_Init_Lean_Elab_Command_11__addNamespace(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Syntax_foldArgsAuxM___main___at_Lean_Elab_Command_elabOpenSimple___spec__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_declareBuiltinCommandElab___closed__5; lean_object* l_Lean_Elab_Command_State_inhabited___closed__4; @@ -110,6 +116,7 @@ lean_object* l_Lean_Elab_Command_registerBuiltinCommandElabAttr(lean_object*); lean_object* l_Lean_Elab_Command_elabUniverse___boxed(lean_object*, lean_object*, lean_object*); extern lean_object* l_Lean_Parser_Command_init__quot___elambda__1___closed__2; lean_object* l_Lean_Elab_Command_elabNotation___boxed(lean_object*, lean_object*); +extern lean_object* l_Lean_Name_inhabited; lean_object* l_PersistentArray_push___rarg(lean_object*, lean_object*); lean_object* l_Lean_addAlias(lean_object*, lean_object*, lean_object*); extern lean_object* l_String_splitAux___main___closed__1; @@ -118,8 +125,8 @@ lean_object* l___regBuiltinCommandElab_Lean_Elab_Command_elabExport(lean_object* lean_object* l_List_head_x21___at___private_Init_Lean_Elab_Command_5__mkTermContext___spec__1(lean_object*); lean_object* l_Lean_Elab_Command_commandElabAttribute___closed__2; lean_object* l_Lean_Elab_Command_CommandElabM_monadLog___lambda__2___boxed(lean_object*, lean_object*, lean_object*); +lean_object* l_List_foldl___main___at_Lean_Elab_Command_sortDeclLevelParams___spec__1___boxed(lean_object*, lean_object*, lean_object*); lean_object* l___regBuiltinCommandElab_Lean_Elab_Command_elabMixfix___closed__1; -lean_object* l___private_Init_Lean_Elab_Command_12__checkEndHeader___main___boxed(lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_modifyScope___at_Lean_Elab_Command_addOpenDecl___spec__1(lean_object*, lean_object*, lean_object*); size_t l_USize_shiftRight(size_t, size_t); lean_object* l_AssocList_find___main___at_Lean_Elab_Command_elabCommand___spec__10___boxed(lean_object*, lean_object*); @@ -130,11 +137,12 @@ extern lean_object* l_Lean_Parser_Command_mixfix___elambda__1___closed__2; lean_object* l_Lean_Name_getNumParts___main(lean_object*); lean_object* l_Lean_Elab_Command_elabOpen(lean_object*, lean_object*, lean_object*); extern lean_object* l_Lean_LocalContext_Inhabited___closed__1; +lean_object* l_Lean_Elab_Command_modifyScope___at_Lean_Elab_Command_withDeclId___spec__1(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_modifyScope___at_Lean_Elab_Command_elabVariables___spec__1___boxed(lean_object*, lean_object*, lean_object*); +lean_object* l___private_Init_Lean_Elab_Command_13__checkEndHeader___main___boxed(lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_elabUniverses___boxed(lean_object*, lean_object*, lean_object*); lean_object* l___regBuiltinCommandElab_Lean_Elab_Command_elabVariables(lean_object*); lean_object* l_Lean_Elab_Command_elabMixfix___boxed(lean_object*, lean_object*); -lean_object* l_Lean_Elab_Command_modifyScope___at_Lean_Elab_Command_addUniverse___spec__1(lean_object*, lean_object*, lean_object*); lean_object* lean_nat_add(lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_elabEnd___closed__9; lean_object* l_IO_ofExcept___at_Lean_registerClassAttr___spec__1(lean_object*, lean_object*); @@ -143,16 +151,17 @@ lean_object* l_Lean_Elab_Command_addBuiltinCommandElab(lean_object*, lean_object lean_object* l_Lean_Elab_Command_State_inhabited___closed__3; extern lean_object* l_Lean_AttributeImpl_inhabited___closed__4; lean_object* l_Lean_Syntax_foldArgsAuxM___main___at_Lean_Elab_Command_elabOpenRenaming___spec__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l___private_Init_Data_Array_QSort_1__partitionAux___main___at_Lean_Elab_Command_sortDeclLevelParams___spec__4___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___regBuiltinCommandElab_Lean_Elab_Command_elabUniverses___closed__3; lean_object* l_Lean_Elab_Command_elabEnd___closed__4; lean_object* l_Lean_Elab_Command_declareBuiltinCommandElab(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___regBuiltinCommandElab_Lean_Elab_Command_elabUniverses___closed__1; -lean_object* l___private_Init_Lean_Elab_Command_11__checkAnonymousScope___boxed(lean_object*); lean_object* l_Lean_Elab_Command_resolveNamespace___closed__2; lean_object* l_Lean_Elab_Command_elabNotation___rarg(lean_object*); lean_object* l_Lean_Elab_Command_State_inhabited___closed__1; extern lean_object* l_Lean_PersistentEnvExtension_inhabited___rarg___closed__1; lean_object* l_Lean_Elab_Command_declareBuiltinCommandElab___closed__4; +lean_object* l___private_Init_Data_Array_QSort_1__partitionAux___main___at_Lean_Elab_Command_sortDeclLevelParams___spec__4(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_registerBuiltinCommandElabAttr___closed__6; extern lean_object* l_Lean_LocalContext_Inhabited___closed__2; lean_object* l_Lean_Elab_Command_resolveNamespace___closed__1; @@ -170,17 +179,19 @@ lean_object* l_Lean_Elab_Command_elabCommand___closed__6; lean_object* l___regBuiltinCommandElab_Lean_Elab_Command_elabVariables___closed__3; lean_object* l_Lean_Elab_mkMessage___at_Lean_Elab_Command_elabCommand___spec__2(lean_object*, uint8_t, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_CommandElabM_monadLog___closed__9; -lean_object* l_Lean_Elab_Command_addUniverse___closed__6; lean_object* lean_array_fget(lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_elabMixfix___rarg(lean_object*); lean_object* l_Lean_Elab_Command_elabVariables(lean_object*, lean_object*, lean_object*); extern lean_object* l_Lean_Elab_Term_declareBuiltinTermElab___closed__3; lean_object* l_Lean_Elab_Command_getCurrNamespace(lean_object*, lean_object*); +lean_object* l_List_foldl___main___at_Lean_Elab_Command_sortDeclLevelParams___spec__1(lean_object*, lean_object*, lean_object*); extern lean_object* l_Lean_Elab_Term_termElabAttribute___closed__4; +lean_object* l_Lean_Elab_Command_modifyScope___at_Lean_Elab_Command_withDeclId___spec__2(lean_object*, lean_object*, lean_object*); extern lean_object* l_List_Monad; lean_object* l_Lean_Elab_Command_CommandElabM_monadLog___closed__1; lean_object* l_Lean_Elab_Command_CommandElabM_monadLog___closed__3; lean_object* l_Lean_Elab_Command_CommandElabM_monadLog___lambda__3___boxed(lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Elab_Command_withDeclId___closed__1; extern lean_object* l_Lean_EnvExtension_Inhabited___rarg___closed__1; lean_object* l_Lean_Elab_Command_CommandElabM_monadLog___closed__2; extern lean_object* l_Lean_Elab_Term_elabTerm___closed__6; @@ -192,15 +203,18 @@ lean_object* l_Lean_Elab_Command_dbgTrace(lean_object*); lean_object* lean_nat_sub(lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_elabEnd___closed__8; lean_object* l_Lean_Elab_Command_CommandElabM_monadLog___closed__8; -lean_object* l_PersistentHashMap_forM___rarg___lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___private_Init_Lean_Elab_Command_4__modifyGetState(lean_object*); lean_object* l___regBuiltinCommandElab_Lean_Elab_Command_elabUniverse___closed__3; +lean_object* lean_array_swap(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_registerBuiltinCommandElabAttr___closed__5; lean_object* l_mkHashMap___at_Lean_Elab_Command_mkBuiltinCommandElabTable___spec__2(lean_object*); lean_object* l_Lean_Name_append___main(lean_object*, lean_object*); +lean_object* l_Array_shrink___main___rarg(lean_object*, lean_object*); +lean_object* l_Lean_Elab_Command_withFreshMacroScope(lean_object*); lean_object* l_Lean_Elab_mkMessageCore(lean_object*, lean_object*, lean_object*, uint8_t, lean_object*); lean_object* l___regBuiltinCommandElab_Lean_Elab_Command_elabVariables___closed__2; -lean_object* l_Lean_Elab_Command_elabVariables___lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Elab_Command_elabVariables___lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Elab_Command_throwAlreadyDeclaredUniverseLevel___rarg___closed__5; extern lean_object* l_Lean_Parser_Command_docComment___elambda__1___closed__1; lean_object* l_Lean_KernelException_toMessageData(lean_object*, lean_object*); lean_object* l___regBuiltinCommandElab_Lean_Elab_Command_elabNotation___closed__3; @@ -209,16 +223,18 @@ lean_object* l_Lean_Elab_Term_elabTerm(lean_object*, lean_object*, uint8_t, uint uint8_t l_PersistentHashMap_contains___at_Lean_Elab_Command_addBuiltinCommandElab___spec__4(lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_elabCommand___closed__1; lean_object* l___regBuiltinCommandElab_Lean_Elab_Command_elabCheck___closed__3; +lean_object* l_Lean_Elab_Command_throwAlreadyDeclaredUniverseLevel(lean_object*); lean_object* l_Lean_Elab_Command_elabSection___boxed(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Syntax_foldArgsAuxM___main___at_Lean_Elab_Command_elabUniverses___spec__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___regBuiltinCommandElab_Lean_Elab_Command_elabVariables___closed__1; +lean_object* l___private_Init_Lean_Elab_Command_10__addScopes___main___closed__3; lean_object* l_Lean_Elab_Command_CommandElabM_monadLog___closed__4; +lean_object* l_Lean_Elab_Command_throwAlreadyDeclaredUniverseLevel___rarg___closed__3; lean_object* lean_array_get(lean_object*, lean_object*, lean_object*); uint8_t l_HashMapImp_contains___at_Lean_Elab_Command_addBuiltinCommandElab___spec__2(lean_object*, lean_object*); extern lean_object* l___private_Init_Lean_Meta_ExprDefEq_17__checkTypesAndAssign___closed__7; lean_object* l_Lean_Elab_Command_elabOpenRenaming(lean_object*, lean_object*, lean_object*); lean_object* lean_array_fset(lean_object*, lean_object*, lean_object*); -uint8_t l___private_Init_Lean_Elab_Command_11__checkAnonymousScope(lean_object*); lean_object* l_List_lengthAux___main___rarg(lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_resolveNamespace(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_mkMessageAt___at_Lean_Elab_Command_elabCommand___spec__4(lean_object*, uint8_t, lean_object*, lean_object*, lean_object*); @@ -226,26 +242,29 @@ lean_object* l_Lean_Elab_Command_addBuiltinCommandElab___closed__1; lean_object* l_Lean_Elab_Command_mkState(lean_object*, lean_object*, lean_object*); extern lean_object* l_Lean_Message_Inhabited; lean_object* l_Lean_Elab_Command_dbgTrace___rarg(lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Array_qsortAux___main___at_Lean_Elab_Command_sortDeclLevelParams___spec__3___boxed(lean_object*, lean_object*, lean_object*); extern lean_object* l_Lean_Parser_Command_namespace___elambda__1___closed__2; lean_object* l_Lean_Elab_Command_addBuiltinCommandElab___boxed(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_CommandElabCoreM_monadState; size_t l_Lean_Name_hash(lean_object*); extern lean_object* l_Char_HasRepr___closed__1; lean_object* l_Lean_Elab_Command_registerBuiltinCommandElabAttr___lambda__1___closed__4; -lean_object* l___private_Init_Lean_Elab_Command_1__ioErrorToMessage___closed__1; lean_object* l___private_Init_Lean_Elab_Command_1__ioErrorToMessage___boxed(lean_object*, lean_object*, lean_object*); lean_object* l_PersistentHashMap_findAux___main___at_Lean_Elab_Command_elabCommand___spec__7(lean_object*, size_t, lean_object*); extern lean_object* l_PersistentHashMap_insertAux___main___rarg___closed__3; lean_object* l___private_Init_Lean_Elab_Command_1__ioErrorToMessage(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Syntax_getId(lean_object*); +lean_object* l_Lean_Elab_Command_adaptExpander(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* lean_name_mk_string(lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_runTermElabM___rarg(lean_object*, lean_object*, lean_object*); extern lean_object* l_PersistentArray_empty___closed__3; lean_object* l_Lean_Elab_mkMessageAt___at_Lean_Elab_Command_elabCommand___spec__4___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___regBuiltinCommandElab_Lean_Elab_Command_elabUniverses(lean_object*); extern lean_object* l_Lean_Parser_Command_namespace___elambda__1___closed__1; -lean_object* l_Lean_Elab_Command_elabVariables___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Elab_Command_elabVariables___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Syntax_foldArgsAuxM___main___at_Lean_Elab_Command_elabOpenHiding___spec__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Elab_Command_throwAlreadyDeclaredUniverseLevel___rarg___closed__6; +lean_object* l___private_Init_Lean_Elab_Command_12__checkAnonymousScope___boxed(lean_object*); lean_object* l_HashMapImp_moveEntries___main___at_Lean_Elab_Command_addBuiltinCommandElab___spec__13(lean_object*, lean_object*, lean_object*); uint8_t l_Lean_Environment_contains(lean_object*, lean_object*); lean_object* l_PersistentHashMap_insertAux___main___at_Lean_Elab_Command_addBuiltinCommandElab___spec__8(lean_object*, size_t, size_t, lean_object*, lean_object*); @@ -254,15 +273,15 @@ lean_object* l___regBuiltinCommandElab_Lean_Elab_Command_elabUniverses___closed_ extern lean_object* l_Lean_Parser_Command_docComment___elambda__1___closed__2; lean_object* l_Lean_Elab_Command_elabExport(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_builtinCommandElabTable; -lean_object* l_Lean_Elab_Command_elabCheck___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l___private_Init_Lean_Elab_Command_1__ioErrorToMessage___closed__2; +lean_object* l_Lean_Elab_Command_elabCheck___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); extern lean_object* l_Lean_Parser_declareBuiltinParser___closed__7; lean_object* l_Lean_Elab_Command_elabOpenOnly(lean_object*, lean_object*, lean_object*); extern lean_object* l_Lean_Options_empty; extern lean_object* l_Lean_Parser_Command_variable___elambda__1___closed__2; lean_object* l_ReaderT_read___at_Lean_Elab_Command_CommandElabM_monadLog___spec__1(lean_object*, lean_object*); lean_object* l___private_Init_Lean_Elab_Command_8__toCommandResult___rarg(lean_object*, lean_object*); -lean_object* l___private_Init_Lean_Elab_Command_10__addScopes(lean_object*, uint8_t, lean_object*, lean_object*, lean_object*); +lean_object* l___private_Init_Lean_Elab_Command_10__addScopes(lean_object*, lean_object*, uint8_t, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Elab_Command_addUnivLevel___boxed(lean_object*, lean_object*, lean_object*); lean_object* l___regBuiltinCommandElab_Lean_Elab_Command_elabExport___closed__1; lean_object* l_Lean_Elab_logAt___at_Lean_Elab_Command_logUnknownDecl___spec__2___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); size_t lean_usize_modn(size_t, lean_object*); @@ -279,9 +298,10 @@ lean_object* l_PersistentHashMap_containsAux___main___at_Lean_Elab_Command_addBu lean_object* l___regBuiltinCommandElab_Lean_Elab_Command_elabVariable___closed__2; extern lean_object* l_Lean_Parser_registerParserAttribute___closed__5; extern lean_object* l_Lean_Parser_Command_open___elambda__1___closed__2; +uint8_t l_Array_contains___at_Lean_findField_x3f___main___spec__1(lean_object*, lean_object*); +lean_object* l_Lean_Elab_Command_CommandElabM_MonadQuotation___closed__1; lean_object* l_Lean_Elab_mkElabAttribute___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_elabEnd___closed__2; -uint8_t l___private_Init_Lean_Elab_Command_12__checkEndHeader(lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_elabCommand(lean_object*, lean_object*, lean_object*); size_t l_USize_mul(size_t, size_t); lean_object* l_Lean_Elab_Command_liftIO___rarg(lean_object*, lean_object*, lean_object*, lean_object*); @@ -298,40 +318,50 @@ lean_object* l_Lean_Elab_Command_elabEnd(lean_object*, lean_object*, lean_object lean_object* l_Array_iterateMAux___main___at_Array_append___spec__1___rarg(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_modifyScope___closed__1; lean_object* l___regBuiltinCommandElab_Lean_Elab_Command_elabCheck(lean_object*); +lean_object* l_Array_filterAux___main___at_Lean_Elab_Command_sortDeclLevelParams___spec__2___boxed(lean_object*, lean_object*, lean_object*, lean_object*); +uint8_t l___private_Init_Lean_Elab_Command_13__checkEndHeader___main(lean_object*, lean_object*); +lean_object* l___private_Init_Lean_Elab_Command_13__checkEndHeader___boxed(lean_object*, lean_object*); uint8_t l_PersistentHashMap_containsAux___main___at_Lean_Elab_Command_addBuiltinCommandElab___spec__5(lean_object*, size_t, lean_object*); uint8_t l_List_elem___main___at_Lean_Parser_addLeadingParser___spec__4(lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_declareBuiltinCommandElab___closed__6; lean_object* l___regBuiltinCommandElab_Lean_Elab_Command_elabEnd(lean_object*); +lean_object* l_Lean_Elab_throwError___at_Lean_Elab_Command_throwAlreadyDeclaredUniverseLevel___spec__1(lean_object*); +lean_object* l_Lean_Elab_Command_throwAlreadyDeclaredUniverseLevel___rarg___closed__1; extern lean_object* l_Lean_PersistentEnvExtension_inhabited___rarg___closed__3; +lean_object* l_Lean_Elab_Command_withDeclId___closed__3; lean_object* l_Lean_ConstantInfo_type(lean_object*); lean_object* l_ReaderT_bind___at_Lean_Elab_Command_CommandElabM_monadLog___spec__2(lean_object*, lean_object*); lean_object* l_Lean_Syntax_foldArgsAuxM___main___at_Lean_Elab_Command_elabOpenOnly___spec__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Elab_Command_throwAlreadyDeclaredUniverseLevel___rarg___boxed(lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Elab_Command_sortDeclLevelParams(lean_object*, lean_object*); lean_object* l_Lean_SMap_empty___at_Lean_Elab_Command_mkBuiltinCommandElabTable___spec__1___closed__1; -lean_object* l___private_Init_Lean_Elab_Command_1__ioErrorToMessage___closed__3; lean_object* l_Lean_Elab_Command_elabOpenHiding(lean_object*, lean_object*, lean_object*); lean_object* l___regBuiltinCommandElab_Lean_Elab_Command_elabVariable___closed__3; extern lean_object* l_Lean_Parser_Command_notation___elambda__1___closed__2; size_t l_USize_land(size_t, size_t); lean_object* l_PersistentHashMap_find_x3f___at_Lean_Elab_Command_elabCommand___spec__6___boxed(lean_object*, lean_object*); +lean_object* l_Lean_Elab_Command_throwAlreadyDeclaredUniverseLevel___rarg___closed__2; lean_object* l_Lean_Elab_Command_commandElabAttribute___closed__4; lean_object* l_Lean_ParametricAttribute_setParam___rarg(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_SMap_contains___at_Lean_Elab_Command_addBuiltinCommandElab___spec__1___boxed(lean_object*, lean_object*); lean_object* l_Lean_Elab_log___at_Lean_Elab_Command_logUnknownDecl___spec__1(lean_object*, uint8_t, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_declareBuiltinCommandElab___closed__1; lean_object* l_Lean_Elab_Command_CommandElabM_monadLog; +lean_object* l_Lean_Elab_Command_addUnivLevel(lean_object*, lean_object*, lean_object*); lean_object* l___regBuiltinCommandElab_Lean_Elab_Command_elabMixfix___closed__3; lean_object* l_PersistentHashMap_insertAtCollisionNodeAux___main___at_Lean_Elab_Command_addBuiltinCommandElab___spec__9(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_CommandElabCoreM_monadState___closed__4; lean_object* l___private_Init_Lean_Elab_Command_2__getState(lean_object*, lean_object*); extern lean_object* l_Lean_AttributeImpl_inhabited___closed__6; -lean_object* l_Lean_Elab_Command_addUniverse___closed__5; extern lean_object* l_Lean_Parser_Command_universe___elambda__1___closed__2; lean_object* l_Lean_Elab_mkMessage___at_Lean_Elab_Command_elabCommand___spec__2___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_Elab_Command_addUniverse___closed__3; lean_object* l___regBuiltinCommandElab_Lean_Elab_Command_elabOpen___closed__2; lean_object* l_List_drop___main___rarg(lean_object*, lean_object*); +lean_object* l_Lean_Elab_Command_modifyScope___at_Lean_Elab_Command_addUnivLevel___spec__1(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_elabExport___closed__2; lean_object* l_AssocList_contains___main___at_Lean_Elab_Command_addBuiltinCommandElab___spec__3___boxed(lean_object*, lean_object*); +lean_object* l_Lean_Elab_Command_modifyScope___at_Lean_Elab_Command_withDeclId___spec__4(lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Elab_throwError___at_Lean_Elab_Command_throwAlreadyDeclaredUniverseLevel___spec__1___rarg___boxed(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_elabReserve(lean_object*, lean_object*); extern lean_object* l_Lean_Parser_Command_end___elambda__1___closed__2; lean_object* l_Lean_Elab_log___at_Lean_Elab_Command_logUnknownDecl___spec__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); @@ -353,20 +383,25 @@ uint8_t lean_nat_dec_le(lean_object*, lean_object*); uint8_t l_USize_decLe(size_t, size_t); lean_object* l_Lean_Elab_Command_CommandElabM_monadLog___closed__6; lean_object* l_AssocList_foldlM___main___at_Lean_Elab_Command_addBuiltinCommandElab___spec__14(lean_object*, lean_object*); +lean_object* l_Lean_Elab_Command_getCurrMacroScope(lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_elabVariable___boxed(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_nameToExprAux___main(lean_object*); extern lean_object* l_Lean_Parser_Command_reserve___elambda__1___closed__2; lean_object* l_Lean_Elab_Command_modifyScope(lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Elab_Command_CommandElabM_MonadQuotation___closed__2; lean_object* l_Lean_Syntax_getArgs(lean_object*); lean_object* l_Lean_Elab_Command_State_inhabited___closed__2; +lean_object* l_Lean_Elab_Command_withDeclId___boxed(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___regBuiltinCommandElab_Lean_Elab_Command_elabReserve___closed__3; lean_object* l_Lean_Environment_addAndCompile(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_elabEnd___closed__5; lean_object* l___private_Init_Lean_Elab_Command_6__mkTermState___boxed(lean_object*); lean_object* l_Lean_Elab_Command_elabEnd___closed__1; +lean_object* l_Array_iterateMAux___main___at_Lean_Elab_Command_withDeclId___spec__5(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_CommandElabM_monadLog___closed__5; lean_object* l___regBuiltinCommandElab_Lean_Elab_Command_elabUniverse___closed__2; lean_object* l_Lean_registerTagAttribute___lambda__5___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l___private_Init_Lean_Elab_Command_10__addScopes___main___closed__2; lean_object* l_Lean_Elab_Command_elabEnd___boxed(lean_object*, lean_object*, lean_object*); lean_object* lean_panic_fn(lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_registerBuiltinCommandElabAttr___closed__3; @@ -378,6 +413,7 @@ lean_object* l_Lean_Syntax_foldArgsAuxM___main___at_Lean_Elab_Command_elabOpenSi lean_object* l_Lean_Elab_throwErrorUsingCmdPos___at_Lean_Elab_Command_resolveNamespace___spec__1___boxed(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Syntax_getOptionalIdent_x3f(lean_object*); lean_object* l___private_Init_Lean_Elab_Command_7__getVarDecls___boxed(lean_object*); +lean_object* l_Array_filterAux___main___at_Lean_Elab_Command_sortDeclLevelParams___spec__2(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_mkCommandElabAttribute___closed__2; lean_object* l_Lean_SMap_insert___at_Lean_Elab_Command_addBuiltinCommandElab___spec__6(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_elabNamespace(lean_object*, lean_object*, lean_object*); @@ -385,7 +421,9 @@ lean_object* l_Lean_Elab_Command_elabReserve___rarg(lean_object*); lean_object* l___regBuiltinCommandElab_Lean_Elab_Command_elabMixfix(lean_object*); lean_object* l___regBuiltinCommandElab_Lean_Elab_Command_elabInitQuot(lean_object*); lean_object* l_Lean_Elab_Command_resolveNamespace___closed__3; +lean_object* l_Lean_Elab_Command_withDeclId___closed__2; lean_object* l___regBuiltinCommandElab_Lean_Elab_Command_elabCheck___closed__1; +lean_object* l_Lean_Elab_Command_withNamespace___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* lean_io_ref_reset(lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_elabNotation(lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_logUnknownDecl___closed__1; @@ -396,11 +434,13 @@ lean_object* l___regBuiltinCommandElab_Lean_Elab_Command_elabMixfix___closed__2; lean_object* l_PersistentHashMap_insert___at_Lean_Elab_Command_addBuiltinCommandElab___spec__7(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_elabOpenHiding___boxed(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_getOpenDecls(lean_object*, lean_object*); +lean_object* l_Lean_Elab_Command_throwAlreadyDeclaredUniverseLevel___rarg___closed__4; lean_object* l_Lean_Elab_Command_declareBuiltinCommandElab___closed__3; extern lean_object* l_Lean_Parser_Command_export___elambda__1___closed__2; lean_object* l___regBuiltinCommandElab_Lean_Elab_Command_elabEnd___closed__1; lean_object* l___regBuiltinCommandElab_Lean_Elab_Command_elabSection___closed__3; lean_object* l_Lean_Elab_throwErrorUsingCmdPos___at_Lean_Elab_Command_resolveNamespace___spec__1(lean_object*, lean_object*, lean_object*); +uint8_t l_Lean_Syntax_isNone(lean_object*); lean_object* l_Lean_Elab_Command_getEnv(lean_object*, lean_object*); extern lean_object* l_Lean_TraceState_Inhabited___closed__1; lean_object* l___regBuiltinCommandElab_Lean_Elab_Command_elabUniverse___closed__1; @@ -411,33 +451,42 @@ lean_object* l_HashMapImp_expand___at_Lean_Elab_Command_addBuiltinCommandElab___ extern lean_object* l_Lean_mkOptionalNode___closed__1; lean_object* l___regBuiltinCommandElab_Lean_Elab_Command_elabCheck___closed__4; lean_object* l_PersistentHashMap_getCollisionNodeSize___rarg(lean_object*); +lean_object* l_Lean_Elab_Command_getLevelNames(lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_mkCommandElabAttribute___closed__3; lean_object* l_PersistentHashMap_findAtAux___main___at_Lean_Elab_Command_elabCommand___spec__8(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Elab_Command_throwAlreadyDeclaredUniverseLevel___rarg(lean_object*, lean_object*, lean_object*, lean_object*); extern lean_object* l_Lean_Parser_Command_openOnly___elambda__1___closed__2; +lean_object* l_Array_toList___rarg(lean_object*); lean_object* l_Lean_Elab_Command_CommandElabM_monadLog___lambda__3(lean_object*, lean_object*, lean_object*); lean_object* lean_mk_array(lean_object*, lean_object*); lean_object* l___private_Init_Lean_Elab_Command_4__modifyGetState___rarg(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_PersistentEnvExtension_getState___rarg(lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_declareBuiltinCommandElab___closed__7; +lean_object* l_Lean_Syntax_foldArgsAuxM___main___at_Lean_Syntax_foldSepRevArgsM___spec__1(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_elabVariable___lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Syntax_foldArgsAuxM___main___at_Lean_Elab_Command_elabOpenHiding___spec__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Term_elabBinders___rarg(lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Array_qsortAux___main___at_Lean_Elab_Command_sortDeclLevelParams___spec__3(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_setEnv(lean_object*, lean_object*, lean_object*); extern lean_object* l_Lean_Parser_Command_openSimple___elambda__1___closed__2; lean_object* l_Lean_Elab_Command_registerBuiltinCommandElabAttr___lambda__1___closed__2; lean_object* l___regBuiltinCommandElab_Lean_Elab_Command_elabInitQuot___closed__1; lean_object* l___regBuiltinCommandElab_Lean_Elab_Command_elabEnd___closed__3; +lean_object* l_Lean_Elab_Command_withDeclId(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_mkMessageAux___boxed(lean_object*, lean_object*, lean_object*, lean_object*); extern lean_object* l_Lean_Parser_Command_variables___elambda__1___closed__2; lean_object* l___regBuiltinCommandElab_Lean_Elab_Command_elabExport___closed__3; lean_object* l_Lean_Elab_Command_elabReserve___boxed(lean_object*, lean_object*); -lean_object* l___private_Init_Lean_Elab_Command_10__addScopes___main___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l___private_Init_Lean_Elab_Command_10__addScopes___main___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_liftIOCore___rarg(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_logUnknownDecl___closed__2; lean_object* l_Lean_Elab_Command_mkCommandElabAttribute(lean_object*); lean_object* l_Lean_Elab_Command_CommandElabM_monadLog___closed__10; +lean_object* l___private_Init_Lean_Elab_Command_10__addScopes___main___closed__1; extern lean_object* l_Lean_Message_Inhabited___closed__2; +lean_object* l_Lean_Elab_Command_modifyScope___at_Lean_Elab_Command_withDeclId___spec__3(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_registerBuiltinCommandElabAttr___lambda__1___closed__3; +lean_object* l_Lean_Syntax_getArg(lean_object*, lean_object*); extern lean_object* l_Lean_MetavarContext_Inhabited___closed__1; lean_object* l_ReaderT_bind___at_Lean_Elab_Command_CommandElabM_monadLog___spec__2___rarg(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_CommandElabM_monadLog___lambda__4(lean_object*, lean_object*, lean_object*); @@ -448,6 +497,7 @@ lean_object* l_Array_iterateMAux___main___at_Lean_Elab_Command_elabExport___spec lean_object* l_Lean_Elab_Command_elabMixfix(lean_object*, lean_object*); lean_object* l___regBuiltinCommandElab_Lean_Elab_Command_elabNotation___closed__1; lean_object* l_Lean_Elab_Command_CommandElabM_inhabited___closed__1; +lean_object* l_Lean_Elab_throwError___at_Lean_Elab_Command_throwAlreadyDeclaredUniverseLevel___spec__1___rarg(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_modifyScope___at_Lean_Elab_Command_elabVariable___spec__1(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_elabInitQuot(lean_object*, lean_object*, lean_object*); lean_object* l_Array_iterateMAux___main___at_Lean_mkAppN___spec__1(lean_object*, lean_object*, lean_object*, lean_object*); @@ -474,26 +524,29 @@ lean_object* l_Lean_mkConst(lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_elabNamespace___boxed(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_commandElabAttribute___closed__5; lean_object* l___regBuiltinCommandElab_Lean_Elab_Command_elabNamespace___closed__1; +lean_object* l_Lean_Elab_Command_CommandElabM_MonadQuotation___closed__3; lean_object* l___regBuiltinCommandElab_Lean_Elab_Command_elabSection___closed__1; lean_object* l_HashMapImp_insert___at_Lean_Elab_Command_addBuiltinCommandElab___spec__11(lean_object*, lean_object*, lean_object*); extern lean_object* l_Lean_PersistentEnvExtension_inhabited___rarg___closed__4; extern lean_object* l_Lean_initAttr; lean_object* l_Lean_Elab_Command_declareBuiltinCommandElab___closed__2; extern lean_object* l_Lean_Parser_Command_openHiding___elambda__1___closed__2; -lean_object* l_Lean_Elab_Command_addUniverse(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_syntaxNodeKindOfAttrParam(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_elabCommand___closed__5; lean_object* l_Lean_Elab_throwError___at_Lean_Elab_Command_elabEnd___spec__1(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_PersistentHashMap_mkCollisionNode___rarg(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___private_Init_Lean_Elab_Command_5__mkTermContext(lean_object*, lean_object*); +uint8_t l___private_Init_Lean_Elab_Command_13__checkEndHeader(lean_object*, lean_object*); lean_object* l_List_head_x21___at___private_Init_Lean_Elab_Command_5__mkTermContext___spec__1___boxed(lean_object*); lean_object* l_Lean_Elab_Command_elabInitQuot___boxed(lean_object*, lean_object*, lean_object*); lean_object* l___regBuiltinCommandElab_Lean_Elab_Command_elabNamespace___closed__2; +lean_object* l_Lean_Elab_Command_CommandElabM_MonadQuotation; lean_object* l___private_Init_Lean_Elab_Command_3__setState(lean_object*, lean_object*, lean_object*); lean_object* l___private_Init_Lean_Elab_Command_8__toCommandResult___rarg___closed__1; lean_object* l___private_Init_Lean_Elab_Command_6__mkTermState(lean_object*); lean_object* l_Lean_Elab_resolveNamespace(lean_object*, lean_object*, lean_object*, lean_object*); extern lean_object* l_Lean_NameGenerator_Inhabited___closed__3; +lean_object* l_Lean_Elab_Command_addDecl___boxed(lean_object*, lean_object*, lean_object*, lean_object*); uint8_t lean_string_dec_eq(lean_object*, lean_object*); uint8_t lean_nat_dec_lt(lean_object*, lean_object*); lean_object* l_HashMapImp_contains___at_Lean_Elab_Command_addBuiltinCommandElab___spec__2___boxed(lean_object*, lean_object*); @@ -572,15 +625,17 @@ return x_3; lean_object* _init_l_Lean_Elab_Command_State_inhabited___closed__4() { _start: { -lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4; +lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4; lean_object* x_5; x_1 = l_Lean_EnvExtension_setState___closed__1; x_2 = l_PersistentArray_empty___closed__3; x_3 = l_Lean_Elab_Command_State_inhabited___closed__3; -x_4 = lean_alloc_ctor(0, 3, 0); -lean_ctor_set(x_4, 0, x_1); -lean_ctor_set(x_4, 1, x_2); -lean_ctor_set(x_4, 2, x_3); -return x_4; +x_4 = lean_unsigned_to_nat(1u); +x_5 = lean_alloc_ctor(0, 4, 0); +lean_ctor_set(x_5, 0, x_1); +lean_ctor_set(x_5, 1, x_2); +lean_ctor_set(x_5, 2, x_3); +lean_ctor_set(x_5, 3, x_4); +return x_5; } } lean_object* _init_l_Lean_Elab_Command_State_inhabited() { @@ -594,7 +649,7 @@ return x_1; lean_object* l_Lean_Elab_Command_mkState(lean_object* x_1, lean_object* x_2, lean_object* x_3) { _start: { -lean_object* x_4; lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; +lean_object* x_4; lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; x_4 = lean_box(0); x_5 = l_Lean_Elab_Command_State_inhabited___closed__1; x_6 = l_String_splitAux___main___closed__1; @@ -611,11 +666,13 @@ lean_ctor_set(x_9, 6, x_8); x_10 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_10, 0, x_9); lean_ctor_set(x_10, 1, x_4); -x_11 = lean_alloc_ctor(0, 3, 0); -lean_ctor_set(x_11, 0, x_1); -lean_ctor_set(x_11, 1, x_2); -lean_ctor_set(x_11, 2, x_10); -return x_11; +x_11 = lean_unsigned_to_nat(1u); +x_12 = lean_alloc_ctor(0, 4, 0); +lean_ctor_set(x_12, 0, x_1); +lean_ctor_set(x_12, 1, x_2); +lean_ctor_set(x_12, 2, x_10); +lean_ctor_set(x_12, 3, x_11); +return x_12; } } lean_object* l_Lean_Elab_Command_mkMessageAux(lean_object* x_1, lean_object* x_2, lean_object* x_3, uint8_t x_4) { @@ -663,49 +720,17 @@ lean_dec(x_2); return x_6; } } -lean_object* _init_l___private_Init_Lean_Elab_Command_1__ioErrorToMessage___closed__1() { -_start: -{ -lean_object* x_1; -x_1 = lean_mk_string("IO error, "); -return x_1; -} -} -lean_object* _init_l___private_Init_Lean_Elab_Command_1__ioErrorToMessage___closed__2() { -_start: -{ -lean_object* x_1; lean_object* x_2; -x_1 = l___private_Init_Lean_Elab_Command_1__ioErrorToMessage___closed__1; -x_2 = lean_alloc_ctor(2, 1, 0); -lean_ctor_set(x_2, 0, x_1); -return x_2; -} -} -lean_object* _init_l___private_Init_Lean_Elab_Command_1__ioErrorToMessage___closed__3() { -_start: -{ -lean_object* x_1; lean_object* x_2; -x_1 = l___private_Init_Lean_Elab_Command_1__ioErrorToMessage___closed__2; -x_2 = lean_alloc_ctor(0, 1, 0); -lean_ctor_set(x_2, 0, x_1); -return x_2; -} -} lean_object* l___private_Init_Lean_Elab_Command_1__ioErrorToMessage(lean_object* x_1, lean_object* x_2, lean_object* x_3) { _start: { -lean_object* x_4; lean_object* x_5; lean_object* x_6; lean_object* x_7; uint8_t x_8; lean_object* x_9; +lean_object* x_4; lean_object* x_5; uint8_t x_6; lean_object* x_7; x_4 = lean_alloc_ctor(2, 1, 0); lean_ctor_set(x_4, 0, x_3); x_5 = lean_alloc_ctor(0, 1, 0); lean_ctor_set(x_5, 0, x_4); -x_6 = l___private_Init_Lean_Elab_Command_1__ioErrorToMessage___closed__3; -x_7 = lean_alloc_ctor(8, 2, 0); -lean_ctor_set(x_7, 0, x_6); -lean_ctor_set(x_7, 1, x_5); -x_8 = 2; -x_9 = l_Lean_Elab_Command_mkMessageAux(x_1, x_2, x_7, x_8); -return x_9; +x_6 = 2; +x_7 = l_Lean_Elab_Command_mkMessageAux(x_1, x_2, x_5, x_6); +return x_7; } } lean_object* l___private_Init_Lean_Elab_Command_1__ioErrorToMessage___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) { @@ -1308,91 +1333,94 @@ return x_20; } else { -lean_object* x_21; lean_object* x_22; lean_object* x_23; lean_object* x_24; lean_object* x_25; lean_object* x_26; +lean_object* x_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_21 = lean_ctor_get(x_5, 0); x_22 = lean_ctor_get(x_5, 1); x_23 = lean_ctor_get(x_5, 2); +x_24 = lean_ctor_get(x_5, 3); +lean_inc(x_24); lean_inc(x_23); lean_inc(x_22); lean_inc(x_21); lean_dec(x_5); -x_24 = l_PersistentArray_push___rarg(x_22, x_1); -x_25 = lean_alloc_ctor(0, 3, 0); -lean_ctor_set(x_25, 0, x_21); -lean_ctor_set(x_25, 1, x_24); -lean_ctor_set(x_25, 2, x_23); -x_26 = l___private_Init_Lean_Elab_Command_3__setState(x_25, x_2, x_6); -if (lean_obj_tag(x_26) == 0) +x_25 = l_PersistentArray_push___rarg(x_22, x_1); +x_26 = lean_alloc_ctor(0, 4, 0); +lean_ctor_set(x_26, 0, x_21); +lean_ctor_set(x_26, 1, x_25); +lean_ctor_set(x_26, 2, x_23); +lean_ctor_set(x_26, 3, x_24); +x_27 = l___private_Init_Lean_Elab_Command_3__setState(x_26, x_2, x_6); +if (lean_obj_tag(x_27) == 0) { -lean_object* x_27; lean_object* x_28; lean_object* x_29; lean_object* x_30; -x_27 = lean_ctor_get(x_26, 1); -lean_inc(x_27); -if (lean_is_exclusive(x_26)) { - lean_ctor_release(x_26, 0); - lean_ctor_release(x_26, 1); - x_28 = x_26; +lean_object* x_28; lean_object* x_29; lean_object* x_30; lean_object* x_31; +x_28 = lean_ctor_get(x_27, 1); +lean_inc(x_28); +if (lean_is_exclusive(x_27)) { + lean_ctor_release(x_27, 0); + lean_ctor_release(x_27, 1); + x_29 = x_27; } else { - lean_dec_ref(x_26); - x_28 = lean_box(0); + lean_dec_ref(x_27); + x_29 = lean_box(0); } -x_29 = lean_box(0); -if (lean_is_scalar(x_28)) { - x_30 = lean_alloc_ctor(0, 2, 0); +x_30 = lean_box(0); +if (lean_is_scalar(x_29)) { + x_31 = lean_alloc_ctor(0, 2, 0); } else { - x_30 = x_28; + x_31 = x_29; } -lean_ctor_set(x_30, 0, x_29); -lean_ctor_set(x_30, 1, x_27); -return x_30; +lean_ctor_set(x_31, 0, x_30); +lean_ctor_set(x_31, 1, x_28); +return x_31; } else { -lean_object* x_31; lean_object* x_32; lean_object* x_33; lean_object* x_34; -x_31 = lean_ctor_get(x_26, 0); -lean_inc(x_31); -x_32 = lean_ctor_get(x_26, 1); +lean_object* x_32; lean_object* x_33; lean_object* x_34; lean_object* x_35; +x_32 = lean_ctor_get(x_27, 0); lean_inc(x_32); -if (lean_is_exclusive(x_26)) { - lean_ctor_release(x_26, 0); - lean_ctor_release(x_26, 1); - x_33 = x_26; +x_33 = lean_ctor_get(x_27, 1); +lean_inc(x_33); +if (lean_is_exclusive(x_27)) { + lean_ctor_release(x_27, 0); + lean_ctor_release(x_27, 1); + x_34 = x_27; } else { - lean_dec_ref(x_26); - x_33 = lean_box(0); + lean_dec_ref(x_27); + x_34 = lean_box(0); } -if (lean_is_scalar(x_33)) { - x_34 = lean_alloc_ctor(1, 2, 0); +if (lean_is_scalar(x_34)) { + x_35 = lean_alloc_ctor(1, 2, 0); } else { - x_34 = x_33; + x_35 = x_34; } -lean_ctor_set(x_34, 0, x_31); -lean_ctor_set(x_34, 1, x_32); -return x_34; +lean_ctor_set(x_35, 0, x_32); +lean_ctor_set(x_35, 1, x_33); +return x_35; } } } else { -uint8_t x_35; +uint8_t x_36; lean_dec(x_2); lean_dec(x_1); -x_35 = !lean_is_exclusive(x_4); -if (x_35 == 0) +x_36 = !lean_is_exclusive(x_4); +if (x_36 == 0) { return x_4; } else { -lean_object* x_36; lean_object* x_37; lean_object* x_38; -x_36 = lean_ctor_get(x_4, 0); -x_37 = lean_ctor_get(x_4, 1); +lean_object* x_37; lean_object* x_38; lean_object* x_39; +x_37 = lean_ctor_get(x_4, 0); +x_38 = lean_ctor_get(x_4, 1); +lean_inc(x_38); lean_inc(x_37); -lean_inc(x_36); lean_dec(x_4); -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; +x_39 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_39, 0, x_37); +lean_ctor_set(x_39, 1, x_38); +return x_39; } } } @@ -1537,6 +1565,273 @@ lean_dec(x_1); return x_4; } } +lean_object* l_Lean_Elab_Command_getCurrMacroScope(lean_object* x_1, lean_object* x_2) { +_start: +{ +lean_object* x_3; lean_object* x_4; +x_3 = lean_ctor_get(x_1, 4); +lean_inc(x_3); +x_4 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_4, 0, x_3); +lean_ctor_set(x_4, 1, x_2); +return x_4; +} +} +lean_object* l_Lean_Elab_Command_getCurrMacroScope___boxed(lean_object* x_1, lean_object* x_2) { +_start: +{ +lean_object* x_3; +x_3 = l_Lean_Elab_Command_getCurrMacroScope(x_1, x_2); +lean_dec(x_1); +return x_3; +} +} +lean_object* l_Lean_Elab_Command_withFreshMacroScope___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +_start: +{ +lean_object* x_4; +lean_inc(x_2); +x_4 = l___private_Init_Lean_Elab_Command_2__getState(x_2, x_3); +if (lean_obj_tag(x_4) == 0) +{ +lean_object* x_5; lean_object* x_6; uint8_t x_7; +x_5 = lean_ctor_get(x_4, 0); +lean_inc(x_5); +x_6 = lean_ctor_get(x_4, 1); +lean_inc(x_6); +lean_dec(x_4); +x_7 = !lean_is_exclusive(x_5); +if (x_7 == 0) +{ +lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; +x_8 = lean_ctor_get(x_5, 3); +x_9 = lean_unsigned_to_nat(1u); +x_10 = lean_nat_add(x_8, x_9); +lean_ctor_set(x_5, 3, x_10); +lean_inc(x_2); +x_11 = l___private_Init_Lean_Elab_Command_3__setState(x_5, x_2, x_6); +if (lean_obj_tag(x_11) == 0) +{ +lean_object* x_12; uint8_t x_13; +x_12 = lean_ctor_get(x_11, 1); +lean_inc(x_12); +lean_dec(x_11); +x_13 = !lean_is_exclusive(x_2); +if (x_13 == 0) +{ +lean_object* x_14; lean_object* x_15; +x_14 = lean_ctor_get(x_2, 4); +lean_dec(x_14); +lean_ctor_set(x_2, 4, x_8); +x_15 = lean_apply_2(x_1, x_2, x_12); +return x_15; +} +else +{ +lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; lean_object* x_20; lean_object* x_21; +x_16 = lean_ctor_get(x_2, 0); +x_17 = lean_ctor_get(x_2, 1); +x_18 = lean_ctor_get(x_2, 2); +x_19 = lean_ctor_get(x_2, 3); +lean_inc(x_19); +lean_inc(x_18); +lean_inc(x_17); +lean_inc(x_16); +lean_dec(x_2); +x_20 = lean_alloc_ctor(0, 5, 0); +lean_ctor_set(x_20, 0, x_16); +lean_ctor_set(x_20, 1, x_17); +lean_ctor_set(x_20, 2, x_18); +lean_ctor_set(x_20, 3, x_19); +lean_ctor_set(x_20, 4, x_8); +x_21 = lean_apply_2(x_1, x_20, x_12); +return x_21; +} +} +else +{ +uint8_t x_22; +lean_dec(x_8); +lean_dec(x_2); +lean_dec(x_1); +x_22 = !lean_is_exclusive(x_11); +if (x_22 == 0) +{ +return x_11; +} +else +{ +lean_object* x_23; lean_object* x_24; lean_object* x_25; +x_23 = lean_ctor_get(x_11, 0); +x_24 = lean_ctor_get(x_11, 1); +lean_inc(x_24); +lean_inc(x_23); +lean_dec(x_11); +x_25 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_25, 0, x_23); +lean_ctor_set(x_25, 1, x_24); +return x_25; +} +} +} +else +{ +lean_object* x_26; lean_object* x_27; lean_object* x_28; lean_object* x_29; lean_object* x_30; lean_object* x_31; lean_object* x_32; lean_object* x_33; +x_26 = lean_ctor_get(x_5, 0); +x_27 = lean_ctor_get(x_5, 1); +x_28 = lean_ctor_get(x_5, 2); +x_29 = lean_ctor_get(x_5, 3); +lean_inc(x_29); +lean_inc(x_28); +lean_inc(x_27); +lean_inc(x_26); +lean_dec(x_5); +x_30 = lean_unsigned_to_nat(1u); +x_31 = lean_nat_add(x_29, x_30); +x_32 = lean_alloc_ctor(0, 4, 0); +lean_ctor_set(x_32, 0, x_26); +lean_ctor_set(x_32, 1, x_27); +lean_ctor_set(x_32, 2, x_28); +lean_ctor_set(x_32, 3, x_31); +lean_inc(x_2); +x_33 = l___private_Init_Lean_Elab_Command_3__setState(x_32, x_2, x_6); +if (lean_obj_tag(x_33) == 0) +{ +lean_object* x_34; lean_object* x_35; lean_object* x_36; lean_object* x_37; lean_object* x_38; lean_object* x_39; lean_object* x_40; lean_object* x_41; +x_34 = lean_ctor_get(x_33, 1); +lean_inc(x_34); +lean_dec(x_33); +x_35 = lean_ctor_get(x_2, 0); +lean_inc(x_35); +x_36 = lean_ctor_get(x_2, 1); +lean_inc(x_36); +x_37 = lean_ctor_get(x_2, 2); +lean_inc(x_37); +x_38 = lean_ctor_get(x_2, 3); +lean_inc(x_38); +if (lean_is_exclusive(x_2)) { + lean_ctor_release(x_2, 0); + lean_ctor_release(x_2, 1); + lean_ctor_release(x_2, 2); + lean_ctor_release(x_2, 3); + lean_ctor_release(x_2, 4); + x_39 = x_2; +} else { + lean_dec_ref(x_2); + x_39 = lean_box(0); +} +if (lean_is_scalar(x_39)) { + x_40 = lean_alloc_ctor(0, 5, 0); +} else { + x_40 = x_39; +} +lean_ctor_set(x_40, 0, x_35); +lean_ctor_set(x_40, 1, x_36); +lean_ctor_set(x_40, 2, x_37); +lean_ctor_set(x_40, 3, x_38); +lean_ctor_set(x_40, 4, x_29); +x_41 = lean_apply_2(x_1, x_40, x_34); +return x_41; +} +else +{ +lean_object* x_42; lean_object* x_43; lean_object* x_44; lean_object* x_45; +lean_dec(x_29); +lean_dec(x_2); +lean_dec(x_1); +x_42 = lean_ctor_get(x_33, 0); +lean_inc(x_42); +x_43 = lean_ctor_get(x_33, 1); +lean_inc(x_43); +if (lean_is_exclusive(x_33)) { + lean_ctor_release(x_33, 0); + lean_ctor_release(x_33, 1); + x_44 = x_33; +} else { + lean_dec_ref(x_33); + x_44 = lean_box(0); +} +if (lean_is_scalar(x_44)) { + x_45 = lean_alloc_ctor(1, 2, 0); +} else { + x_45 = x_44; +} +lean_ctor_set(x_45, 0, x_42); +lean_ctor_set(x_45, 1, x_43); +return x_45; +} +} +} +else +{ +uint8_t x_46; +lean_dec(x_2); +lean_dec(x_1); +x_46 = !lean_is_exclusive(x_4); +if (x_46 == 0) +{ +return x_4; +} +else +{ +lean_object* x_47; lean_object* x_48; lean_object* x_49; +x_47 = lean_ctor_get(x_4, 0); +x_48 = lean_ctor_get(x_4, 1); +lean_inc(x_48); +lean_inc(x_47); +lean_dec(x_4); +x_49 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_49, 0, x_47); +lean_ctor_set(x_49, 1, x_48); +return x_49; +} +} +} +} +lean_object* l_Lean_Elab_Command_withFreshMacroScope(lean_object* x_1) { +_start: +{ +lean_object* x_2; +x_2 = lean_alloc_closure((void*)(l_Lean_Elab_Command_withFreshMacroScope___rarg), 3, 0); +return x_2; +} +} +lean_object* _init_l_Lean_Elab_Command_CommandElabM_MonadQuotation___closed__1() { +_start: +{ +lean_object* x_1; +x_1 = lean_alloc_closure((void*)(l_Lean_Elab_Command_getCurrMacroScope___boxed), 2, 0); +return x_1; +} +} +lean_object* _init_l_Lean_Elab_Command_CommandElabM_MonadQuotation___closed__2() { +_start: +{ +lean_object* x_1; +x_1 = lean_alloc_closure((void*)(l_Lean_Elab_Command_withFreshMacroScope), 1, 0); +return x_1; +} +} +lean_object* _init_l_Lean_Elab_Command_CommandElabM_MonadQuotation___closed__3() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; +x_1 = l_Lean_Elab_Command_CommandElabM_MonadQuotation___closed__1; +x_2 = l_Lean_Elab_Command_CommandElabM_MonadQuotation___closed__2; +x_3 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_3, 0, x_1); +lean_ctor_set(x_3, 1, x_2); +return x_3; +} +} +lean_object* _init_l_Lean_Elab_Command_CommandElabM_MonadQuotation() { +_start: +{ +lean_object* x_1; +x_1 = l_Lean_Elab_Command_CommandElabM_MonadQuotation___closed__3; +return x_1; +} +} lean_object* l_mkHashMap___at_Lean_Elab_Command_mkBuiltinCommandElabTable___spec__2(lean_object* x_1) { _start: { @@ -4186,6 +4481,48 @@ lean_dec(x_2); return x_3; } } +lean_object* l_Lean_Elab_Command_adaptExpander(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { +_start: +{ +lean_object* x_5; +lean_inc(x_3); +x_5 = lean_apply_3(x_1, x_2, x_3, x_4); +if (lean_obj_tag(x_5) == 0) +{ +lean_object* x_6; lean_object* x_7; lean_object* x_8; +x_6 = lean_ctor_get(x_5, 0); +lean_inc(x_6); +x_7 = lean_ctor_get(x_5, 1); +lean_inc(x_7); +lean_dec(x_5); +x_8 = l_Lean_Elab_Command_elabCommand(x_6, x_3, x_7); +return x_8; +} +else +{ +uint8_t x_9; +lean_dec(x_3); +x_9 = !lean_is_exclusive(x_5); +if (x_9 == 0) +{ +return x_5; +} +else +{ +lean_object* x_10; lean_object* x_11; lean_object* x_12; +x_10 = lean_ctor_get(x_5, 0); +x_11 = lean_ctor_get(x_5, 1); +lean_inc(x_11); +lean_inc(x_10); +lean_dec(x_5); +x_12 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_12, 0, x_10); +lean_ctor_set(x_12, 1, x_11); +return x_12; +} +} +} +} lean_object* l_List_head_x21___at___private_Init_Lean_Elab_Command_5__mkTermContext___spec__1(lean_object* x_1) { _start: { @@ -4242,8 +4579,9 @@ lean_ctor_set(x_15, 2, x_14); x_16 = lean_ctor_get(x_1, 0); x_17 = lean_ctor_get(x_1, 1); x_18 = lean_ctor_get(x_1, 3); -x_19 = lean_box(0); -x_20 = lean_unsigned_to_nat(0u); +x_19 = lean_ctor_get(x_1, 4); +x_20 = lean_box(0); +lean_inc(x_19); lean_inc(x_18); lean_inc(x_17); lean_inc(x_16); @@ -4255,8 +4593,8 @@ lean_ctor_set(x_21, 3, x_18); lean_ctor_set(x_21, 4, x_6); lean_ctor_set(x_21, 5, x_8); lean_ctor_set(x_21, 6, x_7); -lean_ctor_set(x_21, 7, x_19); -lean_ctor_set(x_21, 8, x_20); +lean_ctor_set(x_21, 7, x_20); +lean_ctor_set(x_21, 8, x_19); lean_ctor_set_uint8(x_21, sizeof(void*)*9, x_9); return x_21; } @@ -4283,33 +4621,35 @@ return x_3; lean_object* l___private_Init_Lean_Elab_Command_6__mkTermState(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; lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; +lean_object* x_2; lean_object* x_3; 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; x_2 = lean_ctor_get(x_1, 0); x_3 = lean_ctor_get(x_1, 1); -x_4 = l_Lean_MetavarContext_Inhabited___closed__1; -x_5 = l_Lean_Meta_MetaHasEval___rarg___closed__4; -x_6 = l_Lean_NameGenerator_Inhabited___closed__3; -x_7 = l_Lean_TraceState_Inhabited___closed__1; -x_8 = l_PersistentArray_empty___closed__3; +x_4 = lean_ctor_get(x_1, 3); +x_5 = l_Lean_MetavarContext_Inhabited___closed__1; +x_6 = l_Lean_Meta_MetaHasEval___rarg___closed__4; +x_7 = l_Lean_NameGenerator_Inhabited___closed__3; +x_8 = l_Lean_TraceState_Inhabited___closed__1; +x_9 = l_PersistentArray_empty___closed__3; lean_inc(x_2); -x_9 = lean_alloc_ctor(0, 6, 0); -lean_ctor_set(x_9, 0, x_2); -lean_ctor_set(x_9, 1, x_4); -lean_ctor_set(x_9, 2, x_5); -lean_ctor_set(x_9, 3, x_6); -lean_ctor_set(x_9, 4, x_7); -lean_ctor_set(x_9, 5, x_8); -x_10 = lean_box(0); -x_11 = lean_unsigned_to_nat(1u); +x_10 = lean_alloc_ctor(0, 6, 0); +lean_ctor_set(x_10, 0, x_2); +lean_ctor_set(x_10, 1, x_5); +lean_ctor_set(x_10, 2, x_6); +lean_ctor_set(x_10, 3, x_7); +lean_ctor_set(x_10, 4, x_8); +lean_ctor_set(x_10, 5, x_9); +x_11 = lean_box(0); +x_12 = lean_unsigned_to_nat(1u); +lean_inc(x_4); lean_inc(x_3); -x_12 = lean_alloc_ctor(0, 6, 0); -lean_ctor_set(x_12, 0, x_9); -lean_ctor_set(x_12, 1, x_10); -lean_ctor_set(x_12, 2, x_3); -lean_ctor_set(x_12, 3, x_11); -lean_ctor_set(x_12, 4, x_11); -lean_ctor_set(x_12, 5, x_11); -return x_12; +x_13 = lean_alloc_ctor(0, 6, 0); +lean_ctor_set(x_13, 0, x_10); +lean_ctor_set(x_13, 1, x_11); +lean_ctor_set(x_13, 2, x_3); +lean_ctor_set(x_13, 3, x_12); +lean_ctor_set(x_13, 4, x_12); +lean_ctor_set(x_13, 5, x_4); +return x_13; } } lean_object* l___private_Init_Lean_Elab_Command_6__mkTermState___boxed(lean_object* x_1) { @@ -4375,15 +4715,20 @@ lean_inc(x_7); lean_dec(x_4); x_8 = lean_ctor_get(x_3, 2); lean_inc(x_8); -lean_dec(x_3); x_9 = !lean_is_exclusive(x_1); if (x_9 == 0) { -lean_object* x_10; lean_object* x_11; -x_10 = lean_ctor_get(x_1, 1); +lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; +x_10 = lean_ctor_get(x_1, 3); lean_dec(x_10); -x_11 = lean_ctor_get(x_1, 0); +x_11 = lean_ctor_get(x_1, 1); lean_dec(x_11); +x_12 = lean_ctor_get(x_1, 0); +lean_dec(x_12); +x_13 = lean_ctor_get(x_3, 5); +lean_inc(x_13); +lean_dec(x_3); +lean_ctor_set(x_1, 3, x_13); lean_ctor_set(x_1, 1, x_8); lean_ctor_set(x_1, 0, x_7); lean_ctor_set(x_2, 1, x_1); @@ -4391,160 +4736,181 @@ return x_2; } else { -lean_object* x_12; lean_object* x_13; -x_12 = lean_ctor_get(x_1, 2); -lean_inc(x_12); -lean_dec(x_1); -x_13 = lean_alloc_ctor(0, 3, 0); -lean_ctor_set(x_13, 0, x_7); -lean_ctor_set(x_13, 1, x_8); -lean_ctor_set(x_13, 2, x_12); -lean_ctor_set(x_2, 1, x_13); -return x_2; -} -} -else -{ -lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; lean_object* x_20; -x_14 = lean_ctor_get(x_2, 0); +lean_object* x_14; lean_object* x_15; lean_object* x_16; +x_14 = lean_ctor_get(x_1, 2); lean_inc(x_14); -lean_dec(x_2); -x_15 = lean_ctor_get(x_4, 0); +lean_dec(x_1); +x_15 = lean_ctor_get(x_3, 5); lean_inc(x_15); -lean_dec(x_4); -x_16 = lean_ctor_get(x_3, 2); -lean_inc(x_16); lean_dec(x_3); -x_17 = lean_ctor_get(x_1, 2); +x_16 = lean_alloc_ctor(0, 4, 0); +lean_ctor_set(x_16, 0, x_7); +lean_ctor_set(x_16, 1, x_8); +lean_ctor_set(x_16, 2, x_14); +lean_ctor_set(x_16, 3, x_15); +lean_ctor_set(x_2, 1, x_16); +return x_2; +} +} +else +{ +lean_object* x_17; lean_object* x_18; lean_object* x_19; lean_object* x_20; lean_object* x_21; lean_object* x_22; lean_object* x_23; lean_object* x_24; +x_17 = lean_ctor_get(x_2, 0); lean_inc(x_17); +lean_dec(x_2); +x_18 = lean_ctor_get(x_4, 0); +lean_inc(x_18); +lean_dec(x_4); +x_19 = lean_ctor_get(x_3, 2); +lean_inc(x_19); +x_20 = lean_ctor_get(x_1, 2); +lean_inc(x_20); if (lean_is_exclusive(x_1)) { lean_ctor_release(x_1, 0); lean_ctor_release(x_1, 1); lean_ctor_release(x_1, 2); - x_18 = x_1; + lean_ctor_release(x_1, 3); + x_21 = x_1; } else { lean_dec_ref(x_1); - x_18 = lean_box(0); + x_21 = lean_box(0); } -if (lean_is_scalar(x_18)) { - x_19 = lean_alloc_ctor(0, 3, 0); +x_22 = lean_ctor_get(x_3, 5); +lean_inc(x_22); +lean_dec(x_3); +if (lean_is_scalar(x_21)) { + x_23 = lean_alloc_ctor(0, 4, 0); } else { - x_19 = x_18; + x_23 = x_21; } -lean_ctor_set(x_19, 0, x_15); -lean_ctor_set(x_19, 1, x_16); -lean_ctor_set(x_19, 2, x_17); -x_20 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_20, 0, x_14); -lean_ctor_set(x_20, 1, x_19); -return x_20; +lean_ctor_set(x_23, 0, x_18); +lean_ctor_set(x_23, 1, x_19); +lean_ctor_set(x_23, 2, x_20); +lean_ctor_set(x_23, 3, x_22); +x_24 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_24, 0, x_17); +lean_ctor_set(x_24, 1, x_23); +return x_24; } } else { -lean_object* x_21; -x_21 = lean_ctor_get(x_2, 0); -lean_inc(x_21); -if (lean_obj_tag(x_21) == 0) -{ -uint8_t x_22; -x_22 = !lean_is_exclusive(x_2); -if (x_22 == 0) -{ -lean_object* x_23; lean_object* x_24; lean_object* x_25; lean_object* x_26; lean_object* x_27; lean_object* x_28; uint8_t x_29; -x_23 = lean_ctor_get(x_2, 1); -x_24 = lean_ctor_get(x_2, 0); -lean_dec(x_24); -x_25 = lean_ctor_get(x_23, 0); +lean_object* x_25; +x_25 = lean_ctor_get(x_2, 0); lean_inc(x_25); -x_26 = lean_ctor_get(x_21, 0); -lean_inc(x_26); -lean_dec(x_21); -x_27 = lean_ctor_get(x_25, 0); -lean_inc(x_27); +if (lean_obj_tag(x_25) == 0) +{ +uint8_t x_26; +x_26 = !lean_is_exclusive(x_2); +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; uint8_t x_33; +x_27 = lean_ctor_get(x_2, 1); +x_28 = lean_ctor_get(x_2, 0); +lean_dec(x_28); +x_29 = lean_ctor_get(x_27, 0); +lean_inc(x_29); +x_30 = lean_ctor_get(x_25, 0); +lean_inc(x_30); lean_dec(x_25); -x_28 = lean_ctor_get(x_23, 2); -lean_inc(x_28); -lean_dec(x_23); -x_29 = !lean_is_exclusive(x_1); -if (x_29 == 0) -{ -lean_object* x_30; lean_object* x_31; -x_30 = lean_ctor_get(x_1, 1); -lean_dec(x_30); -x_31 = lean_ctor_get(x_1, 0); -lean_dec(x_31); -lean_ctor_set(x_1, 1, x_28); -lean_ctor_set(x_1, 0, x_27); -lean_ctor_set(x_2, 1, x_1); -lean_ctor_set(x_2, 0, x_26); -return x_2; -} -else -{ -lean_object* x_32; lean_object* x_33; -x_32 = lean_ctor_get(x_1, 2); +x_31 = lean_ctor_get(x_29, 0); +lean_inc(x_31); +lean_dec(x_29); +x_32 = lean_ctor_get(x_27, 2); lean_inc(x_32); +x_33 = !lean_is_exclusive(x_1); +if (x_33 == 0) +{ +lean_object* x_34; lean_object* x_35; lean_object* x_36; lean_object* x_37; +x_34 = lean_ctor_get(x_1, 3); +lean_dec(x_34); +x_35 = lean_ctor_get(x_1, 1); +lean_dec(x_35); +x_36 = lean_ctor_get(x_1, 0); +lean_dec(x_36); +x_37 = lean_ctor_get(x_27, 5); +lean_inc(x_37); +lean_dec(x_27); +lean_ctor_set(x_1, 3, x_37); +lean_ctor_set(x_1, 1, x_32); +lean_ctor_set(x_1, 0, x_31); +lean_ctor_set(x_2, 1, x_1); +lean_ctor_set(x_2, 0, x_30); +return x_2; +} +else +{ +lean_object* x_38; lean_object* x_39; lean_object* x_40; +x_38 = lean_ctor_get(x_1, 2); +lean_inc(x_38); lean_dec(x_1); -x_33 = lean_alloc_ctor(0, 3, 0); -lean_ctor_set(x_33, 0, x_27); -lean_ctor_set(x_33, 1, x_28); -lean_ctor_set(x_33, 2, x_32); -lean_ctor_set(x_2, 1, x_33); -lean_ctor_set(x_2, 0, x_26); +x_39 = lean_ctor_get(x_27, 5); +lean_inc(x_39); +lean_dec(x_27); +x_40 = lean_alloc_ctor(0, 4, 0); +lean_ctor_set(x_40, 0, x_31); +lean_ctor_set(x_40, 1, x_32); +lean_ctor_set(x_40, 2, x_38); +lean_ctor_set(x_40, 3, x_39); +lean_ctor_set(x_2, 1, x_40); +lean_ctor_set(x_2, 0, x_30); return x_2; } } else { -lean_object* x_34; lean_object* x_35; lean_object* x_36; lean_object* x_37; lean_object* x_38; lean_object* x_39; lean_object* x_40; lean_object* x_41; lean_object* x_42; -x_34 = lean_ctor_get(x_2, 1); -lean_inc(x_34); +lean_object* x_41; lean_object* x_42; lean_object* x_43; lean_object* x_44; lean_object* x_45; lean_object* x_46; lean_object* x_47; lean_object* x_48; lean_object* x_49; lean_object* x_50; +x_41 = lean_ctor_get(x_2, 1); +lean_inc(x_41); lean_dec(x_2); -x_35 = lean_ctor_get(x_34, 0); -lean_inc(x_35); -x_36 = lean_ctor_get(x_21, 0); -lean_inc(x_36); -lean_dec(x_21); -x_37 = lean_ctor_get(x_35, 0); -lean_inc(x_37); -lean_dec(x_35); -x_38 = lean_ctor_get(x_34, 2); -lean_inc(x_38); -lean_dec(x_34); -x_39 = lean_ctor_get(x_1, 2); -lean_inc(x_39); +x_42 = lean_ctor_get(x_41, 0); +lean_inc(x_42); +x_43 = lean_ctor_get(x_25, 0); +lean_inc(x_43); +lean_dec(x_25); +x_44 = lean_ctor_get(x_42, 0); +lean_inc(x_44); +lean_dec(x_42); +x_45 = lean_ctor_get(x_41, 2); +lean_inc(x_45); +x_46 = lean_ctor_get(x_1, 2); +lean_inc(x_46); if (lean_is_exclusive(x_1)) { lean_ctor_release(x_1, 0); lean_ctor_release(x_1, 1); lean_ctor_release(x_1, 2); - x_40 = x_1; + lean_ctor_release(x_1, 3); + x_47 = x_1; } else { lean_dec_ref(x_1); - x_40 = lean_box(0); + x_47 = lean_box(0); } -if (lean_is_scalar(x_40)) { - x_41 = lean_alloc_ctor(0, 3, 0); +x_48 = lean_ctor_get(x_41, 5); +lean_inc(x_48); +lean_dec(x_41); +if (lean_is_scalar(x_47)) { + x_49 = lean_alloc_ctor(0, 4, 0); } else { - x_41 = x_40; + x_49 = x_47; } -lean_ctor_set(x_41, 0, x_37); -lean_ctor_set(x_41, 1, x_38); -lean_ctor_set(x_41, 2, x_39); -x_42 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_42, 0, x_36); -lean_ctor_set(x_42, 1, x_41); -return x_42; +lean_ctor_set(x_49, 0, x_44); +lean_ctor_set(x_49, 1, x_45); +lean_ctor_set(x_49, 2, x_46); +lean_ctor_set(x_49, 3, x_48); +x_50 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_50, 0, x_43); +lean_ctor_set(x_50, 1, x_49); +return x_50; } } else { -lean_object* x_43; lean_object* x_44; +lean_object* x_51; lean_object* x_52; lean_dec(x_2); lean_dec(x_1); -x_43 = l___private_Init_Lean_Elab_Command_8__toCommandResult___rarg___closed__1; -x_44 = l_unreachable_x21___rarg(x_43); -return x_44; +x_51 = l___private_Init_Lean_Elab_Command_8__toCommandResult___rarg___closed__1; +x_52 = l_unreachable_x21___rarg(x_51); +return x_52; } } } @@ -4600,116 +4966,117 @@ lean_inc(x_2); x_4 = l___private_Init_Lean_Elab_Command_2__getState(x_2, x_3); if (lean_obj_tag(x_4) == 0) { -lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; +lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; x_5 = lean_ctor_get(x_4, 0); lean_inc(x_5); x_6 = lean_ctor_get(x_4, 1); lean_inc(x_6); lean_dec(x_4); x_7 = l___private_Init_Lean_Elab_Command_7__getVarDecls(x_5); -x_8 = lean_alloc_closure((void*)(l_PersistentHashMap_forM___rarg___lambda__1___boxed), 4, 1); -lean_closure_set(x_8, 0, x_1); -x_9 = l___private_Init_Lean_Elab_Command_5__mkTermContext(x_2, x_5); -x_10 = l___private_Init_Lean_Elab_Command_6__mkTermState(x_5); +x_8 = l___private_Init_Lean_Elab_Command_5__mkTermContext(x_2, x_5); +x_9 = l___private_Init_Lean_Elab_Command_6__mkTermState(x_5); lean_dec(x_5); -x_11 = l_Lean_Elab_Term_elabBinders___rarg(x_7, x_8, x_9, x_10); +x_10 = l_Lean_Elab_Term_elabBinders___rarg(x_7, x_1, x_8, x_9); lean_dec(x_7); -if (lean_obj_tag(x_11) == 0) +if (lean_obj_tag(x_10) == 0) { -lean_object* x_12; lean_object* x_13; lean_object* x_14; -x_12 = lean_ctor_get(x_11, 0); +lean_object* x_11; lean_object* x_12; lean_object* x_13; +x_11 = lean_ctor_get(x_10, 0); +lean_inc(x_11); +x_12 = lean_ctor_get(x_10, 1); lean_inc(x_12); -x_13 = lean_ctor_get(x_11, 1); -lean_inc(x_13); -lean_dec(x_11); +lean_dec(x_10); lean_inc(x_2); -x_14 = l___private_Init_Lean_Elab_Command_2__getState(x_2, x_6); -if (lean_obj_tag(x_14) == 0) +x_13 = l___private_Init_Lean_Elab_Command_2__getState(x_2, x_6); +if (lean_obj_tag(x_13) == 0) { -lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; uint8_t x_20; +lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; uint8_t x_19; +x_14 = lean_ctor_get(x_12, 0); +lean_inc(x_14); x_15 = lean_ctor_get(x_13, 0); lean_inc(x_15); -x_16 = lean_ctor_get(x_14, 0); +x_16 = lean_ctor_get(x_13, 1); lean_inc(x_16); -x_17 = lean_ctor_get(x_14, 1); +lean_dec(x_13); +x_17 = lean_ctor_get(x_14, 0); lean_inc(x_17); lean_dec(x_14); -x_18 = lean_ctor_get(x_15, 0); +x_18 = lean_ctor_get(x_12, 2); lean_inc(x_18); -lean_dec(x_15); -x_19 = lean_ctor_get(x_13, 2); -lean_inc(x_19); -lean_dec(x_13); -x_20 = !lean_is_exclusive(x_16); -if (x_20 == 0) -{ -lean_object* x_21; lean_object* x_22; lean_object* x_23; -x_21 = lean_ctor_get(x_16, 1); -lean_dec(x_21); -x_22 = lean_ctor_get(x_16, 0); -lean_dec(x_22); -lean_ctor_set(x_16, 1, x_19); -lean_ctor_set(x_16, 0, x_18); -x_23 = l___private_Init_Lean_Elab_Command_3__setState(x_16, x_2, x_17); -if (lean_obj_tag(x_23) == 0) -{ -uint8_t x_24; -x_24 = !lean_is_exclusive(x_23); -if (x_24 == 0) -{ -lean_object* x_25; -x_25 = lean_ctor_get(x_23, 0); -lean_dec(x_25); -lean_ctor_set(x_23, 0, x_12); -return x_23; -} -else -{ -lean_object* x_26; lean_object* x_27; -x_26 = lean_ctor_get(x_23, 1); -lean_inc(x_26); -lean_dec(x_23); -x_27 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_27, 0, x_12); -lean_ctor_set(x_27, 1, x_26); -return x_27; -} -} -else -{ -uint8_t x_28; lean_dec(x_12); -x_28 = !lean_is_exclusive(x_23); -if (x_28 == 0) +x_19 = !lean_is_exclusive(x_15); +if (x_19 == 0) { -return x_23; +lean_object* x_20; lean_object* x_21; lean_object* x_22; +x_20 = lean_ctor_get(x_15, 1); +lean_dec(x_20); +x_21 = lean_ctor_get(x_15, 0); +lean_dec(x_21); +lean_ctor_set(x_15, 1, x_18); +lean_ctor_set(x_15, 0, x_17); +x_22 = l___private_Init_Lean_Elab_Command_3__setState(x_15, x_2, x_16); +if (lean_obj_tag(x_22) == 0) +{ +uint8_t x_23; +x_23 = !lean_is_exclusive(x_22); +if (x_23 == 0) +{ +lean_object* x_24; +x_24 = lean_ctor_get(x_22, 0); +lean_dec(x_24); +lean_ctor_set(x_22, 0, x_11); +return x_22; } else { -lean_object* x_29; lean_object* x_30; lean_object* x_31; -x_29 = lean_ctor_get(x_23, 0); -x_30 = lean_ctor_get(x_23, 1); -lean_inc(x_30); +lean_object* x_25; lean_object* x_26; +x_25 = lean_ctor_get(x_22, 1); +lean_inc(x_25); +lean_dec(x_22); +x_26 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_26, 0, x_11); +lean_ctor_set(x_26, 1, x_25); +return x_26; +} +} +else +{ +uint8_t x_27; +lean_dec(x_11); +x_27 = !lean_is_exclusive(x_22); +if (x_27 == 0) +{ +return x_22; +} +else +{ +lean_object* x_28; lean_object* x_29; lean_object* x_30; +x_28 = lean_ctor_get(x_22, 0); +x_29 = lean_ctor_get(x_22, 1); lean_inc(x_29); -lean_dec(x_23); -x_31 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_31, 0, x_29); -lean_ctor_set(x_31, 1, x_30); -return x_31; +lean_inc(x_28); +lean_dec(x_22); +x_30 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_30, 0, x_28); +lean_ctor_set(x_30, 1, x_29); +return x_30; } } } else { -lean_object* x_32; lean_object* x_33; lean_object* x_34; -x_32 = lean_ctor_get(x_16, 2); +lean_object* x_31; lean_object* x_32; lean_object* x_33; lean_object* x_34; +x_31 = lean_ctor_get(x_15, 2); +x_32 = lean_ctor_get(x_15, 3); lean_inc(x_32); -lean_dec(x_16); -x_33 = lean_alloc_ctor(0, 3, 0); -lean_ctor_set(x_33, 0, x_18); -lean_ctor_set(x_33, 1, x_19); -lean_ctor_set(x_33, 2, x_32); -x_34 = l___private_Init_Lean_Elab_Command_3__setState(x_33, x_2, x_17); +lean_inc(x_31); +lean_dec(x_15); +x_33 = lean_alloc_ctor(0, 4, 0); +lean_ctor_set(x_33, 0, x_17); +lean_ctor_set(x_33, 1, x_18); +lean_ctor_set(x_33, 2, x_31); +lean_ctor_set(x_33, 3, x_32); +x_34 = l___private_Init_Lean_Elab_Command_3__setState(x_33, x_2, x_16); if (lean_obj_tag(x_34) == 0) { lean_object* x_35; lean_object* x_36; lean_object* x_37; @@ -4728,14 +5095,14 @@ if (lean_is_scalar(x_36)) { } else { x_37 = x_36; } -lean_ctor_set(x_37, 0, x_12); +lean_ctor_set(x_37, 0, x_11); lean_ctor_set(x_37, 1, x_35); return x_37; } else { lean_object* x_38; lean_object* x_39; lean_object* x_40; lean_object* x_41; -lean_dec(x_12); +lean_dec(x_11); x_38 = lean_ctor_get(x_34, 0); lean_inc(x_38); x_39 = lean_ctor_get(x_34, 1); @@ -4762,22 +5129,22 @@ return x_41; else { uint8_t x_42; -lean_dec(x_13); lean_dec(x_12); +lean_dec(x_11); lean_dec(x_2); -x_42 = !lean_is_exclusive(x_14); +x_42 = !lean_is_exclusive(x_13); if (x_42 == 0) { -return x_14; +return x_13; } else { lean_object* x_43; lean_object* x_44; lean_object* x_45; -x_43 = lean_ctor_get(x_14, 0); -x_44 = lean_ctor_get(x_14, 1); +x_43 = lean_ctor_get(x_13, 0); +x_44 = lean_ctor_get(x_13, 1); lean_inc(x_44); lean_inc(x_43); -lean_dec(x_14); +lean_dec(x_13); x_45 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_45, 0, x_43); lean_ctor_set(x_45, 1, x_44); @@ -4788,14 +5155,14 @@ return x_45; else { lean_object* x_46; -x_46 = lean_ctor_get(x_11, 0); +x_46 = lean_ctor_get(x_10, 0); lean_inc(x_46); if (lean_obj_tag(x_46) == 0) { lean_object* x_47; lean_object* x_48; lean_object* x_49; -x_47 = lean_ctor_get(x_11, 1); +x_47 = lean_ctor_get(x_10, 1); lean_inc(x_47); -lean_dec(x_11); +lean_dec(x_10); x_48 = lean_ctor_get(x_46, 0); lean_inc(x_48); lean_dec(x_46); @@ -4879,124 +5246,127 @@ return x_66; } else { -lean_object* x_67; lean_object* x_68; lean_object* x_69; +lean_object* x_67; lean_object* x_68; lean_object* x_69; lean_object* x_70; x_67 = lean_ctor_get(x_51, 2); +x_68 = lean_ctor_get(x_51, 3); +lean_inc(x_68); lean_inc(x_67); lean_dec(x_51); -x_68 = lean_alloc_ctor(0, 3, 0); -lean_ctor_set(x_68, 0, x_53); -lean_ctor_set(x_68, 1, x_54); -lean_ctor_set(x_68, 2, x_67); -x_69 = l___private_Init_Lean_Elab_Command_3__setState(x_68, x_2, x_52); -if (lean_obj_tag(x_69) == 0) +x_69 = lean_alloc_ctor(0, 4, 0); +lean_ctor_set(x_69, 0, x_53); +lean_ctor_set(x_69, 1, x_54); +lean_ctor_set(x_69, 2, x_67); +lean_ctor_set(x_69, 3, x_68); +x_70 = l___private_Init_Lean_Elab_Command_3__setState(x_69, x_2, x_52); +if (lean_obj_tag(x_70) == 0) { -lean_object* x_70; lean_object* x_71; lean_object* x_72; -x_70 = lean_ctor_get(x_69, 1); -lean_inc(x_70); -if (lean_is_exclusive(x_69)) { - lean_ctor_release(x_69, 0); - lean_ctor_release(x_69, 1); - x_71 = x_69; +lean_object* x_71; lean_object* x_72; lean_object* x_73; +x_71 = lean_ctor_get(x_70, 1); +lean_inc(x_71); +if (lean_is_exclusive(x_70)) { + lean_ctor_release(x_70, 0); + lean_ctor_release(x_70, 1); + x_72 = x_70; } else { - lean_dec_ref(x_69); - x_71 = lean_box(0); + lean_dec_ref(x_70); + x_72 = lean_box(0); } -if (lean_is_scalar(x_71)) { - x_72 = lean_alloc_ctor(1, 2, 0); +if (lean_is_scalar(x_72)) { + x_73 = lean_alloc_ctor(1, 2, 0); } else { - x_72 = x_71; - lean_ctor_set_tag(x_72, 1); + x_73 = x_72; + lean_ctor_set_tag(x_73, 1); } -lean_ctor_set(x_72, 0, x_48); -lean_ctor_set(x_72, 1, x_70); -return x_72; +lean_ctor_set(x_73, 0, x_48); +lean_ctor_set(x_73, 1, x_71); +return x_73; } else { -lean_object* x_73; lean_object* x_74; lean_object* x_75; lean_object* x_76; +lean_object* x_74; lean_object* x_75; lean_object* x_76; lean_object* x_77; lean_dec(x_48); -x_73 = lean_ctor_get(x_69, 0); -lean_inc(x_73); -x_74 = lean_ctor_get(x_69, 1); +x_74 = lean_ctor_get(x_70, 0); lean_inc(x_74); -if (lean_is_exclusive(x_69)) { - lean_ctor_release(x_69, 0); - lean_ctor_release(x_69, 1); - x_75 = x_69; +x_75 = lean_ctor_get(x_70, 1); +lean_inc(x_75); +if (lean_is_exclusive(x_70)) { + lean_ctor_release(x_70, 0); + lean_ctor_release(x_70, 1); + x_76 = x_70; } else { - lean_dec_ref(x_69); - x_75 = lean_box(0); + lean_dec_ref(x_70); + x_76 = lean_box(0); } -if (lean_is_scalar(x_75)) { - x_76 = lean_alloc_ctor(1, 2, 0); +if (lean_is_scalar(x_76)) { + x_77 = lean_alloc_ctor(1, 2, 0); } else { - x_76 = x_75; + x_77 = x_76; } -lean_ctor_set(x_76, 0, x_73); -lean_ctor_set(x_76, 1, x_74); -return x_76; +lean_ctor_set(x_77, 0, x_74); +lean_ctor_set(x_77, 1, x_75); +return x_77; } } } else { -uint8_t x_77; +uint8_t x_78; lean_dec(x_48); lean_dec(x_47); lean_dec(x_2); -x_77 = !lean_is_exclusive(x_49); -if (x_77 == 0) +x_78 = !lean_is_exclusive(x_49); +if (x_78 == 0) { return x_49; } else { -lean_object* x_78; lean_object* x_79; lean_object* x_80; -x_78 = lean_ctor_get(x_49, 0); -x_79 = lean_ctor_get(x_49, 1); +lean_object* x_79; lean_object* x_80; lean_object* x_81; +x_79 = lean_ctor_get(x_49, 0); +x_80 = lean_ctor_get(x_49, 1); +lean_inc(x_80); lean_inc(x_79); -lean_inc(x_78); lean_dec(x_49); -x_80 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_80, 0, x_78); -lean_ctor_set(x_80, 1, x_79); -return x_80; +x_81 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_81, 0, x_79); +lean_ctor_set(x_81, 1, x_80); +return x_81; } } } else { -lean_object* x_81; lean_object* x_82; lean_object* x_83; -lean_dec(x_11); -x_81 = l_Lean_Elab_Command_runTermElabM___rarg___closed__1; -x_82 = l_unreachable_x21___rarg(x_81); -x_83 = lean_apply_2(x_82, x_2, x_6); -return x_83; +lean_object* x_82; lean_object* x_83; lean_object* x_84; +lean_dec(x_10); +x_82 = l_Lean_Elab_Command_runTermElabM___rarg___closed__1; +x_83 = l_unreachable_x21___rarg(x_82); +x_84 = lean_apply_2(x_83, x_2, x_6); +return x_84; } } } else { -uint8_t x_84; +uint8_t x_85; lean_dec(x_2); lean_dec(x_1); -x_84 = !lean_is_exclusive(x_4); -if (x_84 == 0) +x_85 = !lean_is_exclusive(x_4); +if (x_85 == 0) { return x_4; } else { -lean_object* x_85; lean_object* x_86; lean_object* x_87; -x_85 = lean_ctor_get(x_4, 0); -x_86 = lean_ctor_get(x_4, 1); +lean_object* x_86; lean_object* x_87; lean_object* x_88; +x_86 = lean_ctor_get(x_4, 0); +x_87 = lean_ctor_get(x_4, 1); +lean_inc(x_87); lean_inc(x_86); -lean_inc(x_85); lean_dec(x_4); -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; +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; } } } @@ -5097,91 +5467,94 @@ return x_23; } else { -lean_object* x_24; lean_object* x_25; lean_object* x_26; lean_object* x_27; lean_object* x_28; lean_object* x_29; +lean_object* x_24; lean_object* x_25; lean_object* x_26; lean_object* x_27; lean_object* x_28; lean_object* x_29; lean_object* x_30; x_24 = lean_ctor_get(x_8, 0); x_25 = lean_ctor_get(x_8, 1); x_26 = lean_ctor_get(x_8, 2); +x_27 = lean_ctor_get(x_8, 3); +lean_inc(x_27); lean_inc(x_26); lean_inc(x_25); lean_inc(x_24); lean_dec(x_8); -x_27 = l_PersistentArray_push___rarg(x_25, x_5); -x_28 = lean_alloc_ctor(0, 3, 0); -lean_ctor_set(x_28, 0, x_24); -lean_ctor_set(x_28, 1, x_27); -lean_ctor_set(x_28, 2, x_26); -x_29 = l___private_Init_Lean_Elab_Command_3__setState(x_28, x_2, x_9); -if (lean_obj_tag(x_29) == 0) +x_28 = l_PersistentArray_push___rarg(x_25, x_5); +x_29 = lean_alloc_ctor(0, 4, 0); +lean_ctor_set(x_29, 0, x_24); +lean_ctor_set(x_29, 1, x_28); +lean_ctor_set(x_29, 2, x_26); +lean_ctor_set(x_29, 3, x_27); +x_30 = l___private_Init_Lean_Elab_Command_3__setState(x_29, x_2, x_9); +if (lean_obj_tag(x_30) == 0) { -lean_object* x_30; lean_object* x_31; lean_object* x_32; lean_object* x_33; -x_30 = lean_ctor_get(x_29, 1); -lean_inc(x_30); -if (lean_is_exclusive(x_29)) { - lean_ctor_release(x_29, 0); - lean_ctor_release(x_29, 1); - x_31 = x_29; +lean_object* x_31; lean_object* x_32; lean_object* x_33; lean_object* x_34; +x_31 = lean_ctor_get(x_30, 1); +lean_inc(x_31); +if (lean_is_exclusive(x_30)) { + lean_ctor_release(x_30, 0); + lean_ctor_release(x_30, 1); + x_32 = x_30; } else { - lean_dec_ref(x_29); - x_31 = lean_box(0); + lean_dec_ref(x_30); + x_32 = lean_box(0); } -x_32 = lean_box(0); -if (lean_is_scalar(x_31)) { - x_33 = lean_alloc_ctor(0, 2, 0); +x_33 = lean_box(0); +if (lean_is_scalar(x_32)) { + x_34 = lean_alloc_ctor(0, 2, 0); } else { - x_33 = x_31; + x_34 = x_32; } -lean_ctor_set(x_33, 0, x_32); -lean_ctor_set(x_33, 1, x_30); -return x_33; +lean_ctor_set(x_34, 0, x_33); +lean_ctor_set(x_34, 1, x_31); +return x_34; } else { -lean_object* x_34; lean_object* x_35; lean_object* x_36; lean_object* x_37; -x_34 = lean_ctor_get(x_29, 0); -lean_inc(x_34); -x_35 = lean_ctor_get(x_29, 1); +lean_object* x_35; lean_object* x_36; lean_object* x_37; lean_object* x_38; +x_35 = lean_ctor_get(x_30, 0); lean_inc(x_35); -if (lean_is_exclusive(x_29)) { - lean_ctor_release(x_29, 0); - lean_ctor_release(x_29, 1); - x_36 = x_29; +x_36 = lean_ctor_get(x_30, 1); +lean_inc(x_36); +if (lean_is_exclusive(x_30)) { + lean_ctor_release(x_30, 0); + lean_ctor_release(x_30, 1); + x_37 = x_30; } else { - lean_dec_ref(x_29); - x_36 = lean_box(0); + lean_dec_ref(x_30); + x_37 = lean_box(0); } -if (lean_is_scalar(x_36)) { - x_37 = lean_alloc_ctor(1, 2, 0); +if (lean_is_scalar(x_37)) { + x_38 = lean_alloc_ctor(1, 2, 0); } else { - x_37 = x_36; + x_38 = x_37; } -lean_ctor_set(x_37, 0, x_34); -lean_ctor_set(x_37, 1, x_35); -return x_37; +lean_ctor_set(x_38, 0, x_35); +lean_ctor_set(x_38, 1, x_36); +return x_38; } } } else { -uint8_t x_38; +uint8_t x_39; lean_dec(x_5); lean_dec(x_2); -x_38 = !lean_is_exclusive(x_7); -if (x_38 == 0) +x_39 = !lean_is_exclusive(x_7); +if (x_39 == 0) { return x_7; } else { -lean_object* x_39; lean_object* x_40; lean_object* x_41; -x_39 = lean_ctor_get(x_7, 0); -x_40 = lean_ctor_get(x_7, 1); +lean_object* x_40; lean_object* x_41; lean_object* x_42; +x_40 = lean_ctor_get(x_7, 0); +x_41 = lean_ctor_get(x_7, 1); +lean_inc(x_41); lean_inc(x_40); -lean_inc(x_39); lean_dec(x_7); -x_41 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_41, 0, x_39); -lean_ctor_set(x_41, 1, x_40); -return x_41; +x_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; } } } @@ -5298,96 +5671,99 @@ return x_29; } else { -lean_object* x_30; lean_object* x_31; lean_object* x_32; lean_object* x_33; lean_object* x_34; lean_object* x_35; +lean_object* x_30; lean_object* x_31; lean_object* x_32; lean_object* x_33; lean_object* x_34; lean_object* x_35; lean_object* x_36; x_30 = lean_ctor_get(x_12, 0); x_31 = lean_ctor_get(x_12, 1); x_32 = lean_ctor_get(x_12, 2); +x_33 = lean_ctor_get(x_12, 3); +lean_inc(x_33); lean_inc(x_32); lean_inc(x_31); lean_inc(x_30); lean_dec(x_12); -x_33 = l_PersistentArray_push___rarg(x_31, x_9); -x_34 = lean_alloc_ctor(0, 3, 0); -lean_ctor_set(x_34, 0, x_30); -lean_ctor_set(x_34, 1, x_33); -lean_ctor_set(x_34, 2, x_32); -x_35 = l___private_Init_Lean_Elab_Command_3__setState(x_34, x_2, x_13); -if (lean_obj_tag(x_35) == 0) +x_34 = l_PersistentArray_push___rarg(x_31, x_9); +x_35 = lean_alloc_ctor(0, 4, 0); +lean_ctor_set(x_35, 0, x_30); +lean_ctor_set(x_35, 1, x_34); +lean_ctor_set(x_35, 2, x_32); +lean_ctor_set(x_35, 3, x_33); +x_36 = l___private_Init_Lean_Elab_Command_3__setState(x_35, x_2, x_13); +if (lean_obj_tag(x_36) == 0) { -lean_object* x_36; lean_object* x_37; lean_object* x_38; lean_object* x_39; -x_36 = lean_ctor_get(x_35, 1); -lean_inc(x_36); -if (lean_is_exclusive(x_35)) { - lean_ctor_release(x_35, 0); - lean_ctor_release(x_35, 1); - x_37 = x_35; +lean_object* x_37; lean_object* x_38; lean_object* x_39; lean_object* x_40; +x_37 = lean_ctor_get(x_36, 1); +lean_inc(x_37); +if (lean_is_exclusive(x_36)) { + lean_ctor_release(x_36, 0); + lean_ctor_release(x_36, 1); + x_38 = x_36; } else { - lean_dec_ref(x_35); - x_37 = lean_box(0); + lean_dec_ref(x_36); + x_38 = lean_box(0); } -x_38 = lean_box(0); -if (lean_is_scalar(x_37)) { - x_39 = lean_alloc_ctor(0, 2, 0); +x_39 = lean_box(0); +if (lean_is_scalar(x_38)) { + x_40 = lean_alloc_ctor(0, 2, 0); } else { - x_39 = x_37; + x_40 = x_38; } -lean_ctor_set(x_39, 0, x_38); -lean_ctor_set(x_39, 1, x_36); -return x_39; +lean_ctor_set(x_40, 0, x_39); +lean_ctor_set(x_40, 1, x_37); +return x_40; } else { -lean_object* x_40; lean_object* x_41; lean_object* x_42; lean_object* x_43; -x_40 = lean_ctor_get(x_35, 1); -lean_inc(x_40); -if (lean_is_exclusive(x_35)) { - lean_ctor_release(x_35, 0); - lean_ctor_release(x_35, 1); - x_41 = x_35; +lean_object* x_41; lean_object* x_42; lean_object* x_43; lean_object* x_44; +x_41 = lean_ctor_get(x_36, 1); +lean_inc(x_41); +if (lean_is_exclusive(x_36)) { + lean_ctor_release(x_36, 0); + lean_ctor_release(x_36, 1); + x_42 = x_36; } else { - lean_dec_ref(x_35); - x_41 = lean_box(0); + lean_dec_ref(x_36); + x_42 = lean_box(0); } -x_42 = lean_box(0); -if (lean_is_scalar(x_41)) { - x_43 = lean_alloc_ctor(0, 2, 0); +x_43 = lean_box(0); +if (lean_is_scalar(x_42)) { + x_44 = lean_alloc_ctor(0, 2, 0); } else { - x_43 = x_41; - lean_ctor_set_tag(x_43, 0); + x_44 = x_42; + lean_ctor_set_tag(x_44, 0); } -lean_ctor_set(x_43, 0, x_42); -lean_ctor_set(x_43, 1, x_40); -return x_43; +lean_ctor_set(x_44, 0, x_43); +lean_ctor_set(x_44, 1, x_41); +return x_44; } } } else { -uint8_t x_44; +uint8_t x_45; lean_dec(x_9); lean_dec(x_2); -x_44 = !lean_is_exclusive(x_11); -if (x_44 == 0) +x_45 = !lean_is_exclusive(x_11); +if (x_45 == 0) { -lean_object* x_45; lean_object* x_46; -x_45 = lean_ctor_get(x_11, 0); -lean_dec(x_45); -x_46 = lean_box(0); +lean_object* x_46; lean_object* x_47; +x_46 = lean_ctor_get(x_11, 0); +lean_dec(x_46); +x_47 = lean_box(0); lean_ctor_set_tag(x_11, 0); -lean_ctor_set(x_11, 0, x_46); +lean_ctor_set(x_11, 0, x_47); return x_11; } else { -lean_object* x_47; lean_object* x_48; lean_object* x_49; -x_47 = lean_ctor_get(x_11, 1); -lean_inc(x_47); +lean_object* x_48; lean_object* x_49; lean_object* x_50; +x_48 = lean_ctor_get(x_11, 1); +lean_inc(x_48); lean_dec(x_11); -x_48 = lean_box(0); -x_49 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_49, 0, x_48); -lean_ctor_set(x_49, 1, x_47); -return x_49; +x_49 = lean_box(0); +x_50 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_50, 0, x_49); +lean_ctor_set(x_50, 1, x_48); +return x_50; } } } @@ -5545,88 +5921,91 @@ return x_19; } else { -lean_object* x_20; lean_object* x_21; lean_object* x_22; lean_object* x_23; +lean_object* x_20; lean_object* x_21; lean_object* x_22; lean_object* x_23; lean_object* x_24; x_20 = lean_ctor_get(x_5, 1); x_21 = lean_ctor_get(x_5, 2); +x_22 = lean_ctor_get(x_5, 3); +lean_inc(x_22); lean_inc(x_21); lean_inc(x_20); lean_dec(x_5); -x_22 = lean_alloc_ctor(0, 3, 0); -lean_ctor_set(x_22, 0, x_1); -lean_ctor_set(x_22, 1, x_20); -lean_ctor_set(x_22, 2, x_21); -x_23 = l___private_Init_Lean_Elab_Command_3__setState(x_22, x_2, x_6); -if (lean_obj_tag(x_23) == 0) +x_23 = lean_alloc_ctor(0, 4, 0); +lean_ctor_set(x_23, 0, x_1); +lean_ctor_set(x_23, 1, x_20); +lean_ctor_set(x_23, 2, x_21); +lean_ctor_set(x_23, 3, x_22); +x_24 = l___private_Init_Lean_Elab_Command_3__setState(x_23, x_2, x_6); +if (lean_obj_tag(x_24) == 0) { -lean_object* x_24; lean_object* x_25; lean_object* x_26; lean_object* x_27; -x_24 = lean_ctor_get(x_23, 1); -lean_inc(x_24); -if (lean_is_exclusive(x_23)) { - lean_ctor_release(x_23, 0); - lean_ctor_release(x_23, 1); - x_25 = x_23; +lean_object* x_25; lean_object* x_26; lean_object* x_27; lean_object* x_28; +x_25 = lean_ctor_get(x_24, 1); +lean_inc(x_25); +if (lean_is_exclusive(x_24)) { + lean_ctor_release(x_24, 0); + lean_ctor_release(x_24, 1); + x_26 = x_24; } else { - lean_dec_ref(x_23); - x_25 = lean_box(0); + lean_dec_ref(x_24); + x_26 = lean_box(0); } -x_26 = lean_box(0); -if (lean_is_scalar(x_25)) { - x_27 = lean_alloc_ctor(0, 2, 0); +x_27 = lean_box(0); +if (lean_is_scalar(x_26)) { + x_28 = lean_alloc_ctor(0, 2, 0); } else { - x_27 = x_25; + x_28 = x_26; } -lean_ctor_set(x_27, 0, x_26); -lean_ctor_set(x_27, 1, x_24); -return x_27; +lean_ctor_set(x_28, 0, x_27); +lean_ctor_set(x_28, 1, x_25); +return x_28; } else { -lean_object* x_28; lean_object* x_29; lean_object* x_30; lean_object* x_31; -x_28 = lean_ctor_get(x_23, 0); -lean_inc(x_28); -x_29 = lean_ctor_get(x_23, 1); +lean_object* x_29; lean_object* x_30; lean_object* x_31; lean_object* x_32; +x_29 = lean_ctor_get(x_24, 0); lean_inc(x_29); -if (lean_is_exclusive(x_23)) { - lean_ctor_release(x_23, 0); - lean_ctor_release(x_23, 1); - x_30 = x_23; +x_30 = lean_ctor_get(x_24, 1); +lean_inc(x_30); +if (lean_is_exclusive(x_24)) { + lean_ctor_release(x_24, 0); + lean_ctor_release(x_24, 1); + x_31 = x_24; } else { - lean_dec_ref(x_23); - x_30 = lean_box(0); + lean_dec_ref(x_24); + x_31 = lean_box(0); } -if (lean_is_scalar(x_30)) { - x_31 = lean_alloc_ctor(1, 2, 0); +if (lean_is_scalar(x_31)) { + x_32 = lean_alloc_ctor(1, 2, 0); } else { - x_31 = x_30; + x_32 = x_31; } -lean_ctor_set(x_31, 0, x_28); -lean_ctor_set(x_31, 1, x_29); -return x_31; +lean_ctor_set(x_32, 0, x_29); +lean_ctor_set(x_32, 1, x_30); +return x_32; } } } else { -uint8_t x_32; +uint8_t x_33; lean_dec(x_2); lean_dec(x_1); -x_32 = !lean_is_exclusive(x_4); -if (x_32 == 0) +x_33 = !lean_is_exclusive(x_4); +if (x_33 == 0) { return x_4; } else { -lean_object* x_33; lean_object* x_34; lean_object* x_35; -x_33 = lean_ctor_get(x_4, 0); -x_34 = lean_ctor_get(x_4, 1); +lean_object* x_34; lean_object* x_35; lean_object* x_36; +x_34 = lean_ctor_get(x_4, 0); +x_35 = lean_ctor_get(x_4, 1); +lean_inc(x_35); lean_inc(x_34); -lean_inc(x_33); lean_dec(x_4); -x_35 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_35, 0, x_33); -lean_ctor_set(x_35, 1, x_34); -return x_35; +x_36 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_36, 0, x_34); +lean_ctor_set(x_36, 1, x_35); +return x_36; } } } @@ -5983,292 +6362,344 @@ return x_44; } else { -lean_object* x_45; lean_object* x_46; lean_object* x_47; lean_object* x_48; lean_object* x_49; lean_object* x_50; lean_object* x_51; lean_object* x_52; lean_object* x_53; lean_object* x_54; lean_object* x_55; lean_object* x_56; lean_object* x_57; lean_object* x_58; +lean_object* x_45; lean_object* x_46; lean_object* x_47; lean_object* x_48; lean_object* x_49; lean_object* x_50; lean_object* x_51; lean_object* x_52; lean_object* x_53; lean_object* x_54; lean_object* x_55; lean_object* x_56; lean_object* x_57; lean_object* x_58; lean_object* x_59; x_45 = lean_ctor_get(x_7, 0); x_46 = lean_ctor_get(x_7, 1); x_47 = lean_ctor_get(x_7, 2); +x_48 = lean_ctor_get(x_7, 3); +lean_inc(x_48); lean_inc(x_47); lean_inc(x_46); lean_inc(x_45); lean_dec(x_7); lean_inc(x_3); -x_48 = l_Lean_Environment_registerNamespace___main(x_45, x_3); -x_49 = l_List_head_x21___at___private_Init_Lean_Elab_Command_5__mkTermContext___spec__1(x_47); -x_50 = lean_ctor_get(x_49, 2); -lean_inc(x_50); -x_51 = lean_ctor_get(x_49, 4); +x_49 = l_Lean_Environment_registerNamespace___main(x_45, x_3); +x_50 = l_List_head_x21___at___private_Init_Lean_Elab_Command_5__mkTermContext___spec__1(x_47); +x_51 = lean_ctor_get(x_50, 2); lean_inc(x_51); -x_52 = lean_ctor_get(x_49, 5); +x_52 = lean_ctor_get(x_50, 4); lean_inc(x_52); -x_53 = lean_ctor_get(x_49, 6); +x_53 = lean_ctor_get(x_50, 5); lean_inc(x_53); -if (lean_is_exclusive(x_49)) { - lean_ctor_release(x_49, 0); - lean_ctor_release(x_49, 1); - lean_ctor_release(x_49, 2); - lean_ctor_release(x_49, 3); - lean_ctor_release(x_49, 4); - lean_ctor_release(x_49, 5); - lean_ctor_release(x_49, 6); - x_54 = x_49; +x_54 = lean_ctor_get(x_50, 6); +lean_inc(x_54); +if (lean_is_exclusive(x_50)) { + lean_ctor_release(x_50, 0); + lean_ctor_release(x_50, 1); + lean_ctor_release(x_50, 2); + lean_ctor_release(x_50, 3); + lean_ctor_release(x_50, 4); + lean_ctor_release(x_50, 5); + lean_ctor_release(x_50, 6); + x_55 = x_50; } else { - lean_dec_ref(x_49); - x_54 = lean_box(0); + lean_dec_ref(x_50); + x_55 = lean_box(0); } -if (lean_is_scalar(x_54)) { - x_55 = lean_alloc_ctor(0, 7, 0); +if (lean_is_scalar(x_55)) { + x_56 = lean_alloc_ctor(0, 7, 0); } else { - x_55 = x_54; + x_56 = x_55; } -lean_ctor_set(x_55, 0, x_1); -lean_ctor_set(x_55, 1, x_2); -lean_ctor_set(x_55, 2, x_50); -lean_ctor_set(x_55, 3, x_3); -lean_ctor_set(x_55, 4, x_51); -lean_ctor_set(x_55, 5, x_52); -lean_ctor_set(x_55, 6, x_53); -x_56 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_56, 0, x_55); -lean_ctor_set(x_56, 1, x_47); -x_57 = lean_alloc_ctor(0, 3, 0); -lean_ctor_set(x_57, 0, x_48); -lean_ctor_set(x_57, 1, x_46); -lean_ctor_set(x_57, 2, x_56); -x_58 = l___private_Init_Lean_Elab_Command_3__setState(x_57, x_4, x_8); -if (lean_obj_tag(x_58) == 0) +lean_ctor_set(x_56, 0, x_1); +lean_ctor_set(x_56, 1, x_2); +lean_ctor_set(x_56, 2, x_51); +lean_ctor_set(x_56, 3, x_3); +lean_ctor_set(x_56, 4, x_52); +lean_ctor_set(x_56, 5, x_53); +lean_ctor_set(x_56, 6, x_54); +x_57 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_57, 0, x_56); +lean_ctor_set(x_57, 1, x_47); +x_58 = lean_alloc_ctor(0, 4, 0); +lean_ctor_set(x_58, 0, x_49); +lean_ctor_set(x_58, 1, x_46); +lean_ctor_set(x_58, 2, x_57); +lean_ctor_set(x_58, 3, x_48); +x_59 = l___private_Init_Lean_Elab_Command_3__setState(x_58, x_4, x_8); +if (lean_obj_tag(x_59) == 0) { -lean_object* x_59; lean_object* x_60; lean_object* x_61; lean_object* x_62; -x_59 = lean_ctor_get(x_58, 1); -lean_inc(x_59); -if (lean_is_exclusive(x_58)) { - lean_ctor_release(x_58, 0); - lean_ctor_release(x_58, 1); - x_60 = x_58; +lean_object* x_60; lean_object* x_61; lean_object* x_62; lean_object* x_63; +x_60 = lean_ctor_get(x_59, 1); +lean_inc(x_60); +if (lean_is_exclusive(x_59)) { + lean_ctor_release(x_59, 0); + lean_ctor_release(x_59, 1); + x_61 = x_59; } else { - lean_dec_ref(x_58); - x_60 = lean_box(0); + lean_dec_ref(x_59); + x_61 = lean_box(0); } -x_61 = lean_box(0); -if (lean_is_scalar(x_60)) { - x_62 = lean_alloc_ctor(0, 2, 0); +x_62 = lean_box(0); +if (lean_is_scalar(x_61)) { + x_63 = lean_alloc_ctor(0, 2, 0); } else { - x_62 = x_60; + x_63 = x_61; } -lean_ctor_set(x_62, 0, x_61); -lean_ctor_set(x_62, 1, x_59); -return x_62; +lean_ctor_set(x_63, 0, x_62); +lean_ctor_set(x_63, 1, x_60); +return x_63; } else { -lean_object* x_63; lean_object* x_64; lean_object* x_65; lean_object* x_66; -x_63 = lean_ctor_get(x_58, 0); -lean_inc(x_63); -x_64 = lean_ctor_get(x_58, 1); +lean_object* x_64; lean_object* x_65; lean_object* x_66; lean_object* x_67; +x_64 = lean_ctor_get(x_59, 0); lean_inc(x_64); -if (lean_is_exclusive(x_58)) { - lean_ctor_release(x_58, 0); - lean_ctor_release(x_58, 1); - x_65 = x_58; +x_65 = lean_ctor_get(x_59, 1); +lean_inc(x_65); +if (lean_is_exclusive(x_59)) { + lean_ctor_release(x_59, 0); + lean_ctor_release(x_59, 1); + x_66 = x_59; } else { - lean_dec_ref(x_58); - x_65 = lean_box(0); + lean_dec_ref(x_59); + x_66 = lean_box(0); } -if (lean_is_scalar(x_65)) { - x_66 = lean_alloc_ctor(1, 2, 0); +if (lean_is_scalar(x_66)) { + x_67 = lean_alloc_ctor(1, 2, 0); } else { - x_66 = x_65; + x_67 = x_66; } -lean_ctor_set(x_66, 0, x_63); -lean_ctor_set(x_66, 1, x_64); -return x_66; +lean_ctor_set(x_67, 0, x_64); +lean_ctor_set(x_67, 1, x_65); +return x_67; } } } else { -uint8_t x_67; +uint8_t x_68; lean_dec(x_4); lean_dec(x_3); lean_dec(x_2); lean_dec(x_1); -x_67 = !lean_is_exclusive(x_6); -if (x_67 == 0) +x_68 = !lean_is_exclusive(x_6); +if (x_68 == 0) { return x_6; } else { -lean_object* x_68; lean_object* x_69; lean_object* x_70; -x_68 = lean_ctor_get(x_6, 0); -x_69 = lean_ctor_get(x_6, 1); +lean_object* x_69; lean_object* x_70; lean_object* x_71; +x_69 = lean_ctor_get(x_6, 0); +x_70 = lean_ctor_get(x_6, 1); +lean_inc(x_70); lean_inc(x_69); -lean_inc(x_68); lean_dec(x_6); -x_70 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_70, 0, x_68); -lean_ctor_set(x_70, 1, x_69); -return x_70; +x_71 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_71, 0, x_69); +lean_ctor_set(x_71, 1, x_70); +return x_71; } } } } -lean_object* l___private_Init_Lean_Elab_Command_10__addScopes___main(lean_object* x_1, uint8_t x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) { +lean_object* _init_l___private_Init_Lean_Elab_Command_10__addScopes___main___closed__1() { _start: { -switch (lean_obj_tag(x_3)) { +lean_object* x_1; +x_1 = lean_mk_string("invalid scope"); +return x_1; +} +} +lean_object* _init_l___private_Init_Lean_Elab_Command_10__addScopes___main___closed__2() { +_start: +{ +lean_object* x_1; lean_object* x_2; +x_1 = l___private_Init_Lean_Elab_Command_10__addScopes___main___closed__1; +x_2 = lean_alloc_ctor(2, 1, 0); +lean_ctor_set(x_2, 0, x_1); +return x_2; +} +} +lean_object* _init_l___private_Init_Lean_Elab_Command_10__addScopes___main___closed__3() { +_start: +{ +lean_object* x_1; lean_object* x_2; +x_1 = l___private_Init_Lean_Elab_Command_10__addScopes___main___closed__2; +x_2 = lean_alloc_ctor(0, 1, 0); +lean_ctor_set(x_2, 0, x_1); +return x_2; +} +} +lean_object* l___private_Init_Lean_Elab_Command_10__addScopes___main(lean_object* x_1, lean_object* x_2, uint8_t x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6) { +_start: +{ +switch (lean_obj_tag(x_4)) { case 0: { -lean_object* x_6; lean_object* x_7; -lean_dec(x_4); -lean_dec(x_1); -x_6 = lean_box(0); -x_7 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_7, 0, x_6); -lean_ctor_set(x_7, 1, x_5); -return x_7; +lean_object* x_7; lean_object* x_8; +lean_dec(x_5); +lean_dec(x_2); +x_7 = lean_box(0); +x_8 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_8, 0, x_7); +lean_ctor_set(x_8, 1, x_6); +return x_8; } case 1: { -lean_object* x_8; lean_object* x_9; lean_object* x_10; -x_8 = lean_ctor_get(x_3, 0); -lean_inc(x_8); -x_9 = lean_ctor_get(x_3, 1); +lean_object* x_9; lean_object* x_10; lean_object* x_11; +x_9 = lean_ctor_get(x_4, 0); lean_inc(x_9); -lean_dec(x_3); -lean_inc(x_4); -lean_inc(x_1); -x_10 = l___private_Init_Lean_Elab_Command_10__addScopes___main(x_1, x_2, x_8, x_4, x_5); -if (lean_obj_tag(x_10) == 0) +x_10 = lean_ctor_get(x_4, 1); +lean_inc(x_10); +lean_dec(x_4); +lean_inc(x_5); +lean_inc(x_2); +x_11 = l___private_Init_Lean_Elab_Command_10__addScopes___main(x_1, x_2, x_3, x_9, x_5, x_6); +if (lean_obj_tag(x_11) == 0) { -lean_object* x_11; lean_object* x_12; -x_11 = lean_ctor_get(x_10, 1); -lean_inc(x_11); -lean_dec(x_10); -lean_inc(x_4); -x_12 = l_Lean_Elab_Command_getCurrNamespace(x_4, x_11); -if (lean_obj_tag(x_12) == 0) +lean_object* x_12; lean_object* x_13; +x_12 = lean_ctor_get(x_11, 1); +lean_inc(x_12); +lean_dec(x_11); +lean_inc(x_5); +x_13 = l_Lean_Elab_Command_getCurrNamespace(x_5, x_12); +if (lean_obj_tag(x_13) == 0) { -if (x_2 == 0) +if (x_3 == 0) { -lean_object* x_13; lean_object* x_14; lean_object* x_15; -x_13 = lean_ctor_get(x_12, 0); -lean_inc(x_13); -x_14 = lean_ctor_get(x_12, 1); +lean_object* x_14; lean_object* x_15; lean_object* x_16; +x_14 = lean_ctor_get(x_13, 0); lean_inc(x_14); -lean_dec(x_12); -x_15 = l___private_Init_Lean_Elab_Command_9__addScope(x_1, x_9, x_13, x_4, x_14); -return x_15; +x_15 = lean_ctor_get(x_13, 1); +lean_inc(x_15); +lean_dec(x_13); +x_16 = l___private_Init_Lean_Elab_Command_9__addScope(x_2, x_10, x_14, x_5, x_15); +return x_16; } else { -lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; lean_object* x_20; lean_object* x_21; -x_16 = lean_ctor_get(x_12, 0); -lean_inc(x_16); -x_17 = lean_ctor_get(x_12, 1); +lean_object* x_17; lean_object* x_18; lean_object* x_19; lean_object* x_20; lean_object* x_21; lean_object* x_22; +x_17 = lean_ctor_get(x_13, 0); lean_inc(x_17); -lean_dec(x_12); -x_18 = lean_box(0); -lean_inc(x_9); -x_19 = lean_name_mk_string(x_18, x_9); -x_20 = l_Lean_Name_append___main(x_16, x_19); -lean_dec(x_16); -x_21 = l___private_Init_Lean_Elab_Command_9__addScope(x_1, x_9, x_20, x_4, x_17); -return x_21; +x_18 = lean_ctor_get(x_13, 1); +lean_inc(x_18); +lean_dec(x_13); +x_19 = lean_box(0); +lean_inc(x_10); +x_20 = lean_name_mk_string(x_19, x_10); +x_21 = l_Lean_Name_append___main(x_17, x_20); +lean_dec(x_17); +x_22 = l___private_Init_Lean_Elab_Command_9__addScope(x_2, x_10, x_21, x_5, x_18); +return x_22; } } else { -uint8_t x_22; -lean_dec(x_9); -lean_dec(x_4); -lean_dec(x_1); -x_22 = !lean_is_exclusive(x_12); -if (x_22 == 0) -{ -return x_12; -} -else -{ -lean_object* x_23; lean_object* x_24; lean_object* x_25; -x_23 = lean_ctor_get(x_12, 0); -x_24 = lean_ctor_get(x_12, 1); -lean_inc(x_24); -lean_inc(x_23); -lean_dec(x_12); -x_25 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_25, 0, x_23); -lean_ctor_set(x_25, 1, x_24); -return x_25; -} -} -} -else -{ -uint8_t x_26; -lean_dec(x_9); -lean_dec(x_4); -lean_dec(x_1); -x_26 = !lean_is_exclusive(x_10); -if (x_26 == 0) -{ -return x_10; -} -else -{ -lean_object* x_27; lean_object* x_28; lean_object* x_29; -x_27 = lean_ctor_get(x_10, 0); -x_28 = lean_ctor_get(x_10, 1); -lean_inc(x_28); -lean_inc(x_27); +uint8_t x_23; lean_dec(x_10); -x_29 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_29, 0, x_27); -lean_ctor_set(x_29, 1, x_28); -return x_29; +lean_dec(x_5); +lean_dec(x_2); +x_23 = !lean_is_exclusive(x_13); +if (x_23 == 0) +{ +return x_13; +} +else +{ +lean_object* x_24; lean_object* x_25; lean_object* x_26; +x_24 = lean_ctor_get(x_13, 0); +x_25 = lean_ctor_get(x_13, 1); +lean_inc(x_25); +lean_inc(x_24); +lean_dec(x_13); +x_26 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_26, 0, x_24); +lean_ctor_set(x_26, 1, x_25); +return x_26; +} +} +} +else +{ +uint8_t x_27; +lean_dec(x_10); +lean_dec(x_5); +lean_dec(x_2); +x_27 = !lean_is_exclusive(x_11); +if (x_27 == 0) +{ +return x_11; +} +else +{ +lean_object* x_28; lean_object* x_29; lean_object* x_30; +x_28 = lean_ctor_get(x_11, 0); +x_29 = lean_ctor_get(x_11, 1); +lean_inc(x_29); +lean_inc(x_28); +lean_dec(x_11); +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; } } } default: { -lean_object* x_30; lean_object* x_31; lean_object* x_32; -lean_dec(x_3); -lean_dec(x_1); -x_30 = l_Lean_Elab_Command_runTermElabM___rarg___closed__1; -x_31 = l_unreachable_x21___rarg(x_30); -x_32 = lean_apply_2(x_31, x_4, x_5); +lean_object* x_31; lean_object* x_32; +lean_dec(x_4); +lean_dec(x_2); +x_31 = l___private_Init_Lean_Elab_Command_10__addScopes___main___closed__3; +x_32 = l_Lean_Elab_throwError___at_Lean_Elab_Command_elabCommand___spec__1(x_1, x_31, x_5, x_6); +lean_dec(x_5); return x_32; } } } } -lean_object* l___private_Init_Lean_Elab_Command_10__addScopes___main___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) { +lean_object* l___private_Init_Lean_Elab_Command_10__addScopes___main___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6) { _start: { -uint8_t x_6; lean_object* x_7; -x_6 = lean_unbox(x_2); -lean_dec(x_2); -x_7 = l___private_Init_Lean_Elab_Command_10__addScopes___main(x_1, x_6, x_3, x_4, x_5); +uint8_t x_7; lean_object* x_8; +x_7 = lean_unbox(x_3); +lean_dec(x_3); +x_8 = l___private_Init_Lean_Elab_Command_10__addScopes___main(x_1, x_2, x_7, x_4, x_5, x_6); +lean_dec(x_1); +return x_8; +} +} +lean_object* l___private_Init_Lean_Elab_Command_10__addScopes(lean_object* x_1, lean_object* x_2, uint8_t x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6) { +_start: +{ +lean_object* x_7; +x_7 = l___private_Init_Lean_Elab_Command_10__addScopes___main(x_1, x_2, x_3, x_4, x_5, x_6); return x_7; } } -lean_object* l___private_Init_Lean_Elab_Command_10__addScopes(lean_object* x_1, uint8_t x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) { +lean_object* l___private_Init_Lean_Elab_Command_10__addScopes___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6) { _start: { -lean_object* x_6; -x_6 = l___private_Init_Lean_Elab_Command_10__addScopes___main(x_1, x_2, x_3, x_4, x_5); -return x_6; +uint8_t x_7; lean_object* x_8; +x_7 = lean_unbox(x_3); +lean_dec(x_3); +x_8 = l___private_Init_Lean_Elab_Command_10__addScopes(x_1, x_2, x_7, x_4, x_5, x_6); +lean_dec(x_1); +return x_8; } } -lean_object* l___private_Init_Lean_Elab_Command_10__addScopes___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) { +lean_object* l___private_Init_Lean_Elab_Command_11__addNamespace(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { _start: { -uint8_t x_6; lean_object* x_7; -x_6 = lean_unbox(x_2); -lean_dec(x_2); -x_7 = l___private_Init_Lean_Elab_Command_10__addScopes(x_1, x_6, x_3, x_4, x_5); +lean_object* x_5; uint8_t x_6; lean_object* x_7; +x_5 = l_Lean_Parser_Command_namespace___elambda__1___closed__1; +x_6 = 1; +x_7 = l___private_Init_Lean_Elab_Command_10__addScopes___main(x_1, x_5, x_6, x_2, x_3, x_4); return x_7; } } +lean_object* l___private_Init_Lean_Elab_Command_11__addNamespace___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { +_start: +{ +lean_object* x_5; +x_5 = l___private_Init_Lean_Elab_Command_11__addNamespace(x_1, x_2, x_3, x_4); +lean_dec(x_1); +return x_5; +} +} lean_object* l_Lean_Elab_Command_elabNamespace(lean_object* x_1, lean_object* x_2, lean_object* x_3) { _start: { @@ -6281,7 +6712,7 @@ x_8 = l_Lean_Syntax_getId(x_7); lean_dec(x_7); x_9 = l_Lean_Parser_Command_namespace___elambda__1___closed__1; x_10 = 1; -x_11 = l___private_Init_Lean_Elab_Command_10__addScopes___main(x_9, x_10, x_8, x_2, x_3); +x_11 = l___private_Init_Lean_Elab_Command_10__addScopes___main(x_1, x_9, x_10, x_8, x_2, x_3); return x_11; } } @@ -6391,7 +6822,7 @@ lean_inc(x_19); lean_dec(x_8); x_20 = l_Lean_Parser_Command_section___elambda__1___closed__1; x_21 = 0; -x_22 = l___private_Init_Lean_Elab_Command_10__addScopes___main(x_20, x_21, x_19, x_2, x_3); +x_22 = l___private_Init_Lean_Elab_Command_10__addScopes___main(x_1, x_20, x_21, x_19, x_2, x_3); return x_22; } } @@ -6502,7 +6933,7 @@ return x_14; } } } -uint8_t l___private_Init_Lean_Elab_Command_11__checkAnonymousScope(lean_object* x_1) { +uint8_t l___private_Init_Lean_Elab_Command_12__checkAnonymousScope(lean_object* x_1) { _start: { if (lean_obj_tag(x_1) == 0) @@ -6533,17 +6964,17 @@ return x_8; } } } -lean_object* l___private_Init_Lean_Elab_Command_11__checkAnonymousScope___boxed(lean_object* x_1) { +lean_object* l___private_Init_Lean_Elab_Command_12__checkAnonymousScope___boxed(lean_object* x_1) { _start: { uint8_t x_2; lean_object* x_3; -x_2 = l___private_Init_Lean_Elab_Command_11__checkAnonymousScope(x_1); +x_2 = l___private_Init_Lean_Elab_Command_12__checkAnonymousScope(x_1); lean_dec(x_1); x_3 = lean_box(x_2); return x_3; } } -uint8_t l___private_Init_Lean_Elab_Command_12__checkEndHeader___main(lean_object* x_1, lean_object* x_2) { +uint8_t l___private_Init_Lean_Elab_Command_13__checkEndHeader___main(lean_object* x_1, lean_object* x_2) { _start: { switch (lean_obj_tag(x_1)) { @@ -6593,30 +7024,30 @@ return x_13; } } } -lean_object* l___private_Init_Lean_Elab_Command_12__checkEndHeader___main___boxed(lean_object* x_1, lean_object* x_2) { +lean_object* l___private_Init_Lean_Elab_Command_13__checkEndHeader___main___boxed(lean_object* x_1, lean_object* x_2) { _start: { uint8_t x_3; lean_object* x_4; -x_3 = l___private_Init_Lean_Elab_Command_12__checkEndHeader___main(x_1, x_2); +x_3 = l___private_Init_Lean_Elab_Command_13__checkEndHeader___main(x_1, x_2); lean_dec(x_2); lean_dec(x_1); x_4 = lean_box(x_3); return x_4; } } -uint8_t l___private_Init_Lean_Elab_Command_12__checkEndHeader(lean_object* x_1, lean_object* x_2) { +uint8_t l___private_Init_Lean_Elab_Command_13__checkEndHeader(lean_object* x_1, lean_object* x_2) { _start: { uint8_t x_3; -x_3 = l___private_Init_Lean_Elab_Command_12__checkEndHeader___main(x_1, x_2); +x_3 = l___private_Init_Lean_Elab_Command_13__checkEndHeader___main(x_1, x_2); return x_3; } } -lean_object* l___private_Init_Lean_Elab_Command_12__checkEndHeader___boxed(lean_object* x_1, lean_object* x_2) { +lean_object* l___private_Init_Lean_Elab_Command_13__checkEndHeader___boxed(lean_object* x_1, lean_object* x_2) { _start: { uint8_t x_3; lean_object* x_4; -x_3 = l___private_Init_Lean_Elab_Command_12__checkEndHeader(x_1, x_2); +x_3 = l___private_Init_Lean_Elab_Command_13__checkEndHeader(x_1, x_2); lean_dec(x_2); lean_dec(x_1); x_4 = lean_box(x_3); @@ -6750,38 +7181,38 @@ if (lean_obj_tag(x_9) == 0) { if (lean_obj_tag(x_5) == 0) { -lean_object* x_100; lean_object* x_101; -x_100 = lean_ctor_get(x_5, 0); -lean_inc(x_100); -x_101 = lean_ctor_get(x_5, 1); -lean_inc(x_101); +lean_object* x_102; lean_object* x_103; +x_102 = lean_ctor_get(x_5, 0); +lean_inc(x_102); +x_103 = lean_ctor_get(x_5, 1); +lean_inc(x_103); lean_dec(x_5); x_10 = x_7; -x_11 = x_100; -x_12 = x_101; -goto block_99; +x_11 = x_102; +x_12 = x_103; +goto block_101; } else { -uint8_t x_102; +uint8_t x_104; lean_dec(x_2); -x_102 = !lean_is_exclusive(x_5); -if (x_102 == 0) +x_104 = !lean_is_exclusive(x_5); +if (x_104 == 0) { return x_5; } else { -lean_object* x_103; lean_object* x_104; lean_object* x_105; -x_103 = lean_ctor_get(x_5, 0); -x_104 = lean_ctor_get(x_5, 1); -lean_inc(x_104); -lean_inc(x_103); +lean_object* x_105; lean_object* x_106; lean_object* x_107; +x_105 = lean_ctor_get(x_5, 0); +x_106 = lean_ctor_get(x_5, 1); +lean_inc(x_106); +lean_inc(x_105); lean_dec(x_5); -x_105 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_105, 0, x_103); -lean_ctor_set(x_105, 1, x_104); -return x_105; +x_107 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_107, 0, x_105); +lean_ctor_set(x_107, 1, x_106); +return x_107; } } } @@ -6789,47 +7220,47 @@ else { if (lean_obj_tag(x_5) == 0) { -lean_object* x_106; lean_object* x_107; lean_object* x_108; lean_object* x_109; -x_106 = lean_ctor_get(x_9, 0); -lean_inc(x_106); -x_107 = lean_ctor_get(x_5, 0); -lean_inc(x_107); -x_108 = lean_ctor_get(x_5, 1); +lean_object* x_108; lean_object* x_109; lean_object* x_110; lean_object* x_111; +x_108 = lean_ctor_get(x_9, 0); lean_inc(x_108); +x_109 = lean_ctor_get(x_5, 0); +lean_inc(x_109); +x_110 = lean_ctor_get(x_5, 1); +lean_inc(x_110); lean_dec(x_5); -x_109 = l_Lean_Name_getNumParts___main(x_106); -lean_dec(x_106); -x_10 = x_109; -x_11 = x_107; -x_12 = x_108; -goto block_99; +x_111 = l_Lean_Name_getNumParts___main(x_108); +lean_dec(x_108); +x_10 = x_111; +x_11 = x_109; +x_12 = x_110; +goto block_101; } else { -uint8_t x_110; +uint8_t x_112; lean_dec(x_9); lean_dec(x_2); -x_110 = !lean_is_exclusive(x_5); -if (x_110 == 0) +x_112 = !lean_is_exclusive(x_5); +if (x_112 == 0) { return x_5; } else { -lean_object* x_111; lean_object* x_112; lean_object* x_113; -x_111 = lean_ctor_get(x_5, 0); -x_112 = lean_ctor_get(x_5, 1); -lean_inc(x_112); -lean_inc(x_111); +lean_object* x_113; lean_object* x_114; lean_object* x_115; +x_113 = lean_ctor_get(x_5, 0); +x_114 = lean_ctor_get(x_5, 1); +lean_inc(x_114); +lean_inc(x_113); lean_dec(x_5); -x_113 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_113, 0, x_111); -lean_ctor_set(x_113, 1, x_112); -return x_113; +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; } } } -block_99: +block_101: { lean_object* x_13; lean_object* x_26; lean_object* x_27; uint8_t x_28; x_26 = lean_unsigned_to_nat(0u); @@ -6919,244 +7350,250 @@ return x_48; } else { -lean_object* x_49; lean_object* x_50; lean_object* x_51; lean_object* x_52; lean_object* x_53; lean_object* x_54; lean_object* x_55; lean_object* x_56; +lean_object* x_49; lean_object* x_50; lean_object* x_51; lean_object* x_52; lean_object* x_53; lean_object* x_54; lean_object* x_55; lean_object* x_56; lean_object* x_57; x_49 = lean_ctor_get(x_30, 0); x_50 = lean_ctor_get(x_30, 1); x_51 = lean_ctor_get(x_30, 2); +x_52 = lean_ctor_get(x_30, 3); +lean_inc(x_52); lean_inc(x_51); lean_inc(x_50); lean_inc(x_49); lean_dec(x_30); -x_52 = l_List_lengthAux___main___rarg(x_51, x_26); -x_53 = lean_nat_sub(x_52, x_7); -lean_dec(x_52); -x_54 = l_List_drop___main___rarg(x_53, x_51); +x_53 = l_List_lengthAux___main___rarg(x_51, x_26); +x_54 = lean_nat_sub(x_53, x_7); +lean_dec(x_53); +x_55 = l_List_drop___main___rarg(x_54, x_51); lean_dec(x_51); -x_55 = lean_alloc_ctor(0, 3, 0); -lean_ctor_set(x_55, 0, x_49); -lean_ctor_set(x_55, 1, x_50); -lean_ctor_set(x_55, 2, x_54); +x_56 = lean_alloc_ctor(0, 4, 0); +lean_ctor_set(x_56, 0, x_49); +lean_ctor_set(x_56, 1, x_50); +lean_ctor_set(x_56, 2, x_55); +lean_ctor_set(x_56, 3, x_52); lean_inc(x_2); -x_56 = l___private_Init_Lean_Elab_Command_3__setState(x_55, x_2, x_31); -if (lean_obj_tag(x_56) == 0) +x_57 = l___private_Init_Lean_Elab_Command_3__setState(x_56, x_2, x_31); +if (lean_obj_tag(x_57) == 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, 1); -lean_inc(x_57); -lean_dec(x_56); -x_58 = l_Lean_Elab_Command_elabEnd___closed__9; -x_59 = l_Lean_Elab_throwError___at_Lean_Elab_Command_elabEnd___spec__1(x_1, x_58, x_2, x_57); +lean_object* x_58; lean_object* x_59; lean_object* x_60; lean_object* x_61; lean_object* x_62; lean_object* x_63; lean_object* x_64; +x_58 = lean_ctor_get(x_57, 1); +lean_inc(x_58); +lean_dec(x_57); +x_59 = l_Lean_Elab_Command_elabEnd___closed__9; +x_60 = l_Lean_Elab_throwError___at_Lean_Elab_Command_elabEnd___spec__1(x_1, x_59, x_2, x_58); lean_dec(x_2); -x_60 = lean_ctor_get(x_59, 0); -lean_inc(x_60); -x_61 = lean_ctor_get(x_59, 1); +x_61 = lean_ctor_get(x_60, 0); lean_inc(x_61); -if (lean_is_exclusive(x_59)) { - lean_ctor_release(x_59, 0); - lean_ctor_release(x_59, 1); - x_62 = x_59; +x_62 = lean_ctor_get(x_60, 1); +lean_inc(x_62); +if (lean_is_exclusive(x_60)) { + lean_ctor_release(x_60, 0); + lean_ctor_release(x_60, 1); + x_63 = x_60; } else { - lean_dec_ref(x_59); - x_62 = lean_box(0); + lean_dec_ref(x_60); + x_63 = lean_box(0); } -if (lean_is_scalar(x_62)) { - x_63 = lean_alloc_ctor(1, 2, 0); +if (lean_is_scalar(x_63)) { + x_64 = lean_alloc_ctor(1, 2, 0); } else { - x_63 = x_62; + x_64 = x_63; } -lean_ctor_set(x_63, 0, x_60); -lean_ctor_set(x_63, 1, x_61); -return x_63; +lean_ctor_set(x_64, 0, x_61); +lean_ctor_set(x_64, 1, x_62); +return x_64; } else { -lean_object* x_64; lean_object* x_65; lean_object* x_66; lean_object* x_67; +lean_object* x_65; lean_object* x_66; lean_object* x_67; lean_object* x_68; lean_dec(x_2); -x_64 = lean_ctor_get(x_56, 0); -lean_inc(x_64); -x_65 = lean_ctor_get(x_56, 1); +x_65 = lean_ctor_get(x_57, 0); lean_inc(x_65); -if (lean_is_exclusive(x_56)) { - lean_ctor_release(x_56, 0); - lean_ctor_release(x_56, 1); - x_66 = x_56; +x_66 = lean_ctor_get(x_57, 1); +lean_inc(x_66); +if (lean_is_exclusive(x_57)) { + lean_ctor_release(x_57, 0); + lean_ctor_release(x_57, 1); + x_67 = x_57; } else { - lean_dec_ref(x_56); - x_66 = lean_box(0); + lean_dec_ref(x_57); + x_67 = lean_box(0); } -if (lean_is_scalar(x_66)) { - x_67 = lean_alloc_ctor(1, 2, 0); +if (lean_is_scalar(x_67)) { + x_68 = lean_alloc_ctor(1, 2, 0); } else { - x_67 = x_66; + x_68 = x_67; } -lean_ctor_set(x_67, 0, x_64); -lean_ctor_set(x_67, 1, x_65); -return x_67; +lean_ctor_set(x_68, 0, x_65); +lean_ctor_set(x_68, 1, x_66); +return x_68; } } } else { -uint8_t x_68; +uint8_t x_69; lean_dec(x_2); -x_68 = !lean_is_exclusive(x_29); -if (x_68 == 0) +x_69 = !lean_is_exclusive(x_29); +if (x_69 == 0) { return x_29; } else { -lean_object* x_69; lean_object* x_70; lean_object* x_71; -x_69 = lean_ctor_get(x_29, 0); -x_70 = lean_ctor_get(x_29, 1); +lean_object* x_70; lean_object* x_71; lean_object* x_72; +x_70 = lean_ctor_get(x_29, 0); +x_71 = lean_ctor_get(x_29, 1); +lean_inc(x_71); lean_inc(x_70); -lean_inc(x_69); lean_dec(x_29); -x_71 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_71, 0, x_69); -lean_ctor_set(x_71, 1, x_70); -return x_71; +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; } } } else { -lean_object* x_72; +lean_object* x_73; lean_inc(x_2); -x_72 = l___private_Init_Lean_Elab_Command_2__getState(x_2, x_12); -if (lean_obj_tag(x_72) == 0) +x_73 = l___private_Init_Lean_Elab_Command_2__getState(x_2, x_12); +if (lean_obj_tag(x_73) == 0) { -lean_object* x_73; lean_object* x_74; uint8_t x_75; -x_73 = lean_ctor_get(x_72, 0); -lean_inc(x_73); -x_74 = lean_ctor_get(x_72, 1); +lean_object* x_74; lean_object* x_75; uint8_t x_76; +x_74 = lean_ctor_get(x_73, 0); lean_inc(x_74); -lean_dec(x_72); -x_75 = !lean_is_exclusive(x_73); -if (x_75 == 0) +x_75 = lean_ctor_get(x_73, 1); +lean_inc(x_75); +lean_dec(x_73); +x_76 = !lean_is_exclusive(x_74); +if (x_76 == 0) { -lean_object* x_76; lean_object* x_77; lean_object* x_78; -x_76 = lean_ctor_get(x_73, 2); -x_77 = l_List_drop___main___rarg(x_10, x_76); -lean_dec(x_76); -lean_ctor_set(x_73, 2, x_77); +lean_object* x_77; lean_object* x_78; lean_object* x_79; +x_77 = lean_ctor_get(x_74, 2); +x_78 = l_List_drop___main___rarg(x_10, x_77); +lean_dec(x_77); +lean_ctor_set(x_74, 2, x_78); lean_inc(x_2); -x_78 = l___private_Init_Lean_Elab_Command_3__setState(x_73, x_2, x_74); -if (lean_obj_tag(x_78) == 0) +x_79 = l___private_Init_Lean_Elab_Command_3__setState(x_74, x_2, x_75); +if (lean_obj_tag(x_79) == 0) { -lean_object* x_79; -x_79 = lean_ctor_get(x_78, 1); -lean_inc(x_79); -lean_dec(x_78); -x_13 = x_79; +lean_object* x_80; +x_80 = lean_ctor_get(x_79, 1); +lean_inc(x_80); +lean_dec(x_79); +x_13 = x_80; goto block_25; } else { -uint8_t x_80; +uint8_t x_81; lean_dec(x_11); lean_dec(x_9); lean_dec(x_2); -x_80 = !lean_is_exclusive(x_78); -if (x_80 == 0) +x_81 = !lean_is_exclusive(x_79); +if (x_81 == 0) { -return x_78; +return x_79; } else { -lean_object* x_81; lean_object* x_82; lean_object* x_83; -x_81 = lean_ctor_get(x_78, 0); -x_82 = lean_ctor_get(x_78, 1); +lean_object* x_82; lean_object* x_83; lean_object* x_84; +x_82 = lean_ctor_get(x_79, 0); +x_83 = lean_ctor_get(x_79, 1); +lean_inc(x_83); lean_inc(x_82); -lean_inc(x_81); -lean_dec(x_78); -x_83 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_83, 0, x_81); -lean_ctor_set(x_83, 1, x_82); -return x_83; +lean_dec(x_79); +x_84 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_84, 0, x_82); +lean_ctor_set(x_84, 1, x_83); +return x_84; } } } else { -lean_object* x_84; lean_object* x_85; lean_object* x_86; lean_object* x_87; lean_object* x_88; lean_object* x_89; -x_84 = lean_ctor_get(x_73, 0); -x_85 = lean_ctor_get(x_73, 1); -x_86 = lean_ctor_get(x_73, 2); +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; +x_85 = lean_ctor_get(x_74, 0); +x_86 = lean_ctor_get(x_74, 1); +x_87 = lean_ctor_get(x_74, 2); +x_88 = lean_ctor_get(x_74, 3); +lean_inc(x_88); +lean_inc(x_87); lean_inc(x_86); lean_inc(x_85); -lean_inc(x_84); -lean_dec(x_73); -x_87 = l_List_drop___main___rarg(x_10, x_86); -lean_dec(x_86); -x_88 = lean_alloc_ctor(0, 3, 0); -lean_ctor_set(x_88, 0, x_84); -lean_ctor_set(x_88, 1, x_85); -lean_ctor_set(x_88, 2, x_87); +lean_dec(x_74); +x_89 = l_List_drop___main___rarg(x_10, x_87); +lean_dec(x_87); +x_90 = lean_alloc_ctor(0, 4, 0); +lean_ctor_set(x_90, 0, x_85); +lean_ctor_set(x_90, 1, x_86); +lean_ctor_set(x_90, 2, x_89); +lean_ctor_set(x_90, 3, x_88); lean_inc(x_2); -x_89 = l___private_Init_Lean_Elab_Command_3__setState(x_88, x_2, x_74); -if (lean_obj_tag(x_89) == 0) +x_91 = l___private_Init_Lean_Elab_Command_3__setState(x_90, x_2, x_75); +if (lean_obj_tag(x_91) == 0) { -lean_object* x_90; -x_90 = lean_ctor_get(x_89, 1); -lean_inc(x_90); -lean_dec(x_89); -x_13 = x_90; +lean_object* x_92; +x_92 = lean_ctor_get(x_91, 1); +lean_inc(x_92); +lean_dec(x_91); +x_13 = x_92; goto block_25; } else { -lean_object* x_91; lean_object* x_92; lean_object* x_93; lean_object* x_94; +lean_object* x_93; lean_object* x_94; lean_object* x_95; lean_object* x_96; lean_dec(x_11); lean_dec(x_9); lean_dec(x_2); -x_91 = lean_ctor_get(x_89, 0); -lean_inc(x_91); -x_92 = lean_ctor_get(x_89, 1); -lean_inc(x_92); -if (lean_is_exclusive(x_89)) { - lean_ctor_release(x_89, 0); - lean_ctor_release(x_89, 1); - x_93 = x_89; +x_93 = lean_ctor_get(x_91, 0); +lean_inc(x_93); +x_94 = lean_ctor_get(x_91, 1); +lean_inc(x_94); +if (lean_is_exclusive(x_91)) { + lean_ctor_release(x_91, 0); + lean_ctor_release(x_91, 1); + x_95 = x_91; } else { - lean_dec_ref(x_89); - x_93 = lean_box(0); + lean_dec_ref(x_91); + x_95 = lean_box(0); } -if (lean_is_scalar(x_93)) { - x_94 = lean_alloc_ctor(1, 2, 0); +if (lean_is_scalar(x_95)) { + x_96 = lean_alloc_ctor(1, 2, 0); } else { - x_94 = x_93; + x_96 = x_95; } -lean_ctor_set(x_94, 0, x_91); -lean_ctor_set(x_94, 1, x_92); -return x_94; +lean_ctor_set(x_96, 0, x_93); +lean_ctor_set(x_96, 1, x_94); +return x_96; } } } else { -uint8_t x_95; +uint8_t x_97; lean_dec(x_11); lean_dec(x_10); lean_dec(x_9); lean_dec(x_2); -x_95 = !lean_is_exclusive(x_72); -if (x_95 == 0) +x_97 = !lean_is_exclusive(x_73); +if (x_97 == 0) { -return x_72; +return x_73; } else { -lean_object* x_96; lean_object* x_97; lean_object* x_98; -x_96 = lean_ctor_get(x_72, 0); -x_97 = lean_ctor_get(x_72, 1); -lean_inc(x_97); -lean_inc(x_96); -lean_dec(x_72); -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; +lean_object* x_98; lean_object* x_99; lean_object* x_100; +x_98 = lean_ctor_get(x_73, 0); +x_99 = lean_ctor_get(x_73, 1); +lean_inc(x_99); +lean_inc(x_98); +lean_dec(x_73); +x_100 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_100, 0, x_98); +lean_ctor_set(x_100, 1, x_99); +return x_100; } } } @@ -7165,7 +7602,7 @@ block_25: if (lean_obj_tag(x_9) == 0) { uint8_t x_14; -x_14 = l___private_Init_Lean_Elab_Command_11__checkAnonymousScope(x_11); +x_14 = l___private_Init_Lean_Elab_Command_12__checkAnonymousScope(x_11); lean_dec(x_11); if (x_14 == 0) { @@ -7192,7 +7629,7 @@ lean_object* x_19; uint8_t x_20; x_19 = lean_ctor_get(x_9, 0); lean_inc(x_19); lean_dec(x_9); -x_20 = l___private_Init_Lean_Elab_Command_12__checkEndHeader___main(x_19, x_11); +x_20 = l___private_Init_Lean_Elab_Command_13__checkEndHeader___main(x_19, x_11); lean_dec(x_11); lean_dec(x_19); if (x_20 == 0) @@ -7274,6 +7711,266 @@ x_5 = l_Lean_Elab_Command_addBuiltinCommandElab(x_2, x_3, x_4, x_1); return x_5; } } +lean_object* l_Lean_Elab_Command_withNamespace___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) { +_start: +{ +lean_object* x_6; uint8_t x_7; lean_object* x_8; +x_6 = l_Lean_Parser_Command_namespace___elambda__1___closed__1; +x_7 = 1; +lean_inc(x_4); +lean_inc(x_2); +x_8 = l___private_Init_Lean_Elab_Command_10__addScopes___main(x_1, x_6, x_7, x_2, x_4, x_5); +if (lean_obj_tag(x_8) == 0) +{ +lean_object* x_9; lean_object* x_10; +x_9 = lean_ctor_get(x_8, 1); +lean_inc(x_9); +lean_dec(x_8); +lean_inc(x_4); +x_10 = lean_apply_2(x_3, x_4, x_9); +if (lean_obj_tag(x_10) == 0) +{ +lean_object* x_11; lean_object* x_12; lean_object* x_13; +x_11 = lean_ctor_get(x_10, 0); +lean_inc(x_11); +x_12 = lean_ctor_get(x_10, 1); +lean_inc(x_12); +lean_dec(x_10); +lean_inc(x_4); +x_13 = l___private_Init_Lean_Elab_Command_2__getState(x_4, x_12); +if (lean_obj_tag(x_13) == 0) +{ +lean_object* x_14; lean_object* x_15; uint8_t x_16; +x_14 = lean_ctor_get(x_13, 0); +lean_inc(x_14); +x_15 = lean_ctor_get(x_13, 1); +lean_inc(x_15); +lean_dec(x_13); +x_16 = !lean_is_exclusive(x_14); +if (x_16 == 0) +{ +lean_object* x_17; lean_object* x_18; lean_object* x_19; lean_object* x_20; +x_17 = lean_ctor_get(x_14, 2); +x_18 = l_Lean_Name_getNumParts___main(x_2); +lean_dec(x_2); +x_19 = l_List_drop___main___rarg(x_18, x_17); +lean_dec(x_17); +lean_ctor_set(x_14, 2, x_19); +x_20 = l___private_Init_Lean_Elab_Command_3__setState(x_14, x_4, x_15); +if (lean_obj_tag(x_20) == 0) +{ +uint8_t x_21; +x_21 = !lean_is_exclusive(x_20); +if (x_21 == 0) +{ +lean_object* x_22; +x_22 = lean_ctor_get(x_20, 0); +lean_dec(x_22); +lean_ctor_set(x_20, 0, x_11); +return x_20; +} +else +{ +lean_object* x_23; lean_object* x_24; +x_23 = lean_ctor_get(x_20, 1); +lean_inc(x_23); +lean_dec(x_20); +x_24 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_24, 0, x_11); +lean_ctor_set(x_24, 1, x_23); +return x_24; +} +} +else +{ +uint8_t x_25; +lean_dec(x_11); +x_25 = !lean_is_exclusive(x_20); +if (x_25 == 0) +{ +return x_20; +} +else +{ +lean_object* x_26; lean_object* x_27; lean_object* x_28; +x_26 = lean_ctor_get(x_20, 0); +x_27 = lean_ctor_get(x_20, 1); +lean_inc(x_27); +lean_inc(x_26); +lean_dec(x_20); +x_28 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_28, 0, x_26); +lean_ctor_set(x_28, 1, x_27); +return x_28; +} +} +} +else +{ +lean_object* x_29; lean_object* x_30; lean_object* x_31; lean_object* x_32; lean_object* x_33; lean_object* x_34; lean_object* x_35; lean_object* x_36; +x_29 = lean_ctor_get(x_14, 0); +x_30 = lean_ctor_get(x_14, 1); +x_31 = lean_ctor_get(x_14, 2); +x_32 = lean_ctor_get(x_14, 3); +lean_inc(x_32); +lean_inc(x_31); +lean_inc(x_30); +lean_inc(x_29); +lean_dec(x_14); +x_33 = l_Lean_Name_getNumParts___main(x_2); +lean_dec(x_2); +x_34 = l_List_drop___main___rarg(x_33, x_31); +lean_dec(x_31); +x_35 = lean_alloc_ctor(0, 4, 0); +lean_ctor_set(x_35, 0, x_29); +lean_ctor_set(x_35, 1, x_30); +lean_ctor_set(x_35, 2, x_34); +lean_ctor_set(x_35, 3, x_32); +x_36 = l___private_Init_Lean_Elab_Command_3__setState(x_35, x_4, x_15); +if (lean_obj_tag(x_36) == 0) +{ +lean_object* x_37; lean_object* x_38; lean_object* x_39; +x_37 = lean_ctor_get(x_36, 1); +lean_inc(x_37); +if (lean_is_exclusive(x_36)) { + lean_ctor_release(x_36, 0); + lean_ctor_release(x_36, 1); + x_38 = x_36; +} else { + lean_dec_ref(x_36); + x_38 = lean_box(0); +} +if (lean_is_scalar(x_38)) { + x_39 = lean_alloc_ctor(0, 2, 0); +} else { + x_39 = x_38; +} +lean_ctor_set(x_39, 0, x_11); +lean_ctor_set(x_39, 1, x_37); +return x_39; +} +else +{ +lean_object* x_40; lean_object* x_41; lean_object* x_42; lean_object* x_43; +lean_dec(x_11); +x_40 = lean_ctor_get(x_36, 0); +lean_inc(x_40); +x_41 = lean_ctor_get(x_36, 1); +lean_inc(x_41); +if (lean_is_exclusive(x_36)) { + lean_ctor_release(x_36, 0); + lean_ctor_release(x_36, 1); + x_42 = x_36; +} else { + lean_dec_ref(x_36); + x_42 = lean_box(0); +} +if (lean_is_scalar(x_42)) { + x_43 = lean_alloc_ctor(1, 2, 0); +} else { + x_43 = x_42; +} +lean_ctor_set(x_43, 0, x_40); +lean_ctor_set(x_43, 1, x_41); +return x_43; +} +} +} +else +{ +uint8_t x_44; +lean_dec(x_11); +lean_dec(x_4); +lean_dec(x_2); +x_44 = !lean_is_exclusive(x_13); +if (x_44 == 0) +{ +return x_13; +} +else +{ +lean_object* x_45; lean_object* x_46; lean_object* x_47; +x_45 = lean_ctor_get(x_13, 0); +x_46 = lean_ctor_get(x_13, 1); +lean_inc(x_46); +lean_inc(x_45); +lean_dec(x_13); +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_4); +lean_dec(x_2); +x_48 = !lean_is_exclusive(x_10); +if (x_48 == 0) +{ +return x_10; +} +else +{ +lean_object* x_49; lean_object* x_50; lean_object* x_51; +x_49 = lean_ctor_get(x_10, 0); +x_50 = lean_ctor_get(x_10, 1); +lean_inc(x_50); +lean_inc(x_49); +lean_dec(x_10); +x_51 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_51, 0, x_49); +lean_ctor_set(x_51, 1, x_50); +return x_51; +} +} +} +else +{ +uint8_t x_52; +lean_dec(x_4); +lean_dec(x_3); +lean_dec(x_2); +x_52 = !lean_is_exclusive(x_8); +if (x_52 == 0) +{ +return x_8; +} +else +{ +lean_object* x_53; lean_object* x_54; lean_object* x_55; +x_53 = lean_ctor_get(x_8, 0); +x_54 = lean_ctor_get(x_8, 1); +lean_inc(x_54); +lean_inc(x_53); +lean_dec(x_8); +x_55 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_55, 0, x_53); +lean_ctor_set(x_55, 1, x_54); +return x_55; +} +} +} +} +lean_object* l_Lean_Elab_Command_withNamespace(lean_object* x_1) { +_start: +{ +lean_object* x_2; +x_2 = lean_alloc_closure((void*)(l_Lean_Elab_Command_withNamespace___rarg___boxed), 5, 0); +return x_2; +} +} +lean_object* l_Lean_Elab_Command_withNamespace___rarg___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) { +_start: +{ +lean_object* x_6; +x_6 = l_Lean_Elab_Command_withNamespace___rarg(x_1, x_2, x_3, x_4, x_5); +lean_dec(x_1); +return x_6; +} +} lean_object* _init_l_Lean_Elab_Command_modifyScope___closed__1() { _start: { @@ -7365,310 +8062,316 @@ return x_22; } else { -lean_object* x_23; lean_object* x_24; lean_object* x_25; lean_object* x_26; lean_object* x_27; lean_object* x_28; +lean_object* x_23; lean_object* x_24; lean_object* x_25; lean_object* x_26; lean_object* x_27; lean_object* x_28; lean_object* x_29; x_23 = lean_ctor_get(x_5, 0); x_24 = lean_ctor_get(x_5, 1); +x_25 = lean_ctor_get(x_5, 3); +lean_inc(x_25); lean_inc(x_24); lean_inc(x_23); lean_dec(x_5); -x_25 = l_Lean_Elab_Command_modifyScope___closed__1; -x_26 = l_unreachable_x21___rarg(x_25); -x_27 = lean_alloc_ctor(0, 3, 0); -lean_ctor_set(x_27, 0, x_23); -lean_ctor_set(x_27, 1, x_24); -lean_ctor_set(x_27, 2, x_26); -x_28 = l___private_Init_Lean_Elab_Command_3__setState(x_27, x_2, x_7); -if (lean_obj_tag(x_28) == 0) +x_26 = l_Lean_Elab_Command_modifyScope___closed__1; +x_27 = l_unreachable_x21___rarg(x_26); +x_28 = lean_alloc_ctor(0, 4, 0); +lean_ctor_set(x_28, 0, x_23); +lean_ctor_set(x_28, 1, x_24); +lean_ctor_set(x_28, 2, x_27); +lean_ctor_set(x_28, 3, x_25); +x_29 = l___private_Init_Lean_Elab_Command_3__setState(x_28, x_2, x_7); +if (lean_obj_tag(x_29) == 0) { -lean_object* x_29; lean_object* x_30; lean_object* x_31; lean_object* x_32; -x_29 = lean_ctor_get(x_28, 1); -lean_inc(x_29); -if (lean_is_exclusive(x_28)) { - lean_ctor_release(x_28, 0); - lean_ctor_release(x_28, 1); - x_30 = x_28; +lean_object* x_30; lean_object* x_31; lean_object* x_32; lean_object* x_33; +x_30 = lean_ctor_get(x_29, 1); +lean_inc(x_30); +if (lean_is_exclusive(x_29)) { + lean_ctor_release(x_29, 0); + lean_ctor_release(x_29, 1); + x_31 = x_29; } else { - lean_dec_ref(x_28); - x_30 = lean_box(0); + lean_dec_ref(x_29); + x_31 = lean_box(0); } -x_31 = lean_box(0); -if (lean_is_scalar(x_30)) { - x_32 = lean_alloc_ctor(0, 2, 0); +x_32 = lean_box(0); +if (lean_is_scalar(x_31)) { + x_33 = lean_alloc_ctor(0, 2, 0); } else { - x_32 = x_30; + x_33 = x_31; } -lean_ctor_set(x_32, 0, x_31); -lean_ctor_set(x_32, 1, x_29); -return x_32; +lean_ctor_set(x_33, 0, x_32); +lean_ctor_set(x_33, 1, x_30); +return x_33; } else { -lean_object* x_33; lean_object* x_34; lean_object* x_35; lean_object* x_36; -x_33 = lean_ctor_get(x_28, 0); -lean_inc(x_33); -x_34 = lean_ctor_get(x_28, 1); +lean_object* x_34; lean_object* x_35; lean_object* x_36; lean_object* x_37; +x_34 = lean_ctor_get(x_29, 0); lean_inc(x_34); -if (lean_is_exclusive(x_28)) { - lean_ctor_release(x_28, 0); - lean_ctor_release(x_28, 1); - x_35 = x_28; +x_35 = lean_ctor_get(x_29, 1); +lean_inc(x_35); +if (lean_is_exclusive(x_29)) { + lean_ctor_release(x_29, 0); + lean_ctor_release(x_29, 1); + x_36 = x_29; } else { - lean_dec_ref(x_28); - x_35 = lean_box(0); + lean_dec_ref(x_29); + x_36 = lean_box(0); } -if (lean_is_scalar(x_35)) { - x_36 = lean_alloc_ctor(1, 2, 0); +if (lean_is_scalar(x_36)) { + x_37 = lean_alloc_ctor(1, 2, 0); } else { - x_36 = x_35; + x_37 = x_36; } -lean_ctor_set(x_36, 0, x_33); -lean_ctor_set(x_36, 1, x_34); -return x_36; +lean_ctor_set(x_37, 0, x_34); +lean_ctor_set(x_37, 1, x_35); +return x_37; } } } else { -lean_object* x_37; uint8_t x_38; -x_37 = lean_ctor_get(x_4, 1); -lean_inc(x_37); +lean_object* x_38; uint8_t x_39; +x_38 = lean_ctor_get(x_4, 1); +lean_inc(x_38); lean_dec(x_4); -x_38 = !lean_is_exclusive(x_5); -if (x_38 == 0) +x_39 = !lean_is_exclusive(x_5); +if (x_39 == 0) { -lean_object* x_39; uint8_t x_40; -x_39 = lean_ctor_get(x_5, 2); -lean_dec(x_39); -x_40 = !lean_is_exclusive(x_6); -if (x_40 == 0) +lean_object* x_40; uint8_t x_41; +x_40 = lean_ctor_get(x_5, 2); +lean_dec(x_40); +x_41 = !lean_is_exclusive(x_6); +if (x_41 == 0) { -lean_object* x_41; lean_object* x_42; lean_object* x_43; -x_41 = lean_ctor_get(x_6, 0); -x_42 = lean_apply_1(x_1, x_41); -lean_ctor_set(x_6, 0, x_42); -x_43 = l___private_Init_Lean_Elab_Command_3__setState(x_5, x_2, x_37); -if (lean_obj_tag(x_43) == 0) +lean_object* x_42; lean_object* x_43; lean_object* x_44; +x_42 = lean_ctor_get(x_6, 0); +x_43 = lean_apply_1(x_1, x_42); +lean_ctor_set(x_6, 0, x_43); +x_44 = l___private_Init_Lean_Elab_Command_3__setState(x_5, x_2, x_38); +if (lean_obj_tag(x_44) == 0) { -uint8_t x_44; -x_44 = !lean_is_exclusive(x_43); -if (x_44 == 0) +uint8_t x_45; +x_45 = !lean_is_exclusive(x_44); +if (x_45 == 0) { -lean_object* x_45; lean_object* x_46; -x_45 = lean_ctor_get(x_43, 0); -lean_dec(x_45); -x_46 = lean_box(0); -lean_ctor_set(x_43, 0, x_46); -return x_43; +lean_object* x_46; lean_object* x_47; +x_46 = lean_ctor_get(x_44, 0); +lean_dec(x_46); +x_47 = lean_box(0); +lean_ctor_set(x_44, 0, x_47); +return x_44; } else { -lean_object* x_47; lean_object* x_48; lean_object* x_49; -x_47 = lean_ctor_get(x_43, 1); -lean_inc(x_47); -lean_dec(x_43); -x_48 = lean_box(0); -x_49 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_49, 0, x_48); -lean_ctor_set(x_49, 1, x_47); -return x_49; +lean_object* x_48; lean_object* x_49; lean_object* x_50; +x_48 = lean_ctor_get(x_44, 1); +lean_inc(x_48); +lean_dec(x_44); +x_49 = lean_box(0); +x_50 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_50, 0, x_49); +lean_ctor_set(x_50, 1, x_48); +return x_50; } } else { -uint8_t x_50; -x_50 = !lean_is_exclusive(x_43); -if (x_50 == 0) +uint8_t x_51; +x_51 = !lean_is_exclusive(x_44); +if (x_51 == 0) { -return x_43; +return x_44; } else { -lean_object* x_51; lean_object* x_52; lean_object* x_53; -x_51 = lean_ctor_get(x_43, 0); -x_52 = lean_ctor_get(x_43, 1); +lean_object* x_52; lean_object* x_53; lean_object* x_54; +x_52 = lean_ctor_get(x_44, 0); +x_53 = lean_ctor_get(x_44, 1); +lean_inc(x_53); lean_inc(x_52); -lean_inc(x_51); -lean_dec(x_43); -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; +lean_dec(x_44); +x_54 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_54, 0, x_52); +lean_ctor_set(x_54, 1, x_53); +return x_54; } } } else { -lean_object* x_54; lean_object* x_55; lean_object* x_56; lean_object* x_57; lean_object* x_58; -x_54 = lean_ctor_get(x_6, 0); -x_55 = lean_ctor_get(x_6, 1); +lean_object* x_55; lean_object* x_56; lean_object* x_57; lean_object* x_58; lean_object* x_59; +x_55 = lean_ctor_get(x_6, 0); +x_56 = lean_ctor_get(x_6, 1); +lean_inc(x_56); lean_inc(x_55); -lean_inc(x_54); lean_dec(x_6); -x_56 = lean_apply_1(x_1, x_54); -x_57 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_57, 0, x_56); -lean_ctor_set(x_57, 1, x_55); -lean_ctor_set(x_5, 2, x_57); -x_58 = l___private_Init_Lean_Elab_Command_3__setState(x_5, x_2, x_37); -if (lean_obj_tag(x_58) == 0) +x_57 = lean_apply_1(x_1, x_55); +x_58 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_58, 0, x_57); +lean_ctor_set(x_58, 1, x_56); +lean_ctor_set(x_5, 2, x_58); +x_59 = l___private_Init_Lean_Elab_Command_3__setState(x_5, x_2, x_38); +if (lean_obj_tag(x_59) == 0) { -lean_object* x_59; lean_object* x_60; lean_object* x_61; lean_object* x_62; -x_59 = lean_ctor_get(x_58, 1); -lean_inc(x_59); -if (lean_is_exclusive(x_58)) { - lean_ctor_release(x_58, 0); - lean_ctor_release(x_58, 1); - x_60 = x_58; +lean_object* x_60; lean_object* x_61; lean_object* x_62; lean_object* x_63; +x_60 = lean_ctor_get(x_59, 1); +lean_inc(x_60); +if (lean_is_exclusive(x_59)) { + lean_ctor_release(x_59, 0); + lean_ctor_release(x_59, 1); + x_61 = x_59; } else { - lean_dec_ref(x_58); - x_60 = lean_box(0); + lean_dec_ref(x_59); + x_61 = lean_box(0); } -x_61 = lean_box(0); -if (lean_is_scalar(x_60)) { - x_62 = lean_alloc_ctor(0, 2, 0); +x_62 = lean_box(0); +if (lean_is_scalar(x_61)) { + x_63 = lean_alloc_ctor(0, 2, 0); } else { - x_62 = x_60; + x_63 = x_61; } -lean_ctor_set(x_62, 0, x_61); -lean_ctor_set(x_62, 1, x_59); -return x_62; +lean_ctor_set(x_63, 0, x_62); +lean_ctor_set(x_63, 1, x_60); +return x_63; } else { -lean_object* x_63; lean_object* x_64; lean_object* x_65; lean_object* x_66; -x_63 = lean_ctor_get(x_58, 0); -lean_inc(x_63); -x_64 = lean_ctor_get(x_58, 1); +lean_object* x_64; lean_object* x_65; lean_object* x_66; lean_object* x_67; +x_64 = lean_ctor_get(x_59, 0); lean_inc(x_64); -if (lean_is_exclusive(x_58)) { - lean_ctor_release(x_58, 0); - lean_ctor_release(x_58, 1); - x_65 = x_58; +x_65 = lean_ctor_get(x_59, 1); +lean_inc(x_65); +if (lean_is_exclusive(x_59)) { + lean_ctor_release(x_59, 0); + lean_ctor_release(x_59, 1); + x_66 = x_59; } else { - lean_dec_ref(x_58); - x_65 = lean_box(0); + lean_dec_ref(x_59); + x_66 = lean_box(0); } -if (lean_is_scalar(x_65)) { - x_66 = lean_alloc_ctor(1, 2, 0); +if (lean_is_scalar(x_66)) { + x_67 = lean_alloc_ctor(1, 2, 0); } else { - x_66 = x_65; + x_67 = x_66; } -lean_ctor_set(x_66, 0, x_63); -lean_ctor_set(x_66, 1, x_64); -return x_66; +lean_ctor_set(x_67, 0, x_64); +lean_ctor_set(x_67, 1, x_65); +return x_67; } } } else { -lean_object* x_67; lean_object* x_68; lean_object* x_69; lean_object* x_70; lean_object* x_71; lean_object* x_72; lean_object* x_73; lean_object* x_74; lean_object* x_75; -x_67 = lean_ctor_get(x_5, 0); -x_68 = lean_ctor_get(x_5, 1); -lean_inc(x_68); -lean_inc(x_67); -lean_dec(x_5); -x_69 = lean_ctor_get(x_6, 0); -lean_inc(x_69); -x_70 = lean_ctor_get(x_6, 1); +lean_object* x_68; lean_object* x_69; lean_object* x_70; lean_object* x_71; lean_object* x_72; lean_object* x_73; lean_object* x_74; lean_object* x_75; lean_object* x_76; lean_object* x_77; +x_68 = lean_ctor_get(x_5, 0); +x_69 = lean_ctor_get(x_5, 1); +x_70 = lean_ctor_get(x_5, 3); lean_inc(x_70); +lean_inc(x_69); +lean_inc(x_68); +lean_dec(x_5); +x_71 = lean_ctor_get(x_6, 0); +lean_inc(x_71); +x_72 = lean_ctor_get(x_6, 1); +lean_inc(x_72); if (lean_is_exclusive(x_6)) { lean_ctor_release(x_6, 0); lean_ctor_release(x_6, 1); - x_71 = x_6; + x_73 = x_6; } else { lean_dec_ref(x_6); - x_71 = lean_box(0); + x_73 = lean_box(0); } -x_72 = lean_apply_1(x_1, x_69); -if (lean_is_scalar(x_71)) { - x_73 = lean_alloc_ctor(1, 2, 0); +x_74 = lean_apply_1(x_1, x_71); +if (lean_is_scalar(x_73)) { + x_75 = lean_alloc_ctor(1, 2, 0); } else { - x_73 = x_71; + x_75 = x_73; } -lean_ctor_set(x_73, 0, x_72); -lean_ctor_set(x_73, 1, x_70); -x_74 = lean_alloc_ctor(0, 3, 0); -lean_ctor_set(x_74, 0, x_67); -lean_ctor_set(x_74, 1, x_68); -lean_ctor_set(x_74, 2, x_73); -x_75 = l___private_Init_Lean_Elab_Command_3__setState(x_74, x_2, x_37); -if (lean_obj_tag(x_75) == 0) +lean_ctor_set(x_75, 0, x_74); +lean_ctor_set(x_75, 1, x_72); +x_76 = lean_alloc_ctor(0, 4, 0); +lean_ctor_set(x_76, 0, x_68); +lean_ctor_set(x_76, 1, x_69); +lean_ctor_set(x_76, 2, x_75); +lean_ctor_set(x_76, 3, x_70); +x_77 = l___private_Init_Lean_Elab_Command_3__setState(x_76, x_2, x_38); +if (lean_obj_tag(x_77) == 0) { -lean_object* x_76; lean_object* x_77; lean_object* x_78; lean_object* x_79; -x_76 = lean_ctor_get(x_75, 1); -lean_inc(x_76); -if (lean_is_exclusive(x_75)) { - lean_ctor_release(x_75, 0); - lean_ctor_release(x_75, 1); - x_77 = x_75; -} else { - lean_dec_ref(x_75); - x_77 = lean_box(0); -} -x_78 = lean_box(0); -if (lean_is_scalar(x_77)) { - x_79 = lean_alloc_ctor(0, 2, 0); -} else { +lean_object* x_78; lean_object* x_79; lean_object* x_80; lean_object* x_81; +x_78 = lean_ctor_get(x_77, 1); +lean_inc(x_78); +if (lean_is_exclusive(x_77)) { + lean_ctor_release(x_77, 0); + lean_ctor_release(x_77, 1); x_79 = x_77; +} else { + lean_dec_ref(x_77); + x_79 = lean_box(0); } -lean_ctor_set(x_79, 0, x_78); -lean_ctor_set(x_79, 1, x_76); -return x_79; +x_80 = lean_box(0); +if (lean_is_scalar(x_79)) { + x_81 = lean_alloc_ctor(0, 2, 0); +} else { + x_81 = x_79; +} +lean_ctor_set(x_81, 0, x_80); +lean_ctor_set(x_81, 1, x_78); +return x_81; } else { -lean_object* x_80; lean_object* x_81; lean_object* x_82; lean_object* x_83; -x_80 = lean_ctor_get(x_75, 0); -lean_inc(x_80); -x_81 = lean_ctor_get(x_75, 1); -lean_inc(x_81); -if (lean_is_exclusive(x_75)) { - lean_ctor_release(x_75, 0); - lean_ctor_release(x_75, 1); - x_82 = x_75; +lean_object* x_82; lean_object* x_83; lean_object* x_84; lean_object* x_85; +x_82 = lean_ctor_get(x_77, 0); +lean_inc(x_82); +x_83 = lean_ctor_get(x_77, 1); +lean_inc(x_83); +if (lean_is_exclusive(x_77)) { + lean_ctor_release(x_77, 0); + lean_ctor_release(x_77, 1); + x_84 = x_77; } else { - lean_dec_ref(x_75); - x_82 = lean_box(0); + lean_dec_ref(x_77); + x_84 = lean_box(0); } -if (lean_is_scalar(x_82)) { - x_83 = lean_alloc_ctor(1, 2, 0); +if (lean_is_scalar(x_84)) { + x_85 = lean_alloc_ctor(1, 2, 0); } else { - x_83 = x_82; + x_85 = x_84; } -lean_ctor_set(x_83, 0, x_80); -lean_ctor_set(x_83, 1, x_81); -return x_83; +lean_ctor_set(x_85, 0, x_82); +lean_ctor_set(x_85, 1, x_83); +return x_85; } } } } else { -uint8_t x_84; +uint8_t x_86; lean_dec(x_2); lean_dec(x_1); -x_84 = !lean_is_exclusive(x_4); -if (x_84 == 0) +x_86 = !lean_is_exclusive(x_4); +if (x_86 == 0) { return x_4; } else { -lean_object* x_85; lean_object* x_86; lean_object* x_87; -x_85 = lean_ctor_get(x_4, 0); -x_86 = lean_ctor_get(x_4, 1); -lean_inc(x_86); -lean_inc(x_85); +lean_object* x_87; lean_object* x_88; lean_object* x_89; +x_87 = lean_ctor_get(x_4, 0); +x_88 = lean_ctor_get(x_4, 1); +lean_inc(x_88); +lean_inc(x_87); lean_dec(x_4); -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; +x_89 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_89, 0, x_87); +lean_ctor_set(x_89, 1, x_88); +return x_89; } } } } -lean_object* l_Lean_Elab_Command_getUniverseNames(lean_object* x_1, lean_object* x_2) { +lean_object* l_Lean_Elab_Command_getLevelNames(lean_object* x_1, lean_object* x_2) { _start: { lean_object* x_3; @@ -7728,7 +8431,148 @@ return x_14; } } } -lean_object* l_Lean_Elab_Command_modifyScope___at_Lean_Elab_Command_addUniverse___spec__1(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +lean_object* l_Lean_Elab_throwError___at_Lean_Elab_Command_throwAlreadyDeclaredUniverseLevel___spec__1___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { +_start: +{ +uint8_t x_5; lean_object* x_6; uint8_t x_7; +x_5 = 2; +x_6 = l_Lean_Elab_mkMessage___at_Lean_Elab_Command_elabCommand___spec__2(x_2, x_5, x_1, x_3, x_4); +x_7 = !lean_is_exclusive(x_6); +if (x_7 == 0) +{ +lean_ctor_set_tag(x_6, 1); +return x_6; +} +else +{ +lean_object* x_8; lean_object* x_9; lean_object* x_10; +x_8 = lean_ctor_get(x_6, 0); +x_9 = lean_ctor_get(x_6, 1); +lean_inc(x_9); +lean_inc(x_8); +lean_dec(x_6); +x_10 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_10, 0, x_8); +lean_ctor_set(x_10, 1, x_9); +return x_10; +} +} +} +lean_object* l_Lean_Elab_throwError___at_Lean_Elab_Command_throwAlreadyDeclaredUniverseLevel___spec__1(lean_object* x_1) { +_start: +{ +lean_object* x_2; +x_2 = lean_alloc_closure((void*)(l_Lean_Elab_throwError___at_Lean_Elab_Command_throwAlreadyDeclaredUniverseLevel___spec__1___rarg___boxed), 4, 0); +return x_2; +} +} +lean_object* _init_l_Lean_Elab_Command_throwAlreadyDeclaredUniverseLevel___rarg___closed__1() { +_start: +{ +lean_object* x_1; +x_1 = lean_mk_string("a universe level named '"); +return x_1; +} +} +lean_object* _init_l_Lean_Elab_Command_throwAlreadyDeclaredUniverseLevel___rarg___closed__2() { +_start: +{ +lean_object* x_1; lean_object* x_2; +x_1 = l_Lean_Elab_Command_throwAlreadyDeclaredUniverseLevel___rarg___closed__1; +x_2 = lean_alloc_ctor(2, 1, 0); +lean_ctor_set(x_2, 0, x_1); +return x_2; +} +} +lean_object* _init_l_Lean_Elab_Command_throwAlreadyDeclaredUniverseLevel___rarg___closed__3() { +_start: +{ +lean_object* x_1; lean_object* x_2; +x_1 = l_Lean_Elab_Command_throwAlreadyDeclaredUniverseLevel___rarg___closed__2; +x_2 = lean_alloc_ctor(0, 1, 0); +lean_ctor_set(x_2, 0, x_1); +return x_2; +} +} +lean_object* _init_l_Lean_Elab_Command_throwAlreadyDeclaredUniverseLevel___rarg___closed__4() { +_start: +{ +lean_object* x_1; +x_1 = lean_mk_string("' has already been declared"); +return x_1; +} +} +lean_object* _init_l_Lean_Elab_Command_throwAlreadyDeclaredUniverseLevel___rarg___closed__5() { +_start: +{ +lean_object* x_1; lean_object* x_2; +x_1 = l_Lean_Elab_Command_throwAlreadyDeclaredUniverseLevel___rarg___closed__4; +x_2 = lean_alloc_ctor(2, 1, 0); +lean_ctor_set(x_2, 0, x_1); +return x_2; +} +} +lean_object* _init_l_Lean_Elab_Command_throwAlreadyDeclaredUniverseLevel___rarg___closed__6() { +_start: +{ +lean_object* x_1; lean_object* x_2; +x_1 = l_Lean_Elab_Command_throwAlreadyDeclaredUniverseLevel___rarg___closed__5; +x_2 = lean_alloc_ctor(0, 1, 0); +lean_ctor_set(x_2, 0, x_1); +return x_2; +} +} +lean_object* l_Lean_Elab_Command_throwAlreadyDeclaredUniverseLevel___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { +_start: +{ +lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; +x_5 = l_Lean_Name_toString___closed__1; +x_6 = l_Lean_Name_toStringWithSep___main(x_5, x_2); +x_7 = lean_alloc_ctor(2, 1, 0); +lean_ctor_set(x_7, 0, x_6); +x_8 = lean_alloc_ctor(0, 1, 0); +lean_ctor_set(x_8, 0, x_7); +x_9 = l_Lean_Elab_Command_throwAlreadyDeclaredUniverseLevel___rarg___closed__3; +x_10 = lean_alloc_ctor(8, 2, 0); +lean_ctor_set(x_10, 0, x_9); +lean_ctor_set(x_10, 1, x_8); +x_11 = l_Lean_Elab_Command_throwAlreadyDeclaredUniverseLevel___rarg___closed__6; +x_12 = lean_alloc_ctor(8, 2, 0); +lean_ctor_set(x_12, 0, x_10); +lean_ctor_set(x_12, 1, x_11); +x_13 = l_Lean_Elab_throwError___at_Lean_Elab_Command_throwAlreadyDeclaredUniverseLevel___spec__1___rarg(x_1, x_12, x_3, x_4); +return x_13; +} +} +lean_object* l_Lean_Elab_Command_throwAlreadyDeclaredUniverseLevel(lean_object* x_1) { +_start: +{ +lean_object* x_2; +x_2 = lean_alloc_closure((void*)(l_Lean_Elab_Command_throwAlreadyDeclaredUniverseLevel___rarg___boxed), 4, 0); +return x_2; +} +} +lean_object* l_Lean_Elab_throwError___at_Lean_Elab_Command_throwAlreadyDeclaredUniverseLevel___spec__1___rarg___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { +_start: +{ +lean_object* x_5; +x_5 = l_Lean_Elab_throwError___at_Lean_Elab_Command_throwAlreadyDeclaredUniverseLevel___spec__1___rarg(x_1, x_2, x_3, x_4); +lean_dec(x_3); +lean_dec(x_1); +return x_5; +} +} +lean_object* l_Lean_Elab_Command_throwAlreadyDeclaredUniverseLevel___rarg___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { +_start: +{ +lean_object* x_5; +x_5 = l_Lean_Elab_Command_throwAlreadyDeclaredUniverseLevel___rarg(x_1, x_2, x_3, x_4); +lean_dec(x_3); +lean_dec(x_1); +return x_5; +} +} +lean_object* l_Lean_Elab_Command_modifyScope___at_Lean_Elab_Command_addUnivLevel___spec__1(lean_object* x_1, lean_object* x_2, lean_object* x_3) { _start: { lean_object* x_4; @@ -7809,546 +8653,496 @@ return x_22; } else { -lean_object* x_23; lean_object* x_24; lean_object* x_25; lean_object* x_26; lean_object* x_27; lean_object* x_28; +lean_object* x_23; lean_object* x_24; lean_object* x_25; lean_object* x_26; lean_object* x_27; lean_object* x_28; lean_object* x_29; x_23 = lean_ctor_get(x_5, 0); x_24 = lean_ctor_get(x_5, 1); +x_25 = lean_ctor_get(x_5, 3); +lean_inc(x_25); lean_inc(x_24); lean_inc(x_23); lean_dec(x_5); -x_25 = l_Lean_Elab_Command_modifyScope___closed__1; -x_26 = l_unreachable_x21___rarg(x_25); -x_27 = lean_alloc_ctor(0, 3, 0); -lean_ctor_set(x_27, 0, x_23); -lean_ctor_set(x_27, 1, x_24); -lean_ctor_set(x_27, 2, x_26); -x_28 = l___private_Init_Lean_Elab_Command_3__setState(x_27, x_2, x_7); -if (lean_obj_tag(x_28) == 0) +x_26 = l_Lean_Elab_Command_modifyScope___closed__1; +x_27 = l_unreachable_x21___rarg(x_26); +x_28 = lean_alloc_ctor(0, 4, 0); +lean_ctor_set(x_28, 0, x_23); +lean_ctor_set(x_28, 1, x_24); +lean_ctor_set(x_28, 2, x_27); +lean_ctor_set(x_28, 3, x_25); +x_29 = l___private_Init_Lean_Elab_Command_3__setState(x_28, x_2, x_7); +if (lean_obj_tag(x_29) == 0) { -lean_object* x_29; lean_object* x_30; lean_object* x_31; lean_object* x_32; -x_29 = lean_ctor_get(x_28, 1); -lean_inc(x_29); -if (lean_is_exclusive(x_28)) { - lean_ctor_release(x_28, 0); - lean_ctor_release(x_28, 1); - x_30 = x_28; +lean_object* x_30; lean_object* x_31; lean_object* x_32; lean_object* x_33; +x_30 = lean_ctor_get(x_29, 1); +lean_inc(x_30); +if (lean_is_exclusive(x_29)) { + lean_ctor_release(x_29, 0); + lean_ctor_release(x_29, 1); + x_31 = x_29; } else { - lean_dec_ref(x_28); - x_30 = lean_box(0); + lean_dec_ref(x_29); + x_31 = lean_box(0); } -x_31 = lean_box(0); -if (lean_is_scalar(x_30)) { - x_32 = lean_alloc_ctor(0, 2, 0); +x_32 = lean_box(0); +if (lean_is_scalar(x_31)) { + x_33 = lean_alloc_ctor(0, 2, 0); } else { - x_32 = x_30; + x_33 = x_31; } -lean_ctor_set(x_32, 0, x_31); -lean_ctor_set(x_32, 1, x_29); -return x_32; +lean_ctor_set(x_33, 0, x_32); +lean_ctor_set(x_33, 1, x_30); +return x_33; } else { -lean_object* x_33; lean_object* x_34; lean_object* x_35; lean_object* x_36; -x_33 = lean_ctor_get(x_28, 0); -lean_inc(x_33); -x_34 = lean_ctor_get(x_28, 1); +lean_object* x_34; lean_object* x_35; lean_object* x_36; lean_object* x_37; +x_34 = lean_ctor_get(x_29, 0); lean_inc(x_34); -if (lean_is_exclusive(x_28)) { - lean_ctor_release(x_28, 0); - lean_ctor_release(x_28, 1); - x_35 = x_28; +x_35 = lean_ctor_get(x_29, 1); +lean_inc(x_35); +if (lean_is_exclusive(x_29)) { + lean_ctor_release(x_29, 0); + lean_ctor_release(x_29, 1); + x_36 = x_29; } else { - lean_dec_ref(x_28); - x_35 = lean_box(0); + lean_dec_ref(x_29); + x_36 = lean_box(0); } -if (lean_is_scalar(x_35)) { - x_36 = lean_alloc_ctor(1, 2, 0); +if (lean_is_scalar(x_36)) { + x_37 = lean_alloc_ctor(1, 2, 0); } else { - x_36 = x_35; + x_37 = x_36; } -lean_ctor_set(x_36, 0, x_33); -lean_ctor_set(x_36, 1, x_34); -return x_36; +lean_ctor_set(x_37, 0, x_34); +lean_ctor_set(x_37, 1, x_35); +return x_37; } } } else { -lean_object* x_37; lean_object* x_38; uint8_t x_39; -x_37 = lean_ctor_get(x_6, 0); -lean_inc(x_37); -x_38 = lean_ctor_get(x_4, 1); +lean_object* x_38; lean_object* x_39; uint8_t x_40; +x_38 = lean_ctor_get(x_6, 0); lean_inc(x_38); +x_39 = lean_ctor_get(x_4, 1); +lean_inc(x_39); lean_dec(x_4); -x_39 = !lean_is_exclusive(x_5); -if (x_39 == 0) +x_40 = !lean_is_exclusive(x_5); +if (x_40 == 0) { -lean_object* x_40; uint8_t x_41; -x_40 = lean_ctor_get(x_5, 2); -lean_dec(x_40); -x_41 = !lean_is_exclusive(x_6); -if (x_41 == 0) +lean_object* x_41; uint8_t x_42; +x_41 = lean_ctor_get(x_5, 2); +lean_dec(x_41); +x_42 = !lean_is_exclusive(x_6); +if (x_42 == 0) { -lean_object* x_42; lean_object* x_43; uint8_t x_44; -x_42 = lean_ctor_get(x_6, 1); -x_43 = lean_ctor_get(x_6, 0); -lean_dec(x_43); -x_44 = !lean_is_exclusive(x_37); -if (x_44 == 0) +lean_object* x_43; lean_object* x_44; uint8_t x_45; +x_43 = lean_ctor_get(x_6, 1); +x_44 = lean_ctor_get(x_6, 0); +lean_dec(x_44); +x_45 = !lean_is_exclusive(x_38); +if (x_45 == 0) { -lean_object* x_45; lean_object* x_46; lean_object* x_47; -x_45 = lean_ctor_get(x_37, 5); -lean_ctor_set(x_6, 1, x_45); +lean_object* x_46; lean_object* x_47; lean_object* x_48; +x_46 = lean_ctor_get(x_38, 5); +lean_ctor_set(x_6, 1, x_46); lean_ctor_set(x_6, 0, x_1); -lean_ctor_set(x_37, 5, x_6); -x_46 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_46, 0, x_37); -lean_ctor_set(x_46, 1, x_42); -lean_ctor_set(x_5, 2, x_46); -x_47 = l___private_Init_Lean_Elab_Command_3__setState(x_5, x_2, x_38); -if (lean_obj_tag(x_47) == 0) +lean_ctor_set(x_38, 5, x_6); +x_47 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_47, 0, x_38); +lean_ctor_set(x_47, 1, x_43); +lean_ctor_set(x_5, 2, x_47); +x_48 = l___private_Init_Lean_Elab_Command_3__setState(x_5, x_2, x_39); +if (lean_obj_tag(x_48) == 0) { -uint8_t x_48; -x_48 = !lean_is_exclusive(x_47); -if (x_48 == 0) +uint8_t x_49; +x_49 = !lean_is_exclusive(x_48); +if (x_49 == 0) { -lean_object* x_49; lean_object* x_50; -x_49 = lean_ctor_get(x_47, 0); -lean_dec(x_49); -x_50 = lean_box(0); -lean_ctor_set(x_47, 0, x_50); -return x_47; +lean_object* x_50; lean_object* x_51; +x_50 = lean_ctor_get(x_48, 0); +lean_dec(x_50); +x_51 = lean_box(0); +lean_ctor_set(x_48, 0, x_51); +return x_48; } else { -lean_object* x_51; lean_object* x_52; lean_object* x_53; -x_51 = lean_ctor_get(x_47, 1); -lean_inc(x_51); -lean_dec(x_47); -x_52 = lean_box(0); -x_53 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_53, 0, x_52); -lean_ctor_set(x_53, 1, x_51); -return x_53; +lean_object* x_52; lean_object* x_53; lean_object* x_54; +x_52 = lean_ctor_get(x_48, 1); +lean_inc(x_52); +lean_dec(x_48); +x_53 = lean_box(0); +x_54 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_54, 0, x_53); +lean_ctor_set(x_54, 1, x_52); +return x_54; } } else { -uint8_t x_54; -x_54 = !lean_is_exclusive(x_47); -if (x_54 == 0) +uint8_t x_55; +x_55 = !lean_is_exclusive(x_48); +if (x_55 == 0) { -return x_47; +return x_48; } else { -lean_object* x_55; lean_object* x_56; lean_object* x_57; -x_55 = lean_ctor_get(x_47, 0); -x_56 = lean_ctor_get(x_47, 1); +lean_object* x_56; lean_object* x_57; lean_object* x_58; +x_56 = lean_ctor_get(x_48, 0); +x_57 = lean_ctor_get(x_48, 1); +lean_inc(x_57); lean_inc(x_56); -lean_inc(x_55); -lean_dec(x_47); -x_57 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_57, 0, x_55); -lean_ctor_set(x_57, 1, x_56); -return x_57; +lean_dec(x_48); +x_58 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_58, 0, x_56); +lean_ctor_set(x_58, 1, x_57); +return x_58; } } } else { -lean_object* x_58; lean_object* x_59; lean_object* x_60; lean_object* x_61; lean_object* x_62; lean_object* x_63; lean_object* x_64; lean_object* x_65; lean_object* x_66; lean_object* x_67; -x_58 = lean_ctor_get(x_37, 0); -x_59 = lean_ctor_get(x_37, 1); -x_60 = lean_ctor_get(x_37, 2); -x_61 = lean_ctor_get(x_37, 3); -x_62 = lean_ctor_get(x_37, 4); -x_63 = lean_ctor_get(x_37, 5); -x_64 = lean_ctor_get(x_37, 6); +lean_object* x_59; lean_object* x_60; lean_object* x_61; lean_object* x_62; lean_object* x_63; lean_object* x_64; lean_object* x_65; lean_object* x_66; lean_object* x_67; lean_object* x_68; +x_59 = lean_ctor_get(x_38, 0); +x_60 = lean_ctor_get(x_38, 1); +x_61 = lean_ctor_get(x_38, 2); +x_62 = lean_ctor_get(x_38, 3); +x_63 = lean_ctor_get(x_38, 4); +x_64 = lean_ctor_get(x_38, 5); +x_65 = lean_ctor_get(x_38, 6); +lean_inc(x_65); lean_inc(x_64); lean_inc(x_63); lean_inc(x_62); lean_inc(x_61); lean_inc(x_60); lean_inc(x_59); -lean_inc(x_58); -lean_dec(x_37); -lean_ctor_set(x_6, 1, x_63); +lean_dec(x_38); +lean_ctor_set(x_6, 1, x_64); lean_ctor_set(x_6, 0, x_1); -x_65 = lean_alloc_ctor(0, 7, 0); -lean_ctor_set(x_65, 0, x_58); -lean_ctor_set(x_65, 1, x_59); -lean_ctor_set(x_65, 2, x_60); -lean_ctor_set(x_65, 3, x_61); -lean_ctor_set(x_65, 4, x_62); -lean_ctor_set(x_65, 5, x_6); -lean_ctor_set(x_65, 6, x_64); -x_66 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_66, 0, x_65); -lean_ctor_set(x_66, 1, x_42); -lean_ctor_set(x_5, 2, x_66); -x_67 = l___private_Init_Lean_Elab_Command_3__setState(x_5, x_2, x_38); -if (lean_obj_tag(x_67) == 0) +x_66 = lean_alloc_ctor(0, 7, 0); +lean_ctor_set(x_66, 0, x_59); +lean_ctor_set(x_66, 1, x_60); +lean_ctor_set(x_66, 2, x_61); +lean_ctor_set(x_66, 3, x_62); +lean_ctor_set(x_66, 4, x_63); +lean_ctor_set(x_66, 5, x_6); +lean_ctor_set(x_66, 6, x_65); +x_67 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_67, 0, x_66); +lean_ctor_set(x_67, 1, x_43); +lean_ctor_set(x_5, 2, x_67); +x_68 = l___private_Init_Lean_Elab_Command_3__setState(x_5, x_2, x_39); +if (lean_obj_tag(x_68) == 0) { -lean_object* x_68; lean_object* x_69; lean_object* x_70; lean_object* x_71; -x_68 = lean_ctor_get(x_67, 1); -lean_inc(x_68); -if (lean_is_exclusive(x_67)) { - lean_ctor_release(x_67, 0); - lean_ctor_release(x_67, 1); - x_69 = x_67; +lean_object* x_69; lean_object* x_70; lean_object* x_71; lean_object* x_72; +x_69 = lean_ctor_get(x_68, 1); +lean_inc(x_69); +if (lean_is_exclusive(x_68)) { + lean_ctor_release(x_68, 0); + lean_ctor_release(x_68, 1); + x_70 = x_68; } else { - lean_dec_ref(x_67); - x_69 = lean_box(0); + lean_dec_ref(x_68); + x_70 = lean_box(0); } -x_70 = lean_box(0); -if (lean_is_scalar(x_69)) { - x_71 = lean_alloc_ctor(0, 2, 0); +x_71 = lean_box(0); +if (lean_is_scalar(x_70)) { + x_72 = lean_alloc_ctor(0, 2, 0); } else { - x_71 = x_69; + x_72 = x_70; } -lean_ctor_set(x_71, 0, x_70); -lean_ctor_set(x_71, 1, x_68); -return x_71; +lean_ctor_set(x_72, 0, x_71); +lean_ctor_set(x_72, 1, x_69); +return x_72; } else { -lean_object* x_72; lean_object* x_73; lean_object* x_74; lean_object* x_75; -x_72 = lean_ctor_get(x_67, 0); -lean_inc(x_72); -x_73 = lean_ctor_get(x_67, 1); +lean_object* x_73; lean_object* x_74; lean_object* x_75; lean_object* x_76; +x_73 = lean_ctor_get(x_68, 0); lean_inc(x_73); -if (lean_is_exclusive(x_67)) { - lean_ctor_release(x_67, 0); - lean_ctor_release(x_67, 1); - x_74 = x_67; +x_74 = lean_ctor_get(x_68, 1); +lean_inc(x_74); +if (lean_is_exclusive(x_68)) { + lean_ctor_release(x_68, 0); + lean_ctor_release(x_68, 1); + x_75 = x_68; } else { - lean_dec_ref(x_67); - x_74 = lean_box(0); + lean_dec_ref(x_68); + x_75 = lean_box(0); } -if (lean_is_scalar(x_74)) { - x_75 = lean_alloc_ctor(1, 2, 0); +if (lean_is_scalar(x_75)) { + x_76 = lean_alloc_ctor(1, 2, 0); } else { - x_75 = x_74; + x_76 = x_75; } -lean_ctor_set(x_75, 0, x_72); -lean_ctor_set(x_75, 1, x_73); -return x_75; +lean_ctor_set(x_76, 0, x_73); +lean_ctor_set(x_76, 1, x_74); +return x_76; } } } else { -lean_object* x_76; lean_object* x_77; lean_object* x_78; lean_object* x_79; lean_object* x_80; lean_object* x_81; lean_object* x_82; lean_object* x_83; lean_object* x_84; lean_object* x_85; lean_object* x_86; lean_object* x_87; lean_object* x_88; -x_76 = lean_ctor_get(x_6, 1); -lean_inc(x_76); -lean_dec(x_6); -x_77 = lean_ctor_get(x_37, 0); +lean_object* x_77; lean_object* x_78; lean_object* x_79; lean_object* x_80; lean_object* x_81; lean_object* x_82; lean_object* x_83; lean_object* x_84; lean_object* x_85; lean_object* x_86; lean_object* x_87; lean_object* x_88; lean_object* x_89; +x_77 = lean_ctor_get(x_6, 1); lean_inc(x_77); -x_78 = lean_ctor_get(x_37, 1); +lean_dec(x_6); +x_78 = lean_ctor_get(x_38, 0); lean_inc(x_78); -x_79 = lean_ctor_get(x_37, 2); +x_79 = lean_ctor_get(x_38, 1); lean_inc(x_79); -x_80 = lean_ctor_get(x_37, 3); +x_80 = lean_ctor_get(x_38, 2); lean_inc(x_80); -x_81 = lean_ctor_get(x_37, 4); +x_81 = lean_ctor_get(x_38, 3); lean_inc(x_81); -x_82 = lean_ctor_get(x_37, 5); +x_82 = lean_ctor_get(x_38, 4); lean_inc(x_82); -x_83 = lean_ctor_get(x_37, 6); +x_83 = lean_ctor_get(x_38, 5); lean_inc(x_83); -if (lean_is_exclusive(x_37)) { - lean_ctor_release(x_37, 0); - lean_ctor_release(x_37, 1); - lean_ctor_release(x_37, 2); - lean_ctor_release(x_37, 3); - lean_ctor_release(x_37, 4); - lean_ctor_release(x_37, 5); - lean_ctor_release(x_37, 6); - x_84 = x_37; +x_84 = lean_ctor_get(x_38, 6); +lean_inc(x_84); +if (lean_is_exclusive(x_38)) { + lean_ctor_release(x_38, 0); + lean_ctor_release(x_38, 1); + lean_ctor_release(x_38, 2); + lean_ctor_release(x_38, 3); + lean_ctor_release(x_38, 4); + lean_ctor_release(x_38, 5); + lean_ctor_release(x_38, 6); + x_85 = x_38; } else { - lean_dec_ref(x_37); - x_84 = lean_box(0); + lean_dec_ref(x_38); + x_85 = lean_box(0); } -x_85 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_85, 0, x_1); -lean_ctor_set(x_85, 1, x_82); -if (lean_is_scalar(x_84)) { - x_86 = lean_alloc_ctor(0, 7, 0); +x_86 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_86, 0, x_1); +lean_ctor_set(x_86, 1, x_83); +if (lean_is_scalar(x_85)) { + x_87 = lean_alloc_ctor(0, 7, 0); } else { - x_86 = x_84; + x_87 = x_85; } -lean_ctor_set(x_86, 0, x_77); -lean_ctor_set(x_86, 1, x_78); -lean_ctor_set(x_86, 2, x_79); -lean_ctor_set(x_86, 3, x_80); -lean_ctor_set(x_86, 4, x_81); -lean_ctor_set(x_86, 5, x_85); -lean_ctor_set(x_86, 6, x_83); -x_87 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_87, 0, x_86); -lean_ctor_set(x_87, 1, x_76); -lean_ctor_set(x_5, 2, x_87); -x_88 = l___private_Init_Lean_Elab_Command_3__setState(x_5, x_2, x_38); -if (lean_obj_tag(x_88) == 0) +lean_ctor_set(x_87, 0, x_78); +lean_ctor_set(x_87, 1, x_79); +lean_ctor_set(x_87, 2, x_80); +lean_ctor_set(x_87, 3, x_81); +lean_ctor_set(x_87, 4, x_82); +lean_ctor_set(x_87, 5, x_86); +lean_ctor_set(x_87, 6, x_84); +x_88 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_88, 0, x_87); +lean_ctor_set(x_88, 1, x_77); +lean_ctor_set(x_5, 2, x_88); +x_89 = l___private_Init_Lean_Elab_Command_3__setState(x_5, x_2, x_39); +if (lean_obj_tag(x_89) == 0) { -lean_object* x_89; lean_object* x_90; lean_object* x_91; lean_object* x_92; -x_89 = lean_ctor_get(x_88, 1); -lean_inc(x_89); -if (lean_is_exclusive(x_88)) { - lean_ctor_release(x_88, 0); - lean_ctor_release(x_88, 1); - x_90 = x_88; +lean_object* x_90; lean_object* x_91; lean_object* x_92; lean_object* x_93; +x_90 = lean_ctor_get(x_89, 1); +lean_inc(x_90); +if (lean_is_exclusive(x_89)) { + lean_ctor_release(x_89, 0); + lean_ctor_release(x_89, 1); + x_91 = x_89; } else { - lean_dec_ref(x_88); - x_90 = lean_box(0); + lean_dec_ref(x_89); + x_91 = lean_box(0); } -x_91 = lean_box(0); -if (lean_is_scalar(x_90)) { - x_92 = lean_alloc_ctor(0, 2, 0); +x_92 = lean_box(0); +if (lean_is_scalar(x_91)) { + x_93 = lean_alloc_ctor(0, 2, 0); } else { - x_92 = x_90; + x_93 = x_91; } -lean_ctor_set(x_92, 0, x_91); -lean_ctor_set(x_92, 1, x_89); -return x_92; +lean_ctor_set(x_93, 0, x_92); +lean_ctor_set(x_93, 1, x_90); +return x_93; } else { -lean_object* x_93; lean_object* x_94; lean_object* x_95; lean_object* x_96; -x_93 = lean_ctor_get(x_88, 0); -lean_inc(x_93); -x_94 = lean_ctor_get(x_88, 1); +lean_object* x_94; lean_object* x_95; lean_object* x_96; lean_object* x_97; +x_94 = lean_ctor_get(x_89, 0); lean_inc(x_94); -if (lean_is_exclusive(x_88)) { - lean_ctor_release(x_88, 0); - lean_ctor_release(x_88, 1); - x_95 = x_88; +x_95 = lean_ctor_get(x_89, 1); +lean_inc(x_95); +if (lean_is_exclusive(x_89)) { + lean_ctor_release(x_89, 0); + lean_ctor_release(x_89, 1); + x_96 = x_89; } else { - lean_dec_ref(x_88); - x_95 = lean_box(0); + lean_dec_ref(x_89); + x_96 = lean_box(0); } -if (lean_is_scalar(x_95)) { - x_96 = lean_alloc_ctor(1, 2, 0); +if (lean_is_scalar(x_96)) { + x_97 = lean_alloc_ctor(1, 2, 0); } else { - x_96 = x_95; + x_97 = x_96; } -lean_ctor_set(x_96, 0, x_93); -lean_ctor_set(x_96, 1, x_94); -return x_96; +lean_ctor_set(x_97, 0, x_94); +lean_ctor_set(x_97, 1, x_95); +return x_97; } } } else { -lean_object* x_97; lean_object* x_98; lean_object* x_99; lean_object* x_100; lean_object* x_101; lean_object* x_102; lean_object* x_103; lean_object* x_104; lean_object* x_105; lean_object* x_106; lean_object* x_107; lean_object* x_108; lean_object* x_109; lean_object* x_110; lean_object* x_111; lean_object* x_112; lean_object* x_113; -x_97 = lean_ctor_get(x_5, 0); -x_98 = lean_ctor_get(x_5, 1); -lean_inc(x_98); -lean_inc(x_97); -lean_dec(x_5); -x_99 = lean_ctor_get(x_6, 1); +lean_object* x_98; lean_object* x_99; lean_object* x_100; lean_object* x_101; lean_object* x_102; lean_object* x_103; lean_object* x_104; lean_object* x_105; lean_object* x_106; lean_object* x_107; lean_object* x_108; lean_object* x_109; lean_object* x_110; lean_object* x_111; lean_object* x_112; lean_object* x_113; lean_object* x_114; lean_object* x_115; +x_98 = lean_ctor_get(x_5, 0); +x_99 = lean_ctor_get(x_5, 1); +x_100 = lean_ctor_get(x_5, 3); +lean_inc(x_100); lean_inc(x_99); +lean_inc(x_98); +lean_dec(x_5); +x_101 = lean_ctor_get(x_6, 1); +lean_inc(x_101); if (lean_is_exclusive(x_6)) { lean_ctor_release(x_6, 0); lean_ctor_release(x_6, 1); - x_100 = x_6; + x_102 = x_6; } else { lean_dec_ref(x_6); - x_100 = lean_box(0); + x_102 = lean_box(0); } -x_101 = lean_ctor_get(x_37, 0); -lean_inc(x_101); -x_102 = lean_ctor_get(x_37, 1); -lean_inc(x_102); -x_103 = lean_ctor_get(x_37, 2); +x_103 = lean_ctor_get(x_38, 0); lean_inc(x_103); -x_104 = lean_ctor_get(x_37, 3); +x_104 = lean_ctor_get(x_38, 1); lean_inc(x_104); -x_105 = lean_ctor_get(x_37, 4); +x_105 = lean_ctor_get(x_38, 2); lean_inc(x_105); -x_106 = lean_ctor_get(x_37, 5); +x_106 = lean_ctor_get(x_38, 3); lean_inc(x_106); -x_107 = lean_ctor_get(x_37, 6); +x_107 = lean_ctor_get(x_38, 4); lean_inc(x_107); -if (lean_is_exclusive(x_37)) { - lean_ctor_release(x_37, 0); - lean_ctor_release(x_37, 1); - lean_ctor_release(x_37, 2); - lean_ctor_release(x_37, 3); - lean_ctor_release(x_37, 4); - lean_ctor_release(x_37, 5); - lean_ctor_release(x_37, 6); - x_108 = x_37; +x_108 = lean_ctor_get(x_38, 5); +lean_inc(x_108); +x_109 = lean_ctor_get(x_38, 6); +lean_inc(x_109); +if (lean_is_exclusive(x_38)) { + lean_ctor_release(x_38, 0); + lean_ctor_release(x_38, 1); + lean_ctor_release(x_38, 2); + lean_ctor_release(x_38, 3); + lean_ctor_release(x_38, 4); + lean_ctor_release(x_38, 5); + lean_ctor_release(x_38, 6); + x_110 = x_38; } else { - lean_dec_ref(x_37); - x_108 = lean_box(0); + lean_dec_ref(x_38); + x_110 = lean_box(0); } -if (lean_is_scalar(x_100)) { - x_109 = lean_alloc_ctor(1, 2, 0); +if (lean_is_scalar(x_102)) { + x_111 = lean_alloc_ctor(1, 2, 0); } else { - x_109 = x_100; + x_111 = x_102; } -lean_ctor_set(x_109, 0, x_1); -lean_ctor_set(x_109, 1, x_106); -if (lean_is_scalar(x_108)) { - x_110 = lean_alloc_ctor(0, 7, 0); +lean_ctor_set(x_111, 0, x_1); +lean_ctor_set(x_111, 1, x_108); +if (lean_is_scalar(x_110)) { + x_112 = lean_alloc_ctor(0, 7, 0); } else { - x_110 = x_108; + x_112 = x_110; } -lean_ctor_set(x_110, 0, x_101); -lean_ctor_set(x_110, 1, x_102); -lean_ctor_set(x_110, 2, x_103); -lean_ctor_set(x_110, 3, x_104); -lean_ctor_set(x_110, 4, x_105); -lean_ctor_set(x_110, 5, x_109); -lean_ctor_set(x_110, 6, x_107); -x_111 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_111, 0, x_110); -lean_ctor_set(x_111, 1, x_99); -x_112 = lean_alloc_ctor(0, 3, 0); -lean_ctor_set(x_112, 0, x_97); -lean_ctor_set(x_112, 1, x_98); -lean_ctor_set(x_112, 2, x_111); -x_113 = l___private_Init_Lean_Elab_Command_3__setState(x_112, x_2, x_38); -if (lean_obj_tag(x_113) == 0) +lean_ctor_set(x_112, 0, x_103); +lean_ctor_set(x_112, 1, x_104); +lean_ctor_set(x_112, 2, x_105); +lean_ctor_set(x_112, 3, x_106); +lean_ctor_set(x_112, 4, x_107); +lean_ctor_set(x_112, 5, x_111); +lean_ctor_set(x_112, 6, x_109); +x_113 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_113, 0, x_112); +lean_ctor_set(x_113, 1, x_101); +x_114 = lean_alloc_ctor(0, 4, 0); +lean_ctor_set(x_114, 0, x_98); +lean_ctor_set(x_114, 1, x_99); +lean_ctor_set(x_114, 2, x_113); +lean_ctor_set(x_114, 3, x_100); +x_115 = l___private_Init_Lean_Elab_Command_3__setState(x_114, x_2, x_39); +if (lean_obj_tag(x_115) == 0) { -lean_object* x_114; lean_object* x_115; lean_object* x_116; lean_object* x_117; -x_114 = lean_ctor_get(x_113, 1); -lean_inc(x_114); -if (lean_is_exclusive(x_113)) { - lean_ctor_release(x_113, 0); - lean_ctor_release(x_113, 1); - x_115 = x_113; -} else { - lean_dec_ref(x_113); - x_115 = lean_box(0); -} -x_116 = lean_box(0); -if (lean_is_scalar(x_115)) { - x_117 = lean_alloc_ctor(0, 2, 0); -} else { +lean_object* x_116; lean_object* x_117; lean_object* x_118; lean_object* x_119; +x_116 = lean_ctor_get(x_115, 1); +lean_inc(x_116); +if (lean_is_exclusive(x_115)) { + lean_ctor_release(x_115, 0); + lean_ctor_release(x_115, 1); x_117 = x_115; +} else { + lean_dec_ref(x_115); + x_117 = lean_box(0); } -lean_ctor_set(x_117, 0, x_116); -lean_ctor_set(x_117, 1, x_114); -return x_117; +x_118 = lean_box(0); +if (lean_is_scalar(x_117)) { + x_119 = lean_alloc_ctor(0, 2, 0); +} else { + x_119 = x_117; +} +lean_ctor_set(x_119, 0, x_118); +lean_ctor_set(x_119, 1, x_116); +return x_119; } else { -lean_object* x_118; lean_object* x_119; lean_object* x_120; lean_object* x_121; -x_118 = lean_ctor_get(x_113, 0); -lean_inc(x_118); -x_119 = lean_ctor_get(x_113, 1); -lean_inc(x_119); -if (lean_is_exclusive(x_113)) { - lean_ctor_release(x_113, 0); - lean_ctor_release(x_113, 1); - x_120 = x_113; +lean_object* x_120; lean_object* x_121; lean_object* x_122; lean_object* x_123; +x_120 = lean_ctor_get(x_115, 0); +lean_inc(x_120); +x_121 = lean_ctor_get(x_115, 1); +lean_inc(x_121); +if (lean_is_exclusive(x_115)) { + lean_ctor_release(x_115, 0); + lean_ctor_release(x_115, 1); + x_122 = x_115; } else { - lean_dec_ref(x_113); - x_120 = lean_box(0); + lean_dec_ref(x_115); + x_122 = lean_box(0); } -if (lean_is_scalar(x_120)) { - x_121 = lean_alloc_ctor(1, 2, 0); +if (lean_is_scalar(x_122)) { + x_123 = lean_alloc_ctor(1, 2, 0); } else { - x_121 = x_120; + x_123 = x_122; } -lean_ctor_set(x_121, 0, x_118); -lean_ctor_set(x_121, 1, x_119); -return x_121; +lean_ctor_set(x_123, 0, x_120); +lean_ctor_set(x_123, 1, x_121); +return x_123; } } } } else { -uint8_t x_122; +uint8_t x_124; lean_dec(x_2); lean_dec(x_1); -x_122 = !lean_is_exclusive(x_4); -if (x_122 == 0) +x_124 = !lean_is_exclusive(x_4); +if (x_124 == 0) { return x_4; } else { -lean_object* x_123; lean_object* x_124; lean_object* x_125; -x_123 = lean_ctor_get(x_4, 0); -x_124 = lean_ctor_get(x_4, 1); -lean_inc(x_124); -lean_inc(x_123); +lean_object* x_125; lean_object* x_126; lean_object* x_127; +x_125 = lean_ctor_get(x_4, 0); +x_126 = lean_ctor_get(x_4, 1); +lean_inc(x_126); +lean_inc(x_125); lean_dec(x_4); -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; +x_127 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_127, 0, x_125); +lean_ctor_set(x_127, 1, x_126); +return x_127; } } } } -lean_object* _init_l_Lean_Elab_Command_addUniverse___closed__1() { -_start: -{ -lean_object* x_1; -x_1 = lean_mk_string("a universe named '"); -return x_1; -} -} -lean_object* _init_l_Lean_Elab_Command_addUniverse___closed__2() { -_start: -{ -lean_object* x_1; lean_object* x_2; -x_1 = l_Lean_Elab_Command_addUniverse___closed__1; -x_2 = lean_alloc_ctor(2, 1, 0); -lean_ctor_set(x_2, 0, x_1); -return x_2; -} -} -lean_object* _init_l_Lean_Elab_Command_addUniverse___closed__3() { -_start: -{ -lean_object* x_1; lean_object* x_2; -x_1 = l_Lean_Elab_Command_addUniverse___closed__2; -x_2 = lean_alloc_ctor(0, 1, 0); -lean_ctor_set(x_2, 0, x_1); -return x_2; -} -} -lean_object* _init_l_Lean_Elab_Command_addUniverse___closed__4() { -_start: -{ -lean_object* x_1; -x_1 = lean_mk_string("' has already been declared in this Scope"); -return x_1; -} -} -lean_object* _init_l_Lean_Elab_Command_addUniverse___closed__5() { -_start: -{ -lean_object* x_1; lean_object* x_2; -x_1 = l_Lean_Elab_Command_addUniverse___closed__4; -x_2 = lean_alloc_ctor(2, 1, 0); -lean_ctor_set(x_2, 0, x_1); -return x_2; -} -} -lean_object* _init_l_Lean_Elab_Command_addUniverse___closed__6() { -_start: -{ -lean_object* x_1; lean_object* x_2; -x_1 = l_Lean_Elab_Command_addUniverse___closed__5; -x_2 = lean_alloc_ctor(0, 1, 0); -lean_ctor_set(x_2, 0, x_1); -return x_2; -} -} -lean_object* l_Lean_Elab_Command_addUniverse(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +lean_object* l_Lean_Elab_Command_addUnivLevel(lean_object* x_1, lean_object* x_2, lean_object* x_3) { _start: { lean_object* x_4; lean_object* x_5; x_4 = l_Lean_Syntax_getId(x_1); lean_inc(x_2); -x_5 = l_Lean_Elab_Command_getUniverseNames(x_2, x_3); +x_5 = l_Lean_Elab_Command_getLevelNames(x_2, x_3); if (lean_obj_tag(x_5) == 0) { lean_object* x_6; lean_object* x_7; uint8_t x_8; @@ -8362,62 +9156,48 @@ lean_dec(x_6); if (x_8 == 0) { lean_object* x_9; -x_9 = l_Lean_Elab_Command_modifyScope___at_Lean_Elab_Command_addUniverse___spec__1(x_4, x_2, x_7); +x_9 = l_Lean_Elab_Command_modifyScope___at_Lean_Elab_Command_addUnivLevel___spec__1(x_4, x_2, x_7); return x_9; } else { -lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; -x_10 = l_Lean_Name_toString___closed__1; -x_11 = l_Lean_Name_toStringWithSep___main(x_10, x_4); -x_12 = lean_alloc_ctor(2, 1, 0); -lean_ctor_set(x_12, 0, x_11); -x_13 = lean_alloc_ctor(0, 1, 0); -lean_ctor_set(x_13, 0, x_12); -x_14 = l_Lean_Elab_Command_addUniverse___closed__3; -x_15 = lean_alloc_ctor(8, 2, 0); -lean_ctor_set(x_15, 0, x_14); -lean_ctor_set(x_15, 1, x_13); -x_16 = l_Lean_Elab_Command_addUniverse___closed__6; -x_17 = lean_alloc_ctor(8, 2, 0); -lean_ctor_set(x_17, 0, x_15); -lean_ctor_set(x_17, 1, x_16); -x_18 = l_Lean_Elab_throwError___at_Lean_Elab_Command_elabCommand___spec__1(x_1, x_17, x_2, x_7); +lean_object* x_10; +x_10 = l_Lean_Elab_Command_throwAlreadyDeclaredUniverseLevel___rarg(x_1, x_4, x_2, x_7); lean_dec(x_2); -return x_18; +return x_10; } } else { -uint8_t x_19; +uint8_t x_11; lean_dec(x_4); lean_dec(x_2); -x_19 = !lean_is_exclusive(x_5); -if (x_19 == 0) +x_11 = !lean_is_exclusive(x_5); +if (x_11 == 0) { return x_5; } else { -lean_object* x_20; lean_object* x_21; lean_object* x_22; -x_20 = lean_ctor_get(x_5, 0); -x_21 = lean_ctor_get(x_5, 1); -lean_inc(x_21); -lean_inc(x_20); +lean_object* x_12; lean_object* x_13; lean_object* x_14; +x_12 = lean_ctor_get(x_5, 0); +x_13 = lean_ctor_get(x_5, 1); +lean_inc(x_13); +lean_inc(x_12); lean_dec(x_5); -x_22 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_22, 0, x_20); -lean_ctor_set(x_22, 1, x_21); -return x_22; +x_14 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_14, 0, x_12); +lean_ctor_set(x_14, 1, x_13); +return x_14; } } } } -lean_object* l_Lean_Elab_Command_addUniverse___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +lean_object* l_Lean_Elab_Command_addUnivLevel___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) { _start: { lean_object* x_4; -x_4 = l_Lean_Elab_Command_addUniverse(x_1, x_2, x_3); +x_4 = l_Lean_Elab_Command_addUnivLevel(x_1, x_2, x_3); lean_dec(x_1); return x_4; } @@ -8430,7 +9210,7 @@ x_4 = lean_ctor_get(x_1, 1); x_5 = l_Lean_stxInh; x_6 = lean_unsigned_to_nat(1u); x_7 = lean_array_get(x_5, x_4, x_6); -x_8 = l_Lean_Elab_Command_addUniverse(x_7, x_2, x_3); +x_8 = l_Lean_Elab_Command_addUnivLevel(x_7, x_2, x_3); lean_dec(x_7); return x_8; } @@ -8504,7 +9284,7 @@ lean_object* x_10; lean_object* x_11; lean_dec(x_4); x_10 = lean_array_fget(x_2, x_3); lean_inc(x_5); -x_11 = l_Lean_Elab_Command_addUniverse(x_10, x_5, x_6); +x_11 = l_Lean_Elab_Command_addUnivLevel(x_10, x_5, x_6); lean_dec(x_10); if (lean_obj_tag(x_11) == 0) { @@ -8906,91 +9686,94 @@ return x_26; } else { -lean_object* x_27; lean_object* x_28; lean_object* x_29; lean_object* x_30; lean_object* x_31; lean_object* x_32; +lean_object* x_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_11, 0); x_28 = lean_ctor_get(x_11, 1); x_29 = lean_ctor_get(x_11, 2); +x_30 = lean_ctor_get(x_11, 3); +lean_inc(x_30); lean_inc(x_29); lean_inc(x_28); lean_inc(x_27); lean_dec(x_11); -x_30 = l_PersistentArray_push___rarg(x_28, x_8); -x_31 = lean_alloc_ctor(0, 3, 0); -lean_ctor_set(x_31, 0, x_27); -lean_ctor_set(x_31, 1, x_30); -lean_ctor_set(x_31, 2, x_29); -x_32 = l___private_Init_Lean_Elab_Command_3__setState(x_31, x_4, x_12); -if (lean_obj_tag(x_32) == 0) +x_31 = l_PersistentArray_push___rarg(x_28, x_8); +x_32 = lean_alloc_ctor(0, 4, 0); +lean_ctor_set(x_32, 0, x_27); +lean_ctor_set(x_32, 1, x_31); +lean_ctor_set(x_32, 2, x_29); +lean_ctor_set(x_32, 3, x_30); +x_33 = l___private_Init_Lean_Elab_Command_3__setState(x_32, x_4, x_12); +if (lean_obj_tag(x_33) == 0) { -lean_object* x_33; lean_object* x_34; lean_object* x_35; lean_object* x_36; -x_33 = lean_ctor_get(x_32, 1); -lean_inc(x_33); -if (lean_is_exclusive(x_32)) { - lean_ctor_release(x_32, 0); - lean_ctor_release(x_32, 1); - x_34 = x_32; +lean_object* x_34; lean_object* x_35; lean_object* x_36; lean_object* x_37; +x_34 = lean_ctor_get(x_33, 1); +lean_inc(x_34); +if (lean_is_exclusive(x_33)) { + lean_ctor_release(x_33, 0); + lean_ctor_release(x_33, 1); + x_35 = x_33; } else { - lean_dec_ref(x_32); - x_34 = lean_box(0); + lean_dec_ref(x_33); + x_35 = lean_box(0); } -x_35 = lean_box(0); -if (lean_is_scalar(x_34)) { - x_36 = lean_alloc_ctor(0, 2, 0); +x_36 = lean_box(0); +if (lean_is_scalar(x_35)) { + x_37 = lean_alloc_ctor(0, 2, 0); } else { - x_36 = x_34; + x_37 = x_35; } -lean_ctor_set(x_36, 0, x_35); -lean_ctor_set(x_36, 1, x_33); -return x_36; +lean_ctor_set(x_37, 0, x_36); +lean_ctor_set(x_37, 1, x_34); +return x_37; } else { -lean_object* x_37; lean_object* x_38; lean_object* x_39; lean_object* x_40; -x_37 = lean_ctor_get(x_32, 0); -lean_inc(x_37); -x_38 = lean_ctor_get(x_32, 1); +lean_object* x_38; lean_object* x_39; lean_object* x_40; lean_object* x_41; +x_38 = lean_ctor_get(x_33, 0); lean_inc(x_38); -if (lean_is_exclusive(x_32)) { - lean_ctor_release(x_32, 0); - lean_ctor_release(x_32, 1); - x_39 = x_32; +x_39 = lean_ctor_get(x_33, 1); +lean_inc(x_39); +if (lean_is_exclusive(x_33)) { + lean_ctor_release(x_33, 0); + lean_ctor_release(x_33, 1); + x_40 = x_33; } else { - lean_dec_ref(x_32); - x_39 = lean_box(0); + lean_dec_ref(x_33); + x_40 = lean_box(0); } -if (lean_is_scalar(x_39)) { - x_40 = lean_alloc_ctor(1, 2, 0); +if (lean_is_scalar(x_40)) { + x_41 = lean_alloc_ctor(1, 2, 0); } else { - x_40 = x_39; + x_41 = x_40; } -lean_ctor_set(x_40, 0, x_37); -lean_ctor_set(x_40, 1, x_38); -return x_40; +lean_ctor_set(x_41, 0, x_38); +lean_ctor_set(x_41, 1, x_39); +return x_41; } } } else { -uint8_t x_41; +uint8_t x_42; lean_dec(x_8); lean_dec(x_4); -x_41 = !lean_is_exclusive(x_10); -if (x_41 == 0) +x_42 = !lean_is_exclusive(x_10); +if (x_42 == 0) { return x_10; } else { -lean_object* x_42; lean_object* x_43; lean_object* x_44; -x_42 = lean_ctor_get(x_10, 0); -x_43 = lean_ctor_get(x_10, 1); +lean_object* x_43; lean_object* x_44; lean_object* x_45; +x_43 = lean_ctor_get(x_10, 0); +x_44 = lean_ctor_get(x_10, 1); +lean_inc(x_44); lean_inc(x_43); -lean_inc(x_42); lean_dec(x_10); -x_44 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_44, 0, x_42); -lean_ctor_set(x_44, 1, x_43); -return x_44; +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; } } } @@ -9524,46 +10307,46 @@ lean_inc(x_2); x_12 = l_Lean_Elab_Command_getCurrNamespace(x_2, x_11); if (lean_obj_tag(x_12) == 0) { -lean_object* x_13; lean_object* x_14; lean_object* x_15; uint8_t x_71; +lean_object* x_13; lean_object* x_14; lean_object* x_15; uint8_t x_72; x_13 = lean_ctor_get(x_12, 0); lean_inc(x_13); x_14 = lean_ctor_get(x_12, 1); lean_inc(x_14); lean_dec(x_12); -x_71 = lean_name_eq(x_10, x_13); -if (x_71 == 0) +x_72 = lean_name_eq(x_10, x_13); +if (x_72 == 0) { x_15 = x_14; -goto block_70; +goto block_71; } else { -lean_object* x_72; lean_object* x_73; uint8_t x_74; +lean_object* x_73; lean_object* x_74; uint8_t x_75; lean_dec(x_13); lean_dec(x_10); -x_72 = l_Lean_Elab_Command_elabExport___closed__3; -x_73 = l_Lean_Elab_throwError___at_Lean_Elab_Command_elabCommand___spec__1(x_1, x_72, x_2, x_14); +x_73 = l_Lean_Elab_Command_elabExport___closed__3; +x_74 = l_Lean_Elab_throwError___at_Lean_Elab_Command_elabCommand___spec__1(x_1, x_73, x_2, x_14); lean_dec(x_2); -x_74 = !lean_is_exclusive(x_73); -if (x_74 == 0) +x_75 = !lean_is_exclusive(x_74); +if (x_75 == 0) { -return x_73; +return x_74; } else { -lean_object* x_75; lean_object* x_76; lean_object* x_77; -x_75 = lean_ctor_get(x_73, 0); -x_76 = lean_ctor_get(x_73, 1); +lean_object* x_76; lean_object* x_77; lean_object* x_78; +x_76 = lean_ctor_get(x_74, 0); +x_77 = lean_ctor_get(x_74, 1); +lean_inc(x_77); lean_inc(x_76); -lean_inc(x_75); -lean_dec(x_73); -x_77 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_77, 0, x_75); -lean_ctor_set(x_77, 1, x_76); -return x_77; +lean_dec(x_74); +x_78 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_78, 0, x_76); +lean_ctor_set(x_78, 1, x_77); +return x_78; } } -block_70: +block_71: { lean_object* x_16; lean_inc(x_2); @@ -9664,191 +10447,194 @@ return x_43; } else { -lean_object* x_44; lean_object* x_45; lean_object* x_46; lean_object* x_47; lean_object* x_48; lean_object* x_49; +lean_object* x_44; lean_object* x_45; lean_object* x_46; lean_object* x_47; lean_object* x_48; lean_object* x_49; lean_object* x_50; x_44 = lean_ctor_get(x_28, 0); x_45 = lean_ctor_get(x_28, 1); x_46 = lean_ctor_get(x_28, 2); +x_47 = lean_ctor_get(x_28, 3); +lean_inc(x_47); lean_inc(x_46); lean_inc(x_45); lean_inc(x_44); lean_dec(x_28); -x_47 = l_List_foldl___main___at_Lean_Elab_Command_elabExport___spec__2(x_44, x_25); -x_48 = lean_alloc_ctor(0, 3, 0); -lean_ctor_set(x_48, 0, x_47); -lean_ctor_set(x_48, 1, x_45); -lean_ctor_set(x_48, 2, x_46); -x_49 = l___private_Init_Lean_Elab_Command_3__setState(x_48, x_2, x_29); -if (lean_obj_tag(x_49) == 0) +x_48 = l_List_foldl___main___at_Lean_Elab_Command_elabExport___spec__2(x_44, x_25); +x_49 = lean_alloc_ctor(0, 4, 0); +lean_ctor_set(x_49, 0, x_48); +lean_ctor_set(x_49, 1, x_45); +lean_ctor_set(x_49, 2, x_46); +lean_ctor_set(x_49, 3, x_47); +x_50 = l___private_Init_Lean_Elab_Command_3__setState(x_49, x_2, x_29); +if (lean_obj_tag(x_50) == 0) { -lean_object* x_50; lean_object* x_51; lean_object* x_52; lean_object* x_53; -x_50 = lean_ctor_get(x_49, 1); -lean_inc(x_50); -if (lean_is_exclusive(x_49)) { - lean_ctor_release(x_49, 0); - lean_ctor_release(x_49, 1); - x_51 = x_49; +lean_object* x_51; lean_object* x_52; lean_object* x_53; lean_object* x_54; +x_51 = lean_ctor_get(x_50, 1); +lean_inc(x_51); +if (lean_is_exclusive(x_50)) { + lean_ctor_release(x_50, 0); + lean_ctor_release(x_50, 1); + x_52 = x_50; } else { - lean_dec_ref(x_49); - x_51 = lean_box(0); + lean_dec_ref(x_50); + x_52 = lean_box(0); } -x_52 = lean_box(0); -if (lean_is_scalar(x_51)) { - x_53 = lean_alloc_ctor(0, 2, 0); +x_53 = lean_box(0); +if (lean_is_scalar(x_52)) { + x_54 = lean_alloc_ctor(0, 2, 0); } else { - x_53 = x_51; + x_54 = x_52; } -lean_ctor_set(x_53, 0, x_52); -lean_ctor_set(x_53, 1, x_50); -return x_53; +lean_ctor_set(x_54, 0, x_53); +lean_ctor_set(x_54, 1, x_51); +return x_54; } else { -lean_object* x_54; lean_object* x_55; lean_object* x_56; lean_object* x_57; -x_54 = lean_ctor_get(x_49, 0); -lean_inc(x_54); -x_55 = lean_ctor_get(x_49, 1); +lean_object* x_55; lean_object* x_56; lean_object* x_57; lean_object* x_58; +x_55 = lean_ctor_get(x_50, 0); lean_inc(x_55); -if (lean_is_exclusive(x_49)) { - lean_ctor_release(x_49, 0); - lean_ctor_release(x_49, 1); - x_56 = x_49; +x_56 = lean_ctor_get(x_50, 1); +lean_inc(x_56); +if (lean_is_exclusive(x_50)) { + lean_ctor_release(x_50, 0); + lean_ctor_release(x_50, 1); + x_57 = x_50; } else { - lean_dec_ref(x_49); - x_56 = lean_box(0); + lean_dec_ref(x_50); + x_57 = lean_box(0); } -if (lean_is_scalar(x_56)) { - x_57 = lean_alloc_ctor(1, 2, 0); +if (lean_is_scalar(x_57)) { + x_58 = lean_alloc_ctor(1, 2, 0); } else { - x_57 = x_56; + x_58 = x_57; } -lean_ctor_set(x_57, 0, x_54); -lean_ctor_set(x_57, 1, x_55); -return x_57; +lean_ctor_set(x_58, 0, x_55); +lean_ctor_set(x_58, 1, x_56); +return x_58; } } } else { -uint8_t x_58; +uint8_t x_59; lean_dec(x_25); lean_dec(x_2); -x_58 = !lean_is_exclusive(x_27); -if (x_58 == 0) +x_59 = !lean_is_exclusive(x_27); +if (x_59 == 0) { return x_27; } else { -lean_object* x_59; lean_object* x_60; lean_object* x_61; -x_59 = lean_ctor_get(x_27, 0); -x_60 = lean_ctor_get(x_27, 1); +lean_object* x_60; lean_object* x_61; lean_object* x_62; +x_60 = lean_ctor_get(x_27, 0); +x_61 = lean_ctor_get(x_27, 1); +lean_inc(x_61); lean_inc(x_60); -lean_inc(x_59); lean_dec(x_27); -x_61 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_61, 0, x_59); -lean_ctor_set(x_61, 1, x_60); -return x_61; +x_62 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_62, 0, x_60); +lean_ctor_set(x_62, 1, x_61); +return x_62; } } } else { -uint8_t x_62; +uint8_t x_63; lean_dec(x_2); -x_62 = !lean_is_exclusive(x_24); -if (x_62 == 0) +x_63 = !lean_is_exclusive(x_24); +if (x_63 == 0) { return x_24; } else { -lean_object* x_63; lean_object* x_64; lean_object* x_65; -x_63 = lean_ctor_get(x_24, 0); -x_64 = lean_ctor_get(x_24, 1); +lean_object* x_64; lean_object* x_65; lean_object* x_66; +x_64 = lean_ctor_get(x_24, 0); +x_65 = lean_ctor_get(x_24, 1); +lean_inc(x_65); lean_inc(x_64); -lean_inc(x_63); lean_dec(x_24); -x_65 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_65, 0, x_63); -lean_ctor_set(x_65, 1, x_64); -return x_65; +x_66 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_66, 0, x_64); +lean_ctor_set(x_66, 1, x_65); +return x_66; } } } else { -uint8_t x_66; +uint8_t x_67; lean_dec(x_13); lean_dec(x_10); lean_dec(x_2); -x_66 = !lean_is_exclusive(x_16); -if (x_66 == 0) +x_67 = !lean_is_exclusive(x_16); +if (x_67 == 0) { return x_16; } else { -lean_object* x_67; lean_object* x_68; lean_object* x_69; -x_67 = lean_ctor_get(x_16, 0); -x_68 = lean_ctor_get(x_16, 1); +lean_object* x_68; lean_object* x_69; lean_object* x_70; +x_68 = lean_ctor_get(x_16, 0); +x_69 = lean_ctor_get(x_16, 1); +lean_inc(x_69); lean_inc(x_68); -lean_inc(x_67); lean_dec(x_16); -x_69 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_69, 0, x_67); -lean_ctor_set(x_69, 1, x_68); -return x_69; +x_70 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_70, 0, x_68); +lean_ctor_set(x_70, 1, x_69); +return x_70; } } } } else { -uint8_t x_78; +uint8_t x_79; lean_dec(x_10); lean_dec(x_2); -x_78 = !lean_is_exclusive(x_12); -if (x_78 == 0) +x_79 = !lean_is_exclusive(x_12); +if (x_79 == 0) { return x_12; } else { -lean_object* x_79; lean_object* x_80; lean_object* x_81; -x_79 = lean_ctor_get(x_12, 0); -x_80 = lean_ctor_get(x_12, 1); +lean_object* x_80; lean_object* x_81; lean_object* x_82; +x_80 = lean_ctor_get(x_12, 0); +x_81 = lean_ctor_get(x_12, 1); +lean_inc(x_81); lean_inc(x_80); -lean_inc(x_79); lean_dec(x_12); -x_81 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_81, 0, x_79); -lean_ctor_set(x_81, 1, x_80); -return x_81; +x_82 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_82, 0, x_80); +lean_ctor_set(x_82, 1, x_81); +return x_82; } } } else { -uint8_t x_82; +uint8_t x_83; lean_dec(x_2); -x_82 = !lean_is_exclusive(x_9); -if (x_82 == 0) +x_83 = !lean_is_exclusive(x_9); +if (x_83 == 0) { return x_9; } else { -lean_object* x_83; lean_object* x_84; lean_object* x_85; -x_83 = lean_ctor_get(x_9, 0); -x_84 = lean_ctor_get(x_9, 1); +lean_object* x_84; lean_object* x_85; lean_object* x_86; +x_84 = lean_ctor_get(x_9, 0); +x_85 = lean_ctor_get(x_9, 1); +lean_inc(x_85); lean_inc(x_84); -lean_inc(x_83); lean_dec(x_9); -x_85 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_85, 0, x_83); -lean_ctor_set(x_85, 1, x_84); -return x_85; +x_86 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_86, 0, x_84); +lean_ctor_set(x_86, 1, x_85); +return x_86; } } } @@ -9992,479 +10778,485 @@ return x_22; } else { -lean_object* x_23; lean_object* x_24; lean_object* x_25; lean_object* x_26; lean_object* x_27; lean_object* x_28; +lean_object* x_23; lean_object* x_24; lean_object* x_25; lean_object* x_26; lean_object* x_27; lean_object* x_28; lean_object* x_29; x_23 = lean_ctor_get(x_5, 0); x_24 = lean_ctor_get(x_5, 1); +x_25 = lean_ctor_get(x_5, 3); +lean_inc(x_25); lean_inc(x_24); lean_inc(x_23); lean_dec(x_5); -x_25 = l_Lean_Elab_Command_modifyScope___closed__1; -x_26 = l_unreachable_x21___rarg(x_25); -x_27 = lean_alloc_ctor(0, 3, 0); -lean_ctor_set(x_27, 0, x_23); -lean_ctor_set(x_27, 1, x_24); -lean_ctor_set(x_27, 2, x_26); -x_28 = l___private_Init_Lean_Elab_Command_3__setState(x_27, x_2, x_7); -if (lean_obj_tag(x_28) == 0) +x_26 = l_Lean_Elab_Command_modifyScope___closed__1; +x_27 = l_unreachable_x21___rarg(x_26); +x_28 = lean_alloc_ctor(0, 4, 0); +lean_ctor_set(x_28, 0, x_23); +lean_ctor_set(x_28, 1, x_24); +lean_ctor_set(x_28, 2, x_27); +lean_ctor_set(x_28, 3, x_25); +x_29 = l___private_Init_Lean_Elab_Command_3__setState(x_28, x_2, x_7); +if (lean_obj_tag(x_29) == 0) { -lean_object* x_29; lean_object* x_30; lean_object* x_31; lean_object* x_32; -x_29 = lean_ctor_get(x_28, 1); -lean_inc(x_29); -if (lean_is_exclusive(x_28)) { - lean_ctor_release(x_28, 0); - lean_ctor_release(x_28, 1); - x_30 = x_28; +lean_object* x_30; lean_object* x_31; lean_object* x_32; lean_object* x_33; +x_30 = lean_ctor_get(x_29, 1); +lean_inc(x_30); +if (lean_is_exclusive(x_29)) { + lean_ctor_release(x_29, 0); + lean_ctor_release(x_29, 1); + x_31 = x_29; } else { - lean_dec_ref(x_28); - x_30 = lean_box(0); + lean_dec_ref(x_29); + x_31 = lean_box(0); } -x_31 = lean_box(0); -if (lean_is_scalar(x_30)) { - x_32 = lean_alloc_ctor(0, 2, 0); +x_32 = lean_box(0); +if (lean_is_scalar(x_31)) { + x_33 = lean_alloc_ctor(0, 2, 0); } else { - x_32 = x_30; + x_33 = x_31; } -lean_ctor_set(x_32, 0, x_31); -lean_ctor_set(x_32, 1, x_29); -return x_32; +lean_ctor_set(x_33, 0, x_32); +lean_ctor_set(x_33, 1, x_30); +return x_33; } else { -lean_object* x_33; lean_object* x_34; lean_object* x_35; lean_object* x_36; -x_33 = lean_ctor_get(x_28, 0); -lean_inc(x_33); -x_34 = lean_ctor_get(x_28, 1); +lean_object* x_34; lean_object* x_35; lean_object* x_36; lean_object* x_37; +x_34 = lean_ctor_get(x_29, 0); lean_inc(x_34); -if (lean_is_exclusive(x_28)) { - lean_ctor_release(x_28, 0); - lean_ctor_release(x_28, 1); - x_35 = x_28; +x_35 = lean_ctor_get(x_29, 1); +lean_inc(x_35); +if (lean_is_exclusive(x_29)) { + lean_ctor_release(x_29, 0); + lean_ctor_release(x_29, 1); + x_36 = x_29; } else { - lean_dec_ref(x_28); - x_35 = lean_box(0); + lean_dec_ref(x_29); + x_36 = lean_box(0); } -if (lean_is_scalar(x_35)) { - x_36 = lean_alloc_ctor(1, 2, 0); +if (lean_is_scalar(x_36)) { + x_37 = lean_alloc_ctor(1, 2, 0); } else { - x_36 = x_35; + x_37 = x_36; } -lean_ctor_set(x_36, 0, x_33); -lean_ctor_set(x_36, 1, x_34); -return x_36; +lean_ctor_set(x_37, 0, x_34); +lean_ctor_set(x_37, 1, x_35); +return x_37; } } } else { -lean_object* x_37; lean_object* x_38; uint8_t x_39; -x_37 = lean_ctor_get(x_6, 0); -lean_inc(x_37); -x_38 = lean_ctor_get(x_4, 1); +lean_object* x_38; lean_object* x_39; uint8_t x_40; +x_38 = lean_ctor_get(x_6, 0); lean_inc(x_38); +x_39 = lean_ctor_get(x_4, 1); +lean_inc(x_39); lean_dec(x_4); -x_39 = !lean_is_exclusive(x_5); -if (x_39 == 0) +x_40 = !lean_is_exclusive(x_5); +if (x_40 == 0) { -lean_object* x_40; uint8_t x_41; -x_40 = lean_ctor_get(x_5, 2); -lean_dec(x_40); -x_41 = !lean_is_exclusive(x_6); -if (x_41 == 0) +lean_object* x_41; uint8_t x_42; +x_41 = lean_ctor_get(x_5, 2); +lean_dec(x_41); +x_42 = !lean_is_exclusive(x_6); +if (x_42 == 0) { -lean_object* x_42; lean_object* x_43; uint8_t x_44; -x_42 = lean_ctor_get(x_6, 1); -x_43 = lean_ctor_get(x_6, 0); -lean_dec(x_43); -x_44 = !lean_is_exclusive(x_37); -if (x_44 == 0) +lean_object* x_43; lean_object* x_44; uint8_t x_45; +x_43 = lean_ctor_get(x_6, 1); +x_44 = lean_ctor_get(x_6, 0); +lean_dec(x_44); +x_45 = !lean_is_exclusive(x_38); +if (x_45 == 0) { -lean_object* x_45; lean_object* x_46; lean_object* x_47; -x_45 = lean_ctor_get(x_37, 4); -lean_ctor_set(x_6, 1, x_45); +lean_object* x_46; lean_object* x_47; lean_object* x_48; +x_46 = lean_ctor_get(x_38, 4); +lean_ctor_set(x_6, 1, x_46); lean_ctor_set(x_6, 0, x_1); -lean_ctor_set(x_37, 4, x_6); -x_46 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_46, 0, x_37); -lean_ctor_set(x_46, 1, x_42); -lean_ctor_set(x_5, 2, x_46); -x_47 = l___private_Init_Lean_Elab_Command_3__setState(x_5, x_2, x_38); -if (lean_obj_tag(x_47) == 0) +lean_ctor_set(x_38, 4, x_6); +x_47 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_47, 0, x_38); +lean_ctor_set(x_47, 1, x_43); +lean_ctor_set(x_5, 2, x_47); +x_48 = l___private_Init_Lean_Elab_Command_3__setState(x_5, x_2, x_39); +if (lean_obj_tag(x_48) == 0) { -uint8_t x_48; -x_48 = !lean_is_exclusive(x_47); -if (x_48 == 0) +uint8_t x_49; +x_49 = !lean_is_exclusive(x_48); +if (x_49 == 0) { -lean_object* x_49; lean_object* x_50; -x_49 = lean_ctor_get(x_47, 0); -lean_dec(x_49); -x_50 = lean_box(0); -lean_ctor_set(x_47, 0, x_50); -return x_47; +lean_object* x_50; lean_object* x_51; +x_50 = lean_ctor_get(x_48, 0); +lean_dec(x_50); +x_51 = lean_box(0); +lean_ctor_set(x_48, 0, x_51); +return x_48; } else { -lean_object* x_51; lean_object* x_52; lean_object* x_53; -x_51 = lean_ctor_get(x_47, 1); -lean_inc(x_51); -lean_dec(x_47); -x_52 = lean_box(0); -x_53 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_53, 0, x_52); -lean_ctor_set(x_53, 1, x_51); -return x_53; +lean_object* x_52; lean_object* x_53; lean_object* x_54; +x_52 = lean_ctor_get(x_48, 1); +lean_inc(x_52); +lean_dec(x_48); +x_53 = lean_box(0); +x_54 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_54, 0, x_53); +lean_ctor_set(x_54, 1, x_52); +return x_54; } } else { -uint8_t x_54; -x_54 = !lean_is_exclusive(x_47); -if (x_54 == 0) +uint8_t x_55; +x_55 = !lean_is_exclusive(x_48); +if (x_55 == 0) { -return x_47; +return x_48; } else { -lean_object* x_55; lean_object* x_56; lean_object* x_57; -x_55 = lean_ctor_get(x_47, 0); -x_56 = lean_ctor_get(x_47, 1); +lean_object* x_56; lean_object* x_57; lean_object* x_58; +x_56 = lean_ctor_get(x_48, 0); +x_57 = lean_ctor_get(x_48, 1); +lean_inc(x_57); lean_inc(x_56); -lean_inc(x_55); -lean_dec(x_47); -x_57 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_57, 0, x_55); -lean_ctor_set(x_57, 1, x_56); -return x_57; +lean_dec(x_48); +x_58 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_58, 0, x_56); +lean_ctor_set(x_58, 1, x_57); +return x_58; } } } else { -lean_object* x_58; lean_object* x_59; lean_object* x_60; lean_object* x_61; lean_object* x_62; lean_object* x_63; lean_object* x_64; lean_object* x_65; lean_object* x_66; lean_object* x_67; -x_58 = lean_ctor_get(x_37, 0); -x_59 = lean_ctor_get(x_37, 1); -x_60 = lean_ctor_get(x_37, 2); -x_61 = lean_ctor_get(x_37, 3); -x_62 = lean_ctor_get(x_37, 4); -x_63 = lean_ctor_get(x_37, 5); -x_64 = lean_ctor_get(x_37, 6); +lean_object* x_59; lean_object* x_60; lean_object* x_61; lean_object* x_62; lean_object* x_63; lean_object* x_64; lean_object* x_65; lean_object* x_66; lean_object* x_67; lean_object* x_68; +x_59 = lean_ctor_get(x_38, 0); +x_60 = lean_ctor_get(x_38, 1); +x_61 = lean_ctor_get(x_38, 2); +x_62 = lean_ctor_get(x_38, 3); +x_63 = lean_ctor_get(x_38, 4); +x_64 = lean_ctor_get(x_38, 5); +x_65 = lean_ctor_get(x_38, 6); +lean_inc(x_65); lean_inc(x_64); lean_inc(x_63); lean_inc(x_62); lean_inc(x_61); lean_inc(x_60); lean_inc(x_59); -lean_inc(x_58); -lean_dec(x_37); -lean_ctor_set(x_6, 1, x_62); +lean_dec(x_38); +lean_ctor_set(x_6, 1, x_63); lean_ctor_set(x_6, 0, x_1); -x_65 = lean_alloc_ctor(0, 7, 0); -lean_ctor_set(x_65, 0, x_58); -lean_ctor_set(x_65, 1, x_59); -lean_ctor_set(x_65, 2, x_60); -lean_ctor_set(x_65, 3, x_61); -lean_ctor_set(x_65, 4, x_6); -lean_ctor_set(x_65, 5, x_63); -lean_ctor_set(x_65, 6, x_64); -x_66 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_66, 0, x_65); -lean_ctor_set(x_66, 1, x_42); -lean_ctor_set(x_5, 2, x_66); -x_67 = l___private_Init_Lean_Elab_Command_3__setState(x_5, x_2, x_38); -if (lean_obj_tag(x_67) == 0) +x_66 = lean_alloc_ctor(0, 7, 0); +lean_ctor_set(x_66, 0, x_59); +lean_ctor_set(x_66, 1, x_60); +lean_ctor_set(x_66, 2, x_61); +lean_ctor_set(x_66, 3, x_62); +lean_ctor_set(x_66, 4, x_6); +lean_ctor_set(x_66, 5, x_64); +lean_ctor_set(x_66, 6, x_65); +x_67 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_67, 0, x_66); +lean_ctor_set(x_67, 1, x_43); +lean_ctor_set(x_5, 2, x_67); +x_68 = l___private_Init_Lean_Elab_Command_3__setState(x_5, x_2, x_39); +if (lean_obj_tag(x_68) == 0) { -lean_object* x_68; lean_object* x_69; lean_object* x_70; lean_object* x_71; -x_68 = lean_ctor_get(x_67, 1); -lean_inc(x_68); -if (lean_is_exclusive(x_67)) { - lean_ctor_release(x_67, 0); - lean_ctor_release(x_67, 1); - x_69 = x_67; +lean_object* x_69; lean_object* x_70; lean_object* x_71; lean_object* x_72; +x_69 = lean_ctor_get(x_68, 1); +lean_inc(x_69); +if (lean_is_exclusive(x_68)) { + lean_ctor_release(x_68, 0); + lean_ctor_release(x_68, 1); + x_70 = x_68; } else { - lean_dec_ref(x_67); - x_69 = lean_box(0); + lean_dec_ref(x_68); + x_70 = lean_box(0); } -x_70 = lean_box(0); -if (lean_is_scalar(x_69)) { - x_71 = lean_alloc_ctor(0, 2, 0); +x_71 = lean_box(0); +if (lean_is_scalar(x_70)) { + x_72 = lean_alloc_ctor(0, 2, 0); } else { - x_71 = x_69; + x_72 = x_70; } -lean_ctor_set(x_71, 0, x_70); -lean_ctor_set(x_71, 1, x_68); -return x_71; +lean_ctor_set(x_72, 0, x_71); +lean_ctor_set(x_72, 1, x_69); +return x_72; } else { -lean_object* x_72; lean_object* x_73; lean_object* x_74; lean_object* x_75; -x_72 = lean_ctor_get(x_67, 0); -lean_inc(x_72); -x_73 = lean_ctor_get(x_67, 1); +lean_object* x_73; lean_object* x_74; lean_object* x_75; lean_object* x_76; +x_73 = lean_ctor_get(x_68, 0); lean_inc(x_73); -if (lean_is_exclusive(x_67)) { - lean_ctor_release(x_67, 0); - lean_ctor_release(x_67, 1); - x_74 = x_67; +x_74 = lean_ctor_get(x_68, 1); +lean_inc(x_74); +if (lean_is_exclusive(x_68)) { + lean_ctor_release(x_68, 0); + lean_ctor_release(x_68, 1); + x_75 = x_68; } else { - lean_dec_ref(x_67); - x_74 = lean_box(0); + lean_dec_ref(x_68); + x_75 = lean_box(0); } -if (lean_is_scalar(x_74)) { - x_75 = lean_alloc_ctor(1, 2, 0); +if (lean_is_scalar(x_75)) { + x_76 = lean_alloc_ctor(1, 2, 0); } else { - x_75 = x_74; + x_76 = x_75; } -lean_ctor_set(x_75, 0, x_72); -lean_ctor_set(x_75, 1, x_73); -return x_75; +lean_ctor_set(x_76, 0, x_73); +lean_ctor_set(x_76, 1, x_74); +return x_76; } } } else { -lean_object* x_76; lean_object* x_77; lean_object* x_78; lean_object* x_79; lean_object* x_80; lean_object* x_81; lean_object* x_82; lean_object* x_83; lean_object* x_84; lean_object* x_85; lean_object* x_86; lean_object* x_87; lean_object* x_88; -x_76 = lean_ctor_get(x_6, 1); -lean_inc(x_76); -lean_dec(x_6); -x_77 = lean_ctor_get(x_37, 0); +lean_object* x_77; lean_object* x_78; lean_object* x_79; lean_object* x_80; lean_object* x_81; lean_object* x_82; lean_object* x_83; lean_object* x_84; lean_object* x_85; lean_object* x_86; lean_object* x_87; lean_object* x_88; lean_object* x_89; +x_77 = lean_ctor_get(x_6, 1); lean_inc(x_77); -x_78 = lean_ctor_get(x_37, 1); +lean_dec(x_6); +x_78 = lean_ctor_get(x_38, 0); lean_inc(x_78); -x_79 = lean_ctor_get(x_37, 2); +x_79 = lean_ctor_get(x_38, 1); lean_inc(x_79); -x_80 = lean_ctor_get(x_37, 3); +x_80 = lean_ctor_get(x_38, 2); lean_inc(x_80); -x_81 = lean_ctor_get(x_37, 4); +x_81 = lean_ctor_get(x_38, 3); lean_inc(x_81); -x_82 = lean_ctor_get(x_37, 5); +x_82 = lean_ctor_get(x_38, 4); lean_inc(x_82); -x_83 = lean_ctor_get(x_37, 6); +x_83 = lean_ctor_get(x_38, 5); lean_inc(x_83); -if (lean_is_exclusive(x_37)) { - lean_ctor_release(x_37, 0); - lean_ctor_release(x_37, 1); - lean_ctor_release(x_37, 2); - lean_ctor_release(x_37, 3); - lean_ctor_release(x_37, 4); - lean_ctor_release(x_37, 5); - lean_ctor_release(x_37, 6); - x_84 = x_37; +x_84 = lean_ctor_get(x_38, 6); +lean_inc(x_84); +if (lean_is_exclusive(x_38)) { + lean_ctor_release(x_38, 0); + lean_ctor_release(x_38, 1); + lean_ctor_release(x_38, 2); + lean_ctor_release(x_38, 3); + lean_ctor_release(x_38, 4); + lean_ctor_release(x_38, 5); + lean_ctor_release(x_38, 6); + x_85 = x_38; } else { - lean_dec_ref(x_37); - x_84 = lean_box(0); + lean_dec_ref(x_38); + x_85 = lean_box(0); } -x_85 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_85, 0, x_1); -lean_ctor_set(x_85, 1, x_81); -if (lean_is_scalar(x_84)) { - x_86 = lean_alloc_ctor(0, 7, 0); +x_86 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_86, 0, x_1); +lean_ctor_set(x_86, 1, x_82); +if (lean_is_scalar(x_85)) { + x_87 = lean_alloc_ctor(0, 7, 0); } else { - x_86 = x_84; + x_87 = x_85; } -lean_ctor_set(x_86, 0, x_77); -lean_ctor_set(x_86, 1, x_78); -lean_ctor_set(x_86, 2, x_79); -lean_ctor_set(x_86, 3, x_80); -lean_ctor_set(x_86, 4, x_85); -lean_ctor_set(x_86, 5, x_82); -lean_ctor_set(x_86, 6, x_83); -x_87 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_87, 0, x_86); -lean_ctor_set(x_87, 1, x_76); -lean_ctor_set(x_5, 2, x_87); -x_88 = l___private_Init_Lean_Elab_Command_3__setState(x_5, x_2, x_38); -if (lean_obj_tag(x_88) == 0) +lean_ctor_set(x_87, 0, x_78); +lean_ctor_set(x_87, 1, x_79); +lean_ctor_set(x_87, 2, x_80); +lean_ctor_set(x_87, 3, x_81); +lean_ctor_set(x_87, 4, x_86); +lean_ctor_set(x_87, 5, x_83); +lean_ctor_set(x_87, 6, x_84); +x_88 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_88, 0, x_87); +lean_ctor_set(x_88, 1, x_77); +lean_ctor_set(x_5, 2, x_88); +x_89 = l___private_Init_Lean_Elab_Command_3__setState(x_5, x_2, x_39); +if (lean_obj_tag(x_89) == 0) { -lean_object* x_89; lean_object* x_90; lean_object* x_91; lean_object* x_92; -x_89 = lean_ctor_get(x_88, 1); -lean_inc(x_89); -if (lean_is_exclusive(x_88)) { - lean_ctor_release(x_88, 0); - lean_ctor_release(x_88, 1); - x_90 = x_88; +lean_object* x_90; lean_object* x_91; lean_object* x_92; lean_object* x_93; +x_90 = lean_ctor_get(x_89, 1); +lean_inc(x_90); +if (lean_is_exclusive(x_89)) { + lean_ctor_release(x_89, 0); + lean_ctor_release(x_89, 1); + x_91 = x_89; } else { - lean_dec_ref(x_88); - x_90 = lean_box(0); + lean_dec_ref(x_89); + x_91 = lean_box(0); } -x_91 = lean_box(0); -if (lean_is_scalar(x_90)) { - x_92 = lean_alloc_ctor(0, 2, 0); +x_92 = lean_box(0); +if (lean_is_scalar(x_91)) { + x_93 = lean_alloc_ctor(0, 2, 0); } else { - x_92 = x_90; + x_93 = x_91; } -lean_ctor_set(x_92, 0, x_91); -lean_ctor_set(x_92, 1, x_89); -return x_92; +lean_ctor_set(x_93, 0, x_92); +lean_ctor_set(x_93, 1, x_90); +return x_93; } else { -lean_object* x_93; lean_object* x_94; lean_object* x_95; lean_object* x_96; -x_93 = lean_ctor_get(x_88, 0); -lean_inc(x_93); -x_94 = lean_ctor_get(x_88, 1); +lean_object* x_94; lean_object* x_95; lean_object* x_96; lean_object* x_97; +x_94 = lean_ctor_get(x_89, 0); lean_inc(x_94); -if (lean_is_exclusive(x_88)) { - lean_ctor_release(x_88, 0); - lean_ctor_release(x_88, 1); - x_95 = x_88; +x_95 = lean_ctor_get(x_89, 1); +lean_inc(x_95); +if (lean_is_exclusive(x_89)) { + lean_ctor_release(x_89, 0); + lean_ctor_release(x_89, 1); + x_96 = x_89; } else { - lean_dec_ref(x_88); - x_95 = lean_box(0); + lean_dec_ref(x_89); + x_96 = lean_box(0); } -if (lean_is_scalar(x_95)) { - x_96 = lean_alloc_ctor(1, 2, 0); +if (lean_is_scalar(x_96)) { + x_97 = lean_alloc_ctor(1, 2, 0); } else { - x_96 = x_95; + x_97 = x_96; } -lean_ctor_set(x_96, 0, x_93); -lean_ctor_set(x_96, 1, x_94); -return x_96; +lean_ctor_set(x_97, 0, x_94); +lean_ctor_set(x_97, 1, x_95); +return x_97; } } } else { -lean_object* x_97; lean_object* x_98; lean_object* x_99; lean_object* x_100; lean_object* x_101; lean_object* x_102; lean_object* x_103; lean_object* x_104; lean_object* x_105; lean_object* x_106; lean_object* x_107; lean_object* x_108; lean_object* x_109; lean_object* x_110; lean_object* x_111; lean_object* x_112; lean_object* x_113; -x_97 = lean_ctor_get(x_5, 0); -x_98 = lean_ctor_get(x_5, 1); -lean_inc(x_98); -lean_inc(x_97); -lean_dec(x_5); -x_99 = lean_ctor_get(x_6, 1); +lean_object* x_98; lean_object* x_99; lean_object* x_100; lean_object* x_101; lean_object* x_102; lean_object* x_103; lean_object* x_104; lean_object* x_105; lean_object* x_106; lean_object* x_107; lean_object* x_108; lean_object* x_109; lean_object* x_110; lean_object* x_111; lean_object* x_112; lean_object* x_113; lean_object* x_114; lean_object* x_115; +x_98 = lean_ctor_get(x_5, 0); +x_99 = lean_ctor_get(x_5, 1); +x_100 = lean_ctor_get(x_5, 3); +lean_inc(x_100); lean_inc(x_99); +lean_inc(x_98); +lean_dec(x_5); +x_101 = lean_ctor_get(x_6, 1); +lean_inc(x_101); if (lean_is_exclusive(x_6)) { lean_ctor_release(x_6, 0); lean_ctor_release(x_6, 1); - x_100 = x_6; + x_102 = x_6; } else { lean_dec_ref(x_6); - x_100 = lean_box(0); + x_102 = lean_box(0); } -x_101 = lean_ctor_get(x_37, 0); -lean_inc(x_101); -x_102 = lean_ctor_get(x_37, 1); -lean_inc(x_102); -x_103 = lean_ctor_get(x_37, 2); +x_103 = lean_ctor_get(x_38, 0); lean_inc(x_103); -x_104 = lean_ctor_get(x_37, 3); +x_104 = lean_ctor_get(x_38, 1); lean_inc(x_104); -x_105 = lean_ctor_get(x_37, 4); +x_105 = lean_ctor_get(x_38, 2); lean_inc(x_105); -x_106 = lean_ctor_get(x_37, 5); +x_106 = lean_ctor_get(x_38, 3); lean_inc(x_106); -x_107 = lean_ctor_get(x_37, 6); +x_107 = lean_ctor_get(x_38, 4); lean_inc(x_107); -if (lean_is_exclusive(x_37)) { - lean_ctor_release(x_37, 0); - lean_ctor_release(x_37, 1); - lean_ctor_release(x_37, 2); - lean_ctor_release(x_37, 3); - lean_ctor_release(x_37, 4); - lean_ctor_release(x_37, 5); - lean_ctor_release(x_37, 6); - x_108 = x_37; +x_108 = lean_ctor_get(x_38, 5); +lean_inc(x_108); +x_109 = lean_ctor_get(x_38, 6); +lean_inc(x_109); +if (lean_is_exclusive(x_38)) { + lean_ctor_release(x_38, 0); + lean_ctor_release(x_38, 1); + lean_ctor_release(x_38, 2); + lean_ctor_release(x_38, 3); + lean_ctor_release(x_38, 4); + lean_ctor_release(x_38, 5); + lean_ctor_release(x_38, 6); + x_110 = x_38; } else { - lean_dec_ref(x_37); - x_108 = lean_box(0); + lean_dec_ref(x_38); + x_110 = lean_box(0); } -if (lean_is_scalar(x_100)) { - x_109 = lean_alloc_ctor(1, 2, 0); +if (lean_is_scalar(x_102)) { + x_111 = lean_alloc_ctor(1, 2, 0); } else { - x_109 = x_100; + x_111 = x_102; } -lean_ctor_set(x_109, 0, x_1); -lean_ctor_set(x_109, 1, x_105); -if (lean_is_scalar(x_108)) { - x_110 = lean_alloc_ctor(0, 7, 0); +lean_ctor_set(x_111, 0, x_1); +lean_ctor_set(x_111, 1, x_107); +if (lean_is_scalar(x_110)) { + x_112 = lean_alloc_ctor(0, 7, 0); } else { - x_110 = x_108; + x_112 = x_110; } -lean_ctor_set(x_110, 0, x_101); -lean_ctor_set(x_110, 1, x_102); -lean_ctor_set(x_110, 2, x_103); -lean_ctor_set(x_110, 3, x_104); -lean_ctor_set(x_110, 4, x_109); -lean_ctor_set(x_110, 5, x_106); -lean_ctor_set(x_110, 6, x_107); -x_111 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_111, 0, x_110); -lean_ctor_set(x_111, 1, x_99); -x_112 = lean_alloc_ctor(0, 3, 0); -lean_ctor_set(x_112, 0, x_97); -lean_ctor_set(x_112, 1, x_98); -lean_ctor_set(x_112, 2, x_111); -x_113 = l___private_Init_Lean_Elab_Command_3__setState(x_112, x_2, x_38); -if (lean_obj_tag(x_113) == 0) +lean_ctor_set(x_112, 0, x_103); +lean_ctor_set(x_112, 1, x_104); +lean_ctor_set(x_112, 2, x_105); +lean_ctor_set(x_112, 3, x_106); +lean_ctor_set(x_112, 4, x_111); +lean_ctor_set(x_112, 5, x_108); +lean_ctor_set(x_112, 6, x_109); +x_113 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_113, 0, x_112); +lean_ctor_set(x_113, 1, x_101); +x_114 = lean_alloc_ctor(0, 4, 0); +lean_ctor_set(x_114, 0, x_98); +lean_ctor_set(x_114, 1, x_99); +lean_ctor_set(x_114, 2, x_113); +lean_ctor_set(x_114, 3, x_100); +x_115 = l___private_Init_Lean_Elab_Command_3__setState(x_114, x_2, x_39); +if (lean_obj_tag(x_115) == 0) { -lean_object* x_114; lean_object* x_115; lean_object* x_116; lean_object* x_117; -x_114 = lean_ctor_get(x_113, 1); -lean_inc(x_114); -if (lean_is_exclusive(x_113)) { - lean_ctor_release(x_113, 0); - lean_ctor_release(x_113, 1); - x_115 = x_113; -} else { - lean_dec_ref(x_113); - x_115 = lean_box(0); -} -x_116 = lean_box(0); -if (lean_is_scalar(x_115)) { - x_117 = lean_alloc_ctor(0, 2, 0); -} else { +lean_object* x_116; lean_object* x_117; lean_object* x_118; lean_object* x_119; +x_116 = lean_ctor_get(x_115, 1); +lean_inc(x_116); +if (lean_is_exclusive(x_115)) { + lean_ctor_release(x_115, 0); + lean_ctor_release(x_115, 1); x_117 = x_115; +} else { + lean_dec_ref(x_115); + x_117 = lean_box(0); } -lean_ctor_set(x_117, 0, x_116); -lean_ctor_set(x_117, 1, x_114); -return x_117; +x_118 = lean_box(0); +if (lean_is_scalar(x_117)) { + x_119 = lean_alloc_ctor(0, 2, 0); +} else { + x_119 = x_117; +} +lean_ctor_set(x_119, 0, x_118); +lean_ctor_set(x_119, 1, x_116); +return x_119; } else { -lean_object* x_118; lean_object* x_119; lean_object* x_120; lean_object* x_121; -x_118 = lean_ctor_get(x_113, 0); -lean_inc(x_118); -x_119 = lean_ctor_get(x_113, 1); -lean_inc(x_119); -if (lean_is_exclusive(x_113)) { - lean_ctor_release(x_113, 0); - lean_ctor_release(x_113, 1); - x_120 = x_113; +lean_object* x_120; lean_object* x_121; lean_object* x_122; lean_object* x_123; +x_120 = lean_ctor_get(x_115, 0); +lean_inc(x_120); +x_121 = lean_ctor_get(x_115, 1); +lean_inc(x_121); +if (lean_is_exclusive(x_115)) { + lean_ctor_release(x_115, 0); + lean_ctor_release(x_115, 1); + x_122 = x_115; } else { - lean_dec_ref(x_113); - x_120 = lean_box(0); + lean_dec_ref(x_115); + x_122 = lean_box(0); } -if (lean_is_scalar(x_120)) { - x_121 = lean_alloc_ctor(1, 2, 0); +if (lean_is_scalar(x_122)) { + x_123 = lean_alloc_ctor(1, 2, 0); } else { - x_121 = x_120; + x_123 = x_122; } -lean_ctor_set(x_121, 0, x_118); -lean_ctor_set(x_121, 1, x_119); -return x_121; +lean_ctor_set(x_123, 0, x_120); +lean_ctor_set(x_123, 1, x_121); +return x_123; } } } } else { -uint8_t x_122; +uint8_t x_124; lean_dec(x_2); lean_dec(x_1); -x_122 = !lean_is_exclusive(x_4); -if (x_122 == 0) +x_124 = !lean_is_exclusive(x_4); +if (x_124 == 0) { return x_4; } else { -lean_object* x_123; lean_object* x_124; lean_object* x_125; -x_123 = lean_ctor_get(x_4, 0); -x_124 = lean_ctor_get(x_4, 1); -lean_inc(x_124); -lean_inc(x_123); +lean_object* x_125; lean_object* x_126; lean_object* x_127; +x_125 = lean_ctor_get(x_4, 0); +x_126 = lean_ctor_get(x_4, 1); +lean_inc(x_126); +lean_inc(x_125); lean_dec(x_4); -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; +x_127 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_127, 0, x_125); +lean_ctor_set(x_127, 1, x_126); +return x_127; } } } @@ -11721,465 +12513,471 @@ return x_22; } else { -lean_object* x_23; lean_object* x_24; lean_object* x_25; lean_object* x_26; lean_object* x_27; lean_object* x_28; +lean_object* x_23; lean_object* x_24; lean_object* x_25; lean_object* x_26; lean_object* x_27; lean_object* x_28; lean_object* x_29; x_23 = lean_ctor_get(x_5, 0); x_24 = lean_ctor_get(x_5, 1); +x_25 = lean_ctor_get(x_5, 3); +lean_inc(x_25); lean_inc(x_24); lean_inc(x_23); lean_dec(x_5); -x_25 = l_Lean_Elab_Command_modifyScope___closed__1; -x_26 = l_unreachable_x21___rarg(x_25); -x_27 = lean_alloc_ctor(0, 3, 0); -lean_ctor_set(x_27, 0, x_23); -lean_ctor_set(x_27, 1, x_24); -lean_ctor_set(x_27, 2, x_26); -x_28 = l___private_Init_Lean_Elab_Command_3__setState(x_27, x_2, x_7); -if (lean_obj_tag(x_28) == 0) +x_26 = l_Lean_Elab_Command_modifyScope___closed__1; +x_27 = l_unreachable_x21___rarg(x_26); +x_28 = lean_alloc_ctor(0, 4, 0); +lean_ctor_set(x_28, 0, x_23); +lean_ctor_set(x_28, 1, x_24); +lean_ctor_set(x_28, 2, x_27); +lean_ctor_set(x_28, 3, x_25); +x_29 = l___private_Init_Lean_Elab_Command_3__setState(x_28, x_2, x_7); +if (lean_obj_tag(x_29) == 0) { -lean_object* x_29; lean_object* x_30; lean_object* x_31; lean_object* x_32; -x_29 = lean_ctor_get(x_28, 1); -lean_inc(x_29); -if (lean_is_exclusive(x_28)) { - lean_ctor_release(x_28, 0); - lean_ctor_release(x_28, 1); - x_30 = x_28; +lean_object* x_30; lean_object* x_31; lean_object* x_32; lean_object* x_33; +x_30 = lean_ctor_get(x_29, 1); +lean_inc(x_30); +if (lean_is_exclusive(x_29)) { + lean_ctor_release(x_29, 0); + lean_ctor_release(x_29, 1); + x_31 = x_29; } else { - lean_dec_ref(x_28); - x_30 = lean_box(0); + lean_dec_ref(x_29); + x_31 = lean_box(0); } -x_31 = lean_box(0); -if (lean_is_scalar(x_30)) { - x_32 = lean_alloc_ctor(0, 2, 0); +x_32 = lean_box(0); +if (lean_is_scalar(x_31)) { + x_33 = lean_alloc_ctor(0, 2, 0); } else { - x_32 = x_30; + x_33 = x_31; } -lean_ctor_set(x_32, 0, x_31); -lean_ctor_set(x_32, 1, x_29); -return x_32; +lean_ctor_set(x_33, 0, x_32); +lean_ctor_set(x_33, 1, x_30); +return x_33; } else { -lean_object* x_33; lean_object* x_34; lean_object* x_35; lean_object* x_36; -x_33 = lean_ctor_get(x_28, 0); -lean_inc(x_33); -x_34 = lean_ctor_get(x_28, 1); +lean_object* x_34; lean_object* x_35; lean_object* x_36; lean_object* x_37; +x_34 = lean_ctor_get(x_29, 0); lean_inc(x_34); -if (lean_is_exclusive(x_28)) { - lean_ctor_release(x_28, 0); - lean_ctor_release(x_28, 1); - x_35 = x_28; +x_35 = lean_ctor_get(x_29, 1); +lean_inc(x_35); +if (lean_is_exclusive(x_29)) { + lean_ctor_release(x_29, 0); + lean_ctor_release(x_29, 1); + x_36 = x_29; } else { - lean_dec_ref(x_28); - x_35 = lean_box(0); + lean_dec_ref(x_29); + x_36 = lean_box(0); } -if (lean_is_scalar(x_35)) { - x_36 = lean_alloc_ctor(1, 2, 0); +if (lean_is_scalar(x_36)) { + x_37 = lean_alloc_ctor(1, 2, 0); } else { - x_36 = x_35; + x_37 = x_36; } -lean_ctor_set(x_36, 0, x_33); -lean_ctor_set(x_36, 1, x_34); -return x_36; +lean_ctor_set(x_37, 0, x_34); +lean_ctor_set(x_37, 1, x_35); +return x_37; } } } else { -lean_object* x_37; lean_object* x_38; uint8_t x_39; -x_37 = lean_ctor_get(x_6, 0); -lean_inc(x_37); -x_38 = lean_ctor_get(x_4, 1); +lean_object* x_38; lean_object* x_39; uint8_t x_40; +x_38 = lean_ctor_get(x_6, 0); lean_inc(x_38); +x_39 = lean_ctor_get(x_4, 1); +lean_inc(x_39); lean_dec(x_4); -x_39 = !lean_is_exclusive(x_5); -if (x_39 == 0) +x_40 = !lean_is_exclusive(x_5); +if (x_40 == 0) { -lean_object* x_40; uint8_t x_41; -x_40 = lean_ctor_get(x_5, 2); -lean_dec(x_40); -x_41 = !lean_is_exclusive(x_6); -if (x_41 == 0) +lean_object* x_41; uint8_t x_42; +x_41 = lean_ctor_get(x_5, 2); +lean_dec(x_41); +x_42 = !lean_is_exclusive(x_6); +if (x_42 == 0) { -lean_object* x_42; uint8_t x_43; -x_42 = lean_ctor_get(x_6, 0); -lean_dec(x_42); -x_43 = !lean_is_exclusive(x_37); -if (x_43 == 0) +lean_object* x_43; uint8_t x_44; +x_43 = lean_ctor_get(x_6, 0); +lean_dec(x_43); +x_44 = !lean_is_exclusive(x_38); +if (x_44 == 0) { -lean_object* x_44; lean_object* x_45; lean_object* x_46; -x_44 = lean_ctor_get(x_37, 6); -x_45 = lean_array_push(x_44, x_1); -lean_ctor_set(x_37, 6, x_45); -x_46 = l___private_Init_Lean_Elab_Command_3__setState(x_5, x_2, x_38); -if (lean_obj_tag(x_46) == 0) +lean_object* x_45; lean_object* x_46; lean_object* x_47; +x_45 = lean_ctor_get(x_38, 6); +x_46 = lean_array_push(x_45, x_1); +lean_ctor_set(x_38, 6, x_46); +x_47 = l___private_Init_Lean_Elab_Command_3__setState(x_5, x_2, x_39); +if (lean_obj_tag(x_47) == 0) { -uint8_t x_47; -x_47 = !lean_is_exclusive(x_46); -if (x_47 == 0) +uint8_t x_48; +x_48 = !lean_is_exclusive(x_47); +if (x_48 == 0) { -lean_object* x_48; lean_object* x_49; -x_48 = lean_ctor_get(x_46, 0); -lean_dec(x_48); -x_49 = lean_box(0); -lean_ctor_set(x_46, 0, x_49); -return x_46; +lean_object* x_49; lean_object* x_50; +x_49 = lean_ctor_get(x_47, 0); +lean_dec(x_49); +x_50 = lean_box(0); +lean_ctor_set(x_47, 0, x_50); +return x_47; } else { -lean_object* x_50; lean_object* x_51; lean_object* x_52; -x_50 = lean_ctor_get(x_46, 1); -lean_inc(x_50); -lean_dec(x_46); -x_51 = lean_box(0); -x_52 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_52, 0, x_51); -lean_ctor_set(x_52, 1, x_50); -return x_52; +lean_object* x_51; lean_object* x_52; lean_object* x_53; +x_51 = lean_ctor_get(x_47, 1); +lean_inc(x_51); +lean_dec(x_47); +x_52 = lean_box(0); +x_53 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_53, 0, x_52); +lean_ctor_set(x_53, 1, x_51); +return x_53; } } else { -uint8_t x_53; -x_53 = !lean_is_exclusive(x_46); -if (x_53 == 0) +uint8_t x_54; +x_54 = !lean_is_exclusive(x_47); +if (x_54 == 0) { -return x_46; +return x_47; } else { -lean_object* x_54; lean_object* x_55; lean_object* x_56; -x_54 = lean_ctor_get(x_46, 0); -x_55 = lean_ctor_get(x_46, 1); +lean_object* x_55; lean_object* x_56; lean_object* x_57; +x_55 = lean_ctor_get(x_47, 0); +x_56 = lean_ctor_get(x_47, 1); +lean_inc(x_56); lean_inc(x_55); -lean_inc(x_54); -lean_dec(x_46); -x_56 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_56, 0, x_54); -lean_ctor_set(x_56, 1, x_55); -return x_56; +lean_dec(x_47); +x_57 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_57, 0, x_55); +lean_ctor_set(x_57, 1, x_56); +return x_57; } } } else { -lean_object* x_57; lean_object* x_58; lean_object* x_59; lean_object* x_60; lean_object* x_61; lean_object* x_62; lean_object* x_63; lean_object* x_64; lean_object* x_65; lean_object* x_66; -x_57 = lean_ctor_get(x_37, 0); -x_58 = lean_ctor_get(x_37, 1); -x_59 = lean_ctor_get(x_37, 2); -x_60 = lean_ctor_get(x_37, 3); -x_61 = lean_ctor_get(x_37, 4); -x_62 = lean_ctor_get(x_37, 5); -x_63 = lean_ctor_get(x_37, 6); +lean_object* x_58; lean_object* x_59; lean_object* x_60; lean_object* x_61; lean_object* x_62; lean_object* x_63; lean_object* x_64; lean_object* x_65; lean_object* x_66; lean_object* x_67; +x_58 = lean_ctor_get(x_38, 0); +x_59 = lean_ctor_get(x_38, 1); +x_60 = lean_ctor_get(x_38, 2); +x_61 = lean_ctor_get(x_38, 3); +x_62 = lean_ctor_get(x_38, 4); +x_63 = lean_ctor_get(x_38, 5); +x_64 = lean_ctor_get(x_38, 6); +lean_inc(x_64); lean_inc(x_63); lean_inc(x_62); lean_inc(x_61); lean_inc(x_60); lean_inc(x_59); lean_inc(x_58); -lean_inc(x_57); -lean_dec(x_37); -x_64 = lean_array_push(x_63, x_1); -x_65 = lean_alloc_ctor(0, 7, 0); -lean_ctor_set(x_65, 0, x_57); -lean_ctor_set(x_65, 1, x_58); -lean_ctor_set(x_65, 2, x_59); -lean_ctor_set(x_65, 3, x_60); -lean_ctor_set(x_65, 4, x_61); -lean_ctor_set(x_65, 5, x_62); -lean_ctor_set(x_65, 6, x_64); -lean_ctor_set(x_6, 0, x_65); -x_66 = l___private_Init_Lean_Elab_Command_3__setState(x_5, x_2, x_38); -if (lean_obj_tag(x_66) == 0) +lean_dec(x_38); +x_65 = lean_array_push(x_64, x_1); +x_66 = lean_alloc_ctor(0, 7, 0); +lean_ctor_set(x_66, 0, x_58); +lean_ctor_set(x_66, 1, x_59); +lean_ctor_set(x_66, 2, x_60); +lean_ctor_set(x_66, 3, x_61); +lean_ctor_set(x_66, 4, x_62); +lean_ctor_set(x_66, 5, x_63); +lean_ctor_set(x_66, 6, x_65); +lean_ctor_set(x_6, 0, x_66); +x_67 = l___private_Init_Lean_Elab_Command_3__setState(x_5, x_2, x_39); +if (lean_obj_tag(x_67) == 0) { -lean_object* x_67; lean_object* x_68; lean_object* x_69; lean_object* x_70; -x_67 = lean_ctor_get(x_66, 1); -lean_inc(x_67); -if (lean_is_exclusive(x_66)) { - lean_ctor_release(x_66, 0); - lean_ctor_release(x_66, 1); - x_68 = x_66; +lean_object* x_68; lean_object* x_69; lean_object* x_70; lean_object* x_71; +x_68 = lean_ctor_get(x_67, 1); +lean_inc(x_68); +if (lean_is_exclusive(x_67)) { + lean_ctor_release(x_67, 0); + lean_ctor_release(x_67, 1); + x_69 = x_67; } else { - lean_dec_ref(x_66); - x_68 = lean_box(0); + lean_dec_ref(x_67); + x_69 = lean_box(0); } -x_69 = lean_box(0); -if (lean_is_scalar(x_68)) { - x_70 = lean_alloc_ctor(0, 2, 0); +x_70 = lean_box(0); +if (lean_is_scalar(x_69)) { + x_71 = lean_alloc_ctor(0, 2, 0); } else { - x_70 = x_68; + x_71 = x_69; } -lean_ctor_set(x_70, 0, x_69); -lean_ctor_set(x_70, 1, x_67); -return x_70; +lean_ctor_set(x_71, 0, x_70); +lean_ctor_set(x_71, 1, x_68); +return x_71; } else { -lean_object* x_71; lean_object* x_72; lean_object* x_73; lean_object* x_74; -x_71 = lean_ctor_get(x_66, 0); -lean_inc(x_71); -x_72 = lean_ctor_get(x_66, 1); +lean_object* x_72; lean_object* x_73; lean_object* x_74; lean_object* x_75; +x_72 = lean_ctor_get(x_67, 0); lean_inc(x_72); -if (lean_is_exclusive(x_66)) { - lean_ctor_release(x_66, 0); - lean_ctor_release(x_66, 1); - x_73 = x_66; +x_73 = lean_ctor_get(x_67, 1); +lean_inc(x_73); +if (lean_is_exclusive(x_67)) { + lean_ctor_release(x_67, 0); + lean_ctor_release(x_67, 1); + x_74 = x_67; } else { - lean_dec_ref(x_66); - x_73 = lean_box(0); + lean_dec_ref(x_67); + x_74 = lean_box(0); } -if (lean_is_scalar(x_73)) { - x_74 = lean_alloc_ctor(1, 2, 0); +if (lean_is_scalar(x_74)) { + x_75 = lean_alloc_ctor(1, 2, 0); } else { - x_74 = x_73; + x_75 = x_74; } -lean_ctor_set(x_74, 0, x_71); -lean_ctor_set(x_74, 1, x_72); -return x_74; +lean_ctor_set(x_75, 0, x_72); +lean_ctor_set(x_75, 1, x_73); +return x_75; } } } else { -lean_object* x_75; lean_object* x_76; lean_object* x_77; lean_object* x_78; lean_object* x_79; lean_object* x_80; lean_object* x_81; lean_object* x_82; lean_object* x_83; lean_object* x_84; lean_object* x_85; lean_object* x_86; lean_object* x_87; -x_75 = lean_ctor_get(x_6, 1); -lean_inc(x_75); -lean_dec(x_6); -x_76 = lean_ctor_get(x_37, 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_object* x_86; lean_object* x_87; lean_object* x_88; +x_76 = lean_ctor_get(x_6, 1); lean_inc(x_76); -x_77 = lean_ctor_get(x_37, 1); +lean_dec(x_6); +x_77 = lean_ctor_get(x_38, 0); lean_inc(x_77); -x_78 = lean_ctor_get(x_37, 2); +x_78 = lean_ctor_get(x_38, 1); lean_inc(x_78); -x_79 = lean_ctor_get(x_37, 3); +x_79 = lean_ctor_get(x_38, 2); lean_inc(x_79); -x_80 = lean_ctor_get(x_37, 4); +x_80 = lean_ctor_get(x_38, 3); lean_inc(x_80); -x_81 = lean_ctor_get(x_37, 5); +x_81 = lean_ctor_get(x_38, 4); lean_inc(x_81); -x_82 = lean_ctor_get(x_37, 6); +x_82 = lean_ctor_get(x_38, 5); lean_inc(x_82); -if (lean_is_exclusive(x_37)) { - lean_ctor_release(x_37, 0); - lean_ctor_release(x_37, 1); - lean_ctor_release(x_37, 2); - lean_ctor_release(x_37, 3); - lean_ctor_release(x_37, 4); - lean_ctor_release(x_37, 5); - lean_ctor_release(x_37, 6); - x_83 = x_37; +x_83 = lean_ctor_get(x_38, 6); +lean_inc(x_83); +if (lean_is_exclusive(x_38)) { + lean_ctor_release(x_38, 0); + lean_ctor_release(x_38, 1); + lean_ctor_release(x_38, 2); + lean_ctor_release(x_38, 3); + lean_ctor_release(x_38, 4); + lean_ctor_release(x_38, 5); + lean_ctor_release(x_38, 6); + x_84 = x_38; } else { - lean_dec_ref(x_37); - x_83 = lean_box(0); + lean_dec_ref(x_38); + x_84 = lean_box(0); } -x_84 = lean_array_push(x_82, x_1); -if (lean_is_scalar(x_83)) { - x_85 = lean_alloc_ctor(0, 7, 0); +x_85 = lean_array_push(x_83, x_1); +if (lean_is_scalar(x_84)) { + x_86 = lean_alloc_ctor(0, 7, 0); } else { - x_85 = x_83; + x_86 = x_84; } -lean_ctor_set(x_85, 0, x_76); -lean_ctor_set(x_85, 1, x_77); -lean_ctor_set(x_85, 2, x_78); -lean_ctor_set(x_85, 3, x_79); -lean_ctor_set(x_85, 4, x_80); -lean_ctor_set(x_85, 5, x_81); -lean_ctor_set(x_85, 6, x_84); -x_86 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_86, 0, x_85); -lean_ctor_set(x_86, 1, x_75); -lean_ctor_set(x_5, 2, x_86); -x_87 = l___private_Init_Lean_Elab_Command_3__setState(x_5, x_2, x_38); -if (lean_obj_tag(x_87) == 0) +lean_ctor_set(x_86, 0, x_77); +lean_ctor_set(x_86, 1, x_78); +lean_ctor_set(x_86, 2, x_79); +lean_ctor_set(x_86, 3, x_80); +lean_ctor_set(x_86, 4, x_81); +lean_ctor_set(x_86, 5, x_82); +lean_ctor_set(x_86, 6, x_85); +x_87 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_87, 0, x_86); +lean_ctor_set(x_87, 1, x_76); +lean_ctor_set(x_5, 2, x_87); +x_88 = l___private_Init_Lean_Elab_Command_3__setState(x_5, x_2, x_39); +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, 1); -lean_inc(x_88); -if (lean_is_exclusive(x_87)) { - lean_ctor_release(x_87, 0); - lean_ctor_release(x_87, 1); - x_89 = x_87; +lean_object* x_89; lean_object* x_90; lean_object* x_91; lean_object* x_92; +x_89 = lean_ctor_get(x_88, 1); +lean_inc(x_89); +if (lean_is_exclusive(x_88)) { + lean_ctor_release(x_88, 0); + lean_ctor_release(x_88, 1); + x_90 = x_88; } else { - lean_dec_ref(x_87); - x_89 = lean_box(0); + lean_dec_ref(x_88); + x_90 = lean_box(0); } -x_90 = lean_box(0); -if (lean_is_scalar(x_89)) { - x_91 = lean_alloc_ctor(0, 2, 0); +x_91 = lean_box(0); +if (lean_is_scalar(x_90)) { + x_92 = lean_alloc_ctor(0, 2, 0); } else { - x_91 = x_89; + x_92 = x_90; } -lean_ctor_set(x_91, 0, x_90); -lean_ctor_set(x_91, 1, x_88); -return x_91; +lean_ctor_set(x_92, 0, x_91); +lean_ctor_set(x_92, 1, x_89); +return x_92; } else { -lean_object* x_92; lean_object* x_93; lean_object* x_94; lean_object* x_95; -x_92 = lean_ctor_get(x_87, 0); -lean_inc(x_92); -x_93 = lean_ctor_get(x_87, 1); +lean_object* x_93; lean_object* x_94; lean_object* x_95; lean_object* x_96; +x_93 = lean_ctor_get(x_88, 0); lean_inc(x_93); -if (lean_is_exclusive(x_87)) { - lean_ctor_release(x_87, 0); - lean_ctor_release(x_87, 1); - x_94 = x_87; +x_94 = lean_ctor_get(x_88, 1); +lean_inc(x_94); +if (lean_is_exclusive(x_88)) { + lean_ctor_release(x_88, 0); + lean_ctor_release(x_88, 1); + x_95 = x_88; } else { - lean_dec_ref(x_87); - x_94 = lean_box(0); + lean_dec_ref(x_88); + x_95 = lean_box(0); } -if (lean_is_scalar(x_94)) { - x_95 = lean_alloc_ctor(1, 2, 0); +if (lean_is_scalar(x_95)) { + x_96 = lean_alloc_ctor(1, 2, 0); } else { - x_95 = x_94; + x_96 = x_95; } -lean_ctor_set(x_95, 0, x_92); -lean_ctor_set(x_95, 1, x_93); -return x_95; +lean_ctor_set(x_96, 0, x_93); +lean_ctor_set(x_96, 1, x_94); +return x_96; } } } else { -lean_object* x_96; lean_object* x_97; lean_object* x_98; lean_object* x_99; lean_object* x_100; lean_object* x_101; lean_object* x_102; lean_object* x_103; lean_object* x_104; lean_object* x_105; lean_object* x_106; lean_object* x_107; lean_object* x_108; lean_object* x_109; lean_object* x_110; lean_object* x_111; lean_object* x_112; -x_96 = lean_ctor_get(x_5, 0); -x_97 = lean_ctor_get(x_5, 1); -lean_inc(x_97); -lean_inc(x_96); -lean_dec(x_5); -x_98 = lean_ctor_get(x_6, 1); +lean_object* x_97; lean_object* x_98; lean_object* x_99; lean_object* x_100; lean_object* x_101; lean_object* x_102; lean_object* x_103; lean_object* x_104; lean_object* x_105; lean_object* x_106; lean_object* x_107; lean_object* x_108; lean_object* x_109; lean_object* x_110; lean_object* x_111; lean_object* x_112; lean_object* x_113; lean_object* x_114; +x_97 = lean_ctor_get(x_5, 0); +x_98 = lean_ctor_get(x_5, 1); +x_99 = lean_ctor_get(x_5, 3); +lean_inc(x_99); lean_inc(x_98); +lean_inc(x_97); +lean_dec(x_5); +x_100 = lean_ctor_get(x_6, 1); +lean_inc(x_100); if (lean_is_exclusive(x_6)) { lean_ctor_release(x_6, 0); lean_ctor_release(x_6, 1); - x_99 = x_6; + x_101 = x_6; } else { lean_dec_ref(x_6); - x_99 = lean_box(0); + x_101 = lean_box(0); } -x_100 = lean_ctor_get(x_37, 0); -lean_inc(x_100); -x_101 = lean_ctor_get(x_37, 1); -lean_inc(x_101); -x_102 = lean_ctor_get(x_37, 2); +x_102 = lean_ctor_get(x_38, 0); lean_inc(x_102); -x_103 = lean_ctor_get(x_37, 3); +x_103 = lean_ctor_get(x_38, 1); lean_inc(x_103); -x_104 = lean_ctor_get(x_37, 4); +x_104 = lean_ctor_get(x_38, 2); lean_inc(x_104); -x_105 = lean_ctor_get(x_37, 5); +x_105 = lean_ctor_get(x_38, 3); lean_inc(x_105); -x_106 = lean_ctor_get(x_37, 6); +x_106 = lean_ctor_get(x_38, 4); lean_inc(x_106); -if (lean_is_exclusive(x_37)) { - lean_ctor_release(x_37, 0); - lean_ctor_release(x_37, 1); - lean_ctor_release(x_37, 2); - lean_ctor_release(x_37, 3); - lean_ctor_release(x_37, 4); - lean_ctor_release(x_37, 5); - lean_ctor_release(x_37, 6); - x_107 = x_37; +x_107 = lean_ctor_get(x_38, 5); +lean_inc(x_107); +x_108 = lean_ctor_get(x_38, 6); +lean_inc(x_108); +if (lean_is_exclusive(x_38)) { + lean_ctor_release(x_38, 0); + lean_ctor_release(x_38, 1); + lean_ctor_release(x_38, 2); + lean_ctor_release(x_38, 3); + lean_ctor_release(x_38, 4); + lean_ctor_release(x_38, 5); + lean_ctor_release(x_38, 6); + x_109 = x_38; } else { - lean_dec_ref(x_37); - x_107 = lean_box(0); + lean_dec_ref(x_38); + x_109 = lean_box(0); } -x_108 = lean_array_push(x_106, x_1); -if (lean_is_scalar(x_107)) { - x_109 = lean_alloc_ctor(0, 7, 0); +x_110 = lean_array_push(x_108, x_1); +if (lean_is_scalar(x_109)) { + x_111 = lean_alloc_ctor(0, 7, 0); } else { - x_109 = x_107; + x_111 = x_109; } -lean_ctor_set(x_109, 0, x_100); -lean_ctor_set(x_109, 1, x_101); -lean_ctor_set(x_109, 2, x_102); -lean_ctor_set(x_109, 3, x_103); -lean_ctor_set(x_109, 4, x_104); -lean_ctor_set(x_109, 5, x_105); -lean_ctor_set(x_109, 6, x_108); -if (lean_is_scalar(x_99)) { - x_110 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_111, 0, x_102); +lean_ctor_set(x_111, 1, x_103); +lean_ctor_set(x_111, 2, x_104); +lean_ctor_set(x_111, 3, x_105); +lean_ctor_set(x_111, 4, x_106); +lean_ctor_set(x_111, 5, x_107); +lean_ctor_set(x_111, 6, x_110); +if (lean_is_scalar(x_101)) { + x_112 = lean_alloc_ctor(1, 2, 0); } else { - x_110 = x_99; + x_112 = x_101; } -lean_ctor_set(x_110, 0, x_109); -lean_ctor_set(x_110, 1, x_98); -x_111 = lean_alloc_ctor(0, 3, 0); -lean_ctor_set(x_111, 0, x_96); -lean_ctor_set(x_111, 1, x_97); -lean_ctor_set(x_111, 2, x_110); -x_112 = l___private_Init_Lean_Elab_Command_3__setState(x_111, x_2, x_38); -if (lean_obj_tag(x_112) == 0) +lean_ctor_set(x_112, 0, x_111); +lean_ctor_set(x_112, 1, x_100); +x_113 = lean_alloc_ctor(0, 4, 0); +lean_ctor_set(x_113, 0, x_97); +lean_ctor_set(x_113, 1, x_98); +lean_ctor_set(x_113, 2, x_112); +lean_ctor_set(x_113, 3, x_99); +x_114 = l___private_Init_Lean_Elab_Command_3__setState(x_113, x_2, x_39); +if (lean_obj_tag(x_114) == 0) { -lean_object* x_113; lean_object* x_114; lean_object* x_115; lean_object* x_116; -x_113 = lean_ctor_get(x_112, 1); -lean_inc(x_113); -if (lean_is_exclusive(x_112)) { - lean_ctor_release(x_112, 0); - lean_ctor_release(x_112, 1); - x_114 = x_112; -} else { - lean_dec_ref(x_112); - x_114 = lean_box(0); -} -x_115 = lean_box(0); -if (lean_is_scalar(x_114)) { - x_116 = lean_alloc_ctor(0, 2, 0); -} else { +lean_object* x_115; lean_object* x_116; lean_object* x_117; lean_object* x_118; +x_115 = lean_ctor_get(x_114, 1); +lean_inc(x_115); +if (lean_is_exclusive(x_114)) { + lean_ctor_release(x_114, 0); + lean_ctor_release(x_114, 1); x_116 = x_114; +} else { + lean_dec_ref(x_114); + x_116 = lean_box(0); } -lean_ctor_set(x_116, 0, x_115); -lean_ctor_set(x_116, 1, x_113); -return x_116; +x_117 = lean_box(0); +if (lean_is_scalar(x_116)) { + x_118 = lean_alloc_ctor(0, 2, 0); +} else { + x_118 = x_116; +} +lean_ctor_set(x_118, 0, x_117); +lean_ctor_set(x_118, 1, x_115); +return x_118; } else { -lean_object* x_117; lean_object* x_118; lean_object* x_119; lean_object* x_120; -x_117 = lean_ctor_get(x_112, 0); -lean_inc(x_117); -x_118 = lean_ctor_get(x_112, 1); -lean_inc(x_118); -if (lean_is_exclusive(x_112)) { - lean_ctor_release(x_112, 0); - lean_ctor_release(x_112, 1); - x_119 = x_112; +lean_object* x_119; lean_object* x_120; lean_object* x_121; lean_object* x_122; +x_119 = lean_ctor_get(x_114, 0); +lean_inc(x_119); +x_120 = lean_ctor_get(x_114, 1); +lean_inc(x_120); +if (lean_is_exclusive(x_114)) { + lean_ctor_release(x_114, 0); + lean_ctor_release(x_114, 1); + x_121 = x_114; } else { - lean_dec_ref(x_112); - x_119 = lean_box(0); + lean_dec_ref(x_114); + x_121 = lean_box(0); } -if (lean_is_scalar(x_119)) { - x_120 = lean_alloc_ctor(1, 2, 0); +if (lean_is_scalar(x_121)) { + x_122 = lean_alloc_ctor(1, 2, 0); } else { - x_120 = x_119; + x_122 = x_121; } -lean_ctor_set(x_120, 0, x_117); -lean_ctor_set(x_120, 1, x_118); -return x_120; +lean_ctor_set(x_122, 0, x_119); +lean_ctor_set(x_122, 1, x_120); +return x_122; } } } } else { -uint8_t x_121; +uint8_t x_123; lean_dec(x_2); lean_dec(x_1); -x_121 = !lean_is_exclusive(x_4); -if (x_121 == 0) +x_123 = !lean_is_exclusive(x_4); +if (x_123 == 0) { return x_4; } else { -lean_object* x_122; lean_object* x_123; lean_object* x_124; -x_122 = lean_ctor_get(x_4, 0); -x_123 = lean_ctor_get(x_4, 1); -lean_inc(x_123); -lean_inc(x_122); +lean_object* x_124; lean_object* x_125; lean_object* x_126; +x_124 = lean_ctor_get(x_4, 0); +x_125 = lean_ctor_get(x_4, 1); +lean_inc(x_125); +lean_inc(x_124); lean_dec(x_4); -x_124 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_124, 0, x_122); -lean_ctor_set(x_124, 1, x_123); -return x_124; +x_126 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_126, 0, x_124); +lean_ctor_set(x_126, 1, x_125); +return x_126; } } } @@ -12214,15 +13012,15 @@ lean_dec(x_5); x_8 = l_Lean_stxInh; x_9 = lean_unsigned_to_nat(1u); x_10 = lean_array_get(x_8, x_4, x_9); -x_11 = l___private_Init_Lean_Elab_Command_7__getVarDecls(x_6); lean_inc(x_10); -x_12 = lean_alloc_closure((void*)(l_Lean_Elab_Command_elabVariable___lambda__1___boxed), 4, 1); -lean_closure_set(x_12, 0, x_10); +x_11 = lean_alloc_closure((void*)(l_Lean_Elab_Command_elabVariable___lambda__1___boxed), 4, 1); +lean_closure_set(x_11, 0, x_10); +x_12 = l___private_Init_Lean_Elab_Command_7__getVarDecls(x_6); x_13 = l___private_Init_Lean_Elab_Command_5__mkTermContext(x_2, x_6); x_14 = l___private_Init_Lean_Elab_Command_6__mkTermState(x_6); lean_dec(x_6); -x_15 = l_Lean_Elab_Term_elabBinders___rarg(x_11, x_12, x_13, x_14); -lean_dec(x_11); +x_15 = l_Lean_Elab_Term_elabBinders___rarg(x_12, x_11, x_13, x_14); +lean_dec(x_12); if (lean_obj_tag(x_15) == 0) { lean_object* x_16; lean_object* x_17; @@ -12295,298 +13093,304 @@ return x_32; } else { -lean_object* x_33; lean_object* x_34; lean_object* x_35; +lean_object* x_33; lean_object* x_34; lean_object* x_35; lean_object* x_36; x_33 = lean_ctor_get(x_19, 2); +x_34 = lean_ctor_get(x_19, 3); +lean_inc(x_34); lean_inc(x_33); lean_dec(x_19); -x_34 = lean_alloc_ctor(0, 3, 0); -lean_ctor_set(x_34, 0, x_21); -lean_ctor_set(x_34, 1, x_22); -lean_ctor_set(x_34, 2, x_33); +x_35 = lean_alloc_ctor(0, 4, 0); +lean_ctor_set(x_35, 0, x_21); +lean_ctor_set(x_35, 1, x_22); +lean_ctor_set(x_35, 2, x_33); +lean_ctor_set(x_35, 3, x_34); lean_inc(x_2); -x_35 = l___private_Init_Lean_Elab_Command_3__setState(x_34, x_2, x_20); -if (lean_obj_tag(x_35) == 0) +x_36 = l___private_Init_Lean_Elab_Command_3__setState(x_35, x_2, x_20); +if (lean_obj_tag(x_36) == 0) { -lean_object* x_36; lean_object* x_37; -x_36 = lean_ctor_get(x_35, 1); -lean_inc(x_36); -lean_dec(x_35); -x_37 = l_Lean_Elab_Command_modifyScope___at_Lean_Elab_Command_elabVariable___spec__1(x_10, x_2, x_36); -return x_37; +lean_object* x_37; lean_object* x_38; +x_37 = lean_ctor_get(x_36, 1); +lean_inc(x_37); +lean_dec(x_36); +x_38 = l_Lean_Elab_Command_modifyScope___at_Lean_Elab_Command_elabVariable___spec__1(x_10, x_2, x_37); +return x_38; } else { -lean_object* x_38; lean_object* x_39; lean_object* x_40; lean_object* x_41; +lean_object* x_39; lean_object* x_40; lean_object* x_41; lean_object* x_42; lean_dec(x_10); lean_dec(x_2); -x_38 = lean_ctor_get(x_35, 0); -lean_inc(x_38); -x_39 = lean_ctor_get(x_35, 1); +x_39 = lean_ctor_get(x_36, 0); lean_inc(x_39); -if (lean_is_exclusive(x_35)) { - lean_ctor_release(x_35, 0); - lean_ctor_release(x_35, 1); - x_40 = x_35; +x_40 = lean_ctor_get(x_36, 1); +lean_inc(x_40); +if (lean_is_exclusive(x_36)) { + lean_ctor_release(x_36, 0); + lean_ctor_release(x_36, 1); + x_41 = x_36; } else { - lean_dec_ref(x_35); - x_40 = lean_box(0); + lean_dec_ref(x_36); + x_41 = lean_box(0); } -if (lean_is_scalar(x_40)) { - x_41 = lean_alloc_ctor(1, 2, 0); +if (lean_is_scalar(x_41)) { + x_42 = lean_alloc_ctor(1, 2, 0); } else { - x_41 = x_40; + x_42 = x_41; } -lean_ctor_set(x_41, 0, x_38); -lean_ctor_set(x_41, 1, x_39); -return x_41; +lean_ctor_set(x_42, 0, x_39); +lean_ctor_set(x_42, 1, x_40); +return x_42; } } } else { -uint8_t x_42; +uint8_t x_43; lean_dec(x_16); lean_dec(x_10); lean_dec(x_2); -x_42 = !lean_is_exclusive(x_17); -if (x_42 == 0) +x_43 = !lean_is_exclusive(x_17); +if (x_43 == 0) { return x_17; } else { -lean_object* x_43; lean_object* x_44; lean_object* x_45; -x_43 = lean_ctor_get(x_17, 0); -x_44 = lean_ctor_get(x_17, 1); +lean_object* x_44; lean_object* x_45; lean_object* x_46; +x_44 = lean_ctor_get(x_17, 0); +x_45 = lean_ctor_get(x_17, 1); +lean_inc(x_45); lean_inc(x_44); -lean_inc(x_43); lean_dec(x_17); -x_45 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_45, 0, x_43); -lean_ctor_set(x_45, 1, x_44); -return x_45; +x_46 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_46, 0, x_44); +lean_ctor_set(x_46, 1, x_45); +return x_46; } } } else { -lean_object* x_46; -x_46 = lean_ctor_get(x_15, 0); -lean_inc(x_46); -if (lean_obj_tag(x_46) == 0) -{ -lean_object* x_47; lean_object* x_48; lean_object* x_49; -lean_dec(x_10); -x_47 = lean_ctor_get(x_15, 1); +lean_object* x_47; +x_47 = lean_ctor_get(x_15, 0); lean_inc(x_47); -lean_dec(x_15); -x_48 = lean_ctor_get(x_46, 0); -lean_inc(x_48); -lean_dec(x_46); -lean_inc(x_2); -x_49 = l___private_Init_Lean_Elab_Command_2__getState(x_2, x_7); -if (lean_obj_tag(x_49) == 0) +if (lean_obj_tag(x_47) == 0) { -lean_object* x_50; lean_object* x_51; lean_object* x_52; lean_object* x_53; lean_object* x_54; uint8_t x_55; -x_50 = lean_ctor_get(x_47, 0); -lean_inc(x_50); -x_51 = lean_ctor_get(x_49, 0); +lean_object* x_48; lean_object* x_49; lean_object* x_50; +lean_dec(x_10); +x_48 = lean_ctor_get(x_15, 1); +lean_inc(x_48); +lean_dec(x_15); +x_49 = lean_ctor_get(x_47, 0); +lean_inc(x_49); +lean_dec(x_47); +lean_inc(x_2); +x_50 = l___private_Init_Lean_Elab_Command_2__getState(x_2, x_7); +if (lean_obj_tag(x_50) == 0) +{ +lean_object* x_51; lean_object* x_52; lean_object* x_53; lean_object* x_54; lean_object* x_55; uint8_t x_56; +x_51 = lean_ctor_get(x_48, 0); lean_inc(x_51); -x_52 = lean_ctor_get(x_49, 1); +x_52 = lean_ctor_get(x_50, 0); lean_inc(x_52); -lean_dec(x_49); -x_53 = lean_ctor_get(x_50, 0); +x_53 = lean_ctor_get(x_50, 1); lean_inc(x_53); lean_dec(x_50); -x_54 = lean_ctor_get(x_47, 2); +x_54 = lean_ctor_get(x_51, 0); lean_inc(x_54); -lean_dec(x_47); -x_55 = !lean_is_exclusive(x_51); -if (x_55 == 0) -{ -lean_object* x_56; lean_object* x_57; lean_object* x_58; -x_56 = lean_ctor_get(x_51, 1); -lean_dec(x_56); -x_57 = lean_ctor_get(x_51, 0); -lean_dec(x_57); -lean_ctor_set(x_51, 1, x_54); -lean_ctor_set(x_51, 0, x_53); -x_58 = l___private_Init_Lean_Elab_Command_3__setState(x_51, x_2, x_52); -if (lean_obj_tag(x_58) == 0) -{ -uint8_t x_59; -x_59 = !lean_is_exclusive(x_58); -if (x_59 == 0) -{ -lean_object* x_60; -x_60 = lean_ctor_get(x_58, 0); -lean_dec(x_60); -lean_ctor_set_tag(x_58, 1); -lean_ctor_set(x_58, 0, x_48); -return x_58; -} -else -{ -lean_object* x_61; lean_object* x_62; -x_61 = lean_ctor_get(x_58, 1); -lean_inc(x_61); -lean_dec(x_58); -x_62 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_62, 0, x_48); -lean_ctor_set(x_62, 1, x_61); -return x_62; -} -} -else -{ -uint8_t x_63; -lean_dec(x_48); -x_63 = !lean_is_exclusive(x_58); -if (x_63 == 0) -{ -return x_58; -} -else -{ -lean_object* x_64; lean_object* x_65; lean_object* x_66; -x_64 = lean_ctor_get(x_58, 0); -x_65 = lean_ctor_get(x_58, 1); -lean_inc(x_65); -lean_inc(x_64); -lean_dec(x_58); -x_66 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_66, 0, x_64); -lean_ctor_set(x_66, 1, x_65); -return x_66; -} -} -} -else -{ -lean_object* x_67; lean_object* x_68; lean_object* x_69; -x_67 = lean_ctor_get(x_51, 2); -lean_inc(x_67); lean_dec(x_51); -x_68 = lean_alloc_ctor(0, 3, 0); -lean_ctor_set(x_68, 0, x_53); -lean_ctor_set(x_68, 1, x_54); -lean_ctor_set(x_68, 2, x_67); -x_69 = l___private_Init_Lean_Elab_Command_3__setState(x_68, x_2, x_52); -if (lean_obj_tag(x_69) == 0) -{ -lean_object* x_70; lean_object* x_71; lean_object* x_72; -x_70 = lean_ctor_get(x_69, 1); -lean_inc(x_70); -if (lean_is_exclusive(x_69)) { - lean_ctor_release(x_69, 0); - lean_ctor_release(x_69, 1); - x_71 = x_69; -} else { - lean_dec_ref(x_69); - x_71 = lean_box(0); -} -if (lean_is_scalar(x_71)) { - x_72 = lean_alloc_ctor(1, 2, 0); -} else { - x_72 = x_71; - lean_ctor_set_tag(x_72, 1); -} -lean_ctor_set(x_72, 0, x_48); -lean_ctor_set(x_72, 1, x_70); -return x_72; -} -else -{ -lean_object* x_73; lean_object* x_74; lean_object* x_75; lean_object* x_76; +x_55 = lean_ctor_get(x_48, 2); +lean_inc(x_55); lean_dec(x_48); -x_73 = lean_ctor_get(x_69, 0); -lean_inc(x_73); -x_74 = lean_ctor_get(x_69, 1); -lean_inc(x_74); -if (lean_is_exclusive(x_69)) { - lean_ctor_release(x_69, 0); - lean_ctor_release(x_69, 1); - x_75 = x_69; -} else { - lean_dec_ref(x_69); - x_75 = lean_box(0); -} -if (lean_is_scalar(x_75)) { - x_76 = lean_alloc_ctor(1, 2, 0); -} else { - x_76 = x_75; -} -lean_ctor_set(x_76, 0, x_73); -lean_ctor_set(x_76, 1, x_74); -return x_76; +x_56 = !lean_is_exclusive(x_52); +if (x_56 == 0) +{ +lean_object* x_57; lean_object* x_58; lean_object* x_59; +x_57 = lean_ctor_get(x_52, 1); +lean_dec(x_57); +x_58 = lean_ctor_get(x_52, 0); +lean_dec(x_58); +lean_ctor_set(x_52, 1, x_55); +lean_ctor_set(x_52, 0, x_54); +x_59 = l___private_Init_Lean_Elab_Command_3__setState(x_52, x_2, x_53); +if (lean_obj_tag(x_59) == 0) +{ +uint8_t x_60; +x_60 = !lean_is_exclusive(x_59); +if (x_60 == 0) +{ +lean_object* x_61; +x_61 = lean_ctor_get(x_59, 0); +lean_dec(x_61); +lean_ctor_set_tag(x_59, 1); +lean_ctor_set(x_59, 0, x_49); +return x_59; } +else +{ +lean_object* x_62; lean_object* x_63; +x_62 = lean_ctor_get(x_59, 1); +lean_inc(x_62); +lean_dec(x_59); +x_63 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_63, 0, x_49); +lean_ctor_set(x_63, 1, x_62); +return x_63; } } else { -uint8_t x_77; -lean_dec(x_48); -lean_dec(x_47); -lean_dec(x_2); -x_77 = !lean_is_exclusive(x_49); -if (x_77 == 0) -{ -return x_49; -} -else -{ -lean_object* x_78; lean_object* x_79; lean_object* x_80; -x_78 = lean_ctor_get(x_49, 0); -x_79 = lean_ctor_get(x_49, 1); -lean_inc(x_79); -lean_inc(x_78); +uint8_t x_64; lean_dec(x_49); -x_80 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_80, 0, x_78); -lean_ctor_set(x_80, 1, x_79); -return x_80; +x_64 = !lean_is_exclusive(x_59); +if (x_64 == 0) +{ +return x_59; +} +else +{ +lean_object* x_65; lean_object* x_66; lean_object* x_67; +x_65 = lean_ctor_get(x_59, 0); +x_66 = lean_ctor_get(x_59, 1); +lean_inc(x_66); +lean_inc(x_65); +lean_dec(x_59); +x_67 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_67, 0, x_65); +lean_ctor_set(x_67, 1, x_66); +return x_67; } } } else { -lean_object* x_81; lean_object* x_82; lean_object* x_83; -lean_dec(x_15); -x_81 = l_Lean_Elab_Command_runTermElabM___rarg___closed__1; -x_82 = l_unreachable_x21___rarg(x_81); -lean_inc(x_2); -x_83 = lean_apply_2(x_82, x_2, x_7); -if (lean_obj_tag(x_83) == 0) +lean_object* x_68; lean_object* x_69; lean_object* x_70; lean_object* x_71; +x_68 = lean_ctor_get(x_52, 2); +x_69 = lean_ctor_get(x_52, 3); +lean_inc(x_69); +lean_inc(x_68); +lean_dec(x_52); +x_70 = lean_alloc_ctor(0, 4, 0); +lean_ctor_set(x_70, 0, x_54); +lean_ctor_set(x_70, 1, x_55); +lean_ctor_set(x_70, 2, x_68); +lean_ctor_set(x_70, 3, x_69); +x_71 = l___private_Init_Lean_Elab_Command_3__setState(x_70, x_2, x_53); +if (lean_obj_tag(x_71) == 0) +{ +lean_object* x_72; lean_object* x_73; lean_object* x_74; +x_72 = lean_ctor_get(x_71, 1); +lean_inc(x_72); +if (lean_is_exclusive(x_71)) { + lean_ctor_release(x_71, 0); + lean_ctor_release(x_71, 1); + x_73 = x_71; +} else { + lean_dec_ref(x_71); + x_73 = lean_box(0); +} +if (lean_is_scalar(x_73)) { + x_74 = lean_alloc_ctor(1, 2, 0); +} else { + x_74 = x_73; + lean_ctor_set_tag(x_74, 1); +} +lean_ctor_set(x_74, 0, x_49); +lean_ctor_set(x_74, 1, x_72); +return x_74; +} +else +{ +lean_object* x_75; lean_object* x_76; lean_object* x_77; lean_object* x_78; +lean_dec(x_49); +x_75 = lean_ctor_get(x_71, 0); +lean_inc(x_75); +x_76 = lean_ctor_get(x_71, 1); +lean_inc(x_76); +if (lean_is_exclusive(x_71)) { + lean_ctor_release(x_71, 0); + lean_ctor_release(x_71, 1); + x_77 = x_71; +} else { + lean_dec_ref(x_71); + x_77 = lean_box(0); +} +if (lean_is_scalar(x_77)) { + x_78 = lean_alloc_ctor(1, 2, 0); +} else { + x_78 = x_77; +} +lean_ctor_set(x_78, 0, x_75); +lean_ctor_set(x_78, 1, x_76); +return x_78; +} +} +} +else +{ +uint8_t x_79; +lean_dec(x_49); +lean_dec(x_48); +lean_dec(x_2); +x_79 = !lean_is_exclusive(x_50); +if (x_79 == 0) +{ +return x_50; +} +else +{ +lean_object* x_80; lean_object* x_81; lean_object* x_82; +x_80 = lean_ctor_get(x_50, 0); +x_81 = lean_ctor_get(x_50, 1); +lean_inc(x_81); +lean_inc(x_80); +lean_dec(x_50); +x_82 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_82, 0, x_80); +lean_ctor_set(x_82, 1, x_81); +return x_82; +} +} +} +else +{ +lean_object* x_83; lean_object* x_84; lean_object* x_85; +lean_dec(x_15); +x_83 = l_Lean_Elab_Command_runTermElabM___rarg___closed__1; +x_84 = l_unreachable_x21___rarg(x_83); +lean_inc(x_2); +x_85 = lean_apply_2(x_84, x_2, x_7); +if (lean_obj_tag(x_85) == 0) +{ +lean_object* x_86; lean_object* x_87; +x_86 = lean_ctor_get(x_85, 1); +lean_inc(x_86); +lean_dec(x_85); +x_87 = l_Lean_Elab_Command_modifyScope___at_Lean_Elab_Command_elabVariable___spec__1(x_10, x_2, x_86); +return x_87; +} +else +{ +uint8_t x_88; +lean_dec(x_10); +lean_dec(x_2); +x_88 = !lean_is_exclusive(x_85); +if (x_88 == 0) { -lean_object* x_84; lean_object* x_85; -x_84 = lean_ctor_get(x_83, 1); -lean_inc(x_84); -lean_dec(x_83); -x_85 = l_Lean_Elab_Command_modifyScope___at_Lean_Elab_Command_elabVariable___spec__1(x_10, x_2, x_84); return x_85; } else { -uint8_t x_86; -lean_dec(x_10); -lean_dec(x_2); -x_86 = !lean_is_exclusive(x_83); -if (x_86 == 0) -{ -return x_83; -} -else -{ -lean_object* x_87; lean_object* x_88; lean_object* x_89; -x_87 = lean_ctor_get(x_83, 0); -x_88 = lean_ctor_get(x_83, 1); -lean_inc(x_88); -lean_inc(x_87); -lean_dec(x_83); -x_89 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_89, 0, x_87); -lean_ctor_set(x_89, 1, x_88); -return x_89; +lean_object* x_89; lean_object* x_90; lean_object* x_91; +x_89 = lean_ctor_get(x_85, 0); +x_90 = lean_ctor_get(x_85, 1); +lean_inc(x_90); +lean_inc(x_89); +lean_dec(x_85); +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; } } } @@ -12594,25 +13398,25 @@ return x_89; } else { -uint8_t x_90; +uint8_t x_92; lean_dec(x_2); -x_90 = !lean_is_exclusive(x_5); -if (x_90 == 0) +x_92 = !lean_is_exclusive(x_5); +if (x_92 == 0) { return x_5; } else { -lean_object* x_91; lean_object* x_92; lean_object* x_93; -x_91 = lean_ctor_get(x_5, 0); -x_92 = lean_ctor_get(x_5, 1); -lean_inc(x_92); -lean_inc(x_91); +lean_object* x_93; lean_object* x_94; lean_object* x_95; +x_93 = lean_ctor_get(x_5, 0); +x_94 = lean_ctor_get(x_5, 1); +lean_inc(x_94); +lean_inc(x_93); lean_dec(x_5); -x_93 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_93, 0, x_91); -lean_ctor_set(x_93, 1, x_92); -return x_93; +x_95 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_95, 0, x_93); +lean_ctor_set(x_95, 1, x_94); +return x_95; } } } @@ -12752,477 +13556,484 @@ return x_22; } else { -lean_object* x_23; lean_object* x_24; lean_object* x_25; lean_object* x_26; lean_object* x_27; lean_object* x_28; +lean_object* x_23; lean_object* x_24; lean_object* x_25; lean_object* x_26; lean_object* x_27; lean_object* x_28; lean_object* x_29; x_23 = lean_ctor_get(x_5, 0); x_24 = lean_ctor_get(x_5, 1); +x_25 = lean_ctor_get(x_5, 3); +lean_inc(x_25); lean_inc(x_24); lean_inc(x_23); lean_dec(x_5); -x_25 = l_Lean_Elab_Command_modifyScope___closed__1; -x_26 = l_unreachable_x21___rarg(x_25); -x_27 = lean_alloc_ctor(0, 3, 0); -lean_ctor_set(x_27, 0, x_23); -lean_ctor_set(x_27, 1, x_24); -lean_ctor_set(x_27, 2, x_26); -x_28 = l___private_Init_Lean_Elab_Command_3__setState(x_27, x_2, x_7); -if (lean_obj_tag(x_28) == 0) +x_26 = l_Lean_Elab_Command_modifyScope___closed__1; +x_27 = l_unreachable_x21___rarg(x_26); +x_28 = lean_alloc_ctor(0, 4, 0); +lean_ctor_set(x_28, 0, x_23); +lean_ctor_set(x_28, 1, x_24); +lean_ctor_set(x_28, 2, x_27); +lean_ctor_set(x_28, 3, x_25); +x_29 = l___private_Init_Lean_Elab_Command_3__setState(x_28, x_2, x_7); +if (lean_obj_tag(x_29) == 0) { -lean_object* x_29; lean_object* x_30; lean_object* x_31; lean_object* x_32; -x_29 = lean_ctor_get(x_28, 1); -lean_inc(x_29); -if (lean_is_exclusive(x_28)) { - lean_ctor_release(x_28, 0); - lean_ctor_release(x_28, 1); - x_30 = x_28; +lean_object* x_30; lean_object* x_31; lean_object* x_32; lean_object* x_33; +x_30 = lean_ctor_get(x_29, 1); +lean_inc(x_30); +if (lean_is_exclusive(x_29)) { + lean_ctor_release(x_29, 0); + lean_ctor_release(x_29, 1); + x_31 = x_29; } else { - lean_dec_ref(x_28); - x_30 = lean_box(0); + lean_dec_ref(x_29); + x_31 = lean_box(0); } -x_31 = lean_box(0); -if (lean_is_scalar(x_30)) { - x_32 = lean_alloc_ctor(0, 2, 0); +x_32 = lean_box(0); +if (lean_is_scalar(x_31)) { + x_33 = lean_alloc_ctor(0, 2, 0); } else { - x_32 = x_30; + x_33 = x_31; } -lean_ctor_set(x_32, 0, x_31); -lean_ctor_set(x_32, 1, x_29); -return x_32; +lean_ctor_set(x_33, 0, x_32); +lean_ctor_set(x_33, 1, x_30); +return x_33; } else { -lean_object* x_33; lean_object* x_34; lean_object* x_35; lean_object* x_36; -x_33 = lean_ctor_get(x_28, 0); -lean_inc(x_33); -x_34 = lean_ctor_get(x_28, 1); +lean_object* x_34; lean_object* x_35; lean_object* x_36; lean_object* x_37; +x_34 = lean_ctor_get(x_29, 0); lean_inc(x_34); -if (lean_is_exclusive(x_28)) { - lean_ctor_release(x_28, 0); - lean_ctor_release(x_28, 1); - x_35 = x_28; +x_35 = lean_ctor_get(x_29, 1); +lean_inc(x_35); +if (lean_is_exclusive(x_29)) { + lean_ctor_release(x_29, 0); + lean_ctor_release(x_29, 1); + x_36 = x_29; } else { - lean_dec_ref(x_28); - x_35 = lean_box(0); + lean_dec_ref(x_29); + x_36 = lean_box(0); } -if (lean_is_scalar(x_35)) { - x_36 = lean_alloc_ctor(1, 2, 0); +if (lean_is_scalar(x_36)) { + x_37 = lean_alloc_ctor(1, 2, 0); } else { - x_36 = x_35; + x_37 = x_36; } -lean_ctor_set(x_36, 0, x_33); -lean_ctor_set(x_36, 1, x_34); -return x_36; +lean_ctor_set(x_37, 0, x_34); +lean_ctor_set(x_37, 1, x_35); +return x_37; } } } else { -lean_object* x_37; lean_object* x_38; uint8_t x_39; -x_37 = lean_ctor_get(x_6, 0); -lean_inc(x_37); -x_38 = lean_ctor_get(x_4, 1); +lean_object* x_38; lean_object* x_39; uint8_t x_40; +x_38 = lean_ctor_get(x_6, 0); lean_inc(x_38); +x_39 = lean_ctor_get(x_4, 1); +lean_inc(x_39); lean_dec(x_4); -x_39 = !lean_is_exclusive(x_5); -if (x_39 == 0) +x_40 = !lean_is_exclusive(x_5); +if (x_40 == 0) { -lean_object* x_40; uint8_t x_41; -x_40 = lean_ctor_get(x_5, 2); -lean_dec(x_40); -x_41 = !lean_is_exclusive(x_6); -if (x_41 == 0) +lean_object* x_41; uint8_t x_42; +x_41 = lean_ctor_get(x_5, 2); +lean_dec(x_41); +x_42 = !lean_is_exclusive(x_6); +if (x_42 == 0) { -lean_object* x_42; uint8_t x_43; -x_42 = lean_ctor_get(x_6, 0); -lean_dec(x_42); -x_43 = !lean_is_exclusive(x_37); -if (x_43 == 0) +lean_object* x_43; uint8_t x_44; +x_43 = lean_ctor_get(x_6, 0); +lean_dec(x_43); +x_44 = !lean_is_exclusive(x_38); +if (x_44 == 0) { -lean_object* x_44; lean_object* x_45; lean_object* x_46; lean_object* x_47; -x_44 = lean_ctor_get(x_37, 6); -x_45 = lean_unsigned_to_nat(0u); -x_46 = l_Array_iterateMAux___main___at_Array_append___spec__1___rarg(x_1, x_1, x_45, x_44); -lean_ctor_set(x_37, 6, x_46); -x_47 = l___private_Init_Lean_Elab_Command_3__setState(x_5, x_2, x_38); -if (lean_obj_tag(x_47) == 0) +lean_object* x_45; lean_object* x_46; lean_object* x_47; lean_object* x_48; +x_45 = lean_ctor_get(x_38, 6); +x_46 = lean_unsigned_to_nat(0u); +x_47 = l_Array_iterateMAux___main___at_Array_append___spec__1___rarg(x_1, x_1, x_46, x_45); +lean_ctor_set(x_38, 6, x_47); +x_48 = l___private_Init_Lean_Elab_Command_3__setState(x_5, x_2, x_39); +if (lean_obj_tag(x_48) == 0) { -uint8_t x_48; -x_48 = !lean_is_exclusive(x_47); -if (x_48 == 0) +uint8_t x_49; +x_49 = !lean_is_exclusive(x_48); +if (x_49 == 0) { -lean_object* x_49; lean_object* x_50; -x_49 = lean_ctor_get(x_47, 0); -lean_dec(x_49); -x_50 = lean_box(0); -lean_ctor_set(x_47, 0, x_50); -return x_47; +lean_object* x_50; lean_object* x_51; +x_50 = lean_ctor_get(x_48, 0); +lean_dec(x_50); +x_51 = lean_box(0); +lean_ctor_set(x_48, 0, x_51); +return x_48; } else { -lean_object* x_51; lean_object* x_52; lean_object* x_53; -x_51 = lean_ctor_get(x_47, 1); -lean_inc(x_51); -lean_dec(x_47); -x_52 = lean_box(0); -x_53 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_53, 0, x_52); -lean_ctor_set(x_53, 1, x_51); -return x_53; +lean_object* x_52; lean_object* x_53; lean_object* x_54; +x_52 = lean_ctor_get(x_48, 1); +lean_inc(x_52); +lean_dec(x_48); +x_53 = lean_box(0); +x_54 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_54, 0, x_53); +lean_ctor_set(x_54, 1, x_52); +return x_54; } } else { -uint8_t x_54; -x_54 = !lean_is_exclusive(x_47); -if (x_54 == 0) +uint8_t x_55; +x_55 = !lean_is_exclusive(x_48); +if (x_55 == 0) { -return x_47; +return x_48; } else { -lean_object* x_55; lean_object* x_56; lean_object* x_57; -x_55 = lean_ctor_get(x_47, 0); -x_56 = lean_ctor_get(x_47, 1); +lean_object* x_56; lean_object* x_57; lean_object* x_58; +x_56 = lean_ctor_get(x_48, 0); +x_57 = lean_ctor_get(x_48, 1); +lean_inc(x_57); lean_inc(x_56); -lean_inc(x_55); -lean_dec(x_47); -x_57 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_57, 0, x_55); -lean_ctor_set(x_57, 1, x_56); -return x_57; +lean_dec(x_48); +x_58 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_58, 0, x_56); +lean_ctor_set(x_58, 1, x_57); +return x_58; } } } else { -lean_object* x_58; lean_object* x_59; lean_object* x_60; lean_object* x_61; lean_object* x_62; lean_object* x_63; lean_object* x_64; lean_object* x_65; lean_object* x_66; lean_object* x_67; lean_object* x_68; -x_58 = lean_ctor_get(x_37, 0); -x_59 = lean_ctor_get(x_37, 1); -x_60 = lean_ctor_get(x_37, 2); -x_61 = lean_ctor_get(x_37, 3); -x_62 = lean_ctor_get(x_37, 4); -x_63 = lean_ctor_get(x_37, 5); -x_64 = lean_ctor_get(x_37, 6); +lean_object* x_59; lean_object* x_60; lean_object* x_61; lean_object* x_62; lean_object* x_63; lean_object* x_64; lean_object* x_65; lean_object* x_66; lean_object* x_67; lean_object* x_68; lean_object* x_69; +x_59 = lean_ctor_get(x_38, 0); +x_60 = lean_ctor_get(x_38, 1); +x_61 = lean_ctor_get(x_38, 2); +x_62 = lean_ctor_get(x_38, 3); +x_63 = lean_ctor_get(x_38, 4); +x_64 = lean_ctor_get(x_38, 5); +x_65 = lean_ctor_get(x_38, 6); +lean_inc(x_65); lean_inc(x_64); lean_inc(x_63); lean_inc(x_62); lean_inc(x_61); lean_inc(x_60); lean_inc(x_59); -lean_inc(x_58); -lean_dec(x_37); -x_65 = lean_unsigned_to_nat(0u); -x_66 = l_Array_iterateMAux___main___at_Array_append___spec__1___rarg(x_1, x_1, x_65, x_64); -x_67 = lean_alloc_ctor(0, 7, 0); -lean_ctor_set(x_67, 0, x_58); -lean_ctor_set(x_67, 1, x_59); -lean_ctor_set(x_67, 2, x_60); -lean_ctor_set(x_67, 3, x_61); -lean_ctor_set(x_67, 4, x_62); -lean_ctor_set(x_67, 5, x_63); -lean_ctor_set(x_67, 6, x_66); -lean_ctor_set(x_6, 0, x_67); -x_68 = l___private_Init_Lean_Elab_Command_3__setState(x_5, x_2, x_38); -if (lean_obj_tag(x_68) == 0) +lean_dec(x_38); +x_66 = lean_unsigned_to_nat(0u); +x_67 = l_Array_iterateMAux___main___at_Array_append___spec__1___rarg(x_1, x_1, x_66, x_65); +x_68 = lean_alloc_ctor(0, 7, 0); +lean_ctor_set(x_68, 0, x_59); +lean_ctor_set(x_68, 1, x_60); +lean_ctor_set(x_68, 2, x_61); +lean_ctor_set(x_68, 3, x_62); +lean_ctor_set(x_68, 4, x_63); +lean_ctor_set(x_68, 5, x_64); +lean_ctor_set(x_68, 6, x_67); +lean_ctor_set(x_6, 0, x_68); +x_69 = l___private_Init_Lean_Elab_Command_3__setState(x_5, x_2, x_39); +if (lean_obj_tag(x_69) == 0) { -lean_object* x_69; lean_object* x_70; lean_object* x_71; lean_object* x_72; -x_69 = lean_ctor_get(x_68, 1); -lean_inc(x_69); -if (lean_is_exclusive(x_68)) { - lean_ctor_release(x_68, 0); - lean_ctor_release(x_68, 1); - x_70 = x_68; +lean_object* x_70; lean_object* x_71; lean_object* x_72; lean_object* x_73; +x_70 = lean_ctor_get(x_69, 1); +lean_inc(x_70); +if (lean_is_exclusive(x_69)) { + lean_ctor_release(x_69, 0); + lean_ctor_release(x_69, 1); + x_71 = x_69; } else { - lean_dec_ref(x_68); - x_70 = lean_box(0); + lean_dec_ref(x_69); + x_71 = lean_box(0); } -x_71 = lean_box(0); -if (lean_is_scalar(x_70)) { - x_72 = lean_alloc_ctor(0, 2, 0); +x_72 = lean_box(0); +if (lean_is_scalar(x_71)) { + x_73 = lean_alloc_ctor(0, 2, 0); } else { - x_72 = x_70; + x_73 = x_71; } -lean_ctor_set(x_72, 0, x_71); -lean_ctor_set(x_72, 1, x_69); -return x_72; +lean_ctor_set(x_73, 0, x_72); +lean_ctor_set(x_73, 1, x_70); +return x_73; } else { -lean_object* x_73; lean_object* x_74; lean_object* x_75; lean_object* x_76; -x_73 = lean_ctor_get(x_68, 0); -lean_inc(x_73); -x_74 = lean_ctor_get(x_68, 1); +lean_object* x_74; lean_object* x_75; lean_object* x_76; lean_object* x_77; +x_74 = lean_ctor_get(x_69, 0); lean_inc(x_74); -if (lean_is_exclusive(x_68)) { - lean_ctor_release(x_68, 0); - lean_ctor_release(x_68, 1); - x_75 = x_68; +x_75 = lean_ctor_get(x_69, 1); +lean_inc(x_75); +if (lean_is_exclusive(x_69)) { + lean_ctor_release(x_69, 0); + lean_ctor_release(x_69, 1); + x_76 = x_69; } else { - lean_dec_ref(x_68); - x_75 = lean_box(0); + lean_dec_ref(x_69); + x_76 = lean_box(0); } -if (lean_is_scalar(x_75)) { - x_76 = lean_alloc_ctor(1, 2, 0); +if (lean_is_scalar(x_76)) { + x_77 = lean_alloc_ctor(1, 2, 0); } else { - x_76 = x_75; + x_77 = x_76; } -lean_ctor_set(x_76, 0, x_73); -lean_ctor_set(x_76, 1, x_74); -return x_76; +lean_ctor_set(x_77, 0, x_74); +lean_ctor_set(x_77, 1, x_75); +return x_77; } } } else { -lean_object* x_77; lean_object* x_78; lean_object* x_79; lean_object* x_80; lean_object* x_81; lean_object* x_82; lean_object* x_83; lean_object* x_84; lean_object* x_85; lean_object* x_86; lean_object* x_87; lean_object* x_88; lean_object* x_89; lean_object* x_90; -x_77 = lean_ctor_get(x_6, 1); -lean_inc(x_77); -lean_dec(x_6); -x_78 = lean_ctor_get(x_37, 0); +lean_object* x_78; lean_object* x_79; lean_object* x_80; lean_object* x_81; lean_object* x_82; lean_object* x_83; lean_object* x_84; lean_object* x_85; lean_object* x_86; lean_object* x_87; lean_object* x_88; lean_object* x_89; lean_object* x_90; lean_object* x_91; +x_78 = lean_ctor_get(x_6, 1); lean_inc(x_78); -x_79 = lean_ctor_get(x_37, 1); +lean_dec(x_6); +x_79 = lean_ctor_get(x_38, 0); lean_inc(x_79); -x_80 = lean_ctor_get(x_37, 2); +x_80 = lean_ctor_get(x_38, 1); lean_inc(x_80); -x_81 = lean_ctor_get(x_37, 3); +x_81 = lean_ctor_get(x_38, 2); lean_inc(x_81); -x_82 = lean_ctor_get(x_37, 4); +x_82 = lean_ctor_get(x_38, 3); lean_inc(x_82); -x_83 = lean_ctor_get(x_37, 5); +x_83 = lean_ctor_get(x_38, 4); lean_inc(x_83); -x_84 = lean_ctor_get(x_37, 6); +x_84 = lean_ctor_get(x_38, 5); lean_inc(x_84); -if (lean_is_exclusive(x_37)) { - lean_ctor_release(x_37, 0); - lean_ctor_release(x_37, 1); - lean_ctor_release(x_37, 2); - lean_ctor_release(x_37, 3); - lean_ctor_release(x_37, 4); - lean_ctor_release(x_37, 5); - lean_ctor_release(x_37, 6); - x_85 = x_37; +x_85 = lean_ctor_get(x_38, 6); +lean_inc(x_85); +if (lean_is_exclusive(x_38)) { + lean_ctor_release(x_38, 0); + lean_ctor_release(x_38, 1); + lean_ctor_release(x_38, 2); + lean_ctor_release(x_38, 3); + lean_ctor_release(x_38, 4); + lean_ctor_release(x_38, 5); + lean_ctor_release(x_38, 6); + x_86 = x_38; } else { - lean_dec_ref(x_37); - x_85 = lean_box(0); + lean_dec_ref(x_38); + x_86 = lean_box(0); } -x_86 = lean_unsigned_to_nat(0u); -x_87 = l_Array_iterateMAux___main___at_Array_append___spec__1___rarg(x_1, x_1, x_86, x_84); -if (lean_is_scalar(x_85)) { - x_88 = lean_alloc_ctor(0, 7, 0); +x_87 = lean_unsigned_to_nat(0u); +x_88 = l_Array_iterateMAux___main___at_Array_append___spec__1___rarg(x_1, x_1, x_87, x_85); +if (lean_is_scalar(x_86)) { + x_89 = lean_alloc_ctor(0, 7, 0); } else { - x_88 = x_85; + x_89 = x_86; } -lean_ctor_set(x_88, 0, x_78); -lean_ctor_set(x_88, 1, x_79); -lean_ctor_set(x_88, 2, x_80); -lean_ctor_set(x_88, 3, x_81); -lean_ctor_set(x_88, 4, x_82); -lean_ctor_set(x_88, 5, x_83); -lean_ctor_set(x_88, 6, x_87); -x_89 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_89, 0, x_88); -lean_ctor_set(x_89, 1, x_77); -lean_ctor_set(x_5, 2, x_89); -x_90 = l___private_Init_Lean_Elab_Command_3__setState(x_5, x_2, x_38); -if (lean_obj_tag(x_90) == 0) +lean_ctor_set(x_89, 0, x_79); +lean_ctor_set(x_89, 1, x_80); +lean_ctor_set(x_89, 2, x_81); +lean_ctor_set(x_89, 3, x_82); +lean_ctor_set(x_89, 4, x_83); +lean_ctor_set(x_89, 5, x_84); +lean_ctor_set(x_89, 6, x_88); +x_90 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_90, 0, x_89); +lean_ctor_set(x_90, 1, x_78); +lean_ctor_set(x_5, 2, x_90); +x_91 = l___private_Init_Lean_Elab_Command_3__setState(x_5, x_2, x_39); +if (lean_obj_tag(x_91) == 0) { -lean_object* x_91; lean_object* x_92; lean_object* x_93; lean_object* x_94; -x_91 = lean_ctor_get(x_90, 1); -lean_inc(x_91); -if (lean_is_exclusive(x_90)) { - lean_ctor_release(x_90, 0); - lean_ctor_release(x_90, 1); - x_92 = x_90; +lean_object* x_92; lean_object* x_93; lean_object* x_94; lean_object* x_95; +x_92 = lean_ctor_get(x_91, 1); +lean_inc(x_92); +if (lean_is_exclusive(x_91)) { + lean_ctor_release(x_91, 0); + lean_ctor_release(x_91, 1); + x_93 = x_91; } else { - lean_dec_ref(x_90); - x_92 = lean_box(0); + lean_dec_ref(x_91); + x_93 = lean_box(0); } -x_93 = lean_box(0); -if (lean_is_scalar(x_92)) { - x_94 = lean_alloc_ctor(0, 2, 0); +x_94 = lean_box(0); +if (lean_is_scalar(x_93)) { + x_95 = lean_alloc_ctor(0, 2, 0); } else { - x_94 = x_92; + x_95 = x_93; } -lean_ctor_set(x_94, 0, x_93); -lean_ctor_set(x_94, 1, x_91); -return x_94; +lean_ctor_set(x_95, 0, x_94); +lean_ctor_set(x_95, 1, x_92); +return x_95; } else { -lean_object* x_95; lean_object* x_96; lean_object* x_97; lean_object* x_98; -x_95 = lean_ctor_get(x_90, 0); -lean_inc(x_95); -x_96 = lean_ctor_get(x_90, 1); +lean_object* x_96; lean_object* x_97; lean_object* x_98; lean_object* x_99; +x_96 = lean_ctor_get(x_91, 0); lean_inc(x_96); -if (lean_is_exclusive(x_90)) { - lean_ctor_release(x_90, 0); - lean_ctor_release(x_90, 1); - x_97 = x_90; +x_97 = lean_ctor_get(x_91, 1); +lean_inc(x_97); +if (lean_is_exclusive(x_91)) { + lean_ctor_release(x_91, 0); + lean_ctor_release(x_91, 1); + x_98 = x_91; } else { - lean_dec_ref(x_90); - x_97 = lean_box(0); + lean_dec_ref(x_91); + x_98 = lean_box(0); } -if (lean_is_scalar(x_97)) { - x_98 = lean_alloc_ctor(1, 2, 0); +if (lean_is_scalar(x_98)) { + x_99 = lean_alloc_ctor(1, 2, 0); } else { - x_98 = x_97; + x_99 = x_98; } -lean_ctor_set(x_98, 0, x_95); -lean_ctor_set(x_98, 1, x_96); -return x_98; +lean_ctor_set(x_99, 0, x_96); +lean_ctor_set(x_99, 1, x_97); +return x_99; } } } else { -lean_object* x_99; lean_object* x_100; lean_object* x_101; lean_object* x_102; lean_object* x_103; lean_object* x_104; lean_object* x_105; lean_object* x_106; lean_object* x_107; lean_object* x_108; lean_object* x_109; lean_object* x_110; lean_object* x_111; lean_object* x_112; lean_object* x_113; lean_object* x_114; lean_object* x_115; lean_object* x_116; -x_99 = lean_ctor_get(x_5, 0); -x_100 = lean_ctor_get(x_5, 1); -lean_inc(x_100); -lean_inc(x_99); -lean_dec(x_5); -x_101 = lean_ctor_get(x_6, 1); +lean_object* x_100; lean_object* x_101; lean_object* x_102; lean_object* x_103; lean_object* x_104; lean_object* x_105; lean_object* x_106; lean_object* x_107; lean_object* x_108; lean_object* x_109; lean_object* x_110; lean_object* x_111; lean_object* x_112; lean_object* x_113; lean_object* x_114; lean_object* x_115; lean_object* x_116; lean_object* x_117; lean_object* x_118; +x_100 = lean_ctor_get(x_5, 0); +x_101 = lean_ctor_get(x_5, 1); +x_102 = lean_ctor_get(x_5, 3); +lean_inc(x_102); lean_inc(x_101); +lean_inc(x_100); +lean_dec(x_5); +x_103 = lean_ctor_get(x_6, 1); +lean_inc(x_103); if (lean_is_exclusive(x_6)) { lean_ctor_release(x_6, 0); lean_ctor_release(x_6, 1); - x_102 = x_6; + x_104 = x_6; } else { lean_dec_ref(x_6); - x_102 = lean_box(0); + x_104 = lean_box(0); } -x_103 = lean_ctor_get(x_37, 0); -lean_inc(x_103); -x_104 = lean_ctor_get(x_37, 1); -lean_inc(x_104); -x_105 = lean_ctor_get(x_37, 2); +x_105 = lean_ctor_get(x_38, 0); lean_inc(x_105); -x_106 = lean_ctor_get(x_37, 3); +x_106 = lean_ctor_get(x_38, 1); lean_inc(x_106); -x_107 = lean_ctor_get(x_37, 4); +x_107 = lean_ctor_get(x_38, 2); lean_inc(x_107); -x_108 = lean_ctor_get(x_37, 5); +x_108 = lean_ctor_get(x_38, 3); lean_inc(x_108); -x_109 = lean_ctor_get(x_37, 6); +x_109 = lean_ctor_get(x_38, 4); lean_inc(x_109); -if (lean_is_exclusive(x_37)) { - lean_ctor_release(x_37, 0); - lean_ctor_release(x_37, 1); - lean_ctor_release(x_37, 2); - lean_ctor_release(x_37, 3); - lean_ctor_release(x_37, 4); - lean_ctor_release(x_37, 5); - lean_ctor_release(x_37, 6); - x_110 = x_37; +x_110 = lean_ctor_get(x_38, 5); +lean_inc(x_110); +x_111 = lean_ctor_get(x_38, 6); +lean_inc(x_111); +if (lean_is_exclusive(x_38)) { + lean_ctor_release(x_38, 0); + lean_ctor_release(x_38, 1); + lean_ctor_release(x_38, 2); + lean_ctor_release(x_38, 3); + lean_ctor_release(x_38, 4); + lean_ctor_release(x_38, 5); + lean_ctor_release(x_38, 6); + x_112 = x_38; } else { - lean_dec_ref(x_37); - x_110 = lean_box(0); + lean_dec_ref(x_38); + x_112 = lean_box(0); } -x_111 = lean_unsigned_to_nat(0u); -x_112 = l_Array_iterateMAux___main___at_Array_append___spec__1___rarg(x_1, x_1, x_111, x_109); -if (lean_is_scalar(x_110)) { - x_113 = lean_alloc_ctor(0, 7, 0); +x_113 = lean_unsigned_to_nat(0u); +x_114 = l_Array_iterateMAux___main___at_Array_append___spec__1___rarg(x_1, x_1, x_113, x_111); +if (lean_is_scalar(x_112)) { + x_115 = lean_alloc_ctor(0, 7, 0); } else { - x_113 = x_110; + x_115 = x_112; } -lean_ctor_set(x_113, 0, x_103); -lean_ctor_set(x_113, 1, x_104); -lean_ctor_set(x_113, 2, x_105); -lean_ctor_set(x_113, 3, x_106); -lean_ctor_set(x_113, 4, x_107); -lean_ctor_set(x_113, 5, x_108); -lean_ctor_set(x_113, 6, x_112); -if (lean_is_scalar(x_102)) { - x_114 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_115, 0, x_105); +lean_ctor_set(x_115, 1, x_106); +lean_ctor_set(x_115, 2, x_107); +lean_ctor_set(x_115, 3, x_108); +lean_ctor_set(x_115, 4, x_109); +lean_ctor_set(x_115, 5, x_110); +lean_ctor_set(x_115, 6, x_114); +if (lean_is_scalar(x_104)) { + x_116 = lean_alloc_ctor(1, 2, 0); } else { - x_114 = x_102; + x_116 = x_104; } -lean_ctor_set(x_114, 0, x_113); -lean_ctor_set(x_114, 1, x_101); -x_115 = lean_alloc_ctor(0, 3, 0); -lean_ctor_set(x_115, 0, x_99); -lean_ctor_set(x_115, 1, x_100); -lean_ctor_set(x_115, 2, x_114); -x_116 = l___private_Init_Lean_Elab_Command_3__setState(x_115, x_2, x_38); -if (lean_obj_tag(x_116) == 0) +lean_ctor_set(x_116, 0, x_115); +lean_ctor_set(x_116, 1, x_103); +x_117 = lean_alloc_ctor(0, 4, 0); +lean_ctor_set(x_117, 0, x_100); +lean_ctor_set(x_117, 1, x_101); +lean_ctor_set(x_117, 2, x_116); +lean_ctor_set(x_117, 3, x_102); +x_118 = l___private_Init_Lean_Elab_Command_3__setState(x_117, x_2, x_39); +if (lean_obj_tag(x_118) == 0) { -lean_object* x_117; lean_object* x_118; lean_object* x_119; lean_object* x_120; -x_117 = lean_ctor_get(x_116, 1); -lean_inc(x_117); -if (lean_is_exclusive(x_116)) { - lean_ctor_release(x_116, 0); - lean_ctor_release(x_116, 1); - x_118 = x_116; -} else { - lean_dec_ref(x_116); - x_118 = lean_box(0); -} -x_119 = lean_box(0); -if (lean_is_scalar(x_118)) { - x_120 = lean_alloc_ctor(0, 2, 0); -} else { +lean_object* x_119; lean_object* x_120; lean_object* x_121; lean_object* x_122; +x_119 = lean_ctor_get(x_118, 1); +lean_inc(x_119); +if (lean_is_exclusive(x_118)) { + lean_ctor_release(x_118, 0); + lean_ctor_release(x_118, 1); x_120 = x_118; +} else { + lean_dec_ref(x_118); + x_120 = lean_box(0); } -lean_ctor_set(x_120, 0, x_119); -lean_ctor_set(x_120, 1, x_117); -return x_120; +x_121 = lean_box(0); +if (lean_is_scalar(x_120)) { + x_122 = lean_alloc_ctor(0, 2, 0); +} else { + x_122 = x_120; +} +lean_ctor_set(x_122, 0, x_121); +lean_ctor_set(x_122, 1, x_119); +return x_122; } else { -lean_object* x_121; lean_object* x_122; lean_object* x_123; lean_object* x_124; -x_121 = lean_ctor_get(x_116, 0); -lean_inc(x_121); -x_122 = lean_ctor_get(x_116, 1); -lean_inc(x_122); -if (lean_is_exclusive(x_116)) { - lean_ctor_release(x_116, 0); - lean_ctor_release(x_116, 1); - x_123 = x_116; +lean_object* x_123; lean_object* x_124; lean_object* x_125; lean_object* x_126; +x_123 = lean_ctor_get(x_118, 0); +lean_inc(x_123); +x_124 = lean_ctor_get(x_118, 1); +lean_inc(x_124); +if (lean_is_exclusive(x_118)) { + lean_ctor_release(x_118, 0); + lean_ctor_release(x_118, 1); + x_125 = x_118; } else { - lean_dec_ref(x_116); - x_123 = lean_box(0); + lean_dec_ref(x_118); + x_125 = lean_box(0); } -if (lean_is_scalar(x_123)) { - x_124 = lean_alloc_ctor(1, 2, 0); +if (lean_is_scalar(x_125)) { + x_126 = lean_alloc_ctor(1, 2, 0); } else { - x_124 = x_123; + x_126 = x_125; } -lean_ctor_set(x_124, 0, x_121); -lean_ctor_set(x_124, 1, x_122); -return x_124; +lean_ctor_set(x_126, 0, x_123); +lean_ctor_set(x_126, 1, x_124); +return x_126; } } } } else { -uint8_t x_125; +uint8_t x_127; lean_dec(x_2); -x_125 = !lean_is_exclusive(x_4); -if (x_125 == 0) +x_127 = !lean_is_exclusive(x_4); +if (x_127 == 0) { return x_4; } else { -lean_object* x_126; lean_object* x_127; lean_object* x_128; -x_126 = lean_ctor_get(x_4, 0); -x_127 = lean_ctor_get(x_4, 1); -lean_inc(x_127); -lean_inc(x_126); +lean_object* x_128; lean_object* x_129; lean_object* x_130; +x_128 = lean_ctor_get(x_4, 0); +x_129 = lean_ctor_get(x_4, 1); +lean_inc(x_129); +lean_inc(x_128); lean_dec(x_4); -x_128 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_128, 0, x_126); -lean_ctor_set(x_128, 1, x_127); -return x_128; +x_130 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_130, 0, x_128); +lean_ctor_set(x_130, 1, x_129); +return x_130; } } } } -lean_object* l_Lean_Elab_Command_elabVariables___lambda__1(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) { +lean_object* l_Lean_Elab_Command_elabVariables___lambda__1(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { _start: { -lean_object* x_6; -x_6 = l_Lean_Elab_Term_elabBinders___rarg(x_1, x_2, x_4, x_5); +lean_object* x_5; lean_object* x_6; +x_5 = l_Lean_Meta_dbgTrace___rarg___closed__1; +x_6 = l_Lean_Elab_Term_elabBinders___rarg(x_1, x_5, x_3, x_4); return x_6; } } @@ -13235,7 +14046,7 @@ lean_inc(x_2); x_5 = l___private_Init_Lean_Elab_Command_2__getState(x_2, x_3); if (lean_obj_tag(x_5) == 0) { -lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; +lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; x_6 = lean_ctor_get(x_5, 0); lean_inc(x_6); x_7 = lean_ctor_get(x_5, 1); @@ -13246,100 +14057,101 @@ x_9 = lean_unsigned_to_nat(1u); x_10 = lean_array_get(x_8, x_4, x_9); x_11 = l_Lean_Syntax_getArgs(x_10); lean_dec(x_10); -x_12 = l___private_Init_Lean_Elab_Command_7__getVarDecls(x_6); -x_13 = l_Lean_Meta_dbgTrace___rarg___closed__1; lean_inc(x_11); -x_14 = lean_alloc_closure((void*)(l_Lean_Elab_Command_elabVariables___lambda__1___boxed), 5, 2); -lean_closure_set(x_14, 0, x_11); -lean_closure_set(x_14, 1, x_13); -x_15 = l___private_Init_Lean_Elab_Command_5__mkTermContext(x_2, x_6); -x_16 = l___private_Init_Lean_Elab_Command_6__mkTermState(x_6); +x_12 = lean_alloc_closure((void*)(l_Lean_Elab_Command_elabVariables___lambda__1___boxed), 4, 1); +lean_closure_set(x_12, 0, x_11); +x_13 = l___private_Init_Lean_Elab_Command_7__getVarDecls(x_6); +x_14 = l___private_Init_Lean_Elab_Command_5__mkTermContext(x_2, x_6); +x_15 = l___private_Init_Lean_Elab_Command_6__mkTermState(x_6); lean_dec(x_6); -x_17 = l_Lean_Elab_Term_elabBinders___rarg(x_12, x_14, x_15, x_16); -lean_dec(x_12); -if (lean_obj_tag(x_17) == 0) +x_16 = l_Lean_Elab_Term_elabBinders___rarg(x_13, x_12, x_14, x_15); +lean_dec(x_13); +if (lean_obj_tag(x_16) == 0) { -lean_object* x_18; lean_object* x_19; -x_18 = lean_ctor_get(x_17, 1); -lean_inc(x_18); -lean_dec(x_17); +lean_object* x_17; lean_object* x_18; +x_17 = lean_ctor_get(x_16, 1); +lean_inc(x_17); +lean_dec(x_16); lean_inc(x_2); -x_19 = l___private_Init_Lean_Elab_Command_2__getState(x_2, x_7); -if (lean_obj_tag(x_19) == 0) +x_18 = l___private_Init_Lean_Elab_Command_2__getState(x_2, x_7); +if (lean_obj_tag(x_18) == 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; +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_17, 0); +lean_inc(x_19); x_20 = lean_ctor_get(x_18, 0); lean_inc(x_20); -x_21 = lean_ctor_get(x_19, 0); +x_21 = lean_ctor_get(x_18, 1); lean_inc(x_21); -x_22 = lean_ctor_get(x_19, 1); +lean_dec(x_18); +x_22 = lean_ctor_get(x_19, 0); lean_inc(x_22); lean_dec(x_19); -x_23 = lean_ctor_get(x_20, 0); +x_23 = lean_ctor_get(x_17, 2); lean_inc(x_23); -lean_dec(x_20); -x_24 = lean_ctor_get(x_18, 2); -lean_inc(x_24); -lean_dec(x_18); -x_25 = !lean_is_exclusive(x_21); -if (x_25 == 0) +lean_dec(x_17); +x_24 = !lean_is_exclusive(x_20); +if (x_24 == 0) { -lean_object* x_26; lean_object* x_27; lean_object* x_28; -x_26 = lean_ctor_get(x_21, 1); +lean_object* x_25; lean_object* x_26; lean_object* x_27; +x_25 = lean_ctor_get(x_20, 1); +lean_dec(x_25); +x_26 = lean_ctor_get(x_20, 0); lean_dec(x_26); -x_27 = lean_ctor_get(x_21, 0); -lean_dec(x_27); -lean_ctor_set(x_21, 1, x_24); -lean_ctor_set(x_21, 0, x_23); +lean_ctor_set(x_20, 1, x_23); +lean_ctor_set(x_20, 0, x_22); lean_inc(x_2); -x_28 = l___private_Init_Lean_Elab_Command_3__setState(x_21, x_2, x_22); -if (lean_obj_tag(x_28) == 0) +x_27 = l___private_Init_Lean_Elab_Command_3__setState(x_20, x_2, x_21); +if (lean_obj_tag(x_27) == 0) { -lean_object* x_29; lean_object* x_30; -x_29 = lean_ctor_get(x_28, 1); -lean_inc(x_29); -lean_dec(x_28); -x_30 = l_Lean_Elab_Command_modifyScope___at_Lean_Elab_Command_elabVariables___spec__1(x_11, x_2, x_29); +lean_object* x_28; lean_object* x_29; +x_28 = lean_ctor_get(x_27, 1); +lean_inc(x_28); +lean_dec(x_27); +x_29 = l_Lean_Elab_Command_modifyScope___at_Lean_Elab_Command_elabVariables___spec__1(x_11, x_2, x_28); lean_dec(x_11); -return x_30; +return x_29; } else { -uint8_t x_31; +uint8_t x_30; lean_dec(x_11); lean_dec(x_2); -x_31 = !lean_is_exclusive(x_28); -if (x_31 == 0) +x_30 = !lean_is_exclusive(x_27); +if (x_30 == 0) { -return x_28; +return x_27; } else { -lean_object* x_32; lean_object* x_33; lean_object* x_34; -x_32 = lean_ctor_get(x_28, 0); -x_33 = lean_ctor_get(x_28, 1); -lean_inc(x_33); +lean_object* x_31; lean_object* x_32; lean_object* x_33; +x_31 = lean_ctor_get(x_27, 0); +x_32 = lean_ctor_get(x_27, 1); lean_inc(x_32); -lean_dec(x_28); -x_34 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_34, 0, x_32); -lean_ctor_set(x_34, 1, x_33); -return x_34; +lean_inc(x_31); +lean_dec(x_27); +x_33 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_33, 0, x_31); +lean_ctor_set(x_33, 1, x_32); +return x_33; } } } else { -lean_object* x_35; lean_object* x_36; lean_object* x_37; -x_35 = lean_ctor_get(x_21, 2); +lean_object* x_34; lean_object* x_35; lean_object* x_36; lean_object* x_37; +x_34 = lean_ctor_get(x_20, 2); +x_35 = lean_ctor_get(x_20, 3); lean_inc(x_35); -lean_dec(x_21); -x_36 = lean_alloc_ctor(0, 3, 0); -lean_ctor_set(x_36, 0, x_23); -lean_ctor_set(x_36, 1, x_24); -lean_ctor_set(x_36, 2, x_35); +lean_inc(x_34); +lean_dec(x_20); +x_36 = lean_alloc_ctor(0, 4, 0); +lean_ctor_set(x_36, 0, x_22); +lean_ctor_set(x_36, 1, x_23); +lean_ctor_set(x_36, 2, x_34); +lean_ctor_set(x_36, 3, x_35); lean_inc(x_2); -x_37 = l___private_Init_Lean_Elab_Command_3__setState(x_36, x_2, x_22); +x_37 = l___private_Init_Lean_Elab_Command_3__setState(x_36, x_2, x_21); if (lean_obj_tag(x_37) == 0) { lean_object* x_38; lean_object* x_39; @@ -13381,22 +14193,22 @@ return x_43; else { uint8_t x_44; -lean_dec(x_18); +lean_dec(x_17); lean_dec(x_11); lean_dec(x_2); -x_44 = !lean_is_exclusive(x_19); +x_44 = !lean_is_exclusive(x_18); if (x_44 == 0) { -return x_19; +return x_18; } else { lean_object* x_45; lean_object* x_46; lean_object* x_47; -x_45 = lean_ctor_get(x_19, 0); -x_46 = lean_ctor_get(x_19, 1); +x_45 = lean_ctor_get(x_18, 0); +x_46 = lean_ctor_get(x_18, 1); lean_inc(x_46); lean_inc(x_45); -lean_dec(x_19); +lean_dec(x_18); x_47 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_47, 0, x_45); lean_ctor_set(x_47, 1, x_46); @@ -13407,15 +14219,15 @@ return x_47; else { lean_object* x_48; -x_48 = lean_ctor_get(x_17, 0); +x_48 = lean_ctor_get(x_16, 0); lean_inc(x_48); if (lean_obj_tag(x_48) == 0) { lean_object* x_49; lean_object* x_50; lean_object* x_51; lean_dec(x_11); -x_49 = lean_ctor_get(x_17, 1); +x_49 = lean_ctor_get(x_16, 1); lean_inc(x_49); -lean_dec(x_17); +lean_dec(x_16); x_50 = lean_ctor_get(x_48, 0); lean_inc(x_50); lean_dec(x_48); @@ -13499,131 +14311,134 @@ return x_68; } else { -lean_object* x_69; lean_object* x_70; lean_object* x_71; +lean_object* x_69; lean_object* x_70; lean_object* x_71; lean_object* x_72; x_69 = lean_ctor_get(x_53, 2); +x_70 = lean_ctor_get(x_53, 3); +lean_inc(x_70); lean_inc(x_69); lean_dec(x_53); -x_70 = lean_alloc_ctor(0, 3, 0); -lean_ctor_set(x_70, 0, x_55); -lean_ctor_set(x_70, 1, x_56); -lean_ctor_set(x_70, 2, x_69); -x_71 = l___private_Init_Lean_Elab_Command_3__setState(x_70, x_2, x_54); -if (lean_obj_tag(x_71) == 0) +x_71 = lean_alloc_ctor(0, 4, 0); +lean_ctor_set(x_71, 0, x_55); +lean_ctor_set(x_71, 1, x_56); +lean_ctor_set(x_71, 2, x_69); +lean_ctor_set(x_71, 3, x_70); +x_72 = l___private_Init_Lean_Elab_Command_3__setState(x_71, x_2, x_54); +if (lean_obj_tag(x_72) == 0) { -lean_object* x_72; lean_object* x_73; lean_object* x_74; -x_72 = lean_ctor_get(x_71, 1); -lean_inc(x_72); -if (lean_is_exclusive(x_71)) { - lean_ctor_release(x_71, 0); - lean_ctor_release(x_71, 1); - x_73 = x_71; +lean_object* x_73; lean_object* x_74; lean_object* x_75; +x_73 = lean_ctor_get(x_72, 1); +lean_inc(x_73); +if (lean_is_exclusive(x_72)) { + lean_ctor_release(x_72, 0); + lean_ctor_release(x_72, 1); + x_74 = x_72; } else { - lean_dec_ref(x_71); - x_73 = lean_box(0); + lean_dec_ref(x_72); + x_74 = lean_box(0); } -if (lean_is_scalar(x_73)) { - x_74 = lean_alloc_ctor(1, 2, 0); +if (lean_is_scalar(x_74)) { + x_75 = lean_alloc_ctor(1, 2, 0); } else { - x_74 = x_73; - lean_ctor_set_tag(x_74, 1); + x_75 = x_74; + lean_ctor_set_tag(x_75, 1); } -lean_ctor_set(x_74, 0, x_50); -lean_ctor_set(x_74, 1, x_72); -return x_74; +lean_ctor_set(x_75, 0, x_50); +lean_ctor_set(x_75, 1, x_73); +return x_75; } else { -lean_object* x_75; lean_object* x_76; lean_object* x_77; lean_object* x_78; +lean_object* x_76; lean_object* x_77; lean_object* x_78; lean_object* x_79; lean_dec(x_50); -x_75 = lean_ctor_get(x_71, 0); -lean_inc(x_75); -x_76 = lean_ctor_get(x_71, 1); +x_76 = lean_ctor_get(x_72, 0); lean_inc(x_76); -if (lean_is_exclusive(x_71)) { - lean_ctor_release(x_71, 0); - lean_ctor_release(x_71, 1); - x_77 = x_71; +x_77 = lean_ctor_get(x_72, 1); +lean_inc(x_77); +if (lean_is_exclusive(x_72)) { + lean_ctor_release(x_72, 0); + lean_ctor_release(x_72, 1); + x_78 = x_72; } else { - lean_dec_ref(x_71); - x_77 = lean_box(0); + lean_dec_ref(x_72); + x_78 = lean_box(0); } -if (lean_is_scalar(x_77)) { - x_78 = lean_alloc_ctor(1, 2, 0); +if (lean_is_scalar(x_78)) { + x_79 = lean_alloc_ctor(1, 2, 0); } else { - x_78 = x_77; + x_79 = x_78; } -lean_ctor_set(x_78, 0, x_75); -lean_ctor_set(x_78, 1, x_76); -return x_78; +lean_ctor_set(x_79, 0, x_76); +lean_ctor_set(x_79, 1, x_77); +return x_79; } } } else { -uint8_t x_79; +uint8_t x_80; lean_dec(x_50); lean_dec(x_49); lean_dec(x_2); -x_79 = !lean_is_exclusive(x_51); -if (x_79 == 0) +x_80 = !lean_is_exclusive(x_51); +if (x_80 == 0) { return x_51; } else { -lean_object* x_80; lean_object* x_81; lean_object* x_82; -x_80 = lean_ctor_get(x_51, 0); -x_81 = lean_ctor_get(x_51, 1); +lean_object* x_81; lean_object* x_82; lean_object* x_83; +x_81 = lean_ctor_get(x_51, 0); +x_82 = lean_ctor_get(x_51, 1); +lean_inc(x_82); lean_inc(x_81); -lean_inc(x_80); lean_dec(x_51); -x_82 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_82, 0, x_80); -lean_ctor_set(x_82, 1, x_81); -return x_82; +x_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 { -lean_object* x_83; lean_object* x_84; lean_object* x_85; -lean_dec(x_17); -x_83 = l_Lean_Elab_Command_runTermElabM___rarg___closed__1; -x_84 = l_unreachable_x21___rarg(x_83); +lean_object* x_84; lean_object* x_85; lean_object* x_86; +lean_dec(x_16); +x_84 = l_Lean_Elab_Command_runTermElabM___rarg___closed__1; +x_85 = l_unreachable_x21___rarg(x_84); lean_inc(x_2); -x_85 = lean_apply_2(x_84, x_2, x_7); -if (lean_obj_tag(x_85) == 0) +x_86 = lean_apply_2(x_85, x_2, x_7); +if (lean_obj_tag(x_86) == 0) { -lean_object* x_86; lean_object* x_87; -x_86 = lean_ctor_get(x_85, 1); -lean_inc(x_86); -lean_dec(x_85); -x_87 = l_Lean_Elab_Command_modifyScope___at_Lean_Elab_Command_elabVariables___spec__1(x_11, x_2, x_86); +lean_object* x_87; lean_object* x_88; +x_87 = lean_ctor_get(x_86, 1); +lean_inc(x_87); +lean_dec(x_86); +x_88 = l_Lean_Elab_Command_modifyScope___at_Lean_Elab_Command_elabVariables___spec__1(x_11, x_2, x_87); lean_dec(x_11); -return x_87; +return x_88; } else { -uint8_t x_88; +uint8_t x_89; lean_dec(x_11); lean_dec(x_2); -x_88 = !lean_is_exclusive(x_85); -if (x_88 == 0) +x_89 = !lean_is_exclusive(x_86); +if (x_89 == 0) { -return x_85; +return x_86; } else { -lean_object* x_89; lean_object* x_90; lean_object* x_91; -x_89 = lean_ctor_get(x_85, 0); -x_90 = lean_ctor_get(x_85, 1); +lean_object* x_90; lean_object* x_91; lean_object* x_92; +x_90 = lean_ctor_get(x_86, 0); +x_91 = lean_ctor_get(x_86, 1); +lean_inc(x_91); lean_inc(x_90); -lean_inc(x_89); -lean_dec(x_85); -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; +lean_dec(x_86); +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; } } } @@ -13631,25 +14446,25 @@ return x_91; } else { -uint8_t x_92; +uint8_t x_93; lean_dec(x_2); -x_92 = !lean_is_exclusive(x_5); -if (x_92 == 0) +x_93 = !lean_is_exclusive(x_5); +if (x_93 == 0) { return x_5; } else { -lean_object* x_93; lean_object* x_94; lean_object* x_95; -x_93 = lean_ctor_get(x_5, 0); -x_94 = lean_ctor_get(x_5, 1); +lean_object* x_94; lean_object* x_95; lean_object* x_96; +x_94 = lean_ctor_get(x_5, 0); +x_95 = lean_ctor_get(x_5, 1); +lean_inc(x_95); lean_inc(x_94); -lean_inc(x_93); lean_dec(x_5); -x_95 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_95, 0, x_93); -lean_ctor_set(x_95, 1, x_94); -return x_95; +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; } } } @@ -13663,14 +14478,14 @@ lean_dec(x_1); return x_4; } } -lean_object* l_Lean_Elab_Command_elabVariables___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* l_Lean_Elab_Command_elabVariables___lambda__1___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { _start: { -lean_object* x_6; -x_6 = l_Lean_Elab_Command_elabVariables___lambda__1(x_1, x_2, x_3, x_4, x_5); -lean_dec(x_3); +lean_object* x_5; +x_5 = l_Lean_Elab_Command_elabVariables___lambda__1(x_1, x_2, x_3, x_4); +lean_dec(x_2); lean_dec(x_1); -return x_6; +return x_5; } } lean_object* l_Lean_Elab_Command_elabVariables___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) { @@ -13719,13 +14534,14 @@ x_5 = l_Lean_Elab_Command_addBuiltinCommandElab(x_2, x_3, x_4, x_1); return x_5; } } -lean_object* l_Lean_Elab_Command_elabCheck___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* l_Lean_Elab_Command_elabCheck___lambda__1(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) { _start: { -uint8_t x_7; lean_object* x_8; +lean_object* x_6; uint8_t x_7; lean_object* x_8; +x_6 = lean_box(0); x_7 = 1; -lean_inc(x_5); -x_8 = l_Lean_Elab_Term_elabTerm(x_1, x_2, x_7, x_7, x_5, x_6); +lean_inc(x_4); +x_8 = l_Lean_Elab_Term_elabTerm(x_1, x_6, x_7, x_7, x_4, x_5); if (lean_obj_tag(x_8) == 0) { lean_object* x_9; lean_object* x_10; uint8_t x_11; lean_object* x_12; lean_object* x_13; @@ -13736,17 +14552,17 @@ lean_inc(x_10); lean_dec(x_8); x_11 = 0; x_12 = lean_box(0); -lean_inc(x_5); -x_13 = l___private_Init_Lean_Elab_Term_19__synthesizeSyntheticMVarsAux___main(x_11, x_12, x_5, x_10); +lean_inc(x_4); +x_13 = l___private_Init_Lean_Elab_Term_19__synthesizeSyntheticMVarsAux___main(x_11, x_12, x_4, x_10); if (lean_obj_tag(x_13) == 0) { lean_object* x_14; lean_object* x_15; x_14 = lean_ctor_get(x_13, 1); lean_inc(x_14); lean_dec(x_13); -lean_inc(x_5); +lean_inc(x_4); lean_inc(x_9); -x_15 = l_Lean_Elab_Term_inferType(x_3, x_9, x_5, x_14); +x_15 = l_Lean_Elab_Term_inferType(x_2, x_9, x_4, x_14); if (lean_obj_tag(x_15) == 0) { lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; lean_object* x_20; lean_object* x_21; lean_object* x_22; lean_object* x_23; lean_object* x_24; lean_object* x_25; lean_object* x_26; lean_object* x_27; lean_object* x_28; uint8_t x_29; lean_object* x_30; uint8_t x_31; @@ -13755,15 +14571,15 @@ lean_inc(x_16); x_17 = lean_ctor_get(x_15, 1); lean_inc(x_17); lean_dec(x_15); -lean_inc(x_5); -x_18 = l_Lean_Elab_Term_instantiateMVars(x_3, x_9, x_5, x_17); +lean_inc(x_4); +x_18 = l_Lean_Elab_Term_instantiateMVars(x_2, x_9, x_4, x_17); x_19 = lean_ctor_get(x_18, 0); lean_inc(x_19); x_20 = lean_ctor_get(x_18, 1); lean_inc(x_20); lean_dec(x_18); -lean_inc(x_5); -x_21 = l_Lean_Elab_Term_instantiateMVars(x_3, x_16, x_5, x_20); +lean_inc(x_4); +x_21 = l_Lean_Elab_Term_instantiateMVars(x_2, x_16, x_4, x_20); x_22 = lean_ctor_get(x_21, 0); lean_inc(x_22); x_23 = lean_ctor_get(x_21, 1); @@ -13781,8 +14597,8 @@ x_28 = lean_alloc_ctor(8, 2, 0); lean_ctor_set(x_28, 0, x_26); lean_ctor_set(x_28, 1, x_27); x_29 = 0; -x_30 = l_Lean_Elab_log___at_Lean_Elab_Term_logTrace___spec__1(x_3, x_29, x_28, x_5, x_23); -lean_dec(x_5); +x_30 = l_Lean_Elab_log___at_Lean_Elab_Term_logTrace___spec__1(x_2, x_29, x_28, x_4, x_23); +lean_dec(x_4); x_31 = !lean_is_exclusive(x_30); if (x_31 == 0) { @@ -13808,7 +14624,7 @@ else { uint8_t x_35; lean_dec(x_9); -lean_dec(x_5); +lean_dec(x_4); x_35 = !lean_is_exclusive(x_15); if (x_35 == 0) { @@ -13833,7 +14649,7 @@ else { uint8_t x_39; lean_dec(x_9); -lean_dec(x_5); +lean_dec(x_4); x_39 = !lean_is_exclusive(x_13); if (x_39 == 0) { @@ -13857,7 +14673,7 @@ return x_42; else { uint8_t x_43; -lean_dec(x_5); +lean_dec(x_4); x_43 = !lean_is_exclusive(x_8); if (x_43 == 0) { @@ -13882,130 +14698,131 @@ return x_46; lean_object* l_Lean_Elab_Command_elabCheck(lean_object* x_1, lean_object* x_2, lean_object* x_3) { _start: { -lean_object* x_4; lean_object* x_5; lean_object* x_6; +lean_object* x_4; lean_object* x_5; x_4 = lean_ctor_get(x_1, 1); lean_inc(x_4); -x_5 = lean_box(0); lean_inc(x_2); -x_6 = l___private_Init_Lean_Elab_Command_2__getState(x_2, x_3); -if (lean_obj_tag(x_6) == 0) +x_5 = l___private_Init_Lean_Elab_Command_2__getState(x_2, x_3); +if (lean_obj_tag(x_5) == 0) { -lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; -x_7 = lean_ctor_get(x_6, 0); +lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; +x_6 = lean_ctor_get(x_5, 0); +lean_inc(x_6); +x_7 = lean_ctor_get(x_5, 1); lean_inc(x_7); -x_8 = lean_ctor_get(x_6, 1); -lean_inc(x_8); -lean_dec(x_6); -x_9 = l_Lean_stxInh; -x_10 = lean_unsigned_to_nat(1u); -x_11 = lean_array_get(x_9, x_4, x_10); +lean_dec(x_5); +x_8 = l_Lean_stxInh; +x_9 = lean_unsigned_to_nat(1u); +x_10 = lean_array_get(x_8, x_4, x_9); lean_dec(x_4); -x_12 = l___private_Init_Lean_Elab_Command_7__getVarDecls(x_7); -x_13 = lean_alloc_closure((void*)(l_Lean_Elab_Command_elabCheck___lambda__1___boxed), 6, 3); -lean_closure_set(x_13, 0, x_11); -lean_closure_set(x_13, 1, x_5); -lean_closure_set(x_13, 2, x_1); -x_14 = l___private_Init_Lean_Elab_Command_5__mkTermContext(x_2, x_7); -x_15 = l___private_Init_Lean_Elab_Command_6__mkTermState(x_7); -lean_dec(x_7); -x_16 = l_Lean_Elab_Term_elabBinders___rarg(x_12, x_13, x_14, x_15); +x_11 = lean_alloc_closure((void*)(l_Lean_Elab_Command_elabCheck___lambda__1___boxed), 5, 2); +lean_closure_set(x_11, 0, x_10); +lean_closure_set(x_11, 1, x_1); +x_12 = l___private_Init_Lean_Elab_Command_7__getVarDecls(x_6); +x_13 = l___private_Init_Lean_Elab_Command_5__mkTermContext(x_2, x_6); +x_14 = l___private_Init_Lean_Elab_Command_6__mkTermState(x_6); +lean_dec(x_6); +x_15 = l_Lean_Elab_Term_elabBinders___rarg(x_12, x_11, x_13, x_14); lean_dec(x_12); -if (lean_obj_tag(x_16) == 0) +if (lean_obj_tag(x_15) == 0) { -lean_object* x_17; lean_object* x_18; lean_object* x_19; -x_17 = lean_ctor_get(x_16, 0); +lean_object* x_16; lean_object* x_17; lean_object* x_18; +x_16 = lean_ctor_get(x_15, 0); +lean_inc(x_16); +x_17 = lean_ctor_get(x_15, 1); lean_inc(x_17); -x_18 = lean_ctor_get(x_16, 1); -lean_inc(x_18); -lean_dec(x_16); +lean_dec(x_15); lean_inc(x_2); -x_19 = l___private_Init_Lean_Elab_Command_2__getState(x_2, x_8); -if (lean_obj_tag(x_19) == 0) +x_18 = l___private_Init_Lean_Elab_Command_2__getState(x_2, x_7); +if (lean_obj_tag(x_18) == 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; +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_17, 0); +lean_inc(x_19); x_20 = lean_ctor_get(x_18, 0); lean_inc(x_20); -x_21 = lean_ctor_get(x_19, 0); +x_21 = lean_ctor_get(x_18, 1); lean_inc(x_21); -x_22 = lean_ctor_get(x_19, 1); +lean_dec(x_18); +x_22 = lean_ctor_get(x_19, 0); lean_inc(x_22); lean_dec(x_19); -x_23 = lean_ctor_get(x_20, 0); +x_23 = lean_ctor_get(x_17, 2); lean_inc(x_23); -lean_dec(x_20); -x_24 = lean_ctor_get(x_18, 2); -lean_inc(x_24); -lean_dec(x_18); -x_25 = !lean_is_exclusive(x_21); -if (x_25 == 0) -{ -lean_object* x_26; lean_object* x_27; lean_object* x_28; -x_26 = lean_ctor_get(x_21, 1); -lean_dec(x_26); -x_27 = lean_ctor_get(x_21, 0); -lean_dec(x_27); -lean_ctor_set(x_21, 1, x_24); -lean_ctor_set(x_21, 0, x_23); -x_28 = l___private_Init_Lean_Elab_Command_3__setState(x_21, x_2, x_22); -if (lean_obj_tag(x_28) == 0) -{ -uint8_t x_29; -x_29 = !lean_is_exclusive(x_28); -if (x_29 == 0) -{ -lean_object* x_30; -x_30 = lean_ctor_get(x_28, 0); -lean_dec(x_30); -lean_ctor_set(x_28, 0, x_17); -return x_28; -} -else -{ -lean_object* x_31; lean_object* x_32; -x_31 = lean_ctor_get(x_28, 1); -lean_inc(x_31); -lean_dec(x_28); -x_32 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_32, 0, x_17); -lean_ctor_set(x_32, 1, x_31); -return x_32; -} -} -else -{ -uint8_t x_33; lean_dec(x_17); -x_33 = !lean_is_exclusive(x_28); -if (x_33 == 0) +x_24 = !lean_is_exclusive(x_20); +if (x_24 == 0) { -return x_28; +lean_object* x_25; lean_object* x_26; lean_object* x_27; +x_25 = lean_ctor_get(x_20, 1); +lean_dec(x_25); +x_26 = lean_ctor_get(x_20, 0); +lean_dec(x_26); +lean_ctor_set(x_20, 1, x_23); +lean_ctor_set(x_20, 0, x_22); +x_27 = l___private_Init_Lean_Elab_Command_3__setState(x_20, x_2, x_21); +if (lean_obj_tag(x_27) == 0) +{ +uint8_t x_28; +x_28 = !lean_is_exclusive(x_27); +if (x_28 == 0) +{ +lean_object* x_29; +x_29 = lean_ctor_get(x_27, 0); +lean_dec(x_29); +lean_ctor_set(x_27, 0, x_16); +return x_27; } else { -lean_object* x_34; lean_object* x_35; lean_object* x_36; -x_34 = lean_ctor_get(x_28, 0); -x_35 = lean_ctor_get(x_28, 1); -lean_inc(x_35); +lean_object* x_30; lean_object* x_31; +x_30 = lean_ctor_get(x_27, 1); +lean_inc(x_30); +lean_dec(x_27); +x_31 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_31, 0, x_16); +lean_ctor_set(x_31, 1, x_30); +return x_31; +} +} +else +{ +uint8_t x_32; +lean_dec(x_16); +x_32 = !lean_is_exclusive(x_27); +if (x_32 == 0) +{ +return x_27; +} +else +{ +lean_object* x_33; lean_object* x_34; lean_object* x_35; +x_33 = lean_ctor_get(x_27, 0); +x_34 = lean_ctor_get(x_27, 1); lean_inc(x_34); -lean_dec(x_28); -x_36 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_36, 0, x_34); -lean_ctor_set(x_36, 1, x_35); -return x_36; +lean_inc(x_33); +lean_dec(x_27); +x_35 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_35, 0, x_33); +lean_ctor_set(x_35, 1, x_34); +return x_35; } } } else { -lean_object* x_37; lean_object* x_38; lean_object* x_39; -x_37 = lean_ctor_get(x_21, 2); +lean_object* x_36; lean_object* x_37; lean_object* x_38; lean_object* x_39; +x_36 = lean_ctor_get(x_20, 2); +x_37 = lean_ctor_get(x_20, 3); lean_inc(x_37); -lean_dec(x_21); -x_38 = lean_alloc_ctor(0, 3, 0); -lean_ctor_set(x_38, 0, x_23); -lean_ctor_set(x_38, 1, x_24); -lean_ctor_set(x_38, 2, x_37); -x_39 = l___private_Init_Lean_Elab_Command_3__setState(x_38, x_2, x_22); +lean_inc(x_36); +lean_dec(x_20); +x_38 = lean_alloc_ctor(0, 4, 0); +lean_ctor_set(x_38, 0, x_22); +lean_ctor_set(x_38, 1, x_23); +lean_ctor_set(x_38, 2, x_36); +lean_ctor_set(x_38, 3, x_37); +x_39 = l___private_Init_Lean_Elab_Command_3__setState(x_38, x_2, x_21); if (lean_obj_tag(x_39) == 0) { lean_object* x_40; lean_object* x_41; lean_object* x_42; @@ -14024,14 +14841,14 @@ if (lean_is_scalar(x_41)) { } else { x_42 = x_41; } -lean_ctor_set(x_42, 0, x_17); +lean_ctor_set(x_42, 0, x_16); lean_ctor_set(x_42, 1, x_40); return x_42; } else { lean_object* x_43; lean_object* x_44; lean_object* x_45; lean_object* x_46; -lean_dec(x_17); +lean_dec(x_16); x_43 = lean_ctor_get(x_39, 0); lean_inc(x_43); x_44 = lean_ctor_get(x_39, 1); @@ -14058,22 +14875,22 @@ return x_46; else { uint8_t x_47; -lean_dec(x_18); lean_dec(x_17); +lean_dec(x_16); lean_dec(x_2); -x_47 = !lean_is_exclusive(x_19); +x_47 = !lean_is_exclusive(x_18); if (x_47 == 0) { -return x_19; +return x_18; } else { lean_object* x_48; lean_object* x_49; lean_object* x_50; -x_48 = lean_ctor_get(x_19, 0); -x_49 = lean_ctor_get(x_19, 1); +x_48 = lean_ctor_get(x_18, 0); +x_49 = lean_ctor_get(x_18, 1); lean_inc(x_49); lean_inc(x_48); -lean_dec(x_19); +lean_dec(x_18); x_50 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_50, 0, x_48); lean_ctor_set(x_50, 1, x_49); @@ -14084,19 +14901,19 @@ return x_50; else { lean_object* x_51; -x_51 = lean_ctor_get(x_16, 0); +x_51 = lean_ctor_get(x_15, 0); lean_inc(x_51); if (lean_obj_tag(x_51) == 0) { lean_object* x_52; lean_object* x_53; lean_object* x_54; -x_52 = lean_ctor_get(x_16, 1); +x_52 = lean_ctor_get(x_15, 1); lean_inc(x_52); -lean_dec(x_16); +lean_dec(x_15); x_53 = lean_ctor_get(x_51, 0); lean_inc(x_53); lean_dec(x_51); lean_inc(x_2); -x_54 = l___private_Init_Lean_Elab_Command_2__getState(x_2, x_8); +x_54 = l___private_Init_Lean_Elab_Command_2__getState(x_2, x_7); if (lean_obj_tag(x_54) == 0) { lean_object* x_55; lean_object* x_56; lean_object* x_57; lean_object* x_58; lean_object* x_59; uint8_t x_60; @@ -14175,137 +14992,140 @@ return x_71; } else { -lean_object* x_72; lean_object* x_73; lean_object* x_74; +lean_object* x_72; lean_object* x_73; lean_object* x_74; lean_object* x_75; x_72 = lean_ctor_get(x_56, 2); +x_73 = lean_ctor_get(x_56, 3); +lean_inc(x_73); lean_inc(x_72); lean_dec(x_56); -x_73 = lean_alloc_ctor(0, 3, 0); -lean_ctor_set(x_73, 0, x_58); -lean_ctor_set(x_73, 1, x_59); -lean_ctor_set(x_73, 2, x_72); -x_74 = l___private_Init_Lean_Elab_Command_3__setState(x_73, x_2, x_57); -if (lean_obj_tag(x_74) == 0) +x_74 = lean_alloc_ctor(0, 4, 0); +lean_ctor_set(x_74, 0, x_58); +lean_ctor_set(x_74, 1, x_59); +lean_ctor_set(x_74, 2, x_72); +lean_ctor_set(x_74, 3, x_73); +x_75 = l___private_Init_Lean_Elab_Command_3__setState(x_74, x_2, x_57); +if (lean_obj_tag(x_75) == 0) { -lean_object* x_75; lean_object* x_76; lean_object* x_77; -x_75 = lean_ctor_get(x_74, 1); -lean_inc(x_75); -if (lean_is_exclusive(x_74)) { - lean_ctor_release(x_74, 0); - lean_ctor_release(x_74, 1); - x_76 = x_74; +lean_object* x_76; lean_object* x_77; lean_object* x_78; +x_76 = lean_ctor_get(x_75, 1); +lean_inc(x_76); +if (lean_is_exclusive(x_75)) { + lean_ctor_release(x_75, 0); + lean_ctor_release(x_75, 1); + x_77 = x_75; } else { - lean_dec_ref(x_74); - x_76 = lean_box(0); + lean_dec_ref(x_75); + x_77 = lean_box(0); } -if (lean_is_scalar(x_76)) { - x_77 = lean_alloc_ctor(1, 2, 0); +if (lean_is_scalar(x_77)) { + x_78 = lean_alloc_ctor(1, 2, 0); } else { - x_77 = x_76; - lean_ctor_set_tag(x_77, 1); + x_78 = x_77; + lean_ctor_set_tag(x_78, 1); } -lean_ctor_set(x_77, 0, x_53); -lean_ctor_set(x_77, 1, x_75); -return x_77; +lean_ctor_set(x_78, 0, x_53); +lean_ctor_set(x_78, 1, x_76); +return x_78; } else { -lean_object* x_78; lean_object* x_79; lean_object* x_80; lean_object* x_81; +lean_object* x_79; lean_object* x_80; lean_object* x_81; lean_object* x_82; lean_dec(x_53); -x_78 = lean_ctor_get(x_74, 0); -lean_inc(x_78); -x_79 = lean_ctor_get(x_74, 1); +x_79 = lean_ctor_get(x_75, 0); lean_inc(x_79); -if (lean_is_exclusive(x_74)) { - lean_ctor_release(x_74, 0); - lean_ctor_release(x_74, 1); - x_80 = x_74; +x_80 = lean_ctor_get(x_75, 1); +lean_inc(x_80); +if (lean_is_exclusive(x_75)) { + lean_ctor_release(x_75, 0); + lean_ctor_release(x_75, 1); + x_81 = x_75; } else { - lean_dec_ref(x_74); - x_80 = lean_box(0); + lean_dec_ref(x_75); + x_81 = lean_box(0); } -if (lean_is_scalar(x_80)) { - x_81 = lean_alloc_ctor(1, 2, 0); +if (lean_is_scalar(x_81)) { + x_82 = lean_alloc_ctor(1, 2, 0); } else { - x_81 = x_80; + x_82 = x_81; } -lean_ctor_set(x_81, 0, x_78); -lean_ctor_set(x_81, 1, x_79); -return x_81; +lean_ctor_set(x_82, 0, x_79); +lean_ctor_set(x_82, 1, x_80); +return x_82; } } } else { -uint8_t x_82; +uint8_t x_83; lean_dec(x_53); lean_dec(x_52); lean_dec(x_2); -x_82 = !lean_is_exclusive(x_54); -if (x_82 == 0) +x_83 = !lean_is_exclusive(x_54); +if (x_83 == 0) { return x_54; } else { -lean_object* x_83; lean_object* x_84; lean_object* x_85; -x_83 = lean_ctor_get(x_54, 0); -x_84 = lean_ctor_get(x_54, 1); +lean_object* x_84; lean_object* x_85; lean_object* x_86; +x_84 = lean_ctor_get(x_54, 0); +x_85 = lean_ctor_get(x_54, 1); +lean_inc(x_85); lean_inc(x_84); -lean_inc(x_83); lean_dec(x_54); -x_85 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_85, 0, x_83); -lean_ctor_set(x_85, 1, x_84); -return x_85; +x_86 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_86, 0, x_84); +lean_ctor_set(x_86, 1, x_85); +return x_86; } } } else { -lean_object* x_86; lean_object* x_87; lean_object* x_88; -lean_dec(x_16); -x_86 = l_Lean_Elab_Command_runTermElabM___rarg___closed__1; -x_87 = l_unreachable_x21___rarg(x_86); -x_88 = lean_apply_2(x_87, x_2, x_8); -return x_88; +lean_object* x_87; lean_object* x_88; lean_object* x_89; +lean_dec(x_15); +x_87 = l_Lean_Elab_Command_runTermElabM___rarg___closed__1; +x_88 = l_unreachable_x21___rarg(x_87); +x_89 = lean_apply_2(x_88, x_2, x_7); +return x_89; } } } else { -uint8_t x_89; +uint8_t x_90; lean_dec(x_4); lean_dec(x_2); lean_dec(x_1); -x_89 = !lean_is_exclusive(x_6); -if (x_89 == 0) +x_90 = !lean_is_exclusive(x_5); +if (x_90 == 0) { -return x_6; +return x_5; } else { -lean_object* x_90; lean_object* x_91; lean_object* x_92; -x_90 = lean_ctor_get(x_6, 0); -x_91 = lean_ctor_get(x_6, 1); +lean_object* x_91; lean_object* x_92; lean_object* x_93; +x_91 = lean_ctor_get(x_5, 0); +x_92 = lean_ctor_get(x_5, 1); +lean_inc(x_92); lean_inc(x_91); -lean_inc(x_90); -lean_dec(x_6); -x_92 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_92, 0, x_90); -lean_ctor_set(x_92, 1, x_91); -return x_92; +lean_dec(x_5); +x_93 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_93, 0, x_91); +lean_ctor_set(x_93, 1, x_92); +return x_93; } } } } -lean_object* l_Lean_Elab_Command_elabCheck___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* l_Lean_Elab_Command_elabCheck___lambda__1___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) { _start: { -lean_object* x_7; -x_7 = l_Lean_Elab_Command_elabCheck___lambda__1(x_1, x_2, x_3, x_4, x_5, x_6); -lean_dec(x_4); +lean_object* x_6; +x_6 = l_Lean_Elab_Command_elabCheck___lambda__1(x_1, x_2, x_3, x_4, x_5); lean_dec(x_3); -return x_7; +lean_dec(x_2); +return x_6; } } lean_object* _init_l___regBuiltinCommandElab_Lean_Elab_Command_elabCheck___closed__1() { @@ -14355,6 +15175,3429 @@ x_5 = l_Lean_Elab_Command_addBuiltinCommandElab(x_2, x_3, x_4, x_1); return x_5; } } +lean_object* l_Lean_Elab_Command_modifyScope___at_Lean_Elab_Command_withDeclId___spec__1(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +_start: +{ +lean_object* x_4; +lean_inc(x_2); +x_4 = l___private_Init_Lean_Elab_Command_2__getState(x_2, x_3); +if (lean_obj_tag(x_4) == 0) +{ +lean_object* x_5; lean_object* x_6; +x_5 = lean_ctor_get(x_4, 0); +lean_inc(x_5); +x_6 = lean_ctor_get(x_5, 2); +lean_inc(x_6); +if (lean_obj_tag(x_6) == 0) +{ +lean_object* x_7; uint8_t x_8; +lean_dec(x_1); +x_7 = lean_ctor_get(x_4, 1); +lean_inc(x_7); +lean_dec(x_4); +x_8 = !lean_is_exclusive(x_5); +if (x_8 == 0) +{ +lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; +x_9 = lean_ctor_get(x_5, 2); +lean_dec(x_9); +x_10 = l_Lean_Elab_Command_modifyScope___closed__1; +x_11 = l_unreachable_x21___rarg(x_10); +lean_ctor_set(x_5, 2, x_11); +x_12 = l___private_Init_Lean_Elab_Command_3__setState(x_5, x_2, x_7); +if (lean_obj_tag(x_12) == 0) +{ +uint8_t x_13; +x_13 = !lean_is_exclusive(x_12); +if (x_13 == 0) +{ +lean_object* x_14; lean_object* x_15; +x_14 = lean_ctor_get(x_12, 0); +lean_dec(x_14); +x_15 = lean_box(0); +lean_ctor_set(x_12, 0, x_15); +return x_12; +} +else +{ +lean_object* x_16; lean_object* x_17; lean_object* x_18; +x_16 = lean_ctor_get(x_12, 1); +lean_inc(x_16); +lean_dec(x_12); +x_17 = lean_box(0); +x_18 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_18, 0, x_17); +lean_ctor_set(x_18, 1, x_16); +return x_18; +} +} +else +{ +uint8_t x_19; +x_19 = !lean_is_exclusive(x_12); +if (x_19 == 0) +{ +return x_12; +} +else +{ +lean_object* x_20; lean_object* x_21; lean_object* x_22; +x_20 = lean_ctor_get(x_12, 0); +x_21 = lean_ctor_get(x_12, 1); +lean_inc(x_21); +lean_inc(x_20); +lean_dec(x_12); +x_22 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_22, 0, x_20); +lean_ctor_set(x_22, 1, x_21); +return x_22; +} +} +} +else +{ +lean_object* x_23; lean_object* x_24; lean_object* x_25; lean_object* x_26; lean_object* x_27; lean_object* x_28; lean_object* x_29; +x_23 = lean_ctor_get(x_5, 0); +x_24 = lean_ctor_get(x_5, 1); +x_25 = lean_ctor_get(x_5, 3); +lean_inc(x_25); +lean_inc(x_24); +lean_inc(x_23); +lean_dec(x_5); +x_26 = l_Lean_Elab_Command_modifyScope___closed__1; +x_27 = l_unreachable_x21___rarg(x_26); +x_28 = lean_alloc_ctor(0, 4, 0); +lean_ctor_set(x_28, 0, x_23); +lean_ctor_set(x_28, 1, x_24); +lean_ctor_set(x_28, 2, x_27); +lean_ctor_set(x_28, 3, x_25); +x_29 = l___private_Init_Lean_Elab_Command_3__setState(x_28, x_2, x_7); +if (lean_obj_tag(x_29) == 0) +{ +lean_object* x_30; lean_object* x_31; lean_object* x_32; lean_object* x_33; +x_30 = lean_ctor_get(x_29, 1); +lean_inc(x_30); +if (lean_is_exclusive(x_29)) { + lean_ctor_release(x_29, 0); + lean_ctor_release(x_29, 1); + x_31 = x_29; +} else { + lean_dec_ref(x_29); + x_31 = lean_box(0); +} +x_32 = lean_box(0); +if (lean_is_scalar(x_31)) { + x_33 = lean_alloc_ctor(0, 2, 0); +} else { + x_33 = x_31; +} +lean_ctor_set(x_33, 0, x_32); +lean_ctor_set(x_33, 1, x_30); +return x_33; +} +else +{ +lean_object* x_34; lean_object* x_35; lean_object* x_36; lean_object* x_37; +x_34 = lean_ctor_get(x_29, 0); +lean_inc(x_34); +x_35 = lean_ctor_get(x_29, 1); +lean_inc(x_35); +if (lean_is_exclusive(x_29)) { + lean_ctor_release(x_29, 0); + lean_ctor_release(x_29, 1); + x_36 = x_29; +} else { + lean_dec_ref(x_29); + x_36 = lean_box(0); +} +if (lean_is_scalar(x_36)) { + x_37 = lean_alloc_ctor(1, 2, 0); +} else { + x_37 = x_36; +} +lean_ctor_set(x_37, 0, x_34); +lean_ctor_set(x_37, 1, x_35); +return x_37; +} +} +} +else +{ +lean_object* x_38; lean_object* x_39; uint8_t x_40; +x_38 = lean_ctor_get(x_6, 0); +lean_inc(x_38); +x_39 = lean_ctor_get(x_4, 1); +lean_inc(x_39); +lean_dec(x_4); +x_40 = !lean_is_exclusive(x_5); +if (x_40 == 0) +{ +lean_object* x_41; uint8_t x_42; +x_41 = lean_ctor_get(x_5, 2); +lean_dec(x_41); +x_42 = !lean_is_exclusive(x_6); +if (x_42 == 0) +{ +lean_object* x_43; uint8_t x_44; +x_43 = lean_ctor_get(x_6, 0); +lean_dec(x_43); +x_44 = !lean_is_exclusive(x_38); +if (x_44 == 0) +{ +lean_object* x_45; lean_object* x_46; +x_45 = lean_ctor_get(x_38, 5); +lean_dec(x_45); +lean_ctor_set(x_38, 5, x_1); +x_46 = l___private_Init_Lean_Elab_Command_3__setState(x_5, x_2, x_39); +if (lean_obj_tag(x_46) == 0) +{ +uint8_t x_47; +x_47 = !lean_is_exclusive(x_46); +if (x_47 == 0) +{ +lean_object* x_48; lean_object* x_49; +x_48 = lean_ctor_get(x_46, 0); +lean_dec(x_48); +x_49 = lean_box(0); +lean_ctor_set(x_46, 0, x_49); +return x_46; +} +else +{ +lean_object* x_50; lean_object* x_51; lean_object* x_52; +x_50 = lean_ctor_get(x_46, 1); +lean_inc(x_50); +lean_dec(x_46); +x_51 = lean_box(0); +x_52 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_52, 0, x_51); +lean_ctor_set(x_52, 1, x_50); +return x_52; +} +} +else +{ +uint8_t x_53; +x_53 = !lean_is_exclusive(x_46); +if (x_53 == 0) +{ +return x_46; +} +else +{ +lean_object* x_54; lean_object* x_55; lean_object* x_56; +x_54 = lean_ctor_get(x_46, 0); +x_55 = lean_ctor_get(x_46, 1); +lean_inc(x_55); +lean_inc(x_54); +lean_dec(x_46); +x_56 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_56, 0, x_54); +lean_ctor_set(x_56, 1, x_55); +return x_56; +} +} +} +else +{ +lean_object* x_57; lean_object* x_58; lean_object* x_59; lean_object* x_60; lean_object* x_61; lean_object* x_62; lean_object* x_63; lean_object* x_64; +x_57 = lean_ctor_get(x_38, 0); +x_58 = lean_ctor_get(x_38, 1); +x_59 = lean_ctor_get(x_38, 2); +x_60 = lean_ctor_get(x_38, 3); +x_61 = lean_ctor_get(x_38, 4); +x_62 = lean_ctor_get(x_38, 6); +lean_inc(x_62); +lean_inc(x_61); +lean_inc(x_60); +lean_inc(x_59); +lean_inc(x_58); +lean_inc(x_57); +lean_dec(x_38); +x_63 = lean_alloc_ctor(0, 7, 0); +lean_ctor_set(x_63, 0, x_57); +lean_ctor_set(x_63, 1, x_58); +lean_ctor_set(x_63, 2, x_59); +lean_ctor_set(x_63, 3, x_60); +lean_ctor_set(x_63, 4, x_61); +lean_ctor_set(x_63, 5, x_1); +lean_ctor_set(x_63, 6, x_62); +lean_ctor_set(x_6, 0, x_63); +x_64 = l___private_Init_Lean_Elab_Command_3__setState(x_5, x_2, x_39); +if (lean_obj_tag(x_64) == 0) +{ +lean_object* x_65; lean_object* x_66; lean_object* x_67; lean_object* x_68; +x_65 = lean_ctor_get(x_64, 1); +lean_inc(x_65); +if (lean_is_exclusive(x_64)) { + lean_ctor_release(x_64, 0); + lean_ctor_release(x_64, 1); + x_66 = x_64; +} else { + lean_dec_ref(x_64); + x_66 = lean_box(0); +} +x_67 = lean_box(0); +if (lean_is_scalar(x_66)) { + x_68 = lean_alloc_ctor(0, 2, 0); +} else { + x_68 = x_66; +} +lean_ctor_set(x_68, 0, x_67); +lean_ctor_set(x_68, 1, x_65); +return x_68; +} +else +{ +lean_object* x_69; lean_object* x_70; lean_object* x_71; lean_object* x_72; +x_69 = lean_ctor_get(x_64, 0); +lean_inc(x_69); +x_70 = lean_ctor_get(x_64, 1); +lean_inc(x_70); +if (lean_is_exclusive(x_64)) { + lean_ctor_release(x_64, 0); + lean_ctor_release(x_64, 1); + x_71 = x_64; +} else { + lean_dec_ref(x_64); + x_71 = lean_box(0); +} +if (lean_is_scalar(x_71)) { + x_72 = lean_alloc_ctor(1, 2, 0); +} else { + x_72 = x_71; +} +lean_ctor_set(x_72, 0, x_69); +lean_ctor_set(x_72, 1, x_70); +return x_72; +} +} +} +else +{ +lean_object* x_73; lean_object* x_74; lean_object* x_75; lean_object* x_76; lean_object* x_77; lean_object* x_78; lean_object* x_79; lean_object* x_80; lean_object* x_81; lean_object* x_82; lean_object* x_83; +x_73 = lean_ctor_get(x_6, 1); +lean_inc(x_73); +lean_dec(x_6); +x_74 = lean_ctor_get(x_38, 0); +lean_inc(x_74); +x_75 = lean_ctor_get(x_38, 1); +lean_inc(x_75); +x_76 = lean_ctor_get(x_38, 2); +lean_inc(x_76); +x_77 = lean_ctor_get(x_38, 3); +lean_inc(x_77); +x_78 = lean_ctor_get(x_38, 4); +lean_inc(x_78); +x_79 = lean_ctor_get(x_38, 6); +lean_inc(x_79); +if (lean_is_exclusive(x_38)) { + lean_ctor_release(x_38, 0); + lean_ctor_release(x_38, 1); + lean_ctor_release(x_38, 2); + lean_ctor_release(x_38, 3); + lean_ctor_release(x_38, 4); + lean_ctor_release(x_38, 5); + lean_ctor_release(x_38, 6); + x_80 = x_38; +} else { + lean_dec_ref(x_38); + x_80 = lean_box(0); +} +if (lean_is_scalar(x_80)) { + x_81 = lean_alloc_ctor(0, 7, 0); +} else { + x_81 = x_80; +} +lean_ctor_set(x_81, 0, x_74); +lean_ctor_set(x_81, 1, x_75); +lean_ctor_set(x_81, 2, x_76); +lean_ctor_set(x_81, 3, x_77); +lean_ctor_set(x_81, 4, x_78); +lean_ctor_set(x_81, 5, x_1); +lean_ctor_set(x_81, 6, x_79); +x_82 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_82, 0, x_81); +lean_ctor_set(x_82, 1, x_73); +lean_ctor_set(x_5, 2, x_82); +x_83 = l___private_Init_Lean_Elab_Command_3__setState(x_5, x_2, x_39); +if (lean_obj_tag(x_83) == 0) +{ +lean_object* x_84; lean_object* x_85; lean_object* x_86; lean_object* x_87; +x_84 = lean_ctor_get(x_83, 1); +lean_inc(x_84); +if (lean_is_exclusive(x_83)) { + lean_ctor_release(x_83, 0); + lean_ctor_release(x_83, 1); + x_85 = x_83; +} else { + lean_dec_ref(x_83); + x_85 = lean_box(0); +} +x_86 = lean_box(0); +if (lean_is_scalar(x_85)) { + x_87 = lean_alloc_ctor(0, 2, 0); +} else { + x_87 = x_85; +} +lean_ctor_set(x_87, 0, x_86); +lean_ctor_set(x_87, 1, x_84); +return x_87; +} +else +{ +lean_object* x_88; lean_object* x_89; lean_object* x_90; lean_object* x_91; +x_88 = lean_ctor_get(x_83, 0); +lean_inc(x_88); +x_89 = lean_ctor_get(x_83, 1); +lean_inc(x_89); +if (lean_is_exclusive(x_83)) { + lean_ctor_release(x_83, 0); + lean_ctor_release(x_83, 1); + x_90 = x_83; +} else { + lean_dec_ref(x_83); + x_90 = lean_box(0); +} +if (lean_is_scalar(x_90)) { + x_91 = lean_alloc_ctor(1, 2, 0); +} else { + x_91 = x_90; +} +lean_ctor_set(x_91, 0, x_88); +lean_ctor_set(x_91, 1, x_89); +return x_91; +} +} +} +else +{ +lean_object* x_92; lean_object* x_93; lean_object* x_94; lean_object* x_95; lean_object* x_96; lean_object* x_97; lean_object* x_98; lean_object* x_99; lean_object* x_100; lean_object* x_101; lean_object* x_102; lean_object* x_103; lean_object* x_104; lean_object* x_105; lean_object* x_106; lean_object* x_107; +x_92 = lean_ctor_get(x_5, 0); +x_93 = lean_ctor_get(x_5, 1); +x_94 = lean_ctor_get(x_5, 3); +lean_inc(x_94); +lean_inc(x_93); +lean_inc(x_92); +lean_dec(x_5); +x_95 = lean_ctor_get(x_6, 1); +lean_inc(x_95); +if (lean_is_exclusive(x_6)) { + lean_ctor_release(x_6, 0); + lean_ctor_release(x_6, 1); + x_96 = x_6; +} else { + lean_dec_ref(x_6); + x_96 = lean_box(0); +} +x_97 = lean_ctor_get(x_38, 0); +lean_inc(x_97); +x_98 = lean_ctor_get(x_38, 1); +lean_inc(x_98); +x_99 = lean_ctor_get(x_38, 2); +lean_inc(x_99); +x_100 = lean_ctor_get(x_38, 3); +lean_inc(x_100); +x_101 = lean_ctor_get(x_38, 4); +lean_inc(x_101); +x_102 = lean_ctor_get(x_38, 6); +lean_inc(x_102); +if (lean_is_exclusive(x_38)) { + lean_ctor_release(x_38, 0); + lean_ctor_release(x_38, 1); + lean_ctor_release(x_38, 2); + lean_ctor_release(x_38, 3); + lean_ctor_release(x_38, 4); + lean_ctor_release(x_38, 5); + lean_ctor_release(x_38, 6); + x_103 = x_38; +} else { + lean_dec_ref(x_38); + x_103 = lean_box(0); +} +if (lean_is_scalar(x_103)) { + x_104 = lean_alloc_ctor(0, 7, 0); +} else { + x_104 = x_103; +} +lean_ctor_set(x_104, 0, x_97); +lean_ctor_set(x_104, 1, x_98); +lean_ctor_set(x_104, 2, x_99); +lean_ctor_set(x_104, 3, x_100); +lean_ctor_set(x_104, 4, x_101); +lean_ctor_set(x_104, 5, x_1); +lean_ctor_set(x_104, 6, x_102); +if (lean_is_scalar(x_96)) { + x_105 = lean_alloc_ctor(1, 2, 0); +} else { + x_105 = x_96; +} +lean_ctor_set(x_105, 0, x_104); +lean_ctor_set(x_105, 1, x_95); +x_106 = lean_alloc_ctor(0, 4, 0); +lean_ctor_set(x_106, 0, x_92); +lean_ctor_set(x_106, 1, x_93); +lean_ctor_set(x_106, 2, x_105); +lean_ctor_set(x_106, 3, x_94); +x_107 = l___private_Init_Lean_Elab_Command_3__setState(x_106, x_2, x_39); +if (lean_obj_tag(x_107) == 0) +{ +lean_object* x_108; lean_object* x_109; lean_object* x_110; lean_object* x_111; +x_108 = lean_ctor_get(x_107, 1); +lean_inc(x_108); +if (lean_is_exclusive(x_107)) { + lean_ctor_release(x_107, 0); + lean_ctor_release(x_107, 1); + x_109 = x_107; +} else { + lean_dec_ref(x_107); + x_109 = lean_box(0); +} +x_110 = lean_box(0); +if (lean_is_scalar(x_109)) { + x_111 = lean_alloc_ctor(0, 2, 0); +} else { + x_111 = x_109; +} +lean_ctor_set(x_111, 0, x_110); +lean_ctor_set(x_111, 1, x_108); +return x_111; +} +else +{ +lean_object* x_112; lean_object* x_113; lean_object* x_114; lean_object* x_115; +x_112 = lean_ctor_get(x_107, 0); +lean_inc(x_112); +x_113 = lean_ctor_get(x_107, 1); +lean_inc(x_113); +if (lean_is_exclusive(x_107)) { + lean_ctor_release(x_107, 0); + lean_ctor_release(x_107, 1); + x_114 = x_107; +} else { + lean_dec_ref(x_107); + x_114 = lean_box(0); +} +if (lean_is_scalar(x_114)) { + x_115 = lean_alloc_ctor(1, 2, 0); +} else { + x_115 = x_114; +} +lean_ctor_set(x_115, 0, x_112); +lean_ctor_set(x_115, 1, x_113); +return x_115; +} +} +} +} +else +{ +uint8_t x_116; +lean_dec(x_2); +lean_dec(x_1); +x_116 = !lean_is_exclusive(x_4); +if (x_116 == 0) +{ +return x_4; +} +else +{ +lean_object* x_117; lean_object* x_118; lean_object* x_119; +x_117 = lean_ctor_get(x_4, 0); +x_118 = lean_ctor_get(x_4, 1); +lean_inc(x_118); +lean_inc(x_117); +lean_dec(x_4); +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; +} +} +} +} +lean_object* l_Lean_Elab_Command_modifyScope___at_Lean_Elab_Command_withDeclId___spec__2(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +_start: +{ +lean_object* x_4; +lean_inc(x_2); +x_4 = l___private_Init_Lean_Elab_Command_2__getState(x_2, x_3); +if (lean_obj_tag(x_4) == 0) +{ +lean_object* x_5; lean_object* x_6; +x_5 = lean_ctor_get(x_4, 0); +lean_inc(x_5); +x_6 = lean_ctor_get(x_5, 2); +lean_inc(x_6); +if (lean_obj_tag(x_6) == 0) +{ +lean_object* x_7; uint8_t x_8; +lean_dec(x_1); +x_7 = lean_ctor_get(x_4, 1); +lean_inc(x_7); +lean_dec(x_4); +x_8 = !lean_is_exclusive(x_5); +if (x_8 == 0) +{ +lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; +x_9 = lean_ctor_get(x_5, 2); +lean_dec(x_9); +x_10 = l_Lean_Elab_Command_modifyScope___closed__1; +x_11 = l_unreachable_x21___rarg(x_10); +lean_ctor_set(x_5, 2, x_11); +x_12 = l___private_Init_Lean_Elab_Command_3__setState(x_5, x_2, x_7); +if (lean_obj_tag(x_12) == 0) +{ +uint8_t x_13; +x_13 = !lean_is_exclusive(x_12); +if (x_13 == 0) +{ +lean_object* x_14; lean_object* x_15; +x_14 = lean_ctor_get(x_12, 0); +lean_dec(x_14); +x_15 = lean_box(0); +lean_ctor_set(x_12, 0, x_15); +return x_12; +} +else +{ +lean_object* x_16; lean_object* x_17; lean_object* x_18; +x_16 = lean_ctor_get(x_12, 1); +lean_inc(x_16); +lean_dec(x_12); +x_17 = lean_box(0); +x_18 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_18, 0, x_17); +lean_ctor_set(x_18, 1, x_16); +return x_18; +} +} +else +{ +uint8_t x_19; +x_19 = !lean_is_exclusive(x_12); +if (x_19 == 0) +{ +return x_12; +} +else +{ +lean_object* x_20; lean_object* x_21; lean_object* x_22; +x_20 = lean_ctor_get(x_12, 0); +x_21 = lean_ctor_get(x_12, 1); +lean_inc(x_21); +lean_inc(x_20); +lean_dec(x_12); +x_22 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_22, 0, x_20); +lean_ctor_set(x_22, 1, x_21); +return x_22; +} +} +} +else +{ +lean_object* x_23; lean_object* x_24; lean_object* x_25; lean_object* x_26; lean_object* x_27; lean_object* x_28; lean_object* x_29; +x_23 = lean_ctor_get(x_5, 0); +x_24 = lean_ctor_get(x_5, 1); +x_25 = lean_ctor_get(x_5, 3); +lean_inc(x_25); +lean_inc(x_24); +lean_inc(x_23); +lean_dec(x_5); +x_26 = l_Lean_Elab_Command_modifyScope___closed__1; +x_27 = l_unreachable_x21___rarg(x_26); +x_28 = lean_alloc_ctor(0, 4, 0); +lean_ctor_set(x_28, 0, x_23); +lean_ctor_set(x_28, 1, x_24); +lean_ctor_set(x_28, 2, x_27); +lean_ctor_set(x_28, 3, x_25); +x_29 = l___private_Init_Lean_Elab_Command_3__setState(x_28, x_2, x_7); +if (lean_obj_tag(x_29) == 0) +{ +lean_object* x_30; lean_object* x_31; lean_object* x_32; lean_object* x_33; +x_30 = lean_ctor_get(x_29, 1); +lean_inc(x_30); +if (lean_is_exclusive(x_29)) { + lean_ctor_release(x_29, 0); + lean_ctor_release(x_29, 1); + x_31 = x_29; +} else { + lean_dec_ref(x_29); + x_31 = lean_box(0); +} +x_32 = lean_box(0); +if (lean_is_scalar(x_31)) { + x_33 = lean_alloc_ctor(0, 2, 0); +} else { + x_33 = x_31; +} +lean_ctor_set(x_33, 0, x_32); +lean_ctor_set(x_33, 1, x_30); +return x_33; +} +else +{ +lean_object* x_34; lean_object* x_35; lean_object* x_36; lean_object* x_37; +x_34 = lean_ctor_get(x_29, 0); +lean_inc(x_34); +x_35 = lean_ctor_get(x_29, 1); +lean_inc(x_35); +if (lean_is_exclusive(x_29)) { + lean_ctor_release(x_29, 0); + lean_ctor_release(x_29, 1); + x_36 = x_29; +} else { + lean_dec_ref(x_29); + x_36 = lean_box(0); +} +if (lean_is_scalar(x_36)) { + x_37 = lean_alloc_ctor(1, 2, 0); +} else { + x_37 = x_36; +} +lean_ctor_set(x_37, 0, x_34); +lean_ctor_set(x_37, 1, x_35); +return x_37; +} +} +} +else +{ +lean_object* x_38; lean_object* x_39; uint8_t x_40; +x_38 = lean_ctor_get(x_6, 0); +lean_inc(x_38); +x_39 = lean_ctor_get(x_4, 1); +lean_inc(x_39); +lean_dec(x_4); +x_40 = !lean_is_exclusive(x_5); +if (x_40 == 0) +{ +lean_object* x_41; uint8_t x_42; +x_41 = lean_ctor_get(x_5, 2); +lean_dec(x_41); +x_42 = !lean_is_exclusive(x_6); +if (x_42 == 0) +{ +lean_object* x_43; uint8_t x_44; +x_43 = lean_ctor_get(x_6, 0); +lean_dec(x_43); +x_44 = !lean_is_exclusive(x_38); +if (x_44 == 0) +{ +lean_object* x_45; lean_object* x_46; +x_45 = lean_ctor_get(x_38, 5); +lean_dec(x_45); +lean_ctor_set(x_38, 5, x_1); +x_46 = l___private_Init_Lean_Elab_Command_3__setState(x_5, x_2, x_39); +if (lean_obj_tag(x_46) == 0) +{ +uint8_t x_47; +x_47 = !lean_is_exclusive(x_46); +if (x_47 == 0) +{ +lean_object* x_48; lean_object* x_49; +x_48 = lean_ctor_get(x_46, 0); +lean_dec(x_48); +x_49 = lean_box(0); +lean_ctor_set(x_46, 0, x_49); +return x_46; +} +else +{ +lean_object* x_50; lean_object* x_51; lean_object* x_52; +x_50 = lean_ctor_get(x_46, 1); +lean_inc(x_50); +lean_dec(x_46); +x_51 = lean_box(0); +x_52 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_52, 0, x_51); +lean_ctor_set(x_52, 1, x_50); +return x_52; +} +} +else +{ +uint8_t x_53; +x_53 = !lean_is_exclusive(x_46); +if (x_53 == 0) +{ +return x_46; +} +else +{ +lean_object* x_54; lean_object* x_55; lean_object* x_56; +x_54 = lean_ctor_get(x_46, 0); +x_55 = lean_ctor_get(x_46, 1); +lean_inc(x_55); +lean_inc(x_54); +lean_dec(x_46); +x_56 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_56, 0, x_54); +lean_ctor_set(x_56, 1, x_55); +return x_56; +} +} +} +else +{ +lean_object* x_57; lean_object* x_58; lean_object* x_59; lean_object* x_60; lean_object* x_61; lean_object* x_62; lean_object* x_63; lean_object* x_64; +x_57 = lean_ctor_get(x_38, 0); +x_58 = lean_ctor_get(x_38, 1); +x_59 = lean_ctor_get(x_38, 2); +x_60 = lean_ctor_get(x_38, 3); +x_61 = lean_ctor_get(x_38, 4); +x_62 = lean_ctor_get(x_38, 6); +lean_inc(x_62); +lean_inc(x_61); +lean_inc(x_60); +lean_inc(x_59); +lean_inc(x_58); +lean_inc(x_57); +lean_dec(x_38); +x_63 = lean_alloc_ctor(0, 7, 0); +lean_ctor_set(x_63, 0, x_57); +lean_ctor_set(x_63, 1, x_58); +lean_ctor_set(x_63, 2, x_59); +lean_ctor_set(x_63, 3, x_60); +lean_ctor_set(x_63, 4, x_61); +lean_ctor_set(x_63, 5, x_1); +lean_ctor_set(x_63, 6, x_62); +lean_ctor_set(x_6, 0, x_63); +x_64 = l___private_Init_Lean_Elab_Command_3__setState(x_5, x_2, x_39); +if (lean_obj_tag(x_64) == 0) +{ +lean_object* x_65; lean_object* x_66; lean_object* x_67; lean_object* x_68; +x_65 = lean_ctor_get(x_64, 1); +lean_inc(x_65); +if (lean_is_exclusive(x_64)) { + lean_ctor_release(x_64, 0); + lean_ctor_release(x_64, 1); + x_66 = x_64; +} else { + lean_dec_ref(x_64); + x_66 = lean_box(0); +} +x_67 = lean_box(0); +if (lean_is_scalar(x_66)) { + x_68 = lean_alloc_ctor(0, 2, 0); +} else { + x_68 = x_66; +} +lean_ctor_set(x_68, 0, x_67); +lean_ctor_set(x_68, 1, x_65); +return x_68; +} +else +{ +lean_object* x_69; lean_object* x_70; lean_object* x_71; lean_object* x_72; +x_69 = lean_ctor_get(x_64, 0); +lean_inc(x_69); +x_70 = lean_ctor_get(x_64, 1); +lean_inc(x_70); +if (lean_is_exclusive(x_64)) { + lean_ctor_release(x_64, 0); + lean_ctor_release(x_64, 1); + x_71 = x_64; +} else { + lean_dec_ref(x_64); + x_71 = lean_box(0); +} +if (lean_is_scalar(x_71)) { + x_72 = lean_alloc_ctor(1, 2, 0); +} else { + x_72 = x_71; +} +lean_ctor_set(x_72, 0, x_69); +lean_ctor_set(x_72, 1, x_70); +return x_72; +} +} +} +else +{ +lean_object* x_73; lean_object* x_74; lean_object* x_75; lean_object* x_76; lean_object* x_77; lean_object* x_78; lean_object* x_79; lean_object* x_80; lean_object* x_81; lean_object* x_82; lean_object* x_83; +x_73 = lean_ctor_get(x_6, 1); +lean_inc(x_73); +lean_dec(x_6); +x_74 = lean_ctor_get(x_38, 0); +lean_inc(x_74); +x_75 = lean_ctor_get(x_38, 1); +lean_inc(x_75); +x_76 = lean_ctor_get(x_38, 2); +lean_inc(x_76); +x_77 = lean_ctor_get(x_38, 3); +lean_inc(x_77); +x_78 = lean_ctor_get(x_38, 4); +lean_inc(x_78); +x_79 = lean_ctor_get(x_38, 6); +lean_inc(x_79); +if (lean_is_exclusive(x_38)) { + lean_ctor_release(x_38, 0); + lean_ctor_release(x_38, 1); + lean_ctor_release(x_38, 2); + lean_ctor_release(x_38, 3); + lean_ctor_release(x_38, 4); + lean_ctor_release(x_38, 5); + lean_ctor_release(x_38, 6); + x_80 = x_38; +} else { + lean_dec_ref(x_38); + x_80 = lean_box(0); +} +if (lean_is_scalar(x_80)) { + x_81 = lean_alloc_ctor(0, 7, 0); +} else { + x_81 = x_80; +} +lean_ctor_set(x_81, 0, x_74); +lean_ctor_set(x_81, 1, x_75); +lean_ctor_set(x_81, 2, x_76); +lean_ctor_set(x_81, 3, x_77); +lean_ctor_set(x_81, 4, x_78); +lean_ctor_set(x_81, 5, x_1); +lean_ctor_set(x_81, 6, x_79); +x_82 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_82, 0, x_81); +lean_ctor_set(x_82, 1, x_73); +lean_ctor_set(x_5, 2, x_82); +x_83 = l___private_Init_Lean_Elab_Command_3__setState(x_5, x_2, x_39); +if (lean_obj_tag(x_83) == 0) +{ +lean_object* x_84; lean_object* x_85; lean_object* x_86; lean_object* x_87; +x_84 = lean_ctor_get(x_83, 1); +lean_inc(x_84); +if (lean_is_exclusive(x_83)) { + lean_ctor_release(x_83, 0); + lean_ctor_release(x_83, 1); + x_85 = x_83; +} else { + lean_dec_ref(x_83); + x_85 = lean_box(0); +} +x_86 = lean_box(0); +if (lean_is_scalar(x_85)) { + x_87 = lean_alloc_ctor(0, 2, 0); +} else { + x_87 = x_85; +} +lean_ctor_set(x_87, 0, x_86); +lean_ctor_set(x_87, 1, x_84); +return x_87; +} +else +{ +lean_object* x_88; lean_object* x_89; lean_object* x_90; lean_object* x_91; +x_88 = lean_ctor_get(x_83, 0); +lean_inc(x_88); +x_89 = lean_ctor_get(x_83, 1); +lean_inc(x_89); +if (lean_is_exclusive(x_83)) { + lean_ctor_release(x_83, 0); + lean_ctor_release(x_83, 1); + x_90 = x_83; +} else { + lean_dec_ref(x_83); + x_90 = lean_box(0); +} +if (lean_is_scalar(x_90)) { + x_91 = lean_alloc_ctor(1, 2, 0); +} else { + x_91 = x_90; +} +lean_ctor_set(x_91, 0, x_88); +lean_ctor_set(x_91, 1, x_89); +return x_91; +} +} +} +else +{ +lean_object* x_92; lean_object* x_93; lean_object* x_94; lean_object* x_95; lean_object* x_96; lean_object* x_97; lean_object* x_98; lean_object* x_99; lean_object* x_100; lean_object* x_101; lean_object* x_102; lean_object* x_103; lean_object* x_104; lean_object* x_105; lean_object* x_106; lean_object* x_107; +x_92 = lean_ctor_get(x_5, 0); +x_93 = lean_ctor_get(x_5, 1); +x_94 = lean_ctor_get(x_5, 3); +lean_inc(x_94); +lean_inc(x_93); +lean_inc(x_92); +lean_dec(x_5); +x_95 = lean_ctor_get(x_6, 1); +lean_inc(x_95); +if (lean_is_exclusive(x_6)) { + lean_ctor_release(x_6, 0); + lean_ctor_release(x_6, 1); + x_96 = x_6; +} else { + lean_dec_ref(x_6); + x_96 = lean_box(0); +} +x_97 = lean_ctor_get(x_38, 0); +lean_inc(x_97); +x_98 = lean_ctor_get(x_38, 1); +lean_inc(x_98); +x_99 = lean_ctor_get(x_38, 2); +lean_inc(x_99); +x_100 = lean_ctor_get(x_38, 3); +lean_inc(x_100); +x_101 = lean_ctor_get(x_38, 4); +lean_inc(x_101); +x_102 = lean_ctor_get(x_38, 6); +lean_inc(x_102); +if (lean_is_exclusive(x_38)) { + lean_ctor_release(x_38, 0); + lean_ctor_release(x_38, 1); + lean_ctor_release(x_38, 2); + lean_ctor_release(x_38, 3); + lean_ctor_release(x_38, 4); + lean_ctor_release(x_38, 5); + lean_ctor_release(x_38, 6); + x_103 = x_38; +} else { + lean_dec_ref(x_38); + x_103 = lean_box(0); +} +if (lean_is_scalar(x_103)) { + x_104 = lean_alloc_ctor(0, 7, 0); +} else { + x_104 = x_103; +} +lean_ctor_set(x_104, 0, x_97); +lean_ctor_set(x_104, 1, x_98); +lean_ctor_set(x_104, 2, x_99); +lean_ctor_set(x_104, 3, x_100); +lean_ctor_set(x_104, 4, x_101); +lean_ctor_set(x_104, 5, x_1); +lean_ctor_set(x_104, 6, x_102); +if (lean_is_scalar(x_96)) { + x_105 = lean_alloc_ctor(1, 2, 0); +} else { + x_105 = x_96; +} +lean_ctor_set(x_105, 0, x_104); +lean_ctor_set(x_105, 1, x_95); +x_106 = lean_alloc_ctor(0, 4, 0); +lean_ctor_set(x_106, 0, x_92); +lean_ctor_set(x_106, 1, x_93); +lean_ctor_set(x_106, 2, x_105); +lean_ctor_set(x_106, 3, x_94); +x_107 = l___private_Init_Lean_Elab_Command_3__setState(x_106, x_2, x_39); +if (lean_obj_tag(x_107) == 0) +{ +lean_object* x_108; lean_object* x_109; lean_object* x_110; lean_object* x_111; +x_108 = lean_ctor_get(x_107, 1); +lean_inc(x_108); +if (lean_is_exclusive(x_107)) { + lean_ctor_release(x_107, 0); + lean_ctor_release(x_107, 1); + x_109 = x_107; +} else { + lean_dec_ref(x_107); + x_109 = lean_box(0); +} +x_110 = lean_box(0); +if (lean_is_scalar(x_109)) { + x_111 = lean_alloc_ctor(0, 2, 0); +} else { + x_111 = x_109; +} +lean_ctor_set(x_111, 0, x_110); +lean_ctor_set(x_111, 1, x_108); +return x_111; +} +else +{ +lean_object* x_112; lean_object* x_113; lean_object* x_114; lean_object* x_115; +x_112 = lean_ctor_get(x_107, 0); +lean_inc(x_112); +x_113 = lean_ctor_get(x_107, 1); +lean_inc(x_113); +if (lean_is_exclusive(x_107)) { + lean_ctor_release(x_107, 0); + lean_ctor_release(x_107, 1); + x_114 = x_107; +} else { + lean_dec_ref(x_107); + x_114 = lean_box(0); +} +if (lean_is_scalar(x_114)) { + x_115 = lean_alloc_ctor(1, 2, 0); +} else { + x_115 = x_114; +} +lean_ctor_set(x_115, 0, x_112); +lean_ctor_set(x_115, 1, x_113); +return x_115; +} +} +} +} +else +{ +uint8_t x_116; +lean_dec(x_2); +lean_dec(x_1); +x_116 = !lean_is_exclusive(x_4); +if (x_116 == 0) +{ +return x_4; +} +else +{ +lean_object* x_117; lean_object* x_118; lean_object* x_119; +x_117 = lean_ctor_get(x_4, 0); +x_118 = lean_ctor_get(x_4, 1); +lean_inc(x_118); +lean_inc(x_117); +lean_dec(x_4); +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; +} +} +} +} +lean_object* l_Lean_Elab_Command_modifyScope___at_Lean_Elab_Command_withDeclId___spec__3(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +_start: +{ +lean_object* x_4; +lean_inc(x_2); +x_4 = l___private_Init_Lean_Elab_Command_2__getState(x_2, x_3); +if (lean_obj_tag(x_4) == 0) +{ +lean_object* x_5; lean_object* x_6; +x_5 = lean_ctor_get(x_4, 0); +lean_inc(x_5); +x_6 = lean_ctor_get(x_5, 2); +lean_inc(x_6); +if (lean_obj_tag(x_6) == 0) +{ +lean_object* x_7; uint8_t x_8; +lean_dec(x_1); +x_7 = lean_ctor_get(x_4, 1); +lean_inc(x_7); +lean_dec(x_4); +x_8 = !lean_is_exclusive(x_5); +if (x_8 == 0) +{ +lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; +x_9 = lean_ctor_get(x_5, 2); +lean_dec(x_9); +x_10 = l_Lean_Elab_Command_modifyScope___closed__1; +x_11 = l_unreachable_x21___rarg(x_10); +lean_ctor_set(x_5, 2, x_11); +x_12 = l___private_Init_Lean_Elab_Command_3__setState(x_5, x_2, x_7); +if (lean_obj_tag(x_12) == 0) +{ +uint8_t x_13; +x_13 = !lean_is_exclusive(x_12); +if (x_13 == 0) +{ +lean_object* x_14; lean_object* x_15; +x_14 = lean_ctor_get(x_12, 0); +lean_dec(x_14); +x_15 = lean_box(0); +lean_ctor_set(x_12, 0, x_15); +return x_12; +} +else +{ +lean_object* x_16; lean_object* x_17; lean_object* x_18; +x_16 = lean_ctor_get(x_12, 1); +lean_inc(x_16); +lean_dec(x_12); +x_17 = lean_box(0); +x_18 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_18, 0, x_17); +lean_ctor_set(x_18, 1, x_16); +return x_18; +} +} +else +{ +uint8_t x_19; +x_19 = !lean_is_exclusive(x_12); +if (x_19 == 0) +{ +return x_12; +} +else +{ +lean_object* x_20; lean_object* x_21; lean_object* x_22; +x_20 = lean_ctor_get(x_12, 0); +x_21 = lean_ctor_get(x_12, 1); +lean_inc(x_21); +lean_inc(x_20); +lean_dec(x_12); +x_22 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_22, 0, x_20); +lean_ctor_set(x_22, 1, x_21); +return x_22; +} +} +} +else +{ +lean_object* x_23; lean_object* x_24; lean_object* x_25; lean_object* x_26; lean_object* x_27; lean_object* x_28; lean_object* x_29; +x_23 = lean_ctor_get(x_5, 0); +x_24 = lean_ctor_get(x_5, 1); +x_25 = lean_ctor_get(x_5, 3); +lean_inc(x_25); +lean_inc(x_24); +lean_inc(x_23); +lean_dec(x_5); +x_26 = l_Lean_Elab_Command_modifyScope___closed__1; +x_27 = l_unreachable_x21___rarg(x_26); +x_28 = lean_alloc_ctor(0, 4, 0); +lean_ctor_set(x_28, 0, x_23); +lean_ctor_set(x_28, 1, x_24); +lean_ctor_set(x_28, 2, x_27); +lean_ctor_set(x_28, 3, x_25); +x_29 = l___private_Init_Lean_Elab_Command_3__setState(x_28, x_2, x_7); +if (lean_obj_tag(x_29) == 0) +{ +lean_object* x_30; lean_object* x_31; lean_object* x_32; lean_object* x_33; +x_30 = lean_ctor_get(x_29, 1); +lean_inc(x_30); +if (lean_is_exclusive(x_29)) { + lean_ctor_release(x_29, 0); + lean_ctor_release(x_29, 1); + x_31 = x_29; +} else { + lean_dec_ref(x_29); + x_31 = lean_box(0); +} +x_32 = lean_box(0); +if (lean_is_scalar(x_31)) { + x_33 = lean_alloc_ctor(0, 2, 0); +} else { + x_33 = x_31; +} +lean_ctor_set(x_33, 0, x_32); +lean_ctor_set(x_33, 1, x_30); +return x_33; +} +else +{ +lean_object* x_34; lean_object* x_35; lean_object* x_36; lean_object* x_37; +x_34 = lean_ctor_get(x_29, 0); +lean_inc(x_34); +x_35 = lean_ctor_get(x_29, 1); +lean_inc(x_35); +if (lean_is_exclusive(x_29)) { + lean_ctor_release(x_29, 0); + lean_ctor_release(x_29, 1); + x_36 = x_29; +} else { + lean_dec_ref(x_29); + x_36 = lean_box(0); +} +if (lean_is_scalar(x_36)) { + x_37 = lean_alloc_ctor(1, 2, 0); +} else { + x_37 = x_36; +} +lean_ctor_set(x_37, 0, x_34); +lean_ctor_set(x_37, 1, x_35); +return x_37; +} +} +} +else +{ +lean_object* x_38; lean_object* x_39; uint8_t x_40; +x_38 = lean_ctor_get(x_6, 0); +lean_inc(x_38); +x_39 = lean_ctor_get(x_4, 1); +lean_inc(x_39); +lean_dec(x_4); +x_40 = !lean_is_exclusive(x_5); +if (x_40 == 0) +{ +lean_object* x_41; uint8_t x_42; +x_41 = lean_ctor_get(x_5, 2); +lean_dec(x_41); +x_42 = !lean_is_exclusive(x_6); +if (x_42 == 0) +{ +lean_object* x_43; uint8_t x_44; +x_43 = lean_ctor_get(x_6, 0); +lean_dec(x_43); +x_44 = !lean_is_exclusive(x_38); +if (x_44 == 0) +{ +lean_object* x_45; lean_object* x_46; +x_45 = lean_ctor_get(x_38, 5); +lean_dec(x_45); +lean_ctor_set(x_38, 5, x_1); +x_46 = l___private_Init_Lean_Elab_Command_3__setState(x_5, x_2, x_39); +if (lean_obj_tag(x_46) == 0) +{ +uint8_t x_47; +x_47 = !lean_is_exclusive(x_46); +if (x_47 == 0) +{ +lean_object* x_48; lean_object* x_49; +x_48 = lean_ctor_get(x_46, 0); +lean_dec(x_48); +x_49 = lean_box(0); +lean_ctor_set(x_46, 0, x_49); +return x_46; +} +else +{ +lean_object* x_50; lean_object* x_51; lean_object* x_52; +x_50 = lean_ctor_get(x_46, 1); +lean_inc(x_50); +lean_dec(x_46); +x_51 = lean_box(0); +x_52 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_52, 0, x_51); +lean_ctor_set(x_52, 1, x_50); +return x_52; +} +} +else +{ +uint8_t x_53; +x_53 = !lean_is_exclusive(x_46); +if (x_53 == 0) +{ +return x_46; +} +else +{ +lean_object* x_54; lean_object* x_55; lean_object* x_56; +x_54 = lean_ctor_get(x_46, 0); +x_55 = lean_ctor_get(x_46, 1); +lean_inc(x_55); +lean_inc(x_54); +lean_dec(x_46); +x_56 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_56, 0, x_54); +lean_ctor_set(x_56, 1, x_55); +return x_56; +} +} +} +else +{ +lean_object* x_57; lean_object* x_58; lean_object* x_59; lean_object* x_60; lean_object* x_61; lean_object* x_62; lean_object* x_63; lean_object* x_64; +x_57 = lean_ctor_get(x_38, 0); +x_58 = lean_ctor_get(x_38, 1); +x_59 = lean_ctor_get(x_38, 2); +x_60 = lean_ctor_get(x_38, 3); +x_61 = lean_ctor_get(x_38, 4); +x_62 = lean_ctor_get(x_38, 6); +lean_inc(x_62); +lean_inc(x_61); +lean_inc(x_60); +lean_inc(x_59); +lean_inc(x_58); +lean_inc(x_57); +lean_dec(x_38); +x_63 = lean_alloc_ctor(0, 7, 0); +lean_ctor_set(x_63, 0, x_57); +lean_ctor_set(x_63, 1, x_58); +lean_ctor_set(x_63, 2, x_59); +lean_ctor_set(x_63, 3, x_60); +lean_ctor_set(x_63, 4, x_61); +lean_ctor_set(x_63, 5, x_1); +lean_ctor_set(x_63, 6, x_62); +lean_ctor_set(x_6, 0, x_63); +x_64 = l___private_Init_Lean_Elab_Command_3__setState(x_5, x_2, x_39); +if (lean_obj_tag(x_64) == 0) +{ +lean_object* x_65; lean_object* x_66; lean_object* x_67; lean_object* x_68; +x_65 = lean_ctor_get(x_64, 1); +lean_inc(x_65); +if (lean_is_exclusive(x_64)) { + lean_ctor_release(x_64, 0); + lean_ctor_release(x_64, 1); + x_66 = x_64; +} else { + lean_dec_ref(x_64); + x_66 = lean_box(0); +} +x_67 = lean_box(0); +if (lean_is_scalar(x_66)) { + x_68 = lean_alloc_ctor(0, 2, 0); +} else { + x_68 = x_66; +} +lean_ctor_set(x_68, 0, x_67); +lean_ctor_set(x_68, 1, x_65); +return x_68; +} +else +{ +lean_object* x_69; lean_object* x_70; lean_object* x_71; lean_object* x_72; +x_69 = lean_ctor_get(x_64, 0); +lean_inc(x_69); +x_70 = lean_ctor_get(x_64, 1); +lean_inc(x_70); +if (lean_is_exclusive(x_64)) { + lean_ctor_release(x_64, 0); + lean_ctor_release(x_64, 1); + x_71 = x_64; +} else { + lean_dec_ref(x_64); + x_71 = lean_box(0); +} +if (lean_is_scalar(x_71)) { + x_72 = lean_alloc_ctor(1, 2, 0); +} else { + x_72 = x_71; +} +lean_ctor_set(x_72, 0, x_69); +lean_ctor_set(x_72, 1, x_70); +return x_72; +} +} +} +else +{ +lean_object* x_73; lean_object* x_74; lean_object* x_75; lean_object* x_76; lean_object* x_77; lean_object* x_78; lean_object* x_79; lean_object* x_80; lean_object* x_81; lean_object* x_82; lean_object* x_83; +x_73 = lean_ctor_get(x_6, 1); +lean_inc(x_73); +lean_dec(x_6); +x_74 = lean_ctor_get(x_38, 0); +lean_inc(x_74); +x_75 = lean_ctor_get(x_38, 1); +lean_inc(x_75); +x_76 = lean_ctor_get(x_38, 2); +lean_inc(x_76); +x_77 = lean_ctor_get(x_38, 3); +lean_inc(x_77); +x_78 = lean_ctor_get(x_38, 4); +lean_inc(x_78); +x_79 = lean_ctor_get(x_38, 6); +lean_inc(x_79); +if (lean_is_exclusive(x_38)) { + lean_ctor_release(x_38, 0); + lean_ctor_release(x_38, 1); + lean_ctor_release(x_38, 2); + lean_ctor_release(x_38, 3); + lean_ctor_release(x_38, 4); + lean_ctor_release(x_38, 5); + lean_ctor_release(x_38, 6); + x_80 = x_38; +} else { + lean_dec_ref(x_38); + x_80 = lean_box(0); +} +if (lean_is_scalar(x_80)) { + x_81 = lean_alloc_ctor(0, 7, 0); +} else { + x_81 = x_80; +} +lean_ctor_set(x_81, 0, x_74); +lean_ctor_set(x_81, 1, x_75); +lean_ctor_set(x_81, 2, x_76); +lean_ctor_set(x_81, 3, x_77); +lean_ctor_set(x_81, 4, x_78); +lean_ctor_set(x_81, 5, x_1); +lean_ctor_set(x_81, 6, x_79); +x_82 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_82, 0, x_81); +lean_ctor_set(x_82, 1, x_73); +lean_ctor_set(x_5, 2, x_82); +x_83 = l___private_Init_Lean_Elab_Command_3__setState(x_5, x_2, x_39); +if (lean_obj_tag(x_83) == 0) +{ +lean_object* x_84; lean_object* x_85; lean_object* x_86; lean_object* x_87; +x_84 = lean_ctor_get(x_83, 1); +lean_inc(x_84); +if (lean_is_exclusive(x_83)) { + lean_ctor_release(x_83, 0); + lean_ctor_release(x_83, 1); + x_85 = x_83; +} else { + lean_dec_ref(x_83); + x_85 = lean_box(0); +} +x_86 = lean_box(0); +if (lean_is_scalar(x_85)) { + x_87 = lean_alloc_ctor(0, 2, 0); +} else { + x_87 = x_85; +} +lean_ctor_set(x_87, 0, x_86); +lean_ctor_set(x_87, 1, x_84); +return x_87; +} +else +{ +lean_object* x_88; lean_object* x_89; lean_object* x_90; lean_object* x_91; +x_88 = lean_ctor_get(x_83, 0); +lean_inc(x_88); +x_89 = lean_ctor_get(x_83, 1); +lean_inc(x_89); +if (lean_is_exclusive(x_83)) { + lean_ctor_release(x_83, 0); + lean_ctor_release(x_83, 1); + x_90 = x_83; +} else { + lean_dec_ref(x_83); + x_90 = lean_box(0); +} +if (lean_is_scalar(x_90)) { + x_91 = lean_alloc_ctor(1, 2, 0); +} else { + x_91 = x_90; +} +lean_ctor_set(x_91, 0, x_88); +lean_ctor_set(x_91, 1, x_89); +return x_91; +} +} +} +else +{ +lean_object* x_92; lean_object* x_93; lean_object* x_94; lean_object* x_95; lean_object* x_96; lean_object* x_97; lean_object* x_98; lean_object* x_99; lean_object* x_100; lean_object* x_101; lean_object* x_102; lean_object* x_103; lean_object* x_104; lean_object* x_105; lean_object* x_106; lean_object* x_107; +x_92 = lean_ctor_get(x_5, 0); +x_93 = lean_ctor_get(x_5, 1); +x_94 = lean_ctor_get(x_5, 3); +lean_inc(x_94); +lean_inc(x_93); +lean_inc(x_92); +lean_dec(x_5); +x_95 = lean_ctor_get(x_6, 1); +lean_inc(x_95); +if (lean_is_exclusive(x_6)) { + lean_ctor_release(x_6, 0); + lean_ctor_release(x_6, 1); + x_96 = x_6; +} else { + lean_dec_ref(x_6); + x_96 = lean_box(0); +} +x_97 = lean_ctor_get(x_38, 0); +lean_inc(x_97); +x_98 = lean_ctor_get(x_38, 1); +lean_inc(x_98); +x_99 = lean_ctor_get(x_38, 2); +lean_inc(x_99); +x_100 = lean_ctor_get(x_38, 3); +lean_inc(x_100); +x_101 = lean_ctor_get(x_38, 4); +lean_inc(x_101); +x_102 = lean_ctor_get(x_38, 6); +lean_inc(x_102); +if (lean_is_exclusive(x_38)) { + lean_ctor_release(x_38, 0); + lean_ctor_release(x_38, 1); + lean_ctor_release(x_38, 2); + lean_ctor_release(x_38, 3); + lean_ctor_release(x_38, 4); + lean_ctor_release(x_38, 5); + lean_ctor_release(x_38, 6); + x_103 = x_38; +} else { + lean_dec_ref(x_38); + x_103 = lean_box(0); +} +if (lean_is_scalar(x_103)) { + x_104 = lean_alloc_ctor(0, 7, 0); +} else { + x_104 = x_103; +} +lean_ctor_set(x_104, 0, x_97); +lean_ctor_set(x_104, 1, x_98); +lean_ctor_set(x_104, 2, x_99); +lean_ctor_set(x_104, 3, x_100); +lean_ctor_set(x_104, 4, x_101); +lean_ctor_set(x_104, 5, x_1); +lean_ctor_set(x_104, 6, x_102); +if (lean_is_scalar(x_96)) { + x_105 = lean_alloc_ctor(1, 2, 0); +} else { + x_105 = x_96; +} +lean_ctor_set(x_105, 0, x_104); +lean_ctor_set(x_105, 1, x_95); +x_106 = lean_alloc_ctor(0, 4, 0); +lean_ctor_set(x_106, 0, x_92); +lean_ctor_set(x_106, 1, x_93); +lean_ctor_set(x_106, 2, x_105); +lean_ctor_set(x_106, 3, x_94); +x_107 = l___private_Init_Lean_Elab_Command_3__setState(x_106, x_2, x_39); +if (lean_obj_tag(x_107) == 0) +{ +lean_object* x_108; lean_object* x_109; lean_object* x_110; lean_object* x_111; +x_108 = lean_ctor_get(x_107, 1); +lean_inc(x_108); +if (lean_is_exclusive(x_107)) { + lean_ctor_release(x_107, 0); + lean_ctor_release(x_107, 1); + x_109 = x_107; +} else { + lean_dec_ref(x_107); + x_109 = lean_box(0); +} +x_110 = lean_box(0); +if (lean_is_scalar(x_109)) { + x_111 = lean_alloc_ctor(0, 2, 0); +} else { + x_111 = x_109; +} +lean_ctor_set(x_111, 0, x_110); +lean_ctor_set(x_111, 1, x_108); +return x_111; +} +else +{ +lean_object* x_112; lean_object* x_113; lean_object* x_114; lean_object* x_115; +x_112 = lean_ctor_get(x_107, 0); +lean_inc(x_112); +x_113 = lean_ctor_get(x_107, 1); +lean_inc(x_113); +if (lean_is_exclusive(x_107)) { + lean_ctor_release(x_107, 0); + lean_ctor_release(x_107, 1); + x_114 = x_107; +} else { + lean_dec_ref(x_107); + x_114 = lean_box(0); +} +if (lean_is_scalar(x_114)) { + x_115 = lean_alloc_ctor(1, 2, 0); +} else { + x_115 = x_114; +} +lean_ctor_set(x_115, 0, x_112); +lean_ctor_set(x_115, 1, x_113); +return x_115; +} +} +} +} +else +{ +uint8_t x_116; +lean_dec(x_2); +lean_dec(x_1); +x_116 = !lean_is_exclusive(x_4); +if (x_116 == 0) +{ +return x_4; +} +else +{ +lean_object* x_117; lean_object* x_118; lean_object* x_119; +x_117 = lean_ctor_get(x_4, 0); +x_118 = lean_ctor_get(x_4, 1); +lean_inc(x_118); +lean_inc(x_117); +lean_dec(x_4); +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; +} +} +} +} +lean_object* l_Lean_Elab_Command_modifyScope___at_Lean_Elab_Command_withDeclId___spec__4(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +_start: +{ +lean_object* x_4; +lean_inc(x_2); +x_4 = l___private_Init_Lean_Elab_Command_2__getState(x_2, x_3); +if (lean_obj_tag(x_4) == 0) +{ +lean_object* x_5; lean_object* x_6; +x_5 = lean_ctor_get(x_4, 0); +lean_inc(x_5); +x_6 = lean_ctor_get(x_5, 2); +lean_inc(x_6); +if (lean_obj_tag(x_6) == 0) +{ +lean_object* x_7; uint8_t x_8; +lean_dec(x_1); +x_7 = lean_ctor_get(x_4, 1); +lean_inc(x_7); +lean_dec(x_4); +x_8 = !lean_is_exclusive(x_5); +if (x_8 == 0) +{ +lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; +x_9 = lean_ctor_get(x_5, 2); +lean_dec(x_9); +x_10 = l_Lean_Elab_Command_modifyScope___closed__1; +x_11 = l_unreachable_x21___rarg(x_10); +lean_ctor_set(x_5, 2, x_11); +x_12 = l___private_Init_Lean_Elab_Command_3__setState(x_5, x_2, x_7); +if (lean_obj_tag(x_12) == 0) +{ +uint8_t x_13; +x_13 = !lean_is_exclusive(x_12); +if (x_13 == 0) +{ +lean_object* x_14; lean_object* x_15; +x_14 = lean_ctor_get(x_12, 0); +lean_dec(x_14); +x_15 = lean_box(0); +lean_ctor_set(x_12, 0, x_15); +return x_12; +} +else +{ +lean_object* x_16; lean_object* x_17; lean_object* x_18; +x_16 = lean_ctor_get(x_12, 1); +lean_inc(x_16); +lean_dec(x_12); +x_17 = lean_box(0); +x_18 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_18, 0, x_17); +lean_ctor_set(x_18, 1, x_16); +return x_18; +} +} +else +{ +uint8_t x_19; +x_19 = !lean_is_exclusive(x_12); +if (x_19 == 0) +{ +return x_12; +} +else +{ +lean_object* x_20; lean_object* x_21; lean_object* x_22; +x_20 = lean_ctor_get(x_12, 0); +x_21 = lean_ctor_get(x_12, 1); +lean_inc(x_21); +lean_inc(x_20); +lean_dec(x_12); +x_22 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_22, 0, x_20); +lean_ctor_set(x_22, 1, x_21); +return x_22; +} +} +} +else +{ +lean_object* x_23; lean_object* x_24; lean_object* x_25; lean_object* x_26; lean_object* x_27; lean_object* x_28; lean_object* x_29; +x_23 = lean_ctor_get(x_5, 0); +x_24 = lean_ctor_get(x_5, 1); +x_25 = lean_ctor_get(x_5, 3); +lean_inc(x_25); +lean_inc(x_24); +lean_inc(x_23); +lean_dec(x_5); +x_26 = l_Lean_Elab_Command_modifyScope___closed__1; +x_27 = l_unreachable_x21___rarg(x_26); +x_28 = lean_alloc_ctor(0, 4, 0); +lean_ctor_set(x_28, 0, x_23); +lean_ctor_set(x_28, 1, x_24); +lean_ctor_set(x_28, 2, x_27); +lean_ctor_set(x_28, 3, x_25); +x_29 = l___private_Init_Lean_Elab_Command_3__setState(x_28, x_2, x_7); +if (lean_obj_tag(x_29) == 0) +{ +lean_object* x_30; lean_object* x_31; lean_object* x_32; lean_object* x_33; +x_30 = lean_ctor_get(x_29, 1); +lean_inc(x_30); +if (lean_is_exclusive(x_29)) { + lean_ctor_release(x_29, 0); + lean_ctor_release(x_29, 1); + x_31 = x_29; +} else { + lean_dec_ref(x_29); + x_31 = lean_box(0); +} +x_32 = lean_box(0); +if (lean_is_scalar(x_31)) { + x_33 = lean_alloc_ctor(0, 2, 0); +} else { + x_33 = x_31; +} +lean_ctor_set(x_33, 0, x_32); +lean_ctor_set(x_33, 1, x_30); +return x_33; +} +else +{ +lean_object* x_34; lean_object* x_35; lean_object* x_36; lean_object* x_37; +x_34 = lean_ctor_get(x_29, 0); +lean_inc(x_34); +x_35 = lean_ctor_get(x_29, 1); +lean_inc(x_35); +if (lean_is_exclusive(x_29)) { + lean_ctor_release(x_29, 0); + lean_ctor_release(x_29, 1); + x_36 = x_29; +} else { + lean_dec_ref(x_29); + x_36 = lean_box(0); +} +if (lean_is_scalar(x_36)) { + x_37 = lean_alloc_ctor(1, 2, 0); +} else { + x_37 = x_36; +} +lean_ctor_set(x_37, 0, x_34); +lean_ctor_set(x_37, 1, x_35); +return x_37; +} +} +} +else +{ +lean_object* x_38; lean_object* x_39; uint8_t x_40; +x_38 = lean_ctor_get(x_6, 0); +lean_inc(x_38); +x_39 = lean_ctor_get(x_4, 1); +lean_inc(x_39); +lean_dec(x_4); +x_40 = !lean_is_exclusive(x_5); +if (x_40 == 0) +{ +lean_object* x_41; uint8_t x_42; +x_41 = lean_ctor_get(x_5, 2); +lean_dec(x_41); +x_42 = !lean_is_exclusive(x_6); +if (x_42 == 0) +{ +lean_object* x_43; uint8_t x_44; +x_43 = lean_ctor_get(x_6, 0); +lean_dec(x_43); +x_44 = !lean_is_exclusive(x_38); +if (x_44 == 0) +{ +lean_object* x_45; lean_object* x_46; +x_45 = lean_ctor_get(x_38, 5); +lean_dec(x_45); +lean_ctor_set(x_38, 5, x_1); +x_46 = l___private_Init_Lean_Elab_Command_3__setState(x_5, x_2, x_39); +if (lean_obj_tag(x_46) == 0) +{ +uint8_t x_47; +x_47 = !lean_is_exclusive(x_46); +if (x_47 == 0) +{ +lean_object* x_48; lean_object* x_49; +x_48 = lean_ctor_get(x_46, 0); +lean_dec(x_48); +x_49 = lean_box(0); +lean_ctor_set(x_46, 0, x_49); +return x_46; +} +else +{ +lean_object* x_50; lean_object* x_51; lean_object* x_52; +x_50 = lean_ctor_get(x_46, 1); +lean_inc(x_50); +lean_dec(x_46); +x_51 = lean_box(0); +x_52 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_52, 0, x_51); +lean_ctor_set(x_52, 1, x_50); +return x_52; +} +} +else +{ +uint8_t x_53; +x_53 = !lean_is_exclusive(x_46); +if (x_53 == 0) +{ +return x_46; +} +else +{ +lean_object* x_54; lean_object* x_55; lean_object* x_56; +x_54 = lean_ctor_get(x_46, 0); +x_55 = lean_ctor_get(x_46, 1); +lean_inc(x_55); +lean_inc(x_54); +lean_dec(x_46); +x_56 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_56, 0, x_54); +lean_ctor_set(x_56, 1, x_55); +return x_56; +} +} +} +else +{ +lean_object* x_57; lean_object* x_58; lean_object* x_59; lean_object* x_60; lean_object* x_61; lean_object* x_62; lean_object* x_63; lean_object* x_64; +x_57 = lean_ctor_get(x_38, 0); +x_58 = lean_ctor_get(x_38, 1); +x_59 = lean_ctor_get(x_38, 2); +x_60 = lean_ctor_get(x_38, 3); +x_61 = lean_ctor_get(x_38, 4); +x_62 = lean_ctor_get(x_38, 6); +lean_inc(x_62); +lean_inc(x_61); +lean_inc(x_60); +lean_inc(x_59); +lean_inc(x_58); +lean_inc(x_57); +lean_dec(x_38); +x_63 = lean_alloc_ctor(0, 7, 0); +lean_ctor_set(x_63, 0, x_57); +lean_ctor_set(x_63, 1, x_58); +lean_ctor_set(x_63, 2, x_59); +lean_ctor_set(x_63, 3, x_60); +lean_ctor_set(x_63, 4, x_61); +lean_ctor_set(x_63, 5, x_1); +lean_ctor_set(x_63, 6, x_62); +lean_ctor_set(x_6, 0, x_63); +x_64 = l___private_Init_Lean_Elab_Command_3__setState(x_5, x_2, x_39); +if (lean_obj_tag(x_64) == 0) +{ +lean_object* x_65; lean_object* x_66; lean_object* x_67; lean_object* x_68; +x_65 = lean_ctor_get(x_64, 1); +lean_inc(x_65); +if (lean_is_exclusive(x_64)) { + lean_ctor_release(x_64, 0); + lean_ctor_release(x_64, 1); + x_66 = x_64; +} else { + lean_dec_ref(x_64); + x_66 = lean_box(0); +} +x_67 = lean_box(0); +if (lean_is_scalar(x_66)) { + x_68 = lean_alloc_ctor(0, 2, 0); +} else { + x_68 = x_66; +} +lean_ctor_set(x_68, 0, x_67); +lean_ctor_set(x_68, 1, x_65); +return x_68; +} +else +{ +lean_object* x_69; lean_object* x_70; lean_object* x_71; lean_object* x_72; +x_69 = lean_ctor_get(x_64, 0); +lean_inc(x_69); +x_70 = lean_ctor_get(x_64, 1); +lean_inc(x_70); +if (lean_is_exclusive(x_64)) { + lean_ctor_release(x_64, 0); + lean_ctor_release(x_64, 1); + x_71 = x_64; +} else { + lean_dec_ref(x_64); + x_71 = lean_box(0); +} +if (lean_is_scalar(x_71)) { + x_72 = lean_alloc_ctor(1, 2, 0); +} else { + x_72 = x_71; +} +lean_ctor_set(x_72, 0, x_69); +lean_ctor_set(x_72, 1, x_70); +return x_72; +} +} +} +else +{ +lean_object* x_73; lean_object* x_74; lean_object* x_75; lean_object* x_76; lean_object* x_77; lean_object* x_78; lean_object* x_79; lean_object* x_80; lean_object* x_81; lean_object* x_82; lean_object* x_83; +x_73 = lean_ctor_get(x_6, 1); +lean_inc(x_73); +lean_dec(x_6); +x_74 = lean_ctor_get(x_38, 0); +lean_inc(x_74); +x_75 = lean_ctor_get(x_38, 1); +lean_inc(x_75); +x_76 = lean_ctor_get(x_38, 2); +lean_inc(x_76); +x_77 = lean_ctor_get(x_38, 3); +lean_inc(x_77); +x_78 = lean_ctor_get(x_38, 4); +lean_inc(x_78); +x_79 = lean_ctor_get(x_38, 6); +lean_inc(x_79); +if (lean_is_exclusive(x_38)) { + lean_ctor_release(x_38, 0); + lean_ctor_release(x_38, 1); + lean_ctor_release(x_38, 2); + lean_ctor_release(x_38, 3); + lean_ctor_release(x_38, 4); + lean_ctor_release(x_38, 5); + lean_ctor_release(x_38, 6); + x_80 = x_38; +} else { + lean_dec_ref(x_38); + x_80 = lean_box(0); +} +if (lean_is_scalar(x_80)) { + x_81 = lean_alloc_ctor(0, 7, 0); +} else { + x_81 = x_80; +} +lean_ctor_set(x_81, 0, x_74); +lean_ctor_set(x_81, 1, x_75); +lean_ctor_set(x_81, 2, x_76); +lean_ctor_set(x_81, 3, x_77); +lean_ctor_set(x_81, 4, x_78); +lean_ctor_set(x_81, 5, x_1); +lean_ctor_set(x_81, 6, x_79); +x_82 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_82, 0, x_81); +lean_ctor_set(x_82, 1, x_73); +lean_ctor_set(x_5, 2, x_82); +x_83 = l___private_Init_Lean_Elab_Command_3__setState(x_5, x_2, x_39); +if (lean_obj_tag(x_83) == 0) +{ +lean_object* x_84; lean_object* x_85; lean_object* x_86; lean_object* x_87; +x_84 = lean_ctor_get(x_83, 1); +lean_inc(x_84); +if (lean_is_exclusive(x_83)) { + lean_ctor_release(x_83, 0); + lean_ctor_release(x_83, 1); + x_85 = x_83; +} else { + lean_dec_ref(x_83); + x_85 = lean_box(0); +} +x_86 = lean_box(0); +if (lean_is_scalar(x_85)) { + x_87 = lean_alloc_ctor(0, 2, 0); +} else { + x_87 = x_85; +} +lean_ctor_set(x_87, 0, x_86); +lean_ctor_set(x_87, 1, x_84); +return x_87; +} +else +{ +lean_object* x_88; lean_object* x_89; lean_object* x_90; lean_object* x_91; +x_88 = lean_ctor_get(x_83, 0); +lean_inc(x_88); +x_89 = lean_ctor_get(x_83, 1); +lean_inc(x_89); +if (lean_is_exclusive(x_83)) { + lean_ctor_release(x_83, 0); + lean_ctor_release(x_83, 1); + x_90 = x_83; +} else { + lean_dec_ref(x_83); + x_90 = lean_box(0); +} +if (lean_is_scalar(x_90)) { + x_91 = lean_alloc_ctor(1, 2, 0); +} else { + x_91 = x_90; +} +lean_ctor_set(x_91, 0, x_88); +lean_ctor_set(x_91, 1, x_89); +return x_91; +} +} +} +else +{ +lean_object* x_92; lean_object* x_93; lean_object* x_94; lean_object* x_95; lean_object* x_96; lean_object* x_97; lean_object* x_98; lean_object* x_99; lean_object* x_100; lean_object* x_101; lean_object* x_102; lean_object* x_103; lean_object* x_104; lean_object* x_105; lean_object* x_106; lean_object* x_107; +x_92 = lean_ctor_get(x_5, 0); +x_93 = lean_ctor_get(x_5, 1); +x_94 = lean_ctor_get(x_5, 3); +lean_inc(x_94); +lean_inc(x_93); +lean_inc(x_92); +lean_dec(x_5); +x_95 = lean_ctor_get(x_6, 1); +lean_inc(x_95); +if (lean_is_exclusive(x_6)) { + lean_ctor_release(x_6, 0); + lean_ctor_release(x_6, 1); + x_96 = x_6; +} else { + lean_dec_ref(x_6); + x_96 = lean_box(0); +} +x_97 = lean_ctor_get(x_38, 0); +lean_inc(x_97); +x_98 = lean_ctor_get(x_38, 1); +lean_inc(x_98); +x_99 = lean_ctor_get(x_38, 2); +lean_inc(x_99); +x_100 = lean_ctor_get(x_38, 3); +lean_inc(x_100); +x_101 = lean_ctor_get(x_38, 4); +lean_inc(x_101); +x_102 = lean_ctor_get(x_38, 6); +lean_inc(x_102); +if (lean_is_exclusive(x_38)) { + lean_ctor_release(x_38, 0); + lean_ctor_release(x_38, 1); + lean_ctor_release(x_38, 2); + lean_ctor_release(x_38, 3); + lean_ctor_release(x_38, 4); + lean_ctor_release(x_38, 5); + lean_ctor_release(x_38, 6); + x_103 = x_38; +} else { + lean_dec_ref(x_38); + x_103 = lean_box(0); +} +if (lean_is_scalar(x_103)) { + x_104 = lean_alloc_ctor(0, 7, 0); +} else { + x_104 = x_103; +} +lean_ctor_set(x_104, 0, x_97); +lean_ctor_set(x_104, 1, x_98); +lean_ctor_set(x_104, 2, x_99); +lean_ctor_set(x_104, 3, x_100); +lean_ctor_set(x_104, 4, x_101); +lean_ctor_set(x_104, 5, x_1); +lean_ctor_set(x_104, 6, x_102); +if (lean_is_scalar(x_96)) { + x_105 = lean_alloc_ctor(1, 2, 0); +} else { + x_105 = x_96; +} +lean_ctor_set(x_105, 0, x_104); +lean_ctor_set(x_105, 1, x_95); +x_106 = lean_alloc_ctor(0, 4, 0); +lean_ctor_set(x_106, 0, x_92); +lean_ctor_set(x_106, 1, x_93); +lean_ctor_set(x_106, 2, x_105); +lean_ctor_set(x_106, 3, x_94); +x_107 = l___private_Init_Lean_Elab_Command_3__setState(x_106, x_2, x_39); +if (lean_obj_tag(x_107) == 0) +{ +lean_object* x_108; lean_object* x_109; lean_object* x_110; lean_object* x_111; +x_108 = lean_ctor_get(x_107, 1); +lean_inc(x_108); +if (lean_is_exclusive(x_107)) { + lean_ctor_release(x_107, 0); + lean_ctor_release(x_107, 1); + x_109 = x_107; +} else { + lean_dec_ref(x_107); + x_109 = lean_box(0); +} +x_110 = lean_box(0); +if (lean_is_scalar(x_109)) { + x_111 = lean_alloc_ctor(0, 2, 0); +} else { + x_111 = x_109; +} +lean_ctor_set(x_111, 0, x_110); +lean_ctor_set(x_111, 1, x_108); +return x_111; +} +else +{ +lean_object* x_112; lean_object* x_113; lean_object* x_114; lean_object* x_115; +x_112 = lean_ctor_get(x_107, 0); +lean_inc(x_112); +x_113 = lean_ctor_get(x_107, 1); +lean_inc(x_113); +if (lean_is_exclusive(x_107)) { + lean_ctor_release(x_107, 0); + lean_ctor_release(x_107, 1); + x_114 = x_107; +} else { + lean_dec_ref(x_107); + x_114 = lean_box(0); +} +if (lean_is_scalar(x_114)) { + x_115 = lean_alloc_ctor(1, 2, 0); +} else { + x_115 = x_114; +} +lean_ctor_set(x_115, 0, x_112); +lean_ctor_set(x_115, 1, x_113); +return x_115; +} +} +} +} +else +{ +uint8_t x_116; +lean_dec(x_2); +lean_dec(x_1); +x_116 = !lean_is_exclusive(x_4); +if (x_116 == 0) +{ +return x_4; +} +else +{ +lean_object* x_117; lean_object* x_118; lean_object* x_119; +x_117 = lean_ctor_get(x_4, 0); +x_118 = lean_ctor_get(x_4, 1); +lean_inc(x_118); +lean_inc(x_117); +lean_dec(x_4); +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; +} +} +} +} +lean_object* l_Array_iterateMAux___main___at_Lean_Elab_Command_withDeclId___spec__5(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6) { +_start: +{ +lean_object* x_7; uint8_t x_8; +x_7 = lean_array_get_size(x_2); +x_8 = lean_nat_dec_lt(x_3, x_7); +lean_dec(x_7); +if (x_8 == 0) +{ +lean_object* x_9; +lean_dec(x_3); +x_9 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_9, 0, x_4); +lean_ctor_set(x_9, 1, x_6); +return x_9; +} +else +{ +lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; uint8_t x_14; +x_10 = lean_array_fget(x_2, x_3); +x_11 = lean_unsigned_to_nat(1u); +x_12 = lean_nat_add(x_3, x_11); +lean_dec(x_3); +x_13 = l_Lean_Syntax_getId(x_10); +x_14 = l_List_elem___main___at_Lean_Parser_addLeadingParser___spec__4(x_13, x_4); +if (x_14 == 0) +{ +lean_object* x_15; +lean_dec(x_10); +x_15 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_15, 0, x_13); +lean_ctor_set(x_15, 1, x_4); +x_3 = x_12; +x_4 = x_15; +goto _start; +} +else +{ +lean_object* x_17; uint8_t x_18; +lean_dec(x_12); +lean_dec(x_4); +x_17 = l_Lean_Elab_Command_throwAlreadyDeclaredUniverseLevel___rarg(x_10, x_13, x_5, x_6); +lean_dec(x_10); +x_18 = !lean_is_exclusive(x_17); +if (x_18 == 0) +{ +return x_17; +} +else +{ +lean_object* x_19; lean_object* x_20; lean_object* x_21; +x_19 = lean_ctor_get(x_17, 0); +x_20 = lean_ctor_get(x_17, 1); +lean_inc(x_20); +lean_inc(x_19); +lean_dec(x_17); +x_21 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_21, 0, x_19); +lean_ctor_set(x_21, 1, x_20); +return x_21; +} +} +} +} +} +lean_object* _init_l_Lean_Elab_Command_withDeclId___closed__1() { +_start: +{ +lean_object* x_1; +x_1 = lean_mk_string("invalid declaration name"); +return x_1; +} +} +lean_object* _init_l_Lean_Elab_Command_withDeclId___closed__2() { +_start: +{ +lean_object* x_1; lean_object* x_2; +x_1 = l_Lean_Elab_Command_withDeclId___closed__1; +x_2 = lean_alloc_ctor(2, 1, 0); +lean_ctor_set(x_2, 0, x_1); +return x_2; +} +} +lean_object* _init_l_Lean_Elab_Command_withDeclId___closed__3() { +_start: +{ +lean_object* x_1; lean_object* x_2; +x_1 = l_Lean_Elab_Command_withDeclId___closed__2; +x_2 = lean_alloc_ctor(0, 1, 0); +lean_ctor_set(x_2, 0, x_1); +return x_2; +} +} +lean_object* l_Lean_Elab_Command_withDeclId(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { +_start: +{ +lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; +x_5 = lean_unsigned_to_nat(0u); +x_6 = l_Lean_Syntax_getIdAt(x_1, x_5); +x_7 = lean_unsigned_to_nat(1u); +x_8 = l_Lean_Syntax_getArg(x_1, x_7); +lean_inc(x_3); +x_9 = l_Lean_Elab_Command_getLevelNames(x_3, x_4); +if (lean_obj_tag(x_9) == 0) +{ +lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; uint8_t x_97; +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_97 = l_Lean_Syntax_isNone(x_8); +if (x_97 == 0) +{ +lean_object* x_98; lean_object* x_99; lean_object* x_100; lean_object* x_101; lean_object* x_102; lean_object* x_103; +x_98 = l_Lean_Syntax_getArg(x_8, x_7); +lean_dec(x_8); +x_99 = l_Lean_Syntax_getArgs(x_98); +lean_dec(x_98); +x_100 = lean_unsigned_to_nat(2u); +x_101 = l_Array_empty___closed__1; +x_102 = l_Lean_Syntax_foldArgsAuxM___main___at_Lean_Syntax_foldSepRevArgsM___spec__1(x_100, x_99, x_5, x_101); +lean_dec(x_99); +lean_inc(x_10); +x_103 = l_Array_iterateMAux___main___at_Lean_Elab_Command_withDeclId___spec__5(x_1, x_102, x_5, x_10, x_3, x_11); +lean_dec(x_102); +if (lean_obj_tag(x_103) == 0) +{ +lean_object* x_104; lean_object* x_105; +x_104 = lean_ctor_get(x_103, 0); +lean_inc(x_104); +x_105 = lean_ctor_get(x_103, 1); +lean_inc(x_105); +lean_dec(x_103); +x_12 = x_104; +x_13 = x_105; +goto block_96; +} +else +{ +uint8_t x_106; +lean_dec(x_10); +lean_dec(x_6); +lean_dec(x_3); +lean_dec(x_2); +x_106 = !lean_is_exclusive(x_103); +if (x_106 == 0) +{ +return x_103; +} +else +{ +lean_object* x_107; lean_object* x_108; lean_object* x_109; +x_107 = lean_ctor_get(x_103, 0); +x_108 = lean_ctor_get(x_103, 1); +lean_inc(x_108); +lean_inc(x_107); +lean_dec(x_103); +x_109 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_109, 0, x_107); +lean_ctor_set(x_109, 1, x_108); +return x_109; +} +} +} +else +{ +lean_dec(x_8); +lean_inc(x_10); +x_12 = x_10; +x_13 = x_11; +goto block_96; +} +block_96: +{ +if (lean_obj_tag(x_6) == 1) +{ +lean_object* x_14; lean_object* x_15; lean_object* x_16; uint8_t x_17; lean_object* x_18; +x_14 = lean_ctor_get(x_6, 0); +lean_inc(x_14); +x_15 = lean_ctor_get(x_6, 1); +lean_inc(x_15); +lean_dec(x_6); +x_16 = l_Lean_Parser_Command_namespace___elambda__1___closed__1; +x_17 = 1; +lean_inc(x_3); +lean_inc(x_14); +x_18 = l___private_Init_Lean_Elab_Command_10__addScopes___main(x_1, x_16, x_17, x_14, x_3, x_13); +if (lean_obj_tag(x_18) == 0) +{ +lean_object* x_19; lean_object* x_20; +x_19 = lean_ctor_get(x_18, 1); +lean_inc(x_19); +lean_dec(x_18); +lean_inc(x_3); +x_20 = l_Lean_Elab_Command_modifyScope___at_Lean_Elab_Command_withDeclId___spec__1(x_12, x_3, x_19); +if (lean_obj_tag(x_20) == 0) +{ +lean_object* x_21; lean_object* x_22; lean_object* x_23; lean_object* x_24; +x_21 = lean_ctor_get(x_20, 1); +lean_inc(x_21); +lean_dec(x_20); +x_22 = lean_box(0); +x_23 = lean_name_mk_string(x_22, x_15); +lean_inc(x_3); +x_24 = lean_apply_3(x_2, x_23, x_3, x_21); +if (lean_obj_tag(x_24) == 0) +{ +lean_object* x_25; lean_object* x_26; lean_object* x_27; +x_25 = lean_ctor_get(x_24, 0); +lean_inc(x_25); +x_26 = lean_ctor_get(x_24, 1); +lean_inc(x_26); +lean_dec(x_24); +lean_inc(x_3); +lean_inc(x_10); +x_27 = l_Lean_Elab_Command_modifyScope___at_Lean_Elab_Command_withDeclId___spec__2(x_10, x_3, x_26); +if (lean_obj_tag(x_27) == 0) +{ +lean_object* x_28; lean_object* x_29; +lean_dec(x_10); +x_28 = lean_ctor_get(x_27, 1); +lean_inc(x_28); +lean_dec(x_27); +lean_inc(x_3); +x_29 = l___private_Init_Lean_Elab_Command_2__getState(x_3, x_28); +if (lean_obj_tag(x_29) == 0) +{ +lean_object* x_30; lean_object* x_31; uint8_t x_32; +x_30 = lean_ctor_get(x_29, 0); +lean_inc(x_30); +x_31 = lean_ctor_get(x_29, 1); +lean_inc(x_31); +lean_dec(x_29); +x_32 = !lean_is_exclusive(x_30); +if (x_32 == 0) +{ +lean_object* x_33; lean_object* x_34; lean_object* x_35; lean_object* x_36; +x_33 = lean_ctor_get(x_30, 2); +x_34 = l_Lean_Name_getNumParts___main(x_14); +lean_dec(x_14); +x_35 = l_List_drop___main___rarg(x_34, x_33); +lean_dec(x_33); +lean_ctor_set(x_30, 2, x_35); +x_36 = l___private_Init_Lean_Elab_Command_3__setState(x_30, x_3, x_31); +if (lean_obj_tag(x_36) == 0) +{ +uint8_t x_37; +x_37 = !lean_is_exclusive(x_36); +if (x_37 == 0) +{ +lean_object* x_38; +x_38 = lean_ctor_get(x_36, 0); +lean_dec(x_38); +lean_ctor_set(x_36, 0, x_25); +return x_36; +} +else +{ +lean_object* x_39; lean_object* x_40; +x_39 = lean_ctor_get(x_36, 1); +lean_inc(x_39); +lean_dec(x_36); +x_40 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_40, 0, x_25); +lean_ctor_set(x_40, 1, x_39); +return x_40; +} +} +else +{ +uint8_t x_41; +lean_dec(x_25); +x_41 = !lean_is_exclusive(x_36); +if (x_41 == 0) +{ +return x_36; +} +else +{ +lean_object* x_42; lean_object* x_43; lean_object* x_44; +x_42 = lean_ctor_get(x_36, 0); +x_43 = lean_ctor_get(x_36, 1); +lean_inc(x_43); +lean_inc(x_42); +lean_dec(x_36); +x_44 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_44, 0, x_42); +lean_ctor_set(x_44, 1, x_43); +return x_44; +} +} +} +else +{ +lean_object* x_45; lean_object* x_46; lean_object* x_47; lean_object* x_48; lean_object* x_49; lean_object* x_50; lean_object* x_51; lean_object* x_52; +x_45 = lean_ctor_get(x_30, 0); +x_46 = lean_ctor_get(x_30, 1); +x_47 = lean_ctor_get(x_30, 2); +x_48 = lean_ctor_get(x_30, 3); +lean_inc(x_48); +lean_inc(x_47); +lean_inc(x_46); +lean_inc(x_45); +lean_dec(x_30); +x_49 = l_Lean_Name_getNumParts___main(x_14); +lean_dec(x_14); +x_50 = l_List_drop___main___rarg(x_49, x_47); +lean_dec(x_47); +x_51 = lean_alloc_ctor(0, 4, 0); +lean_ctor_set(x_51, 0, x_45); +lean_ctor_set(x_51, 1, x_46); +lean_ctor_set(x_51, 2, x_50); +lean_ctor_set(x_51, 3, x_48); +x_52 = l___private_Init_Lean_Elab_Command_3__setState(x_51, x_3, x_31); +if (lean_obj_tag(x_52) == 0) +{ +lean_object* x_53; lean_object* x_54; lean_object* x_55; +x_53 = lean_ctor_get(x_52, 1); +lean_inc(x_53); +if (lean_is_exclusive(x_52)) { + lean_ctor_release(x_52, 0); + lean_ctor_release(x_52, 1); + x_54 = x_52; +} else { + lean_dec_ref(x_52); + x_54 = lean_box(0); +} +if (lean_is_scalar(x_54)) { + x_55 = lean_alloc_ctor(0, 2, 0); +} else { + x_55 = x_54; +} +lean_ctor_set(x_55, 0, x_25); +lean_ctor_set(x_55, 1, x_53); +return x_55; +} +else +{ +lean_object* x_56; lean_object* x_57; lean_object* x_58; lean_object* x_59; +lean_dec(x_25); +x_56 = lean_ctor_get(x_52, 0); +lean_inc(x_56); +x_57 = lean_ctor_get(x_52, 1); +lean_inc(x_57); +if (lean_is_exclusive(x_52)) { + lean_ctor_release(x_52, 0); + lean_ctor_release(x_52, 1); + x_58 = x_52; +} else { + lean_dec_ref(x_52); + x_58 = lean_box(0); +} +if (lean_is_scalar(x_58)) { + x_59 = lean_alloc_ctor(1, 2, 0); +} else { + x_59 = x_58; +} +lean_ctor_set(x_59, 0, x_56); +lean_ctor_set(x_59, 1, x_57); +return x_59; +} +} +} +else +{ +uint8_t x_60; +lean_dec(x_25); +lean_dec(x_14); +lean_dec(x_3); +x_60 = !lean_is_exclusive(x_29); +if (x_60 == 0) +{ +return x_29; +} +else +{ +lean_object* x_61; lean_object* x_62; lean_object* x_63; +x_61 = lean_ctor_get(x_29, 0); +x_62 = lean_ctor_get(x_29, 1); +lean_inc(x_62); +lean_inc(x_61); +lean_dec(x_29); +x_63 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_63, 0, x_61); +lean_ctor_set(x_63, 1, x_62); +return x_63; +} +} +} +else +{ +lean_object* x_64; lean_object* x_65; lean_object* x_66; +lean_dec(x_25); +lean_dec(x_14); +x_64 = lean_ctor_get(x_27, 0); +lean_inc(x_64); +x_65 = lean_ctor_get(x_27, 1); +lean_inc(x_65); +lean_dec(x_27); +x_66 = l_Lean_Elab_Command_modifyScope___at_Lean_Elab_Command_withDeclId___spec__3(x_10, x_3, x_65); +if (lean_obj_tag(x_66) == 0) +{ +uint8_t x_67; +x_67 = !lean_is_exclusive(x_66); +if (x_67 == 0) +{ +lean_object* x_68; +x_68 = lean_ctor_get(x_66, 0); +lean_dec(x_68); +lean_ctor_set_tag(x_66, 1); +lean_ctor_set(x_66, 0, x_64); +return x_66; +} +else +{ +lean_object* x_69; lean_object* x_70; +x_69 = lean_ctor_get(x_66, 1); +lean_inc(x_69); +lean_dec(x_66); +x_70 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_70, 0, x_64); +lean_ctor_set(x_70, 1, x_69); +return x_70; +} +} +else +{ +uint8_t x_71; +lean_dec(x_64); +x_71 = !lean_is_exclusive(x_66); +if (x_71 == 0) +{ +return x_66; +} +else +{ +lean_object* x_72; lean_object* x_73; lean_object* x_74; +x_72 = lean_ctor_get(x_66, 0); +x_73 = lean_ctor_get(x_66, 1); +lean_inc(x_73); +lean_inc(x_72); +lean_dec(x_66); +x_74 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_74, 0, x_72); +lean_ctor_set(x_74, 1, x_73); +return x_74; +} +} +} +} +else +{ +lean_object* x_75; lean_object* x_76; lean_object* x_77; +lean_dec(x_14); +x_75 = lean_ctor_get(x_24, 0); +lean_inc(x_75); +x_76 = lean_ctor_get(x_24, 1); +lean_inc(x_76); +lean_dec(x_24); +x_77 = l_Lean_Elab_Command_modifyScope___at_Lean_Elab_Command_withDeclId___spec__4(x_10, x_3, x_76); +if (lean_obj_tag(x_77) == 0) +{ +uint8_t x_78; +x_78 = !lean_is_exclusive(x_77); +if (x_78 == 0) +{ +lean_object* x_79; +x_79 = lean_ctor_get(x_77, 0); +lean_dec(x_79); +lean_ctor_set_tag(x_77, 1); +lean_ctor_set(x_77, 0, x_75); +return x_77; +} +else +{ +lean_object* x_80; lean_object* x_81; +x_80 = lean_ctor_get(x_77, 1); +lean_inc(x_80); +lean_dec(x_77); +x_81 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_81, 0, x_75); +lean_ctor_set(x_81, 1, x_80); +return x_81; +} +} +else +{ +uint8_t x_82; +lean_dec(x_75); +x_82 = !lean_is_exclusive(x_77); +if (x_82 == 0) +{ +return x_77; +} +else +{ +lean_object* x_83; lean_object* x_84; lean_object* x_85; +x_83 = lean_ctor_get(x_77, 0); +x_84 = lean_ctor_get(x_77, 1); +lean_inc(x_84); +lean_inc(x_83); +lean_dec(x_77); +x_85 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_85, 0, x_83); +lean_ctor_set(x_85, 1, x_84); +return x_85; +} +} +} +} +else +{ +uint8_t x_86; +lean_dec(x_15); +lean_dec(x_14); +lean_dec(x_10); +lean_dec(x_3); +lean_dec(x_2); +x_86 = !lean_is_exclusive(x_20); +if (x_86 == 0) +{ +return x_20; +} +else +{ +lean_object* x_87; lean_object* x_88; lean_object* x_89; +x_87 = lean_ctor_get(x_20, 0); +x_88 = lean_ctor_get(x_20, 1); +lean_inc(x_88); +lean_inc(x_87); +lean_dec(x_20); +x_89 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_89, 0, x_87); +lean_ctor_set(x_89, 1, x_88); +return x_89; +} +} +} +else +{ +uint8_t x_90; +lean_dec(x_15); +lean_dec(x_14); +lean_dec(x_12); +lean_dec(x_10); +lean_dec(x_3); +lean_dec(x_2); +x_90 = !lean_is_exclusive(x_18); +if (x_90 == 0) +{ +return x_18; +} +else +{ +lean_object* x_91; lean_object* x_92; lean_object* x_93; +x_91 = lean_ctor_get(x_18, 0); +x_92 = lean_ctor_get(x_18, 1); +lean_inc(x_92); +lean_inc(x_91); +lean_dec(x_18); +x_93 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_93, 0, x_91); +lean_ctor_set(x_93, 1, x_92); +return x_93; +} +} +} +else +{ +lean_object* x_94; lean_object* x_95; +lean_dec(x_12); +lean_dec(x_10); +lean_dec(x_6); +lean_dec(x_2); +x_94 = l_Lean_Elab_Command_withDeclId___closed__3; +x_95 = l_Lean_Elab_throwError___at_Lean_Elab_Command_elabCommand___spec__1(x_1, x_94, x_3, x_13); +lean_dec(x_3); +return x_95; +} +} +} +else +{ +uint8_t x_110; +lean_dec(x_8); +lean_dec(x_6); +lean_dec(x_3); +lean_dec(x_2); +x_110 = !lean_is_exclusive(x_9); +if (x_110 == 0) +{ +return x_9; +} +else +{ +lean_object* x_111; lean_object* x_112; lean_object* x_113; +x_111 = lean_ctor_get(x_9, 0); +x_112 = lean_ctor_get(x_9, 1); +lean_inc(x_112); +lean_inc(x_111); +lean_dec(x_9); +x_113 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_113, 0, x_111); +lean_ctor_set(x_113, 1, x_112); +return x_113; +} +} +} +} +lean_object* l_Array_iterateMAux___main___at_Lean_Elab_Command_withDeclId___spec__5___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6) { +_start: +{ +lean_object* x_7; +x_7 = l_Array_iterateMAux___main___at_Lean_Elab_Command_withDeclId___spec__5(x_1, x_2, x_3, x_4, x_5, x_6); +lean_dec(x_5); +lean_dec(x_2); +lean_dec(x_1); +return x_7; +} +} +lean_object* l_Lean_Elab_Command_withDeclId___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { +_start: +{ +lean_object* x_5; +x_5 = l_Lean_Elab_Command_withDeclId(x_1, x_2, x_3, x_4); +lean_dec(x_1); +return x_5; +} +} +lean_object* l_List_foldl___main___at_Lean_Elab_Command_sortDeclLevelParams___spec__1(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +_start: +{ +if (lean_obj_tag(x_3) == 0) +{ +return x_2; +} +else +{ +uint8_t x_4; +x_4 = !lean_is_exclusive(x_3); +if (x_4 == 0) +{ +lean_object* x_5; lean_object* x_6; uint8_t x_7; +x_5 = lean_ctor_get(x_3, 0); +x_6 = lean_ctor_get(x_3, 1); +x_7 = l_Array_contains___at_Lean_findField_x3f___main___spec__1(x_1, x_5); +if (x_7 == 0) +{ +lean_free_object(x_3); +lean_dec(x_5); +x_3 = x_6; +goto _start; +} +else +{ +lean_ctor_set(x_3, 1, x_2); +x_2 = x_3; +x_3 = x_6; +goto _start; +} +} +else +{ +lean_object* x_10; lean_object* x_11; uint8_t x_12; +x_10 = lean_ctor_get(x_3, 0); +x_11 = lean_ctor_get(x_3, 1); +lean_inc(x_11); +lean_inc(x_10); +lean_dec(x_3); +x_12 = l_Array_contains___at_Lean_findField_x3f___main___spec__1(x_1, x_10); +if (x_12 == 0) +{ +lean_dec(x_10); +x_3 = x_11; +goto _start; +} +else +{ +lean_object* x_14; +x_14 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_14, 0, x_10); +lean_ctor_set(x_14, 1, x_2); +x_2 = x_14; +x_3 = x_11; +goto _start; +} +} +} +} +} +lean_object* l_Array_filterAux___main___at_Lean_Elab_Command_sortDeclLevelParams___spec__2(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { +_start: +{ +lean_object* x_5; uint8_t x_6; +x_5 = lean_array_get_size(x_2); +x_6 = lean_nat_dec_lt(x_3, x_5); +lean_dec(x_5); +if (x_6 == 0) +{ +lean_object* x_7; +lean_dec(x_3); +x_7 = l_Array_shrink___main___rarg(x_2, x_4); +lean_dec(x_4); +return x_7; +} +else +{ +lean_object* x_8; uint8_t x_9; +x_8 = lean_array_fget(x_2, x_3); +x_9 = l_List_elem___main___at_Lean_Parser_addLeadingParser___spec__4(x_8, x_1); +lean_dec(x_8); +if (x_9 == 0) +{ +uint8_t x_10; +x_10 = lean_nat_dec_lt(x_4, x_3); +if (x_10 == 0) +{ +lean_object* x_11; lean_object* x_12; lean_object* x_13; +x_11 = lean_unsigned_to_nat(1u); +x_12 = lean_nat_add(x_3, x_11); +lean_dec(x_3); +x_13 = lean_nat_add(x_4, x_11); +lean_dec(x_4); +x_3 = x_12; +x_4 = x_13; +goto _start; +} +else +{ +lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; +x_15 = lean_array_fswap(x_2, x_3, x_4); +x_16 = lean_unsigned_to_nat(1u); +x_17 = lean_nat_add(x_3, x_16); +lean_dec(x_3); +x_18 = lean_nat_add(x_4, x_16); +lean_dec(x_4); +x_2 = x_15; +x_3 = x_17; +x_4 = x_18; +goto _start; +} +} +else +{ +lean_object* x_20; lean_object* x_21; +x_20 = lean_unsigned_to_nat(1u); +x_21 = lean_nat_add(x_3, x_20); +lean_dec(x_3); +x_3 = x_21; +goto _start; +} +} +} +} +lean_object* l___private_Init_Data_Array_QSort_1__partitionAux___main___at_Lean_Elab_Command_sortDeclLevelParams___spec__4(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) { +_start: +{ +uint8_t x_6; +x_6 = lean_nat_dec_lt(x_5, x_1); +if (x_6 == 0) +{ +lean_object* x_7; lean_object* x_8; +lean_dec(x_5); +x_7 = lean_array_swap(x_3, x_4, x_1); +x_8 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_8, 0, x_4); +lean_ctor_set(x_8, 1, x_7); +return x_8; +} +else +{ +lean_object* x_9; lean_object* x_10; uint8_t x_11; +x_9 = l_Lean_Name_inhabited; +x_10 = lean_array_get(x_9, x_3, x_5); +x_11 = l_Lean_Name_lt___main(x_10, x_2); +lean_dec(x_10); +if (x_11 == 0) +{ +lean_object* x_12; lean_object* x_13; +x_12 = lean_unsigned_to_nat(1u); +x_13 = lean_nat_add(x_5, x_12); +lean_dec(x_5); +x_5 = x_13; +goto _start; +} +else +{ +lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; +x_15 = lean_array_swap(x_3, x_4, x_5); +x_16 = lean_unsigned_to_nat(1u); +x_17 = lean_nat_add(x_4, x_16); +lean_dec(x_4); +x_18 = lean_nat_add(x_5, x_16); +lean_dec(x_5); +x_3 = x_15; +x_4 = x_17; +x_5 = x_18; +goto _start; +} +} +} +} +lean_object* l_Array_qsortAux___main___at_Lean_Elab_Command_sortDeclLevelParams___spec__3(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +_start: +{ +lean_object* x_4; uint8_t x_13; +x_13 = lean_nat_dec_lt(x_2, x_3); +if (x_13 == 0) +{ +lean_dec(x_2); +return x_1; +} +else +{ +lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_37; lean_object* x_38; lean_object* x_39; uint8_t x_40; +x_14 = lean_nat_add(x_2, x_3); +x_15 = lean_unsigned_to_nat(2u); +x_16 = lean_nat_div(x_14, x_15); +lean_dec(x_14); +x_37 = l_Lean_Name_inhabited; +x_38 = lean_array_get(x_37, x_1, x_16); +x_39 = lean_array_get(x_37, x_1, x_2); +x_40 = l_Lean_Name_lt___main(x_38, x_39); +lean_dec(x_39); +lean_dec(x_38); +if (x_40 == 0) +{ +x_17 = x_1; +goto block_36; +} +else +{ +lean_object* x_41; +x_41 = lean_array_swap(x_1, x_2, x_16); +x_17 = x_41; +goto block_36; +} +block_36: +{ +lean_object* x_18; lean_object* x_19; lean_object* x_20; uint8_t x_21; +x_18 = l_Lean_Name_inhabited; +x_19 = lean_array_get(x_18, x_17, x_3); +x_20 = lean_array_get(x_18, x_17, x_2); +x_21 = l_Lean_Name_lt___main(x_19, x_20); +lean_dec(x_20); +if (x_21 == 0) +{ +lean_object* x_22; uint8_t x_23; +x_22 = lean_array_get(x_18, x_17, x_16); +x_23 = l_Lean_Name_lt___main(x_22, x_19); +lean_dec(x_22); +if (x_23 == 0) +{ +lean_object* x_24; +lean_dec(x_16); +lean_inc_n(x_2, 2); +x_24 = l___private_Init_Data_Array_QSort_1__partitionAux___main___at_Lean_Elab_Command_sortDeclLevelParams___spec__4(x_3, x_19, x_17, x_2, x_2); +lean_dec(x_19); +x_4 = x_24; +goto block_12; +} +else +{ +lean_object* x_25; lean_object* x_26; lean_object* x_27; +lean_dec(x_19); +x_25 = lean_array_swap(x_17, x_16, x_3); +lean_dec(x_16); +x_26 = lean_array_get(x_18, x_25, x_3); +lean_inc_n(x_2, 2); +x_27 = l___private_Init_Data_Array_QSort_1__partitionAux___main___at_Lean_Elab_Command_sortDeclLevelParams___spec__4(x_3, x_26, x_25, x_2, x_2); +lean_dec(x_26); +x_4 = x_27; +goto block_12; +} +} +else +{ +lean_object* x_28; lean_object* x_29; lean_object* x_30; uint8_t x_31; +lean_dec(x_19); +x_28 = lean_array_swap(x_17, x_2, x_3); +x_29 = lean_array_get(x_18, x_28, x_16); +x_30 = lean_array_get(x_18, x_28, x_3); +x_31 = l_Lean_Name_lt___main(x_29, x_30); +lean_dec(x_29); +if (x_31 == 0) +{ +lean_object* x_32; +lean_dec(x_16); +lean_inc_n(x_2, 2); +x_32 = l___private_Init_Data_Array_QSort_1__partitionAux___main___at_Lean_Elab_Command_sortDeclLevelParams___spec__4(x_3, x_30, x_28, x_2, x_2); +lean_dec(x_30); +x_4 = x_32; +goto block_12; +} +else +{ +lean_object* x_33; lean_object* x_34; lean_object* x_35; +lean_dec(x_30); +x_33 = lean_array_swap(x_28, x_16, x_3); +lean_dec(x_16); +x_34 = lean_array_get(x_18, x_33, x_3); +lean_inc_n(x_2, 2); +x_35 = l___private_Init_Data_Array_QSort_1__partitionAux___main___at_Lean_Elab_Command_sortDeclLevelParams___spec__4(x_3, x_34, x_33, x_2, x_2); +lean_dec(x_34); +x_4 = x_35; +goto block_12; +} +} +} +} +block_12: +{ +lean_object* x_5; lean_object* x_6; uint8_t x_7; +x_5 = lean_ctor_get(x_4, 0); +lean_inc(x_5); +x_6 = lean_ctor_get(x_4, 1); +lean_inc(x_6); +lean_dec(x_4); +x_7 = lean_nat_dec_le(x_3, x_5); +if (x_7 == 0) +{ +lean_object* x_8; lean_object* x_9; lean_object* x_10; +x_8 = l_Array_qsortAux___main___at_Lean_Elab_Command_sortDeclLevelParams___spec__3(x_6, x_2, x_5); +x_9 = lean_unsigned_to_nat(1u); +x_10 = lean_nat_add(x_5, x_9); +lean_dec(x_5); +x_1 = x_8; +x_2 = x_10; +goto _start; +} +else +{ +lean_dec(x_5); +lean_dec(x_2); +return x_6; +} +} +} +} +lean_object* l_Lean_Elab_Command_sortDeclLevelParams(lean_object* x_1, lean_object* x_2) { +_start: +{ +lean_object* x_3; lean_object* x_4; lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; +x_3 = lean_box(0); +lean_inc(x_1); +x_4 = l_List_foldl___main___at_Lean_Elab_Command_sortDeclLevelParams___spec__1(x_2, x_3, x_1); +x_5 = lean_unsigned_to_nat(0u); +x_6 = l_Array_filterAux___main___at_Lean_Elab_Command_sortDeclLevelParams___spec__2(x_1, x_2, x_5, x_5); +lean_dec(x_1); +x_7 = lean_array_get_size(x_6); +x_8 = lean_unsigned_to_nat(1u); +x_9 = lean_nat_sub(x_7, x_8); +lean_dec(x_7); +x_10 = l_Array_qsortAux___main___at_Lean_Elab_Command_sortDeclLevelParams___spec__3(x_6, x_5, x_9); +lean_dec(x_9); +x_11 = l_Array_toList___rarg(x_10); +lean_dec(x_10); +x_12 = l_List_append___rarg(x_4, x_11); +return x_12; +} +} +lean_object* l_List_foldl___main___at_Lean_Elab_Command_sortDeclLevelParams___spec__1___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +_start: +{ +lean_object* x_4; +x_4 = l_List_foldl___main___at_Lean_Elab_Command_sortDeclLevelParams___spec__1(x_1, x_2, x_3); +lean_dec(x_1); +return x_4; +} +} +lean_object* l_Array_filterAux___main___at_Lean_Elab_Command_sortDeclLevelParams___spec__2___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { +_start: +{ +lean_object* x_5; +x_5 = l_Array_filterAux___main___at_Lean_Elab_Command_sortDeclLevelParams___spec__2(x_1, x_2, x_3, x_4); +lean_dec(x_1); +return x_5; +} +} +lean_object* l___private_Init_Data_Array_QSort_1__partitionAux___main___at_Lean_Elab_Command_sortDeclLevelParams___spec__4___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) { +_start: +{ +lean_object* x_6; +x_6 = l___private_Init_Data_Array_QSort_1__partitionAux___main___at_Lean_Elab_Command_sortDeclLevelParams___spec__4(x_1, x_2, x_3, x_4, x_5); +lean_dec(x_2); +lean_dec(x_1); +return x_6; +} +} +lean_object* l_Array_qsortAux___main___at_Lean_Elab_Command_sortDeclLevelParams___spec__3___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +_start: +{ +lean_object* x_4; +x_4 = l_Array_qsortAux___main___at_Lean_Elab_Command_sortDeclLevelParams___spec__3(x_1, x_2, x_3); +lean_dec(x_3); +return x_4; +} +} +lean_object* l_Lean_Elab_Command_addDecl(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { +_start: +{ +lean_object* x_5; +lean_inc(x_3); +x_5 = l_Lean_Elab_Command_getEnv(x_3, x_4); +if (lean_obj_tag(x_5) == 0) +{ +lean_object* x_6; lean_object* x_7; lean_object* x_8; +x_6 = lean_ctor_get(x_5, 0); +lean_inc(x_6); +x_7 = lean_ctor_get(x_5, 1); +lean_inc(x_7); +lean_dec(x_5); +x_8 = lean_add_decl(x_6, x_2); +if (lean_obj_tag(x_8) == 0) +{ +lean_object* x_9; lean_object* x_10; +x_9 = lean_ctor_get(x_8, 0); +lean_inc(x_9); +lean_dec(x_8); +lean_inc(x_3); +x_10 = l_Lean_Elab_Command_getOptions(x_3, x_7); +if (lean_obj_tag(x_10) == 0) +{ +lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; +x_11 = lean_ctor_get(x_10, 0); +lean_inc(x_11); +x_12 = lean_ctor_get(x_10, 1); +lean_inc(x_12); +lean_dec(x_10); +x_13 = l_Lean_KernelException_toMessageData(x_9, x_11); +x_14 = l_Lean_Elab_throwError___at_Lean_Elab_Command_elabCommand___spec__1(x_1, x_13, x_3, x_12); +lean_dec(x_3); +return x_14; +} +else +{ +uint8_t x_15; +lean_dec(x_9); +lean_dec(x_3); +x_15 = !lean_is_exclusive(x_10); +if (x_15 == 0) +{ +return x_10; +} +else +{ +lean_object* x_16; lean_object* x_17; lean_object* x_18; +x_16 = lean_ctor_get(x_10, 0); +x_17 = lean_ctor_get(x_10, 1); +lean_inc(x_17); +lean_inc(x_16); +lean_dec(x_10); +x_18 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_18, 0, x_16); +lean_ctor_set(x_18, 1, x_17); +return x_18; +} +} +} +else +{ +lean_object* x_19; lean_object* x_20; +x_19 = lean_ctor_get(x_8, 0); +lean_inc(x_19); +lean_dec(x_8); +lean_inc(x_3); +x_20 = l___private_Init_Lean_Elab_Command_2__getState(x_3, x_7); +if (lean_obj_tag(x_20) == 0) +{ +lean_object* x_21; lean_object* x_22; uint8_t x_23; +x_21 = lean_ctor_get(x_20, 0); +lean_inc(x_21); +x_22 = lean_ctor_get(x_20, 1); +lean_inc(x_22); +lean_dec(x_20); +x_23 = !lean_is_exclusive(x_21); +if (x_23 == 0) +{ +lean_object* x_24; lean_object* x_25; +x_24 = lean_ctor_get(x_21, 0); +lean_dec(x_24); +lean_ctor_set(x_21, 0, x_19); +x_25 = l___private_Init_Lean_Elab_Command_3__setState(x_21, x_3, x_22); +if (lean_obj_tag(x_25) == 0) +{ +uint8_t x_26; +x_26 = !lean_is_exclusive(x_25); +if (x_26 == 0) +{ +lean_object* x_27; lean_object* x_28; +x_27 = lean_ctor_get(x_25, 0); +lean_dec(x_27); +x_28 = lean_box(0); +lean_ctor_set(x_25, 0, x_28); +return x_25; +} +else +{ +lean_object* x_29; lean_object* x_30; lean_object* x_31; +x_29 = lean_ctor_get(x_25, 1); +lean_inc(x_29); +lean_dec(x_25); +x_30 = lean_box(0); +x_31 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_31, 0, x_30); +lean_ctor_set(x_31, 1, x_29); +return x_31; +} +} +else +{ +uint8_t x_32; +x_32 = !lean_is_exclusive(x_25); +if (x_32 == 0) +{ +return x_25; +} +else +{ +lean_object* x_33; lean_object* x_34; lean_object* x_35; +x_33 = lean_ctor_get(x_25, 0); +x_34 = lean_ctor_get(x_25, 1); +lean_inc(x_34); +lean_inc(x_33); +lean_dec(x_25); +x_35 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_35, 0, x_33); +lean_ctor_set(x_35, 1, x_34); +return x_35; +} +} +} +else +{ +lean_object* x_36; lean_object* x_37; lean_object* x_38; lean_object* x_39; lean_object* x_40; +x_36 = lean_ctor_get(x_21, 1); +x_37 = lean_ctor_get(x_21, 2); +x_38 = lean_ctor_get(x_21, 3); +lean_inc(x_38); +lean_inc(x_37); +lean_inc(x_36); +lean_dec(x_21); +x_39 = lean_alloc_ctor(0, 4, 0); +lean_ctor_set(x_39, 0, x_19); +lean_ctor_set(x_39, 1, x_36); +lean_ctor_set(x_39, 2, x_37); +lean_ctor_set(x_39, 3, x_38); +x_40 = l___private_Init_Lean_Elab_Command_3__setState(x_39, x_3, x_22); +if (lean_obj_tag(x_40) == 0) +{ +lean_object* x_41; lean_object* x_42; lean_object* x_43; lean_object* x_44; +x_41 = lean_ctor_get(x_40, 1); +lean_inc(x_41); +if (lean_is_exclusive(x_40)) { + lean_ctor_release(x_40, 0); + lean_ctor_release(x_40, 1); + x_42 = x_40; +} else { + lean_dec_ref(x_40); + x_42 = lean_box(0); +} +x_43 = lean_box(0); +if (lean_is_scalar(x_42)) { + x_44 = lean_alloc_ctor(0, 2, 0); +} else { + x_44 = x_42; +} +lean_ctor_set(x_44, 0, x_43); +lean_ctor_set(x_44, 1, x_41); +return x_44; +} +else +{ +lean_object* x_45; lean_object* x_46; lean_object* x_47; lean_object* x_48; +x_45 = lean_ctor_get(x_40, 0); +lean_inc(x_45); +x_46 = lean_ctor_get(x_40, 1); +lean_inc(x_46); +if (lean_is_exclusive(x_40)) { + lean_ctor_release(x_40, 0); + lean_ctor_release(x_40, 1); + x_47 = x_40; +} else { + lean_dec_ref(x_40); + x_47 = lean_box(0); +} +if (lean_is_scalar(x_47)) { + x_48 = lean_alloc_ctor(1, 2, 0); +} else { + x_48 = x_47; +} +lean_ctor_set(x_48, 0, x_45); +lean_ctor_set(x_48, 1, x_46); +return x_48; +} +} +} +else +{ +uint8_t x_49; +lean_dec(x_19); +lean_dec(x_3); +x_49 = !lean_is_exclusive(x_20); +if (x_49 == 0) +{ +return x_20; +} +else +{ +lean_object* x_50; lean_object* x_51; lean_object* x_52; +x_50 = lean_ctor_get(x_20, 0); +x_51 = lean_ctor_get(x_20, 1); +lean_inc(x_51); +lean_inc(x_50); +lean_dec(x_20); +x_52 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_52, 0, x_50); +lean_ctor_set(x_52, 1, x_51); +return x_52; +} +} +} +} +else +{ +uint8_t x_53; +lean_dec(x_3); +x_53 = !lean_is_exclusive(x_5); +if (x_53 == 0) +{ +return x_5; +} +else +{ +lean_object* x_54; lean_object* x_55; lean_object* x_56; +x_54 = lean_ctor_get(x_5, 0); +x_55 = lean_ctor_get(x_5, 1); +lean_inc(x_55); +lean_inc(x_54); +lean_dec(x_5); +x_56 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_56, 0, x_54); +lean_ctor_set(x_56, 1, x_55); +return x_56; +} +} +} +} +lean_object* l_Lean_Elab_Command_addDecl___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { +_start: +{ +lean_object* x_5; +x_5 = l_Lean_Elab_Command_addDecl(x_1, x_2, x_3, x_4); +lean_dec(x_2); +lean_dec(x_1); +return x_5; +} +} lean_object* initialize_Init_Lean_Elab_Alias(lean_object*); lean_object* initialize_Init_Lean_Elab_Log(lean_object*); lean_object* initialize_Init_Lean_Elab_ResolveName(lean_object*); @@ -14394,12 +18637,6 @@ l_Lean_Elab_Command_State_inhabited___closed__4 = _init_l_Lean_Elab_Command_Stat lean_mark_persistent(l_Lean_Elab_Command_State_inhabited___closed__4); l_Lean_Elab_Command_State_inhabited = _init_l_Lean_Elab_Command_State_inhabited(); lean_mark_persistent(l_Lean_Elab_Command_State_inhabited); -l___private_Init_Lean_Elab_Command_1__ioErrorToMessage___closed__1 = _init_l___private_Init_Lean_Elab_Command_1__ioErrorToMessage___closed__1(); -lean_mark_persistent(l___private_Init_Lean_Elab_Command_1__ioErrorToMessage___closed__1); -l___private_Init_Lean_Elab_Command_1__ioErrorToMessage___closed__2 = _init_l___private_Init_Lean_Elab_Command_1__ioErrorToMessage___closed__2(); -lean_mark_persistent(l___private_Init_Lean_Elab_Command_1__ioErrorToMessage___closed__2); -l___private_Init_Lean_Elab_Command_1__ioErrorToMessage___closed__3 = _init_l___private_Init_Lean_Elab_Command_1__ioErrorToMessage___closed__3(); -lean_mark_persistent(l___private_Init_Lean_Elab_Command_1__ioErrorToMessage___closed__3); l_Lean_Elab_Command_CommandElabCoreM_monadState___closed__1 = _init_l_Lean_Elab_Command_CommandElabCoreM_monadState___closed__1(); lean_mark_persistent(l_Lean_Elab_Command_CommandElabCoreM_monadState___closed__1); l_Lean_Elab_Command_CommandElabCoreM_monadState___closed__2 = _init_l_Lean_Elab_Command_CommandElabCoreM_monadState___closed__2(); @@ -14432,6 +18669,14 @@ l_Lean_Elab_Command_CommandElabM_monadLog___closed__10 = _init_l_Lean_Elab_Comma lean_mark_persistent(l_Lean_Elab_Command_CommandElabM_monadLog___closed__10); l_Lean_Elab_Command_CommandElabM_monadLog = _init_l_Lean_Elab_Command_CommandElabM_monadLog(); lean_mark_persistent(l_Lean_Elab_Command_CommandElabM_monadLog); +l_Lean_Elab_Command_CommandElabM_MonadQuotation___closed__1 = _init_l_Lean_Elab_Command_CommandElabM_MonadQuotation___closed__1(); +lean_mark_persistent(l_Lean_Elab_Command_CommandElabM_MonadQuotation___closed__1); +l_Lean_Elab_Command_CommandElabM_MonadQuotation___closed__2 = _init_l_Lean_Elab_Command_CommandElabM_MonadQuotation___closed__2(); +lean_mark_persistent(l_Lean_Elab_Command_CommandElabM_MonadQuotation___closed__2); +l_Lean_Elab_Command_CommandElabM_MonadQuotation___closed__3 = _init_l_Lean_Elab_Command_CommandElabM_MonadQuotation___closed__3(); +lean_mark_persistent(l_Lean_Elab_Command_CommandElabM_MonadQuotation___closed__3); +l_Lean_Elab_Command_CommandElabM_MonadQuotation = _init_l_Lean_Elab_Command_CommandElabM_MonadQuotation(); +lean_mark_persistent(l_Lean_Elab_Command_CommandElabM_MonadQuotation); l_PersistentHashMap_empty___at_Lean_Elab_Command_mkBuiltinCommandElabTable___spec__3 = _init_l_PersistentHashMap_empty___at_Lean_Elab_Command_mkBuiltinCommandElabTable___spec__3(); lean_mark_persistent(l_PersistentHashMap_empty___at_Lean_Elab_Command_mkBuiltinCommandElabTable___spec__3); l_Lean_SMap_empty___at_Lean_Elab_Command_mkBuiltinCommandElabTable___spec__1___closed__1 = _init_l_Lean_SMap_empty___at_Lean_Elab_Command_mkBuiltinCommandElabTable___spec__1___closed__1(); @@ -14525,6 +18770,12 @@ l_Lean_Elab_Command_CommandElabM_inhabited___closed__1 = _init_l_Lean_Elab_Comma lean_mark_persistent(l_Lean_Elab_Command_CommandElabM_inhabited___closed__1); l_Lean_Elab_Command_runTermElabM___rarg___closed__1 = _init_l_Lean_Elab_Command_runTermElabM___rarg___closed__1(); lean_mark_persistent(l_Lean_Elab_Command_runTermElabM___rarg___closed__1); +l___private_Init_Lean_Elab_Command_10__addScopes___main___closed__1 = _init_l___private_Init_Lean_Elab_Command_10__addScopes___main___closed__1(); +lean_mark_persistent(l___private_Init_Lean_Elab_Command_10__addScopes___main___closed__1); +l___private_Init_Lean_Elab_Command_10__addScopes___main___closed__2 = _init_l___private_Init_Lean_Elab_Command_10__addScopes___main___closed__2(); +lean_mark_persistent(l___private_Init_Lean_Elab_Command_10__addScopes___main___closed__2); +l___private_Init_Lean_Elab_Command_10__addScopes___main___closed__3 = _init_l___private_Init_Lean_Elab_Command_10__addScopes___main___closed__3(); +lean_mark_persistent(l___private_Init_Lean_Elab_Command_10__addScopes___main___closed__3); l___regBuiltinCommandElab_Lean_Elab_Command_elabNamespace___closed__1 = _init_l___regBuiltinCommandElab_Lean_Elab_Command_elabNamespace___closed__1(); lean_mark_persistent(l___regBuiltinCommandElab_Lean_Elab_Command_elabNamespace___closed__1); l___regBuiltinCommandElab_Lean_Elab_Command_elabNamespace___closed__2 = _init_l___regBuiltinCommandElab_Lean_Elab_Command_elabNamespace___closed__2(); @@ -14572,18 +18823,18 @@ if (lean_io_result_is_error(res)) return res; lean_dec_ref(res); l_Lean_Elab_Command_modifyScope___closed__1 = _init_l_Lean_Elab_Command_modifyScope___closed__1(); lean_mark_persistent(l_Lean_Elab_Command_modifyScope___closed__1); -l_Lean_Elab_Command_addUniverse___closed__1 = _init_l_Lean_Elab_Command_addUniverse___closed__1(); -lean_mark_persistent(l_Lean_Elab_Command_addUniverse___closed__1); -l_Lean_Elab_Command_addUniverse___closed__2 = _init_l_Lean_Elab_Command_addUniverse___closed__2(); -lean_mark_persistent(l_Lean_Elab_Command_addUniverse___closed__2); -l_Lean_Elab_Command_addUniverse___closed__3 = _init_l_Lean_Elab_Command_addUniverse___closed__3(); -lean_mark_persistent(l_Lean_Elab_Command_addUniverse___closed__3); -l_Lean_Elab_Command_addUniverse___closed__4 = _init_l_Lean_Elab_Command_addUniverse___closed__4(); -lean_mark_persistent(l_Lean_Elab_Command_addUniverse___closed__4); -l_Lean_Elab_Command_addUniverse___closed__5 = _init_l_Lean_Elab_Command_addUniverse___closed__5(); -lean_mark_persistent(l_Lean_Elab_Command_addUniverse___closed__5); -l_Lean_Elab_Command_addUniverse___closed__6 = _init_l_Lean_Elab_Command_addUniverse___closed__6(); -lean_mark_persistent(l_Lean_Elab_Command_addUniverse___closed__6); +l_Lean_Elab_Command_throwAlreadyDeclaredUniverseLevel___rarg___closed__1 = _init_l_Lean_Elab_Command_throwAlreadyDeclaredUniverseLevel___rarg___closed__1(); +lean_mark_persistent(l_Lean_Elab_Command_throwAlreadyDeclaredUniverseLevel___rarg___closed__1); +l_Lean_Elab_Command_throwAlreadyDeclaredUniverseLevel___rarg___closed__2 = _init_l_Lean_Elab_Command_throwAlreadyDeclaredUniverseLevel___rarg___closed__2(); +lean_mark_persistent(l_Lean_Elab_Command_throwAlreadyDeclaredUniverseLevel___rarg___closed__2); +l_Lean_Elab_Command_throwAlreadyDeclaredUniverseLevel___rarg___closed__3 = _init_l_Lean_Elab_Command_throwAlreadyDeclaredUniverseLevel___rarg___closed__3(); +lean_mark_persistent(l_Lean_Elab_Command_throwAlreadyDeclaredUniverseLevel___rarg___closed__3); +l_Lean_Elab_Command_throwAlreadyDeclaredUniverseLevel___rarg___closed__4 = _init_l_Lean_Elab_Command_throwAlreadyDeclaredUniverseLevel___rarg___closed__4(); +lean_mark_persistent(l_Lean_Elab_Command_throwAlreadyDeclaredUniverseLevel___rarg___closed__4); +l_Lean_Elab_Command_throwAlreadyDeclaredUniverseLevel___rarg___closed__5 = _init_l_Lean_Elab_Command_throwAlreadyDeclaredUniverseLevel___rarg___closed__5(); +lean_mark_persistent(l_Lean_Elab_Command_throwAlreadyDeclaredUniverseLevel___rarg___closed__5); +l_Lean_Elab_Command_throwAlreadyDeclaredUniverseLevel___rarg___closed__6 = _init_l_Lean_Elab_Command_throwAlreadyDeclaredUniverseLevel___rarg___closed__6(); +lean_mark_persistent(l_Lean_Elab_Command_throwAlreadyDeclaredUniverseLevel___rarg___closed__6); l___regBuiltinCommandElab_Lean_Elab_Command_elabUniverse___closed__1 = _init_l___regBuiltinCommandElab_Lean_Elab_Command_elabUniverse___closed__1(); lean_mark_persistent(l___regBuiltinCommandElab_Lean_Elab_Command_elabUniverse___closed__1); l___regBuiltinCommandElab_Lean_Elab_Command_elabUniverse___closed__2 = _init_l___regBuiltinCommandElab_Lean_Elab_Command_elabUniverse___closed__2(); @@ -14701,6 +18952,12 @@ lean_mark_persistent(l___regBuiltinCommandElab_Lean_Elab_Command_elabCheck___clo res = l___regBuiltinCommandElab_Lean_Elab_Command_elabCheck(lean_io_mk_world()); if (lean_io_result_is_error(res)) return res; lean_dec_ref(res); +l_Lean_Elab_Command_withDeclId___closed__1 = _init_l_Lean_Elab_Command_withDeclId___closed__1(); +lean_mark_persistent(l_Lean_Elab_Command_withDeclId___closed__1); +l_Lean_Elab_Command_withDeclId___closed__2 = _init_l_Lean_Elab_Command_withDeclId___closed__2(); +lean_mark_persistent(l_Lean_Elab_Command_withDeclId___closed__2); +l_Lean_Elab_Command_withDeclId___closed__3 = _init_l_Lean_Elab_Command_withDeclId___closed__3(); +lean_mark_persistent(l_Lean_Elab_Command_withDeclId___closed__3); return lean_mk_io_result(lean_box(0)); } #ifdef __cplusplus diff --git a/stage0/stdlib/Init/Lean/Elab/DeclModifiers.c b/stage0/stdlib/Init/Lean/Elab/DeclModifiers.c new file mode 100644 index 0000000000..f249e0f6b6 --- /dev/null +++ b/stage0/stdlib/Init/Lean/Elab/DeclModifiers.c @@ -0,0 +1,2689 @@ +// Lean compiler output +// Module: Init.Lean.Elab.DeclModifiers +// Imports: Init.Lean.Elab.Command +#include "runtime/lean.h" +#if defined(__clang__) +#pragma clang diagnostic ignored "-Wunused-parameter" +#pragma clang diagnostic ignored "-Wunused-label" +#elif defined(__GNUC__) && !defined(__CLANG__) +#pragma GCC diagnostic ignored "-Wunused-parameter" +#pragma GCC diagnostic ignored "-Wunused-label" +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#endif +#ifdef __cplusplus +extern "C" { +#endif +lean_object* l_Lean_Syntax_foldArgsAuxM___main___at_Lean_Elab_Command_elabAttrs___spec__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +extern lean_object* l_Lean_Name_toString___closed__1; +extern lean_object* l_Lean_List_format___rarg___closed__4; +lean_object* l_Lean_Syntax_foldArgsAuxM___main___at_Lean_Elab_Command_elabAttrs___spec__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Elab_Command_Modifiers_hasFormat___closed__6; +lean_object* l_Lean_Syntax_getOptional_x3f(lean_object*); +lean_object* l_Lean_Elab_throwError___at_Lean_Elab_Command_elabCommand___spec__1(lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Format_pretty(lean_object*, lean_object*); +lean_object* l_List_map___main___at_Lean_Elab_Command_Modifiers_hasFormat___spec__2(lean_object*); +lean_object* l_Lean_fmt___at_Lean_Elab_Command_Modifiers_hasFormat___spec__1(lean_object*); +lean_object* l_Lean_Elab_Command_Modifiers_hasFormat___closed__8; +lean_object* l_Lean_Elab_Command_applyAttributes___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +extern lean_object* l_Array_empty___closed__1; +lean_object* l_Lean_Elab_Command_Modifiers_hasFormat___boxed(lean_object*); +lean_object* l_Lean_Elab_Command_elabModifiers___closed__6; +lean_object* l_Lean_Elab_Command_Modifiers_hasFormat___closed__2; +lean_object* l_List_append___rarg(lean_object*, lean_object*); +uint8_t lean_name_eq(lean_object*, lean_object*); +extern lean_object* l_Lean_MessageData_arrayExpr_toMessageData___main___closed__1; +lean_object* l_Lean_Elab_Command_Modifiers_hasFormat___closed__1; +lean_object* l_Lean_Format_joinSep___main___at___private_Init_Lean_Data_Trie_6__toStringAux___main___spec__1(lean_object*, lean_object*); +lean_object* l_Lean_Elab_Command_Modifiers_hasFormat___closed__3; +lean_object* lean_array_push(lean_object*, lean_object*); +lean_object* lean_array_get_size(lean_object*); +lean_object* l_Lean_Elab_Command_Modifiers_hasFormat___closed__15; +lean_object* lean_string_utf8_extract(lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Elab_Command_applyAttributes(lean_object*, lean_object*, lean_object*, uint8_t, lean_object*, lean_object*); +lean_object* lean_string_utf8_byte_size(lean_object*); +lean_object* l_Lean_Elab_Command_Modifiers_hasFormat(lean_object*); +lean_object* l_Lean_Elab_throwError___at_Lean_Elab_Command_elabAttr___spec__1(lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* lean_nat_add(lean_object*, lean_object*); +lean_object* l_Lean_Elab_Command_Modifiers_hasFormat___closed__11; +lean_object* l_Lean_Elab_Command_mkDeclName(lean_object*, lean_object*, lean_object*, lean_object*); +uint8_t l_Lean_AttributeApplicationTime_beq(uint8_t, uint8_t); +lean_object* l_Lean_Elab_Command_Modifiers_hasFormat___closed__4; +lean_object* l_Lean_Elab_mkMessage___at_Lean_Elab_Command_elabCommand___spec__2(lean_object*, uint8_t, lean_object*, lean_object*, lean_object*); +lean_object* lean_array_fget(lean_object*, lean_object*); +lean_object* l_Lean_Elab_Command_Visibility_hasToString(uint8_t); +lean_object* l_Lean_Elab_Command_getCurrNamespace(lean_object*, lean_object*); +lean_object* l_Lean_Elab_Command_Modifiers_hasToString; +lean_object* lean_nat_sub(lean_object*, lean_object*); +lean_object* l_Lean_Elab_Command_Modifiers_hasToString___lambda__1___boxed(lean_object*); +lean_object* l_Lean_Elab_throwError___at_Lean_Elab_Command_elabModifiers___spec__2(lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Name_append___main(lean_object*, lean_object*); +lean_object* l_Lean_Elab_Command_elabModifiers___closed__4; +lean_object* l_Lean_Elab_Command_Modifiers_hasFormat___closed__9; +extern lean_object* l_Lean_Format_join___closed__1; +lean_object* l_Lean_Elab_throwError___at_Lean_Elab_Command_elabModifiers___spec__1(lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Elab_Command_Modifiers_hasFormat___closed__13; +lean_object* l___private_Init_Lean_Elab_Command_1__ioErrorToMessage(lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Elab_Command_Visibility_hasToString___boxed(lean_object*); +lean_object* lean_name_mk_string(lean_object*, lean_object*); +lean_object* l_Lean_Elab_Command_Modifiers_hasToString___lambda__1(lean_object*); +lean_object* l_Lean_Elab_throwError___at_Lean_Elab_Command_elabModifiers___spec__2___boxed(lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Function_comp___rarg(lean_object*, lean_object*, lean_object*); +extern lean_object* l_Lean_Parser_Command_docComment___elambda__1___closed__2; +extern lean_object* l_Lean_Options_empty; +extern lean_object* l_Lean_Parser_Command_attributes___elambda__1___closed__5; +lean_object* l_Lean_Elab_Command_elabModifiers___closed__1; +lean_object* l_Lean_Elab_Command_elabAttr___closed__4; +lean_object* l_Lean_Elab_Command_elabModifiers___closed__2; +lean_object* l_Lean_Elab_Command_elabAttr___closed__6; +lean_object* l_Lean_Elab_Command_elabAttrs(lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Elab_Command_elabAttr___closed__1; +lean_object* l_Lean_Elab_Command_elabAttr___boxed(lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Elab_Command_Modifiers_hasToString___closed__2; +lean_object* l_Lean_Elab_Command_Modifiers_hasFormat___closed__12; +lean_object* l_Lean_Elab_Command_Attribute_hasFormat___closed__1; +extern lean_object* l_Lean_Format_sbracket___closed__3; +lean_object* l_Lean_Elab_Command_Modifiers_hasFormat___closed__10; +uint8_t l_Lean_Syntax_isMissing(lean_object*); +lean_object* l_Lean_Syntax_isIdOrAtom_x3f(lean_object*); +lean_object* l_Lean_Elab_Command_elabModifiers___boxed(lean_object*, lean_object*, lean_object*); +extern lean_object* l_Lean_HasRepr___closed__1; +lean_object* l_Lean_Elab_Command_Visibility_hasToString___closed__1; +extern lean_object* l_Lean_Parser_Command_noncomputable___elambda__1___closed__1; +lean_object* lean_is_attribute(lean_object*, lean_object*); +extern lean_object* l_PersistentArray_Stats_toString___closed__4; +lean_object* l_Lean_Elab_Command_elabAttr___closed__3; +lean_object* l_Lean_Elab_Command_elabAttr___closed__2; +lean_object* l_Lean_Elab_Command_Modifiers_hasToString___closed__1; +extern lean_object* l_Lean_Parser_Command_private___elambda__1___closed__1; +lean_object* lean_mk_private_name(lean_object*, lean_object*); +lean_object* l_Lean_Syntax_getArgs(lean_object*); +lean_object* l_Lean_Syntax_getKind(lean_object*); +lean_object* l_Lean_Elab_Command_Modifiers_addAttribute(lean_object*, lean_object*); +lean_object* lean_format_group(lean_object*); +lean_object* l_Lean_Elab_Command_Attribute_hasFormat___closed__2; +lean_object* l_Lean_Elab_Command_elabAttr___closed__5; +lean_object* l_Array_forMAux___main___at_Lean_Elab_Command_applyAttributes___spec__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +uint8_t l_Lean_Syntax_isNone(lean_object*); +lean_object* l_Lean_Elab_Command_getEnv(lean_object*, lean_object*); +lean_object* l_Lean_Elab_Command_Modifiers_hasFormat___closed__7; +lean_object* l_Array_forMAux___main___at_Lean_Elab_Command_applyAttributes___spec__1(lean_object*, lean_object*, uint8_t, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Elab_Command_elabAttrs___boxed(lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Elab_Command_Modifiers_hasFormat___closed__16; +lean_object* l_Lean_Elab_Command_elabModifiers(lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Elab_Command_Modifiers_hasFormat___closed__14; +lean_object* l_Lean_Elab_Command_Modifiers_hasFormat___closed__5; +lean_object* l_Array_toList___rarg(lean_object*); +extern lean_object* l_Lean_Parser_Command_unsafe___elambda__1___closed__1; +lean_object* l_Lean_Elab_Command_setEnv(lean_object*, lean_object*, lean_object*); +lean_object* lean_string_length(lean_object*); +lean_object* l_Lean_Elab_Command_Attribute_hasFormat(lean_object*); +extern lean_object* l_Lean_Parser_Command_private___elambda__1___closed__2; +lean_object* l_Lean_Syntax_getArg(lean_object*, lean_object*); +extern lean_object* l_Lean_Parser_Command_partial___elambda__1___closed__1; +lean_object* l_Lean_Elab_throwError___at_Lean_Elab_Command_elabAttr___spec__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Syntax_formatStxAux___main(lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Elab_Command_elabModifiers___closed__7; +lean_object* l_Lean_Name_toStringWithSep___main(lean_object*, lean_object*); +lean_object* l_Lean_Elab_Command_elabAttr(lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Elab_throwError___at_Lean_Elab_Command_elabModifiers___spec__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_getAttributeImpl(lean_object*, lean_object*); +lean_object* l_Lean_Elab_Command_elabModifiers___closed__5; +extern lean_object* l_addParenHeuristic___closed__1; +extern lean_object* l_Lean_Parser_Command_docComment___elambda__1___closed__7; +lean_object* l_Lean_Elab_Command_mkDeclName___boxed(lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Elab_Command_elabModifiers___closed__3; +uint8_t lean_nat_dec_lt(lean_object*, lean_object*); +extern lean_object* l_Lean_mkProtectedExtension___closed__1; +lean_object* _init_l_Lean_Elab_Command_Attribute_hasFormat___closed__1() { +_start: +{ +lean_object* x_1; lean_object* x_2; +x_1 = l_Lean_Parser_Command_attributes___elambda__1___closed__5; +x_2 = lean_string_length(x_1); +return x_2; +} +} +lean_object* _init_l_Lean_Elab_Command_Attribute_hasFormat___closed__2() { +_start: +{ +lean_object* x_1; lean_object* x_2; +x_1 = l_Lean_Parser_Command_attributes___elambda__1___closed__5; +x_2 = lean_alloc_ctor(2, 1, 0); +lean_ctor_set(x_2, 0, x_1); +return x_2; +} +} +lean_object* l_Lean_Elab_Command_Attribute_hasFormat(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; uint8_t x_7; +x_2 = lean_ctor_get(x_1, 0); +lean_inc(x_2); +x_3 = l_Lean_Name_toString___closed__1; +x_4 = l_Lean_Name_toStringWithSep___main(x_3, x_2); +x_5 = lean_alloc_ctor(2, 1, 0); +lean_ctor_set(x_5, 0, x_4); +x_6 = lean_ctor_get(x_1, 1); +lean_inc(x_6); +lean_dec(x_1); +x_7 = l_Lean_Syntax_isMissing(x_6); +if (x_7 == 0) +{ +lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; uint8_t x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; lean_object* x_20; lean_object* x_21; lean_object* x_22; +x_8 = lean_box(0); +x_9 = lean_unsigned_to_nat(0u); +x_10 = l_Lean_Syntax_formatStxAux___main(x_8, x_9, x_6); +x_11 = l_Lean_Options_empty; +x_12 = l_Lean_Format_pretty(x_10, x_11); +x_13 = lean_alloc_ctor(2, 1, 0); +lean_ctor_set(x_13, 0, x_12); +x_14 = 0; +x_15 = lean_alloc_ctor(4, 2, 1); +lean_ctor_set(x_15, 0, x_5); +lean_ctor_set(x_15, 1, x_13); +lean_ctor_set_uint8(x_15, sizeof(void*)*2, x_14); +x_16 = l_Lean_Elab_Command_Attribute_hasFormat___closed__2; +x_17 = lean_alloc_ctor(4, 2, 1); +lean_ctor_set(x_17, 0, x_16); +lean_ctor_set(x_17, 1, x_15); +lean_ctor_set_uint8(x_17, sizeof(void*)*2, x_14); +x_18 = l_Lean_Format_sbracket___closed__3; +x_19 = lean_alloc_ctor(4, 2, 1); +lean_ctor_set(x_19, 0, x_17); +lean_ctor_set(x_19, 1, x_18); +lean_ctor_set_uint8(x_19, sizeof(void*)*2, x_14); +x_20 = l_Lean_Elab_Command_Attribute_hasFormat___closed__1; +x_21 = lean_alloc_ctor(3, 2, 0); +lean_ctor_set(x_21, 0, x_20); +lean_ctor_set(x_21, 1, x_19); +x_22 = lean_format_group(x_21); +return x_22; +} +else +{ +uint8_t x_23; lean_object* x_24; lean_object* x_25; lean_object* x_26; lean_object* x_27; lean_object* x_28; lean_object* x_29; lean_object* x_30; lean_object* x_31; lean_object* x_32; +lean_dec(x_6); +x_23 = 0; +x_24 = l_Lean_Format_join___closed__1; +x_25 = lean_alloc_ctor(4, 2, 1); +lean_ctor_set(x_25, 0, x_5); +lean_ctor_set(x_25, 1, x_24); +lean_ctor_set_uint8(x_25, sizeof(void*)*2, x_23); +x_26 = l_Lean_Elab_Command_Attribute_hasFormat___closed__2; +x_27 = lean_alloc_ctor(4, 2, 1); +lean_ctor_set(x_27, 0, x_26); +lean_ctor_set(x_27, 1, x_25); +lean_ctor_set_uint8(x_27, sizeof(void*)*2, x_23); +x_28 = l_Lean_Format_sbracket___closed__3; +x_29 = lean_alloc_ctor(4, 2, 1); +lean_ctor_set(x_29, 0, x_27); +lean_ctor_set(x_29, 1, x_28); +lean_ctor_set_uint8(x_29, sizeof(void*)*2, x_23); +x_30 = l_Lean_Elab_Command_Attribute_hasFormat___closed__1; +x_31 = lean_alloc_ctor(3, 2, 0); +lean_ctor_set(x_31, 0, x_30); +lean_ctor_set(x_31, 1, x_29); +x_32 = lean_format_group(x_31); +return x_32; +} +} +} +lean_object* _init_l_Lean_Elab_Command_Visibility_hasToString___closed__1() { +_start: +{ +lean_object* x_1; +x_1 = lean_mk_string("regular"); +return x_1; +} +} +lean_object* l_Lean_Elab_Command_Visibility_hasToString(uint8_t x_1) { +_start: +{ +switch (x_1) { +case 0: +{ +lean_object* x_2; +x_2 = l_Lean_Elab_Command_Visibility_hasToString___closed__1; +return x_2; +} +case 1: +{ +lean_object* x_3; +x_3 = l_Lean_mkProtectedExtension___closed__1; +return x_3; +} +default: +{ +lean_object* x_4; +x_4 = l_Lean_Parser_Command_private___elambda__1___closed__1; +return x_4; +} +} +} +} +lean_object* l_Lean_Elab_Command_Visibility_hasToString___boxed(lean_object* x_1) { +_start: +{ +uint8_t x_2; lean_object* x_3; +x_2 = lean_unbox(x_1); +lean_dec(x_1); +x_3 = l_Lean_Elab_Command_Visibility_hasToString(x_2); +return x_3; +} +} +lean_object* l_Lean_Elab_Command_Modifiers_addAttribute(lean_object* x_1, lean_object* x_2) { +_start: +{ +uint8_t x_3; +x_3 = !lean_is_exclusive(x_1); +if (x_3 == 0) +{ +lean_object* x_4; lean_object* x_5; +x_4 = lean_ctor_get(x_1, 1); +x_5 = lean_array_push(x_4, x_2); +lean_ctor_set(x_1, 1, x_5); +return x_1; +} +else +{ +lean_object* x_6; uint8_t x_7; uint8_t x_8; uint8_t x_9; uint8_t x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; +x_6 = lean_ctor_get(x_1, 0); +x_7 = lean_ctor_get_uint8(x_1, sizeof(void*)*2); +x_8 = lean_ctor_get_uint8(x_1, sizeof(void*)*2 + 1); +x_9 = lean_ctor_get_uint8(x_1, sizeof(void*)*2 + 2); +x_10 = lean_ctor_get_uint8(x_1, sizeof(void*)*2 + 3); +x_11 = lean_ctor_get(x_1, 1); +lean_inc(x_11); +lean_inc(x_6); +lean_dec(x_1); +x_12 = lean_array_push(x_11, x_2); +x_13 = lean_alloc_ctor(0, 2, 4); +lean_ctor_set(x_13, 0, x_6); +lean_ctor_set(x_13, 1, x_12); +lean_ctor_set_uint8(x_13, sizeof(void*)*2, x_7); +lean_ctor_set_uint8(x_13, sizeof(void*)*2 + 1, x_8); +lean_ctor_set_uint8(x_13, sizeof(void*)*2 + 2, x_9); +lean_ctor_set_uint8(x_13, sizeof(void*)*2 + 3, x_10); +return x_13; +} +} +} +lean_object* l_Lean_fmt___at_Lean_Elab_Command_Modifiers_hasFormat___spec__1(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; uint8_t x_7; +x_2 = lean_ctor_get(x_1, 0); +lean_inc(x_2); +x_3 = l_Lean_Name_toString___closed__1; +x_4 = l_Lean_Name_toStringWithSep___main(x_3, x_2); +x_5 = lean_alloc_ctor(2, 1, 0); +lean_ctor_set(x_5, 0, x_4); +x_6 = lean_ctor_get(x_1, 1); +lean_inc(x_6); +lean_dec(x_1); +x_7 = l_Lean_Syntax_isMissing(x_6); +if (x_7 == 0) +{ +lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; uint8_t x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; lean_object* x_20; lean_object* x_21; lean_object* x_22; +x_8 = lean_box(0); +x_9 = lean_unsigned_to_nat(0u); +x_10 = l_Lean_Syntax_formatStxAux___main(x_8, x_9, x_6); +x_11 = l_Lean_Options_empty; +x_12 = l_Lean_Format_pretty(x_10, x_11); +x_13 = lean_alloc_ctor(2, 1, 0); +lean_ctor_set(x_13, 0, x_12); +x_14 = 0; +x_15 = lean_alloc_ctor(4, 2, 1); +lean_ctor_set(x_15, 0, x_5); +lean_ctor_set(x_15, 1, x_13); +lean_ctor_set_uint8(x_15, sizeof(void*)*2, x_14); +x_16 = l_Lean_Elab_Command_Attribute_hasFormat___closed__2; +x_17 = lean_alloc_ctor(4, 2, 1); +lean_ctor_set(x_17, 0, x_16); +lean_ctor_set(x_17, 1, x_15); +lean_ctor_set_uint8(x_17, sizeof(void*)*2, x_14); +x_18 = l_Lean_Format_sbracket___closed__3; +x_19 = lean_alloc_ctor(4, 2, 1); +lean_ctor_set(x_19, 0, x_17); +lean_ctor_set(x_19, 1, x_18); +lean_ctor_set_uint8(x_19, sizeof(void*)*2, x_14); +x_20 = l_Lean_Elab_Command_Attribute_hasFormat___closed__1; +x_21 = lean_alloc_ctor(3, 2, 0); +lean_ctor_set(x_21, 0, x_20); +lean_ctor_set(x_21, 1, x_19); +x_22 = lean_format_group(x_21); +return x_22; +} +else +{ +uint8_t x_23; lean_object* x_24; lean_object* x_25; lean_object* x_26; lean_object* x_27; lean_object* x_28; lean_object* x_29; lean_object* x_30; lean_object* x_31; lean_object* x_32; +lean_dec(x_6); +x_23 = 0; +x_24 = l_Lean_Format_join___closed__1; +x_25 = lean_alloc_ctor(4, 2, 1); +lean_ctor_set(x_25, 0, x_5); +lean_ctor_set(x_25, 1, x_24); +lean_ctor_set_uint8(x_25, sizeof(void*)*2, x_23); +x_26 = l_Lean_Elab_Command_Attribute_hasFormat___closed__2; +x_27 = lean_alloc_ctor(4, 2, 1); +lean_ctor_set(x_27, 0, x_26); +lean_ctor_set(x_27, 1, x_25); +lean_ctor_set_uint8(x_27, sizeof(void*)*2, x_23); +x_28 = l_Lean_Format_sbracket___closed__3; +x_29 = lean_alloc_ctor(4, 2, 1); +lean_ctor_set(x_29, 0, x_27); +lean_ctor_set(x_29, 1, x_28); +lean_ctor_set_uint8(x_29, sizeof(void*)*2, x_23); +x_30 = l_Lean_Elab_Command_Attribute_hasFormat___closed__1; +x_31 = lean_alloc_ctor(3, 2, 0); +lean_ctor_set(x_31, 0, x_30); +lean_ctor_set(x_31, 1, x_29); +x_32 = lean_format_group(x_31); +return x_32; +} +} +} +lean_object* l_List_map___main___at_Lean_Elab_Command_Modifiers_hasFormat___spec__2(lean_object* x_1) { +_start: +{ +if (lean_obj_tag(x_1) == 0) +{ +lean_object* x_2; +x_2 = lean_box(0); +return x_2; +} +else +{ +uint8_t x_3; +x_3 = !lean_is_exclusive(x_1); +if (x_3 == 0) +{ +lean_object* x_4; lean_object* x_5; lean_object* x_6; lean_object* x_7; +x_4 = lean_ctor_get(x_1, 0); +x_5 = lean_ctor_get(x_1, 1); +x_6 = l_Lean_fmt___at_Lean_Elab_Command_Modifiers_hasFormat___spec__1(x_4); +x_7 = l_List_map___main___at_Lean_Elab_Command_Modifiers_hasFormat___spec__2(x_5); +lean_ctor_set(x_1, 1, x_7); +lean_ctor_set(x_1, 0, x_6); +return x_1; +} +else +{ +lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; +x_8 = lean_ctor_get(x_1, 0); +x_9 = lean_ctor_get(x_1, 1); +lean_inc(x_9); +lean_inc(x_8); +lean_dec(x_1); +x_10 = l_Lean_fmt___at_Lean_Elab_Command_Modifiers_hasFormat___spec__1(x_8); +x_11 = l_List_map___main___at_Lean_Elab_Command_Modifiers_hasFormat___spec__2(x_9); +x_12 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_12, 0, x_10); +lean_ctor_set(x_12, 1, x_11); +return x_12; +} +} +} +} +lean_object* _init_l_Lean_Elab_Command_Modifiers_hasFormat___closed__1() { +_start: +{ +lean_object* x_1; lean_object* x_2; +x_1 = l_addParenHeuristic___closed__1; +x_2 = lean_string_length(x_1); +return x_2; +} +} +lean_object* _init_l_Lean_Elab_Command_Modifiers_hasFormat___closed__2() { +_start: +{ +lean_object* x_1; lean_object* x_2; +x_1 = l_addParenHeuristic___closed__1; +x_2 = lean_alloc_ctor(2, 1, 0); +lean_ctor_set(x_2, 0, x_1); +return x_2; +} +} +lean_object* _init_l_Lean_Elab_Command_Modifiers_hasFormat___closed__3() { +_start: +{ +lean_object* x_1; lean_object* x_2; +x_1 = l_PersistentArray_Stats_toString___closed__4; +x_2 = lean_alloc_ctor(2, 1, 0); +lean_ctor_set(x_2, 0, x_1); +return x_2; +} +} +lean_object* _init_l_Lean_Elab_Command_Modifiers_hasFormat___closed__4() { +_start: +{ +lean_object* x_1; lean_object* x_2; +x_1 = l_Lean_Parser_Command_unsafe___elambda__1___closed__1; +x_2 = lean_alloc_ctor(2, 1, 0); +lean_ctor_set(x_2, 0, x_1); +return x_2; +} +} +lean_object* _init_l_Lean_Elab_Command_Modifiers_hasFormat___closed__5() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; +x_1 = lean_box(0); +x_2 = l_Lean_Elab_Command_Modifiers_hasFormat___closed__4; +x_3 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_3, 0, x_2); +lean_ctor_set(x_3, 1, x_1); +return x_3; +} +} +lean_object* _init_l_Lean_Elab_Command_Modifiers_hasFormat___closed__6() { +_start: +{ +lean_object* x_1; lean_object* x_2; +x_1 = l_Lean_Parser_Command_partial___elambda__1___closed__1; +x_2 = lean_alloc_ctor(2, 1, 0); +lean_ctor_set(x_2, 0, x_1); +return x_2; +} +} +lean_object* _init_l_Lean_Elab_Command_Modifiers_hasFormat___closed__7() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; +x_1 = lean_box(0); +x_2 = l_Lean_Elab_Command_Modifiers_hasFormat___closed__6; +x_3 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_3, 0, x_2); +lean_ctor_set(x_3, 1, x_1); +return x_3; +} +} +lean_object* _init_l_Lean_Elab_Command_Modifiers_hasFormat___closed__8() { +_start: +{ +lean_object* x_1; lean_object* x_2; +x_1 = l_Lean_Parser_Command_noncomputable___elambda__1___closed__1; +x_2 = lean_alloc_ctor(2, 1, 0); +lean_ctor_set(x_2, 0, x_1); +return x_2; +} +} +lean_object* _init_l_Lean_Elab_Command_Modifiers_hasFormat___closed__9() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; +x_1 = lean_box(0); +x_2 = l_Lean_Elab_Command_Modifiers_hasFormat___closed__8; +x_3 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_3, 0, x_2); +lean_ctor_set(x_3, 1, x_1); +return x_3; +} +} +lean_object* _init_l_Lean_Elab_Command_Modifiers_hasFormat___closed__10() { +_start: +{ +lean_object* x_1; lean_object* x_2; +x_1 = l_Lean_mkProtectedExtension___closed__1; +x_2 = lean_alloc_ctor(2, 1, 0); +lean_ctor_set(x_2, 0, x_1); +return x_2; +} +} +lean_object* _init_l_Lean_Elab_Command_Modifiers_hasFormat___closed__11() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; +x_1 = lean_box(0); +x_2 = l_Lean_Elab_Command_Modifiers_hasFormat___closed__10; +x_3 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_3, 0, x_2); +lean_ctor_set(x_3, 1, x_1); +return x_3; +} +} +lean_object* _init_l_Lean_Elab_Command_Modifiers_hasFormat___closed__12() { +_start: +{ +lean_object* x_1; lean_object* x_2; +x_1 = l_Lean_Parser_Command_private___elambda__1___closed__1; +x_2 = lean_alloc_ctor(2, 1, 0); +lean_ctor_set(x_2, 0, x_1); +return x_2; +} +} +lean_object* _init_l_Lean_Elab_Command_Modifiers_hasFormat___closed__13() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; +x_1 = lean_box(0); +x_2 = l_Lean_Elab_Command_Modifiers_hasFormat___closed__12; +x_3 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_3, 0, x_2); +lean_ctor_set(x_3, 1, x_1); +return x_3; +} +} +lean_object* _init_l_Lean_Elab_Command_Modifiers_hasFormat___closed__14() { +_start: +{ +lean_object* x_1; lean_object* x_2; +x_1 = l_Lean_Parser_Command_docComment___elambda__1___closed__7; +x_2 = lean_alloc_ctor(2, 1, 0); +lean_ctor_set(x_2, 0, x_1); +return x_2; +} +} +lean_object* _init_l_Lean_Elab_Command_Modifiers_hasFormat___closed__15() { +_start: +{ +lean_object* x_1; +x_1 = lean_mk_string("-/"); +return x_1; +} +} +lean_object* _init_l_Lean_Elab_Command_Modifiers_hasFormat___closed__16() { +_start: +{ +lean_object* x_1; lean_object* x_2; +x_1 = l_Lean_Elab_Command_Modifiers_hasFormat___closed__15; +x_2 = lean_alloc_ctor(2, 1, 0); +lean_ctor_set(x_2, 0, x_1); +return x_2; +} +} +lean_object* l_Lean_Elab_Command_Modifiers_hasFormat(lean_object* x_1) { +_start: +{ +lean_object* x_2; uint8_t x_3; uint8_t x_4; uint8_t x_5; uint8_t x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; +x_2 = lean_ctor_get(x_1, 0); +x_3 = lean_ctor_get_uint8(x_1, sizeof(void*)*2); +x_4 = lean_ctor_get_uint8(x_1, sizeof(void*)*2 + 1); +x_5 = lean_ctor_get_uint8(x_1, sizeof(void*)*2 + 2); +x_6 = lean_ctor_get_uint8(x_1, sizeof(void*)*2 + 3); +x_7 = lean_ctor_get(x_1, 1); +x_8 = l_Array_toList___rarg(x_7); +x_9 = l_List_map___main___at_Lean_Elab_Command_Modifiers_hasFormat___spec__2(x_8); +if (lean_obj_tag(x_2) == 0) +{ +lean_object* x_78; +x_78 = lean_box(0); +x_10 = x_78; +goto block_77; +} +else +{ +lean_object* x_79; lean_object* x_80; uint8_t x_81; lean_object* x_82; lean_object* x_83; lean_object* x_84; lean_object* x_85; lean_object* x_86; lean_object* x_87; +x_79 = lean_ctor_get(x_2, 0); +lean_inc(x_79); +x_80 = lean_alloc_ctor(2, 1, 0); +lean_ctor_set(x_80, 0, x_79); +x_81 = 0; +x_82 = l_Lean_Elab_Command_Modifiers_hasFormat___closed__14; +x_83 = lean_alloc_ctor(4, 2, 1); +lean_ctor_set(x_83, 0, x_82); +lean_ctor_set(x_83, 1, x_80); +lean_ctor_set_uint8(x_83, sizeof(void*)*2, x_81); +x_84 = l_Lean_Elab_Command_Modifiers_hasFormat___closed__16; +x_85 = lean_alloc_ctor(4, 2, 1); +lean_ctor_set(x_85, 0, x_83); +lean_ctor_set(x_85, 1, x_84); +lean_ctor_set_uint8(x_85, sizeof(void*)*2, x_81); +x_86 = lean_box(0); +x_87 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_87, 0, x_85); +lean_ctor_set(x_87, 1, x_86); +x_10 = x_87; +goto block_77; +} +block_77: +{ +lean_object* x_11; +switch (x_3) { +case 0: +{ +lean_object* x_74; +x_74 = lean_box(0); +x_11 = x_74; +goto block_73; +} +case 1: +{ +lean_object* x_75; +x_75 = l_Lean_Elab_Command_Modifiers_hasFormat___closed__11; +x_11 = x_75; +goto block_73; +} +default: +{ +lean_object* x_76; +x_76 = l_Lean_Elab_Command_Modifiers_hasFormat___closed__13; +x_11 = x_76; +goto block_73; +} +} +block_73: +{ +lean_object* x_12; lean_object* x_13; +x_12 = l_List_append___rarg(x_10, x_11); +if (x_4 == 0) +{ +lean_object* x_71; +x_71 = lean_box(0); +x_13 = x_71; +goto block_70; +} +else +{ +lean_object* x_72; +x_72 = l_Lean_Elab_Command_Modifiers_hasFormat___closed__9; +x_13 = x_72; +goto block_70; +} +block_70: +{ +lean_object* x_14; +x_14 = l_List_append___rarg(x_12, x_13); +if (x_5 == 0) +{ +lean_object* x_15; lean_object* x_16; +x_15 = lean_box(0); +x_16 = l_List_append___rarg(x_14, x_15); +if (x_6 == 0) +{ +lean_object* x_17; lean_object* x_18; lean_object* x_19; lean_object* x_20; uint8_t x_21; lean_object* x_22; lean_object* x_23; lean_object* x_24; lean_object* x_25; lean_object* x_26; lean_object* x_27; lean_object* x_28; +x_17 = l_List_append___rarg(x_16, x_15); +x_18 = l_List_append___rarg(x_17, x_9); +x_19 = l_Lean_List_format___rarg___closed__4; +x_20 = l_Lean_Format_joinSep___main___at___private_Init_Lean_Data_Trie_6__toStringAux___main___spec__1(x_18, x_19); +lean_dec(x_18); +x_21 = 0; +x_22 = l_Lean_Elab_Command_Modifiers_hasFormat___closed__2; +x_23 = lean_alloc_ctor(4, 2, 1); +lean_ctor_set(x_23, 0, x_22); +lean_ctor_set(x_23, 1, x_20); +lean_ctor_set_uint8(x_23, sizeof(void*)*2, x_21); +x_24 = l_Lean_Elab_Command_Modifiers_hasFormat___closed__3; +x_25 = lean_alloc_ctor(4, 2, 1); +lean_ctor_set(x_25, 0, x_23); +lean_ctor_set(x_25, 1, x_24); +lean_ctor_set_uint8(x_25, sizeof(void*)*2, x_21); +x_26 = l_Lean_Elab_Command_Modifiers_hasFormat___closed__1; +x_27 = lean_alloc_ctor(3, 2, 0); +lean_ctor_set(x_27, 0, x_26); +lean_ctor_set(x_27, 1, x_25); +x_28 = lean_format_group(x_27); +return x_28; +} +else +{ +lean_object* x_29; lean_object* x_30; lean_object* x_31; lean_object* x_32; lean_object* x_33; uint8_t x_34; lean_object* x_35; lean_object* x_36; lean_object* x_37; lean_object* x_38; lean_object* x_39; lean_object* x_40; lean_object* x_41; +x_29 = l_Lean_Elab_Command_Modifiers_hasFormat___closed__5; +x_30 = l_List_append___rarg(x_16, x_29); +x_31 = l_List_append___rarg(x_30, x_9); +x_32 = l_Lean_List_format___rarg___closed__4; +x_33 = l_Lean_Format_joinSep___main___at___private_Init_Lean_Data_Trie_6__toStringAux___main___spec__1(x_31, x_32); +lean_dec(x_31); +x_34 = 0; +x_35 = l_Lean_Elab_Command_Modifiers_hasFormat___closed__2; +x_36 = lean_alloc_ctor(4, 2, 1); +lean_ctor_set(x_36, 0, x_35); +lean_ctor_set(x_36, 1, x_33); +lean_ctor_set_uint8(x_36, sizeof(void*)*2, x_34); +x_37 = l_Lean_Elab_Command_Modifiers_hasFormat___closed__3; +x_38 = lean_alloc_ctor(4, 2, 1); +lean_ctor_set(x_38, 0, x_36); +lean_ctor_set(x_38, 1, x_37); +lean_ctor_set_uint8(x_38, sizeof(void*)*2, x_34); +x_39 = l_Lean_Elab_Command_Modifiers_hasFormat___closed__1; +x_40 = lean_alloc_ctor(3, 2, 0); +lean_ctor_set(x_40, 0, x_39); +lean_ctor_set(x_40, 1, x_38); +x_41 = lean_format_group(x_40); +return x_41; +} +} +else +{ +lean_object* x_42; lean_object* x_43; lean_object* x_44; +x_42 = lean_box(0); +x_43 = l_Lean_Elab_Command_Modifiers_hasFormat___closed__7; +x_44 = l_List_append___rarg(x_14, x_43); +if (x_6 == 0) +{ +lean_object* x_45; lean_object* x_46; lean_object* x_47; lean_object* x_48; uint8_t x_49; lean_object* x_50; lean_object* x_51; lean_object* x_52; lean_object* x_53; lean_object* x_54; lean_object* x_55; lean_object* x_56; +x_45 = l_List_append___rarg(x_44, x_42); +x_46 = l_List_append___rarg(x_45, x_9); +x_47 = l_Lean_List_format___rarg___closed__4; +x_48 = l_Lean_Format_joinSep___main___at___private_Init_Lean_Data_Trie_6__toStringAux___main___spec__1(x_46, x_47); +lean_dec(x_46); +x_49 = 0; +x_50 = l_Lean_Elab_Command_Modifiers_hasFormat___closed__2; +x_51 = lean_alloc_ctor(4, 2, 1); +lean_ctor_set(x_51, 0, x_50); +lean_ctor_set(x_51, 1, x_48); +lean_ctor_set_uint8(x_51, sizeof(void*)*2, x_49); +x_52 = l_Lean_Elab_Command_Modifiers_hasFormat___closed__3; +x_53 = lean_alloc_ctor(4, 2, 1); +lean_ctor_set(x_53, 0, x_51); +lean_ctor_set(x_53, 1, x_52); +lean_ctor_set_uint8(x_53, sizeof(void*)*2, x_49); +x_54 = l_Lean_Elab_Command_Modifiers_hasFormat___closed__1; +x_55 = lean_alloc_ctor(3, 2, 0); +lean_ctor_set(x_55, 0, x_54); +lean_ctor_set(x_55, 1, x_53); +x_56 = lean_format_group(x_55); +return x_56; +} +else +{ +lean_object* x_57; lean_object* x_58; lean_object* x_59; lean_object* x_60; lean_object* x_61; uint8_t x_62; lean_object* x_63; lean_object* x_64; lean_object* x_65; lean_object* x_66; lean_object* x_67; lean_object* x_68; lean_object* x_69; +x_57 = l_Lean_Elab_Command_Modifiers_hasFormat___closed__5; +x_58 = l_List_append___rarg(x_44, x_57); +x_59 = l_List_append___rarg(x_58, x_9); +x_60 = l_Lean_List_format___rarg___closed__4; +x_61 = l_Lean_Format_joinSep___main___at___private_Init_Lean_Data_Trie_6__toStringAux___main___spec__1(x_59, x_60); +lean_dec(x_59); +x_62 = 0; +x_63 = l_Lean_Elab_Command_Modifiers_hasFormat___closed__2; +x_64 = lean_alloc_ctor(4, 2, 1); +lean_ctor_set(x_64, 0, x_63); +lean_ctor_set(x_64, 1, x_61); +lean_ctor_set_uint8(x_64, sizeof(void*)*2, x_62); +x_65 = l_Lean_Elab_Command_Modifiers_hasFormat___closed__3; +x_66 = lean_alloc_ctor(4, 2, 1); +lean_ctor_set(x_66, 0, x_64); +lean_ctor_set(x_66, 1, x_65); +lean_ctor_set_uint8(x_66, sizeof(void*)*2, x_62); +x_67 = l_Lean_Elab_Command_Modifiers_hasFormat___closed__1; +x_68 = lean_alloc_ctor(3, 2, 0); +lean_ctor_set(x_68, 0, x_67); +lean_ctor_set(x_68, 1, x_66); +x_69 = lean_format_group(x_68); +return x_69; +} +} +} +} +} +} +} +lean_object* l_Lean_Elab_Command_Modifiers_hasFormat___boxed(lean_object* x_1) { +_start: +{ +lean_object* x_2; +x_2 = l_Lean_Elab_Command_Modifiers_hasFormat(x_1); +lean_dec(x_1); +return x_2; +} +} +lean_object* l_Lean_Elab_Command_Modifiers_hasToString___lambda__1(lean_object* x_1) { +_start: +{ +lean_object* x_2; uint8_t x_3; uint8_t x_4; uint8_t x_5; uint8_t x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; +x_2 = lean_ctor_get(x_1, 0); +x_3 = lean_ctor_get_uint8(x_1, sizeof(void*)*2); +x_4 = lean_ctor_get_uint8(x_1, sizeof(void*)*2 + 1); +x_5 = lean_ctor_get_uint8(x_1, sizeof(void*)*2 + 2); +x_6 = lean_ctor_get_uint8(x_1, sizeof(void*)*2 + 3); +x_7 = lean_ctor_get(x_1, 1); +x_8 = l_Array_toList___rarg(x_7); +x_9 = l_List_map___main___at_Lean_Elab_Command_Modifiers_hasFormat___spec__2(x_8); +if (lean_obj_tag(x_2) == 0) +{ +lean_object* x_78; +x_78 = lean_box(0); +x_10 = x_78; +goto block_77; +} +else +{ +lean_object* x_79; lean_object* x_80; uint8_t x_81; lean_object* x_82; lean_object* x_83; lean_object* x_84; lean_object* x_85; lean_object* x_86; lean_object* x_87; +x_79 = lean_ctor_get(x_2, 0); +lean_inc(x_79); +x_80 = lean_alloc_ctor(2, 1, 0); +lean_ctor_set(x_80, 0, x_79); +x_81 = 0; +x_82 = l_Lean_Elab_Command_Modifiers_hasFormat___closed__14; +x_83 = lean_alloc_ctor(4, 2, 1); +lean_ctor_set(x_83, 0, x_82); +lean_ctor_set(x_83, 1, x_80); +lean_ctor_set_uint8(x_83, sizeof(void*)*2, x_81); +x_84 = l_Lean_Elab_Command_Modifiers_hasFormat___closed__16; +x_85 = lean_alloc_ctor(4, 2, 1); +lean_ctor_set(x_85, 0, x_83); +lean_ctor_set(x_85, 1, x_84); +lean_ctor_set_uint8(x_85, sizeof(void*)*2, x_81); +x_86 = lean_box(0); +x_87 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_87, 0, x_85); +lean_ctor_set(x_87, 1, x_86); +x_10 = x_87; +goto block_77; +} +block_77: +{ +lean_object* x_11; +switch (x_3) { +case 0: +{ +lean_object* x_74; +x_74 = lean_box(0); +x_11 = x_74; +goto block_73; +} +case 1: +{ +lean_object* x_75; +x_75 = l_Lean_Elab_Command_Modifiers_hasFormat___closed__11; +x_11 = x_75; +goto block_73; +} +default: +{ +lean_object* x_76; +x_76 = l_Lean_Elab_Command_Modifiers_hasFormat___closed__13; +x_11 = x_76; +goto block_73; +} +} +block_73: +{ +lean_object* x_12; lean_object* x_13; +x_12 = l_List_append___rarg(x_10, x_11); +if (x_4 == 0) +{ +lean_object* x_71; +x_71 = lean_box(0); +x_13 = x_71; +goto block_70; +} +else +{ +lean_object* x_72; +x_72 = l_Lean_Elab_Command_Modifiers_hasFormat___closed__9; +x_13 = x_72; +goto block_70; +} +block_70: +{ +lean_object* x_14; +x_14 = l_List_append___rarg(x_12, x_13); +if (x_5 == 0) +{ +lean_object* x_15; lean_object* x_16; +x_15 = lean_box(0); +x_16 = l_List_append___rarg(x_14, x_15); +if (x_6 == 0) +{ +lean_object* x_17; lean_object* x_18; lean_object* x_19; lean_object* x_20; uint8_t x_21; lean_object* x_22; lean_object* x_23; lean_object* x_24; lean_object* x_25; lean_object* x_26; lean_object* x_27; lean_object* x_28; +x_17 = l_List_append___rarg(x_16, x_15); +x_18 = l_List_append___rarg(x_17, x_9); +x_19 = l_Lean_List_format___rarg___closed__4; +x_20 = l_Lean_Format_joinSep___main___at___private_Init_Lean_Data_Trie_6__toStringAux___main___spec__1(x_18, x_19); +lean_dec(x_18); +x_21 = 0; +x_22 = l_Lean_Elab_Command_Modifiers_hasFormat___closed__2; +x_23 = lean_alloc_ctor(4, 2, 1); +lean_ctor_set(x_23, 0, x_22); +lean_ctor_set(x_23, 1, x_20); +lean_ctor_set_uint8(x_23, sizeof(void*)*2, x_21); +x_24 = l_Lean_Elab_Command_Modifiers_hasFormat___closed__3; +x_25 = lean_alloc_ctor(4, 2, 1); +lean_ctor_set(x_25, 0, x_23); +lean_ctor_set(x_25, 1, x_24); +lean_ctor_set_uint8(x_25, sizeof(void*)*2, x_21); +x_26 = l_Lean_Elab_Command_Modifiers_hasFormat___closed__1; +x_27 = lean_alloc_ctor(3, 2, 0); +lean_ctor_set(x_27, 0, x_26); +lean_ctor_set(x_27, 1, x_25); +x_28 = lean_format_group(x_27); +return x_28; +} +else +{ +lean_object* x_29; lean_object* x_30; lean_object* x_31; lean_object* x_32; lean_object* x_33; uint8_t x_34; lean_object* x_35; lean_object* x_36; lean_object* x_37; lean_object* x_38; lean_object* x_39; lean_object* x_40; lean_object* x_41; +x_29 = l_Lean_Elab_Command_Modifiers_hasFormat___closed__5; +x_30 = l_List_append___rarg(x_16, x_29); +x_31 = l_List_append___rarg(x_30, x_9); +x_32 = l_Lean_List_format___rarg___closed__4; +x_33 = l_Lean_Format_joinSep___main___at___private_Init_Lean_Data_Trie_6__toStringAux___main___spec__1(x_31, x_32); +lean_dec(x_31); +x_34 = 0; +x_35 = l_Lean_Elab_Command_Modifiers_hasFormat___closed__2; +x_36 = lean_alloc_ctor(4, 2, 1); +lean_ctor_set(x_36, 0, x_35); +lean_ctor_set(x_36, 1, x_33); +lean_ctor_set_uint8(x_36, sizeof(void*)*2, x_34); +x_37 = l_Lean_Elab_Command_Modifiers_hasFormat___closed__3; +x_38 = lean_alloc_ctor(4, 2, 1); +lean_ctor_set(x_38, 0, x_36); +lean_ctor_set(x_38, 1, x_37); +lean_ctor_set_uint8(x_38, sizeof(void*)*2, x_34); +x_39 = l_Lean_Elab_Command_Modifiers_hasFormat___closed__1; +x_40 = lean_alloc_ctor(3, 2, 0); +lean_ctor_set(x_40, 0, x_39); +lean_ctor_set(x_40, 1, x_38); +x_41 = lean_format_group(x_40); +return x_41; +} +} +else +{ +lean_object* x_42; lean_object* x_43; lean_object* x_44; +x_42 = lean_box(0); +x_43 = l_Lean_Elab_Command_Modifiers_hasFormat___closed__7; +x_44 = l_List_append___rarg(x_14, x_43); +if (x_6 == 0) +{ +lean_object* x_45; lean_object* x_46; lean_object* x_47; lean_object* x_48; uint8_t x_49; lean_object* x_50; lean_object* x_51; lean_object* x_52; lean_object* x_53; lean_object* x_54; lean_object* x_55; lean_object* x_56; +x_45 = l_List_append___rarg(x_44, x_42); +x_46 = l_List_append___rarg(x_45, x_9); +x_47 = l_Lean_List_format___rarg___closed__4; +x_48 = l_Lean_Format_joinSep___main___at___private_Init_Lean_Data_Trie_6__toStringAux___main___spec__1(x_46, x_47); +lean_dec(x_46); +x_49 = 0; +x_50 = l_Lean_Elab_Command_Modifiers_hasFormat___closed__2; +x_51 = lean_alloc_ctor(4, 2, 1); +lean_ctor_set(x_51, 0, x_50); +lean_ctor_set(x_51, 1, x_48); +lean_ctor_set_uint8(x_51, sizeof(void*)*2, x_49); +x_52 = l_Lean_Elab_Command_Modifiers_hasFormat___closed__3; +x_53 = lean_alloc_ctor(4, 2, 1); +lean_ctor_set(x_53, 0, x_51); +lean_ctor_set(x_53, 1, x_52); +lean_ctor_set_uint8(x_53, sizeof(void*)*2, x_49); +x_54 = l_Lean_Elab_Command_Modifiers_hasFormat___closed__1; +x_55 = lean_alloc_ctor(3, 2, 0); +lean_ctor_set(x_55, 0, x_54); +lean_ctor_set(x_55, 1, x_53); +x_56 = lean_format_group(x_55); +return x_56; +} +else +{ +lean_object* x_57; lean_object* x_58; lean_object* x_59; lean_object* x_60; lean_object* x_61; uint8_t x_62; lean_object* x_63; lean_object* x_64; lean_object* x_65; lean_object* x_66; lean_object* x_67; lean_object* x_68; lean_object* x_69; +x_57 = l_Lean_Elab_Command_Modifiers_hasFormat___closed__5; +x_58 = l_List_append___rarg(x_44, x_57); +x_59 = l_List_append___rarg(x_58, x_9); +x_60 = l_Lean_List_format___rarg___closed__4; +x_61 = l_Lean_Format_joinSep___main___at___private_Init_Lean_Data_Trie_6__toStringAux___main___spec__1(x_59, x_60); +lean_dec(x_59); +x_62 = 0; +x_63 = l_Lean_Elab_Command_Modifiers_hasFormat___closed__2; +x_64 = lean_alloc_ctor(4, 2, 1); +lean_ctor_set(x_64, 0, x_63); +lean_ctor_set(x_64, 1, x_61); +lean_ctor_set_uint8(x_64, sizeof(void*)*2, x_62); +x_65 = l_Lean_Elab_Command_Modifiers_hasFormat___closed__3; +x_66 = lean_alloc_ctor(4, 2, 1); +lean_ctor_set(x_66, 0, x_64); +lean_ctor_set(x_66, 1, x_65); +lean_ctor_set_uint8(x_66, sizeof(void*)*2, x_62); +x_67 = l_Lean_Elab_Command_Modifiers_hasFormat___closed__1; +x_68 = lean_alloc_ctor(3, 2, 0); +lean_ctor_set(x_68, 0, x_67); +lean_ctor_set(x_68, 1, x_66); +x_69 = lean_format_group(x_68); +return x_69; +} +} +} +} +} +} +} +lean_object* _init_l_Lean_Elab_Command_Modifiers_hasToString___closed__1() { +_start: +{ +lean_object* x_1; +x_1 = lean_alloc_closure((void*)(l_Lean_Elab_Command_Modifiers_hasToString___lambda__1___boxed), 1, 0); +return x_1; +} +} +lean_object* _init_l_Lean_Elab_Command_Modifiers_hasToString___closed__2() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; +x_1 = l_Lean_HasRepr___closed__1; +x_2 = l_Lean_Elab_Command_Modifiers_hasToString___closed__1; +x_3 = lean_alloc_closure((void*)(l_Function_comp___rarg), 3, 2); +lean_closure_set(x_3, 0, x_1); +lean_closure_set(x_3, 1, x_2); +return x_3; +} +} +lean_object* _init_l_Lean_Elab_Command_Modifiers_hasToString() { +_start: +{ +lean_object* x_1; +x_1 = l_Lean_Elab_Command_Modifiers_hasToString___closed__2; +return x_1; +} +} +lean_object* l_Lean_Elab_Command_Modifiers_hasToString___lambda__1___boxed(lean_object* x_1) { +_start: +{ +lean_object* x_2; +x_2 = l_Lean_Elab_Command_Modifiers_hasToString___lambda__1(x_1); +lean_dec(x_1); +return x_2; +} +} +lean_object* l_Lean_Elab_throwError___at_Lean_Elab_Command_elabAttr___spec__1(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { +_start: +{ +uint8_t x_5; lean_object* x_6; uint8_t x_7; +x_5 = 2; +x_6 = l_Lean_Elab_mkMessage___at_Lean_Elab_Command_elabCommand___spec__2(x_2, x_5, x_1, x_3, x_4); +x_7 = !lean_is_exclusive(x_6); +if (x_7 == 0) +{ +lean_ctor_set_tag(x_6, 1); +return x_6; +} +else +{ +lean_object* x_8; lean_object* x_9; lean_object* x_10; +x_8 = lean_ctor_get(x_6, 0); +x_9 = lean_ctor_get(x_6, 1); +lean_inc(x_9); +lean_inc(x_8); +lean_dec(x_6); +x_10 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_10, 0, x_8); +lean_ctor_set(x_10, 1, x_9); +return x_10; +} +} +} +lean_object* _init_l_Lean_Elab_Command_elabAttr___closed__1() { +_start: +{ +lean_object* x_1; +x_1 = lean_mk_string("unknown attribute ["); +return x_1; +} +} +lean_object* _init_l_Lean_Elab_Command_elabAttr___closed__2() { +_start: +{ +lean_object* x_1; lean_object* x_2; +x_1 = l_Lean_Elab_Command_elabAttr___closed__1; +x_2 = lean_alloc_ctor(2, 1, 0); +lean_ctor_set(x_2, 0, x_1); +return x_2; +} +} +lean_object* _init_l_Lean_Elab_Command_elabAttr___closed__3() { +_start: +{ +lean_object* x_1; lean_object* x_2; +x_1 = l_Lean_Elab_Command_elabAttr___closed__2; +x_2 = lean_alloc_ctor(0, 1, 0); +lean_ctor_set(x_2, 0, x_1); +return x_2; +} +} +lean_object* _init_l_Lean_Elab_Command_elabAttr___closed__4() { +_start: +{ +lean_object* x_1; +x_1 = lean_mk_string("identifier expected"); +return x_1; +} +} +lean_object* _init_l_Lean_Elab_Command_elabAttr___closed__5() { +_start: +{ +lean_object* x_1; lean_object* x_2; +x_1 = l_Lean_Elab_Command_elabAttr___closed__4; +x_2 = lean_alloc_ctor(2, 1, 0); +lean_ctor_set(x_2, 0, x_1); +return x_2; +} +} +lean_object* _init_l_Lean_Elab_Command_elabAttr___closed__6() { +_start: +{ +lean_object* x_1; lean_object* x_2; +x_1 = l_Lean_Elab_Command_elabAttr___closed__5; +x_2 = lean_alloc_ctor(0, 1, 0); +lean_ctor_set(x_2, 0, x_1); +return x_2; +} +} +lean_object* l_Lean_Elab_Command_elabAttr(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +_start: +{ +lean_object* x_4; lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_40; +x_4 = lean_unsigned_to_nat(0u); +x_5 = l_Lean_Syntax_getArg(x_1, x_4); +x_40 = l_Lean_Syntax_isIdOrAtom_x3f(x_5); +if (lean_obj_tag(x_40) == 0) +{ +lean_object* x_41; lean_object* x_42; uint8_t x_43; +x_41 = l_Lean_Elab_Command_elabAttr___closed__6; +x_42 = l_Lean_Elab_throwError___at_Lean_Elab_Command_elabAttr___spec__1(x_5, x_41, x_2, x_3); +lean_dec(x_2); +lean_dec(x_5); +x_43 = !lean_is_exclusive(x_42); +if (x_43 == 0) +{ +return x_42; +} +else +{ +lean_object* x_44; lean_object* x_45; lean_object* x_46; +x_44 = lean_ctor_get(x_42, 0); +x_45 = lean_ctor_get(x_42, 1); +lean_inc(x_45); +lean_inc(x_44); +lean_dec(x_42); +x_46 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_46, 0, x_44); +lean_ctor_set(x_46, 1, x_45); +return x_46; +} +} +else +{ +lean_object* x_47; lean_object* x_48; lean_object* x_49; +lean_dec(x_5); +x_47 = lean_ctor_get(x_40, 0); +lean_inc(x_47); +lean_dec(x_40); +x_48 = lean_box(0); +x_49 = lean_name_mk_string(x_48, x_47); +x_6 = x_49; +x_7 = x_3; +goto block_39; +} +block_39: +{ +lean_object* x_8; +lean_inc(x_6); +x_8 = lean_is_attribute(x_6, x_7); +if (lean_obj_tag(x_8) == 0) +{ +lean_object* x_9; uint8_t x_10; +x_9 = lean_ctor_get(x_8, 0); +lean_inc(x_9); +x_10 = lean_unbox(x_9); +lean_dec(x_9); +if (x_10 == 0) +{ +lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; uint8_t x_18; +x_11 = lean_ctor_get(x_8, 1); +lean_inc(x_11); +lean_dec(x_8); +x_12 = lean_alloc_ctor(4, 1, 0); +lean_ctor_set(x_12, 0, x_6); +x_13 = l_Lean_Elab_Command_elabAttr___closed__3; +x_14 = lean_alloc_ctor(8, 2, 0); +lean_ctor_set(x_14, 0, x_13); +lean_ctor_set(x_14, 1, x_12); +x_15 = l_Lean_MessageData_arrayExpr_toMessageData___main___closed__1; +x_16 = lean_alloc_ctor(8, 2, 0); +lean_ctor_set(x_16, 0, x_14); +lean_ctor_set(x_16, 1, x_15); +x_17 = l_Lean_Elab_throwError___at_Lean_Elab_Command_elabCommand___spec__1(x_1, x_16, x_2, x_11); +lean_dec(x_2); +x_18 = !lean_is_exclusive(x_17); +if (x_18 == 0) +{ +return x_17; +} +else +{ +lean_object* x_19; lean_object* x_20; lean_object* x_21; +x_19 = lean_ctor_get(x_17, 0); +x_20 = lean_ctor_get(x_17, 1); +lean_inc(x_20); +lean_inc(x_19); +lean_dec(x_17); +x_21 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_21, 0, x_19); +lean_ctor_set(x_21, 1, x_20); +return x_21; +} +} +else +{ +uint8_t x_22; +lean_dec(x_2); +x_22 = !lean_is_exclusive(x_8); +if (x_22 == 0) +{ +lean_object* x_23; lean_object* x_24; lean_object* x_25; lean_object* x_26; +x_23 = lean_ctor_get(x_8, 0); +lean_dec(x_23); +x_24 = lean_unsigned_to_nat(1u); +x_25 = l_Lean_Syntax_getArg(x_1, x_24); +x_26 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_26, 0, x_6); +lean_ctor_set(x_26, 1, x_25); +lean_ctor_set(x_8, 0, x_26); +return x_8; +} +else +{ +lean_object* x_27; lean_object* x_28; lean_object* x_29; lean_object* x_30; lean_object* x_31; +x_27 = lean_ctor_get(x_8, 1); +lean_inc(x_27); +lean_dec(x_8); +x_28 = lean_unsigned_to_nat(1u); +x_29 = l_Lean_Syntax_getArg(x_1, x_28); +x_30 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_30, 0, x_6); +lean_ctor_set(x_30, 1, x_29); +x_31 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_31, 0, x_30); +lean_ctor_set(x_31, 1, x_27); +return x_31; +} +} +} +else +{ +uint8_t x_32; +lean_dec(x_6); +x_32 = !lean_is_exclusive(x_8); +if (x_32 == 0) +{ +lean_object* x_33; lean_object* x_34; +x_33 = lean_ctor_get(x_8, 0); +x_34 = l___private_Init_Lean_Elab_Command_1__ioErrorToMessage(x_2, x_1, x_33); +lean_ctor_set(x_8, 0, x_34); +return x_8; +} +else +{ +lean_object* x_35; lean_object* x_36; lean_object* x_37; lean_object* x_38; +x_35 = lean_ctor_get(x_8, 0); +x_36 = lean_ctor_get(x_8, 1); +lean_inc(x_36); +lean_inc(x_35); +lean_dec(x_8); +x_37 = l___private_Init_Lean_Elab_Command_1__ioErrorToMessage(x_2, x_1, x_35); +x_38 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_38, 0, x_37); +lean_ctor_set(x_38, 1, x_36); +return x_38; +} +} +} +} +} +lean_object* l_Lean_Elab_throwError___at_Lean_Elab_Command_elabAttr___spec__1___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { +_start: +{ +lean_object* x_5; +x_5 = l_Lean_Elab_throwError___at_Lean_Elab_Command_elabAttr___spec__1(x_1, x_2, x_3, x_4); +lean_dec(x_3); +lean_dec(x_1); +return x_5; +} +} +lean_object* l_Lean_Elab_Command_elabAttr___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +_start: +{ +lean_object* x_4; +x_4 = l_Lean_Elab_Command_elabAttr(x_1, x_2, x_3); +lean_dec(x_1); +return x_4; +} +} +lean_object* l_Lean_Syntax_foldArgsAuxM___main___at_Lean_Elab_Command_elabAttrs___spec__1(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6) { +_start: +{ +lean_object* x_7; uint8_t x_8; +x_7 = lean_array_get_size(x_2); +x_8 = lean_nat_dec_lt(x_3, x_7); +lean_dec(x_7); +if (x_8 == 0) +{ +lean_object* x_9; +lean_dec(x_5); +lean_dec(x_3); +x_9 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_9, 0, x_4); +lean_ctor_set(x_9, 1, x_6); +return x_9; +} +else +{ +lean_object* x_10; lean_object* x_11; +x_10 = lean_array_fget(x_2, x_3); +lean_inc(x_5); +x_11 = l_Lean_Elab_Command_elabAttr(x_10, x_5, x_6); +lean_dec(x_10); +if (lean_obj_tag(x_11) == 0) +{ +lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; +x_12 = lean_ctor_get(x_11, 0); +lean_inc(x_12); +x_13 = lean_ctor_get(x_11, 1); +lean_inc(x_13); +lean_dec(x_11); +x_14 = lean_array_push(x_4, x_12); +x_15 = lean_nat_add(x_3, x_1); +lean_dec(x_3); +x_3 = x_15; +x_4 = x_14; +x_6 = x_13; +goto _start; +} +else +{ +uint8_t x_17; +lean_dec(x_5); +lean_dec(x_4); +lean_dec(x_3); +x_17 = !lean_is_exclusive(x_11); +if (x_17 == 0) +{ +return x_11; +} +else +{ +lean_object* x_18; lean_object* x_19; lean_object* x_20; +x_18 = lean_ctor_get(x_11, 0); +x_19 = lean_ctor_get(x_11, 1); +lean_inc(x_19); +lean_inc(x_18); +lean_dec(x_11); +x_20 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_20, 0, x_18); +lean_ctor_set(x_20, 1, x_19); +return x_20; +} +} +} +} +} +lean_object* l_Lean_Elab_Command_elabAttrs(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +_start: +{ +lean_object* x_4; lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; +x_4 = lean_unsigned_to_nat(1u); +x_5 = l_Lean_Syntax_getArg(x_1, x_4); +x_6 = l_Lean_Syntax_getArgs(x_5); +lean_dec(x_5); +x_7 = lean_unsigned_to_nat(2u); +x_8 = lean_unsigned_to_nat(0u); +x_9 = l_Array_empty___closed__1; +x_10 = l_Lean_Syntax_foldArgsAuxM___main___at_Lean_Elab_Command_elabAttrs___spec__1(x_7, x_6, x_8, x_9, x_2, x_3); +lean_dec(x_6); +return x_10; +} +} +lean_object* l_Lean_Syntax_foldArgsAuxM___main___at_Lean_Elab_Command_elabAttrs___spec__1___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6) { +_start: +{ +lean_object* x_7; +x_7 = l_Lean_Syntax_foldArgsAuxM___main___at_Lean_Elab_Command_elabAttrs___spec__1(x_1, x_2, x_3, x_4, x_5, x_6); +lean_dec(x_2); +lean_dec(x_1); +return x_7; +} +} +lean_object* l_Lean_Elab_Command_elabAttrs___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +_start: +{ +lean_object* x_4; +x_4 = l_Lean_Elab_Command_elabAttrs(x_1, x_2, x_3); +lean_dec(x_1); +return x_4; +} +} +lean_object* l_Lean_Elab_throwError___at_Lean_Elab_Command_elabModifiers___spec__1(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { +_start: +{ +uint8_t x_5; lean_object* x_6; uint8_t x_7; +x_5 = 2; +x_6 = l_Lean_Elab_mkMessage___at_Lean_Elab_Command_elabCommand___spec__2(x_2, x_5, x_1, x_3, x_4); +x_7 = !lean_is_exclusive(x_6); +if (x_7 == 0) +{ +lean_ctor_set_tag(x_6, 1); +return x_6; +} +else +{ +lean_object* x_8; lean_object* x_9; lean_object* x_10; +x_8 = lean_ctor_get(x_6, 0); +x_9 = lean_ctor_get(x_6, 1); +lean_inc(x_9); +lean_inc(x_8); +lean_dec(x_6); +x_10 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_10, 0, x_8); +lean_ctor_set(x_10, 1, x_9); +return x_10; +} +} +} +lean_object* l_Lean_Elab_throwError___at_Lean_Elab_Command_elabModifiers___spec__2(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { +_start: +{ +uint8_t x_5; lean_object* x_6; uint8_t x_7; +x_5 = 2; +x_6 = l_Lean_Elab_mkMessage___at_Lean_Elab_Command_elabCommand___spec__2(x_2, x_5, x_1, x_3, x_4); +x_7 = !lean_is_exclusive(x_6); +if (x_7 == 0) +{ +lean_ctor_set_tag(x_6, 1); +return x_6; +} +else +{ +lean_object* x_8; lean_object* x_9; lean_object* x_10; +x_8 = lean_ctor_get(x_6, 0); +x_9 = lean_ctor_get(x_6, 1); +lean_inc(x_9); +lean_inc(x_8); +lean_dec(x_6); +x_10 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_10, 0, x_8); +lean_ctor_set(x_10, 1, x_9); +return x_10; +} +} +} +lean_object* _init_l_Lean_Elab_Command_elabModifiers___closed__1() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; +x_1 = l_Lean_Parser_Command_docComment___elambda__1___closed__2; +x_2 = l_Lean_mkProtectedExtension___closed__1; +x_3 = lean_name_mk_string(x_1, x_2); +return x_3; +} +} +lean_object* _init_l_Lean_Elab_Command_elabModifiers___closed__2() { +_start: +{ +lean_object* x_1; +x_1 = lean_mk_string("unexpected visibility modifier"); +return x_1; +} +} +lean_object* _init_l_Lean_Elab_Command_elabModifiers___closed__3() { +_start: +{ +lean_object* x_1; lean_object* x_2; +x_1 = l_Lean_Elab_Command_elabModifiers___closed__2; +x_2 = lean_alloc_ctor(2, 1, 0); +lean_ctor_set(x_2, 0, x_1); +return x_2; +} +} +lean_object* _init_l_Lean_Elab_Command_elabModifiers___closed__4() { +_start: +{ +lean_object* x_1; lean_object* x_2; +x_1 = l_Lean_Elab_Command_elabModifiers___closed__3; +x_2 = lean_alloc_ctor(0, 1, 0); +lean_ctor_set(x_2, 0, x_1); +return x_2; +} +} +lean_object* _init_l_Lean_Elab_Command_elabModifiers___closed__5() { +_start: +{ +lean_object* x_1; +x_1 = lean_mk_string("unexpected doc string "); +return x_1; +} +} +lean_object* _init_l_Lean_Elab_Command_elabModifiers___closed__6() { +_start: +{ +lean_object* x_1; lean_object* x_2; +x_1 = l_Lean_Elab_Command_elabModifiers___closed__5; +x_2 = lean_alloc_ctor(2, 1, 0); +lean_ctor_set(x_2, 0, x_1); +return x_2; +} +} +lean_object* _init_l_Lean_Elab_Command_elabModifiers___closed__7() { +_start: +{ +lean_object* x_1; lean_object* x_2; +x_1 = l_Lean_Elab_Command_elabModifiers___closed__6; +x_2 = lean_alloc_ctor(0, 1, 0); +lean_ctor_set(x_2, 0, x_1); +return x_2; +} +} +lean_object* l_Lean_Elab_Command_elabModifiers(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +_start: +{ +lean_object* x_4; lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_84; +x_4 = lean_unsigned_to_nat(0u); +x_5 = l_Lean_Syntax_getArg(x_1, x_4); +x_6 = lean_unsigned_to_nat(1u); +x_7 = l_Lean_Syntax_getArg(x_1, x_6); +x_8 = lean_unsigned_to_nat(2u); +x_9 = l_Lean_Syntax_getArg(x_1, x_8); +x_10 = lean_unsigned_to_nat(3u); +x_11 = l_Lean_Syntax_getArg(x_1, x_10); +x_12 = lean_unsigned_to_nat(4u); +x_13 = l_Lean_Syntax_getArg(x_1, x_12); +x_14 = lean_unsigned_to_nat(5u); +x_15 = l_Lean_Syntax_getArg(x_1, x_14); +x_84 = l_Lean_Syntax_getOptional_x3f(x_5); +lean_dec(x_5); +if (lean_obj_tag(x_84) == 0) +{ +lean_object* x_85; +x_85 = lean_box(0); +x_16 = x_85; +x_17 = x_3; +goto block_83; +} +else +{ +uint8_t x_86; +x_86 = !lean_is_exclusive(x_84); +if (x_86 == 0) +{ +lean_object* x_87; lean_object* x_88; lean_object* x_104; +x_87 = lean_ctor_get(x_84, 0); +x_104 = l_Lean_Syntax_getArg(x_87, x_6); +if (lean_obj_tag(x_104) == 2) +{ +lean_object* x_105; lean_object* x_106; lean_object* x_107; lean_object* x_108; +lean_dec(x_87); +x_105 = lean_ctor_get(x_104, 1); +lean_inc(x_105); +lean_dec(x_104); +x_106 = lean_string_utf8_byte_size(x_105); +x_107 = lean_nat_sub(x_106, x_8); +lean_dec(x_106); +x_108 = lean_string_utf8_extract(x_105, x_4, x_107); +lean_dec(x_107); +lean_dec(x_105); +lean_ctor_set(x_84, 0, x_108); +x_16 = x_84; +x_17 = x_3; +goto block_83; +} +else +{ +lean_object* x_109; +lean_dec(x_104); +lean_free_object(x_84); +lean_dec(x_15); +lean_dec(x_13); +lean_dec(x_11); +lean_dec(x_9); +lean_dec(x_7); +x_109 = lean_box(0); +x_88 = x_109; +goto block_103; +} +block_103: +{ +lean_object* x_89; lean_object* x_90; lean_object* x_91; lean_object* x_92; lean_object* x_93; lean_object* x_94; lean_object* x_95; lean_object* x_96; lean_object* x_97; lean_object* x_98; uint8_t x_99; +lean_dec(x_88); +x_89 = l_Lean_Syntax_getArg(x_87, x_6); +x_90 = lean_box(0); +x_91 = l_Lean_Syntax_formatStxAux___main(x_90, x_4, x_89); +x_92 = l_Lean_Options_empty; +x_93 = l_Lean_Format_pretty(x_91, x_92); +x_94 = lean_alloc_ctor(2, 1, 0); +lean_ctor_set(x_94, 0, x_93); +x_95 = lean_alloc_ctor(0, 1, 0); +lean_ctor_set(x_95, 0, x_94); +x_96 = l_Lean_Elab_Command_elabModifiers___closed__7; +x_97 = lean_alloc_ctor(8, 2, 0); +lean_ctor_set(x_97, 0, x_96); +lean_ctor_set(x_97, 1, x_95); +x_98 = l_Lean_Elab_throwError___at_Lean_Elab_Command_elabModifiers___spec__2(x_87, x_97, x_2, x_3); +lean_dec(x_2); +lean_dec(x_87); +x_99 = !lean_is_exclusive(x_98); +if (x_99 == 0) +{ +return x_98; +} +else +{ +lean_object* x_100; lean_object* x_101; lean_object* x_102; +x_100 = lean_ctor_get(x_98, 0); +x_101 = lean_ctor_get(x_98, 1); +lean_inc(x_101); +lean_inc(x_100); +lean_dec(x_98); +x_102 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_102, 0, x_100); +lean_ctor_set(x_102, 1, x_101); +return x_102; +} +} +} +else +{ +lean_object* x_110; lean_object* x_111; lean_object* x_127; +x_110 = lean_ctor_get(x_84, 0); +lean_inc(x_110); +lean_dec(x_84); +x_127 = l_Lean_Syntax_getArg(x_110, x_6); +if (lean_obj_tag(x_127) == 2) +{ +lean_object* x_128; lean_object* x_129; lean_object* x_130; lean_object* x_131; lean_object* x_132; +lean_dec(x_110); +x_128 = lean_ctor_get(x_127, 1); +lean_inc(x_128); +lean_dec(x_127); +x_129 = lean_string_utf8_byte_size(x_128); +x_130 = lean_nat_sub(x_129, x_8); +lean_dec(x_129); +x_131 = lean_string_utf8_extract(x_128, x_4, x_130); +lean_dec(x_130); +lean_dec(x_128); +x_132 = lean_alloc_ctor(1, 1, 0); +lean_ctor_set(x_132, 0, x_131); +x_16 = x_132; +x_17 = x_3; +goto block_83; +} +else +{ +lean_object* x_133; +lean_dec(x_127); +lean_dec(x_15); +lean_dec(x_13); +lean_dec(x_11); +lean_dec(x_9); +lean_dec(x_7); +x_133 = lean_box(0); +x_111 = x_133; +goto block_126; +} +block_126: +{ +lean_object* x_112; lean_object* x_113; lean_object* x_114; lean_object* x_115; lean_object* x_116; lean_object* x_117; lean_object* x_118; lean_object* x_119; lean_object* x_120; lean_object* x_121; lean_object* x_122; lean_object* x_123; lean_object* x_124; lean_object* x_125; +lean_dec(x_111); +x_112 = l_Lean_Syntax_getArg(x_110, x_6); +x_113 = lean_box(0); +x_114 = l_Lean_Syntax_formatStxAux___main(x_113, x_4, x_112); +x_115 = l_Lean_Options_empty; +x_116 = l_Lean_Format_pretty(x_114, x_115); +x_117 = lean_alloc_ctor(2, 1, 0); +lean_ctor_set(x_117, 0, x_116); +x_118 = lean_alloc_ctor(0, 1, 0); +lean_ctor_set(x_118, 0, x_117); +x_119 = l_Lean_Elab_Command_elabModifiers___closed__7; +x_120 = lean_alloc_ctor(8, 2, 0); +lean_ctor_set(x_120, 0, x_119); +lean_ctor_set(x_120, 1, x_118); +x_121 = l_Lean_Elab_throwError___at_Lean_Elab_Command_elabModifiers___spec__2(x_110, x_120, x_2, x_3); +lean_dec(x_2); +lean_dec(x_110); +x_122 = lean_ctor_get(x_121, 0); +lean_inc(x_122); +x_123 = lean_ctor_get(x_121, 1); +lean_inc(x_123); +if (lean_is_exclusive(x_121)) { + lean_ctor_release(x_121, 0); + lean_ctor_release(x_121, 1); + x_124 = x_121; +} else { + lean_dec_ref(x_121); + x_124 = lean_box(0); +} +if (lean_is_scalar(x_124)) { + x_125 = lean_alloc_ctor(1, 2, 0); +} else { + x_125 = x_124; +} +lean_ctor_set(x_125, 0, x_122); +lean_ctor_set(x_125, 1, x_123); +return x_125; +} +} +} +block_83: +{ +uint8_t x_18; lean_object* x_19; lean_object* x_67; +x_67 = l_Lean_Syntax_getOptional_x3f(x_9); +lean_dec(x_9); +if (lean_obj_tag(x_67) == 0) +{ +uint8_t x_68; +x_68 = 0; +x_18 = x_68; +x_19 = x_17; +goto block_66; +} +else +{ +lean_object* x_69; lean_object* x_70; lean_object* x_71; uint8_t x_72; +x_69 = lean_ctor_get(x_67, 0); +lean_inc(x_69); +lean_dec(x_67); +lean_inc(x_69); +x_70 = l_Lean_Syntax_getKind(x_69); +x_71 = l_Lean_Parser_Command_private___elambda__1___closed__2; +x_72 = lean_name_eq(x_70, x_71); +if (x_72 == 0) +{ +lean_object* x_73; uint8_t x_74; +x_73 = l_Lean_Elab_Command_elabModifiers___closed__1; +x_74 = lean_name_eq(x_70, x_73); +lean_dec(x_70); +if (x_74 == 0) +{ +lean_object* x_75; lean_object* x_76; uint8_t x_77; +lean_dec(x_16); +lean_dec(x_15); +lean_dec(x_13); +lean_dec(x_11); +lean_dec(x_7); +x_75 = l_Lean_Elab_Command_elabModifiers___closed__4; +x_76 = l_Lean_Elab_throwError___at_Lean_Elab_Command_elabModifiers___spec__1(x_69, x_75, x_2, x_17); +lean_dec(x_2); +lean_dec(x_69); +x_77 = !lean_is_exclusive(x_76); +if (x_77 == 0) +{ +return x_76; +} +else +{ +lean_object* x_78; lean_object* x_79; lean_object* x_80; +x_78 = lean_ctor_get(x_76, 0); +x_79 = lean_ctor_get(x_76, 1); +lean_inc(x_79); +lean_inc(x_78); +lean_dec(x_76); +x_80 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_80, 0, x_78); +lean_ctor_set(x_80, 1, x_79); +return x_80; +} +} +else +{ +uint8_t x_81; +lean_dec(x_69); +x_81 = 1; +x_18 = x_81; +x_19 = x_17; +goto block_66; +} +} +else +{ +uint8_t x_82; +lean_dec(x_70); +lean_dec(x_69); +x_82 = 2; +x_18 = x_82; +x_19 = x_17; +goto block_66; +} +} +block_66: +{ +lean_object* x_20; lean_object* x_21; lean_object* x_56; +x_56 = l_Lean_Syntax_getOptional_x3f(x_7); +lean_dec(x_7); +if (lean_obj_tag(x_56) == 0) +{ +lean_object* x_57; +lean_dec(x_2); +x_57 = l_Array_empty___closed__1; +x_20 = x_57; +x_21 = x_19; +goto block_55; +} +else +{ +lean_object* x_58; lean_object* x_59; +x_58 = lean_ctor_get(x_56, 0); +lean_inc(x_58); +lean_dec(x_56); +x_59 = l_Lean_Elab_Command_elabAttrs(x_58, x_2, x_19); +lean_dec(x_58); +if (lean_obj_tag(x_59) == 0) +{ +lean_object* x_60; lean_object* x_61; +x_60 = lean_ctor_get(x_59, 0); +lean_inc(x_60); +x_61 = lean_ctor_get(x_59, 1); +lean_inc(x_61); +lean_dec(x_59); +x_20 = x_60; +x_21 = x_61; +goto block_55; +} +else +{ +uint8_t x_62; +lean_dec(x_16); +lean_dec(x_15); +lean_dec(x_13); +lean_dec(x_11); +x_62 = !lean_is_exclusive(x_59); +if (x_62 == 0) +{ +return x_59; +} +else +{ +lean_object* x_63; lean_object* x_64; lean_object* x_65; +x_63 = lean_ctor_get(x_59, 0); +x_64 = lean_ctor_get(x_59, 1); +lean_inc(x_64); +lean_inc(x_63); +lean_dec(x_59); +x_65 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_65, 0, x_63); +lean_ctor_set(x_65, 1, x_64); +return x_65; +} +} +} +block_55: +{ +uint8_t x_22; uint8_t x_23; uint8_t x_24; +x_22 = l_Lean_Syntax_isNone(x_11); +lean_dec(x_11); +x_23 = l_Lean_Syntax_isNone(x_15); +lean_dec(x_15); +x_24 = l_Lean_Syntax_isNone(x_13); +lean_dec(x_13); +if (x_22 == 0) +{ +if (x_23 == 0) +{ +if (x_24 == 0) +{ +uint8_t x_25; lean_object* x_26; lean_object* x_27; +x_25 = 1; +x_26 = lean_alloc_ctor(0, 2, 4); +lean_ctor_set(x_26, 0, x_16); +lean_ctor_set(x_26, 1, x_20); +lean_ctor_set_uint8(x_26, sizeof(void*)*2, x_18); +lean_ctor_set_uint8(x_26, sizeof(void*)*2 + 1, x_25); +lean_ctor_set_uint8(x_26, sizeof(void*)*2 + 2, x_25); +lean_ctor_set_uint8(x_26, sizeof(void*)*2 + 3, x_25); +x_27 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_27, 0, x_26); +lean_ctor_set(x_27, 1, x_21); +return x_27; +} +else +{ +uint8_t x_28; uint8_t x_29; lean_object* x_30; lean_object* x_31; +x_28 = 1; +x_29 = 0; +x_30 = lean_alloc_ctor(0, 2, 4); +lean_ctor_set(x_30, 0, x_16); +lean_ctor_set(x_30, 1, x_20); +lean_ctor_set_uint8(x_30, sizeof(void*)*2, x_18); +lean_ctor_set_uint8(x_30, sizeof(void*)*2 + 1, x_28); +lean_ctor_set_uint8(x_30, sizeof(void*)*2 + 2, x_28); +lean_ctor_set_uint8(x_30, sizeof(void*)*2 + 3, x_29); +x_31 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_31, 0, x_30); +lean_ctor_set(x_31, 1, x_21); +return x_31; +} +} +else +{ +if (x_24 == 0) +{ +uint8_t x_32; uint8_t x_33; lean_object* x_34; lean_object* x_35; +x_32 = 1; +x_33 = 0; +x_34 = lean_alloc_ctor(0, 2, 4); +lean_ctor_set(x_34, 0, x_16); +lean_ctor_set(x_34, 1, x_20); +lean_ctor_set_uint8(x_34, sizeof(void*)*2, x_18); +lean_ctor_set_uint8(x_34, sizeof(void*)*2 + 1, x_32); +lean_ctor_set_uint8(x_34, sizeof(void*)*2 + 2, x_33); +lean_ctor_set_uint8(x_34, sizeof(void*)*2 + 3, x_32); +x_35 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_35, 0, x_34); +lean_ctor_set(x_35, 1, x_21); +return x_35; +} +else +{ +uint8_t x_36; uint8_t x_37; lean_object* x_38; lean_object* x_39; +x_36 = 1; +x_37 = 0; +x_38 = lean_alloc_ctor(0, 2, 4); +lean_ctor_set(x_38, 0, x_16); +lean_ctor_set(x_38, 1, x_20); +lean_ctor_set_uint8(x_38, sizeof(void*)*2, x_18); +lean_ctor_set_uint8(x_38, sizeof(void*)*2 + 1, x_36); +lean_ctor_set_uint8(x_38, sizeof(void*)*2 + 2, x_37); +lean_ctor_set_uint8(x_38, sizeof(void*)*2 + 3, x_37); +x_39 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_39, 0, x_38); +lean_ctor_set(x_39, 1, x_21); +return x_39; +} +} +} +else +{ +if (x_23 == 0) +{ +if (x_24 == 0) +{ +uint8_t x_40; uint8_t x_41; lean_object* x_42; lean_object* x_43; +x_40 = 0; +x_41 = 1; +x_42 = lean_alloc_ctor(0, 2, 4); +lean_ctor_set(x_42, 0, x_16); +lean_ctor_set(x_42, 1, x_20); +lean_ctor_set_uint8(x_42, sizeof(void*)*2, x_18); +lean_ctor_set_uint8(x_42, sizeof(void*)*2 + 1, x_40); +lean_ctor_set_uint8(x_42, sizeof(void*)*2 + 2, x_41); +lean_ctor_set_uint8(x_42, sizeof(void*)*2 + 3, x_41); +x_43 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_43, 0, x_42); +lean_ctor_set(x_43, 1, x_21); +return x_43; +} +else +{ +uint8_t x_44; uint8_t x_45; lean_object* x_46; lean_object* x_47; +x_44 = 0; +x_45 = 1; +x_46 = lean_alloc_ctor(0, 2, 4); +lean_ctor_set(x_46, 0, x_16); +lean_ctor_set(x_46, 1, x_20); +lean_ctor_set_uint8(x_46, sizeof(void*)*2, x_18); +lean_ctor_set_uint8(x_46, sizeof(void*)*2 + 1, x_44); +lean_ctor_set_uint8(x_46, sizeof(void*)*2 + 2, x_45); +lean_ctor_set_uint8(x_46, sizeof(void*)*2 + 3, x_44); +x_47 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_47, 0, x_46); +lean_ctor_set(x_47, 1, x_21); +return x_47; +} +} +else +{ +if (x_24 == 0) +{ +uint8_t x_48; uint8_t x_49; lean_object* x_50; lean_object* x_51; +x_48 = 0; +x_49 = 1; +x_50 = lean_alloc_ctor(0, 2, 4); +lean_ctor_set(x_50, 0, x_16); +lean_ctor_set(x_50, 1, x_20); +lean_ctor_set_uint8(x_50, sizeof(void*)*2, x_18); +lean_ctor_set_uint8(x_50, sizeof(void*)*2 + 1, x_48); +lean_ctor_set_uint8(x_50, sizeof(void*)*2 + 2, x_48); +lean_ctor_set_uint8(x_50, sizeof(void*)*2 + 3, x_49); +x_51 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_51, 0, x_50); +lean_ctor_set(x_51, 1, x_21); +return x_51; +} +else +{ +uint8_t x_52; lean_object* x_53; lean_object* x_54; +x_52 = 0; +x_53 = lean_alloc_ctor(0, 2, 4); +lean_ctor_set(x_53, 0, x_16); +lean_ctor_set(x_53, 1, x_20); +lean_ctor_set_uint8(x_53, sizeof(void*)*2, x_18); +lean_ctor_set_uint8(x_53, sizeof(void*)*2 + 1, x_52); +lean_ctor_set_uint8(x_53, sizeof(void*)*2 + 2, x_52); +lean_ctor_set_uint8(x_53, sizeof(void*)*2 + 3, x_52); +x_54 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_54, 0, x_53); +lean_ctor_set(x_54, 1, x_21); +return x_54; +} +} +} +} +} +} +} +} +lean_object* l_Lean_Elab_throwError___at_Lean_Elab_Command_elabModifiers___spec__1___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { +_start: +{ +lean_object* x_5; +x_5 = l_Lean_Elab_throwError___at_Lean_Elab_Command_elabModifiers___spec__1(x_1, x_2, x_3, x_4); +lean_dec(x_3); +lean_dec(x_1); +return x_5; +} +} +lean_object* l_Lean_Elab_throwError___at_Lean_Elab_Command_elabModifiers___spec__2___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { +_start: +{ +lean_object* x_5; +x_5 = l_Lean_Elab_throwError___at_Lean_Elab_Command_elabModifiers___spec__2(x_1, x_2, x_3, x_4); +lean_dec(x_3); +lean_dec(x_1); +return x_5; +} +} +lean_object* l_Lean_Elab_Command_elabModifiers___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +_start: +{ +lean_object* x_4; +x_4 = l_Lean_Elab_Command_elabModifiers(x_1, x_2, x_3); +lean_dec(x_1); +return x_4; +} +} +lean_object* l_Lean_Elab_Command_mkDeclName(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { +_start: +{ +lean_object* x_5; +lean_inc(x_3); +x_5 = l_Lean_Elab_Command_getCurrNamespace(x_3, x_4); +if (lean_obj_tag(x_5) == 0) +{ +uint8_t x_6; +x_6 = !lean_is_exclusive(x_5); +if (x_6 == 0) +{ +lean_object* x_7; lean_object* x_8; lean_object* x_9; uint8_t x_10; lean_object* x_11; +x_7 = lean_ctor_get(x_5, 0); +x_8 = lean_ctor_get(x_5, 1); +x_9 = l_Lean_Name_append___main(x_7, x_2); +lean_dec(x_7); +x_10 = lean_ctor_get_uint8(x_1, sizeof(void*)*2); +x_11 = lean_box(x_10); +if (lean_obj_tag(x_11) == 2) +{ +lean_object* x_12; +lean_free_object(x_5); +lean_inc(x_3); +x_12 = l_Lean_Elab_Command_getEnv(x_3, x_8); +if (lean_obj_tag(x_12) == 0) +{ +lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; +x_13 = lean_ctor_get(x_12, 0); +lean_inc(x_13); +x_14 = lean_ctor_get(x_12, 1); +lean_inc(x_14); +lean_dec(x_12); +x_15 = lean_mk_private_name(x_13, x_9); +x_16 = lean_ctor_get(x_15, 0); +lean_inc(x_16); +x_17 = lean_ctor_get(x_15, 1); +lean_inc(x_17); +lean_dec(x_15); +x_18 = l_Lean_Elab_Command_setEnv(x_16, x_3, x_14); +if (lean_obj_tag(x_18) == 0) +{ +uint8_t x_19; +x_19 = !lean_is_exclusive(x_18); +if (x_19 == 0) +{ +lean_object* x_20; +x_20 = lean_ctor_get(x_18, 0); +lean_dec(x_20); +lean_ctor_set(x_18, 0, x_17); +return x_18; +} +else +{ +lean_object* x_21; lean_object* x_22; +x_21 = lean_ctor_get(x_18, 1); +lean_inc(x_21); +lean_dec(x_18); +x_22 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_22, 0, x_17); +lean_ctor_set(x_22, 1, x_21); +return x_22; +} +} +else +{ +uint8_t x_23; +lean_dec(x_17); +x_23 = !lean_is_exclusive(x_18); +if (x_23 == 0) +{ +return x_18; +} +else +{ +lean_object* x_24; lean_object* x_25; lean_object* x_26; +x_24 = lean_ctor_get(x_18, 0); +x_25 = lean_ctor_get(x_18, 1); +lean_inc(x_25); +lean_inc(x_24); +lean_dec(x_18); +x_26 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_26, 0, x_24); +lean_ctor_set(x_26, 1, x_25); +return x_26; +} +} +} +else +{ +uint8_t x_27; +lean_dec(x_9); +lean_dec(x_3); +x_27 = !lean_is_exclusive(x_12); +if (x_27 == 0) +{ +return x_12; +} +else +{ +lean_object* x_28; lean_object* x_29; lean_object* x_30; +x_28 = lean_ctor_get(x_12, 0); +x_29 = lean_ctor_get(x_12, 1); +lean_inc(x_29); +lean_inc(x_28); +lean_dec(x_12); +x_30 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_30, 0, x_28); +lean_ctor_set(x_30, 1, x_29); +return x_30; +} +} +} +else +{ +lean_dec(x_11); +lean_dec(x_3); +lean_ctor_set(x_5, 0, x_9); +return x_5; +} +} +else +{ +lean_object* x_31; lean_object* x_32; lean_object* x_33; uint8_t x_34; lean_object* x_35; +x_31 = lean_ctor_get(x_5, 0); +x_32 = lean_ctor_get(x_5, 1); +lean_inc(x_32); +lean_inc(x_31); +lean_dec(x_5); +x_33 = l_Lean_Name_append___main(x_31, x_2); +lean_dec(x_31); +x_34 = lean_ctor_get_uint8(x_1, sizeof(void*)*2); +x_35 = lean_box(x_34); +if (lean_obj_tag(x_35) == 2) +{ +lean_object* x_36; +lean_inc(x_3); +x_36 = l_Lean_Elab_Command_getEnv(x_3, x_32); +if (lean_obj_tag(x_36) == 0) +{ +lean_object* x_37; lean_object* x_38; lean_object* x_39; lean_object* x_40; lean_object* x_41; lean_object* x_42; +x_37 = lean_ctor_get(x_36, 0); +lean_inc(x_37); +x_38 = lean_ctor_get(x_36, 1); +lean_inc(x_38); +lean_dec(x_36); +x_39 = lean_mk_private_name(x_37, x_33); +x_40 = lean_ctor_get(x_39, 0); +lean_inc(x_40); +x_41 = lean_ctor_get(x_39, 1); +lean_inc(x_41); +lean_dec(x_39); +x_42 = l_Lean_Elab_Command_setEnv(x_40, x_3, x_38); +if (lean_obj_tag(x_42) == 0) +{ +lean_object* x_43; lean_object* x_44; lean_object* x_45; +x_43 = lean_ctor_get(x_42, 1); +lean_inc(x_43); +if (lean_is_exclusive(x_42)) { + lean_ctor_release(x_42, 0); + lean_ctor_release(x_42, 1); + x_44 = x_42; +} else { + lean_dec_ref(x_42); + x_44 = lean_box(0); +} +if (lean_is_scalar(x_44)) { + x_45 = lean_alloc_ctor(0, 2, 0); +} else { + x_45 = x_44; +} +lean_ctor_set(x_45, 0, x_41); +lean_ctor_set(x_45, 1, x_43); +return x_45; +} +else +{ +lean_object* x_46; lean_object* x_47; lean_object* x_48; lean_object* x_49; +lean_dec(x_41); +x_46 = lean_ctor_get(x_42, 0); +lean_inc(x_46); +x_47 = lean_ctor_get(x_42, 1); +lean_inc(x_47); +if (lean_is_exclusive(x_42)) { + lean_ctor_release(x_42, 0); + lean_ctor_release(x_42, 1); + x_48 = x_42; +} else { + lean_dec_ref(x_42); + x_48 = lean_box(0); +} +if (lean_is_scalar(x_48)) { + x_49 = lean_alloc_ctor(1, 2, 0); +} else { + x_49 = x_48; +} +lean_ctor_set(x_49, 0, x_46); +lean_ctor_set(x_49, 1, x_47); +return x_49; +} +} +else +{ +lean_object* x_50; lean_object* x_51; lean_object* x_52; lean_object* x_53; +lean_dec(x_33); +lean_dec(x_3); +x_50 = lean_ctor_get(x_36, 0); +lean_inc(x_50); +x_51 = lean_ctor_get(x_36, 1); +lean_inc(x_51); +if (lean_is_exclusive(x_36)) { + lean_ctor_release(x_36, 0); + lean_ctor_release(x_36, 1); + x_52 = x_36; +} else { + lean_dec_ref(x_36); + x_52 = lean_box(0); +} +if (lean_is_scalar(x_52)) { + x_53 = lean_alloc_ctor(1, 2, 0); +} else { + x_53 = x_52; +} +lean_ctor_set(x_53, 0, x_50); +lean_ctor_set(x_53, 1, x_51); +return x_53; +} +} +else +{ +lean_object* x_54; +lean_dec(x_35); +lean_dec(x_3); +x_54 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_54, 0, x_33); +lean_ctor_set(x_54, 1, x_32); +return x_54; +} +} +} +else +{ +uint8_t x_55; +lean_dec(x_3); +lean_dec(x_2); +x_55 = !lean_is_exclusive(x_5); +if (x_55 == 0) +{ +return x_5; +} +else +{ +lean_object* x_56; lean_object* x_57; lean_object* x_58; +x_56 = lean_ctor_get(x_5, 0); +x_57 = lean_ctor_get(x_5, 1); +lean_inc(x_57); +lean_inc(x_56); +lean_dec(x_5); +x_58 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_58, 0, x_56); +lean_ctor_set(x_58, 1, x_57); +return x_58; +} +} +} +} +lean_object* l_Lean_Elab_Command_mkDeclName___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { +_start: +{ +lean_object* x_5; +x_5 = l_Lean_Elab_Command_mkDeclName(x_1, x_2, x_3, x_4); +lean_dec(x_1); +return x_5; +} +} +lean_object* l_Array_forMAux___main___at_Lean_Elab_Command_applyAttributes___spec__1(lean_object* x_1, lean_object* x_2, uint8_t x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7) { +_start: +{ +lean_object* x_8; uint8_t x_9; +x_8 = lean_array_get_size(x_4); +x_9 = lean_nat_dec_lt(x_5, x_8); +lean_dec(x_8); +if (x_9 == 0) +{ +lean_object* x_10; lean_object* x_11; +lean_dec(x_6); +lean_dec(x_5); +lean_dec(x_2); +x_10 = lean_box(0); +x_11 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_11, 0, x_10); +lean_ctor_set(x_11, 1, x_7); +return x_11; +} +else +{ +lean_object* x_12; lean_object* x_13; lean_object* x_14; +x_12 = lean_array_fget(x_4, x_5); +x_13 = lean_ctor_get(x_12, 0); +lean_inc(x_13); +x_14 = l_Lean_getAttributeImpl(x_13, x_7); +if (lean_obj_tag(x_14) == 0) +{ +lean_object* x_15; lean_object* x_16; uint8_t x_17; uint8_t x_18; +x_15 = lean_ctor_get(x_14, 0); +lean_inc(x_15); +x_16 = lean_ctor_get(x_14, 1); +lean_inc(x_16); +lean_dec(x_14); +x_17 = lean_ctor_get_uint8(x_15, sizeof(void*)*8); +x_18 = l_Lean_AttributeApplicationTime_beq(x_17, x_3); +if (x_18 == 0) +{ +lean_object* x_19; lean_object* x_20; +lean_dec(x_15); +lean_dec(x_12); +x_19 = lean_unsigned_to_nat(1u); +x_20 = lean_nat_add(x_5, x_19); +lean_dec(x_5); +x_5 = x_20; +x_7 = x_16; +goto _start; +} +else +{ +lean_object* x_22; +lean_inc(x_6); +x_22 = l_Lean_Elab_Command_getEnv(x_6, x_16); +if (lean_obj_tag(x_22) == 0) +{ +lean_object* x_23; lean_object* x_24; lean_object* x_25; lean_object* x_26; uint8_t x_27; lean_object* x_28; lean_object* x_29; +x_23 = lean_ctor_get(x_22, 0); +lean_inc(x_23); +x_24 = lean_ctor_get(x_22, 1); +lean_inc(x_24); +lean_dec(x_22); +x_25 = lean_ctor_get(x_15, 2); +lean_inc(x_25); +lean_dec(x_15); +x_26 = lean_ctor_get(x_12, 1); +lean_inc(x_26); +lean_dec(x_12); +x_27 = 1; +x_28 = lean_box(x_27); +lean_inc(x_2); +x_29 = lean_apply_5(x_25, x_23, x_2, x_26, x_28, x_24); +if (lean_obj_tag(x_29) == 0) +{ +lean_object* x_30; lean_object* x_31; lean_object* x_32; +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); +lean_inc(x_6); +x_32 = l_Lean_Elab_Command_setEnv(x_30, x_6, x_31); +if (lean_obj_tag(x_32) == 0) +{ +lean_object* x_33; lean_object* x_34; lean_object* x_35; +x_33 = lean_ctor_get(x_32, 1); +lean_inc(x_33); +lean_dec(x_32); +x_34 = lean_unsigned_to_nat(1u); +x_35 = lean_nat_add(x_5, x_34); +lean_dec(x_5); +x_5 = x_35; +x_7 = x_33; +goto _start; +} +else +{ +uint8_t x_37; +lean_dec(x_6); +lean_dec(x_5); +lean_dec(x_2); +x_37 = !lean_is_exclusive(x_32); +if (x_37 == 0) +{ +return x_32; +} +else +{ +lean_object* x_38; lean_object* x_39; lean_object* x_40; +x_38 = lean_ctor_get(x_32, 0); +x_39 = lean_ctor_get(x_32, 1); +lean_inc(x_39); +lean_inc(x_38); +lean_dec(x_32); +x_40 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_40, 0, x_38); +lean_ctor_set(x_40, 1, x_39); +return x_40; +} +} +} +else +{ +uint8_t x_41; +lean_dec(x_5); +lean_dec(x_2); +x_41 = !lean_is_exclusive(x_29); +if (x_41 == 0) +{ +lean_object* x_42; lean_object* x_43; +x_42 = lean_ctor_get(x_29, 0); +x_43 = l___private_Init_Lean_Elab_Command_1__ioErrorToMessage(x_6, x_1, x_42); +lean_ctor_set(x_29, 0, x_43); +return x_29; +} +else +{ +lean_object* x_44; lean_object* x_45; lean_object* x_46; lean_object* x_47; +x_44 = lean_ctor_get(x_29, 0); +x_45 = lean_ctor_get(x_29, 1); +lean_inc(x_45); +lean_inc(x_44); +lean_dec(x_29); +x_46 = l___private_Init_Lean_Elab_Command_1__ioErrorToMessage(x_6, x_1, x_44); +x_47 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_47, 0, x_46); +lean_ctor_set(x_47, 1, x_45); +return x_47; +} +} +} +else +{ +uint8_t x_48; +lean_dec(x_15); +lean_dec(x_12); +lean_dec(x_6); +lean_dec(x_5); +lean_dec(x_2); +x_48 = !lean_is_exclusive(x_22); +if (x_48 == 0) +{ +return x_22; +} +else +{ +lean_object* x_49; lean_object* x_50; lean_object* x_51; +x_49 = lean_ctor_get(x_22, 0); +x_50 = lean_ctor_get(x_22, 1); +lean_inc(x_50); +lean_inc(x_49); +lean_dec(x_22); +x_51 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_51, 0, x_49); +lean_ctor_set(x_51, 1, x_50); +return x_51; +} +} +} +} +else +{ +uint8_t x_52; +lean_dec(x_12); +lean_dec(x_5); +lean_dec(x_2); +x_52 = !lean_is_exclusive(x_14); +if (x_52 == 0) +{ +lean_object* x_53; lean_object* x_54; +x_53 = lean_ctor_get(x_14, 0); +x_54 = l___private_Init_Lean_Elab_Command_1__ioErrorToMessage(x_6, x_1, x_53); +lean_ctor_set(x_14, 0, x_54); +return x_14; +} +else +{ +lean_object* x_55; lean_object* x_56; lean_object* x_57; lean_object* x_58; +x_55 = lean_ctor_get(x_14, 0); +x_56 = lean_ctor_get(x_14, 1); +lean_inc(x_56); +lean_inc(x_55); +lean_dec(x_14); +x_57 = l___private_Init_Lean_Elab_Command_1__ioErrorToMessage(x_6, x_1, x_55); +x_58 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_58, 0, x_57); +lean_ctor_set(x_58, 1, x_56); +return x_58; +} +} +} +} +} +lean_object* l_Lean_Elab_Command_applyAttributes(lean_object* x_1, lean_object* x_2, lean_object* x_3, uint8_t x_4, lean_object* x_5, lean_object* x_6) { +_start: +{ +lean_object* x_7; lean_object* x_8; +x_7 = lean_unsigned_to_nat(0u); +x_8 = l_Array_forMAux___main___at_Lean_Elab_Command_applyAttributes___spec__1(x_1, x_2, x_4, x_3, x_7, x_5, x_6); +return x_8; +} +} +lean_object* l_Array_forMAux___main___at_Lean_Elab_Command_applyAttributes___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: +{ +uint8_t x_8; lean_object* x_9; +x_8 = lean_unbox(x_3); +lean_dec(x_3); +x_9 = l_Array_forMAux___main___at_Lean_Elab_Command_applyAttributes___spec__1(x_1, x_2, x_8, x_4, x_5, x_6, x_7); +lean_dec(x_4); +lean_dec(x_1); +return x_9; +} +} +lean_object* l_Lean_Elab_Command_applyAttributes___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6) { +_start: +{ +uint8_t x_7; lean_object* x_8; +x_7 = lean_unbox(x_4); +lean_dec(x_4); +x_8 = l_Lean_Elab_Command_applyAttributes(x_1, x_2, x_3, x_7, x_5, x_6); +lean_dec(x_3); +lean_dec(x_1); +return x_8; +} +} +lean_object* initialize_Init_Lean_Elab_Command(lean_object*); +static bool _G_initialized = false; +lean_object* initialize_Init_Lean_Elab_DeclModifiers(lean_object* w) { +lean_object * res; +if (_G_initialized) return lean_mk_io_result(lean_box(0)); +_G_initialized = true; +res = initialize_Init_Lean_Elab_Command(lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +l_Lean_Elab_Command_Attribute_hasFormat___closed__1 = _init_l_Lean_Elab_Command_Attribute_hasFormat___closed__1(); +lean_mark_persistent(l_Lean_Elab_Command_Attribute_hasFormat___closed__1); +l_Lean_Elab_Command_Attribute_hasFormat___closed__2 = _init_l_Lean_Elab_Command_Attribute_hasFormat___closed__2(); +lean_mark_persistent(l_Lean_Elab_Command_Attribute_hasFormat___closed__2); +l_Lean_Elab_Command_Visibility_hasToString___closed__1 = _init_l_Lean_Elab_Command_Visibility_hasToString___closed__1(); +lean_mark_persistent(l_Lean_Elab_Command_Visibility_hasToString___closed__1); +l_Lean_Elab_Command_Modifiers_hasFormat___closed__1 = _init_l_Lean_Elab_Command_Modifiers_hasFormat___closed__1(); +lean_mark_persistent(l_Lean_Elab_Command_Modifiers_hasFormat___closed__1); +l_Lean_Elab_Command_Modifiers_hasFormat___closed__2 = _init_l_Lean_Elab_Command_Modifiers_hasFormat___closed__2(); +lean_mark_persistent(l_Lean_Elab_Command_Modifiers_hasFormat___closed__2); +l_Lean_Elab_Command_Modifiers_hasFormat___closed__3 = _init_l_Lean_Elab_Command_Modifiers_hasFormat___closed__3(); +lean_mark_persistent(l_Lean_Elab_Command_Modifiers_hasFormat___closed__3); +l_Lean_Elab_Command_Modifiers_hasFormat___closed__4 = _init_l_Lean_Elab_Command_Modifiers_hasFormat___closed__4(); +lean_mark_persistent(l_Lean_Elab_Command_Modifiers_hasFormat___closed__4); +l_Lean_Elab_Command_Modifiers_hasFormat___closed__5 = _init_l_Lean_Elab_Command_Modifiers_hasFormat___closed__5(); +lean_mark_persistent(l_Lean_Elab_Command_Modifiers_hasFormat___closed__5); +l_Lean_Elab_Command_Modifiers_hasFormat___closed__6 = _init_l_Lean_Elab_Command_Modifiers_hasFormat___closed__6(); +lean_mark_persistent(l_Lean_Elab_Command_Modifiers_hasFormat___closed__6); +l_Lean_Elab_Command_Modifiers_hasFormat___closed__7 = _init_l_Lean_Elab_Command_Modifiers_hasFormat___closed__7(); +lean_mark_persistent(l_Lean_Elab_Command_Modifiers_hasFormat___closed__7); +l_Lean_Elab_Command_Modifiers_hasFormat___closed__8 = _init_l_Lean_Elab_Command_Modifiers_hasFormat___closed__8(); +lean_mark_persistent(l_Lean_Elab_Command_Modifiers_hasFormat___closed__8); +l_Lean_Elab_Command_Modifiers_hasFormat___closed__9 = _init_l_Lean_Elab_Command_Modifiers_hasFormat___closed__9(); +lean_mark_persistent(l_Lean_Elab_Command_Modifiers_hasFormat___closed__9); +l_Lean_Elab_Command_Modifiers_hasFormat___closed__10 = _init_l_Lean_Elab_Command_Modifiers_hasFormat___closed__10(); +lean_mark_persistent(l_Lean_Elab_Command_Modifiers_hasFormat___closed__10); +l_Lean_Elab_Command_Modifiers_hasFormat___closed__11 = _init_l_Lean_Elab_Command_Modifiers_hasFormat___closed__11(); +lean_mark_persistent(l_Lean_Elab_Command_Modifiers_hasFormat___closed__11); +l_Lean_Elab_Command_Modifiers_hasFormat___closed__12 = _init_l_Lean_Elab_Command_Modifiers_hasFormat___closed__12(); +lean_mark_persistent(l_Lean_Elab_Command_Modifiers_hasFormat___closed__12); +l_Lean_Elab_Command_Modifiers_hasFormat___closed__13 = _init_l_Lean_Elab_Command_Modifiers_hasFormat___closed__13(); +lean_mark_persistent(l_Lean_Elab_Command_Modifiers_hasFormat___closed__13); +l_Lean_Elab_Command_Modifiers_hasFormat___closed__14 = _init_l_Lean_Elab_Command_Modifiers_hasFormat___closed__14(); +lean_mark_persistent(l_Lean_Elab_Command_Modifiers_hasFormat___closed__14); +l_Lean_Elab_Command_Modifiers_hasFormat___closed__15 = _init_l_Lean_Elab_Command_Modifiers_hasFormat___closed__15(); +lean_mark_persistent(l_Lean_Elab_Command_Modifiers_hasFormat___closed__15); +l_Lean_Elab_Command_Modifiers_hasFormat___closed__16 = _init_l_Lean_Elab_Command_Modifiers_hasFormat___closed__16(); +lean_mark_persistent(l_Lean_Elab_Command_Modifiers_hasFormat___closed__16); +l_Lean_Elab_Command_Modifiers_hasToString___closed__1 = _init_l_Lean_Elab_Command_Modifiers_hasToString___closed__1(); +lean_mark_persistent(l_Lean_Elab_Command_Modifiers_hasToString___closed__1); +l_Lean_Elab_Command_Modifiers_hasToString___closed__2 = _init_l_Lean_Elab_Command_Modifiers_hasToString___closed__2(); +lean_mark_persistent(l_Lean_Elab_Command_Modifiers_hasToString___closed__2); +l_Lean_Elab_Command_Modifiers_hasToString = _init_l_Lean_Elab_Command_Modifiers_hasToString(); +lean_mark_persistent(l_Lean_Elab_Command_Modifiers_hasToString); +l_Lean_Elab_Command_elabAttr___closed__1 = _init_l_Lean_Elab_Command_elabAttr___closed__1(); +lean_mark_persistent(l_Lean_Elab_Command_elabAttr___closed__1); +l_Lean_Elab_Command_elabAttr___closed__2 = _init_l_Lean_Elab_Command_elabAttr___closed__2(); +lean_mark_persistent(l_Lean_Elab_Command_elabAttr___closed__2); +l_Lean_Elab_Command_elabAttr___closed__3 = _init_l_Lean_Elab_Command_elabAttr___closed__3(); +lean_mark_persistent(l_Lean_Elab_Command_elabAttr___closed__3); +l_Lean_Elab_Command_elabAttr___closed__4 = _init_l_Lean_Elab_Command_elabAttr___closed__4(); +lean_mark_persistent(l_Lean_Elab_Command_elabAttr___closed__4); +l_Lean_Elab_Command_elabAttr___closed__5 = _init_l_Lean_Elab_Command_elabAttr___closed__5(); +lean_mark_persistent(l_Lean_Elab_Command_elabAttr___closed__5); +l_Lean_Elab_Command_elabAttr___closed__6 = _init_l_Lean_Elab_Command_elabAttr___closed__6(); +lean_mark_persistent(l_Lean_Elab_Command_elabAttr___closed__6); +l_Lean_Elab_Command_elabModifiers___closed__1 = _init_l_Lean_Elab_Command_elabModifiers___closed__1(); +lean_mark_persistent(l_Lean_Elab_Command_elabModifiers___closed__1); +l_Lean_Elab_Command_elabModifiers___closed__2 = _init_l_Lean_Elab_Command_elabModifiers___closed__2(); +lean_mark_persistent(l_Lean_Elab_Command_elabModifiers___closed__2); +l_Lean_Elab_Command_elabModifiers___closed__3 = _init_l_Lean_Elab_Command_elabModifiers___closed__3(); +lean_mark_persistent(l_Lean_Elab_Command_elabModifiers___closed__3); +l_Lean_Elab_Command_elabModifiers___closed__4 = _init_l_Lean_Elab_Command_elabModifiers___closed__4(); +lean_mark_persistent(l_Lean_Elab_Command_elabModifiers___closed__4); +l_Lean_Elab_Command_elabModifiers___closed__5 = _init_l_Lean_Elab_Command_elabModifiers___closed__5(); +lean_mark_persistent(l_Lean_Elab_Command_elabModifiers___closed__5); +l_Lean_Elab_Command_elabModifiers___closed__6 = _init_l_Lean_Elab_Command_elabModifiers___closed__6(); +lean_mark_persistent(l_Lean_Elab_Command_elabModifiers___closed__6); +l_Lean_Elab_Command_elabModifiers___closed__7 = _init_l_Lean_Elab_Command_elabModifiers___closed__7(); +lean_mark_persistent(l_Lean_Elab_Command_elabModifiers___closed__7); +return lean_mk_io_result(lean_box(0)); +} +#ifdef __cplusplus +} +#endif diff --git a/stage0/stdlib/Init/Lean/Elab/Declaration.c b/stage0/stdlib/Init/Lean/Elab/Declaration.c index 8e023072fe..2923771c00 100644 --- a/stage0/stdlib/Init/Lean/Elab/Declaration.c +++ b/stage0/stdlib/Init/Lean/Elab/Declaration.c @@ -1,6 +1,6 @@ // Lean compiler output // Module: Init.Lean.Elab.Declaration -// Imports: Init.Lean.Elab.Command +// Imports: Init.Lean.Util.CollectLevelParams Init.Lean.Elab.Definition #include "runtime/lean.h" #if defined(__clang__) #pragma clang diagnostic ignored "-Wunused-parameter" @@ -14,1094 +14,567 @@ extern "C" { #endif lean_object* l_Lean_Elab_Command_elabDeclaration(lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_Syntax_foldArgsAuxM___main___at_Lean_Elab_Command_elabAttrs___spec__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -extern lean_object* l_Lean_Name_toString___closed__1; -lean_object* l_Lean_Elab_throwError___at_Lean_Elab_Command_elabAttr___spec__2(lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_Syntax_isNatLitAux(lean_object*, lean_object*); -extern lean_object* l_Lean_List_format___rarg___closed__4; -lean_object* l_Array_umapMAux___main___at_Lean_Elab_Command_elabAttr___spec__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_Syntax_foldArgsAuxM___main___at_Lean_Elab_Command_elabAttrs___spec__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_Elab_Command_Modifiers_hasFormat___closed__6; +lean_object* l_Lean_Elab_Command_elabConstant___closed__9; +lean_object* l_Lean_Elab_Term_mkForall(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l___private_Init_Lean_Elab_Command_10__addScopes___main(lean_object*, lean_object*, uint8_t, lean_object*, lean_object*, lean_object*); +extern lean_object* l_Lean_Parser_Command_abbrev___elambda__1___closed__2; +lean_object* l_Lean_Elab_Command_addDecl(lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Elab_Term_instantiateMVars(lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Elab_Command_elabAxiom___lambda__2___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Elab_Command_elabConstant___closed__4; +lean_object* l_unreachable_x21___rarg(lean_object*); +lean_object* l_Array_iterateMAux___main___at_Lean_Elab_Command_elabAxiom___spec__5(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___regBuiltinCommandElab_Lean_Elab_Command_elabDeclaration(lean_object*); lean_object* l_Lean_Syntax_getOptional_x3f(lean_object*); lean_object* l_Lean_Elab_throwError___at_Lean_Elab_Command_elabCommand___spec__1(lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_Format_pretty(lean_object*, lean_object*); -lean_object* l_List_map___main___at_Lean_Elab_Command_Modifiers_hasFormat___spec__2(lean_object*); -lean_object* l_Lean_fmt___at_Lean_Elab_Command_Modifiers_hasFormat___spec__1(lean_object*); -lean_object* l_Lean_Elab_Command_Modifiers_hasFormat___closed__8; +extern lean_object* l_Lean_Meta_mkEqTrans___closed__3; +lean_object* l_Lean_Elab_Command_elabConstant___closed__2; +lean_object* l_Lean_Elab_Command_elabDeclaration___closed__4; +lean_object* l_Lean_Syntax_getIdAt(lean_object*, lean_object*); +lean_object* l_Lean_Elab_Command_elabExample(lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Elab_Command_elabAbbrev(lean_object*, lean_object*, lean_object*, lean_object*); +extern lean_object* l_Lean_Elab_Command_runTermElabM___rarg___closed__1; +lean_object* l_Lean_Elab_Command_elabExample___closed__1; +lean_object* l_Lean_Elab_Command_elabConstant___closed__1; extern lean_object* l_Lean_stxInh; extern lean_object* l_Array_empty___closed__1; -lean_object* l_Lean_Elab_Command_Modifiers_hasFormat___boxed(lean_object*); -lean_object* l_Lean_Elab_Command_elabModifiers___closed__6; -extern lean_object* l_Lean_Format_flatten___main___closed__1; -lean_object* l_Lean_Elab_Command_Modifiers_hasFormat___closed__2; -lean_object* l_List_append___rarg(lean_object*, lean_object*); +lean_object* l_Array_iterateMAux___main___at_Lean_Elab_Command_elabAxiom___spec__5___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Elab_Command_expandDeclSig(lean_object*); +lean_object* l_Lean_Elab_Command_elabExample___closed__2; uint8_t lean_name_eq(lean_object*, lean_object*); extern lean_object* l_Lean_Parser_Command_declaration___elambda__1___closed__2; -extern lean_object* l_Lean_MessageData_arrayExpr_toMessageData___main___closed__1; -lean_object* l_Lean_Elab_Command_Modifiers_hasFormat___closed__1; -lean_object* l_Lean_Format_joinSep___main___at___private_Init_Lean_Data_Trie_6__toStringAux___main___spec__1(lean_object*, lean_object*); -lean_object* l_Lean_Elab_Command_elabAttrArg___closed__2; -lean_object* l_Lean_Elab_Command_Modifiers_hasFormat___closed__3; +lean_object* l_Lean_mkIdentFrom(lean_object*, lean_object*); +lean_object* l___private_Init_Lean_Elab_Command_7__getVarDecls(lean_object*); lean_object* lean_array_push(lean_object*, lean_object*); lean_object* lean_array_get_size(lean_object*); -lean_object* l_Lean_Elab_Command_Modifiers_hasFormat___closed__15; +lean_object* l_Lean_Elab_Term_mkForallUsedOnly(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___regBuiltinCommandElab_Lean_Elab_Command_elabDeclaration___closed__2; -lean_object* lean_string_utf8_extract(lean_object*, lean_object*, lean_object*); lean_object* lean_string_utf8_byte_size(lean_object*); -lean_object* l_Lean_Elab_Command_elabAttrArg___closed__3; -lean_object* l_Lean_Elab_Command_Modifiers_hasFormat(lean_object*); +extern lean_object* l_Lean_Parser_Command_example___elambda__1___closed__2; +lean_object* l_Lean_Elab_Command_elabAxiom___boxed(lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Name_getNumParts___main(lean_object*); +lean_object* l_Lean_Elab_Command_elabInductive___rarg(lean_object*); lean_object* lean_nat_add(lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_addBuiltinCommandElab(lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_Elab_Command_Modifiers_hasFormat___closed__11; -lean_object* l_Lean_Elab_throwError___at_Lean_Elab_Command_elabAttrArg___spec__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*); +extern lean_object* l_Lean_Parser_Command_classInductive___elambda__1___closed__2; +lean_object* l_Lean_Elab_Command_mkDeclName(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___regBuiltinCommandElab_Lean_Elab_Command_elabDeclaration___closed__1; -lean_object* l_Lean_Elab_Command_Modifiers_hasFormat___closed__4; +lean_object* l_Lean_Elab_Command_expandOptDeclSig___boxed(lean_object*); lean_object* l_Lean_Elab_mkMessage___at_Lean_Elab_Command_elabCommand___spec__2(lean_object*, uint8_t, lean_object*, lean_object*, lean_object*); lean_object* lean_array_fget(lean_object*, lean_object*); -lean_object* l_Lean_Elab_Command_Visibility_hasToString(uint8_t); -lean_object* l_Lean_Elab_Command_Modifiers_hasToString; -extern lean_object* l_Lean_numLitKind; -lean_object* lean_nat_sub(lean_object*, lean_object*); -lean_object* l_Lean_Elab_Command_Modifiers_hasToString___lambda__1___boxed(lean_object*); -lean_object* l_Lean_Elab_throwError___at_Lean_Elab_Command_elabModifiers___spec__2(lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_Syntax_isStrLit_x3f(lean_object*); -lean_object* l_Lean_Elab_Command_AttributeArg_hasToString(lean_object*); +extern lean_object* l_Lean_Name_appendIndexAfter___closed__1; +lean_object* l_Lean_Elab_Term_levelMVarToParam(lean_object*, lean_object*, lean_object*); +extern lean_object* l_Lean_Parser_Term_id___elambda__1___closed__2; +lean_object* l_Lean_Elab_Command_elabStructure___rarg(lean_object*); +lean_object* l_Lean_Elab_Command_elabAxiom(lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Elab_Command_elabInstance___closed__1; +extern lean_object* l_Lean_Parser_Command_def___elambda__1___closed__2; +extern lean_object* l_Lean_Meta_registerInstanceAttr___closed__1; lean_object* lean_array_get(lean_object*, lean_object*, lean_object*); -lean_object* lean_array_fset(lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_Elab_Command_elabModifiers___closed__4; -lean_object* l_Lean_Elab_Command_Modifiers_hasFormat___closed__9; +lean_object* l_Lean_Elab_Command_elabConstant(lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Elab_Command_elabAxiom___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Elab_Command_expandOptDeclSig(lean_object*); lean_object* l___regBuiltinCommandElab_Lean_Elab_Command_elabDeclaration___closed__3; -lean_object* l_Lean_Elab_throwError___at_Lean_Elab_Command_elabModifiers___spec__1(lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_Nat_repr(lean_object*); -lean_object* l_Lean_Elab_Command_Modifiers_hasFormat___closed__13; -lean_object* l___private_Init_Lean_Elab_Command_1__ioErrorToMessage(lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_Elab_throwError___at_Lean_Elab_Command_elabAttr___spec__2___boxed(lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_Elab_Command_Visibility_hasToString___boxed(lean_object*); +extern lean_object* l_Lean_Meta_registerInstanceAttr___closed__2; +lean_object* l_Lean_Syntax_getId(lean_object*); +lean_object* l_Lean_Elab_Command_elabClassInductive(lean_object*, lean_object*, lean_object*); lean_object* lean_name_mk_string(lean_object*, lean_object*); -lean_object* l_Array_umapMAux___main___at_Lean_Elab_Command_elabAttr___spec__1(lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_Elab_Command_Modifiers_hasToString___lambda__1(lean_object*); -lean_object* l_Lean_Elab_throwError___at_Lean_Elab_Command_elabModifiers___spec__2___boxed(lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_Function_comp___rarg(lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Elab_Command_modifyScope___at_Lean_Elab_Command_elabAxiom___spec__4(lean_object*, lean_object*, lean_object*); +extern lean_object* l_Lean_Parser_Command_namespace___elambda__1___closed__1; extern lean_object* l_Lean_Parser_Command_docComment___elambda__1___closed__2; -extern lean_object* l_Lean_Options_empty; -lean_object* l_Lean_Elab_throwError___at_Lean_Elab_Command_elabAttrArg___spec__1(lean_object*, lean_object*, lean_object*, lean_object*); -extern lean_object* l_Lean_Parser_Command_attributes___elambda__1___closed__5; -lean_object* l_Lean_Elab_Command_elabModifiers___closed__1; -lean_object* l_Lean_Format_prefixJoin___main___at_Lean_Elab_Command_Attribute_hasFormat___spec__1(lean_object*, lean_object*); -lean_object* l_Lean_Elab_Command_elabAttr___closed__4; -lean_object* l_Lean_Elab_Command_elabModifiers___closed__2; -lean_object* l_Lean_Elab_Command_elabAttr___closed__6; -lean_object* l_Lean_Elab_Command_elabAttrs(lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_Elab_Command_elabAttr___closed__1; -lean_object* l_Lean_Elab_Command_elabAttrArg(lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_Elab_Command_elabAttr___boxed(lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_Elab_Command_Modifiers_hasToString___closed__2; -lean_object* l_Lean_Elab_Command_Modifiers_hasFormat___closed__12; -lean_object* l_Lean_Elab_Command_Attribute_hasFormat___closed__1; -extern lean_object* l_Lean_Format_sbracket___closed__3; -lean_object* l_Lean_Elab_Command_Modifiers_hasFormat___closed__10; -lean_object* l_Lean_Syntax_isIdOrAtom_x3f(lean_object*); -lean_object* l_Lean_Elab_Command_elabModifiers___boxed(lean_object*, lean_object*, lean_object*); -extern lean_object* l_Lean_HasRepr___closed__1; -lean_object* l_Lean_Elab_Command_Visibility_hasToString___closed__1; -extern lean_object* l_Lean_Parser_Command_noncomputable___elambda__1___closed__1; -lean_object* lean_is_attribute(lean_object*, lean_object*); -extern lean_object* l_PersistentArray_Stats_toString___closed__4; -lean_object* l_Lean_Elab_Command_elabAttr___closed__3; -lean_object* l_Lean_Elab_Command_elabAttr___closed__2; -lean_object* l_Lean_Elab_Command_Modifiers_hasToString___closed__1; -extern lean_object* l_Lean_Parser_Command_private___elambda__1___closed__1; -lean_object* l_String_quote(lean_object*); +lean_object* l_Lean_Elab_Command_elabConstant___closed__7; +lean_object* l_Lean_Elab_Command_modifyScope___at_Lean_Elab_Command_elabAxiom___spec__3(lean_object*, lean_object*, lean_object*); +extern lean_object* l_Lean_Parser_Term_hole___elambda__1___closed__1; +lean_object* l_Lean_Elab_Command_elabTheorem(lean_object*, lean_object*, lean_object*, lean_object*); +extern lean_object* l_Lean_Elab_Command_modifyScope___closed__1; +uint8_t l_List_elem___main___at_Lean_Parser_addLeadingParser___spec__4(lean_object*, lean_object*); +lean_object* l_Lean_Elab_Command_elabDef(lean_object*, lean_object*, lean_object*, lean_object*); +extern lean_object* l_Lean_Elab_Command_withDeclId___closed__3; +lean_object* l_Lean_Elab_Command_elabAxiom___lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Elab_Command_sortDeclLevelParams(lean_object*, lean_object*); +extern lean_object* l___private_Init_Lean_Elab_Term_16__synthesizeSyntheticMVar___closed__3; +lean_object* l_Lean_Elab_Command_elabClassInductive___boxed(lean_object*, lean_object*, lean_object*); +extern lean_object* l_Lean_mkReducibilityAttrs___closed__4; +lean_object* l___private_Init_Lean_Elab_Command_2__getState(lean_object*, lean_object*); +lean_object* l_List_drop___main___rarg(lean_object*, lean_object*); +lean_object* l_Lean_Elab_Command_elabAbbrev___closed__3; +lean_object* l_Lean_Elab_Command_elabStructure___boxed(lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Elab_Command_elabInstance(lean_object*, lean_object*, lean_object*, lean_object*); +extern lean_object* l_Lean_Parser_Command_axiom___elambda__1___closed__2; +lean_object* l_Lean_Elab_Command_getCurrMacroScope(lean_object*, lean_object*); +extern lean_object* l_Lean_Syntax_asNode___closed__1; lean_object* l_Lean_Syntax_getArgs(lean_object*); lean_object* l_Lean_Syntax_getKind(lean_object*); -lean_object* lean_format_group(lean_object*); -lean_object* l_Lean_Elab_Command_Attribute_hasFormat___closed__2; -lean_object* l_Lean_Elab_Command_elabAttr___closed__5; -lean_object* l_Lean_Elab_Command_elabAttrArg___closed__1; +lean_object* l_Lean_Elab_Command_elabInductive___boxed(lean_object*, lean_object*, lean_object*); +extern lean_object* l_Lean_Parser_Term_app___elambda__1___closed__2; +lean_object* l_Lean_Elab_Command_elabAbbrev___closed__2; +lean_object* l_Lean_Elab_Command_elabStructure(lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Elab_Command_Modifiers_addAttribute(lean_object*, lean_object*); +lean_object* l_Lean_Elab_Term_elabType(lean_object*, lean_object*, lean_object*); +extern lean_object* l_Lean_Parser_Command_structure___elambda__1___closed__2; extern lean_object* l_Lean_Elab_Command_declareBuiltinCommandElab___closed__3; -lean_object* l_Lean_Elab_Command_elabAttrArg___boxed(lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Elab_Command_elabConstant___closed__6; +extern lean_object* l_Lean_Parser_Command_inductive___elambda__1___closed__2; uint8_t l_Lean_Syntax_isNone(lean_object*); -lean_object* l_Lean_Elab_Command_Modifiers_hasFormat___closed__7; -lean_object* l_Lean_Elab_Command_elabAttrs___boxed(lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_Elab_Command_Modifiers_hasFormat___closed__16; +lean_object* l_Array_forMAux___main___at_Lean_Elab_Command_applyAttributes___spec__1(lean_object*, lean_object*, uint8_t, lean_object*, lean_object*, lean_object*, lean_object*); +extern lean_object* l_Lean_mkOptionalNode___closed__1; +lean_object* l_Lean_Elab_Command_getLevelNames(lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_elabModifiers(lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_Elab_Command_Modifiers_hasFormat___closed__14; -lean_object* l_Lean_Elab_Command_Modifiers_hasFormat___closed__5; -lean_object* l_Array_toList___rarg(lean_object*); -extern lean_object* l_Lean_Parser_Command_unsafe___elambda__1___closed__1; +lean_object* l_Lean_Elab_Command_throwAlreadyDeclaredUniverseLevel___rarg(lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Elab_Command_elabDefLike(lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Syntax_foldArgsAuxM___main___at_Lean_Syntax_foldSepRevArgsM___spec__1(lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Elab_Command_expandDeclSig___boxed(lean_object*); +lean_object* l_Lean_Elab_throwError___at_Lean_Elab_Command_elabInstance___spec__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_elabDeclaration___boxed(lean_object*, lean_object*, lean_object*); -lean_object* lean_string_length(lean_object*); -lean_object* l_Lean_Elab_Command_Attribute_hasFormat(lean_object*); -extern lean_object* l_Lean_Parser_Command_private___elambda__1___closed__2; +lean_object* l_Lean_Elab_Term_elabBinders___rarg(lean_object*, lean_object*, lean_object*, lean_object*); +extern lean_object* l___private_Init_Lean_Elab_Term_8__expandCDot___closed__5; lean_object* l_Lean_Syntax_getArg(lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_elabDeclaration___closed__2; -extern lean_object* l_Lean_Parser_Command_partial___elambda__1___closed__1; -lean_object* l_Lean_Syntax_formatStxAux___main(lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_Elab_Command_elabModifiers___closed__7; -lean_object* l_unsafeCast(lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_Name_toStringWithSep___main(lean_object*, lean_object*); -lean_object* l_Lean_Elab_Command_elabAttr(lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Elab_Command_elabAxiom___lambda__2(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Elab_Command_elabConstant___closed__5; +lean_object* l_Lean_Elab_Command_elabInductive(lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_collectLevelParams(lean_object*); lean_object* l_Lean_Elab_Command_elabDeclaration___closed__1; +lean_object* l___private_Init_Lean_Elab_Term_19__synthesizeSyntheticMVarsAux___main(uint8_t, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Command_elabDeclaration___closed__3; -lean_object* l_Lean_Elab_throwError___at_Lean_Elab_Command_elabModifiers___spec__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_Elab_Command_elabModifiers___closed__5; -extern lean_object* l_addParenHeuristic___closed__1; -extern lean_object* l_Lean_Parser_Command_docComment___elambda__1___closed__7; -lean_object* l_Lean_Elab_Command_elabModifiers___closed__3; +lean_object* l_Lean_Elab_Command_elabConstant___closed__3; +lean_object* l_Lean_Elab_Command_modifyScope___at_Lean_Elab_Command_elabAxiom___spec__2(lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Elab_Command_elabAbbrev___closed__1; +lean_object* l_Lean_Elab_Command_elabAbbrev___closed__4; +lean_object* l_Lean_Elab_Command_modifyScope___at_Lean_Elab_Command_elabAxiom___spec__1(lean_object*, lean_object*, lean_object*); +lean_object* lean_name_mk_numeral(lean_object*, lean_object*); +extern lean_object* l_Lean_Parser_Command_constant___elambda__1___closed__2; +lean_object* l___private_Init_Lean_Elab_Command_5__mkTermContext(lean_object*, lean_object*); +lean_object* l_Lean_Elab_Command_elabConstant___closed__8; +extern lean_object* l_Lean_Parser_Command_theorem___elambda__1___closed__2; +lean_object* l_Lean_Elab_Command_elabClassInductive___rarg(lean_object*); +lean_object* l___private_Init_Lean_Elab_Command_3__setState(lean_object*, lean_object*, lean_object*); +lean_object* l___private_Init_Lean_Elab_Command_6__mkTermState(lean_object*); +lean_object* l_Lean_Elab_throwError___at_Lean_Elab_Command_elabInstance___spec__1(lean_object*, lean_object*, lean_object*, lean_object*); uint8_t lean_nat_dec_lt(lean_object*, lean_object*); -extern lean_object* l_Lean_mkProtectedExtension___closed__1; -lean_object* l_Lean_Elab_Command_AttributeArg_hasToString(lean_object* x_1) { +extern lean_object* l_Lean_Parser_Command_declId___elambda__1___closed__2; +lean_object* l_Lean_Elab_Command_expandOptDeclSig(lean_object* x_1) { _start: { -switch (lean_obj_tag(x_1)) { -case 0: +lean_object* x_2; lean_object* x_3; lean_object* x_4; lean_object* x_5; uint8_t x_6; +x_2 = lean_unsigned_to_nat(0u); +x_3 = l_Lean_Syntax_getArg(x_1, x_2); +x_4 = lean_unsigned_to_nat(1u); +x_5 = l_Lean_Syntax_getArg(x_1, x_4); +x_6 = l_Lean_Syntax_isNone(x_5); +if (x_6 == 0) { -lean_object* x_2; lean_object* x_3; -x_2 = lean_ctor_get(x_1, 0); -lean_inc(x_2); -lean_dec(x_1); -x_3 = l_String_quote(x_2); -return x_3; -} -case 1: -{ -lean_object* x_4; lean_object* x_5; -x_4 = lean_ctor_get(x_1, 0); -lean_inc(x_4); -lean_dec(x_1); -x_5 = l_Nat_repr(x_4); -return x_5; -} -default: -{ -lean_object* x_6; lean_object* x_7; lean_object* x_8; -x_6 = lean_ctor_get(x_1, 0); -lean_inc(x_6); -lean_dec(x_1); -x_7 = l_Lean_Name_toString___closed__1; -x_8 = l_Lean_Name_toStringWithSep___main(x_7, x_6); -return x_8; -} -} -} -} -lean_object* l_Lean_Format_prefixJoin___main___at_Lean_Elab_Command_Attribute_hasFormat___spec__1(lean_object* x_1, lean_object* x_2) { -_start: -{ -if (lean_obj_tag(x_2) == 0) -{ -lean_object* x_3; -lean_dec(x_1); -x_3 = lean_box(0); -return x_3; -} -else -{ -lean_object* x_4; lean_object* x_5; lean_object* x_6; -x_4 = lean_ctor_get(x_2, 0); -lean_inc(x_4); -x_5 = lean_ctor_get(x_2, 1); -lean_inc(x_5); -lean_dec(x_2); -lean_inc(x_1); -x_6 = l_Lean_Format_prefixJoin___main___at_Lean_Elab_Command_Attribute_hasFormat___spec__1(x_1, x_5); -switch (lean_obj_tag(x_4)) { -case 0: -{ -lean_object* x_7; lean_object* x_8; lean_object* x_9; uint8_t x_10; lean_object* x_11; lean_object* x_12; -x_7 = lean_ctor_get(x_4, 0); -lean_inc(x_7); -lean_dec(x_4); -x_8 = l_String_quote(x_7); -x_9 = lean_alloc_ctor(2, 1, 0); +lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; +x_7 = l_Lean_Syntax_getArg(x_5, x_2); +lean_dec(x_5); +x_8 = l_Lean_Syntax_getArg(x_7, x_4); +lean_dec(x_7); +x_9 = lean_alloc_ctor(1, 1, 0); lean_ctor_set(x_9, 0, x_8); -x_10 = 0; -x_11 = lean_alloc_ctor(4, 2, 1); -lean_ctor_set(x_11, 0, x_1); -lean_ctor_set(x_11, 1, x_9); -lean_ctor_set_uint8(x_11, sizeof(void*)*2, x_10); -x_12 = lean_alloc_ctor(4, 2, 1); -lean_ctor_set(x_12, 0, x_11); -lean_ctor_set(x_12, 1, x_6); -lean_ctor_set_uint8(x_12, sizeof(void*)*2, x_10); -return x_12; -} -case 1: -{ -lean_object* x_13; lean_object* x_14; lean_object* x_15; uint8_t x_16; lean_object* x_17; lean_object* x_18; -x_13 = lean_ctor_get(x_4, 0); -lean_inc(x_13); -lean_dec(x_4); -x_14 = l_Nat_repr(x_13); -x_15 = lean_alloc_ctor(2, 1, 0); -lean_ctor_set(x_15, 0, x_14); -x_16 = 0; -x_17 = lean_alloc_ctor(4, 2, 1); -lean_ctor_set(x_17, 0, x_1); -lean_ctor_set(x_17, 1, x_15); -lean_ctor_set_uint8(x_17, sizeof(void*)*2, x_16); -x_18 = lean_alloc_ctor(4, 2, 1); -lean_ctor_set(x_18, 0, x_17); -lean_ctor_set(x_18, 1, x_6); -lean_ctor_set_uint8(x_18, sizeof(void*)*2, x_16); -return x_18; -} -default: -{ -lean_object* x_19; lean_object* x_20; lean_object* x_21; lean_object* x_22; uint8_t x_23; lean_object* x_24; lean_object* x_25; -x_19 = lean_ctor_get(x_4, 0); -lean_inc(x_19); -lean_dec(x_4); -x_20 = l_Lean_Name_toString___closed__1; -x_21 = l_Lean_Name_toStringWithSep___main(x_20, x_19); -x_22 = lean_alloc_ctor(2, 1, 0); -lean_ctor_set(x_22, 0, x_21); -x_23 = 0; -x_24 = lean_alloc_ctor(4, 2, 1); -lean_ctor_set(x_24, 0, x_1); -lean_ctor_set(x_24, 1, x_22); -lean_ctor_set_uint8(x_24, sizeof(void*)*2, x_23); -x_25 = lean_alloc_ctor(4, 2, 1); -lean_ctor_set(x_25, 0, x_24); -lean_ctor_set(x_25, 1, x_6); -lean_ctor_set_uint8(x_25, sizeof(void*)*2, x_23); -return x_25; -} -} -} -} -} -lean_object* _init_l_Lean_Elab_Command_Attribute_hasFormat___closed__1() { -_start: -{ -lean_object* x_1; lean_object* x_2; -x_1 = l_Lean_Parser_Command_attributes___elambda__1___closed__5; -x_2 = lean_string_length(x_1); -return x_2; -} -} -lean_object* _init_l_Lean_Elab_Command_Attribute_hasFormat___closed__2() { -_start: -{ -lean_object* x_1; lean_object* x_2; -x_1 = l_Lean_Parser_Command_attributes___elambda__1___closed__5; -x_2 = lean_alloc_ctor(2, 1, 0); -lean_ctor_set(x_2, 0, x_1); -return x_2; -} -} -lean_object* l_Lean_Elab_Command_Attribute_hasFormat(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; lean_object* x_9; uint8_t x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; -x_2 = lean_ctor_get(x_1, 0); -lean_inc(x_2); -x_3 = l_Lean_Name_toString___closed__1; -x_4 = l_Lean_Name_toStringWithSep___main(x_3, x_2); -x_5 = lean_alloc_ctor(2, 1, 0); -lean_ctor_set(x_5, 0, x_4); -x_6 = lean_ctor_get(x_1, 1); -lean_inc(x_6); -lean_dec(x_1); -x_7 = l_Array_toList___rarg(x_6); -lean_dec(x_6); -x_8 = l_Lean_Format_flatten___main___closed__1; -x_9 = l_Lean_Format_prefixJoin___main___at_Lean_Elab_Command_Attribute_hasFormat___spec__1(x_8, x_7); -x_10 = 0; -x_11 = lean_alloc_ctor(4, 2, 1); -lean_ctor_set(x_11, 0, x_5); -lean_ctor_set(x_11, 1, x_9); -lean_ctor_set_uint8(x_11, sizeof(void*)*2, x_10); -x_12 = l_Lean_Elab_Command_Attribute_hasFormat___closed__2; -x_13 = lean_alloc_ctor(4, 2, 1); -lean_ctor_set(x_13, 0, x_12); -lean_ctor_set(x_13, 1, x_11); -lean_ctor_set_uint8(x_13, sizeof(void*)*2, x_10); -x_14 = l_Lean_Format_sbracket___closed__3; -x_15 = lean_alloc_ctor(4, 2, 1); -lean_ctor_set(x_15, 0, x_13); -lean_ctor_set(x_15, 1, x_14); -lean_ctor_set_uint8(x_15, sizeof(void*)*2, x_10); -x_16 = l_Lean_Elab_Command_Attribute_hasFormat___closed__1; -x_17 = lean_alloc_ctor(3, 2, 0); -lean_ctor_set(x_17, 0, x_16); -lean_ctor_set(x_17, 1, x_15); -x_18 = lean_format_group(x_17); -return x_18; -} -} -lean_object* _init_l_Lean_Elab_Command_Visibility_hasToString___closed__1() { -_start: -{ -lean_object* x_1; -x_1 = lean_mk_string("regular"); -return x_1; -} -} -lean_object* l_Lean_Elab_Command_Visibility_hasToString(uint8_t x_1) { -_start: -{ -switch (x_1) { -case 0: -{ -lean_object* x_2; -x_2 = l_Lean_Elab_Command_Visibility_hasToString___closed__1; -return x_2; -} -case 1: -{ -lean_object* x_3; -x_3 = l_Lean_mkProtectedExtension___closed__1; -return x_3; -} -default: -{ -lean_object* x_4; -x_4 = l_Lean_Parser_Command_private___elambda__1___closed__1; -return x_4; -} -} -} -} -lean_object* l_Lean_Elab_Command_Visibility_hasToString___boxed(lean_object* x_1) { -_start: -{ -uint8_t x_2; lean_object* x_3; -x_2 = lean_unbox(x_1); -lean_dec(x_1); -x_3 = l_Lean_Elab_Command_Visibility_hasToString(x_2); -return x_3; -} -} -lean_object* l_Lean_fmt___at_Lean_Elab_Command_Modifiers_hasFormat___spec__1(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; lean_object* x_9; uint8_t x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; -x_2 = lean_ctor_get(x_1, 0); -lean_inc(x_2); -x_3 = l_Lean_Name_toString___closed__1; -x_4 = l_Lean_Name_toStringWithSep___main(x_3, x_2); -x_5 = lean_alloc_ctor(2, 1, 0); -lean_ctor_set(x_5, 0, x_4); -x_6 = lean_ctor_get(x_1, 1); -lean_inc(x_6); -lean_dec(x_1); -x_7 = l_Array_toList___rarg(x_6); -lean_dec(x_6); -x_8 = l_Lean_Format_flatten___main___closed__1; -x_9 = l_Lean_Format_prefixJoin___main___at_Lean_Elab_Command_Attribute_hasFormat___spec__1(x_8, x_7); -x_10 = 0; -x_11 = lean_alloc_ctor(4, 2, 1); -lean_ctor_set(x_11, 0, x_5); -lean_ctor_set(x_11, 1, x_9); -lean_ctor_set_uint8(x_11, sizeof(void*)*2, x_10); -x_12 = l_Lean_Elab_Command_Attribute_hasFormat___closed__2; -x_13 = lean_alloc_ctor(4, 2, 1); -lean_ctor_set(x_13, 0, x_12); -lean_ctor_set(x_13, 1, x_11); -lean_ctor_set_uint8(x_13, sizeof(void*)*2, x_10); -x_14 = l_Lean_Format_sbracket___closed__3; -x_15 = lean_alloc_ctor(4, 2, 1); -lean_ctor_set(x_15, 0, x_13); -lean_ctor_set(x_15, 1, x_14); -lean_ctor_set_uint8(x_15, sizeof(void*)*2, x_10); -x_16 = l_Lean_Elab_Command_Attribute_hasFormat___closed__1; -x_17 = lean_alloc_ctor(3, 2, 0); -lean_ctor_set(x_17, 0, x_16); -lean_ctor_set(x_17, 1, x_15); -x_18 = lean_format_group(x_17); -return x_18; -} -} -lean_object* l_List_map___main___at_Lean_Elab_Command_Modifiers_hasFormat___spec__2(lean_object* x_1) { -_start: -{ -if (lean_obj_tag(x_1) == 0) -{ -lean_object* x_2; -x_2 = lean_box(0); -return x_2; +x_10 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_10, 0, x_3); +lean_ctor_set(x_10, 1, x_9); +return x_10; } else { -uint8_t x_3; -x_3 = !lean_is_exclusive(x_1); -if (x_3 == 0) -{ -lean_object* x_4; lean_object* x_5; lean_object* x_6; lean_object* x_7; -x_4 = lean_ctor_get(x_1, 0); -x_5 = lean_ctor_get(x_1, 1); -x_6 = l_Lean_fmt___at_Lean_Elab_Command_Modifiers_hasFormat___spec__1(x_4); -x_7 = l_List_map___main___at_Lean_Elab_Command_Modifiers_hasFormat___spec__2(x_5); -lean_ctor_set(x_1, 1, x_7); -lean_ctor_set(x_1, 0, x_6); -return x_1; -} -else -{ -lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; -x_8 = lean_ctor_get(x_1, 0); -x_9 = lean_ctor_get(x_1, 1); -lean_inc(x_9); -lean_inc(x_8); -lean_dec(x_1); -x_10 = l_Lean_fmt___at_Lean_Elab_Command_Modifiers_hasFormat___spec__1(x_8); -x_11 = l_List_map___main___at_Lean_Elab_Command_Modifiers_hasFormat___spec__2(x_9); -x_12 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_12, 0, x_10); +lean_object* x_11; lean_object* x_12; +lean_dec(x_5); +x_11 = lean_box(0); +x_12 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_12, 0, x_3); lean_ctor_set(x_12, 1, x_11); return x_12; } } } -} -lean_object* _init_l_Lean_Elab_Command_Modifiers_hasFormat___closed__1() { -_start: -{ -lean_object* x_1; lean_object* x_2; -x_1 = l_addParenHeuristic___closed__1; -x_2 = lean_string_length(x_1); -return x_2; -} -} -lean_object* _init_l_Lean_Elab_Command_Modifiers_hasFormat___closed__2() { -_start: -{ -lean_object* x_1; lean_object* x_2; -x_1 = l_addParenHeuristic___closed__1; -x_2 = lean_alloc_ctor(2, 1, 0); -lean_ctor_set(x_2, 0, x_1); -return x_2; -} -} -lean_object* _init_l_Lean_Elab_Command_Modifiers_hasFormat___closed__3() { -_start: -{ -lean_object* x_1; lean_object* x_2; -x_1 = l_PersistentArray_Stats_toString___closed__4; -x_2 = lean_alloc_ctor(2, 1, 0); -lean_ctor_set(x_2, 0, x_1); -return x_2; -} -} -lean_object* _init_l_Lean_Elab_Command_Modifiers_hasFormat___closed__4() { -_start: -{ -lean_object* x_1; lean_object* x_2; -x_1 = l_Lean_Parser_Command_unsafe___elambda__1___closed__1; -x_2 = lean_alloc_ctor(2, 1, 0); -lean_ctor_set(x_2, 0, x_1); -return x_2; -} -} -lean_object* _init_l_Lean_Elab_Command_Modifiers_hasFormat___closed__5() { -_start: -{ -lean_object* x_1; lean_object* x_2; lean_object* x_3; -x_1 = lean_box(0); -x_2 = l_Lean_Elab_Command_Modifiers_hasFormat___closed__4; -x_3 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_3, 0, x_2); -lean_ctor_set(x_3, 1, x_1); -return x_3; -} -} -lean_object* _init_l_Lean_Elab_Command_Modifiers_hasFormat___closed__6() { -_start: -{ -lean_object* x_1; lean_object* x_2; -x_1 = l_Lean_Parser_Command_partial___elambda__1___closed__1; -x_2 = lean_alloc_ctor(2, 1, 0); -lean_ctor_set(x_2, 0, x_1); -return x_2; -} -} -lean_object* _init_l_Lean_Elab_Command_Modifiers_hasFormat___closed__7() { -_start: -{ -lean_object* x_1; lean_object* x_2; lean_object* x_3; -x_1 = lean_box(0); -x_2 = l_Lean_Elab_Command_Modifiers_hasFormat___closed__6; -x_3 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_3, 0, x_2); -lean_ctor_set(x_3, 1, x_1); -return x_3; -} -} -lean_object* _init_l_Lean_Elab_Command_Modifiers_hasFormat___closed__8() { -_start: -{ -lean_object* x_1; lean_object* x_2; -x_1 = l_Lean_Parser_Command_noncomputable___elambda__1___closed__1; -x_2 = lean_alloc_ctor(2, 1, 0); -lean_ctor_set(x_2, 0, x_1); -return x_2; -} -} -lean_object* _init_l_Lean_Elab_Command_Modifiers_hasFormat___closed__9() { -_start: -{ -lean_object* x_1; lean_object* x_2; lean_object* x_3; -x_1 = lean_box(0); -x_2 = l_Lean_Elab_Command_Modifiers_hasFormat___closed__8; -x_3 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_3, 0, x_2); -lean_ctor_set(x_3, 1, x_1); -return x_3; -} -} -lean_object* _init_l_Lean_Elab_Command_Modifiers_hasFormat___closed__10() { -_start: -{ -lean_object* x_1; lean_object* x_2; -x_1 = l_Lean_mkProtectedExtension___closed__1; -x_2 = lean_alloc_ctor(2, 1, 0); -lean_ctor_set(x_2, 0, x_1); -return x_2; -} -} -lean_object* _init_l_Lean_Elab_Command_Modifiers_hasFormat___closed__11() { -_start: -{ -lean_object* x_1; lean_object* x_2; lean_object* x_3; -x_1 = lean_box(0); -x_2 = l_Lean_Elab_Command_Modifiers_hasFormat___closed__10; -x_3 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_3, 0, x_2); -lean_ctor_set(x_3, 1, x_1); -return x_3; -} -} -lean_object* _init_l_Lean_Elab_Command_Modifiers_hasFormat___closed__12() { -_start: -{ -lean_object* x_1; lean_object* x_2; -x_1 = l_Lean_Parser_Command_private___elambda__1___closed__1; -x_2 = lean_alloc_ctor(2, 1, 0); -lean_ctor_set(x_2, 0, x_1); -return x_2; -} -} -lean_object* _init_l_Lean_Elab_Command_Modifiers_hasFormat___closed__13() { -_start: -{ -lean_object* x_1; lean_object* x_2; lean_object* x_3; -x_1 = lean_box(0); -x_2 = l_Lean_Elab_Command_Modifiers_hasFormat___closed__12; -x_3 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_3, 0, x_2); -lean_ctor_set(x_3, 1, x_1); -return x_3; -} -} -lean_object* _init_l_Lean_Elab_Command_Modifiers_hasFormat___closed__14() { -_start: -{ -lean_object* x_1; lean_object* x_2; -x_1 = l_Lean_Parser_Command_docComment___elambda__1___closed__7; -x_2 = lean_alloc_ctor(2, 1, 0); -lean_ctor_set(x_2, 0, x_1); -return x_2; -} -} -lean_object* _init_l_Lean_Elab_Command_Modifiers_hasFormat___closed__15() { -_start: -{ -lean_object* x_1; -x_1 = lean_mk_string("-/"); -return x_1; -} -} -lean_object* _init_l_Lean_Elab_Command_Modifiers_hasFormat___closed__16() { -_start: -{ -lean_object* x_1; lean_object* x_2; -x_1 = l_Lean_Elab_Command_Modifiers_hasFormat___closed__15; -x_2 = lean_alloc_ctor(2, 1, 0); -lean_ctor_set(x_2, 0, x_1); -return x_2; -} -} -lean_object* l_Lean_Elab_Command_Modifiers_hasFormat(lean_object* x_1) { -_start: -{ -lean_object* x_2; uint8_t x_3; uint8_t x_4; uint8_t x_5; uint8_t x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; -x_2 = lean_ctor_get(x_1, 0); -x_3 = lean_ctor_get_uint8(x_1, sizeof(void*)*2); -x_4 = lean_ctor_get_uint8(x_1, sizeof(void*)*2 + 1); -x_5 = lean_ctor_get_uint8(x_1, sizeof(void*)*2 + 2); -x_6 = lean_ctor_get_uint8(x_1, sizeof(void*)*2 + 3); -x_7 = lean_ctor_get(x_1, 1); -x_8 = l_Array_toList___rarg(x_7); -x_9 = l_List_map___main___at_Lean_Elab_Command_Modifiers_hasFormat___spec__2(x_8); -if (lean_obj_tag(x_2) == 0) -{ -lean_object* x_78; -x_78 = lean_box(0); -x_10 = x_78; -goto block_77; -} -else -{ -lean_object* x_79; lean_object* x_80; uint8_t x_81; lean_object* x_82; lean_object* x_83; lean_object* x_84; lean_object* x_85; lean_object* x_86; lean_object* x_87; -x_79 = lean_ctor_get(x_2, 0); -lean_inc(x_79); -x_80 = lean_alloc_ctor(2, 1, 0); -lean_ctor_set(x_80, 0, x_79); -x_81 = 0; -x_82 = l_Lean_Elab_Command_Modifiers_hasFormat___closed__14; -x_83 = lean_alloc_ctor(4, 2, 1); -lean_ctor_set(x_83, 0, x_82); -lean_ctor_set(x_83, 1, x_80); -lean_ctor_set_uint8(x_83, sizeof(void*)*2, x_81); -x_84 = l_Lean_Elab_Command_Modifiers_hasFormat___closed__16; -x_85 = lean_alloc_ctor(4, 2, 1); -lean_ctor_set(x_85, 0, x_83); -lean_ctor_set(x_85, 1, x_84); -lean_ctor_set_uint8(x_85, sizeof(void*)*2, x_81); -x_86 = lean_box(0); -x_87 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_87, 0, x_85); -lean_ctor_set(x_87, 1, x_86); -x_10 = x_87; -goto block_77; -} -block_77: -{ -lean_object* x_11; -switch (x_3) { -case 0: -{ -lean_object* x_74; -x_74 = lean_box(0); -x_11 = x_74; -goto block_73; -} -case 1: -{ -lean_object* x_75; -x_75 = l_Lean_Elab_Command_Modifiers_hasFormat___closed__11; -x_11 = x_75; -goto block_73; -} -default: -{ -lean_object* x_76; -x_76 = l_Lean_Elab_Command_Modifiers_hasFormat___closed__13; -x_11 = x_76; -goto block_73; -} -} -block_73: -{ -lean_object* x_12; lean_object* x_13; -x_12 = l_List_append___rarg(x_10, x_11); -if (x_4 == 0) -{ -lean_object* x_71; -x_71 = lean_box(0); -x_13 = x_71; -goto block_70; -} -else -{ -lean_object* x_72; -x_72 = l_Lean_Elab_Command_Modifiers_hasFormat___closed__9; -x_13 = x_72; -goto block_70; -} -block_70: -{ -lean_object* x_14; -x_14 = l_List_append___rarg(x_12, x_13); -if (x_5 == 0) -{ -lean_object* x_15; lean_object* x_16; -x_15 = lean_box(0); -x_16 = l_List_append___rarg(x_14, x_15); -if (x_6 == 0) -{ -lean_object* x_17; lean_object* x_18; lean_object* x_19; lean_object* x_20; uint8_t x_21; lean_object* x_22; lean_object* x_23; lean_object* x_24; lean_object* x_25; lean_object* x_26; lean_object* x_27; lean_object* x_28; -x_17 = l_List_append___rarg(x_16, x_15); -x_18 = l_List_append___rarg(x_17, x_9); -x_19 = l_Lean_List_format___rarg___closed__4; -x_20 = l_Lean_Format_joinSep___main___at___private_Init_Lean_Data_Trie_6__toStringAux___main___spec__1(x_18, x_19); -lean_dec(x_18); -x_21 = 0; -x_22 = l_Lean_Elab_Command_Modifiers_hasFormat___closed__2; -x_23 = lean_alloc_ctor(4, 2, 1); -lean_ctor_set(x_23, 0, x_22); -lean_ctor_set(x_23, 1, x_20); -lean_ctor_set_uint8(x_23, sizeof(void*)*2, x_21); -x_24 = l_Lean_Elab_Command_Modifiers_hasFormat___closed__3; -x_25 = lean_alloc_ctor(4, 2, 1); -lean_ctor_set(x_25, 0, x_23); -lean_ctor_set(x_25, 1, x_24); -lean_ctor_set_uint8(x_25, sizeof(void*)*2, x_21); -x_26 = l_Lean_Elab_Command_Modifiers_hasFormat___closed__1; -x_27 = lean_alloc_ctor(3, 2, 0); -lean_ctor_set(x_27, 0, x_26); -lean_ctor_set(x_27, 1, x_25); -x_28 = lean_format_group(x_27); -return x_28; -} -else -{ -lean_object* x_29; lean_object* x_30; lean_object* x_31; lean_object* x_32; lean_object* x_33; uint8_t x_34; lean_object* x_35; lean_object* x_36; lean_object* x_37; lean_object* x_38; lean_object* x_39; lean_object* x_40; lean_object* x_41; -x_29 = l_Lean_Elab_Command_Modifiers_hasFormat___closed__5; -x_30 = l_List_append___rarg(x_16, x_29); -x_31 = l_List_append___rarg(x_30, x_9); -x_32 = l_Lean_List_format___rarg___closed__4; -x_33 = l_Lean_Format_joinSep___main___at___private_Init_Lean_Data_Trie_6__toStringAux___main___spec__1(x_31, x_32); -lean_dec(x_31); -x_34 = 0; -x_35 = l_Lean_Elab_Command_Modifiers_hasFormat___closed__2; -x_36 = lean_alloc_ctor(4, 2, 1); -lean_ctor_set(x_36, 0, x_35); -lean_ctor_set(x_36, 1, x_33); -lean_ctor_set_uint8(x_36, sizeof(void*)*2, x_34); -x_37 = l_Lean_Elab_Command_Modifiers_hasFormat___closed__3; -x_38 = lean_alloc_ctor(4, 2, 1); -lean_ctor_set(x_38, 0, x_36); -lean_ctor_set(x_38, 1, x_37); -lean_ctor_set_uint8(x_38, sizeof(void*)*2, x_34); -x_39 = l_Lean_Elab_Command_Modifiers_hasFormat___closed__1; -x_40 = lean_alloc_ctor(3, 2, 0); -lean_ctor_set(x_40, 0, x_39); -lean_ctor_set(x_40, 1, x_38); -x_41 = lean_format_group(x_40); -return x_41; -} -} -else -{ -lean_object* x_42; lean_object* x_43; lean_object* x_44; -x_42 = lean_box(0); -x_43 = l_Lean_Elab_Command_Modifiers_hasFormat___closed__7; -x_44 = l_List_append___rarg(x_14, x_43); -if (x_6 == 0) -{ -lean_object* x_45; lean_object* x_46; lean_object* x_47; lean_object* x_48; uint8_t x_49; lean_object* x_50; lean_object* x_51; lean_object* x_52; lean_object* x_53; lean_object* x_54; lean_object* x_55; lean_object* x_56; -x_45 = l_List_append___rarg(x_44, x_42); -x_46 = l_List_append___rarg(x_45, x_9); -x_47 = l_Lean_List_format___rarg___closed__4; -x_48 = l_Lean_Format_joinSep___main___at___private_Init_Lean_Data_Trie_6__toStringAux___main___spec__1(x_46, x_47); -lean_dec(x_46); -x_49 = 0; -x_50 = l_Lean_Elab_Command_Modifiers_hasFormat___closed__2; -x_51 = lean_alloc_ctor(4, 2, 1); -lean_ctor_set(x_51, 0, x_50); -lean_ctor_set(x_51, 1, x_48); -lean_ctor_set_uint8(x_51, sizeof(void*)*2, x_49); -x_52 = l_Lean_Elab_Command_Modifiers_hasFormat___closed__3; -x_53 = lean_alloc_ctor(4, 2, 1); -lean_ctor_set(x_53, 0, x_51); -lean_ctor_set(x_53, 1, x_52); -lean_ctor_set_uint8(x_53, sizeof(void*)*2, x_49); -x_54 = l_Lean_Elab_Command_Modifiers_hasFormat___closed__1; -x_55 = lean_alloc_ctor(3, 2, 0); -lean_ctor_set(x_55, 0, x_54); -lean_ctor_set(x_55, 1, x_53); -x_56 = lean_format_group(x_55); -return x_56; -} -else -{ -lean_object* x_57; lean_object* x_58; lean_object* x_59; lean_object* x_60; lean_object* x_61; uint8_t x_62; lean_object* x_63; lean_object* x_64; lean_object* x_65; lean_object* x_66; lean_object* x_67; lean_object* x_68; lean_object* x_69; -x_57 = l_Lean_Elab_Command_Modifiers_hasFormat___closed__5; -x_58 = l_List_append___rarg(x_44, x_57); -x_59 = l_List_append___rarg(x_58, x_9); -x_60 = l_Lean_List_format___rarg___closed__4; -x_61 = l_Lean_Format_joinSep___main___at___private_Init_Lean_Data_Trie_6__toStringAux___main___spec__1(x_59, x_60); -lean_dec(x_59); -x_62 = 0; -x_63 = l_Lean_Elab_Command_Modifiers_hasFormat___closed__2; -x_64 = lean_alloc_ctor(4, 2, 1); -lean_ctor_set(x_64, 0, x_63); -lean_ctor_set(x_64, 1, x_61); -lean_ctor_set_uint8(x_64, sizeof(void*)*2, x_62); -x_65 = l_Lean_Elab_Command_Modifiers_hasFormat___closed__3; -x_66 = lean_alloc_ctor(4, 2, 1); -lean_ctor_set(x_66, 0, x_64); -lean_ctor_set(x_66, 1, x_65); -lean_ctor_set_uint8(x_66, sizeof(void*)*2, x_62); -x_67 = l_Lean_Elab_Command_Modifiers_hasFormat___closed__1; -x_68 = lean_alloc_ctor(3, 2, 0); -lean_ctor_set(x_68, 0, x_67); -lean_ctor_set(x_68, 1, x_66); -x_69 = lean_format_group(x_68); -return x_69; -} -} -} -} -} -} -} -lean_object* l_Lean_Elab_Command_Modifiers_hasFormat___boxed(lean_object* x_1) { +lean_object* l_Lean_Elab_Command_expandOptDeclSig___boxed(lean_object* x_1) { _start: { lean_object* x_2; -x_2 = l_Lean_Elab_Command_Modifiers_hasFormat(x_1); +x_2 = l_Lean_Elab_Command_expandOptDeclSig(x_1); lean_dec(x_1); return x_2; } } -lean_object* l_Lean_Elab_Command_Modifiers_hasToString___lambda__1(lean_object* x_1) { +lean_object* l_Lean_Elab_Command_expandDeclSig(lean_object* x_1) { _start: { -lean_object* x_2; uint8_t x_3; uint8_t x_4; uint8_t x_5; uint8_t x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; -x_2 = lean_ctor_get(x_1, 0); -x_3 = lean_ctor_get_uint8(x_1, sizeof(void*)*2); -x_4 = lean_ctor_get_uint8(x_1, sizeof(void*)*2 + 1); -x_5 = lean_ctor_get_uint8(x_1, sizeof(void*)*2 + 2); -x_6 = lean_ctor_get_uint8(x_1, sizeof(void*)*2 + 3); -x_7 = lean_ctor_get(x_1, 1); -x_8 = l_Array_toList___rarg(x_7); -x_9 = l_List_map___main___at_Lean_Elab_Command_Modifiers_hasFormat___spec__2(x_8); -if (lean_obj_tag(x_2) == 0) -{ -lean_object* x_78; -x_78 = lean_box(0); -x_10 = x_78; -goto block_77; -} -else -{ -lean_object* x_79; lean_object* x_80; uint8_t x_81; lean_object* x_82; lean_object* x_83; lean_object* x_84; lean_object* x_85; lean_object* x_86; lean_object* x_87; -x_79 = lean_ctor_get(x_2, 0); -lean_inc(x_79); -x_80 = lean_alloc_ctor(2, 1, 0); -lean_ctor_set(x_80, 0, x_79); -x_81 = 0; -x_82 = l_Lean_Elab_Command_Modifiers_hasFormat___closed__14; -x_83 = lean_alloc_ctor(4, 2, 1); -lean_ctor_set(x_83, 0, x_82); -lean_ctor_set(x_83, 1, x_80); -lean_ctor_set_uint8(x_83, sizeof(void*)*2, x_81); -x_84 = l_Lean_Elab_Command_Modifiers_hasFormat___closed__16; -x_85 = lean_alloc_ctor(4, 2, 1); -lean_ctor_set(x_85, 0, x_83); -lean_ctor_set(x_85, 1, x_84); -lean_ctor_set_uint8(x_85, sizeof(void*)*2, x_81); -x_86 = lean_box(0); -x_87 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_87, 0, x_85); -lean_ctor_set(x_87, 1, x_86); -x_10 = x_87; -goto block_77; -} -block_77: -{ -lean_object* x_11; -switch (x_3) { -case 0: -{ -lean_object* x_74; -x_74 = lean_box(0); -x_11 = x_74; -goto block_73; -} -case 1: -{ -lean_object* x_75; -x_75 = l_Lean_Elab_Command_Modifiers_hasFormat___closed__11; -x_11 = x_75; -goto block_73; -} -default: -{ -lean_object* x_76; -x_76 = l_Lean_Elab_Command_Modifiers_hasFormat___closed__13; -x_11 = x_76; -goto block_73; +lean_object* x_2; lean_object* x_3; lean_object* x_4; lean_object* x_5; lean_object* x_6; lean_object* x_7; +x_2 = lean_unsigned_to_nat(0u); +x_3 = l_Lean_Syntax_getArg(x_1, x_2); +x_4 = lean_unsigned_to_nat(1u); +x_5 = l_Lean_Syntax_getArg(x_1, x_4); +x_6 = l_Lean_Syntax_getArg(x_5, x_4); +lean_dec(x_5); +x_7 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_7, 0, x_3); +lean_ctor_set(x_7, 1, x_6); +return x_7; } } -block_73: -{ -lean_object* x_12; lean_object* x_13; -x_12 = l_List_append___rarg(x_10, x_11); -if (x_4 == 0) -{ -lean_object* x_71; -x_71 = lean_box(0); -x_13 = x_71; -goto block_70; -} -else -{ -lean_object* x_72; -x_72 = l_Lean_Elab_Command_Modifiers_hasFormat___closed__9; -x_13 = x_72; -goto block_70; -} -block_70: -{ -lean_object* x_14; -x_14 = l_List_append___rarg(x_12, x_13); -if (x_5 == 0) -{ -lean_object* x_15; lean_object* x_16; -x_15 = lean_box(0); -x_16 = l_List_append___rarg(x_14, x_15); -if (x_6 == 0) -{ -lean_object* x_17; lean_object* x_18; lean_object* x_19; lean_object* x_20; uint8_t x_21; lean_object* x_22; lean_object* x_23; lean_object* x_24; lean_object* x_25; lean_object* x_26; lean_object* x_27; lean_object* x_28; -x_17 = l_List_append___rarg(x_16, x_15); -x_18 = l_List_append___rarg(x_17, x_9); -x_19 = l_Lean_List_format___rarg___closed__4; -x_20 = l_Lean_Format_joinSep___main___at___private_Init_Lean_Data_Trie_6__toStringAux___main___spec__1(x_18, x_19); -lean_dec(x_18); -x_21 = 0; -x_22 = l_Lean_Elab_Command_Modifiers_hasFormat___closed__2; -x_23 = lean_alloc_ctor(4, 2, 1); -lean_ctor_set(x_23, 0, x_22); -lean_ctor_set(x_23, 1, x_20); -lean_ctor_set_uint8(x_23, sizeof(void*)*2, x_21); -x_24 = l_Lean_Elab_Command_Modifiers_hasFormat___closed__3; -x_25 = lean_alloc_ctor(4, 2, 1); -lean_ctor_set(x_25, 0, x_23); -lean_ctor_set(x_25, 1, x_24); -lean_ctor_set_uint8(x_25, sizeof(void*)*2, x_21); -x_26 = l_Lean_Elab_Command_Modifiers_hasFormat___closed__1; -x_27 = lean_alloc_ctor(3, 2, 0); -lean_ctor_set(x_27, 0, x_26); -lean_ctor_set(x_27, 1, x_25); -x_28 = lean_format_group(x_27); -return x_28; -} -else -{ -lean_object* x_29; lean_object* x_30; lean_object* x_31; lean_object* x_32; lean_object* x_33; uint8_t x_34; lean_object* x_35; lean_object* x_36; lean_object* x_37; lean_object* x_38; lean_object* x_39; lean_object* x_40; lean_object* x_41; -x_29 = l_Lean_Elab_Command_Modifiers_hasFormat___closed__5; -x_30 = l_List_append___rarg(x_16, x_29); -x_31 = l_List_append___rarg(x_30, x_9); -x_32 = l_Lean_List_format___rarg___closed__4; -x_33 = l_Lean_Format_joinSep___main___at___private_Init_Lean_Data_Trie_6__toStringAux___main___spec__1(x_31, x_32); -lean_dec(x_31); -x_34 = 0; -x_35 = l_Lean_Elab_Command_Modifiers_hasFormat___closed__2; -x_36 = lean_alloc_ctor(4, 2, 1); -lean_ctor_set(x_36, 0, x_35); -lean_ctor_set(x_36, 1, x_33); -lean_ctor_set_uint8(x_36, sizeof(void*)*2, x_34); -x_37 = l_Lean_Elab_Command_Modifiers_hasFormat___closed__3; -x_38 = lean_alloc_ctor(4, 2, 1); -lean_ctor_set(x_38, 0, x_36); -lean_ctor_set(x_38, 1, x_37); -lean_ctor_set_uint8(x_38, sizeof(void*)*2, x_34); -x_39 = l_Lean_Elab_Command_Modifiers_hasFormat___closed__1; -x_40 = lean_alloc_ctor(3, 2, 0); -lean_ctor_set(x_40, 0, x_39); -lean_ctor_set(x_40, 1, x_38); -x_41 = lean_format_group(x_40); -return x_41; -} -} -else -{ -lean_object* x_42; lean_object* x_43; lean_object* x_44; -x_42 = lean_box(0); -x_43 = l_Lean_Elab_Command_Modifiers_hasFormat___closed__7; -x_44 = l_List_append___rarg(x_14, x_43); -if (x_6 == 0) -{ -lean_object* x_45; lean_object* x_46; lean_object* x_47; lean_object* x_48; uint8_t x_49; lean_object* x_50; lean_object* x_51; lean_object* x_52; lean_object* x_53; lean_object* x_54; lean_object* x_55; lean_object* x_56; -x_45 = l_List_append___rarg(x_44, x_42); -x_46 = l_List_append___rarg(x_45, x_9); -x_47 = l_Lean_List_format___rarg___closed__4; -x_48 = l_Lean_Format_joinSep___main___at___private_Init_Lean_Data_Trie_6__toStringAux___main___spec__1(x_46, x_47); -lean_dec(x_46); -x_49 = 0; -x_50 = l_Lean_Elab_Command_Modifiers_hasFormat___closed__2; -x_51 = lean_alloc_ctor(4, 2, 1); -lean_ctor_set(x_51, 0, x_50); -lean_ctor_set(x_51, 1, x_48); -lean_ctor_set_uint8(x_51, sizeof(void*)*2, x_49); -x_52 = l_Lean_Elab_Command_Modifiers_hasFormat___closed__3; -x_53 = lean_alloc_ctor(4, 2, 1); -lean_ctor_set(x_53, 0, x_51); -lean_ctor_set(x_53, 1, x_52); -lean_ctor_set_uint8(x_53, sizeof(void*)*2, x_49); -x_54 = l_Lean_Elab_Command_Modifiers_hasFormat___closed__1; -x_55 = lean_alloc_ctor(3, 2, 0); -lean_ctor_set(x_55, 0, x_54); -lean_ctor_set(x_55, 1, x_53); -x_56 = lean_format_group(x_55); -return x_56; -} -else -{ -lean_object* x_57; lean_object* x_58; lean_object* x_59; lean_object* x_60; lean_object* x_61; uint8_t x_62; lean_object* x_63; lean_object* x_64; lean_object* x_65; lean_object* x_66; lean_object* x_67; lean_object* x_68; lean_object* x_69; -x_57 = l_Lean_Elab_Command_Modifiers_hasFormat___closed__5; -x_58 = l_List_append___rarg(x_44, x_57); -x_59 = l_List_append___rarg(x_58, x_9); -x_60 = l_Lean_List_format___rarg___closed__4; -x_61 = l_Lean_Format_joinSep___main___at___private_Init_Lean_Data_Trie_6__toStringAux___main___spec__1(x_59, x_60); -lean_dec(x_59); -x_62 = 0; -x_63 = l_Lean_Elab_Command_Modifiers_hasFormat___closed__2; -x_64 = lean_alloc_ctor(4, 2, 1); -lean_ctor_set(x_64, 0, x_63); -lean_ctor_set(x_64, 1, x_61); -lean_ctor_set_uint8(x_64, sizeof(void*)*2, x_62); -x_65 = l_Lean_Elab_Command_Modifiers_hasFormat___closed__3; -x_66 = lean_alloc_ctor(4, 2, 1); -lean_ctor_set(x_66, 0, x_64); -lean_ctor_set(x_66, 1, x_65); -lean_ctor_set_uint8(x_66, sizeof(void*)*2, x_62); -x_67 = l_Lean_Elab_Command_Modifiers_hasFormat___closed__1; -x_68 = lean_alloc_ctor(3, 2, 0); -lean_ctor_set(x_68, 0, x_67); -lean_ctor_set(x_68, 1, x_66); -x_69 = lean_format_group(x_68); -return x_69; -} -} -} -} -} -} -} -lean_object* _init_l_Lean_Elab_Command_Modifiers_hasToString___closed__1() { -_start: -{ -lean_object* x_1; -x_1 = lean_alloc_closure((void*)(l_Lean_Elab_Command_Modifiers_hasToString___lambda__1___boxed), 1, 0); -return x_1; -} -} -lean_object* _init_l_Lean_Elab_Command_Modifiers_hasToString___closed__2() { -_start: -{ -lean_object* x_1; lean_object* x_2; lean_object* x_3; -x_1 = l_Lean_HasRepr___closed__1; -x_2 = l_Lean_Elab_Command_Modifiers_hasToString___closed__1; -x_3 = lean_alloc_closure((void*)(l_Function_comp___rarg), 3, 2); -lean_closure_set(x_3, 0, x_1); -lean_closure_set(x_3, 1, x_2); -return x_3; -} -} -lean_object* _init_l_Lean_Elab_Command_Modifiers_hasToString() { -_start: -{ -lean_object* x_1; -x_1 = l_Lean_Elab_Command_Modifiers_hasToString___closed__2; -return x_1; -} -} -lean_object* l_Lean_Elab_Command_Modifiers_hasToString___lambda__1___boxed(lean_object* x_1) { +lean_object* l_Lean_Elab_Command_expandDeclSig___boxed(lean_object* x_1) { _start: { lean_object* x_2; -x_2 = l_Lean_Elab_Command_Modifiers_hasToString___lambda__1(x_1); +x_2 = l_Lean_Elab_Command_expandDeclSig(x_1); lean_dec(x_1); return x_2; } } -lean_object* l_Lean_Elab_throwError___at_Lean_Elab_Command_elabAttrArg___spec__1(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { +lean_object* _init_l_Lean_Elab_Command_elabAbbrev___closed__1() { +_start: +{ +lean_object* x_1; +x_1 = lean_mk_string("inline"); +return x_1; +} +} +lean_object* _init_l_Lean_Elab_Command_elabAbbrev___closed__2() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; +x_1 = lean_box(0); +x_2 = l_Lean_Elab_Command_elabAbbrev___closed__1; +x_3 = lean_name_mk_string(x_1, x_2); +return x_3; +} +} +lean_object* _init_l_Lean_Elab_Command_elabAbbrev___closed__3() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; +x_1 = l_Lean_Elab_Command_elabAbbrev___closed__2; +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_object* _init_l_Lean_Elab_Command_elabAbbrev___closed__4() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; +x_1 = l_Lean_mkReducibilityAttrs___closed__4; +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_object* l_Lean_Elab_Command_elabAbbrev(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { +_start: +{ +lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; uint8_t x_18; lean_object* x_19; lean_object* x_20; +x_5 = lean_unsigned_to_nat(2u); +x_6 = l_Lean_Syntax_getArg(x_2, x_5); +x_7 = l_Lean_Elab_Command_expandOptDeclSig(x_6); +lean_dec(x_6); +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_Elab_Command_elabAbbrev___closed__3; +x_11 = l_Lean_Elab_Command_Modifiers_addAttribute(x_1, x_10); +x_12 = l_Lean_Elab_Command_elabAbbrev___closed__4; +x_13 = l_Lean_Elab_Command_Modifiers_addAttribute(x_11, x_12); +x_14 = lean_unsigned_to_nat(1u); +x_15 = l_Lean_Syntax_getArg(x_2, x_14); +x_16 = lean_unsigned_to_nat(3u); +x_17 = l_Lean_Syntax_getArg(x_2, x_16); +x_18 = 0; +x_19 = lean_alloc_ctor(0, 6, 1); +lean_ctor_set(x_19, 0, x_2); +lean_ctor_set(x_19, 1, x_13); +lean_ctor_set(x_19, 2, x_15); +lean_ctor_set(x_19, 3, x_8); +lean_ctor_set(x_19, 4, x_9); +lean_ctor_set(x_19, 5, x_17); +lean_ctor_set_uint8(x_19, sizeof(void*)*6, x_18); +x_20 = l_Lean_Elab_Command_elabDefLike(x_19, x_3, x_4); +return x_20; +} +} +lean_object* l_Lean_Elab_Command_elabDef(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { +_start: +{ +lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; uint8_t x_14; lean_object* x_15; lean_object* x_16; +x_5 = lean_unsigned_to_nat(2u); +x_6 = l_Lean_Syntax_getArg(x_2, x_5); +x_7 = l_Lean_Elab_Command_expandOptDeclSig(x_6); +lean_dec(x_6); +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 = lean_unsigned_to_nat(1u); +x_11 = l_Lean_Syntax_getArg(x_2, x_10); +x_12 = lean_unsigned_to_nat(3u); +x_13 = l_Lean_Syntax_getArg(x_2, x_12); +x_14 = 0; +x_15 = lean_alloc_ctor(0, 6, 1); +lean_ctor_set(x_15, 0, x_2); +lean_ctor_set(x_15, 1, x_1); +lean_ctor_set(x_15, 2, x_11); +lean_ctor_set(x_15, 3, x_8); +lean_ctor_set(x_15, 4, x_9); +lean_ctor_set(x_15, 5, x_13); +lean_ctor_set_uint8(x_15, sizeof(void*)*6, x_14); +x_16 = l_Lean_Elab_Command_elabDefLike(x_15, x_3, x_4); +return x_16; +} +} +lean_object* l_Lean_Elab_Command_elabTheorem(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { +_start: +{ +lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; uint8_t x_15; lean_object* x_16; lean_object* x_17; +x_5 = lean_unsigned_to_nat(2u); +x_6 = l_Lean_Syntax_getArg(x_2, x_5); +x_7 = l_Lean_Elab_Command_expandDeclSig(x_6); +lean_dec(x_6); +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 = lean_unsigned_to_nat(1u); +x_11 = l_Lean_Syntax_getArg(x_2, x_10); +x_12 = lean_alloc_ctor(1, 1, 0); +lean_ctor_set(x_12, 0, x_9); +x_13 = lean_unsigned_to_nat(3u); +x_14 = l_Lean_Syntax_getArg(x_2, x_13); +x_15 = 1; +x_16 = lean_alloc_ctor(0, 6, 1); +lean_ctor_set(x_16, 0, x_2); +lean_ctor_set(x_16, 1, x_1); +lean_ctor_set(x_16, 2, x_11); +lean_ctor_set(x_16, 3, x_8); +lean_ctor_set(x_16, 4, x_12); +lean_ctor_set(x_16, 5, x_14); +lean_ctor_set_uint8(x_16, sizeof(void*)*6, x_15); +x_17 = l_Lean_Elab_Command_elabDefLike(x_16, x_3, x_4); +return x_17; +} +} +lean_object* _init_l_Lean_Elab_Command_elabConstant___closed__1() { +_start: +{ +lean_object* x_1; +x_1 = lean_mk_string("arbitrary"); +return x_1; +} +} +lean_object* _init_l_Lean_Elab_Command_elabConstant___closed__2() { +_start: +{ +lean_object* x_1; lean_object* x_2; +x_1 = l_Lean_Elab_Command_elabConstant___closed__1; +x_2 = lean_string_utf8_byte_size(x_1); +return x_2; +} +} +lean_object* _init_l_Lean_Elab_Command_elabConstant___closed__3() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4; +x_1 = l_Lean_Elab_Command_elabConstant___closed__1; +x_2 = lean_unsigned_to_nat(0u); +x_3 = l_Lean_Elab_Command_elabConstant___closed__2; +x_4 = lean_alloc_ctor(0, 3, 0); +lean_ctor_set(x_4, 0, x_1); +lean_ctor_set(x_4, 1, x_2); +lean_ctor_set(x_4, 2, x_3); +return x_4; +} +} +lean_object* _init_l_Lean_Elab_Command_elabConstant___closed__4() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; +x_1 = lean_box(0); +x_2 = l_Lean_Elab_Command_elabConstant___closed__1; +x_3 = lean_name_mk_string(x_1, x_2); +return x_3; +} +} +lean_object* _init_l_Lean_Elab_Command_elabConstant___closed__5() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; +x_1 = lean_box(0); +x_2 = l_Lean_Elab_Command_elabConstant___closed__4; +x_3 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_3, 0, x_2); +lean_ctor_set(x_3, 1, x_1); +return x_3; +} +} +lean_object* _init_l_Lean_Elab_Command_elabConstant___closed__6() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; +x_1 = lean_box(0); +x_2 = l_Lean_Elab_Command_elabConstant___closed__5; +x_3 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_3, 0, x_2); +lean_ctor_set(x_3, 1, x_1); +return x_3; +} +} +lean_object* _init_l_Lean_Elab_Command_elabConstant___closed__7() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; +x_1 = lean_box(0); +x_2 = l_Lean_Name_appendIndexAfter___closed__1; +x_3 = lean_alloc_ctor(2, 2, 0); +lean_ctor_set(x_3, 0, x_1); +lean_ctor_set(x_3, 1, x_2); +return x_3; +} +} +lean_object* _init_l_Lean_Elab_Command_elabConstant___closed__8() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; +x_1 = l_Lean_mkOptionalNode___closed__1; +x_2 = l_Lean_Elab_Command_elabConstant___closed__7; +x_3 = lean_array_push(x_1, x_2); +return x_3; +} +} +lean_object* _init_l_Lean_Elab_Command_elabConstant___closed__9() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; +x_1 = l_Lean_Parser_Term_hole___elambda__1___closed__1; +x_2 = l_Lean_Elab_Command_elabConstant___closed__8; +x_3 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_3, 0, x_1); +lean_ctor_set(x_3, 1, x_2); +return x_3; +} +} +lean_object* l_Lean_Elab_Command_elabConstant(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { +_start: +{ +lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; +x_5 = lean_unsigned_to_nat(2u); +x_6 = l_Lean_Syntax_getArg(x_2, x_5); +x_7 = l_Lean_Elab_Command_expandDeclSig(x_6); +lean_dec(x_6); +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 = lean_unsigned_to_nat(3u); +x_11 = l_Lean_Syntax_getArg(x_2, x_10); +x_12 = l_Lean_Syntax_getOptional_x3f(x_11); +lean_dec(x_11); +if (lean_obj_tag(x_12) == 0) +{ +lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; lean_object* x_20; lean_object* x_21; lean_object* x_22; lean_object* x_23; lean_object* x_24; lean_object* x_25; lean_object* x_26; lean_object* x_27; lean_object* x_28; lean_object* x_29; lean_object* x_30; lean_object* x_31; lean_object* x_32; lean_object* x_33; lean_object* x_34; lean_object* x_35; uint8_t x_36; lean_object* x_37; lean_object* x_38; +x_13 = l_Lean_Elab_Command_getCurrMacroScope(x_3, x_4); +x_14 = lean_ctor_get(x_13, 0); +lean_inc(x_14); +x_15 = lean_ctor_get(x_13, 1); +lean_inc(x_15); +lean_dec(x_13); +x_16 = lean_box(0); +x_17 = l_Lean_Elab_Command_elabConstant___closed__4; +x_18 = lean_name_mk_numeral(x_17, x_14); +x_19 = l_Lean_Elab_Command_elabConstant___closed__3; +x_20 = l_Lean_Elab_Command_elabConstant___closed__6; +x_21 = lean_alloc_ctor(3, 4, 0); +lean_ctor_set(x_21, 0, x_16); +lean_ctor_set(x_21, 1, x_19); +lean_ctor_set(x_21, 2, x_18); +lean_ctor_set(x_21, 3, x_20); +x_22 = l_Lean_Meta_mkEqTrans___closed__3; +x_23 = lean_array_push(x_22, x_21); +x_24 = l___private_Init_Lean_Elab_Term_8__expandCDot___closed__5; +x_25 = lean_array_push(x_23, x_24); +x_26 = l_Lean_Parser_Term_id___elambda__1___closed__2; +x_27 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_27, 0, x_26); +lean_ctor_set(x_27, 1, x_25); +x_28 = lean_array_push(x_22, x_27); +x_29 = l_Lean_Elab_Command_elabConstant___closed__9; +x_30 = lean_array_push(x_28, x_29); +x_31 = l_Lean_Parser_Term_app___elambda__1___closed__2; +x_32 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_32, 0, x_31); +lean_ctor_set(x_32, 1, x_30); +x_33 = lean_unsigned_to_nat(1u); +x_34 = l_Lean_Syntax_getArg(x_2, x_33); +x_35 = lean_alloc_ctor(1, 1, 0); +lean_ctor_set(x_35, 0, x_9); +x_36 = 3; +x_37 = lean_alloc_ctor(0, 6, 1); +lean_ctor_set(x_37, 0, x_2); +lean_ctor_set(x_37, 1, x_1); +lean_ctor_set(x_37, 2, x_34); +lean_ctor_set(x_37, 3, x_8); +lean_ctor_set(x_37, 4, x_35); +lean_ctor_set(x_37, 5, x_32); +lean_ctor_set_uint8(x_37, sizeof(void*)*6, x_36); +x_38 = l_Lean_Elab_Command_elabDefLike(x_37, x_3, x_15); +return x_38; +} +else +{ +uint8_t x_39; +x_39 = !lean_is_exclusive(x_12); +if (x_39 == 0) +{ +lean_object* x_40; lean_object* x_41; lean_object* x_42; uint8_t x_43; lean_object* x_44; lean_object* x_45; +x_40 = lean_ctor_get(x_12, 0); +x_41 = lean_unsigned_to_nat(1u); +x_42 = l_Lean_Syntax_getArg(x_2, x_41); +lean_ctor_set(x_12, 0, x_9); +x_43 = 3; +x_44 = lean_alloc_ctor(0, 6, 1); +lean_ctor_set(x_44, 0, x_2); +lean_ctor_set(x_44, 1, x_1); +lean_ctor_set(x_44, 2, x_42); +lean_ctor_set(x_44, 3, x_8); +lean_ctor_set(x_44, 4, x_12); +lean_ctor_set(x_44, 5, x_40); +lean_ctor_set_uint8(x_44, sizeof(void*)*6, x_43); +x_45 = l_Lean_Elab_Command_elabDefLike(x_44, x_3, x_4); +return x_45; +} +else +{ +lean_object* x_46; lean_object* x_47; lean_object* x_48; lean_object* x_49; uint8_t x_50; lean_object* x_51; lean_object* x_52; +x_46 = lean_ctor_get(x_12, 0); +lean_inc(x_46); +lean_dec(x_12); +x_47 = lean_unsigned_to_nat(1u); +x_48 = l_Lean_Syntax_getArg(x_2, x_47); +x_49 = lean_alloc_ctor(1, 1, 0); +lean_ctor_set(x_49, 0, x_9); +x_50 = 3; +x_51 = lean_alloc_ctor(0, 6, 1); +lean_ctor_set(x_51, 0, x_2); +lean_ctor_set(x_51, 1, x_1); +lean_ctor_set(x_51, 2, x_48); +lean_ctor_set(x_51, 3, x_8); +lean_ctor_set(x_51, 4, x_49); +lean_ctor_set(x_51, 5, x_46); +lean_ctor_set_uint8(x_51, sizeof(void*)*6, x_50); +x_52 = l_Lean_Elab_Command_elabDefLike(x_51, x_3, x_4); +return x_52; +} +} +} +} +lean_object* l_Lean_Elab_throwError___at_Lean_Elab_Command_elabInstance___spec__1(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { _start: { uint8_t x_5; lean_object* x_6; uint8_t x_7; @@ -1128,347 +601,2389 @@ return x_10; } } } -lean_object* _init_l_Lean_Elab_Command_elabAttrArg___closed__1() { +lean_object* _init_l_Lean_Elab_Command_elabInstance___closed__1() { _start: { -lean_object* x_1; -x_1 = lean_mk_string("unexpected attribute argument"); -return x_1; +lean_object* x_1; lean_object* x_2; lean_object* x_3; +x_1 = l_Lean_Meta_registerInstanceAttr___closed__2; +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_object* _init_l_Lean_Elab_Command_elabAttrArg___closed__2() { +lean_object* l_Lean_Elab_Command_elabInstance(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { _start: { -lean_object* x_1; lean_object* x_2; -x_1 = l_Lean_Elab_Command_elabAttrArg___closed__1; -x_2 = lean_alloc_ctor(2, 1, 0); -lean_ctor_set(x_2, 0, x_1); -return x_2; -} -} -lean_object* _init_l_Lean_Elab_Command_elabAttrArg___closed__3() { -_start: -{ -lean_object* x_1; lean_object* x_2; -x_1 = l_Lean_Elab_Command_elabAttrArg___closed__2; -x_2 = lean_alloc_ctor(0, 1, 0); -lean_ctor_set(x_2, 0, x_1); -return x_2; -} -} -lean_object* l_Lean_Elab_Command_elabAttrArg(lean_object* x_1, lean_object* x_2, lean_object* x_3) { -_start: -{ -lean_object* x_4; -x_4 = l_Lean_Syntax_isStrLit_x3f(x_1); -if (lean_obj_tag(x_4) == 0) -{ -lean_object* x_5; lean_object* x_6; -x_5 = l_Lean_numLitKind; -x_6 = l_Lean_Syntax_isNatLitAux(x_5, x_1); -if (lean_obj_tag(x_6) == 0) -{ -if (lean_obj_tag(x_1) == 3) -{ -lean_object* x_7; lean_object* x_8; lean_object* x_9; -x_7 = lean_ctor_get(x_1, 2); -lean_inc(x_7); -x_8 = lean_alloc_ctor(2, 1, 0); -lean_ctor_set(x_8, 0, x_7); -x_9 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_9, 0, x_8); -lean_ctor_set(x_9, 1, x_3); -return x_9; -} -else -{ -lean_object* x_10; lean_object* x_11; -x_10 = l_Lean_Elab_Command_elabAttrArg___closed__3; -x_11 = l_Lean_Elab_throwError___at_Lean_Elab_Command_elabAttrArg___spec__1(x_1, x_10, x_2, x_3); -return x_11; -} -} -else -{ -lean_object* x_12; lean_object* x_13; lean_object* x_14; -x_12 = lean_ctor_get(x_6, 0); -lean_inc(x_12); +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; +x_5 = lean_unsigned_to_nat(2u); +x_6 = l_Lean_Syntax_getArg(x_2, x_5); +x_7 = l_Lean_Elab_Command_expandDeclSig(x_6); lean_dec(x_6); -x_13 = lean_alloc_ctor(1, 1, 0); -lean_ctor_set(x_13, 0, x_12); -x_14 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_14, 0, x_13); -lean_ctor_set(x_14, 1, x_3); -return x_14; +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_Elab_Command_elabInstance___closed__1; +x_11 = l_Lean_Elab_Command_Modifiers_addAttribute(x_1, x_10); +x_12 = lean_unsigned_to_nat(1u); +x_13 = l_Lean_Syntax_getArg(x_2, x_12); +x_14 = l_Lean_Syntax_getOptional_x3f(x_13); +lean_dec(x_13); +if (lean_obj_tag(x_14) == 0) +{ +lean_object* x_15; lean_object* x_16; uint8_t x_17; +lean_dec(x_11); +lean_dec(x_9); +lean_dec(x_8); +x_15 = l___private_Init_Lean_Elab_Term_16__synthesizeSyntheticMVar___closed__3; +x_16 = l_Lean_Elab_throwError___at_Lean_Elab_Command_elabInstance___spec__1(x_2, x_15, x_3, x_4); +lean_dec(x_3); +lean_dec(x_2); +x_17 = !lean_is_exclusive(x_16); +if (x_17 == 0) +{ +return x_16; +} +else +{ +lean_object* x_18; lean_object* x_19; lean_object* x_20; +x_18 = lean_ctor_get(x_16, 0); +x_19 = lean_ctor_get(x_16, 1); +lean_inc(x_19); +lean_inc(x_18); +lean_dec(x_16); +x_20 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_20, 0, x_18); +lean_ctor_set(x_20, 1, x_19); +return x_20; } } else { -lean_object* x_15; lean_object* x_16; lean_object* x_17; -x_15 = lean_ctor_get(x_4, 0); -lean_inc(x_15); -lean_dec(x_4); -x_16 = lean_alloc_ctor(0, 1, 0); -lean_ctor_set(x_16, 0, x_15); -x_17 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_17, 0, x_16); -lean_ctor_set(x_17, 1, x_3); -return x_17; +uint8_t x_21; +x_21 = !lean_is_exclusive(x_14); +if (x_21 == 0) +{ +lean_object* x_22; lean_object* x_23; lean_object* x_24; uint8_t x_25; lean_object* x_26; lean_object* x_27; +x_22 = lean_ctor_get(x_14, 0); +lean_ctor_set(x_14, 0, x_9); +x_23 = lean_unsigned_to_nat(3u); +x_24 = l_Lean_Syntax_getArg(x_2, x_23); +x_25 = 0; +x_26 = lean_alloc_ctor(0, 6, 1); +lean_ctor_set(x_26, 0, x_2); +lean_ctor_set(x_26, 1, x_11); +lean_ctor_set(x_26, 2, x_22); +lean_ctor_set(x_26, 3, x_8); +lean_ctor_set(x_26, 4, x_14); +lean_ctor_set(x_26, 5, x_24); +lean_ctor_set_uint8(x_26, sizeof(void*)*6, x_25); +x_27 = l_Lean_Elab_Command_elabDefLike(x_26, x_3, x_4); +return x_27; +} +else +{ +lean_object* x_28; lean_object* x_29; lean_object* x_30; lean_object* x_31; uint8_t x_32; lean_object* x_33; lean_object* x_34; +x_28 = lean_ctor_get(x_14, 0); +lean_inc(x_28); +lean_dec(x_14); +x_29 = lean_alloc_ctor(1, 1, 0); +lean_ctor_set(x_29, 0, x_9); +x_30 = lean_unsigned_to_nat(3u); +x_31 = l_Lean_Syntax_getArg(x_2, x_30); +x_32 = 0; +x_33 = lean_alloc_ctor(0, 6, 1); +lean_ctor_set(x_33, 0, x_2); +lean_ctor_set(x_33, 1, x_11); +lean_ctor_set(x_33, 2, x_28); +lean_ctor_set(x_33, 3, x_8); +lean_ctor_set(x_33, 4, x_29); +lean_ctor_set(x_33, 5, x_31); +lean_ctor_set_uint8(x_33, sizeof(void*)*6, x_32); +x_34 = l_Lean_Elab_Command_elabDefLike(x_33, x_3, x_4); +return x_34; } } } -lean_object* l_Lean_Elab_throwError___at_Lean_Elab_Command_elabAttrArg___spec__1___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { +} +lean_object* l_Lean_Elab_throwError___at_Lean_Elab_Command_elabInstance___spec__1___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { _start: { lean_object* x_5; -x_5 = l_Lean_Elab_throwError___at_Lean_Elab_Command_elabAttrArg___spec__1(x_1, x_2, x_3, x_4); +x_5 = l_Lean_Elab_throwError___at_Lean_Elab_Command_elabInstance___spec__1(x_1, x_2, x_3, x_4); lean_dec(x_3); lean_dec(x_1); return x_5; } } -lean_object* l_Lean_Elab_Command_elabAttrArg___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +lean_object* _init_l_Lean_Elab_Command_elabExample___closed__1() { +_start: +{ +lean_object* x_1; +x_1 = lean_mk_string("_example"); +return x_1; +} +} +lean_object* _init_l_Lean_Elab_Command_elabExample___closed__2() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; +x_1 = lean_box(0); +x_2 = l_Lean_Elab_Command_elabExample___closed__1; +x_3 = lean_name_mk_string(x_1, x_2); +return x_3; +} +} +lean_object* l_Lean_Elab_Command_elabExample(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { +_start: +{ +lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; lean_object* x_20; uint8_t x_21; lean_object* x_22; lean_object* x_23; +x_5 = lean_unsigned_to_nat(1u); +x_6 = l_Lean_Syntax_getArg(x_2, x_5); +x_7 = l_Lean_Elab_Command_expandDeclSig(x_6); +lean_dec(x_6); +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_Elab_Command_elabExample___closed__2; +x_11 = l_Lean_mkIdentFrom(x_2, x_10); +x_12 = l_Lean_Meta_mkEqTrans___closed__3; +x_13 = lean_array_push(x_12, x_11); +x_14 = l_Lean_Syntax_asNode___closed__1; +x_15 = lean_array_push(x_13, x_14); +x_16 = l_Lean_Parser_Command_declId___elambda__1___closed__2; +x_17 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_17, 0, x_16); +lean_ctor_set(x_17, 1, x_15); +x_18 = lean_alloc_ctor(1, 1, 0); +lean_ctor_set(x_18, 0, x_9); +x_19 = lean_unsigned_to_nat(2u); +x_20 = l_Lean_Syntax_getArg(x_2, x_19); +x_21 = 2; +x_22 = lean_alloc_ctor(0, 6, 1); +lean_ctor_set(x_22, 0, x_2); +lean_ctor_set(x_22, 1, x_1); +lean_ctor_set(x_22, 2, x_17); +lean_ctor_set(x_22, 3, x_8); +lean_ctor_set(x_22, 4, x_18); +lean_ctor_set(x_22, 5, x_20); +lean_ctor_set_uint8(x_22, sizeof(void*)*6, x_21); +x_23 = l_Lean_Elab_Command_elabDefLike(x_22, x_3, x_4); +return x_23; +} +} +lean_object* l_Lean_Elab_Command_modifyScope___at_Lean_Elab_Command_elabAxiom___spec__1(lean_object* x_1, lean_object* x_2, lean_object* x_3) { _start: { lean_object* x_4; -x_4 = l_Lean_Elab_Command_elabAttrArg(x_1, x_2, x_3); -lean_dec(x_2); +lean_inc(x_2); +x_4 = l___private_Init_Lean_Elab_Command_2__getState(x_2, x_3); +if (lean_obj_tag(x_4) == 0) +{ +lean_object* x_5; lean_object* x_6; +x_5 = lean_ctor_get(x_4, 0); +lean_inc(x_5); +x_6 = lean_ctor_get(x_5, 2); +lean_inc(x_6); +if (lean_obj_tag(x_6) == 0) +{ +lean_object* x_7; uint8_t x_8; lean_dec(x_1); -return x_4; -} -} -lean_object* l_Array_umapMAux___main___at_Lean_Elab_Command_elabAttr___spec__1(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { -_start: +x_7 = lean_ctor_get(x_4, 1); +lean_inc(x_7); +lean_dec(x_4); +x_8 = !lean_is_exclusive(x_5); +if (x_8 == 0) { -lean_object* x_5; uint8_t x_6; -x_5 = lean_array_get_size(x_2); -x_6 = lean_nat_dec_lt(x_1, x_5); -lean_dec(x_5); -if (x_6 == 0) +lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; +x_9 = lean_ctor_get(x_5, 2); +lean_dec(x_9); +x_10 = l_Lean_Elab_Command_modifyScope___closed__1; +x_11 = l_unreachable_x21___rarg(x_10); +lean_ctor_set(x_5, 2, x_11); +x_12 = l___private_Init_Lean_Elab_Command_3__setState(x_5, x_2, x_7); +if (lean_obj_tag(x_12) == 0) { -lean_object* x_7; lean_object* x_8; lean_object* x_9; -lean_dec(x_1); -x_7 = l_Array_empty___closed__1; -x_8 = x_2; -x_9 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_9, 0, x_8); -lean_ctor_set(x_9, 1, x_4); -return x_9; -} -else +uint8_t x_13; +x_13 = !lean_is_exclusive(x_12); +if (x_13 == 0) { -lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; -x_10 = lean_array_fget(x_2, x_1); -x_11 = lean_box(0); -x_12 = x_11; -x_13 = lean_array_fset(x_2, x_1, x_12); -x_14 = l_Lean_Elab_Command_elabAttrArg(x_10, x_3, x_4); -if (lean_obj_tag(x_14) == 0) -{ -lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; lean_object* x_20; -x_15 = lean_ctor_get(x_14, 0); -lean_inc(x_15); -x_16 = lean_ctor_get(x_14, 1); -lean_inc(x_16); +lean_object* x_14; lean_object* x_15; +x_14 = lean_ctor_get(x_12, 0); lean_dec(x_14); -x_17 = lean_unsigned_to_nat(1u); -x_18 = lean_nat_add(x_1, x_17); -x_19 = x_15; -lean_dec(x_10); -x_20 = lean_array_fset(x_13, x_1, x_19); -lean_dec(x_1); -x_1 = x_18; -x_2 = x_20; -x_4 = x_16; -goto _start; +x_15 = lean_box(0); +lean_ctor_set(x_12, 0, x_15); +return x_12; } else { -uint8_t x_22; -lean_dec(x_13); -lean_dec(x_10); -lean_dec(x_1); -x_22 = !lean_is_exclusive(x_14); -if (x_22 == 0) -{ -return x_14; +lean_object* x_16; lean_object* x_17; lean_object* x_18; +x_16 = lean_ctor_get(x_12, 1); +lean_inc(x_16); +lean_dec(x_12); +x_17 = lean_box(0); +x_18 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_18, 0, x_17); +lean_ctor_set(x_18, 1, x_16); +return x_18; +} } else { -lean_object* x_23; lean_object* x_24; lean_object* x_25; -x_23 = lean_ctor_get(x_14, 0); -x_24 = lean_ctor_get(x_14, 1); +uint8_t x_19; +x_19 = !lean_is_exclusive(x_12); +if (x_19 == 0) +{ +return x_12; +} +else +{ +lean_object* x_20; lean_object* x_21; lean_object* x_22; +x_20 = lean_ctor_get(x_12, 0); +x_21 = lean_ctor_get(x_12, 1); +lean_inc(x_21); +lean_inc(x_20); +lean_dec(x_12); +x_22 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_22, 0, x_20); +lean_ctor_set(x_22, 1, x_21); +return x_22; +} +} +} +else +{ +lean_object* x_23; lean_object* x_24; lean_object* x_25; lean_object* x_26; lean_object* x_27; lean_object* x_28; lean_object* x_29; +x_23 = lean_ctor_get(x_5, 0); +x_24 = lean_ctor_get(x_5, 1); +x_25 = lean_ctor_get(x_5, 3); +lean_inc(x_25); lean_inc(x_24); lean_inc(x_23); -lean_dec(x_14); -x_25 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_25, 0, x_23); -lean_ctor_set(x_25, 1, x_24); -return x_25; -} -} -} -} -} -lean_object* l_Lean_Elab_throwError___at_Lean_Elab_Command_elabAttr___spec__2(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { -_start: +lean_dec(x_5); +x_26 = l_Lean_Elab_Command_modifyScope___closed__1; +x_27 = l_unreachable_x21___rarg(x_26); +x_28 = lean_alloc_ctor(0, 4, 0); +lean_ctor_set(x_28, 0, x_23); +lean_ctor_set(x_28, 1, x_24); +lean_ctor_set(x_28, 2, x_27); +lean_ctor_set(x_28, 3, x_25); +x_29 = l___private_Init_Lean_Elab_Command_3__setState(x_28, x_2, x_7); +if (lean_obj_tag(x_29) == 0) { -uint8_t x_5; lean_object* x_6; uint8_t x_7; -x_5 = 2; -x_6 = l_Lean_Elab_mkMessage___at_Lean_Elab_Command_elabCommand___spec__2(x_2, x_5, x_1, x_3, x_4); -x_7 = !lean_is_exclusive(x_6); -if (x_7 == 0) -{ -lean_ctor_set_tag(x_6, 1); -return x_6; +lean_object* x_30; lean_object* x_31; lean_object* x_32; lean_object* x_33; +x_30 = lean_ctor_get(x_29, 1); +lean_inc(x_30); +if (lean_is_exclusive(x_29)) { + lean_ctor_release(x_29, 0); + lean_ctor_release(x_29, 1); + x_31 = x_29; +} else { + lean_dec_ref(x_29); + x_31 = lean_box(0); +} +x_32 = lean_box(0); +if (lean_is_scalar(x_31)) { + x_33 = lean_alloc_ctor(0, 2, 0); +} else { + x_33 = x_31; +} +lean_ctor_set(x_33, 0, x_32); +lean_ctor_set(x_33, 1, x_30); +return x_33; } else { -lean_object* x_8; lean_object* x_9; lean_object* x_10; -x_8 = lean_ctor_get(x_6, 0); -x_9 = lean_ctor_get(x_6, 1); -lean_inc(x_9); -lean_inc(x_8); -lean_dec(x_6); -x_10 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_10, 0, x_8); -lean_ctor_set(x_10, 1, x_9); -return x_10; +lean_object* x_34; lean_object* x_35; lean_object* x_36; lean_object* x_37; +x_34 = lean_ctor_get(x_29, 0); +lean_inc(x_34); +x_35 = lean_ctor_get(x_29, 1); +lean_inc(x_35); +if (lean_is_exclusive(x_29)) { + lean_ctor_release(x_29, 0); + lean_ctor_release(x_29, 1); + x_36 = x_29; +} else { + lean_dec_ref(x_29); + x_36 = lean_box(0); +} +if (lean_is_scalar(x_36)) { + x_37 = lean_alloc_ctor(1, 2, 0); +} else { + x_37 = x_36; +} +lean_ctor_set(x_37, 0, x_34); +lean_ctor_set(x_37, 1, x_35); +return x_37; } } } -lean_object* _init_l_Lean_Elab_Command_elabAttr___closed__1() { -_start: +else { -lean_object* x_1; -x_1 = lean_mk_string("unknown attribute ["); -return x_1; -} -} -lean_object* _init_l_Lean_Elab_Command_elabAttr___closed__2() { -_start: +lean_object* x_38; lean_object* x_39; uint8_t x_40; +x_38 = lean_ctor_get(x_6, 0); +lean_inc(x_38); +x_39 = lean_ctor_get(x_4, 1); +lean_inc(x_39); +lean_dec(x_4); +x_40 = !lean_is_exclusive(x_5); +if (x_40 == 0) { -lean_object* x_1; lean_object* x_2; -x_1 = l_Lean_Elab_Command_elabAttr___closed__1; -x_2 = lean_alloc_ctor(2, 1, 0); -lean_ctor_set(x_2, 0, x_1); -return x_2; -} -} -lean_object* _init_l_Lean_Elab_Command_elabAttr___closed__3() { -_start: +lean_object* x_41; uint8_t x_42; +x_41 = lean_ctor_get(x_5, 2); +lean_dec(x_41); +x_42 = !lean_is_exclusive(x_6); +if (x_42 == 0) { -lean_object* x_1; lean_object* x_2; -x_1 = l_Lean_Elab_Command_elabAttr___closed__2; -x_2 = lean_alloc_ctor(0, 1, 0); -lean_ctor_set(x_2, 0, x_1); -return x_2; -} -} -lean_object* _init_l_Lean_Elab_Command_elabAttr___closed__4() { -_start: +lean_object* x_43; uint8_t x_44; +x_43 = lean_ctor_get(x_6, 0); +lean_dec(x_43); +x_44 = !lean_is_exclusive(x_38); +if (x_44 == 0) { -lean_object* x_1; -x_1 = lean_mk_string("identifier expected"); -return x_1; -} -} -lean_object* _init_l_Lean_Elab_Command_elabAttr___closed__5() { -_start: -{ -lean_object* x_1; lean_object* x_2; -x_1 = l_Lean_Elab_Command_elabAttr___closed__4; -x_2 = lean_alloc_ctor(2, 1, 0); -lean_ctor_set(x_2, 0, x_1); -return x_2; -} -} -lean_object* _init_l_Lean_Elab_Command_elabAttr___closed__6() { -_start: -{ -lean_object* x_1; lean_object* x_2; -x_1 = l_Lean_Elab_Command_elabAttr___closed__5; -x_2 = lean_alloc_ctor(0, 1, 0); -lean_ctor_set(x_2, 0, x_1); -return x_2; -} -} -lean_object* l_Lean_Elab_Command_elabAttr(lean_object* x_1, lean_object* x_2, lean_object* x_3) { -_start: -{ -lean_object* x_4; lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_46; -x_4 = lean_unsigned_to_nat(0u); -x_5 = l_Lean_Syntax_getArg(x_1, x_4); -x_46 = l_Lean_Syntax_isIdOrAtom_x3f(x_5); +lean_object* x_45; lean_object* x_46; +x_45 = lean_ctor_get(x_38, 5); +lean_dec(x_45); +lean_ctor_set(x_38, 5, x_1); +x_46 = l___private_Init_Lean_Elab_Command_3__setState(x_5, x_2, x_39); if (lean_obj_tag(x_46) == 0) { -lean_object* x_47; lean_object* x_48; uint8_t x_49; -x_47 = l_Lean_Elab_Command_elabAttr___closed__6; -x_48 = l_Lean_Elab_throwError___at_Lean_Elab_Command_elabAttr___spec__2(x_5, x_47, x_2, x_3); -lean_dec(x_2); -lean_dec(x_5); -x_49 = !lean_is_exclusive(x_48); -if (x_49 == 0) +uint8_t x_47; +x_47 = !lean_is_exclusive(x_46); +if (x_47 == 0) { -return x_48; +lean_object* x_48; lean_object* x_49; +x_48 = lean_ctor_get(x_46, 0); +lean_dec(x_48); +x_49 = lean_box(0); +lean_ctor_set(x_46, 0, x_49); +return x_46; } else { lean_object* x_50; lean_object* x_51; lean_object* x_52; -x_50 = lean_ctor_get(x_48, 0); -x_51 = lean_ctor_get(x_48, 1); -lean_inc(x_51); +x_50 = lean_ctor_get(x_46, 1); lean_inc(x_50); -lean_dec(x_48); -x_52 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_52, 0, x_50); -lean_ctor_set(x_52, 1, x_51); +lean_dec(x_46); +x_51 = lean_box(0); +x_52 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_52, 0, x_51); +lean_ctor_set(x_52, 1, x_50); return x_52; } } else { -lean_object* x_53; lean_object* x_54; lean_object* x_55; -lean_dec(x_5); -x_53 = lean_ctor_get(x_46, 0); -lean_inc(x_53); -lean_dec(x_46); -x_54 = lean_box(0); -x_55 = lean_name_mk_string(x_54, x_53); -x_6 = x_55; -x_7 = x_3; -goto block_45; +uint8_t x_53; +x_53 = !lean_is_exclusive(x_46); +if (x_53 == 0) +{ +return x_46; } -block_45: +else { -lean_object* x_8; -lean_inc(x_6); -x_8 = lean_is_attribute(x_6, x_7); -if (lean_obj_tag(x_8) == 0) +lean_object* x_54; lean_object* x_55; lean_object* x_56; +x_54 = lean_ctor_get(x_46, 0); +x_55 = lean_ctor_get(x_46, 1); +lean_inc(x_55); +lean_inc(x_54); +lean_dec(x_46); +x_56 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_56, 0, x_54); +lean_ctor_set(x_56, 1, x_55); +return x_56; +} +} +} +else { -lean_object* x_9; uint8_t x_10; -x_9 = lean_ctor_get(x_8, 0); -lean_inc(x_9); -x_10 = lean_unbox(x_9); -lean_dec(x_9); -if (x_10 == 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; lean_object* x_64; +x_57 = lean_ctor_get(x_38, 0); +x_58 = lean_ctor_get(x_38, 1); +x_59 = lean_ctor_get(x_38, 2); +x_60 = lean_ctor_get(x_38, 3); +x_61 = lean_ctor_get(x_38, 4); +x_62 = lean_ctor_get(x_38, 6); +lean_inc(x_62); +lean_inc(x_61); +lean_inc(x_60); +lean_inc(x_59); +lean_inc(x_58); +lean_inc(x_57); +lean_dec(x_38); +x_63 = lean_alloc_ctor(0, 7, 0); +lean_ctor_set(x_63, 0, x_57); +lean_ctor_set(x_63, 1, x_58); +lean_ctor_set(x_63, 2, x_59); +lean_ctor_set(x_63, 3, x_60); +lean_ctor_set(x_63, 4, x_61); +lean_ctor_set(x_63, 5, x_1); +lean_ctor_set(x_63, 6, x_62); +lean_ctor_set(x_6, 0, x_63); +x_64 = l___private_Init_Lean_Elab_Command_3__setState(x_5, x_2, x_39); +if (lean_obj_tag(x_64) == 0) { -lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; uint8_t x_18; -x_11 = lean_ctor_get(x_8, 1); -lean_inc(x_11); -lean_dec(x_8); -x_12 = lean_alloc_ctor(4, 1, 0); -lean_ctor_set(x_12, 0, x_6); -x_13 = l_Lean_Elab_Command_elabAttr___closed__3; -x_14 = lean_alloc_ctor(8, 2, 0); -lean_ctor_set(x_14, 0, x_13); -lean_ctor_set(x_14, 1, x_12); -x_15 = l_Lean_MessageData_arrayExpr_toMessageData___main___closed__1; -x_16 = lean_alloc_ctor(8, 2, 0); -lean_ctor_set(x_16, 0, x_14); -lean_ctor_set(x_16, 1, x_15); -x_17 = l_Lean_Elab_throwError___at_Lean_Elab_Command_elabCommand___spec__1(x_1, x_16, x_2, x_11); +lean_object* x_65; lean_object* x_66; lean_object* x_67; lean_object* x_68; +x_65 = lean_ctor_get(x_64, 1); +lean_inc(x_65); +if (lean_is_exclusive(x_64)) { + lean_ctor_release(x_64, 0); + lean_ctor_release(x_64, 1); + x_66 = x_64; +} else { + lean_dec_ref(x_64); + x_66 = lean_box(0); +} +x_67 = lean_box(0); +if (lean_is_scalar(x_66)) { + x_68 = lean_alloc_ctor(0, 2, 0); +} else { + x_68 = x_66; +} +lean_ctor_set(x_68, 0, x_67); +lean_ctor_set(x_68, 1, x_65); +return x_68; +} +else +{ +lean_object* x_69; lean_object* x_70; lean_object* x_71; lean_object* x_72; +x_69 = lean_ctor_get(x_64, 0); +lean_inc(x_69); +x_70 = lean_ctor_get(x_64, 1); +lean_inc(x_70); +if (lean_is_exclusive(x_64)) { + lean_ctor_release(x_64, 0); + lean_ctor_release(x_64, 1); + x_71 = x_64; +} else { + lean_dec_ref(x_64); + x_71 = lean_box(0); +} +if (lean_is_scalar(x_71)) { + x_72 = lean_alloc_ctor(1, 2, 0); +} else { + x_72 = x_71; +} +lean_ctor_set(x_72, 0, x_69); +lean_ctor_set(x_72, 1, x_70); +return x_72; +} +} +} +else +{ +lean_object* x_73; lean_object* x_74; lean_object* x_75; lean_object* x_76; lean_object* x_77; lean_object* x_78; lean_object* x_79; lean_object* x_80; lean_object* x_81; lean_object* x_82; lean_object* x_83; +x_73 = lean_ctor_get(x_6, 1); +lean_inc(x_73); +lean_dec(x_6); +x_74 = lean_ctor_get(x_38, 0); +lean_inc(x_74); +x_75 = lean_ctor_get(x_38, 1); +lean_inc(x_75); +x_76 = lean_ctor_get(x_38, 2); +lean_inc(x_76); +x_77 = lean_ctor_get(x_38, 3); +lean_inc(x_77); +x_78 = lean_ctor_get(x_38, 4); +lean_inc(x_78); +x_79 = lean_ctor_get(x_38, 6); +lean_inc(x_79); +if (lean_is_exclusive(x_38)) { + lean_ctor_release(x_38, 0); + lean_ctor_release(x_38, 1); + lean_ctor_release(x_38, 2); + lean_ctor_release(x_38, 3); + lean_ctor_release(x_38, 4); + lean_ctor_release(x_38, 5); + lean_ctor_release(x_38, 6); + x_80 = x_38; +} else { + lean_dec_ref(x_38); + x_80 = lean_box(0); +} +if (lean_is_scalar(x_80)) { + x_81 = lean_alloc_ctor(0, 7, 0); +} else { + x_81 = x_80; +} +lean_ctor_set(x_81, 0, x_74); +lean_ctor_set(x_81, 1, x_75); +lean_ctor_set(x_81, 2, x_76); +lean_ctor_set(x_81, 3, x_77); +lean_ctor_set(x_81, 4, x_78); +lean_ctor_set(x_81, 5, x_1); +lean_ctor_set(x_81, 6, x_79); +x_82 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_82, 0, x_81); +lean_ctor_set(x_82, 1, x_73); +lean_ctor_set(x_5, 2, x_82); +x_83 = l___private_Init_Lean_Elab_Command_3__setState(x_5, x_2, x_39); +if (lean_obj_tag(x_83) == 0) +{ +lean_object* x_84; lean_object* x_85; lean_object* x_86; lean_object* x_87; +x_84 = lean_ctor_get(x_83, 1); +lean_inc(x_84); +if (lean_is_exclusive(x_83)) { + lean_ctor_release(x_83, 0); + lean_ctor_release(x_83, 1); + x_85 = x_83; +} else { + lean_dec_ref(x_83); + x_85 = lean_box(0); +} +x_86 = lean_box(0); +if (lean_is_scalar(x_85)) { + x_87 = lean_alloc_ctor(0, 2, 0); +} else { + x_87 = x_85; +} +lean_ctor_set(x_87, 0, x_86); +lean_ctor_set(x_87, 1, x_84); +return x_87; +} +else +{ +lean_object* x_88; lean_object* x_89; lean_object* x_90; lean_object* x_91; +x_88 = lean_ctor_get(x_83, 0); +lean_inc(x_88); +x_89 = lean_ctor_get(x_83, 1); +lean_inc(x_89); +if (lean_is_exclusive(x_83)) { + lean_ctor_release(x_83, 0); + lean_ctor_release(x_83, 1); + x_90 = x_83; +} else { + lean_dec_ref(x_83); + x_90 = lean_box(0); +} +if (lean_is_scalar(x_90)) { + x_91 = lean_alloc_ctor(1, 2, 0); +} else { + x_91 = x_90; +} +lean_ctor_set(x_91, 0, x_88); +lean_ctor_set(x_91, 1, x_89); +return x_91; +} +} +} +else +{ +lean_object* x_92; lean_object* x_93; lean_object* x_94; lean_object* x_95; lean_object* x_96; lean_object* x_97; lean_object* x_98; lean_object* x_99; lean_object* x_100; lean_object* x_101; lean_object* x_102; lean_object* x_103; lean_object* x_104; lean_object* x_105; lean_object* x_106; lean_object* x_107; +x_92 = lean_ctor_get(x_5, 0); +x_93 = lean_ctor_get(x_5, 1); +x_94 = lean_ctor_get(x_5, 3); +lean_inc(x_94); +lean_inc(x_93); +lean_inc(x_92); +lean_dec(x_5); +x_95 = lean_ctor_get(x_6, 1); +lean_inc(x_95); +if (lean_is_exclusive(x_6)) { + lean_ctor_release(x_6, 0); + lean_ctor_release(x_6, 1); + x_96 = x_6; +} else { + lean_dec_ref(x_6); + x_96 = lean_box(0); +} +x_97 = lean_ctor_get(x_38, 0); +lean_inc(x_97); +x_98 = lean_ctor_get(x_38, 1); +lean_inc(x_98); +x_99 = lean_ctor_get(x_38, 2); +lean_inc(x_99); +x_100 = lean_ctor_get(x_38, 3); +lean_inc(x_100); +x_101 = lean_ctor_get(x_38, 4); +lean_inc(x_101); +x_102 = lean_ctor_get(x_38, 6); +lean_inc(x_102); +if (lean_is_exclusive(x_38)) { + lean_ctor_release(x_38, 0); + lean_ctor_release(x_38, 1); + lean_ctor_release(x_38, 2); + lean_ctor_release(x_38, 3); + lean_ctor_release(x_38, 4); + lean_ctor_release(x_38, 5); + lean_ctor_release(x_38, 6); + x_103 = x_38; +} else { + lean_dec_ref(x_38); + x_103 = lean_box(0); +} +if (lean_is_scalar(x_103)) { + x_104 = lean_alloc_ctor(0, 7, 0); +} else { + x_104 = x_103; +} +lean_ctor_set(x_104, 0, x_97); +lean_ctor_set(x_104, 1, x_98); +lean_ctor_set(x_104, 2, x_99); +lean_ctor_set(x_104, 3, x_100); +lean_ctor_set(x_104, 4, x_101); +lean_ctor_set(x_104, 5, x_1); +lean_ctor_set(x_104, 6, x_102); +if (lean_is_scalar(x_96)) { + x_105 = lean_alloc_ctor(1, 2, 0); +} else { + x_105 = x_96; +} +lean_ctor_set(x_105, 0, x_104); +lean_ctor_set(x_105, 1, x_95); +x_106 = lean_alloc_ctor(0, 4, 0); +lean_ctor_set(x_106, 0, x_92); +lean_ctor_set(x_106, 1, x_93); +lean_ctor_set(x_106, 2, x_105); +lean_ctor_set(x_106, 3, x_94); +x_107 = l___private_Init_Lean_Elab_Command_3__setState(x_106, x_2, x_39); +if (lean_obj_tag(x_107) == 0) +{ +lean_object* x_108; lean_object* x_109; lean_object* x_110; lean_object* x_111; +x_108 = lean_ctor_get(x_107, 1); +lean_inc(x_108); +if (lean_is_exclusive(x_107)) { + lean_ctor_release(x_107, 0); + lean_ctor_release(x_107, 1); + x_109 = x_107; +} else { + lean_dec_ref(x_107); + x_109 = lean_box(0); +} +x_110 = lean_box(0); +if (lean_is_scalar(x_109)) { + x_111 = lean_alloc_ctor(0, 2, 0); +} else { + x_111 = x_109; +} +lean_ctor_set(x_111, 0, x_110); +lean_ctor_set(x_111, 1, x_108); +return x_111; +} +else +{ +lean_object* x_112; lean_object* x_113; lean_object* x_114; lean_object* x_115; +x_112 = lean_ctor_get(x_107, 0); +lean_inc(x_112); +x_113 = lean_ctor_get(x_107, 1); +lean_inc(x_113); +if (lean_is_exclusive(x_107)) { + lean_ctor_release(x_107, 0); + lean_ctor_release(x_107, 1); + x_114 = x_107; +} else { + lean_dec_ref(x_107); + x_114 = lean_box(0); +} +if (lean_is_scalar(x_114)) { + x_115 = lean_alloc_ctor(1, 2, 0); +} else { + x_115 = x_114; +} +lean_ctor_set(x_115, 0, x_112); +lean_ctor_set(x_115, 1, x_113); +return x_115; +} +} +} +} +else +{ +uint8_t x_116; lean_dec(x_2); +lean_dec(x_1); +x_116 = !lean_is_exclusive(x_4); +if (x_116 == 0) +{ +return x_4; +} +else +{ +lean_object* x_117; lean_object* x_118; lean_object* x_119; +x_117 = lean_ctor_get(x_4, 0); +x_118 = lean_ctor_get(x_4, 1); +lean_inc(x_118); +lean_inc(x_117); +lean_dec(x_4); +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; +} +} +} +} +lean_object* l_Lean_Elab_Command_modifyScope___at_Lean_Elab_Command_elabAxiom___spec__2(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +_start: +{ +lean_object* x_4; +lean_inc(x_2); +x_4 = l___private_Init_Lean_Elab_Command_2__getState(x_2, x_3); +if (lean_obj_tag(x_4) == 0) +{ +lean_object* x_5; lean_object* x_6; +x_5 = lean_ctor_get(x_4, 0); +lean_inc(x_5); +x_6 = lean_ctor_get(x_5, 2); +lean_inc(x_6); +if (lean_obj_tag(x_6) == 0) +{ +lean_object* x_7; uint8_t x_8; +lean_dec(x_1); +x_7 = lean_ctor_get(x_4, 1); +lean_inc(x_7); +lean_dec(x_4); +x_8 = !lean_is_exclusive(x_5); +if (x_8 == 0) +{ +lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; +x_9 = lean_ctor_get(x_5, 2); +lean_dec(x_9); +x_10 = l_Lean_Elab_Command_modifyScope___closed__1; +x_11 = l_unreachable_x21___rarg(x_10); +lean_ctor_set(x_5, 2, x_11); +x_12 = l___private_Init_Lean_Elab_Command_3__setState(x_5, x_2, x_7); +if (lean_obj_tag(x_12) == 0) +{ +uint8_t x_13; +x_13 = !lean_is_exclusive(x_12); +if (x_13 == 0) +{ +lean_object* x_14; lean_object* x_15; +x_14 = lean_ctor_get(x_12, 0); +lean_dec(x_14); +x_15 = lean_box(0); +lean_ctor_set(x_12, 0, x_15); +return x_12; +} +else +{ +lean_object* x_16; lean_object* x_17; lean_object* x_18; +x_16 = lean_ctor_get(x_12, 1); +lean_inc(x_16); +lean_dec(x_12); +x_17 = lean_box(0); +x_18 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_18, 0, x_17); +lean_ctor_set(x_18, 1, x_16); +return x_18; +} +} +else +{ +uint8_t x_19; +x_19 = !lean_is_exclusive(x_12); +if (x_19 == 0) +{ +return x_12; +} +else +{ +lean_object* x_20; lean_object* x_21; lean_object* x_22; +x_20 = lean_ctor_get(x_12, 0); +x_21 = lean_ctor_get(x_12, 1); +lean_inc(x_21); +lean_inc(x_20); +lean_dec(x_12); +x_22 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_22, 0, x_20); +lean_ctor_set(x_22, 1, x_21); +return x_22; +} +} +} +else +{ +lean_object* x_23; lean_object* x_24; lean_object* x_25; lean_object* x_26; lean_object* x_27; lean_object* x_28; lean_object* x_29; +x_23 = lean_ctor_get(x_5, 0); +x_24 = lean_ctor_get(x_5, 1); +x_25 = lean_ctor_get(x_5, 3); +lean_inc(x_25); +lean_inc(x_24); +lean_inc(x_23); +lean_dec(x_5); +x_26 = l_Lean_Elab_Command_modifyScope___closed__1; +x_27 = l_unreachable_x21___rarg(x_26); +x_28 = lean_alloc_ctor(0, 4, 0); +lean_ctor_set(x_28, 0, x_23); +lean_ctor_set(x_28, 1, x_24); +lean_ctor_set(x_28, 2, x_27); +lean_ctor_set(x_28, 3, x_25); +x_29 = l___private_Init_Lean_Elab_Command_3__setState(x_28, x_2, x_7); +if (lean_obj_tag(x_29) == 0) +{ +lean_object* x_30; lean_object* x_31; lean_object* x_32; lean_object* x_33; +x_30 = lean_ctor_get(x_29, 1); +lean_inc(x_30); +if (lean_is_exclusive(x_29)) { + lean_ctor_release(x_29, 0); + lean_ctor_release(x_29, 1); + x_31 = x_29; +} else { + lean_dec_ref(x_29); + x_31 = lean_box(0); +} +x_32 = lean_box(0); +if (lean_is_scalar(x_31)) { + x_33 = lean_alloc_ctor(0, 2, 0); +} else { + x_33 = x_31; +} +lean_ctor_set(x_33, 0, x_32); +lean_ctor_set(x_33, 1, x_30); +return x_33; +} +else +{ +lean_object* x_34; lean_object* x_35; lean_object* x_36; lean_object* x_37; +x_34 = lean_ctor_get(x_29, 0); +lean_inc(x_34); +x_35 = lean_ctor_get(x_29, 1); +lean_inc(x_35); +if (lean_is_exclusive(x_29)) { + lean_ctor_release(x_29, 0); + lean_ctor_release(x_29, 1); + x_36 = x_29; +} else { + lean_dec_ref(x_29); + x_36 = lean_box(0); +} +if (lean_is_scalar(x_36)) { + x_37 = lean_alloc_ctor(1, 2, 0); +} else { + x_37 = x_36; +} +lean_ctor_set(x_37, 0, x_34); +lean_ctor_set(x_37, 1, x_35); +return x_37; +} +} +} +else +{ +lean_object* x_38; lean_object* x_39; uint8_t x_40; +x_38 = lean_ctor_get(x_6, 0); +lean_inc(x_38); +x_39 = lean_ctor_get(x_4, 1); +lean_inc(x_39); +lean_dec(x_4); +x_40 = !lean_is_exclusive(x_5); +if (x_40 == 0) +{ +lean_object* x_41; uint8_t x_42; +x_41 = lean_ctor_get(x_5, 2); +lean_dec(x_41); +x_42 = !lean_is_exclusive(x_6); +if (x_42 == 0) +{ +lean_object* x_43; uint8_t x_44; +x_43 = lean_ctor_get(x_6, 0); +lean_dec(x_43); +x_44 = !lean_is_exclusive(x_38); +if (x_44 == 0) +{ +lean_object* x_45; lean_object* x_46; +x_45 = lean_ctor_get(x_38, 5); +lean_dec(x_45); +lean_ctor_set(x_38, 5, x_1); +x_46 = l___private_Init_Lean_Elab_Command_3__setState(x_5, x_2, x_39); +if (lean_obj_tag(x_46) == 0) +{ +uint8_t x_47; +x_47 = !lean_is_exclusive(x_46); +if (x_47 == 0) +{ +lean_object* x_48; lean_object* x_49; +x_48 = lean_ctor_get(x_46, 0); +lean_dec(x_48); +x_49 = lean_box(0); +lean_ctor_set(x_46, 0, x_49); +return x_46; +} +else +{ +lean_object* x_50; lean_object* x_51; lean_object* x_52; +x_50 = lean_ctor_get(x_46, 1); +lean_inc(x_50); +lean_dec(x_46); +x_51 = lean_box(0); +x_52 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_52, 0, x_51); +lean_ctor_set(x_52, 1, x_50); +return x_52; +} +} +else +{ +uint8_t x_53; +x_53 = !lean_is_exclusive(x_46); +if (x_53 == 0) +{ +return x_46; +} +else +{ +lean_object* x_54; lean_object* x_55; lean_object* x_56; +x_54 = lean_ctor_get(x_46, 0); +x_55 = lean_ctor_get(x_46, 1); +lean_inc(x_55); +lean_inc(x_54); +lean_dec(x_46); +x_56 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_56, 0, x_54); +lean_ctor_set(x_56, 1, x_55); +return x_56; +} +} +} +else +{ +lean_object* x_57; lean_object* x_58; lean_object* x_59; lean_object* x_60; lean_object* x_61; lean_object* x_62; lean_object* x_63; lean_object* x_64; +x_57 = lean_ctor_get(x_38, 0); +x_58 = lean_ctor_get(x_38, 1); +x_59 = lean_ctor_get(x_38, 2); +x_60 = lean_ctor_get(x_38, 3); +x_61 = lean_ctor_get(x_38, 4); +x_62 = lean_ctor_get(x_38, 6); +lean_inc(x_62); +lean_inc(x_61); +lean_inc(x_60); +lean_inc(x_59); +lean_inc(x_58); +lean_inc(x_57); +lean_dec(x_38); +x_63 = lean_alloc_ctor(0, 7, 0); +lean_ctor_set(x_63, 0, x_57); +lean_ctor_set(x_63, 1, x_58); +lean_ctor_set(x_63, 2, x_59); +lean_ctor_set(x_63, 3, x_60); +lean_ctor_set(x_63, 4, x_61); +lean_ctor_set(x_63, 5, x_1); +lean_ctor_set(x_63, 6, x_62); +lean_ctor_set(x_6, 0, x_63); +x_64 = l___private_Init_Lean_Elab_Command_3__setState(x_5, x_2, x_39); +if (lean_obj_tag(x_64) == 0) +{ +lean_object* x_65; lean_object* x_66; lean_object* x_67; lean_object* x_68; +x_65 = lean_ctor_get(x_64, 1); +lean_inc(x_65); +if (lean_is_exclusive(x_64)) { + lean_ctor_release(x_64, 0); + lean_ctor_release(x_64, 1); + x_66 = x_64; +} else { + lean_dec_ref(x_64); + x_66 = lean_box(0); +} +x_67 = lean_box(0); +if (lean_is_scalar(x_66)) { + x_68 = lean_alloc_ctor(0, 2, 0); +} else { + x_68 = x_66; +} +lean_ctor_set(x_68, 0, x_67); +lean_ctor_set(x_68, 1, x_65); +return x_68; +} +else +{ +lean_object* x_69; lean_object* x_70; lean_object* x_71; lean_object* x_72; +x_69 = lean_ctor_get(x_64, 0); +lean_inc(x_69); +x_70 = lean_ctor_get(x_64, 1); +lean_inc(x_70); +if (lean_is_exclusive(x_64)) { + lean_ctor_release(x_64, 0); + lean_ctor_release(x_64, 1); + x_71 = x_64; +} else { + lean_dec_ref(x_64); + x_71 = lean_box(0); +} +if (lean_is_scalar(x_71)) { + x_72 = lean_alloc_ctor(1, 2, 0); +} else { + x_72 = x_71; +} +lean_ctor_set(x_72, 0, x_69); +lean_ctor_set(x_72, 1, x_70); +return x_72; +} +} +} +else +{ +lean_object* x_73; lean_object* x_74; lean_object* x_75; lean_object* x_76; lean_object* x_77; lean_object* x_78; lean_object* x_79; lean_object* x_80; lean_object* x_81; lean_object* x_82; lean_object* x_83; +x_73 = lean_ctor_get(x_6, 1); +lean_inc(x_73); +lean_dec(x_6); +x_74 = lean_ctor_get(x_38, 0); +lean_inc(x_74); +x_75 = lean_ctor_get(x_38, 1); +lean_inc(x_75); +x_76 = lean_ctor_get(x_38, 2); +lean_inc(x_76); +x_77 = lean_ctor_get(x_38, 3); +lean_inc(x_77); +x_78 = lean_ctor_get(x_38, 4); +lean_inc(x_78); +x_79 = lean_ctor_get(x_38, 6); +lean_inc(x_79); +if (lean_is_exclusive(x_38)) { + lean_ctor_release(x_38, 0); + lean_ctor_release(x_38, 1); + lean_ctor_release(x_38, 2); + lean_ctor_release(x_38, 3); + lean_ctor_release(x_38, 4); + lean_ctor_release(x_38, 5); + lean_ctor_release(x_38, 6); + x_80 = x_38; +} else { + lean_dec_ref(x_38); + x_80 = lean_box(0); +} +if (lean_is_scalar(x_80)) { + x_81 = lean_alloc_ctor(0, 7, 0); +} else { + x_81 = x_80; +} +lean_ctor_set(x_81, 0, x_74); +lean_ctor_set(x_81, 1, x_75); +lean_ctor_set(x_81, 2, x_76); +lean_ctor_set(x_81, 3, x_77); +lean_ctor_set(x_81, 4, x_78); +lean_ctor_set(x_81, 5, x_1); +lean_ctor_set(x_81, 6, x_79); +x_82 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_82, 0, x_81); +lean_ctor_set(x_82, 1, x_73); +lean_ctor_set(x_5, 2, x_82); +x_83 = l___private_Init_Lean_Elab_Command_3__setState(x_5, x_2, x_39); +if (lean_obj_tag(x_83) == 0) +{ +lean_object* x_84; lean_object* x_85; lean_object* x_86; lean_object* x_87; +x_84 = lean_ctor_get(x_83, 1); +lean_inc(x_84); +if (lean_is_exclusive(x_83)) { + lean_ctor_release(x_83, 0); + lean_ctor_release(x_83, 1); + x_85 = x_83; +} else { + lean_dec_ref(x_83); + x_85 = lean_box(0); +} +x_86 = lean_box(0); +if (lean_is_scalar(x_85)) { + x_87 = lean_alloc_ctor(0, 2, 0); +} else { + x_87 = x_85; +} +lean_ctor_set(x_87, 0, x_86); +lean_ctor_set(x_87, 1, x_84); +return x_87; +} +else +{ +lean_object* x_88; lean_object* x_89; lean_object* x_90; lean_object* x_91; +x_88 = lean_ctor_get(x_83, 0); +lean_inc(x_88); +x_89 = lean_ctor_get(x_83, 1); +lean_inc(x_89); +if (lean_is_exclusive(x_83)) { + lean_ctor_release(x_83, 0); + lean_ctor_release(x_83, 1); + x_90 = x_83; +} else { + lean_dec_ref(x_83); + x_90 = lean_box(0); +} +if (lean_is_scalar(x_90)) { + x_91 = lean_alloc_ctor(1, 2, 0); +} else { + x_91 = x_90; +} +lean_ctor_set(x_91, 0, x_88); +lean_ctor_set(x_91, 1, x_89); +return x_91; +} +} +} +else +{ +lean_object* x_92; lean_object* x_93; lean_object* x_94; lean_object* x_95; lean_object* x_96; lean_object* x_97; lean_object* x_98; lean_object* x_99; lean_object* x_100; lean_object* x_101; lean_object* x_102; lean_object* x_103; lean_object* x_104; lean_object* x_105; lean_object* x_106; lean_object* x_107; +x_92 = lean_ctor_get(x_5, 0); +x_93 = lean_ctor_get(x_5, 1); +x_94 = lean_ctor_get(x_5, 3); +lean_inc(x_94); +lean_inc(x_93); +lean_inc(x_92); +lean_dec(x_5); +x_95 = lean_ctor_get(x_6, 1); +lean_inc(x_95); +if (lean_is_exclusive(x_6)) { + lean_ctor_release(x_6, 0); + lean_ctor_release(x_6, 1); + x_96 = x_6; +} else { + lean_dec_ref(x_6); + x_96 = lean_box(0); +} +x_97 = lean_ctor_get(x_38, 0); +lean_inc(x_97); +x_98 = lean_ctor_get(x_38, 1); +lean_inc(x_98); +x_99 = lean_ctor_get(x_38, 2); +lean_inc(x_99); +x_100 = lean_ctor_get(x_38, 3); +lean_inc(x_100); +x_101 = lean_ctor_get(x_38, 4); +lean_inc(x_101); +x_102 = lean_ctor_get(x_38, 6); +lean_inc(x_102); +if (lean_is_exclusive(x_38)) { + lean_ctor_release(x_38, 0); + lean_ctor_release(x_38, 1); + lean_ctor_release(x_38, 2); + lean_ctor_release(x_38, 3); + lean_ctor_release(x_38, 4); + lean_ctor_release(x_38, 5); + lean_ctor_release(x_38, 6); + x_103 = x_38; +} else { + lean_dec_ref(x_38); + x_103 = lean_box(0); +} +if (lean_is_scalar(x_103)) { + x_104 = lean_alloc_ctor(0, 7, 0); +} else { + x_104 = x_103; +} +lean_ctor_set(x_104, 0, x_97); +lean_ctor_set(x_104, 1, x_98); +lean_ctor_set(x_104, 2, x_99); +lean_ctor_set(x_104, 3, x_100); +lean_ctor_set(x_104, 4, x_101); +lean_ctor_set(x_104, 5, x_1); +lean_ctor_set(x_104, 6, x_102); +if (lean_is_scalar(x_96)) { + x_105 = lean_alloc_ctor(1, 2, 0); +} else { + x_105 = x_96; +} +lean_ctor_set(x_105, 0, x_104); +lean_ctor_set(x_105, 1, x_95); +x_106 = lean_alloc_ctor(0, 4, 0); +lean_ctor_set(x_106, 0, x_92); +lean_ctor_set(x_106, 1, x_93); +lean_ctor_set(x_106, 2, x_105); +lean_ctor_set(x_106, 3, x_94); +x_107 = l___private_Init_Lean_Elab_Command_3__setState(x_106, x_2, x_39); +if (lean_obj_tag(x_107) == 0) +{ +lean_object* x_108; lean_object* x_109; lean_object* x_110; lean_object* x_111; +x_108 = lean_ctor_get(x_107, 1); +lean_inc(x_108); +if (lean_is_exclusive(x_107)) { + lean_ctor_release(x_107, 0); + lean_ctor_release(x_107, 1); + x_109 = x_107; +} else { + lean_dec_ref(x_107); + x_109 = lean_box(0); +} +x_110 = lean_box(0); +if (lean_is_scalar(x_109)) { + x_111 = lean_alloc_ctor(0, 2, 0); +} else { + x_111 = x_109; +} +lean_ctor_set(x_111, 0, x_110); +lean_ctor_set(x_111, 1, x_108); +return x_111; +} +else +{ +lean_object* x_112; lean_object* x_113; lean_object* x_114; lean_object* x_115; +x_112 = lean_ctor_get(x_107, 0); +lean_inc(x_112); +x_113 = lean_ctor_get(x_107, 1); +lean_inc(x_113); +if (lean_is_exclusive(x_107)) { + lean_ctor_release(x_107, 0); + lean_ctor_release(x_107, 1); + x_114 = x_107; +} else { + lean_dec_ref(x_107); + x_114 = lean_box(0); +} +if (lean_is_scalar(x_114)) { + x_115 = lean_alloc_ctor(1, 2, 0); +} else { + x_115 = x_114; +} +lean_ctor_set(x_115, 0, x_112); +lean_ctor_set(x_115, 1, x_113); +return x_115; +} +} +} +} +else +{ +uint8_t x_116; +lean_dec(x_2); +lean_dec(x_1); +x_116 = !lean_is_exclusive(x_4); +if (x_116 == 0) +{ +return x_4; +} +else +{ +lean_object* x_117; lean_object* x_118; lean_object* x_119; +x_117 = lean_ctor_get(x_4, 0); +x_118 = lean_ctor_get(x_4, 1); +lean_inc(x_118); +lean_inc(x_117); +lean_dec(x_4); +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; +} +} +} +} +lean_object* l_Lean_Elab_Command_modifyScope___at_Lean_Elab_Command_elabAxiom___spec__3(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +_start: +{ +lean_object* x_4; +lean_inc(x_2); +x_4 = l___private_Init_Lean_Elab_Command_2__getState(x_2, x_3); +if (lean_obj_tag(x_4) == 0) +{ +lean_object* x_5; lean_object* x_6; +x_5 = lean_ctor_get(x_4, 0); +lean_inc(x_5); +x_6 = lean_ctor_get(x_5, 2); +lean_inc(x_6); +if (lean_obj_tag(x_6) == 0) +{ +lean_object* x_7; uint8_t x_8; +lean_dec(x_1); +x_7 = lean_ctor_get(x_4, 1); +lean_inc(x_7); +lean_dec(x_4); +x_8 = !lean_is_exclusive(x_5); +if (x_8 == 0) +{ +lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; +x_9 = lean_ctor_get(x_5, 2); +lean_dec(x_9); +x_10 = l_Lean_Elab_Command_modifyScope___closed__1; +x_11 = l_unreachable_x21___rarg(x_10); +lean_ctor_set(x_5, 2, x_11); +x_12 = l___private_Init_Lean_Elab_Command_3__setState(x_5, x_2, x_7); +if (lean_obj_tag(x_12) == 0) +{ +uint8_t x_13; +x_13 = !lean_is_exclusive(x_12); +if (x_13 == 0) +{ +lean_object* x_14; lean_object* x_15; +x_14 = lean_ctor_get(x_12, 0); +lean_dec(x_14); +x_15 = lean_box(0); +lean_ctor_set(x_12, 0, x_15); +return x_12; +} +else +{ +lean_object* x_16; lean_object* x_17; lean_object* x_18; +x_16 = lean_ctor_get(x_12, 1); +lean_inc(x_16); +lean_dec(x_12); +x_17 = lean_box(0); +x_18 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_18, 0, x_17); +lean_ctor_set(x_18, 1, x_16); +return x_18; +} +} +else +{ +uint8_t x_19; +x_19 = !lean_is_exclusive(x_12); +if (x_19 == 0) +{ +return x_12; +} +else +{ +lean_object* x_20; lean_object* x_21; lean_object* x_22; +x_20 = lean_ctor_get(x_12, 0); +x_21 = lean_ctor_get(x_12, 1); +lean_inc(x_21); +lean_inc(x_20); +lean_dec(x_12); +x_22 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_22, 0, x_20); +lean_ctor_set(x_22, 1, x_21); +return x_22; +} +} +} +else +{ +lean_object* x_23; lean_object* x_24; lean_object* x_25; lean_object* x_26; lean_object* x_27; lean_object* x_28; lean_object* x_29; +x_23 = lean_ctor_get(x_5, 0); +x_24 = lean_ctor_get(x_5, 1); +x_25 = lean_ctor_get(x_5, 3); +lean_inc(x_25); +lean_inc(x_24); +lean_inc(x_23); +lean_dec(x_5); +x_26 = l_Lean_Elab_Command_modifyScope___closed__1; +x_27 = l_unreachable_x21___rarg(x_26); +x_28 = lean_alloc_ctor(0, 4, 0); +lean_ctor_set(x_28, 0, x_23); +lean_ctor_set(x_28, 1, x_24); +lean_ctor_set(x_28, 2, x_27); +lean_ctor_set(x_28, 3, x_25); +x_29 = l___private_Init_Lean_Elab_Command_3__setState(x_28, x_2, x_7); +if (lean_obj_tag(x_29) == 0) +{ +lean_object* x_30; lean_object* x_31; lean_object* x_32; lean_object* x_33; +x_30 = lean_ctor_get(x_29, 1); +lean_inc(x_30); +if (lean_is_exclusive(x_29)) { + lean_ctor_release(x_29, 0); + lean_ctor_release(x_29, 1); + x_31 = x_29; +} else { + lean_dec_ref(x_29); + x_31 = lean_box(0); +} +x_32 = lean_box(0); +if (lean_is_scalar(x_31)) { + x_33 = lean_alloc_ctor(0, 2, 0); +} else { + x_33 = x_31; +} +lean_ctor_set(x_33, 0, x_32); +lean_ctor_set(x_33, 1, x_30); +return x_33; +} +else +{ +lean_object* x_34; lean_object* x_35; lean_object* x_36; lean_object* x_37; +x_34 = lean_ctor_get(x_29, 0); +lean_inc(x_34); +x_35 = lean_ctor_get(x_29, 1); +lean_inc(x_35); +if (lean_is_exclusive(x_29)) { + lean_ctor_release(x_29, 0); + lean_ctor_release(x_29, 1); + x_36 = x_29; +} else { + lean_dec_ref(x_29); + x_36 = lean_box(0); +} +if (lean_is_scalar(x_36)) { + x_37 = lean_alloc_ctor(1, 2, 0); +} else { + x_37 = x_36; +} +lean_ctor_set(x_37, 0, x_34); +lean_ctor_set(x_37, 1, x_35); +return x_37; +} +} +} +else +{ +lean_object* x_38; lean_object* x_39; uint8_t x_40; +x_38 = lean_ctor_get(x_6, 0); +lean_inc(x_38); +x_39 = lean_ctor_get(x_4, 1); +lean_inc(x_39); +lean_dec(x_4); +x_40 = !lean_is_exclusive(x_5); +if (x_40 == 0) +{ +lean_object* x_41; uint8_t x_42; +x_41 = lean_ctor_get(x_5, 2); +lean_dec(x_41); +x_42 = !lean_is_exclusive(x_6); +if (x_42 == 0) +{ +lean_object* x_43; uint8_t x_44; +x_43 = lean_ctor_get(x_6, 0); +lean_dec(x_43); +x_44 = !lean_is_exclusive(x_38); +if (x_44 == 0) +{ +lean_object* x_45; lean_object* x_46; +x_45 = lean_ctor_get(x_38, 5); +lean_dec(x_45); +lean_ctor_set(x_38, 5, x_1); +x_46 = l___private_Init_Lean_Elab_Command_3__setState(x_5, x_2, x_39); +if (lean_obj_tag(x_46) == 0) +{ +uint8_t x_47; +x_47 = !lean_is_exclusive(x_46); +if (x_47 == 0) +{ +lean_object* x_48; lean_object* x_49; +x_48 = lean_ctor_get(x_46, 0); +lean_dec(x_48); +x_49 = lean_box(0); +lean_ctor_set(x_46, 0, x_49); +return x_46; +} +else +{ +lean_object* x_50; lean_object* x_51; lean_object* x_52; +x_50 = lean_ctor_get(x_46, 1); +lean_inc(x_50); +lean_dec(x_46); +x_51 = lean_box(0); +x_52 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_52, 0, x_51); +lean_ctor_set(x_52, 1, x_50); +return x_52; +} +} +else +{ +uint8_t x_53; +x_53 = !lean_is_exclusive(x_46); +if (x_53 == 0) +{ +return x_46; +} +else +{ +lean_object* x_54; lean_object* x_55; lean_object* x_56; +x_54 = lean_ctor_get(x_46, 0); +x_55 = lean_ctor_get(x_46, 1); +lean_inc(x_55); +lean_inc(x_54); +lean_dec(x_46); +x_56 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_56, 0, x_54); +lean_ctor_set(x_56, 1, x_55); +return x_56; +} +} +} +else +{ +lean_object* x_57; lean_object* x_58; lean_object* x_59; lean_object* x_60; lean_object* x_61; lean_object* x_62; lean_object* x_63; lean_object* x_64; +x_57 = lean_ctor_get(x_38, 0); +x_58 = lean_ctor_get(x_38, 1); +x_59 = lean_ctor_get(x_38, 2); +x_60 = lean_ctor_get(x_38, 3); +x_61 = lean_ctor_get(x_38, 4); +x_62 = lean_ctor_get(x_38, 6); +lean_inc(x_62); +lean_inc(x_61); +lean_inc(x_60); +lean_inc(x_59); +lean_inc(x_58); +lean_inc(x_57); +lean_dec(x_38); +x_63 = lean_alloc_ctor(0, 7, 0); +lean_ctor_set(x_63, 0, x_57); +lean_ctor_set(x_63, 1, x_58); +lean_ctor_set(x_63, 2, x_59); +lean_ctor_set(x_63, 3, x_60); +lean_ctor_set(x_63, 4, x_61); +lean_ctor_set(x_63, 5, x_1); +lean_ctor_set(x_63, 6, x_62); +lean_ctor_set(x_6, 0, x_63); +x_64 = l___private_Init_Lean_Elab_Command_3__setState(x_5, x_2, x_39); +if (lean_obj_tag(x_64) == 0) +{ +lean_object* x_65; lean_object* x_66; lean_object* x_67; lean_object* x_68; +x_65 = lean_ctor_get(x_64, 1); +lean_inc(x_65); +if (lean_is_exclusive(x_64)) { + lean_ctor_release(x_64, 0); + lean_ctor_release(x_64, 1); + x_66 = x_64; +} else { + lean_dec_ref(x_64); + x_66 = lean_box(0); +} +x_67 = lean_box(0); +if (lean_is_scalar(x_66)) { + x_68 = lean_alloc_ctor(0, 2, 0); +} else { + x_68 = x_66; +} +lean_ctor_set(x_68, 0, x_67); +lean_ctor_set(x_68, 1, x_65); +return x_68; +} +else +{ +lean_object* x_69; lean_object* x_70; lean_object* x_71; lean_object* x_72; +x_69 = lean_ctor_get(x_64, 0); +lean_inc(x_69); +x_70 = lean_ctor_get(x_64, 1); +lean_inc(x_70); +if (lean_is_exclusive(x_64)) { + lean_ctor_release(x_64, 0); + lean_ctor_release(x_64, 1); + x_71 = x_64; +} else { + lean_dec_ref(x_64); + x_71 = lean_box(0); +} +if (lean_is_scalar(x_71)) { + x_72 = lean_alloc_ctor(1, 2, 0); +} else { + x_72 = x_71; +} +lean_ctor_set(x_72, 0, x_69); +lean_ctor_set(x_72, 1, x_70); +return x_72; +} +} +} +else +{ +lean_object* x_73; lean_object* x_74; lean_object* x_75; lean_object* x_76; lean_object* x_77; lean_object* x_78; lean_object* x_79; lean_object* x_80; lean_object* x_81; lean_object* x_82; lean_object* x_83; +x_73 = lean_ctor_get(x_6, 1); +lean_inc(x_73); +lean_dec(x_6); +x_74 = lean_ctor_get(x_38, 0); +lean_inc(x_74); +x_75 = lean_ctor_get(x_38, 1); +lean_inc(x_75); +x_76 = lean_ctor_get(x_38, 2); +lean_inc(x_76); +x_77 = lean_ctor_get(x_38, 3); +lean_inc(x_77); +x_78 = lean_ctor_get(x_38, 4); +lean_inc(x_78); +x_79 = lean_ctor_get(x_38, 6); +lean_inc(x_79); +if (lean_is_exclusive(x_38)) { + lean_ctor_release(x_38, 0); + lean_ctor_release(x_38, 1); + lean_ctor_release(x_38, 2); + lean_ctor_release(x_38, 3); + lean_ctor_release(x_38, 4); + lean_ctor_release(x_38, 5); + lean_ctor_release(x_38, 6); + x_80 = x_38; +} else { + lean_dec_ref(x_38); + x_80 = lean_box(0); +} +if (lean_is_scalar(x_80)) { + x_81 = lean_alloc_ctor(0, 7, 0); +} else { + x_81 = x_80; +} +lean_ctor_set(x_81, 0, x_74); +lean_ctor_set(x_81, 1, x_75); +lean_ctor_set(x_81, 2, x_76); +lean_ctor_set(x_81, 3, x_77); +lean_ctor_set(x_81, 4, x_78); +lean_ctor_set(x_81, 5, x_1); +lean_ctor_set(x_81, 6, x_79); +x_82 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_82, 0, x_81); +lean_ctor_set(x_82, 1, x_73); +lean_ctor_set(x_5, 2, x_82); +x_83 = l___private_Init_Lean_Elab_Command_3__setState(x_5, x_2, x_39); +if (lean_obj_tag(x_83) == 0) +{ +lean_object* x_84; lean_object* x_85; lean_object* x_86; lean_object* x_87; +x_84 = lean_ctor_get(x_83, 1); +lean_inc(x_84); +if (lean_is_exclusive(x_83)) { + lean_ctor_release(x_83, 0); + lean_ctor_release(x_83, 1); + x_85 = x_83; +} else { + lean_dec_ref(x_83); + x_85 = lean_box(0); +} +x_86 = lean_box(0); +if (lean_is_scalar(x_85)) { + x_87 = lean_alloc_ctor(0, 2, 0); +} else { + x_87 = x_85; +} +lean_ctor_set(x_87, 0, x_86); +lean_ctor_set(x_87, 1, x_84); +return x_87; +} +else +{ +lean_object* x_88; lean_object* x_89; lean_object* x_90; lean_object* x_91; +x_88 = lean_ctor_get(x_83, 0); +lean_inc(x_88); +x_89 = lean_ctor_get(x_83, 1); +lean_inc(x_89); +if (lean_is_exclusive(x_83)) { + lean_ctor_release(x_83, 0); + lean_ctor_release(x_83, 1); + x_90 = x_83; +} else { + lean_dec_ref(x_83); + x_90 = lean_box(0); +} +if (lean_is_scalar(x_90)) { + x_91 = lean_alloc_ctor(1, 2, 0); +} else { + x_91 = x_90; +} +lean_ctor_set(x_91, 0, x_88); +lean_ctor_set(x_91, 1, x_89); +return x_91; +} +} +} +else +{ +lean_object* x_92; lean_object* x_93; lean_object* x_94; lean_object* x_95; lean_object* x_96; lean_object* x_97; lean_object* x_98; lean_object* x_99; lean_object* x_100; lean_object* x_101; lean_object* x_102; lean_object* x_103; lean_object* x_104; lean_object* x_105; lean_object* x_106; lean_object* x_107; +x_92 = lean_ctor_get(x_5, 0); +x_93 = lean_ctor_get(x_5, 1); +x_94 = lean_ctor_get(x_5, 3); +lean_inc(x_94); +lean_inc(x_93); +lean_inc(x_92); +lean_dec(x_5); +x_95 = lean_ctor_get(x_6, 1); +lean_inc(x_95); +if (lean_is_exclusive(x_6)) { + lean_ctor_release(x_6, 0); + lean_ctor_release(x_6, 1); + x_96 = x_6; +} else { + lean_dec_ref(x_6); + x_96 = lean_box(0); +} +x_97 = lean_ctor_get(x_38, 0); +lean_inc(x_97); +x_98 = lean_ctor_get(x_38, 1); +lean_inc(x_98); +x_99 = lean_ctor_get(x_38, 2); +lean_inc(x_99); +x_100 = lean_ctor_get(x_38, 3); +lean_inc(x_100); +x_101 = lean_ctor_get(x_38, 4); +lean_inc(x_101); +x_102 = lean_ctor_get(x_38, 6); +lean_inc(x_102); +if (lean_is_exclusive(x_38)) { + lean_ctor_release(x_38, 0); + lean_ctor_release(x_38, 1); + lean_ctor_release(x_38, 2); + lean_ctor_release(x_38, 3); + lean_ctor_release(x_38, 4); + lean_ctor_release(x_38, 5); + lean_ctor_release(x_38, 6); + x_103 = x_38; +} else { + lean_dec_ref(x_38); + x_103 = lean_box(0); +} +if (lean_is_scalar(x_103)) { + x_104 = lean_alloc_ctor(0, 7, 0); +} else { + x_104 = x_103; +} +lean_ctor_set(x_104, 0, x_97); +lean_ctor_set(x_104, 1, x_98); +lean_ctor_set(x_104, 2, x_99); +lean_ctor_set(x_104, 3, x_100); +lean_ctor_set(x_104, 4, x_101); +lean_ctor_set(x_104, 5, x_1); +lean_ctor_set(x_104, 6, x_102); +if (lean_is_scalar(x_96)) { + x_105 = lean_alloc_ctor(1, 2, 0); +} else { + x_105 = x_96; +} +lean_ctor_set(x_105, 0, x_104); +lean_ctor_set(x_105, 1, x_95); +x_106 = lean_alloc_ctor(0, 4, 0); +lean_ctor_set(x_106, 0, x_92); +lean_ctor_set(x_106, 1, x_93); +lean_ctor_set(x_106, 2, x_105); +lean_ctor_set(x_106, 3, x_94); +x_107 = l___private_Init_Lean_Elab_Command_3__setState(x_106, x_2, x_39); +if (lean_obj_tag(x_107) == 0) +{ +lean_object* x_108; lean_object* x_109; lean_object* x_110; lean_object* x_111; +x_108 = lean_ctor_get(x_107, 1); +lean_inc(x_108); +if (lean_is_exclusive(x_107)) { + lean_ctor_release(x_107, 0); + lean_ctor_release(x_107, 1); + x_109 = x_107; +} else { + lean_dec_ref(x_107); + x_109 = lean_box(0); +} +x_110 = lean_box(0); +if (lean_is_scalar(x_109)) { + x_111 = lean_alloc_ctor(0, 2, 0); +} else { + x_111 = x_109; +} +lean_ctor_set(x_111, 0, x_110); +lean_ctor_set(x_111, 1, x_108); +return x_111; +} +else +{ +lean_object* x_112; lean_object* x_113; lean_object* x_114; lean_object* x_115; +x_112 = lean_ctor_get(x_107, 0); +lean_inc(x_112); +x_113 = lean_ctor_get(x_107, 1); +lean_inc(x_113); +if (lean_is_exclusive(x_107)) { + lean_ctor_release(x_107, 0); + lean_ctor_release(x_107, 1); + x_114 = x_107; +} else { + lean_dec_ref(x_107); + x_114 = lean_box(0); +} +if (lean_is_scalar(x_114)) { + x_115 = lean_alloc_ctor(1, 2, 0); +} else { + x_115 = x_114; +} +lean_ctor_set(x_115, 0, x_112); +lean_ctor_set(x_115, 1, x_113); +return x_115; +} +} +} +} +else +{ +uint8_t x_116; +lean_dec(x_2); +lean_dec(x_1); +x_116 = !lean_is_exclusive(x_4); +if (x_116 == 0) +{ +return x_4; +} +else +{ +lean_object* x_117; lean_object* x_118; lean_object* x_119; +x_117 = lean_ctor_get(x_4, 0); +x_118 = lean_ctor_get(x_4, 1); +lean_inc(x_118); +lean_inc(x_117); +lean_dec(x_4); +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; +} +} +} +} +lean_object* l_Lean_Elab_Command_modifyScope___at_Lean_Elab_Command_elabAxiom___spec__4(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +_start: +{ +lean_object* x_4; +lean_inc(x_2); +x_4 = l___private_Init_Lean_Elab_Command_2__getState(x_2, x_3); +if (lean_obj_tag(x_4) == 0) +{ +lean_object* x_5; lean_object* x_6; +x_5 = lean_ctor_get(x_4, 0); +lean_inc(x_5); +x_6 = lean_ctor_get(x_5, 2); +lean_inc(x_6); +if (lean_obj_tag(x_6) == 0) +{ +lean_object* x_7; uint8_t x_8; +lean_dec(x_1); +x_7 = lean_ctor_get(x_4, 1); +lean_inc(x_7); +lean_dec(x_4); +x_8 = !lean_is_exclusive(x_5); +if (x_8 == 0) +{ +lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; +x_9 = lean_ctor_get(x_5, 2); +lean_dec(x_9); +x_10 = l_Lean_Elab_Command_modifyScope___closed__1; +x_11 = l_unreachable_x21___rarg(x_10); +lean_ctor_set(x_5, 2, x_11); +x_12 = l___private_Init_Lean_Elab_Command_3__setState(x_5, x_2, x_7); +if (lean_obj_tag(x_12) == 0) +{ +uint8_t x_13; +x_13 = !lean_is_exclusive(x_12); +if (x_13 == 0) +{ +lean_object* x_14; lean_object* x_15; +x_14 = lean_ctor_get(x_12, 0); +lean_dec(x_14); +x_15 = lean_box(0); +lean_ctor_set(x_12, 0, x_15); +return x_12; +} +else +{ +lean_object* x_16; lean_object* x_17; lean_object* x_18; +x_16 = lean_ctor_get(x_12, 1); +lean_inc(x_16); +lean_dec(x_12); +x_17 = lean_box(0); +x_18 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_18, 0, x_17); +lean_ctor_set(x_18, 1, x_16); +return x_18; +} +} +else +{ +uint8_t x_19; +x_19 = !lean_is_exclusive(x_12); +if (x_19 == 0) +{ +return x_12; +} +else +{ +lean_object* x_20; lean_object* x_21; lean_object* x_22; +x_20 = lean_ctor_get(x_12, 0); +x_21 = lean_ctor_get(x_12, 1); +lean_inc(x_21); +lean_inc(x_20); +lean_dec(x_12); +x_22 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_22, 0, x_20); +lean_ctor_set(x_22, 1, x_21); +return x_22; +} +} +} +else +{ +lean_object* x_23; lean_object* x_24; lean_object* x_25; lean_object* x_26; lean_object* x_27; lean_object* x_28; lean_object* x_29; +x_23 = lean_ctor_get(x_5, 0); +x_24 = lean_ctor_get(x_5, 1); +x_25 = lean_ctor_get(x_5, 3); +lean_inc(x_25); +lean_inc(x_24); +lean_inc(x_23); +lean_dec(x_5); +x_26 = l_Lean_Elab_Command_modifyScope___closed__1; +x_27 = l_unreachable_x21___rarg(x_26); +x_28 = lean_alloc_ctor(0, 4, 0); +lean_ctor_set(x_28, 0, x_23); +lean_ctor_set(x_28, 1, x_24); +lean_ctor_set(x_28, 2, x_27); +lean_ctor_set(x_28, 3, x_25); +x_29 = l___private_Init_Lean_Elab_Command_3__setState(x_28, x_2, x_7); +if (lean_obj_tag(x_29) == 0) +{ +lean_object* x_30; lean_object* x_31; lean_object* x_32; lean_object* x_33; +x_30 = lean_ctor_get(x_29, 1); +lean_inc(x_30); +if (lean_is_exclusive(x_29)) { + lean_ctor_release(x_29, 0); + lean_ctor_release(x_29, 1); + x_31 = x_29; +} else { + lean_dec_ref(x_29); + x_31 = lean_box(0); +} +x_32 = lean_box(0); +if (lean_is_scalar(x_31)) { + x_33 = lean_alloc_ctor(0, 2, 0); +} else { + x_33 = x_31; +} +lean_ctor_set(x_33, 0, x_32); +lean_ctor_set(x_33, 1, x_30); +return x_33; +} +else +{ +lean_object* x_34; lean_object* x_35; lean_object* x_36; lean_object* x_37; +x_34 = lean_ctor_get(x_29, 0); +lean_inc(x_34); +x_35 = lean_ctor_get(x_29, 1); +lean_inc(x_35); +if (lean_is_exclusive(x_29)) { + lean_ctor_release(x_29, 0); + lean_ctor_release(x_29, 1); + x_36 = x_29; +} else { + lean_dec_ref(x_29); + x_36 = lean_box(0); +} +if (lean_is_scalar(x_36)) { + x_37 = lean_alloc_ctor(1, 2, 0); +} else { + x_37 = x_36; +} +lean_ctor_set(x_37, 0, x_34); +lean_ctor_set(x_37, 1, x_35); +return x_37; +} +} +} +else +{ +lean_object* x_38; lean_object* x_39; uint8_t x_40; +x_38 = lean_ctor_get(x_6, 0); +lean_inc(x_38); +x_39 = lean_ctor_get(x_4, 1); +lean_inc(x_39); +lean_dec(x_4); +x_40 = !lean_is_exclusive(x_5); +if (x_40 == 0) +{ +lean_object* x_41; uint8_t x_42; +x_41 = lean_ctor_get(x_5, 2); +lean_dec(x_41); +x_42 = !lean_is_exclusive(x_6); +if (x_42 == 0) +{ +lean_object* x_43; uint8_t x_44; +x_43 = lean_ctor_get(x_6, 0); +lean_dec(x_43); +x_44 = !lean_is_exclusive(x_38); +if (x_44 == 0) +{ +lean_object* x_45; lean_object* x_46; +x_45 = lean_ctor_get(x_38, 5); +lean_dec(x_45); +lean_ctor_set(x_38, 5, x_1); +x_46 = l___private_Init_Lean_Elab_Command_3__setState(x_5, x_2, x_39); +if (lean_obj_tag(x_46) == 0) +{ +uint8_t x_47; +x_47 = !lean_is_exclusive(x_46); +if (x_47 == 0) +{ +lean_object* x_48; lean_object* x_49; +x_48 = lean_ctor_get(x_46, 0); +lean_dec(x_48); +x_49 = lean_box(0); +lean_ctor_set(x_46, 0, x_49); +return x_46; +} +else +{ +lean_object* x_50; lean_object* x_51; lean_object* x_52; +x_50 = lean_ctor_get(x_46, 1); +lean_inc(x_50); +lean_dec(x_46); +x_51 = lean_box(0); +x_52 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_52, 0, x_51); +lean_ctor_set(x_52, 1, x_50); +return x_52; +} +} +else +{ +uint8_t x_53; +x_53 = !lean_is_exclusive(x_46); +if (x_53 == 0) +{ +return x_46; +} +else +{ +lean_object* x_54; lean_object* x_55; lean_object* x_56; +x_54 = lean_ctor_get(x_46, 0); +x_55 = lean_ctor_get(x_46, 1); +lean_inc(x_55); +lean_inc(x_54); +lean_dec(x_46); +x_56 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_56, 0, x_54); +lean_ctor_set(x_56, 1, x_55); +return x_56; +} +} +} +else +{ +lean_object* x_57; lean_object* x_58; lean_object* x_59; lean_object* x_60; lean_object* x_61; lean_object* x_62; lean_object* x_63; lean_object* x_64; +x_57 = lean_ctor_get(x_38, 0); +x_58 = lean_ctor_get(x_38, 1); +x_59 = lean_ctor_get(x_38, 2); +x_60 = lean_ctor_get(x_38, 3); +x_61 = lean_ctor_get(x_38, 4); +x_62 = lean_ctor_get(x_38, 6); +lean_inc(x_62); +lean_inc(x_61); +lean_inc(x_60); +lean_inc(x_59); +lean_inc(x_58); +lean_inc(x_57); +lean_dec(x_38); +x_63 = lean_alloc_ctor(0, 7, 0); +lean_ctor_set(x_63, 0, x_57); +lean_ctor_set(x_63, 1, x_58); +lean_ctor_set(x_63, 2, x_59); +lean_ctor_set(x_63, 3, x_60); +lean_ctor_set(x_63, 4, x_61); +lean_ctor_set(x_63, 5, x_1); +lean_ctor_set(x_63, 6, x_62); +lean_ctor_set(x_6, 0, x_63); +x_64 = l___private_Init_Lean_Elab_Command_3__setState(x_5, x_2, x_39); +if (lean_obj_tag(x_64) == 0) +{ +lean_object* x_65; lean_object* x_66; lean_object* x_67; lean_object* x_68; +x_65 = lean_ctor_get(x_64, 1); +lean_inc(x_65); +if (lean_is_exclusive(x_64)) { + lean_ctor_release(x_64, 0); + lean_ctor_release(x_64, 1); + x_66 = x_64; +} else { + lean_dec_ref(x_64); + x_66 = lean_box(0); +} +x_67 = lean_box(0); +if (lean_is_scalar(x_66)) { + x_68 = lean_alloc_ctor(0, 2, 0); +} else { + x_68 = x_66; +} +lean_ctor_set(x_68, 0, x_67); +lean_ctor_set(x_68, 1, x_65); +return x_68; +} +else +{ +lean_object* x_69; lean_object* x_70; lean_object* x_71; lean_object* x_72; +x_69 = lean_ctor_get(x_64, 0); +lean_inc(x_69); +x_70 = lean_ctor_get(x_64, 1); +lean_inc(x_70); +if (lean_is_exclusive(x_64)) { + lean_ctor_release(x_64, 0); + lean_ctor_release(x_64, 1); + x_71 = x_64; +} else { + lean_dec_ref(x_64); + x_71 = lean_box(0); +} +if (lean_is_scalar(x_71)) { + x_72 = lean_alloc_ctor(1, 2, 0); +} else { + x_72 = x_71; +} +lean_ctor_set(x_72, 0, x_69); +lean_ctor_set(x_72, 1, x_70); +return x_72; +} +} +} +else +{ +lean_object* x_73; lean_object* x_74; lean_object* x_75; lean_object* x_76; lean_object* x_77; lean_object* x_78; lean_object* x_79; lean_object* x_80; lean_object* x_81; lean_object* x_82; lean_object* x_83; +x_73 = lean_ctor_get(x_6, 1); +lean_inc(x_73); +lean_dec(x_6); +x_74 = lean_ctor_get(x_38, 0); +lean_inc(x_74); +x_75 = lean_ctor_get(x_38, 1); +lean_inc(x_75); +x_76 = lean_ctor_get(x_38, 2); +lean_inc(x_76); +x_77 = lean_ctor_get(x_38, 3); +lean_inc(x_77); +x_78 = lean_ctor_get(x_38, 4); +lean_inc(x_78); +x_79 = lean_ctor_get(x_38, 6); +lean_inc(x_79); +if (lean_is_exclusive(x_38)) { + lean_ctor_release(x_38, 0); + lean_ctor_release(x_38, 1); + lean_ctor_release(x_38, 2); + lean_ctor_release(x_38, 3); + lean_ctor_release(x_38, 4); + lean_ctor_release(x_38, 5); + lean_ctor_release(x_38, 6); + x_80 = x_38; +} else { + lean_dec_ref(x_38); + x_80 = lean_box(0); +} +if (lean_is_scalar(x_80)) { + x_81 = lean_alloc_ctor(0, 7, 0); +} else { + x_81 = x_80; +} +lean_ctor_set(x_81, 0, x_74); +lean_ctor_set(x_81, 1, x_75); +lean_ctor_set(x_81, 2, x_76); +lean_ctor_set(x_81, 3, x_77); +lean_ctor_set(x_81, 4, x_78); +lean_ctor_set(x_81, 5, x_1); +lean_ctor_set(x_81, 6, x_79); +x_82 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_82, 0, x_81); +lean_ctor_set(x_82, 1, x_73); +lean_ctor_set(x_5, 2, x_82); +x_83 = l___private_Init_Lean_Elab_Command_3__setState(x_5, x_2, x_39); +if (lean_obj_tag(x_83) == 0) +{ +lean_object* x_84; lean_object* x_85; lean_object* x_86; lean_object* x_87; +x_84 = lean_ctor_get(x_83, 1); +lean_inc(x_84); +if (lean_is_exclusive(x_83)) { + lean_ctor_release(x_83, 0); + lean_ctor_release(x_83, 1); + x_85 = x_83; +} else { + lean_dec_ref(x_83); + x_85 = lean_box(0); +} +x_86 = lean_box(0); +if (lean_is_scalar(x_85)) { + x_87 = lean_alloc_ctor(0, 2, 0); +} else { + x_87 = x_85; +} +lean_ctor_set(x_87, 0, x_86); +lean_ctor_set(x_87, 1, x_84); +return x_87; +} +else +{ +lean_object* x_88; lean_object* x_89; lean_object* x_90; lean_object* x_91; +x_88 = lean_ctor_get(x_83, 0); +lean_inc(x_88); +x_89 = lean_ctor_get(x_83, 1); +lean_inc(x_89); +if (lean_is_exclusive(x_83)) { + lean_ctor_release(x_83, 0); + lean_ctor_release(x_83, 1); + x_90 = x_83; +} else { + lean_dec_ref(x_83); + x_90 = lean_box(0); +} +if (lean_is_scalar(x_90)) { + x_91 = lean_alloc_ctor(1, 2, 0); +} else { + x_91 = x_90; +} +lean_ctor_set(x_91, 0, x_88); +lean_ctor_set(x_91, 1, x_89); +return x_91; +} +} +} +else +{ +lean_object* x_92; lean_object* x_93; lean_object* x_94; lean_object* x_95; lean_object* x_96; lean_object* x_97; lean_object* x_98; lean_object* x_99; lean_object* x_100; lean_object* x_101; lean_object* x_102; lean_object* x_103; lean_object* x_104; lean_object* x_105; lean_object* x_106; lean_object* x_107; +x_92 = lean_ctor_get(x_5, 0); +x_93 = lean_ctor_get(x_5, 1); +x_94 = lean_ctor_get(x_5, 3); +lean_inc(x_94); +lean_inc(x_93); +lean_inc(x_92); +lean_dec(x_5); +x_95 = lean_ctor_get(x_6, 1); +lean_inc(x_95); +if (lean_is_exclusive(x_6)) { + lean_ctor_release(x_6, 0); + lean_ctor_release(x_6, 1); + x_96 = x_6; +} else { + lean_dec_ref(x_6); + x_96 = lean_box(0); +} +x_97 = lean_ctor_get(x_38, 0); +lean_inc(x_97); +x_98 = lean_ctor_get(x_38, 1); +lean_inc(x_98); +x_99 = lean_ctor_get(x_38, 2); +lean_inc(x_99); +x_100 = lean_ctor_get(x_38, 3); +lean_inc(x_100); +x_101 = lean_ctor_get(x_38, 4); +lean_inc(x_101); +x_102 = lean_ctor_get(x_38, 6); +lean_inc(x_102); +if (lean_is_exclusive(x_38)) { + lean_ctor_release(x_38, 0); + lean_ctor_release(x_38, 1); + lean_ctor_release(x_38, 2); + lean_ctor_release(x_38, 3); + lean_ctor_release(x_38, 4); + lean_ctor_release(x_38, 5); + lean_ctor_release(x_38, 6); + x_103 = x_38; +} else { + lean_dec_ref(x_38); + x_103 = lean_box(0); +} +if (lean_is_scalar(x_103)) { + x_104 = lean_alloc_ctor(0, 7, 0); +} else { + x_104 = x_103; +} +lean_ctor_set(x_104, 0, x_97); +lean_ctor_set(x_104, 1, x_98); +lean_ctor_set(x_104, 2, x_99); +lean_ctor_set(x_104, 3, x_100); +lean_ctor_set(x_104, 4, x_101); +lean_ctor_set(x_104, 5, x_1); +lean_ctor_set(x_104, 6, x_102); +if (lean_is_scalar(x_96)) { + x_105 = lean_alloc_ctor(1, 2, 0); +} else { + x_105 = x_96; +} +lean_ctor_set(x_105, 0, x_104); +lean_ctor_set(x_105, 1, x_95); +x_106 = lean_alloc_ctor(0, 4, 0); +lean_ctor_set(x_106, 0, x_92); +lean_ctor_set(x_106, 1, x_93); +lean_ctor_set(x_106, 2, x_105); +lean_ctor_set(x_106, 3, x_94); +x_107 = l___private_Init_Lean_Elab_Command_3__setState(x_106, x_2, x_39); +if (lean_obj_tag(x_107) == 0) +{ +lean_object* x_108; lean_object* x_109; lean_object* x_110; lean_object* x_111; +x_108 = lean_ctor_get(x_107, 1); +lean_inc(x_108); +if (lean_is_exclusive(x_107)) { + lean_ctor_release(x_107, 0); + lean_ctor_release(x_107, 1); + x_109 = x_107; +} else { + lean_dec_ref(x_107); + x_109 = lean_box(0); +} +x_110 = lean_box(0); +if (lean_is_scalar(x_109)) { + x_111 = lean_alloc_ctor(0, 2, 0); +} else { + x_111 = x_109; +} +lean_ctor_set(x_111, 0, x_110); +lean_ctor_set(x_111, 1, x_108); +return x_111; +} +else +{ +lean_object* x_112; lean_object* x_113; lean_object* x_114; lean_object* x_115; +x_112 = lean_ctor_get(x_107, 0); +lean_inc(x_112); +x_113 = lean_ctor_get(x_107, 1); +lean_inc(x_113); +if (lean_is_exclusive(x_107)) { + lean_ctor_release(x_107, 0); + lean_ctor_release(x_107, 1); + x_114 = x_107; +} else { + lean_dec_ref(x_107); + x_114 = lean_box(0); +} +if (lean_is_scalar(x_114)) { + x_115 = lean_alloc_ctor(1, 2, 0); +} else { + x_115 = x_114; +} +lean_ctor_set(x_115, 0, x_112); +lean_ctor_set(x_115, 1, x_113); +return x_115; +} +} +} +} +else +{ +uint8_t x_116; +lean_dec(x_2); +lean_dec(x_1); +x_116 = !lean_is_exclusive(x_4); +if (x_116 == 0) +{ +return x_4; +} +else +{ +lean_object* x_117; lean_object* x_118; lean_object* x_119; +x_117 = lean_ctor_get(x_4, 0); +x_118 = lean_ctor_get(x_4, 1); +lean_inc(x_118); +lean_inc(x_117); +lean_dec(x_4); +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; +} +} +} +} +lean_object* l_Array_iterateMAux___main___at_Lean_Elab_Command_elabAxiom___spec__5(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6) { +_start: +{ +lean_object* x_7; uint8_t x_8; +x_7 = lean_array_get_size(x_2); +x_8 = lean_nat_dec_lt(x_3, x_7); +lean_dec(x_7); +if (x_8 == 0) +{ +lean_object* x_9; +lean_dec(x_3); +x_9 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_9, 0, x_4); +lean_ctor_set(x_9, 1, x_6); +return x_9; +} +else +{ +lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; uint8_t x_14; +x_10 = lean_array_fget(x_2, x_3); +x_11 = lean_unsigned_to_nat(1u); +x_12 = lean_nat_add(x_3, x_11); +lean_dec(x_3); +x_13 = l_Lean_Syntax_getId(x_10); +x_14 = l_List_elem___main___at_Lean_Parser_addLeadingParser___spec__4(x_13, x_4); +if (x_14 == 0) +{ +lean_object* x_15; +lean_dec(x_10); +x_15 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_15, 0, x_13); +lean_ctor_set(x_15, 1, x_4); +x_3 = x_12; +x_4 = x_15; +goto _start; +} +else +{ +lean_object* x_17; uint8_t x_18; +lean_dec(x_12); +lean_dec(x_4); +x_17 = l_Lean_Elab_Command_throwAlreadyDeclaredUniverseLevel___rarg(x_10, x_13, x_5, x_6); +lean_dec(x_10); x_18 = !lean_is_exclusive(x_17); if (x_18 == 0) { @@ -1488,878 +3003,1388 @@ lean_ctor_set(x_21, 1, x_20); return x_21; } } -else +} +} +} +lean_object* l_Lean_Elab_Command_elabAxiom___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_22; lean_object* x_23; lean_object* x_24; lean_object* x_25; lean_object* x_26; -x_22 = lean_ctor_get(x_8, 1); -lean_inc(x_22); -lean_dec(x_8); -x_23 = lean_unsigned_to_nat(1u); -x_24 = l_Lean_Syntax_getArg(x_1, x_23); -x_25 = l_Lean_Syntax_getArgs(x_24); -lean_dec(x_24); -x_26 = l_Array_umapMAux___main___at_Lean_Elab_Command_elabAttr___spec__1(x_4, x_25, x_2, x_22); -lean_dec(x_2); -if (lean_obj_tag(x_26) == 0) +lean_object* x_9; +lean_inc(x_7); +lean_inc(x_1); +x_9 = l_Lean_Elab_Term_elabType(x_1, x_7, x_8); +if (lean_obj_tag(x_9) == 0) { -uint8_t x_27; +lean_object* x_10; lean_object* x_11; uint8_t x_12; lean_object* x_13; lean_object* x_14; +x_10 = lean_ctor_get(x_9, 0); +lean_inc(x_10); +x_11 = lean_ctor_get(x_9, 1); +lean_inc(x_11); +lean_dec(x_9); +x_12 = 0; +x_13 = lean_box(0); +lean_inc(x_7); +x_14 = l___private_Init_Lean_Elab_Term_19__synthesizeSyntheticMVarsAux___main(x_12, x_13, x_7, x_11); +if (lean_obj_tag(x_14) == 0) +{ +lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; +x_15 = lean_ctor_get(x_14, 1); +lean_inc(x_15); +lean_dec(x_14); +lean_inc(x_7); +x_16 = l_Lean_Elab_Term_instantiateMVars(x_1, x_10, x_7, x_15); +x_17 = lean_ctor_get(x_16, 0); +lean_inc(x_17); +x_18 = lean_ctor_get(x_16, 1); +lean_inc(x_18); +lean_dec(x_16); +lean_inc(x_7); +x_19 = l_Lean_Elab_Term_mkForall(x_1, x_6, x_17, x_7, x_18); +if (lean_obj_tag(x_19) == 0) +{ +lean_object* x_20; lean_object* x_21; lean_object* x_22; +x_20 = lean_ctor_get(x_19, 0); +lean_inc(x_20); +x_21 = lean_ctor_get(x_19, 1); +lean_inc(x_21); +lean_dec(x_19); +lean_inc(x_7); +x_22 = l_Lean_Elab_Term_mkForallUsedOnly(x_1, x_2, x_20, x_7, x_21); +lean_dec(x_1); +if (lean_obj_tag(x_22) == 0) +{ +lean_object* x_23; lean_object* x_24; lean_object* x_25; lean_object* x_26; uint8_t x_27; +x_23 = lean_ctor_get(x_22, 0); +lean_inc(x_23); +x_24 = lean_ctor_get(x_22, 1); +lean_inc(x_24); +lean_dec(x_22); +x_25 = lean_ctor_get(x_23, 0); +lean_inc(x_25); +lean_dec(x_23); +x_26 = l_Lean_Elab_Term_levelMVarToParam(x_25, x_7, x_24); x_27 = !lean_is_exclusive(x_26); if (x_27 == 0) { -lean_object* x_28; lean_object* x_29; +lean_object* x_28; lean_object* x_29; lean_object* x_30; lean_object* x_31; uint8_t x_32; lean_object* x_33; lean_object* x_34; x_28 = lean_ctor_get(x_26, 0); -x_29 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_29, 0, x_6); -lean_ctor_set(x_29, 1, x_28); -lean_ctor_set(x_26, 0, x_29); +lean_inc(x_28); +x_29 = l_Lean_collectLevelParams(x_28); +x_30 = l_Lean_Elab_Command_sortDeclLevelParams(x_3, x_29); +x_31 = lean_alloc_ctor(0, 3, 0); +lean_ctor_set(x_31, 0, x_4); +lean_ctor_set(x_31, 1, x_30); +lean_ctor_set(x_31, 2, x_28); +x_32 = lean_ctor_get_uint8(x_5, sizeof(void*)*2 + 3); +x_33 = lean_alloc_ctor(0, 1, 1); +lean_ctor_set(x_33, 0, x_31); +lean_ctor_set_uint8(x_33, sizeof(void*)*1, x_32); +x_34 = lean_alloc_ctor(0, 1, 0); +lean_ctor_set(x_34, 0, x_33); +lean_ctor_set(x_26, 0, x_34); return x_26; } else { -lean_object* x_30; lean_object* x_31; lean_object* x_32; lean_object* x_33; -x_30 = lean_ctor_get(x_26, 0); -x_31 = lean_ctor_get(x_26, 1); -lean_inc(x_31); -lean_inc(x_30); -lean_dec(x_26); -x_32 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_32, 0, x_6); -lean_ctor_set(x_32, 1, x_30); -x_33 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_33, 0, x_32); -lean_ctor_set(x_33, 1, x_31); -return x_33; -} -} -else -{ -uint8_t x_34; -lean_dec(x_6); -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; +lean_object* x_35; lean_object* x_36; lean_object* x_37; lean_object* x_38; lean_object* x_39; uint8_t x_40; lean_object* x_41; lean_object* x_42; lean_object* x_43; 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; -} -} +lean_inc(x_35); +x_37 = l_Lean_collectLevelParams(x_35); +x_38 = l_Lean_Elab_Command_sortDeclLevelParams(x_3, x_37); +x_39 = lean_alloc_ctor(0, 3, 0); +lean_ctor_set(x_39, 0, x_4); +lean_ctor_set(x_39, 1, x_38); +lean_ctor_set(x_39, 2, x_35); +x_40 = lean_ctor_get_uint8(x_5, sizeof(void*)*2 + 3); +x_41 = lean_alloc_ctor(0, 1, 1); +lean_ctor_set(x_41, 0, x_39); +lean_ctor_set_uint8(x_41, sizeof(void*)*1, x_40); +x_42 = lean_alloc_ctor(0, 1, 0); +lean_ctor_set(x_42, 0, x_41); +x_43 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_43, 0, x_42); +lean_ctor_set(x_43, 1, x_36); +return x_43; } } else { -uint8_t x_38; -lean_dec(x_6); -x_38 = !lean_is_exclusive(x_8); -if (x_38 == 0) -{ -lean_object* x_39; lean_object* x_40; -x_39 = lean_ctor_get(x_8, 0); -x_40 = l___private_Init_Lean_Elab_Command_1__ioErrorToMessage(x_2, x_1, x_39); -lean_ctor_set(x_8, 0, x_40); -return x_8; -} -else -{ -lean_object* x_41; lean_object* x_42; lean_object* x_43; lean_object* x_44; -x_41 = lean_ctor_get(x_8, 0); -x_42 = lean_ctor_get(x_8, 1); -lean_inc(x_42); -lean_inc(x_41); -lean_dec(x_8); -x_43 = l___private_Init_Lean_Elab_Command_1__ioErrorToMessage(x_2, x_1, x_41); -x_44 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_44, 0, x_43); -lean_ctor_set(x_44, 1, x_42); -return x_44; -} -} -} -} -} -lean_object* l_Array_umapMAux___main___at_Lean_Elab_Command_elabAttr___spec__1___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { -_start: -{ -lean_object* x_5; -x_5 = l_Array_umapMAux___main___at_Lean_Elab_Command_elabAttr___spec__1(x_1, x_2, x_3, x_4); -lean_dec(x_3); -return x_5; -} -} -lean_object* l_Lean_Elab_throwError___at_Lean_Elab_Command_elabAttr___spec__2___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { -_start: -{ -lean_object* x_5; -x_5 = l_Lean_Elab_throwError___at_Lean_Elab_Command_elabAttr___spec__2(x_1, x_2, x_3, x_4); -lean_dec(x_3); -lean_dec(x_1); -return x_5; -} -} -lean_object* l_Lean_Elab_Command_elabAttr___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) { -_start: -{ -lean_object* x_4; -x_4 = l_Lean_Elab_Command_elabAttr(x_1, x_2, x_3); -lean_dec(x_1); -return x_4; -} -} -lean_object* l_Lean_Syntax_foldArgsAuxM___main___at_Lean_Elab_Command_elabAttrs___spec__1(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6) { -_start: -{ -lean_object* x_7; uint8_t x_8; -x_7 = lean_array_get_size(x_2); -x_8 = lean_nat_dec_lt(x_3, x_7); +uint8_t x_44; lean_dec(x_7); -if (x_8 == 0) -{ -lean_object* x_9; -lean_dec(x_5); +lean_dec(x_4); lean_dec(x_3); -x_9 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_9, 0, x_4); -lean_ctor_set(x_9, 1, x_6); +x_44 = !lean_is_exclusive(x_22); +if (x_44 == 0) +{ +return x_22; +} +else +{ +lean_object* x_45; lean_object* x_46; lean_object* x_47; +x_45 = lean_ctor_get(x_22, 0); +x_46 = lean_ctor_get(x_22, 1); +lean_inc(x_46); +lean_inc(x_45); +lean_dec(x_22); +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_7); +lean_dec(x_4); +lean_dec(x_3); +lean_dec(x_2); +lean_dec(x_1); +x_48 = !lean_is_exclusive(x_19); +if (x_48 == 0) +{ +return x_19; +} +else +{ +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_51 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_51, 0, x_49); +lean_ctor_set(x_51, 1, x_50); +return x_51; +} +} +} +else +{ +uint8_t x_52; +lean_dec(x_10); +lean_dec(x_7); +lean_dec(x_6); +lean_dec(x_4); +lean_dec(x_3); +lean_dec(x_2); +lean_dec(x_1); +x_52 = !lean_is_exclusive(x_14); +if (x_52 == 0) +{ +return x_14; +} +else +{ +lean_object* x_53; lean_object* x_54; lean_object* x_55; +x_53 = lean_ctor_get(x_14, 0); +x_54 = lean_ctor_get(x_14, 1); +lean_inc(x_54); +lean_inc(x_53); +lean_dec(x_14); +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_7); +lean_dec(x_6); +lean_dec(x_4); +lean_dec(x_3); +lean_dec(x_2); +lean_dec(x_1); +x_56 = !lean_is_exclusive(x_9); +if (x_56 == 0) +{ return x_9; } else { -lean_object* x_10; lean_object* x_11; -x_10 = lean_array_fget(x_2, x_3); -lean_inc(x_5); -x_11 = l_Lean_Elab_Command_elabAttr(x_10, x_5, x_6); -lean_dec(x_10); -if (lean_obj_tag(x_11) == 0) -{ -lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; -x_12 = lean_ctor_get(x_11, 0); -lean_inc(x_12); -x_13 = lean_ctor_get(x_11, 1); -lean_inc(x_13); -lean_dec(x_11); -x_14 = lean_array_push(x_4, x_12); -x_15 = lean_nat_add(x_3, x_1); -lean_dec(x_3); -x_3 = x_15; -x_4 = x_14; -x_6 = x_13; -goto _start; +lean_object* x_57; lean_object* x_58; lean_object* x_59; +x_57 = lean_ctor_get(x_9, 0); +x_58 = lean_ctor_get(x_9, 1); +lean_inc(x_58); +lean_inc(x_57); +lean_dec(x_9); +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_17; -lean_dec(x_5); -lean_dec(x_4); -lean_dec(x_3); -x_17 = !lean_is_exclusive(x_11); -if (x_17 == 0) +} +} +} +lean_object* l_Lean_Elab_Command_elabAxiom___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) { +_start: { +lean_object* x_9; lean_object* x_10; lean_object* x_11; +x_9 = l_Lean_Syntax_getArgs(x_1); +x_10 = lean_alloc_closure((void*)(l_Lean_Elab_Command_elabAxiom___lambda__1___boxed), 8, 5); +lean_closure_set(x_10, 0, x_2); +lean_closure_set(x_10, 1, x_6); +lean_closure_set(x_10, 2, x_3); +lean_closure_set(x_10, 3, x_4); +lean_closure_set(x_10, 4, x_5); +x_11 = l_Lean_Elab_Term_elabBinders___rarg(x_9, x_10, x_7, x_8); +lean_dec(x_9); return x_11; } -else -{ -lean_object* x_18; lean_object* x_19; lean_object* x_20; -x_18 = lean_ctor_get(x_11, 0); -x_19 = lean_ctor_get(x_11, 1); -lean_inc(x_19); -lean_inc(x_18); -lean_dec(x_11); -x_20 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_20, 0, x_18); -lean_ctor_set(x_20, 1, x_19); -return x_20; } -} -} -} -} -lean_object* l_Lean_Elab_Command_elabAttrs(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +lean_object* l_Lean_Elab_Command_elabAxiom(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { _start: { -lean_object* x_4; lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; -x_4 = lean_unsigned_to_nat(1u); -x_5 = l_Lean_Syntax_getArg(x_1, x_4); -x_6 = l_Lean_Syntax_getArgs(x_5); -lean_dec(x_5); +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; +x_5 = lean_unsigned_to_nat(1u); +x_6 = l_Lean_Syntax_getArg(x_2, x_5); x_7 = lean_unsigned_to_nat(2u); -x_8 = lean_unsigned_to_nat(0u); -x_9 = l_Array_empty___closed__1; -x_10 = l_Lean_Syntax_foldArgsAuxM___main___at_Lean_Elab_Command_elabAttrs___spec__1(x_7, x_6, x_8, x_9, x_2, x_3); -lean_dec(x_6); -return x_10; -} -} -lean_object* l_Lean_Syntax_foldArgsAuxM___main___at_Lean_Elab_Command_elabAttrs___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: +x_8 = l_Lean_Syntax_getArg(x_2, x_7); +x_9 = l_Lean_Elab_Command_expandDeclSig(x_8); +lean_dec(x_8); +x_10 = lean_ctor_get(x_9, 0); +lean_inc(x_10); +x_11 = lean_ctor_get(x_9, 1); +lean_inc(x_11); +lean_dec(x_9); +x_12 = lean_unsigned_to_nat(0u); +x_13 = l_Lean_Syntax_getIdAt(x_6, x_12); +x_14 = l_Lean_Syntax_getArg(x_6, x_5); +lean_inc(x_3); +x_15 = l_Lean_Elab_Command_getLevelNames(x_3, x_4); +if (lean_obj_tag(x_15) == 0) { -lean_object* x_7; -x_7 = l_Lean_Syntax_foldArgsAuxM___main___at_Lean_Elab_Command_elabAttrs___spec__1(x_1, x_2, x_3, x_4, x_5, x_6); -lean_dec(x_2); -lean_dec(x_1); -return x_7; -} -} -lean_object* l_Lean_Elab_Command_elabAttrs___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) { -_start: -{ -lean_object* x_4; -x_4 = l_Lean_Elab_Command_elabAttrs(x_1, x_2, x_3); -lean_dec(x_1); -return x_4; -} -} -lean_object* l_Lean_Elab_throwError___at_Lean_Elab_Command_elabModifiers___spec__1(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { -_start: -{ -uint8_t x_5; lean_object* x_6; uint8_t x_7; -x_5 = 2; -x_6 = l_Lean_Elab_mkMessage___at_Lean_Elab_Command_elabCommand___spec__2(x_2, x_5, x_1, x_3, x_4); -x_7 = !lean_is_exclusive(x_6); -if (x_7 == 0) -{ -lean_ctor_set_tag(x_6, 1); -return x_6; -} -else -{ -lean_object* x_8; lean_object* x_9; lean_object* x_10; -x_8 = lean_ctor_get(x_6, 0); -x_9 = lean_ctor_get(x_6, 1); -lean_inc(x_9); -lean_inc(x_8); -lean_dec(x_6); -x_10 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_10, 0, x_8); -lean_ctor_set(x_10, 1, x_9); -return x_10; -} -} -} -lean_object* l_Lean_Elab_throwError___at_Lean_Elab_Command_elabModifiers___spec__2(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { -_start: -{ -uint8_t x_5; lean_object* x_6; uint8_t x_7; -x_5 = 2; -x_6 = l_Lean_Elab_mkMessage___at_Lean_Elab_Command_elabCommand___spec__2(x_2, x_5, x_1, x_3, x_4); -x_7 = !lean_is_exclusive(x_6); -if (x_7 == 0) -{ -lean_ctor_set_tag(x_6, 1); -return x_6; -} -else -{ -lean_object* x_8; lean_object* x_9; lean_object* x_10; -x_8 = lean_ctor_get(x_6, 0); -x_9 = lean_ctor_get(x_6, 1); -lean_inc(x_9); -lean_inc(x_8); -lean_dec(x_6); -x_10 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_10, 0, x_8); -lean_ctor_set(x_10, 1, x_9); -return x_10; -} -} -} -lean_object* _init_l_Lean_Elab_Command_elabModifiers___closed__1() { -_start: -{ -lean_object* x_1; lean_object* x_2; lean_object* x_3; -x_1 = l_Lean_Parser_Command_docComment___elambda__1___closed__2; -x_2 = l_Lean_mkProtectedExtension___closed__1; -x_3 = lean_name_mk_string(x_1, x_2); -return x_3; -} -} -lean_object* _init_l_Lean_Elab_Command_elabModifiers___closed__2() { -_start: -{ -lean_object* x_1; -x_1 = lean_mk_string("unexpected visibility modifier"); -return x_1; -} -} -lean_object* _init_l_Lean_Elab_Command_elabModifiers___closed__3() { -_start: -{ -lean_object* x_1; lean_object* x_2; -x_1 = l_Lean_Elab_Command_elabModifiers___closed__2; -x_2 = lean_alloc_ctor(2, 1, 0); -lean_ctor_set(x_2, 0, x_1); -return x_2; -} -} -lean_object* _init_l_Lean_Elab_Command_elabModifiers___closed__4() { -_start: -{ -lean_object* x_1; lean_object* x_2; -x_1 = l_Lean_Elab_Command_elabModifiers___closed__3; -x_2 = lean_alloc_ctor(0, 1, 0); -lean_ctor_set(x_2, 0, x_1); -return x_2; -} -} -lean_object* _init_l_Lean_Elab_Command_elabModifiers___closed__5() { -_start: -{ -lean_object* x_1; -x_1 = lean_mk_string("unexpected doc string "); -return x_1; -} -} -lean_object* _init_l_Lean_Elab_Command_elabModifiers___closed__6() { -_start: -{ -lean_object* x_1; lean_object* x_2; -x_1 = l_Lean_Elab_Command_elabModifiers___closed__5; -x_2 = lean_alloc_ctor(2, 1, 0); -lean_ctor_set(x_2, 0, x_1); -return x_2; -} -} -lean_object* _init_l_Lean_Elab_Command_elabModifiers___closed__7() { -_start: -{ -lean_object* x_1; lean_object* x_2; -x_1 = l_Lean_Elab_Command_elabModifiers___closed__6; -x_2 = lean_alloc_ctor(0, 1, 0); -lean_ctor_set(x_2, 0, x_1); -return x_2; -} -} -lean_object* l_Lean_Elab_Command_elabModifiers(lean_object* x_1, lean_object* x_2, lean_object* x_3) { -_start: -{ -lean_object* x_4; lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_84; -x_4 = lean_unsigned_to_nat(0u); -x_5 = l_Lean_Syntax_getArg(x_1, x_4); -x_6 = lean_unsigned_to_nat(1u); -x_7 = l_Lean_Syntax_getArg(x_1, x_6); -x_8 = lean_unsigned_to_nat(2u); -x_9 = l_Lean_Syntax_getArg(x_1, x_8); -x_10 = lean_unsigned_to_nat(3u); -x_11 = l_Lean_Syntax_getArg(x_1, x_10); -x_12 = lean_unsigned_to_nat(4u); -x_13 = l_Lean_Syntax_getArg(x_1, x_12); -x_14 = lean_unsigned_to_nat(5u); -x_15 = l_Lean_Syntax_getArg(x_1, x_14); -x_84 = l_Lean_Syntax_getOptional_x3f(x_5); -lean_dec(x_5); -if (lean_obj_tag(x_84) == 0) -{ -lean_object* x_85; -x_85 = lean_box(0); -x_16 = x_85; -x_17 = x_3; -goto block_83; -} -else -{ -uint8_t x_86; -x_86 = !lean_is_exclusive(x_84); -if (x_86 == 0) -{ -lean_object* x_87; lean_object* x_88; lean_object* x_104; -x_87 = lean_ctor_get(x_84, 0); -x_104 = l_Lean_Syntax_getArg(x_87, x_6); -if (lean_obj_tag(x_104) == 2) -{ -lean_object* x_105; lean_object* x_106; lean_object* x_107; lean_object* x_108; -lean_dec(x_87); -x_105 = lean_ctor_get(x_104, 1); -lean_inc(x_105); -lean_dec(x_104); -x_106 = lean_string_utf8_byte_size(x_105); -x_107 = lean_nat_sub(x_106, x_8); -lean_dec(x_106); -x_108 = lean_string_utf8_extract(x_105, x_4, x_107); -lean_dec(x_107); -lean_dec(x_105); -lean_ctor_set(x_84, 0, x_108); -x_16 = x_84; -x_17 = x_3; -goto block_83; -} -else -{ -lean_object* x_109; -lean_dec(x_104); -lean_free_object(x_84); +lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; uint8_t x_201; +x_16 = lean_ctor_get(x_15, 0); +lean_inc(x_16); +x_17 = lean_ctor_get(x_15, 1); +lean_inc(x_17); lean_dec(x_15); -lean_dec(x_13); -lean_dec(x_11); -lean_dec(x_9); -lean_dec(x_7); -x_109 = lean_box(0); -x_88 = x_109; -goto block_103; -} -block_103: +x_201 = l_Lean_Syntax_isNone(x_14); +if (x_201 == 0) { -lean_object* x_89; lean_object* x_90; lean_object* x_91; lean_object* x_92; lean_object* x_93; lean_object* x_94; lean_object* x_95; lean_object* x_96; lean_object* x_97; lean_object* x_98; uint8_t x_99; -lean_dec(x_88); -x_89 = l_Lean_Syntax_getArg(x_87, x_6); -x_90 = lean_box(0); -x_91 = l_Lean_Syntax_formatStxAux___main(x_90, x_4, x_89); -x_92 = l_Lean_Options_empty; -x_93 = l_Lean_Format_pretty(x_91, x_92); -x_94 = lean_alloc_ctor(2, 1, 0); -lean_ctor_set(x_94, 0, x_93); -x_95 = lean_alloc_ctor(0, 1, 0); -lean_ctor_set(x_95, 0, x_94); -x_96 = l_Lean_Elab_Command_elabModifiers___closed__7; -x_97 = lean_alloc_ctor(8, 2, 0); -lean_ctor_set(x_97, 0, x_96); -lean_ctor_set(x_97, 1, x_95); -x_98 = l_Lean_Elab_throwError___at_Lean_Elab_Command_elabModifiers___spec__2(x_87, x_97, x_2, x_3); -lean_dec(x_2); -lean_dec(x_87); -x_99 = !lean_is_exclusive(x_98); -if (x_99 == 0) +lean_object* x_202; lean_object* x_203; lean_object* x_204; lean_object* x_205; lean_object* x_206; +x_202 = l_Lean_Syntax_getArg(x_14, x_5); +lean_dec(x_14); +x_203 = l_Lean_Syntax_getArgs(x_202); +lean_dec(x_202); +x_204 = l_Array_empty___closed__1; +x_205 = l_Lean_Syntax_foldArgsAuxM___main___at_Lean_Syntax_foldSepRevArgsM___spec__1(x_7, x_203, x_12, x_204); +lean_dec(x_203); +lean_inc(x_16); +x_206 = l_Array_iterateMAux___main___at_Lean_Elab_Command_elabAxiom___spec__5(x_2, x_205, x_12, x_16, x_3, x_17); +lean_dec(x_205); +if (lean_obj_tag(x_206) == 0) { -return x_98; +lean_object* x_207; lean_object* x_208; +x_207 = lean_ctor_get(x_206, 0); +lean_inc(x_207); +x_208 = lean_ctor_get(x_206, 1); +lean_inc(x_208); +lean_dec(x_206); +x_18 = x_207; +x_19 = x_208; +goto block_200; } else { -lean_object* x_100; lean_object* x_101; lean_object* x_102; -x_100 = lean_ctor_get(x_98, 0); -x_101 = lean_ctor_get(x_98, 1); -lean_inc(x_101); -lean_inc(x_100); -lean_dec(x_98); -x_102 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_102, 0, x_100); -lean_ctor_set(x_102, 1, x_101); -return x_102; -} -} -} -else -{ -lean_object* x_110; lean_object* x_111; lean_object* x_127; -x_110 = lean_ctor_get(x_84, 0); -lean_inc(x_110); -lean_dec(x_84); -x_127 = l_Lean_Syntax_getArg(x_110, x_6); -if (lean_obj_tag(x_127) == 2) -{ -lean_object* x_128; lean_object* x_129; lean_object* x_130; lean_object* x_131; lean_object* x_132; -lean_dec(x_110); -x_128 = lean_ctor_get(x_127, 1); -lean_inc(x_128); -lean_dec(x_127); -x_129 = lean_string_utf8_byte_size(x_128); -x_130 = lean_nat_sub(x_129, x_8); -lean_dec(x_129); -x_131 = lean_string_utf8_extract(x_128, x_4, x_130); -lean_dec(x_130); -lean_dec(x_128); -x_132 = lean_alloc_ctor(1, 1, 0); -lean_ctor_set(x_132, 0, x_131); -x_16 = x_132; -x_17 = x_3; -goto block_83; -} -else -{ -lean_object* x_133; -lean_dec(x_127); -lean_dec(x_15); -lean_dec(x_13); -lean_dec(x_11); -lean_dec(x_9); -lean_dec(x_7); -x_133 = lean_box(0); -x_111 = x_133; -goto block_126; -} -block_126: -{ -lean_object* x_112; lean_object* x_113; lean_object* x_114; lean_object* x_115; lean_object* x_116; lean_object* x_117; lean_object* x_118; lean_object* x_119; lean_object* x_120; lean_object* x_121; lean_object* x_122; lean_object* x_123; lean_object* x_124; lean_object* x_125; -lean_dec(x_111); -x_112 = l_Lean_Syntax_getArg(x_110, x_6); -x_113 = lean_box(0); -x_114 = l_Lean_Syntax_formatStxAux___main(x_113, x_4, x_112); -x_115 = l_Lean_Options_empty; -x_116 = l_Lean_Format_pretty(x_114, x_115); -x_117 = lean_alloc_ctor(2, 1, 0); -lean_ctor_set(x_117, 0, x_116); -x_118 = lean_alloc_ctor(0, 1, 0); -lean_ctor_set(x_118, 0, x_117); -x_119 = l_Lean_Elab_Command_elabModifiers___closed__7; -x_120 = lean_alloc_ctor(8, 2, 0); -lean_ctor_set(x_120, 0, x_119); -lean_ctor_set(x_120, 1, x_118); -x_121 = l_Lean_Elab_throwError___at_Lean_Elab_Command_elabModifiers___spec__2(x_110, x_120, x_2, x_3); -lean_dec(x_2); -lean_dec(x_110); -x_122 = lean_ctor_get(x_121, 0); -lean_inc(x_122); -x_123 = lean_ctor_get(x_121, 1); -lean_inc(x_123); -if (lean_is_exclusive(x_121)) { - lean_ctor_release(x_121, 0); - lean_ctor_release(x_121, 1); - x_124 = x_121; -} else { - lean_dec_ref(x_121); - x_124 = lean_box(0); -} -if (lean_is_scalar(x_124)) { - x_125 = lean_alloc_ctor(1, 2, 0); -} else { - x_125 = x_124; -} -lean_ctor_set(x_125, 0, x_122); -lean_ctor_set(x_125, 1, x_123); -return x_125; -} -} -} -block_83: -{ -uint8_t x_18; lean_object* x_19; lean_object* x_67; -x_67 = l_Lean_Syntax_getOptional_x3f(x_9); -lean_dec(x_9); -if (lean_obj_tag(x_67) == 0) -{ -uint8_t x_68; -x_68 = 0; -x_18 = x_68; -x_19 = x_17; -goto block_66; -} -else -{ -lean_object* x_69; lean_object* x_70; lean_object* x_71; uint8_t x_72; -x_69 = lean_ctor_get(x_67, 0); -lean_inc(x_69); -lean_dec(x_67); -lean_inc(x_69); -x_70 = l_Lean_Syntax_getKind(x_69); -x_71 = l_Lean_Parser_Command_private___elambda__1___closed__2; -x_72 = lean_name_eq(x_70, x_71); -if (x_72 == 0) -{ -lean_object* x_73; uint8_t x_74; -x_73 = l_Lean_Elab_Command_elabModifiers___closed__1; -x_74 = lean_name_eq(x_70, x_73); -lean_dec(x_70); -if (x_74 == 0) -{ -lean_object* x_75; lean_object* x_76; uint8_t x_77; +uint8_t x_209; lean_dec(x_16); -lean_dec(x_15); lean_dec(x_13); lean_dec(x_11); -lean_dec(x_7); -x_75 = l_Lean_Elab_Command_elabModifiers___closed__4; -x_76 = l_Lean_Elab_throwError___at_Lean_Elab_Command_elabModifiers___spec__1(x_69, x_75, x_2, x_17); -lean_dec(x_2); -lean_dec(x_69); -x_77 = !lean_is_exclusive(x_76); -if (x_77 == 0) +lean_dec(x_10); +lean_dec(x_6); +lean_dec(x_3); +lean_dec(x_1); +x_209 = !lean_is_exclusive(x_206); +if (x_209 == 0) { -return x_76; +return x_206; } else { -lean_object* x_78; lean_object* x_79; lean_object* x_80; -x_78 = lean_ctor_get(x_76, 0); -x_79 = lean_ctor_get(x_76, 1); -lean_inc(x_79); -lean_inc(x_78); -lean_dec(x_76); -x_80 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_80, 0, x_78); -lean_ctor_set(x_80, 1, x_79); -return x_80; +lean_object* x_210; lean_object* x_211; lean_object* x_212; +x_210 = lean_ctor_get(x_206, 0); +x_211 = lean_ctor_get(x_206, 1); +lean_inc(x_211); +lean_inc(x_210); +lean_dec(x_206); +x_212 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_212, 0, x_210); +lean_ctor_set(x_212, 1, x_211); +return x_212; +} } } else { -uint8_t x_81; -lean_dec(x_69); -x_81 = 1; -x_18 = x_81; +lean_dec(x_14); +lean_inc(x_16); +x_18 = x_16; x_19 = x_17; -goto block_66; +goto block_200; +} +block_200: +{ +if (lean_obj_tag(x_13) == 1) +{ +lean_object* x_20; lean_object* x_21; lean_object* x_22; uint8_t x_23; lean_object* x_24; +x_20 = lean_ctor_get(x_13, 0); +lean_inc(x_20); +x_21 = lean_ctor_get(x_13, 1); +lean_inc(x_21); +lean_dec(x_13); +x_22 = l_Lean_Parser_Command_namespace___elambda__1___closed__1; +x_23 = 1; +lean_inc(x_3); +lean_inc(x_20); +x_24 = l___private_Init_Lean_Elab_Command_10__addScopes___main(x_6, x_22, x_23, x_20, x_3, x_19); +lean_dec(x_6); +if (lean_obj_tag(x_24) == 0) +{ +lean_object* x_25; lean_object* x_26; +x_25 = lean_ctor_get(x_24, 1); +lean_inc(x_25); +lean_dec(x_24); +lean_inc(x_3); +x_26 = l_Lean_Elab_Command_modifyScope___at_Lean_Elab_Command_elabAxiom___spec__1(x_18, x_3, 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_42; +x_27 = lean_ctor_get(x_26, 1); +lean_inc(x_27); +lean_dec(x_26); +x_28 = lean_box(0); +x_29 = lean_name_mk_string(x_28, x_21); +lean_inc(x_3); +x_42 = l_Lean_Elab_Command_mkDeclName(x_1, x_29, x_3, x_27); +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; uint8_t x_112; lean_object* x_113; +x_43 = lean_ctor_get(x_42, 0); +lean_inc(x_43); +x_44 = lean_ctor_get(x_42, 1); +lean_inc(x_44); +lean_dec(x_42); +x_45 = lean_ctor_get(x_1, 1); +lean_inc(x_45); +x_112 = 2; +lean_inc(x_3); +lean_inc(x_43); +x_113 = l_Array_forMAux___main___at_Lean_Elab_Command_applyAttributes___spec__1(x_2, x_43, x_112, x_45, x_12, x_3, x_44); +if (lean_obj_tag(x_113) == 0) +{ +lean_object* x_114; lean_object* x_115; +x_114 = lean_ctor_get(x_113, 1); +lean_inc(x_114); +lean_dec(x_113); +lean_inc(x_3); +x_115 = l_Lean_Elab_Command_getLevelNames(x_3, x_114); +if (lean_obj_tag(x_115) == 0) +{ +lean_object* x_116; lean_object* x_117; lean_object* x_118; lean_object* x_119; +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_43); +x_118 = lean_alloc_closure((void*)(l_Lean_Elab_Command_elabAxiom___lambda__2___boxed), 8, 5); +lean_closure_set(x_118, 0, x_10); +lean_closure_set(x_118, 1, x_11); +lean_closure_set(x_118, 2, x_116); +lean_closure_set(x_118, 3, x_43); +lean_closure_set(x_118, 4, x_1); +lean_inc(x_3); +x_119 = l___private_Init_Lean_Elab_Command_2__getState(x_3, x_117); +if (lean_obj_tag(x_119) == 0) +{ +lean_object* x_120; lean_object* x_121; lean_object* x_122; lean_object* x_123; lean_object* x_124; lean_object* x_125; +x_120 = lean_ctor_get(x_119, 0); +lean_inc(x_120); +x_121 = lean_ctor_get(x_119, 1); +lean_inc(x_121); +lean_dec(x_119); +x_122 = l___private_Init_Lean_Elab_Command_7__getVarDecls(x_120); +x_123 = l___private_Init_Lean_Elab_Command_5__mkTermContext(x_3, x_120); +x_124 = l___private_Init_Lean_Elab_Command_6__mkTermState(x_120); +lean_dec(x_120); +x_125 = l_Lean_Elab_Term_elabBinders___rarg(x_122, x_118, x_123, x_124); +lean_dec(x_122); +if (lean_obj_tag(x_125) == 0) +{ +lean_object* x_126; lean_object* x_127; lean_object* x_128; +x_126 = lean_ctor_get(x_125, 0); +lean_inc(x_126); +x_127 = lean_ctor_get(x_125, 1); +lean_inc(x_127); +lean_dec(x_125); +lean_inc(x_3); +x_128 = l___private_Init_Lean_Elab_Command_2__getState(x_3, x_121); +if (lean_obj_tag(x_128) == 0) +{ +lean_object* x_129; lean_object* x_130; lean_object* x_131; lean_object* x_132; lean_object* x_133; uint8_t x_134; +x_129 = lean_ctor_get(x_127, 0); +lean_inc(x_129); +x_130 = lean_ctor_get(x_128, 0); +lean_inc(x_130); +x_131 = lean_ctor_get(x_128, 1); +lean_inc(x_131); +lean_dec(x_128); +x_132 = lean_ctor_get(x_129, 0); +lean_inc(x_132); +lean_dec(x_129); +x_133 = lean_ctor_get(x_127, 2); +lean_inc(x_133); +lean_dec(x_127); +x_134 = !lean_is_exclusive(x_130); +if (x_134 == 0) +{ +lean_object* x_135; lean_object* x_136; lean_object* x_137; +x_135 = lean_ctor_get(x_130, 1); +lean_dec(x_135); +x_136 = lean_ctor_get(x_130, 0); +lean_dec(x_136); +lean_ctor_set(x_130, 1, x_133); +lean_ctor_set(x_130, 0, x_132); +lean_inc(x_3); +x_137 = l___private_Init_Lean_Elab_Command_3__setState(x_130, x_3, x_131); +if (lean_obj_tag(x_137) == 0) +{ +lean_object* x_138; +x_138 = lean_ctor_get(x_137, 1); +lean_inc(x_138); +lean_dec(x_137); +x_46 = x_126; +x_47 = x_138; +goto block_111; +} +else +{ +lean_object* x_139; lean_object* x_140; +lean_dec(x_126); +lean_dec(x_45); +lean_dec(x_43); +lean_dec(x_20); +x_139 = lean_ctor_get(x_137, 0); +lean_inc(x_139); +x_140 = lean_ctor_get(x_137, 1); +lean_inc(x_140); +lean_dec(x_137); +x_30 = x_139; +x_31 = x_140; +goto block_41; } } else { -uint8_t x_82; -lean_dec(x_70); -lean_dec(x_69); -x_82 = 2; -x_18 = x_82; -x_19 = x_17; -goto block_66; -} -} -block_66: +lean_object* x_141; lean_object* x_142; lean_object* x_143; lean_object* x_144; +x_141 = lean_ctor_get(x_130, 2); +x_142 = lean_ctor_get(x_130, 3); +lean_inc(x_142); +lean_inc(x_141); +lean_dec(x_130); +x_143 = lean_alloc_ctor(0, 4, 0); +lean_ctor_set(x_143, 0, x_132); +lean_ctor_set(x_143, 1, x_133); +lean_ctor_set(x_143, 2, x_141); +lean_ctor_set(x_143, 3, x_142); +lean_inc(x_3); +x_144 = l___private_Init_Lean_Elab_Command_3__setState(x_143, x_3, x_131); +if (lean_obj_tag(x_144) == 0) { -lean_object* x_20; lean_object* x_21; lean_object* x_56; -x_56 = l_Lean_Syntax_getOptional_x3f(x_7); -lean_dec(x_7); -if (lean_obj_tag(x_56) == 0) -{ -lean_object* x_57; -lean_dec(x_2); -x_57 = l_Array_empty___closed__1; -x_20 = x_57; -x_21 = x_19; -goto block_55; +lean_object* x_145; +x_145 = lean_ctor_get(x_144, 1); +lean_inc(x_145); +lean_dec(x_144); +x_46 = x_126; +x_47 = x_145; +goto block_111; } else { +lean_object* x_146; lean_object* x_147; +lean_dec(x_126); +lean_dec(x_45); +lean_dec(x_43); +lean_dec(x_20); +x_146 = lean_ctor_get(x_144, 0); +lean_inc(x_146); +x_147 = lean_ctor_get(x_144, 1); +lean_inc(x_147); +lean_dec(x_144); +x_30 = x_146; +x_31 = x_147; +goto block_41; +} +} +} +else +{ +lean_object* x_148; lean_object* x_149; +lean_dec(x_127); +lean_dec(x_126); +lean_dec(x_45); +lean_dec(x_43); +lean_dec(x_20); +x_148 = lean_ctor_get(x_128, 0); +lean_inc(x_148); +x_149 = lean_ctor_get(x_128, 1); +lean_inc(x_149); +lean_dec(x_128); +x_30 = x_148; +x_31 = x_149; +goto block_41; +} +} +else +{ +lean_object* x_150; +x_150 = lean_ctor_get(x_125, 0); +lean_inc(x_150); +if (lean_obj_tag(x_150) == 0) +{ +lean_object* x_151; lean_object* x_152; lean_object* x_153; +lean_dec(x_45); +lean_dec(x_43); +lean_dec(x_20); +x_151 = lean_ctor_get(x_125, 1); +lean_inc(x_151); +lean_dec(x_125); +x_152 = lean_ctor_get(x_150, 0); +lean_inc(x_152); +lean_dec(x_150); +lean_inc(x_3); +x_153 = l___private_Init_Lean_Elab_Command_2__getState(x_3, x_121); +if (lean_obj_tag(x_153) == 0) +{ +lean_object* x_154; lean_object* x_155; lean_object* x_156; lean_object* x_157; lean_object* x_158; uint8_t x_159; +x_154 = lean_ctor_get(x_151, 0); +lean_inc(x_154); +x_155 = lean_ctor_get(x_153, 0); +lean_inc(x_155); +x_156 = lean_ctor_get(x_153, 1); +lean_inc(x_156); +lean_dec(x_153); +x_157 = lean_ctor_get(x_154, 0); +lean_inc(x_157); +lean_dec(x_154); +x_158 = lean_ctor_get(x_151, 2); +lean_inc(x_158); +lean_dec(x_151); +x_159 = !lean_is_exclusive(x_155); +if (x_159 == 0) +{ +lean_object* x_160; lean_object* x_161; lean_object* x_162; +x_160 = lean_ctor_get(x_155, 1); +lean_dec(x_160); +x_161 = lean_ctor_get(x_155, 0); +lean_dec(x_161); +lean_ctor_set(x_155, 1, x_158); +lean_ctor_set(x_155, 0, x_157); +lean_inc(x_3); +x_162 = l___private_Init_Lean_Elab_Command_3__setState(x_155, x_3, x_156); +if (lean_obj_tag(x_162) == 0) +{ +lean_object* x_163; +x_163 = lean_ctor_get(x_162, 1); +lean_inc(x_163); +lean_dec(x_162); +x_30 = x_152; +x_31 = x_163; +goto block_41; +} +else +{ +lean_object* x_164; lean_object* x_165; +lean_dec(x_152); +x_164 = lean_ctor_get(x_162, 0); +lean_inc(x_164); +x_165 = lean_ctor_get(x_162, 1); +lean_inc(x_165); +lean_dec(x_162); +x_30 = x_164; +x_31 = x_165; +goto block_41; +} +} +else +{ +lean_object* x_166; lean_object* x_167; lean_object* x_168; lean_object* x_169; +x_166 = lean_ctor_get(x_155, 2); +x_167 = lean_ctor_get(x_155, 3); +lean_inc(x_167); +lean_inc(x_166); +lean_dec(x_155); +x_168 = lean_alloc_ctor(0, 4, 0); +lean_ctor_set(x_168, 0, x_157); +lean_ctor_set(x_168, 1, x_158); +lean_ctor_set(x_168, 2, x_166); +lean_ctor_set(x_168, 3, x_167); +lean_inc(x_3); +x_169 = l___private_Init_Lean_Elab_Command_3__setState(x_168, x_3, x_156); +if (lean_obj_tag(x_169) == 0) +{ +lean_object* x_170; +x_170 = lean_ctor_get(x_169, 1); +lean_inc(x_170); +lean_dec(x_169); +x_30 = x_152; +x_31 = x_170; +goto block_41; +} +else +{ +lean_object* x_171; lean_object* x_172; +lean_dec(x_152); +x_171 = lean_ctor_get(x_169, 0); +lean_inc(x_171); +x_172 = lean_ctor_get(x_169, 1); +lean_inc(x_172); +lean_dec(x_169); +x_30 = x_171; +x_31 = x_172; +goto block_41; +} +} +} +else +{ +lean_object* x_173; lean_object* x_174; +lean_dec(x_152); +lean_dec(x_151); +x_173 = lean_ctor_get(x_153, 0); +lean_inc(x_173); +x_174 = lean_ctor_get(x_153, 1); +lean_inc(x_174); +lean_dec(x_153); +x_30 = x_173; +x_31 = x_174; +goto block_41; +} +} +else +{ +lean_object* x_175; lean_object* x_176; lean_object* x_177; +lean_dec(x_125); +x_175 = l_Lean_Elab_Command_runTermElabM___rarg___closed__1; +x_176 = l_unreachable_x21___rarg(x_175); +lean_inc(x_3); +x_177 = lean_apply_2(x_176, x_3, x_121); +if (lean_obj_tag(x_177) == 0) +{ +lean_object* x_178; lean_object* x_179; +x_178 = lean_ctor_get(x_177, 0); +lean_inc(x_178); +x_179 = lean_ctor_get(x_177, 1); +lean_inc(x_179); +lean_dec(x_177); +x_46 = x_178; +x_47 = x_179; +goto block_111; +} +else +{ +lean_object* x_180; lean_object* x_181; +lean_dec(x_45); +lean_dec(x_43); +lean_dec(x_20); +x_180 = lean_ctor_get(x_177, 0); +lean_inc(x_180); +x_181 = lean_ctor_get(x_177, 1); +lean_inc(x_181); +lean_dec(x_177); +x_30 = x_180; +x_31 = x_181; +goto block_41; +} +} +} +} +else +{ +lean_object* x_182; lean_object* x_183; +lean_dec(x_118); +lean_dec(x_45); +lean_dec(x_43); +lean_dec(x_20); +x_182 = lean_ctor_get(x_119, 0); +lean_inc(x_182); +x_183 = lean_ctor_get(x_119, 1); +lean_inc(x_183); +lean_dec(x_119); +x_30 = x_182; +x_31 = x_183; +goto block_41; +} +} +else +{ +lean_object* x_184; lean_object* x_185; +lean_dec(x_45); +lean_dec(x_43); +lean_dec(x_20); +lean_dec(x_11); +lean_dec(x_10); +lean_dec(x_1); +x_184 = lean_ctor_get(x_115, 0); +lean_inc(x_184); +x_185 = lean_ctor_get(x_115, 1); +lean_inc(x_185); +lean_dec(x_115); +x_30 = x_184; +x_31 = x_185; +goto block_41; +} +} +else +{ +lean_object* x_186; lean_object* x_187; +lean_dec(x_45); +lean_dec(x_43); +lean_dec(x_20); +lean_dec(x_11); +lean_dec(x_10); +lean_dec(x_1); +x_186 = lean_ctor_get(x_113, 0); +lean_inc(x_186); +x_187 = lean_ctor_get(x_113, 1); +lean_inc(x_187); +lean_dec(x_113); +x_30 = x_186; +x_31 = x_187; +goto block_41; +} +block_111: +{ +lean_object* x_48; +lean_inc(x_3); +x_48 = l_Lean_Elab_Command_addDecl(x_2, x_46, x_3, x_47); +lean_dec(x_46); +if (lean_obj_tag(x_48) == 0) +{ +lean_object* x_49; uint8_t x_50; lean_object* x_51; +x_49 = lean_ctor_get(x_48, 1); +lean_inc(x_49); +lean_dec(x_48); +x_50 = 0; +lean_inc(x_3); +lean_inc(x_43); +x_51 = l_Array_forMAux___main___at_Lean_Elab_Command_applyAttributes___spec__1(x_2, x_43, x_50, x_45, x_12, x_3, x_49); +if (lean_obj_tag(x_51) == 0) +{ +lean_object* x_52; uint8_t x_53; lean_object* x_54; +x_52 = lean_ctor_get(x_51, 1); +lean_inc(x_52); +lean_dec(x_51); +x_53 = 1; +lean_inc(x_3); +x_54 = l_Array_forMAux___main___at_Lean_Elab_Command_applyAttributes___spec__1(x_2, x_43, x_53, x_45, x_12, x_3, x_52); +lean_dec(x_45); +if (lean_obj_tag(x_54) == 0) +{ +lean_object* x_55; lean_object* x_56; lean_object* x_57; +x_55 = lean_ctor_get(x_54, 0); +lean_inc(x_55); +x_56 = lean_ctor_get(x_54, 1); +lean_inc(x_56); +lean_dec(x_54); +lean_inc(x_3); +lean_inc(x_16); +x_57 = l_Lean_Elab_Command_modifyScope___at_Lean_Elab_Command_elabAxiom___spec__3(x_16, x_3, x_56); +if (lean_obj_tag(x_57) == 0) +{ lean_object* x_58; lean_object* x_59; -x_58 = lean_ctor_get(x_56, 0); +lean_dec(x_16); +x_58 = lean_ctor_get(x_57, 1); lean_inc(x_58); -lean_dec(x_56); -x_59 = l_Lean_Elab_Command_elabAttrs(x_58, x_2, x_19); -lean_dec(x_58); +lean_dec(x_57); +lean_inc(x_3); +x_59 = l___private_Init_Lean_Elab_Command_2__getState(x_3, x_58); if (lean_obj_tag(x_59) == 0) { -lean_object* x_60; lean_object* x_61; +lean_object* x_60; lean_object* x_61; uint8_t x_62; x_60 = lean_ctor_get(x_59, 0); lean_inc(x_60); x_61 = lean_ctor_get(x_59, 1); lean_inc(x_61); lean_dec(x_59); -x_20 = x_60; -x_21 = x_61; -goto block_55; +x_62 = !lean_is_exclusive(x_60); +if (x_62 == 0) +{ +lean_object* x_63; lean_object* x_64; lean_object* x_65; lean_object* x_66; +x_63 = lean_ctor_get(x_60, 2); +x_64 = l_Lean_Name_getNumParts___main(x_20); +lean_dec(x_20); +x_65 = l_List_drop___main___rarg(x_64, x_63); +lean_dec(x_63); +lean_ctor_set(x_60, 2, x_65); +x_66 = l___private_Init_Lean_Elab_Command_3__setState(x_60, x_3, x_61); +if (lean_obj_tag(x_66) == 0) +{ +uint8_t x_67; +x_67 = !lean_is_exclusive(x_66); +if (x_67 == 0) +{ +lean_object* x_68; +x_68 = lean_ctor_get(x_66, 0); +lean_dec(x_68); +lean_ctor_set(x_66, 0, x_55); +return x_66; } else { -uint8_t x_62; -lean_dec(x_16); -lean_dec(x_15); -lean_dec(x_13); -lean_dec(x_11); -x_62 = !lean_is_exclusive(x_59); -if (x_62 == 0) +lean_object* x_69; lean_object* x_70; +x_69 = lean_ctor_get(x_66, 1); +lean_inc(x_69); +lean_dec(x_66); +x_70 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_70, 0, x_55); +lean_ctor_set(x_70, 1, x_69); +return x_70; +} +} +else +{ +uint8_t x_71; +lean_dec(x_55); +x_71 = !lean_is_exclusive(x_66); +if (x_71 == 0) +{ +return x_66; +} +else +{ +lean_object* x_72; lean_object* x_73; lean_object* x_74; +x_72 = lean_ctor_get(x_66, 0); +x_73 = lean_ctor_get(x_66, 1); +lean_inc(x_73); +lean_inc(x_72); +lean_dec(x_66); +x_74 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_74, 0, x_72); +lean_ctor_set(x_74, 1, x_73); +return x_74; +} +} +} +else +{ +lean_object* x_75; lean_object* x_76; lean_object* x_77; lean_object* x_78; lean_object* x_79; lean_object* x_80; lean_object* x_81; lean_object* x_82; +x_75 = lean_ctor_get(x_60, 0); +x_76 = lean_ctor_get(x_60, 1); +x_77 = lean_ctor_get(x_60, 2); +x_78 = lean_ctor_get(x_60, 3); +lean_inc(x_78); +lean_inc(x_77); +lean_inc(x_76); +lean_inc(x_75); +lean_dec(x_60); +x_79 = l_Lean_Name_getNumParts___main(x_20); +lean_dec(x_20); +x_80 = l_List_drop___main___rarg(x_79, x_77); +lean_dec(x_77); +x_81 = lean_alloc_ctor(0, 4, 0); +lean_ctor_set(x_81, 0, x_75); +lean_ctor_set(x_81, 1, x_76); +lean_ctor_set(x_81, 2, x_80); +lean_ctor_set(x_81, 3, x_78); +x_82 = l___private_Init_Lean_Elab_Command_3__setState(x_81, x_3, x_61); +if (lean_obj_tag(x_82) == 0) +{ +lean_object* x_83; lean_object* x_84; lean_object* x_85; +x_83 = lean_ctor_get(x_82, 1); +lean_inc(x_83); +if (lean_is_exclusive(x_82)) { + lean_ctor_release(x_82, 0); + lean_ctor_release(x_82, 1); + x_84 = x_82; +} else { + lean_dec_ref(x_82); + x_84 = lean_box(0); +} +if (lean_is_scalar(x_84)) { + x_85 = lean_alloc_ctor(0, 2, 0); +} else { + x_85 = x_84; +} +lean_ctor_set(x_85, 0, x_55); +lean_ctor_set(x_85, 1, x_83); +return x_85; +} +else +{ +lean_object* x_86; lean_object* x_87; lean_object* x_88; lean_object* x_89; +lean_dec(x_55); +x_86 = lean_ctor_get(x_82, 0); +lean_inc(x_86); +x_87 = lean_ctor_get(x_82, 1); +lean_inc(x_87); +if (lean_is_exclusive(x_82)) { + lean_ctor_release(x_82, 0); + lean_ctor_release(x_82, 1); + x_88 = x_82; +} else { + lean_dec_ref(x_82); + x_88 = lean_box(0); +} +if (lean_is_scalar(x_88)) { + x_89 = lean_alloc_ctor(1, 2, 0); +} else { + x_89 = x_88; +} +lean_ctor_set(x_89, 0, x_86); +lean_ctor_set(x_89, 1, x_87); +return x_89; +} +} +} +else +{ +uint8_t x_90; +lean_dec(x_55); +lean_dec(x_20); +lean_dec(x_3); +x_90 = !lean_is_exclusive(x_59); +if (x_90 == 0) { return x_59; } else { -lean_object* x_63; lean_object* x_64; lean_object* x_65; -x_63 = lean_ctor_get(x_59, 0); -x_64 = lean_ctor_get(x_59, 1); -lean_inc(x_64); -lean_inc(x_63); +lean_object* x_91; lean_object* x_92; lean_object* x_93; +x_91 = lean_ctor_get(x_59, 0); +x_92 = lean_ctor_get(x_59, 1); +lean_inc(x_92); +lean_inc(x_91); lean_dec(x_59); -x_65 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_65, 0, x_63); -lean_ctor_set(x_65, 1, x_64); -return x_65; +x_93 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_93, 0, x_91); +lean_ctor_set(x_93, 1, x_92); +return x_93; } } } -block_55: +else { -uint8_t x_22; uint8_t x_23; uint8_t x_24; -x_22 = l_Lean_Syntax_isNone(x_11); +lean_object* x_94; lean_object* x_95; lean_object* x_96; +lean_dec(x_55); +lean_dec(x_20); +x_94 = lean_ctor_get(x_57, 0); +lean_inc(x_94); +x_95 = lean_ctor_get(x_57, 1); +lean_inc(x_95); +lean_dec(x_57); +x_96 = l_Lean_Elab_Command_modifyScope___at_Lean_Elab_Command_elabAxiom___spec__4(x_16, x_3, x_95); +if (lean_obj_tag(x_96) == 0) +{ +uint8_t x_97; +x_97 = !lean_is_exclusive(x_96); +if (x_97 == 0) +{ +lean_object* x_98; +x_98 = lean_ctor_get(x_96, 0); +lean_dec(x_98); +lean_ctor_set_tag(x_96, 1); +lean_ctor_set(x_96, 0, x_94); +return x_96; +} +else +{ +lean_object* x_99; lean_object* x_100; +x_99 = lean_ctor_get(x_96, 1); +lean_inc(x_99); +lean_dec(x_96); +x_100 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_100, 0, x_94); +lean_ctor_set(x_100, 1, x_99); +return x_100; +} +} +else +{ +uint8_t x_101; +lean_dec(x_94); +x_101 = !lean_is_exclusive(x_96); +if (x_101 == 0) +{ +return x_96; +} +else +{ +lean_object* x_102; lean_object* x_103; lean_object* x_104; +x_102 = lean_ctor_get(x_96, 0); +x_103 = lean_ctor_get(x_96, 1); +lean_inc(x_103); +lean_inc(x_102); +lean_dec(x_96); +x_104 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_104, 0, x_102); +lean_ctor_set(x_104, 1, x_103); +return x_104; +} +} +} +} +else +{ +lean_object* x_105; lean_object* x_106; +lean_dec(x_20); +x_105 = lean_ctor_get(x_54, 0); +lean_inc(x_105); +x_106 = lean_ctor_get(x_54, 1); +lean_inc(x_106); +lean_dec(x_54); +x_30 = x_105; +x_31 = x_106; +goto block_41; +} +} +else +{ +lean_object* x_107; lean_object* x_108; +lean_dec(x_45); +lean_dec(x_43); +lean_dec(x_20); +x_107 = lean_ctor_get(x_51, 0); +lean_inc(x_107); +x_108 = lean_ctor_get(x_51, 1); +lean_inc(x_108); +lean_dec(x_51); +x_30 = x_107; +x_31 = x_108; +goto block_41; +} +} +else +{ +lean_object* x_109; lean_object* x_110; +lean_dec(x_45); +lean_dec(x_43); +lean_dec(x_20); +x_109 = lean_ctor_get(x_48, 0); +lean_inc(x_109); +x_110 = lean_ctor_get(x_48, 1); +lean_inc(x_110); +lean_dec(x_48); +x_30 = x_109; +x_31 = x_110; +goto block_41; +} +} +} +else +{ +lean_object* x_188; lean_object* x_189; +lean_dec(x_20); lean_dec(x_11); -x_23 = l_Lean_Syntax_isNone(x_15); -lean_dec(x_15); -x_24 = l_Lean_Syntax_isNone(x_13); +lean_dec(x_10); +lean_dec(x_1); +x_188 = lean_ctor_get(x_42, 0); +lean_inc(x_188); +x_189 = lean_ctor_get(x_42, 1); +lean_inc(x_189); +lean_dec(x_42); +x_30 = x_188; +x_31 = x_189; +goto block_41; +} +block_41: +{ +lean_object* x_32; +x_32 = l_Lean_Elab_Command_modifyScope___at_Lean_Elab_Command_elabAxiom___spec__2(x_16, x_3, x_31); +if (lean_obj_tag(x_32) == 0) +{ +uint8_t x_33; +x_33 = !lean_is_exclusive(x_32); +if (x_33 == 0) +{ +lean_object* x_34; +x_34 = lean_ctor_get(x_32, 0); +lean_dec(x_34); +lean_ctor_set_tag(x_32, 1); +lean_ctor_set(x_32, 0, x_30); +return x_32; +} +else +{ +lean_object* x_35; lean_object* x_36; +x_35 = lean_ctor_get(x_32, 1); +lean_inc(x_35); +lean_dec(x_32); +x_36 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_36, 0, x_30); +lean_ctor_set(x_36, 1, x_35); +return x_36; +} +} +else +{ +uint8_t x_37; +lean_dec(x_30); +x_37 = !lean_is_exclusive(x_32); +if (x_37 == 0) +{ +return x_32; +} +else +{ +lean_object* x_38; lean_object* x_39; lean_object* x_40; +x_38 = lean_ctor_get(x_32, 0); +x_39 = lean_ctor_get(x_32, 1); +lean_inc(x_39); +lean_inc(x_38); +lean_dec(x_32); +x_40 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_40, 0, x_38); +lean_ctor_set(x_40, 1, x_39); +return x_40; +} +} +} +} +else +{ +uint8_t x_190; +lean_dec(x_21); +lean_dec(x_20); +lean_dec(x_16); +lean_dec(x_11); +lean_dec(x_10); +lean_dec(x_3); +lean_dec(x_1); +x_190 = !lean_is_exclusive(x_26); +if (x_190 == 0) +{ +return x_26; +} +else +{ +lean_object* x_191; lean_object* x_192; lean_object* x_193; +x_191 = lean_ctor_get(x_26, 0); +x_192 = lean_ctor_get(x_26, 1); +lean_inc(x_192); +lean_inc(x_191); +lean_dec(x_26); +x_193 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_193, 0, x_191); +lean_ctor_set(x_193, 1, x_192); +return x_193; +} +} +} +else +{ +uint8_t x_194; +lean_dec(x_21); +lean_dec(x_20); +lean_dec(x_18); +lean_dec(x_16); +lean_dec(x_11); +lean_dec(x_10); +lean_dec(x_3); +lean_dec(x_1); +x_194 = !lean_is_exclusive(x_24); +if (x_194 == 0) +{ +return x_24; +} +else +{ +lean_object* x_195; lean_object* x_196; lean_object* x_197; +x_195 = lean_ctor_get(x_24, 0); +x_196 = lean_ctor_get(x_24, 1); +lean_inc(x_196); +lean_inc(x_195); +lean_dec(x_24); +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 +{ +lean_object* x_198; lean_object* x_199; +lean_dec(x_18); +lean_dec(x_16); lean_dec(x_13); -if (x_22 == 0) -{ -if (x_23 == 0) -{ -if (x_24 == 0) -{ -uint8_t x_25; lean_object* x_26; lean_object* x_27; -x_25 = 1; -x_26 = lean_alloc_ctor(0, 2, 4); -lean_ctor_set(x_26, 0, x_16); -lean_ctor_set(x_26, 1, x_20); -lean_ctor_set_uint8(x_26, sizeof(void*)*2, x_18); -lean_ctor_set_uint8(x_26, sizeof(void*)*2 + 1, x_25); -lean_ctor_set_uint8(x_26, sizeof(void*)*2 + 2, x_25); -lean_ctor_set_uint8(x_26, sizeof(void*)*2 + 3, x_25); -x_27 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_27, 0, x_26); -lean_ctor_set(x_27, 1, x_21); -return x_27; -} -else -{ -uint8_t x_28; uint8_t x_29; lean_object* x_30; lean_object* x_31; -x_28 = 1; -x_29 = 0; -x_30 = lean_alloc_ctor(0, 2, 4); -lean_ctor_set(x_30, 0, x_16); -lean_ctor_set(x_30, 1, x_20); -lean_ctor_set_uint8(x_30, sizeof(void*)*2, x_18); -lean_ctor_set_uint8(x_30, sizeof(void*)*2 + 1, x_28); -lean_ctor_set_uint8(x_30, sizeof(void*)*2 + 2, x_28); -lean_ctor_set_uint8(x_30, sizeof(void*)*2 + 3, x_29); -x_31 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_31, 0, x_30); -lean_ctor_set(x_31, 1, x_21); -return x_31; -} -} -else -{ -if (x_24 == 0) -{ -uint8_t x_32; uint8_t x_33; lean_object* x_34; lean_object* x_35; -x_32 = 1; -x_33 = 0; -x_34 = lean_alloc_ctor(0, 2, 4); -lean_ctor_set(x_34, 0, x_16); -lean_ctor_set(x_34, 1, x_20); -lean_ctor_set_uint8(x_34, sizeof(void*)*2, x_18); -lean_ctor_set_uint8(x_34, sizeof(void*)*2 + 1, x_32); -lean_ctor_set_uint8(x_34, sizeof(void*)*2 + 2, x_33); -lean_ctor_set_uint8(x_34, sizeof(void*)*2 + 3, x_32); -x_35 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_35, 0, x_34); -lean_ctor_set(x_35, 1, x_21); -return x_35; -} -else -{ -uint8_t x_36; uint8_t x_37; lean_object* x_38; lean_object* x_39; -x_36 = 1; -x_37 = 0; -x_38 = lean_alloc_ctor(0, 2, 4); -lean_ctor_set(x_38, 0, x_16); -lean_ctor_set(x_38, 1, x_20); -lean_ctor_set_uint8(x_38, sizeof(void*)*2, x_18); -lean_ctor_set_uint8(x_38, sizeof(void*)*2 + 1, x_36); -lean_ctor_set_uint8(x_38, sizeof(void*)*2 + 2, x_37); -lean_ctor_set_uint8(x_38, sizeof(void*)*2 + 3, x_37); -x_39 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_39, 0, x_38); -lean_ctor_set(x_39, 1, x_21); -return x_39; +lean_dec(x_11); +lean_dec(x_10); +lean_dec(x_1); +x_198 = l_Lean_Elab_Command_withDeclId___closed__3; +x_199 = l_Lean_Elab_throwError___at_Lean_Elab_Command_elabCommand___spec__1(x_6, x_198, x_3, x_19); +lean_dec(x_3); +lean_dec(x_6); +return x_199; } } } else { -if (x_23 == 0) +uint8_t x_213; +lean_dec(x_14); +lean_dec(x_13); +lean_dec(x_11); +lean_dec(x_10); +lean_dec(x_6); +lean_dec(x_3); +lean_dec(x_1); +x_213 = !lean_is_exclusive(x_15); +if (x_213 == 0) { -if (x_24 == 0) -{ -uint8_t x_40; uint8_t x_41; lean_object* x_42; lean_object* x_43; -x_40 = 0; -x_41 = 1; -x_42 = lean_alloc_ctor(0, 2, 4); -lean_ctor_set(x_42, 0, x_16); -lean_ctor_set(x_42, 1, x_20); -lean_ctor_set_uint8(x_42, sizeof(void*)*2, x_18); -lean_ctor_set_uint8(x_42, sizeof(void*)*2 + 1, x_40); -lean_ctor_set_uint8(x_42, sizeof(void*)*2 + 2, x_41); -lean_ctor_set_uint8(x_42, sizeof(void*)*2 + 3, x_41); -x_43 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_43, 0, x_42); -lean_ctor_set(x_43, 1, x_21); -return x_43; +return x_15; } else { -uint8_t x_44; uint8_t x_45; lean_object* x_46; lean_object* x_47; -x_44 = 0; -x_45 = 1; -x_46 = lean_alloc_ctor(0, 2, 4); -lean_ctor_set(x_46, 0, x_16); -lean_ctor_set(x_46, 1, x_20); -lean_ctor_set_uint8(x_46, sizeof(void*)*2, x_18); -lean_ctor_set_uint8(x_46, sizeof(void*)*2 + 1, x_44); -lean_ctor_set_uint8(x_46, sizeof(void*)*2 + 2, x_45); -lean_ctor_set_uint8(x_46, sizeof(void*)*2 + 3, x_44); -x_47 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_47, 0, x_46); -lean_ctor_set(x_47, 1, x_21); -return x_47; +lean_object* x_214; lean_object* x_215; lean_object* x_216; +x_214 = lean_ctor_get(x_15, 0); +x_215 = lean_ctor_get(x_15, 1); +lean_inc(x_215); +lean_inc(x_214); +lean_dec(x_15); +x_216 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_216, 0, x_214); +lean_ctor_set(x_216, 1, x_215); +return x_216; } } -else +} +} +lean_object* l_Array_iterateMAux___main___at_Lean_Elab_Command_elabAxiom___spec__5___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6) { +_start: { -if (x_24 == 0) +lean_object* x_7; +x_7 = l_Array_iterateMAux___main___at_Lean_Elab_Command_elabAxiom___spec__5(x_1, x_2, x_3, x_4, x_5, x_6); +lean_dec(x_5); +lean_dec(x_2); +lean_dec(x_1); +return x_7; +} +} +lean_object* l_Lean_Elab_Command_elabAxiom___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: { -uint8_t x_48; uint8_t x_49; lean_object* x_50; lean_object* x_51; -x_48 = 0; -x_49 = 1; -x_50 = lean_alloc_ctor(0, 2, 4); -lean_ctor_set(x_50, 0, x_16); -lean_ctor_set(x_50, 1, x_20); -lean_ctor_set_uint8(x_50, sizeof(void*)*2, x_18); -lean_ctor_set_uint8(x_50, sizeof(void*)*2 + 1, x_48); -lean_ctor_set_uint8(x_50, sizeof(void*)*2 + 2, x_48); -lean_ctor_set_uint8(x_50, sizeof(void*)*2 + 3, x_49); -x_51 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_51, 0, x_50); -lean_ctor_set(x_51, 1, x_21); -return x_51; +lean_object* x_9; +x_9 = l_Lean_Elab_Command_elabAxiom___lambda__1(x_1, x_2, x_3, x_4, x_5, x_6, x_7, x_8); +lean_dec(x_5); +return x_9; } -else +} +lean_object* l_Lean_Elab_Command_elabAxiom___lambda__2___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8) { +_start: { -uint8_t x_52; lean_object* x_53; lean_object* x_54; -x_52 = 0; -x_53 = lean_alloc_ctor(0, 2, 4); -lean_ctor_set(x_53, 0, x_16); -lean_ctor_set(x_53, 1, x_20); -lean_ctor_set_uint8(x_53, sizeof(void*)*2, x_18); -lean_ctor_set_uint8(x_53, sizeof(void*)*2 + 1, x_52); -lean_ctor_set_uint8(x_53, sizeof(void*)*2 + 2, x_52); -lean_ctor_set_uint8(x_53, sizeof(void*)*2 + 3, x_52); -x_54 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_54, 0, x_53); -lean_ctor_set(x_54, 1, x_21); -return x_54; +lean_object* x_9; +x_9 = l_Lean_Elab_Command_elabAxiom___lambda__2(x_1, x_2, x_3, x_4, x_5, x_6, x_7, x_8); +lean_dec(x_1); +return x_9; } } -} -} -} -} -} -} -lean_object* l_Lean_Elab_throwError___at_Lean_Elab_Command_elabModifiers___spec__1___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { +lean_object* l_Lean_Elab_Command_elabAxiom___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { _start: { lean_object* x_5; -x_5 = l_Lean_Elab_throwError___at_Lean_Elab_Command_elabModifiers___spec__1(x_1, x_2, x_3, x_4); -lean_dec(x_3); -lean_dec(x_1); +x_5 = l_Lean_Elab_Command_elabAxiom(x_1, x_2, x_3, x_4); +lean_dec(x_2); return x_5; } } -lean_object* l_Lean_Elab_throwError___at_Lean_Elab_Command_elabModifiers___spec__2___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { +lean_object* l_Lean_Elab_Command_elabInductive___rarg(lean_object* x_1) { _start: { -lean_object* x_5; -x_5 = l_Lean_Elab_throwError___at_Lean_Elab_Command_elabModifiers___spec__2(x_1, x_2, x_3, x_4); -lean_dec(x_3); -lean_dec(x_1); -return x_5; +lean_object* x_2; lean_object* x_3; +x_2 = lean_box(0); +x_3 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_3, 0, x_2); +lean_ctor_set(x_3, 1, x_1); +return x_3; } } -lean_object* l_Lean_Elab_Command_elabModifiers___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +lean_object* l_Lean_Elab_Command_elabInductive(lean_object* x_1, lean_object* x_2, lean_object* x_3) { _start: { lean_object* x_4; -x_4 = l_Lean_Elab_Command_elabModifiers(x_1, x_2, x_3); +x_4 = lean_alloc_closure((void*)(l_Lean_Elab_Command_elabInductive___rarg), 1, 0); +return x_4; +} +} +lean_object* l_Lean_Elab_Command_elabInductive___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +_start: +{ +lean_object* x_4; +x_4 = l_Lean_Elab_Command_elabInductive(x_1, x_2, x_3); +lean_dec(x_3); +lean_dec(x_2); +lean_dec(x_1); +return x_4; +} +} +lean_object* l_Lean_Elab_Command_elabClassInductive___rarg(lean_object* x_1) { +_start: +{ +lean_object* x_2; lean_object* x_3; +x_2 = lean_box(0); +x_3 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_3, 0, x_2); +lean_ctor_set(x_3, 1, x_1); +return x_3; +} +} +lean_object* l_Lean_Elab_Command_elabClassInductive(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +_start: +{ +lean_object* x_4; +x_4 = lean_alloc_closure((void*)(l_Lean_Elab_Command_elabClassInductive___rarg), 1, 0); +return x_4; +} +} +lean_object* l_Lean_Elab_Command_elabClassInductive___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +_start: +{ +lean_object* x_4; +x_4 = l_Lean_Elab_Command_elabClassInductive(x_1, x_2, x_3); +lean_dec(x_3); +lean_dec(x_2); +lean_dec(x_1); +return x_4; +} +} +lean_object* l_Lean_Elab_Command_elabStructure___rarg(lean_object* x_1) { +_start: +{ +lean_object* x_2; lean_object* x_3; +x_2 = lean_box(0); +x_3 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_3, 0, x_2); +lean_ctor_set(x_3, 1, x_1); +return x_3; +} +} +lean_object* l_Lean_Elab_Command_elabStructure(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +_start: +{ +lean_object* x_4; +x_4 = lean_alloc_closure((void*)(l_Lean_Elab_Command_elabStructure___rarg), 1, 0); +return x_4; +} +} +lean_object* l_Lean_Elab_Command_elabStructure___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +_start: +{ +lean_object* x_4; +x_4 = l_Lean_Elab_Command_elabStructure(x_1, x_2, x_3); +lean_dec(x_3); +lean_dec(x_2); lean_dec(x_1); return x_4; } @@ -2367,19 +4392,19 @@ return x_4; lean_object* _init_l_Lean_Elab_Command_elabDeclaration___closed__1() { _start: { -lean_object* x_1; -x_1 = lean_mk_string("wip, modifiers: "); -return x_1; +lean_object* x_1; lean_object* x_2; lean_object* x_3; +x_1 = l_Lean_Parser_Command_docComment___elambda__1___closed__2; +x_2 = l_Lean_Meta_registerInstanceAttr___closed__1; +x_3 = lean_name_mk_string(x_1, x_2); +return x_3; } } lean_object* _init_l_Lean_Elab_Command_elabDeclaration___closed__2() { _start: { -lean_object* x_1; lean_object* x_2; -x_1 = l_Lean_Elab_Command_elabDeclaration___closed__1; -x_2 = lean_alloc_ctor(2, 1, 0); -lean_ctor_set(x_2, 0, x_1); -return x_2; +lean_object* x_1; +x_1 = lean_mk_string("unexpected declaration"); +return x_1; } } lean_object* _init_l_Lean_Elab_Command_elabDeclaration___closed__3() { @@ -2387,6 +4412,16 @@ _start: { lean_object* x_1; lean_object* x_2; x_1 = l_Lean_Elab_Command_elabDeclaration___closed__2; +x_2 = lean_alloc_ctor(2, 1, 0); +lean_ctor_set(x_2, 0, x_1); +return x_2; +} +} +lean_object* _init_l_Lean_Elab_Command_elabDeclaration___closed__4() { +_start: +{ +lean_object* x_1; lean_object* x_2; +x_1 = l_Lean_Elab_Command_elabDeclaration___closed__3; x_2 = lean_alloc_ctor(0, 1, 0); lean_ctor_set(x_2, 0, x_1); return x_2; @@ -2405,297 +4440,353 @@ x_8 = l_Lean_Elab_Command_elabModifiers(x_7, x_2, x_3); lean_dec(x_7); if (lean_obj_tag(x_8) == 0) { -lean_object* x_9; lean_object* x_10; lean_object* x_11; uint8_t x_12; uint8_t x_13; uint8_t x_14; uint8_t x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; -x_9 = lean_ctor_get(x_8, 0); -lean_inc(x_9); -x_10 = lean_ctor_get(x_8, 1); -lean_inc(x_10); -lean_dec(x_8); -x_11 = lean_ctor_get(x_9, 0); -lean_inc(x_11); -x_12 = lean_ctor_get_uint8(x_9, sizeof(void*)*2); -x_13 = lean_ctor_get_uint8(x_9, sizeof(void*)*2 + 1); -x_14 = lean_ctor_get_uint8(x_9, sizeof(void*)*2 + 2); -x_15 = lean_ctor_get_uint8(x_9, sizeof(void*)*2 + 3); -x_16 = lean_ctor_get(x_9, 1); -lean_inc(x_16); -lean_dec(x_9); -x_17 = l_Array_toList___rarg(x_16); -lean_dec(x_16); -x_18 = l_List_map___main___at_Lean_Elab_Command_Modifiers_hasFormat___spec__2(x_17); -if (lean_obj_tag(x_11) == 0) +uint8_t x_9; +x_9 = !lean_is_exclusive(x_8); +if (x_9 == 0) { -lean_object* x_115; -x_115 = lean_box(0); -x_19 = x_115; -goto block_114; -} -else +lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; uint8_t x_16; +x_10 = lean_ctor_get(x_8, 0); +x_11 = lean_ctor_get(x_8, 1); +x_12 = lean_unsigned_to_nat(1u); +x_13 = lean_array_get(x_5, x_4, x_12); +lean_inc(x_13); +x_14 = l_Lean_Syntax_getKind(x_13); +x_15 = l_Lean_Parser_Command_abbrev___elambda__1___closed__2; +x_16 = lean_name_eq(x_14, x_15); +if (x_16 == 0) { -lean_object* x_116; lean_object* x_117; uint8_t x_118; lean_object* x_119; lean_object* x_120; lean_object* x_121; lean_object* x_122; lean_object* x_123; lean_object* x_124; -x_116 = lean_ctor_get(x_11, 0); -lean_inc(x_116); -lean_dec(x_11); -x_117 = lean_alloc_ctor(2, 1, 0); -lean_ctor_set(x_117, 0, x_116); -x_118 = 0; -x_119 = l_Lean_Elab_Command_Modifiers_hasFormat___closed__14; -x_120 = lean_alloc_ctor(4, 2, 1); -lean_ctor_set(x_120, 0, x_119); -lean_ctor_set(x_120, 1, x_117); -lean_ctor_set_uint8(x_120, sizeof(void*)*2, x_118); -x_121 = l_Lean_Elab_Command_Modifiers_hasFormat___closed__16; -x_122 = lean_alloc_ctor(4, 2, 1); -lean_ctor_set(x_122, 0, x_120); -lean_ctor_set(x_122, 1, x_121); -lean_ctor_set_uint8(x_122, sizeof(void*)*2, x_118); -x_123 = lean_box(0); -x_124 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_124, 0, x_122); -lean_ctor_set(x_124, 1, x_123); -x_19 = x_124; -goto block_114; -} -block_114: +lean_object* x_17; uint8_t x_18; +x_17 = l_Lean_Parser_Command_def___elambda__1___closed__2; +x_18 = lean_name_eq(x_14, x_17); +if (x_18 == 0) { -lean_object* x_20; -switch (x_12) { -case 0: +lean_object* x_19; uint8_t x_20; +x_19 = l_Lean_Parser_Command_theorem___elambda__1___closed__2; +x_20 = lean_name_eq(x_14, x_19); +if (x_20 == 0) { -lean_object* x_111; -x_111 = lean_box(0); -x_20 = x_111; -goto block_110; -} -case 1: +lean_object* x_21; uint8_t x_22; +x_21 = l_Lean_Parser_Command_constant___elambda__1___closed__2; +x_22 = lean_name_eq(x_14, x_21); +if (x_22 == 0) { -lean_object* x_112; -x_112 = l_Lean_Elab_Command_Modifiers_hasFormat___closed__11; -x_20 = x_112; -goto block_110; -} -default: +lean_object* x_23; uint8_t x_24; +x_23 = l_Lean_Elab_Command_elabDeclaration___closed__1; +x_24 = lean_name_eq(x_14, x_23); +if (x_24 == 0) { -lean_object* x_113; -x_113 = l_Lean_Elab_Command_Modifiers_hasFormat___closed__13; -x_20 = x_113; -goto block_110; -} -} -block_110: +lean_object* x_25; uint8_t x_26; +x_25 = l_Lean_Parser_Command_axiom___elambda__1___closed__2; +x_26 = lean_name_eq(x_14, x_25); +if (x_26 == 0) { -lean_object* x_21; lean_object* x_22; -x_21 = l_List_append___rarg(x_19, x_20); -if (x_13 == 0) +lean_object* x_27; uint8_t x_28; +x_27 = l_Lean_Parser_Command_example___elambda__1___closed__2; +x_28 = lean_name_eq(x_14, x_27); +if (x_28 == 0) { -lean_object* x_108; -x_108 = lean_box(0); -x_22 = x_108; -goto block_107; -} -else +lean_object* x_29; uint8_t x_30; +lean_dec(x_13); +lean_dec(x_10); +x_29 = l_Lean_Parser_Command_inductive___elambda__1___closed__2; +x_30 = lean_name_eq(x_14, x_29); +if (x_30 == 0) { -lean_object* x_109; -x_109 = l_Lean_Elab_Command_Modifiers_hasFormat___closed__9; -x_22 = x_109; -goto block_107; -} -block_107: +lean_object* x_31; uint8_t x_32; +x_31 = l_Lean_Parser_Command_classInductive___elambda__1___closed__2; +x_32 = lean_name_eq(x_14, x_31); +if (x_32 == 0) { -lean_object* x_23; -x_23 = l_List_append___rarg(x_21, x_22); -if (x_14 == 0) +lean_object* x_33; uint8_t x_34; +x_33 = l_Lean_Parser_Command_structure___elambda__1___closed__2; +x_34 = lean_name_eq(x_14, x_33); +lean_dec(x_14); +if (x_34 == 0) { -lean_object* x_24; lean_object* x_25; -x_24 = lean_box(0); -x_25 = l_List_append___rarg(x_23, x_24); -if (x_15 == 0) -{ -lean_object* x_26; lean_object* x_27; lean_object* x_28; lean_object* x_29; uint8_t x_30; lean_object* x_31; lean_object* x_32; lean_object* x_33; lean_object* x_34; 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; -x_26 = l_List_append___rarg(x_25, x_24); -x_27 = l_List_append___rarg(x_26, x_18); -x_28 = l_Lean_List_format___rarg___closed__4; -x_29 = l_Lean_Format_joinSep___main___at___private_Init_Lean_Data_Trie_6__toStringAux___main___spec__1(x_27, x_28); -lean_dec(x_27); -x_30 = 0; -x_31 = l_Lean_Elab_Command_Modifiers_hasFormat___closed__2; -x_32 = lean_alloc_ctor(4, 2, 1); -lean_ctor_set(x_32, 0, x_31); -lean_ctor_set(x_32, 1, x_29); -lean_ctor_set_uint8(x_32, sizeof(void*)*2, x_30); -x_33 = l_Lean_Elab_Command_Modifiers_hasFormat___closed__3; -x_34 = lean_alloc_ctor(4, 2, 1); -lean_ctor_set(x_34, 0, x_32); -lean_ctor_set(x_34, 1, x_33); -lean_ctor_set_uint8(x_34, sizeof(void*)*2, x_30); -x_35 = l_Lean_Elab_Command_Modifiers_hasFormat___closed__1; -x_36 = lean_alloc_ctor(3, 2, 0); -lean_ctor_set(x_36, 0, x_35); -lean_ctor_set(x_36, 1, x_34); -x_37 = lean_format_group(x_36); -x_38 = l_Lean_Options_empty; -x_39 = l_Lean_Format_pretty(x_37, x_38); -x_40 = lean_alloc_ctor(2, 1, 0); -lean_ctor_set(x_40, 0, x_39); -x_41 = lean_alloc_ctor(0, 1, 0); -lean_ctor_set(x_41, 0, x_40); -x_42 = l_Lean_Elab_Command_elabDeclaration___closed__3; -x_43 = lean_alloc_ctor(8, 2, 0); -lean_ctor_set(x_43, 0, x_42); -lean_ctor_set(x_43, 1, x_41); -x_44 = l_Lean_Elab_throwError___at_Lean_Elab_Command_elabCommand___spec__1(x_1, x_43, x_2, x_10); +lean_object* x_35; lean_object* x_36; +lean_free_object(x_8); +x_35 = l_Lean_Elab_Command_elabDeclaration___closed__4; +x_36 = l_Lean_Elab_throwError___at_Lean_Elab_Command_elabCommand___spec__1(x_1, x_35, x_2, x_11); lean_dec(x_2); +return x_36; +} +else +{ +lean_object* x_37; +lean_dec(x_2); +x_37 = lean_box(0); +lean_ctor_set(x_8, 0, x_37); +return x_8; +} +} +else +{ +lean_object* x_38; +lean_dec(x_14); +lean_dec(x_2); +x_38 = lean_box(0); +lean_ctor_set(x_8, 0, x_38); +return x_8; +} +} +else +{ +lean_object* x_39; +lean_dec(x_14); +lean_dec(x_2); +x_39 = lean_box(0); +lean_ctor_set(x_8, 0, x_39); +return x_8; +} +} +else +{ +lean_object* x_40; +lean_dec(x_14); +lean_free_object(x_8); +x_40 = l_Lean_Elab_Command_elabExample(x_10, x_13, x_2, x_11); +return x_40; +} +} +else +{ +lean_object* x_41; +lean_dec(x_14); +lean_free_object(x_8); +x_41 = l_Lean_Elab_Command_elabAxiom(x_10, x_13, x_2, x_11); +lean_dec(x_13); +return x_41; +} +} +else +{ +lean_object* x_42; +lean_dec(x_14); +lean_free_object(x_8); +x_42 = l_Lean_Elab_Command_elabInstance(x_10, x_13, x_2, x_11); +return x_42; +} +} +else +{ +lean_object* x_43; +lean_dec(x_14); +lean_free_object(x_8); +x_43 = l_Lean_Elab_Command_elabConstant(x_10, x_13, x_2, x_11); +return x_43; +} +} +else +{ +lean_object* x_44; +lean_dec(x_14); +lean_free_object(x_8); +x_44 = l_Lean_Elab_Command_elabTheorem(x_10, x_13, x_2, x_11); return x_44; } +} else { -lean_object* x_45; lean_object* x_46; lean_object* x_47; lean_object* x_48; lean_object* x_49; uint8_t x_50; lean_object* x_51; lean_object* x_52; lean_object* x_53; lean_object* x_54; lean_object* x_55; lean_object* x_56; lean_object* x_57; lean_object* x_58; lean_object* x_59; lean_object* x_60; lean_object* x_61; lean_object* x_62; lean_object* x_63; lean_object* x_64; -x_45 = l_Lean_Elab_Command_Modifiers_hasFormat___closed__5; -x_46 = l_List_append___rarg(x_25, x_45); -x_47 = l_List_append___rarg(x_46, x_18); -x_48 = l_Lean_List_format___rarg___closed__4; -x_49 = l_Lean_Format_joinSep___main___at___private_Init_Lean_Data_Trie_6__toStringAux___main___spec__1(x_47, x_48); +lean_object* x_45; +lean_dec(x_14); +lean_free_object(x_8); +x_45 = l_Lean_Elab_Command_elabDef(x_10, x_13, x_2, x_11); +return x_45; +} +} +else +{ +lean_object* x_46; +lean_dec(x_14); +lean_free_object(x_8); +x_46 = l_Lean_Elab_Command_elabAbbrev(x_10, x_13, x_2, x_11); +return x_46; +} +} +else +{ +lean_object* x_47; lean_object* x_48; lean_object* x_49; lean_object* x_50; lean_object* x_51; lean_object* x_52; uint8_t x_53; +x_47 = lean_ctor_get(x_8, 0); +x_48 = lean_ctor_get(x_8, 1); +lean_inc(x_48); +lean_inc(x_47); +lean_dec(x_8); +x_49 = lean_unsigned_to_nat(1u); +x_50 = lean_array_get(x_5, x_4, x_49); +lean_inc(x_50); +x_51 = l_Lean_Syntax_getKind(x_50); +x_52 = l_Lean_Parser_Command_abbrev___elambda__1___closed__2; +x_53 = lean_name_eq(x_51, x_52); +if (x_53 == 0) +{ +lean_object* x_54; uint8_t x_55; +x_54 = l_Lean_Parser_Command_def___elambda__1___closed__2; +x_55 = lean_name_eq(x_51, x_54); +if (x_55 == 0) +{ +lean_object* x_56; uint8_t x_57; +x_56 = l_Lean_Parser_Command_theorem___elambda__1___closed__2; +x_57 = lean_name_eq(x_51, x_56); +if (x_57 == 0) +{ +lean_object* x_58; uint8_t x_59; +x_58 = l_Lean_Parser_Command_constant___elambda__1___closed__2; +x_59 = lean_name_eq(x_51, x_58); +if (x_59 == 0) +{ +lean_object* x_60; uint8_t x_61; +x_60 = l_Lean_Elab_Command_elabDeclaration___closed__1; +x_61 = lean_name_eq(x_51, x_60); +if (x_61 == 0) +{ +lean_object* x_62; uint8_t x_63; +x_62 = l_Lean_Parser_Command_axiom___elambda__1___closed__2; +x_63 = lean_name_eq(x_51, x_62); +if (x_63 == 0) +{ +lean_object* x_64; uint8_t x_65; +x_64 = l_Lean_Parser_Command_example___elambda__1___closed__2; +x_65 = lean_name_eq(x_51, x_64); +if (x_65 == 0) +{ +lean_object* x_66; uint8_t x_67; +lean_dec(x_50); lean_dec(x_47); -x_50 = 0; -x_51 = l_Lean_Elab_Command_Modifiers_hasFormat___closed__2; -x_52 = lean_alloc_ctor(4, 2, 1); -lean_ctor_set(x_52, 0, x_51); -lean_ctor_set(x_52, 1, x_49); -lean_ctor_set_uint8(x_52, sizeof(void*)*2, x_50); -x_53 = l_Lean_Elab_Command_Modifiers_hasFormat___closed__3; -x_54 = lean_alloc_ctor(4, 2, 1); -lean_ctor_set(x_54, 0, x_52); -lean_ctor_set(x_54, 1, x_53); -lean_ctor_set_uint8(x_54, sizeof(void*)*2, x_50); -x_55 = l_Lean_Elab_Command_Modifiers_hasFormat___closed__1; -x_56 = lean_alloc_ctor(3, 2, 0); -lean_ctor_set(x_56, 0, x_55); -lean_ctor_set(x_56, 1, x_54); -x_57 = lean_format_group(x_56); -x_58 = l_Lean_Options_empty; -x_59 = l_Lean_Format_pretty(x_57, x_58); -x_60 = lean_alloc_ctor(2, 1, 0); -lean_ctor_set(x_60, 0, x_59); -x_61 = lean_alloc_ctor(0, 1, 0); -lean_ctor_set(x_61, 0, x_60); -x_62 = l_Lean_Elab_Command_elabDeclaration___closed__3; -x_63 = lean_alloc_ctor(8, 2, 0); -lean_ctor_set(x_63, 0, x_62); -lean_ctor_set(x_63, 1, x_61); -x_64 = l_Lean_Elab_throwError___at_Lean_Elab_Command_elabCommand___spec__1(x_1, x_63, x_2, x_10); +x_66 = l_Lean_Parser_Command_inductive___elambda__1___closed__2; +x_67 = lean_name_eq(x_51, x_66); +if (x_67 == 0) +{ +lean_object* x_68; uint8_t x_69; +x_68 = l_Lean_Parser_Command_classInductive___elambda__1___closed__2; +x_69 = lean_name_eq(x_51, x_68); +if (x_69 == 0) +{ +lean_object* x_70; uint8_t x_71; +x_70 = l_Lean_Parser_Command_structure___elambda__1___closed__2; +x_71 = lean_name_eq(x_51, x_70); +lean_dec(x_51); +if (x_71 == 0) +{ +lean_object* x_72; lean_object* x_73; +x_72 = l_Lean_Elab_Command_elabDeclaration___closed__4; +x_73 = l_Lean_Elab_throwError___at_Lean_Elab_Command_elabCommand___spec__1(x_1, x_72, x_2, x_48); lean_dec(x_2); -return x_64; +return x_73; +} +else +{ +lean_object* x_74; lean_object* x_75; +lean_dec(x_2); +x_74 = lean_box(0); +x_75 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_75, 0, x_74); +lean_ctor_set(x_75, 1, x_48); +return x_75; } } else { -lean_object* x_65; lean_object* x_66; lean_object* x_67; -x_65 = lean_box(0); -x_66 = l_Lean_Elab_Command_Modifiers_hasFormat___closed__7; -x_67 = l_List_append___rarg(x_23, x_66); -if (x_15 == 0) -{ -lean_object* x_68; lean_object* x_69; lean_object* x_70; lean_object* x_71; uint8_t x_72; lean_object* x_73; lean_object* x_74; lean_object* x_75; lean_object* x_76; lean_object* x_77; lean_object* x_78; lean_object* x_79; lean_object* x_80; lean_object* x_81; lean_object* x_82; lean_object* x_83; lean_object* x_84; lean_object* x_85; lean_object* x_86; -x_68 = l_List_append___rarg(x_67, x_65); -x_69 = l_List_append___rarg(x_68, x_18); -x_70 = l_Lean_List_format___rarg___closed__4; -x_71 = l_Lean_Format_joinSep___main___at___private_Init_Lean_Data_Trie_6__toStringAux___main___spec__1(x_69, x_70); -lean_dec(x_69); -x_72 = 0; -x_73 = l_Lean_Elab_Command_Modifiers_hasFormat___closed__2; -x_74 = lean_alloc_ctor(4, 2, 1); -lean_ctor_set(x_74, 0, x_73); -lean_ctor_set(x_74, 1, x_71); -lean_ctor_set_uint8(x_74, sizeof(void*)*2, x_72); -x_75 = l_Lean_Elab_Command_Modifiers_hasFormat___closed__3; -x_76 = lean_alloc_ctor(4, 2, 1); -lean_ctor_set(x_76, 0, x_74); -lean_ctor_set(x_76, 1, x_75); -lean_ctor_set_uint8(x_76, sizeof(void*)*2, x_72); -x_77 = l_Lean_Elab_Command_Modifiers_hasFormat___closed__1; -x_78 = lean_alloc_ctor(3, 2, 0); -lean_ctor_set(x_78, 0, x_77); -lean_ctor_set(x_78, 1, x_76); -x_79 = lean_format_group(x_78); -x_80 = l_Lean_Options_empty; -x_81 = l_Lean_Format_pretty(x_79, x_80); -x_82 = lean_alloc_ctor(2, 1, 0); -lean_ctor_set(x_82, 0, x_81); -x_83 = lean_alloc_ctor(0, 1, 0); -lean_ctor_set(x_83, 0, x_82); -x_84 = l_Lean_Elab_Command_elabDeclaration___closed__3; -x_85 = lean_alloc_ctor(8, 2, 0); -lean_ctor_set(x_85, 0, x_84); -lean_ctor_set(x_85, 1, x_83); -x_86 = l_Lean_Elab_throwError___at_Lean_Elab_Command_elabCommand___spec__1(x_1, x_85, x_2, x_10); +lean_object* x_76; lean_object* x_77; +lean_dec(x_51); lean_dec(x_2); +x_76 = lean_box(0); +x_77 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_77, 0, x_76); +lean_ctor_set(x_77, 1, x_48); +return x_77; +} +} +else +{ +lean_object* x_78; lean_object* x_79; +lean_dec(x_51); +lean_dec(x_2); +x_78 = lean_box(0); +x_79 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_79, 0, x_78); +lean_ctor_set(x_79, 1, x_48); +return x_79; +} +} +else +{ +lean_object* x_80; +lean_dec(x_51); +x_80 = l_Lean_Elab_Command_elabExample(x_47, x_50, x_2, x_48); +return x_80; +} +} +else +{ +lean_object* x_81; +lean_dec(x_51); +x_81 = l_Lean_Elab_Command_elabAxiom(x_47, x_50, x_2, x_48); +lean_dec(x_50); +return x_81; +} +} +else +{ +lean_object* x_82; +lean_dec(x_51); +x_82 = l_Lean_Elab_Command_elabInstance(x_47, x_50, x_2, x_48); +return x_82; +} +} +else +{ +lean_object* x_83; +lean_dec(x_51); +x_83 = l_Lean_Elab_Command_elabConstant(x_47, x_50, x_2, x_48); +return x_83; +} +} +else +{ +lean_object* x_84; +lean_dec(x_51); +x_84 = l_Lean_Elab_Command_elabTheorem(x_47, x_50, x_2, x_48); +return x_84; +} +} +else +{ +lean_object* x_85; +lean_dec(x_51); +x_85 = l_Lean_Elab_Command_elabDef(x_47, x_50, x_2, x_48); +return x_85; +} +} +else +{ +lean_object* x_86; +lean_dec(x_51); +x_86 = l_Lean_Elab_Command_elabAbbrev(x_47, x_50, x_2, x_48); return x_86; } -else -{ -lean_object* x_87; lean_object* x_88; lean_object* x_89; lean_object* x_90; lean_object* x_91; uint8_t x_92; lean_object* x_93; lean_object* x_94; lean_object* x_95; lean_object* x_96; lean_object* x_97; lean_object* x_98; lean_object* x_99; lean_object* x_100; lean_object* x_101; lean_object* x_102; lean_object* x_103; lean_object* x_104; lean_object* x_105; lean_object* x_106; -x_87 = l_Lean_Elab_Command_Modifiers_hasFormat___closed__5; -x_88 = l_List_append___rarg(x_67, x_87); -x_89 = l_List_append___rarg(x_88, x_18); -x_90 = l_Lean_List_format___rarg___closed__4; -x_91 = l_Lean_Format_joinSep___main___at___private_Init_Lean_Data_Trie_6__toStringAux___main___spec__1(x_89, x_90); -lean_dec(x_89); -x_92 = 0; -x_93 = l_Lean_Elab_Command_Modifiers_hasFormat___closed__2; -x_94 = lean_alloc_ctor(4, 2, 1); -lean_ctor_set(x_94, 0, x_93); -lean_ctor_set(x_94, 1, x_91); -lean_ctor_set_uint8(x_94, sizeof(void*)*2, x_92); -x_95 = l_Lean_Elab_Command_Modifiers_hasFormat___closed__3; -x_96 = lean_alloc_ctor(4, 2, 1); -lean_ctor_set(x_96, 0, x_94); -lean_ctor_set(x_96, 1, x_95); -lean_ctor_set_uint8(x_96, sizeof(void*)*2, x_92); -x_97 = l_Lean_Elab_Command_Modifiers_hasFormat___closed__1; -x_98 = lean_alloc_ctor(3, 2, 0); -lean_ctor_set(x_98, 0, x_97); -lean_ctor_set(x_98, 1, x_96); -x_99 = lean_format_group(x_98); -x_100 = l_Lean_Options_empty; -x_101 = l_Lean_Format_pretty(x_99, x_100); -x_102 = lean_alloc_ctor(2, 1, 0); -lean_ctor_set(x_102, 0, x_101); -x_103 = lean_alloc_ctor(0, 1, 0); -lean_ctor_set(x_103, 0, x_102); -x_104 = l_Lean_Elab_Command_elabDeclaration___closed__3; -x_105 = lean_alloc_ctor(8, 2, 0); -lean_ctor_set(x_105, 0, x_104); -lean_ctor_set(x_105, 1, x_103); -x_106 = l_Lean_Elab_throwError___at_Lean_Elab_Command_elabCommand___spec__1(x_1, x_105, x_2, x_10); -lean_dec(x_2); -return x_106; -} -} -} -} } } else { -uint8_t x_125; +uint8_t x_87; lean_dec(x_2); -x_125 = !lean_is_exclusive(x_8); -if (x_125 == 0) +x_87 = !lean_is_exclusive(x_8); +if (x_87 == 0) { return x_8; } else { -lean_object* x_126; lean_object* x_127; lean_object* x_128; -x_126 = lean_ctor_get(x_8, 0); -x_127 = lean_ctor_get(x_8, 1); -lean_inc(x_127); -lean_inc(x_126); +lean_object* x_88; lean_object* x_89; lean_object* x_90; +x_88 = lean_ctor_get(x_8, 0); +x_89 = lean_ctor_get(x_8, 1); +lean_inc(x_89); +lean_inc(x_88); lean_dec(x_8); -x_128 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_128, 0, x_126); -lean_ctor_set(x_128, 1, x_127); -return x_128; +x_90 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_90, 0, x_88); +lean_ctor_set(x_90, 1, x_89); +return x_90; } } } @@ -2746,97 +4837,59 @@ x_5 = l_Lean_Elab_Command_addBuiltinCommandElab(x_2, x_3, x_4, x_1); return x_5; } } -lean_object* initialize_Init_Lean_Elab_Command(lean_object*); +lean_object* initialize_Init_Lean_Util_CollectLevelParams(lean_object*); +lean_object* initialize_Init_Lean_Elab_Definition(lean_object*); static bool _G_initialized = false; lean_object* initialize_Init_Lean_Elab_Declaration(lean_object* w) { lean_object * res; if (_G_initialized) return lean_mk_io_result(lean_box(0)); _G_initialized = true; -res = initialize_Init_Lean_Elab_Command(lean_io_mk_world()); +res = initialize_Init_Lean_Util_CollectLevelParams(lean_io_mk_world()); if (lean_io_result_is_error(res)) return res; lean_dec_ref(res); -l_Lean_Elab_Command_Attribute_hasFormat___closed__1 = _init_l_Lean_Elab_Command_Attribute_hasFormat___closed__1(); -lean_mark_persistent(l_Lean_Elab_Command_Attribute_hasFormat___closed__1); -l_Lean_Elab_Command_Attribute_hasFormat___closed__2 = _init_l_Lean_Elab_Command_Attribute_hasFormat___closed__2(); -lean_mark_persistent(l_Lean_Elab_Command_Attribute_hasFormat___closed__2); -l_Lean_Elab_Command_Visibility_hasToString___closed__1 = _init_l_Lean_Elab_Command_Visibility_hasToString___closed__1(); -lean_mark_persistent(l_Lean_Elab_Command_Visibility_hasToString___closed__1); -l_Lean_Elab_Command_Modifiers_hasFormat___closed__1 = _init_l_Lean_Elab_Command_Modifiers_hasFormat___closed__1(); -lean_mark_persistent(l_Lean_Elab_Command_Modifiers_hasFormat___closed__1); -l_Lean_Elab_Command_Modifiers_hasFormat___closed__2 = _init_l_Lean_Elab_Command_Modifiers_hasFormat___closed__2(); -lean_mark_persistent(l_Lean_Elab_Command_Modifiers_hasFormat___closed__2); -l_Lean_Elab_Command_Modifiers_hasFormat___closed__3 = _init_l_Lean_Elab_Command_Modifiers_hasFormat___closed__3(); -lean_mark_persistent(l_Lean_Elab_Command_Modifiers_hasFormat___closed__3); -l_Lean_Elab_Command_Modifiers_hasFormat___closed__4 = _init_l_Lean_Elab_Command_Modifiers_hasFormat___closed__4(); -lean_mark_persistent(l_Lean_Elab_Command_Modifiers_hasFormat___closed__4); -l_Lean_Elab_Command_Modifiers_hasFormat___closed__5 = _init_l_Lean_Elab_Command_Modifiers_hasFormat___closed__5(); -lean_mark_persistent(l_Lean_Elab_Command_Modifiers_hasFormat___closed__5); -l_Lean_Elab_Command_Modifiers_hasFormat___closed__6 = _init_l_Lean_Elab_Command_Modifiers_hasFormat___closed__6(); -lean_mark_persistent(l_Lean_Elab_Command_Modifiers_hasFormat___closed__6); -l_Lean_Elab_Command_Modifiers_hasFormat___closed__7 = _init_l_Lean_Elab_Command_Modifiers_hasFormat___closed__7(); -lean_mark_persistent(l_Lean_Elab_Command_Modifiers_hasFormat___closed__7); -l_Lean_Elab_Command_Modifiers_hasFormat___closed__8 = _init_l_Lean_Elab_Command_Modifiers_hasFormat___closed__8(); -lean_mark_persistent(l_Lean_Elab_Command_Modifiers_hasFormat___closed__8); -l_Lean_Elab_Command_Modifiers_hasFormat___closed__9 = _init_l_Lean_Elab_Command_Modifiers_hasFormat___closed__9(); -lean_mark_persistent(l_Lean_Elab_Command_Modifiers_hasFormat___closed__9); -l_Lean_Elab_Command_Modifiers_hasFormat___closed__10 = _init_l_Lean_Elab_Command_Modifiers_hasFormat___closed__10(); -lean_mark_persistent(l_Lean_Elab_Command_Modifiers_hasFormat___closed__10); -l_Lean_Elab_Command_Modifiers_hasFormat___closed__11 = _init_l_Lean_Elab_Command_Modifiers_hasFormat___closed__11(); -lean_mark_persistent(l_Lean_Elab_Command_Modifiers_hasFormat___closed__11); -l_Lean_Elab_Command_Modifiers_hasFormat___closed__12 = _init_l_Lean_Elab_Command_Modifiers_hasFormat___closed__12(); -lean_mark_persistent(l_Lean_Elab_Command_Modifiers_hasFormat___closed__12); -l_Lean_Elab_Command_Modifiers_hasFormat___closed__13 = _init_l_Lean_Elab_Command_Modifiers_hasFormat___closed__13(); -lean_mark_persistent(l_Lean_Elab_Command_Modifiers_hasFormat___closed__13); -l_Lean_Elab_Command_Modifiers_hasFormat___closed__14 = _init_l_Lean_Elab_Command_Modifiers_hasFormat___closed__14(); -lean_mark_persistent(l_Lean_Elab_Command_Modifiers_hasFormat___closed__14); -l_Lean_Elab_Command_Modifiers_hasFormat___closed__15 = _init_l_Lean_Elab_Command_Modifiers_hasFormat___closed__15(); -lean_mark_persistent(l_Lean_Elab_Command_Modifiers_hasFormat___closed__15); -l_Lean_Elab_Command_Modifiers_hasFormat___closed__16 = _init_l_Lean_Elab_Command_Modifiers_hasFormat___closed__16(); -lean_mark_persistent(l_Lean_Elab_Command_Modifiers_hasFormat___closed__16); -l_Lean_Elab_Command_Modifiers_hasToString___closed__1 = _init_l_Lean_Elab_Command_Modifiers_hasToString___closed__1(); -lean_mark_persistent(l_Lean_Elab_Command_Modifiers_hasToString___closed__1); -l_Lean_Elab_Command_Modifiers_hasToString___closed__2 = _init_l_Lean_Elab_Command_Modifiers_hasToString___closed__2(); -lean_mark_persistent(l_Lean_Elab_Command_Modifiers_hasToString___closed__2); -l_Lean_Elab_Command_Modifiers_hasToString = _init_l_Lean_Elab_Command_Modifiers_hasToString(); -lean_mark_persistent(l_Lean_Elab_Command_Modifiers_hasToString); -l_Lean_Elab_Command_elabAttrArg___closed__1 = _init_l_Lean_Elab_Command_elabAttrArg___closed__1(); -lean_mark_persistent(l_Lean_Elab_Command_elabAttrArg___closed__1); -l_Lean_Elab_Command_elabAttrArg___closed__2 = _init_l_Lean_Elab_Command_elabAttrArg___closed__2(); -lean_mark_persistent(l_Lean_Elab_Command_elabAttrArg___closed__2); -l_Lean_Elab_Command_elabAttrArg___closed__3 = _init_l_Lean_Elab_Command_elabAttrArg___closed__3(); -lean_mark_persistent(l_Lean_Elab_Command_elabAttrArg___closed__3); -l_Lean_Elab_Command_elabAttr___closed__1 = _init_l_Lean_Elab_Command_elabAttr___closed__1(); -lean_mark_persistent(l_Lean_Elab_Command_elabAttr___closed__1); -l_Lean_Elab_Command_elabAttr___closed__2 = _init_l_Lean_Elab_Command_elabAttr___closed__2(); -lean_mark_persistent(l_Lean_Elab_Command_elabAttr___closed__2); -l_Lean_Elab_Command_elabAttr___closed__3 = _init_l_Lean_Elab_Command_elabAttr___closed__3(); -lean_mark_persistent(l_Lean_Elab_Command_elabAttr___closed__3); -l_Lean_Elab_Command_elabAttr___closed__4 = _init_l_Lean_Elab_Command_elabAttr___closed__4(); -lean_mark_persistent(l_Lean_Elab_Command_elabAttr___closed__4); -l_Lean_Elab_Command_elabAttr___closed__5 = _init_l_Lean_Elab_Command_elabAttr___closed__5(); -lean_mark_persistent(l_Lean_Elab_Command_elabAttr___closed__5); -l_Lean_Elab_Command_elabAttr___closed__6 = _init_l_Lean_Elab_Command_elabAttr___closed__6(); -lean_mark_persistent(l_Lean_Elab_Command_elabAttr___closed__6); -l_Lean_Elab_Command_elabModifiers___closed__1 = _init_l_Lean_Elab_Command_elabModifiers___closed__1(); -lean_mark_persistent(l_Lean_Elab_Command_elabModifiers___closed__1); -l_Lean_Elab_Command_elabModifiers___closed__2 = _init_l_Lean_Elab_Command_elabModifiers___closed__2(); -lean_mark_persistent(l_Lean_Elab_Command_elabModifiers___closed__2); -l_Lean_Elab_Command_elabModifiers___closed__3 = _init_l_Lean_Elab_Command_elabModifiers___closed__3(); -lean_mark_persistent(l_Lean_Elab_Command_elabModifiers___closed__3); -l_Lean_Elab_Command_elabModifiers___closed__4 = _init_l_Lean_Elab_Command_elabModifiers___closed__4(); -lean_mark_persistent(l_Lean_Elab_Command_elabModifiers___closed__4); -l_Lean_Elab_Command_elabModifiers___closed__5 = _init_l_Lean_Elab_Command_elabModifiers___closed__5(); -lean_mark_persistent(l_Lean_Elab_Command_elabModifiers___closed__5); -l_Lean_Elab_Command_elabModifiers___closed__6 = _init_l_Lean_Elab_Command_elabModifiers___closed__6(); -lean_mark_persistent(l_Lean_Elab_Command_elabModifiers___closed__6); -l_Lean_Elab_Command_elabModifiers___closed__7 = _init_l_Lean_Elab_Command_elabModifiers___closed__7(); -lean_mark_persistent(l_Lean_Elab_Command_elabModifiers___closed__7); +res = initialize_Init_Lean_Elab_Definition(lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +l_Lean_Elab_Command_elabAbbrev___closed__1 = _init_l_Lean_Elab_Command_elabAbbrev___closed__1(); +lean_mark_persistent(l_Lean_Elab_Command_elabAbbrev___closed__1); +l_Lean_Elab_Command_elabAbbrev___closed__2 = _init_l_Lean_Elab_Command_elabAbbrev___closed__2(); +lean_mark_persistent(l_Lean_Elab_Command_elabAbbrev___closed__2); +l_Lean_Elab_Command_elabAbbrev___closed__3 = _init_l_Lean_Elab_Command_elabAbbrev___closed__3(); +lean_mark_persistent(l_Lean_Elab_Command_elabAbbrev___closed__3); +l_Lean_Elab_Command_elabAbbrev___closed__4 = _init_l_Lean_Elab_Command_elabAbbrev___closed__4(); +lean_mark_persistent(l_Lean_Elab_Command_elabAbbrev___closed__4); +l_Lean_Elab_Command_elabConstant___closed__1 = _init_l_Lean_Elab_Command_elabConstant___closed__1(); +lean_mark_persistent(l_Lean_Elab_Command_elabConstant___closed__1); +l_Lean_Elab_Command_elabConstant___closed__2 = _init_l_Lean_Elab_Command_elabConstant___closed__2(); +lean_mark_persistent(l_Lean_Elab_Command_elabConstant___closed__2); +l_Lean_Elab_Command_elabConstant___closed__3 = _init_l_Lean_Elab_Command_elabConstant___closed__3(); +lean_mark_persistent(l_Lean_Elab_Command_elabConstant___closed__3); +l_Lean_Elab_Command_elabConstant___closed__4 = _init_l_Lean_Elab_Command_elabConstant___closed__4(); +lean_mark_persistent(l_Lean_Elab_Command_elabConstant___closed__4); +l_Lean_Elab_Command_elabConstant___closed__5 = _init_l_Lean_Elab_Command_elabConstant___closed__5(); +lean_mark_persistent(l_Lean_Elab_Command_elabConstant___closed__5); +l_Lean_Elab_Command_elabConstant___closed__6 = _init_l_Lean_Elab_Command_elabConstant___closed__6(); +lean_mark_persistent(l_Lean_Elab_Command_elabConstant___closed__6); +l_Lean_Elab_Command_elabConstant___closed__7 = _init_l_Lean_Elab_Command_elabConstant___closed__7(); +lean_mark_persistent(l_Lean_Elab_Command_elabConstant___closed__7); +l_Lean_Elab_Command_elabConstant___closed__8 = _init_l_Lean_Elab_Command_elabConstant___closed__8(); +lean_mark_persistent(l_Lean_Elab_Command_elabConstant___closed__8); +l_Lean_Elab_Command_elabConstant___closed__9 = _init_l_Lean_Elab_Command_elabConstant___closed__9(); +lean_mark_persistent(l_Lean_Elab_Command_elabConstant___closed__9); +l_Lean_Elab_Command_elabInstance___closed__1 = _init_l_Lean_Elab_Command_elabInstance___closed__1(); +lean_mark_persistent(l_Lean_Elab_Command_elabInstance___closed__1); +l_Lean_Elab_Command_elabExample___closed__1 = _init_l_Lean_Elab_Command_elabExample___closed__1(); +lean_mark_persistent(l_Lean_Elab_Command_elabExample___closed__1); +l_Lean_Elab_Command_elabExample___closed__2 = _init_l_Lean_Elab_Command_elabExample___closed__2(); +lean_mark_persistent(l_Lean_Elab_Command_elabExample___closed__2); l_Lean_Elab_Command_elabDeclaration___closed__1 = _init_l_Lean_Elab_Command_elabDeclaration___closed__1(); lean_mark_persistent(l_Lean_Elab_Command_elabDeclaration___closed__1); l_Lean_Elab_Command_elabDeclaration___closed__2 = _init_l_Lean_Elab_Command_elabDeclaration___closed__2(); lean_mark_persistent(l_Lean_Elab_Command_elabDeclaration___closed__2); l_Lean_Elab_Command_elabDeclaration___closed__3 = _init_l_Lean_Elab_Command_elabDeclaration___closed__3(); lean_mark_persistent(l_Lean_Elab_Command_elabDeclaration___closed__3); +l_Lean_Elab_Command_elabDeclaration___closed__4 = _init_l_Lean_Elab_Command_elabDeclaration___closed__4(); +lean_mark_persistent(l_Lean_Elab_Command_elabDeclaration___closed__4); l___regBuiltinCommandElab_Lean_Elab_Command_elabDeclaration___closed__1 = _init_l___regBuiltinCommandElab_Lean_Elab_Command_elabDeclaration___closed__1(); lean_mark_persistent(l___regBuiltinCommandElab_Lean_Elab_Command_elabDeclaration___closed__1); l___regBuiltinCommandElab_Lean_Elab_Command_elabDeclaration___closed__2 = _init_l___regBuiltinCommandElab_Lean_Elab_Command_elabDeclaration___closed__2(); diff --git a/stage0/stdlib/Init/Lean/Elab/Definition.c b/stage0/stdlib/Init/Lean/Elab/Definition.c new file mode 100644 index 0000000000..9f6513dafa --- /dev/null +++ b/stage0/stdlib/Init/Lean/Elab/Definition.c @@ -0,0 +1,3430 @@ +// Lean compiler output +// Module: Init.Lean.Elab.Definition +// Imports: Init.Lean.Elab.DeclModifiers +#include "runtime/lean.h" +#if defined(__clang__) +#pragma clang diagnostic ignored "-Wunused-parameter" +#pragma clang diagnostic ignored "-Wunused-label" +#elif defined(__GNUC__) && !defined(__CLANG__) +#pragma GCC diagnostic ignored "-Wunused-parameter" +#pragma GCC diagnostic ignored "-Wunused-label" +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#endif +#ifdef __cplusplus +extern "C" { +#endif +lean_object* l_Lean_Elab_Term_mkForall(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l___private_Init_Lean_Elab_Command_10__addScopes___main(lean_object*, lean_object*, uint8_t, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Elab_Term_instantiateMVars(lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_unreachable_x21___rarg(lean_object*); +lean_object* l_Lean_Elab_throwError___at_Lean_Elab_Command_elabCommand___spec__1(lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Elab_Command_modifyScope___at_Lean_Elab_Command_elabDefLike___spec__2(lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Elab_Command_elabDefLike___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Elab_Term_dbgTrace___at_Lean_Elab_Command_elabDefLike___spec__5(lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Syntax_getIdAt(lean_object*, lean_object*); +extern lean_object* l_Lean_Elab_Command_runTermElabM___rarg___closed__1; +extern lean_object* l_Array_empty___closed__1; +lean_object* lean_dbg_trace(lean_object*, lean_object*); +lean_object* l___private_Init_Lean_Elab_Command_7__getVarDecls(lean_object*); +lean_object* lean_array_get_size(lean_object*); +lean_object* lean_string_append(lean_object*, lean_object*); +lean_object* l_Lean_Name_getNumParts___main(lean_object*); +lean_object* lean_nat_add(lean_object*, lean_object*); +lean_object* l_Lean_Elab_Term_mkFreshTypeMVar(lean_object*, uint8_t, lean_object*, lean_object*, lean_object*); +extern lean_object* l_Lean_Meta_dbgTrace___rarg___closed__1; +lean_object* l_Lean_Elab_Command_elabDefLike___lambda__2(lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* lean_array_fget(lean_object*, lean_object*); +lean_object* l_Lean_Elab_Command_getCurrNamespace(lean_object*, lean_object*); +lean_object* l_Lean_Meta_dbgTrace___rarg___lambda__1___boxed(lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Syntax_getId(lean_object*); +lean_object* l_Lean_Elab_Command_modifyScope___at_Lean_Elab_Command_elabDefLike___spec__4(lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Elab_Command_elabDefLike___lambda__1___closed__1; +lean_object* l_Lean_Elab_Command_elabDefLike___lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +extern lean_object* l_Lean_Parser_Command_namespace___elambda__1___closed__1; +lean_object* lean_expr_dbg_to_string(lean_object*); +extern lean_object* l_Lean_Elab_Command_modifyScope___closed__1; +lean_object* l_Lean_Elab_Command_elabDefLike___lambda__2___boxed(lean_object*, lean_object*, lean_object*, lean_object*); +uint8_t l_List_elem___main___at_Lean_Parser_addLeadingParser___spec__4(lean_object*, lean_object*); +extern lean_object* l_Lean_Elab_Command_withDeclId___closed__3; +lean_object* l_Lean_Elab_Command_modifyScope___at_Lean_Elab_Command_elabDefLike___spec__3(lean_object*, lean_object*, lean_object*); +lean_object* l_Array_iterateMAux___main___at_Lean_Elab_Command_elabDefLike___spec__6___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l___private_Init_Lean_Elab_Command_2__getState(lean_object*, lean_object*); +lean_object* l_List_drop___main___rarg(lean_object*, lean_object*); +lean_object* l_Lean_Syntax_getArgs(lean_object*); +lean_object* l_Lean_Elab_Term_elabType(lean_object*, lean_object*, lean_object*); +uint8_t l_Lean_Syntax_isNone(lean_object*); +lean_object* l_Lean_Elab_Command_getLevelNames(lean_object*, lean_object*); +lean_object* l_Array_iterateMAux___main___at_Lean_Elab_Command_elabDefLike___spec__6(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Elab_Command_throwAlreadyDeclaredUniverseLevel___rarg(lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Elab_Command_elabDefLike(lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Syntax_foldArgsAuxM___main___at_Lean_Syntax_foldSepRevArgsM___spec__1(lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Elab_Term_elabBinders___rarg(lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Syntax_getArg(lean_object*, lean_object*); +lean_object* l___private_Init_Lean_Elab_Term_19__synthesizeSyntheticMVarsAux___main(uint8_t, lean_object*, lean_object*, lean_object*); +lean_object* l___private_Init_Lean_Elab_Command_5__mkTermContext(lean_object*, lean_object*); +lean_object* l_Lean_Elab_Command_modifyScope___at_Lean_Elab_Command_elabDefLike___spec__1(lean_object*, lean_object*, lean_object*); +lean_object* l___private_Init_Lean_Elab_Command_3__setState(lean_object*, lean_object*, lean_object*); +lean_object* l___private_Init_Lean_Elab_Command_6__mkTermState(lean_object*); +uint8_t lean_nat_dec_lt(lean_object*, lean_object*); +lean_object* l_Lean_Elab_Command_modifyScope___at_Lean_Elab_Command_elabDefLike___spec__1(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +_start: +{ +lean_object* x_4; +lean_inc(x_2); +x_4 = l___private_Init_Lean_Elab_Command_2__getState(x_2, x_3); +if (lean_obj_tag(x_4) == 0) +{ +lean_object* x_5; lean_object* x_6; +x_5 = lean_ctor_get(x_4, 0); +lean_inc(x_5); +x_6 = lean_ctor_get(x_5, 2); +lean_inc(x_6); +if (lean_obj_tag(x_6) == 0) +{ +lean_object* x_7; uint8_t x_8; +lean_dec(x_1); +x_7 = lean_ctor_get(x_4, 1); +lean_inc(x_7); +lean_dec(x_4); +x_8 = !lean_is_exclusive(x_5); +if (x_8 == 0) +{ +lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; +x_9 = lean_ctor_get(x_5, 2); +lean_dec(x_9); +x_10 = l_Lean_Elab_Command_modifyScope___closed__1; +x_11 = l_unreachable_x21___rarg(x_10); +lean_ctor_set(x_5, 2, x_11); +x_12 = l___private_Init_Lean_Elab_Command_3__setState(x_5, x_2, x_7); +if (lean_obj_tag(x_12) == 0) +{ +uint8_t x_13; +x_13 = !lean_is_exclusive(x_12); +if (x_13 == 0) +{ +lean_object* x_14; lean_object* x_15; +x_14 = lean_ctor_get(x_12, 0); +lean_dec(x_14); +x_15 = lean_box(0); +lean_ctor_set(x_12, 0, x_15); +return x_12; +} +else +{ +lean_object* x_16; lean_object* x_17; lean_object* x_18; +x_16 = lean_ctor_get(x_12, 1); +lean_inc(x_16); +lean_dec(x_12); +x_17 = lean_box(0); +x_18 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_18, 0, x_17); +lean_ctor_set(x_18, 1, x_16); +return x_18; +} +} +else +{ +uint8_t x_19; +x_19 = !lean_is_exclusive(x_12); +if (x_19 == 0) +{ +return x_12; +} +else +{ +lean_object* x_20; lean_object* x_21; lean_object* x_22; +x_20 = lean_ctor_get(x_12, 0); +x_21 = lean_ctor_get(x_12, 1); +lean_inc(x_21); +lean_inc(x_20); +lean_dec(x_12); +x_22 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_22, 0, x_20); +lean_ctor_set(x_22, 1, x_21); +return x_22; +} +} +} +else +{ +lean_object* x_23; lean_object* x_24; lean_object* x_25; lean_object* x_26; lean_object* x_27; lean_object* x_28; lean_object* x_29; +x_23 = lean_ctor_get(x_5, 0); +x_24 = lean_ctor_get(x_5, 1); +x_25 = lean_ctor_get(x_5, 3); +lean_inc(x_25); +lean_inc(x_24); +lean_inc(x_23); +lean_dec(x_5); +x_26 = l_Lean_Elab_Command_modifyScope___closed__1; +x_27 = l_unreachable_x21___rarg(x_26); +x_28 = lean_alloc_ctor(0, 4, 0); +lean_ctor_set(x_28, 0, x_23); +lean_ctor_set(x_28, 1, x_24); +lean_ctor_set(x_28, 2, x_27); +lean_ctor_set(x_28, 3, x_25); +x_29 = l___private_Init_Lean_Elab_Command_3__setState(x_28, x_2, x_7); +if (lean_obj_tag(x_29) == 0) +{ +lean_object* x_30; lean_object* x_31; lean_object* x_32; lean_object* x_33; +x_30 = lean_ctor_get(x_29, 1); +lean_inc(x_30); +if (lean_is_exclusive(x_29)) { + lean_ctor_release(x_29, 0); + lean_ctor_release(x_29, 1); + x_31 = x_29; +} else { + lean_dec_ref(x_29); + x_31 = lean_box(0); +} +x_32 = lean_box(0); +if (lean_is_scalar(x_31)) { + x_33 = lean_alloc_ctor(0, 2, 0); +} else { + x_33 = x_31; +} +lean_ctor_set(x_33, 0, x_32); +lean_ctor_set(x_33, 1, x_30); +return x_33; +} +else +{ +lean_object* x_34; lean_object* x_35; lean_object* x_36; lean_object* x_37; +x_34 = lean_ctor_get(x_29, 0); +lean_inc(x_34); +x_35 = lean_ctor_get(x_29, 1); +lean_inc(x_35); +if (lean_is_exclusive(x_29)) { + lean_ctor_release(x_29, 0); + lean_ctor_release(x_29, 1); + x_36 = x_29; +} else { + lean_dec_ref(x_29); + x_36 = lean_box(0); +} +if (lean_is_scalar(x_36)) { + x_37 = lean_alloc_ctor(1, 2, 0); +} else { + x_37 = x_36; +} +lean_ctor_set(x_37, 0, x_34); +lean_ctor_set(x_37, 1, x_35); +return x_37; +} +} +} +else +{ +lean_object* x_38; lean_object* x_39; uint8_t x_40; +x_38 = lean_ctor_get(x_6, 0); +lean_inc(x_38); +x_39 = lean_ctor_get(x_4, 1); +lean_inc(x_39); +lean_dec(x_4); +x_40 = !lean_is_exclusive(x_5); +if (x_40 == 0) +{ +lean_object* x_41; uint8_t x_42; +x_41 = lean_ctor_get(x_5, 2); +lean_dec(x_41); +x_42 = !lean_is_exclusive(x_6); +if (x_42 == 0) +{ +lean_object* x_43; uint8_t x_44; +x_43 = lean_ctor_get(x_6, 0); +lean_dec(x_43); +x_44 = !lean_is_exclusive(x_38); +if (x_44 == 0) +{ +lean_object* x_45; lean_object* x_46; +x_45 = lean_ctor_get(x_38, 5); +lean_dec(x_45); +lean_ctor_set(x_38, 5, x_1); +x_46 = l___private_Init_Lean_Elab_Command_3__setState(x_5, x_2, x_39); +if (lean_obj_tag(x_46) == 0) +{ +uint8_t x_47; +x_47 = !lean_is_exclusive(x_46); +if (x_47 == 0) +{ +lean_object* x_48; lean_object* x_49; +x_48 = lean_ctor_get(x_46, 0); +lean_dec(x_48); +x_49 = lean_box(0); +lean_ctor_set(x_46, 0, x_49); +return x_46; +} +else +{ +lean_object* x_50; lean_object* x_51; lean_object* x_52; +x_50 = lean_ctor_get(x_46, 1); +lean_inc(x_50); +lean_dec(x_46); +x_51 = lean_box(0); +x_52 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_52, 0, x_51); +lean_ctor_set(x_52, 1, x_50); +return x_52; +} +} +else +{ +uint8_t x_53; +x_53 = !lean_is_exclusive(x_46); +if (x_53 == 0) +{ +return x_46; +} +else +{ +lean_object* x_54; lean_object* x_55; lean_object* x_56; +x_54 = lean_ctor_get(x_46, 0); +x_55 = lean_ctor_get(x_46, 1); +lean_inc(x_55); +lean_inc(x_54); +lean_dec(x_46); +x_56 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_56, 0, x_54); +lean_ctor_set(x_56, 1, x_55); +return x_56; +} +} +} +else +{ +lean_object* x_57; lean_object* x_58; lean_object* x_59; lean_object* x_60; lean_object* x_61; lean_object* x_62; lean_object* x_63; lean_object* x_64; +x_57 = lean_ctor_get(x_38, 0); +x_58 = lean_ctor_get(x_38, 1); +x_59 = lean_ctor_get(x_38, 2); +x_60 = lean_ctor_get(x_38, 3); +x_61 = lean_ctor_get(x_38, 4); +x_62 = lean_ctor_get(x_38, 6); +lean_inc(x_62); +lean_inc(x_61); +lean_inc(x_60); +lean_inc(x_59); +lean_inc(x_58); +lean_inc(x_57); +lean_dec(x_38); +x_63 = lean_alloc_ctor(0, 7, 0); +lean_ctor_set(x_63, 0, x_57); +lean_ctor_set(x_63, 1, x_58); +lean_ctor_set(x_63, 2, x_59); +lean_ctor_set(x_63, 3, x_60); +lean_ctor_set(x_63, 4, x_61); +lean_ctor_set(x_63, 5, x_1); +lean_ctor_set(x_63, 6, x_62); +lean_ctor_set(x_6, 0, x_63); +x_64 = l___private_Init_Lean_Elab_Command_3__setState(x_5, x_2, x_39); +if (lean_obj_tag(x_64) == 0) +{ +lean_object* x_65; lean_object* x_66; lean_object* x_67; lean_object* x_68; +x_65 = lean_ctor_get(x_64, 1); +lean_inc(x_65); +if (lean_is_exclusive(x_64)) { + lean_ctor_release(x_64, 0); + lean_ctor_release(x_64, 1); + x_66 = x_64; +} else { + lean_dec_ref(x_64); + x_66 = lean_box(0); +} +x_67 = lean_box(0); +if (lean_is_scalar(x_66)) { + x_68 = lean_alloc_ctor(0, 2, 0); +} else { + x_68 = x_66; +} +lean_ctor_set(x_68, 0, x_67); +lean_ctor_set(x_68, 1, x_65); +return x_68; +} +else +{ +lean_object* x_69; lean_object* x_70; lean_object* x_71; lean_object* x_72; +x_69 = lean_ctor_get(x_64, 0); +lean_inc(x_69); +x_70 = lean_ctor_get(x_64, 1); +lean_inc(x_70); +if (lean_is_exclusive(x_64)) { + lean_ctor_release(x_64, 0); + lean_ctor_release(x_64, 1); + x_71 = x_64; +} else { + lean_dec_ref(x_64); + x_71 = lean_box(0); +} +if (lean_is_scalar(x_71)) { + x_72 = lean_alloc_ctor(1, 2, 0); +} else { + x_72 = x_71; +} +lean_ctor_set(x_72, 0, x_69); +lean_ctor_set(x_72, 1, x_70); +return x_72; +} +} +} +else +{ +lean_object* x_73; lean_object* x_74; lean_object* x_75; lean_object* x_76; lean_object* x_77; lean_object* x_78; lean_object* x_79; lean_object* x_80; lean_object* x_81; lean_object* x_82; lean_object* x_83; +x_73 = lean_ctor_get(x_6, 1); +lean_inc(x_73); +lean_dec(x_6); +x_74 = lean_ctor_get(x_38, 0); +lean_inc(x_74); +x_75 = lean_ctor_get(x_38, 1); +lean_inc(x_75); +x_76 = lean_ctor_get(x_38, 2); +lean_inc(x_76); +x_77 = lean_ctor_get(x_38, 3); +lean_inc(x_77); +x_78 = lean_ctor_get(x_38, 4); +lean_inc(x_78); +x_79 = lean_ctor_get(x_38, 6); +lean_inc(x_79); +if (lean_is_exclusive(x_38)) { + lean_ctor_release(x_38, 0); + lean_ctor_release(x_38, 1); + lean_ctor_release(x_38, 2); + lean_ctor_release(x_38, 3); + lean_ctor_release(x_38, 4); + lean_ctor_release(x_38, 5); + lean_ctor_release(x_38, 6); + x_80 = x_38; +} else { + lean_dec_ref(x_38); + x_80 = lean_box(0); +} +if (lean_is_scalar(x_80)) { + x_81 = lean_alloc_ctor(0, 7, 0); +} else { + x_81 = x_80; +} +lean_ctor_set(x_81, 0, x_74); +lean_ctor_set(x_81, 1, x_75); +lean_ctor_set(x_81, 2, x_76); +lean_ctor_set(x_81, 3, x_77); +lean_ctor_set(x_81, 4, x_78); +lean_ctor_set(x_81, 5, x_1); +lean_ctor_set(x_81, 6, x_79); +x_82 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_82, 0, x_81); +lean_ctor_set(x_82, 1, x_73); +lean_ctor_set(x_5, 2, x_82); +x_83 = l___private_Init_Lean_Elab_Command_3__setState(x_5, x_2, x_39); +if (lean_obj_tag(x_83) == 0) +{ +lean_object* x_84; lean_object* x_85; lean_object* x_86; lean_object* x_87; +x_84 = lean_ctor_get(x_83, 1); +lean_inc(x_84); +if (lean_is_exclusive(x_83)) { + lean_ctor_release(x_83, 0); + lean_ctor_release(x_83, 1); + x_85 = x_83; +} else { + lean_dec_ref(x_83); + x_85 = lean_box(0); +} +x_86 = lean_box(0); +if (lean_is_scalar(x_85)) { + x_87 = lean_alloc_ctor(0, 2, 0); +} else { + x_87 = x_85; +} +lean_ctor_set(x_87, 0, x_86); +lean_ctor_set(x_87, 1, x_84); +return x_87; +} +else +{ +lean_object* x_88; lean_object* x_89; lean_object* x_90; lean_object* x_91; +x_88 = lean_ctor_get(x_83, 0); +lean_inc(x_88); +x_89 = lean_ctor_get(x_83, 1); +lean_inc(x_89); +if (lean_is_exclusive(x_83)) { + lean_ctor_release(x_83, 0); + lean_ctor_release(x_83, 1); + x_90 = x_83; +} else { + lean_dec_ref(x_83); + x_90 = lean_box(0); +} +if (lean_is_scalar(x_90)) { + x_91 = lean_alloc_ctor(1, 2, 0); +} else { + x_91 = x_90; +} +lean_ctor_set(x_91, 0, x_88); +lean_ctor_set(x_91, 1, x_89); +return x_91; +} +} +} +else +{ +lean_object* x_92; lean_object* x_93; lean_object* x_94; lean_object* x_95; lean_object* x_96; lean_object* x_97; lean_object* x_98; lean_object* x_99; lean_object* x_100; lean_object* x_101; lean_object* x_102; lean_object* x_103; lean_object* x_104; lean_object* x_105; lean_object* x_106; lean_object* x_107; +x_92 = lean_ctor_get(x_5, 0); +x_93 = lean_ctor_get(x_5, 1); +x_94 = lean_ctor_get(x_5, 3); +lean_inc(x_94); +lean_inc(x_93); +lean_inc(x_92); +lean_dec(x_5); +x_95 = lean_ctor_get(x_6, 1); +lean_inc(x_95); +if (lean_is_exclusive(x_6)) { + lean_ctor_release(x_6, 0); + lean_ctor_release(x_6, 1); + x_96 = x_6; +} else { + lean_dec_ref(x_6); + x_96 = lean_box(0); +} +x_97 = lean_ctor_get(x_38, 0); +lean_inc(x_97); +x_98 = lean_ctor_get(x_38, 1); +lean_inc(x_98); +x_99 = lean_ctor_get(x_38, 2); +lean_inc(x_99); +x_100 = lean_ctor_get(x_38, 3); +lean_inc(x_100); +x_101 = lean_ctor_get(x_38, 4); +lean_inc(x_101); +x_102 = lean_ctor_get(x_38, 6); +lean_inc(x_102); +if (lean_is_exclusive(x_38)) { + lean_ctor_release(x_38, 0); + lean_ctor_release(x_38, 1); + lean_ctor_release(x_38, 2); + lean_ctor_release(x_38, 3); + lean_ctor_release(x_38, 4); + lean_ctor_release(x_38, 5); + lean_ctor_release(x_38, 6); + x_103 = x_38; +} else { + lean_dec_ref(x_38); + x_103 = lean_box(0); +} +if (lean_is_scalar(x_103)) { + x_104 = lean_alloc_ctor(0, 7, 0); +} else { + x_104 = x_103; +} +lean_ctor_set(x_104, 0, x_97); +lean_ctor_set(x_104, 1, x_98); +lean_ctor_set(x_104, 2, x_99); +lean_ctor_set(x_104, 3, x_100); +lean_ctor_set(x_104, 4, x_101); +lean_ctor_set(x_104, 5, x_1); +lean_ctor_set(x_104, 6, x_102); +if (lean_is_scalar(x_96)) { + x_105 = lean_alloc_ctor(1, 2, 0); +} else { + x_105 = x_96; +} +lean_ctor_set(x_105, 0, x_104); +lean_ctor_set(x_105, 1, x_95); +x_106 = lean_alloc_ctor(0, 4, 0); +lean_ctor_set(x_106, 0, x_92); +lean_ctor_set(x_106, 1, x_93); +lean_ctor_set(x_106, 2, x_105); +lean_ctor_set(x_106, 3, x_94); +x_107 = l___private_Init_Lean_Elab_Command_3__setState(x_106, x_2, x_39); +if (lean_obj_tag(x_107) == 0) +{ +lean_object* x_108; lean_object* x_109; lean_object* x_110; lean_object* x_111; +x_108 = lean_ctor_get(x_107, 1); +lean_inc(x_108); +if (lean_is_exclusive(x_107)) { + lean_ctor_release(x_107, 0); + lean_ctor_release(x_107, 1); + x_109 = x_107; +} else { + lean_dec_ref(x_107); + x_109 = lean_box(0); +} +x_110 = lean_box(0); +if (lean_is_scalar(x_109)) { + x_111 = lean_alloc_ctor(0, 2, 0); +} else { + x_111 = x_109; +} +lean_ctor_set(x_111, 0, x_110); +lean_ctor_set(x_111, 1, x_108); +return x_111; +} +else +{ +lean_object* x_112; lean_object* x_113; lean_object* x_114; lean_object* x_115; +x_112 = lean_ctor_get(x_107, 0); +lean_inc(x_112); +x_113 = lean_ctor_get(x_107, 1); +lean_inc(x_113); +if (lean_is_exclusive(x_107)) { + lean_ctor_release(x_107, 0); + lean_ctor_release(x_107, 1); + x_114 = x_107; +} else { + lean_dec_ref(x_107); + x_114 = lean_box(0); +} +if (lean_is_scalar(x_114)) { + x_115 = lean_alloc_ctor(1, 2, 0); +} else { + x_115 = x_114; +} +lean_ctor_set(x_115, 0, x_112); +lean_ctor_set(x_115, 1, x_113); +return x_115; +} +} +} +} +else +{ +uint8_t x_116; +lean_dec(x_2); +lean_dec(x_1); +x_116 = !lean_is_exclusive(x_4); +if (x_116 == 0) +{ +return x_4; +} +else +{ +lean_object* x_117; lean_object* x_118; lean_object* x_119; +x_117 = lean_ctor_get(x_4, 0); +x_118 = lean_ctor_get(x_4, 1); +lean_inc(x_118); +lean_inc(x_117); +lean_dec(x_4); +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; +} +} +} +} +lean_object* l_Lean_Elab_Command_modifyScope___at_Lean_Elab_Command_elabDefLike___spec__2(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +_start: +{ +lean_object* x_4; +lean_inc(x_2); +x_4 = l___private_Init_Lean_Elab_Command_2__getState(x_2, x_3); +if (lean_obj_tag(x_4) == 0) +{ +lean_object* x_5; lean_object* x_6; +x_5 = lean_ctor_get(x_4, 0); +lean_inc(x_5); +x_6 = lean_ctor_get(x_5, 2); +lean_inc(x_6); +if (lean_obj_tag(x_6) == 0) +{ +lean_object* x_7; uint8_t x_8; +lean_dec(x_1); +x_7 = lean_ctor_get(x_4, 1); +lean_inc(x_7); +lean_dec(x_4); +x_8 = !lean_is_exclusive(x_5); +if (x_8 == 0) +{ +lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; +x_9 = lean_ctor_get(x_5, 2); +lean_dec(x_9); +x_10 = l_Lean_Elab_Command_modifyScope___closed__1; +x_11 = l_unreachable_x21___rarg(x_10); +lean_ctor_set(x_5, 2, x_11); +x_12 = l___private_Init_Lean_Elab_Command_3__setState(x_5, x_2, x_7); +if (lean_obj_tag(x_12) == 0) +{ +uint8_t x_13; +x_13 = !lean_is_exclusive(x_12); +if (x_13 == 0) +{ +lean_object* x_14; lean_object* x_15; +x_14 = lean_ctor_get(x_12, 0); +lean_dec(x_14); +x_15 = lean_box(0); +lean_ctor_set(x_12, 0, x_15); +return x_12; +} +else +{ +lean_object* x_16; lean_object* x_17; lean_object* x_18; +x_16 = lean_ctor_get(x_12, 1); +lean_inc(x_16); +lean_dec(x_12); +x_17 = lean_box(0); +x_18 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_18, 0, x_17); +lean_ctor_set(x_18, 1, x_16); +return x_18; +} +} +else +{ +uint8_t x_19; +x_19 = !lean_is_exclusive(x_12); +if (x_19 == 0) +{ +return x_12; +} +else +{ +lean_object* x_20; lean_object* x_21; lean_object* x_22; +x_20 = lean_ctor_get(x_12, 0); +x_21 = lean_ctor_get(x_12, 1); +lean_inc(x_21); +lean_inc(x_20); +lean_dec(x_12); +x_22 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_22, 0, x_20); +lean_ctor_set(x_22, 1, x_21); +return x_22; +} +} +} +else +{ +lean_object* x_23; lean_object* x_24; lean_object* x_25; lean_object* x_26; lean_object* x_27; lean_object* x_28; lean_object* x_29; +x_23 = lean_ctor_get(x_5, 0); +x_24 = lean_ctor_get(x_5, 1); +x_25 = lean_ctor_get(x_5, 3); +lean_inc(x_25); +lean_inc(x_24); +lean_inc(x_23); +lean_dec(x_5); +x_26 = l_Lean_Elab_Command_modifyScope___closed__1; +x_27 = l_unreachable_x21___rarg(x_26); +x_28 = lean_alloc_ctor(0, 4, 0); +lean_ctor_set(x_28, 0, x_23); +lean_ctor_set(x_28, 1, x_24); +lean_ctor_set(x_28, 2, x_27); +lean_ctor_set(x_28, 3, x_25); +x_29 = l___private_Init_Lean_Elab_Command_3__setState(x_28, x_2, x_7); +if (lean_obj_tag(x_29) == 0) +{ +lean_object* x_30; lean_object* x_31; lean_object* x_32; lean_object* x_33; +x_30 = lean_ctor_get(x_29, 1); +lean_inc(x_30); +if (lean_is_exclusive(x_29)) { + lean_ctor_release(x_29, 0); + lean_ctor_release(x_29, 1); + x_31 = x_29; +} else { + lean_dec_ref(x_29); + x_31 = lean_box(0); +} +x_32 = lean_box(0); +if (lean_is_scalar(x_31)) { + x_33 = lean_alloc_ctor(0, 2, 0); +} else { + x_33 = x_31; +} +lean_ctor_set(x_33, 0, x_32); +lean_ctor_set(x_33, 1, x_30); +return x_33; +} +else +{ +lean_object* x_34; lean_object* x_35; lean_object* x_36; lean_object* x_37; +x_34 = lean_ctor_get(x_29, 0); +lean_inc(x_34); +x_35 = lean_ctor_get(x_29, 1); +lean_inc(x_35); +if (lean_is_exclusive(x_29)) { + lean_ctor_release(x_29, 0); + lean_ctor_release(x_29, 1); + x_36 = x_29; +} else { + lean_dec_ref(x_29); + x_36 = lean_box(0); +} +if (lean_is_scalar(x_36)) { + x_37 = lean_alloc_ctor(1, 2, 0); +} else { + x_37 = x_36; +} +lean_ctor_set(x_37, 0, x_34); +lean_ctor_set(x_37, 1, x_35); +return x_37; +} +} +} +else +{ +lean_object* x_38; lean_object* x_39; uint8_t x_40; +x_38 = lean_ctor_get(x_6, 0); +lean_inc(x_38); +x_39 = lean_ctor_get(x_4, 1); +lean_inc(x_39); +lean_dec(x_4); +x_40 = !lean_is_exclusive(x_5); +if (x_40 == 0) +{ +lean_object* x_41; uint8_t x_42; +x_41 = lean_ctor_get(x_5, 2); +lean_dec(x_41); +x_42 = !lean_is_exclusive(x_6); +if (x_42 == 0) +{ +lean_object* x_43; uint8_t x_44; +x_43 = lean_ctor_get(x_6, 0); +lean_dec(x_43); +x_44 = !lean_is_exclusive(x_38); +if (x_44 == 0) +{ +lean_object* x_45; lean_object* x_46; +x_45 = lean_ctor_get(x_38, 5); +lean_dec(x_45); +lean_ctor_set(x_38, 5, x_1); +x_46 = l___private_Init_Lean_Elab_Command_3__setState(x_5, x_2, x_39); +if (lean_obj_tag(x_46) == 0) +{ +uint8_t x_47; +x_47 = !lean_is_exclusive(x_46); +if (x_47 == 0) +{ +lean_object* x_48; lean_object* x_49; +x_48 = lean_ctor_get(x_46, 0); +lean_dec(x_48); +x_49 = lean_box(0); +lean_ctor_set(x_46, 0, x_49); +return x_46; +} +else +{ +lean_object* x_50; lean_object* x_51; lean_object* x_52; +x_50 = lean_ctor_get(x_46, 1); +lean_inc(x_50); +lean_dec(x_46); +x_51 = lean_box(0); +x_52 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_52, 0, x_51); +lean_ctor_set(x_52, 1, x_50); +return x_52; +} +} +else +{ +uint8_t x_53; +x_53 = !lean_is_exclusive(x_46); +if (x_53 == 0) +{ +return x_46; +} +else +{ +lean_object* x_54; lean_object* x_55; lean_object* x_56; +x_54 = lean_ctor_get(x_46, 0); +x_55 = lean_ctor_get(x_46, 1); +lean_inc(x_55); +lean_inc(x_54); +lean_dec(x_46); +x_56 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_56, 0, x_54); +lean_ctor_set(x_56, 1, x_55); +return x_56; +} +} +} +else +{ +lean_object* x_57; lean_object* x_58; lean_object* x_59; lean_object* x_60; lean_object* x_61; lean_object* x_62; lean_object* x_63; lean_object* x_64; +x_57 = lean_ctor_get(x_38, 0); +x_58 = lean_ctor_get(x_38, 1); +x_59 = lean_ctor_get(x_38, 2); +x_60 = lean_ctor_get(x_38, 3); +x_61 = lean_ctor_get(x_38, 4); +x_62 = lean_ctor_get(x_38, 6); +lean_inc(x_62); +lean_inc(x_61); +lean_inc(x_60); +lean_inc(x_59); +lean_inc(x_58); +lean_inc(x_57); +lean_dec(x_38); +x_63 = lean_alloc_ctor(0, 7, 0); +lean_ctor_set(x_63, 0, x_57); +lean_ctor_set(x_63, 1, x_58); +lean_ctor_set(x_63, 2, x_59); +lean_ctor_set(x_63, 3, x_60); +lean_ctor_set(x_63, 4, x_61); +lean_ctor_set(x_63, 5, x_1); +lean_ctor_set(x_63, 6, x_62); +lean_ctor_set(x_6, 0, x_63); +x_64 = l___private_Init_Lean_Elab_Command_3__setState(x_5, x_2, x_39); +if (lean_obj_tag(x_64) == 0) +{ +lean_object* x_65; lean_object* x_66; lean_object* x_67; lean_object* x_68; +x_65 = lean_ctor_get(x_64, 1); +lean_inc(x_65); +if (lean_is_exclusive(x_64)) { + lean_ctor_release(x_64, 0); + lean_ctor_release(x_64, 1); + x_66 = x_64; +} else { + lean_dec_ref(x_64); + x_66 = lean_box(0); +} +x_67 = lean_box(0); +if (lean_is_scalar(x_66)) { + x_68 = lean_alloc_ctor(0, 2, 0); +} else { + x_68 = x_66; +} +lean_ctor_set(x_68, 0, x_67); +lean_ctor_set(x_68, 1, x_65); +return x_68; +} +else +{ +lean_object* x_69; lean_object* x_70; lean_object* x_71; lean_object* x_72; +x_69 = lean_ctor_get(x_64, 0); +lean_inc(x_69); +x_70 = lean_ctor_get(x_64, 1); +lean_inc(x_70); +if (lean_is_exclusive(x_64)) { + lean_ctor_release(x_64, 0); + lean_ctor_release(x_64, 1); + x_71 = x_64; +} else { + lean_dec_ref(x_64); + x_71 = lean_box(0); +} +if (lean_is_scalar(x_71)) { + x_72 = lean_alloc_ctor(1, 2, 0); +} else { + x_72 = x_71; +} +lean_ctor_set(x_72, 0, x_69); +lean_ctor_set(x_72, 1, x_70); +return x_72; +} +} +} +else +{ +lean_object* x_73; lean_object* x_74; lean_object* x_75; lean_object* x_76; lean_object* x_77; lean_object* x_78; lean_object* x_79; lean_object* x_80; lean_object* x_81; lean_object* x_82; lean_object* x_83; +x_73 = lean_ctor_get(x_6, 1); +lean_inc(x_73); +lean_dec(x_6); +x_74 = lean_ctor_get(x_38, 0); +lean_inc(x_74); +x_75 = lean_ctor_get(x_38, 1); +lean_inc(x_75); +x_76 = lean_ctor_get(x_38, 2); +lean_inc(x_76); +x_77 = lean_ctor_get(x_38, 3); +lean_inc(x_77); +x_78 = lean_ctor_get(x_38, 4); +lean_inc(x_78); +x_79 = lean_ctor_get(x_38, 6); +lean_inc(x_79); +if (lean_is_exclusive(x_38)) { + lean_ctor_release(x_38, 0); + lean_ctor_release(x_38, 1); + lean_ctor_release(x_38, 2); + lean_ctor_release(x_38, 3); + lean_ctor_release(x_38, 4); + lean_ctor_release(x_38, 5); + lean_ctor_release(x_38, 6); + x_80 = x_38; +} else { + lean_dec_ref(x_38); + x_80 = lean_box(0); +} +if (lean_is_scalar(x_80)) { + x_81 = lean_alloc_ctor(0, 7, 0); +} else { + x_81 = x_80; +} +lean_ctor_set(x_81, 0, x_74); +lean_ctor_set(x_81, 1, x_75); +lean_ctor_set(x_81, 2, x_76); +lean_ctor_set(x_81, 3, x_77); +lean_ctor_set(x_81, 4, x_78); +lean_ctor_set(x_81, 5, x_1); +lean_ctor_set(x_81, 6, x_79); +x_82 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_82, 0, x_81); +lean_ctor_set(x_82, 1, x_73); +lean_ctor_set(x_5, 2, x_82); +x_83 = l___private_Init_Lean_Elab_Command_3__setState(x_5, x_2, x_39); +if (lean_obj_tag(x_83) == 0) +{ +lean_object* x_84; lean_object* x_85; lean_object* x_86; lean_object* x_87; +x_84 = lean_ctor_get(x_83, 1); +lean_inc(x_84); +if (lean_is_exclusive(x_83)) { + lean_ctor_release(x_83, 0); + lean_ctor_release(x_83, 1); + x_85 = x_83; +} else { + lean_dec_ref(x_83); + x_85 = lean_box(0); +} +x_86 = lean_box(0); +if (lean_is_scalar(x_85)) { + x_87 = lean_alloc_ctor(0, 2, 0); +} else { + x_87 = x_85; +} +lean_ctor_set(x_87, 0, x_86); +lean_ctor_set(x_87, 1, x_84); +return x_87; +} +else +{ +lean_object* x_88; lean_object* x_89; lean_object* x_90; lean_object* x_91; +x_88 = lean_ctor_get(x_83, 0); +lean_inc(x_88); +x_89 = lean_ctor_get(x_83, 1); +lean_inc(x_89); +if (lean_is_exclusive(x_83)) { + lean_ctor_release(x_83, 0); + lean_ctor_release(x_83, 1); + x_90 = x_83; +} else { + lean_dec_ref(x_83); + x_90 = lean_box(0); +} +if (lean_is_scalar(x_90)) { + x_91 = lean_alloc_ctor(1, 2, 0); +} else { + x_91 = x_90; +} +lean_ctor_set(x_91, 0, x_88); +lean_ctor_set(x_91, 1, x_89); +return x_91; +} +} +} +else +{ +lean_object* x_92; lean_object* x_93; lean_object* x_94; lean_object* x_95; lean_object* x_96; lean_object* x_97; lean_object* x_98; lean_object* x_99; lean_object* x_100; lean_object* x_101; lean_object* x_102; lean_object* x_103; lean_object* x_104; lean_object* x_105; lean_object* x_106; lean_object* x_107; +x_92 = lean_ctor_get(x_5, 0); +x_93 = lean_ctor_get(x_5, 1); +x_94 = lean_ctor_get(x_5, 3); +lean_inc(x_94); +lean_inc(x_93); +lean_inc(x_92); +lean_dec(x_5); +x_95 = lean_ctor_get(x_6, 1); +lean_inc(x_95); +if (lean_is_exclusive(x_6)) { + lean_ctor_release(x_6, 0); + lean_ctor_release(x_6, 1); + x_96 = x_6; +} else { + lean_dec_ref(x_6); + x_96 = lean_box(0); +} +x_97 = lean_ctor_get(x_38, 0); +lean_inc(x_97); +x_98 = lean_ctor_get(x_38, 1); +lean_inc(x_98); +x_99 = lean_ctor_get(x_38, 2); +lean_inc(x_99); +x_100 = lean_ctor_get(x_38, 3); +lean_inc(x_100); +x_101 = lean_ctor_get(x_38, 4); +lean_inc(x_101); +x_102 = lean_ctor_get(x_38, 6); +lean_inc(x_102); +if (lean_is_exclusive(x_38)) { + lean_ctor_release(x_38, 0); + lean_ctor_release(x_38, 1); + lean_ctor_release(x_38, 2); + lean_ctor_release(x_38, 3); + lean_ctor_release(x_38, 4); + lean_ctor_release(x_38, 5); + lean_ctor_release(x_38, 6); + x_103 = x_38; +} else { + lean_dec_ref(x_38); + x_103 = lean_box(0); +} +if (lean_is_scalar(x_103)) { + x_104 = lean_alloc_ctor(0, 7, 0); +} else { + x_104 = x_103; +} +lean_ctor_set(x_104, 0, x_97); +lean_ctor_set(x_104, 1, x_98); +lean_ctor_set(x_104, 2, x_99); +lean_ctor_set(x_104, 3, x_100); +lean_ctor_set(x_104, 4, x_101); +lean_ctor_set(x_104, 5, x_1); +lean_ctor_set(x_104, 6, x_102); +if (lean_is_scalar(x_96)) { + x_105 = lean_alloc_ctor(1, 2, 0); +} else { + x_105 = x_96; +} +lean_ctor_set(x_105, 0, x_104); +lean_ctor_set(x_105, 1, x_95); +x_106 = lean_alloc_ctor(0, 4, 0); +lean_ctor_set(x_106, 0, x_92); +lean_ctor_set(x_106, 1, x_93); +lean_ctor_set(x_106, 2, x_105); +lean_ctor_set(x_106, 3, x_94); +x_107 = l___private_Init_Lean_Elab_Command_3__setState(x_106, x_2, x_39); +if (lean_obj_tag(x_107) == 0) +{ +lean_object* x_108; lean_object* x_109; lean_object* x_110; lean_object* x_111; +x_108 = lean_ctor_get(x_107, 1); +lean_inc(x_108); +if (lean_is_exclusive(x_107)) { + lean_ctor_release(x_107, 0); + lean_ctor_release(x_107, 1); + x_109 = x_107; +} else { + lean_dec_ref(x_107); + x_109 = lean_box(0); +} +x_110 = lean_box(0); +if (lean_is_scalar(x_109)) { + x_111 = lean_alloc_ctor(0, 2, 0); +} else { + x_111 = x_109; +} +lean_ctor_set(x_111, 0, x_110); +lean_ctor_set(x_111, 1, x_108); +return x_111; +} +else +{ +lean_object* x_112; lean_object* x_113; lean_object* x_114; lean_object* x_115; +x_112 = lean_ctor_get(x_107, 0); +lean_inc(x_112); +x_113 = lean_ctor_get(x_107, 1); +lean_inc(x_113); +if (lean_is_exclusive(x_107)) { + lean_ctor_release(x_107, 0); + lean_ctor_release(x_107, 1); + x_114 = x_107; +} else { + lean_dec_ref(x_107); + x_114 = lean_box(0); +} +if (lean_is_scalar(x_114)) { + x_115 = lean_alloc_ctor(1, 2, 0); +} else { + x_115 = x_114; +} +lean_ctor_set(x_115, 0, x_112); +lean_ctor_set(x_115, 1, x_113); +return x_115; +} +} +} +} +else +{ +uint8_t x_116; +lean_dec(x_2); +lean_dec(x_1); +x_116 = !lean_is_exclusive(x_4); +if (x_116 == 0) +{ +return x_4; +} +else +{ +lean_object* x_117; lean_object* x_118; lean_object* x_119; +x_117 = lean_ctor_get(x_4, 0); +x_118 = lean_ctor_get(x_4, 1); +lean_inc(x_118); +lean_inc(x_117); +lean_dec(x_4); +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; +} +} +} +} +lean_object* l_Lean_Elab_Command_modifyScope___at_Lean_Elab_Command_elabDefLike___spec__3(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +_start: +{ +lean_object* x_4; +lean_inc(x_2); +x_4 = l___private_Init_Lean_Elab_Command_2__getState(x_2, x_3); +if (lean_obj_tag(x_4) == 0) +{ +lean_object* x_5; lean_object* x_6; +x_5 = lean_ctor_get(x_4, 0); +lean_inc(x_5); +x_6 = lean_ctor_get(x_5, 2); +lean_inc(x_6); +if (lean_obj_tag(x_6) == 0) +{ +lean_object* x_7; uint8_t x_8; +lean_dec(x_1); +x_7 = lean_ctor_get(x_4, 1); +lean_inc(x_7); +lean_dec(x_4); +x_8 = !lean_is_exclusive(x_5); +if (x_8 == 0) +{ +lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; +x_9 = lean_ctor_get(x_5, 2); +lean_dec(x_9); +x_10 = l_Lean_Elab_Command_modifyScope___closed__1; +x_11 = l_unreachable_x21___rarg(x_10); +lean_ctor_set(x_5, 2, x_11); +x_12 = l___private_Init_Lean_Elab_Command_3__setState(x_5, x_2, x_7); +if (lean_obj_tag(x_12) == 0) +{ +uint8_t x_13; +x_13 = !lean_is_exclusive(x_12); +if (x_13 == 0) +{ +lean_object* x_14; lean_object* x_15; +x_14 = lean_ctor_get(x_12, 0); +lean_dec(x_14); +x_15 = lean_box(0); +lean_ctor_set(x_12, 0, x_15); +return x_12; +} +else +{ +lean_object* x_16; lean_object* x_17; lean_object* x_18; +x_16 = lean_ctor_get(x_12, 1); +lean_inc(x_16); +lean_dec(x_12); +x_17 = lean_box(0); +x_18 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_18, 0, x_17); +lean_ctor_set(x_18, 1, x_16); +return x_18; +} +} +else +{ +uint8_t x_19; +x_19 = !lean_is_exclusive(x_12); +if (x_19 == 0) +{ +return x_12; +} +else +{ +lean_object* x_20; lean_object* x_21; lean_object* x_22; +x_20 = lean_ctor_get(x_12, 0); +x_21 = lean_ctor_get(x_12, 1); +lean_inc(x_21); +lean_inc(x_20); +lean_dec(x_12); +x_22 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_22, 0, x_20); +lean_ctor_set(x_22, 1, x_21); +return x_22; +} +} +} +else +{ +lean_object* x_23; lean_object* x_24; lean_object* x_25; lean_object* x_26; lean_object* x_27; lean_object* x_28; lean_object* x_29; +x_23 = lean_ctor_get(x_5, 0); +x_24 = lean_ctor_get(x_5, 1); +x_25 = lean_ctor_get(x_5, 3); +lean_inc(x_25); +lean_inc(x_24); +lean_inc(x_23); +lean_dec(x_5); +x_26 = l_Lean_Elab_Command_modifyScope___closed__1; +x_27 = l_unreachable_x21___rarg(x_26); +x_28 = lean_alloc_ctor(0, 4, 0); +lean_ctor_set(x_28, 0, x_23); +lean_ctor_set(x_28, 1, x_24); +lean_ctor_set(x_28, 2, x_27); +lean_ctor_set(x_28, 3, x_25); +x_29 = l___private_Init_Lean_Elab_Command_3__setState(x_28, x_2, x_7); +if (lean_obj_tag(x_29) == 0) +{ +lean_object* x_30; lean_object* x_31; lean_object* x_32; lean_object* x_33; +x_30 = lean_ctor_get(x_29, 1); +lean_inc(x_30); +if (lean_is_exclusive(x_29)) { + lean_ctor_release(x_29, 0); + lean_ctor_release(x_29, 1); + x_31 = x_29; +} else { + lean_dec_ref(x_29); + x_31 = lean_box(0); +} +x_32 = lean_box(0); +if (lean_is_scalar(x_31)) { + x_33 = lean_alloc_ctor(0, 2, 0); +} else { + x_33 = x_31; +} +lean_ctor_set(x_33, 0, x_32); +lean_ctor_set(x_33, 1, x_30); +return x_33; +} +else +{ +lean_object* x_34; lean_object* x_35; lean_object* x_36; lean_object* x_37; +x_34 = lean_ctor_get(x_29, 0); +lean_inc(x_34); +x_35 = lean_ctor_get(x_29, 1); +lean_inc(x_35); +if (lean_is_exclusive(x_29)) { + lean_ctor_release(x_29, 0); + lean_ctor_release(x_29, 1); + x_36 = x_29; +} else { + lean_dec_ref(x_29); + x_36 = lean_box(0); +} +if (lean_is_scalar(x_36)) { + x_37 = lean_alloc_ctor(1, 2, 0); +} else { + x_37 = x_36; +} +lean_ctor_set(x_37, 0, x_34); +lean_ctor_set(x_37, 1, x_35); +return x_37; +} +} +} +else +{ +lean_object* x_38; lean_object* x_39; uint8_t x_40; +x_38 = lean_ctor_get(x_6, 0); +lean_inc(x_38); +x_39 = lean_ctor_get(x_4, 1); +lean_inc(x_39); +lean_dec(x_4); +x_40 = !lean_is_exclusive(x_5); +if (x_40 == 0) +{ +lean_object* x_41; uint8_t x_42; +x_41 = lean_ctor_get(x_5, 2); +lean_dec(x_41); +x_42 = !lean_is_exclusive(x_6); +if (x_42 == 0) +{ +lean_object* x_43; uint8_t x_44; +x_43 = lean_ctor_get(x_6, 0); +lean_dec(x_43); +x_44 = !lean_is_exclusive(x_38); +if (x_44 == 0) +{ +lean_object* x_45; lean_object* x_46; +x_45 = lean_ctor_get(x_38, 5); +lean_dec(x_45); +lean_ctor_set(x_38, 5, x_1); +x_46 = l___private_Init_Lean_Elab_Command_3__setState(x_5, x_2, x_39); +if (lean_obj_tag(x_46) == 0) +{ +uint8_t x_47; +x_47 = !lean_is_exclusive(x_46); +if (x_47 == 0) +{ +lean_object* x_48; lean_object* x_49; +x_48 = lean_ctor_get(x_46, 0); +lean_dec(x_48); +x_49 = lean_box(0); +lean_ctor_set(x_46, 0, x_49); +return x_46; +} +else +{ +lean_object* x_50; lean_object* x_51; lean_object* x_52; +x_50 = lean_ctor_get(x_46, 1); +lean_inc(x_50); +lean_dec(x_46); +x_51 = lean_box(0); +x_52 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_52, 0, x_51); +lean_ctor_set(x_52, 1, x_50); +return x_52; +} +} +else +{ +uint8_t x_53; +x_53 = !lean_is_exclusive(x_46); +if (x_53 == 0) +{ +return x_46; +} +else +{ +lean_object* x_54; lean_object* x_55; lean_object* x_56; +x_54 = lean_ctor_get(x_46, 0); +x_55 = lean_ctor_get(x_46, 1); +lean_inc(x_55); +lean_inc(x_54); +lean_dec(x_46); +x_56 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_56, 0, x_54); +lean_ctor_set(x_56, 1, x_55); +return x_56; +} +} +} +else +{ +lean_object* x_57; lean_object* x_58; lean_object* x_59; lean_object* x_60; lean_object* x_61; lean_object* x_62; lean_object* x_63; lean_object* x_64; +x_57 = lean_ctor_get(x_38, 0); +x_58 = lean_ctor_get(x_38, 1); +x_59 = lean_ctor_get(x_38, 2); +x_60 = lean_ctor_get(x_38, 3); +x_61 = lean_ctor_get(x_38, 4); +x_62 = lean_ctor_get(x_38, 6); +lean_inc(x_62); +lean_inc(x_61); +lean_inc(x_60); +lean_inc(x_59); +lean_inc(x_58); +lean_inc(x_57); +lean_dec(x_38); +x_63 = lean_alloc_ctor(0, 7, 0); +lean_ctor_set(x_63, 0, x_57); +lean_ctor_set(x_63, 1, x_58); +lean_ctor_set(x_63, 2, x_59); +lean_ctor_set(x_63, 3, x_60); +lean_ctor_set(x_63, 4, x_61); +lean_ctor_set(x_63, 5, x_1); +lean_ctor_set(x_63, 6, x_62); +lean_ctor_set(x_6, 0, x_63); +x_64 = l___private_Init_Lean_Elab_Command_3__setState(x_5, x_2, x_39); +if (lean_obj_tag(x_64) == 0) +{ +lean_object* x_65; lean_object* x_66; lean_object* x_67; lean_object* x_68; +x_65 = lean_ctor_get(x_64, 1); +lean_inc(x_65); +if (lean_is_exclusive(x_64)) { + lean_ctor_release(x_64, 0); + lean_ctor_release(x_64, 1); + x_66 = x_64; +} else { + lean_dec_ref(x_64); + x_66 = lean_box(0); +} +x_67 = lean_box(0); +if (lean_is_scalar(x_66)) { + x_68 = lean_alloc_ctor(0, 2, 0); +} else { + x_68 = x_66; +} +lean_ctor_set(x_68, 0, x_67); +lean_ctor_set(x_68, 1, x_65); +return x_68; +} +else +{ +lean_object* x_69; lean_object* x_70; lean_object* x_71; lean_object* x_72; +x_69 = lean_ctor_get(x_64, 0); +lean_inc(x_69); +x_70 = lean_ctor_get(x_64, 1); +lean_inc(x_70); +if (lean_is_exclusive(x_64)) { + lean_ctor_release(x_64, 0); + lean_ctor_release(x_64, 1); + x_71 = x_64; +} else { + lean_dec_ref(x_64); + x_71 = lean_box(0); +} +if (lean_is_scalar(x_71)) { + x_72 = lean_alloc_ctor(1, 2, 0); +} else { + x_72 = x_71; +} +lean_ctor_set(x_72, 0, x_69); +lean_ctor_set(x_72, 1, x_70); +return x_72; +} +} +} +else +{ +lean_object* x_73; lean_object* x_74; lean_object* x_75; lean_object* x_76; lean_object* x_77; lean_object* x_78; lean_object* x_79; lean_object* x_80; lean_object* x_81; lean_object* x_82; lean_object* x_83; +x_73 = lean_ctor_get(x_6, 1); +lean_inc(x_73); +lean_dec(x_6); +x_74 = lean_ctor_get(x_38, 0); +lean_inc(x_74); +x_75 = lean_ctor_get(x_38, 1); +lean_inc(x_75); +x_76 = lean_ctor_get(x_38, 2); +lean_inc(x_76); +x_77 = lean_ctor_get(x_38, 3); +lean_inc(x_77); +x_78 = lean_ctor_get(x_38, 4); +lean_inc(x_78); +x_79 = lean_ctor_get(x_38, 6); +lean_inc(x_79); +if (lean_is_exclusive(x_38)) { + lean_ctor_release(x_38, 0); + lean_ctor_release(x_38, 1); + lean_ctor_release(x_38, 2); + lean_ctor_release(x_38, 3); + lean_ctor_release(x_38, 4); + lean_ctor_release(x_38, 5); + lean_ctor_release(x_38, 6); + x_80 = x_38; +} else { + lean_dec_ref(x_38); + x_80 = lean_box(0); +} +if (lean_is_scalar(x_80)) { + x_81 = lean_alloc_ctor(0, 7, 0); +} else { + x_81 = x_80; +} +lean_ctor_set(x_81, 0, x_74); +lean_ctor_set(x_81, 1, x_75); +lean_ctor_set(x_81, 2, x_76); +lean_ctor_set(x_81, 3, x_77); +lean_ctor_set(x_81, 4, x_78); +lean_ctor_set(x_81, 5, x_1); +lean_ctor_set(x_81, 6, x_79); +x_82 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_82, 0, x_81); +lean_ctor_set(x_82, 1, x_73); +lean_ctor_set(x_5, 2, x_82); +x_83 = l___private_Init_Lean_Elab_Command_3__setState(x_5, x_2, x_39); +if (lean_obj_tag(x_83) == 0) +{ +lean_object* x_84; lean_object* x_85; lean_object* x_86; lean_object* x_87; +x_84 = lean_ctor_get(x_83, 1); +lean_inc(x_84); +if (lean_is_exclusive(x_83)) { + lean_ctor_release(x_83, 0); + lean_ctor_release(x_83, 1); + x_85 = x_83; +} else { + lean_dec_ref(x_83); + x_85 = lean_box(0); +} +x_86 = lean_box(0); +if (lean_is_scalar(x_85)) { + x_87 = lean_alloc_ctor(0, 2, 0); +} else { + x_87 = x_85; +} +lean_ctor_set(x_87, 0, x_86); +lean_ctor_set(x_87, 1, x_84); +return x_87; +} +else +{ +lean_object* x_88; lean_object* x_89; lean_object* x_90; lean_object* x_91; +x_88 = lean_ctor_get(x_83, 0); +lean_inc(x_88); +x_89 = lean_ctor_get(x_83, 1); +lean_inc(x_89); +if (lean_is_exclusive(x_83)) { + lean_ctor_release(x_83, 0); + lean_ctor_release(x_83, 1); + x_90 = x_83; +} else { + lean_dec_ref(x_83); + x_90 = lean_box(0); +} +if (lean_is_scalar(x_90)) { + x_91 = lean_alloc_ctor(1, 2, 0); +} else { + x_91 = x_90; +} +lean_ctor_set(x_91, 0, x_88); +lean_ctor_set(x_91, 1, x_89); +return x_91; +} +} +} +else +{ +lean_object* x_92; lean_object* x_93; lean_object* x_94; lean_object* x_95; lean_object* x_96; lean_object* x_97; lean_object* x_98; lean_object* x_99; lean_object* x_100; lean_object* x_101; lean_object* x_102; lean_object* x_103; lean_object* x_104; lean_object* x_105; lean_object* x_106; lean_object* x_107; +x_92 = lean_ctor_get(x_5, 0); +x_93 = lean_ctor_get(x_5, 1); +x_94 = lean_ctor_get(x_5, 3); +lean_inc(x_94); +lean_inc(x_93); +lean_inc(x_92); +lean_dec(x_5); +x_95 = lean_ctor_get(x_6, 1); +lean_inc(x_95); +if (lean_is_exclusive(x_6)) { + lean_ctor_release(x_6, 0); + lean_ctor_release(x_6, 1); + x_96 = x_6; +} else { + lean_dec_ref(x_6); + x_96 = lean_box(0); +} +x_97 = lean_ctor_get(x_38, 0); +lean_inc(x_97); +x_98 = lean_ctor_get(x_38, 1); +lean_inc(x_98); +x_99 = lean_ctor_get(x_38, 2); +lean_inc(x_99); +x_100 = lean_ctor_get(x_38, 3); +lean_inc(x_100); +x_101 = lean_ctor_get(x_38, 4); +lean_inc(x_101); +x_102 = lean_ctor_get(x_38, 6); +lean_inc(x_102); +if (lean_is_exclusive(x_38)) { + lean_ctor_release(x_38, 0); + lean_ctor_release(x_38, 1); + lean_ctor_release(x_38, 2); + lean_ctor_release(x_38, 3); + lean_ctor_release(x_38, 4); + lean_ctor_release(x_38, 5); + lean_ctor_release(x_38, 6); + x_103 = x_38; +} else { + lean_dec_ref(x_38); + x_103 = lean_box(0); +} +if (lean_is_scalar(x_103)) { + x_104 = lean_alloc_ctor(0, 7, 0); +} else { + x_104 = x_103; +} +lean_ctor_set(x_104, 0, x_97); +lean_ctor_set(x_104, 1, x_98); +lean_ctor_set(x_104, 2, x_99); +lean_ctor_set(x_104, 3, x_100); +lean_ctor_set(x_104, 4, x_101); +lean_ctor_set(x_104, 5, x_1); +lean_ctor_set(x_104, 6, x_102); +if (lean_is_scalar(x_96)) { + x_105 = lean_alloc_ctor(1, 2, 0); +} else { + x_105 = x_96; +} +lean_ctor_set(x_105, 0, x_104); +lean_ctor_set(x_105, 1, x_95); +x_106 = lean_alloc_ctor(0, 4, 0); +lean_ctor_set(x_106, 0, x_92); +lean_ctor_set(x_106, 1, x_93); +lean_ctor_set(x_106, 2, x_105); +lean_ctor_set(x_106, 3, x_94); +x_107 = l___private_Init_Lean_Elab_Command_3__setState(x_106, x_2, x_39); +if (lean_obj_tag(x_107) == 0) +{ +lean_object* x_108; lean_object* x_109; lean_object* x_110; lean_object* x_111; +x_108 = lean_ctor_get(x_107, 1); +lean_inc(x_108); +if (lean_is_exclusive(x_107)) { + lean_ctor_release(x_107, 0); + lean_ctor_release(x_107, 1); + x_109 = x_107; +} else { + lean_dec_ref(x_107); + x_109 = lean_box(0); +} +x_110 = lean_box(0); +if (lean_is_scalar(x_109)) { + x_111 = lean_alloc_ctor(0, 2, 0); +} else { + x_111 = x_109; +} +lean_ctor_set(x_111, 0, x_110); +lean_ctor_set(x_111, 1, x_108); +return x_111; +} +else +{ +lean_object* x_112; lean_object* x_113; lean_object* x_114; lean_object* x_115; +x_112 = lean_ctor_get(x_107, 0); +lean_inc(x_112); +x_113 = lean_ctor_get(x_107, 1); +lean_inc(x_113); +if (lean_is_exclusive(x_107)) { + lean_ctor_release(x_107, 0); + lean_ctor_release(x_107, 1); + x_114 = x_107; +} else { + lean_dec_ref(x_107); + x_114 = lean_box(0); +} +if (lean_is_scalar(x_114)) { + x_115 = lean_alloc_ctor(1, 2, 0); +} else { + x_115 = x_114; +} +lean_ctor_set(x_115, 0, x_112); +lean_ctor_set(x_115, 1, x_113); +return x_115; +} +} +} +} +else +{ +uint8_t x_116; +lean_dec(x_2); +lean_dec(x_1); +x_116 = !lean_is_exclusive(x_4); +if (x_116 == 0) +{ +return x_4; +} +else +{ +lean_object* x_117; lean_object* x_118; lean_object* x_119; +x_117 = lean_ctor_get(x_4, 0); +x_118 = lean_ctor_get(x_4, 1); +lean_inc(x_118); +lean_inc(x_117); +lean_dec(x_4); +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; +} +} +} +} +lean_object* l_Lean_Elab_Command_modifyScope___at_Lean_Elab_Command_elabDefLike___spec__4(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +_start: +{ +lean_object* x_4; +lean_inc(x_2); +x_4 = l___private_Init_Lean_Elab_Command_2__getState(x_2, x_3); +if (lean_obj_tag(x_4) == 0) +{ +lean_object* x_5; lean_object* x_6; +x_5 = lean_ctor_get(x_4, 0); +lean_inc(x_5); +x_6 = lean_ctor_get(x_5, 2); +lean_inc(x_6); +if (lean_obj_tag(x_6) == 0) +{ +lean_object* x_7; uint8_t x_8; +lean_dec(x_1); +x_7 = lean_ctor_get(x_4, 1); +lean_inc(x_7); +lean_dec(x_4); +x_8 = !lean_is_exclusive(x_5); +if (x_8 == 0) +{ +lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; +x_9 = lean_ctor_get(x_5, 2); +lean_dec(x_9); +x_10 = l_Lean_Elab_Command_modifyScope___closed__1; +x_11 = l_unreachable_x21___rarg(x_10); +lean_ctor_set(x_5, 2, x_11); +x_12 = l___private_Init_Lean_Elab_Command_3__setState(x_5, x_2, x_7); +if (lean_obj_tag(x_12) == 0) +{ +uint8_t x_13; +x_13 = !lean_is_exclusive(x_12); +if (x_13 == 0) +{ +lean_object* x_14; lean_object* x_15; +x_14 = lean_ctor_get(x_12, 0); +lean_dec(x_14); +x_15 = lean_box(0); +lean_ctor_set(x_12, 0, x_15); +return x_12; +} +else +{ +lean_object* x_16; lean_object* x_17; lean_object* x_18; +x_16 = lean_ctor_get(x_12, 1); +lean_inc(x_16); +lean_dec(x_12); +x_17 = lean_box(0); +x_18 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_18, 0, x_17); +lean_ctor_set(x_18, 1, x_16); +return x_18; +} +} +else +{ +uint8_t x_19; +x_19 = !lean_is_exclusive(x_12); +if (x_19 == 0) +{ +return x_12; +} +else +{ +lean_object* x_20; lean_object* x_21; lean_object* x_22; +x_20 = lean_ctor_get(x_12, 0); +x_21 = lean_ctor_get(x_12, 1); +lean_inc(x_21); +lean_inc(x_20); +lean_dec(x_12); +x_22 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_22, 0, x_20); +lean_ctor_set(x_22, 1, x_21); +return x_22; +} +} +} +else +{ +lean_object* x_23; lean_object* x_24; lean_object* x_25; lean_object* x_26; lean_object* x_27; lean_object* x_28; lean_object* x_29; +x_23 = lean_ctor_get(x_5, 0); +x_24 = lean_ctor_get(x_5, 1); +x_25 = lean_ctor_get(x_5, 3); +lean_inc(x_25); +lean_inc(x_24); +lean_inc(x_23); +lean_dec(x_5); +x_26 = l_Lean_Elab_Command_modifyScope___closed__1; +x_27 = l_unreachable_x21___rarg(x_26); +x_28 = lean_alloc_ctor(0, 4, 0); +lean_ctor_set(x_28, 0, x_23); +lean_ctor_set(x_28, 1, x_24); +lean_ctor_set(x_28, 2, x_27); +lean_ctor_set(x_28, 3, x_25); +x_29 = l___private_Init_Lean_Elab_Command_3__setState(x_28, x_2, x_7); +if (lean_obj_tag(x_29) == 0) +{ +lean_object* x_30; lean_object* x_31; lean_object* x_32; lean_object* x_33; +x_30 = lean_ctor_get(x_29, 1); +lean_inc(x_30); +if (lean_is_exclusive(x_29)) { + lean_ctor_release(x_29, 0); + lean_ctor_release(x_29, 1); + x_31 = x_29; +} else { + lean_dec_ref(x_29); + x_31 = lean_box(0); +} +x_32 = lean_box(0); +if (lean_is_scalar(x_31)) { + x_33 = lean_alloc_ctor(0, 2, 0); +} else { + x_33 = x_31; +} +lean_ctor_set(x_33, 0, x_32); +lean_ctor_set(x_33, 1, x_30); +return x_33; +} +else +{ +lean_object* x_34; lean_object* x_35; lean_object* x_36; lean_object* x_37; +x_34 = lean_ctor_get(x_29, 0); +lean_inc(x_34); +x_35 = lean_ctor_get(x_29, 1); +lean_inc(x_35); +if (lean_is_exclusive(x_29)) { + lean_ctor_release(x_29, 0); + lean_ctor_release(x_29, 1); + x_36 = x_29; +} else { + lean_dec_ref(x_29); + x_36 = lean_box(0); +} +if (lean_is_scalar(x_36)) { + x_37 = lean_alloc_ctor(1, 2, 0); +} else { + x_37 = x_36; +} +lean_ctor_set(x_37, 0, x_34); +lean_ctor_set(x_37, 1, x_35); +return x_37; +} +} +} +else +{ +lean_object* x_38; lean_object* x_39; uint8_t x_40; +x_38 = lean_ctor_get(x_6, 0); +lean_inc(x_38); +x_39 = lean_ctor_get(x_4, 1); +lean_inc(x_39); +lean_dec(x_4); +x_40 = !lean_is_exclusive(x_5); +if (x_40 == 0) +{ +lean_object* x_41; uint8_t x_42; +x_41 = lean_ctor_get(x_5, 2); +lean_dec(x_41); +x_42 = !lean_is_exclusive(x_6); +if (x_42 == 0) +{ +lean_object* x_43; uint8_t x_44; +x_43 = lean_ctor_get(x_6, 0); +lean_dec(x_43); +x_44 = !lean_is_exclusive(x_38); +if (x_44 == 0) +{ +lean_object* x_45; lean_object* x_46; +x_45 = lean_ctor_get(x_38, 5); +lean_dec(x_45); +lean_ctor_set(x_38, 5, x_1); +x_46 = l___private_Init_Lean_Elab_Command_3__setState(x_5, x_2, x_39); +if (lean_obj_tag(x_46) == 0) +{ +uint8_t x_47; +x_47 = !lean_is_exclusive(x_46); +if (x_47 == 0) +{ +lean_object* x_48; lean_object* x_49; +x_48 = lean_ctor_get(x_46, 0); +lean_dec(x_48); +x_49 = lean_box(0); +lean_ctor_set(x_46, 0, x_49); +return x_46; +} +else +{ +lean_object* x_50; lean_object* x_51; lean_object* x_52; +x_50 = lean_ctor_get(x_46, 1); +lean_inc(x_50); +lean_dec(x_46); +x_51 = lean_box(0); +x_52 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_52, 0, x_51); +lean_ctor_set(x_52, 1, x_50); +return x_52; +} +} +else +{ +uint8_t x_53; +x_53 = !lean_is_exclusive(x_46); +if (x_53 == 0) +{ +return x_46; +} +else +{ +lean_object* x_54; lean_object* x_55; lean_object* x_56; +x_54 = lean_ctor_get(x_46, 0); +x_55 = lean_ctor_get(x_46, 1); +lean_inc(x_55); +lean_inc(x_54); +lean_dec(x_46); +x_56 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_56, 0, x_54); +lean_ctor_set(x_56, 1, x_55); +return x_56; +} +} +} +else +{ +lean_object* x_57; lean_object* x_58; lean_object* x_59; lean_object* x_60; lean_object* x_61; lean_object* x_62; lean_object* x_63; lean_object* x_64; +x_57 = lean_ctor_get(x_38, 0); +x_58 = lean_ctor_get(x_38, 1); +x_59 = lean_ctor_get(x_38, 2); +x_60 = lean_ctor_get(x_38, 3); +x_61 = lean_ctor_get(x_38, 4); +x_62 = lean_ctor_get(x_38, 6); +lean_inc(x_62); +lean_inc(x_61); +lean_inc(x_60); +lean_inc(x_59); +lean_inc(x_58); +lean_inc(x_57); +lean_dec(x_38); +x_63 = lean_alloc_ctor(0, 7, 0); +lean_ctor_set(x_63, 0, x_57); +lean_ctor_set(x_63, 1, x_58); +lean_ctor_set(x_63, 2, x_59); +lean_ctor_set(x_63, 3, x_60); +lean_ctor_set(x_63, 4, x_61); +lean_ctor_set(x_63, 5, x_1); +lean_ctor_set(x_63, 6, x_62); +lean_ctor_set(x_6, 0, x_63); +x_64 = l___private_Init_Lean_Elab_Command_3__setState(x_5, x_2, x_39); +if (lean_obj_tag(x_64) == 0) +{ +lean_object* x_65; lean_object* x_66; lean_object* x_67; lean_object* x_68; +x_65 = lean_ctor_get(x_64, 1); +lean_inc(x_65); +if (lean_is_exclusive(x_64)) { + lean_ctor_release(x_64, 0); + lean_ctor_release(x_64, 1); + x_66 = x_64; +} else { + lean_dec_ref(x_64); + x_66 = lean_box(0); +} +x_67 = lean_box(0); +if (lean_is_scalar(x_66)) { + x_68 = lean_alloc_ctor(0, 2, 0); +} else { + x_68 = x_66; +} +lean_ctor_set(x_68, 0, x_67); +lean_ctor_set(x_68, 1, x_65); +return x_68; +} +else +{ +lean_object* x_69; lean_object* x_70; lean_object* x_71; lean_object* x_72; +x_69 = lean_ctor_get(x_64, 0); +lean_inc(x_69); +x_70 = lean_ctor_get(x_64, 1); +lean_inc(x_70); +if (lean_is_exclusive(x_64)) { + lean_ctor_release(x_64, 0); + lean_ctor_release(x_64, 1); + x_71 = x_64; +} else { + lean_dec_ref(x_64); + x_71 = lean_box(0); +} +if (lean_is_scalar(x_71)) { + x_72 = lean_alloc_ctor(1, 2, 0); +} else { + x_72 = x_71; +} +lean_ctor_set(x_72, 0, x_69); +lean_ctor_set(x_72, 1, x_70); +return x_72; +} +} +} +else +{ +lean_object* x_73; lean_object* x_74; lean_object* x_75; lean_object* x_76; lean_object* x_77; lean_object* x_78; lean_object* x_79; lean_object* x_80; lean_object* x_81; lean_object* x_82; lean_object* x_83; +x_73 = lean_ctor_get(x_6, 1); +lean_inc(x_73); +lean_dec(x_6); +x_74 = lean_ctor_get(x_38, 0); +lean_inc(x_74); +x_75 = lean_ctor_get(x_38, 1); +lean_inc(x_75); +x_76 = lean_ctor_get(x_38, 2); +lean_inc(x_76); +x_77 = lean_ctor_get(x_38, 3); +lean_inc(x_77); +x_78 = lean_ctor_get(x_38, 4); +lean_inc(x_78); +x_79 = lean_ctor_get(x_38, 6); +lean_inc(x_79); +if (lean_is_exclusive(x_38)) { + lean_ctor_release(x_38, 0); + lean_ctor_release(x_38, 1); + lean_ctor_release(x_38, 2); + lean_ctor_release(x_38, 3); + lean_ctor_release(x_38, 4); + lean_ctor_release(x_38, 5); + lean_ctor_release(x_38, 6); + x_80 = x_38; +} else { + lean_dec_ref(x_38); + x_80 = lean_box(0); +} +if (lean_is_scalar(x_80)) { + x_81 = lean_alloc_ctor(0, 7, 0); +} else { + x_81 = x_80; +} +lean_ctor_set(x_81, 0, x_74); +lean_ctor_set(x_81, 1, x_75); +lean_ctor_set(x_81, 2, x_76); +lean_ctor_set(x_81, 3, x_77); +lean_ctor_set(x_81, 4, x_78); +lean_ctor_set(x_81, 5, x_1); +lean_ctor_set(x_81, 6, x_79); +x_82 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_82, 0, x_81); +lean_ctor_set(x_82, 1, x_73); +lean_ctor_set(x_5, 2, x_82); +x_83 = l___private_Init_Lean_Elab_Command_3__setState(x_5, x_2, x_39); +if (lean_obj_tag(x_83) == 0) +{ +lean_object* x_84; lean_object* x_85; lean_object* x_86; lean_object* x_87; +x_84 = lean_ctor_get(x_83, 1); +lean_inc(x_84); +if (lean_is_exclusive(x_83)) { + lean_ctor_release(x_83, 0); + lean_ctor_release(x_83, 1); + x_85 = x_83; +} else { + lean_dec_ref(x_83); + x_85 = lean_box(0); +} +x_86 = lean_box(0); +if (lean_is_scalar(x_85)) { + x_87 = lean_alloc_ctor(0, 2, 0); +} else { + x_87 = x_85; +} +lean_ctor_set(x_87, 0, x_86); +lean_ctor_set(x_87, 1, x_84); +return x_87; +} +else +{ +lean_object* x_88; lean_object* x_89; lean_object* x_90; lean_object* x_91; +x_88 = lean_ctor_get(x_83, 0); +lean_inc(x_88); +x_89 = lean_ctor_get(x_83, 1); +lean_inc(x_89); +if (lean_is_exclusive(x_83)) { + lean_ctor_release(x_83, 0); + lean_ctor_release(x_83, 1); + x_90 = x_83; +} else { + lean_dec_ref(x_83); + x_90 = lean_box(0); +} +if (lean_is_scalar(x_90)) { + x_91 = lean_alloc_ctor(1, 2, 0); +} else { + x_91 = x_90; +} +lean_ctor_set(x_91, 0, x_88); +lean_ctor_set(x_91, 1, x_89); +return x_91; +} +} +} +else +{ +lean_object* x_92; lean_object* x_93; lean_object* x_94; lean_object* x_95; lean_object* x_96; lean_object* x_97; lean_object* x_98; lean_object* x_99; lean_object* x_100; lean_object* x_101; lean_object* x_102; lean_object* x_103; lean_object* x_104; lean_object* x_105; lean_object* x_106; lean_object* x_107; +x_92 = lean_ctor_get(x_5, 0); +x_93 = lean_ctor_get(x_5, 1); +x_94 = lean_ctor_get(x_5, 3); +lean_inc(x_94); +lean_inc(x_93); +lean_inc(x_92); +lean_dec(x_5); +x_95 = lean_ctor_get(x_6, 1); +lean_inc(x_95); +if (lean_is_exclusive(x_6)) { + lean_ctor_release(x_6, 0); + lean_ctor_release(x_6, 1); + x_96 = x_6; +} else { + lean_dec_ref(x_6); + x_96 = lean_box(0); +} +x_97 = lean_ctor_get(x_38, 0); +lean_inc(x_97); +x_98 = lean_ctor_get(x_38, 1); +lean_inc(x_98); +x_99 = lean_ctor_get(x_38, 2); +lean_inc(x_99); +x_100 = lean_ctor_get(x_38, 3); +lean_inc(x_100); +x_101 = lean_ctor_get(x_38, 4); +lean_inc(x_101); +x_102 = lean_ctor_get(x_38, 6); +lean_inc(x_102); +if (lean_is_exclusive(x_38)) { + lean_ctor_release(x_38, 0); + lean_ctor_release(x_38, 1); + lean_ctor_release(x_38, 2); + lean_ctor_release(x_38, 3); + lean_ctor_release(x_38, 4); + lean_ctor_release(x_38, 5); + lean_ctor_release(x_38, 6); + x_103 = x_38; +} else { + lean_dec_ref(x_38); + x_103 = lean_box(0); +} +if (lean_is_scalar(x_103)) { + x_104 = lean_alloc_ctor(0, 7, 0); +} else { + x_104 = x_103; +} +lean_ctor_set(x_104, 0, x_97); +lean_ctor_set(x_104, 1, x_98); +lean_ctor_set(x_104, 2, x_99); +lean_ctor_set(x_104, 3, x_100); +lean_ctor_set(x_104, 4, x_101); +lean_ctor_set(x_104, 5, x_1); +lean_ctor_set(x_104, 6, x_102); +if (lean_is_scalar(x_96)) { + x_105 = lean_alloc_ctor(1, 2, 0); +} else { + x_105 = x_96; +} +lean_ctor_set(x_105, 0, x_104); +lean_ctor_set(x_105, 1, x_95); +x_106 = lean_alloc_ctor(0, 4, 0); +lean_ctor_set(x_106, 0, x_92); +lean_ctor_set(x_106, 1, x_93); +lean_ctor_set(x_106, 2, x_105); +lean_ctor_set(x_106, 3, x_94); +x_107 = l___private_Init_Lean_Elab_Command_3__setState(x_106, x_2, x_39); +if (lean_obj_tag(x_107) == 0) +{ +lean_object* x_108; lean_object* x_109; lean_object* x_110; lean_object* x_111; +x_108 = lean_ctor_get(x_107, 1); +lean_inc(x_108); +if (lean_is_exclusive(x_107)) { + lean_ctor_release(x_107, 0); + lean_ctor_release(x_107, 1); + x_109 = x_107; +} else { + lean_dec_ref(x_107); + x_109 = lean_box(0); +} +x_110 = lean_box(0); +if (lean_is_scalar(x_109)) { + x_111 = lean_alloc_ctor(0, 2, 0); +} else { + x_111 = x_109; +} +lean_ctor_set(x_111, 0, x_110); +lean_ctor_set(x_111, 1, x_108); +return x_111; +} +else +{ +lean_object* x_112; lean_object* x_113; lean_object* x_114; lean_object* x_115; +x_112 = lean_ctor_get(x_107, 0); +lean_inc(x_112); +x_113 = lean_ctor_get(x_107, 1); +lean_inc(x_113); +if (lean_is_exclusive(x_107)) { + lean_ctor_release(x_107, 0); + lean_ctor_release(x_107, 1); + x_114 = x_107; +} else { + lean_dec_ref(x_107); + x_114 = lean_box(0); +} +if (lean_is_scalar(x_114)) { + x_115 = lean_alloc_ctor(1, 2, 0); +} else { + x_115 = x_114; +} +lean_ctor_set(x_115, 0, x_112); +lean_ctor_set(x_115, 1, x_113); +return x_115; +} +} +} +} +else +{ +uint8_t x_116; +lean_dec(x_2); +lean_dec(x_1); +x_116 = !lean_is_exclusive(x_4); +if (x_116 == 0) +{ +return x_4; +} +else +{ +lean_object* x_117; lean_object* x_118; lean_object* x_119; +x_117 = lean_ctor_get(x_4, 0); +x_118 = lean_ctor_get(x_4, 1); +lean_inc(x_118); +lean_inc(x_117); +lean_dec(x_4); +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; +} +} +} +} +lean_object* l_Lean_Elab_Term_dbgTrace___at_Lean_Elab_Command_elabDefLike___spec__5(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +_start: +{ +lean_object* x_4; lean_object* x_5; lean_object* x_6; +x_4 = l_Lean_Meta_dbgTrace___rarg___closed__1; +x_5 = lean_dbg_trace(x_1, x_4); +x_6 = lean_apply_2(x_5, x_2, x_3); +return x_6; +} +} +lean_object* l_Array_iterateMAux___main___at_Lean_Elab_Command_elabDefLike___spec__6(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6) { +_start: +{ +lean_object* x_7; uint8_t x_8; +x_7 = lean_array_get_size(x_2); +x_8 = lean_nat_dec_lt(x_3, x_7); +lean_dec(x_7); +if (x_8 == 0) +{ +lean_object* x_9; +lean_dec(x_3); +x_9 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_9, 0, x_4); +lean_ctor_set(x_9, 1, x_6); +return x_9; +} +else +{ +lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; uint8_t x_14; +x_10 = lean_array_fget(x_2, x_3); +x_11 = lean_unsigned_to_nat(1u); +x_12 = lean_nat_add(x_3, x_11); +lean_dec(x_3); +x_13 = l_Lean_Syntax_getId(x_10); +x_14 = l_List_elem___main___at_Lean_Parser_addLeadingParser___spec__4(x_13, x_4); +if (x_14 == 0) +{ +lean_object* x_15; +lean_dec(x_10); +x_15 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_15, 0, x_13); +lean_ctor_set(x_15, 1, x_4); +x_3 = x_12; +x_4 = x_15; +goto _start; +} +else +{ +lean_object* x_17; uint8_t x_18; +lean_dec(x_12); +lean_dec(x_4); +x_17 = l_Lean_Elab_Command_throwAlreadyDeclaredUniverseLevel___rarg(x_10, x_13, x_5, x_6); +lean_dec(x_10); +x_18 = !lean_is_exclusive(x_17); +if (x_18 == 0) +{ +return x_17; +} +else +{ +lean_object* x_19; lean_object* x_20; lean_object* x_21; +x_19 = lean_ctor_get(x_17, 0); +x_20 = lean_ctor_get(x_17, 1); +lean_inc(x_20); +lean_inc(x_19); +lean_dec(x_17); +x_21 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_21, 0, x_19); +lean_ctor_set(x_21, 1, x_20); +return x_21; +} +} +} +} +} +lean_object* _init_l_Lean_Elab_Command_elabDefLike___lambda__1___closed__1() { +_start: +{ +lean_object* x_1; +x_1 = lean_mk_string(">>> "); +return x_1; +} +} +lean_object* l_Lean_Elab_Command_elabDefLike___lambda__1(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) { +_start: +{ +lean_object* x_6; +x_6 = lean_ctor_get(x_1, 4); +lean_inc(x_6); +lean_dec(x_1); +if (lean_obj_tag(x_6) == 0) +{ +uint8_t x_7; lean_object* x_8; lean_object* x_9; uint8_t x_10; +lean_dec(x_3); +x_7 = 0; +x_8 = lean_box(0); +x_9 = l_Lean_Elab_Term_mkFreshTypeMVar(x_2, x_7, x_8, x_4, x_5); +x_10 = !lean_is_exclusive(x_9); +if (x_10 == 0) +{ +lean_object* x_11; lean_object* x_12; +x_11 = lean_ctor_get(x_9, 0); +lean_dec(x_11); +x_12 = lean_box(0); +lean_ctor_set(x_9, 0, x_12); +return x_9; +} +else +{ +lean_object* x_13; lean_object* x_14; lean_object* x_15; +x_13 = lean_ctor_get(x_9, 1); +lean_inc(x_13); +lean_dec(x_9); +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_13); +return x_15; +} +} +else +{ +lean_object* x_16; lean_object* x_17; +x_16 = lean_ctor_get(x_6, 0); +lean_inc(x_16); +lean_dec(x_6); +lean_inc(x_4); +lean_inc(x_16); +x_17 = l_Lean_Elab_Term_elabType(x_16, x_4, x_5); +if (lean_obj_tag(x_17) == 0) +{ +lean_object* x_18; lean_object* x_19; uint8_t x_20; lean_object* x_21; lean_object* x_22; +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 = 0; +x_21 = lean_box(0); +lean_inc(x_4); +x_22 = l___private_Init_Lean_Elab_Term_19__synthesizeSyntheticMVarsAux___main(x_20, x_21, x_4, x_19); +if (lean_obj_tag(x_22) == 0) +{ +lean_object* x_23; lean_object* x_24; lean_object* x_25; lean_object* x_26; lean_object* x_27; +x_23 = lean_ctor_get(x_22, 1); +lean_inc(x_23); +lean_dec(x_22); +lean_inc(x_4); +x_24 = l_Lean_Elab_Term_instantiateMVars(x_16, x_18, x_4, x_23); +x_25 = lean_ctor_get(x_24, 0); +lean_inc(x_25); +x_26 = lean_ctor_get(x_24, 1); +lean_inc(x_26); +lean_dec(x_24); +lean_inc(x_4); +lean_inc(x_25); +x_27 = l_Lean_Elab_Term_mkForall(x_16, x_3, x_25, x_4, x_26); +lean_dec(x_16); +if (lean_obj_tag(x_27) == 0) +{ +lean_object* x_28; lean_object* x_29; lean_object* x_30; lean_object* x_31; lean_object* x_32; lean_object* x_33; lean_object* x_34; +x_28 = lean_ctor_get(x_27, 1); +lean_inc(x_28); +lean_dec(x_27); +x_29 = lean_expr_dbg_to_string(x_25); +lean_dec(x_25); +x_30 = l_Lean_Elab_Command_elabDefLike___lambda__1___closed__1; +x_31 = lean_string_append(x_30, x_29); +lean_dec(x_29); +x_32 = lean_alloc_closure((void*)(l_Lean_Meta_dbgTrace___rarg___lambda__1___boxed), 3, 0); +x_33 = lean_dbg_trace(x_31, x_32); +x_34 = lean_apply_2(x_33, x_4, x_28); +if (lean_obj_tag(x_34) == 0) +{ +uint8_t x_35; +x_35 = !lean_is_exclusive(x_34); +if (x_35 == 0) +{ +lean_object* x_36; +x_36 = lean_ctor_get(x_34, 0); +lean_dec(x_36); +lean_ctor_set(x_34, 0, x_21); +return x_34; +} +else +{ +lean_object* x_37; lean_object* x_38; +x_37 = lean_ctor_get(x_34, 1); +lean_inc(x_37); +lean_dec(x_34); +x_38 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_38, 0, x_21); +lean_ctor_set(x_38, 1, x_37); +return x_38; +} +} +else +{ +uint8_t x_39; +x_39 = !lean_is_exclusive(x_34); +if (x_39 == 0) +{ +return x_34; +} +else +{ +lean_object* x_40; lean_object* x_41; lean_object* x_42; +x_40 = lean_ctor_get(x_34, 0); +x_41 = lean_ctor_get(x_34, 1); +lean_inc(x_41); +lean_inc(x_40); +lean_dec(x_34); +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_25); +lean_dec(x_4); +x_43 = !lean_is_exclusive(x_27); +if (x_43 == 0) +{ +return x_27; +} +else +{ +lean_object* x_44; lean_object* x_45; lean_object* x_46; +x_44 = lean_ctor_get(x_27, 0); +x_45 = lean_ctor_get(x_27, 1); +lean_inc(x_45); +lean_inc(x_44); +lean_dec(x_27); +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_18); +lean_dec(x_16); +lean_dec(x_4); +lean_dec(x_3); +x_47 = !lean_is_exclusive(x_22); +if (x_47 == 0) +{ +return x_22; +} +else +{ +lean_object* x_48; lean_object* x_49; lean_object* x_50; +x_48 = lean_ctor_get(x_22, 0); +x_49 = lean_ctor_get(x_22, 1); +lean_inc(x_49); +lean_inc(x_48); +lean_dec(x_22); +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 +{ +uint8_t x_51; +lean_dec(x_16); +lean_dec(x_4); +lean_dec(x_3); +x_51 = !lean_is_exclusive(x_17); +if (x_51 == 0) +{ +return x_17; +} +else +{ +lean_object* x_52; lean_object* x_53; lean_object* x_54; +x_52 = lean_ctor_get(x_17, 0); +x_53 = lean_ctor_get(x_17, 1); +lean_inc(x_53); +lean_inc(x_52); +lean_dec(x_17); +x_54 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_54, 0, x_52); +lean_ctor_set(x_54, 1, x_53); +return x_54; +} +} +} +} +} +lean_object* l_Lean_Elab_Command_elabDefLike___lambda__2(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { +_start: +{ +lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; +x_5 = lean_ctor_get(x_1, 3); +lean_inc(x_5); +x_6 = l_Lean_Syntax_getArgs(x_5); +x_7 = lean_alloc_closure((void*)(l_Lean_Elab_Command_elabDefLike___lambda__1___boxed), 5, 2); +lean_closure_set(x_7, 0, x_1); +lean_closure_set(x_7, 1, x_5); +x_8 = l_Lean_Elab_Term_elabBinders___rarg(x_6, x_7, x_3, x_4); +lean_dec(x_6); +return x_8; +} +} +lean_object* l_Lean_Elab_Command_elabDefLike(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +_start: +{ +lean_object* x_4; lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; +x_4 = lean_ctor_get(x_1, 2); +lean_inc(x_4); +x_5 = lean_unsigned_to_nat(0u); +x_6 = l_Lean_Syntax_getIdAt(x_4, x_5); +x_7 = lean_unsigned_to_nat(1u); +x_8 = l_Lean_Syntax_getArg(x_4, x_7); +lean_inc(x_2); +x_9 = l_Lean_Elab_Command_getLevelNames(x_2, x_3); +if (lean_obj_tag(x_9) == 0) +{ +lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; uint8_t x_165; +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_165 = l_Lean_Syntax_isNone(x_8); +if (x_165 == 0) +{ +lean_object* x_166; lean_object* x_167; lean_object* x_168; lean_object* x_169; lean_object* x_170; lean_object* x_171; +x_166 = l_Lean_Syntax_getArg(x_8, x_7); +lean_dec(x_8); +x_167 = l_Lean_Syntax_getArgs(x_166); +lean_dec(x_166); +x_168 = lean_unsigned_to_nat(2u); +x_169 = l_Array_empty___closed__1; +x_170 = l_Lean_Syntax_foldArgsAuxM___main___at_Lean_Syntax_foldSepRevArgsM___spec__1(x_168, x_167, x_5, x_169); +lean_dec(x_167); +lean_inc(x_10); +x_171 = l_Array_iterateMAux___main___at_Lean_Elab_Command_elabDefLike___spec__6(x_1, x_170, x_5, x_10, x_2, x_11); +lean_dec(x_170); +if (lean_obj_tag(x_171) == 0) +{ +lean_object* x_172; lean_object* x_173; +x_172 = lean_ctor_get(x_171, 0); +lean_inc(x_172); +x_173 = lean_ctor_get(x_171, 1); +lean_inc(x_173); +lean_dec(x_171); +x_12 = x_172; +x_13 = x_173; +goto block_164; +} +else +{ +uint8_t x_174; +lean_dec(x_10); +lean_dec(x_6); +lean_dec(x_4); +lean_dec(x_2); +lean_dec(x_1); +x_174 = !lean_is_exclusive(x_171); +if (x_174 == 0) +{ +return x_171; +} +else +{ +lean_object* x_175; lean_object* x_176; lean_object* x_177; +x_175 = lean_ctor_get(x_171, 0); +x_176 = lean_ctor_get(x_171, 1); +lean_inc(x_176); +lean_inc(x_175); +lean_dec(x_171); +x_177 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_177, 0, x_175); +lean_ctor_set(x_177, 1, x_176); +return x_177; +} +} +} +else +{ +lean_dec(x_8); +lean_inc(x_10); +x_12 = x_10; +x_13 = x_11; +goto block_164; +} +block_164: +{ +if (lean_obj_tag(x_6) == 1) +{ +lean_object* x_14; lean_object* x_15; uint8_t x_16; lean_object* x_17; +x_14 = lean_ctor_get(x_6, 0); +lean_inc(x_14); +lean_dec(x_6); +x_15 = l_Lean_Parser_Command_namespace___elambda__1___closed__1; +x_16 = 1; +lean_inc(x_2); +lean_inc(x_14); +x_17 = l___private_Init_Lean_Elab_Command_10__addScopes___main(x_4, x_15, x_16, x_14, x_2, x_13); +lean_dec(x_4); +if (lean_obj_tag(x_17) == 0) +{ +lean_object* x_18; lean_object* x_19; +x_18 = lean_ctor_get(x_17, 1); +lean_inc(x_18); +lean_dec(x_17); +lean_inc(x_2); +x_19 = l_Lean_Elab_Command_modifyScope___at_Lean_Elab_Command_elabDefLike___spec__1(x_12, x_2, x_18); +if (lean_obj_tag(x_19) == 0) +{ +lean_object* x_20; lean_object* x_21; lean_object* x_22; lean_object* x_72; lean_object* x_73; lean_object* x_84; +x_20 = lean_ctor_get(x_19, 1); +lean_inc(x_20); +lean_dec(x_19); +lean_inc(x_2); +x_84 = l_Lean_Elab_Command_getCurrNamespace(x_2, x_20); +if (lean_obj_tag(x_84) == 0) +{ +lean_object* x_85; lean_object* x_86; lean_object* x_87; +x_85 = lean_ctor_get(x_84, 1); +lean_inc(x_85); +lean_dec(x_84); +x_86 = lean_alloc_closure((void*)(l_Lean_Elab_Command_elabDefLike___lambda__2___boxed), 4, 1); +lean_closure_set(x_86, 0, x_1); +lean_inc(x_2); +x_87 = l___private_Init_Lean_Elab_Command_2__getState(x_2, x_85); +if (lean_obj_tag(x_87) == 0) +{ +lean_object* x_88; lean_object* x_89; lean_object* x_90; lean_object* x_91; lean_object* x_92; lean_object* x_93; +x_88 = lean_ctor_get(x_87, 0); +lean_inc(x_88); +x_89 = lean_ctor_get(x_87, 1); +lean_inc(x_89); +lean_dec(x_87); +x_90 = l___private_Init_Lean_Elab_Command_7__getVarDecls(x_88); +x_91 = l___private_Init_Lean_Elab_Command_5__mkTermContext(x_2, x_88); +x_92 = l___private_Init_Lean_Elab_Command_6__mkTermState(x_88); +lean_dec(x_88); +x_93 = l_Lean_Elab_Term_elabBinders___rarg(x_90, x_86, x_91, x_92); +lean_dec(x_90); +if (lean_obj_tag(x_93) == 0) +{ +lean_object* x_94; lean_object* x_95; lean_object* x_96; +x_94 = lean_ctor_get(x_93, 0); +lean_inc(x_94); +x_95 = lean_ctor_get(x_93, 1); +lean_inc(x_95); +lean_dec(x_93); +lean_inc(x_2); +x_96 = l___private_Init_Lean_Elab_Command_2__getState(x_2, x_89); +if (lean_obj_tag(x_96) == 0) +{ +lean_object* x_97; lean_object* x_98; lean_object* x_99; lean_object* x_100; lean_object* x_101; uint8_t x_102; +x_97 = lean_ctor_get(x_95, 0); +lean_inc(x_97); +x_98 = lean_ctor_get(x_96, 0); +lean_inc(x_98); +x_99 = lean_ctor_get(x_96, 1); +lean_inc(x_99); +lean_dec(x_96); +x_100 = lean_ctor_get(x_97, 0); +lean_inc(x_100); +lean_dec(x_97); +x_101 = lean_ctor_get(x_95, 2); +lean_inc(x_101); +lean_dec(x_95); +x_102 = !lean_is_exclusive(x_98); +if (x_102 == 0) +{ +lean_object* x_103; lean_object* x_104; lean_object* x_105; +x_103 = lean_ctor_get(x_98, 1); +lean_dec(x_103); +x_104 = lean_ctor_get(x_98, 0); +lean_dec(x_104); +lean_ctor_set(x_98, 1, x_101); +lean_ctor_set(x_98, 0, x_100); +lean_inc(x_2); +x_105 = l___private_Init_Lean_Elab_Command_3__setState(x_98, x_2, x_99); +if (lean_obj_tag(x_105) == 0) +{ +lean_object* x_106; +x_106 = lean_ctor_get(x_105, 1); +lean_inc(x_106); +lean_dec(x_105); +x_21 = x_94; +x_22 = x_106; +goto block_71; +} +else +{ +lean_object* x_107; lean_object* x_108; +lean_dec(x_94); +lean_dec(x_14); +x_107 = lean_ctor_get(x_105, 0); +lean_inc(x_107); +x_108 = lean_ctor_get(x_105, 1); +lean_inc(x_108); +lean_dec(x_105); +x_72 = x_107; +x_73 = x_108; +goto block_83; +} +} +else +{ +lean_object* x_109; lean_object* x_110; lean_object* x_111; lean_object* x_112; +x_109 = lean_ctor_get(x_98, 2); +x_110 = lean_ctor_get(x_98, 3); +lean_inc(x_110); +lean_inc(x_109); +lean_dec(x_98); +x_111 = lean_alloc_ctor(0, 4, 0); +lean_ctor_set(x_111, 0, x_100); +lean_ctor_set(x_111, 1, x_101); +lean_ctor_set(x_111, 2, x_109); +lean_ctor_set(x_111, 3, x_110); +lean_inc(x_2); +x_112 = l___private_Init_Lean_Elab_Command_3__setState(x_111, x_2, x_99); +if (lean_obj_tag(x_112) == 0) +{ +lean_object* x_113; +x_113 = lean_ctor_get(x_112, 1); +lean_inc(x_113); +lean_dec(x_112); +x_21 = x_94; +x_22 = x_113; +goto block_71; +} +else +{ +lean_object* x_114; lean_object* x_115; +lean_dec(x_94); +lean_dec(x_14); +x_114 = lean_ctor_get(x_112, 0); +lean_inc(x_114); +x_115 = lean_ctor_get(x_112, 1); +lean_inc(x_115); +lean_dec(x_112); +x_72 = x_114; +x_73 = x_115; +goto block_83; +} +} +} +else +{ +lean_object* x_116; lean_object* x_117; +lean_dec(x_95); +lean_dec(x_94); +lean_dec(x_14); +x_116 = lean_ctor_get(x_96, 0); +lean_inc(x_116); +x_117 = lean_ctor_get(x_96, 1); +lean_inc(x_117); +lean_dec(x_96); +x_72 = x_116; +x_73 = x_117; +goto block_83; +} +} +else +{ +lean_object* x_118; +x_118 = lean_ctor_get(x_93, 0); +lean_inc(x_118); +if (lean_obj_tag(x_118) == 0) +{ +lean_object* x_119; lean_object* x_120; lean_object* x_121; +lean_dec(x_14); +x_119 = lean_ctor_get(x_93, 1); +lean_inc(x_119); +lean_dec(x_93); +x_120 = lean_ctor_get(x_118, 0); +lean_inc(x_120); +lean_dec(x_118); +lean_inc(x_2); +x_121 = l___private_Init_Lean_Elab_Command_2__getState(x_2, x_89); +if (lean_obj_tag(x_121) == 0) +{ +lean_object* x_122; lean_object* x_123; lean_object* x_124; lean_object* x_125; lean_object* x_126; uint8_t x_127; +x_122 = lean_ctor_get(x_119, 0); +lean_inc(x_122); +x_123 = lean_ctor_get(x_121, 0); +lean_inc(x_123); +x_124 = lean_ctor_get(x_121, 1); +lean_inc(x_124); +lean_dec(x_121); +x_125 = lean_ctor_get(x_122, 0); +lean_inc(x_125); +lean_dec(x_122); +x_126 = lean_ctor_get(x_119, 2); +lean_inc(x_126); +lean_dec(x_119); +x_127 = !lean_is_exclusive(x_123); +if (x_127 == 0) +{ +lean_object* x_128; lean_object* x_129; lean_object* x_130; +x_128 = lean_ctor_get(x_123, 1); +lean_dec(x_128); +x_129 = lean_ctor_get(x_123, 0); +lean_dec(x_129); +lean_ctor_set(x_123, 1, x_126); +lean_ctor_set(x_123, 0, x_125); +lean_inc(x_2); +x_130 = l___private_Init_Lean_Elab_Command_3__setState(x_123, x_2, x_124); +if (lean_obj_tag(x_130) == 0) +{ +lean_object* x_131; +x_131 = lean_ctor_get(x_130, 1); +lean_inc(x_131); +lean_dec(x_130); +x_72 = x_120; +x_73 = x_131; +goto block_83; +} +else +{ +lean_object* x_132; lean_object* x_133; +lean_dec(x_120); +x_132 = lean_ctor_get(x_130, 0); +lean_inc(x_132); +x_133 = lean_ctor_get(x_130, 1); +lean_inc(x_133); +lean_dec(x_130); +x_72 = x_132; +x_73 = x_133; +goto block_83; +} +} +else +{ +lean_object* x_134; lean_object* x_135; lean_object* x_136; lean_object* x_137; +x_134 = lean_ctor_get(x_123, 2); +x_135 = lean_ctor_get(x_123, 3); +lean_inc(x_135); +lean_inc(x_134); +lean_dec(x_123); +x_136 = lean_alloc_ctor(0, 4, 0); +lean_ctor_set(x_136, 0, x_125); +lean_ctor_set(x_136, 1, x_126); +lean_ctor_set(x_136, 2, x_134); +lean_ctor_set(x_136, 3, x_135); +lean_inc(x_2); +x_137 = l___private_Init_Lean_Elab_Command_3__setState(x_136, x_2, x_124); +if (lean_obj_tag(x_137) == 0) +{ +lean_object* x_138; +x_138 = lean_ctor_get(x_137, 1); +lean_inc(x_138); +lean_dec(x_137); +x_72 = x_120; +x_73 = x_138; +goto block_83; +} +else +{ +lean_object* x_139; lean_object* x_140; +lean_dec(x_120); +x_139 = lean_ctor_get(x_137, 0); +lean_inc(x_139); +x_140 = lean_ctor_get(x_137, 1); +lean_inc(x_140); +lean_dec(x_137); +x_72 = x_139; +x_73 = x_140; +goto block_83; +} +} +} +else +{ +lean_object* x_141; lean_object* x_142; +lean_dec(x_120); +lean_dec(x_119); +x_141 = lean_ctor_get(x_121, 0); +lean_inc(x_141); +x_142 = lean_ctor_get(x_121, 1); +lean_inc(x_142); +lean_dec(x_121); +x_72 = x_141; +x_73 = x_142; +goto block_83; +} +} +else +{ +lean_object* x_143; lean_object* x_144; lean_object* x_145; +lean_dec(x_93); +x_143 = l_Lean_Elab_Command_runTermElabM___rarg___closed__1; +x_144 = l_unreachable_x21___rarg(x_143); +lean_inc(x_2); +x_145 = lean_apply_2(x_144, x_2, x_89); +if (lean_obj_tag(x_145) == 0) +{ +lean_object* x_146; lean_object* x_147; +x_146 = lean_ctor_get(x_145, 0); +lean_inc(x_146); +x_147 = lean_ctor_get(x_145, 1); +lean_inc(x_147); +lean_dec(x_145); +x_21 = x_146; +x_22 = x_147; +goto block_71; +} +else +{ +lean_object* x_148; lean_object* x_149; +lean_dec(x_14); +x_148 = lean_ctor_get(x_145, 0); +lean_inc(x_148); +x_149 = lean_ctor_get(x_145, 1); +lean_inc(x_149); +lean_dec(x_145); +x_72 = x_148; +x_73 = x_149; +goto block_83; +} +} +} +} +else +{ +lean_object* x_150; lean_object* x_151; +lean_dec(x_86); +lean_dec(x_14); +x_150 = lean_ctor_get(x_87, 0); +lean_inc(x_150); +x_151 = lean_ctor_get(x_87, 1); +lean_inc(x_151); +lean_dec(x_87); +x_72 = x_150; +x_73 = x_151; +goto block_83; +} +} +else +{ +lean_object* x_152; lean_object* x_153; +lean_dec(x_14); +lean_dec(x_1); +x_152 = lean_ctor_get(x_84, 0); +lean_inc(x_152); +x_153 = lean_ctor_get(x_84, 1); +lean_inc(x_153); +lean_dec(x_84); +x_72 = x_152; +x_73 = x_153; +goto block_83; +} +block_71: +{ +lean_object* x_23; +lean_inc(x_2); +lean_inc(x_10); +x_23 = l_Lean_Elab_Command_modifyScope___at_Lean_Elab_Command_elabDefLike___spec__2(x_10, x_2, x_22); +if (lean_obj_tag(x_23) == 0) +{ +lean_object* x_24; lean_object* x_25; +lean_dec(x_10); +x_24 = lean_ctor_get(x_23, 1); +lean_inc(x_24); +lean_dec(x_23); +lean_inc(x_2); +x_25 = l___private_Init_Lean_Elab_Command_2__getState(x_2, x_24); +if (lean_obj_tag(x_25) == 0) +{ +lean_object* x_26; lean_object* x_27; uint8_t x_28; +x_26 = lean_ctor_get(x_25, 0); +lean_inc(x_26); +x_27 = lean_ctor_get(x_25, 1); +lean_inc(x_27); +lean_dec(x_25); +x_28 = !lean_is_exclusive(x_26); +if (x_28 == 0) +{ +lean_object* x_29; lean_object* x_30; lean_object* x_31; lean_object* x_32; +x_29 = lean_ctor_get(x_26, 2); +x_30 = l_Lean_Name_getNumParts___main(x_14); +lean_dec(x_14); +x_31 = l_List_drop___main___rarg(x_30, x_29); +lean_dec(x_29); +lean_ctor_set(x_26, 2, x_31); +x_32 = l___private_Init_Lean_Elab_Command_3__setState(x_26, x_2, x_27); +if (lean_obj_tag(x_32) == 0) +{ +uint8_t x_33; +x_33 = !lean_is_exclusive(x_32); +if (x_33 == 0) +{ +lean_object* x_34; +x_34 = lean_ctor_get(x_32, 0); +lean_dec(x_34); +lean_ctor_set(x_32, 0, x_21); +return x_32; +} +else +{ +lean_object* x_35; lean_object* x_36; +x_35 = lean_ctor_get(x_32, 1); +lean_inc(x_35); +lean_dec(x_32); +x_36 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_36, 0, x_21); +lean_ctor_set(x_36, 1, x_35); +return x_36; +} +} +else +{ +uint8_t x_37; +lean_dec(x_21); +x_37 = !lean_is_exclusive(x_32); +if (x_37 == 0) +{ +return x_32; +} +else +{ +lean_object* x_38; lean_object* x_39; lean_object* x_40; +x_38 = lean_ctor_get(x_32, 0); +x_39 = lean_ctor_get(x_32, 1); +lean_inc(x_39); +lean_inc(x_38); +lean_dec(x_32); +x_40 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_40, 0, x_38); +lean_ctor_set(x_40, 1, x_39); +return x_40; +} +} +} +else +{ +lean_object* x_41; lean_object* x_42; lean_object* x_43; lean_object* x_44; lean_object* x_45; lean_object* x_46; lean_object* x_47; lean_object* x_48; +x_41 = lean_ctor_get(x_26, 0); +x_42 = lean_ctor_get(x_26, 1); +x_43 = lean_ctor_get(x_26, 2); +x_44 = lean_ctor_get(x_26, 3); +lean_inc(x_44); +lean_inc(x_43); +lean_inc(x_42); +lean_inc(x_41); +lean_dec(x_26); +x_45 = l_Lean_Name_getNumParts___main(x_14); +lean_dec(x_14); +x_46 = l_List_drop___main___rarg(x_45, x_43); +lean_dec(x_43); +x_47 = lean_alloc_ctor(0, 4, 0); +lean_ctor_set(x_47, 0, x_41); +lean_ctor_set(x_47, 1, x_42); +lean_ctor_set(x_47, 2, x_46); +lean_ctor_set(x_47, 3, x_44); +x_48 = l___private_Init_Lean_Elab_Command_3__setState(x_47, x_2, x_27); +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, 1); +lean_inc(x_49); +if (lean_is_exclusive(x_48)) { + lean_ctor_release(x_48, 0); + lean_ctor_release(x_48, 1); + x_50 = x_48; +} else { + lean_dec_ref(x_48); + x_50 = lean_box(0); +} +if (lean_is_scalar(x_50)) { + x_51 = lean_alloc_ctor(0, 2, 0); +} else { + x_51 = x_50; +} +lean_ctor_set(x_51, 0, x_21); +lean_ctor_set(x_51, 1, x_49); +return x_51; +} +else +{ +lean_object* x_52; lean_object* x_53; lean_object* x_54; lean_object* x_55; +lean_dec(x_21); +x_52 = lean_ctor_get(x_48, 0); +lean_inc(x_52); +x_53 = lean_ctor_get(x_48, 1); +lean_inc(x_53); +if (lean_is_exclusive(x_48)) { + lean_ctor_release(x_48, 0); + lean_ctor_release(x_48, 1); + x_54 = x_48; +} else { + lean_dec_ref(x_48); + x_54 = lean_box(0); +} +if (lean_is_scalar(x_54)) { + x_55 = lean_alloc_ctor(1, 2, 0); +} else { + x_55 = x_54; +} +lean_ctor_set(x_55, 0, x_52); +lean_ctor_set(x_55, 1, x_53); +return x_55; +} +} +} +else +{ +uint8_t x_56; +lean_dec(x_21); +lean_dec(x_14); +lean_dec(x_2); +x_56 = !lean_is_exclusive(x_25); +if (x_56 == 0) +{ +return x_25; +} +else +{ +lean_object* x_57; lean_object* x_58; lean_object* x_59; +x_57 = lean_ctor_get(x_25, 0); +x_58 = lean_ctor_get(x_25, 1); +lean_inc(x_58); +lean_inc(x_57); +lean_dec(x_25); +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_dec(x_21); +lean_dec(x_14); +x_60 = lean_ctor_get(x_23, 0); +lean_inc(x_60); +x_61 = lean_ctor_get(x_23, 1); +lean_inc(x_61); +lean_dec(x_23); +x_62 = l_Lean_Elab_Command_modifyScope___at_Lean_Elab_Command_elabDefLike___spec__3(x_10, x_2, x_61); +if (lean_obj_tag(x_62) == 0) +{ +uint8_t x_63; +x_63 = !lean_is_exclusive(x_62); +if (x_63 == 0) +{ +lean_object* x_64; +x_64 = lean_ctor_get(x_62, 0); +lean_dec(x_64); +lean_ctor_set_tag(x_62, 1); +lean_ctor_set(x_62, 0, x_60); +return x_62; +} +else +{ +lean_object* x_65; lean_object* x_66; +x_65 = lean_ctor_get(x_62, 1); +lean_inc(x_65); +lean_dec(x_62); +x_66 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_66, 0, x_60); +lean_ctor_set(x_66, 1, x_65); +return x_66; +} +} +else +{ +uint8_t x_67; +lean_dec(x_60); +x_67 = !lean_is_exclusive(x_62); +if (x_67 == 0) +{ +return x_62; +} +else +{ +lean_object* x_68; lean_object* x_69; lean_object* x_70; +x_68 = lean_ctor_get(x_62, 0); +x_69 = lean_ctor_get(x_62, 1); +lean_inc(x_69); +lean_inc(x_68); +lean_dec(x_62); +x_70 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_70, 0, x_68); +lean_ctor_set(x_70, 1, x_69); +return x_70; +} +} +} +} +block_83: +{ +lean_object* x_74; +x_74 = l_Lean_Elab_Command_modifyScope___at_Lean_Elab_Command_elabDefLike___spec__4(x_10, x_2, x_73); +if (lean_obj_tag(x_74) == 0) +{ +uint8_t x_75; +x_75 = !lean_is_exclusive(x_74); +if (x_75 == 0) +{ +lean_object* x_76; +x_76 = lean_ctor_get(x_74, 0); +lean_dec(x_76); +lean_ctor_set_tag(x_74, 1); +lean_ctor_set(x_74, 0, x_72); +return x_74; +} +else +{ +lean_object* x_77; lean_object* x_78; +x_77 = lean_ctor_get(x_74, 1); +lean_inc(x_77); +lean_dec(x_74); +x_78 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_78, 0, x_72); +lean_ctor_set(x_78, 1, x_77); +return x_78; +} +} +else +{ +uint8_t x_79; +lean_dec(x_72); +x_79 = !lean_is_exclusive(x_74); +if (x_79 == 0) +{ +return x_74; +} +else +{ +lean_object* x_80; lean_object* x_81; lean_object* x_82; +x_80 = lean_ctor_get(x_74, 0); +x_81 = lean_ctor_get(x_74, 1); +lean_inc(x_81); +lean_inc(x_80); +lean_dec(x_74); +x_82 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_82, 0, x_80); +lean_ctor_set(x_82, 1, x_81); +return x_82; +} +} +} +} +else +{ +uint8_t x_154; +lean_dec(x_14); +lean_dec(x_10); +lean_dec(x_2); +lean_dec(x_1); +x_154 = !lean_is_exclusive(x_19); +if (x_154 == 0) +{ +return x_19; +} +else +{ +lean_object* x_155; lean_object* x_156; lean_object* x_157; +x_155 = lean_ctor_get(x_19, 0); +x_156 = lean_ctor_get(x_19, 1); +lean_inc(x_156); +lean_inc(x_155); +lean_dec(x_19); +x_157 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_157, 0, x_155); +lean_ctor_set(x_157, 1, x_156); +return x_157; +} +} +} +else +{ +uint8_t x_158; +lean_dec(x_14); +lean_dec(x_12); +lean_dec(x_10); +lean_dec(x_2); +lean_dec(x_1); +x_158 = !lean_is_exclusive(x_17); +if (x_158 == 0) +{ +return x_17; +} +else +{ +lean_object* x_159; lean_object* x_160; lean_object* x_161; +x_159 = lean_ctor_get(x_17, 0); +x_160 = lean_ctor_get(x_17, 1); +lean_inc(x_160); +lean_inc(x_159); +lean_dec(x_17); +x_161 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_161, 0, x_159); +lean_ctor_set(x_161, 1, x_160); +return x_161; +} +} +} +else +{ +lean_object* x_162; lean_object* x_163; +lean_dec(x_12); +lean_dec(x_10); +lean_dec(x_6); +lean_dec(x_1); +x_162 = l_Lean_Elab_Command_withDeclId___closed__3; +x_163 = l_Lean_Elab_throwError___at_Lean_Elab_Command_elabCommand___spec__1(x_4, x_162, x_2, x_13); +lean_dec(x_2); +lean_dec(x_4); +return x_163; +} +} +} +else +{ +uint8_t x_178; +lean_dec(x_8); +lean_dec(x_6); +lean_dec(x_4); +lean_dec(x_2); +lean_dec(x_1); +x_178 = !lean_is_exclusive(x_9); +if (x_178 == 0) +{ +return x_9; +} +else +{ +lean_object* x_179; lean_object* x_180; lean_object* x_181; +x_179 = lean_ctor_get(x_9, 0); +x_180 = lean_ctor_get(x_9, 1); +lean_inc(x_180); +lean_inc(x_179); +lean_dec(x_9); +x_181 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_181, 0, x_179); +lean_ctor_set(x_181, 1, x_180); +return x_181; +} +} +} +} +lean_object* l_Array_iterateMAux___main___at_Lean_Elab_Command_elabDefLike___spec__6___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6) { +_start: +{ +lean_object* x_7; +x_7 = l_Array_iterateMAux___main___at_Lean_Elab_Command_elabDefLike___spec__6(x_1, x_2, x_3, x_4, x_5, x_6); +lean_dec(x_5); +lean_dec(x_2); +lean_dec(x_1); +return x_7; +} +} +lean_object* l_Lean_Elab_Command_elabDefLike___lambda__1___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) { +_start: +{ +lean_object* x_6; +x_6 = l_Lean_Elab_Command_elabDefLike___lambda__1(x_1, x_2, x_3, x_4, x_5); +lean_dec(x_2); +return x_6; +} +} +lean_object* l_Lean_Elab_Command_elabDefLike___lambda__2___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { +_start: +{ +lean_object* x_5; +x_5 = l_Lean_Elab_Command_elabDefLike___lambda__2(x_1, x_2, x_3, x_4); +lean_dec(x_2); +return x_5; +} +} +lean_object* initialize_Init_Lean_Elab_DeclModifiers(lean_object*); +static bool _G_initialized = false; +lean_object* initialize_Init_Lean_Elab_Definition(lean_object* w) { +lean_object * res; +if (_G_initialized) return lean_mk_io_result(lean_box(0)); +_G_initialized = true; +res = initialize_Init_Lean_Elab_DeclModifiers(lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +l_Lean_Elab_Command_elabDefLike___lambda__1___closed__1 = _init_l_Lean_Elab_Command_elabDefLike___lambda__1___closed__1(); +lean_mark_persistent(l_Lean_Elab_Command_elabDefLike___lambda__1___closed__1); +return lean_mk_io_result(lean_box(0)); +} +#ifdef __cplusplus +} +#endif diff --git a/stage0/stdlib/Init/Lean/Elab/ElabStrategyAttrs.c b/stage0/stdlib/Init/Lean/Elab/ElabStrategyAttrs.c index 2fc1806dab..7cc8bf8012 100644 --- a/stage0/stdlib/Init/Lean/Elab/ElabStrategyAttrs.c +++ b/stage0/stdlib/Init/Lean/Elab/ElabStrategyAttrs.c @@ -72,6 +72,7 @@ lean_object* l_Array_binSearchAux___main___at_Lean_getElaboratorStrategy___spec_ lean_object* l_Lean_mkElaboratorStrategyAttrs___closed__6; lean_object* l_RBNode_find___main___at_Lean_getElaboratorStrategy___spec__2(lean_object*, lean_object*); lean_object* l_Lean_PersistentEnvExtension_addEntry___rarg(lean_object*, lean_object*, lean_object*); +extern lean_object* l_Lean_registerTagAttribute___lambda__4___closed__2; lean_object* l_Lean_registerEnumAttributes___at_Lean_mkElaboratorStrategyAttrs___spec__1___lambda__2(lean_object*); uint8_t l_Array_anyRangeMAux___main___at_Lean_mkElaboratorStrategyAttrs___spec__6(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); extern lean_object* l_Lean_registerPersistentEnvExtensionUnsafe___rarg___closed__3; @@ -81,7 +82,6 @@ lean_object* l_Array_qsortAux___main___at_Lean_mkElaboratorStrategyAttrs___spec_ lean_object* l_Lean_registerTagAttribute___lambda__6___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_mkElaboratorStrategyAttrs___closed__16; uint8_t lean_nat_dec_le(lean_object*, lean_object*); -extern lean_object* l_Lean_registerTagAttribute___lambda__4___closed__5; lean_object* l_Lean_registerTagAttribute___lambda__5___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); extern lean_object* l_Lean_registerEnumAttributes___rarg___closed__1; extern lean_object* l_Lean_registerPersistentEnvExtensionUnsafe___rarg___closed__4; @@ -1132,7 +1132,7 @@ x_11 = l_Lean_Name_toStringWithSep___main(x_10, x_1); x_12 = l_Lean_registerTagAttribute___lambda__4___closed__1; x_13 = lean_string_append(x_12, x_11); lean_dec(x_11); -x_14 = l_Lean_registerTagAttribute___lambda__4___closed__3; +x_14 = l_Lean_registerTagAttribute___lambda__4___closed__2; x_15 = lean_string_append(x_13, x_14); x_16 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_16, 0, x_15); @@ -1164,7 +1164,7 @@ x_22 = l_Lean_Name_toStringWithSep___main(x_21, x_1); x_23 = l_Lean_registerTagAttribute___lambda__4___closed__1; x_24 = lean_string_append(x_23, x_22); lean_dec(x_22); -x_25 = l_Lean_registerTagAttribute___lambda__4___closed__4; +x_25 = l_Lean_registerTagAttribute___lambda__4___closed__3; x_26 = lean_string_append(x_24, x_25); x_27 = lean_string_append(x_26, x_20); lean_dec(x_20); @@ -1202,7 +1202,7 @@ x_34 = l_Lean_Name_toStringWithSep___main(x_33, x_1); x_35 = l_Lean_registerTagAttribute___lambda__4___closed__1; x_36 = lean_string_append(x_35, x_34); lean_dec(x_34); -x_37 = l_Lean_registerTagAttribute___lambda__4___closed__5; +x_37 = l_Lean_registerTagAttribute___lambda__4___closed__4; x_38 = lean_string_append(x_36, x_37); x_39 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_39, 0, x_38); diff --git a/stage0/stdlib/Init/Lean/Elab/Frontend.c b/stage0/stdlib/Init/Lean/Elab/Frontend.c index 8462acf6a7..121a143396 100644 --- a/stage0/stdlib/Init/Lean/Elab/Frontend.c +++ b/stage0/stdlib/Init/Lean/Elab/Frontend.c @@ -24,7 +24,6 @@ lean_object* l_Lean_Elab_IO_processCommands(lean_object*, lean_object*, lean_obj lean_object* l_Lean_Elab_Frontend_liftIOCore_x21(lean_object*); lean_object* lean_io_mk_ref(lean_object*, lean_object*); lean_object* lean_io_ref_get(lean_object*, lean_object*); -extern lean_object* l_IO_Error_Inhabited; lean_object* l_Lean_Elab_Frontend_runCommandElabM___closed__1; lean_object* l_Lean_Elab_Frontend_runCommandElabM(lean_object*, lean_object*, lean_object*); lean_object* l_PersistentArray_push___rarg(lean_object*, lean_object*); @@ -139,7 +138,7 @@ x_4 = lean_ctor_get(x_2, 2); x_5 = lean_io_ref_get(x_4, x_3); if (lean_obj_tag(x_5) == 0) { -lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; +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; x_6 = lean_ctor_get(x_5, 0); lean_inc(x_6); x_7 = lean_ctor_get(x_5, 1); @@ -149,166 +148,170 @@ x_8 = lean_ctor_get(x_2, 3); x_9 = lean_ctor_get(x_8, 1); x_10 = lean_ctor_get(x_8, 2); x_11 = lean_ctor_get(x_2, 0); +x_12 = lean_unsigned_to_nat(0u); lean_inc(x_11); lean_inc(x_10); lean_inc(x_9); -x_12 = lean_alloc_ctor(0, 4, 0); -lean_ctor_set(x_12, 0, x_9); -lean_ctor_set(x_12, 1, x_10); -lean_ctor_set(x_12, 2, x_11); -lean_ctor_set(x_12, 3, x_6); -x_13 = lean_apply_2(x_1, x_12, x_7); -if (lean_obj_tag(x_13) == 0) +x_13 = lean_alloc_ctor(0, 5, 0); +lean_ctor_set(x_13, 0, x_9); +lean_ctor_set(x_13, 1, x_10); +lean_ctor_set(x_13, 2, x_11); +lean_ctor_set(x_13, 3, x_6); +lean_ctor_set(x_13, 4, x_12); +x_14 = lean_apply_2(x_1, x_13, x_7); +if (lean_obj_tag(x_14) == 0) { -uint8_t x_14; -x_14 = !lean_is_exclusive(x_13); -if (x_14 == 0) +uint8_t x_15; +x_15 = !lean_is_exclusive(x_14); +if (x_15 == 0) { -return x_13; +return x_14; } else { -lean_object* x_15; lean_object* x_16; lean_object* x_17; -x_15 = lean_ctor_get(x_13, 0); -x_16 = lean_ctor_get(x_13, 1); +lean_object* x_16; lean_object* x_17; lean_object* x_18; +x_16 = lean_ctor_get(x_14, 0); +x_17 = lean_ctor_get(x_14, 1); +lean_inc(x_17); lean_inc(x_16); -lean_inc(x_15); -lean_dec(x_13); -x_17 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_17, 0, x_15); -lean_ctor_set(x_17, 1, x_16); -return x_17; +lean_dec(x_14); +x_18 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_18, 0, x_16); +lean_ctor_set(x_18, 1, x_17); +return x_18; } } else { -uint8_t x_18; -x_18 = !lean_is_exclusive(x_13); -if (x_18 == 0) +uint8_t x_19; +x_19 = !lean_is_exclusive(x_14); +if (x_19 == 0) { -lean_object* x_19; lean_object* x_20; -x_19 = lean_ctor_get(x_13, 0); -lean_dec(x_19); -x_20 = lean_box(0); -lean_ctor_set_tag(x_13, 0); -lean_ctor_set(x_13, 0, x_20); -return x_13; +lean_object* x_20; lean_object* x_21; +x_20 = lean_ctor_get(x_14, 0); +lean_dec(x_20); +x_21 = lean_box(0); +lean_ctor_set_tag(x_14, 0); +lean_ctor_set(x_14, 0, x_21); +return x_14; } else { -lean_object* x_21; lean_object* x_22; lean_object* x_23; -x_21 = lean_ctor_get(x_13, 1); -lean_inc(x_21); -lean_dec(x_13); -x_22 = lean_box(0); -x_23 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_23, 0, x_22); -lean_ctor_set(x_23, 1, x_21); -return x_23; +lean_object* x_22; lean_object* x_23; lean_object* x_24; +x_22 = lean_ctor_get(x_14, 1); +lean_inc(x_22); +lean_dec(x_14); +x_23 = lean_box(0); +x_24 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_24, 0, x_23); +lean_ctor_set(x_24, 1, x_22); +return x_24; } } } else { -lean_object* x_24; lean_object* x_25; lean_object* x_26; lean_object* x_27; -x_24 = lean_ctor_get(x_5, 1); -lean_inc(x_24); +lean_object* x_25; lean_object* x_26; lean_object* x_27; lean_object* x_28; +x_25 = lean_ctor_get(x_5, 1); +lean_inc(x_25); lean_dec(x_5); -x_25 = l_Lean_Elab_Frontend_runCommandElabM___closed__1; -x_26 = l_unreachable_x21___rarg(x_25); -x_27 = lean_apply_1(x_26, x_24); -if (lean_obj_tag(x_27) == 0) +x_26 = l_Lean_Elab_Frontend_runCommandElabM___closed__1; +x_27 = l_unreachable_x21___rarg(x_26); +x_28 = lean_apply_1(x_27, x_25); +if (lean_obj_tag(x_28) == 0) { -lean_object* x_28; lean_object* x_29; lean_object* x_30; lean_object* x_31; lean_object* x_32; lean_object* x_33; lean_object* x_34; lean_object* x_35; -x_28 = lean_ctor_get(x_27, 0); -lean_inc(x_28); -x_29 = lean_ctor_get(x_27, 1); +lean_object* x_29; lean_object* x_30; lean_object* x_31; lean_object* x_32; lean_object* x_33; lean_object* x_34; lean_object* x_35; lean_object* x_36; lean_object* x_37; +x_29 = lean_ctor_get(x_28, 0); lean_inc(x_29); -lean_dec(x_27); -x_30 = lean_ctor_get(x_2, 3); -x_31 = lean_ctor_get(x_30, 1); -x_32 = lean_ctor_get(x_30, 2); -x_33 = lean_ctor_get(x_2, 0); +x_30 = lean_ctor_get(x_28, 1); +lean_inc(x_30); +lean_dec(x_28); +x_31 = lean_ctor_get(x_2, 3); +x_32 = lean_ctor_get(x_31, 1); +x_33 = lean_ctor_get(x_31, 2); +x_34 = lean_ctor_get(x_2, 0); +x_35 = lean_unsigned_to_nat(0u); +lean_inc(x_34); lean_inc(x_33); lean_inc(x_32); -lean_inc(x_31); -x_34 = lean_alloc_ctor(0, 4, 0); -lean_ctor_set(x_34, 0, x_31); -lean_ctor_set(x_34, 1, x_32); -lean_ctor_set(x_34, 2, x_33); -lean_ctor_set(x_34, 3, x_28); -x_35 = lean_apply_2(x_1, x_34, x_29); -if (lean_obj_tag(x_35) == 0) +x_36 = lean_alloc_ctor(0, 5, 0); +lean_ctor_set(x_36, 0, x_32); +lean_ctor_set(x_36, 1, x_33); +lean_ctor_set(x_36, 2, x_34); +lean_ctor_set(x_36, 3, x_29); +lean_ctor_set(x_36, 4, x_35); +x_37 = lean_apply_2(x_1, x_36, x_30); +if (lean_obj_tag(x_37) == 0) { -uint8_t x_36; -x_36 = !lean_is_exclusive(x_35); -if (x_36 == 0) +uint8_t x_38; +x_38 = !lean_is_exclusive(x_37); +if (x_38 == 0) { -return x_35; +return x_37; } else { -lean_object* x_37; lean_object* x_38; lean_object* x_39; -x_37 = lean_ctor_get(x_35, 0); -x_38 = lean_ctor_get(x_35, 1); -lean_inc(x_38); -lean_inc(x_37); -lean_dec(x_35); -x_39 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_39, 0, x_37); -lean_ctor_set(x_39, 1, x_38); -return x_39; +lean_object* x_39; lean_object* x_40; lean_object* x_41; +x_39 = lean_ctor_get(x_37, 0); +x_40 = lean_ctor_get(x_37, 1); +lean_inc(x_40); +lean_inc(x_39); +lean_dec(x_37); +x_41 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_41, 0, x_39); +lean_ctor_set(x_41, 1, x_40); +return x_41; } } else { -uint8_t x_40; -x_40 = !lean_is_exclusive(x_35); -if (x_40 == 0) +uint8_t x_42; +x_42 = !lean_is_exclusive(x_37); +if (x_42 == 0) { -lean_object* x_41; lean_object* x_42; -x_41 = lean_ctor_get(x_35, 0); -lean_dec(x_41); -x_42 = lean_box(0); -lean_ctor_set_tag(x_35, 0); -lean_ctor_set(x_35, 0, x_42); -return x_35; -} -else -{ -lean_object* x_43; lean_object* x_44; lean_object* x_45; -x_43 = lean_ctor_get(x_35, 1); -lean_inc(x_43); -lean_dec(x_35); +lean_object* x_43; lean_object* x_44; +x_43 = lean_ctor_get(x_37, 0); +lean_dec(x_43); x_44 = lean_box(0); -x_45 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_45, 0, x_44); -lean_ctor_set(x_45, 1, x_43); -return x_45; +lean_ctor_set_tag(x_37, 0); +lean_ctor_set(x_37, 0, x_44); +return x_37; +} +else +{ +lean_object* x_45; lean_object* x_46; lean_object* x_47; +x_45 = lean_ctor_get(x_37, 1); +lean_inc(x_45); +lean_dec(x_37); +x_46 = lean_box(0); +x_47 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_47, 0, x_46); +lean_ctor_set(x_47, 1, x_45); +return x_47; } } } else { -uint8_t x_46; +uint8_t x_48; lean_dec(x_1); -x_46 = !lean_is_exclusive(x_27); -if (x_46 == 0) +x_48 = !lean_is_exclusive(x_28); +if (x_48 == 0) { -return x_27; +return x_28; } else { -lean_object* x_47; lean_object* x_48; lean_object* x_49; -x_47 = lean_ctor_get(x_27, 0); -x_48 = lean_ctor_get(x_27, 1); -lean_inc(x_48); -lean_inc(x_47); -lean_dec(x_27); -x_49 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_49, 0, x_47); -lean_ctor_set(x_49, 1, x_48); -return x_49; +lean_object* x_49; lean_object* x_50; lean_object* x_51; +x_49 = lean_ctor_get(x_28, 0); +x_50 = lean_ctor_get(x_28, 1); +lean_inc(x_50); +lean_inc(x_49); +lean_dec(x_28); +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; } } } @@ -331,7 +334,7 @@ x_4 = lean_ctor_get(x_2, 2); x_5 = lean_io_ref_get(x_4, x_3); if (lean_obj_tag(x_5) == 0) { -lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; +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; x_6 = lean_ctor_get(x_5, 0); lean_inc(x_6); x_7 = lean_ctor_get(x_5, 1); @@ -341,399 +344,386 @@ x_8 = lean_ctor_get(x_2, 3); x_9 = lean_ctor_get(x_8, 1); x_10 = lean_ctor_get(x_8, 2); x_11 = lean_ctor_get(x_2, 0); +x_12 = lean_unsigned_to_nat(0u); lean_inc(x_11); lean_inc(x_10); lean_inc(x_9); -x_12 = lean_alloc_ctor(0, 4, 0); -lean_ctor_set(x_12, 0, x_9); -lean_ctor_set(x_12, 1, x_10); -lean_ctor_set(x_12, 2, x_11); -lean_ctor_set(x_12, 3, x_6); -lean_inc(x_12); -x_13 = l_Lean_Elab_Command_elabCommand(x_1, x_12, x_7); -if (lean_obj_tag(x_13) == 0) +x_13 = lean_alloc_ctor(0, 5, 0); +lean_ctor_set(x_13, 0, x_9); +lean_ctor_set(x_13, 1, x_10); +lean_ctor_set(x_13, 2, x_11); +lean_ctor_set(x_13, 3, x_6); +lean_ctor_set(x_13, 4, x_12); +lean_inc(x_13); +x_14 = l_Lean_Elab_Command_elabCommand(x_1, x_13, x_7); +if (lean_obj_tag(x_14) == 0) { -uint8_t x_14; -lean_dec(x_12); -x_14 = !lean_is_exclusive(x_13); -if (x_14 == 0) +uint8_t x_15; +lean_dec(x_13); +x_15 = !lean_is_exclusive(x_14); +if (x_15 == 0) { -return x_13; +return x_14; } else { -lean_object* x_15; lean_object* x_16; lean_object* x_17; -x_15 = lean_ctor_get(x_13, 0); -x_16 = lean_ctor_get(x_13, 1); +lean_object* x_16; lean_object* x_17; lean_object* x_18; +x_16 = lean_ctor_get(x_14, 0); +x_17 = lean_ctor_get(x_14, 1); +lean_inc(x_17); lean_inc(x_16); -lean_inc(x_15); -lean_dec(x_13); -x_17 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_17, 0, x_15); -lean_ctor_set(x_17, 1, x_16); -return x_17; +lean_dec(x_14); +x_18 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_18, 0, x_16); +lean_ctor_set(x_18, 1, x_17); +return x_18; } } else { -lean_object* x_18; lean_object* x_19; lean_object* x_20; -x_18 = lean_ctor_get(x_13, 0); -lean_inc(x_18); -x_19 = lean_ctor_get(x_13, 1); +lean_object* x_19; lean_object* x_20; lean_object* x_21; +x_19 = lean_ctor_get(x_14, 0); lean_inc(x_19); -lean_dec(x_13); -lean_inc(x_12); -x_20 = l___private_Init_Lean_Elab_Command_2__getState(x_12, x_19); -if (lean_obj_tag(x_20) == 0) +x_20 = lean_ctor_get(x_14, 1); +lean_inc(x_20); +lean_dec(x_14); +lean_inc(x_13); +x_21 = l___private_Init_Lean_Elab_Command_2__getState(x_13, x_20); +if (lean_obj_tag(x_21) == 0) { -lean_object* x_21; lean_object* x_22; uint8_t x_23; -x_21 = lean_ctor_get(x_20, 0); -lean_inc(x_21); -x_22 = lean_ctor_get(x_20, 1); +lean_object* x_22; lean_object* x_23; uint8_t x_24; +x_22 = lean_ctor_get(x_21, 0); lean_inc(x_22); -lean_dec(x_20); -x_23 = !lean_is_exclusive(x_21); -if (x_23 == 0) +x_23 = lean_ctor_get(x_21, 1); +lean_inc(x_23); +lean_dec(x_21); +x_24 = !lean_is_exclusive(x_22); +if (x_24 == 0) { -lean_object* x_24; lean_object* x_25; lean_object* x_26; -x_24 = lean_ctor_get(x_21, 1); -x_25 = l_PersistentArray_push___rarg(x_24, x_18); -lean_ctor_set(x_21, 1, x_25); -x_26 = l___private_Init_Lean_Elab_Command_3__setState(x_21, x_12, x_22); -if (lean_obj_tag(x_26) == 0) +lean_object* x_25; lean_object* x_26; lean_object* x_27; +x_25 = lean_ctor_get(x_22, 1); +x_26 = l_PersistentArray_push___rarg(x_25, x_19); +lean_ctor_set(x_22, 1, x_26); +x_27 = l___private_Init_Lean_Elab_Command_3__setState(x_22, x_13, x_23); +if (lean_obj_tag(x_27) == 0) { -uint8_t x_27; -x_27 = !lean_is_exclusive(x_26); -if (x_27 == 0) +uint8_t x_28; +x_28 = !lean_is_exclusive(x_27); +if (x_28 == 0) { -lean_object* x_28; lean_object* x_29; -x_28 = lean_ctor_get(x_26, 0); -lean_dec(x_28); -x_29 = lean_box(0); -lean_ctor_set(x_26, 0, x_29); -return x_26; +lean_object* x_29; lean_object* x_30; +x_29 = lean_ctor_get(x_27, 0); +lean_dec(x_29); +x_30 = lean_box(0); +lean_ctor_set(x_27, 0, x_30); +return x_27; } else { -lean_object* x_30; lean_object* x_31; lean_object* x_32; -x_30 = lean_ctor_get(x_26, 1); -lean_inc(x_30); -lean_dec(x_26); -x_31 = lean_box(0); -x_32 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_32, 0, x_31); -lean_ctor_set(x_32, 1, x_30); -return x_32; +lean_object* x_31; lean_object* x_32; lean_object* x_33; +x_31 = lean_ctor_get(x_27, 1); +lean_inc(x_31); +lean_dec(x_27); +x_32 = lean_box(0); +x_33 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_33, 0, x_32); +lean_ctor_set(x_33, 1, x_31); +return x_33; } } else { -uint8_t x_33; -x_33 = !lean_is_exclusive(x_26); -if (x_33 == 0) +uint8_t x_34; +x_34 = !lean_is_exclusive(x_27); +if (x_34 == 0) { -lean_object* x_34; lean_object* x_35; -x_34 = lean_ctor_get(x_26, 0); -lean_dec(x_34); -x_35 = lean_box(0); -lean_ctor_set_tag(x_26, 0); -lean_ctor_set(x_26, 0, x_35); -return x_26; +lean_object* x_35; lean_object* x_36; +x_35 = lean_ctor_get(x_27, 0); +lean_dec(x_35); +x_36 = lean_box(0); +lean_ctor_set_tag(x_27, 0); +lean_ctor_set(x_27, 0, x_36); +return x_27; } else { -lean_object* x_36; lean_object* x_37; lean_object* x_38; -x_36 = lean_ctor_get(x_26, 1); -lean_inc(x_36); -lean_dec(x_26); -x_37 = lean_box(0); -x_38 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_38, 0, x_37); -lean_ctor_set(x_38, 1, x_36); -return x_38; +lean_object* x_37; lean_object* x_38; lean_object* x_39; +x_37 = lean_ctor_get(x_27, 1); +lean_inc(x_37); +lean_dec(x_27); +x_38 = lean_box(0); +x_39 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_39, 0, x_38); +lean_ctor_set(x_39, 1, x_37); +return x_39; } } } else { -lean_object* x_39; lean_object* x_40; lean_object* x_41; lean_object* x_42; lean_object* x_43; lean_object* x_44; -x_39 = lean_ctor_get(x_21, 0); -x_40 = lean_ctor_get(x_21, 1); -x_41 = lean_ctor_get(x_21, 2); +lean_object* x_40; lean_object* x_41; lean_object* x_42; lean_object* x_43; lean_object* x_44; lean_object* x_45; lean_object* x_46; +x_40 = lean_ctor_get(x_22, 0); +x_41 = lean_ctor_get(x_22, 1); +x_42 = lean_ctor_get(x_22, 2); +x_43 = lean_ctor_get(x_22, 3); +lean_inc(x_43); +lean_inc(x_42); lean_inc(x_41); lean_inc(x_40); -lean_inc(x_39); -lean_dec(x_21); -x_42 = l_PersistentArray_push___rarg(x_40, x_18); -x_43 = lean_alloc_ctor(0, 3, 0); -lean_ctor_set(x_43, 0, x_39); -lean_ctor_set(x_43, 1, x_42); -lean_ctor_set(x_43, 2, x_41); -x_44 = l___private_Init_Lean_Elab_Command_3__setState(x_43, x_12, x_22); -if (lean_obj_tag(x_44) == 0) +lean_dec(x_22); +x_44 = l_PersistentArray_push___rarg(x_41, x_19); +x_45 = lean_alloc_ctor(0, 4, 0); +lean_ctor_set(x_45, 0, x_40); +lean_ctor_set(x_45, 1, x_44); +lean_ctor_set(x_45, 2, x_42); +lean_ctor_set(x_45, 3, x_43); +x_46 = l___private_Init_Lean_Elab_Command_3__setState(x_45, x_13, x_23); +if (lean_obj_tag(x_46) == 0) { -lean_object* x_45; lean_object* x_46; lean_object* x_47; lean_object* x_48; -x_45 = lean_ctor_get(x_44, 1); -lean_inc(x_45); -if (lean_is_exclusive(x_44)) { - lean_ctor_release(x_44, 0); - lean_ctor_release(x_44, 1); - x_46 = x_44; -} else { - lean_dec_ref(x_44); - x_46 = lean_box(0); -} -x_47 = lean_box(0); -if (lean_is_scalar(x_46)) { - x_48 = lean_alloc_ctor(0, 2, 0); -} else { +lean_object* x_47; lean_object* x_48; lean_object* x_49; lean_object* x_50; +x_47 = lean_ctor_get(x_46, 1); +lean_inc(x_47); +if (lean_is_exclusive(x_46)) { + lean_ctor_release(x_46, 0); + lean_ctor_release(x_46, 1); x_48 = x_46; -} -lean_ctor_set(x_48, 0, x_47); -lean_ctor_set(x_48, 1, x_45); -return x_48; -} -else -{ -lean_object* x_49; lean_object* x_50; lean_object* x_51; lean_object* x_52; -x_49 = lean_ctor_get(x_44, 1); -lean_inc(x_49); -if (lean_is_exclusive(x_44)) { - lean_ctor_release(x_44, 0); - lean_ctor_release(x_44, 1); - x_50 = x_44; } else { - lean_dec_ref(x_44); - x_50 = lean_box(0); + lean_dec_ref(x_46); + x_48 = lean_box(0); } -x_51 = lean_box(0); -if (lean_is_scalar(x_50)) { - x_52 = lean_alloc_ctor(0, 2, 0); +x_49 = lean_box(0); +if (lean_is_scalar(x_48)) { + x_50 = lean_alloc_ctor(0, 2, 0); } else { - x_52 = x_50; - lean_ctor_set_tag(x_52, 0); + x_50 = x_48; } -lean_ctor_set(x_52, 0, x_51); -lean_ctor_set(x_52, 1, x_49); -return x_52; +lean_ctor_set(x_50, 0, x_49); +lean_ctor_set(x_50, 1, x_47); +return x_50; +} +else +{ +lean_object* x_51; lean_object* x_52; lean_object* x_53; lean_object* x_54; +x_51 = lean_ctor_get(x_46, 1); +lean_inc(x_51); +if (lean_is_exclusive(x_46)) { + lean_ctor_release(x_46, 0); + lean_ctor_release(x_46, 1); + x_52 = x_46; +} else { + lean_dec_ref(x_46); + x_52 = lean_box(0); +} +x_53 = lean_box(0); +if (lean_is_scalar(x_52)) { + x_54 = lean_alloc_ctor(0, 2, 0); +} else { + x_54 = x_52; + lean_ctor_set_tag(x_54, 0); +} +lean_ctor_set(x_54, 0, x_53); +lean_ctor_set(x_54, 1, x_51); +return x_54; } } } else { -uint8_t x_53; -lean_dec(x_18); -lean_dec(x_12); -x_53 = !lean_is_exclusive(x_20); -if (x_53 == 0) +uint8_t x_55; +lean_dec(x_19); +lean_dec(x_13); +x_55 = !lean_is_exclusive(x_21); +if (x_55 == 0) { -lean_object* x_54; lean_object* x_55; -x_54 = lean_ctor_get(x_20, 0); -lean_dec(x_54); -x_55 = lean_box(0); -lean_ctor_set_tag(x_20, 0); -lean_ctor_set(x_20, 0, x_55); -return x_20; -} -else -{ -lean_object* x_56; lean_object* x_57; lean_object* x_58; -x_56 = lean_ctor_get(x_20, 1); -lean_inc(x_56); -lean_dec(x_20); +lean_object* x_56; lean_object* x_57; +x_56 = lean_ctor_get(x_21, 0); +lean_dec(x_56); x_57 = lean_box(0); -x_58 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_58, 0, x_57); -lean_ctor_set(x_58, 1, x_56); -return x_58; +lean_ctor_set_tag(x_21, 0); +lean_ctor_set(x_21, 0, x_57); +return x_21; +} +else +{ +lean_object* x_58; lean_object* x_59; lean_object* x_60; +x_58 = lean_ctor_get(x_21, 1); +lean_inc(x_58); +lean_dec(x_21); +x_59 = lean_box(0); +x_60 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_60, 0, x_59); +lean_ctor_set(x_60, 1, x_58); +return x_60; } } } } else { -lean_object* x_59; lean_object* x_60; lean_object* x_61; lean_object* x_62; -x_59 = lean_ctor_get(x_5, 1); -lean_inc(x_59); +lean_object* x_61; lean_object* x_62; lean_object* x_63; lean_object* x_64; +x_61 = lean_ctor_get(x_5, 1); +lean_inc(x_61); lean_dec(x_5); -x_60 = l_Lean_Elab_Frontend_runCommandElabM___closed__1; -x_61 = l_unreachable_x21___rarg(x_60); -x_62 = lean_apply_1(x_61, x_59); -if (lean_obj_tag(x_62) == 0) +x_62 = l_Lean_Elab_Frontend_runCommandElabM___closed__1; +x_63 = l_unreachable_x21___rarg(x_62); +x_64 = lean_apply_1(x_63, x_61); +if (lean_obj_tag(x_64) == 0) { -lean_object* x_63; lean_object* x_64; lean_object* x_65; lean_object* x_66; lean_object* x_67; lean_object* x_68; lean_object* x_69; lean_object* x_70; -x_63 = lean_ctor_get(x_62, 0); -lean_inc(x_63); -x_64 = lean_ctor_get(x_62, 1); -lean_inc(x_64); -lean_dec(x_62); -x_65 = lean_ctor_get(x_2, 3); -x_66 = lean_ctor_get(x_65, 1); -x_67 = lean_ctor_get(x_65, 2); -x_68 = lean_ctor_get(x_2, 0); -lean_inc(x_68); -lean_inc(x_67); +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; +x_65 = lean_ctor_get(x_64, 0); +lean_inc(x_65); +x_66 = lean_ctor_get(x_64, 1); lean_inc(x_66); -x_69 = lean_alloc_ctor(0, 4, 0); -lean_ctor_set(x_69, 0, x_66); -lean_ctor_set(x_69, 1, x_67); -lean_ctor_set(x_69, 2, x_68); -lean_ctor_set(x_69, 3, x_63); +lean_dec(x_64); +x_67 = lean_ctor_get(x_2, 3); +x_68 = lean_ctor_get(x_67, 1); +x_69 = lean_ctor_get(x_67, 2); +x_70 = lean_ctor_get(x_2, 0); +x_71 = lean_unsigned_to_nat(0u); +lean_inc(x_70); lean_inc(x_69); -x_70 = l_Lean_Elab_Command_elabCommand(x_1, x_69, x_64); -if (lean_obj_tag(x_70) == 0) -{ -uint8_t x_71; -lean_dec(x_69); -x_71 = !lean_is_exclusive(x_70); -if (x_71 == 0) -{ -return x_70; -} -else -{ -lean_object* x_72; lean_object* x_73; lean_object* x_74; -x_72 = lean_ctor_get(x_70, 0); -x_73 = lean_ctor_get(x_70, 1); -lean_inc(x_73); +lean_inc(x_68); +x_72 = lean_alloc_ctor(0, 5, 0); +lean_ctor_set(x_72, 0, x_68); +lean_ctor_set(x_72, 1, x_69); +lean_ctor_set(x_72, 2, x_70); +lean_ctor_set(x_72, 3, x_65); +lean_ctor_set(x_72, 4, x_71); lean_inc(x_72); -lean_dec(x_70); -x_74 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_74, 0, x_72); -lean_ctor_set(x_74, 1, x_73); -return x_74; -} +x_73 = l_Lean_Elab_Command_elabCommand(x_1, x_72, x_66); +if (lean_obj_tag(x_73) == 0) +{ +uint8_t x_74; +lean_dec(x_72); +x_74 = !lean_is_exclusive(x_73); +if (x_74 == 0) +{ +return x_73; } else { lean_object* x_75; lean_object* x_76; lean_object* x_77; -x_75 = lean_ctor_get(x_70, 0); -lean_inc(x_75); -x_76 = lean_ctor_get(x_70, 1); +x_75 = lean_ctor_get(x_73, 0); +x_76 = lean_ctor_get(x_73, 1); lean_inc(x_76); -lean_dec(x_70); -lean_inc(x_69); -x_77 = l___private_Init_Lean_Elab_Command_2__getState(x_69, x_76); -if (lean_obj_tag(x_77) == 0) +lean_inc(x_75); +lean_dec(x_73); +x_77 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_77, 0, x_75); +lean_ctor_set(x_77, 1, x_76); +return x_77; +} +} +else { -lean_object* x_78; lean_object* x_79; uint8_t x_80; -x_78 = lean_ctor_get(x_77, 0); +lean_object* x_78; lean_object* x_79; lean_object* x_80; +x_78 = lean_ctor_get(x_73, 0); lean_inc(x_78); -x_79 = lean_ctor_get(x_77, 1); +x_79 = lean_ctor_get(x_73, 1); lean_inc(x_79); -lean_dec(x_77); -x_80 = !lean_is_exclusive(x_78); -if (x_80 == 0) +lean_dec(x_73); +lean_inc(x_72); +x_80 = l___private_Init_Lean_Elab_Command_2__getState(x_72, x_79); +if (lean_obj_tag(x_80) == 0) { -lean_object* x_81; lean_object* x_82; lean_object* x_83; -x_81 = lean_ctor_get(x_78, 1); -x_82 = l_PersistentArray_push___rarg(x_81, x_75); -lean_ctor_set(x_78, 1, x_82); -x_83 = l___private_Init_Lean_Elab_Command_3__setState(x_78, x_69, x_79); -if (lean_obj_tag(x_83) == 0) +lean_object* x_81; lean_object* x_82; uint8_t x_83; +x_81 = lean_ctor_get(x_80, 0); +lean_inc(x_81); +x_82 = lean_ctor_get(x_80, 1); +lean_inc(x_82); +lean_dec(x_80); +x_83 = !lean_is_exclusive(x_81); +if (x_83 == 0) { -uint8_t x_84; -x_84 = !lean_is_exclusive(x_83); -if (x_84 == 0) +lean_object* x_84; lean_object* x_85; lean_object* x_86; +x_84 = lean_ctor_get(x_81, 1); +x_85 = l_PersistentArray_push___rarg(x_84, x_78); +lean_ctor_set(x_81, 1, x_85); +x_86 = l___private_Init_Lean_Elab_Command_3__setState(x_81, x_72, x_82); +if (lean_obj_tag(x_86) == 0) { -lean_object* x_85; lean_object* x_86; -x_85 = lean_ctor_get(x_83, 0); -lean_dec(x_85); -x_86 = lean_box(0); -lean_ctor_set(x_83, 0, x_86); -return x_83; +uint8_t x_87; +x_87 = !lean_is_exclusive(x_86); +if (x_87 == 0) +{ +lean_object* x_88; lean_object* x_89; +x_88 = lean_ctor_get(x_86, 0); +lean_dec(x_88); +x_89 = lean_box(0); +lean_ctor_set(x_86, 0, x_89); +return x_86; } else { -lean_object* x_87; lean_object* x_88; lean_object* x_89; -x_87 = lean_ctor_get(x_83, 1); -lean_inc(x_87); -lean_dec(x_83); -x_88 = lean_box(0); -x_89 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_89, 0, x_88); -lean_ctor_set(x_89, 1, x_87); -return x_89; +lean_object* x_90; lean_object* x_91; lean_object* x_92; +x_90 = lean_ctor_get(x_86, 1); +lean_inc(x_90); +lean_dec(x_86); +x_91 = lean_box(0); +x_92 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_92, 0, x_91); +lean_ctor_set(x_92, 1, x_90); +return x_92; } } else { -uint8_t x_90; -x_90 = !lean_is_exclusive(x_83); -if (x_90 == 0) +uint8_t x_93; +x_93 = !lean_is_exclusive(x_86); +if (x_93 == 0) { -lean_object* x_91; lean_object* x_92; -x_91 = lean_ctor_get(x_83, 0); -lean_dec(x_91); -x_92 = lean_box(0); -lean_ctor_set_tag(x_83, 0); -lean_ctor_set(x_83, 0, x_92); -return x_83; +lean_object* x_94; lean_object* x_95; +x_94 = lean_ctor_get(x_86, 0); +lean_dec(x_94); +x_95 = lean_box(0); +lean_ctor_set_tag(x_86, 0); +lean_ctor_set(x_86, 0, x_95); +return x_86; } else { -lean_object* x_93; lean_object* x_94; lean_object* x_95; -x_93 = lean_ctor_get(x_83, 1); -lean_inc(x_93); -lean_dec(x_83); -x_94 = lean_box(0); -x_95 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_95, 0, x_94); -lean_ctor_set(x_95, 1, x_93); -return x_95; -} -} -} -else -{ -lean_object* x_96; lean_object* x_97; lean_object* x_98; lean_object* x_99; lean_object* x_100; lean_object* x_101; -x_96 = lean_ctor_get(x_78, 0); -x_97 = lean_ctor_get(x_78, 1); -x_98 = lean_ctor_get(x_78, 2); -lean_inc(x_98); -lean_inc(x_97); +lean_object* x_96; lean_object* x_97; lean_object* x_98; +x_96 = lean_ctor_get(x_86, 1); lean_inc(x_96); -lean_dec(x_78); -x_99 = l_PersistentArray_push___rarg(x_97, x_75); -x_100 = lean_alloc_ctor(0, 3, 0); -lean_ctor_set(x_100, 0, x_96); -lean_ctor_set(x_100, 1, x_99); -lean_ctor_set(x_100, 2, x_98); -x_101 = l___private_Init_Lean_Elab_Command_3__setState(x_100, x_69, x_79); -if (lean_obj_tag(x_101) == 0) -{ -lean_object* x_102; lean_object* x_103; lean_object* x_104; lean_object* x_105; -x_102 = lean_ctor_get(x_101, 1); -lean_inc(x_102); -if (lean_is_exclusive(x_101)) { - lean_ctor_release(x_101, 0); - lean_ctor_release(x_101, 1); - x_103 = x_101; -} else { - lean_dec_ref(x_101); - x_103 = lean_box(0); +lean_dec(x_86); +x_97 = lean_box(0); +x_98 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_98, 0, x_97); +lean_ctor_set(x_98, 1, x_96); +return x_98; } -x_104 = lean_box(0); -if (lean_is_scalar(x_103)) { - x_105 = lean_alloc_ctor(0, 2, 0); -} else { - x_105 = x_103; } -lean_ctor_set(x_105, 0, x_104); -lean_ctor_set(x_105, 1, x_102); -return x_105; } else { +lean_object* x_99; lean_object* x_100; lean_object* x_101; lean_object* x_102; lean_object* x_103; lean_object* x_104; lean_object* x_105; +x_99 = lean_ctor_get(x_81, 0); +x_100 = lean_ctor_get(x_81, 1); +x_101 = lean_ctor_get(x_81, 2); +x_102 = lean_ctor_get(x_81, 3); +lean_inc(x_102); +lean_inc(x_101); +lean_inc(x_100); +lean_inc(x_99); +lean_dec(x_81); +x_103 = l_PersistentArray_push___rarg(x_100, x_78); +x_104 = lean_alloc_ctor(0, 4, 0); +lean_ctor_set(x_104, 0, x_99); +lean_ctor_set(x_104, 1, x_103); +lean_ctor_set(x_104, 2, x_101); +lean_ctor_set(x_104, 3, x_102); +x_105 = l___private_Init_Lean_Elab_Command_3__setState(x_104, x_72, x_82); +if (lean_obj_tag(x_105) == 0) +{ lean_object* x_106; lean_object* x_107; lean_object* x_108; lean_object* x_109; -x_106 = lean_ctor_get(x_101, 1); +x_106 = lean_ctor_get(x_105, 1); lean_inc(x_106); -if (lean_is_exclusive(x_101)) { - lean_ctor_release(x_101, 0); - lean_ctor_release(x_101, 1); - x_107 = x_101; +if (lean_is_exclusive(x_105)) { + lean_ctor_release(x_105, 0); + lean_ctor_release(x_105, 1); + x_107 = x_105; } else { - lean_dec_ref(x_101); + lean_dec_ref(x_105); x_107 = lean_box(0); } x_108 = lean_box(0); @@ -741,70 +731,93 @@ if (lean_is_scalar(x_107)) { x_109 = lean_alloc_ctor(0, 2, 0); } else { x_109 = x_107; - lean_ctor_set_tag(x_109, 0); } lean_ctor_set(x_109, 0, x_108); lean_ctor_set(x_109, 1, x_106); return x_109; } -} -} else { -uint8_t x_110; -lean_dec(x_75); -lean_dec(x_69); -x_110 = !lean_is_exclusive(x_77); -if (x_110 == 0) -{ -lean_object* x_111; lean_object* x_112; -x_111 = lean_ctor_get(x_77, 0); -lean_dec(x_111); +lean_object* x_110; lean_object* x_111; lean_object* x_112; lean_object* x_113; +x_110 = lean_ctor_get(x_105, 1); +lean_inc(x_110); +if (lean_is_exclusive(x_105)) { + lean_ctor_release(x_105, 0); + lean_ctor_release(x_105, 1); + x_111 = x_105; +} else { + lean_dec_ref(x_105); + x_111 = lean_box(0); +} x_112 = lean_box(0); -lean_ctor_set_tag(x_77, 0); -lean_ctor_set(x_77, 0, x_112); -return x_77; -} -else -{ -lean_object* x_113; lean_object* x_114; lean_object* x_115; -x_113 = lean_ctor_get(x_77, 1); -lean_inc(x_113); -lean_dec(x_77); -x_114 = lean_box(0); -x_115 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_115, 0, x_114); -lean_ctor_set(x_115, 1, x_113); -return x_115; +if (lean_is_scalar(x_111)) { + x_113 = lean_alloc_ctor(0, 2, 0); +} else { + x_113 = x_111; + lean_ctor_set_tag(x_113, 0); } +lean_ctor_set(x_113, 0, x_112); +lean_ctor_set(x_113, 1, x_110); +return x_113; } } } else { -uint8_t x_116; -lean_dec(x_1); -x_116 = !lean_is_exclusive(x_62); -if (x_116 == 0) +uint8_t x_114; +lean_dec(x_78); +lean_dec(x_72); +x_114 = !lean_is_exclusive(x_80); +if (x_114 == 0) { -return x_62; +lean_object* x_115; lean_object* x_116; +x_115 = lean_ctor_get(x_80, 0); +lean_dec(x_115); +x_116 = lean_box(0); +lean_ctor_set_tag(x_80, 0); +lean_ctor_set(x_80, 0, x_116); +return x_80; } else { lean_object* x_117; lean_object* x_118; lean_object* x_119; -x_117 = lean_ctor_get(x_62, 0); -x_118 = lean_ctor_get(x_62, 1); -lean_inc(x_118); +x_117 = lean_ctor_get(x_80, 1); lean_inc(x_117); -lean_dec(x_62); -x_119 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_119, 0, x_117); -lean_ctor_set(x_119, 1, x_118); +lean_dec(x_80); +x_118 = lean_box(0); +x_119 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_119, 0, x_118); +lean_ctor_set(x_119, 1, x_117); return x_119; } } } } +else +{ +uint8_t x_120; +lean_dec(x_1); +x_120 = !lean_is_exclusive(x_64); +if (x_120 == 0) +{ +return x_64; +} +else +{ +lean_object* x_121; lean_object* x_122; lean_object* x_123; +x_121 = lean_ctor_get(x_64, 0); +x_122 = lean_ctor_get(x_64, 1); +lean_inc(x_122); +lean_inc(x_121); +lean_dec(x_64); +x_123 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_123, 0, x_121); +lean_ctor_set(x_123, 1, x_122); +return x_123; +} +} +} +} } lean_object* l_Lean_Elab_Frontend_elabCommandAtFrontend___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) { _start: @@ -1203,79 +1216,82 @@ return x_20; } else { -lean_object* x_21; lean_object* x_22; lean_object* x_23; lean_object* x_24; +lean_object* x_21; lean_object* x_22; lean_object* x_23; lean_object* x_24; lean_object* x_25; x_21 = lean_ctor_get(x_6, 0); x_22 = lean_ctor_get(x_6, 2); +x_23 = lean_ctor_get(x_6, 3); +lean_inc(x_23); lean_inc(x_22); lean_inc(x_21); lean_dec(x_6); -x_23 = lean_alloc_ctor(0, 3, 0); -lean_ctor_set(x_23, 0, x_21); -lean_ctor_set(x_23, 1, x_1); -lean_ctor_set(x_23, 2, x_22); -x_24 = lean_io_ref_set(x_4, x_23, x_9); -if (lean_obj_tag(x_24) == 0) +x_24 = lean_alloc_ctor(0, 4, 0); +lean_ctor_set(x_24, 0, x_21); +lean_ctor_set(x_24, 1, x_1); +lean_ctor_set(x_24, 2, x_22); +lean_ctor_set(x_24, 3, x_23); +x_25 = lean_io_ref_set(x_4, x_24, x_9); +if (lean_obj_tag(x_25) == 0) { -lean_object* x_25; lean_object* x_26; lean_object* x_27; lean_object* x_28; -x_25 = lean_ctor_get(x_24, 0); -lean_inc(x_25); -x_26 = lean_ctor_get(x_24, 1); +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); -if (lean_is_exclusive(x_24)) { - lean_ctor_release(x_24, 0); - lean_ctor_release(x_24, 1); - x_27 = x_24; +x_27 = lean_ctor_get(x_25, 1); +lean_inc(x_27); +if (lean_is_exclusive(x_25)) { + lean_ctor_release(x_25, 0); + lean_ctor_release(x_25, 1); + x_28 = x_25; } else { - lean_dec_ref(x_24); - x_27 = lean_box(0); + lean_dec_ref(x_25); + x_28 = lean_box(0); } -if (lean_is_scalar(x_27)) { - x_28 = lean_alloc_ctor(0, 2, 0); +if (lean_is_scalar(x_28)) { + x_29 = lean_alloc_ctor(0, 2, 0); } else { - x_28 = x_27; + x_29 = x_28; } -lean_ctor_set(x_28, 0, x_25); -lean_ctor_set(x_28, 1, x_26); -return x_28; +lean_ctor_set(x_29, 0, x_26); +lean_ctor_set(x_29, 1, x_27); +return x_29; } else { -lean_object* x_29; lean_object* x_30; lean_object* x_31; lean_object* x_32; -x_29 = lean_ctor_get(x_24, 1); -lean_inc(x_29); -lean_dec(x_24); -x_30 = l_Lean_Elab_Frontend_updateCmdPos___closed__1; -x_31 = l_unreachable_x21___rarg(x_30); -x_32 = lean_apply_1(x_31, x_29); -return x_32; +lean_object* x_30; lean_object* x_31; lean_object* x_32; lean_object* x_33; +x_30 = lean_ctor_get(x_25, 1); +lean_inc(x_30); +lean_dec(x_25); +x_31 = l_Lean_Elab_Frontend_updateCmdPos___closed__1; +x_32 = l_unreachable_x21___rarg(x_31); +x_33 = lean_apply_1(x_32, x_30); +return x_33; } } } else { -lean_object* x_33; lean_object* x_34; lean_object* x_35; lean_object* x_36; +lean_object* x_34; lean_object* x_35; lean_object* x_36; lean_object* x_37; lean_dec(x_6); lean_dec(x_1); -x_33 = lean_ctor_get(x_8, 1); -lean_inc(x_33); +x_34 = lean_ctor_get(x_8, 1); +lean_inc(x_34); lean_dec(x_8); -x_34 = l_Lean_Elab_Frontend_updateCmdPos___closed__1; -x_35 = l_unreachable_x21___rarg(x_34); -x_36 = lean_apply_1(x_35, x_33); -return x_36; +x_35 = l_Lean_Elab_Frontend_updateCmdPos___closed__1; +x_36 = l_unreachable_x21___rarg(x_35); +x_37 = lean_apply_1(x_36, x_34); +return x_37; } } else { -lean_object* x_37; lean_object* x_38; lean_object* x_39; lean_object* x_40; +lean_object* x_38; lean_object* x_39; lean_object* x_40; lean_object* x_41; lean_dec(x_1); -x_37 = lean_ctor_get(x_5, 1); -lean_inc(x_37); +x_38 = lean_ctor_get(x_5, 1); +lean_inc(x_38); lean_dec(x_5); -x_38 = l_Lean_Elab_Frontend_updateCmdPos___closed__1; -x_39 = l_unreachable_x21___rarg(x_38); -x_40 = lean_apply_1(x_39, x_37); -return x_40; +x_39 = l_Lean_Elab_Frontend_updateCmdPos___closed__1; +x_40 = l_unreachable_x21___rarg(x_39); +x_41 = lean_apply_1(x_40, x_38); +return x_41; } } } @@ -1802,7 +1818,7 @@ lean_dec(x_6); x_9 = lean_io_mk_ref(x_8, x_7); if (lean_obj_tag(x_9) == 0) { -lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; +lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; uint8_t x_14; x_10 = lean_ctor_get(x_9, 0); lean_inc(x_10); x_11 = lean_ctor_get(x_9, 1); @@ -1814,9 +1830,6 @@ lean_ctor_set(x_12, 1, x_2); lean_ctor_set(x_12, 2, x_10); lean_ctor_set(x_12, 3, x_1); x_13 = l_Lean_Elab_Frontend_processCommandsAux___main___rarg(x_12, x_11); -if (lean_obj_tag(x_13) == 0) -{ -uint8_t x_14; x_14 = !lean_is_exclusive(x_13); if (x_14 == 0) { @@ -1839,81 +1852,52 @@ return x_17; else { uint8_t x_18; -x_18 = !lean_is_exclusive(x_13); -if (x_18 == 0) -{ -lean_object* x_19; lean_object* x_20; lean_object* x_21; -x_19 = lean_ctor_get(x_13, 0); -lean_dec(x_19); -x_20 = l_IO_Error_Inhabited; -x_21 = l_unreachable_x21___rarg(x_20); -lean_ctor_set(x_13, 0, x_21); -return x_13; -} -else -{ -lean_object* x_22; lean_object* x_23; lean_object* x_24; lean_object* x_25; -x_22 = lean_ctor_get(x_13, 1); -lean_inc(x_22); -lean_dec(x_13); -x_23 = l_IO_Error_Inhabited; -x_24 = l_unreachable_x21___rarg(x_23); -x_25 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_25, 0, x_24); -lean_ctor_set(x_25, 1, x_22); -return x_25; -} -} -} -else -{ -uint8_t x_26; lean_dec(x_3); lean_dec(x_2); lean_dec(x_1); -x_26 = !lean_is_exclusive(x_9); -if (x_26 == 0) +x_18 = !lean_is_exclusive(x_9); +if (x_18 == 0) { return x_9; } else { -lean_object* x_27; lean_object* x_28; lean_object* x_29; -x_27 = lean_ctor_get(x_9, 0); -x_28 = lean_ctor_get(x_9, 1); -lean_inc(x_28); -lean_inc(x_27); +lean_object* x_19; lean_object* x_20; lean_object* x_21; +x_19 = lean_ctor_get(x_9, 0); +x_20 = lean_ctor_get(x_9, 1); +lean_inc(x_20); +lean_inc(x_19); lean_dec(x_9); -x_29 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_29, 0, x_27); -lean_ctor_set(x_29, 1, x_28); -return x_29; +x_21 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_21, 0, x_19); +lean_ctor_set(x_21, 1, x_20); +return x_21; } } } else { -uint8_t x_30; +uint8_t x_22; lean_dec(x_3); lean_dec(x_2); lean_dec(x_1); -x_30 = !lean_is_exclusive(x_5); -if (x_30 == 0) +x_22 = !lean_is_exclusive(x_5); +if (x_22 == 0) { return x_5; } else { -lean_object* x_31; lean_object* x_32; lean_object* x_33; -x_31 = lean_ctor_get(x_5, 0); -x_32 = lean_ctor_get(x_5, 1); -lean_inc(x_32); -lean_inc(x_31); +lean_object* x_23; lean_object* x_24; lean_object* x_25; +x_23 = lean_ctor_get(x_5, 0); +x_24 = lean_ctor_get(x_5, 1); +lean_inc(x_24); +lean_inc(x_23); lean_dec(x_5); -x_33 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_33, 0, x_31); -lean_ctor_set(x_33, 1, x_32); -return x_33; +x_25 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_25, 0, x_23); +lean_ctor_set(x_25, 1, x_24); +return x_25; } } } diff --git a/stage0/stdlib/Init/Lean/Elab/Term.c b/stage0/stdlib/Init/Lean/Elab/Term.c index d12f05ab9f..2bc64ab7ff 100644 --- a/stage0/stdlib/Init/Lean/Elab/Term.c +++ b/stage0/stdlib/Init/Lean/Elab/Term.c @@ -95,6 +95,7 @@ extern size_t l_PersistentHashMap_insertAux___main___rarg___closed__2; lean_object* l_Lean_Elab_Term_throwUnexpectedSyntax___rarg___boxed(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_List_foldlM___main___at___private_Init_Lean_Elab_Term_3__addMacroStack___spec__1___closed__1; lean_object* l_Lean_Meta_mkAppM(lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Elab_Term_levelMVarToParam___closed__1; lean_object* l_Lean_Elab_Term_elabParen(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___regBuiltinTermElab_Lean_Elab_Term_elabNum___closed__2; lean_object* lean_array_uset(lean_object*, size_t, lean_object*); @@ -108,6 +109,7 @@ lean_object* l___private_Init_Lean_Elab_Term_22__resolveLocalNameAux___main(lean lean_object* l_Lean_Elab_Term_elabArrayLit___closed__2; extern lean_object* l_Lean_Parser_Term_type___elambda__1___closed__2; lean_object* l_Lean_Elab_Term_throwUnexpectedSyntax___rarg___closed__2; +uint8_t l_List_elem___main___at_Lean_addAliasEntry___spec__18(lean_object*, lean_object*); extern lean_object* l_Prod_HasRepr___rarg___closed__1; lean_object* l_Array_iterateMAux___main___at___private_Init_Lean_Elab_Term_6__fromMetaState___spec__4___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); extern lean_object* l_Lean_stxInh; @@ -138,6 +140,7 @@ lean_object* l___regBuiltinTermElab_Lean_Elab_Term_elabBadCDot(lean_object*); lean_object* l_Lean_Elab_Term_unfoldDefinition_x3f(lean_object*, lean_object*, lean_object*, lean_object*); uint8_t lean_name_eq(lean_object*, lean_object*); lean_object* l_List_filterAuxM___main___at_Lean_Elab_Term_synthesizeUsingDefault___spec__1___lambda__1___closed__3; +lean_object* l_Lean_Elab_Term_mkForallUsedOnly___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* lean_io_ref_get(lean_object*, lean_object*); extern lean_object* l_Lean_Parser_declareBuiltinParser___closed__5; lean_object* l_Lean_Elab_Term_registerBuiltinTermElabAttr___closed__6; @@ -164,6 +167,7 @@ lean_object* lean_array_get_size(lean_object*); lean_object* l_Lean_Elab_Term_elabChar___closed__4; lean_object* l_List_find_x3f___main___rarg(lean_object*, lean_object*); lean_object* l_Lean_Elab_Term_resetSynthInstanceCache(lean_object*); +lean_object* l_Lean_Elab_Term_mkForallUsedOnly(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Term_inferType___boxed(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_registerAttribute(lean_object*, lean_object*); lean_object* l___private_Init_Lean_Elab_Term_14__synthesizePendingInstMVar___lambda__1___closed__1; @@ -289,6 +293,7 @@ uint8_t lean_nat_dec_eq(lean_object*, lean_object*); lean_object* l_Lean_Elab_Term_withMVarContext(lean_object*); extern lean_object* l_Lean_Name_appendIndexAfter___closed__1; lean_object* l_Lean_Elab_Term_termElabAttribute___closed__4; +lean_object* l_Lean_Elab_Term_levelMVarToParam(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Term_observing(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Term_mkLet___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Term_TermElabM_MonadLog___lambda__4(lean_object*, lean_object*, lean_object*); @@ -308,6 +313,7 @@ lean_object* l_Lean_Elab_Term_decLevel_x3f(lean_object*, lean_object*, lean_obje extern lean_object* l_Lean_numLitKind; lean_object* l_Lean_Elab_Term_elabTerm___closed__6; lean_object* l___private_Init_Lean_Elab_Term_25__mkConsts(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_MetavarContext_levelMVarToParam(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Term_elabChar___closed__2; lean_object* l_Lean_Elab_Term_mkLambda___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Term_getLevel(lean_object*, lean_object*, lean_object*, lean_object*); @@ -333,6 +339,7 @@ lean_object* l_Lean_Elab_mkMessageCore(lean_object*, lean_object*, lean_object*, lean_object* l_Lean_Elab_Term_mkHole___boxed(lean_object*); lean_object* l_Lean_Elab_Term_withMacroExpansion___rarg(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Term_mkExplicitBinder___closed__3; +lean_object* l_Lean_Elab_Term_levelMVarToParam___closed__2; lean_object* l_Lean_Elab_Term_elabStr___boxed(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___regBuiltinTermElab_Lean_Elab_Term_elabParen(lean_object*); lean_object* l_Lean_Elab_Term_mkConst___closed__2; @@ -348,6 +355,7 @@ lean_object* l_Lean_Elab_Term_mkInstMVar(lean_object*, lean_object*, lean_object lean_object* l___private_Init_Lean_Elab_Term_20__mkPairsAux___main(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Term_declareBuiltinTermElab___closed__6; lean_object* lean_array_get(lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Elab_Term_levelMVarToParam___lambda__1___boxed(lean_object*, lean_object*); lean_object* l_Lean_Elab_Term_getMVarDecl___boxed(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Term_setTraceState___boxed(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Expr_fvarId_x21(lean_object*); @@ -358,6 +366,7 @@ lean_object* lean_array_fset(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Term_mkConst___closed__4; lean_object* l_List_forM___main___at___private_Init_Lean_Elab_Term_18__reportStuckSyntheticMVars___spec__1___lambda__1___closed__2; lean_object* l_List_lengthAux___main___rarg(lean_object*, lean_object*); +lean_object* l_Lean_Meta_mkForallUsedOnly(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Name_appendIndexAfter(lean_object*, lean_object*); lean_object* l_Array_iterateMAux___main___at___private_Init_Lean_Elab_Term_6__fromMetaState___spec__3___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Term_withNode___rarg___closed__1; @@ -628,6 +637,7 @@ lean_object* lean_io_ref_reset(lean_object*, lean_object*); lean_object* l_Lean_Elab_Term_unfoldDefinition_x3f___boxed(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Term_mkExplicitBinder(lean_object*, lean_object*); lean_object* l_Lean_Elab_Term_elabSort(lean_object*, lean_object*, lean_object*); +uint8_t l_Lean_Elab_Term_levelMVarToParam___lambda__1(lean_object*, lean_object*); lean_object* l___private_Init_Lean_Elab_Term_17__synthesizeSyntheticMVarsStep___closed__7; lean_object* l___private_Init_Lean_Elab_Term_14__synthesizePendingInstMVar(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Term_adaptExpander(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); @@ -7836,6 +7846,174 @@ lean_dec(x_1); return x_6; } } +lean_object* l_Lean_Elab_Term_mkForallUsedOnly(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) { +_start: +{ +lean_object* x_6; uint8_t x_7; +x_6 = lean_ctor_get(x_5, 0); +lean_inc(x_6); +x_7 = !lean_is_exclusive(x_6); +if (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_6, 4); +x_9 = lean_ctor_get(x_4, 0); +lean_inc(x_9); +x_10 = l_Lean_TraceState_Inhabited___closed__1; +lean_ctor_set(x_6, 4, x_10); +x_11 = l_Lean_Meta_mkForallUsedOnly(x_2, x_3, x_9, x_6); +if (lean_obj_tag(x_11) == 0) +{ +uint8_t x_12; +x_12 = !lean_is_exclusive(x_11); +if (x_12 == 0) +{ +lean_object* x_13; lean_object* x_14; +x_13 = lean_ctor_get(x_11, 1); +x_14 = l___private_Init_Lean_Elab_Term_6__fromMetaState(x_1, x_4, x_5, x_13, x_8); +lean_ctor_set(x_11, 1, x_14); +return x_11; +} +else +{ +lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; +x_15 = lean_ctor_get(x_11, 0); +x_16 = lean_ctor_get(x_11, 1); +lean_inc(x_16); +lean_inc(x_15); +lean_dec(x_11); +x_17 = l___private_Init_Lean_Elab_Term_6__fromMetaState(x_1, x_4, x_5, x_16, x_8); +x_18 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_18, 0, x_15); +lean_ctor_set(x_18, 1, x_17); +return x_18; +} +} +else +{ +uint8_t x_19; +x_19 = !lean_is_exclusive(x_11); +if (x_19 == 0) +{ +lean_object* x_20; lean_object* x_21; lean_object* x_22; lean_object* x_23; +x_20 = lean_ctor_get(x_11, 0); +x_21 = lean_ctor_get(x_11, 1); +lean_inc(x_4); +x_22 = l___private_Init_Lean_Elab_Term_5__fromMetaException(x_4, x_1, x_20); +x_23 = l___private_Init_Lean_Elab_Term_6__fromMetaState(x_1, x_4, x_5, x_21, x_8); +lean_ctor_set(x_11, 1, x_23); +lean_ctor_set(x_11, 0, x_22); +return x_11; +} +else +{ +lean_object* x_24; lean_object* x_25; lean_object* x_26; lean_object* x_27; lean_object* x_28; +x_24 = lean_ctor_get(x_11, 0); +x_25 = lean_ctor_get(x_11, 1); +lean_inc(x_25); +lean_inc(x_24); +lean_dec(x_11); +lean_inc(x_4); +x_26 = l___private_Init_Lean_Elab_Term_5__fromMetaException(x_4, x_1, x_24); +x_27 = l___private_Init_Lean_Elab_Term_6__fromMetaState(x_1, x_4, x_5, x_25, x_8); +x_28 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_28, 0, x_26); +lean_ctor_set(x_28, 1, x_27); +return x_28; +} +} +} +else +{ +lean_object* x_29; lean_object* x_30; lean_object* x_31; lean_object* x_32; lean_object* x_33; lean_object* x_34; lean_object* x_35; lean_object* x_36; lean_object* x_37; lean_object* x_38; +x_29 = lean_ctor_get(x_6, 0); +x_30 = lean_ctor_get(x_6, 1); +x_31 = lean_ctor_get(x_6, 2); +x_32 = lean_ctor_get(x_6, 3); +x_33 = lean_ctor_get(x_6, 4); +x_34 = lean_ctor_get(x_6, 5); +lean_inc(x_34); +lean_inc(x_33); +lean_inc(x_32); +lean_inc(x_31); +lean_inc(x_30); +lean_inc(x_29); +lean_dec(x_6); +x_35 = lean_ctor_get(x_4, 0); +lean_inc(x_35); +x_36 = l_Lean_TraceState_Inhabited___closed__1; +x_37 = lean_alloc_ctor(0, 6, 0); +lean_ctor_set(x_37, 0, x_29); +lean_ctor_set(x_37, 1, x_30); +lean_ctor_set(x_37, 2, x_31); +lean_ctor_set(x_37, 3, x_32); +lean_ctor_set(x_37, 4, x_36); +lean_ctor_set(x_37, 5, x_34); +x_38 = l_Lean_Meta_mkForallUsedOnly(x_2, x_3, x_35, x_37); +if (lean_obj_tag(x_38) == 0) +{ +lean_object* x_39; lean_object* x_40; lean_object* x_41; lean_object* x_42; lean_object* x_43; +x_39 = lean_ctor_get(x_38, 0); +lean_inc(x_39); +x_40 = lean_ctor_get(x_38, 1); +lean_inc(x_40); +if (lean_is_exclusive(x_38)) { + lean_ctor_release(x_38, 0); + lean_ctor_release(x_38, 1); + x_41 = x_38; +} else { + lean_dec_ref(x_38); + x_41 = lean_box(0); +} +x_42 = l___private_Init_Lean_Elab_Term_6__fromMetaState(x_1, x_4, x_5, x_40, x_33); +if (lean_is_scalar(x_41)) { + x_43 = lean_alloc_ctor(0, 2, 0); +} else { + x_43 = x_41; +} +lean_ctor_set(x_43, 0, x_39); +lean_ctor_set(x_43, 1, x_42); +return x_43; +} +else +{ +lean_object* x_44; lean_object* x_45; lean_object* x_46; lean_object* x_47; lean_object* x_48; lean_object* x_49; +x_44 = lean_ctor_get(x_38, 0); +lean_inc(x_44); +x_45 = lean_ctor_get(x_38, 1); +lean_inc(x_45); +if (lean_is_exclusive(x_38)) { + lean_ctor_release(x_38, 0); + lean_ctor_release(x_38, 1); + x_46 = x_38; +} else { + lean_dec_ref(x_38); + x_46 = lean_box(0); +} +lean_inc(x_4); +x_47 = l___private_Init_Lean_Elab_Term_5__fromMetaException(x_4, x_1, x_44); +x_48 = l___private_Init_Lean_Elab_Term_6__fromMetaState(x_1, x_4, x_5, x_45, x_33); +if (lean_is_scalar(x_46)) { + x_49 = lean_alloc_ctor(1, 2, 0); +} else { + x_49 = x_46; +} +lean_ctor_set(x_49, 0, x_47); +lean_ctor_set(x_49, 1, x_48); +return x_49; +} +} +} +} +lean_object* l_Lean_Elab_Term_mkForallUsedOnly___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) { +_start: +{ +lean_object* x_6; +x_6 = l_Lean_Elab_Term_mkForallUsedOnly(x_1, x_2, x_3, x_4, x_5); +lean_dec(x_1); +return x_6; +} +} lean_object* l_Lean_Elab_Term_mkLambda(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) { _start: { @@ -9359,6 +9537,270 @@ lean_ctor_set(x_18, 1, x_16); return x_18; } } +uint8_t l_Lean_Elab_Term_levelMVarToParam___lambda__1(lean_object* x_1, lean_object* x_2) { +_start: +{ +lean_object* x_3; uint8_t x_4; +x_3 = lean_ctor_get(x_1, 5); +x_4 = l_List_elem___main___at_Lean_addAliasEntry___spec__18(x_2, x_3); +return x_4; +} +} +lean_object* _init_l_Lean_Elab_Term_levelMVarToParam___closed__1() { +_start: +{ +lean_object* x_1; +x_1 = lean_mk_string("u"); +return x_1; +} +} +lean_object* _init_l_Lean_Elab_Term_levelMVarToParam___closed__2() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; +x_1 = lean_box(0); +x_2 = l_Lean_Elab_Term_levelMVarToParam___closed__1; +x_3 = lean_name_mk_string(x_1, x_2); +return x_3; +} +} +lean_object* l_Lean_Elab_Term_levelMVarToParam(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +_start: +{ +lean_object* x_4; uint8_t x_5; +x_4 = l_Lean_Elab_Term_getMCtx___rarg(x_3); +x_5 = !lean_is_exclusive(x_4); +if (x_5 == 0) +{ +lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; uint8_t x_12; +x_6 = lean_ctor_get(x_4, 0); +x_7 = lean_ctor_get(x_4, 1); +x_8 = lean_alloc_closure((void*)(l_Lean_Elab_Term_levelMVarToParam___lambda__1___boxed), 2, 1); +lean_closure_set(x_8, 0, x_2); +x_9 = l_Lean_Elab_Term_levelMVarToParam___closed__2; +x_10 = lean_unsigned_to_nat(1u); +x_11 = l_Lean_MetavarContext_levelMVarToParam(x_6, x_8, x_1, x_9, x_10); +x_12 = !lean_is_exclusive(x_7); +if (x_12 == 0) +{ +lean_object* x_13; uint8_t x_14; +x_13 = lean_ctor_get(x_7, 0); +x_14 = !lean_is_exclusive(x_13); +if (x_14 == 0) +{ +lean_object* x_15; lean_object* x_16; lean_object* x_17; +x_15 = lean_ctor_get(x_13, 1); +lean_dec(x_15); +x_16 = lean_ctor_get(x_11, 0); +lean_inc(x_16); +lean_ctor_set(x_13, 1, x_16); +x_17 = lean_ctor_get(x_11, 3); +lean_inc(x_17); +lean_dec(x_11); +lean_ctor_set(x_4, 0, x_17); +return x_4; +} +else +{ +lean_object* x_18; lean_object* x_19; lean_object* x_20; lean_object* x_21; lean_object* x_22; lean_object* x_23; lean_object* x_24; lean_object* x_25; +x_18 = lean_ctor_get(x_13, 0); +x_19 = lean_ctor_get(x_13, 2); +x_20 = lean_ctor_get(x_13, 3); +x_21 = lean_ctor_get(x_13, 4); +x_22 = lean_ctor_get(x_13, 5); +lean_inc(x_22); +lean_inc(x_21); +lean_inc(x_20); +lean_inc(x_19); +lean_inc(x_18); +lean_dec(x_13); +x_23 = lean_ctor_get(x_11, 0); +lean_inc(x_23); +x_24 = lean_alloc_ctor(0, 6, 0); +lean_ctor_set(x_24, 0, x_18); +lean_ctor_set(x_24, 1, x_23); +lean_ctor_set(x_24, 2, x_19); +lean_ctor_set(x_24, 3, x_20); +lean_ctor_set(x_24, 4, x_21); +lean_ctor_set(x_24, 5, x_22); +lean_ctor_set(x_7, 0, x_24); +x_25 = lean_ctor_get(x_11, 3); +lean_inc(x_25); +lean_dec(x_11); +lean_ctor_set(x_4, 0, x_25); +return x_4; +} +} +else +{ +lean_object* x_26; lean_object* x_27; lean_object* x_28; lean_object* x_29; lean_object* x_30; lean_object* x_31; lean_object* x_32; lean_object* x_33; lean_object* x_34; lean_object* x_35; lean_object* x_36; lean_object* x_37; lean_object* x_38; lean_object* x_39; lean_object* x_40; lean_object* x_41; +x_26 = lean_ctor_get(x_7, 0); +x_27 = lean_ctor_get(x_7, 1); +x_28 = lean_ctor_get(x_7, 2); +x_29 = lean_ctor_get(x_7, 3); +x_30 = lean_ctor_get(x_7, 4); +x_31 = lean_ctor_get(x_7, 5); +lean_inc(x_31); +lean_inc(x_30); +lean_inc(x_29); +lean_inc(x_28); +lean_inc(x_27); +lean_inc(x_26); +lean_dec(x_7); +x_32 = lean_ctor_get(x_26, 0); +lean_inc(x_32); +x_33 = lean_ctor_get(x_26, 2); +lean_inc(x_33); +x_34 = lean_ctor_get(x_26, 3); +lean_inc(x_34); +x_35 = lean_ctor_get(x_26, 4); +lean_inc(x_35); +x_36 = lean_ctor_get(x_26, 5); +lean_inc(x_36); +if (lean_is_exclusive(x_26)) { + lean_ctor_release(x_26, 0); + lean_ctor_release(x_26, 1); + lean_ctor_release(x_26, 2); + lean_ctor_release(x_26, 3); + lean_ctor_release(x_26, 4); + lean_ctor_release(x_26, 5); + x_37 = x_26; +} else { + lean_dec_ref(x_26); + x_37 = lean_box(0); +} +x_38 = lean_ctor_get(x_11, 0); +lean_inc(x_38); +if (lean_is_scalar(x_37)) { + x_39 = lean_alloc_ctor(0, 6, 0); +} else { + x_39 = x_37; +} +lean_ctor_set(x_39, 0, x_32); +lean_ctor_set(x_39, 1, x_38); +lean_ctor_set(x_39, 2, x_33); +lean_ctor_set(x_39, 3, x_34); +lean_ctor_set(x_39, 4, x_35); +lean_ctor_set(x_39, 5, x_36); +x_40 = lean_alloc_ctor(0, 6, 0); +lean_ctor_set(x_40, 0, x_39); +lean_ctor_set(x_40, 1, x_27); +lean_ctor_set(x_40, 2, x_28); +lean_ctor_set(x_40, 3, x_29); +lean_ctor_set(x_40, 4, x_30); +lean_ctor_set(x_40, 5, x_31); +x_41 = lean_ctor_get(x_11, 3); +lean_inc(x_41); +lean_dec(x_11); +lean_ctor_set(x_4, 1, x_40); +lean_ctor_set(x_4, 0, x_41); +return x_4; +} +} +else +{ +lean_object* x_42; lean_object* x_43; lean_object* x_44; lean_object* x_45; lean_object* x_46; lean_object* x_47; lean_object* x_48; lean_object* x_49; lean_object* x_50; lean_object* x_51; lean_object* x_52; lean_object* x_53; lean_object* x_54; lean_object* x_55; lean_object* x_56; lean_object* x_57; lean_object* x_58; lean_object* x_59; lean_object* x_60; lean_object* x_61; lean_object* x_62; lean_object* x_63; lean_object* x_64; lean_object* x_65; +x_42 = lean_ctor_get(x_4, 0); +x_43 = lean_ctor_get(x_4, 1); +lean_inc(x_43); +lean_inc(x_42); +lean_dec(x_4); +x_44 = lean_alloc_closure((void*)(l_Lean_Elab_Term_levelMVarToParam___lambda__1___boxed), 2, 1); +lean_closure_set(x_44, 0, x_2); +x_45 = l_Lean_Elab_Term_levelMVarToParam___closed__2; +x_46 = lean_unsigned_to_nat(1u); +x_47 = l_Lean_MetavarContext_levelMVarToParam(x_42, x_44, x_1, x_45, x_46); +x_48 = lean_ctor_get(x_43, 0); +lean_inc(x_48); +x_49 = lean_ctor_get(x_43, 1); +lean_inc(x_49); +x_50 = lean_ctor_get(x_43, 2); +lean_inc(x_50); +x_51 = lean_ctor_get(x_43, 3); +lean_inc(x_51); +x_52 = lean_ctor_get(x_43, 4); +lean_inc(x_52); +x_53 = lean_ctor_get(x_43, 5); +lean_inc(x_53); +if (lean_is_exclusive(x_43)) { + lean_ctor_release(x_43, 0); + lean_ctor_release(x_43, 1); + lean_ctor_release(x_43, 2); + lean_ctor_release(x_43, 3); + lean_ctor_release(x_43, 4); + lean_ctor_release(x_43, 5); + x_54 = x_43; +} else { + lean_dec_ref(x_43); + x_54 = lean_box(0); +} +x_55 = lean_ctor_get(x_48, 0); +lean_inc(x_55); +x_56 = lean_ctor_get(x_48, 2); +lean_inc(x_56); +x_57 = lean_ctor_get(x_48, 3); +lean_inc(x_57); +x_58 = lean_ctor_get(x_48, 4); +lean_inc(x_58); +x_59 = lean_ctor_get(x_48, 5); +lean_inc(x_59); +if (lean_is_exclusive(x_48)) { + lean_ctor_release(x_48, 0); + lean_ctor_release(x_48, 1); + lean_ctor_release(x_48, 2); + lean_ctor_release(x_48, 3); + lean_ctor_release(x_48, 4); + lean_ctor_release(x_48, 5); + x_60 = x_48; +} else { + lean_dec_ref(x_48); + x_60 = lean_box(0); +} +x_61 = lean_ctor_get(x_47, 0); +lean_inc(x_61); +if (lean_is_scalar(x_60)) { + x_62 = lean_alloc_ctor(0, 6, 0); +} else { + x_62 = x_60; +} +lean_ctor_set(x_62, 0, x_55); +lean_ctor_set(x_62, 1, x_61); +lean_ctor_set(x_62, 2, x_56); +lean_ctor_set(x_62, 3, x_57); +lean_ctor_set(x_62, 4, x_58); +lean_ctor_set(x_62, 5, x_59); +if (lean_is_scalar(x_54)) { + x_63 = lean_alloc_ctor(0, 6, 0); +} else { + x_63 = x_54; +} +lean_ctor_set(x_63, 0, x_62); +lean_ctor_set(x_63, 1, x_49); +lean_ctor_set(x_63, 2, x_50); +lean_ctor_set(x_63, 3, x_51); +lean_ctor_set(x_63, 4, x_52); +lean_ctor_set(x_63, 5, x_53); +x_64 = lean_ctor_get(x_47, 3); +lean_inc(x_64); +lean_dec(x_47); +x_65 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_65, 0, x_64); +lean_ctor_set(x_65, 1, x_63); +return x_65; +} +} +} +lean_object* l_Lean_Elab_Term_levelMVarToParam___lambda__1___boxed(lean_object* x_1, lean_object* x_2) { +_start: +{ +uint8_t x_3; lean_object* x_4; +x_3 = l_Lean_Elab_Term_levelMVarToParam___lambda__1(x_1, x_2); +lean_dec(x_2); +lean_dec(x_1); +x_4 = lean_box(x_3); +return x_4; +} +} lean_object* _init_l_Lean_Elab_Term_mkFreshAnonymousName___rarg___closed__1() { _start: { @@ -22365,6 +22807,10 @@ l_Lean_Elab_Term_mkExplicitBinder___closed__5 = _init_l_Lean_Elab_Term_mkExplici lean_mark_persistent(l_Lean_Elab_Term_mkExplicitBinder___closed__5); l_Lean_Elab_Term_mkExplicitBinder___closed__6 = _init_l_Lean_Elab_Term_mkExplicitBinder___closed__6(); lean_mark_persistent(l_Lean_Elab_Term_mkExplicitBinder___closed__6); +l_Lean_Elab_Term_levelMVarToParam___closed__1 = _init_l_Lean_Elab_Term_levelMVarToParam___closed__1(); +lean_mark_persistent(l_Lean_Elab_Term_levelMVarToParam___closed__1); +l_Lean_Elab_Term_levelMVarToParam___closed__2 = _init_l_Lean_Elab_Term_levelMVarToParam___closed__2(); +lean_mark_persistent(l_Lean_Elab_Term_levelMVarToParam___closed__2); l_Lean_Elab_Term_mkFreshAnonymousName___rarg___closed__1 = _init_l_Lean_Elab_Term_mkFreshAnonymousName___rarg___closed__1(); lean_mark_persistent(l_Lean_Elab_Term_mkFreshAnonymousName___rarg___closed__1); l_Lean_Elab_Term_mkFreshAnonymousName___rarg___closed__2 = _init_l_Lean_Elab_Term_mkFreshAnonymousName___rarg___closed__2(); diff --git a/stage0/stdlib/Init/Lean/Elab/Util.c b/stage0/stdlib/Init/Lean/Elab/Util.c index f2a335dba9..16f7109b6f 100644 --- a/stage0/stdlib/Init/Lean/Elab/Util.c +++ b/stage0/stdlib/Init/Lean/Elab/Util.c @@ -839,7 +839,7 @@ lean_object* _init_l___private_Init_Lean_Elab_Util_2__throwUnexpectedElabType___ _start: { lean_object* x_1; -x_1 = lean_mk_string("' `"); +x_1 = lean_mk_string("', `"); return x_1; } } diff --git a/stage0/stdlib/Init/Lean/Expr.c b/stage0/stdlib/Init/Lean/Expr.c index ff39c4d2f7..c8ff56b1e9 100644 --- a/stage0/stdlib/Init/Lean/Expr.c +++ b/stage0/stdlib/Init/Lean/Expr.c @@ -7452,7 +7452,7 @@ _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4; lean_object* x_5; x_1 = l___private_Init_Lean_Expr_1__Expr_mkDataCore___closed__1; -x_2 = lean_unsigned_to_nat(758u); +x_2 = lean_unsigned_to_nat(760u); x_3 = lean_unsigned_to_nat(18u); x_4 = l_Lean_Expr_appFn_x21___closed__1; x_5 = l___private_Init_Util_1__mkPanicMessage(x_1, x_2, x_3, x_4); @@ -7494,7 +7494,7 @@ _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4; lean_object* x_5; x_1 = l___private_Init_Lean_Expr_1__Expr_mkDataCore___closed__1; -x_2 = lean_unsigned_to_nat(767u); +x_2 = lean_unsigned_to_nat(769u); x_3 = lean_unsigned_to_nat(18u); x_4 = l_Lean_Expr_constName_x21___closed__1; x_5 = l___private_Init_Util_1__mkPanicMessage(x_1, x_2, x_3, x_4); @@ -7543,7 +7543,7 @@ _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4; lean_object* x_5; x_1 = l___private_Init_Lean_Expr_1__Expr_mkDataCore___closed__1; -x_2 = lean_unsigned_to_nat(776u); +x_2 = lean_unsigned_to_nat(778u); x_3 = lean_unsigned_to_nat(14u); x_4 = l_Lean_Expr_updateSort_x21___closed__1; x_5 = l___private_Init_Util_1__mkPanicMessage(x_1, x_2, x_3, x_4); @@ -7600,7 +7600,7 @@ _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4; lean_object* x_5; x_1 = l___private_Init_Lean_Expr_1__Expr_mkDataCore___closed__1; -x_2 = lean_unsigned_to_nat(793u); +x_2 = lean_unsigned_to_nat(795u); x_3 = lean_unsigned_to_nat(17u); x_4 = l_Lean_Expr_updateMData_x21___closed__1; x_5 = l___private_Init_Util_1__mkPanicMessage(x_1, x_2, x_3, x_4); @@ -7641,7 +7641,7 @@ _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4; lean_object* x_5; x_1 = l___private_Init_Lean_Expr_1__Expr_mkDataCore___closed__1; -x_2 = lean_unsigned_to_nat(798u); +x_2 = lean_unsigned_to_nat(800u); x_3 = lean_unsigned_to_nat(18u); x_4 = l_Lean_Expr_updateProj_x21___closed__1; x_5 = l___private_Init_Util_1__mkPanicMessage(x_1, x_2, x_3, x_4); @@ -7692,7 +7692,7 @@ _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4; lean_object* x_5; x_1 = l___private_Init_Lean_Expr_1__Expr_mkDataCore___closed__1; -x_2 = lean_unsigned_to_nat(807u); +x_2 = lean_unsigned_to_nat(809u); x_3 = lean_unsigned_to_nat(21u); x_4 = l_Lean_Expr_updateForall_x21___closed__1; x_5 = l___private_Init_Util_1__mkPanicMessage(x_1, x_2, x_3, x_4); @@ -7736,7 +7736,7 @@ _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4; lean_object* x_5; x_1 = l___private_Init_Lean_Expr_1__Expr_mkDataCore___closed__1; -x_2 = lean_unsigned_to_nat(812u); +x_2 = lean_unsigned_to_nat(814u); x_3 = lean_unsigned_to_nat(21u); x_4 = l_Lean_Expr_updateForall_x21___closed__1; x_5 = l___private_Init_Util_1__mkPanicMessage(x_1, x_2, x_3, x_4); @@ -7790,7 +7790,7 @@ _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4; lean_object* x_5; x_1 = l___private_Init_Lean_Expr_1__Expr_mkDataCore___closed__1; -x_2 = lean_unsigned_to_nat(821u); +x_2 = lean_unsigned_to_nat(823u); x_3 = lean_unsigned_to_nat(17u); x_4 = l_Lean_Expr_updateLambda_x21___closed__1; x_5 = l___private_Init_Util_1__mkPanicMessage(x_1, x_2, x_3, x_4); @@ -7834,7 +7834,7 @@ _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4; lean_object* x_5; x_1 = l___private_Init_Lean_Expr_1__Expr_mkDataCore___closed__1; -x_2 = lean_unsigned_to_nat(826u); +x_2 = lean_unsigned_to_nat(828u); x_3 = lean_unsigned_to_nat(17u); x_4 = l_Lean_Expr_updateLambda_x21___closed__1; x_5 = l___private_Init_Util_1__mkPanicMessage(x_1, x_2, x_3, x_4); @@ -7878,7 +7878,7 @@ _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4; lean_object* x_5; x_1 = l___private_Init_Lean_Expr_1__Expr_mkDataCore___closed__1; -x_2 = lean_unsigned_to_nat(835u); +x_2 = lean_unsigned_to_nat(837u); x_3 = lean_unsigned_to_nat(20u); x_4 = l_Lean_Expr_letName_x21___closed__1; x_5 = l___private_Init_Util_1__mkPanicMessage(x_1, x_2, x_3, x_4); diff --git a/stage0/stdlib/Init/Lean/Level.c b/stage0/stdlib/Init/Lean/Level.c index 01ec608d4b..4ae536d489 100644 --- a/stage0/stdlib/Init/Lean/Level.c +++ b/stage0/stdlib/Init/Lean/Level.c @@ -1,6 +1,6 @@ // Lean compiler output // Module: Init.Lean.Level -// Imports: Init.Data.Option.Basic Init.Data.HashMap Init.Data.PersistentHashMap Init.Lean.Data.Name Init.Lean.Data.Format +// Imports: Init.Data.Option.Basic Init.Data.HashMap Init.Data.PersistentHashMap Init.Data.HashSet Init.Data.PersistentHashSet Init.Lean.Data.Name Init.Lean.Data.Format #include "runtime/lean.h" #if defined(__clang__) #pragma clang diagnostic ignored "-Wunused-parameter" @@ -429,7 +429,7 @@ _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4; lean_object* x_5; x_1 = l_Lean_Level_mkData___closed__2; -x_2 = lean_unsigned_to_nat(45u); +x_2 = lean_unsigned_to_nat(47u); x_3 = lean_unsigned_to_nat(33u); x_4 = l_Lean_Level_mkData___closed__3; x_5 = l___private_Init_Util_1__mkPanicMessage(x_1, x_2, x_3, x_4); @@ -1364,7 +1364,7 @@ _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4; lean_object* x_5; x_1 = l_Lean_Level_mkData___closed__2; -x_2 = lean_unsigned_to_nat(157u); +x_2 = lean_unsigned_to_nat(159u); x_3 = lean_unsigned_to_nat(19u); x_4 = l_Lean_Level_mvarId_x21___closed__1; x_5 = l___private_Init_Util_1__mkPanicMessage(x_1, x_2, x_3, x_4); @@ -3798,7 +3798,7 @@ _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4; lean_object* x_5; x_1 = l_Lean_Level_mkData___closed__2; -x_2 = lean_unsigned_to_nat(401u); +x_2 = lean_unsigned_to_nat(403u); x_3 = lean_unsigned_to_nat(16u); x_4 = l_Lean_Level_updateSucc_x21___closed__1; x_5 = l___private_Init_Util_1__mkPanicMessage(x_1, x_2, x_3, x_4); @@ -3847,7 +3847,7 @@ _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4; lean_object* x_5; x_1 = l_Lean_Level_mkData___closed__2; -x_2 = lean_unsigned_to_nat(410u); +x_2 = lean_unsigned_to_nat(412u); x_3 = lean_unsigned_to_nat(19u); x_4 = l_Lean_Level_updateMax_x21___closed__1; x_5 = l___private_Init_Util_1__mkPanicMessage(x_1, x_2, x_3, x_4); @@ -3897,7 +3897,7 @@ _start: { lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4; lean_object* x_5; x_1 = l_Lean_Level_mkData___closed__2; -x_2 = lean_unsigned_to_nat(419u); +x_2 = lean_unsigned_to_nat(421u); x_3 = lean_unsigned_to_nat(20u); x_4 = l_Lean_Level_updateIMax_x21___closed__1; x_5 = l___private_Init_Util_1__mkPanicMessage(x_1, x_2, x_3, x_4); @@ -4056,6 +4056,8 @@ return x_2; lean_object* initialize_Init_Data_Option_Basic(lean_object*); lean_object* initialize_Init_Data_HashMap(lean_object*); lean_object* initialize_Init_Data_PersistentHashMap(lean_object*); +lean_object* initialize_Init_Data_HashSet(lean_object*); +lean_object* initialize_Init_Data_PersistentHashSet(lean_object*); lean_object* initialize_Init_Lean_Data_Name(lean_object*); lean_object* initialize_Init_Lean_Data_Format(lean_object*); static bool _G_initialized = false; @@ -4072,6 +4074,12 @@ lean_dec_ref(res); res = initialize_Init_Data_PersistentHashMap(lean_io_mk_world()); if (lean_io_result_is_error(res)) return res; lean_dec_ref(res); +res = initialize_Init_Data_HashSet(lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +res = initialize_Init_Data_PersistentHashSet(lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); res = initialize_Init_Lean_Data_Name(lean_io_mk_world()); if (lean_io_result_is_error(res)) return res; lean_dec_ref(res); diff --git a/stage0/stdlib/Init/Lean/Meta/Basic.c b/stage0/stdlib/Init/Lean/Meta/Basic.c index 5ef234f27f..8a5a5ad4d6 100644 --- a/stage0/stdlib/Init/Lean/Meta/Basic.c +++ b/stage0/stdlib/Init/Lean/Meta/Basic.c @@ -188,6 +188,7 @@ lean_object* l_Lean_Meta_withTransparency(lean_object*); lean_object* l_Lean_Meta_tracer___closed__5; lean_object* l___private_Init_Lean_Meta_Basic_5__forallTelescopeReducingAuxAux___main___rarg___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*, uint8_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Meta_mkSynthPendingRef___lambda__1(lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Meta_mkForallUsedOnly(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Meta_MetaHasEval___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Meta_withNewLocalInstances___main___at_Lean_Meta_forallTelescopeReducing___spec__4(lean_object*); lean_object* l___private_Init_Lean_Meta_Basic_3__getTraceState___rarg(lean_object*); @@ -355,7 +356,7 @@ lean_object* l_Lean_Meta_mkInferTypeRef(lean_object*); lean_object* l_Lean_Meta_getConstInfo(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Meta_mkLambda(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Meta_getMVarDecl(lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_MetavarContext_MkBinding_mkBinding(uint8_t, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_MetavarContext_MkBinding_mkBinding(uint8_t, lean_object*, lean_object*, lean_object*, uint8_t, lean_object*); lean_object* l_Lean_Meta_getTransparency(lean_object*, lean_object*); lean_object* l_Lean_Meta_instantiateMVars(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Meta_Exception_toStr(lean_object*); @@ -4374,7 +4375,7 @@ lean_ctor_set(x_12, 0, x_9); lean_ctor_set(x_12, 1, x_10); lean_ctor_set(x_12, 2, x_11); x_13 = 0; -x_14 = l_Lean_MetavarContext_MkBinding_mkBinding(x_13, x_6, x_1, x_2, x_12); +x_14 = l_Lean_MetavarContext_MkBinding_mkBinding(x_13, x_6, x_1, x_2, x_13, x_12); if (lean_obj_tag(x_14) == 0) { uint8_t x_15; @@ -4382,263 +4383,274 @@ lean_dec(x_3); x_15 = !lean_is_exclusive(x_14); if (x_15 == 0) { -lean_object* x_16; lean_object* x_17; lean_object* x_18; -x_16 = lean_ctor_get(x_14, 1); -x_17 = lean_ctor_get(x_16, 0); -lean_inc(x_17); -x_18 = lean_ctor_get(x_16, 1); +lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; lean_object* x_20; +x_16 = lean_ctor_get(x_14, 0); +x_17 = lean_ctor_get(x_14, 1); +x_18 = lean_ctor_get(x_16, 0); lean_inc(x_18); lean_dec(x_16); -lean_ctor_set(x_4, 3, x_18); -lean_ctor_set(x_4, 1, x_17); -lean_ctor_set(x_14, 1, x_4); -return x_14; -} -else -{ -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_14, 0); -x_20 = lean_ctor_get(x_14, 1); -lean_inc(x_20); +x_19 = lean_ctor_get(x_17, 0); lean_inc(x_19); -lean_dec(x_14); -x_21 = lean_ctor_get(x_20, 0); -lean_inc(x_21); -x_22 = lean_ctor_get(x_20, 1); -lean_inc(x_22); -lean_dec(x_20); -lean_ctor_set(x_4, 3, x_22); -lean_ctor_set(x_4, 1, x_21); -x_23 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_23, 0, x_19); -lean_ctor_set(x_23, 1, x_4); -return x_23; -} -} -else -{ -uint8_t x_24; -x_24 = !lean_is_exclusive(x_14); -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; lean_object* x_34; lean_object* x_35; lean_object* x_36; -x_25 = lean_ctor_get(x_14, 0); -x_26 = lean_ctor_get(x_14, 1); -x_27 = lean_ctor_get(x_25, 0); -lean_inc(x_27); -x_28 = lean_ctor_get(x_25, 1); -lean_inc(x_28); -x_29 = lean_ctor_get(x_25, 2); -lean_inc(x_29); -x_30 = lean_ctor_get(x_25, 3); -lean_inc(x_30); -lean_dec(x_25); -x_31 = lean_ctor_get(x_3, 0); -lean_inc(x_31); -lean_dec(x_3); -x_32 = lean_ctor_get(x_31, 0); -lean_inc(x_32); -lean_dec(x_31); -lean_inc(x_8); -x_33 = lean_alloc_ctor(0, 4, 0); -lean_ctor_set(x_33, 0, x_8); -lean_ctor_set(x_33, 1, x_27); -lean_ctor_set(x_33, 2, x_28); -lean_ctor_set(x_33, 3, x_32); -x_34 = lean_alloc_ctor(9, 3, 0); -lean_ctor_set(x_34, 0, x_29); -lean_ctor_set(x_34, 1, x_30); -lean_ctor_set(x_34, 2, x_33); -x_35 = lean_ctor_get(x_26, 0); -lean_inc(x_35); -x_36 = lean_ctor_get(x_26, 1); -lean_inc(x_36); -lean_dec(x_26); -lean_ctor_set(x_4, 3, x_36); -lean_ctor_set(x_4, 1, x_35); +x_20 = lean_ctor_get(x_17, 1); +lean_inc(x_20); +lean_dec(x_17); +lean_ctor_set(x_4, 3, x_20); +lean_ctor_set(x_4, 1, x_19); lean_ctor_set(x_14, 1, x_4); -lean_ctor_set(x_14, 0, x_34); +lean_ctor_set(x_14, 0, x_18); return x_14; } else { -lean_object* x_37; lean_object* x_38; lean_object* x_39; lean_object* x_40; lean_object* x_41; lean_object* x_42; lean_object* x_43; lean_object* x_44; lean_object* x_45; lean_object* x_46; lean_object* x_47; lean_object* x_48; lean_object* x_49; -x_37 = lean_ctor_get(x_14, 0); -x_38 = lean_ctor_get(x_14, 1); -lean_inc(x_38); -lean_inc(x_37); +lean_object* x_21; lean_object* x_22; lean_object* x_23; lean_object* x_24; lean_object* x_25; lean_object* x_26; +x_21 = lean_ctor_get(x_14, 0); +x_22 = lean_ctor_get(x_14, 1); +lean_inc(x_22); +lean_inc(x_21); lean_dec(x_14); -x_39 = lean_ctor_get(x_37, 0); -lean_inc(x_39); -x_40 = lean_ctor_get(x_37, 1); -lean_inc(x_40); -x_41 = lean_ctor_get(x_37, 2); -lean_inc(x_41); -x_42 = lean_ctor_get(x_37, 3); -lean_inc(x_42); -lean_dec(x_37); -x_43 = lean_ctor_get(x_3, 0); -lean_inc(x_43); +x_23 = lean_ctor_get(x_21, 0); +lean_inc(x_23); +lean_dec(x_21); +x_24 = lean_ctor_get(x_22, 0); +lean_inc(x_24); +x_25 = lean_ctor_get(x_22, 1); +lean_inc(x_25); +lean_dec(x_22); +lean_ctor_set(x_4, 3, x_25); +lean_ctor_set(x_4, 1, x_24); +x_26 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_26, 0, x_23); +lean_ctor_set(x_26, 1, x_4); +return x_26; +} +} +else +{ +uint8_t x_27; +x_27 = !lean_is_exclusive(x_14); +if (x_27 == 0) +{ +lean_object* x_28; lean_object* x_29; lean_object* x_30; lean_object* x_31; lean_object* x_32; lean_object* x_33; lean_object* x_34; lean_object* x_35; lean_object* x_36; lean_object* x_37; lean_object* x_38; lean_object* x_39; +x_28 = lean_ctor_get(x_14, 0); +x_29 = lean_ctor_get(x_14, 1); +x_30 = lean_ctor_get(x_28, 0); +lean_inc(x_30); +x_31 = lean_ctor_get(x_28, 1); +lean_inc(x_31); +x_32 = lean_ctor_get(x_28, 2); +lean_inc(x_32); +x_33 = lean_ctor_get(x_28, 3); +lean_inc(x_33); +lean_dec(x_28); +x_34 = lean_ctor_get(x_3, 0); +lean_inc(x_34); lean_dec(x_3); -x_44 = lean_ctor_get(x_43, 0); -lean_inc(x_44); -lean_dec(x_43); +x_35 = lean_ctor_get(x_34, 0); +lean_inc(x_35); +lean_dec(x_34); lean_inc(x_8); -x_45 = lean_alloc_ctor(0, 4, 0); -lean_ctor_set(x_45, 0, x_8); -lean_ctor_set(x_45, 1, x_39); -lean_ctor_set(x_45, 2, x_40); -lean_ctor_set(x_45, 3, x_44); -x_46 = lean_alloc_ctor(9, 3, 0); -lean_ctor_set(x_46, 0, x_41); -lean_ctor_set(x_46, 1, x_42); -lean_ctor_set(x_46, 2, x_45); -x_47 = lean_ctor_get(x_38, 0); +x_36 = lean_alloc_ctor(0, 4, 0); +lean_ctor_set(x_36, 0, x_8); +lean_ctor_set(x_36, 1, x_30); +lean_ctor_set(x_36, 2, x_31); +lean_ctor_set(x_36, 3, x_35); +x_37 = lean_alloc_ctor(9, 3, 0); +lean_ctor_set(x_37, 0, x_32); +lean_ctor_set(x_37, 1, x_33); +lean_ctor_set(x_37, 2, x_36); +x_38 = lean_ctor_get(x_29, 0); +lean_inc(x_38); +x_39 = lean_ctor_get(x_29, 1); +lean_inc(x_39); +lean_dec(x_29); +lean_ctor_set(x_4, 3, x_39); +lean_ctor_set(x_4, 1, x_38); +lean_ctor_set(x_14, 1, x_4); +lean_ctor_set(x_14, 0, x_37); +return x_14; +} +else +{ +lean_object* x_40; lean_object* x_41; lean_object* x_42; lean_object* x_43; lean_object* x_44; lean_object* x_45; lean_object* x_46; lean_object* x_47; lean_object* x_48; lean_object* x_49; lean_object* x_50; lean_object* x_51; lean_object* x_52; +x_40 = lean_ctor_get(x_14, 0); +x_41 = lean_ctor_get(x_14, 1); +lean_inc(x_41); +lean_inc(x_40); +lean_dec(x_14); +x_42 = lean_ctor_get(x_40, 0); +lean_inc(x_42); +x_43 = lean_ctor_get(x_40, 1); +lean_inc(x_43); +x_44 = lean_ctor_get(x_40, 2); +lean_inc(x_44); +x_45 = lean_ctor_get(x_40, 3); +lean_inc(x_45); +lean_dec(x_40); +x_46 = lean_ctor_get(x_3, 0); +lean_inc(x_46); +lean_dec(x_3); +x_47 = lean_ctor_get(x_46, 0); lean_inc(x_47); -x_48 = lean_ctor_get(x_38, 1); -lean_inc(x_48); -lean_dec(x_38); -lean_ctor_set(x_4, 3, x_48); -lean_ctor_set(x_4, 1, x_47); -x_49 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_49, 0, x_46); -lean_ctor_set(x_49, 1, x_4); -return x_49; +lean_dec(x_46); +lean_inc(x_8); +x_48 = lean_alloc_ctor(0, 4, 0); +lean_ctor_set(x_48, 0, x_8); +lean_ctor_set(x_48, 1, x_42); +lean_ctor_set(x_48, 2, x_43); +lean_ctor_set(x_48, 3, x_47); +x_49 = lean_alloc_ctor(9, 3, 0); +lean_ctor_set(x_49, 0, x_44); +lean_ctor_set(x_49, 1, x_45); +lean_ctor_set(x_49, 2, x_48); +x_50 = lean_ctor_get(x_41, 0); +lean_inc(x_50); +x_51 = lean_ctor_get(x_41, 1); +lean_inc(x_51); +lean_dec(x_41); +lean_ctor_set(x_4, 3, x_51); +lean_ctor_set(x_4, 1, x_50); +x_52 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_52, 0, x_49); +lean_ctor_set(x_52, 1, x_4); +return x_52; } } } else { -lean_object* x_50; lean_object* x_51; lean_object* x_52; lean_object* x_53; lean_object* x_54; lean_object* x_55; lean_object* x_56; lean_object* x_57; uint8_t x_58; lean_object* x_59; -x_50 = lean_ctor_get(x_4, 0); -x_51 = lean_ctor_get(x_4, 1); -x_52 = lean_ctor_get(x_4, 2); -x_53 = lean_ctor_get(x_4, 3); -x_54 = lean_ctor_get(x_4, 4); -x_55 = lean_ctor_get(x_4, 5); +lean_object* x_53; lean_object* x_54; lean_object* x_55; lean_object* x_56; lean_object* x_57; lean_object* x_58; lean_object* x_59; lean_object* x_60; uint8_t x_61; lean_object* x_62; +x_53 = lean_ctor_get(x_4, 0); +x_54 = lean_ctor_get(x_4, 1); +x_55 = lean_ctor_get(x_4, 2); +x_56 = lean_ctor_get(x_4, 3); +x_57 = lean_ctor_get(x_4, 4); +x_58 = lean_ctor_get(x_4, 5); +lean_inc(x_58); +lean_inc(x_57); +lean_inc(x_56); lean_inc(x_55); lean_inc(x_54); lean_inc(x_53); -lean_inc(x_52); -lean_inc(x_51); -lean_inc(x_50); lean_dec(x_4); -x_56 = l_HashMap_Inhabited___closed__1; -x_57 = lean_alloc_ctor(0, 3, 0); -lean_ctor_set(x_57, 0, x_51); -lean_ctor_set(x_57, 1, x_53); -lean_ctor_set(x_57, 2, x_56); -x_58 = 0; -x_59 = l_Lean_MetavarContext_MkBinding_mkBinding(x_58, x_6, x_1, x_2, x_57); -if (lean_obj_tag(x_59) == 0) +x_59 = l_HashMap_Inhabited___closed__1; +x_60 = lean_alloc_ctor(0, 3, 0); +lean_ctor_set(x_60, 0, x_54); +lean_ctor_set(x_60, 1, x_56); +lean_ctor_set(x_60, 2, x_59); +x_61 = 0; +x_62 = l_Lean_MetavarContext_MkBinding_mkBinding(x_61, x_6, x_1, x_2, x_61, x_60); +if (lean_obj_tag(x_62) == 0) { -lean_object* x_60; lean_object* x_61; lean_object* x_62; lean_object* x_63; lean_object* x_64; lean_object* x_65; lean_object* x_66; +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_3); -x_60 = lean_ctor_get(x_59, 0); -lean_inc(x_60); -x_61 = lean_ctor_get(x_59, 1); -lean_inc(x_61); -if (lean_is_exclusive(x_59)) { - lean_ctor_release(x_59, 0); - lean_ctor_release(x_59, 1); - x_62 = x_59; -} else { - lean_dec_ref(x_59); - x_62 = lean_box(0); -} -x_63 = lean_ctor_get(x_61, 0); +x_63 = lean_ctor_get(x_62, 0); lean_inc(x_63); -x_64 = lean_ctor_get(x_61, 1); +x_64 = lean_ctor_get(x_62, 1); lean_inc(x_64); -lean_dec(x_61); -x_65 = lean_alloc_ctor(0, 6, 0); -lean_ctor_set(x_65, 0, x_50); -lean_ctor_set(x_65, 1, x_63); -lean_ctor_set(x_65, 2, x_52); -lean_ctor_set(x_65, 3, x_64); -lean_ctor_set(x_65, 4, x_54); -lean_ctor_set(x_65, 5, x_55); -if (lean_is_scalar(x_62)) { - x_66 = lean_alloc_ctor(0, 2, 0); +if (lean_is_exclusive(x_62)) { + lean_ctor_release(x_62, 0); + lean_ctor_release(x_62, 1); + x_65 = x_62; } else { - x_66 = x_62; + lean_dec_ref(x_62); + x_65 = lean_box(0); } -lean_ctor_set(x_66, 0, x_60); -lean_ctor_set(x_66, 1, x_65); -return x_66; -} -else -{ -lean_object* x_67; lean_object* x_68; lean_object* x_69; lean_object* x_70; lean_object* x_71; lean_object* x_72; lean_object* x_73; lean_object* x_74; lean_object* x_75; lean_object* x_76; lean_object* x_77; lean_object* x_78; lean_object* x_79; lean_object* x_80; lean_object* x_81; -x_67 = lean_ctor_get(x_59, 0); +x_66 = lean_ctor_get(x_63, 0); +lean_inc(x_66); +lean_dec(x_63); +x_67 = lean_ctor_get(x_64, 0); lean_inc(x_67); -x_68 = lean_ctor_get(x_59, 1); +x_68 = lean_ctor_get(x_64, 1); lean_inc(x_68); -if (lean_is_exclusive(x_59)) { - lean_ctor_release(x_59, 0); - lean_ctor_release(x_59, 1); - x_69 = x_59; +lean_dec(x_64); +x_69 = lean_alloc_ctor(0, 6, 0); +lean_ctor_set(x_69, 0, x_53); +lean_ctor_set(x_69, 1, x_67); +lean_ctor_set(x_69, 2, x_55); +lean_ctor_set(x_69, 3, x_68); +lean_ctor_set(x_69, 4, x_57); +lean_ctor_set(x_69, 5, x_58); +if (lean_is_scalar(x_65)) { + x_70 = lean_alloc_ctor(0, 2, 0); } else { - lean_dec_ref(x_59); - x_69 = lean_box(0); + x_70 = x_65; } -x_70 = lean_ctor_get(x_67, 0); -lean_inc(x_70); -x_71 = lean_ctor_get(x_67, 1); +lean_ctor_set(x_70, 0, x_66); +lean_ctor_set(x_70, 1, x_69); +return x_70; +} +else +{ +lean_object* x_71; lean_object* x_72; lean_object* x_73; lean_object* x_74; lean_object* x_75; lean_object* x_76; lean_object* x_77; lean_object* x_78; lean_object* x_79; lean_object* x_80; lean_object* x_81; lean_object* x_82; lean_object* x_83; lean_object* x_84; lean_object* x_85; +x_71 = lean_ctor_get(x_62, 0); lean_inc(x_71); -x_72 = lean_ctor_get(x_67, 2); +x_72 = lean_ctor_get(x_62, 1); lean_inc(x_72); -x_73 = lean_ctor_get(x_67, 3); -lean_inc(x_73); -lean_dec(x_67); -x_74 = lean_ctor_get(x_3, 0); -lean_inc(x_74); -lean_dec(x_3); -x_75 = lean_ctor_get(x_74, 0); -lean_inc(x_75); -lean_dec(x_74); -lean_inc(x_50); -x_76 = lean_alloc_ctor(0, 4, 0); -lean_ctor_set(x_76, 0, x_50); -lean_ctor_set(x_76, 1, x_70); -lean_ctor_set(x_76, 2, x_71); -lean_ctor_set(x_76, 3, x_75); -x_77 = lean_alloc_ctor(9, 3, 0); -lean_ctor_set(x_77, 0, x_72); -lean_ctor_set(x_77, 1, x_73); -lean_ctor_set(x_77, 2, x_76); -x_78 = lean_ctor_get(x_68, 0); -lean_inc(x_78); -x_79 = lean_ctor_get(x_68, 1); -lean_inc(x_79); -lean_dec(x_68); -x_80 = lean_alloc_ctor(0, 6, 0); -lean_ctor_set(x_80, 0, x_50); -lean_ctor_set(x_80, 1, x_78); -lean_ctor_set(x_80, 2, x_52); -lean_ctor_set(x_80, 3, x_79); -lean_ctor_set(x_80, 4, x_54); -lean_ctor_set(x_80, 5, x_55); -if (lean_is_scalar(x_69)) { - x_81 = lean_alloc_ctor(1, 2, 0); +if (lean_is_exclusive(x_62)) { + lean_ctor_release(x_62, 0); + lean_ctor_release(x_62, 1); + x_73 = x_62; } else { - x_81 = x_69; + lean_dec_ref(x_62); + x_73 = lean_box(0); } -lean_ctor_set(x_81, 0, x_77); -lean_ctor_set(x_81, 1, x_80); -return x_81; +x_74 = lean_ctor_get(x_71, 0); +lean_inc(x_74); +x_75 = lean_ctor_get(x_71, 1); +lean_inc(x_75); +x_76 = lean_ctor_get(x_71, 2); +lean_inc(x_76); +x_77 = lean_ctor_get(x_71, 3); +lean_inc(x_77); +lean_dec(x_71); +x_78 = lean_ctor_get(x_3, 0); +lean_inc(x_78); +lean_dec(x_3); +x_79 = lean_ctor_get(x_78, 0); +lean_inc(x_79); +lean_dec(x_78); +lean_inc(x_53); +x_80 = lean_alloc_ctor(0, 4, 0); +lean_ctor_set(x_80, 0, x_53); +lean_ctor_set(x_80, 1, x_74); +lean_ctor_set(x_80, 2, x_75); +lean_ctor_set(x_80, 3, x_79); +x_81 = lean_alloc_ctor(9, 3, 0); +lean_ctor_set(x_81, 0, x_76); +lean_ctor_set(x_81, 1, x_77); +lean_ctor_set(x_81, 2, x_80); +x_82 = lean_ctor_get(x_72, 0); +lean_inc(x_82); +x_83 = lean_ctor_get(x_72, 1); +lean_inc(x_83); +lean_dec(x_72); +x_84 = lean_alloc_ctor(0, 6, 0); +lean_ctor_set(x_84, 0, x_53); +lean_ctor_set(x_84, 1, x_82); +lean_ctor_set(x_84, 2, x_55); +lean_ctor_set(x_84, 3, x_83); +lean_ctor_set(x_84, 4, x_57); +lean_ctor_set(x_84, 5, x_58); +if (lean_is_scalar(x_73)) { + x_85 = lean_alloc_ctor(1, 2, 0); +} else { + x_85 = x_73; +} +lean_ctor_set(x_85, 0, x_81); +lean_ctor_set(x_85, 1, x_84); +return x_85; } } } else { -lean_object* x_82; +lean_object* x_86; lean_dec(x_3); lean_dec(x_1); -x_82 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_82, 0, x_2); -lean_ctor_set(x_82, 1, x_4); -return x_82; +x_86 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_86, 0, x_2); +lean_ctor_set(x_86, 1, x_4); +return x_86; } } } @@ -4655,7 +4667,7 @@ lean_inc(x_6); x_7 = !lean_is_exclusive(x_4); if (x_7 == 0) { -lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; uint8_t x_13; lean_object* x_14; +lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; uint8_t x_13; uint8_t x_14; lean_object* x_15; x_8 = lean_ctor_get(x_4, 0); x_9 = lean_ctor_get(x_4, 1); x_10 = lean_ctor_get(x_4, 3); @@ -4665,271 +4677,581 @@ lean_ctor_set(x_12, 0, x_9); lean_ctor_set(x_12, 1, x_10); lean_ctor_set(x_12, 2, x_11); x_13 = 1; -x_14 = l_Lean_MetavarContext_MkBinding_mkBinding(x_13, x_6, x_1, x_2, x_12); -if (lean_obj_tag(x_14) == 0) +x_14 = 0; +x_15 = l_Lean_MetavarContext_MkBinding_mkBinding(x_13, x_6, x_1, x_2, x_14, x_12); +if (lean_obj_tag(x_15) == 0) { -uint8_t x_15; +uint8_t x_16; lean_dec(x_3); -x_15 = !lean_is_exclusive(x_14); -if (x_15 == 0) +x_16 = !lean_is_exclusive(x_15); +if (x_16 == 0) { -lean_object* x_16; lean_object* x_17; lean_object* x_18; -x_16 = lean_ctor_get(x_14, 1); -x_17 = lean_ctor_get(x_16, 0); -lean_inc(x_17); -x_18 = lean_ctor_get(x_16, 1); -lean_inc(x_18); -lean_dec(x_16); -lean_ctor_set(x_4, 3, x_18); -lean_ctor_set(x_4, 1, x_17); -lean_ctor_set(x_14, 1, x_4); -return x_14; -} -else -{ -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_14, 0); -x_20 = lean_ctor_get(x_14, 1); -lean_inc(x_20); +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_15, 0); +x_18 = lean_ctor_get(x_15, 1); +x_19 = lean_ctor_get(x_17, 0); lean_inc(x_19); -lean_dec(x_14); -x_21 = lean_ctor_get(x_20, 0); +lean_dec(x_17); +x_20 = lean_ctor_get(x_18, 0); +lean_inc(x_20); +x_21 = lean_ctor_get(x_18, 1); lean_inc(x_21); -x_22 = lean_ctor_get(x_20, 1); +lean_dec(x_18); +lean_ctor_set(x_4, 3, x_21); +lean_ctor_set(x_4, 1, x_20); +lean_ctor_set(x_15, 1, x_4); +lean_ctor_set(x_15, 0, x_19); +return x_15; +} +else +{ +lean_object* x_22; lean_object* x_23; lean_object* x_24; lean_object* x_25; lean_object* x_26; lean_object* x_27; +x_22 = lean_ctor_get(x_15, 0); +x_23 = lean_ctor_get(x_15, 1); +lean_inc(x_23); lean_inc(x_22); -lean_dec(x_20); -lean_ctor_set(x_4, 3, x_22); -lean_ctor_set(x_4, 1, x_21); -x_23 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_23, 0, x_19); -lean_ctor_set(x_23, 1, x_4); -return x_23; +lean_dec(x_15); +x_24 = lean_ctor_get(x_22, 0); +lean_inc(x_24); +lean_dec(x_22); +x_25 = lean_ctor_get(x_23, 0); +lean_inc(x_25); +x_26 = lean_ctor_get(x_23, 1); +lean_inc(x_26); +lean_dec(x_23); +lean_ctor_set(x_4, 3, x_26); +lean_ctor_set(x_4, 1, x_25); +x_27 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_27, 0, x_24); +lean_ctor_set(x_27, 1, x_4); +return x_27; } } else { -uint8_t x_24; -x_24 = !lean_is_exclusive(x_14); -if (x_24 == 0) +uint8_t x_28; +x_28 = !lean_is_exclusive(x_15); +if (x_28 == 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; -x_25 = lean_ctor_get(x_14, 0); -x_26 = lean_ctor_get(x_14, 1); -x_27 = lean_ctor_get(x_25, 0); -lean_inc(x_27); -x_28 = lean_ctor_get(x_25, 1); -lean_inc(x_28); -x_29 = lean_ctor_get(x_25, 2); -lean_inc(x_29); -x_30 = lean_ctor_get(x_25, 3); -lean_inc(x_30); -lean_dec(x_25); -x_31 = lean_ctor_get(x_3, 0); +lean_object* x_29; lean_object* x_30; lean_object* x_31; lean_object* x_32; lean_object* x_33; lean_object* x_34; lean_object* x_35; lean_object* x_36; lean_object* x_37; lean_object* x_38; lean_object* x_39; lean_object* x_40; +x_29 = lean_ctor_get(x_15, 0); +x_30 = lean_ctor_get(x_15, 1); +x_31 = lean_ctor_get(x_29, 0); lean_inc(x_31); -lean_dec(x_3); -x_32 = lean_ctor_get(x_31, 0); +x_32 = lean_ctor_get(x_29, 1); lean_inc(x_32); -lean_dec(x_31); -lean_inc(x_8); -x_33 = lean_alloc_ctor(0, 4, 0); -lean_ctor_set(x_33, 0, x_8); -lean_ctor_set(x_33, 1, x_27); -lean_ctor_set(x_33, 2, x_28); -lean_ctor_set(x_33, 3, x_32); -x_34 = lean_alloc_ctor(9, 3, 0); -lean_ctor_set(x_34, 0, x_29); -lean_ctor_set(x_34, 1, x_30); -lean_ctor_set(x_34, 2, x_33); -x_35 = lean_ctor_get(x_26, 0); +x_33 = lean_ctor_get(x_29, 2); +lean_inc(x_33); +x_34 = lean_ctor_get(x_29, 3); +lean_inc(x_34); +lean_dec(x_29); +x_35 = lean_ctor_get(x_3, 0); lean_inc(x_35); -x_36 = lean_ctor_get(x_26, 1); -lean_inc(x_36); -lean_dec(x_26); -lean_ctor_set(x_4, 3, x_36); -lean_ctor_set(x_4, 1, x_35); -lean_ctor_set(x_14, 1, x_4); -lean_ctor_set(x_14, 0, x_34); -return x_14; -} -else -{ -lean_object* x_37; lean_object* x_38; lean_object* x_39; lean_object* x_40; lean_object* x_41; lean_object* x_42; lean_object* x_43; lean_object* x_44; lean_object* x_45; lean_object* x_46; lean_object* x_47; lean_object* x_48; lean_object* x_49; -x_37 = lean_ctor_get(x_14, 0); -x_38 = lean_ctor_get(x_14, 1); -lean_inc(x_38); -lean_inc(x_37); -lean_dec(x_14); -x_39 = lean_ctor_get(x_37, 0); -lean_inc(x_39); -x_40 = lean_ctor_get(x_37, 1); -lean_inc(x_40); -x_41 = lean_ctor_get(x_37, 2); -lean_inc(x_41); -x_42 = lean_ctor_get(x_37, 3); -lean_inc(x_42); -lean_dec(x_37); -x_43 = lean_ctor_get(x_3, 0); -lean_inc(x_43); lean_dec(x_3); -x_44 = lean_ctor_get(x_43, 0); -lean_inc(x_44); -lean_dec(x_43); +x_36 = lean_ctor_get(x_35, 0); +lean_inc(x_36); +lean_dec(x_35); lean_inc(x_8); -x_45 = lean_alloc_ctor(0, 4, 0); -lean_ctor_set(x_45, 0, x_8); -lean_ctor_set(x_45, 1, x_39); -lean_ctor_set(x_45, 2, x_40); -lean_ctor_set(x_45, 3, x_44); -x_46 = lean_alloc_ctor(9, 3, 0); -lean_ctor_set(x_46, 0, x_41); -lean_ctor_set(x_46, 1, x_42); -lean_ctor_set(x_46, 2, x_45); -x_47 = lean_ctor_get(x_38, 0); +x_37 = lean_alloc_ctor(0, 4, 0); +lean_ctor_set(x_37, 0, x_8); +lean_ctor_set(x_37, 1, x_31); +lean_ctor_set(x_37, 2, x_32); +lean_ctor_set(x_37, 3, x_36); +x_38 = lean_alloc_ctor(9, 3, 0); +lean_ctor_set(x_38, 0, x_33); +lean_ctor_set(x_38, 1, x_34); +lean_ctor_set(x_38, 2, x_37); +x_39 = lean_ctor_get(x_30, 0); +lean_inc(x_39); +x_40 = lean_ctor_get(x_30, 1); +lean_inc(x_40); +lean_dec(x_30); +lean_ctor_set(x_4, 3, x_40); +lean_ctor_set(x_4, 1, x_39); +lean_ctor_set(x_15, 1, x_4); +lean_ctor_set(x_15, 0, x_38); +return x_15; +} +else +{ +lean_object* x_41; lean_object* x_42; lean_object* x_43; lean_object* x_44; lean_object* x_45; lean_object* x_46; lean_object* x_47; lean_object* x_48; lean_object* x_49; lean_object* x_50; lean_object* x_51; lean_object* x_52; lean_object* x_53; +x_41 = lean_ctor_get(x_15, 0); +x_42 = lean_ctor_get(x_15, 1); +lean_inc(x_42); +lean_inc(x_41); +lean_dec(x_15); +x_43 = lean_ctor_get(x_41, 0); +lean_inc(x_43); +x_44 = lean_ctor_get(x_41, 1); +lean_inc(x_44); +x_45 = lean_ctor_get(x_41, 2); +lean_inc(x_45); +x_46 = lean_ctor_get(x_41, 3); +lean_inc(x_46); +lean_dec(x_41); +x_47 = lean_ctor_get(x_3, 0); lean_inc(x_47); -x_48 = lean_ctor_get(x_38, 1); +lean_dec(x_3); +x_48 = lean_ctor_get(x_47, 0); lean_inc(x_48); -lean_dec(x_38); -lean_ctor_set(x_4, 3, x_48); -lean_ctor_set(x_4, 1, x_47); -x_49 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_49, 0, x_46); -lean_ctor_set(x_49, 1, x_4); -return x_49; +lean_dec(x_47); +lean_inc(x_8); +x_49 = lean_alloc_ctor(0, 4, 0); +lean_ctor_set(x_49, 0, x_8); +lean_ctor_set(x_49, 1, x_43); +lean_ctor_set(x_49, 2, x_44); +lean_ctor_set(x_49, 3, x_48); +x_50 = lean_alloc_ctor(9, 3, 0); +lean_ctor_set(x_50, 0, x_45); +lean_ctor_set(x_50, 1, x_46); +lean_ctor_set(x_50, 2, x_49); +x_51 = lean_ctor_get(x_42, 0); +lean_inc(x_51); +x_52 = lean_ctor_get(x_42, 1); +lean_inc(x_52); +lean_dec(x_42); +lean_ctor_set(x_4, 3, x_52); +lean_ctor_set(x_4, 1, x_51); +x_53 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_53, 0, x_50); +lean_ctor_set(x_53, 1, x_4); +return x_53; } } } else { -lean_object* x_50; lean_object* x_51; lean_object* x_52; lean_object* x_53; lean_object* x_54; lean_object* x_55; lean_object* x_56; lean_object* x_57; uint8_t x_58; lean_object* x_59; -x_50 = lean_ctor_get(x_4, 0); -x_51 = lean_ctor_get(x_4, 1); -x_52 = lean_ctor_get(x_4, 2); -x_53 = lean_ctor_get(x_4, 3); -x_54 = lean_ctor_get(x_4, 4); -x_55 = lean_ctor_get(x_4, 5); +lean_object* x_54; lean_object* x_55; lean_object* x_56; lean_object* x_57; lean_object* x_58; lean_object* x_59; lean_object* x_60; lean_object* x_61; uint8_t x_62; uint8_t x_63; lean_object* x_64; +x_54 = lean_ctor_get(x_4, 0); +x_55 = lean_ctor_get(x_4, 1); +x_56 = lean_ctor_get(x_4, 2); +x_57 = lean_ctor_get(x_4, 3); +x_58 = lean_ctor_get(x_4, 4); +x_59 = lean_ctor_get(x_4, 5); +lean_inc(x_59); +lean_inc(x_58); +lean_inc(x_57); +lean_inc(x_56); +lean_inc(x_55); +lean_inc(x_54); +lean_dec(x_4); +x_60 = l_HashMap_Inhabited___closed__1; +x_61 = lean_alloc_ctor(0, 3, 0); +lean_ctor_set(x_61, 0, x_55); +lean_ctor_set(x_61, 1, x_57); +lean_ctor_set(x_61, 2, x_60); +x_62 = 1; +x_63 = 0; +x_64 = l_Lean_MetavarContext_MkBinding_mkBinding(x_62, x_6, x_1, x_2, x_63, x_61); +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; lean_object* x_70; lean_object* x_71; lean_object* x_72; +lean_dec(x_3); +x_65 = lean_ctor_get(x_64, 0); +lean_inc(x_65); +x_66 = lean_ctor_get(x_64, 1); +lean_inc(x_66); +if (lean_is_exclusive(x_64)) { + lean_ctor_release(x_64, 0); + lean_ctor_release(x_64, 1); + x_67 = x_64; +} else { + lean_dec_ref(x_64); + x_67 = lean_box(0); +} +x_68 = lean_ctor_get(x_65, 0); +lean_inc(x_68); +lean_dec(x_65); +x_69 = lean_ctor_get(x_66, 0); +lean_inc(x_69); +x_70 = lean_ctor_get(x_66, 1); +lean_inc(x_70); +lean_dec(x_66); +x_71 = lean_alloc_ctor(0, 6, 0); +lean_ctor_set(x_71, 0, x_54); +lean_ctor_set(x_71, 1, x_69); +lean_ctor_set(x_71, 2, x_56); +lean_ctor_set(x_71, 3, x_70); +lean_ctor_set(x_71, 4, x_58); +lean_ctor_set(x_71, 5, x_59); +if (lean_is_scalar(x_67)) { + x_72 = lean_alloc_ctor(0, 2, 0); +} else { + x_72 = x_67; +} +lean_ctor_set(x_72, 0, x_68); +lean_ctor_set(x_72, 1, x_71); +return x_72; +} +else +{ +lean_object* x_73; lean_object* x_74; lean_object* x_75; lean_object* x_76; lean_object* x_77; lean_object* x_78; lean_object* x_79; lean_object* x_80; lean_object* x_81; lean_object* x_82; lean_object* x_83; lean_object* x_84; lean_object* x_85; lean_object* x_86; lean_object* x_87; +x_73 = lean_ctor_get(x_64, 0); +lean_inc(x_73); +x_74 = lean_ctor_get(x_64, 1); +lean_inc(x_74); +if (lean_is_exclusive(x_64)) { + lean_ctor_release(x_64, 0); + lean_ctor_release(x_64, 1); + x_75 = x_64; +} else { + lean_dec_ref(x_64); + x_75 = lean_box(0); +} +x_76 = lean_ctor_get(x_73, 0); +lean_inc(x_76); +x_77 = lean_ctor_get(x_73, 1); +lean_inc(x_77); +x_78 = lean_ctor_get(x_73, 2); +lean_inc(x_78); +x_79 = lean_ctor_get(x_73, 3); +lean_inc(x_79); +lean_dec(x_73); +x_80 = lean_ctor_get(x_3, 0); +lean_inc(x_80); +lean_dec(x_3); +x_81 = lean_ctor_get(x_80, 0); +lean_inc(x_81); +lean_dec(x_80); +lean_inc(x_54); +x_82 = lean_alloc_ctor(0, 4, 0); +lean_ctor_set(x_82, 0, x_54); +lean_ctor_set(x_82, 1, x_76); +lean_ctor_set(x_82, 2, x_77); +lean_ctor_set(x_82, 3, x_81); +x_83 = lean_alloc_ctor(9, 3, 0); +lean_ctor_set(x_83, 0, x_78); +lean_ctor_set(x_83, 1, x_79); +lean_ctor_set(x_83, 2, x_82); +x_84 = lean_ctor_get(x_74, 0); +lean_inc(x_84); +x_85 = lean_ctor_get(x_74, 1); +lean_inc(x_85); +lean_dec(x_74); +x_86 = lean_alloc_ctor(0, 6, 0); +lean_ctor_set(x_86, 0, x_54); +lean_ctor_set(x_86, 1, x_84); +lean_ctor_set(x_86, 2, x_56); +lean_ctor_set(x_86, 3, x_85); +lean_ctor_set(x_86, 4, x_58); +lean_ctor_set(x_86, 5, x_59); +if (lean_is_scalar(x_75)) { + x_87 = lean_alloc_ctor(1, 2, 0); +} else { + x_87 = x_75; +} +lean_ctor_set(x_87, 0, x_83); +lean_ctor_set(x_87, 1, x_86); +return x_87; +} +} +} +else +{ +lean_object* x_88; +lean_dec(x_3); +lean_dec(x_1); +x_88 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_88, 0, x_2); +lean_ctor_set(x_88, 1, x_4); +return x_88; +} +} +} +lean_object* l_Lean_Meta_mkForallUsedOnly(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { +_start: +{ +uint8_t x_5; +x_5 = l_Array_isEmpty___rarg(x_1); +if (x_5 == 0) +{ +lean_object* x_6; uint8_t x_7; +x_6 = lean_ctor_get(x_3, 1); +lean_inc(x_6); +x_7 = !lean_is_exclusive(x_4); +if (x_7 == 0) +{ +lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; uint8_t x_13; uint8_t x_14; lean_object* x_15; +x_8 = lean_ctor_get(x_4, 0); +x_9 = lean_ctor_get(x_4, 1); +x_10 = lean_ctor_get(x_4, 3); +x_11 = l_HashMap_Inhabited___closed__1; +x_12 = lean_alloc_ctor(0, 3, 0); +lean_ctor_set(x_12, 0, x_9); +lean_ctor_set(x_12, 1, x_10); +lean_ctor_set(x_12, 2, x_11); +x_13 = 0; +x_14 = 1; +x_15 = l_Lean_MetavarContext_MkBinding_mkBinding(x_13, x_6, x_1, x_2, x_14, x_12); +if (lean_obj_tag(x_15) == 0) +{ +uint8_t x_16; +lean_dec(x_3); +x_16 = !lean_is_exclusive(x_15); +if (x_16 == 0) +{ +lean_object* x_17; lean_object* x_18; lean_object* x_19; +x_17 = lean_ctor_get(x_15, 1); +x_18 = lean_ctor_get(x_17, 0); +lean_inc(x_18); +x_19 = lean_ctor_get(x_17, 1); +lean_inc(x_19); +lean_dec(x_17); +lean_ctor_set(x_4, 3, x_19); +lean_ctor_set(x_4, 1, x_18); +lean_ctor_set(x_15, 1, x_4); +return x_15; +} +else +{ +lean_object* x_20; lean_object* x_21; lean_object* x_22; lean_object* x_23; lean_object* x_24; +x_20 = lean_ctor_get(x_15, 0); +x_21 = lean_ctor_get(x_15, 1); +lean_inc(x_21); +lean_inc(x_20); +lean_dec(x_15); +x_22 = lean_ctor_get(x_21, 0); +lean_inc(x_22); +x_23 = lean_ctor_get(x_21, 1); +lean_inc(x_23); +lean_dec(x_21); +lean_ctor_set(x_4, 3, x_23); +lean_ctor_set(x_4, 1, x_22); +x_24 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_24, 0, x_20); +lean_ctor_set(x_24, 1, x_4); +return x_24; +} +} +else +{ +uint8_t x_25; +x_25 = !lean_is_exclusive(x_15); +if (x_25 == 0) +{ +lean_object* x_26; lean_object* x_27; lean_object* x_28; lean_object* x_29; lean_object* x_30; lean_object* x_31; lean_object* x_32; lean_object* x_33; lean_object* x_34; lean_object* x_35; lean_object* x_36; lean_object* x_37; +x_26 = lean_ctor_get(x_15, 0); +x_27 = lean_ctor_get(x_15, 1); +x_28 = lean_ctor_get(x_26, 0); +lean_inc(x_28); +x_29 = lean_ctor_get(x_26, 1); +lean_inc(x_29); +x_30 = lean_ctor_get(x_26, 2); +lean_inc(x_30); +x_31 = lean_ctor_get(x_26, 3); +lean_inc(x_31); +lean_dec(x_26); +x_32 = lean_ctor_get(x_3, 0); +lean_inc(x_32); +lean_dec(x_3); +x_33 = lean_ctor_get(x_32, 0); +lean_inc(x_33); +lean_dec(x_32); +lean_inc(x_8); +x_34 = lean_alloc_ctor(0, 4, 0); +lean_ctor_set(x_34, 0, x_8); +lean_ctor_set(x_34, 1, x_28); +lean_ctor_set(x_34, 2, x_29); +lean_ctor_set(x_34, 3, x_33); +x_35 = lean_alloc_ctor(9, 3, 0); +lean_ctor_set(x_35, 0, x_30); +lean_ctor_set(x_35, 1, x_31); +lean_ctor_set(x_35, 2, x_34); +x_36 = lean_ctor_get(x_27, 0); +lean_inc(x_36); +x_37 = lean_ctor_get(x_27, 1); +lean_inc(x_37); +lean_dec(x_27); +lean_ctor_set(x_4, 3, x_37); +lean_ctor_set(x_4, 1, x_36); +lean_ctor_set(x_15, 1, x_4); +lean_ctor_set(x_15, 0, x_35); +return x_15; +} +else +{ +lean_object* x_38; lean_object* x_39; lean_object* x_40; lean_object* x_41; lean_object* x_42; lean_object* x_43; lean_object* x_44; lean_object* x_45; lean_object* x_46; lean_object* x_47; lean_object* x_48; lean_object* x_49; lean_object* x_50; +x_38 = lean_ctor_get(x_15, 0); +x_39 = lean_ctor_get(x_15, 1); +lean_inc(x_39); +lean_inc(x_38); +lean_dec(x_15); +x_40 = lean_ctor_get(x_38, 0); +lean_inc(x_40); +x_41 = lean_ctor_get(x_38, 1); +lean_inc(x_41); +x_42 = lean_ctor_get(x_38, 2); +lean_inc(x_42); +x_43 = lean_ctor_get(x_38, 3); +lean_inc(x_43); +lean_dec(x_38); +x_44 = lean_ctor_get(x_3, 0); +lean_inc(x_44); +lean_dec(x_3); +x_45 = lean_ctor_get(x_44, 0); +lean_inc(x_45); +lean_dec(x_44); +lean_inc(x_8); +x_46 = lean_alloc_ctor(0, 4, 0); +lean_ctor_set(x_46, 0, x_8); +lean_ctor_set(x_46, 1, x_40); +lean_ctor_set(x_46, 2, x_41); +lean_ctor_set(x_46, 3, x_45); +x_47 = lean_alloc_ctor(9, 3, 0); +lean_ctor_set(x_47, 0, x_42); +lean_ctor_set(x_47, 1, x_43); +lean_ctor_set(x_47, 2, x_46); +x_48 = lean_ctor_get(x_39, 0); +lean_inc(x_48); +x_49 = lean_ctor_get(x_39, 1); +lean_inc(x_49); +lean_dec(x_39); +lean_ctor_set(x_4, 3, x_49); +lean_ctor_set(x_4, 1, x_48); +x_50 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_50, 0, x_47); +lean_ctor_set(x_50, 1, x_4); +return x_50; +} +} +} +else +{ +lean_object* x_51; lean_object* x_52; lean_object* x_53; lean_object* x_54; lean_object* x_55; lean_object* x_56; lean_object* x_57; lean_object* x_58; uint8_t x_59; uint8_t x_60; lean_object* x_61; +x_51 = lean_ctor_get(x_4, 0); +x_52 = lean_ctor_get(x_4, 1); +x_53 = lean_ctor_get(x_4, 2); +x_54 = lean_ctor_get(x_4, 3); +x_55 = lean_ctor_get(x_4, 4); +x_56 = lean_ctor_get(x_4, 5); +lean_inc(x_56); lean_inc(x_55); lean_inc(x_54); lean_inc(x_53); lean_inc(x_52); lean_inc(x_51); -lean_inc(x_50); lean_dec(x_4); -x_56 = l_HashMap_Inhabited___closed__1; -x_57 = lean_alloc_ctor(0, 3, 0); -lean_ctor_set(x_57, 0, x_51); -lean_ctor_set(x_57, 1, x_53); -lean_ctor_set(x_57, 2, x_56); -x_58 = 1; -x_59 = l_Lean_MetavarContext_MkBinding_mkBinding(x_58, x_6, x_1, x_2, x_57); -if (lean_obj_tag(x_59) == 0) +x_57 = l_HashMap_Inhabited___closed__1; +x_58 = lean_alloc_ctor(0, 3, 0); +lean_ctor_set(x_58, 0, x_52); +lean_ctor_set(x_58, 1, x_54); +lean_ctor_set(x_58, 2, x_57); +x_59 = 0; +x_60 = 1; +x_61 = l_Lean_MetavarContext_MkBinding_mkBinding(x_59, x_6, x_1, x_2, x_60, x_58); +if (lean_obj_tag(x_61) == 0) { -lean_object* x_60; lean_object* x_61; lean_object* x_62; lean_object* x_63; lean_object* x_64; lean_object* x_65; lean_object* x_66; +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_dec(x_3); -x_60 = lean_ctor_get(x_59, 0); -lean_inc(x_60); -x_61 = lean_ctor_get(x_59, 1); -lean_inc(x_61); -if (lean_is_exclusive(x_59)) { - lean_ctor_release(x_59, 0); - lean_ctor_release(x_59, 1); - x_62 = x_59; -} else { - lean_dec_ref(x_59); - x_62 = lean_box(0); -} -x_63 = lean_ctor_get(x_61, 0); +x_62 = lean_ctor_get(x_61, 0); +lean_inc(x_62); +x_63 = lean_ctor_get(x_61, 1); lean_inc(x_63); -x_64 = lean_ctor_get(x_61, 1); -lean_inc(x_64); -lean_dec(x_61); -x_65 = lean_alloc_ctor(0, 6, 0); -lean_ctor_set(x_65, 0, x_50); -lean_ctor_set(x_65, 1, x_63); -lean_ctor_set(x_65, 2, x_52); -lean_ctor_set(x_65, 3, x_64); -lean_ctor_set(x_65, 4, x_54); -lean_ctor_set(x_65, 5, x_55); -if (lean_is_scalar(x_62)) { - x_66 = lean_alloc_ctor(0, 2, 0); +if (lean_is_exclusive(x_61)) { + lean_ctor_release(x_61, 0); + lean_ctor_release(x_61, 1); + x_64 = x_61; } else { - x_66 = x_62; + lean_dec_ref(x_61); + x_64 = lean_box(0); } -lean_ctor_set(x_66, 0, x_60); -lean_ctor_set(x_66, 1, x_65); -return x_66; +x_65 = lean_ctor_get(x_63, 0); +lean_inc(x_65); +x_66 = lean_ctor_get(x_63, 1); +lean_inc(x_66); +lean_dec(x_63); +x_67 = lean_alloc_ctor(0, 6, 0); +lean_ctor_set(x_67, 0, x_51); +lean_ctor_set(x_67, 1, x_65); +lean_ctor_set(x_67, 2, x_53); +lean_ctor_set(x_67, 3, x_66); +lean_ctor_set(x_67, 4, x_55); +lean_ctor_set(x_67, 5, x_56); +if (lean_is_scalar(x_64)) { + x_68 = lean_alloc_ctor(0, 2, 0); +} else { + x_68 = x_64; +} +lean_ctor_set(x_68, 0, x_62); +lean_ctor_set(x_68, 1, x_67); +return x_68; } else { -lean_object* x_67; lean_object* x_68; lean_object* x_69; lean_object* x_70; lean_object* x_71; lean_object* x_72; lean_object* x_73; lean_object* x_74; lean_object* x_75; lean_object* x_76; lean_object* x_77; lean_object* x_78; lean_object* x_79; lean_object* x_80; lean_object* x_81; -x_67 = lean_ctor_get(x_59, 0); -lean_inc(x_67); -x_68 = lean_ctor_get(x_59, 1); -lean_inc(x_68); -if (lean_is_exclusive(x_59)) { - lean_ctor_release(x_59, 0); - lean_ctor_release(x_59, 1); - x_69 = x_59; -} else { - lean_dec_ref(x_59); - x_69 = lean_box(0); -} -x_70 = lean_ctor_get(x_67, 0); +lean_object* x_69; lean_object* x_70; lean_object* x_71; lean_object* x_72; lean_object* x_73; lean_object* x_74; lean_object* x_75; lean_object* x_76; lean_object* x_77; lean_object* x_78; lean_object* x_79; lean_object* x_80; lean_object* x_81; lean_object* x_82; lean_object* x_83; +x_69 = lean_ctor_get(x_61, 0); +lean_inc(x_69); +x_70 = lean_ctor_get(x_61, 1); lean_inc(x_70); -x_71 = lean_ctor_get(x_67, 1); -lean_inc(x_71); -x_72 = lean_ctor_get(x_67, 2); -lean_inc(x_72); -x_73 = lean_ctor_get(x_67, 3); -lean_inc(x_73); -lean_dec(x_67); -x_74 = lean_ctor_get(x_3, 0); -lean_inc(x_74); -lean_dec(x_3); -x_75 = lean_ctor_get(x_74, 0); -lean_inc(x_75); -lean_dec(x_74); -lean_inc(x_50); -x_76 = lean_alloc_ctor(0, 4, 0); -lean_ctor_set(x_76, 0, x_50); -lean_ctor_set(x_76, 1, x_70); -lean_ctor_set(x_76, 2, x_71); -lean_ctor_set(x_76, 3, x_75); -x_77 = lean_alloc_ctor(9, 3, 0); -lean_ctor_set(x_77, 0, x_72); -lean_ctor_set(x_77, 1, x_73); -lean_ctor_set(x_77, 2, x_76); -x_78 = lean_ctor_get(x_68, 0); -lean_inc(x_78); -x_79 = lean_ctor_get(x_68, 1); -lean_inc(x_79); -lean_dec(x_68); -x_80 = lean_alloc_ctor(0, 6, 0); -lean_ctor_set(x_80, 0, x_50); -lean_ctor_set(x_80, 1, x_78); -lean_ctor_set(x_80, 2, x_52); -lean_ctor_set(x_80, 3, x_79); -lean_ctor_set(x_80, 4, x_54); -lean_ctor_set(x_80, 5, x_55); -if (lean_is_scalar(x_69)) { - x_81 = lean_alloc_ctor(1, 2, 0); +if (lean_is_exclusive(x_61)) { + lean_ctor_release(x_61, 0); + lean_ctor_release(x_61, 1); + x_71 = x_61; } else { - x_81 = x_69; + lean_dec_ref(x_61); + x_71 = lean_box(0); } -lean_ctor_set(x_81, 0, x_77); -lean_ctor_set(x_81, 1, x_80); -return x_81; +x_72 = lean_ctor_get(x_69, 0); +lean_inc(x_72); +x_73 = lean_ctor_get(x_69, 1); +lean_inc(x_73); +x_74 = lean_ctor_get(x_69, 2); +lean_inc(x_74); +x_75 = lean_ctor_get(x_69, 3); +lean_inc(x_75); +lean_dec(x_69); +x_76 = lean_ctor_get(x_3, 0); +lean_inc(x_76); +lean_dec(x_3); +x_77 = lean_ctor_get(x_76, 0); +lean_inc(x_77); +lean_dec(x_76); +lean_inc(x_51); +x_78 = lean_alloc_ctor(0, 4, 0); +lean_ctor_set(x_78, 0, x_51); +lean_ctor_set(x_78, 1, x_72); +lean_ctor_set(x_78, 2, x_73); +lean_ctor_set(x_78, 3, x_77); +x_79 = lean_alloc_ctor(9, 3, 0); +lean_ctor_set(x_79, 0, x_74); +lean_ctor_set(x_79, 1, x_75); +lean_ctor_set(x_79, 2, x_78); +x_80 = lean_ctor_get(x_70, 0); +lean_inc(x_80); +x_81 = lean_ctor_get(x_70, 1); +lean_inc(x_81); +lean_dec(x_70); +x_82 = lean_alloc_ctor(0, 6, 0); +lean_ctor_set(x_82, 0, x_51); +lean_ctor_set(x_82, 1, x_80); +lean_ctor_set(x_82, 2, x_53); +lean_ctor_set(x_82, 3, x_81); +lean_ctor_set(x_82, 4, x_55); +lean_ctor_set(x_82, 5, x_56); +if (lean_is_scalar(x_71)) { + x_83 = lean_alloc_ctor(1, 2, 0); +} else { + x_83 = x_71; +} +lean_ctor_set(x_83, 0, x_79); +lean_ctor_set(x_83, 1, x_82); +return x_83; } } } else { -lean_object* x_82; +lean_object* x_84; lean_object* x_85; lean_object* x_86; lean_dec(x_3); lean_dec(x_1); -x_82 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_82, 0, x_2); -lean_ctor_set(x_82, 1, x_4); -return x_82; +x_84 = lean_unsigned_to_nat(0u); +x_85 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_85, 0, x_2); +lean_ctor_set(x_85, 1, x_84); +x_86 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_86, 0, x_85); +lean_ctor_set(x_86, 1, x_4); +return x_86; } } } diff --git a/stage0/stdlib/Init/Lean/Meta/Instances.c b/stage0/stdlib/Init/Lean/Meta/Instances.c index 6ecf4eaefa..0621fe8a1c 100644 --- a/stage0/stdlib/Init/Lean/Meta/Instances.c +++ b/stage0/stdlib/Init/Lean/Meta/Instances.c @@ -117,7 +117,6 @@ lean_object* l_Lean_Meta_DiscrTree_mkPath(lean_object*, lean_object*, lean_objec lean_object* l_Lean_Meta_forallMetaTelescopeReducing(lean_object*, lean_object*, lean_object*, lean_object*); extern lean_object* l_Lean_registerPersistentEnvExtensionUnsafe___rarg___closed__3; lean_object* l_Lean_ConstantInfo_lparams(lean_object*); -uint8_t l_Lean_Syntax_isMissing(lean_object*); lean_object* l_PersistentHashMap_insertAux___main___at_Lean_Meta_addInstanceEntry___spec__6(lean_object*, size_t, size_t, lean_object*, lean_object*); lean_object* l_PersistentHashMap_findAux___main___at_Lean_Meta_addInstanceEntry___spec__3(lean_object*, size_t, lean_object*); lean_object* l_Lean_Meta_registerInstanceAttr___lambda__1___closed__1; @@ -129,6 +128,7 @@ lean_object* l_Array_back___at_Lean_Meta_addInstanceEntry___spec__14___boxed(lea uint8_t lean_expr_eqv(lean_object*, lean_object*); lean_object* l_Lean_registerTagAttribute___lambda__6___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); extern lean_object* l_Lean_Meta_DiscrTree_insertCore___rarg___closed__1; +uint8_t l_Lean_Syntax_hasArgs(lean_object*); lean_object* l_Lean_Environment_getGlobalInstances(lean_object*); uint8_t l_USize_decLe(size_t, size_t); extern lean_object* l_Lean_Meta_DiscrTree_empty___closed__1; @@ -3350,7 +3350,7 @@ lean_object* _init_l_Lean_Meta_registerInstanceAttr___lambda__1___closed__1() { _start: { lean_object* x_1; -x_1 = lean_mk_string("invalid attribute 'instance', unexpected argument"); +x_1 = lean_mk_string("invalid attribute 'instance', must be persistent"); return x_1; } } @@ -3358,7 +3358,7 @@ lean_object* _init_l_Lean_Meta_registerInstanceAttr___lambda__1___closed__2() { _start: { lean_object* x_1; -x_1 = lean_mk_string("invalid attribute 'instance', must be persistent"); +x_1 = lean_mk_string("invalid attribute 'instance', unexpected argument"); return x_1; } } @@ -3366,9 +3366,11 @@ lean_object* l_Lean_Meta_registerInstanceAttr___lambda__1(lean_object* x_1, lean _start: { uint8_t x_6; -x_6 = l_Lean_Syntax_isMissing(x_3); +x_6 = l_Lean_Syntax_hasArgs(x_3); if (x_6 == 0) { +if (x_4 == 0) +{ lean_object* x_7; lean_object* x_8; lean_dec(x_2); lean_dec(x_1); @@ -3380,62 +3382,60 @@ return x_8; } else { -if (x_4 == 0) -{ lean_object* x_9; lean_object* x_10; +lean_inc(x_2); +x_9 = lean_add_instance_old(x_1, x_2); +x_10 = l_IO_ofExcept___at_Lean_registerClassAttr___spec__1(x_9, x_5); +lean_dec(x_9); +if (lean_obj_tag(x_10) == 0) +{ +lean_object* x_11; lean_object* x_12; lean_object* x_13; +x_11 = lean_ctor_get(x_10, 0); +lean_inc(x_11); +x_12 = lean_ctor_get(x_10, 1); +lean_inc(x_12); +lean_dec(x_10); +x_13 = lean_add_instance(x_11, x_2, x_12); +return x_13; +} +else +{ +uint8_t x_14; lean_dec(x_2); -lean_dec(x_1); -x_9 = l_Lean_Meta_registerInstanceAttr___lambda__1___closed__2; -x_10 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_10, 0, x_9); -lean_ctor_set(x_10, 1, x_5); +x_14 = !lean_is_exclusive(x_10); +if (x_14 == 0) +{ return x_10; } else { -lean_object* x_11; lean_object* x_12; -lean_inc(x_2); -x_11 = lean_add_instance_old(x_1, x_2); -x_12 = l_IO_ofExcept___at_Lean_registerClassAttr___spec__1(x_11, x_5); -lean_dec(x_11); -if (lean_obj_tag(x_12) == 0) -{ -lean_object* x_13; lean_object* x_14; lean_object* x_15; -x_13 = lean_ctor_get(x_12, 0); -lean_inc(x_13); -x_14 = lean_ctor_get(x_12, 1); -lean_inc(x_14); -lean_dec(x_12); -x_15 = lean_add_instance(x_13, x_2, x_14); -return x_15; +lean_object* x_15; lean_object* x_16; lean_object* x_17; +x_15 = lean_ctor_get(x_10, 0); +x_16 = lean_ctor_get(x_10, 1); +lean_inc(x_16); +lean_inc(x_15); +lean_dec(x_10); +x_17 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_17, 0, x_15); +lean_ctor_set(x_17, 1, x_16); +return x_17; +} +} +} } else { -uint8_t x_16; +lean_object* x_18; lean_object* x_19; lean_dec(x_2); -x_16 = !lean_is_exclusive(x_12); -if (x_16 == 0) -{ -return x_12; -} -else -{ -lean_object* x_17; lean_object* x_18; lean_object* x_19; -x_17 = lean_ctor_get(x_12, 0); -x_18 = lean_ctor_get(x_12, 1); -lean_inc(x_18); -lean_inc(x_17); -lean_dec(x_12); +lean_dec(x_1); +x_18 = l_Lean_Meta_registerInstanceAttr___lambda__1___closed__2; x_19 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_19, 0, x_17); -lean_ctor_set(x_19, 1, x_18); +lean_ctor_set(x_19, 0, x_18); +lean_ctor_set(x_19, 1, x_5); return x_19; } } } -} -} -} lean_object* _init_l_Lean_Meta_registerInstanceAttr___closed__1() { _start: { diff --git a/stage0/stdlib/Init/Lean/MetavarContext.c b/stage0/stdlib/Init/Lean/MetavarContext.c index c1eac1319b..fb778aec40 100644 --- a/stage0/stdlib/Init/Lean/MetavarContext.c +++ b/stage0/stdlib/Init/Lean/MetavarContext.c @@ -45,6 +45,7 @@ lean_object* l___private_Init_Lean_MetavarContext_16__abstractRangeAux___boxed(l lean_object* l_Lean_MetavarContext_instantiateMVars(lean_object*, lean_object*); lean_object* l_PersistentHashMap_findAux___main___at_Lean_MetavarContext_findLevelDepth_x3f___spec__2___boxed(lean_object*, lean_object*, lean_object*); lean_object* l_PersistentHashMap_find_x3f___at_Lean_MetavarContext_findLevelDepth_x3f___spec__1(lean_object*, lean_object*); +lean_object* l_Lean_MetavarContext_LevelMVarToParam_mkParamName___main___boxed(lean_object*); lean_object* lean_array_uget(lean_object*, size_t); lean_object* l_Lean_MetavarContext_MkBinding_Lean_MonadHashMapCacheAdapter___lambda__2(lean_object*, lean_object*); extern lean_object* l_List_repr___rarg___closed__1; @@ -91,7 +92,7 @@ lean_object* l_Lean_MetavarContext_getDecl___closed__2; lean_object* l_PersistentArray_foldlMAux___main___at___private_Init_Lean_MetavarContext_10__collectDeps___spec__42(lean_object*); uint8_t l_Array_anyRangeMAux___main___at___private_Init_Lean_MetavarContext_10__collectDeps___spec__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_PersistentHashMap_insertAux___main___at_Lean_MetavarContext_assignExprCore___spec__2(lean_object*, size_t, size_t, lean_object*, lean_object*); -lean_object* l_Lean_MetavarContext_mkBinding(uint8_t, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_MetavarContext_mkBinding(uint8_t, lean_object*, lean_object*, uint8_t, lean_object*, lean_object*); lean_object* l_Array_filterAux___main___at___private_Init_Lean_MetavarContext_21__elimMVarDepsApp___main___spec__4(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_MetavarContext_getDecl___closed__1; lean_object* l_PersistentArray_anyMAux___main___at___private_Init_Lean_MetavarContext_10__collectDeps___spec__23___boxed(lean_object*, lean_object*); @@ -140,6 +141,7 @@ lean_object* l_PersistentArray_anyMAux___main___at___private_Init_Lean_MetavarCo uint8_t l_Array_anyRangeMAux___main___at___private_Init_Lean_MetavarContext_10__collectDeps___spec__2(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); uint8_t l_Array_anyRangeMAux___main___at___private_Init_Lean_MetavarContext_10__collectDeps___spec__12(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); uint8_t l_PersistentHashMap_contains___at_Lean_MetavarContext_isExprAssigned___spec__1(lean_object*, lean_object*); +lean_object* l_Lean_MetavarContext_mkForallUsedOnly(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Array_anyRangeMAux___main___at___private_Init_Lean_MetavarContext_10__collectDeps___spec__38___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___private_Init_Lean_MetavarContext_4__modifyCtx(lean_object*, lean_object*); lean_object* l_PersistentHashMap_findAux___main___at_Lean_MetavarContext_getLevelAssignment_x3f___spec__2___boxed(lean_object*, lean_object*, lean_object*); @@ -174,6 +176,8 @@ lean_object* l_Lean_Expr_getAppNumArgsAux___main(lean_object*, lean_object*); uint8_t lean_metavar_ctx_is_expr_assigned(lean_object*, lean_object*); extern lean_object* l_Lean_LocalContext_Inhabited___closed__2; extern lean_object* l_PersistentArray_getAux___main___rarg___closed__1; +lean_object* l_Lean_MetavarContext_LevelMVarToParam_mkParamName___rarg(lean_object*, lean_object*); +lean_object* lean_expr_lower_loose_bvars(lean_object*, lean_object*, lean_object*); lean_object* l_PersistentHashMap_findAtAux___main___at_Lean_MetavarContext_findDecl_x3f___spec__3___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___private_Init_Data_Array_Basic_3__iterateRevMAux___main___at___private_Init_Lean_MetavarContext_11__reduceLocalContext___spec__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___private_Init_Lean_MetavarContext_8__dep___main___at___private_Init_Lean_MetavarContext_10__collectDeps___spec__15___boxed(lean_object*, lean_object*, lean_object*, lean_object*); @@ -198,9 +202,11 @@ lean_object* l_Array_anyRangeMAux___main___at___private_Init_Lean_MetavarContext lean_object* l___private_Init_Data_Array_Basic_3__iterateRevMAux___main___at___private_Init_Lean_MetavarContext_11__reduceLocalContext___spec__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___private_Init_Lean_MetavarContext_14__getInScope(lean_object*, lean_object*); lean_object* l_EStateM_bind___rarg(lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_MetavarContext_levelMVarToParam(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_PersistentHashMap_insert___at_Lean_MetavarContext_assignExprCore___spec__1(lean_object*, lean_object*, lean_object*); lean_object* lean_nat_sub(lean_object*, lean_object*); lean_object* l_Array_iterateMAux___main___at_Lean_MetavarContext_assignExprCore___spec__4(size_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_MetavarContext_LevelMVarToParam_main(lean_object*, lean_object*, lean_object*); lean_object* l_Array_iterateMAux___main___at_Lean_MetavarContext_assignDelayed___spec__4___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___private_Init_Lean_MetavarContext_13__getMCtx(lean_object*); lean_object* lean_metavar_ctx_get_level_assignment(lean_object*, lean_object*); @@ -216,6 +222,7 @@ lean_object* l_AssocList_contains___main___at___private_Init_Lean_MetavarContext lean_object* l_Array_anyRangeMAux___main___at___private_Init_Lean_MetavarContext_20__anyDependsOn___spec__6___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); uint8_t l_Array_anyRangeMAux___main___at___private_Init_Lean_MetavarContext_20__anyDependsOn___spec__4(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); uint8_t l_Lean_MetavarContext_hasAssignedLevelMVar(lean_object*, lean_object*); +lean_object* l_Lean_MetavarContext_LevelMVarToParam_visitLevel(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_MetavarContext_isExprAssignable___boxed(lean_object*, lean_object*); lean_object* l_PersistentHashMap_findAux___main___at_Lean_MetavarContext_getDelayedAssignment_x3f___spec__2(lean_object*, size_t, lean_object*); lean_object* lean_level_update_max(lean_object*, lean_object*, lean_object*); @@ -230,12 +237,16 @@ lean_object* l_Lean_Expr_fvarId_x21(lean_object*); lean_object* lean_metavar_ctx_assign_expr(lean_object*, lean_object*, lean_object*); lean_object* lean_array_fset(lean_object*, lean_object*, lean_object*); lean_object* l_Array_iterateMAux___main___at___private_Init_Lean_MetavarContext_10__collectDeps___spec__48___rarg___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_MetavarContext_LevelMVarToParam_mkParamName(lean_object*); uint8_t l_Array_anyRangeMAux___main___at___private_Init_Lean_MetavarContext_10__collectDeps___spec__19(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_PersistentHashMap_insert___at_Lean_MetavarContext_addLevelMVarDecl___spec__1(lean_object*, lean_object*, lean_object*); lean_object* l_AssocList_foldlM___main___at___private_Init_Lean_MetavarContext_2__visit___spec__7(lean_object*, lean_object*); +lean_object* l_Lean_Name_appendIndexAfter(lean_object*, lean_object*); +lean_object* l_Lean_MetavarContext_LevelMVarToParam_visitLevel___main(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_MetavarContext_MkBinding_elimMVarDeps(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_MetavarContext_isWellFormed(lean_object*, lean_object*, lean_object*); lean_object* l_Array_anyRangeMAux___main___at___private_Init_Lean_MetavarContext_10__collectDeps___spec__32___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_MetavarContext_LevelMVarToParam_mkParamName___main___rarg(lean_object*, lean_object*); lean_object* l_Lean_MetavarContext_isLevelAssigned___boxed(lean_object*, lean_object*); uint8_t l_Array_anyRangeMAux___main___at___private_Init_Lean_MetavarContext_10__collectDeps___spec__13(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Array_anyRangeMAux___main___at___private_Init_Lean_MetavarContext_10__collectDeps___spec__36___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); @@ -251,7 +262,7 @@ lean_object* l_PersistentArray_foldlFromM___at___private_Init_Lean_MetavarContex uint8_t l_Lean_LocalDecl_binderInfo(lean_object*); lean_object* l_Array_anyRangeMAux___main___at___private_Init_Lean_MetavarContext_20__anyDependsOn___spec__13___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_PersistentArray_anyM___at___private_Init_Lean_MetavarContext_10__collectDeps___spec__22___boxed(lean_object*, lean_object*); -lean_object* l_Lean_MetavarContext_MkBinding_mkBinding___lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_MetavarContext_MkBinding_mkBinding___lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); extern lean_object* l_PersistentHashMap_insertAux___main___rarg___closed__3; lean_object* l_Lean_MetavarContext_Inhabited; lean_object* l_Array_iterateMAux___main___at___private_Init_Lean_MetavarContext_10__collectDeps___spec__46(lean_object*); @@ -285,6 +296,8 @@ lean_object* l___private_Init_Lean_MetavarContext_21__elimMVarDepsApp(lean_objec lean_object* l_HashMapImp_moveEntries___main___at___private_Init_Lean_MetavarContext_2__visit___spec__6(lean_object*, lean_object*, lean_object*); lean_object* l___private_Init_Lean_MetavarContext_10__collectDeps(lean_object*, lean_object*, lean_object*); lean_object* l_Array_iterateMAux___main___at___private_Init_Lean_MetavarContext_9__getLocalDeclWithSmallestIdx___spec__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +extern lean_object* l_Lean_Expr_updateApp_x21___closed__1; +uint8_t l_Lean_Expr_hasLevelMVar(lean_object*); lean_object* l_Lean_LocalDecl_toExpr(lean_object*); lean_object* l___private_Init_Lean_MetavarContext_22__elimMVarDepsAux(lean_object*, lean_object*, lean_object*); lean_object* l_PersistentHashMap_insertAtCollisionNodeAux___main___at_Lean_MetavarContext_addLevelMVarDecl___spec__3(lean_object*, lean_object*, lean_object*, lean_object*); @@ -429,8 +442,9 @@ uint8_t l_Array_anyRangeMAux___main___at___private_Init_Lean_MetavarContext_10__ uint8_t l_PersistentArray_anyM___at___private_Init_Lean_MetavarContext_20__anyDependsOn___spec__8(lean_object*, lean_object*); lean_object* l_Array_iterateMAux___main___at_Lean_MetavarContext_assignLevel___spec__4(size_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_PersistentHashMap_insert___at_Lean_MetavarContext_addExprMVarDecl___spec__1(lean_object*, lean_object*, lean_object*); +lean_object* l___private_Init_Lean_MetavarContext_24__visit(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_PersistentHashMap_containsAux___main___at_Lean_MetavarContext_isDelayedAssigned___spec__2___boxed(lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_MetavarContext_MkBinding_mkBinding___lambda__1(lean_object*, lean_object*, uint8_t, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_MetavarContext_MkBinding_mkBinding___lambda__1(lean_object*, lean_object*, uint8_t, uint8_t, lean_object*, lean_object*, lean_object*); lean_object* l_PersistentHashMap_getCollisionNodeSize___rarg(lean_object*); lean_object* l_PersistentHashMap_find_x3f___at_Lean_MetavarContext_getExprAssignment_x3f___spec__1___boxed(lean_object*, lean_object*); lean_object* l___private_Init_Lean_MetavarContext_8__dep___main___at___private_Init_Lean_MetavarContext_20__anyDependsOn___spec__1(lean_object*, lean_object*, lean_object*, lean_object*); @@ -440,7 +454,7 @@ uint8_t l_PersistentArray_anyM___at___private_Init_Lean_MetavarContext_20__anyDe lean_object* l_Lean_MetavarContext_getLevelDepth(lean_object*, lean_object*); lean_object* l___private_Init_Lean_MetavarContext_18__mkMVarApp___boxed(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Array_toList___rarg(lean_object*); -lean_object* l_Lean_MetavarContext_MkBinding_mkBinding(uint8_t, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_MetavarContext_MkBinding_mkBinding(uint8_t, lean_object*, lean_object*, lean_object*, uint8_t, lean_object*); extern lean_object* l_Lean_Expr_Inhabited; lean_object* l_mkHashMap___at_Lean_MetavarContext_exprDependsOn___spec__2(lean_object*); lean_object* l_Array_umapMAux___main___at___private_Init_Lean_MetavarContext_21__elimMVarDepsApp___main___spec__12(lean_object*, lean_object*, lean_object*, lean_object*); @@ -476,6 +490,7 @@ lean_object* l_HashMapImp_find_x3f___at___private_Init_Lean_MetavarContext_2__vi uint8_t l_Lean_LocalInstance_beq(lean_object*, lean_object*); lean_object* l_AssocList_find___main___at___private_Init_Lean_MetavarContext_2__visit___spec__2___boxed(lean_object*, lean_object*); lean_object* l_Array_anyRangeMAux___main___at___private_Init_Lean_MetavarContext_10__collectDeps___spec__13___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_MetavarContext_LevelMVarToParam_mkParamName___main(lean_object*); lean_object* l_Array_umapMAux___main___at_Lean_MetavarContext_MkBinding_Exception_toString___spec__1(lean_object*, lean_object*, lean_object*); lean_object* lean_metavar_ctx_erase_delayed(lean_object*, lean_object*); lean_object* l_Lean_MetavarContext_getDecl(lean_object*, lean_object*); @@ -494,9 +509,11 @@ lean_object* l_Array_iterateMAux___main___at_Lean_mkAppN___spec__1(lean_object*, lean_object* l_Lean_MetavarContext_getLevelDepth___boxed(lean_object*, lean_object*); lean_object* l_Lean_Name_toStringWithSep___main(lean_object*, lean_object*); lean_object* l_HashMapImp_insert___at___private_Init_Lean_MetavarContext_6__visit_x3f___spec__3(lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_mkLevelParam(lean_object*); lean_object* l_Lean_MetavarContext_InstantiateExprMVars_instantiateLevelMVars(lean_object*, lean_object*); lean_object* lean_usize_to_nat(size_t); lean_object* l_Lean_MetavarContext_hasAssignableMVar___main___boxed(lean_object*, lean_object*); +lean_object* lean_expr_update_app(lean_object*, lean_object*, lean_object*); lean_object* l___private_Init_Lean_MetavarContext_12__visit(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_MetavarKind_isSyntheticOpaque___boxed(lean_object*); lean_object* l___private_Init_Lean_MetavarContext_8__dep(lean_object*, lean_object*, lean_object*, lean_object*); @@ -505,7 +522,7 @@ extern lean_object* l_HashMap_Inhabited___closed__1; lean_object* l_Array_iterateMAux___main___at_Lean_MetavarContext_addLevelMVarDecl___spec__4___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); uint8_t l_Array_anyRangeMAux___main___at___private_Init_Lean_MetavarContext_20__anyDependsOn___spec__12(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_MetavarContext_DependsOn_main(lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_MetavarContext_mkBinding___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_MetavarContext_mkBinding___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); uint8_t l_Lean_Expr_hasFVar(lean_object*); lean_object* l_Array_filterAux___main___at___private_Init_Lean_MetavarContext_21__elimMVarDepsApp___main___spec__7___boxed(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___private_Init_Lean_MetavarContext_17__mkAuxMVarType___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); @@ -519,6 +536,7 @@ lean_object* l_PersistentArray_foldlFromMAux___main___at___private_Init_Lean_Met uint8_t l_PersistentArray_anyMAux___main___at___private_Init_Lean_MetavarContext_10__collectDeps___spec__23(lean_object*, lean_object*); lean_object* l_Array_umapMAux___main___at_Lean_MetavarContext_InstantiateExprMVars_main___main___spec__2(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_MetavarContext_InstantiateExprMVars_main___main(lean_object*, lean_object*); +lean_object* l_Lean_MetavarContext_LevelMVarToParam_mkParamName___boxed(lean_object*); lean_object* l_Array_anyRangeMAux___main___at___private_Init_Lean_MetavarContext_10__collectDeps___spec__20___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_MetavarContext_hasAssignedMVar___main(lean_object*, lean_object*); extern lean_object* l_EStateM_MonadState___closed__2; @@ -526,9 +544,11 @@ lean_object* l_List_toStringAux___main___at_Lean_MetavarContext_MkBinding_Except extern lean_object* l_Lean_Expr_updateForallE_x21___closed__1; lean_object* lean_name_mk_numeral(lean_object*, lean_object*); lean_object* l___private_Init_Lean_MetavarContext_8__dep___main___lambda__1___boxed(lean_object*, lean_object*); +lean_object* l_Lean_MetavarContext_LevelMVarToParam_main___main(lean_object*, lean_object*, lean_object*); lean_object* lean_expr_update_const(lean_object*, lean_object*); lean_object* l_Array_anyRangeMAux___main___at___private_Init_Lean_MetavarContext_10__collectDeps___spec__25___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); uint8_t l_Lean_LocalContext_isSubPrefixOf(lean_object*, lean_object*); +lean_object* l_List_mapM___main___at_Lean_MetavarContext_LevelMVarToParam_main___main___spec__1(lean_object*, lean_object*, lean_object*); lean_object* l_PersistentHashMap_mkCollisionNode___rarg(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___private_Init_Lean_MetavarContext_6__visit_x3f(lean_object*, lean_object*); lean_object* l_Array_anyRangeMAux___main___at___private_Init_Lean_MetavarContext_10__collectDeps___spec__2___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); @@ -539,7 +559,7 @@ lean_object* l_List_toStringAux___main___at_Lean_MetavarContext_MkBinding_Except uint8_t l_AssocList_contains___main___at___private_Init_Lean_MetavarContext_2__visit___spec__4(lean_object*, lean_object*); uint8_t l_Array_anyRangeMAux___main___at___private_Init_Lean_MetavarContext_10__collectDeps___spec__7(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Array_anyRangeMAux___main___at___private_Init_Lean_MetavarContext_10__collectDeps___spec__31___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_MetavarContext_MkBinding_mkBinding___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_MetavarContext_MkBinding_mkBinding___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Array_anyRangeMAux___main___at___private_Init_Lean_MetavarContext_20__anyDependsOn___spec__12___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_PersistentArray_foldlFromMAux___main___at___private_Init_Lean_MetavarContext_10__collectDeps___spec__41(lean_object*); uint8_t l_Lean_LocalDecl_isLet(lean_object*); @@ -31267,342 +31287,970 @@ lean_dec(x_2); return x_5; } } -lean_object* l_Lean_MetavarContext_MkBinding_mkBinding___lambda__1(lean_object* x_1, lean_object* x_2, uint8_t x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6) { +lean_object* l_Lean_MetavarContext_MkBinding_mkBinding___lambda__1(lean_object* x_1, lean_object* x_2, uint8_t x_3, uint8_t x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7) { _start: { -lean_object* x_7; lean_object* x_8; lean_object* x_9; -x_7 = l_Lean_Expr_Inhabited; -x_8 = lean_array_get(x_7, x_1, x_4); -x_9 = l_Lean_LocalContext_getFVar_x21(x_2, x_8); -lean_dec(x_8); -if (lean_obj_tag(x_9) == 0) +uint8_t x_8; +x_8 = !lean_is_exclusive(x_6); +if (x_8 == 0) { -lean_object* x_10; lean_object* x_11; uint8_t x_12; lean_object* x_13; -x_10 = lean_ctor_get(x_9, 2); -lean_inc(x_10); -x_11 = lean_ctor_get(x_9, 3); -lean_inc(x_11); -x_12 = lean_ctor_get_uint8(x_9, sizeof(void*)*4); -lean_dec(x_9); -lean_inc(x_1); -x_13 = l_Lean_MetavarContext_MkBinding_elimMVarDeps(x_1, x_11, x_6); +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_6, 0); +x_10 = lean_ctor_get(x_6, 1); +x_11 = l_Lean_Expr_Inhabited; +x_12 = lean_array_get(x_11, x_1, x_5); +x_13 = l_Lean_LocalContext_getFVar_x21(x_2, x_12); +lean_dec(x_12); 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_expr_abstract_range(x_15, x_4, x_1); -lean_dec(x_1); -lean_dec(x_15); if (x_3 == 0) { -lean_object* x_17; -x_17 = l_Lean_mkForall(x_10, x_12, x_16, x_5); -lean_ctor_set(x_13, 0, x_17); -return x_13; -} -else -{ -lean_object* x_18; -x_18 = l_Lean_mkLambda(x_10, x_12, x_16, x_5); -lean_ctor_set(x_13, 0, x_18); -return x_13; -} -} -else -{ -lean_object* x_19; lean_object* x_20; lean_object* x_21; -x_19 = lean_ctor_get(x_13, 0); -x_20 = lean_ctor_get(x_13, 1); -lean_inc(x_20); -lean_inc(x_19); +lean_object* x_14; lean_object* x_15; uint8_t x_16; lean_object* x_17; +x_14 = lean_ctor_get(x_13, 2); +lean_inc(x_14); +x_15 = lean_ctor_get(x_13, 3); +lean_inc(x_15); +x_16 = lean_ctor_get_uint8(x_13, sizeof(void*)*4); lean_dec(x_13); -x_21 = lean_expr_abstract_range(x_19, x_4, x_1); +lean_inc(x_1); +x_17 = l_Lean_MetavarContext_MkBinding_elimMVarDeps(x_1, x_15, x_7); +if (lean_obj_tag(x_17) == 0) +{ +uint8_t x_18; +x_18 = !lean_is_exclusive(x_17); +if (x_18 == 0) +{ +lean_object* x_19; lean_object* x_20; +x_19 = lean_ctor_get(x_17, 0); +x_20 = lean_expr_abstract_range(x_19, x_5, x_1); lean_dec(x_1); lean_dec(x_19); -if (x_3 == 0) +if (x_4 == 0) { -lean_object* x_22; lean_object* x_23; -x_22 = l_Lean_mkForall(x_10, x_12, x_21, x_5); -x_23 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_23, 0, x_22); -lean_ctor_set(x_23, 1, x_20); -return x_23; -} -else -{ -lean_object* x_24; lean_object* x_25; -x_24 = l_Lean_mkLambda(x_10, x_12, x_21, x_5); -x_25 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_25, 0, x_24); -lean_ctor_set(x_25, 1, x_20); -return x_25; -} -} -} -else -{ -uint8_t x_26; +lean_object* x_21; lean_object* x_22; lean_object* x_23; +x_21 = l_Lean_mkForall(x_14, x_16, x_20, x_9); +x_22 = lean_unsigned_to_nat(1u); +x_23 = lean_nat_add(x_10, x_22); lean_dec(x_10); -lean_dec(x_5); -lean_dec(x_1); -x_26 = !lean_is_exclusive(x_13); -if (x_26 == 0) +lean_ctor_set(x_6, 1, x_23); +lean_ctor_set(x_6, 0, x_21); +lean_ctor_set(x_17, 0, x_6); +return x_17; +} +else { -return x_13; +lean_object* x_24; lean_object* x_25; lean_object* x_26; +x_24 = l_Lean_mkLambda(x_14, x_16, x_20, x_9); +x_25 = lean_unsigned_to_nat(1u); +x_26 = lean_nat_add(x_10, x_25); +lean_dec(x_10); +lean_ctor_set(x_6, 1, x_26); +lean_ctor_set(x_6, 0, x_24); +lean_ctor_set(x_17, 0, x_6); +return x_17; +} } else { lean_object* x_27; lean_object* x_28; lean_object* x_29; -x_27 = lean_ctor_get(x_13, 0); -x_28 = lean_ctor_get(x_13, 1); +x_27 = lean_ctor_get(x_17, 0); +x_28 = lean_ctor_get(x_17, 1); lean_inc(x_28); lean_inc(x_27); -lean_dec(x_13); -x_29 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_29, 0, x_27); -lean_ctor_set(x_29, 1, x_28); -return x_29; +lean_dec(x_17); +x_29 = lean_expr_abstract_range(x_27, x_5, x_1); +lean_dec(x_1); +lean_dec(x_27); +if (x_4 == 0) +{ +lean_object* x_30; lean_object* x_31; lean_object* x_32; lean_object* x_33; +x_30 = l_Lean_mkForall(x_14, x_16, x_29, x_9); +x_31 = lean_unsigned_to_nat(1u); +x_32 = lean_nat_add(x_10, x_31); +lean_dec(x_10); +lean_ctor_set(x_6, 1, x_32); +lean_ctor_set(x_6, 0, x_30); +x_33 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_33, 0, x_6); +lean_ctor_set(x_33, 1, x_28); +return x_33; +} +else +{ +lean_object* x_34; lean_object* x_35; lean_object* x_36; lean_object* x_37; +x_34 = l_Lean_mkLambda(x_14, x_16, x_29, x_9); +x_35 = lean_unsigned_to_nat(1u); +x_36 = lean_nat_add(x_10, x_35); +lean_dec(x_10); +lean_ctor_set(x_6, 1, x_36); +lean_ctor_set(x_6, 0, x_34); +x_37 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_37, 0, x_6); +lean_ctor_set(x_37, 1, x_28); +return x_37; } } } else { -lean_object* x_30; lean_object* x_31; lean_object* x_32; lean_object* x_33; uint8_t x_34; -x_30 = lean_ctor_get(x_9, 2); -lean_inc(x_30); -x_31 = lean_ctor_get(x_9, 3); -lean_inc(x_31); -x_32 = lean_ctor_get(x_9, 4); -lean_inc(x_32); +uint8_t x_38; +lean_dec(x_14); +lean_free_object(x_6); +lean_dec(x_10); lean_dec(x_9); -x_33 = lean_unsigned_to_nat(0u); -x_34 = lean_expr_has_loose_bvar(x_5, x_33); -if (x_34 == 0) -{ -lean_object* x_35; -lean_dec(x_32); -lean_dec(x_31); -lean_dec(x_30); lean_dec(x_1); -x_35 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_35, 0, x_5); -lean_ctor_set(x_35, 1, x_6); -return x_35; +x_38 = !lean_is_exclusive(x_17); +if (x_38 == 0) +{ +return x_17; } else { -lean_object* x_36; -lean_inc(x_1); -x_36 = l_Lean_MetavarContext_MkBinding_elimMVarDeps(x_1, x_31, x_6); -if (lean_obj_tag(x_36) == 0) +lean_object* x_39; lean_object* x_40; lean_object* x_41; +x_39 = lean_ctor_get(x_17, 0); +x_40 = lean_ctor_get(x_17, 1); +lean_inc(x_40); +lean_inc(x_39); +lean_dec(x_17); +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_37; lean_object* x_38; lean_object* x_39; lean_object* x_40; -x_37 = lean_ctor_get(x_36, 0); -lean_inc(x_37); -x_38 = lean_ctor_get(x_36, 1); -lean_inc(x_38); -lean_dec(x_36); -x_39 = lean_expr_abstract_range(x_37, x_4, x_1); -lean_dec(x_37); -lean_inc(x_1); -x_40 = l_Lean_MetavarContext_MkBinding_elimMVarDeps(x_1, x_32, x_38); -if (lean_obj_tag(x_40) == 0) +lean_object* x_42; lean_object* x_43; uint8_t x_44; lean_object* x_45; uint8_t x_46; +x_42 = lean_ctor_get(x_13, 2); +lean_inc(x_42); +x_43 = lean_ctor_get(x_13, 3); +lean_inc(x_43); +x_44 = lean_ctor_get_uint8(x_13, sizeof(void*)*4); +lean_dec(x_13); +x_45 = lean_unsigned_to_nat(0u); +x_46 = lean_expr_has_loose_bvar(x_9, x_45); +if (x_46 == 0) { -uint8_t x_41; -x_41 = !lean_is_exclusive(x_40); -if (x_41 == 0) -{ -lean_object* x_42; lean_object* x_43; uint8_t x_44; lean_object* x_45; -x_42 = lean_ctor_get(x_40, 0); -x_43 = lean_expr_abstract_range(x_42, x_4, x_1); -lean_dec(x_1); +lean_object* x_47; lean_object* x_48; lean_object* x_49; +lean_dec(x_43); lean_dec(x_42); -x_44 = 0; -x_45 = l_Lean_mkLet(x_30, x_39, x_43, x_5, x_44); -lean_ctor_set(x_40, 0, x_45); -return x_40; -} -else -{ -lean_object* x_46; lean_object* x_47; lean_object* x_48; uint8_t x_49; lean_object* x_50; lean_object* x_51; -x_46 = lean_ctor_get(x_40, 0); -x_47 = lean_ctor_get(x_40, 1); -lean_inc(x_47); -lean_inc(x_46); -lean_dec(x_40); -x_48 = lean_expr_abstract_range(x_46, x_4, x_1); lean_dec(x_1); -lean_dec(x_46); -x_49 = 0; -x_50 = l_Lean_mkLet(x_30, x_39, x_48, x_5, x_49); -x_51 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_51, 0, x_50); -lean_ctor_set(x_51, 1, x_47); -return x_51; -} +x_47 = lean_unsigned_to_nat(1u); +x_48 = lean_expr_lower_loose_bvars(x_9, x_47, x_47); +lean_dec(x_9); +lean_ctor_set(x_6, 0, x_48); +x_49 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_49, 0, x_6); +lean_ctor_set(x_49, 1, x_7); +return x_49; } else { -uint8_t x_52; -lean_dec(x_39); -lean_dec(x_30); -lean_dec(x_5); +lean_object* x_50; +lean_inc(x_1); +x_50 = l_Lean_MetavarContext_MkBinding_elimMVarDeps(x_1, x_43, x_7); +if (lean_obj_tag(x_50) == 0) +{ +uint8_t x_51; +x_51 = !lean_is_exclusive(x_50); +if (x_51 == 0) +{ +lean_object* x_52; lean_object* x_53; +x_52 = lean_ctor_get(x_50, 0); +x_53 = lean_expr_abstract_range(x_52, x_5, x_1); lean_dec(x_1); -x_52 = !lean_is_exclusive(x_40); -if (x_52 == 0) +lean_dec(x_52); +if (x_4 == 0) { -return x_40; -} -else -{ -lean_object* x_53; lean_object* x_54; lean_object* x_55; -x_53 = lean_ctor_get(x_40, 0); -x_54 = lean_ctor_get(x_40, 1); -lean_inc(x_54); -lean_inc(x_53); -lean_dec(x_40); -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_30); -lean_dec(x_5); -lean_dec(x_1); -x_56 = !lean_is_exclusive(x_36); -if (x_56 == 0) -{ -return x_36; +lean_object* x_54; lean_object* x_55; lean_object* x_56; +x_54 = l_Lean_mkForall(x_42, x_44, x_53, x_9); +x_55 = lean_unsigned_to_nat(1u); +x_56 = lean_nat_add(x_10, x_55); +lean_dec(x_10); +lean_ctor_set(x_6, 1, x_56); +lean_ctor_set(x_6, 0, x_54); +lean_ctor_set(x_50, 0, x_6); +return x_50; } else { lean_object* x_57; lean_object* x_58; lean_object* x_59; -x_57 = lean_ctor_get(x_36, 0); -x_58 = lean_ctor_get(x_36, 1); -lean_inc(x_58); -lean_inc(x_57); -lean_dec(x_36); -x_59 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_59, 0, x_57); -lean_ctor_set(x_59, 1, x_58); -return x_59; +x_57 = l_Lean_mkLambda(x_42, x_44, x_53, x_9); +x_58 = lean_unsigned_to_nat(1u); +x_59 = lean_nat_add(x_10, x_58); +lean_dec(x_10); +lean_ctor_set(x_6, 1, x_59); +lean_ctor_set(x_6, 0, x_57); +lean_ctor_set(x_50, 0, x_6); +return x_50; +} +} +else +{ +lean_object* x_60; lean_object* x_61; lean_object* x_62; +x_60 = lean_ctor_get(x_50, 0); +x_61 = lean_ctor_get(x_50, 1); +lean_inc(x_61); +lean_inc(x_60); +lean_dec(x_50); +x_62 = lean_expr_abstract_range(x_60, x_5, x_1); +lean_dec(x_1); +lean_dec(x_60); +if (x_4 == 0) +{ +lean_object* x_63; lean_object* x_64; lean_object* x_65; lean_object* x_66; +x_63 = l_Lean_mkForall(x_42, x_44, x_62, x_9); +x_64 = lean_unsigned_to_nat(1u); +x_65 = lean_nat_add(x_10, x_64); +lean_dec(x_10); +lean_ctor_set(x_6, 1, x_65); +lean_ctor_set(x_6, 0, x_63); +x_66 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_66, 0, x_6); +lean_ctor_set(x_66, 1, x_61); +return x_66; +} +else +{ +lean_object* x_67; lean_object* x_68; lean_object* x_69; lean_object* x_70; +x_67 = l_Lean_mkLambda(x_42, x_44, x_62, x_9); +x_68 = lean_unsigned_to_nat(1u); +x_69 = lean_nat_add(x_10, x_68); +lean_dec(x_10); +lean_ctor_set(x_6, 1, x_69); +lean_ctor_set(x_6, 0, x_67); +x_70 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_70, 0, x_6); +lean_ctor_set(x_70, 1, x_61); +return x_70; +} +} +} +else +{ +uint8_t x_71; +lean_dec(x_42); +lean_free_object(x_6); +lean_dec(x_10); +lean_dec(x_9); +lean_dec(x_1); +x_71 = !lean_is_exclusive(x_50); +if (x_71 == 0) +{ +return x_50; +} +else +{ +lean_object* x_72; lean_object* x_73; lean_object* x_74; +x_72 = lean_ctor_get(x_50, 0); +x_73 = lean_ctor_get(x_50, 1); +lean_inc(x_73); +lean_inc(x_72); +lean_dec(x_50); +x_74 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_74, 0, x_72); +lean_ctor_set(x_74, 1, x_73); +return x_74; +} +} +} +} +} +else +{ +lean_object* x_75; lean_object* x_76; lean_object* x_77; lean_object* x_78; uint8_t x_79; +x_75 = lean_ctor_get(x_13, 2); +lean_inc(x_75); +x_76 = lean_ctor_get(x_13, 3); +lean_inc(x_76); +x_77 = lean_ctor_get(x_13, 4); +lean_inc(x_77); +lean_dec(x_13); +x_78 = lean_unsigned_to_nat(0u); +x_79 = lean_expr_has_loose_bvar(x_9, x_78); +if (x_79 == 0) +{ +lean_object* x_80; lean_object* x_81; lean_object* x_82; +lean_dec(x_77); +lean_dec(x_76); +lean_dec(x_75); +lean_dec(x_1); +x_80 = lean_unsigned_to_nat(1u); +x_81 = lean_expr_lower_loose_bvars(x_9, x_80, x_80); +lean_dec(x_9); +lean_ctor_set(x_6, 0, x_81); +x_82 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_82, 0, x_6); +lean_ctor_set(x_82, 1, x_7); +return x_82; +} +else +{ +lean_object* x_83; +lean_inc(x_1); +x_83 = l_Lean_MetavarContext_MkBinding_elimMVarDeps(x_1, x_76, x_7); +if (lean_obj_tag(x_83) == 0) +{ +lean_object* x_84; lean_object* x_85; lean_object* x_86; lean_object* x_87; +x_84 = lean_ctor_get(x_83, 0); +lean_inc(x_84); +x_85 = lean_ctor_get(x_83, 1); +lean_inc(x_85); +lean_dec(x_83); +x_86 = lean_expr_abstract_range(x_84, x_5, x_1); +lean_dec(x_84); +lean_inc(x_1); +x_87 = l_Lean_MetavarContext_MkBinding_elimMVarDeps(x_1, x_77, x_85); +if (lean_obj_tag(x_87) == 0) +{ +uint8_t x_88; +x_88 = !lean_is_exclusive(x_87); +if (x_88 == 0) +{ +lean_object* x_89; lean_object* x_90; uint8_t x_91; lean_object* x_92; lean_object* x_93; lean_object* x_94; +x_89 = lean_ctor_get(x_87, 0); +x_90 = lean_expr_abstract_range(x_89, x_5, x_1); +lean_dec(x_1); +lean_dec(x_89); +x_91 = 0; +x_92 = l_Lean_mkLet(x_75, x_86, x_90, x_9, x_91); +x_93 = lean_unsigned_to_nat(1u); +x_94 = lean_nat_add(x_10, x_93); +lean_dec(x_10); +lean_ctor_set(x_6, 1, x_94); +lean_ctor_set(x_6, 0, x_92); +lean_ctor_set(x_87, 0, x_6); +return x_87; +} +else +{ +lean_object* x_95; lean_object* x_96; lean_object* x_97; uint8_t x_98; lean_object* x_99; lean_object* x_100; lean_object* x_101; lean_object* x_102; +x_95 = lean_ctor_get(x_87, 0); +x_96 = lean_ctor_get(x_87, 1); +lean_inc(x_96); +lean_inc(x_95); +lean_dec(x_87); +x_97 = lean_expr_abstract_range(x_95, x_5, x_1); +lean_dec(x_1); +lean_dec(x_95); +x_98 = 0; +x_99 = l_Lean_mkLet(x_75, x_86, x_97, x_9, x_98); +x_100 = lean_unsigned_to_nat(1u); +x_101 = lean_nat_add(x_10, x_100); +lean_dec(x_10); +lean_ctor_set(x_6, 1, x_101); +lean_ctor_set(x_6, 0, x_99); +x_102 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_102, 0, x_6); +lean_ctor_set(x_102, 1, x_96); +return x_102; +} +} +else +{ +uint8_t x_103; +lean_dec(x_86); +lean_dec(x_75); +lean_free_object(x_6); +lean_dec(x_10); +lean_dec(x_9); +lean_dec(x_1); +x_103 = !lean_is_exclusive(x_87); +if (x_103 == 0) +{ +return x_87; +} +else +{ +lean_object* x_104; lean_object* x_105; lean_object* x_106; +x_104 = lean_ctor_get(x_87, 0); +x_105 = lean_ctor_get(x_87, 1); +lean_inc(x_105); +lean_inc(x_104); +lean_dec(x_87); +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 +{ +uint8_t x_107; +lean_dec(x_77); +lean_dec(x_75); +lean_free_object(x_6); +lean_dec(x_10); +lean_dec(x_9); +lean_dec(x_1); +x_107 = !lean_is_exclusive(x_83); +if (x_107 == 0) +{ +return x_83; +} +else +{ +lean_object* x_108; lean_object* x_109; lean_object* x_110; +x_108 = lean_ctor_get(x_83, 0); +x_109 = lean_ctor_get(x_83, 1); +lean_inc(x_109); +lean_inc(x_108); +lean_dec(x_83); +x_110 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_110, 0, x_108); +lean_ctor_set(x_110, 1, x_109); +return x_110; +} +} +} +} +} +else +{ +lean_object* x_111; lean_object* x_112; lean_object* x_113; lean_object* x_114; lean_object* x_115; +x_111 = lean_ctor_get(x_6, 0); +x_112 = lean_ctor_get(x_6, 1); +lean_inc(x_112); +lean_inc(x_111); +lean_dec(x_6); +x_113 = l_Lean_Expr_Inhabited; +x_114 = lean_array_get(x_113, x_1, x_5); +x_115 = l_Lean_LocalContext_getFVar_x21(x_2, x_114); +lean_dec(x_114); +if (lean_obj_tag(x_115) == 0) +{ +if (x_3 == 0) +{ +lean_object* x_116; lean_object* x_117; uint8_t x_118; lean_object* x_119; +x_116 = lean_ctor_get(x_115, 2); +lean_inc(x_116); +x_117 = lean_ctor_get(x_115, 3); +lean_inc(x_117); +x_118 = lean_ctor_get_uint8(x_115, sizeof(void*)*4); +lean_dec(x_115); +lean_inc(x_1); +x_119 = l_Lean_MetavarContext_MkBinding_elimMVarDeps(x_1, x_117, x_7); +if (lean_obj_tag(x_119) == 0) +{ +lean_object* x_120; lean_object* x_121; lean_object* x_122; lean_object* x_123; +x_120 = lean_ctor_get(x_119, 0); +lean_inc(x_120); +x_121 = lean_ctor_get(x_119, 1); +lean_inc(x_121); +if (lean_is_exclusive(x_119)) { + lean_ctor_release(x_119, 0); + lean_ctor_release(x_119, 1); + x_122 = x_119; +} else { + lean_dec_ref(x_119); + x_122 = lean_box(0); +} +x_123 = lean_expr_abstract_range(x_120, x_5, x_1); +lean_dec(x_1); +lean_dec(x_120); +if (x_4 == 0) +{ +lean_object* x_124; lean_object* x_125; lean_object* x_126; lean_object* x_127; lean_object* x_128; +x_124 = l_Lean_mkForall(x_116, x_118, x_123, x_111); +x_125 = lean_unsigned_to_nat(1u); +x_126 = lean_nat_add(x_112, x_125); +lean_dec(x_112); +x_127 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_127, 0, x_124); +lean_ctor_set(x_127, 1, x_126); +if (lean_is_scalar(x_122)) { + x_128 = lean_alloc_ctor(0, 2, 0); +} else { + x_128 = x_122; +} +lean_ctor_set(x_128, 0, x_127); +lean_ctor_set(x_128, 1, x_121); +return x_128; +} +else +{ +lean_object* x_129; lean_object* x_130; lean_object* x_131; lean_object* x_132; lean_object* x_133; +x_129 = l_Lean_mkLambda(x_116, x_118, x_123, x_111); +x_130 = lean_unsigned_to_nat(1u); +x_131 = lean_nat_add(x_112, x_130); +lean_dec(x_112); +x_132 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_132, 0, x_129); +lean_ctor_set(x_132, 1, x_131); +if (lean_is_scalar(x_122)) { + x_133 = lean_alloc_ctor(0, 2, 0); +} else { + x_133 = x_122; +} +lean_ctor_set(x_133, 0, x_132); +lean_ctor_set(x_133, 1, x_121); +return x_133; +} +} +else +{ +lean_object* x_134; lean_object* x_135; lean_object* x_136; lean_object* x_137; +lean_dec(x_116); +lean_dec(x_112); +lean_dec(x_111); +lean_dec(x_1); +x_134 = lean_ctor_get(x_119, 0); +lean_inc(x_134); +x_135 = lean_ctor_get(x_119, 1); +lean_inc(x_135); +if (lean_is_exclusive(x_119)) { + lean_ctor_release(x_119, 0); + lean_ctor_release(x_119, 1); + x_136 = x_119; +} else { + lean_dec_ref(x_119); + x_136 = lean_box(0); +} +if (lean_is_scalar(x_136)) { + x_137 = lean_alloc_ctor(1, 2, 0); +} else { + x_137 = x_136; +} +lean_ctor_set(x_137, 0, x_134); +lean_ctor_set(x_137, 1, x_135); +return x_137; +} +} +else +{ +lean_object* x_138; lean_object* x_139; uint8_t x_140; lean_object* x_141; uint8_t x_142; +x_138 = lean_ctor_get(x_115, 2); +lean_inc(x_138); +x_139 = lean_ctor_get(x_115, 3); +lean_inc(x_139); +x_140 = lean_ctor_get_uint8(x_115, sizeof(void*)*4); +lean_dec(x_115); +x_141 = lean_unsigned_to_nat(0u); +x_142 = lean_expr_has_loose_bvar(x_111, x_141); +if (x_142 == 0) +{ +lean_object* x_143; lean_object* x_144; lean_object* x_145; lean_object* x_146; +lean_dec(x_139); +lean_dec(x_138); +lean_dec(x_1); +x_143 = lean_unsigned_to_nat(1u); +x_144 = lean_expr_lower_loose_bvars(x_111, x_143, x_143); +lean_dec(x_111); +x_145 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_145, 0, x_144); +lean_ctor_set(x_145, 1, x_112); +x_146 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_146, 0, x_145); +lean_ctor_set(x_146, 1, x_7); +return x_146; +} +else +{ +lean_object* x_147; +lean_inc(x_1); +x_147 = l_Lean_MetavarContext_MkBinding_elimMVarDeps(x_1, x_139, x_7); +if (lean_obj_tag(x_147) == 0) +{ +lean_object* x_148; lean_object* x_149; lean_object* x_150; lean_object* x_151; +x_148 = lean_ctor_get(x_147, 0); +lean_inc(x_148); +x_149 = lean_ctor_get(x_147, 1); +lean_inc(x_149); +if (lean_is_exclusive(x_147)) { + lean_ctor_release(x_147, 0); + lean_ctor_release(x_147, 1); + x_150 = x_147; +} else { + lean_dec_ref(x_147); + x_150 = lean_box(0); +} +x_151 = lean_expr_abstract_range(x_148, x_5, x_1); +lean_dec(x_1); +lean_dec(x_148); +if (x_4 == 0) +{ +lean_object* x_152; lean_object* x_153; lean_object* x_154; lean_object* x_155; lean_object* x_156; +x_152 = l_Lean_mkForall(x_138, x_140, x_151, x_111); +x_153 = lean_unsigned_to_nat(1u); +x_154 = lean_nat_add(x_112, x_153); +lean_dec(x_112); +x_155 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_155, 0, x_152); +lean_ctor_set(x_155, 1, x_154); +if (lean_is_scalar(x_150)) { + x_156 = lean_alloc_ctor(0, 2, 0); +} else { + x_156 = x_150; +} +lean_ctor_set(x_156, 0, x_155); +lean_ctor_set(x_156, 1, x_149); +return x_156; +} +else +{ +lean_object* x_157; lean_object* x_158; lean_object* x_159; lean_object* x_160; lean_object* x_161; +x_157 = l_Lean_mkLambda(x_138, x_140, x_151, x_111); +x_158 = lean_unsigned_to_nat(1u); +x_159 = lean_nat_add(x_112, x_158); +lean_dec(x_112); +x_160 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_160, 0, x_157); +lean_ctor_set(x_160, 1, x_159); +if (lean_is_scalar(x_150)) { + x_161 = lean_alloc_ctor(0, 2, 0); +} else { + x_161 = x_150; +} +lean_ctor_set(x_161, 0, x_160); +lean_ctor_set(x_161, 1, x_149); +return x_161; +} +} +else +{ +lean_object* x_162; lean_object* x_163; lean_object* x_164; lean_object* x_165; +lean_dec(x_138); +lean_dec(x_112); +lean_dec(x_111); +lean_dec(x_1); +x_162 = lean_ctor_get(x_147, 0); +lean_inc(x_162); +x_163 = lean_ctor_get(x_147, 1); +lean_inc(x_163); +if (lean_is_exclusive(x_147)) { + lean_ctor_release(x_147, 0); + lean_ctor_release(x_147, 1); + x_164 = x_147; +} else { + lean_dec_ref(x_147); + x_164 = lean_box(0); +} +if (lean_is_scalar(x_164)) { + x_165 = lean_alloc_ctor(1, 2, 0); +} else { + x_165 = x_164; +} +lean_ctor_set(x_165, 0, x_162); +lean_ctor_set(x_165, 1, x_163); +return x_165; +} +} +} +} +else +{ +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_115, 2); +lean_inc(x_166); +x_167 = lean_ctor_get(x_115, 3); +lean_inc(x_167); +x_168 = lean_ctor_get(x_115, 4); +lean_inc(x_168); +lean_dec(x_115); +x_169 = lean_unsigned_to_nat(0u); +x_170 = lean_expr_has_loose_bvar(x_111, x_169); +if (x_170 == 0) +{ +lean_object* x_171; lean_object* x_172; lean_object* x_173; lean_object* x_174; +lean_dec(x_168); +lean_dec(x_167); +lean_dec(x_166); +lean_dec(x_1); +x_171 = lean_unsigned_to_nat(1u); +x_172 = lean_expr_lower_loose_bvars(x_111, x_171, x_171); +lean_dec(x_111); +x_173 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_173, 0, x_172); +lean_ctor_set(x_173, 1, x_112); +x_174 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_174, 0, x_173); +lean_ctor_set(x_174, 1, x_7); +return x_174; +} +else +{ +lean_object* x_175; +lean_inc(x_1); +x_175 = l_Lean_MetavarContext_MkBinding_elimMVarDeps(x_1, x_167, x_7); +if (lean_obj_tag(x_175) == 0) +{ +lean_object* x_176; lean_object* x_177; lean_object* x_178; lean_object* x_179; +x_176 = lean_ctor_get(x_175, 0); +lean_inc(x_176); +x_177 = lean_ctor_get(x_175, 1); +lean_inc(x_177); +lean_dec(x_175); +x_178 = lean_expr_abstract_range(x_176, x_5, x_1); +lean_dec(x_176); +lean_inc(x_1); +x_179 = l_Lean_MetavarContext_MkBinding_elimMVarDeps(x_1, x_168, x_177); +if (lean_obj_tag(x_179) == 0) +{ +lean_object* x_180; lean_object* x_181; lean_object* x_182; lean_object* x_183; uint8_t x_184; lean_object* x_185; lean_object* x_186; lean_object* x_187; lean_object* x_188; lean_object* x_189; +x_180 = lean_ctor_get(x_179, 0); +lean_inc(x_180); +x_181 = lean_ctor_get(x_179, 1); +lean_inc(x_181); +if (lean_is_exclusive(x_179)) { + lean_ctor_release(x_179, 0); + lean_ctor_release(x_179, 1); + x_182 = x_179; +} else { + lean_dec_ref(x_179); + x_182 = lean_box(0); +} +x_183 = lean_expr_abstract_range(x_180, x_5, x_1); +lean_dec(x_1); +lean_dec(x_180); +x_184 = 0; +x_185 = l_Lean_mkLet(x_166, x_178, x_183, x_111, x_184); +x_186 = lean_unsigned_to_nat(1u); +x_187 = lean_nat_add(x_112, x_186); +lean_dec(x_112); +x_188 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_188, 0, x_185); +lean_ctor_set(x_188, 1, x_187); +if (lean_is_scalar(x_182)) { + x_189 = lean_alloc_ctor(0, 2, 0); +} else { + x_189 = x_182; +} +lean_ctor_set(x_189, 0, x_188); +lean_ctor_set(x_189, 1, x_181); +return x_189; +} +else +{ +lean_object* x_190; lean_object* x_191; lean_object* x_192; lean_object* x_193; +lean_dec(x_178); +lean_dec(x_166); +lean_dec(x_112); +lean_dec(x_111); +lean_dec(x_1); +x_190 = lean_ctor_get(x_179, 0); +lean_inc(x_190); +x_191 = lean_ctor_get(x_179, 1); +lean_inc(x_191); +if (lean_is_exclusive(x_179)) { + lean_ctor_release(x_179, 0); + lean_ctor_release(x_179, 1); + x_192 = x_179; +} else { + lean_dec_ref(x_179); + x_192 = lean_box(0); +} +if (lean_is_scalar(x_192)) { + x_193 = lean_alloc_ctor(1, 2, 0); +} else { + x_193 = x_192; +} +lean_ctor_set(x_193, 0, x_190); +lean_ctor_set(x_193, 1, x_191); +return x_193; +} +} +else +{ +lean_object* x_194; lean_object* x_195; lean_object* x_196; lean_object* x_197; +lean_dec(x_168); +lean_dec(x_166); +lean_dec(x_112); +lean_dec(x_111); +lean_dec(x_1); +x_194 = lean_ctor_get(x_175, 0); +lean_inc(x_194); +x_195 = lean_ctor_get(x_175, 1); +lean_inc(x_195); +if (lean_is_exclusive(x_175)) { + lean_ctor_release(x_175, 0); + lean_ctor_release(x_175, 1); + x_196 = x_175; +} else { + lean_dec_ref(x_175); + x_196 = lean_box(0); +} +if (lean_is_scalar(x_196)) { + x_197 = lean_alloc_ctor(1, 2, 0); +} else { + x_197 = x_196; +} +lean_ctor_set(x_197, 0, x_194); +lean_ctor_set(x_197, 1, x_195); +return x_197; } } } } } } -lean_object* l_Lean_MetavarContext_MkBinding_mkBinding(uint8_t x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) { +lean_object* l_Lean_MetavarContext_MkBinding_mkBinding(uint8_t x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, uint8_t x_5, lean_object* x_6) { _start: { -lean_object* x_6; lean_object* x_7; -x_6 = lean_array_get_size(x_3); +lean_object* x_7; lean_object* x_8; +x_7 = lean_array_get_size(x_3); lean_inc(x_3); -x_7 = l_Lean_MetavarContext_MkBinding_elimMVarDeps(x_3, x_4, x_5); -if (lean_obj_tag(x_7) == 0) +x_8 = l_Lean_MetavarContext_MkBinding_elimMVarDeps(x_3, x_4, x_6); +if (lean_obj_tag(x_8) == 0) { -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; -x_8 = lean_ctor_get(x_7, 0); -lean_inc(x_8); -x_9 = lean_ctor_get(x_7, 1); +lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; +x_9 = lean_ctor_get(x_8, 0); lean_inc(x_9); -lean_dec(x_7); -x_10 = lean_expr_abstract_range(x_8, x_6, x_3); +x_10 = lean_ctor_get(x_8, 1); +lean_inc(x_10); lean_dec(x_8); -x_11 = lean_box(x_1); -x_12 = lean_alloc_closure((void*)(l_Lean_MetavarContext_MkBinding_mkBinding___lambda__1___boxed), 6, 3); -lean_closure_set(x_12, 0, x_3); -lean_closure_set(x_12, 1, x_2); -lean_closure_set(x_12, 2, x_11); -x_13 = l_EIO_Monad___closed__1; -x_14 = l_Nat_foldRevMAux___main___rarg(x_13, x_12, x_6, x_10); -lean_dec(x_6); -x_15 = lean_apply_1(x_14, x_9); -return x_15; -} -else -{ -uint8_t x_16; -lean_dec(x_6); -lean_dec(x_3); -lean_dec(x_2); -x_16 = !lean_is_exclusive(x_7); -if (x_16 == 0) -{ -return x_7; -} -else -{ -lean_object* x_17; lean_object* x_18; lean_object* x_19; -x_17 = lean_ctor_get(x_7, 0); -x_18 = lean_ctor_get(x_7, 1); -lean_inc(x_18); -lean_inc(x_17); +x_11 = lean_expr_abstract_range(x_9, x_7, x_3); +lean_dec(x_9); +x_12 = lean_box(x_5); +x_13 = lean_box(x_1); +x_14 = lean_alloc_closure((void*)(l_Lean_MetavarContext_MkBinding_mkBinding___lambda__1___boxed), 7, 4); +lean_closure_set(x_14, 0, x_3); +lean_closure_set(x_14, 1, x_2); +lean_closure_set(x_14, 2, x_12); +lean_closure_set(x_14, 3, x_13); +x_15 = lean_unsigned_to_nat(0u); +x_16 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_16, 0, x_11); +lean_ctor_set(x_16, 1, x_15); +x_17 = l_EIO_Monad___closed__1; +x_18 = l_Nat_foldRevMAux___main___rarg(x_17, x_14, x_7, x_16); lean_dec(x_7); -x_19 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_19, 0, x_17); -lean_ctor_set(x_19, 1, x_18); +x_19 = lean_apply_1(x_18, x_10); return x_19; } -} -} -} -lean_object* l_Lean_MetavarContext_MkBinding_mkBinding___lambda__1___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6) { -_start: +else { -uint8_t x_7; lean_object* x_8; -x_7 = lean_unbox(x_3); +uint8_t x_20; +lean_dec(x_7); lean_dec(x_3); -x_8 = l_Lean_MetavarContext_MkBinding_mkBinding___lambda__1(x_1, x_2, x_7, x_4, x_5, x_6); -lean_dec(x_4); +lean_dec(x_2); +x_20 = !lean_is_exclusive(x_8); +if (x_20 == 0) +{ return x_8; } +else +{ +lean_object* x_21; lean_object* x_22; lean_object* x_23; +x_21 = lean_ctor_get(x_8, 0); +x_22 = lean_ctor_get(x_8, 1); +lean_inc(x_22); +lean_inc(x_21); +lean_dec(x_8); +x_23 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_23, 0, x_21); +lean_ctor_set(x_23, 1, x_22); +return x_23; } -lean_object* l_Lean_MetavarContext_MkBinding_mkBinding___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) { +} +} +} +lean_object* l_Lean_MetavarContext_MkBinding_mkBinding___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: { -uint8_t x_6; lean_object* x_7; -x_6 = lean_unbox(x_1); +uint8_t x_8; uint8_t x_9; lean_object* x_10; +x_8 = lean_unbox(x_3); +lean_dec(x_3); +x_9 = lean_unbox(x_4); +lean_dec(x_4); +x_10 = l_Lean_MetavarContext_MkBinding_mkBinding___lambda__1(x_1, x_2, x_8, x_9, x_5, x_6, x_7); +lean_dec(x_5); +return x_10; +} +} +lean_object* l_Lean_MetavarContext_MkBinding_mkBinding___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6) { +_start: +{ +uint8_t x_7; uint8_t x_8; lean_object* x_9; +x_7 = lean_unbox(x_1); lean_dec(x_1); -x_7 = l_Lean_MetavarContext_MkBinding_mkBinding(x_6, x_2, x_3, x_4, x_5); +x_8 = lean_unbox(x_5); +lean_dec(x_5); +x_9 = l_Lean_MetavarContext_MkBinding_mkBinding(x_7, x_2, x_3, x_4, x_8, x_6); +return x_9; +} +} +lean_object* l_Lean_MetavarContext_mkBinding(uint8_t x_1, lean_object* x_2, lean_object* x_3, uint8_t x_4, lean_object* x_5, lean_object* x_6) { +_start: +{ +lean_object* x_7; +x_7 = l_Lean_MetavarContext_MkBinding_mkBinding(x_1, x_5, x_2, x_3, x_4, x_6); return x_7; } } -lean_object* l_Lean_MetavarContext_mkBinding(uint8_t x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) { +lean_object* l_Lean_MetavarContext_mkBinding___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6) { _start: { -lean_object* x_6; -x_6 = l_Lean_MetavarContext_MkBinding_mkBinding(x_1, x_4, x_2, x_3, x_5); -return x_6; -} -} -lean_object* l_Lean_MetavarContext_mkBinding___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) { -_start: -{ -uint8_t x_6; lean_object* x_7; -x_6 = lean_unbox(x_1); +uint8_t x_7; uint8_t x_8; lean_object* x_9; +x_7 = lean_unbox(x_1); lean_dec(x_1); -x_7 = l_Lean_MetavarContext_mkBinding(x_6, x_2, x_3, x_4, x_5); -return x_7; +x_8 = lean_unbox(x_4); +lean_dec(x_4); +x_9 = l_Lean_MetavarContext_mkBinding(x_7, x_2, x_3, x_8, x_5, x_6); +return x_9; } } lean_object* l_Lean_MetavarContext_mkLambda(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { _start: { -uint8_t x_5; lean_object* x_6; +uint8_t x_5; uint8_t x_6; lean_object* x_7; x_5 = 1; -x_6 = l_Lean_MetavarContext_MkBinding_mkBinding(x_5, x_3, x_1, x_2, x_4); -return x_6; +x_6 = 0; +x_7 = l_Lean_MetavarContext_MkBinding_mkBinding(x_5, x_3, x_1, x_2, x_6, x_4); +if (lean_obj_tag(x_7) == 0) +{ +uint8_t x_8; +x_8 = !lean_is_exclusive(x_7); +if (x_8 == 0) +{ +lean_object* x_9; lean_object* x_10; +x_9 = lean_ctor_get(x_7, 0); +x_10 = lean_ctor_get(x_9, 0); +lean_inc(x_10); +lean_dec(x_9); +lean_ctor_set(x_7, 0, x_10); +return x_7; +} +else +{ +lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; +x_11 = lean_ctor_get(x_7, 0); +x_12 = lean_ctor_get(x_7, 1); +lean_inc(x_12); +lean_inc(x_11); +lean_dec(x_7); +x_13 = lean_ctor_get(x_11, 0); +lean_inc(x_13); +lean_dec(x_11); +x_14 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_14, 0, x_13); +lean_ctor_set(x_14, 1, x_12); +return x_14; +} +} +else +{ +uint8_t x_15; +x_15 = !lean_is_exclusive(x_7); +if (x_15 == 0) +{ +return x_7; +} +else +{ +lean_object* x_16; lean_object* x_17; lean_object* x_18; +x_16 = lean_ctor_get(x_7, 0); +x_17 = lean_ctor_get(x_7, 1); +lean_inc(x_17); +lean_inc(x_16); +lean_dec(x_7); +x_18 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_18, 0, x_16); +lean_ctor_set(x_18, 1, x_17); +return x_18; +} +} } } lean_object* l_Lean_MetavarContext_mkForall(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { @@ -31610,9 +32258,71 @@ _start: { uint8_t x_5; lean_object* x_6; x_5 = 0; -x_6 = l_Lean_MetavarContext_MkBinding_mkBinding(x_5, x_3, x_1, x_2, x_4); +x_6 = l_Lean_MetavarContext_MkBinding_mkBinding(x_5, x_3, x_1, x_2, x_5, x_4); +if (lean_obj_tag(x_6) == 0) +{ +uint8_t x_7; +x_7 = !lean_is_exclusive(x_6); +if (x_7 == 0) +{ +lean_object* x_8; lean_object* x_9; +x_8 = lean_ctor_get(x_6, 0); +x_9 = lean_ctor_get(x_8, 0); +lean_inc(x_9); +lean_dec(x_8); +lean_ctor_set(x_6, 0, x_9); return x_6; } +else +{ +lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; +x_10 = lean_ctor_get(x_6, 0); +x_11 = lean_ctor_get(x_6, 1); +lean_inc(x_11); +lean_inc(x_10); +lean_dec(x_6); +x_12 = lean_ctor_get(x_10, 0); +lean_inc(x_12); +lean_dec(x_10); +x_13 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_13, 0, x_12); +lean_ctor_set(x_13, 1, x_11); +return x_13; +} +} +else +{ +uint8_t x_14; +x_14 = !lean_is_exclusive(x_6); +if (x_14 == 0) +{ +return x_6; +} +else +{ +lean_object* x_15; lean_object* x_16; lean_object* x_17; +x_15 = lean_ctor_get(x_6, 0); +x_16 = lean_ctor_get(x_6, 1); +lean_inc(x_16); +lean_inc(x_15); +lean_dec(x_6); +x_17 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_17, 0, x_15); +lean_ctor_set(x_17, 1, x_16); +return x_17; +} +} +} +} +lean_object* l_Lean_MetavarContext_mkForallUsedOnly(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { +_start: +{ +uint8_t x_5; uint8_t x_6; lean_object* x_7; +x_5 = 0; +x_6 = 1; +x_7 = l_Lean_MetavarContext_MkBinding_mkBinding(x_5, x_3, x_1, x_2, x_6, x_4); +return x_7; +} } lean_object* l_Lean_MetavarContext_isWellFormed___main(lean_object* x_1, lean_object* x_2, lean_object* x_3) { _start: @@ -32071,6 +32781,1079 @@ x_4 = l_Lean_MetavarContext_isWellFormed___main(x_1, x_2, x_3); return x_4; } } +lean_object* l_Lean_MetavarContext_LevelMVarToParam_mkParamName___main___rarg(lean_object* x_1, lean_object* x_2) { +_start: +{ +lean_object* x_3; uint8_t x_4; +x_3 = lean_ctor_get(x_1, 0); +lean_inc(x_3); +x_4 = !lean_is_exclusive(x_2); +if (x_4 == 0) +{ +lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; uint8_t x_10; +x_5 = lean_ctor_get(x_2, 1); +x_6 = lean_ctor_get(x_2, 2); +lean_inc(x_6); +x_7 = l_Lean_Name_appendIndexAfter(x_3, x_6); +x_8 = lean_ctor_get(x_1, 1); +lean_inc(x_8); +lean_inc(x_7); +x_9 = lean_apply_1(x_8, x_7); +x_10 = lean_unbox(x_9); +lean_dec(x_9); +if (x_10 == 0) +{ +lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; +lean_dec(x_1); +lean_inc(x_7); +x_11 = lean_array_push(x_5, x_7); +x_12 = lean_unsigned_to_nat(1u); +x_13 = lean_nat_add(x_6, x_12); +lean_dec(x_6); +lean_ctor_set(x_2, 2, x_13); +lean_ctor_set(x_2, 1, x_11); +x_14 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_14, 0, x_7); +lean_ctor_set(x_14, 1, x_2); +return x_14; +} +else +{ +lean_object* x_15; lean_object* x_16; +lean_dec(x_7); +x_15 = lean_unsigned_to_nat(1u); +x_16 = lean_nat_add(x_6, x_15); +lean_dec(x_6); +lean_ctor_set(x_2, 2, x_16); +goto _start; +} +} +else +{ +lean_object* x_18; lean_object* x_19; lean_object* x_20; lean_object* x_21; lean_object* x_22; lean_object* x_23; uint8_t x_24; +x_18 = lean_ctor_get(x_2, 0); +x_19 = lean_ctor_get(x_2, 1); +x_20 = lean_ctor_get(x_2, 2); +lean_inc(x_20); +lean_inc(x_19); +lean_inc(x_18); +lean_dec(x_2); +lean_inc(x_20); +x_21 = l_Lean_Name_appendIndexAfter(x_3, x_20); +x_22 = lean_ctor_get(x_1, 1); +lean_inc(x_22); +lean_inc(x_21); +x_23 = lean_apply_1(x_22, x_21); +x_24 = lean_unbox(x_23); +lean_dec(x_23); +if (x_24 == 0) +{ +lean_object* x_25; lean_object* x_26; lean_object* x_27; lean_object* x_28; lean_object* x_29; +lean_dec(x_1); +lean_inc(x_21); +x_25 = lean_array_push(x_19, x_21); +x_26 = lean_unsigned_to_nat(1u); +x_27 = lean_nat_add(x_20, x_26); +lean_dec(x_20); +x_28 = lean_alloc_ctor(0, 3, 0); +lean_ctor_set(x_28, 0, x_18); +lean_ctor_set(x_28, 1, x_25); +lean_ctor_set(x_28, 2, x_27); +x_29 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_29, 0, x_21); +lean_ctor_set(x_29, 1, x_28); +return x_29; +} +else +{ +lean_object* x_30; lean_object* x_31; lean_object* x_32; +lean_dec(x_21); +x_30 = lean_unsigned_to_nat(1u); +x_31 = lean_nat_add(x_20, x_30); +lean_dec(x_20); +x_32 = lean_alloc_ctor(0, 3, 0); +lean_ctor_set(x_32, 0, x_18); +lean_ctor_set(x_32, 1, x_19); +lean_ctor_set(x_32, 2, x_31); +x_2 = x_32; +goto _start; +} +} +} +} +lean_object* l_Lean_MetavarContext_LevelMVarToParam_mkParamName___main(lean_object* x_1) { +_start: +{ +lean_object* x_2; +x_2 = lean_alloc_closure((void*)(l_Lean_MetavarContext_LevelMVarToParam_mkParamName___main___rarg), 2, 0); +return x_2; +} +} +lean_object* l_Lean_MetavarContext_LevelMVarToParam_mkParamName___main___boxed(lean_object* x_1) { +_start: +{ +lean_object* x_2; +x_2 = l_Lean_MetavarContext_LevelMVarToParam_mkParamName___main(x_1); +lean_dec(x_1); +return x_2; +} +} +lean_object* l_Lean_MetavarContext_LevelMVarToParam_mkParamName___rarg(lean_object* x_1, lean_object* x_2) { +_start: +{ +lean_object* x_3; +x_3 = l_Lean_MetavarContext_LevelMVarToParam_mkParamName___main___rarg(x_1, x_2); +return x_3; +} +} +lean_object* l_Lean_MetavarContext_LevelMVarToParam_mkParamName(lean_object* x_1) { +_start: +{ +lean_object* x_2; +x_2 = lean_alloc_closure((void*)(l_Lean_MetavarContext_LevelMVarToParam_mkParamName___rarg), 2, 0); +return x_2; +} +} +lean_object* l_Lean_MetavarContext_LevelMVarToParam_mkParamName___boxed(lean_object* x_1) { +_start: +{ +lean_object* x_2; +x_2 = l_Lean_MetavarContext_LevelMVarToParam_mkParamName(x_1); +lean_dec(x_1); +return x_2; +} +} +lean_object* l_Lean_MetavarContext_LevelMVarToParam_visitLevel___main(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +_start: +{ +switch (lean_obj_tag(x_1)) { +case 1: +{ +lean_object* x_4; lean_object* x_5; uint8_t x_6; +x_4 = lean_ctor_get(x_1, 0); +lean_inc(x_4); +x_5 = l_Lean_MetavarContext_LevelMVarToParam_visitLevel___main(x_4, x_2, x_3); +x_6 = !lean_is_exclusive(x_5); +if (x_6 == 0) +{ +lean_object* x_7; lean_object* x_8; +x_7 = lean_ctor_get(x_5, 0); +x_8 = lean_level_update_succ(x_1, x_7); +lean_ctor_set(x_5, 0, x_8); +return x_5; +} +else +{ +lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; +x_9 = lean_ctor_get(x_5, 0); +x_10 = lean_ctor_get(x_5, 1); +lean_inc(x_10); +lean_inc(x_9); +lean_dec(x_5); +x_11 = lean_level_update_succ(x_1, x_9); +x_12 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_12, 0, x_11); +lean_ctor_set(x_12, 1, x_10); +return x_12; +} +} +case 2: +{ +lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; uint8_t x_19; +x_13 = lean_ctor_get(x_1, 0); +lean_inc(x_13); +x_14 = lean_ctor_get(x_1, 1); +lean_inc(x_14); +lean_inc(x_2); +x_15 = l_Lean_MetavarContext_LevelMVarToParam_visitLevel___main(x_13, x_2, x_3); +x_16 = lean_ctor_get(x_15, 0); +lean_inc(x_16); +x_17 = lean_ctor_get(x_15, 1); +lean_inc(x_17); +lean_dec(x_15); +x_18 = l_Lean_MetavarContext_LevelMVarToParam_visitLevel___main(x_14, x_2, x_17); +x_19 = !lean_is_exclusive(x_18); +if (x_19 == 0) +{ +lean_object* x_20; lean_object* x_21; +x_20 = lean_ctor_get(x_18, 0); +x_21 = lean_level_update_max(x_1, x_16, x_20); +lean_ctor_set(x_18, 0, x_21); +return x_18; +} +else +{ +lean_object* x_22; lean_object* x_23; lean_object* x_24; lean_object* x_25; +x_22 = lean_ctor_get(x_18, 0); +x_23 = lean_ctor_get(x_18, 1); +lean_inc(x_23); +lean_inc(x_22); +lean_dec(x_18); +x_24 = lean_level_update_max(x_1, x_16, x_22); +x_25 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_25, 0, x_24); +lean_ctor_set(x_25, 1, x_23); +return x_25; +} +} +case 3: +{ +lean_object* x_26; lean_object* x_27; lean_object* x_28; lean_object* x_29; lean_object* x_30; lean_object* x_31; uint8_t x_32; +x_26 = lean_ctor_get(x_1, 0); +lean_inc(x_26); +x_27 = lean_ctor_get(x_1, 1); +lean_inc(x_27); +lean_inc(x_2); +x_28 = l_Lean_MetavarContext_LevelMVarToParam_visitLevel___main(x_26, x_2, x_3); +x_29 = lean_ctor_get(x_28, 0); +lean_inc(x_29); +x_30 = lean_ctor_get(x_28, 1); +lean_inc(x_30); +lean_dec(x_28); +x_31 = l_Lean_MetavarContext_LevelMVarToParam_visitLevel___main(x_27, x_2, x_30); +x_32 = !lean_is_exclusive(x_31); +if (x_32 == 0) +{ +lean_object* x_33; lean_object* x_34; +x_33 = lean_ctor_get(x_31, 0); +x_34 = lean_level_update_imax(x_1, x_29, x_33); +lean_ctor_set(x_31, 0, x_34); +return x_31; +} +else +{ +lean_object* x_35; lean_object* x_36; lean_object* x_37; lean_object* x_38; +x_35 = lean_ctor_get(x_31, 0); +x_36 = lean_ctor_get(x_31, 1); +lean_inc(x_36); +lean_inc(x_35); +lean_dec(x_31); +x_37 = lean_level_update_imax(x_1, x_29, x_35); +x_38 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_38, 0, x_37); +lean_ctor_set(x_38, 1, x_36); +return x_38; +} +} +case 5: +{ +lean_object* x_39; lean_object* x_40; lean_object* x_41; +x_39 = lean_ctor_get(x_1, 0); +lean_inc(x_39); +lean_dec(x_1); +x_40 = lean_ctor_get(x_3, 0); +lean_inc(x_40); +lean_inc(x_39); +x_41 = lean_metavar_ctx_get_level_assignment(x_40, x_39); +if (lean_obj_tag(x_41) == 0) +{ +lean_object* x_42; uint8_t x_43; +x_42 = l_Lean_MetavarContext_LevelMVarToParam_mkParamName___main___rarg(x_2, x_3); +x_43 = !lean_is_exclusive(x_42); +if (x_43 == 0) +{ +lean_object* x_44; lean_object* x_45; lean_object* x_46; uint8_t x_47; +x_44 = lean_ctor_get(x_42, 0); +x_45 = lean_ctor_get(x_42, 1); +x_46 = l_Lean_mkLevelParam(x_44); +x_47 = !lean_is_exclusive(x_45); +if (x_47 == 0) +{ +lean_object* x_48; lean_object* x_49; +x_48 = lean_ctor_get(x_45, 0); +lean_inc(x_46); +x_49 = lean_metavar_ctx_assign_level(x_48, x_39, x_46); +lean_ctor_set(x_45, 0, x_49); +lean_ctor_set(x_42, 0, x_46); +return x_42; +} +else +{ +lean_object* x_50; lean_object* x_51; lean_object* x_52; lean_object* x_53; lean_object* x_54; +x_50 = lean_ctor_get(x_45, 0); +x_51 = lean_ctor_get(x_45, 1); +x_52 = lean_ctor_get(x_45, 2); +lean_inc(x_52); +lean_inc(x_51); +lean_inc(x_50); +lean_dec(x_45); +lean_inc(x_46); +x_53 = lean_metavar_ctx_assign_level(x_50, x_39, x_46); +x_54 = lean_alloc_ctor(0, 3, 0); +lean_ctor_set(x_54, 0, x_53); +lean_ctor_set(x_54, 1, x_51); +lean_ctor_set(x_54, 2, x_52); +lean_ctor_set(x_42, 1, x_54); +lean_ctor_set(x_42, 0, x_46); +return x_42; +} +} +else +{ +lean_object* x_55; lean_object* x_56; lean_object* x_57; lean_object* x_58; lean_object* x_59; lean_object* x_60; lean_object* x_61; lean_object* x_62; lean_object* x_63; lean_object* x_64; +x_55 = lean_ctor_get(x_42, 0); +x_56 = lean_ctor_get(x_42, 1); +lean_inc(x_56); +lean_inc(x_55); +lean_dec(x_42); +x_57 = l_Lean_mkLevelParam(x_55); +x_58 = lean_ctor_get(x_56, 0); +lean_inc(x_58); +x_59 = lean_ctor_get(x_56, 1); +lean_inc(x_59); +x_60 = lean_ctor_get(x_56, 2); +lean_inc(x_60); +if (lean_is_exclusive(x_56)) { + lean_ctor_release(x_56, 0); + lean_ctor_release(x_56, 1); + lean_ctor_release(x_56, 2); + x_61 = x_56; +} else { + lean_dec_ref(x_56); + x_61 = lean_box(0); +} +lean_inc(x_57); +x_62 = lean_metavar_ctx_assign_level(x_58, x_39, x_57); +if (lean_is_scalar(x_61)) { + x_63 = lean_alloc_ctor(0, 3, 0); +} else { + x_63 = x_61; +} +lean_ctor_set(x_63, 0, x_62); +lean_ctor_set(x_63, 1, x_59); +lean_ctor_set(x_63, 2, x_60); +x_64 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_64, 0, x_57); +lean_ctor_set(x_64, 1, x_63); +return x_64; +} +} +else +{ +lean_object* x_65; +lean_dec(x_39); +x_65 = lean_ctor_get(x_41, 0); +lean_inc(x_65); +lean_dec(x_41); +x_1 = x_65; +goto _start; +} +} +default: +{ +lean_object* x_67; +lean_dec(x_2); +x_67 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_67, 0, x_1); +lean_ctor_set(x_67, 1, x_3); +return x_67; +} +} +} +} +lean_object* l_Lean_MetavarContext_LevelMVarToParam_visitLevel(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +_start: +{ +lean_object* x_4; +x_4 = l_Lean_MetavarContext_LevelMVarToParam_visitLevel___main(x_1, x_2, x_3); +return x_4; +} +} +lean_object* l___private_Init_Lean_MetavarContext_24__visit(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { +_start: +{ +uint8_t x_5; +x_5 = l_Lean_Expr_hasLevelMVar(x_2); +if (x_5 == 0) +{ +lean_object* x_6; +lean_dec(x_3); +lean_dec(x_1); +x_6 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_6, 0, x_2); +lean_ctor_set(x_6, 1, x_4); +return x_6; +} +else +{ +lean_object* x_7; +x_7 = lean_apply_3(x_1, x_2, x_3, x_4); +return x_7; +} +} +} +lean_object* l_List_mapM___main___at_Lean_MetavarContext_LevelMVarToParam_main___main___spec__1(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +_start: +{ +if (lean_obj_tag(x_1) == 0) +{ +lean_object* x_4; lean_object* x_5; +lean_dec(x_2); +x_4 = lean_box(0); +x_5 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_5, 0, x_4); +lean_ctor_set(x_5, 1, x_3); +return x_5; +} +else +{ +uint8_t x_6; +x_6 = !lean_is_exclusive(x_1); +if (x_6 == 0) +{ +lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; uint8_t x_13; +x_7 = lean_ctor_get(x_1, 0); +x_8 = lean_ctor_get(x_1, 1); +lean_inc(x_2); +x_9 = l_Lean_MetavarContext_LevelMVarToParam_visitLevel___main(x_7, x_2, x_3); +x_10 = lean_ctor_get(x_9, 0); +lean_inc(x_10); +x_11 = lean_ctor_get(x_9, 1); +lean_inc(x_11); +lean_dec(x_9); +x_12 = l_List_mapM___main___at_Lean_MetavarContext_LevelMVarToParam_main___main___spec__1(x_8, x_2, x_11); +x_13 = !lean_is_exclusive(x_12); +if (x_13 == 0) +{ +lean_object* x_14; +x_14 = lean_ctor_get(x_12, 0); +lean_ctor_set(x_1, 1, x_14); +lean_ctor_set(x_1, 0, x_10); +lean_ctor_set(x_12, 0, x_1); +return x_12; +} +else +{ +lean_object* x_15; lean_object* x_16; lean_object* x_17; +x_15 = lean_ctor_get(x_12, 0); +x_16 = lean_ctor_get(x_12, 1); +lean_inc(x_16); +lean_inc(x_15); +lean_dec(x_12); +lean_ctor_set(x_1, 1, x_15); +lean_ctor_set(x_1, 0, x_10); +x_17 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_17, 0, x_1); +lean_ctor_set(x_17, 1, x_16); +return x_17; +} +} +else +{ +lean_object* x_18; lean_object* x_19; lean_object* x_20; lean_object* x_21; lean_object* x_22; lean_object* x_23; lean_object* x_24; lean_object* x_25; lean_object* x_26; lean_object* x_27; lean_object* x_28; +x_18 = lean_ctor_get(x_1, 0); +x_19 = lean_ctor_get(x_1, 1); +lean_inc(x_19); +lean_inc(x_18); +lean_dec(x_1); +lean_inc(x_2); +x_20 = l_Lean_MetavarContext_LevelMVarToParam_visitLevel___main(x_18, x_2, x_3); +x_21 = lean_ctor_get(x_20, 0); +lean_inc(x_21); +x_22 = lean_ctor_get(x_20, 1); +lean_inc(x_22); +lean_dec(x_20); +x_23 = l_List_mapM___main___at_Lean_MetavarContext_LevelMVarToParam_main___main___spec__1(x_19, x_2, x_22); +x_24 = lean_ctor_get(x_23, 0); +lean_inc(x_24); +x_25 = lean_ctor_get(x_23, 1); +lean_inc(x_25); +if (lean_is_exclusive(x_23)) { + lean_ctor_release(x_23, 0); + lean_ctor_release(x_23, 1); + x_26 = x_23; +} else { + lean_dec_ref(x_23); + x_26 = lean_box(0); +} +x_27 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_27, 0, x_21); +lean_ctor_set(x_27, 1, x_24); +if (lean_is_scalar(x_26)) { + x_28 = lean_alloc_ctor(0, 2, 0); +} else { + x_28 = x_26; +} +lean_ctor_set(x_28, 0, x_27); +lean_ctor_set(x_28, 1, x_25); +return x_28; +} +} +} +} +lean_object* l_Lean_MetavarContext_LevelMVarToParam_main___main(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +_start: +{ +lean_object* x_4; lean_object* x_5; lean_object* x_13; lean_object* x_14; +switch (lean_obj_tag(x_1)) { +case 3: +{ +lean_object* x_22; lean_object* x_23; uint8_t x_24; +x_22 = lean_ctor_get(x_1, 0); +lean_inc(x_22); +x_23 = l_Lean_MetavarContext_LevelMVarToParam_visitLevel___main(x_22, x_2, x_3); +x_24 = !lean_is_exclusive(x_23); +if (x_24 == 0) +{ +lean_object* x_25; lean_object* x_26; +x_25 = lean_ctor_get(x_23, 0); +x_26 = lean_expr_update_sort(x_1, x_25); +lean_ctor_set(x_23, 0, x_26); +return x_23; +} +else +{ +lean_object* x_27; lean_object* x_28; lean_object* x_29; lean_object* x_30; +x_27 = lean_ctor_get(x_23, 0); +x_28 = lean_ctor_get(x_23, 1); +lean_inc(x_28); +lean_inc(x_27); +lean_dec(x_23); +x_29 = lean_expr_update_sort(x_1, x_27); +x_30 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_30, 0, x_29); +lean_ctor_set(x_30, 1, x_28); +return x_30; +} +} +case 4: +{ +lean_object* x_31; lean_object* x_32; uint8_t x_33; +x_31 = lean_ctor_get(x_1, 1); +lean_inc(x_31); +x_32 = l_List_mapM___main___at_Lean_MetavarContext_LevelMVarToParam_main___main___spec__1(x_31, x_2, x_3); +x_33 = !lean_is_exclusive(x_32); +if (x_33 == 0) +{ +lean_object* x_34; lean_object* x_35; +x_34 = lean_ctor_get(x_32, 0); +x_35 = lean_expr_update_const(x_1, x_34); +lean_ctor_set(x_32, 0, x_35); +return x_32; +} +else +{ +lean_object* x_36; lean_object* x_37; lean_object* x_38; lean_object* x_39; +x_36 = lean_ctor_get(x_32, 0); +x_37 = lean_ctor_get(x_32, 1); +lean_inc(x_37); +lean_inc(x_36); +lean_dec(x_32); +x_38 = lean_expr_update_const(x_1, x_36); +x_39 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_39, 0, x_38); +lean_ctor_set(x_39, 1, x_37); +return x_39; +} +} +case 5: +{ +lean_object* x_40; lean_object* x_41; lean_object* x_42; lean_object* x_43; uint8_t x_58; +x_40 = lean_ctor_get(x_1, 0); +lean_inc(x_40); +x_41 = lean_ctor_get(x_1, 1); +lean_inc(x_41); +x_58 = l_Lean_Expr_hasLevelMVar(x_40); +if (x_58 == 0) +{ +x_42 = x_40; +x_43 = x_3; +goto block_57; +} +else +{ +lean_object* x_59; lean_object* x_60; lean_object* x_61; +lean_inc(x_2); +x_59 = l_Lean_MetavarContext_LevelMVarToParam_main___main(x_40, x_2, x_3); +x_60 = lean_ctor_get(x_59, 0); +lean_inc(x_60); +x_61 = lean_ctor_get(x_59, 1); +lean_inc(x_61); +lean_dec(x_59); +x_42 = x_60; +x_43 = x_61; +goto block_57; +} +block_57: +{ +lean_object* x_44; lean_object* x_45; uint8_t x_53; +x_53 = l_Lean_Expr_hasLevelMVar(x_41); +if (x_53 == 0) +{ +lean_dec(x_2); +x_44 = x_41; +x_45 = x_43; +goto block_52; +} +else +{ +lean_object* x_54; lean_object* x_55; lean_object* x_56; +x_54 = l_Lean_MetavarContext_LevelMVarToParam_main___main(x_41, x_2, x_43); +x_55 = lean_ctor_get(x_54, 0); +lean_inc(x_55); +x_56 = lean_ctor_get(x_54, 1); +lean_inc(x_56); +lean_dec(x_54); +x_44 = x_55; +x_45 = x_56; +goto block_52; +} +block_52: +{ +if (lean_obj_tag(x_1) == 5) +{ +lean_object* x_46; lean_object* x_47; +x_46 = lean_expr_update_app(x_1, x_42, x_44); +x_47 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_47, 0, x_46); +lean_ctor_set(x_47, 1, x_45); +return x_47; +} +else +{ +lean_object* x_48; lean_object* x_49; lean_object* x_50; lean_object* x_51; +lean_dec(x_44); +lean_dec(x_42); +lean_dec(x_1); +x_48 = l_Lean_Expr_Inhabited; +x_49 = l_Lean_Expr_updateApp_x21___closed__1; +x_50 = lean_panic_fn(x_48, x_49); +x_51 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_51, 0, x_50); +lean_ctor_set(x_51, 1, x_45); +return x_51; +} +} +} +} +case 6: +{ +lean_object* x_62; lean_object* x_63; lean_object* x_64; lean_object* x_65; uint8_t x_82; +x_62 = lean_ctor_get(x_1, 1); +lean_inc(x_62); +x_63 = lean_ctor_get(x_1, 2); +lean_inc(x_63); +x_82 = l_Lean_Expr_hasLevelMVar(x_62); +if (x_82 == 0) +{ +x_64 = x_62; +x_65 = x_3; +goto block_81; +} +else +{ +lean_object* x_83; lean_object* x_84; lean_object* x_85; +lean_inc(x_2); +x_83 = l_Lean_MetavarContext_LevelMVarToParam_main___main(x_62, x_2, x_3); +x_84 = lean_ctor_get(x_83, 0); +lean_inc(x_84); +x_85 = lean_ctor_get(x_83, 1); +lean_inc(x_85); +lean_dec(x_83); +x_64 = x_84; +x_65 = x_85; +goto block_81; +} +block_81: +{ +lean_object* x_66; lean_object* x_67; uint8_t x_77; +x_77 = l_Lean_Expr_hasLevelMVar(x_63); +if (x_77 == 0) +{ +lean_dec(x_2); +x_66 = x_63; +x_67 = x_65; +goto block_76; +} +else +{ +lean_object* x_78; lean_object* x_79; lean_object* x_80; +x_78 = l_Lean_MetavarContext_LevelMVarToParam_main___main(x_63, x_2, x_65); +x_79 = lean_ctor_get(x_78, 0); +lean_inc(x_79); +x_80 = lean_ctor_get(x_78, 1); +lean_inc(x_80); +lean_dec(x_78); +x_66 = x_79; +x_67 = x_80; +goto block_76; +} +block_76: +{ +if (lean_obj_tag(x_1) == 6) +{ +uint64_t x_68; uint8_t x_69; lean_object* x_70; lean_object* x_71; +x_68 = lean_ctor_get_uint64(x_1, sizeof(void*)*3); +x_69 = (uint8_t)((x_68 << 24) >> 61); +x_70 = lean_expr_update_lambda(x_1, x_69, x_64, x_66); +x_71 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_71, 0, x_70); +lean_ctor_set(x_71, 1, x_67); +return x_71; +} +else +{ +lean_object* x_72; lean_object* x_73; lean_object* x_74; lean_object* x_75; +lean_dec(x_66); +lean_dec(x_64); +lean_dec(x_1); +x_72 = l_Lean_Expr_Inhabited; +x_73 = l_Lean_Expr_updateLambdaE_x21___closed__1; +x_74 = lean_panic_fn(x_72, x_73); +x_75 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_75, 0, x_74); +lean_ctor_set(x_75, 1, x_67); +return x_75; +} +} +} +} +case 7: +{ +lean_object* x_86; lean_object* x_87; lean_object* x_88; lean_object* x_89; uint8_t x_106; +x_86 = lean_ctor_get(x_1, 1); +lean_inc(x_86); +x_87 = lean_ctor_get(x_1, 2); +lean_inc(x_87); +x_106 = l_Lean_Expr_hasLevelMVar(x_86); +if (x_106 == 0) +{ +x_88 = x_86; +x_89 = x_3; +goto block_105; +} +else +{ +lean_object* x_107; lean_object* x_108; lean_object* x_109; +lean_inc(x_2); +x_107 = l_Lean_MetavarContext_LevelMVarToParam_main___main(x_86, x_2, x_3); +x_108 = lean_ctor_get(x_107, 0); +lean_inc(x_108); +x_109 = lean_ctor_get(x_107, 1); +lean_inc(x_109); +lean_dec(x_107); +x_88 = x_108; +x_89 = x_109; +goto block_105; +} +block_105: +{ +lean_object* x_90; lean_object* x_91; uint8_t x_101; +x_101 = l_Lean_Expr_hasLevelMVar(x_87); +if (x_101 == 0) +{ +lean_dec(x_2); +x_90 = x_87; +x_91 = x_89; +goto block_100; +} +else +{ +lean_object* x_102; lean_object* x_103; lean_object* x_104; +x_102 = l_Lean_MetavarContext_LevelMVarToParam_main___main(x_87, x_2, x_89); +x_103 = lean_ctor_get(x_102, 0); +lean_inc(x_103); +x_104 = lean_ctor_get(x_102, 1); +lean_inc(x_104); +lean_dec(x_102); +x_90 = x_103; +x_91 = x_104; +goto block_100; +} +block_100: +{ +if (lean_obj_tag(x_1) == 7) +{ +uint64_t x_92; uint8_t x_93; lean_object* x_94; lean_object* x_95; +x_92 = lean_ctor_get_uint64(x_1, sizeof(void*)*3); +x_93 = (uint8_t)((x_92 << 24) >> 61); +x_94 = lean_expr_update_forall(x_1, x_93, x_88, x_90); +x_95 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_95, 0, x_94); +lean_ctor_set(x_95, 1, x_91); +return x_95; +} +else +{ +lean_object* x_96; lean_object* x_97; lean_object* x_98; lean_object* x_99; +lean_dec(x_90); +lean_dec(x_88); +lean_dec(x_1); +x_96 = l_Lean_Expr_Inhabited; +x_97 = l_Lean_Expr_updateForallE_x21___closed__1; +x_98 = lean_panic_fn(x_96, x_97); +x_99 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_99, 0, x_98); +lean_ctor_set(x_99, 1, x_91); +return x_99; +} +} +} +} +case 8: +{ +lean_object* x_110; lean_object* x_111; lean_object* x_112; lean_object* x_113; lean_object* x_114; uint8_t x_136; +x_110 = lean_ctor_get(x_1, 1); +lean_inc(x_110); +x_111 = lean_ctor_get(x_1, 2); +lean_inc(x_111); +x_112 = lean_ctor_get(x_1, 3); +lean_inc(x_112); +x_136 = l_Lean_Expr_hasLevelMVar(x_110); +if (x_136 == 0) +{ +x_113 = x_110; +x_114 = x_3; +goto block_135; +} +else +{ +lean_object* x_137; lean_object* x_138; lean_object* x_139; +lean_inc(x_2); +x_137 = l_Lean_MetavarContext_LevelMVarToParam_main___main(x_110, x_2, x_3); +x_138 = lean_ctor_get(x_137, 0); +lean_inc(x_138); +x_139 = lean_ctor_get(x_137, 1); +lean_inc(x_139); +lean_dec(x_137); +x_113 = x_138; +x_114 = x_139; +goto block_135; +} +block_135: +{ +lean_object* x_115; lean_object* x_116; uint8_t x_131; +x_131 = l_Lean_Expr_hasLevelMVar(x_111); +if (x_131 == 0) +{ +x_115 = x_111; +x_116 = x_114; +goto block_130; +} +else +{ +lean_object* x_132; lean_object* x_133; lean_object* x_134; +lean_inc(x_2); +x_132 = l_Lean_MetavarContext_LevelMVarToParam_main___main(x_111, x_2, x_114); +x_133 = lean_ctor_get(x_132, 0); +lean_inc(x_133); +x_134 = lean_ctor_get(x_132, 1); +lean_inc(x_134); +lean_dec(x_132); +x_115 = x_133; +x_116 = x_134; +goto block_130; +} +block_130: +{ +lean_object* x_117; lean_object* x_118; uint8_t x_126; +x_126 = l_Lean_Expr_hasLevelMVar(x_112); +if (x_126 == 0) +{ +lean_dec(x_2); +x_117 = x_112; +x_118 = x_116; +goto block_125; +} +else +{ +lean_object* x_127; lean_object* x_128; lean_object* x_129; +x_127 = l_Lean_MetavarContext_LevelMVarToParam_main___main(x_112, x_2, x_116); +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_117 = x_128; +x_118 = x_129; +goto block_125; +} +block_125: +{ +if (lean_obj_tag(x_1) == 8) +{ +lean_object* x_119; lean_object* x_120; +x_119 = lean_expr_update_let(x_1, x_113, x_115, x_117); +x_120 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_120, 0, x_119); +lean_ctor_set(x_120, 1, x_118); +return x_120; +} +else +{ +lean_object* x_121; lean_object* x_122; lean_object* x_123; lean_object* x_124; +lean_dec(x_117); +lean_dec(x_115); +lean_dec(x_113); +lean_dec(x_1); +x_121 = l_Lean_Expr_Inhabited; +x_122 = l_Lean_Expr_updateLet_x21___closed__1; +x_123 = lean_panic_fn(x_121, x_122); +x_124 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_124, 0, x_123); +lean_ctor_set(x_124, 1, x_118); +return x_124; +} +} +} +} +} +case 10: +{ +lean_object* x_140; uint8_t x_141; +x_140 = lean_ctor_get(x_1, 1); +lean_inc(x_140); +x_141 = l_Lean_Expr_hasLevelMVar(x_140); +if (x_141 == 0) +{ +lean_dec(x_2); +x_4 = x_140; +x_5 = x_3; +goto block_12; +} +else +{ +lean_object* x_142; lean_object* x_143; lean_object* x_144; +x_142 = l_Lean_MetavarContext_LevelMVarToParam_main___main(x_140, x_2, x_3); +x_143 = lean_ctor_get(x_142, 0); +lean_inc(x_143); +x_144 = lean_ctor_get(x_142, 1); +lean_inc(x_144); +lean_dec(x_142); +x_4 = x_143; +x_5 = x_144; +goto block_12; +} +} +case 11: +{ +lean_object* x_145; uint8_t x_146; +x_145 = lean_ctor_get(x_1, 2); +lean_inc(x_145); +x_146 = l_Lean_Expr_hasLevelMVar(x_145); +if (x_146 == 0) +{ +lean_dec(x_2); +x_13 = x_145; +x_14 = x_3; +goto block_21; +} +else +{ +lean_object* x_147; lean_object* x_148; lean_object* x_149; +x_147 = l_Lean_MetavarContext_LevelMVarToParam_main___main(x_145, x_2, x_3); +x_148 = lean_ctor_get(x_147, 0); +lean_inc(x_148); +x_149 = lean_ctor_get(x_147, 1); +lean_inc(x_149); +lean_dec(x_147); +x_13 = x_148; +x_14 = x_149; +goto block_21; +} +} +default: +{ +lean_object* x_150; +lean_dec(x_2); +x_150 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_150, 0, x_1); +lean_ctor_set(x_150, 1, x_3); +return x_150; +} +} +block_12: +{ +if (lean_obj_tag(x_1) == 10) +{ +lean_object* x_6; lean_object* x_7; +x_6 = lean_expr_update_mdata(x_1, x_4); +x_7 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_7, 0, x_6); +lean_ctor_set(x_7, 1, x_5); +return x_7; +} +else +{ +lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; +lean_dec(x_4); +lean_dec(x_1); +x_8 = l_Lean_Expr_Inhabited; +x_9 = l_Lean_Expr_updateMData_x21___closed__2; +x_10 = lean_panic_fn(x_8, 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_5); +return x_11; +} +} +block_21: +{ +if (lean_obj_tag(x_1) == 11) +{ +lean_object* x_15; lean_object* x_16; +x_15 = lean_expr_update_proj(x_1, x_13); +x_16 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_16, 0, x_15); +lean_ctor_set(x_16, 1, x_14); +return x_16; +} +else +{ +lean_object* x_17; lean_object* x_18; lean_object* x_19; lean_object* x_20; +lean_dec(x_13); +lean_dec(x_1); +x_17 = l_Lean_Expr_Inhabited; +x_18 = l_Lean_Expr_updateProj_x21___closed__2; +x_19 = lean_panic_fn(x_17, x_18); +x_20 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_20, 0, x_19); +lean_ctor_set(x_20, 1, x_14); +return x_20; +} +} +} +} +lean_object* l_Lean_MetavarContext_LevelMVarToParam_main(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +_start: +{ +lean_object* x_4; +x_4 = l_Lean_MetavarContext_LevelMVarToParam_main___main(x_1, x_2, x_3); +return x_4; +} +} +lean_object* l_Lean_MetavarContext_levelMVarToParam(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) { +_start: +{ +lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; +x_6 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_6, 0, x_4); +lean_ctor_set(x_6, 1, x_2); +x_7 = l_Array_empty___closed__1; +lean_inc(x_1); +x_8 = lean_alloc_ctor(0, 3, 0); +lean_ctor_set(x_8, 0, x_1); +lean_ctor_set(x_8, 1, x_7); +lean_ctor_set(x_8, 2, x_5); +x_9 = l_Lean_MetavarContext_LevelMVarToParam_main___main(x_3, x_6, x_8); +x_10 = lean_ctor_get(x_9, 1); +lean_inc(x_10); +x_11 = lean_ctor_get(x_9, 0); +lean_inc(x_11); +lean_dec(x_9); +x_12 = lean_ctor_get(x_10, 1); +lean_inc(x_12); +x_13 = lean_ctor_get(x_10, 2); +lean_inc(x_13); +lean_dec(x_10); +x_14 = lean_alloc_ctor(0, 4, 0); +lean_ctor_set(x_14, 0, x_1); +lean_ctor_set(x_14, 1, x_12); +lean_ctor_set(x_14, 2, x_13); +lean_ctor_set(x_14, 3, x_11); +return x_14; +} +} lean_object* initialize_Init_Control_Reader(lean_object*); lean_object* initialize_Init_Data_Nat(lean_object*); lean_object* initialize_Init_Data_Option(lean_object*); diff --git a/stage0/stdlib/Init/Lean/Parser/Parser.c b/stage0/stdlib/Init/Lean/Parser/Parser.c index 705f350cb5..7d06fcdf00 100644 --- a/stage0/stdlib/Init/Lean/Parser/Parser.c +++ b/stage0/stdlib/Init/Lean/Parser/Parser.c @@ -753,7 +753,6 @@ lean_object* l_Lean_Parser_TokenConfig_beq___boxed(lean_object*, lean_object*); extern lean_object* l_Lean_registerPersistentEnvExtensionUnsafe___rarg___closed__3; lean_object* l_Lean_Parser_noFirstTokenInfo___elambda__1(lean_object*, lean_object*); lean_object* l_Lean_Parser_mkTokenTableAttribute___closed__2; -uint8_t l_Lean_Syntax_isMissing(lean_object*); lean_object* l___private_Init_Lean_Parser_Parser_3__rawAux___rarg(lean_object*, uint8_t, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Parser_unicodeSymbolCheckPrec(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Parser_declareLeadingBuiltinParser(lean_object*, lean_object*, lean_object*, lean_object*); @@ -805,6 +804,7 @@ lean_object* l_Lean_Parser_longestMatchFnAux___boxed(lean_object*, lean_object*, lean_object* l_Lean_registerTagAttribute___lambda__6___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); extern lean_object* l_Lean_registerSimplePersistentEnvExtension___rarg___lambda__4___closed__2; lean_object* l_Lean_Parser_ParserState_mkUnexpectedErrorAt(lean_object*, lean_object*, lean_object*); +uint8_t l_Lean_Syntax_hasArgs(lean_object*); lean_object* l_PersistentHashMap_contains___at_Lean_Parser_isValidSyntaxNodeKind___spec__1___boxed(lean_object*, lean_object*); extern lean_object* l_Lean_mkInitAttr___lambda__1___closed__1; lean_object* l_Lean_Parser_mergeOrElseErrors(lean_object*, lean_object*, lean_object*); @@ -816,6 +816,7 @@ lean_object* l_Lean_Parser_withPosition___lambda__1(lean_object*, lean_object*, uint8_t lean_nat_dec_le(lean_object*, lean_object*); lean_object* l_Lean_Parser_pushLeadingFn(lean_object*, lean_object*, lean_object*); uint8_t l_USize_decLe(size_t, size_t); +extern lean_object* l_Lean_registerTagAttribute___lambda__4___closed__5; lean_object* l_Lean_Parser_takeWhileFn___lambda__1___boxed(lean_object*, lean_object*); lean_object* l_Lean_Parser_compileParserDescr___boxed(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_mkApp(lean_object*, lean_object*); @@ -1082,7 +1083,6 @@ lean_object* l_Lean_Syntax_foldArgsAuxM___main___at_Lean_Syntax_foldSepArgs___sp lean_object* l_Lean_Parser_unicodeSymbolFnAux___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Parser_TokenTableAttribute_inhabited___closed__2; lean_object* l_Lean_Parser_indexed___rarg___boxed(lean_object*, lean_object*, lean_object*); -extern lean_object* l_Lean_registerTagAttribute___lambda__4___closed__4; lean_object* l_Lean_Parser_rawFn___boxed(lean_object*); lean_object* l_Lean_Parser_takeWhileFn___at_Lean_Parser_identFnAux___main___spec__1(lean_object*, lean_object*); lean_object* l_Lean_Syntax_foldSepArgs(lean_object*); @@ -27866,7 +27866,7 @@ x_13 = l_Lean_Name_toStringWithSep___main(x_12, x_2); x_14 = l___private_Init_Lean_Parser_Parser_13__updateBuiltinTokens___closed__1; x_15 = lean_string_append(x_14, x_13); lean_dec(x_13); -x_16 = l_Lean_registerTagAttribute___lambda__4___closed__4; +x_16 = l_Lean_registerTagAttribute___lambda__4___closed__3; x_17 = lean_string_append(x_15, x_16); x_18 = lean_string_append(x_17, x_11); lean_dec(x_11); @@ -27906,7 +27906,7 @@ x_26 = l_Lean_Name_toStringWithSep___main(x_25, x_2); x_27 = l___private_Init_Lean_Parser_Parser_13__updateBuiltinTokens___closed__1; x_28 = lean_string_append(x_27, x_26); lean_dec(x_26); -x_29 = l_Lean_registerTagAttribute___lambda__4___closed__4; +x_29 = l_Lean_registerTagAttribute___lambda__4___closed__3; x_30 = lean_string_append(x_28, x_29); x_31 = lean_string_append(x_30, x_24); lean_dec(x_24); @@ -29015,9 +29015,11 @@ lean_object* l_Lean_Parser_registerBuiltinParserAttribute___lambda__1(lean_objec _start: { uint8_t x_8; -x_8 = l_Lean_Syntax_isMissing(x_5); +x_8 = l_Lean_Syntax_hasArgs(x_5); if (x_8 == 0) { +if (x_6 == 0) +{ lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_dec(x_4); lean_dec(x_3); @@ -29036,525 +29038,523 @@ return x_15; } else { -if (x_6 == 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_dec(x_4); -lean_dec(x_3); -lean_dec(x_2); -x_16 = l_Lean_Name_toString___closed__1; -x_17 = l_Lean_Name_toStringWithSep___main(x_16, x_1); -x_18 = l_Lean_registerTagAttribute___lambda__4___closed__1; -x_19 = lean_string_append(x_18, x_17); -lean_dec(x_17); -x_20 = l_Lean_registerTagAttribute___lambda__4___closed__3; -x_21 = lean_string_append(x_19, x_20); -x_22 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_22, 0, x_21); -lean_ctor_set(x_22, 1, x_7); -return x_22; -} -else -{ -lean_object* x_23; lean_object* x_32; +lean_object* x_16; lean_object* x_25; lean_dec(x_1); lean_inc(x_4); lean_inc(x_3); -x_32 = lean_environment_find(x_3, x_4); -if (lean_obj_tag(x_32) == 0) +x_25 = lean_environment_find(x_3, x_4); +if (lean_obj_tag(x_25) == 0) { -lean_object* x_33; lean_object* x_34; +lean_object* x_26; lean_object* x_27; lean_dec(x_4); lean_dec(x_3); lean_dec(x_2); -x_33 = l_Lean_mkInitAttr___lambda__1___closed__1; -x_34 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_34, 0, x_33); -lean_ctor_set(x_34, 1, x_7); -return x_34; +x_26 = l_Lean_mkInitAttr___lambda__1___closed__1; +x_27 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_27, 0, x_26); +lean_ctor_set(x_27, 1, x_7); +return x_27; } else { -lean_object* x_35; lean_object* x_36; -x_35 = lean_ctor_get(x_32, 0); -lean_inc(x_35); -lean_dec(x_32); -x_36 = l_Lean_ConstantInfo_type(x_35); -lean_dec(x_35); -switch (lean_obj_tag(x_36)) { +lean_object* x_28; lean_object* x_29; +x_28 = lean_ctor_get(x_25, 0); +lean_inc(x_28); +lean_dec(x_25); +x_29 = l_Lean_ConstantInfo_type(x_28); +lean_dec(x_28); +switch (lean_obj_tag(x_29)) { case 4: { -lean_object* x_37; -x_37 = lean_ctor_get(x_36, 0); -lean_inc(x_37); -lean_dec(x_36); -if (lean_obj_tag(x_37) == 1) +lean_object* x_30; +x_30 = lean_ctor_get(x_29, 0); +lean_inc(x_30); +lean_dec(x_29); +if (lean_obj_tag(x_30) == 1) { -lean_object* x_38; -x_38 = lean_ctor_get(x_37, 0); -lean_inc(x_38); -if (lean_obj_tag(x_38) == 1) +lean_object* x_31; +x_31 = lean_ctor_get(x_30, 0); +lean_inc(x_31); +if (lean_obj_tag(x_31) == 1) +{ +lean_object* x_32; +x_32 = lean_ctor_get(x_31, 0); +lean_inc(x_32); +if (lean_obj_tag(x_32) == 1) +{ +lean_object* x_33; +x_33 = lean_ctor_get(x_32, 0); +lean_inc(x_33); +if (lean_obj_tag(x_33) == 0) +{ +lean_object* x_34; lean_object* x_35; lean_object* x_36; lean_object* x_37; uint8_t x_38; +x_34 = lean_ctor_get(x_30, 1); +lean_inc(x_34); +lean_dec(x_30); +x_35 = lean_ctor_get(x_31, 1); +lean_inc(x_35); +lean_dec(x_31); +x_36 = lean_ctor_get(x_32, 1); +lean_inc(x_36); +lean_dec(x_32); +x_37 = l_Lean_nameToExprAux___main___closed__1; +x_38 = lean_string_dec_eq(x_36, x_37); +lean_dec(x_36); +if (x_38 == 0) { lean_object* x_39; -x_39 = lean_ctor_get(x_38, 0); -lean_inc(x_39); -if (lean_obj_tag(x_39) == 1) -{ -lean_object* x_40; -x_40 = lean_ctor_get(x_39, 0); -lean_inc(x_40); -if (lean_obj_tag(x_40) == 0) -{ -lean_object* x_41; lean_object* x_42; lean_object* x_43; lean_object* x_44; uint8_t x_45; -x_41 = lean_ctor_get(x_37, 1); -lean_inc(x_41); -lean_dec(x_37); -x_42 = lean_ctor_get(x_38, 1); -lean_inc(x_42); -lean_dec(x_38); -x_43 = lean_ctor_get(x_39, 1); -lean_inc(x_43); -lean_dec(x_39); -x_44 = l_Lean_nameToExprAux___main___closed__1; -x_45 = lean_string_dec_eq(x_43, x_44); -lean_dec(x_43); -if (x_45 == 0) -{ -lean_object* x_46; -lean_dec(x_42); -lean_dec(x_41); +lean_dec(x_35); +lean_dec(x_34); lean_dec(x_3); lean_dec(x_2); -x_46 = lean_box(0); -x_23 = x_46; -goto block_31; +x_39 = lean_box(0); +x_16 = x_39; +goto block_24; } else { -lean_object* x_47; uint8_t x_48; -x_47 = l_Lean_Syntax_formatStxAux___main___closed__5; -x_48 = lean_string_dec_eq(x_42, x_47); -lean_dec(x_42); -if (x_48 == 0) +lean_object* x_40; uint8_t x_41; +x_40 = l_Lean_Syntax_formatStxAux___main___closed__5; +x_41 = lean_string_dec_eq(x_35, x_40); +lean_dec(x_35); +if (x_41 == 0) +{ +lean_object* x_42; +lean_dec(x_34); +lean_dec(x_3); +lean_dec(x_2); +x_42 = lean_box(0); +x_16 = x_42; +goto block_24; +} +else +{ +lean_object* x_43; uint8_t x_44; +x_43 = l_Lean_Parser_registerBuiltinParserAttribute___lambda__1___closed__3; +x_44 = lean_string_dec_eq(x_34, x_43); +lean_dec(x_34); +if (x_44 == 0) +{ +lean_object* x_45; +lean_dec(x_3); +lean_dec(x_2); +x_45 = lean_box(0); +x_16 = x_45; +goto block_24; +} +else +{ +lean_object* x_46; +x_46 = l_Lean_Parser_declareTrailingBuiltinParser(x_3, x_2, x_4, x_7); +return x_46; +} +} +} +} +else +{ +lean_object* x_47; +lean_dec(x_33); +lean_dec(x_32); +lean_dec(x_31); +lean_dec(x_30); +lean_dec(x_3); +lean_dec(x_2); +x_47 = lean_box(0); +x_16 = x_47; +goto block_24; +} +} +else +{ +lean_object* x_48; +lean_dec(x_32); +lean_dec(x_31); +lean_dec(x_30); +lean_dec(x_3); +lean_dec(x_2); +x_48 = lean_box(0); +x_16 = x_48; +goto block_24; +} +} +else { lean_object* x_49; -lean_dec(x_41); +lean_dec(x_31); +lean_dec(x_30); lean_dec(x_3); lean_dec(x_2); x_49 = lean_box(0); -x_23 = x_49; -goto block_31; +x_16 = x_49; +goto block_24; +} } else { -lean_object* x_50; uint8_t x_51; -x_50 = l_Lean_Parser_registerBuiltinParserAttribute___lambda__1___closed__3; -x_51 = lean_string_dec_eq(x_41, x_50); -lean_dec(x_41); -if (x_51 == 0) -{ -lean_object* x_52; +lean_object* x_50; +lean_dec(x_30); lean_dec(x_3); lean_dec(x_2); -x_52 = lean_box(0); -x_23 = x_52; -goto block_31; -} -else -{ -lean_object* x_53; -x_53 = l_Lean_Parser_declareTrailingBuiltinParser(x_3, x_2, x_4, x_7); -return x_53; -} -} -} -} -else -{ -lean_object* x_54; -lean_dec(x_40); -lean_dec(x_39); -lean_dec(x_38); -lean_dec(x_37); -lean_dec(x_3); -lean_dec(x_2); -x_54 = lean_box(0); -x_23 = x_54; -goto block_31; -} -} -else -{ -lean_object* x_55; -lean_dec(x_39); -lean_dec(x_38); -lean_dec(x_37); -lean_dec(x_3); -lean_dec(x_2); -x_55 = lean_box(0); -x_23 = x_55; -goto block_31; -} -} -else -{ -lean_object* x_56; -lean_dec(x_38); -lean_dec(x_37); -lean_dec(x_3); -lean_dec(x_2); -x_56 = lean_box(0); -x_23 = x_56; -goto block_31; -} -} -else -{ -lean_object* x_57; -lean_dec(x_37); -lean_dec(x_3); -lean_dec(x_2); -x_57 = lean_box(0); -x_23 = x_57; -goto block_31; +x_50 = lean_box(0); +x_16 = x_50; +goto block_24; } } case 5: { -lean_object* x_58; -x_58 = lean_ctor_get(x_36, 0); +lean_object* x_51; +x_51 = lean_ctor_get(x_29, 0); +lean_inc(x_51); +if (lean_obj_tag(x_51) == 4) +{ +lean_object* x_52; +x_52 = lean_ctor_get(x_51, 0); +lean_inc(x_52); +lean_dec(x_51); +if (lean_obj_tag(x_52) == 1) +{ +lean_object* x_53; +x_53 = lean_ctor_get(x_52, 0); +lean_inc(x_53); +if (lean_obj_tag(x_53) == 1) +{ +lean_object* x_54; +x_54 = lean_ctor_get(x_53, 0); +lean_inc(x_54); +if (lean_obj_tag(x_54) == 1) +{ +lean_object* x_55; +x_55 = lean_ctor_get(x_54, 0); +lean_inc(x_55); +if (lean_obj_tag(x_55) == 0) +{ +lean_object* x_56; lean_object* x_57; lean_object* x_58; lean_object* x_59; lean_object* x_60; uint8_t x_61; +x_56 = lean_ctor_get(x_29, 1); +lean_inc(x_56); +lean_dec(x_29); +x_57 = lean_ctor_get(x_52, 1); +lean_inc(x_57); +lean_dec(x_52); +x_58 = lean_ctor_get(x_53, 1); lean_inc(x_58); -if (lean_obj_tag(x_58) == 4) -{ -lean_object* x_59; -x_59 = lean_ctor_get(x_58, 0); +lean_dec(x_53); +x_59 = lean_ctor_get(x_54, 1); lean_inc(x_59); -lean_dec(x_58); -if (lean_obj_tag(x_59) == 1) -{ -lean_object* x_60; -x_60 = lean_ctor_get(x_59, 0); -lean_inc(x_60); -if (lean_obj_tag(x_60) == 1) -{ -lean_object* x_61; -x_61 = lean_ctor_get(x_60, 0); -lean_inc(x_61); -if (lean_obj_tag(x_61) == 1) +lean_dec(x_54); +x_60 = l_Lean_nameToExprAux___main___closed__1; +x_61 = lean_string_dec_eq(x_59, x_60); +lean_dec(x_59); +if (x_61 == 0) { lean_object* x_62; -x_62 = lean_ctor_get(x_61, 0); -lean_inc(x_62); -if (lean_obj_tag(x_62) == 0) +lean_dec(x_58); +lean_dec(x_57); +lean_dec(x_56); +lean_dec(x_3); +lean_dec(x_2); +x_62 = lean_box(0); +x_16 = x_62; +goto block_24; +} +else { -lean_object* x_63; lean_object* x_64; lean_object* x_65; lean_object* x_66; lean_object* x_67; uint8_t x_68; -x_63 = lean_ctor_get(x_36, 1); -lean_inc(x_63); -lean_dec(x_36); -x_64 = lean_ctor_get(x_59, 1); -lean_inc(x_64); -lean_dec(x_59); -x_65 = lean_ctor_get(x_60, 1); -lean_inc(x_65); -lean_dec(x_60); -x_66 = lean_ctor_get(x_61, 1); -lean_inc(x_66); -lean_dec(x_61); -x_67 = l_Lean_nameToExprAux___main___closed__1; -x_68 = lean_string_dec_eq(x_66, x_67); -lean_dec(x_66); -if (x_68 == 0) +lean_object* x_63; uint8_t x_64; +x_63 = l_Lean_Syntax_formatStxAux___main___closed__5; +x_64 = lean_string_dec_eq(x_58, x_63); +lean_dec(x_58); +if (x_64 == 0) +{ +lean_object* x_65; +lean_dec(x_57); +lean_dec(x_56); +lean_dec(x_3); +lean_dec(x_2); +x_65 = lean_box(0); +x_16 = x_65; +goto block_24; +} +else +{ +uint8_t x_66; +x_66 = lean_string_dec_eq(x_57, x_63); +lean_dec(x_57); +if (x_66 == 0) +{ +lean_object* x_67; +lean_dec(x_56); +lean_dec(x_3); +lean_dec(x_2); +x_67 = lean_box(0); +x_16 = x_67; +goto block_24; +} +else +{ +if (lean_obj_tag(x_56) == 4) +{ +lean_object* x_68; +x_68 = lean_ctor_get(x_56, 0); +lean_inc(x_68); +lean_dec(x_56); +if (lean_obj_tag(x_68) == 1) { lean_object* x_69; -lean_dec(x_65); -lean_dec(x_64); -lean_dec(x_63); -lean_dec(x_3); -lean_dec(x_2); -x_69 = lean_box(0); -x_23 = x_69; -goto block_31; -} -else +x_69 = lean_ctor_get(x_68, 0); +lean_inc(x_69); +if (lean_obj_tag(x_69) == 1) { -lean_object* x_70; uint8_t x_71; -x_70 = l_Lean_Syntax_formatStxAux___main___closed__5; -x_71 = lean_string_dec_eq(x_65, x_70); -lean_dec(x_65); -if (x_71 == 0) +lean_object* x_70; +x_70 = lean_ctor_get(x_69, 0); +lean_inc(x_70); +if (lean_obj_tag(x_70) == 1) { -lean_object* x_72; -lean_dec(x_64); -lean_dec(x_63); -lean_dec(x_3); -lean_dec(x_2); -x_72 = lean_box(0); -x_23 = x_72; -goto block_31; -} -else +lean_object* x_71; +x_71 = lean_ctor_get(x_70, 0); +lean_inc(x_71); +if (lean_obj_tag(x_71) == 0) { -uint8_t x_73; -x_73 = lean_string_dec_eq(x_64, x_70); -lean_dec(x_64); -if (x_73 == 0) -{ -lean_object* x_74; -lean_dec(x_63); -lean_dec(x_3); -lean_dec(x_2); -x_74 = lean_box(0); -x_23 = x_74; -goto block_31; -} -else -{ -if (lean_obj_tag(x_63) == 4) -{ -lean_object* x_75; -x_75 = lean_ctor_get(x_63, 0); -lean_inc(x_75); -lean_dec(x_63); -if (lean_obj_tag(x_75) == 1) +lean_object* x_72; lean_object* x_73; lean_object* x_74; uint8_t x_75; +x_72 = lean_ctor_get(x_68, 1); +lean_inc(x_72); +lean_dec(x_68); +x_73 = lean_ctor_get(x_69, 1); +lean_inc(x_73); +lean_dec(x_69); +x_74 = lean_ctor_get(x_70, 1); +lean_inc(x_74); +lean_dec(x_70); +x_75 = lean_string_dec_eq(x_74, x_60); +lean_dec(x_74); +if (x_75 == 0) { lean_object* x_76; -x_76 = lean_ctor_get(x_75, 0); -lean_inc(x_76); -if (lean_obj_tag(x_76) == 1) -{ -lean_object* x_77; -x_77 = lean_ctor_get(x_76, 0); -lean_inc(x_77); -if (lean_obj_tag(x_77) == 1) -{ -lean_object* x_78; -x_78 = lean_ctor_get(x_77, 0); -lean_inc(x_78); -if (lean_obj_tag(x_78) == 0) -{ -lean_object* x_79; lean_object* x_80; lean_object* x_81; uint8_t x_82; -x_79 = lean_ctor_get(x_75, 1); -lean_inc(x_79); -lean_dec(x_75); -x_80 = lean_ctor_get(x_76, 1); -lean_inc(x_80); -lean_dec(x_76); -x_81 = lean_ctor_get(x_77, 1); -lean_inc(x_81); -lean_dec(x_77); -x_82 = lean_string_dec_eq(x_81, x_67); -lean_dec(x_81); -if (x_82 == 0) -{ -lean_object* x_83; -lean_dec(x_80); -lean_dec(x_79); +lean_dec(x_73); +lean_dec(x_72); lean_dec(x_3); lean_dec(x_2); -x_83 = lean_box(0); -x_23 = x_83; -goto block_31; +x_76 = lean_box(0); +x_16 = x_76; +goto block_24; } else { -lean_object* x_84; uint8_t x_85; -x_84 = l_Lean_Parser_registerBuiltinParserAttribute___lambda__1___closed__4; -x_85 = lean_string_dec_eq(x_80, x_84); -lean_dec(x_80); -if (x_85 == 0) +lean_object* x_77; uint8_t x_78; +x_77 = l_Lean_Parser_registerBuiltinParserAttribute___lambda__1___closed__4; +x_78 = lean_string_dec_eq(x_73, x_77); +lean_dec(x_73); +if (x_78 == 0) +{ +lean_object* x_79; +lean_dec(x_72); +lean_dec(x_3); +lean_dec(x_2); +x_79 = lean_box(0); +x_16 = x_79; +goto block_24; +} +else +{ +lean_object* x_80; uint8_t x_81; +x_80 = l_Lean_Parser_registerBuiltinParserAttribute___lambda__1___closed__5; +x_81 = lean_string_dec_eq(x_72, x_80); +lean_dec(x_72); +if (x_81 == 0) +{ +lean_object* x_82; +lean_dec(x_3); +lean_dec(x_2); +x_82 = lean_box(0); +x_16 = x_82; +goto block_24; +} +else +{ +lean_object* x_83; +x_83 = l_Lean_Parser_declareLeadingBuiltinParser(x_3, x_2, x_4, x_7); +return x_83; +} +} +} +} +else +{ +lean_object* x_84; +lean_dec(x_71); +lean_dec(x_70); +lean_dec(x_69); +lean_dec(x_68); +lean_dec(x_3); +lean_dec(x_2); +x_84 = lean_box(0); +x_16 = x_84; +goto block_24; +} +} +else +{ +lean_object* x_85; +lean_dec(x_70); +lean_dec(x_69); +lean_dec(x_68); +lean_dec(x_3); +lean_dec(x_2); +x_85 = lean_box(0); +x_16 = x_85; +goto block_24; +} +} +else { lean_object* x_86; -lean_dec(x_79); +lean_dec(x_69); +lean_dec(x_68); lean_dec(x_3); lean_dec(x_2); x_86 = lean_box(0); -x_23 = x_86; -goto block_31; +x_16 = x_86; +goto block_24; +} } else { -lean_object* x_87; uint8_t x_88; -x_87 = l_Lean_Parser_registerBuiltinParserAttribute___lambda__1___closed__5; -x_88 = lean_string_dec_eq(x_79, x_87); -lean_dec(x_79); -if (x_88 == 0) +lean_object* x_87; +lean_dec(x_68); +lean_dec(x_3); +lean_dec(x_2); +x_87 = lean_box(0); +x_16 = x_87; +goto block_24; +} +} +else +{ +lean_object* x_88; +lean_dec(x_56); +lean_dec(x_3); +lean_dec(x_2); +x_88 = lean_box(0); +x_16 = x_88; +goto block_24; +} +} +} +} +} +else { lean_object* x_89; +lean_dec(x_55); +lean_dec(x_54); +lean_dec(x_53); +lean_dec(x_52); +lean_dec(x_29); lean_dec(x_3); lean_dec(x_2); x_89 = lean_box(0); -x_23 = x_89; -goto block_31; +x_16 = x_89; +goto block_24; +} } else { lean_object* x_90; -x_90 = l_Lean_Parser_declareLeadingBuiltinParser(x_3, x_2, x_4, x_7); -return x_90; -} -} +lean_dec(x_54); +lean_dec(x_53); +lean_dec(x_52); +lean_dec(x_29); +lean_dec(x_3); +lean_dec(x_2); +x_90 = lean_box(0); +x_16 = x_90; +goto block_24; } } else { lean_object* x_91; -lean_dec(x_78); -lean_dec(x_77); -lean_dec(x_76); -lean_dec(x_75); +lean_dec(x_53); +lean_dec(x_52); +lean_dec(x_29); lean_dec(x_3); lean_dec(x_2); x_91 = lean_box(0); -x_23 = x_91; -goto block_31; +x_16 = x_91; +goto block_24; } } else { lean_object* x_92; -lean_dec(x_77); -lean_dec(x_76); -lean_dec(x_75); +lean_dec(x_52); +lean_dec(x_29); lean_dec(x_3); lean_dec(x_2); x_92 = lean_box(0); -x_23 = x_92; -goto block_31; +x_16 = x_92; +goto block_24; } } else { lean_object* x_93; -lean_dec(x_76); -lean_dec(x_75); +lean_dec(x_51); +lean_dec(x_29); lean_dec(x_3); lean_dec(x_2); x_93 = lean_box(0); -x_23 = x_93; -goto block_31; -} -} -else -{ -lean_object* x_94; -lean_dec(x_75); -lean_dec(x_3); -lean_dec(x_2); -x_94 = lean_box(0); -x_23 = x_94; -goto block_31; -} -} -else -{ -lean_object* x_95; -lean_dec(x_63); -lean_dec(x_3); -lean_dec(x_2); -x_95 = lean_box(0); -x_23 = x_95; -goto block_31; -} -} -} -} -} -else -{ -lean_object* x_96; -lean_dec(x_62); -lean_dec(x_61); -lean_dec(x_60); -lean_dec(x_59); -lean_dec(x_36); -lean_dec(x_3); -lean_dec(x_2); -x_96 = lean_box(0); -x_23 = x_96; -goto block_31; -} -} -else -{ -lean_object* x_97; -lean_dec(x_61); -lean_dec(x_60); -lean_dec(x_59); -lean_dec(x_36); -lean_dec(x_3); -lean_dec(x_2); -x_97 = lean_box(0); -x_23 = x_97; -goto block_31; -} -} -else -{ -lean_object* x_98; -lean_dec(x_60); -lean_dec(x_59); -lean_dec(x_36); -lean_dec(x_3); -lean_dec(x_2); -x_98 = lean_box(0); -x_23 = x_98; -goto block_31; -} -} -else -{ -lean_object* x_99; -lean_dec(x_59); -lean_dec(x_36); -lean_dec(x_3); -lean_dec(x_2); -x_99 = lean_box(0); -x_23 = x_99; -goto block_31; -} -} -else -{ -lean_object* x_100; -lean_dec(x_58); -lean_dec(x_36); -lean_dec(x_3); -lean_dec(x_2); -x_100 = lean_box(0); -x_23 = x_100; -goto block_31; +x_16 = x_93; +goto block_24; } } default: { -lean_object* x_101; -lean_dec(x_36); +lean_object* x_94; +lean_dec(x_29); lean_dec(x_3); lean_dec(x_2); -x_101 = lean_box(0); -x_23 = x_101; -goto block_31; +x_94 = lean_box(0); +x_16 = x_94; +goto block_24; } } } -block_31: +block_24: { -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_dec(x_23); -x_24 = l_Lean_Name_toString___closed__1; -x_25 = l_Lean_Name_toStringWithSep___main(x_24, x_4); -x_26 = l_Lean_Parser_registerBuiltinParserAttribute___lambda__1___closed__1; -x_27 = lean_string_append(x_26, x_25); -lean_dec(x_25); -x_28 = l_Lean_Parser_registerBuiltinParserAttribute___lambda__1___closed__2; -x_29 = lean_string_append(x_27, x_28); -x_30 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_30, 0, x_29); -lean_ctor_set(x_30, 1, x_7); -return x_30; +lean_object* x_17; lean_object* x_18; lean_object* x_19; lean_object* x_20; lean_object* x_21; lean_object* x_22; lean_object* x_23; +lean_dec(x_16); +x_17 = l_Lean_Name_toString___closed__1; +x_18 = l_Lean_Name_toStringWithSep___main(x_17, x_4); +x_19 = l_Lean_Parser_registerBuiltinParserAttribute___lambda__1___closed__1; +x_20 = lean_string_append(x_19, x_18); +lean_dec(x_18); +x_21 = l_Lean_Parser_registerBuiltinParserAttribute___lambda__1___closed__2; +x_22 = lean_string_append(x_20, x_21); +x_23 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_23, 0, x_22); +lean_ctor_set(x_23, 1, x_7); +return x_23; } } } +else +{ +lean_object* x_95; lean_object* x_96; lean_object* x_97; lean_object* x_98; lean_object* x_99; lean_object* x_100; lean_object* x_101; +lean_dec(x_4); +lean_dec(x_3); +lean_dec(x_2); +x_95 = l_Lean_Name_toString___closed__1; +x_96 = l_Lean_Name_toStringWithSep___main(x_95, x_1); +x_97 = l_Lean_registerTagAttribute___lambda__4___closed__1; +x_98 = lean_string_append(x_97, x_96); +lean_dec(x_96); +x_99 = l_Lean_registerTagAttribute___lambda__4___closed__5; +x_100 = lean_string_append(x_98, x_99); +x_101 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_101, 0, x_100); +lean_ctor_set(x_101, 1, x_7); +return x_101; +} } } lean_object* _init_l_Lean_Parser_registerBuiltinParserAttribute___closed__1() { @@ -33687,7 +33687,7 @@ x_11 = l_Lean_Name_toStringWithSep___main(x_10, x_1); x_12 = l_List_foldlM___main___at___private_Init_Lean_Parser_Parser_16__addParserAttribute___spec__1___closed__1; x_13 = lean_string_append(x_12, x_11); lean_dec(x_11); -x_14 = l_Lean_registerTagAttribute___lambda__4___closed__4; +x_14 = l_Lean_registerTagAttribute___lambda__4___closed__3; x_15 = lean_string_append(x_13, x_14); x_16 = lean_string_append(x_15, x_9); lean_dec(x_9); diff --git a/stage0/stdlib/Init/Lean/ReducibilityAttrs.c b/stage0/stdlib/Init/Lean/ReducibilityAttrs.c index 3882bf6953..9bc52365c5 100644 --- a/stage0/stdlib/Init/Lean/ReducibilityAttrs.c +++ b/stage0/stdlib/Init/Lean/ReducibilityAttrs.c @@ -76,6 +76,7 @@ lean_object* l_Lean_registerPersistentEnvExtensionUnsafe___at_Lean_mkReducibilit lean_object* l_Lean_EnumAttributes_getValue___at_Lean_getReducibilityStatus___spec__1(lean_object*, lean_object*, lean_object*); uint8_t l_Lean_ReducibilityStatus_inhabited; lean_object* l_Lean_PersistentEnvExtension_addEntry___rarg(lean_object*, lean_object*, lean_object*); +extern lean_object* l_Lean_registerTagAttribute___lambda__4___closed__2; lean_object* l_Lean_mkReducibilityAttrs___closed__4; lean_object* l_Lean_registerEnumAttributes___at_Lean_mkReducibilityAttrs___spec__1___lambda__1(lean_object*, lean_object*); extern lean_object* l_Lean_registerPersistentEnvExtensionUnsafe___rarg___closed__3; @@ -87,7 +88,6 @@ lean_object* l_Lean_mkReducibilityAttrs___closed__7; lean_object* l_Lean_registerTagAttribute___lambda__6___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_RBNode_fold___main___at_Lean_mkReducibilityAttrs___spec__2___boxed(lean_object*, lean_object*); uint8_t lean_nat_dec_le(lean_object*, lean_object*); -extern lean_object* l_Lean_registerTagAttribute___lambda__4___closed__5; lean_object* l_Lean_registerTagAttribute___lambda__5___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); extern lean_object* l_Lean_registerEnumAttributes___rarg___closed__1; extern lean_object* l_Lean_registerPersistentEnvExtensionUnsafe___rarg___closed__4; @@ -1135,7 +1135,7 @@ x_11 = l_Lean_Name_toStringWithSep___main(x_10, x_1); x_12 = l_Lean_registerTagAttribute___lambda__4___closed__1; x_13 = lean_string_append(x_12, x_11); lean_dec(x_11); -x_14 = l_Lean_registerTagAttribute___lambda__4___closed__3; +x_14 = l_Lean_registerTagAttribute___lambda__4___closed__2; x_15 = lean_string_append(x_13, x_14); x_16 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_16, 0, x_15); @@ -1167,7 +1167,7 @@ x_22 = l_Lean_Name_toStringWithSep___main(x_21, x_1); x_23 = l_Lean_registerTagAttribute___lambda__4___closed__1; x_24 = lean_string_append(x_23, x_22); lean_dec(x_22); -x_25 = l_Lean_registerTagAttribute___lambda__4___closed__4; +x_25 = l_Lean_registerTagAttribute___lambda__4___closed__3; x_26 = lean_string_append(x_24, x_25); x_27 = lean_string_append(x_26, x_20); lean_dec(x_20); @@ -1205,7 +1205,7 @@ x_34 = l_Lean_Name_toStringWithSep___main(x_33, x_1); x_35 = l_Lean_registerTagAttribute___lambda__4___closed__1; x_36 = lean_string_append(x_35, x_34); lean_dec(x_34); -x_37 = l_Lean_registerTagAttribute___lambda__4___closed__5; +x_37 = l_Lean_registerTagAttribute___lambda__4___closed__4; x_38 = lean_string_append(x_36, x_37); x_39 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_39, 0, x_38); diff --git a/stage0/stdlib/Init/Lean/Util/CollectLevelParams.c b/stage0/stdlib/Init/Lean/Util/CollectLevelParams.c new file mode 100644 index 0000000000..9ba8f1ffc9 --- /dev/null +++ b/stage0/stdlib/Init/Lean/Util/CollectLevelParams.c @@ -0,0 +1,2529 @@ +// Lean compiler output +// Module: Init.Lean.Util.CollectLevelParams +// Imports: Init.Lean.Expr +#include "runtime/lean.h" +#if defined(__clang__) +#pragma clang diagnostic ignored "-Wunused-parameter" +#pragma clang diagnostic ignored "-Wunused-label" +#elif defined(__GNUC__) && !defined(__CLANG__) +#pragma GCC diagnostic ignored "-Wunused-parameter" +#pragma GCC diagnostic ignored "-Wunused-label" +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#endif +#ifdef __cplusplus +extern "C" { +#endif +lean_object* l_AssocList_replace___main___at_Lean_CollectLevelParams_visitLevel___spec__7(lean_object*, lean_object*, lean_object*); +lean_object* l_mkHashMap___at_Lean_collectLevelParams___spec__2(lean_object*); +lean_object* l_HashMapImp_insert___at_Lean_CollectLevelParams_visitLevel___spec__3(lean_object*, lean_object*, lean_object*); +lean_object* lean_array_uget(lean_object*, size_t); +lean_object* lean_array_uset(lean_object*, size_t, lean_object*); +lean_object* l_Lean_CollectLevelParams_visitLevel(lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_CollectLevelParams_collect(lean_object*, lean_object*); +lean_object* l_List_forM___main___at_Lean_CollectLevelParams_main___main___spec__1(lean_object*, lean_object*); +extern lean_object* l_Array_empty___closed__1; +size_t l_Lean_Level_hash(lean_object*); +lean_object* lean_array_push(lean_object*, lean_object*); +lean_object* lean_array_get_size(lean_object*); +uint8_t l_AssocList_contains___main___at_Lean_CollectLevelParams_visitExpr___spec__2(lean_object*, lean_object*); +uint8_t l_Lean_Level_hasParam(lean_object*); +uint8_t l_HashMapImp_contains___at_Lean_CollectLevelParams_visitExpr___spec__1(lean_object*, lean_object*); +lean_object* l_HashMapImp_moveEntries___main___at_Lean_CollectLevelParams_visitExpr___spec__5(lean_object*, lean_object*, lean_object*); +lean_object* lean_nat_add(lean_object*, lean_object*); +lean_object* l_Lean_CollectLevelParams_collect___main(lean_object*, lean_object*); +lean_object* l_AssocList_foldlM___main___at_Lean_CollectLevelParams_visitExpr___spec__6(lean_object*, lean_object*); +lean_object* l_mkHashSet___at_Lean_collectLevelParams___spec__3(lean_object*); +lean_object* lean_array_fget(lean_object*, lean_object*); +uint8_t l_Lean_Expr_hasLevelParam(lean_object*); +lean_object* l_HashMapImp_expand___at_Lean_CollectLevelParams_visitLevel___spec__4(lean_object*, lean_object*); +uint8_t l_HashMapImp_contains___at_Lean_CollectLevelParams_visitLevel___spec__1(lean_object*, lean_object*); +lean_object* l_Lean_CollectLevelParams_visitExpr(lean_object*, lean_object*, lean_object*); +lean_object* l_HashMapImp_expand___at_Lean_CollectLevelParams_visitExpr___spec__4(lean_object*, lean_object*); +lean_object* lean_array_fset(lean_object*, lean_object*, lean_object*); +size_t l_Lean_Expr_hash(lean_object*); +lean_object* l_Lean_CollectLevelParams_main(lean_object*, lean_object*); +lean_object* l_HashMapImp_contains___at_Lean_CollectLevelParams_visitExpr___spec__1___boxed(lean_object*, lean_object*); +size_t lean_usize_modn(size_t, lean_object*); +lean_object* l_AssocList_foldlM___main___at_Lean_CollectLevelParams_visitLevel___spec__6(lean_object*, lean_object*); +lean_object* l_mkHashMapImp___rarg(lean_object*); +lean_object* l_Lean_collectLevelParams___closed__2; +uint8_t lean_expr_eqv(lean_object*, lean_object*); +uint8_t lean_nat_dec_le(lean_object*, lean_object*); +lean_object* l_Lean_collectLevelParams___closed__1; +lean_object* lean_nat_mul(lean_object*, lean_object*); +lean_object* l_mkHashMap___at_Lean_collectLevelParams___spec__4(lean_object*); +lean_object* l_AssocList_contains___main___at_Lean_CollectLevelParams_visitLevel___spec__2___boxed(lean_object*, lean_object*); +lean_object* l_HashMapImp_contains___at_Lean_CollectLevelParams_visitLevel___spec__1___boxed(lean_object*, lean_object*); +lean_object* l_HashMapImp_insert___at_Lean_CollectLevelParams_visitExpr___spec__3(lean_object*, lean_object*, lean_object*); +lean_object* lean_mk_array(lean_object*, lean_object*); +lean_object* l_Lean_collectLevelParams___closed__3; +lean_object* l_AssocList_replace___main___at_Lean_CollectLevelParams_visitExpr___spec__7(lean_object*, lean_object*, lean_object*); +lean_object* l_HashMapImp_moveEntries___main___at_Lean_CollectLevelParams_visitLevel___spec__5(lean_object*, lean_object*, lean_object*); +lean_object* l_AssocList_contains___main___at_Lean_CollectLevelParams_visitExpr___spec__2___boxed(lean_object*, lean_object*); +lean_object* l_mkHashSet___at_Lean_collectLevelParams___spec__1(lean_object*); +lean_object* l_Lean_collectLevelParams(lean_object*); +uint8_t lean_level_eq(lean_object*, lean_object*); +uint8_t l_AssocList_contains___main___at_Lean_CollectLevelParams_visitLevel___spec__2(lean_object*, lean_object*); +lean_object* l_Lean_CollectLevelParams_main___main(lean_object*, lean_object*); +uint8_t lean_nat_dec_lt(lean_object*, lean_object*); +uint8_t l_AssocList_contains___main___at_Lean_CollectLevelParams_visitLevel___spec__2(lean_object* x_1, lean_object* x_2) { +_start: +{ +if (lean_obj_tag(x_2) == 0) +{ +uint8_t x_3; +x_3 = 0; +return x_3; +} +else +{ +lean_object* x_4; lean_object* x_5; uint8_t x_6; +x_4 = lean_ctor_get(x_2, 0); +x_5 = lean_ctor_get(x_2, 2); +x_6 = lean_level_eq(x_4, x_1); +if (x_6 == 0) +{ +x_2 = x_5; +goto _start; +} +else +{ +uint8_t x_8; +x_8 = 1; +return x_8; +} +} +} +} +uint8_t l_HashMapImp_contains___at_Lean_CollectLevelParams_visitLevel___spec__1(lean_object* x_1, lean_object* x_2) { +_start: +{ +lean_object* x_3; lean_object* x_4; size_t x_5; size_t x_6; lean_object* x_7; uint8_t x_8; +x_3 = lean_ctor_get(x_1, 1); +x_4 = lean_array_get_size(x_3); +x_5 = l_Lean_Level_hash(x_2); +x_6 = lean_usize_modn(x_5, x_4); +lean_dec(x_4); +x_7 = lean_array_uget(x_3, x_6); +x_8 = l_AssocList_contains___main___at_Lean_CollectLevelParams_visitLevel___spec__2(x_2, x_7); +lean_dec(x_7); +return x_8; +} +} +lean_object* l_AssocList_foldlM___main___at_Lean_CollectLevelParams_visitLevel___spec__6(lean_object* x_1, lean_object* x_2) { +_start: +{ +if (lean_obj_tag(x_2) == 0) +{ +return x_1; +} +else +{ +uint8_t x_3; +x_3 = !lean_is_exclusive(x_2); +if (x_3 == 0) +{ +lean_object* x_4; lean_object* x_5; lean_object* x_6; size_t x_7; size_t x_8; lean_object* x_9; lean_object* x_10; +x_4 = lean_ctor_get(x_2, 0); +x_5 = lean_ctor_get(x_2, 2); +x_6 = lean_array_get_size(x_1); +x_7 = l_Lean_Level_hash(x_4); +x_8 = lean_usize_modn(x_7, x_6); +lean_dec(x_6); +x_9 = lean_array_uget(x_1, x_8); +lean_ctor_set(x_2, 2, x_9); +x_10 = lean_array_uset(x_1, x_8, x_2); +x_1 = x_10; +x_2 = x_5; +goto _start; +} +else +{ +lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; size_t x_16; size_t x_17; lean_object* x_18; lean_object* x_19; lean_object* x_20; +x_12 = lean_ctor_get(x_2, 0); +x_13 = lean_ctor_get(x_2, 1); +x_14 = lean_ctor_get(x_2, 2); +lean_inc(x_14); +lean_inc(x_13); +lean_inc(x_12); +lean_dec(x_2); +x_15 = lean_array_get_size(x_1); +x_16 = l_Lean_Level_hash(x_12); +x_17 = lean_usize_modn(x_16, x_15); +lean_dec(x_15); +x_18 = lean_array_uget(x_1, x_17); +x_19 = lean_alloc_ctor(1, 3, 0); +lean_ctor_set(x_19, 0, x_12); +lean_ctor_set(x_19, 1, x_13); +lean_ctor_set(x_19, 2, x_18); +x_20 = lean_array_uset(x_1, x_17, x_19); +x_1 = x_20; +x_2 = x_14; +goto _start; +} +} +} +} +lean_object* l_HashMapImp_moveEntries___main___at_Lean_CollectLevelParams_visitLevel___spec__5(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +_start: +{ +lean_object* x_4; uint8_t x_5; +x_4 = lean_array_get_size(x_2); +x_5 = lean_nat_dec_lt(x_1, x_4); +lean_dec(x_4); +if (x_5 == 0) +{ +lean_dec(x_2); +lean_dec(x_1); +return x_3; +} +else +{ +lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; +x_6 = lean_array_fget(x_2, x_1); +x_7 = lean_box(0); +x_8 = lean_array_fset(x_2, x_1, x_7); +x_9 = l_AssocList_foldlM___main___at_Lean_CollectLevelParams_visitLevel___spec__6(x_3, x_6); +x_10 = lean_unsigned_to_nat(1u); +x_11 = lean_nat_add(x_1, x_10); +lean_dec(x_1); +x_1 = x_11; +x_2 = x_8; +x_3 = x_9; +goto _start; +} +} +} +lean_object* l_HashMapImp_expand___at_Lean_CollectLevelParams_visitLevel___spec__4(lean_object* x_1, lean_object* x_2) { +_start: +{ +lean_object* x_3; lean_object* x_4; lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; +x_3 = lean_array_get_size(x_2); +x_4 = lean_unsigned_to_nat(2u); +x_5 = lean_nat_mul(x_3, x_4); +lean_dec(x_3); +x_6 = lean_box(0); +x_7 = lean_mk_array(x_5, x_6); +x_8 = lean_unsigned_to_nat(0u); +x_9 = l_HashMapImp_moveEntries___main___at_Lean_CollectLevelParams_visitLevel___spec__5(x_8, x_2, x_7); +x_10 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_10, 0, x_1); +lean_ctor_set(x_10, 1, x_9); +return x_10; +} +} +lean_object* l_AssocList_replace___main___at_Lean_CollectLevelParams_visitLevel___spec__7(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +_start: +{ +if (lean_obj_tag(x_3) == 0) +{ +lean_dec(x_2); +lean_dec(x_1); +return x_3; +} +else +{ +uint8_t x_4; +x_4 = !lean_is_exclusive(x_3); +if (x_4 == 0) +{ +lean_object* x_5; lean_object* x_6; lean_object* x_7; uint8_t x_8; +x_5 = lean_ctor_get(x_3, 0); +x_6 = lean_ctor_get(x_3, 1); +x_7 = lean_ctor_get(x_3, 2); +x_8 = lean_level_eq(x_5, x_1); +if (x_8 == 0) +{ +lean_object* x_9; +x_9 = l_AssocList_replace___main___at_Lean_CollectLevelParams_visitLevel___spec__7(x_1, x_2, x_7); +lean_ctor_set(x_3, 2, x_9); +return x_3; +} +else +{ +lean_dec(x_6); +lean_dec(x_5); +lean_ctor_set(x_3, 1, x_2); +lean_ctor_set(x_3, 0, x_1); +return x_3; +} +} +else +{ +lean_object* x_10; lean_object* x_11; lean_object* x_12; uint8_t x_13; +x_10 = lean_ctor_get(x_3, 0); +x_11 = lean_ctor_get(x_3, 1); +x_12 = lean_ctor_get(x_3, 2); +lean_inc(x_12); +lean_inc(x_11); +lean_inc(x_10); +lean_dec(x_3); +x_13 = lean_level_eq(x_10, x_1); +if (x_13 == 0) +{ +lean_object* x_14; lean_object* x_15; +x_14 = l_AssocList_replace___main___at_Lean_CollectLevelParams_visitLevel___spec__7(x_1, x_2, x_12); +x_15 = lean_alloc_ctor(1, 3, 0); +lean_ctor_set(x_15, 0, x_10); +lean_ctor_set(x_15, 1, x_11); +lean_ctor_set(x_15, 2, x_14); +return x_15; +} +else +{ +lean_object* x_16; +lean_dec(x_11); +lean_dec(x_10); +x_16 = lean_alloc_ctor(1, 3, 0); +lean_ctor_set(x_16, 0, x_1); +lean_ctor_set(x_16, 1, x_2); +lean_ctor_set(x_16, 2, x_12); +return x_16; +} +} +} +} +} +lean_object* l_HashMapImp_insert___at_Lean_CollectLevelParams_visitLevel___spec__3(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +_start: +{ +uint8_t x_4; +x_4 = !lean_is_exclusive(x_1); +if (x_4 == 0) +{ +lean_object* x_5; lean_object* x_6; lean_object* x_7; size_t x_8; size_t x_9; lean_object* x_10; uint8_t x_11; +x_5 = lean_ctor_get(x_1, 0); +x_6 = lean_ctor_get(x_1, 1); +x_7 = lean_array_get_size(x_6); +x_8 = l_Lean_Level_hash(x_2); +x_9 = lean_usize_modn(x_8, x_7); +x_10 = lean_array_uget(x_6, x_9); +x_11 = l_AssocList_contains___main___at_Lean_CollectLevelParams_visitLevel___spec__2(x_2, x_10); +if (x_11 == 0) +{ +lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; uint8_t x_16; +x_12 = lean_unsigned_to_nat(1u); +x_13 = lean_nat_add(x_5, x_12); +lean_dec(x_5); +x_14 = lean_alloc_ctor(1, 3, 0); +lean_ctor_set(x_14, 0, x_2); +lean_ctor_set(x_14, 1, x_3); +lean_ctor_set(x_14, 2, x_10); +x_15 = lean_array_uset(x_6, x_9, x_14); +x_16 = lean_nat_dec_le(x_13, x_7); +lean_dec(x_7); +if (x_16 == 0) +{ +lean_object* x_17; +lean_free_object(x_1); +x_17 = l_HashMapImp_expand___at_Lean_CollectLevelParams_visitLevel___spec__4(x_13, x_15); +return x_17; +} +else +{ +lean_ctor_set(x_1, 1, x_15); +lean_ctor_set(x_1, 0, x_13); +return x_1; +} +} +else +{ +lean_object* x_18; lean_object* x_19; +lean_dec(x_7); +x_18 = l_AssocList_replace___main___at_Lean_CollectLevelParams_visitLevel___spec__7(x_2, x_3, x_10); +x_19 = lean_array_uset(x_6, x_9, x_18); +lean_ctor_set(x_1, 1, x_19); +return x_1; +} +} +else +{ +lean_object* x_20; lean_object* x_21; lean_object* x_22; size_t x_23; size_t x_24; lean_object* x_25; uint8_t x_26; +x_20 = lean_ctor_get(x_1, 0); +x_21 = lean_ctor_get(x_1, 1); +lean_inc(x_21); +lean_inc(x_20); +lean_dec(x_1); +x_22 = lean_array_get_size(x_21); +x_23 = l_Lean_Level_hash(x_2); +x_24 = lean_usize_modn(x_23, x_22); +x_25 = lean_array_uget(x_21, x_24); +x_26 = l_AssocList_contains___main___at_Lean_CollectLevelParams_visitLevel___spec__2(x_2, x_25); +if (x_26 == 0) +{ +lean_object* x_27; lean_object* x_28; lean_object* x_29; lean_object* x_30; uint8_t x_31; +x_27 = lean_unsigned_to_nat(1u); +x_28 = lean_nat_add(x_20, x_27); +lean_dec(x_20); +x_29 = lean_alloc_ctor(1, 3, 0); +lean_ctor_set(x_29, 0, x_2); +lean_ctor_set(x_29, 1, x_3); +lean_ctor_set(x_29, 2, x_25); +x_30 = lean_array_uset(x_21, x_24, x_29); +x_31 = lean_nat_dec_le(x_28, x_22); +lean_dec(x_22); +if (x_31 == 0) +{ +lean_object* x_32; +x_32 = l_HashMapImp_expand___at_Lean_CollectLevelParams_visitLevel___spec__4(x_28, x_30); +return x_32; +} +else +{ +lean_object* x_33; +x_33 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_33, 0, x_28); +lean_ctor_set(x_33, 1, x_30); +return x_33; +} +} +else +{ +lean_object* x_34; lean_object* x_35; lean_object* x_36; +lean_dec(x_22); +x_34 = l_AssocList_replace___main___at_Lean_CollectLevelParams_visitLevel___spec__7(x_2, x_3, x_25); +x_35 = lean_array_uset(x_21, x_24, x_34); +x_36 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_36, 0, x_20); +lean_ctor_set(x_36, 1, x_35); +return x_36; +} +} +} +} +lean_object* l_Lean_CollectLevelParams_visitLevel(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +_start: +{ +uint8_t x_4; +x_4 = l_Lean_Level_hasParam(x_2); +if (x_4 == 0) +{ +lean_object* x_5; lean_object* x_6; +lean_dec(x_2); +lean_dec(x_1); +x_5 = lean_box(0); +x_6 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_6, 0, x_5); +lean_ctor_set(x_6, 1, x_3); +return x_6; +} +else +{ +lean_object* x_7; lean_object* x_8; lean_object* x_9; uint8_t x_10; +x_7 = lean_ctor_get(x_3, 0); +lean_inc(x_7); +x_8 = lean_ctor_get(x_3, 1); +lean_inc(x_8); +x_9 = lean_ctor_get(x_3, 2); +lean_inc(x_9); +x_10 = l_HashMapImp_contains___at_Lean_CollectLevelParams_visitLevel___spec__1(x_7, x_2); +if (x_10 == 0) +{ +uint8_t x_11; +x_11 = !lean_is_exclusive(x_3); +if (x_11 == 0) +{ +lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; +x_12 = lean_ctor_get(x_3, 2); +lean_dec(x_12); +x_13 = lean_ctor_get(x_3, 1); +lean_dec(x_13); +x_14 = lean_ctor_get(x_3, 0); +lean_dec(x_14); +x_15 = lean_box(0); +lean_inc(x_2); +x_16 = l_HashMapImp_insert___at_Lean_CollectLevelParams_visitLevel___spec__3(x_7, x_2, x_15); +lean_ctor_set(x_3, 0, x_16); +x_17 = lean_apply_2(x_1, x_2, x_3); +return x_17; +} +else +{ +lean_object* x_18; lean_object* x_19; lean_object* x_20; lean_object* x_21; +lean_dec(x_3); +x_18 = lean_box(0); +lean_inc(x_2); +x_19 = l_HashMapImp_insert___at_Lean_CollectLevelParams_visitLevel___spec__3(x_7, x_2, x_18); +x_20 = lean_alloc_ctor(0, 3, 0); +lean_ctor_set(x_20, 0, x_19); +lean_ctor_set(x_20, 1, x_8); +lean_ctor_set(x_20, 2, x_9); +x_21 = lean_apply_2(x_1, x_2, x_20); +return x_21; +} +} +else +{ +lean_object* x_22; lean_object* x_23; +lean_dec(x_9); +lean_dec(x_8); +lean_dec(x_7); +lean_dec(x_2); +lean_dec(x_1); +x_22 = lean_box(0); +x_23 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_23, 0, x_22); +lean_ctor_set(x_23, 1, x_3); +return x_23; +} +} +} +} +lean_object* l_AssocList_contains___main___at_Lean_CollectLevelParams_visitLevel___spec__2___boxed(lean_object* x_1, lean_object* x_2) { +_start: +{ +uint8_t x_3; lean_object* x_4; +x_3 = l_AssocList_contains___main___at_Lean_CollectLevelParams_visitLevel___spec__2(x_1, x_2); +lean_dec(x_2); +lean_dec(x_1); +x_4 = lean_box(x_3); +return x_4; +} +} +lean_object* l_HashMapImp_contains___at_Lean_CollectLevelParams_visitLevel___spec__1___boxed(lean_object* x_1, lean_object* x_2) { +_start: +{ +uint8_t x_3; lean_object* x_4; +x_3 = l_HashMapImp_contains___at_Lean_CollectLevelParams_visitLevel___spec__1(x_1, x_2); +lean_dec(x_2); +lean_dec(x_1); +x_4 = lean_box(x_3); +return x_4; +} +} +lean_object* l_Lean_CollectLevelParams_collect___main(lean_object* x_1, lean_object* x_2) { +_start: +{ +switch (lean_obj_tag(x_1)) { +case 1: +{ +lean_object* x_3; uint8_t x_4; +x_3 = lean_ctor_get(x_1, 0); +lean_inc(x_3); +lean_dec(x_1); +x_4 = l_Lean_Level_hasParam(x_3); +if (x_4 == 0) +{ +lean_object* x_5; lean_object* x_6; +lean_dec(x_3); +x_5 = lean_box(0); +x_6 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_6, 0, x_5); +lean_ctor_set(x_6, 1, x_2); +return x_6; +} +else +{ +lean_object* x_7; lean_object* x_8; lean_object* x_9; uint8_t x_10; +x_7 = lean_ctor_get(x_2, 0); +lean_inc(x_7); +x_8 = lean_ctor_get(x_2, 1); +lean_inc(x_8); +x_9 = lean_ctor_get(x_2, 2); +lean_inc(x_9); +x_10 = l_HashMapImp_contains___at_Lean_CollectLevelParams_visitLevel___spec__1(x_7, x_3); +if (x_10 == 0) +{ +uint8_t x_11; +x_11 = !lean_is_exclusive(x_2); +if (x_11 == 0) +{ +lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; +x_12 = lean_ctor_get(x_2, 2); +lean_dec(x_12); +x_13 = lean_ctor_get(x_2, 1); +lean_dec(x_13); +x_14 = lean_ctor_get(x_2, 0); +lean_dec(x_14); +x_15 = lean_box(0); +lean_inc(x_3); +x_16 = l_HashMapImp_insert___at_Lean_CollectLevelParams_visitLevel___spec__3(x_7, x_3, x_15); +lean_ctor_set(x_2, 0, x_16); +x_1 = x_3; +goto _start; +} +else +{ +lean_object* x_18; lean_object* x_19; lean_object* x_20; +lean_dec(x_2); +x_18 = lean_box(0); +lean_inc(x_3); +x_19 = l_HashMapImp_insert___at_Lean_CollectLevelParams_visitLevel___spec__3(x_7, x_3, x_18); +x_20 = lean_alloc_ctor(0, 3, 0); +lean_ctor_set(x_20, 0, x_19); +lean_ctor_set(x_20, 1, x_8); +lean_ctor_set(x_20, 2, x_9); +x_1 = x_3; +x_2 = x_20; +goto _start; +} +} +else +{ +lean_object* x_22; lean_object* x_23; +lean_dec(x_9); +lean_dec(x_8); +lean_dec(x_7); +lean_dec(x_3); +x_22 = lean_box(0); +x_23 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_23, 0, x_22); +lean_ctor_set(x_23, 1, x_2); +return x_23; +} +} +} +case 2: +{ +lean_object* x_24; lean_object* x_25; lean_object* x_26; uint8_t x_48; +x_24 = lean_ctor_get(x_1, 0); +lean_inc(x_24); +x_25 = lean_ctor_get(x_1, 1); +lean_inc(x_25); +lean_dec(x_1); +x_48 = l_Lean_Level_hasParam(x_24); +if (x_48 == 0) +{ +lean_dec(x_24); +x_26 = x_2; +goto block_47; +} +else +{ +lean_object* x_49; lean_object* x_50; lean_object* x_51; uint8_t x_52; +x_49 = lean_ctor_get(x_2, 0); +lean_inc(x_49); +x_50 = lean_ctor_get(x_2, 1); +lean_inc(x_50); +x_51 = lean_ctor_get(x_2, 2); +lean_inc(x_51); +x_52 = l_HashMapImp_contains___at_Lean_CollectLevelParams_visitLevel___spec__1(x_49, x_24); +if (x_52 == 0) +{ +uint8_t x_53; +x_53 = !lean_is_exclusive(x_2); +if (x_53 == 0) +{ +lean_object* x_54; lean_object* x_55; lean_object* x_56; lean_object* x_57; lean_object* x_58; lean_object* x_59; lean_object* x_60; +x_54 = lean_ctor_get(x_2, 2); +lean_dec(x_54); +x_55 = lean_ctor_get(x_2, 1); +lean_dec(x_55); +x_56 = lean_ctor_get(x_2, 0); +lean_dec(x_56); +x_57 = lean_box(0); +lean_inc(x_24); +x_58 = l_HashMapImp_insert___at_Lean_CollectLevelParams_visitLevel___spec__3(x_49, x_24, x_57); +lean_ctor_set(x_2, 0, x_58); +x_59 = l_Lean_CollectLevelParams_collect___main(x_24, x_2); +x_60 = lean_ctor_get(x_59, 1); +lean_inc(x_60); +lean_dec(x_59); +x_26 = x_60; +goto block_47; +} +else +{ +lean_object* x_61; lean_object* x_62; lean_object* x_63; lean_object* x_64; lean_object* x_65; +lean_dec(x_2); +x_61 = lean_box(0); +lean_inc(x_24); +x_62 = l_HashMapImp_insert___at_Lean_CollectLevelParams_visitLevel___spec__3(x_49, x_24, x_61); +x_63 = lean_alloc_ctor(0, 3, 0); +lean_ctor_set(x_63, 0, x_62); +lean_ctor_set(x_63, 1, x_50); +lean_ctor_set(x_63, 2, x_51); +x_64 = l_Lean_CollectLevelParams_collect___main(x_24, x_63); +x_65 = lean_ctor_get(x_64, 1); +lean_inc(x_65); +lean_dec(x_64); +x_26 = x_65; +goto block_47; +} +} +else +{ +lean_dec(x_51); +lean_dec(x_50); +lean_dec(x_49); +lean_dec(x_24); +x_26 = x_2; +goto block_47; +} +} +block_47: +{ +uint8_t x_27; +x_27 = l_Lean_Level_hasParam(x_25); +if (x_27 == 0) +{ +lean_object* x_28; lean_object* x_29; +lean_dec(x_25); +x_28 = lean_box(0); +x_29 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_29, 0, x_28); +lean_ctor_set(x_29, 1, x_26); +return x_29; +} +else +{ +lean_object* x_30; lean_object* x_31; lean_object* x_32; uint8_t x_33; +x_30 = lean_ctor_get(x_26, 0); +lean_inc(x_30); +x_31 = lean_ctor_get(x_26, 1); +lean_inc(x_31); +x_32 = lean_ctor_get(x_26, 2); +lean_inc(x_32); +x_33 = l_HashMapImp_contains___at_Lean_CollectLevelParams_visitLevel___spec__1(x_30, x_25); +if (x_33 == 0) +{ +uint8_t x_34; +x_34 = !lean_is_exclusive(x_26); +if (x_34 == 0) +{ +lean_object* x_35; lean_object* x_36; lean_object* x_37; lean_object* x_38; lean_object* x_39; +x_35 = lean_ctor_get(x_26, 2); +lean_dec(x_35); +x_36 = lean_ctor_get(x_26, 1); +lean_dec(x_36); +x_37 = lean_ctor_get(x_26, 0); +lean_dec(x_37); +x_38 = lean_box(0); +lean_inc(x_25); +x_39 = l_HashMapImp_insert___at_Lean_CollectLevelParams_visitLevel___spec__3(x_30, x_25, x_38); +lean_ctor_set(x_26, 0, x_39); +x_1 = x_25; +x_2 = x_26; +goto _start; +} +else +{ +lean_object* x_41; lean_object* x_42; lean_object* x_43; +lean_dec(x_26); +x_41 = lean_box(0); +lean_inc(x_25); +x_42 = l_HashMapImp_insert___at_Lean_CollectLevelParams_visitLevel___spec__3(x_30, x_25, x_41); +x_43 = lean_alloc_ctor(0, 3, 0); +lean_ctor_set(x_43, 0, x_42); +lean_ctor_set(x_43, 1, x_31); +lean_ctor_set(x_43, 2, x_32); +x_1 = x_25; +x_2 = x_43; +goto _start; +} +} +else +{ +lean_object* x_45; lean_object* x_46; +lean_dec(x_32); +lean_dec(x_31); +lean_dec(x_30); +lean_dec(x_25); +x_45 = lean_box(0); +x_46 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_46, 0, x_45); +lean_ctor_set(x_46, 1, x_26); +return x_46; +} +} +} +} +case 3: +{ +lean_object* x_66; lean_object* x_67; lean_object* x_68; uint8_t x_90; +x_66 = lean_ctor_get(x_1, 0); +lean_inc(x_66); +x_67 = lean_ctor_get(x_1, 1); +lean_inc(x_67); +lean_dec(x_1); +x_90 = l_Lean_Level_hasParam(x_66); +if (x_90 == 0) +{ +lean_dec(x_66); +x_68 = x_2; +goto block_89; +} +else +{ +lean_object* x_91; lean_object* x_92; lean_object* x_93; uint8_t x_94; +x_91 = lean_ctor_get(x_2, 0); +lean_inc(x_91); +x_92 = lean_ctor_get(x_2, 1); +lean_inc(x_92); +x_93 = lean_ctor_get(x_2, 2); +lean_inc(x_93); +x_94 = l_HashMapImp_contains___at_Lean_CollectLevelParams_visitLevel___spec__1(x_91, x_66); +if (x_94 == 0) +{ +uint8_t x_95; +x_95 = !lean_is_exclusive(x_2); +if (x_95 == 0) +{ +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 = lean_ctor_get(x_2, 2); +lean_dec(x_96); +x_97 = lean_ctor_get(x_2, 1); +lean_dec(x_97); +x_98 = lean_ctor_get(x_2, 0); +lean_dec(x_98); +x_99 = lean_box(0); +lean_inc(x_66); +x_100 = l_HashMapImp_insert___at_Lean_CollectLevelParams_visitLevel___spec__3(x_91, x_66, x_99); +lean_ctor_set(x_2, 0, x_100); +x_101 = l_Lean_CollectLevelParams_collect___main(x_66, x_2); +x_102 = lean_ctor_get(x_101, 1); +lean_inc(x_102); +lean_dec(x_101); +x_68 = x_102; +goto block_89; +} +else +{ +lean_object* x_103; lean_object* x_104; lean_object* x_105; lean_object* x_106; lean_object* x_107; +lean_dec(x_2); +x_103 = lean_box(0); +lean_inc(x_66); +x_104 = l_HashMapImp_insert___at_Lean_CollectLevelParams_visitLevel___spec__3(x_91, x_66, x_103); +x_105 = lean_alloc_ctor(0, 3, 0); +lean_ctor_set(x_105, 0, x_104); +lean_ctor_set(x_105, 1, x_92); +lean_ctor_set(x_105, 2, x_93); +x_106 = l_Lean_CollectLevelParams_collect___main(x_66, x_105); +x_107 = lean_ctor_get(x_106, 1); +lean_inc(x_107); +lean_dec(x_106); +x_68 = x_107; +goto block_89; +} +} +else +{ +lean_dec(x_93); +lean_dec(x_92); +lean_dec(x_91); +lean_dec(x_66); +x_68 = x_2; +goto block_89; +} +} +block_89: +{ +uint8_t x_69; +x_69 = l_Lean_Level_hasParam(x_67); +if (x_69 == 0) +{ +lean_object* x_70; lean_object* x_71; +lean_dec(x_67); +x_70 = lean_box(0); +x_71 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_71, 0, x_70); +lean_ctor_set(x_71, 1, x_68); +return x_71; +} +else +{ +lean_object* x_72; lean_object* x_73; lean_object* x_74; uint8_t x_75; +x_72 = lean_ctor_get(x_68, 0); +lean_inc(x_72); +x_73 = lean_ctor_get(x_68, 1); +lean_inc(x_73); +x_74 = lean_ctor_get(x_68, 2); +lean_inc(x_74); +x_75 = l_HashMapImp_contains___at_Lean_CollectLevelParams_visitLevel___spec__1(x_72, x_67); +if (x_75 == 0) +{ +uint8_t x_76; +x_76 = !lean_is_exclusive(x_68); +if (x_76 == 0) +{ +lean_object* x_77; lean_object* x_78; lean_object* x_79; lean_object* x_80; lean_object* x_81; +x_77 = lean_ctor_get(x_68, 2); +lean_dec(x_77); +x_78 = lean_ctor_get(x_68, 1); +lean_dec(x_78); +x_79 = lean_ctor_get(x_68, 0); +lean_dec(x_79); +x_80 = lean_box(0); +lean_inc(x_67); +x_81 = l_HashMapImp_insert___at_Lean_CollectLevelParams_visitLevel___spec__3(x_72, x_67, x_80); +lean_ctor_set(x_68, 0, x_81); +x_1 = x_67; +x_2 = x_68; +goto _start; +} +else +{ +lean_object* x_83; lean_object* x_84; lean_object* x_85; +lean_dec(x_68); +x_83 = lean_box(0); +lean_inc(x_67); +x_84 = l_HashMapImp_insert___at_Lean_CollectLevelParams_visitLevel___spec__3(x_72, x_67, x_83); +x_85 = lean_alloc_ctor(0, 3, 0); +lean_ctor_set(x_85, 0, x_84); +lean_ctor_set(x_85, 1, x_73); +lean_ctor_set(x_85, 2, x_74); +x_1 = x_67; +x_2 = x_85; +goto _start; +} +} +else +{ +lean_object* x_87; lean_object* x_88; +lean_dec(x_74); +lean_dec(x_73); +lean_dec(x_72); +lean_dec(x_67); +x_87 = lean_box(0); +x_88 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_88, 0, x_87); +lean_ctor_set(x_88, 1, x_68); +return x_88; +} +} +} +} +case 4: +{ +lean_object* x_108; uint8_t x_109; +x_108 = lean_ctor_get(x_1, 0); +lean_inc(x_108); +lean_dec(x_1); +x_109 = !lean_is_exclusive(x_2); +if (x_109 == 0) +{ +lean_object* x_110; lean_object* x_111; lean_object* x_112; lean_object* x_113; +x_110 = lean_ctor_get(x_2, 2); +x_111 = lean_array_push(x_110, x_108); +lean_ctor_set(x_2, 2, x_111); +x_112 = lean_box(0); +x_113 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_113, 0, x_112); +lean_ctor_set(x_113, 1, x_2); +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; +x_114 = lean_ctor_get(x_2, 0); +x_115 = lean_ctor_get(x_2, 1); +x_116 = lean_ctor_get(x_2, 2); +lean_inc(x_116); +lean_inc(x_115); +lean_inc(x_114); +lean_dec(x_2); +x_117 = lean_array_push(x_116, x_108); +x_118 = lean_alloc_ctor(0, 3, 0); +lean_ctor_set(x_118, 0, x_114); +lean_ctor_set(x_118, 1, x_115); +lean_ctor_set(x_118, 2, x_117); +x_119 = lean_box(0); +x_120 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_120, 0, x_119); +lean_ctor_set(x_120, 1, x_118); +return x_120; +} +} +default: +{ +lean_object* x_121; lean_object* x_122; +lean_dec(x_1); +x_121 = lean_box(0); +x_122 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_122, 0, x_121); +lean_ctor_set(x_122, 1, x_2); +return x_122; +} +} +} +} +lean_object* l_Lean_CollectLevelParams_collect(lean_object* x_1, lean_object* x_2) { +_start: +{ +lean_object* x_3; +x_3 = l_Lean_CollectLevelParams_collect___main(x_1, x_2); +return x_3; +} +} +uint8_t l_AssocList_contains___main___at_Lean_CollectLevelParams_visitExpr___spec__2(lean_object* x_1, lean_object* x_2) { +_start: +{ +if (lean_obj_tag(x_2) == 0) +{ +uint8_t x_3; +x_3 = 0; +return x_3; +} +else +{ +lean_object* x_4; lean_object* x_5; uint8_t x_6; +x_4 = lean_ctor_get(x_2, 0); +x_5 = lean_ctor_get(x_2, 2); +x_6 = lean_expr_eqv(x_4, x_1); +if (x_6 == 0) +{ +x_2 = x_5; +goto _start; +} +else +{ +uint8_t x_8; +x_8 = 1; +return x_8; +} +} +} +} +uint8_t l_HashMapImp_contains___at_Lean_CollectLevelParams_visitExpr___spec__1(lean_object* x_1, lean_object* x_2) { +_start: +{ +lean_object* x_3; lean_object* x_4; size_t x_5; size_t x_6; lean_object* x_7; uint8_t x_8; +x_3 = lean_ctor_get(x_1, 1); +x_4 = lean_array_get_size(x_3); +x_5 = l_Lean_Expr_hash(x_2); +x_6 = lean_usize_modn(x_5, x_4); +lean_dec(x_4); +x_7 = lean_array_uget(x_3, x_6); +x_8 = l_AssocList_contains___main___at_Lean_CollectLevelParams_visitExpr___spec__2(x_2, x_7); +lean_dec(x_7); +return x_8; +} +} +lean_object* l_AssocList_foldlM___main___at_Lean_CollectLevelParams_visitExpr___spec__6(lean_object* x_1, lean_object* x_2) { +_start: +{ +if (lean_obj_tag(x_2) == 0) +{ +return x_1; +} +else +{ +uint8_t x_3; +x_3 = !lean_is_exclusive(x_2); +if (x_3 == 0) +{ +lean_object* x_4; lean_object* x_5; lean_object* x_6; size_t x_7; size_t x_8; lean_object* x_9; lean_object* x_10; +x_4 = lean_ctor_get(x_2, 0); +x_5 = lean_ctor_get(x_2, 2); +x_6 = lean_array_get_size(x_1); +x_7 = l_Lean_Expr_hash(x_4); +x_8 = lean_usize_modn(x_7, x_6); +lean_dec(x_6); +x_9 = lean_array_uget(x_1, x_8); +lean_ctor_set(x_2, 2, x_9); +x_10 = lean_array_uset(x_1, x_8, x_2); +x_1 = x_10; +x_2 = x_5; +goto _start; +} +else +{ +lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; size_t x_16; size_t x_17; lean_object* x_18; lean_object* x_19; lean_object* x_20; +x_12 = lean_ctor_get(x_2, 0); +x_13 = lean_ctor_get(x_2, 1); +x_14 = lean_ctor_get(x_2, 2); +lean_inc(x_14); +lean_inc(x_13); +lean_inc(x_12); +lean_dec(x_2); +x_15 = lean_array_get_size(x_1); +x_16 = l_Lean_Expr_hash(x_12); +x_17 = lean_usize_modn(x_16, x_15); +lean_dec(x_15); +x_18 = lean_array_uget(x_1, x_17); +x_19 = lean_alloc_ctor(1, 3, 0); +lean_ctor_set(x_19, 0, x_12); +lean_ctor_set(x_19, 1, x_13); +lean_ctor_set(x_19, 2, x_18); +x_20 = lean_array_uset(x_1, x_17, x_19); +x_1 = x_20; +x_2 = x_14; +goto _start; +} +} +} +} +lean_object* l_HashMapImp_moveEntries___main___at_Lean_CollectLevelParams_visitExpr___spec__5(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +_start: +{ +lean_object* x_4; uint8_t x_5; +x_4 = lean_array_get_size(x_2); +x_5 = lean_nat_dec_lt(x_1, x_4); +lean_dec(x_4); +if (x_5 == 0) +{ +lean_dec(x_2); +lean_dec(x_1); +return x_3; +} +else +{ +lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; +x_6 = lean_array_fget(x_2, x_1); +x_7 = lean_box(0); +x_8 = lean_array_fset(x_2, x_1, x_7); +x_9 = l_AssocList_foldlM___main___at_Lean_CollectLevelParams_visitExpr___spec__6(x_3, x_6); +x_10 = lean_unsigned_to_nat(1u); +x_11 = lean_nat_add(x_1, x_10); +lean_dec(x_1); +x_1 = x_11; +x_2 = x_8; +x_3 = x_9; +goto _start; +} +} +} +lean_object* l_HashMapImp_expand___at_Lean_CollectLevelParams_visitExpr___spec__4(lean_object* x_1, lean_object* x_2) { +_start: +{ +lean_object* x_3; lean_object* x_4; lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; +x_3 = lean_array_get_size(x_2); +x_4 = lean_unsigned_to_nat(2u); +x_5 = lean_nat_mul(x_3, x_4); +lean_dec(x_3); +x_6 = lean_box(0); +x_7 = lean_mk_array(x_5, x_6); +x_8 = lean_unsigned_to_nat(0u); +x_9 = l_HashMapImp_moveEntries___main___at_Lean_CollectLevelParams_visitExpr___spec__5(x_8, x_2, x_7); +x_10 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_10, 0, x_1); +lean_ctor_set(x_10, 1, x_9); +return x_10; +} +} +lean_object* l_AssocList_replace___main___at_Lean_CollectLevelParams_visitExpr___spec__7(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +_start: +{ +if (lean_obj_tag(x_3) == 0) +{ +lean_dec(x_2); +lean_dec(x_1); +return x_3; +} +else +{ +uint8_t x_4; +x_4 = !lean_is_exclusive(x_3); +if (x_4 == 0) +{ +lean_object* x_5; lean_object* x_6; lean_object* x_7; uint8_t x_8; +x_5 = lean_ctor_get(x_3, 0); +x_6 = lean_ctor_get(x_3, 1); +x_7 = lean_ctor_get(x_3, 2); +x_8 = lean_expr_eqv(x_5, x_1); +if (x_8 == 0) +{ +lean_object* x_9; +x_9 = l_AssocList_replace___main___at_Lean_CollectLevelParams_visitExpr___spec__7(x_1, x_2, x_7); +lean_ctor_set(x_3, 2, x_9); +return x_3; +} +else +{ +lean_dec(x_6); +lean_dec(x_5); +lean_ctor_set(x_3, 1, x_2); +lean_ctor_set(x_3, 0, x_1); +return x_3; +} +} +else +{ +lean_object* x_10; lean_object* x_11; lean_object* x_12; uint8_t x_13; +x_10 = lean_ctor_get(x_3, 0); +x_11 = lean_ctor_get(x_3, 1); +x_12 = lean_ctor_get(x_3, 2); +lean_inc(x_12); +lean_inc(x_11); +lean_inc(x_10); +lean_dec(x_3); +x_13 = lean_expr_eqv(x_10, x_1); +if (x_13 == 0) +{ +lean_object* x_14; lean_object* x_15; +x_14 = l_AssocList_replace___main___at_Lean_CollectLevelParams_visitExpr___spec__7(x_1, x_2, x_12); +x_15 = lean_alloc_ctor(1, 3, 0); +lean_ctor_set(x_15, 0, x_10); +lean_ctor_set(x_15, 1, x_11); +lean_ctor_set(x_15, 2, x_14); +return x_15; +} +else +{ +lean_object* x_16; +lean_dec(x_11); +lean_dec(x_10); +x_16 = lean_alloc_ctor(1, 3, 0); +lean_ctor_set(x_16, 0, x_1); +lean_ctor_set(x_16, 1, x_2); +lean_ctor_set(x_16, 2, x_12); +return x_16; +} +} +} +} +} +lean_object* l_HashMapImp_insert___at_Lean_CollectLevelParams_visitExpr___spec__3(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +_start: +{ +uint8_t x_4; +x_4 = !lean_is_exclusive(x_1); +if (x_4 == 0) +{ +lean_object* x_5; lean_object* x_6; lean_object* x_7; size_t x_8; size_t x_9; lean_object* x_10; uint8_t x_11; +x_5 = lean_ctor_get(x_1, 0); +x_6 = lean_ctor_get(x_1, 1); +x_7 = lean_array_get_size(x_6); +x_8 = l_Lean_Expr_hash(x_2); +x_9 = lean_usize_modn(x_8, x_7); +x_10 = lean_array_uget(x_6, x_9); +x_11 = l_AssocList_contains___main___at_Lean_CollectLevelParams_visitExpr___spec__2(x_2, x_10); +if (x_11 == 0) +{ +lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; uint8_t x_16; +x_12 = lean_unsigned_to_nat(1u); +x_13 = lean_nat_add(x_5, x_12); +lean_dec(x_5); +x_14 = lean_alloc_ctor(1, 3, 0); +lean_ctor_set(x_14, 0, x_2); +lean_ctor_set(x_14, 1, x_3); +lean_ctor_set(x_14, 2, x_10); +x_15 = lean_array_uset(x_6, x_9, x_14); +x_16 = lean_nat_dec_le(x_13, x_7); +lean_dec(x_7); +if (x_16 == 0) +{ +lean_object* x_17; +lean_free_object(x_1); +x_17 = l_HashMapImp_expand___at_Lean_CollectLevelParams_visitExpr___spec__4(x_13, x_15); +return x_17; +} +else +{ +lean_ctor_set(x_1, 1, x_15); +lean_ctor_set(x_1, 0, x_13); +return x_1; +} +} +else +{ +lean_object* x_18; lean_object* x_19; +lean_dec(x_7); +x_18 = l_AssocList_replace___main___at_Lean_CollectLevelParams_visitExpr___spec__7(x_2, x_3, x_10); +x_19 = lean_array_uset(x_6, x_9, x_18); +lean_ctor_set(x_1, 1, x_19); +return x_1; +} +} +else +{ +lean_object* x_20; lean_object* x_21; lean_object* x_22; size_t x_23; size_t x_24; lean_object* x_25; uint8_t x_26; +x_20 = lean_ctor_get(x_1, 0); +x_21 = lean_ctor_get(x_1, 1); +lean_inc(x_21); +lean_inc(x_20); +lean_dec(x_1); +x_22 = lean_array_get_size(x_21); +x_23 = l_Lean_Expr_hash(x_2); +x_24 = lean_usize_modn(x_23, x_22); +x_25 = lean_array_uget(x_21, x_24); +x_26 = l_AssocList_contains___main___at_Lean_CollectLevelParams_visitExpr___spec__2(x_2, x_25); +if (x_26 == 0) +{ +lean_object* x_27; lean_object* x_28; lean_object* x_29; lean_object* x_30; uint8_t x_31; +x_27 = lean_unsigned_to_nat(1u); +x_28 = lean_nat_add(x_20, x_27); +lean_dec(x_20); +x_29 = lean_alloc_ctor(1, 3, 0); +lean_ctor_set(x_29, 0, x_2); +lean_ctor_set(x_29, 1, x_3); +lean_ctor_set(x_29, 2, x_25); +x_30 = lean_array_uset(x_21, x_24, x_29); +x_31 = lean_nat_dec_le(x_28, x_22); +lean_dec(x_22); +if (x_31 == 0) +{ +lean_object* x_32; +x_32 = l_HashMapImp_expand___at_Lean_CollectLevelParams_visitExpr___spec__4(x_28, x_30); +return x_32; +} +else +{ +lean_object* x_33; +x_33 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_33, 0, x_28); +lean_ctor_set(x_33, 1, x_30); +return x_33; +} +} +else +{ +lean_object* x_34; lean_object* x_35; lean_object* x_36; +lean_dec(x_22); +x_34 = l_AssocList_replace___main___at_Lean_CollectLevelParams_visitExpr___spec__7(x_2, x_3, x_25); +x_35 = lean_array_uset(x_21, x_24, x_34); +x_36 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_36, 0, x_20); +lean_ctor_set(x_36, 1, x_35); +return x_36; +} +} +} +} +lean_object* l_Lean_CollectLevelParams_visitExpr(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +_start: +{ +uint8_t x_4; +x_4 = l_Lean_Expr_hasLevelParam(x_2); +if (x_4 == 0) +{ +lean_object* x_5; lean_object* x_6; +lean_dec(x_2); +lean_dec(x_1); +x_5 = lean_box(0); +x_6 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_6, 0, x_5); +lean_ctor_set(x_6, 1, x_3); +return x_6; +} +else +{ +lean_object* x_7; lean_object* x_8; lean_object* x_9; uint8_t x_10; +x_7 = lean_ctor_get(x_3, 0); +lean_inc(x_7); +x_8 = lean_ctor_get(x_3, 1); +lean_inc(x_8); +x_9 = lean_ctor_get(x_3, 2); +lean_inc(x_9); +x_10 = l_HashMapImp_contains___at_Lean_CollectLevelParams_visitExpr___spec__1(x_8, x_2); +if (x_10 == 0) +{ +uint8_t x_11; +x_11 = !lean_is_exclusive(x_3); +if (x_11 == 0) +{ +lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; +x_12 = lean_ctor_get(x_3, 2); +lean_dec(x_12); +x_13 = lean_ctor_get(x_3, 1); +lean_dec(x_13); +x_14 = lean_ctor_get(x_3, 0); +lean_dec(x_14); +x_15 = lean_box(0); +lean_inc(x_2); +x_16 = l_HashMapImp_insert___at_Lean_CollectLevelParams_visitExpr___spec__3(x_8, x_2, x_15); +lean_ctor_set(x_3, 1, x_16); +x_17 = lean_apply_2(x_1, x_2, x_3); +return x_17; +} +else +{ +lean_object* x_18; lean_object* x_19; lean_object* x_20; lean_object* x_21; +lean_dec(x_3); +x_18 = lean_box(0); +lean_inc(x_2); +x_19 = l_HashMapImp_insert___at_Lean_CollectLevelParams_visitExpr___spec__3(x_8, x_2, x_18); +x_20 = lean_alloc_ctor(0, 3, 0); +lean_ctor_set(x_20, 0, x_7); +lean_ctor_set(x_20, 1, x_19); +lean_ctor_set(x_20, 2, x_9); +x_21 = lean_apply_2(x_1, x_2, x_20); +return x_21; +} +} +else +{ +lean_object* x_22; lean_object* x_23; +lean_dec(x_9); +lean_dec(x_8); +lean_dec(x_7); +lean_dec(x_2); +lean_dec(x_1); +x_22 = lean_box(0); +x_23 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_23, 0, x_22); +lean_ctor_set(x_23, 1, x_3); +return x_23; +} +} +} +} +lean_object* l_AssocList_contains___main___at_Lean_CollectLevelParams_visitExpr___spec__2___boxed(lean_object* x_1, lean_object* x_2) { +_start: +{ +uint8_t x_3; lean_object* x_4; +x_3 = l_AssocList_contains___main___at_Lean_CollectLevelParams_visitExpr___spec__2(x_1, x_2); +lean_dec(x_2); +lean_dec(x_1); +x_4 = lean_box(x_3); +return x_4; +} +} +lean_object* l_HashMapImp_contains___at_Lean_CollectLevelParams_visitExpr___spec__1___boxed(lean_object* x_1, lean_object* x_2) { +_start: +{ +uint8_t x_3; lean_object* x_4; +x_3 = l_HashMapImp_contains___at_Lean_CollectLevelParams_visitExpr___spec__1(x_1, x_2); +lean_dec(x_2); +lean_dec(x_1); +x_4 = lean_box(x_3); +return x_4; +} +} +lean_object* l_List_forM___main___at_Lean_CollectLevelParams_main___main___spec__1(lean_object* x_1, lean_object* x_2) { +_start: +{ +if (lean_obj_tag(x_1) == 0) +{ +lean_object* x_3; lean_object* x_4; +x_3 = lean_box(0); +x_4 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_4, 0, x_3); +lean_ctor_set(x_4, 1, x_2); +return x_4; +} +else +{ +lean_object* x_5; lean_object* x_6; uint8_t x_7; +x_5 = lean_ctor_get(x_1, 0); +lean_inc(x_5); +x_6 = lean_ctor_get(x_1, 1); +lean_inc(x_6); +lean_dec(x_1); +x_7 = l_Lean_Level_hasParam(x_5); +if (x_7 == 0) +{ +lean_dec(x_5); +x_1 = x_6; +goto _start; +} +else +{ +lean_object* x_9; lean_object* x_10; lean_object* x_11; uint8_t x_12; +x_9 = lean_ctor_get(x_2, 0); +lean_inc(x_9); +x_10 = lean_ctor_get(x_2, 1); +lean_inc(x_10); +x_11 = lean_ctor_get(x_2, 2); +lean_inc(x_11); +x_12 = l_HashMapImp_contains___at_Lean_CollectLevelParams_visitLevel___spec__1(x_9, x_5); +if (x_12 == 0) +{ +uint8_t x_13; +x_13 = !lean_is_exclusive(x_2); +if (x_13 == 0) +{ +lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; lean_object* x_20; +x_14 = lean_ctor_get(x_2, 2); +lean_dec(x_14); +x_15 = lean_ctor_get(x_2, 1); +lean_dec(x_15); +x_16 = lean_ctor_get(x_2, 0); +lean_dec(x_16); +x_17 = lean_box(0); +lean_inc(x_5); +x_18 = l_HashMapImp_insert___at_Lean_CollectLevelParams_visitLevel___spec__3(x_9, x_5, x_17); +lean_ctor_set(x_2, 0, x_18); +x_19 = l_Lean_CollectLevelParams_collect___main(x_5, x_2); +x_20 = lean_ctor_get(x_19, 1); +lean_inc(x_20); +lean_dec(x_19); +x_1 = x_6; +x_2 = x_20; +goto _start; +} +else +{ +lean_object* x_22; lean_object* x_23; lean_object* x_24; lean_object* x_25; lean_object* x_26; +lean_dec(x_2); +x_22 = lean_box(0); +lean_inc(x_5); +x_23 = l_HashMapImp_insert___at_Lean_CollectLevelParams_visitLevel___spec__3(x_9, x_5, x_22); +x_24 = lean_alloc_ctor(0, 3, 0); +lean_ctor_set(x_24, 0, x_23); +lean_ctor_set(x_24, 1, x_10); +lean_ctor_set(x_24, 2, x_11); +x_25 = l_Lean_CollectLevelParams_collect___main(x_5, x_24); +x_26 = lean_ctor_get(x_25, 1); +lean_inc(x_26); +lean_dec(x_25); +x_1 = x_6; +x_2 = x_26; +goto _start; +} +} +else +{ +lean_dec(x_11); +lean_dec(x_10); +lean_dec(x_9); +lean_dec(x_5); +x_1 = x_6; +goto _start; +} +} +} +} +} +lean_object* l_Lean_CollectLevelParams_main___main(lean_object* x_1, lean_object* x_2) { +_start: +{ +switch (lean_obj_tag(x_1)) { +case 3: +{ +lean_object* x_3; uint8_t x_4; +x_3 = lean_ctor_get(x_1, 0); +lean_inc(x_3); +lean_dec(x_1); +x_4 = l_Lean_Level_hasParam(x_3); +if (x_4 == 0) +{ +lean_object* x_5; lean_object* x_6; +lean_dec(x_3); +x_5 = lean_box(0); +x_6 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_6, 0, x_5); +lean_ctor_set(x_6, 1, x_2); +return x_6; +} +else +{ +lean_object* x_7; lean_object* x_8; lean_object* x_9; uint8_t x_10; +x_7 = lean_ctor_get(x_2, 0); +lean_inc(x_7); +x_8 = lean_ctor_get(x_2, 1); +lean_inc(x_8); +x_9 = lean_ctor_get(x_2, 2); +lean_inc(x_9); +x_10 = l_HashMapImp_contains___at_Lean_CollectLevelParams_visitLevel___spec__1(x_7, x_3); +if (x_10 == 0) +{ +uint8_t x_11; +x_11 = !lean_is_exclusive(x_2); +if (x_11 == 0) +{ +lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; +x_12 = lean_ctor_get(x_2, 2); +lean_dec(x_12); +x_13 = lean_ctor_get(x_2, 1); +lean_dec(x_13); +x_14 = lean_ctor_get(x_2, 0); +lean_dec(x_14); +x_15 = lean_box(0); +lean_inc(x_3); +x_16 = l_HashMapImp_insert___at_Lean_CollectLevelParams_visitLevel___spec__3(x_7, x_3, x_15); +lean_ctor_set(x_2, 0, x_16); +x_17 = l_Lean_CollectLevelParams_collect___main(x_3, x_2); +return x_17; +} +else +{ +lean_object* x_18; lean_object* x_19; lean_object* x_20; lean_object* x_21; +lean_dec(x_2); +x_18 = lean_box(0); +lean_inc(x_3); +x_19 = l_HashMapImp_insert___at_Lean_CollectLevelParams_visitLevel___spec__3(x_7, x_3, x_18); +x_20 = lean_alloc_ctor(0, 3, 0); +lean_ctor_set(x_20, 0, x_19); +lean_ctor_set(x_20, 1, x_8); +lean_ctor_set(x_20, 2, x_9); +x_21 = l_Lean_CollectLevelParams_collect___main(x_3, x_20); +return x_21; +} +} +else +{ +lean_object* x_22; lean_object* x_23; +lean_dec(x_9); +lean_dec(x_8); +lean_dec(x_7); +lean_dec(x_3); +x_22 = lean_box(0); +x_23 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_23, 0, x_22); +lean_ctor_set(x_23, 1, x_2); +return x_23; +} +} +} +case 4: +{ +lean_object* x_24; lean_object* x_25; +x_24 = lean_ctor_get(x_1, 1); +lean_inc(x_24); +lean_dec(x_1); +x_25 = l_List_forM___main___at_Lean_CollectLevelParams_main___main___spec__1(x_24, x_2); +return x_25; +} +case 5: +{ +lean_object* x_26; lean_object* x_27; lean_object* x_28; uint8_t x_50; +x_26 = lean_ctor_get(x_1, 0); +lean_inc(x_26); +x_27 = lean_ctor_get(x_1, 1); +lean_inc(x_27); +lean_dec(x_1); +x_50 = l_Lean_Expr_hasLevelParam(x_26); +if (x_50 == 0) +{ +lean_dec(x_26); +x_28 = x_2; +goto block_49; +} +else +{ +lean_object* x_51; lean_object* x_52; lean_object* x_53; uint8_t x_54; +x_51 = lean_ctor_get(x_2, 0); +lean_inc(x_51); +x_52 = lean_ctor_get(x_2, 1); +lean_inc(x_52); +x_53 = lean_ctor_get(x_2, 2); +lean_inc(x_53); +x_54 = l_HashMapImp_contains___at_Lean_CollectLevelParams_visitExpr___spec__1(x_52, x_26); +if (x_54 == 0) +{ +uint8_t x_55; +x_55 = !lean_is_exclusive(x_2); +if (x_55 == 0) +{ +lean_object* x_56; lean_object* x_57; lean_object* x_58; lean_object* x_59; lean_object* x_60; lean_object* x_61; lean_object* x_62; +x_56 = lean_ctor_get(x_2, 2); +lean_dec(x_56); +x_57 = lean_ctor_get(x_2, 1); +lean_dec(x_57); +x_58 = lean_ctor_get(x_2, 0); +lean_dec(x_58); +x_59 = lean_box(0); +lean_inc(x_26); +x_60 = l_HashMapImp_insert___at_Lean_CollectLevelParams_visitExpr___spec__3(x_52, x_26, x_59); +lean_ctor_set(x_2, 1, x_60); +x_61 = l_Lean_CollectLevelParams_main___main(x_26, x_2); +x_62 = lean_ctor_get(x_61, 1); +lean_inc(x_62); +lean_dec(x_61); +x_28 = x_62; +goto block_49; +} +else +{ +lean_object* x_63; lean_object* x_64; lean_object* x_65; lean_object* x_66; lean_object* x_67; +lean_dec(x_2); +x_63 = lean_box(0); +lean_inc(x_26); +x_64 = l_HashMapImp_insert___at_Lean_CollectLevelParams_visitExpr___spec__3(x_52, x_26, x_63); +x_65 = lean_alloc_ctor(0, 3, 0); +lean_ctor_set(x_65, 0, x_51); +lean_ctor_set(x_65, 1, x_64); +lean_ctor_set(x_65, 2, x_53); +x_66 = l_Lean_CollectLevelParams_main___main(x_26, x_65); +x_67 = lean_ctor_get(x_66, 1); +lean_inc(x_67); +lean_dec(x_66); +x_28 = x_67; +goto block_49; +} +} +else +{ +lean_dec(x_53); +lean_dec(x_52); +lean_dec(x_51); +lean_dec(x_26); +x_28 = x_2; +goto block_49; +} +} +block_49: +{ +uint8_t x_29; +x_29 = l_Lean_Expr_hasLevelParam(x_27); +if (x_29 == 0) +{ +lean_object* x_30; lean_object* x_31; +lean_dec(x_27); +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_28); +return x_31; +} +else +{ +lean_object* x_32; lean_object* x_33; lean_object* x_34; uint8_t x_35; +x_32 = lean_ctor_get(x_28, 0); +lean_inc(x_32); +x_33 = lean_ctor_get(x_28, 1); +lean_inc(x_33); +x_34 = lean_ctor_get(x_28, 2); +lean_inc(x_34); +x_35 = l_HashMapImp_contains___at_Lean_CollectLevelParams_visitExpr___spec__1(x_33, x_27); +if (x_35 == 0) +{ +uint8_t x_36; +x_36 = !lean_is_exclusive(x_28); +if (x_36 == 0) +{ +lean_object* x_37; lean_object* x_38; lean_object* x_39; lean_object* x_40; lean_object* x_41; +x_37 = lean_ctor_get(x_28, 2); +lean_dec(x_37); +x_38 = lean_ctor_get(x_28, 1); +lean_dec(x_38); +x_39 = lean_ctor_get(x_28, 0); +lean_dec(x_39); +x_40 = lean_box(0); +lean_inc(x_27); +x_41 = l_HashMapImp_insert___at_Lean_CollectLevelParams_visitExpr___spec__3(x_33, x_27, x_40); +lean_ctor_set(x_28, 1, x_41); +x_1 = x_27; +x_2 = x_28; +goto _start; +} +else +{ +lean_object* x_43; lean_object* x_44; lean_object* x_45; +lean_dec(x_28); +x_43 = lean_box(0); +lean_inc(x_27); +x_44 = l_HashMapImp_insert___at_Lean_CollectLevelParams_visitExpr___spec__3(x_33, x_27, x_43); +x_45 = lean_alloc_ctor(0, 3, 0); +lean_ctor_set(x_45, 0, x_32); +lean_ctor_set(x_45, 1, x_44); +lean_ctor_set(x_45, 2, x_34); +x_1 = x_27; +x_2 = x_45; +goto _start; +} +} +else +{ +lean_object* x_47; lean_object* x_48; +lean_dec(x_34); +lean_dec(x_33); +lean_dec(x_32); +lean_dec(x_27); +x_47 = lean_box(0); +x_48 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_48, 0, x_47); +lean_ctor_set(x_48, 1, x_28); +return x_48; +} +} +} +} +case 6: +{ +lean_object* x_68; lean_object* x_69; lean_object* x_70; uint8_t x_92; +x_68 = lean_ctor_get(x_1, 1); +lean_inc(x_68); +x_69 = lean_ctor_get(x_1, 2); +lean_inc(x_69); +lean_dec(x_1); +x_92 = l_Lean_Expr_hasLevelParam(x_68); +if (x_92 == 0) +{ +lean_dec(x_68); +x_70 = x_2; +goto block_91; +} +else +{ +lean_object* x_93; lean_object* x_94; lean_object* x_95; uint8_t x_96; +x_93 = lean_ctor_get(x_2, 0); +lean_inc(x_93); +x_94 = lean_ctor_get(x_2, 1); +lean_inc(x_94); +x_95 = lean_ctor_get(x_2, 2); +lean_inc(x_95); +x_96 = l_HashMapImp_contains___at_Lean_CollectLevelParams_visitExpr___spec__1(x_94, x_68); +if (x_96 == 0) +{ +uint8_t x_97; +x_97 = !lean_is_exclusive(x_2); +if (x_97 == 0) +{ +lean_object* x_98; lean_object* x_99; lean_object* x_100; lean_object* x_101; lean_object* x_102; lean_object* x_103; lean_object* x_104; +x_98 = lean_ctor_get(x_2, 2); +lean_dec(x_98); +x_99 = lean_ctor_get(x_2, 1); +lean_dec(x_99); +x_100 = lean_ctor_get(x_2, 0); +lean_dec(x_100); +x_101 = lean_box(0); +lean_inc(x_68); +x_102 = l_HashMapImp_insert___at_Lean_CollectLevelParams_visitExpr___spec__3(x_94, x_68, x_101); +lean_ctor_set(x_2, 1, x_102); +x_103 = l_Lean_CollectLevelParams_main___main(x_68, x_2); +x_104 = lean_ctor_get(x_103, 1); +lean_inc(x_104); +lean_dec(x_103); +x_70 = x_104; +goto block_91; +} +else +{ +lean_object* x_105; lean_object* x_106; lean_object* x_107; lean_object* x_108; lean_object* x_109; +lean_dec(x_2); +x_105 = lean_box(0); +lean_inc(x_68); +x_106 = l_HashMapImp_insert___at_Lean_CollectLevelParams_visitExpr___spec__3(x_94, x_68, x_105); +x_107 = lean_alloc_ctor(0, 3, 0); +lean_ctor_set(x_107, 0, x_93); +lean_ctor_set(x_107, 1, x_106); +lean_ctor_set(x_107, 2, x_95); +x_108 = l_Lean_CollectLevelParams_main___main(x_68, x_107); +x_109 = lean_ctor_get(x_108, 1); +lean_inc(x_109); +lean_dec(x_108); +x_70 = x_109; +goto block_91; +} +} +else +{ +lean_dec(x_95); +lean_dec(x_94); +lean_dec(x_93); +lean_dec(x_68); +x_70 = x_2; +goto block_91; +} +} +block_91: +{ +uint8_t x_71; +x_71 = l_Lean_Expr_hasLevelParam(x_69); +if (x_71 == 0) +{ +lean_object* x_72; lean_object* x_73; +lean_dec(x_69); +x_72 = lean_box(0); +x_73 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_73, 0, x_72); +lean_ctor_set(x_73, 1, x_70); +return x_73; +} +else +{ +lean_object* x_74; lean_object* x_75; lean_object* x_76; uint8_t x_77; +x_74 = lean_ctor_get(x_70, 0); +lean_inc(x_74); +x_75 = lean_ctor_get(x_70, 1); +lean_inc(x_75); +x_76 = lean_ctor_get(x_70, 2); +lean_inc(x_76); +x_77 = l_HashMapImp_contains___at_Lean_CollectLevelParams_visitExpr___spec__1(x_75, x_69); +if (x_77 == 0) +{ +uint8_t x_78; +x_78 = !lean_is_exclusive(x_70); +if (x_78 == 0) +{ +lean_object* x_79; lean_object* x_80; lean_object* x_81; lean_object* x_82; lean_object* x_83; +x_79 = lean_ctor_get(x_70, 2); +lean_dec(x_79); +x_80 = lean_ctor_get(x_70, 1); +lean_dec(x_80); +x_81 = lean_ctor_get(x_70, 0); +lean_dec(x_81); +x_82 = lean_box(0); +lean_inc(x_69); +x_83 = l_HashMapImp_insert___at_Lean_CollectLevelParams_visitExpr___spec__3(x_75, x_69, x_82); +lean_ctor_set(x_70, 1, x_83); +x_1 = x_69; +x_2 = x_70; +goto _start; +} +else +{ +lean_object* x_85; lean_object* x_86; lean_object* x_87; +lean_dec(x_70); +x_85 = lean_box(0); +lean_inc(x_69); +x_86 = l_HashMapImp_insert___at_Lean_CollectLevelParams_visitExpr___spec__3(x_75, x_69, x_85); +x_87 = lean_alloc_ctor(0, 3, 0); +lean_ctor_set(x_87, 0, x_74); +lean_ctor_set(x_87, 1, x_86); +lean_ctor_set(x_87, 2, x_76); +x_1 = x_69; +x_2 = x_87; +goto _start; +} +} +else +{ +lean_object* x_89; lean_object* x_90; +lean_dec(x_76); +lean_dec(x_75); +lean_dec(x_74); +lean_dec(x_69); +x_89 = lean_box(0); +x_90 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_90, 0, x_89); +lean_ctor_set(x_90, 1, x_70); +return x_90; +} +} +} +} +case 7: +{ +lean_object* x_110; lean_object* x_111; lean_object* x_112; uint8_t x_134; +x_110 = lean_ctor_get(x_1, 1); +lean_inc(x_110); +x_111 = lean_ctor_get(x_1, 2); +lean_inc(x_111); +lean_dec(x_1); +x_134 = l_Lean_Expr_hasLevelParam(x_110); +if (x_134 == 0) +{ +lean_dec(x_110); +x_112 = x_2; +goto block_133; +} +else +{ +lean_object* x_135; lean_object* x_136; lean_object* x_137; uint8_t x_138; +x_135 = lean_ctor_get(x_2, 0); +lean_inc(x_135); +x_136 = lean_ctor_get(x_2, 1); +lean_inc(x_136); +x_137 = lean_ctor_get(x_2, 2); +lean_inc(x_137); +x_138 = l_HashMapImp_contains___at_Lean_CollectLevelParams_visitExpr___spec__1(x_136, x_110); +if (x_138 == 0) +{ +uint8_t x_139; +x_139 = !lean_is_exclusive(x_2); +if (x_139 == 0) +{ +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; +x_140 = lean_ctor_get(x_2, 2); +lean_dec(x_140); +x_141 = lean_ctor_get(x_2, 1); +lean_dec(x_141); +x_142 = lean_ctor_get(x_2, 0); +lean_dec(x_142); +x_143 = lean_box(0); +lean_inc(x_110); +x_144 = l_HashMapImp_insert___at_Lean_CollectLevelParams_visitExpr___spec__3(x_136, x_110, x_143); +lean_ctor_set(x_2, 1, x_144); +x_145 = l_Lean_CollectLevelParams_main___main(x_110, x_2); +x_146 = lean_ctor_get(x_145, 1); +lean_inc(x_146); +lean_dec(x_145); +x_112 = x_146; +goto block_133; +} +else +{ +lean_object* x_147; lean_object* x_148; lean_object* x_149; lean_object* x_150; lean_object* x_151; +lean_dec(x_2); +x_147 = lean_box(0); +lean_inc(x_110); +x_148 = l_HashMapImp_insert___at_Lean_CollectLevelParams_visitExpr___spec__3(x_136, x_110, x_147); +x_149 = lean_alloc_ctor(0, 3, 0); +lean_ctor_set(x_149, 0, x_135); +lean_ctor_set(x_149, 1, x_148); +lean_ctor_set(x_149, 2, x_137); +x_150 = l_Lean_CollectLevelParams_main___main(x_110, x_149); +x_151 = lean_ctor_get(x_150, 1); +lean_inc(x_151); +lean_dec(x_150); +x_112 = x_151; +goto block_133; +} +} +else +{ +lean_dec(x_137); +lean_dec(x_136); +lean_dec(x_135); +lean_dec(x_110); +x_112 = x_2; +goto block_133; +} +} +block_133: +{ +uint8_t x_113; +x_113 = l_Lean_Expr_hasLevelParam(x_111); +if (x_113 == 0) +{ +lean_object* x_114; lean_object* x_115; +lean_dec(x_111); +x_114 = lean_box(0); +x_115 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_115, 0, x_114); +lean_ctor_set(x_115, 1, x_112); +return x_115; +} +else +{ +lean_object* x_116; lean_object* x_117; lean_object* x_118; uint8_t x_119; +x_116 = lean_ctor_get(x_112, 0); +lean_inc(x_116); +x_117 = lean_ctor_get(x_112, 1); +lean_inc(x_117); +x_118 = lean_ctor_get(x_112, 2); +lean_inc(x_118); +x_119 = l_HashMapImp_contains___at_Lean_CollectLevelParams_visitExpr___spec__1(x_117, x_111); +if (x_119 == 0) +{ +uint8_t x_120; +x_120 = !lean_is_exclusive(x_112); +if (x_120 == 0) +{ +lean_object* x_121; lean_object* x_122; lean_object* x_123; lean_object* x_124; lean_object* x_125; +x_121 = lean_ctor_get(x_112, 2); +lean_dec(x_121); +x_122 = lean_ctor_get(x_112, 1); +lean_dec(x_122); +x_123 = lean_ctor_get(x_112, 0); +lean_dec(x_123); +x_124 = lean_box(0); +lean_inc(x_111); +x_125 = l_HashMapImp_insert___at_Lean_CollectLevelParams_visitExpr___spec__3(x_117, x_111, x_124); +lean_ctor_set(x_112, 1, x_125); +x_1 = x_111; +x_2 = x_112; +goto _start; +} +else +{ +lean_object* x_127; lean_object* x_128; lean_object* x_129; +lean_dec(x_112); +x_127 = lean_box(0); +lean_inc(x_111); +x_128 = l_HashMapImp_insert___at_Lean_CollectLevelParams_visitExpr___spec__3(x_117, x_111, x_127); +x_129 = lean_alloc_ctor(0, 3, 0); +lean_ctor_set(x_129, 0, x_116); +lean_ctor_set(x_129, 1, x_128); +lean_ctor_set(x_129, 2, x_118); +x_1 = x_111; +x_2 = x_129; +goto _start; +} +} +else +{ +lean_object* x_131; lean_object* x_132; +lean_dec(x_118); +lean_dec(x_117); +lean_dec(x_116); +lean_dec(x_111); +x_131 = lean_box(0); +x_132 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_132, 0, x_131); +lean_ctor_set(x_132, 1, x_112); +return x_132; +} +} +} +} +case 8: +{ +lean_object* x_152; lean_object* x_153; lean_object* x_154; lean_object* x_155; lean_object* x_177; uint8_t x_197; +x_152 = lean_ctor_get(x_1, 1); +lean_inc(x_152); +x_153 = lean_ctor_get(x_1, 2); +lean_inc(x_153); +x_154 = lean_ctor_get(x_1, 3); +lean_inc(x_154); +lean_dec(x_1); +x_197 = l_Lean_Expr_hasLevelParam(x_152); +if (x_197 == 0) +{ +lean_dec(x_152); +x_177 = x_2; +goto block_196; +} +else +{ +lean_object* x_198; lean_object* x_199; lean_object* x_200; uint8_t x_201; +x_198 = lean_ctor_get(x_2, 0); +lean_inc(x_198); +x_199 = lean_ctor_get(x_2, 1); +lean_inc(x_199); +x_200 = lean_ctor_get(x_2, 2); +lean_inc(x_200); +x_201 = l_HashMapImp_contains___at_Lean_CollectLevelParams_visitExpr___spec__1(x_199, x_152); +if (x_201 == 0) +{ +uint8_t x_202; +x_202 = !lean_is_exclusive(x_2); +if (x_202 == 0) +{ +lean_object* x_203; lean_object* x_204; lean_object* x_205; lean_object* x_206; lean_object* x_207; lean_object* x_208; lean_object* x_209; +x_203 = lean_ctor_get(x_2, 2); +lean_dec(x_203); +x_204 = lean_ctor_get(x_2, 1); +lean_dec(x_204); +x_205 = lean_ctor_get(x_2, 0); +lean_dec(x_205); +x_206 = lean_box(0); +lean_inc(x_152); +x_207 = l_HashMapImp_insert___at_Lean_CollectLevelParams_visitExpr___spec__3(x_199, x_152, x_206); +lean_ctor_set(x_2, 1, x_207); +x_208 = l_Lean_CollectLevelParams_main___main(x_152, x_2); +x_209 = lean_ctor_get(x_208, 1); +lean_inc(x_209); +lean_dec(x_208); +x_177 = x_209; +goto block_196; +} +else +{ +lean_object* x_210; lean_object* x_211; lean_object* x_212; lean_object* x_213; lean_object* x_214; +lean_dec(x_2); +x_210 = lean_box(0); +lean_inc(x_152); +x_211 = l_HashMapImp_insert___at_Lean_CollectLevelParams_visitExpr___spec__3(x_199, x_152, x_210); +x_212 = lean_alloc_ctor(0, 3, 0); +lean_ctor_set(x_212, 0, x_198); +lean_ctor_set(x_212, 1, x_211); +lean_ctor_set(x_212, 2, x_200); +x_213 = l_Lean_CollectLevelParams_main___main(x_152, x_212); +x_214 = lean_ctor_get(x_213, 1); +lean_inc(x_214); +lean_dec(x_213); +x_177 = x_214; +goto block_196; +} +} +else +{ +lean_dec(x_200); +lean_dec(x_199); +lean_dec(x_198); +lean_dec(x_152); +x_177 = x_2; +goto block_196; +} +} +block_176: +{ +uint8_t x_156; +x_156 = l_Lean_Expr_hasLevelParam(x_154); +if (x_156 == 0) +{ +lean_object* x_157; lean_object* x_158; +lean_dec(x_154); +x_157 = lean_box(0); +x_158 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_158, 0, x_157); +lean_ctor_set(x_158, 1, x_155); +return x_158; +} +else +{ +lean_object* x_159; lean_object* x_160; lean_object* x_161; uint8_t x_162; +x_159 = lean_ctor_get(x_155, 0); +lean_inc(x_159); +x_160 = lean_ctor_get(x_155, 1); +lean_inc(x_160); +x_161 = lean_ctor_get(x_155, 2); +lean_inc(x_161); +x_162 = l_HashMapImp_contains___at_Lean_CollectLevelParams_visitExpr___spec__1(x_160, x_154); +if (x_162 == 0) +{ +uint8_t x_163; +x_163 = !lean_is_exclusive(x_155); +if (x_163 == 0) +{ +lean_object* x_164; lean_object* x_165; lean_object* x_166; lean_object* x_167; lean_object* x_168; +x_164 = lean_ctor_get(x_155, 2); +lean_dec(x_164); +x_165 = lean_ctor_get(x_155, 1); +lean_dec(x_165); +x_166 = lean_ctor_get(x_155, 0); +lean_dec(x_166); +x_167 = lean_box(0); +lean_inc(x_154); +x_168 = l_HashMapImp_insert___at_Lean_CollectLevelParams_visitExpr___spec__3(x_160, x_154, x_167); +lean_ctor_set(x_155, 1, x_168); +x_1 = x_154; +x_2 = x_155; +goto _start; +} +else +{ +lean_object* x_170; lean_object* x_171; lean_object* x_172; +lean_dec(x_155); +x_170 = lean_box(0); +lean_inc(x_154); +x_171 = l_HashMapImp_insert___at_Lean_CollectLevelParams_visitExpr___spec__3(x_160, x_154, x_170); +x_172 = lean_alloc_ctor(0, 3, 0); +lean_ctor_set(x_172, 0, x_159); +lean_ctor_set(x_172, 1, x_171); +lean_ctor_set(x_172, 2, x_161); +x_1 = x_154; +x_2 = x_172; +goto _start; +} +} +else +{ +lean_object* x_174; lean_object* x_175; +lean_dec(x_161); +lean_dec(x_160); +lean_dec(x_159); +lean_dec(x_154); +x_174 = lean_box(0); +x_175 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_175, 0, x_174); +lean_ctor_set(x_175, 1, x_155); +return x_175; +} +} +} +block_196: +{ +uint8_t x_178; +x_178 = l_Lean_Expr_hasLevelParam(x_153); +if (x_178 == 0) +{ +lean_dec(x_153); +x_155 = x_177; +goto block_176; +} +else +{ +lean_object* x_179; lean_object* x_180; lean_object* x_181; uint8_t x_182; +x_179 = lean_ctor_get(x_177, 0); +lean_inc(x_179); +x_180 = lean_ctor_get(x_177, 1); +lean_inc(x_180); +x_181 = lean_ctor_get(x_177, 2); +lean_inc(x_181); +x_182 = l_HashMapImp_contains___at_Lean_CollectLevelParams_visitExpr___spec__1(x_180, x_153); +if (x_182 == 0) +{ +uint8_t x_183; +x_183 = !lean_is_exclusive(x_177); +if (x_183 == 0) +{ +lean_object* x_184; lean_object* x_185; lean_object* x_186; lean_object* x_187; lean_object* x_188; lean_object* x_189; lean_object* x_190; +x_184 = lean_ctor_get(x_177, 2); +lean_dec(x_184); +x_185 = lean_ctor_get(x_177, 1); +lean_dec(x_185); +x_186 = lean_ctor_get(x_177, 0); +lean_dec(x_186); +x_187 = lean_box(0); +lean_inc(x_153); +x_188 = l_HashMapImp_insert___at_Lean_CollectLevelParams_visitExpr___spec__3(x_180, x_153, x_187); +lean_ctor_set(x_177, 1, x_188); +x_189 = l_Lean_CollectLevelParams_main___main(x_153, x_177); +x_190 = lean_ctor_get(x_189, 1); +lean_inc(x_190); +lean_dec(x_189); +x_155 = x_190; +goto block_176; +} +else +{ +lean_object* x_191; lean_object* x_192; lean_object* x_193; lean_object* x_194; lean_object* x_195; +lean_dec(x_177); +x_191 = lean_box(0); +lean_inc(x_153); +x_192 = l_HashMapImp_insert___at_Lean_CollectLevelParams_visitExpr___spec__3(x_180, x_153, x_191); +x_193 = lean_alloc_ctor(0, 3, 0); +lean_ctor_set(x_193, 0, x_179); +lean_ctor_set(x_193, 1, x_192); +lean_ctor_set(x_193, 2, x_181); +x_194 = l_Lean_CollectLevelParams_main___main(x_153, x_193); +x_195 = lean_ctor_get(x_194, 1); +lean_inc(x_195); +lean_dec(x_194); +x_155 = x_195; +goto block_176; +} +} +else +{ +lean_dec(x_181); +lean_dec(x_180); +lean_dec(x_179); +lean_dec(x_153); +x_155 = x_177; +goto block_176; +} +} +} +} +case 10: +{ +lean_object* x_215; uint8_t x_216; +x_215 = lean_ctor_get(x_1, 1); +lean_inc(x_215); +lean_dec(x_1); +x_216 = l_Lean_Expr_hasLevelParam(x_215); +if (x_216 == 0) +{ +lean_object* x_217; lean_object* x_218; +lean_dec(x_215); +x_217 = lean_box(0); +x_218 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_218, 0, x_217); +lean_ctor_set(x_218, 1, x_2); +return x_218; +} +else +{ +lean_object* x_219; lean_object* x_220; lean_object* x_221; uint8_t x_222; +x_219 = lean_ctor_get(x_2, 0); +lean_inc(x_219); +x_220 = lean_ctor_get(x_2, 1); +lean_inc(x_220); +x_221 = lean_ctor_get(x_2, 2); +lean_inc(x_221); +x_222 = l_HashMapImp_contains___at_Lean_CollectLevelParams_visitExpr___spec__1(x_220, x_215); +if (x_222 == 0) +{ +uint8_t x_223; +x_223 = !lean_is_exclusive(x_2); +if (x_223 == 0) +{ +lean_object* x_224; lean_object* x_225; lean_object* x_226; lean_object* x_227; lean_object* x_228; +x_224 = lean_ctor_get(x_2, 2); +lean_dec(x_224); +x_225 = lean_ctor_get(x_2, 1); +lean_dec(x_225); +x_226 = lean_ctor_get(x_2, 0); +lean_dec(x_226); +x_227 = lean_box(0); +lean_inc(x_215); +x_228 = l_HashMapImp_insert___at_Lean_CollectLevelParams_visitExpr___spec__3(x_220, x_215, x_227); +lean_ctor_set(x_2, 1, x_228); +x_1 = x_215; +goto _start; +} +else +{ +lean_object* x_230; lean_object* x_231; lean_object* x_232; +lean_dec(x_2); +x_230 = lean_box(0); +lean_inc(x_215); +x_231 = l_HashMapImp_insert___at_Lean_CollectLevelParams_visitExpr___spec__3(x_220, x_215, x_230); +x_232 = lean_alloc_ctor(0, 3, 0); +lean_ctor_set(x_232, 0, x_219); +lean_ctor_set(x_232, 1, x_231); +lean_ctor_set(x_232, 2, x_221); +x_1 = x_215; +x_2 = x_232; +goto _start; +} +} +else +{ +lean_object* x_234; lean_object* x_235; +lean_dec(x_221); +lean_dec(x_220); +lean_dec(x_219); +lean_dec(x_215); +x_234 = lean_box(0); +x_235 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_235, 0, x_234); +lean_ctor_set(x_235, 1, x_2); +return x_235; +} +} +} +case 11: +{ +lean_object* x_236; uint8_t x_237; +x_236 = lean_ctor_get(x_1, 2); +lean_inc(x_236); +lean_dec(x_1); +x_237 = l_Lean_Expr_hasLevelParam(x_236); +if (x_237 == 0) +{ +lean_object* x_238; lean_object* x_239; +lean_dec(x_236); +x_238 = lean_box(0); +x_239 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_239, 0, x_238); +lean_ctor_set(x_239, 1, x_2); +return x_239; +} +else +{ +lean_object* x_240; lean_object* x_241; lean_object* x_242; uint8_t x_243; +x_240 = lean_ctor_get(x_2, 0); +lean_inc(x_240); +x_241 = lean_ctor_get(x_2, 1); +lean_inc(x_241); +x_242 = lean_ctor_get(x_2, 2); +lean_inc(x_242); +x_243 = l_HashMapImp_contains___at_Lean_CollectLevelParams_visitExpr___spec__1(x_241, x_236); +if (x_243 == 0) +{ +uint8_t x_244; +x_244 = !lean_is_exclusive(x_2); +if (x_244 == 0) +{ +lean_object* x_245; lean_object* x_246; lean_object* x_247; lean_object* x_248; lean_object* x_249; +x_245 = lean_ctor_get(x_2, 2); +lean_dec(x_245); +x_246 = lean_ctor_get(x_2, 1); +lean_dec(x_246); +x_247 = lean_ctor_get(x_2, 0); +lean_dec(x_247); +x_248 = lean_box(0); +lean_inc(x_236); +x_249 = l_HashMapImp_insert___at_Lean_CollectLevelParams_visitExpr___spec__3(x_241, x_236, x_248); +lean_ctor_set(x_2, 1, x_249); +x_1 = x_236; +goto _start; +} +else +{ +lean_object* x_251; lean_object* x_252; lean_object* x_253; +lean_dec(x_2); +x_251 = lean_box(0); +lean_inc(x_236); +x_252 = l_HashMapImp_insert___at_Lean_CollectLevelParams_visitExpr___spec__3(x_241, x_236, x_251); +x_253 = lean_alloc_ctor(0, 3, 0); +lean_ctor_set(x_253, 0, x_240); +lean_ctor_set(x_253, 1, x_252); +lean_ctor_set(x_253, 2, x_242); +x_1 = x_236; +x_2 = x_253; +goto _start; +} +} +else +{ +lean_object* x_255; lean_object* x_256; +lean_dec(x_242); +lean_dec(x_241); +lean_dec(x_240); +lean_dec(x_236); +x_255 = lean_box(0); +x_256 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_256, 0, x_255); +lean_ctor_set(x_256, 1, x_2); +return x_256; +} +} +} +default: +{ +lean_object* x_257; lean_object* x_258; +lean_dec(x_1); +x_257 = lean_box(0); +x_258 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_258, 0, x_257); +lean_ctor_set(x_258, 1, x_2); +return x_258; +} +} +} +} +lean_object* l_Lean_CollectLevelParams_main(lean_object* x_1, lean_object* x_2) { +_start: +{ +lean_object* x_3; +x_3 = l_Lean_CollectLevelParams_main___main(x_1, x_2); +return x_3; +} +} +lean_object* l_mkHashMap___at_Lean_collectLevelParams___spec__2(lean_object* x_1) { +_start: +{ +lean_object* x_2; +x_2 = l_mkHashMapImp___rarg(x_1); +return x_2; +} +} +lean_object* l_mkHashSet___at_Lean_collectLevelParams___spec__1(lean_object* x_1) { +_start: +{ +lean_object* x_2; +x_2 = l_mkHashMapImp___rarg(x_1); +return x_2; +} +} +lean_object* l_mkHashMap___at_Lean_collectLevelParams___spec__4(lean_object* x_1) { +_start: +{ +lean_object* x_2; +x_2 = l_mkHashMapImp___rarg(x_1); +return x_2; +} +} +lean_object* l_mkHashSet___at_Lean_collectLevelParams___spec__3(lean_object* x_1) { +_start: +{ +lean_object* x_2; +x_2 = l_mkHashMapImp___rarg(x_1); +return x_2; +} +} +lean_object* _init_l_Lean_collectLevelParams___closed__1() { +_start: +{ +lean_object* x_1; lean_object* x_2; +x_1 = lean_unsigned_to_nat(8u); +x_2 = l_mkHashMapImp___rarg(x_1); +return x_2; +} +} +lean_object* _init_l_Lean_collectLevelParams___closed__2() { +_start: +{ +lean_object* x_1; lean_object* x_2; +x_1 = lean_unsigned_to_nat(8u); +x_2 = l_mkHashMapImp___rarg(x_1); +return x_2; +} +} +lean_object* _init_l_Lean_collectLevelParams___closed__3() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4; +x_1 = l_Lean_collectLevelParams___closed__1; +x_2 = l_Lean_collectLevelParams___closed__2; +x_3 = l_Array_empty___closed__1; +x_4 = lean_alloc_ctor(0, 3, 0); +lean_ctor_set(x_4, 0, x_1); +lean_ctor_set(x_4, 1, x_2); +lean_ctor_set(x_4, 2, x_3); +return x_4; +} +} +lean_object* l_Lean_collectLevelParams(lean_object* x_1) { +_start: +{ +lean_object* x_2; lean_object* x_3; lean_object* x_4; lean_object* x_5; +x_2 = l_Lean_collectLevelParams___closed__3; +x_3 = l_Lean_CollectLevelParams_main___main(x_1, x_2); +x_4 = lean_ctor_get(x_3, 1); +lean_inc(x_4); +lean_dec(x_3); +x_5 = lean_ctor_get(x_4, 2); +lean_inc(x_5); +lean_dec(x_4); +return x_5; +} +} +lean_object* initialize_Init_Lean_Expr(lean_object*); +static bool _G_initialized = false; +lean_object* initialize_Init_Lean_Util_CollectLevelParams(lean_object* w) { +lean_object * res; +if (_G_initialized) return lean_mk_io_result(lean_box(0)); +_G_initialized = true; +res = initialize_Init_Lean_Expr(lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +l_Lean_collectLevelParams___closed__1 = _init_l_Lean_collectLevelParams___closed__1(); +lean_mark_persistent(l_Lean_collectLevelParams___closed__1); +l_Lean_collectLevelParams___closed__2 = _init_l_Lean_collectLevelParams___closed__2(); +lean_mark_persistent(l_Lean_collectLevelParams___closed__2); +l_Lean_collectLevelParams___closed__3 = _init_l_Lean_collectLevelParams___closed__3(); +lean_mark_persistent(l_Lean_collectLevelParams___closed__3); +return lean_mk_io_result(lean_box(0)); +} +#ifdef __cplusplus +} +#endif