From 3f4d0d78b2ce3ef541cb643bbe21496bd6b057ac Mon Sep 17 00:00:00 2001 From: Leonardo de Moura Date: Mon, 9 Mar 2020 15:41:36 -0700 Subject: [PATCH] chore: update stage0 --- stage0/src/Init/Lean/Elab/Binders.lean | 46 +- .../src/Init/Lean/Elab/BuiltinNotation.lean | 10 +- .../src/Init/Lean/Elab/Tactic/Induction.lean | 61 +- .../src/Init/Lean/Elab/Tactic/Injection.lean | 8 +- stage0/src/Init/Lean/Meta/Tactic/Cases.lean | 15 +- .../src/Init/Lean/Meta/Tactic/Injection.lean | 52 +- stage0/src/Init/Lean/Meta/Tactic/Subst.lean | 3 +- stage0/src/Init/Lean/MetavarContext.lean | 2 +- stage0/stdlib/Init/Lean/Elab/Binders.c | 1266 +++++- .../stdlib/Init/Lean/Elab/BuiltinNotation.c | 899 ++--- .../stdlib/Init/Lean/Elab/Tactic/Induction.c | 3515 ++++++++++------- .../stdlib/Init/Lean/Elab/Tactic/Injection.c | 365 +- stage0/stdlib/Init/Lean/Meta/Tactic/Cases.c | 2070 +++++----- .../stdlib/Init/Lean/Meta/Tactic/Injection.c | 1250 +++++- stage0/stdlib/Init/Lean/Meta/Tactic/Subst.c | 673 ++-- stage0/stdlib/Init/Lean/MetavarContext.c | 2 +- 16 files changed, 6521 insertions(+), 3716 deletions(-) diff --git a/stage0/src/Init/Lean/Elab/Binders.lean b/stage0/src/Init/Lean/Elab/Binders.lean index 219a605723..a402407d7d 100644 --- a/stage0/src/Init/Lean/Elab/Binders.lean +++ b/stage0/src/Init/Lean/Elab/Binders.lean @@ -417,8 +417,10 @@ if optType.isNone then else (optType.getArg 0).getArg 1 +/- If `useLetExpr` is true, then a kernel let-expression `let x : type := val; body` is created. + Otherwise, we create a term of the form `(fun (x : type) => body) val` -/ def elabLetDeclAux (ref : Syntax) (n : Name) (binders : Array Syntax) (typeStx : Syntax) (valStx : Syntax) (body : Syntax) - (expectedType? : Option Expr) : TermElabM Expr := do + (expectedType? : Option Expr) (useLetExpr : Bool) : TermElabM Expr := do (type, val) ← elabBinders binders $ fun xs => do { type ← elabType typeStx; val ← elabTerm valStx type; @@ -428,25 +430,25 @@ def elabLetDeclAux (ref : Syntax) (n : Name) (binders : Array Syntax) (typeStx : pure (type, val) }; trace `Elab.let.decl ref $ fun _ => n ++ " : " ++ type ++ " := " ++ val; -withLetDecl ref n type val $ fun x => do - body ← elabTerm body expectedType?; - body ← instantiateMVars ref body; - mkLet ref x body - -def elabLetIdDecl (ref : Syntax) (decl body : Syntax) (expectedType? : Option Expr) : TermElabM Expr := --- `decl` is of the form: ident bracktedBinder+ (`:` term)? `:=` term -let n := decl.getIdAt 0; -let binders := (decl.getArg 1).getArgs; -let type := expandOptType ref (decl.getArg 2); -let val := decl.getArg 4; -elabLetDeclAux ref n binders type val body expectedType? +if useLetExpr then + withLetDecl ref n type val $ fun x => do + body ← elabTerm body expectedType?; + body ← instantiateMVars ref body; + mkLet ref x body +else do + f ← withLocalDecl ref n BinderInfo.default type $ fun x => do { + body ← elabTerm body expectedType?; + body ← instantiateMVars ref body; + mkLambda ref #[x] body + }; + pure $ mkApp f val @[builtinTermElab «let»] def elabLetDecl : TermElab := fun stx expectedType? => match_syntax stx with | `(let $id:ident $args* := $val; $body) => - elabLetDeclAux stx id.getId args (mkHole stx) val body expectedType? + elabLetDeclAux stx id.getId args (mkHole stx) val body expectedType? true | `(let $id:ident $args* : $type := $val; $body) => - elabLetDeclAux stx id.getId args type val body expectedType? + elabLetDeclAux stx id.getId args type val body expectedType? true | `(let $pat:term := $val; $body) => do stxNew ← `(let x := $val; match x with $pat => $body); withMacroExpansion stx stxNew $ elabTerm stxNew expectedType? @@ -455,6 +457,20 @@ fun stx expectedType? => match_syntax stx with withMacroExpansion stx stxNew $ elabTerm stxNew expectedType? | _ => throwUnsupportedSyntax +@[builtinTermElab «let!»] def elabLetBangDecl : TermElab := +fun stx expectedType? => match_syntax stx with +| `(let! $id:ident $args* := $val; $body) => + elabLetDeclAux stx id.getId args (mkHole stx) val body expectedType? false +| `(let! $id:ident $args* : $type := $val; $body) => + elabLetDeclAux stx id.getId args type val body expectedType? false +| `(let! $pat:term := $val; $body) => do + stxNew ← `(let! x := $val; match x with $pat => $body); + withMacroExpansion stx stxNew $ elabTerm stxNew expectedType? +| `(let! $pat:term : $type := $val; $body) => do + stxNew ← `(let! x : $type := $val; match x with $pat => $body); + withMacroExpansion stx stxNew $ elabTerm stxNew expectedType? +| _ => throwUnsupportedSyntax + @[init] private def regTraceClasses : IO Unit := do registerTraceClass `Elab.let; pure () diff --git a/stage0/src/Init/Lean/Elab/BuiltinNotation.lean b/stage0/src/Init/Lean/Elab/BuiltinNotation.lean index 2179e2e9db..1a46130d30 100644 --- a/stage0/src/Init/Lean/Elab/BuiltinNotation.lean +++ b/stage0/src/Init/Lean/Elab/BuiltinNotation.lean @@ -60,15 +60,15 @@ fun stx expectedType? => match_syntax stx with @[builtinMacro Lean.Parser.Term.show] def expandShow : Macro := fun stx => match_syntax stx with -| `(show $type from $val) => let thisId := mkTermIdFrom stx `this; `((fun ($thisId : $type) => $thisId) $val) +| `(show $type from $val) => let thisId := mkIdentFrom stx `this; `(let! $thisId : $type := $val; $thisId) | _ => Macro.throwUnsupported @[builtinMacro Lean.Parser.Term.have] def expandHave : Macro := fun stx => match_syntax stx with -| `(have $type from $val; $body) => let thisId := mkTermIdFrom stx `this; `((fun ($thisId : $type) => $body) $val) -| `(have $type := $val; $body) => let thisId := mkTermIdFrom stx `this; `((fun ($thisId : $type) => $body) $val) -| `(have $x : $type from $val; $body) => `((fun ($x:ident : $type) => $body) $val) -| `(have $x : $type := $val; $body) => `((fun ($x:ident : $type) => $body) $val) +| `(have $type from $val; $body) => let thisId := mkIdentFrom stx `this; `(let! $thisId : $type := $val; $body) +| `(have $type := $val; $body) => let thisId := mkIdentFrom stx `this; `(let! $thisId : $type := $val; $body) +| `(have $x : $type from $val; $body) => `(let! $x:ident : $type := $val; $body) +| `(have $x : $type := $val; $body) => `(let! $x:ident : $type := $val; $body) | _ => Macro.throwUnsupported @[builtinMacro Lean.Parser.Term.where] def expandWhere : Macro := diff --git a/stage0/src/Init/Lean/Elab/Tactic/Induction.lean b/stage0/src/Init/Lean/Elab/Tactic/Induction.lean index 756361f8dd..5e9b3dfb41 100644 --- a/stage0/src/Init/Lean/Elab/Tactic/Induction.lean +++ b/stage0/src/Init/Lean/Elab/Tactic/Induction.lean @@ -151,10 +151,10 @@ match recInfo? with | _ => throwError ref ("invalid recursor name '" ++ baseRecName ++ "'") /- Create `RecInfo` assuming builtin recursor -/ -private def getRecInfoDefault (ref : Syntax) (major : Expr) (withAlts : Syntax) : TacticM RecInfo := do +private def getRecInfoDefault (ref : Syntax) (major : Expr) (withAlts : Syntax) (allowMissingAlts : Bool) : TacticM (RecInfo × Array Name) := do indVal ← getInductiveValFromMajor ref major; let recName := mkRecFor indVal.name; -if withAlts.isNone then pure { recName := recName } +if withAlts.isNone then pure ({ recName := recName }, #[]) else do let ctorNames := indVal.ctors; let alts := getAlts withAlts; @@ -173,11 +173,15 @@ else do | none => match prevAnonymousAlt? with | some alt => pure (altVars.push (getAltVarNames alt).toList, altRHSs.push (getAltRHS alt), remainingAlts, prevAnonymousAlt?) - | none => throwError ref ("alternative for constructor '" ++ toString ctorName ++ "' is missing")) + | none => + if allowMissingAlts then + pure (altVars.push [], altRHSs.push Syntax.missing, remainingAlts, prevAnonymousAlt?) + else + throwError ref ("alternative for constructor '" ++ toString ctorName ++ "' is missing")) (#[], #[], alts, none); unless remainingAlts.isEmpty $ throwError (remainingAlts.get! 0) "unused alternative"; - pure { recName := recName, altVars := altVars, altRHSs := altRHSs } + pure ({ recName := recName, altVars := altVars, altRHSs := altRHSs }, ctorNames.toArray) /- Recall that @@ -192,7 +196,8 @@ let ref := stx; let usingRecStx := stx.getArg 2; let withAlts := stx.getArg 4; if usingRecStx.isNone then do - getRecInfoDefault ref major withAlts + (rinfo, _) ← getRecInfoDefault ref major withAlts false; + pure rinfo else do let baseRecName := (usingRecStx.getIdAt 1).eraseMacroScopes; recInfo ← getRecFromUsing ref major baseRecName; @@ -225,16 +230,16 @@ else do throwError (remainingAlts.get! 0) "unused alternative"; pure { recName := recName, altVars := altVars, altRHSs := altRHSs } -private def processResult (ref : Syntax) (recInfo : RecInfo) (result : Array Meta.InductionSubgoal) : TacticM Unit := do -if recInfo.altRHSs.isEmpty then +private def processResult (ref : Syntax) (altRHSs : Array Syntax) (result : Array Meta.InductionSubgoal) : TacticM Unit := do +if altRHSs.isEmpty then setGoals $ result.toList.map $ fun s => s.mvarId else do - unless (recInfo.altRHSs.size == result.size) $ + unless (altRHSs.size == result.size) $ throwError ref ("mistmatch on the number of subgoals produced (" ++ toString result.size ++ ") and " ++ - "alternatives provided (" ++ toString recInfo.altRHSs.size ++ ")"); + "alternatives provided (" ++ toString altRHSs.size ++ ")"); result.size.forM $ fun i => do let subgoal := result.get! i; - let rhs := recInfo.altRHSs.get! i; + let rhs := altRHSs.get! i; let mvarId := subgoal.mvarId; withMVarContext mvarId $ do mvarDecl ← getMVarDecl mvarId; @@ -254,7 +259,33 @@ fun stx => focusAux stx $ do recInfo ← getRecInfo stx major; (mvarId, _) ← getMainGoal stx; result ← liftMetaM stx $ Meta.induction mvarId major.fvarId! recInfo.recName recInfo.altVars; - processResult stx recInfo result + processResult stx recInfo.altRHSs result + +private partial def checkCasesResultAux (ref : Syntax) (casesResult : Array Meta.CasesSubgoal) (ctorNames : Array Name) (altRHSs : Array Syntax) + : Nat → Nat → TacticM Unit +| i, j => + if h : j < altRHSs.size then do + let altRHS := altRHSs.get ⟨j, h⟩; + if altRHS.isMissing then + checkCasesResultAux i (j+1) + else + let ctorName := ctorNames.get! j; + if h : i < casesResult.size then + let subgoal := casesResult.get ⟨i, h⟩; + if ctorName == subgoal.ctorName then + checkCasesResultAux (i+1) (j+1) + else + throwError ref ("alternative for '" ++ subgoal.ctorName ++ "' has not been provided") + else + throwError ref ("alternative for '" ++ ctorName ++ "' is not needed") + else if h : i < casesResult.size then + let subgoal := casesResult.get ⟨i, h⟩; + throwError ref ("alternative for '" ++ subgoal.ctorName ++ "' has not been provided") + else + pure () + +private def checkCasesResult (ref : Syntax) (casesResult : Array Meta.CasesSubgoal) (ctorNames : Array Name) (altRHSs : Array Syntax) : TacticM Unit := +unless altRHSs.isEmpty $ checkCasesResultAux ref casesResult ctorNames altRHSs 0 0 @[builtinTactic «cases»] def evalCases : Tactic := fun stx => focusAux stx $ do @@ -264,10 +295,12 @@ fun stx => focusAux stx $ do major ← generalizeMajor stx major; (mvarId, _) ← getMainGoal stx; let withAlts := stx.getArg 2; - recInfo ← getRecInfoDefault stx major withAlts; + (recInfo, ctorNames) ← getRecInfoDefault stx major withAlts true; result ← liftMetaM stx $ Meta.cases mvarId major.fvarId! recInfo.altVars; - let result := result.map (fun s => s.toInductionSubgoal); - processResult stx recInfo result + checkCasesResult stx result ctorNames recInfo.altRHSs; + let result := result.map (fun s => s.toInductionSubgoal); + let altRHSs := recInfo.altRHSs.filter $ fun stx => !stx.isMissing; + processResult stx altRHSs result end Tactic end Elab diff --git a/stage0/src/Init/Lean/Elab/Tactic/Injection.lean b/stage0/src/Init/Lean/Elab/Tactic/Injection.lean index 0ce5dc6419..15af6a8f6b 100644 --- a/stage0/src/Init/Lean/Elab/Tactic/Injection.lean +++ b/stage0/src/Init/Lean/Elab/Tactic/Injection.lean @@ -16,6 +16,10 @@ private def getInjectionNewIds (stx : Syntax) : List Name := if stx.isNone then [] else (stx.getArg 1).getArgs.toList.map Syntax.getId +private def checkUnusedIds (mvarId : MVarId) (unusedIds : List Name) : MetaM Unit := +unless unusedIds.isEmpty $ + Meta.throwTacticEx `injection mvarId ("too many identifiers provided, unused: " ++ toString unusedIds) + @[builtinTactic «injection»] def evalInjection : Tactic := fun stx => do -- parser! nonReservedSymbol "injection " >> termParser >> withIds @@ -24,8 +28,8 @@ fun stx => do liftMetaTactic stx $ fun mvarId => do r ← Meta.injection mvarId fvarId ids (!ids.isEmpty); match r with - | Meta.InjectionResult.solved => pure [] - | Meta.InjectionResult.subgoal mvarId _ _ => pure [mvarId] + | Meta.InjectionResult.solved => do checkUnusedIds mvarId ids; pure [] + | Meta.InjectionResult.subgoal mvarId' _ unusedIds => do checkUnusedIds mvarId unusedIds; pure [mvarId'] end Tactic end Elab diff --git a/stage0/src/Init/Lean/Meta/Tactic/Cases.lean b/stage0/src/Init/Lean/Meta/Tactic/Cases.lean index 0fd97794e2..42508752d7 100644 --- a/stage0/src/Init/Lean/Meta/Tactic/Cases.lean +++ b/stage0/src/Init/Lean/Meta/Tactic/Cases.lean @@ -6,6 +6,7 @@ Authors: Leonardo de Moura prelude import Init.Lean.Meta.AppBuilder import Init.Lean.Meta.Tactic.Induction +import Init.Lean.Meta.Tactic.Injection import Init.Lean.Meta.Tactic.Assert import Init.Lean.Meta.Tactic.Subst @@ -203,14 +204,20 @@ private partial def unifyEqsAux : Nat → CasesSubgoal → MetaM (Option CasesSu .. s } }; - condM (isDefEq a b) (skip ()) $ + let inj : Unit → MetaM (Option CasesSubgoal) := fun _ => do { + r ← injectionCore mvarId eqFVarId; + match r with + | InjectionResultCore.solved => pure none -- this alternative has been solved + | InjectionResultCore.subgoal mvarId numEqs => unifyEqsAux (n+numEqs) { mvarId := mvarId, .. s } + }; + condM (isDefEq a b) (skip ()) $ do + a ← whnf a; + b ← whnf b; match a, b with | Expr.fvar aFVarId _, Expr.fvar bFVarId _ => do aDecl ← getLocalDecl aFVarId; bDecl ← getLocalDecl bFVarId; substEq (aDecl.index < bDecl.index) | Expr.fvar _ _, _ => substEq false | _, Expr.fvar _ _ => substEq true - | _, _ => - -- TODO - pure $ some { mvarId := mvarId, .. s } + | _, _ => inj () | none => throwTacticEx `cases mvarId "equality expected" private def unifyEqs (numEqs : Nat) (subgoals : Array CasesSubgoal) : MetaM (Array CasesSubgoal) := diff --git a/stage0/src/Init/Lean/Meta/Tactic/Injection.lean b/stage0/src/Init/Lean/Meta/Tactic/Injection.lean index a76db94c8f..d72d2ebac2 100644 --- a/stage0/src/Init/Lean/Meta/Tactic/Injection.lean +++ b/stage0/src/Init/Lean/Meta/Tactic/Injection.lean @@ -16,14 +16,20 @@ inductive InjectionResultCore | solved | subgoal (mvarId : MVarId) (numNewEqs : Nat) -def constructorApp? (e : Expr) : MetaM (Option ConstructorVal) := do -let f := e.getAppFn; -let nargs := e.getAppNumArgs; +private def getConstructorVal (ctorName : Name) (numArgs : Nat) : MetaM (Option ConstructorVal) := do env ← getEnv; -matchConst env f (fun _ => pure none) $ fun cinfo _ => -match cinfo with -| ConstantInfo.ctorInfo v => if e.getAppNumArgs == v.nparams + v.nfields then pure (some v) else pure none -| _ => pure none +match env.find? ctorName with +| some (ConstantInfo.ctorInfo v) => if numArgs == v.nparams + v.nfields then pure (some v) else pure none +| _ => pure none + +def constructorApp? (e : Expr) : MetaM (Option ConstructorVal) := do +match e with +| Expr.lit (Literal.natVal n) _ => + if n == 0 then getConstructorVal `Nat.zero 0 else getConstructorVal `Nat.succ 1 +| _ => + match e.getAppFn with + | Expr.const n _ _ => getConstructorVal n e.getAppNumArgs + | _ => pure none def injectionCore (mvarId : MVarId) (fvarId : FVarId) : MetaM InjectionResultCore := do withMVarContext mvarId $ do @@ -62,13 +68,37 @@ inductive InjectionResult | solved | subgoal (mvarId : MVarId) (newEqs : Array FVarId) (remainingNames : List Name) +private def heqToEq (mvarId : MVarId) (fvarId : FVarId) : MetaM (FVarId × MVarId) := +withMVarContext mvarId $ do + decl ← getLocalDecl fvarId; + type ← whnf decl.type; + match type.heq? with + | none => pure (fvarId, mvarId) + | some (α, a, β, b) => do + pr ← mkEqOfHEq (mkFVar fvarId); + eq ← mkEq a b; + mvarId ← assert mvarId decl.userName eq pr; + mvarId ← clear mvarId fvarId; + (fvarId, mvarId) ← intro1 mvarId false; + pure (fvarId, mvarId) + +def injectionIntro : Nat → MVarId → Array FVarId → List Name → MetaM InjectionResult +| 0, mvarId, fvarIds, remainingNames => + pure $ InjectionResult.subgoal mvarId fvarIds remainingNames +| n+1, mvarId, fvarIds, name::remainingNames => do + (fvarId, mvarId) ← intro mvarId name; + (fvarId, mvarId) ← heqToEq mvarId fvarId; + injectionIntro n mvarId (fvarIds.push fvarId) remainingNames +| n+1, mvarId, fvarIds, [] => do + (fvarId, mvarId) ← intro1 mvarId true; + (fvarId, mvarId) ← heqToEq mvarId fvarId; + injectionIntro n mvarId (fvarIds.push fvarId) [] + def injection (mvarId : MVarId) (fvarId : FVarId) (newNames : List Name := []) (useUnusedNames : Bool := true) : MetaM InjectionResult := do r ← injectionCore mvarId fvarId; match r with -| InjectionResultCore.solved => pure InjectionResult.solved -| InjectionResultCore.subgoal mvarId numEqs => do - (fvarIds, mvarId) ← introN mvarId numEqs newNames useUnusedNames; - pure $ InjectionResult.subgoal mvarId fvarIds (newNames.drop numEqs) +| InjectionResultCore.solved => pure InjectionResult.solved +| InjectionResultCore.subgoal mvarId numEqs => injectionIntro numEqs mvarId #[] newNames end Meta end Lean diff --git a/stage0/src/Init/Lean/Meta/Tactic/Subst.lean b/stage0/src/Init/Lean/Meta/Tactic/Subst.lean index 6a1780a789..2217307a26 100644 --- a/stage0/src/Init/Lean/Meta/Tactic/Subst.lean +++ b/stage0/src/Init/Lean/Meta/Tactic/Subst.lean @@ -22,9 +22,10 @@ withMVarContext mvarId $ do hLocalDecl ← getLocalDecl hFVarId; match hLocalDecl.type.eq? with | none => throwTacticEx `subst mvarId "argument must be an equality proof" - | some (α, lhs, rhs) => + | some (α, lhs, rhs) => do let a := if symm then rhs else lhs; let b := if symm then lhs else rhs; + a ← whnf a; match a with | Expr.fvar aFVarId _ => do mctx ← getMCtx; diff --git a/stage0/src/Init/Lean/MetavarContext.lean b/stage0/src/Init/Lean/MetavarContext.lean index 29fa7222d3..e4005dbcb4 100644 --- a/stage0/src/Init/Lean/MetavarContext.lean +++ b/stage0/src/Init/Lean/MetavarContext.lean @@ -532,7 +532,7 @@ partial def main : Expr → M Expr instArgs f else do newVal ← visit main val; - if newVal.hasMVar then + if newVal.hasExprMVar then instArgs f else do args ← args.mapM (visit main); diff --git a/stage0/stdlib/Init/Lean/Elab/Binders.c b/stage0/stdlib/Init/Lean/Elab/Binders.c index 37d5f8db0f..4d6062c0ab 100644 --- a/stage0/stdlib/Init/Lean/Elab/Binders.c +++ b/stage0/stdlib/Init/Lean/Elab/Binders.c @@ -22,6 +22,7 @@ lean_object* l_Lean_Elab_Term_elabLetDecl(lean_object*, lean_object*, lean_objec lean_object* l_Lean_registerTraceClass(lean_object*, lean_object*); extern lean_object* l___private_Init_Lean_Elab_Quotation_5__quoteSyntax___main___closed__13; lean_object* l_Lean_Elab_Term_elabDepArrow___boxed(lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l___regBuiltinTermElab_Lean_Elab_Term_elabLetBangDecl___closed__3; lean_object* l_Lean_Elab_Term_instantiateMVars(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Term_mkFreshExprMVar(lean_object*, lean_object*, uint8_t, lean_object*, lean_object*, lean_object*); lean_object* l___private_Init_Lean_Elab_Binders_2__expandBinderIdent(lean_object*, lean_object*, lean_object*); @@ -38,8 +39,8 @@ extern lean_object* l_Lean_List_format___rarg___closed__2; uint8_t lean_name_eq(lean_object*, lean_object*); lean_object* l_Lean_Elab_Term_elabFunCore___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); extern lean_object* l___private_Init_Lean_Meta_ExprDefEq_7__checkTypesAndAssign___closed__8; +lean_object* l_Lean_Elab_Term_elabLetDeclAux___lambda__3(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___private_Init_Lean_Elab_Binders_13__elabFunBinderViews(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_Syntax_getIdAt(lean_object*, lean_object*); lean_object* lean_local_ctx_mk_let_decl(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___private_Init_Lean_Elab_Binders_1__expandBinderType___boxed(lean_object*); lean_object* l___private_Init_Lean_Elab_Binders_6__elabBinderViews___main(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); @@ -57,7 +58,7 @@ lean_object* l_Lean_Elab_Term_expandFunBinders___boxed(lean_object*, lean_object extern lean_object* l_Array_empty___closed__1; lean_object* l_Lean_Elab_Term_FunBinders_elabFunBindersAux___main___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Term_declareTacticSyntax___closed__1; -lean_object* l_Lean_Elab_Term_elabLetDeclAux(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Elab_Term_elabLetDeclAux(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, uint8_t, lean_object*, lean_object*); uint8_t l_Lean_checkTraceOption(lean_object*, lean_object*); lean_object* l___private_Init_Lean_Elab_Binders_4__expandBinderModifier___closed__3; lean_object* l_Lean_Elab_Term_elabFunBinders___rarg(lean_object*, lean_object*, uint8_t, lean_object*, lean_object*, lean_object*); @@ -136,7 +137,7 @@ lean_object* l_Array_iterateMAux___main___at_Lean_Elab_Term_quoteAutoTactic___ma lean_object* l_Lean_Elab_Term_elabTerm(lean_object*, lean_object*, uint8_t, lean_object*, lean_object*); lean_object* l_Lean_Elab_Term_elabForall___boxed(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Array_iterateMAux___main___at_Lean_Elab_Term_quoteAutoTactic___main___spec__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_Elab_Term_elabLetDeclAux___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Elab_Term_elabLetDeclAux___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* lean_array_get(lean_object*, lean_object*, lean_object*); lean_object* l___private_Init_Lean_Elab_Binders_14__regTraceClasses(lean_object*); lean_object* lean_array_fset(lean_object*, lean_object*, lean_object*); @@ -173,6 +174,7 @@ lean_object* l_Lean_Elab_Term_getCurrMacroScope(lean_object*, lean_object*); extern lean_object* l___private_Init_Lean_Elab_Quotation_7__getHeadInfo___elambda__3___closed__4; lean_object* l_Lean_Elab_Term_elabArrow___lambda__1___closed__2; lean_object* l_Lean_Elab_Term_expandOptType(lean_object*, lean_object*); +lean_object* l_Lean_Elab_Term_withLocalDecl___rarg(lean_object*, lean_object*, uint8_t, lean_object*, lean_object*, lean_object*, lean_object*); extern lean_object* l___private_Init_Lean_Elab_Quotation_5__quoteSyntax___main___closed__31; extern lean_object* l_Lean_mkAppStx___closed__6; uint8_t l_Array_isEmpty___rarg(lean_object*); @@ -186,10 +188,12 @@ lean_object* l_Lean_Elab_Term_mkFreshInstanceName___rarg(lean_object*); lean_object* l_Lean_Elab_Term_isClass(lean_object*, 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*); uint8_t l_Lean_Elab_Term_Quotation_isAntiquot(lean_object*); +lean_object* l_Lean_Elab_Term_elabLetBangDecl___closed__1; lean_object* l_Lean_mkFVar(lean_object*); extern lean_object* l_Lean_Expr_getAutoParamTactic_x3f___closed__1; lean_object* l_Lean_Elab_Term_quoteAutoTactic(lean_object*, lean_object*, lean_object*); lean_object* l_Array_umapMAux___main___at___private_Init_Lean_Elab_Binders_5__matchBinder___spec__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Elab_Term_elabLetBangDecl___closed__2; lean_object* l___private_Init_Lean_Elab_Binders_11__checkNoOptAutoParam___closed__1; lean_object* l___private_Init_Lean_Elab_Binders_4__expandBinderModifier(lean_object*, lean_object*, lean_object*, lean_object*); uint8_t l_Lean_Expr_isAutoParam(lean_object*); @@ -210,6 +214,7 @@ lean_object* l___private_Init_Lean_Elab_Binders_3__expandOptIdent___boxed(lean_o lean_object* l_Lean_Elab_Term_isDefEq(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); extern lean_object* l_Lean_mkAppStx___closed__3; extern lean_object* l___private_Init_Lean_Elab_Quotation_5__quoteSyntax___main___closed__4; +lean_object* l___regBuiltinTermElab_Lean_Elab_Term_elabLetBangDecl___closed__1; lean_object* lean_local_ctx_mk_local_decl(lean_object*, lean_object*, lean_object*, lean_object*, uint8_t); lean_object* l_Array_umapMAux___main___at___private_Init_Lean_Elab_Binders_10__expandFunBindersAux___main___spec__1(lean_object*, lean_object*, lean_object*); lean_object* l___regBuiltinTermElab_Lean_Elab_Term_elabForall___closed__1; @@ -229,9 +234,9 @@ lean_object* l_Lean_Elab_Term_getLCtx(lean_object*, lean_object*); lean_object* l_Lean_Elab_Term_elabFunBinders___rarg___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); extern lean_object* l_Lean_Expr_getOptParamDefault_x3f___closed__1; lean_object* l___private_Init_Lean_Elab_Binders_10__expandFunBindersAux___main___closed__7; -lean_object* l_Lean_Elab_Term_elabLetIdDecl___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Term_elabLetDecl___closed__2; extern lean_object* l_Lean_Parser_Term_match___elambda__1___closed__2; +lean_object* l_Lean_mkApp(lean_object*, lean_object*); lean_object* l___private_Init_Lean_Elab_Binders_8__getFunBinderIdsAux_x3f(uint8_t, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Syntax_isTermId_x3f(lean_object*, uint8_t); extern lean_object* l_Lean_Parser_Term_let___elambda__1___closed__1; @@ -258,11 +263,12 @@ lean_object* l_Lean_Elab_Term_FunBinders_elabFunBindersAux___boxed(lean_object*, lean_object* l___private_Init_Lean_Elab_Binders_10__expandFunBindersAux___main___closed__3; lean_object* l_Lean_Elab_Term_elabType(lean_object*, lean_object*, lean_object*); extern lean_object* l_Lean_Parser_Term_letIdDecl___closed__2; +extern lean_object* l_Lean_Parser_Term_let_x21___elambda__1___closed__1; lean_object* l_Lean_Elab_Term_expandFunBinders(lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Elab_Term_elabLetBangDecl(lean_object*, lean_object*, lean_object*, lean_object*); extern lean_object* l___private_Init_Lean_Elab_Quotation_5__quoteSyntax___main___closed__42; lean_object* l___private_Init_Lean_Elab_Binders_5__matchBinder___boxed(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Term_whnfForall(lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_Elab_Term_elabLetIdDecl(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); uint8_t l_Lean_Syntax_isNone(lean_object*); extern lean_object* l___private_Init_Lean_Elab_Quotation_5__quoteSyntax___main___closed__24; lean_object* l_Lean_Elab_Term_resetSynthInstanceCache___rarg(lean_object*); @@ -273,6 +279,7 @@ extern lean_object* l___private_Init_Lean_Elab_Quotation_7__getHeadInfo___elambd extern lean_object* l_Lean_Parser_Term_matchAlt___closed__2; extern lean_object* l_Lean_Parser_Term_binderDefault___elambda__1___closed__2; lean_object* l___private_Init_Lean_Elab_Binders_10__expandFunBindersAux___main___closed__10; +lean_object* l___regBuiltinTermElab_Lean_Elab_Term_elabLetBangDecl(lean_object*); lean_object* l___private_Init_Lean_Elab_Binders_10__expandFunBindersAux(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); extern lean_object* l_Lean_Expr_Inhabited; lean_object* l_Lean_Elab_Term_addBuiltinTermElab(lean_object*, lean_object*, lean_object*, lean_object*); @@ -284,6 +291,7 @@ extern lean_object* l_Lean_mkHole___closed__2; lean_object* l___private_Init_Lean_Elab_Binders_10__expandFunBindersAux___main___closed__4; lean_object* l_Lean_Elab_Term_elabBinders___rarg(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___private_Init_Lean_Elab_Binders_10__expandFunBindersAux___main___closed__9; +lean_object* l_Lean_Elab_Term_elabLetDeclAux___lambda__3___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Syntax_getArg(lean_object*, lean_object*); extern lean_object* l_Lean_mkOptionalNode___closed__2; lean_object* l_Lean_Elab_Term_declareTacticSyntax___closed__4; @@ -304,11 +312,13 @@ lean_object* l___regBuiltinTermElab_Lean_Elab_Term_elabArrow(lean_object*); lean_object* l_Lean_Elab_Term_elabArrow___lambda__1___closed__3; lean_object* l___private_Init_Lean_Elab_Binders_8__getFunBinderIdsAux_x3f___main(uint8_t, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Term_quoteAutoTactic___main(lean_object*, lean_object*, lean_object*); +extern lean_object* l_Lean_Parser_Term_let_x21___elambda__1___closed__2; extern lean_object* l_Lean_Parser_Term_simpleBinder___elambda__1___closed__2; extern lean_object* l_Lean_Parser_Term_forall___elambda__1___closed__1; extern lean_object* l___private_Init_Lean_Elab_Quotation_5__quoteSyntax___main___closed__33; lean_object* l_Lean_mkConst(lean_object*, lean_object*); lean_object* l___private_Init_Lean_Elab_Binders_11__checkNoOptAutoParam___closed__4; +lean_object* l___regBuiltinTermElab_Lean_Elab_Term_elabLetBangDecl___closed__2; extern lean_object* l_Lean_mkAppStx___closed__1; lean_object* l_Array_umapMAux___main___at___private_Init_Lean_Elab_Binders_5__matchBinder___spec__3(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Term_elabFunCore(lean_object*, lean_object*, uint8_t, lean_object*, lean_object*); @@ -23460,6 +23470,59 @@ lean_inc(x_5); x_8 = l_Lean_Elab_Term_elabTerm(x_1, x_2, x_7, x_5, x_6); if (lean_obj_tag(x_8) == 0) { +lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; +x_9 = lean_ctor_get(x_8, 0); +lean_inc(x_9); +x_10 = lean_ctor_get(x_8, 1); +lean_inc(x_10); +lean_dec(x_8); +lean_inc(x_5); +x_11 = l_Lean_Elab_Term_instantiateMVars(x_3, x_9, x_5, x_10); +x_12 = lean_ctor_get(x_11, 0); +lean_inc(x_12); +x_13 = lean_ctor_get(x_11, 1); +lean_inc(x_13); +lean_dec(x_11); +x_14 = l_Lean_mkOptionalNode___closed__2; +x_15 = lean_array_push(x_14, x_4); +x_16 = l_Lean_Elab_Term_mkLambda(x_3, x_15, x_12, x_5, x_13); +return x_16; +} +else +{ +uint8_t x_17; +lean_dec(x_5); +lean_dec(x_4); +x_17 = !lean_is_exclusive(x_8); +if (x_17 == 0) +{ +return x_8; +} +else +{ +lean_object* x_18; lean_object* x_19; lean_object* x_20; +x_18 = lean_ctor_get(x_8, 0); +x_19 = lean_ctor_get(x_8, 1); +lean_inc(x_19); +lean_inc(x_18); +lean_dec(x_8); +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_Term_elabLetDeclAux___lambda__3(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6) { +_start: +{ +uint8_t x_7; lean_object* x_8; +x_7 = 1; +lean_inc(x_5); +x_8 = l_Lean_Elab_Term_elabTerm(x_1, x_2, x_7, x_5, x_6); +if (lean_obj_tag(x_8) == 0) +{ lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; x_9 = lean_ctor_get(x_8, 0); lean_inc(x_9); @@ -23530,116 +23593,180 @@ x_3 = lean_name_mk_string(x_1, x_2); return x_3; } } -lean_object* l_Lean_Elab_Term_elabLetDeclAux(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9) { +lean_object* l_Lean_Elab_Term_elabLetDeclAux(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, uint8_t x_8, lean_object* x_9, lean_object* x_10) { _start: { -lean_object* x_10; lean_object* x_11; +lean_object* x_11; lean_object* x_12; lean_inc(x_1); -x_10 = lean_alloc_closure((void*)(l_Lean_Elab_Term_elabLetDeclAux___lambda__1___boxed), 6, 3); -lean_closure_set(x_10, 0, x_4); -lean_closure_set(x_10, 1, x_5); -lean_closure_set(x_10, 2, x_1); -lean_inc(x_8); -x_11 = l_Lean_Elab_Term_elabBinders___rarg(x_3, x_10, x_8, x_9); -if (lean_obj_tag(x_11) == 0) +x_11 = lean_alloc_closure((void*)(l_Lean_Elab_Term_elabLetDeclAux___lambda__1___boxed), 6, 3); +lean_closure_set(x_11, 0, x_4); +lean_closure_set(x_11, 1, x_5); +lean_closure_set(x_11, 2, x_1); +lean_inc(x_9); +x_12 = l_Lean_Elab_Term_elabBinders___rarg(x_3, x_11, x_9, x_10); +if (lean_obj_tag(x_12) == 0) { -lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; uint8_t x_20; -x_12 = lean_ctor_get(x_11, 0); -lean_inc(x_12); -x_13 = lean_ctor_get(x_11, 1); +lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_35; lean_object* x_36; lean_object* x_37; lean_object* x_38; uint8_t x_39; +x_13 = lean_ctor_get(x_12, 0); lean_inc(x_13); -lean_dec(x_11); -x_14 = lean_ctor_get(x_12, 0); +x_14 = lean_ctor_get(x_12, 1); lean_inc(x_14); -x_15 = lean_ctor_get(x_12, 1); -lean_inc(x_15); lean_dec(x_12); -x_16 = l_Lean_Elab_Term_getOptions(x_8, x_13); -x_17 = lean_ctor_get(x_16, 0); -lean_inc(x_17); -x_18 = lean_ctor_get(x_16, 1); -lean_inc(x_18); -lean_dec(x_16); -x_19 = l_Lean_Elab_Term_elabLetDeclAux___closed__3; -x_20 = l_Lean_checkTraceOption(x_17, x_19); -lean_dec(x_17); -if (x_20 == 0) +x_15 = lean_ctor_get(x_13, 0); +lean_inc(x_15); +x_16 = lean_ctor_get(x_13, 1); +lean_inc(x_16); +lean_dec(x_13); +x_35 = l_Lean_Elab_Term_getOptions(x_9, x_14); +x_36 = lean_ctor_get(x_35, 0); +lean_inc(x_36); +x_37 = lean_ctor_get(x_35, 1); +lean_inc(x_37); +lean_dec(x_35); +x_38 = l_Lean_Elab_Term_elabLetDeclAux___closed__3; +x_39 = l_Lean_checkTraceOption(x_36, x_38); +lean_dec(x_36); +if (x_39 == 0) { -lean_object* x_21; lean_object* x_22; -lean_inc(x_1); -x_21 = lean_alloc_closure((void*)(l_Lean_Elab_Term_elabLetDeclAux___lambda__2___boxed), 6, 3); -lean_closure_set(x_21, 0, x_6); -lean_closure_set(x_21, 1, x_7); -lean_closure_set(x_21, 2, x_1); -x_22 = l_Lean_Elab_Term_withLetDecl___rarg(x_1, x_2, x_14, x_15, x_21, x_8, x_18); -lean_dec(x_1); -return x_22; +x_17 = x_37; +goto block_34; } 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; 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_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_inc(x_2); -x_23 = lean_alloc_ctor(4, 1, 0); -lean_ctor_set(x_23, 0, x_2); -x_24 = l___private_Init_Lean_Meta_ExprDefEq_7__checkTypesAndAssign___closed__7; -x_25 = lean_alloc_ctor(9, 2, 0); -lean_ctor_set(x_25, 0, x_23); -lean_ctor_set(x_25, 1, x_24); -lean_inc(x_14); -x_26 = lean_alloc_ctor(2, 1, 0); -lean_ctor_set(x_26, 0, x_14); -x_27 = lean_alloc_ctor(9, 2, 0); -lean_ctor_set(x_27, 0, x_25); -lean_ctor_set(x_27, 1, x_26); -x_28 = l___private_Init_Lean_Meta_ExprDefEq_7__checkTypesAndAssign___closed__8; -x_29 = lean_alloc_ctor(9, 2, 0); -lean_ctor_set(x_29, 0, x_27); -lean_ctor_set(x_29, 1, x_28); +x_40 = lean_alloc_ctor(4, 1, 0); +lean_ctor_set(x_40, 0, x_2); +x_41 = l___private_Init_Lean_Meta_ExprDefEq_7__checkTypesAndAssign___closed__7; +x_42 = lean_alloc_ctor(9, 2, 0); +lean_ctor_set(x_42, 0, x_40); +lean_ctor_set(x_42, 1, x_41); lean_inc(x_15); -x_30 = lean_alloc_ctor(2, 1, 0); -lean_ctor_set(x_30, 0, x_15); -x_31 = lean_alloc_ctor(9, 2, 0); +x_43 = lean_alloc_ctor(2, 1, 0); +lean_ctor_set(x_43, 0, x_15); +x_44 = lean_alloc_ctor(9, 2, 0); +lean_ctor_set(x_44, 0, x_42); +lean_ctor_set(x_44, 1, x_43); +x_45 = l___private_Init_Lean_Meta_ExprDefEq_7__checkTypesAndAssign___closed__8; +x_46 = lean_alloc_ctor(9, 2, 0); +lean_ctor_set(x_46, 0, x_44); +lean_ctor_set(x_46, 1, x_45); +lean_inc(x_16); +x_47 = lean_alloc_ctor(2, 1, 0); +lean_ctor_set(x_47, 0, x_16); +x_48 = lean_alloc_ctor(9, 2, 0); +lean_ctor_set(x_48, 0, x_46); +lean_ctor_set(x_48, 1, x_47); +x_49 = l_Lean_Elab_Term_logTrace(x_38, x_1, x_48, x_9, x_37); +x_50 = lean_ctor_get(x_49, 1); +lean_inc(x_50); +lean_dec(x_49); +x_17 = x_50; +goto block_34; +} +block_34: +{ +if (x_8 == 0) +{ +lean_object* x_18; uint8_t x_19; lean_object* x_20; +lean_inc(x_1); +x_18 = lean_alloc_closure((void*)(l_Lean_Elab_Term_elabLetDeclAux___lambda__2___boxed), 6, 3); +lean_closure_set(x_18, 0, x_6); +lean_closure_set(x_18, 1, x_7); +lean_closure_set(x_18, 2, x_1); +x_19 = 0; +x_20 = l_Lean_Elab_Term_withLocalDecl___rarg(x_1, x_2, x_19, x_15, x_18, x_9, x_17); +lean_dec(x_1); +if (lean_obj_tag(x_20) == 0) +{ +uint8_t x_21; +x_21 = !lean_is_exclusive(x_20); +if (x_21 == 0) +{ +lean_object* x_22; lean_object* x_23; +x_22 = lean_ctor_get(x_20, 0); +x_23 = l_Lean_mkApp(x_22, x_16); +lean_ctor_set(x_20, 0, x_23); +return x_20; +} +else +{ +lean_object* x_24; lean_object* x_25; lean_object* x_26; lean_object* x_27; +x_24 = lean_ctor_get(x_20, 0); +x_25 = lean_ctor_get(x_20, 1); +lean_inc(x_25); +lean_inc(x_24); +lean_dec(x_20); +x_26 = l_Lean_mkApp(x_24, x_16); +x_27 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_27, 0, x_26); +lean_ctor_set(x_27, 1, x_25); +return x_27; +} +} +else +{ +uint8_t x_28; +lean_dec(x_16); +x_28 = !lean_is_exclusive(x_20); +if (x_28 == 0) +{ +return x_20; +} +else +{ +lean_object* x_29; lean_object* x_30; lean_object* x_31; +x_29 = lean_ctor_get(x_20, 0); +x_30 = lean_ctor_get(x_20, 1); +lean_inc(x_30); +lean_inc(x_29); +lean_dec(x_20); +x_31 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_31, 0, x_29); lean_ctor_set(x_31, 1, x_30); -x_32 = l_Lean_Elab_Term_logTrace(x_19, x_1, x_31, x_8, x_18); -x_33 = lean_ctor_get(x_32, 1); -lean_inc(x_33); -lean_dec(x_32); -lean_inc(x_1); -x_34 = lean_alloc_closure((void*)(l_Lean_Elab_Term_elabLetDeclAux___lambda__2___boxed), 6, 3); -lean_closure_set(x_34, 0, x_6); -lean_closure_set(x_34, 1, x_7); -lean_closure_set(x_34, 2, x_1); -x_35 = l_Lean_Elab_Term_withLetDecl___rarg(x_1, x_2, x_14, x_15, x_34, x_8, x_33); -lean_dec(x_1); -return x_35; +return x_31; +} } } else { -uint8_t x_36; -lean_dec(x_8); +lean_object* x_32; lean_object* x_33; +lean_inc(x_1); +x_32 = lean_alloc_closure((void*)(l_Lean_Elab_Term_elabLetDeclAux___lambda__3___boxed), 6, 3); +lean_closure_set(x_32, 0, x_6); +lean_closure_set(x_32, 1, x_7); +lean_closure_set(x_32, 2, x_1); +x_33 = l_Lean_Elab_Term_withLetDecl___rarg(x_1, x_2, x_15, x_16, x_32, x_9, x_17); +lean_dec(x_1); +return x_33; +} +} +} +else +{ +uint8_t x_51; +lean_dec(x_9); lean_dec(x_7); lean_dec(x_6); lean_dec(x_2); lean_dec(x_1); -x_36 = !lean_is_exclusive(x_11); -if (x_36 == 0) +x_51 = !lean_is_exclusive(x_12); +if (x_51 == 0) { -return x_11; +return x_12; } else { -lean_object* x_37; lean_object* x_38; lean_object* x_39; -x_37 = lean_ctor_get(x_11, 0); -x_38 = lean_ctor_get(x_11, 1); -lean_inc(x_38); -lean_inc(x_37); -lean_dec(x_11); -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; +lean_object* x_52; lean_object* x_53; lean_object* x_54; +x_52 = lean_ctor_get(x_12, 0); +x_53 = lean_ctor_get(x_12, 1); +lean_inc(x_53); +lean_inc(x_52); +lean_dec(x_12); +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; } } } @@ -23662,45 +23789,26 @@ lean_dec(x_3); return x_7; } } -lean_object* l_Lean_Elab_Term_elabLetDeclAux___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9) { -_start: -{ -lean_object* x_10; -x_10 = l_Lean_Elab_Term_elabLetDeclAux(x_1, x_2, x_3, x_4, x_5, x_6, x_7, x_8, x_9); -lean_dec(x_3); -return x_10; -} -} -lean_object* l_Lean_Elab_Term_elabLetIdDecl(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6) { -_start: -{ -lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; -x_7 = lean_unsigned_to_nat(0u); -x_8 = l_Lean_Syntax_getIdAt(x_2, x_7); -x_9 = lean_unsigned_to_nat(1u); -x_10 = l_Lean_Syntax_getArg(x_2, x_9); -x_11 = l_Lean_Syntax_getArgs(x_10); -lean_dec(x_10); -x_12 = lean_unsigned_to_nat(2u); -x_13 = l_Lean_Syntax_getArg(x_2, x_12); -x_14 = l_Lean_Elab_Term_expandOptType(x_1, x_13); -lean_dec(x_13); -x_15 = lean_unsigned_to_nat(4u); -x_16 = l_Lean_Syntax_getArg(x_2, x_15); -x_17 = l_Lean_Elab_Term_elabLetDeclAux(x_1, x_8, x_11, x_14, x_16, x_3, x_4, x_5, x_6); -lean_dec(x_11); -return x_17; -} -} -lean_object* l_Lean_Elab_Term_elabLetIdDecl___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_Term_elabLetDeclAux___lambda__3___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6) { _start: { lean_object* x_7; -x_7 = l_Lean_Elab_Term_elabLetIdDecl(x_1, x_2, x_3, x_4, x_5, x_6); -lean_dec(x_2); +x_7 = l_Lean_Elab_Term_elabLetDeclAux___lambda__3(x_1, x_2, x_3, x_4, x_5, x_6); +lean_dec(x_3); return x_7; } } +lean_object* l_Lean_Elab_Term_elabLetDeclAux___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9, lean_object* x_10) { +_start: +{ +uint8_t x_11; lean_object* x_12; +x_11 = lean_unbox(x_8); +lean_dec(x_8); +x_12 = l_Lean_Elab_Term_elabLetDeclAux(x_1, x_2, x_3, x_4, x_5, x_6, x_7, x_11, x_9, x_10); +lean_dec(x_3); +return x_12; +} +} lean_object* _init_l_Lean_Elab_Term_elabLetDecl___closed__1() { _start: { @@ -23727,30 +23835,30 @@ return x_4; lean_object* l_Lean_Elab_Term_elabLetDecl(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { _start: { -uint8_t x_5; lean_object* x_266; uint8_t x_267; -x_266 = l_Lean_Parser_Term_let___elambda__1___closed__2; +uint8_t x_5; lean_object* x_268; uint8_t x_269; +x_268 = l_Lean_Parser_Term_let___elambda__1___closed__2; lean_inc(x_1); -x_267 = l_Lean_Syntax_isOfKind(x_1, x_266); -if (x_267 == 0) +x_269 = l_Lean_Syntax_isOfKind(x_1, x_268); +if (x_269 == 0) { -uint8_t x_268; -x_268 = 0; -x_5 = x_268; -goto block_265; +uint8_t x_270; +x_270 = 0; +x_5 = x_270; +goto block_267; } else { -lean_object* x_269; lean_object* x_270; lean_object* x_271; uint8_t x_272; -x_269 = l_Lean_Syntax_getArgs(x_1); -x_270 = lean_array_get_size(x_269); -lean_dec(x_269); -x_271 = lean_unsigned_to_nat(4u); -x_272 = lean_nat_dec_eq(x_270, x_271); -lean_dec(x_270); -x_5 = x_272; -goto block_265; +lean_object* x_271; lean_object* x_272; lean_object* x_273; uint8_t x_274; +x_271 = l_Lean_Syntax_getArgs(x_1); +x_272 = lean_array_get_size(x_271); +lean_dec(x_271); +x_273 = lean_unsigned_to_nat(4u); +x_274 = lean_nat_dec_eq(x_272, x_273); +lean_dec(x_272); +x_5 = x_274; +goto block_267; } -block_265: +block_267: { if (x_5 == 0) { @@ -23763,32 +23871,32 @@ return x_6; } else { -lean_object* x_7; lean_object* x_8; uint8_t x_9; lean_object* x_258; uint8_t x_259; +lean_object* x_7; lean_object* x_8; uint8_t x_9; lean_object* x_260; uint8_t x_261; x_7 = lean_unsigned_to_nat(1u); x_8 = l_Lean_Syntax_getArg(x_1, x_7); -x_258 = l_Lean_Parser_Term_letIdDecl___closed__2; +x_260 = l_Lean_Parser_Term_letIdDecl___closed__2; lean_inc(x_8); -x_259 = l_Lean_Syntax_isOfKind(x_8, x_258); -if (x_259 == 0) +x_261 = l_Lean_Syntax_isOfKind(x_8, x_260); +if (x_261 == 0) { -uint8_t x_260; -x_260 = 0; -x_9 = x_260; -goto block_257; +uint8_t x_262; +x_262 = 0; +x_9 = x_262; +goto block_259; } else { -lean_object* x_261; lean_object* x_262; lean_object* x_263; uint8_t x_264; -x_261 = l_Lean_Syntax_getArgs(x_8); -x_262 = lean_array_get_size(x_261); -lean_dec(x_261); -x_263 = lean_unsigned_to_nat(5u); -x_264 = lean_nat_dec_eq(x_262, x_263); -lean_dec(x_262); -x_9 = x_264; -goto block_257; +lean_object* x_263; lean_object* x_264; lean_object* x_265; uint8_t x_266; +x_263 = l_Lean_Syntax_getArgs(x_8); +x_264 = lean_array_get_size(x_263); +lean_dec(x_263); +x_265 = lean_unsigned_to_nat(5u); +x_266 = lean_nat_dec_eq(x_264, x_265); +lean_dec(x_264); +x_9 = x_266; +goto block_259; } -block_257: +block_259: { if (x_9 == 0) { @@ -24288,56 +24396,57 @@ return x_207; } else { -lean_object* x_220; lean_object* x_221; lean_object* x_222; uint8_t x_223; lean_object* x_242; uint8_t x_243; +lean_object* x_220; lean_object* x_221; lean_object* x_222; uint8_t x_223; lean_object* x_243; uint8_t x_244; x_220 = l_Lean_Syntax_getArg(x_8, x_7); x_221 = lean_unsigned_to_nat(2u); x_222 = l_Lean_Syntax_getArg(x_8, x_221); -x_242 = l_Lean_nullKind___closed__2; +x_243 = l_Lean_nullKind___closed__2; lean_inc(x_222); -x_243 = l_Lean_Syntax_isOfKind(x_222, x_242); -if (x_243 == 0) +x_244 = l_Lean_Syntax_isOfKind(x_222, x_243); +if (x_244 == 0) { -uint8_t x_244; -x_244 = 0; -x_223 = x_244; -goto block_241; +uint8_t x_245; +x_245 = 0; +x_223 = x_245; +goto block_242; } else { -lean_object* x_245; lean_object* x_246; uint8_t x_247; -x_245 = l_Lean_Syntax_getArgs(x_222); -x_246 = lean_array_get_size(x_245); -lean_dec(x_245); -x_247 = lean_nat_dec_eq(x_246, x_11); -if (x_247 == 0) -{ -uint8_t x_248; -x_248 = lean_nat_dec_eq(x_246, x_7); +lean_object* x_246; lean_object* x_247; uint8_t x_248; +x_246 = l_Lean_Syntax_getArgs(x_222); +x_247 = lean_array_get_size(x_246); lean_dec(x_246); -x_223 = x_248; -goto block_241; +x_248 = lean_nat_dec_eq(x_247, x_11); +if (x_248 == 0) +{ +uint8_t x_249; +x_249 = lean_nat_dec_eq(x_247, x_7); +lean_dec(x_247); +x_223 = x_249; +goto block_242; } else { -lean_object* x_249; lean_object* x_250; lean_object* x_251; lean_object* x_252; lean_object* x_253; lean_object* x_254; lean_object* x_255; lean_object* x_256; -lean_dec(x_246); +lean_object* x_250; lean_object* x_251; lean_object* x_252; lean_object* x_253; lean_object* x_254; lean_object* x_255; lean_object* x_256; uint8_t x_257; lean_object* x_258; +lean_dec(x_247); lean_dec(x_222); -x_249 = lean_unsigned_to_nat(4u); -x_250 = l_Lean_Syntax_getArg(x_8, x_249); +x_250 = lean_unsigned_to_nat(4u); +x_251 = l_Lean_Syntax_getArg(x_8, x_250); lean_dec(x_8); -x_251 = lean_unsigned_to_nat(3u); -x_252 = l_Lean_Syntax_getArg(x_1, x_251); -x_253 = l_Lean_Syntax_getArgs(x_220); +x_252 = lean_unsigned_to_nat(3u); +x_253 = l_Lean_Syntax_getArg(x_1, x_252); +x_254 = l_Lean_Syntax_getArgs(x_220); lean_dec(x_220); -x_254 = l_Lean_Syntax_getId(x_12); +x_255 = l_Lean_Syntax_getId(x_12); lean_dec(x_12); -x_255 = l_Lean_mkHole(x_1); -x_256 = l_Lean_Elab_Term_elabLetDeclAux(x_1, x_254, x_253, x_255, x_250, x_252, x_2, x_3, x_4); -lean_dec(x_253); -return x_256; +x_256 = l_Lean_mkHole(x_1); +x_257 = 1; +x_258 = l_Lean_Elab_Term_elabLetDeclAux(x_1, x_255, x_254, x_256, x_251, x_253, x_2, x_257, x_3, x_4); +lean_dec(x_254); +return x_258; } } -block_241: +block_242: { if (x_223 == 0) { @@ -24396,7 +24505,7 @@ return x_232; } else { -lean_object* x_233; lean_object* x_234; lean_object* x_235; lean_object* x_236; lean_object* x_237; lean_object* x_238; lean_object* x_239; lean_object* x_240; +lean_object* x_233; lean_object* x_234; lean_object* x_235; lean_object* x_236; lean_object* x_237; lean_object* x_238; lean_object* x_239; uint8_t x_240; lean_object* x_241; x_233 = l_Lean_Syntax_getArg(x_225, x_7); lean_dec(x_225); x_234 = lean_unsigned_to_nat(4u); @@ -24408,9 +24517,10 @@ x_238 = l_Lean_Syntax_getArgs(x_220); lean_dec(x_220); x_239 = l_Lean_Syntax_getId(x_12); lean_dec(x_12); -x_240 = l_Lean_Elab_Term_elabLetDeclAux(x_1, x_239, x_238, x_233, x_235, x_237, x_2, x_3, x_4); +x_240 = 1; +x_241 = l_Lean_Elab_Term_elabLetDeclAux(x_1, x_239, x_238, x_233, x_235, x_237, x_2, x_240, x_3, x_4); lean_dec(x_238); -return x_240; +return x_241; } } } @@ -24459,6 +24569,765 @@ x_5 = l_Lean_Elab_Term_addBuiltinTermElab(x_2, x_3, x_4, x_1); return x_5; } } +lean_object* _init_l_Lean_Elab_Term_elabLetBangDecl___closed__1() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; +x_1 = lean_box(0); +x_2 = l_Lean_Parser_Term_let_x21___elambda__1___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_Term_elabLetBangDecl___closed__2() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; +x_1 = l_Array_empty___closed__1; +x_2 = l_Lean_Elab_Term_elabLetBangDecl___closed__1; +x_3 = lean_array_push(x_1, x_2); +return x_3; +} +} +lean_object* l_Lean_Elab_Term_elabLetBangDecl(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { +_start: +{ +uint8_t x_5; lean_object* x_268; uint8_t x_269; +x_268 = l_Lean_Parser_Term_let_x21___elambda__1___closed__2; +lean_inc(x_1); +x_269 = l_Lean_Syntax_isOfKind(x_1, x_268); +if (x_269 == 0) +{ +uint8_t x_270; +x_270 = 0; +x_5 = x_270; +goto block_267; +} +else +{ +lean_object* x_271; lean_object* x_272; lean_object* x_273; uint8_t x_274; +x_271 = l_Lean_Syntax_getArgs(x_1); +x_272 = lean_array_get_size(x_271); +lean_dec(x_271); +x_273 = lean_unsigned_to_nat(4u); +x_274 = lean_nat_dec_eq(x_272, x_273); +lean_dec(x_272); +x_5 = x_274; +goto block_267; +} +block_267: +{ +if (x_5 == 0) +{ +lean_object* x_6; +lean_dec(x_3); +lean_dec(x_2); +lean_dec(x_1); +x_6 = l_Lean_Elab_Term_throwUnsupportedSyntax___rarg(x_4); +return x_6; +} +else +{ +lean_object* x_7; lean_object* x_8; uint8_t x_9; lean_object* x_260; uint8_t x_261; +x_7 = lean_unsigned_to_nat(1u); +x_8 = l_Lean_Syntax_getArg(x_1, x_7); +x_260 = l_Lean_Parser_Term_letIdDecl___closed__2; +lean_inc(x_8); +x_261 = l_Lean_Syntax_isOfKind(x_8, x_260); +if (x_261 == 0) +{ +uint8_t x_262; +x_262 = 0; +x_9 = x_262; +goto block_259; +} +else +{ +lean_object* x_263; lean_object* x_264; lean_object* x_265; uint8_t x_266; +x_263 = l_Lean_Syntax_getArgs(x_8); +x_264 = lean_array_get_size(x_263); +lean_dec(x_263); +x_265 = lean_unsigned_to_nat(5u); +x_266 = lean_nat_dec_eq(x_264, x_265); +lean_dec(x_264); +x_9 = x_266; +goto block_259; +} +block_259: +{ +if (x_9 == 0) +{ +lean_object* x_10; +lean_dec(x_8); +lean_dec(x_3); +lean_dec(x_2); +lean_dec(x_1); +x_10 = l_Lean_Elab_Term_throwUnsupportedSyntax___rarg(x_4); +return x_10; +} +else +{ +lean_object* x_11; lean_object* x_12; lean_object* x_13; uint8_t x_14; +x_11 = lean_unsigned_to_nat(0u); +x_12 = l_Lean_Syntax_getArg(x_8, x_11); +x_13 = l_Lean_identKind___closed__2; +lean_inc(x_12); +x_14 = l_Lean_Syntax_isOfKind(x_12, x_13); +if (x_14 == 0) +{ +lean_object* x_15; uint8_t x_16; lean_object* x_214; uint8_t x_215; +x_15 = l_Lean_Syntax_getArg(x_8, x_7); +x_214 = l_Lean_nullKind___closed__2; +lean_inc(x_15); +x_215 = l_Lean_Syntax_isOfKind(x_15, x_214); +if (x_215 == 0) +{ +uint8_t x_216; +lean_dec(x_15); +x_216 = 0; +x_16 = x_216; +goto block_213; +} +else +{ +lean_object* x_217; lean_object* x_218; uint8_t x_219; +x_217 = l_Lean_Syntax_getArgs(x_15); +lean_dec(x_15); +x_218 = lean_array_get_size(x_217); +lean_dec(x_217); +x_219 = lean_nat_dec_eq(x_218, x_11); +lean_dec(x_218); +x_16 = x_219; +goto block_213; +} +block_213: +{ +if (x_16 == 0) +{ +lean_object* x_17; +lean_dec(x_12); +lean_dec(x_8); +lean_dec(x_3); +lean_dec(x_2); +lean_dec(x_1); +x_17 = l_Lean_Elab_Term_throwUnsupportedSyntax___rarg(x_4); +return x_17; +} +else +{ +lean_object* x_18; lean_object* x_19; uint8_t x_20; lean_object* x_121; uint8_t x_122; uint8_t x_123; +x_18 = lean_unsigned_to_nat(2u); +x_19 = l_Lean_Syntax_getArg(x_8, x_18); +x_121 = l_Lean_nullKind___closed__2; +lean_inc(x_19); +x_122 = l_Lean_Syntax_isOfKind(x_19, x_121); +if (x_122 == 0) +{ +uint8_t x_209; +x_209 = 0; +x_123 = x_209; +goto block_208; +} +else +{ +lean_object* x_210; lean_object* x_211; uint8_t x_212; +x_210 = l_Lean_Syntax_getArgs(x_19); +x_211 = lean_array_get_size(x_210); +lean_dec(x_210); +x_212 = lean_nat_dec_eq(x_211, x_11); +lean_dec(x_211); +x_123 = x_212; +goto block_208; +} +block_120: +{ +if (x_20 == 0) +{ +lean_object* x_21; +lean_dec(x_19); +lean_dec(x_12); +lean_dec(x_8); +lean_dec(x_3); +lean_dec(x_2); +lean_dec(x_1); +x_21 = l_Lean_Elab_Term_throwUnsupportedSyntax___rarg(x_4); +return x_21; +} +else +{ +lean_object* x_22; uint8_t x_23; lean_object* x_114; uint8_t x_115; +x_22 = l_Lean_Syntax_getArg(x_19, x_11); +lean_dec(x_19); +x_114 = l_Lean_Parser_Term_typeSpec___elambda__1___closed__2; +lean_inc(x_22); +x_115 = l_Lean_Syntax_isOfKind(x_22, x_114); +if (x_115 == 0) +{ +uint8_t x_116; +x_116 = 0; +x_23 = x_116; +goto block_113; +} +else +{ +lean_object* x_117; lean_object* x_118; uint8_t x_119; +x_117 = l_Lean_Syntax_getArgs(x_22); +x_118 = lean_array_get_size(x_117); +lean_dec(x_117); +x_119 = lean_nat_dec_eq(x_118, x_18); +lean_dec(x_118); +x_23 = x_119; +goto block_113; +} +block_113: +{ +if (x_23 == 0) +{ +lean_object* x_24; +lean_dec(x_22); +lean_dec(x_12); +lean_dec(x_8); +lean_dec(x_3); +lean_dec(x_2); +lean_dec(x_1); +x_24 = l_Lean_Elab_Term_throwUnsupportedSyntax___rarg(x_4); +return x_24; +} +else +{ +lean_object* x_25; lean_object* x_26; lean_object* x_27; lean_object* x_28; lean_object* x_29; lean_object* x_30; lean_object* x_31; lean_object* x_32; lean_object* x_33; lean_object* x_34; lean_object* x_35; lean_object* x_36; lean_object* x_37; lean_object* x_38; lean_object* x_39; lean_object* x_40; lean_object* x_41; lean_object* x_42; lean_object* x_43; lean_object* x_44; lean_object* x_45; lean_object* x_46; lean_object* x_47; lean_object* x_48; lean_object* x_49; lean_object* x_50; lean_object* x_51; lean_object* x_52; lean_object* x_53; lean_object* x_54; lean_object* x_55; lean_object* x_56; lean_object* x_57; lean_object* x_58; lean_object* x_59; lean_object* x_60; lean_object* x_61; lean_object* x_62; lean_object* x_63; lean_object* x_64; lean_object* x_65; lean_object* x_66; lean_object* x_67; lean_object* x_68; lean_object* x_69; lean_object* x_70; lean_object* x_71; lean_object* x_72; lean_object* x_73; lean_object* x_74; lean_object* x_75; lean_object* x_76; lean_object* x_77; lean_object* x_78; lean_object* x_79; lean_object* x_80; lean_object* x_81; lean_object* x_82; lean_object* x_83; lean_object* x_84; lean_object* x_85; lean_object* x_86; lean_object* x_87; lean_object* x_88; uint8_t x_89; +x_25 = l_Lean_Syntax_getArg(x_22, x_7); +lean_dec(x_22); +x_26 = lean_unsigned_to_nat(4u); +x_27 = l_Lean_Syntax_getArg(x_8, x_26); +lean_dec(x_8); +x_28 = lean_unsigned_to_nat(3u); +x_29 = l_Lean_Syntax_getArg(x_1, x_28); +x_30 = l_Lean_Elab_Term_getCurrMacroScope(x_3, x_4); +x_31 = lean_ctor_get(x_30, 0); +lean_inc(x_31); +x_32 = lean_ctor_get(x_30, 1); +lean_inc(x_32); +lean_dec(x_30); +x_33 = l_Lean_Elab_Term_getMainModule___rarg(x_32); +x_34 = lean_ctor_get(x_33, 0); +lean_inc(x_34); +x_35 = lean_ctor_get(x_33, 1); +lean_inc(x_35); +lean_dec(x_33); +x_36 = lean_box(0); +x_37 = l_Lean_Meta_AbstractMVars_abstractExprMVars___main___closed__2; +x_38 = l_Lean_addMacroScope(x_34, x_37, x_31); +x_39 = lean_box(0); +x_40 = l_Lean_Elab_Term_elabLetDecl___closed__2; +x_41 = lean_alloc_ctor(3, 4, 0); +lean_ctor_set(x_41, 0, x_36); +lean_ctor_set(x_41, 1, x_40); +lean_ctor_set(x_41, 2, x_38); +lean_ctor_set(x_41, 3, x_39); +x_42 = l_Array_empty___closed__1; +x_43 = lean_array_push(x_42, x_41); +x_44 = l___private_Init_Lean_Elab_Quotation_11__letBindRhss___main___closed__17; +x_45 = lean_array_push(x_43, x_44); +x_46 = l_Lean_Elab_Term_elabArrow___lambda__1___closed__4; +x_47 = lean_array_push(x_46, x_25); +x_48 = l_Lean_Parser_Term_typeSpec___elambda__1___closed__2; +x_49 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_49, 0, x_48); +lean_ctor_set(x_49, 1, x_47); +x_50 = lean_array_push(x_42, x_49); +x_51 = l_Lean_nullKind___closed__2; +x_52 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_52, 0, x_51); +lean_ctor_set(x_52, 1, x_50); +lean_inc(x_45); +x_53 = lean_array_push(x_45, x_52); +x_54 = l___private_Init_Lean_Elab_Quotation_7__getHeadInfo___elambda__3___closed__4; +x_55 = lean_array_push(x_53, x_54); +x_56 = lean_array_push(x_55, x_27); +x_57 = l_Lean_Parser_Term_letIdDecl___closed__2; +x_58 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_58, 0, x_57); +lean_ctor_set(x_58, 1, x_56); +x_59 = l_Lean_Elab_Term_elabLetBangDecl___closed__2; +x_60 = lean_array_push(x_59, x_58); +x_61 = l___private_Init_Lean_Elab_Quotation_7__getHeadInfo___elambda__3___closed__10; +x_62 = lean_array_push(x_60, x_61); +x_63 = l_Lean_mkTermIdFromIdent___closed__2; +x_64 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_64, 0, x_63); +lean_ctor_set(x_64, 1, x_45); +x_65 = lean_array_push(x_42, x_64); +x_66 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_66, 0, x_51); +lean_ctor_set(x_66, 1, x_65); +x_67 = l___private_Init_Lean_Elab_Binders_10__expandFunBindersAux___main___closed__2; +x_68 = lean_array_push(x_67, x_66); +x_69 = lean_array_push(x_68, x_44); +x_70 = l___private_Init_Lean_Elab_Binders_10__expandFunBindersAux___main___closed__4; +x_71 = lean_array_push(x_69, x_70); +x_72 = lean_array_push(x_71, x_44); +x_73 = lean_array_push(x_42, x_12); +x_74 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_74, 0, x_51); +lean_ctor_set(x_74, 1, x_73); +x_75 = lean_array_push(x_42, x_74); +x_76 = l_Lean_Elab_Term_expandCDot_x3f___closed__3; +x_77 = lean_array_push(x_75, x_76); +x_78 = lean_array_push(x_77, x_29); +x_79 = l_Lean_Parser_Term_matchAlt___closed__2; +x_80 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_80, 0, x_79); +lean_ctor_set(x_80, 1, x_78); +x_81 = lean_array_push(x_42, x_80); +x_82 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_82, 0, x_51); +lean_ctor_set(x_82, 1, x_81); +x_83 = lean_array_push(x_72, x_82); +x_84 = l_Lean_Parser_Term_match___elambda__1___closed__2; +x_85 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_85, 0, x_84); +lean_ctor_set(x_85, 1, x_83); +x_86 = lean_array_push(x_62, x_85); +x_87 = l_Lean_Parser_Term_let_x21___elambda__1___closed__2; +x_88 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_88, 0, x_87); +lean_ctor_set(x_88, 1, x_86); +x_89 = !lean_is_exclusive(x_3); +if (x_89 == 0) +{ +lean_object* x_90; lean_object* x_91; lean_object* x_92; uint8_t x_93; lean_object* x_94; +x_90 = lean_ctor_get(x_3, 8); +lean_inc(x_88); +x_91 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_91, 0, x_1); +lean_ctor_set(x_91, 1, x_88); +x_92 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_92, 0, x_91); +lean_ctor_set(x_92, 1, x_90); +lean_ctor_set(x_3, 8, x_92); +x_93 = 1; +x_94 = l_Lean_Elab_Term_elabTerm(x_88, x_2, x_93, x_3, x_35); +return x_94; +} +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_object* x_102; lean_object* x_103; lean_object* x_104; uint8_t x_105; uint8_t x_106; uint8_t x_107; lean_object* x_108; lean_object* x_109; lean_object* x_110; uint8_t x_111; lean_object* x_112; +x_95 = lean_ctor_get(x_3, 0); +x_96 = lean_ctor_get(x_3, 1); +x_97 = lean_ctor_get(x_3, 2); +x_98 = lean_ctor_get(x_3, 3); +x_99 = lean_ctor_get(x_3, 4); +x_100 = lean_ctor_get(x_3, 5); +x_101 = lean_ctor_get(x_3, 6); +x_102 = lean_ctor_get(x_3, 7); +x_103 = lean_ctor_get(x_3, 8); +x_104 = lean_ctor_get(x_3, 9); +x_105 = lean_ctor_get_uint8(x_3, sizeof(void*)*10); +x_106 = lean_ctor_get_uint8(x_3, sizeof(void*)*10 + 1); +x_107 = lean_ctor_get_uint8(x_3, sizeof(void*)*10 + 2); +lean_inc(x_104); +lean_inc(x_103); +lean_inc(x_102); +lean_inc(x_101); +lean_inc(x_100); +lean_inc(x_99); +lean_inc(x_98); +lean_inc(x_97); +lean_inc(x_96); +lean_inc(x_95); +lean_dec(x_3); +lean_inc(x_88); +x_108 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_108, 0, x_1); +lean_ctor_set(x_108, 1, x_88); +x_109 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_109, 0, x_108); +lean_ctor_set(x_109, 1, x_103); +x_110 = lean_alloc_ctor(0, 10, 3); +lean_ctor_set(x_110, 0, x_95); +lean_ctor_set(x_110, 1, x_96); +lean_ctor_set(x_110, 2, x_97); +lean_ctor_set(x_110, 3, x_98); +lean_ctor_set(x_110, 4, x_99); +lean_ctor_set(x_110, 5, x_100); +lean_ctor_set(x_110, 6, x_101); +lean_ctor_set(x_110, 7, x_102); +lean_ctor_set(x_110, 8, x_109); +lean_ctor_set(x_110, 9, x_104); +lean_ctor_set_uint8(x_110, sizeof(void*)*10, x_105); +lean_ctor_set_uint8(x_110, sizeof(void*)*10 + 1, x_106); +lean_ctor_set_uint8(x_110, sizeof(void*)*10 + 2, x_107); +x_111 = 1; +x_112 = l_Lean_Elab_Term_elabTerm(x_88, x_2, x_111, x_110, x_35); +return x_112; +} +} +} +} +} +block_208: +{ +if (x_123 == 0) +{ +if (x_122 == 0) +{ +uint8_t x_124; +x_124 = 0; +x_20 = x_124; +goto block_120; +} +else +{ +lean_object* x_125; lean_object* x_126; uint8_t x_127; +x_125 = l_Lean_Syntax_getArgs(x_19); +x_126 = lean_array_get_size(x_125); +lean_dec(x_125); +x_127 = lean_nat_dec_eq(x_126, x_7); +lean_dec(x_126); +x_20 = x_127; +goto block_120; +} +} +else +{ +lean_object* x_128; lean_object* x_129; lean_object* x_130; lean_object* x_131; lean_object* x_132; lean_object* x_133; lean_object* x_134; lean_object* x_135; lean_object* x_136; lean_object* x_137; lean_object* x_138; lean_object* x_139; lean_object* x_140; lean_object* x_141; lean_object* x_142; lean_object* x_143; lean_object* x_144; lean_object* x_145; lean_object* x_146; lean_object* x_147; lean_object* x_148; lean_object* x_149; lean_object* x_150; lean_object* x_151; lean_object* x_152; lean_object* x_153; lean_object* x_154; lean_object* x_155; lean_object* x_156; lean_object* x_157; lean_object* x_158; lean_object* x_159; lean_object* x_160; lean_object* x_161; lean_object* x_162; lean_object* x_163; lean_object* x_164; lean_object* x_165; lean_object* x_166; lean_object* x_167; lean_object* x_168; lean_object* x_169; lean_object* x_170; lean_object* x_171; lean_object* x_172; lean_object* x_173; lean_object* x_174; lean_object* x_175; lean_object* x_176; lean_object* x_177; lean_object* x_178; lean_object* x_179; lean_object* x_180; lean_object* x_181; lean_object* x_182; lean_object* x_183; uint8_t x_184; +lean_dec(x_19); +x_128 = lean_unsigned_to_nat(4u); +x_129 = l_Lean_Syntax_getArg(x_8, x_128); +lean_dec(x_8); +x_130 = lean_unsigned_to_nat(3u); +x_131 = l_Lean_Syntax_getArg(x_1, x_130); +x_132 = l_Lean_Elab_Term_getCurrMacroScope(x_3, x_4); +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_135 = l_Lean_Elab_Term_getMainModule___rarg(x_134); +x_136 = lean_ctor_get(x_135, 0); +lean_inc(x_136); +x_137 = lean_ctor_get(x_135, 1); +lean_inc(x_137); +lean_dec(x_135); +x_138 = lean_box(0); +x_139 = l_Lean_Meta_AbstractMVars_abstractExprMVars___main___closed__2; +x_140 = l_Lean_addMacroScope(x_136, x_139, x_133); +x_141 = lean_box(0); +x_142 = l_Lean_Elab_Term_elabLetDecl___closed__2; +x_143 = lean_alloc_ctor(3, 4, 0); +lean_ctor_set(x_143, 0, x_138); +lean_ctor_set(x_143, 1, x_142); +lean_ctor_set(x_143, 2, x_140); +lean_ctor_set(x_143, 3, x_141); +x_144 = l_Array_empty___closed__1; +x_145 = lean_array_push(x_144, x_143); +x_146 = l___private_Init_Lean_Elab_Quotation_11__letBindRhss___main___closed__17; +x_147 = lean_array_push(x_145, x_146); +lean_inc(x_147); +x_148 = lean_array_push(x_147, x_146); +x_149 = l___private_Init_Lean_Elab_Quotation_7__getHeadInfo___elambda__3___closed__4; +x_150 = lean_array_push(x_148, x_149); +x_151 = lean_array_push(x_150, x_129); +x_152 = l_Lean_Parser_Term_letIdDecl___closed__2; +x_153 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_153, 0, x_152); +lean_ctor_set(x_153, 1, x_151); +x_154 = l_Lean_Elab_Term_elabLetBangDecl___closed__2; +x_155 = lean_array_push(x_154, x_153); +x_156 = l___private_Init_Lean_Elab_Quotation_7__getHeadInfo___elambda__3___closed__10; +x_157 = lean_array_push(x_155, x_156); +x_158 = l_Lean_mkTermIdFromIdent___closed__2; +x_159 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_159, 0, x_158); +lean_ctor_set(x_159, 1, x_147); +x_160 = lean_array_push(x_144, x_159); +x_161 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_161, 0, x_121); +lean_ctor_set(x_161, 1, x_160); +x_162 = l___private_Init_Lean_Elab_Binders_10__expandFunBindersAux___main___closed__2; +x_163 = lean_array_push(x_162, x_161); +x_164 = lean_array_push(x_163, x_146); +x_165 = l___private_Init_Lean_Elab_Binders_10__expandFunBindersAux___main___closed__4; +x_166 = lean_array_push(x_164, x_165); +x_167 = lean_array_push(x_166, x_146); +x_168 = lean_array_push(x_144, x_12); +x_169 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_169, 0, x_121); +lean_ctor_set(x_169, 1, x_168); +x_170 = lean_array_push(x_144, x_169); +x_171 = l_Lean_Elab_Term_expandCDot_x3f___closed__3; +x_172 = lean_array_push(x_170, x_171); +x_173 = lean_array_push(x_172, x_131); +x_174 = l_Lean_Parser_Term_matchAlt___closed__2; +x_175 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_175, 0, x_174); +lean_ctor_set(x_175, 1, x_173); +x_176 = lean_array_push(x_144, x_175); +x_177 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_177, 0, x_121); +lean_ctor_set(x_177, 1, x_176); +x_178 = lean_array_push(x_167, x_177); +x_179 = l_Lean_Parser_Term_match___elambda__1___closed__2; +x_180 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_180, 0, x_179); +lean_ctor_set(x_180, 1, x_178); +x_181 = lean_array_push(x_157, x_180); +x_182 = l_Lean_Parser_Term_let_x21___elambda__1___closed__2; +x_183 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_183, 0, x_182); +lean_ctor_set(x_183, 1, x_181); +x_184 = !lean_is_exclusive(x_3); +if (x_184 == 0) +{ +lean_object* x_185; lean_object* x_186; lean_object* x_187; uint8_t x_188; lean_object* x_189; +x_185 = lean_ctor_get(x_3, 8); +lean_inc(x_183); +x_186 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_186, 0, x_1); +lean_ctor_set(x_186, 1, x_183); +x_187 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_187, 0, x_186); +lean_ctor_set(x_187, 1, x_185); +lean_ctor_set(x_3, 8, x_187); +x_188 = 1; +x_189 = l_Lean_Elab_Term_elabTerm(x_183, x_2, x_188, x_3, x_137); +return x_189; +} +else +{ +lean_object* x_190; lean_object* x_191; lean_object* x_192; lean_object* x_193; lean_object* x_194; lean_object* x_195; lean_object* x_196; lean_object* x_197; lean_object* x_198; lean_object* x_199; uint8_t x_200; uint8_t x_201; uint8_t x_202; lean_object* x_203; lean_object* x_204; lean_object* x_205; uint8_t x_206; lean_object* x_207; +x_190 = lean_ctor_get(x_3, 0); +x_191 = lean_ctor_get(x_3, 1); +x_192 = lean_ctor_get(x_3, 2); +x_193 = lean_ctor_get(x_3, 3); +x_194 = lean_ctor_get(x_3, 4); +x_195 = lean_ctor_get(x_3, 5); +x_196 = lean_ctor_get(x_3, 6); +x_197 = lean_ctor_get(x_3, 7); +x_198 = lean_ctor_get(x_3, 8); +x_199 = lean_ctor_get(x_3, 9); +x_200 = lean_ctor_get_uint8(x_3, sizeof(void*)*10); +x_201 = lean_ctor_get_uint8(x_3, sizeof(void*)*10 + 1); +x_202 = lean_ctor_get_uint8(x_3, sizeof(void*)*10 + 2); +lean_inc(x_199); +lean_inc(x_198); +lean_inc(x_197); +lean_inc(x_196); +lean_inc(x_195); +lean_inc(x_194); +lean_inc(x_193); +lean_inc(x_192); +lean_inc(x_191); +lean_inc(x_190); +lean_dec(x_3); +lean_inc(x_183); +x_203 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_203, 0, x_1); +lean_ctor_set(x_203, 1, x_183); +x_204 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_204, 0, x_203); +lean_ctor_set(x_204, 1, x_198); +x_205 = lean_alloc_ctor(0, 10, 3); +lean_ctor_set(x_205, 0, x_190); +lean_ctor_set(x_205, 1, x_191); +lean_ctor_set(x_205, 2, x_192); +lean_ctor_set(x_205, 3, x_193); +lean_ctor_set(x_205, 4, x_194); +lean_ctor_set(x_205, 5, x_195); +lean_ctor_set(x_205, 6, x_196); +lean_ctor_set(x_205, 7, x_197); +lean_ctor_set(x_205, 8, x_204); +lean_ctor_set(x_205, 9, x_199); +lean_ctor_set_uint8(x_205, sizeof(void*)*10, x_200); +lean_ctor_set_uint8(x_205, sizeof(void*)*10 + 1, x_201); +lean_ctor_set_uint8(x_205, sizeof(void*)*10 + 2, x_202); +x_206 = 1; +x_207 = l_Lean_Elab_Term_elabTerm(x_183, x_2, x_206, x_205, x_137); +return x_207; +} +} +} +} +} +} +else +{ +lean_object* x_220; lean_object* x_221; lean_object* x_222; uint8_t x_223; lean_object* x_243; uint8_t x_244; +x_220 = l_Lean_Syntax_getArg(x_8, x_7); +x_221 = lean_unsigned_to_nat(2u); +x_222 = l_Lean_Syntax_getArg(x_8, x_221); +x_243 = l_Lean_nullKind___closed__2; +lean_inc(x_222); +x_244 = l_Lean_Syntax_isOfKind(x_222, x_243); +if (x_244 == 0) +{ +uint8_t x_245; +x_245 = 0; +x_223 = x_245; +goto block_242; +} +else +{ +lean_object* x_246; lean_object* x_247; uint8_t x_248; +x_246 = l_Lean_Syntax_getArgs(x_222); +x_247 = lean_array_get_size(x_246); +lean_dec(x_246); +x_248 = lean_nat_dec_eq(x_247, x_11); +if (x_248 == 0) +{ +uint8_t x_249; +x_249 = lean_nat_dec_eq(x_247, x_7); +lean_dec(x_247); +x_223 = x_249; +goto block_242; +} +else +{ +lean_object* x_250; lean_object* x_251; lean_object* x_252; lean_object* x_253; lean_object* x_254; lean_object* x_255; lean_object* x_256; uint8_t x_257; lean_object* x_258; +lean_dec(x_247); +lean_dec(x_222); +x_250 = lean_unsigned_to_nat(4u); +x_251 = l_Lean_Syntax_getArg(x_8, x_250); +lean_dec(x_8); +x_252 = lean_unsigned_to_nat(3u); +x_253 = l_Lean_Syntax_getArg(x_1, x_252); +x_254 = l_Lean_Syntax_getArgs(x_220); +lean_dec(x_220); +x_255 = l_Lean_Syntax_getId(x_12); +lean_dec(x_12); +x_256 = l_Lean_mkHole(x_1); +x_257 = 0; +x_258 = l_Lean_Elab_Term_elabLetDeclAux(x_1, x_255, x_254, x_256, x_251, x_253, x_2, x_257, x_3, x_4); +lean_dec(x_254); +return x_258; +} +} +block_242: +{ +if (x_223 == 0) +{ +lean_object* x_224; +lean_dec(x_222); +lean_dec(x_220); +lean_dec(x_12); +lean_dec(x_8); +lean_dec(x_3); +lean_dec(x_2); +lean_dec(x_1); +x_224 = l_Lean_Elab_Term_throwUnsupportedSyntax___rarg(x_4); +return x_224; +} +else +{ +lean_object* x_225; lean_object* x_226; uint8_t x_227; +x_225 = l_Lean_Syntax_getArg(x_222, x_11); +lean_dec(x_222); +x_226 = l_Lean_Parser_Term_typeSpec___elambda__1___closed__2; +lean_inc(x_225); +x_227 = l_Lean_Syntax_isOfKind(x_225, x_226); +if (x_227 == 0) +{ +lean_object* x_228; +lean_dec(x_225); +lean_dec(x_220); +lean_dec(x_12); +lean_dec(x_8); +lean_dec(x_3); +lean_dec(x_2); +lean_dec(x_1); +x_228 = l_Lean_Elab_Term_throwUnsupportedSyntax___rarg(x_4); +return x_228; +} +else +{ +lean_object* x_229; lean_object* x_230; uint8_t x_231; +x_229 = l_Lean_Syntax_getArgs(x_225); +x_230 = lean_array_get_size(x_229); +lean_dec(x_229); +x_231 = lean_nat_dec_eq(x_230, x_221); +lean_dec(x_230); +if (x_231 == 0) +{ +lean_object* x_232; +lean_dec(x_225); +lean_dec(x_220); +lean_dec(x_12); +lean_dec(x_8); +lean_dec(x_3); +lean_dec(x_2); +lean_dec(x_1); +x_232 = l_Lean_Elab_Term_throwUnsupportedSyntax___rarg(x_4); +return x_232; +} +else +{ +lean_object* x_233; lean_object* x_234; lean_object* x_235; lean_object* x_236; lean_object* x_237; lean_object* x_238; lean_object* x_239; uint8_t x_240; lean_object* x_241; +x_233 = l_Lean_Syntax_getArg(x_225, x_7); +lean_dec(x_225); +x_234 = lean_unsigned_to_nat(4u); +x_235 = l_Lean_Syntax_getArg(x_8, x_234); +lean_dec(x_8); +x_236 = lean_unsigned_to_nat(3u); +x_237 = l_Lean_Syntax_getArg(x_1, x_236); +x_238 = l_Lean_Syntax_getArgs(x_220); +lean_dec(x_220); +x_239 = l_Lean_Syntax_getId(x_12); +lean_dec(x_12); +x_240 = 0; +x_241 = l_Lean_Elab_Term_elabLetDeclAux(x_1, x_239, x_238, x_233, x_235, x_237, x_2, x_240, x_3, x_4); +lean_dec(x_238); +return x_241; +} +} +} +} +} +} +} +} +} +} +} +lean_object* _init_l___regBuiltinTermElab_Lean_Elab_Term_elabLetBangDecl___closed__1() { +_start: +{ +lean_object* x_1; +x_1 = lean_mk_string("elabLetBangDecl"); +return x_1; +} +} +lean_object* _init_l___regBuiltinTermElab_Lean_Elab_Term_elabLetBangDecl___closed__2() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; +x_1 = l_Lean_Elab_Term_declareBuiltinTermElab___closed__3; +x_2 = l___regBuiltinTermElab_Lean_Elab_Term_elabLetBangDecl___closed__1; +x_3 = lean_name_mk_string(x_1, x_2); +return x_3; +} +} +lean_object* _init_l___regBuiltinTermElab_Lean_Elab_Term_elabLetBangDecl___closed__3() { +_start: +{ +lean_object* x_1; +x_1 = lean_alloc_closure((void*)(l_Lean_Elab_Term_elabLetBangDecl), 4, 0); +return x_1; +} +} +lean_object* l___regBuiltinTermElab_Lean_Elab_Term_elabLetBangDecl(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_Parser_Term_let_x21___elambda__1___closed__2; +x_3 = l___regBuiltinTermElab_Lean_Elab_Term_elabLetBangDecl___closed__2; +x_4 = l___regBuiltinTermElab_Lean_Elab_Term_elabLetBangDecl___closed__3; +x_5 = l_Lean_Elab_Term_addBuiltinTermElab(x_2, x_3, x_4, x_1); +return x_5; +} +} lean_object* l___private_Init_Lean_Elab_Binders_14__regTraceClasses(lean_object* x_1) { _start: { @@ -24665,6 +25534,19 @@ lean_mark_persistent(l___regBuiltinTermElab_Lean_Elab_Term_elabLetDecl___closed_ res = l___regBuiltinTermElab_Lean_Elab_Term_elabLetDecl(lean_io_mk_world()); if (lean_io_result_is_error(res)) return res; lean_dec_ref(res); +l_Lean_Elab_Term_elabLetBangDecl___closed__1 = _init_l_Lean_Elab_Term_elabLetBangDecl___closed__1(); +lean_mark_persistent(l_Lean_Elab_Term_elabLetBangDecl___closed__1); +l_Lean_Elab_Term_elabLetBangDecl___closed__2 = _init_l_Lean_Elab_Term_elabLetBangDecl___closed__2(); +lean_mark_persistent(l_Lean_Elab_Term_elabLetBangDecl___closed__2); +l___regBuiltinTermElab_Lean_Elab_Term_elabLetBangDecl___closed__1 = _init_l___regBuiltinTermElab_Lean_Elab_Term_elabLetBangDecl___closed__1(); +lean_mark_persistent(l___regBuiltinTermElab_Lean_Elab_Term_elabLetBangDecl___closed__1); +l___regBuiltinTermElab_Lean_Elab_Term_elabLetBangDecl___closed__2 = _init_l___regBuiltinTermElab_Lean_Elab_Term_elabLetBangDecl___closed__2(); +lean_mark_persistent(l___regBuiltinTermElab_Lean_Elab_Term_elabLetBangDecl___closed__2); +l___regBuiltinTermElab_Lean_Elab_Term_elabLetBangDecl___closed__3 = _init_l___regBuiltinTermElab_Lean_Elab_Term_elabLetBangDecl___closed__3(); +lean_mark_persistent(l___regBuiltinTermElab_Lean_Elab_Term_elabLetBangDecl___closed__3); +res = l___regBuiltinTermElab_Lean_Elab_Term_elabLetBangDecl(lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); res = l___private_Init_Lean_Elab_Binders_14__regTraceClasses(lean_io_mk_world()); if (lean_io_result_is_error(res)) return res; lean_dec_ref(res); diff --git a/stage0/stdlib/Init/Lean/Elab/BuiltinNotation.c b/stage0/stdlib/Init/Lean/Elab/BuiltinNotation.c index 4052fa9437..ea7d978e37 100644 --- a/stage0/stdlib/Init/Lean/Elab/BuiltinNotation.c +++ b/stage0/stdlib/Init/Lean/Elab/BuiltinNotation.c @@ -95,6 +95,7 @@ extern lean_object* l_Lean_Parser_Term_andM___elambda__1___closed__1; lean_object* l_Lean_Elab_Term_elabEquiv___closed__1; lean_object* l_Lean_Elab_Term_elabParserMacro___lambda__1___closed__17; lean_object* l_Lean_Elab_Term_elabEquiv___boxed(lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_mkIdentFrom(lean_object*, lean_object*); lean_object* l_Lean_Elab_Term_elabParserMacro___lambda__1___closed__4; extern lean_object* l_Lean_Parser_Term_pow___elambda__1___closed__1; lean_object* l_Lean_Elab_Term_expandSubtype(lean_object*, lean_object*, lean_object*); @@ -224,6 +225,7 @@ lean_object* l___regBuiltinMacro_Lean_Elab_Term_elabseq(lean_object*); lean_object* l_Lean_Elab_Term_elabTParserMacro___lambda__1___closed__10; lean_object* l_Lean_Elab_Term_elabLE___closed__1; lean_object* l_Lean_Elab_Term_ElabFComp___closed__4; +lean_object* l_Lean_Elab_Term_expandShow___closed__3; extern lean_object* l_Lean_Expr_iff_x3f___closed__2; lean_object* l_Lean_Elab_Term_expandIf(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Term_elabDiv___boxed(lean_object*, lean_object*, lean_object*); @@ -274,6 +276,7 @@ lean_object* l_Lean_Elab_Term_elabBAnd(lean_object*, lean_object*, lean_object*) lean_object* l_Lean_Elab_Term_elabParserMacro___lambda__1___closed__31; lean_object* l_Lean_Elab_Term_getCurrMacroScope(lean_object*, lean_object*); extern lean_object* l_Lean_Parser_Term_orM___elambda__1___closed__2; +extern lean_object* l___private_Init_Lean_Elab_Quotation_7__getHeadInfo___elambda__3___closed__4; extern lean_object* l_Lean_Parser_Term_orM___elambda__1___closed__1; lean_object* l___regBuiltinMacro_Lean_Elab_Term_expandDollarProj(lean_object*); lean_object* l___regBuiltinMacro_Lean_Elab_Term_expandDollar___closed__1; @@ -411,6 +414,8 @@ lean_object* l_Lean_Elab_Term_elabBEq(lean_object*, lean_object*, lean_object*); extern lean_object* l_Lean_Parser_Term_pow___elambda__1___closed__2; extern lean_object* l_Lean_Parser_Term_cons___elambda__1___closed__2; lean_object* l_Lean_Elab_Term_elabParserMacro___lambda__1___closed__1; +extern lean_object* l_Lean_Parser_Term_letIdDecl___closed__2; +extern lean_object* l_Lean_Parser_Term_let_x21___elambda__1___closed__1; lean_object* l___regBuiltinMacro_Lean_Elab_Term_expandDollarProj___closed__1; lean_object* l___regBuiltinMacro_Lean_Elab_Term_elabEquiv(lean_object*); lean_object* l_Lean_Elab_Term_elabParserMacro___closed__1; @@ -422,7 +427,6 @@ extern lean_object* l_Lean_Parser_Term_and___elambda__1___closed__2; lean_object* l_Lean_Elab_Term_elabAnonymousCtor___closed__13; extern lean_object* l_Lean_Parser_Term_mapRev___elambda__1___closed__1; lean_object* l___regBuiltinTermElab_Lean_Elab_Term_elabAnonymousCtor___closed__1; -lean_object* l_Lean_mkTermIdFrom(lean_object*, lean_object*); lean_object* l_Lean_Elab_Term_elabGT___closed__2; extern lean_object* l___private_Init_Lean_Elab_Quotation_7__getHeadInfo___elambda__3___closed__10; lean_object* l___regBuiltinMacro_Lean_Elab_Term_elabOr___closed__1; @@ -435,6 +439,7 @@ extern lean_object* l_Lean_Parser_Term_mapConst___elambda__1___closed__2; lean_object* l_Lean_Elab_Term_elabParserMacro___lambda__1___closed__15; lean_object* l_Lean_Elab_Term_elabHEq___boxed(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Term_elabOrM(lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Elab_Term_expandShow___closed__4; lean_object* l_Lean_Elab_Term_addBuiltinTermElab(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Term_elabAndThen___closed__2; uint8_t l_Lean_Syntax_isOfKind(lean_object*, lean_object*); @@ -480,6 +485,7 @@ lean_object* l_Lean_Elab_Term_elabBNe___boxed(lean_object*, lean_object*, lean_o lean_object* l_Lean_Elab_Term_elabTParserMacro___lambda__1___closed__1; lean_object* l_Lean_Elab_Term_elabSub___closed__1; lean_object* l_Lean_Elab_Term_elabMap(lean_object*, lean_object*, lean_object*); +extern lean_object* l_Lean_Parser_Term_let_x21___elambda__1___closed__2; lean_object* l___regBuiltinMacro_Lean_Elab_Term_elabProd___closed__1; lean_object* l_Lean_indentExpr(lean_object*); lean_object* l_Lean_Elab_Term_elabseqRight___closed__3; @@ -2293,33 +2299,55 @@ x_3 = lean_name_mk_string(x_1, x_2); return x_3; } } +lean_object* _init_l_Lean_Elab_Term_expandShow___closed__3() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; +x_1 = lean_box(0); +x_2 = l_Lean_Parser_Term_let_x21___elambda__1___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_Term_expandShow___closed__4() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; +x_1 = l_Array_empty___closed__1; +x_2 = l_Lean_Elab_Term_expandShow___closed__3; +x_3 = lean_array_push(x_1, x_2); +return x_3; +} +} lean_object* l_Lean_Elab_Term_expandShow(lean_object* x_1, lean_object* x_2, lean_object* x_3) { _start: { -uint8_t x_4; lean_object* x_65; uint8_t x_66; -x_65 = l_Lean_Parser_Term_show___elambda__1___closed__2; +uint8_t x_4; lean_object* x_50; uint8_t x_51; +x_50 = l_Lean_Parser_Term_show___elambda__1___closed__2; lean_inc(x_1); -x_66 = l_Lean_Syntax_isOfKind(x_1, x_65); -if (x_66 == 0) +x_51 = l_Lean_Syntax_isOfKind(x_1, x_50); +if (x_51 == 0) { -uint8_t x_67; -x_67 = 0; -x_4 = x_67; -goto block_64; +uint8_t x_52; +x_52 = 0; +x_4 = x_52; +goto block_49; } else { -lean_object* x_68; lean_object* x_69; lean_object* x_70; uint8_t x_71; -x_68 = l_Lean_Syntax_getArgs(x_1); -x_69 = lean_array_get_size(x_68); -lean_dec(x_68); -x_70 = lean_unsigned_to_nat(3u); -x_71 = lean_nat_dec_eq(x_69, x_70); -lean_dec(x_69); -x_4 = x_71; -goto block_64; +lean_object* x_53; lean_object* x_54; lean_object* x_55; uint8_t x_56; +x_53 = l_Lean_Syntax_getArgs(x_1); +x_54 = lean_array_get_size(x_53); +lean_dec(x_53); +x_55 = lean_unsigned_to_nat(3u); +x_56 = lean_nat_dec_eq(x_54, x_55); +lean_dec(x_54); +x_4 = x_56; +goto block_49; } -block_64: +block_49: { if (x_4 == 0) { @@ -2333,33 +2361,33 @@ return x_6; } else { -lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; uint8_t x_11; lean_object* x_58; uint8_t x_59; +lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; uint8_t x_11; lean_object* x_43; uint8_t x_44; x_7 = lean_unsigned_to_nat(1u); x_8 = l_Lean_Syntax_getArg(x_1, x_7); x_9 = lean_unsigned_to_nat(2u); x_10 = l_Lean_Syntax_getArg(x_1, x_9); -x_58 = l_Lean_Parser_Term_fromTerm___elambda__1___closed__2; +x_43 = l_Lean_Parser_Term_fromTerm___elambda__1___closed__2; lean_inc(x_10); -x_59 = l_Lean_Syntax_isOfKind(x_10, x_58); -if (x_59 == 0) +x_44 = l_Lean_Syntax_isOfKind(x_10, x_43); +if (x_44 == 0) { -uint8_t x_60; -x_60 = 0; -x_11 = x_60; -goto block_57; +uint8_t x_45; +x_45 = 0; +x_11 = x_45; +goto block_42; } else { -lean_object* x_61; lean_object* x_62; uint8_t x_63; -x_61 = l_Lean_Syntax_getArgs(x_10); -x_62 = lean_array_get_size(x_61); -lean_dec(x_61); -x_63 = lean_nat_dec_eq(x_62, x_9); -lean_dec(x_62); -x_11 = x_63; -goto block_57; +lean_object* x_46; lean_object* x_47; uint8_t x_48; +x_46 = l_Lean_Syntax_getArgs(x_10); +x_47 = lean_array_get_size(x_46); +lean_dec(x_46); +x_48 = lean_nat_dec_eq(x_47, x_9); +lean_dec(x_47); +x_11 = x_48; +goto block_42; } -block_57: +block_42: { if (x_11 == 0) { @@ -2375,76 +2403,49 @@ return x_13; } else { -lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; lean_object* x_20; lean_object* x_21; lean_object* x_22; lean_object* x_23; lean_object* x_24; lean_object* x_25; lean_object* x_26; lean_object* x_27; lean_object* x_28; lean_object* x_29; lean_object* x_30; lean_object* x_31; lean_object* x_32; lean_object* x_33; lean_object* x_34; lean_object* x_35; lean_object* x_36; lean_object* x_37; lean_object* x_38; lean_object* x_39; lean_object* x_40; lean_object* x_41; lean_object* x_42; lean_object* x_43; lean_object* x_44; lean_object* x_45; lean_object* x_46; lean_object* x_47; lean_object* x_48; lean_object* x_49; lean_object* x_50; lean_object* x_51; lean_object* x_52; lean_object* x_53; lean_object* x_54; lean_object* x_55; lean_object* x_56; +lean_object* x_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; 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_14 = l_Lean_Syntax_getArg(x_10, x_7); lean_dec(x_10); x_15 = l_Lean_Elab_Term_expandShow___closed__2; -x_16 = l_Lean_mkTermIdFrom(x_1, x_15); +x_16 = l_Lean_mkIdentFrom(x_1, x_15); lean_dec(x_1); x_17 = l_Array_empty___closed__1; lean_inc(x_16); x_18 = lean_array_push(x_17, x_16); -x_19 = l_Lean_Elab_Term_expandSubtype___closed__8; -x_20 = lean_array_push(x_19, x_8); -x_21 = l_Lean_Parser_Term_typeAscription___elambda__1___closed__2; -x_22 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_22, 0, x_21); -lean_ctor_set(x_22, 1, x_20); -x_23 = lean_array_push(x_17, x_22); -x_24 = l_Lean_nullKind___closed__2; -x_25 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_25, 0, x_24); -lean_ctor_set(x_25, 1, x_23); -x_26 = lean_array_push(x_18, x_25); +x_19 = l___private_Init_Lean_Elab_Term_5__expandCDot___main___closed__4; +x_20 = lean_array_push(x_18, x_19); +x_21 = l_Lean_Elab_Term_expandSubtype___closed__8; +x_22 = lean_array_push(x_21, x_8); +x_23 = l_Lean_Parser_Term_typeSpec___elambda__1___closed__2; +x_24 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_24, 0, x_23); +lean_ctor_set(x_24, 1, x_22); +x_25 = lean_array_push(x_17, x_24); +x_26 = l_Lean_nullKind___closed__2; x_27 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_27, 0, x_24); -lean_ctor_set(x_27, 1, x_26); -x_28 = l___private_Init_Lean_Elab_Quotation_5__quoteSyntax___main___closed__42; -x_29 = lean_array_push(x_28, x_27); -x_30 = l___private_Init_Lean_Elab_Quotation_5__quoteSyntax___main___closed__58; -x_31 = lean_array_push(x_29, x_30); -x_32 = l_Lean_Parser_Term_paren___elambda__1___closed__1; +lean_ctor_set(x_27, 0, x_26); +lean_ctor_set(x_27, 1, x_25); +x_28 = lean_array_push(x_20, x_27); +x_29 = l___private_Init_Lean_Elab_Quotation_7__getHeadInfo___elambda__3___closed__4; +x_30 = lean_array_push(x_28, x_29); +x_31 = lean_array_push(x_30, x_14); +x_32 = l_Lean_Parser_Term_letIdDecl___closed__2; x_33 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_33, 0, x_32); lean_ctor_set(x_33, 1, x_31); -x_34 = lean_array_push(x_17, x_33); -x_35 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_35, 0, x_24); -lean_ctor_set(x_35, 1, x_34); -x_36 = l_Lean_Elab_Term_expandCDot_x3f___closed__2; -x_37 = lean_array_push(x_36, x_35); -x_38 = l_Lean_Elab_Term_expandCDot_x3f___closed__3; -x_39 = lean_array_push(x_37, x_38); -x_40 = lean_array_push(x_39, x_16); -x_41 = l_Lean_Parser_Term_fun___elambda__1___closed__2; -x_42 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_42, 0, x_41); -lean_ctor_set(x_42, 1, x_40); -x_43 = lean_array_push(x_17, x_42); -x_44 = l___private_Init_Lean_Elab_Term_5__expandCDot___main___closed__4; -x_45 = lean_array_push(x_43, x_44); -x_46 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_46, 0, x_24); -lean_ctor_set(x_46, 1, x_45); -x_47 = lean_array_push(x_28, x_46); -x_48 = lean_array_push(x_47, x_30); -x_49 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_49, 0, x_32); -lean_ctor_set(x_49, 1, x_48); -x_50 = lean_array_push(x_17, x_49); -x_51 = lean_array_push(x_17, x_14); -x_52 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_52, 0, x_24); -lean_ctor_set(x_52, 1, x_51); -x_53 = lean_array_push(x_50, x_52); -x_54 = l_Lean_mkAppStx___closed__8; -x_55 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_55, 0, x_54); -lean_ctor_set(x_55, 1, x_53); -x_56 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_56, 0, x_55); -lean_ctor_set(x_56, 1, x_3); -return x_56; +x_34 = l_Lean_Elab_Term_expandShow___closed__4; +x_35 = lean_array_push(x_34, x_33); +x_36 = l___private_Init_Lean_Elab_Quotation_7__getHeadInfo___elambda__3___closed__10; +x_37 = lean_array_push(x_35, x_36); +x_38 = lean_array_push(x_37, x_16); +x_39 = l_Lean_Parser_Term_let_x21___elambda__1___closed__2; +x_40 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_40, 0, x_39); +lean_ctor_set(x_40, 1, x_38); +x_41 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_41, 0, x_40); +lean_ctor_set(x_41, 1, x_3); +return x_41; } } } @@ -2481,30 +2482,30 @@ return x_4; lean_object* l_Lean_Elab_Term_expandHave(lean_object* x_1, lean_object* x_2, lean_object* x_3) { _start: { -uint8_t x_4; lean_object* x_256; uint8_t x_257; -x_256 = l_Lean_Parser_Term_have___elambda__1___closed__2; +uint8_t x_4; lean_object* x_188; uint8_t x_189; +x_188 = l_Lean_Parser_Term_have___elambda__1___closed__2; lean_inc(x_1); -x_257 = l_Lean_Syntax_isOfKind(x_1, x_256); -if (x_257 == 0) +x_189 = l_Lean_Syntax_isOfKind(x_1, x_188); +if (x_189 == 0) { -uint8_t x_258; -x_258 = 0; -x_4 = x_258; -goto block_255; +uint8_t x_190; +x_190 = 0; +x_4 = x_190; +goto block_187; } else { -lean_object* x_259; lean_object* x_260; lean_object* x_261; uint8_t x_262; -x_259 = l_Lean_Syntax_getArgs(x_1); -x_260 = lean_array_get_size(x_259); -lean_dec(x_259); -x_261 = lean_unsigned_to_nat(6u); -x_262 = lean_nat_dec_eq(x_260, x_261); -lean_dec(x_260); -x_4 = x_262; -goto block_255; +lean_object* x_191; lean_object* x_192; lean_object* x_193; uint8_t x_194; +x_191 = l_Lean_Syntax_getArgs(x_1); +x_192 = lean_array_get_size(x_191); +lean_dec(x_191); +x_193 = lean_unsigned_to_nat(6u); +x_194 = lean_nat_dec_eq(x_192, x_193); +lean_dec(x_192); +x_4 = x_194; +goto block_187; } -block_255: +block_187: { if (x_4 == 0) { @@ -2518,32 +2519,32 @@ return x_6; } else { -lean_object* x_7; lean_object* x_8; uint8_t x_9; lean_object* x_131; uint8_t x_132; uint8_t x_133; +lean_object* x_7; lean_object* x_8; uint8_t x_9; lean_object* x_93; uint8_t x_94; uint8_t x_95; x_7 = lean_unsigned_to_nat(1u); x_8 = l_Lean_Syntax_getArg(x_1, x_7); -x_131 = l_Lean_nullKind___closed__2; +x_93 = l_Lean_nullKind___closed__2; lean_inc(x_8); -x_132 = l_Lean_Syntax_isOfKind(x_8, x_131); -if (x_132 == 0) +x_94 = l_Lean_Syntax_isOfKind(x_8, x_93); +if (x_94 == 0) { -uint8_t x_250; -x_250 = 0; -x_133 = x_250; -goto block_249; +uint8_t x_182; +x_182 = 0; +x_95 = x_182; +goto block_181; } else { -lean_object* x_251; lean_object* x_252; lean_object* x_253; uint8_t x_254; -x_251 = l_Lean_Syntax_getArgs(x_8); -x_252 = lean_array_get_size(x_251); -lean_dec(x_251); -x_253 = lean_unsigned_to_nat(0u); -x_254 = lean_nat_dec_eq(x_252, x_253); -lean_dec(x_252); -x_133 = x_254; -goto block_249; +lean_object* x_183; lean_object* x_184; lean_object* x_185; uint8_t x_186; +x_183 = l_Lean_Syntax_getArgs(x_8); +x_184 = lean_array_get_size(x_183); +lean_dec(x_183); +x_185 = lean_unsigned_to_nat(0u); +x_186 = lean_nat_dec_eq(x_184, x_185); +lean_dec(x_184); +x_95 = x_186; +goto block_181; } -block_130: +block_92: { if (x_9 == 0) { @@ -2558,7 +2559,7 @@ return x_11; } else { -lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; uint8_t x_18; uint8_t x_69; lean_object* x_124; uint8_t x_125; +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; uint8_t x_50; lean_object* x_86; uint8_t x_87; x_12 = lean_unsigned_to_nat(0u); x_13 = l_Lean_Syntax_getArg(x_8, x_12); lean_dec(x_8); @@ -2566,28 +2567,28 @@ x_14 = lean_unsigned_to_nat(2u); x_15 = l_Lean_Syntax_getArg(x_1, x_14); x_16 = lean_unsigned_to_nat(3u); x_17 = l_Lean_Syntax_getArg(x_1, x_16); -x_124 = l_Lean_Parser_Term_fromTerm___elambda__1___closed__2; +x_86 = l_Lean_Parser_Term_fromTerm___elambda__1___closed__2; lean_inc(x_17); -x_125 = l_Lean_Syntax_isOfKind(x_17, x_124); -if (x_125 == 0) +x_87 = l_Lean_Syntax_isOfKind(x_17, x_86); +if (x_87 == 0) { -uint8_t x_126; -x_126 = 0; -x_69 = x_126; -goto block_123; +uint8_t x_88; +x_88 = 0; +x_50 = x_88; +goto block_85; } else { -lean_object* x_127; lean_object* x_128; uint8_t x_129; -x_127 = l_Lean_Syntax_getArgs(x_17); -x_128 = lean_array_get_size(x_127); -lean_dec(x_127); -x_129 = lean_nat_dec_eq(x_128, x_14); -lean_dec(x_128); -x_69 = x_129; -goto block_123; +lean_object* x_89; lean_object* x_90; uint8_t x_91; +x_89 = l_Lean_Syntax_getArgs(x_17); +x_90 = lean_array_get_size(x_89); +lean_dec(x_89); +x_91 = lean_nat_dec_eq(x_90, x_14); +lean_dec(x_90); +x_50 = x_91; +goto block_85; } -block_68: +block_49: { if (x_18 == 0) { @@ -2604,7 +2605,7 @@ return x_20; } else { -lean_object* x_21; lean_object* x_22; lean_object* x_23; lean_object* x_24; lean_object* x_25; lean_object* x_26; lean_object* x_27; lean_object* x_28; lean_object* x_29; lean_object* x_30; lean_object* x_31; lean_object* x_32; lean_object* x_33; lean_object* x_34; lean_object* x_35; lean_object* x_36; lean_object* x_37; lean_object* x_38; lean_object* x_39; lean_object* x_40; lean_object* x_41; lean_object* x_42; lean_object* x_43; lean_object* x_44; lean_object* x_45; lean_object* x_46; lean_object* x_47; lean_object* x_48; lean_object* x_49; lean_object* x_50; lean_object* x_51; lean_object* x_52; lean_object* x_53; lean_object* x_54; lean_object* x_55; lean_object* x_56; lean_object* x_57; lean_object* x_58; lean_object* x_59; lean_object* x_60; lean_object* x_61; lean_object* x_62; lean_object* x_63; lean_object* x_64; lean_object* x_65; lean_object* x_66; lean_object* x_67; +lean_object* x_21; lean_object* x_22; lean_object* x_23; lean_object* x_24; lean_object* x_25; lean_object* x_26; lean_object* x_27; lean_object* x_28; lean_object* x_29; lean_object* x_30; lean_object* x_31; lean_object* x_32; lean_object* x_33; lean_object* x_34; lean_object* x_35; lean_object* x_36; lean_object* x_37; lean_object* x_38; lean_object* x_39; lean_object* x_40; lean_object* x_41; lean_object* x_42; lean_object* x_43; lean_object* x_44; lean_object* x_45; lean_object* x_46; lean_object* x_47; lean_object* x_48; x_21 = l_Lean_Syntax_getArg(x_17, x_7); lean_dec(x_17); x_22 = lean_unsigned_to_nat(5u); @@ -2614,421 +2615,301 @@ x_24 = l_Array_empty___closed__1; x_25 = lean_array_push(x_24, x_13); x_26 = l___private_Init_Lean_Elab_Quotation_11__letBindRhss___main___closed__17; x_27 = lean_array_push(x_25, x_26); -x_28 = l_Lean_mkTermIdFromIdent___closed__2; -x_29 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_29, 0, x_28); -lean_ctor_set(x_29, 1, x_27); -x_30 = lean_array_push(x_24, x_29); -x_31 = l_Lean_Elab_Term_expandSubtype___closed__8; -x_32 = lean_array_push(x_31, x_15); -x_33 = l_Lean_Parser_Term_typeAscription___elambda__1___closed__2; +x_28 = l_Lean_Elab_Term_expandSubtype___closed__8; +x_29 = lean_array_push(x_28, x_15); +x_30 = l_Lean_Parser_Term_typeSpec___elambda__1___closed__2; +x_31 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_31, 0, x_30); +lean_ctor_set(x_31, 1, x_29); +x_32 = lean_array_push(x_24, x_31); +x_33 = l_Lean_nullKind___closed__2; x_34 = lean_alloc_ctor(1, 2, 0); lean_ctor_set(x_34, 0, x_33); lean_ctor_set(x_34, 1, x_32); -x_35 = lean_array_push(x_24, x_34); -x_36 = l_Lean_nullKind___closed__2; -x_37 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_37, 0, x_36); -lean_ctor_set(x_37, 1, x_35); -x_38 = lean_array_push(x_30, x_37); -x_39 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_39, 0, x_36); -lean_ctor_set(x_39, 1, x_38); -x_40 = l___private_Init_Lean_Elab_Quotation_5__quoteSyntax___main___closed__42; -x_41 = lean_array_push(x_40, x_39); -x_42 = l___private_Init_Lean_Elab_Quotation_5__quoteSyntax___main___closed__58; -x_43 = lean_array_push(x_41, x_42); -x_44 = l_Lean_Parser_Term_paren___elambda__1___closed__1; -x_45 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_45, 0, x_44); -lean_ctor_set(x_45, 1, x_43); -x_46 = lean_array_push(x_24, x_45); +x_35 = lean_array_push(x_27, x_34); +x_36 = l___private_Init_Lean_Elab_Quotation_7__getHeadInfo___elambda__3___closed__4; +x_37 = lean_array_push(x_35, x_36); +x_38 = lean_array_push(x_37, x_21); +x_39 = l_Lean_Parser_Term_letIdDecl___closed__2; +x_40 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_40, 0, x_39); +lean_ctor_set(x_40, 1, x_38); +x_41 = l_Lean_Elab_Term_expandShow___closed__4; +x_42 = lean_array_push(x_41, x_40); +x_43 = l___private_Init_Lean_Elab_Quotation_7__getHeadInfo___elambda__3___closed__10; +x_44 = lean_array_push(x_42, x_43); +x_45 = lean_array_push(x_44, x_23); +x_46 = l_Lean_Parser_Term_let_x21___elambda__1___closed__2; x_47 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_47, 0, x_36); -lean_ctor_set(x_47, 1, x_46); -x_48 = l_Lean_Elab_Term_expandCDot_x3f___closed__2; -x_49 = lean_array_push(x_48, x_47); -x_50 = l_Lean_Elab_Term_expandCDot_x3f___closed__3; -x_51 = lean_array_push(x_49, x_50); -x_52 = lean_array_push(x_51, x_23); -x_53 = l_Lean_Parser_Term_fun___elambda__1___closed__2; -x_54 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_54, 0, x_53); -lean_ctor_set(x_54, 1, x_52); -x_55 = lean_array_push(x_24, x_54); -x_56 = lean_array_push(x_55, x_26); -x_57 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_57, 0, x_36); -lean_ctor_set(x_57, 1, x_56); -x_58 = lean_array_push(x_40, x_57); -x_59 = lean_array_push(x_58, x_42); -x_60 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_60, 0, x_44); -lean_ctor_set(x_60, 1, x_59); -x_61 = lean_array_push(x_24, x_60); -x_62 = lean_array_push(x_24, x_21); -x_63 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_63, 0, x_36); -lean_ctor_set(x_63, 1, x_62); -x_64 = lean_array_push(x_61, x_63); -x_65 = l_Lean_mkAppStx___closed__8; -x_66 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_66, 0, x_65); -lean_ctor_set(x_66, 1, x_64); -x_67 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_67, 0, x_66); -lean_ctor_set(x_67, 1, x_3); -return x_67; +lean_ctor_set(x_47, 0, x_46); +lean_ctor_set(x_47, 1, x_45); +x_48 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_48, 0, x_47); +lean_ctor_set(x_48, 1, x_3); +return x_48; } } -block_123: +block_85: { -if (x_69 == 0) +if (x_50 == 0) { -lean_object* x_70; uint8_t x_71; -x_70 = l_Lean_Parser_Term_haveAssign___elambda__1___closed__2; +lean_object* x_51; uint8_t x_52; +x_51 = l_Lean_Parser_Term_haveAssign___elambda__1___closed__2; lean_inc(x_17); -x_71 = l_Lean_Syntax_isOfKind(x_17, x_70); -if (x_71 == 0) +x_52 = l_Lean_Syntax_isOfKind(x_17, x_51); +if (x_52 == 0) { -uint8_t x_72; -x_72 = 0; -x_18 = x_72; -goto block_68; +uint8_t x_53; +x_53 = 0; +x_18 = x_53; +goto block_49; } else { -lean_object* x_73; lean_object* x_74; uint8_t x_75; -x_73 = l_Lean_Syntax_getArgs(x_17); -x_74 = lean_array_get_size(x_73); -lean_dec(x_73); -x_75 = lean_nat_dec_eq(x_74, x_14); -lean_dec(x_74); -x_18 = x_75; -goto block_68; +lean_object* x_54; lean_object* x_55; uint8_t x_56; +x_54 = l_Lean_Syntax_getArgs(x_17); +x_55 = lean_array_get_size(x_54); +lean_dec(x_54); +x_56 = lean_nat_dec_eq(x_55, x_14); +lean_dec(x_55); +x_18 = x_56; +goto block_49; } } 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; lean_object* x_89; lean_object* x_90; lean_object* x_91; lean_object* x_92; lean_object* x_93; lean_object* x_94; lean_object* x_95; lean_object* x_96; lean_object* x_97; lean_object* x_98; lean_object* x_99; lean_object* x_100; lean_object* x_101; lean_object* x_102; lean_object* x_103; lean_object* x_104; lean_object* x_105; lean_object* x_106; lean_object* x_107; lean_object* x_108; lean_object* x_109; lean_object* x_110; lean_object* x_111; lean_object* x_112; lean_object* x_113; lean_object* x_114; lean_object* x_115; lean_object* x_116; lean_object* x_117; lean_object* x_118; lean_object* x_119; lean_object* x_120; lean_object* x_121; lean_object* x_122; -x_76 = l_Lean_Syntax_getArg(x_17, x_7); +lean_object* x_57; lean_object* x_58; lean_object* x_59; lean_object* x_60; lean_object* x_61; lean_object* x_62; lean_object* x_63; lean_object* x_64; lean_object* x_65; lean_object* x_66; lean_object* x_67; lean_object* x_68; lean_object* x_69; lean_object* x_70; lean_object* x_71; lean_object* x_72; lean_object* x_73; lean_object* x_74; lean_object* x_75; lean_object* x_76; lean_object* x_77; lean_object* x_78; lean_object* x_79; lean_object* x_80; lean_object* x_81; lean_object* x_82; lean_object* x_83; lean_object* x_84; +x_57 = l_Lean_Syntax_getArg(x_17, x_7); lean_dec(x_17); -x_77 = lean_unsigned_to_nat(5u); -x_78 = l_Lean_Syntax_getArg(x_1, x_77); +x_58 = lean_unsigned_to_nat(5u); +x_59 = l_Lean_Syntax_getArg(x_1, x_58); lean_dec(x_1); -x_79 = l_Array_empty___closed__1; -x_80 = lean_array_push(x_79, x_13); -x_81 = l___private_Init_Lean_Elab_Quotation_11__letBindRhss___main___closed__17; -x_82 = lean_array_push(x_80, x_81); -x_83 = l_Lean_mkTermIdFromIdent___closed__2; -x_84 = lean_alloc_ctor(1, 2, 0); +x_60 = l_Array_empty___closed__1; +x_61 = lean_array_push(x_60, x_13); +x_62 = l___private_Init_Lean_Elab_Quotation_11__letBindRhss___main___closed__17; +x_63 = lean_array_push(x_61, x_62); +x_64 = l_Lean_Elab_Term_expandSubtype___closed__8; +x_65 = lean_array_push(x_64, x_15); +x_66 = l_Lean_Parser_Term_typeSpec___elambda__1___closed__2; +x_67 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_67, 0, x_66); +lean_ctor_set(x_67, 1, x_65); +x_68 = lean_array_push(x_60, x_67); +x_69 = l_Lean_nullKind___closed__2; +x_70 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_70, 0, x_69); +lean_ctor_set(x_70, 1, x_68); +x_71 = lean_array_push(x_63, x_70); +x_72 = l___private_Init_Lean_Elab_Quotation_7__getHeadInfo___elambda__3___closed__4; +x_73 = lean_array_push(x_71, x_72); +x_74 = lean_array_push(x_73, x_57); +x_75 = l_Lean_Parser_Term_letIdDecl___closed__2; +x_76 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_76, 0, x_75); +lean_ctor_set(x_76, 1, x_74); +x_77 = l_Lean_Elab_Term_expandShow___closed__4; +x_78 = lean_array_push(x_77, x_76); +x_79 = l___private_Init_Lean_Elab_Quotation_7__getHeadInfo___elambda__3___closed__10; +x_80 = lean_array_push(x_78, x_79); +x_81 = lean_array_push(x_80, x_59); +x_82 = l_Lean_Parser_Term_let_x21___elambda__1___closed__2; +x_83 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_83, 0, x_82); +lean_ctor_set(x_83, 1, x_81); +x_84 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_84, 0, x_83); -lean_ctor_set(x_84, 1, x_82); -x_85 = lean_array_push(x_79, x_84); -x_86 = l_Lean_Elab_Term_expandSubtype___closed__8; -x_87 = lean_array_push(x_86, x_15); -x_88 = l_Lean_Parser_Term_typeAscription___elambda__1___closed__2; -x_89 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_89, 0, x_88); -lean_ctor_set(x_89, 1, x_87); -x_90 = lean_array_push(x_79, x_89); -x_91 = l_Lean_nullKind___closed__2; -x_92 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_92, 0, x_91); -lean_ctor_set(x_92, 1, x_90); -x_93 = lean_array_push(x_85, x_92); -x_94 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_94, 0, x_91); -lean_ctor_set(x_94, 1, x_93); -x_95 = l___private_Init_Lean_Elab_Quotation_5__quoteSyntax___main___closed__42; -x_96 = lean_array_push(x_95, x_94); -x_97 = l___private_Init_Lean_Elab_Quotation_5__quoteSyntax___main___closed__58; -x_98 = lean_array_push(x_96, x_97); -x_99 = l_Lean_Parser_Term_paren___elambda__1___closed__1; -x_100 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_100, 0, x_99); -lean_ctor_set(x_100, 1, x_98); -x_101 = lean_array_push(x_79, x_100); -x_102 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_102, 0, x_91); -lean_ctor_set(x_102, 1, x_101); -x_103 = l_Lean_Elab_Term_expandCDot_x3f___closed__2; -x_104 = lean_array_push(x_103, x_102); -x_105 = l_Lean_Elab_Term_expandCDot_x3f___closed__3; -x_106 = lean_array_push(x_104, x_105); -x_107 = lean_array_push(x_106, x_78); -x_108 = l_Lean_Parser_Term_fun___elambda__1___closed__2; -x_109 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_109, 0, x_108); -lean_ctor_set(x_109, 1, x_107); -x_110 = lean_array_push(x_79, x_109); -x_111 = lean_array_push(x_110, x_81); -x_112 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_112, 0, x_91); -lean_ctor_set(x_112, 1, x_111); -x_113 = lean_array_push(x_95, x_112); -x_114 = lean_array_push(x_113, x_97); -x_115 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_115, 0, x_99); -lean_ctor_set(x_115, 1, x_114); -x_116 = lean_array_push(x_79, x_115); -x_117 = lean_array_push(x_79, x_76); -x_118 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_118, 0, x_91); -lean_ctor_set(x_118, 1, x_117); -x_119 = lean_array_push(x_116, x_118); -x_120 = l_Lean_mkAppStx___closed__8; -x_121 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_121, 0, x_120); -lean_ctor_set(x_121, 1, x_119); -x_122 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_122, 0, x_121); -lean_ctor_set(x_122, 1, x_3); -return x_122; +lean_ctor_set(x_84, 1, x_3); +return x_84; } } } } -block_249: +block_181: { -if (x_133 == 0) +if (x_95 == 0) { -if (x_132 == 0) +if (x_94 == 0) { -uint8_t x_134; -x_134 = 0; -x_9 = x_134; -goto block_130; +uint8_t x_96; +x_96 = 0; +x_9 = x_96; +goto block_92; } else { -lean_object* x_135; lean_object* x_136; lean_object* x_137; uint8_t x_138; -x_135 = l_Lean_Syntax_getArgs(x_8); -x_136 = lean_array_get_size(x_135); -lean_dec(x_135); -x_137 = lean_unsigned_to_nat(2u); -x_138 = lean_nat_dec_eq(x_136, x_137); -lean_dec(x_136); -x_9 = x_138; -goto block_130; +lean_object* x_97; lean_object* x_98; lean_object* x_99; uint8_t x_100; +x_97 = l_Lean_Syntax_getArgs(x_8); +x_98 = lean_array_get_size(x_97); +lean_dec(x_97); +x_99 = lean_unsigned_to_nat(2u); +x_100 = lean_nat_dec_eq(x_98, x_99); +lean_dec(x_98); +x_9 = x_100; +goto block_92; } } else { -lean_object* x_139; lean_object* x_140; lean_object* x_141; lean_object* x_142; uint8_t x_143; uint8_t x_191; lean_object* x_243; uint8_t x_244; +lean_object* x_101; lean_object* x_102; lean_object* x_103; lean_object* x_104; uint8_t x_105; uint8_t x_138; lean_object* x_175; uint8_t x_176; lean_dec(x_8); -x_139 = lean_unsigned_to_nat(2u); -x_140 = l_Lean_Syntax_getArg(x_1, x_139); -x_141 = lean_unsigned_to_nat(3u); -x_142 = l_Lean_Syntax_getArg(x_1, x_141); -x_243 = l_Lean_Parser_Term_fromTerm___elambda__1___closed__2; -lean_inc(x_142); -x_244 = l_Lean_Syntax_isOfKind(x_142, x_243); -if (x_244 == 0) +x_101 = lean_unsigned_to_nat(2u); +x_102 = l_Lean_Syntax_getArg(x_1, x_101); +x_103 = lean_unsigned_to_nat(3u); +x_104 = l_Lean_Syntax_getArg(x_1, x_103); +x_175 = l_Lean_Parser_Term_fromTerm___elambda__1___closed__2; +lean_inc(x_104); +x_176 = l_Lean_Syntax_isOfKind(x_104, x_175); +if (x_176 == 0) { -uint8_t x_245; -x_245 = 0; -x_191 = x_245; -goto block_242; +uint8_t x_177; +x_177 = 0; +x_138 = x_177; +goto block_174; } else { -lean_object* x_246; lean_object* x_247; uint8_t x_248; -x_246 = l_Lean_Syntax_getArgs(x_142); -x_247 = lean_array_get_size(x_246); -lean_dec(x_246); -x_248 = lean_nat_dec_eq(x_247, x_139); -lean_dec(x_247); -x_191 = x_248; -goto block_242; +lean_object* x_178; lean_object* x_179; uint8_t x_180; +x_178 = l_Lean_Syntax_getArgs(x_104); +x_179 = lean_array_get_size(x_178); +lean_dec(x_178); +x_180 = lean_nat_dec_eq(x_179, x_101); +lean_dec(x_179); +x_138 = x_180; +goto block_174; } -block_190: +block_137: { -if (x_143 == 0) +if (x_105 == 0) { -lean_object* x_144; lean_object* x_145; -lean_dec(x_142); -lean_dec(x_140); +lean_object* x_106; lean_object* x_107; +lean_dec(x_104); +lean_dec(x_102); lean_dec(x_1); -x_144 = lean_box(1); -x_145 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_145, 0, x_144); -lean_ctor_set(x_145, 1, x_3); -return x_145; +x_106 = lean_box(1); +x_107 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_107, 0, x_106); +lean_ctor_set(x_107, 1, x_3); +return x_107; } else { -lean_object* x_146; lean_object* x_147; lean_object* x_148; lean_object* x_149; lean_object* x_150; lean_object* x_151; lean_object* x_152; lean_object* x_153; lean_object* x_154; lean_object* x_155; lean_object* x_156; lean_object* x_157; lean_object* x_158; lean_object* x_159; lean_object* x_160; lean_object* x_161; lean_object* x_162; lean_object* x_163; lean_object* x_164; lean_object* x_165; lean_object* x_166; lean_object* x_167; lean_object* x_168; lean_object* x_169; lean_object* x_170; lean_object* x_171; lean_object* x_172; lean_object* x_173; lean_object* x_174; lean_object* x_175; lean_object* x_176; lean_object* x_177; lean_object* x_178; lean_object* x_179; lean_object* x_180; lean_object* x_181; lean_object* x_182; lean_object* x_183; lean_object* x_184; lean_object* x_185; lean_object* x_186; lean_object* x_187; lean_object* x_188; lean_object* x_189; -x_146 = l_Lean_Syntax_getArg(x_142, x_7); -lean_dec(x_142); -x_147 = lean_unsigned_to_nat(5u); -x_148 = l_Lean_Syntax_getArg(x_1, x_147); -x_149 = l_Lean_Elab_Term_expandShow___closed__2; -x_150 = l_Lean_mkTermIdFrom(x_1, x_149); +lean_object* x_108; lean_object* x_109; lean_object* x_110; lean_object* x_111; lean_object* x_112; lean_object* x_113; lean_object* x_114; lean_object* x_115; lean_object* x_116; lean_object* x_117; lean_object* x_118; lean_object* x_119; lean_object* x_120; lean_object* x_121; lean_object* x_122; lean_object* x_123; lean_object* x_124; lean_object* x_125; lean_object* x_126; lean_object* x_127; lean_object* x_128; lean_object* x_129; lean_object* x_130; lean_object* x_131; lean_object* x_132; lean_object* x_133; lean_object* x_134; lean_object* x_135; lean_object* x_136; +x_108 = l_Lean_Syntax_getArg(x_104, x_7); +lean_dec(x_104); +x_109 = lean_unsigned_to_nat(5u); +x_110 = l_Lean_Syntax_getArg(x_1, x_109); +x_111 = l_Lean_Elab_Term_expandShow___closed__2; +x_112 = l_Lean_mkIdentFrom(x_1, x_111); lean_dec(x_1); -x_151 = l_Array_empty___closed__1; -x_152 = lean_array_push(x_151, x_150); -x_153 = l_Lean_Elab_Term_expandSubtype___closed__8; -x_154 = lean_array_push(x_153, x_140); -x_155 = l_Lean_Parser_Term_typeAscription___elambda__1___closed__2; -x_156 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_156, 0, x_155); -lean_ctor_set(x_156, 1, x_154); -x_157 = lean_array_push(x_151, x_156); -x_158 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_158, 0, x_131); -lean_ctor_set(x_158, 1, x_157); -x_159 = lean_array_push(x_152, x_158); -x_160 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_160, 0, x_131); -lean_ctor_set(x_160, 1, x_159); -x_161 = l___private_Init_Lean_Elab_Quotation_5__quoteSyntax___main___closed__42; -x_162 = lean_array_push(x_161, x_160); -x_163 = l___private_Init_Lean_Elab_Quotation_5__quoteSyntax___main___closed__58; -x_164 = lean_array_push(x_162, x_163); -x_165 = l_Lean_Parser_Term_paren___elambda__1___closed__1; -x_166 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_166, 0, x_165); -lean_ctor_set(x_166, 1, x_164); -x_167 = lean_array_push(x_151, x_166); -x_168 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_168, 0, x_131); -lean_ctor_set(x_168, 1, x_167); -x_169 = l_Lean_Elab_Term_expandCDot_x3f___closed__2; -x_170 = lean_array_push(x_169, x_168); -x_171 = l_Lean_Elab_Term_expandCDot_x3f___closed__3; -x_172 = lean_array_push(x_170, x_171); -x_173 = lean_array_push(x_172, x_148); -x_174 = l_Lean_Parser_Term_fun___elambda__1___closed__2; -x_175 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_175, 0, x_174); -lean_ctor_set(x_175, 1, x_173); -x_176 = lean_array_push(x_151, x_175); -x_177 = l___private_Init_Lean_Elab_Quotation_11__letBindRhss___main___closed__17; -x_178 = lean_array_push(x_176, x_177); -x_179 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_179, 0, x_131); -lean_ctor_set(x_179, 1, x_178); -x_180 = lean_array_push(x_161, x_179); -x_181 = lean_array_push(x_180, x_163); -x_182 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_182, 0, x_165); -lean_ctor_set(x_182, 1, x_181); -x_183 = lean_array_push(x_151, x_182); -x_184 = lean_array_push(x_151, x_146); -x_185 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_185, 0, x_131); -lean_ctor_set(x_185, 1, x_184); -x_186 = lean_array_push(x_183, x_185); -x_187 = l_Lean_mkAppStx___closed__8; -x_188 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_188, 0, x_187); -lean_ctor_set(x_188, 1, x_186); -x_189 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_189, 0, x_188); -lean_ctor_set(x_189, 1, x_3); -return x_189; +x_113 = l_Array_empty___closed__1; +x_114 = lean_array_push(x_113, x_112); +x_115 = l___private_Init_Lean_Elab_Quotation_11__letBindRhss___main___closed__17; +x_116 = lean_array_push(x_114, x_115); +x_117 = l_Lean_Elab_Term_expandSubtype___closed__8; +x_118 = lean_array_push(x_117, x_102); +x_119 = l_Lean_Parser_Term_typeSpec___elambda__1___closed__2; +x_120 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_120, 0, x_119); +lean_ctor_set(x_120, 1, x_118); +x_121 = lean_array_push(x_113, x_120); +x_122 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_122, 0, x_93); +lean_ctor_set(x_122, 1, x_121); +x_123 = lean_array_push(x_116, x_122); +x_124 = l___private_Init_Lean_Elab_Quotation_7__getHeadInfo___elambda__3___closed__4; +x_125 = lean_array_push(x_123, x_124); +x_126 = lean_array_push(x_125, x_108); +x_127 = l_Lean_Parser_Term_letIdDecl___closed__2; +x_128 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_128, 0, x_127); +lean_ctor_set(x_128, 1, x_126); +x_129 = l_Lean_Elab_Term_expandShow___closed__4; +x_130 = lean_array_push(x_129, x_128); +x_131 = l___private_Init_Lean_Elab_Quotation_7__getHeadInfo___elambda__3___closed__10; +x_132 = lean_array_push(x_130, x_131); +x_133 = lean_array_push(x_132, x_110); +x_134 = l_Lean_Parser_Term_let_x21___elambda__1___closed__2; +x_135 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_135, 0, x_134); +lean_ctor_set(x_135, 1, x_133); +x_136 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_136, 0, x_135); +lean_ctor_set(x_136, 1, x_3); +return x_136; } } -block_242: +block_174: { -if (x_191 == 0) +if (x_138 == 0) { -lean_object* x_192; uint8_t x_193; -x_192 = l_Lean_Parser_Term_haveAssign___elambda__1___closed__2; -lean_inc(x_142); -x_193 = l_Lean_Syntax_isOfKind(x_142, x_192); -if (x_193 == 0) +lean_object* x_139; uint8_t x_140; +x_139 = l_Lean_Parser_Term_haveAssign___elambda__1___closed__2; +lean_inc(x_104); +x_140 = l_Lean_Syntax_isOfKind(x_104, x_139); +if (x_140 == 0) { -uint8_t x_194; -x_194 = 0; -x_143 = x_194; -goto block_190; +uint8_t x_141; +x_141 = 0; +x_105 = x_141; +goto block_137; } else { -lean_object* x_195; lean_object* x_196; uint8_t x_197; -x_195 = l_Lean_Syntax_getArgs(x_142); -x_196 = lean_array_get_size(x_195); -lean_dec(x_195); -x_197 = lean_nat_dec_eq(x_196, x_139); -lean_dec(x_196); -x_143 = x_197; -goto block_190; -} -} -else -{ -lean_object* x_198; lean_object* x_199; lean_object* x_200; lean_object* x_201; lean_object* x_202; lean_object* x_203; lean_object* x_204; lean_object* x_205; lean_object* x_206; lean_object* x_207; lean_object* x_208; lean_object* x_209; lean_object* x_210; lean_object* x_211; lean_object* x_212; lean_object* x_213; lean_object* x_214; lean_object* x_215; lean_object* x_216; lean_object* x_217; lean_object* x_218; lean_object* x_219; lean_object* x_220; lean_object* x_221; lean_object* x_222; lean_object* x_223; lean_object* x_224; lean_object* x_225; lean_object* x_226; lean_object* x_227; lean_object* x_228; lean_object* x_229; lean_object* x_230; lean_object* x_231; lean_object* x_232; lean_object* x_233; lean_object* x_234; lean_object* x_235; lean_object* x_236; lean_object* x_237; lean_object* x_238; lean_object* x_239; lean_object* x_240; lean_object* x_241; -x_198 = l_Lean_Syntax_getArg(x_142, x_7); +lean_object* x_142; lean_object* x_143; uint8_t x_144; +x_142 = l_Lean_Syntax_getArgs(x_104); +x_143 = lean_array_get_size(x_142); lean_dec(x_142); -x_199 = lean_unsigned_to_nat(5u); -x_200 = l_Lean_Syntax_getArg(x_1, x_199); -x_201 = l_Lean_Elab_Term_expandShow___closed__2; -x_202 = l_Lean_mkTermIdFrom(x_1, x_201); +x_144 = lean_nat_dec_eq(x_143, x_101); +lean_dec(x_143); +x_105 = x_144; +goto block_137; +} +} +else +{ +lean_object* x_145; lean_object* x_146; lean_object* x_147; lean_object* x_148; lean_object* x_149; lean_object* x_150; lean_object* x_151; lean_object* x_152; lean_object* x_153; lean_object* x_154; lean_object* x_155; lean_object* x_156; lean_object* x_157; lean_object* x_158; lean_object* x_159; lean_object* x_160; lean_object* x_161; lean_object* x_162; lean_object* x_163; lean_object* x_164; lean_object* x_165; lean_object* x_166; lean_object* x_167; lean_object* x_168; lean_object* x_169; lean_object* x_170; lean_object* x_171; lean_object* x_172; lean_object* x_173; +x_145 = l_Lean_Syntax_getArg(x_104, x_7); +lean_dec(x_104); +x_146 = lean_unsigned_to_nat(5u); +x_147 = l_Lean_Syntax_getArg(x_1, x_146); +x_148 = l_Lean_Elab_Term_expandShow___closed__2; +x_149 = l_Lean_mkIdentFrom(x_1, x_148); lean_dec(x_1); -x_203 = l_Array_empty___closed__1; -x_204 = lean_array_push(x_203, x_202); -x_205 = l_Lean_Elab_Term_expandSubtype___closed__8; -x_206 = lean_array_push(x_205, x_140); -x_207 = l_Lean_Parser_Term_typeAscription___elambda__1___closed__2; -x_208 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_208, 0, x_207); -lean_ctor_set(x_208, 1, x_206); -x_209 = lean_array_push(x_203, x_208); -x_210 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_210, 0, x_131); -lean_ctor_set(x_210, 1, x_209); -x_211 = lean_array_push(x_204, x_210); -x_212 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_212, 0, x_131); -lean_ctor_set(x_212, 1, x_211); -x_213 = l___private_Init_Lean_Elab_Quotation_5__quoteSyntax___main___closed__42; -x_214 = lean_array_push(x_213, x_212); -x_215 = l___private_Init_Lean_Elab_Quotation_5__quoteSyntax___main___closed__58; -x_216 = lean_array_push(x_214, x_215); -x_217 = l_Lean_Parser_Term_paren___elambda__1___closed__1; -x_218 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_218, 0, x_217); -lean_ctor_set(x_218, 1, x_216); -x_219 = lean_array_push(x_203, x_218); -x_220 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_220, 0, x_131); -lean_ctor_set(x_220, 1, x_219); -x_221 = l_Lean_Elab_Term_expandCDot_x3f___closed__2; -x_222 = lean_array_push(x_221, x_220); -x_223 = l_Lean_Elab_Term_expandCDot_x3f___closed__3; -x_224 = lean_array_push(x_222, x_223); -x_225 = lean_array_push(x_224, x_200); -x_226 = l_Lean_Parser_Term_fun___elambda__1___closed__2; -x_227 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_227, 0, x_226); -lean_ctor_set(x_227, 1, x_225); -x_228 = lean_array_push(x_203, x_227); -x_229 = l___private_Init_Lean_Elab_Quotation_11__letBindRhss___main___closed__17; -x_230 = lean_array_push(x_228, x_229); -x_231 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_231, 0, x_131); -lean_ctor_set(x_231, 1, x_230); -x_232 = lean_array_push(x_213, x_231); -x_233 = lean_array_push(x_232, x_215); -x_234 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_234, 0, x_217); -lean_ctor_set(x_234, 1, x_233); -x_235 = lean_array_push(x_203, x_234); -x_236 = lean_array_push(x_203, x_198); -x_237 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_237, 0, x_131); -lean_ctor_set(x_237, 1, x_236); -x_238 = lean_array_push(x_235, x_237); -x_239 = l_Lean_mkAppStx___closed__8; -x_240 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_240, 0, x_239); -lean_ctor_set(x_240, 1, x_238); -x_241 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_241, 0, x_240); -lean_ctor_set(x_241, 1, x_3); -return x_241; +x_150 = l_Array_empty___closed__1; +x_151 = lean_array_push(x_150, x_149); +x_152 = l___private_Init_Lean_Elab_Quotation_11__letBindRhss___main___closed__17; +x_153 = lean_array_push(x_151, x_152); +x_154 = l_Lean_Elab_Term_expandSubtype___closed__8; +x_155 = lean_array_push(x_154, x_102); +x_156 = l_Lean_Parser_Term_typeSpec___elambda__1___closed__2; +x_157 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_157, 0, x_156); +lean_ctor_set(x_157, 1, x_155); +x_158 = lean_array_push(x_150, x_157); +x_159 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_159, 0, x_93); +lean_ctor_set(x_159, 1, x_158); +x_160 = lean_array_push(x_153, x_159); +x_161 = l___private_Init_Lean_Elab_Quotation_7__getHeadInfo___elambda__3___closed__4; +x_162 = lean_array_push(x_160, x_161); +x_163 = lean_array_push(x_162, x_145); +x_164 = l_Lean_Parser_Term_letIdDecl___closed__2; +x_165 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_165, 0, x_164); +lean_ctor_set(x_165, 1, x_163); +x_166 = l_Lean_Elab_Term_expandShow___closed__4; +x_167 = lean_array_push(x_166, x_165); +x_168 = l___private_Init_Lean_Elab_Quotation_7__getHeadInfo___elambda__3___closed__10; +x_169 = lean_array_push(x_167, x_168); +x_170 = lean_array_push(x_169, x_147); +x_171 = l_Lean_Parser_Term_let_x21___elambda__1___closed__2; +x_172 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_172, 0, x_171); +lean_ctor_set(x_172, 1, x_170); +x_173 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_173, 0, x_172); +lean_ctor_set(x_173, 1, x_3); +return x_173; } } } @@ -6813,6 +6694,10 @@ l_Lean_Elab_Term_expandShow___closed__1 = _init_l_Lean_Elab_Term_expandShow___cl lean_mark_persistent(l_Lean_Elab_Term_expandShow___closed__1); l_Lean_Elab_Term_expandShow___closed__2 = _init_l_Lean_Elab_Term_expandShow___closed__2(); lean_mark_persistent(l_Lean_Elab_Term_expandShow___closed__2); +l_Lean_Elab_Term_expandShow___closed__3 = _init_l_Lean_Elab_Term_expandShow___closed__3(); +lean_mark_persistent(l_Lean_Elab_Term_expandShow___closed__3); +l_Lean_Elab_Term_expandShow___closed__4 = _init_l_Lean_Elab_Term_expandShow___closed__4(); +lean_mark_persistent(l_Lean_Elab_Term_expandShow___closed__4); l___regBuiltinMacro_Lean_Elab_Term_expandShow___closed__1 = _init_l___regBuiltinMacro_Lean_Elab_Term_expandShow___closed__1(); lean_mark_persistent(l___regBuiltinMacro_Lean_Elab_Term_expandShow___closed__1); res = l___regBuiltinMacro_Lean_Elab_Term_expandShow(lean_io_mk_world()); diff --git a/stage0/stdlib/Init/Lean/Elab/Tactic/Induction.c b/stage0/stdlib/Init/Lean/Elab/Tactic/Induction.c index 2c3d9e16ea..596e8b2b45 100644 --- a/stage0/stdlib/Init/Lean/Elab/Tactic/Induction.c +++ b/stage0/stdlib/Init/Lean/Elab/Tactic/Induction.c @@ -14,32 +14,41 @@ extern "C" { #endif lean_object* l_Lean_Elab_Tactic_getRecFromUsing___closed__5; +lean_object* l___private_Init_Lean_Elab_Tactic_Induction_16__checkCasesResultAux___main___closed__9; lean_object* l_Lean_Elab_Tactic_evalCases(lean_object*, lean_object*, lean_object*); extern lean_object* l_Lean_Name_toString___closed__1; lean_object* l_Lean_Meta_induction___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___private_Init_Lean_Elab_Tactic_Induction_15__processResult___closed__2; lean_object* l_Nat_forMAux___main___at___private_Init_Lean_Elab_Tactic_Induction_15__processResult___spec__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l___private_Init_Lean_Elab_Tactic_Induction_16__checkCasesResultAux___main___closed__1; +lean_object* l___private_Init_Lean_Elab_Tactic_Induction_16__checkCasesResultAux___main___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Name_eraseMacroScopes(lean_object*); lean_object* l_Array_forMAux___main___at___private_Init_Lean_Elab_Tactic_Induction_11__checkAltCtorNames___spec__2___closed__4; lean_object* l_Lean_Elab_Tactic_withMVarContext___rarg(lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l___private_Init_Lean_Elab_Tactic_Induction_16__checkCasesResultAux___main___closed__2; lean_object* lean_local_ctx_get_unused_name(lean_object*, lean_object*); +lean_object* lean_mk_empty_array_with_capacity(lean_object*); lean_object* l_Lean_Elab_Tactic_withMainMVarContext___rarg(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___private_Init_Lean_Elab_Tactic_Induction_3__elabMajor___lambda__2(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Tactic_getRecFromUsing___closed__3; +lean_object* l___private_Init_Lean_Elab_Tactic_Induction_16__checkCasesResultAux___main___closed__8; lean_object* l_Array_forMAux___main___at___private_Init_Lean_Elab_Tactic_Induction_11__checkAltCtorNames___spec__2___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Array_forMAux___main___at___private_Init_Lean_Elab_Tactic_Induction_11__checkAltCtorNames___spec__2___closed__1; lean_object* l___regBuiltinTactic_Lean_Elab_Tactic_evalCases___closed__1; lean_object* l_Array_eraseIdx___rarg(lean_object*, lean_object*); +lean_object* l___private_Init_Lean_Elab_Tactic_Induction_16__checkCasesResultAux(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___private_Init_Lean_Elab_Tactic_Induction_15__processResult___closed__8; lean_object* l_Lean_Elab_Tactic_evalInduction___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___private_Init_Lean_Elab_Tactic_Induction_7__getAlts(lean_object*); lean_object* l___regBuiltinTactic_Lean_Elab_Tactic_evalCases___closed__2; +lean_object* l___private_Init_Lean_Elab_Tactic_Induction_16__checkCasesResultAux___main___closed__4; uint8_t lean_name_eq(lean_object*, lean_object*); lean_object* l___private_Init_Lean_Elab_Tactic_Induction_5__getGeneralizingFVarIds___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___private_Init_Lean_Elab_Tactic_Induction_15__processResult___closed__4; lean_object* l_Lean_Syntax_getIdAt(lean_object*, lean_object*); lean_object* l_Lean_Elab_Tactic_trace(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Tactic_getLCtx___boxed(lean_object*, lean_object*); +lean_object* lean_array_fswap(lean_object*, lean_object*, lean_object*); lean_object* l___private_Init_Lean_Elab_Tactic_Induction_15__processResult(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___private_Init_Lean_Elab_Tactic_Induction_15__processResult___closed__9; lean_object* l_Nat_forMAux___main___at___private_Init_Lean_Elab_Tactic_Induction_15__processResult___spec__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); @@ -56,7 +65,8 @@ lean_object* l_ReaderT_bind___at_Lean_Meta_isClassExpensive___main___spec__4___r lean_object* l___private_Init_Lean_Elab_Tactic_Induction_4__generalizeMajor___closed__1; uint8_t l_Lean_Meta_RecursorInfo_isMinor(lean_object*, lean_object*); lean_object* l___private_Init_Lean_Elab_Tactic_Induction_15__processResult___closed__3; -lean_object* l_List_foldlM___main___at___private_Init_Lean_Elab_Tactic_Induction_13__getRecInfoDefault___spec__3(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l___private_Init_Lean_Elab_Tactic_Induction_17__checkCasesResult___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_List_foldlM___main___at___private_Init_Lean_Elab_Tactic_Induction_13__getRecInfoDefault___spec__3(lean_object*, uint8_t, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___private_Init_Lean_Elab_Tactic_Induction_1__getAuxHypothesisName___boxed(lean_object*); lean_object* l_Lean_Elab_Tactic_unfoldDefinition_x3f(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* lean_local_ctx_find_from_user_name(lean_object*, lean_object*); @@ -73,7 +83,7 @@ lean_object* l_Lean_Elab_Tactic_getInductiveValFromMajor___lambda__1___closed__1 extern lean_object* l___private_Init_Lean_Elab_Util_9__regTraceClasses___closed__1; lean_object* l_Lean_Elab_Tactic_inferType(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___private_Init_Lean_Elab_Tactic_Induction_13__getRecInfoDefault___closed__1; -lean_object* l___private_Init_Lean_Elab_Tactic_Induction_13__getRecInfoDefault___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l___private_Init_Lean_Elab_Tactic_Induction_13__getRecInfoDefault___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___private_Init_Lean_Elab_Tactic_Induction_6__generalizeVars___lambda__1___closed__4; lean_object* l___private_Init_Lean_Elab_Tactic_Induction_3__elabMajor___lambda__1___closed__3; lean_object* l___private_Init_Lean_Elab_Tactic_Induction_15__processResult___closed__7; @@ -98,6 +108,7 @@ lean_object* l___private_Init_Lean_Elab_Tactic_Induction_9__getAltVarNames(lean_ lean_object* l___regBuiltinTactic_Lean_Elab_Tactic_evalInduction___closed__3; lean_object* lean_nat_sub(lean_object*, 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_Nat_foldMAux___main___at___private_Init_Lean_Elab_Tactic_Induction_14__getRecInfo___spec__2___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Tactic_getInductiveValFromMajor(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* lean_array_get(lean_object*, lean_object*, lean_object*); @@ -126,7 +137,7 @@ lean_object* l_Array_findIdxAux___main___at___private_Init_Lean_Elab_Tactic_Indu lean_object* l___private_Init_Lean_Elab_Tactic_Induction_1__getAuxHypothesisName(lean_object*); lean_object* l___private_Init_Lean_Elab_Tactic_Induction_2__getMajor___boxed(lean_object*); lean_object* l___private_Init_Lean_Elab_Tactic_Induction_13__getRecInfoDefault___closed__3; -lean_object* l___private_Init_Lean_Elab_Tactic_Induction_13__getRecInfoDefault(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l___private_Init_Lean_Elab_Tactic_Induction_13__getRecInfoDefault(lean_object*, lean_object*, lean_object*, uint8_t, lean_object*, lean_object*); lean_object* l___private_Init_Lean_Elab_Tactic_Induction_3__elabMajor___lambda__1___closed__2; lean_object* l_Lean_Elab_Tactic_getMainGoal(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Tactic_getInductiveValFromMajor___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*); @@ -138,6 +149,7 @@ lean_object* l___private_Init_Lean_Elab_Tactic_Induction_15__processResult___clo lean_object* l_Lean_LocalDecl_toExpr(lean_object*); lean_object* l___private_Init_Lean_Elab_Tactic_Induction_12__getRecFromUsingLoop(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___private_Init_Lean_Elab_Tactic_Induction_15__processResult___closed__1; +lean_object* l_List_redLength___main___rarg(lean_object*); lean_object* l___private_Init_Lean_Elab_Tactic_Induction_15__processResult___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Meta_whnf(lean_object*, lean_object*, lean_object*); lean_object* l___private_Init_Lean_Elab_Tactic_Induction_11__checkAltCtorNames(lean_object*, lean_object*, lean_object*, lean_object*); @@ -149,6 +161,8 @@ lean_object* l___private_Init_Lean_Elab_Tactic_Induction_12__getRecFromUsingLoop lean_object* l_Lean_Meta_mkRecursorInfo(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___regBuiltinTactic_Lean_Elab_Tactic_evalInduction(lean_object*); uint8_t l_List_foldr___main___at___private_Init_Lean_Elab_Tactic_Induction_11__checkAltCtorNames___spec__1(lean_object*, uint8_t, lean_object*); +lean_object* l___private_Init_Lean_Elab_Tactic_Induction_16__checkCasesResultAux___main___closed__7; +uint8_t l_Lean_Syntax_isMissing(lean_object*); lean_object* l_Lean_Meta_throwTacticEx___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Tactic_appendGoals(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Tactic_evalGeneralizeAux(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); @@ -176,6 +190,7 @@ lean_object* l_Lean_Elab_Tactic_getInductiveValFromMajor___lambda__1___closed__3 lean_object* l___private_Init_Lean_Elab_Tactic_Induction_4__generalizeMajor(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_List_foldlM___main___at___private_Init_Lean_Elab_Tactic_Induction_13__getRecInfoDefault___spec__3___closed__4; lean_object* l_List_map___main___at_Lean_Elab_Tactic_getRecFromUsing___spec__1(lean_object*); +lean_object* l_Array_filterAux___main___at_Lean_Elab_Tactic_evalCases___spec__2(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Tactic_getRecFromUsing___closed__2; lean_object* l_Lean_Elab_Tactic_assignExprMVar(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Tactic_elabTerm(lean_object*, lean_object*, uint8_t, lean_object*, lean_object*); @@ -195,6 +210,7 @@ lean_object* l___private_Init_Lean_Elab_Tactic_Induction_3__elabMajor___lambda__ lean_object* l_List_foldlM___main___at___private_Init_Lean_Elab_Tactic_Induction_13__getRecInfoDefault___spec__3___closed__1; lean_object* l___private_Init_Lean_Elab_Tactic_Induction_8__getAltName___boxed(lean_object*); lean_object* l_Lean_Elab_Tactic_getRecFromUsing___closed__8; +lean_object* l___private_Init_Lean_Elab_Tactic_Induction_16__checkCasesResultAux___main(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); extern lean_object* l_Lean_MessageData_arrayExpr_toMessageData___main___closed__2; lean_object* l_Lean_Elab_Tactic_getRecFromUsing___closed__4; lean_object* l_Array_forMAux___main___at___private_Init_Lean_Elab_Tactic_Induction_11__checkAltCtorNames___spec__2___closed__3; @@ -205,8 +221,12 @@ lean_object* l___private_Init_Lean_Elab_Tactic_Induction_5__getGeneralizingFVarI lean_object* l_Nat_foldMAux___main___at___private_Init_Lean_Elab_Tactic_Induction_14__getRecInfo___spec__2(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_List_foldlM___main___at___private_Init_Lean_Elab_Tactic_Induction_13__getRecInfoDefault___spec__3___closed__2; extern lean_object* l_Lean_Format_paren___closed__3; +lean_object* l___private_Init_Lean_Elab_Tactic_Induction_16__checkCasesResultAux___main___closed__6; +lean_object* l_List_foldlM___main___at___private_Init_Lean_Elab_Tactic_Induction_13__getRecInfoDefault___spec__3___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Tactic_collectMVars(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___private_Init_Lean_Elab_Tactic_Induction_15__processResult___closed__6; +lean_object* l_List_toArrayAux___main___rarg(lean_object*, lean_object*); +lean_object* l___private_Init_Lean_Elab_Tactic_Induction_16__checkCasesResultAux___main___closed__5; lean_object* l_unsafeCast(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Array_forMAux___main___at___private_Init_Lean_Elab_Tactic_Induction_11__checkAltCtorNames___spec__2___closed__5; lean_object* l___private_Init_Lean_Elab_Tactic_Induction_12__getRecFromUsingLoop___main___lambda__1___boxed(lean_object*, lean_object*, lean_object*); @@ -221,13 +241,16 @@ lean_object* l_Lean_indentExpr(lean_object*); lean_object* l_List_foldr___main___at___private_Init_Lean_Elab_Tactic_Induction_11__checkAltCtorNames___spec__1___boxed(lean_object*, lean_object*, lean_object*); lean_object* l___private_Init_Lean_Elab_Tactic_Induction_6__generalizeVars___lambda__1___closed__2; lean_object* l_Lean_Elab_Tactic_elabTerm___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l___private_Init_Lean_Elab_Tactic_Induction_17__checkCasesResult(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___private_Init_Lean_Elab_Tactic_Induction_11__checkAltCtorNames___boxed(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___private_Init_Lean_Elab_Tactic_Induction_10__getAltRHS___boxed(lean_object*); lean_object* l_Lean_Elab_Tactic_liftMetaTacticAux___rarg___lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l___private_Init_Lean_Elab_Tactic_Induction_16__checkCasesResultAux___main___closed__3; extern lean_object* l_Lean_Parser_Tactic_induction___elambda__1___closed__1; extern lean_object* l_Lean_Parser_Tactic_underscoreFn___closed__4; lean_object* l___private_Init_Lean_Elab_Tactic_Induction_3__elabMajor(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Tactic_throwError___rarg(lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l___private_Init_Lean_Elab_Tactic_Induction_16__checkCasesResultAux___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___private_Init_Lean_Elab_Tactic_Induction_4__generalizeMajor___lambda__1___boxed(lean_object*, lean_object*, lean_object*); uint8_t lean_nat_dec_lt(lean_object*, lean_object*); lean_object* l_Lean_Meta_cases___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); @@ -7896,749 +7919,809 @@ lean_ctor_set(x_2, 0, x_1); return x_2; } } -lean_object* l_List_foldlM___main___at___private_Init_Lean_Elab_Tactic_Induction_13__getRecInfoDefault___spec__3(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) { +lean_object* l_List_foldlM___main___at___private_Init_Lean_Elab_Tactic_Induction_13__getRecInfoDefault___spec__3(lean_object* x_1, uint8_t x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6) { _start: { -if (lean_obj_tag(x_3) == 0) +if (lean_obj_tag(x_4) == 0) { -lean_object* x_6; -lean_dec(x_4); +lean_object* x_7; +lean_dec(x_5); 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_5); -return x_6; +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; } else { -lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; uint8_t x_11; -x_7 = lean_ctor_get(x_2, 1); -lean_inc(x_7); -x_8 = lean_ctor_get(x_7, 1); +lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; uint8_t x_12; +x_8 = lean_ctor_get(x_3, 1); lean_inc(x_8); -x_9 = lean_ctor_get(x_3, 0); +x_9 = lean_ctor_get(x_8, 1); lean_inc(x_9); -x_10 = lean_ctor_get(x_3, 1); +x_10 = lean_ctor_get(x_4, 0); lean_inc(x_10); -lean_dec(x_3); -x_11 = !lean_is_exclusive(x_2); -if (x_11 == 0) +x_11 = lean_ctor_get(x_4, 1); +lean_inc(x_11); +lean_dec(x_4); +x_12 = !lean_is_exclusive(x_3); +if (x_12 == 0) { -lean_object* x_12; lean_object* x_13; uint8_t x_14; -x_12 = lean_ctor_get(x_2, 0); -x_13 = lean_ctor_get(x_2, 1); -lean_dec(x_13); -x_14 = !lean_is_exclusive(x_7); -if (x_14 == 0) +lean_object* x_13; lean_object* x_14; uint8_t x_15; +x_13 = lean_ctor_get(x_3, 0); +x_14 = lean_ctor_get(x_3, 1); +lean_dec(x_14); +x_15 = !lean_is_exclusive(x_8); +if (x_15 == 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_7, 0); -x_16 = lean_ctor_get(x_7, 1); -lean_dec(x_16); -x_17 = lean_ctor_get(x_8, 0); -lean_inc(x_17); -x_18 = lean_ctor_get(x_8, 1); +lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; lean_object* x_20; lean_object* x_21; +x_16 = lean_ctor_get(x_8, 0); +x_17 = lean_ctor_get(x_8, 1); +lean_dec(x_17); +x_18 = lean_ctor_get(x_9, 0); lean_inc(x_18); -x_19 = lean_unsigned_to_nat(0u); -x_20 = l_Array_findIdxAux___main___at___private_Init_Lean_Elab_Tactic_Induction_13__getRecInfoDefault___spec__1(x_9, x_17, x_19); -if (lean_obj_tag(x_20) == 0) -{ -lean_object* x_21; -x_21 = l_Array_findIdxAux___main___at___private_Init_Lean_Elab_Tactic_Induction_13__getRecInfoDefault___spec__2(x_17, x_19); +x_19 = lean_ctor_get(x_9, 1); +lean_inc(x_19); +x_20 = lean_unsigned_to_nat(0u); +x_21 = l_Array_findIdxAux___main___at___private_Init_Lean_Elab_Tactic_Induction_13__getRecInfoDefault___spec__1(x_10, x_18, x_20); if (lean_obj_tag(x_21) == 0) { -lean_dec(x_17); -if (lean_obj_tag(x_18) == 0) +lean_object* x_22; +x_22 = l_Array_findIdxAux___main___at___private_Init_Lean_Elab_Tactic_Induction_13__getRecInfoDefault___spec__2(x_18, x_20); +if (lean_obj_tag(x_22) == 0) { -lean_object* x_22; lean_object* x_23; lean_object* x_24; lean_object* x_25; lean_object* x_26; lean_object* x_27; lean_object* x_28; lean_object* x_29; lean_object* x_30; -lean_free_object(x_7); -lean_dec(x_15); -lean_free_object(x_2); -lean_dec(x_12); -lean_dec(x_8); -x_22 = l_Lean_Name_toString___closed__1; -x_23 = l_Lean_Name_toStringWithSep___main(x_22, x_9); -x_24 = lean_alloc_ctor(2, 1, 0); -lean_ctor_set(x_24, 0, x_23); -x_25 = lean_alloc_ctor(0, 1, 0); +lean_dec(x_18); +if (lean_obj_tag(x_19) == 0) +{ +if (x_2 == 0) +{ +lean_object* x_23; lean_object* x_24; lean_object* x_25; lean_object* x_26; lean_object* x_27; lean_object* x_28; lean_object* x_29; lean_object* x_30; lean_object* x_31; +lean_free_object(x_8); +lean_dec(x_16); +lean_free_object(x_3); +lean_dec(x_13); +lean_dec(x_9); +x_23 = l_Lean_Name_toString___closed__1; +x_24 = l_Lean_Name_toStringWithSep___main(x_23, x_10); +x_25 = lean_alloc_ctor(2, 1, 0); lean_ctor_set(x_25, 0, x_24); -x_26 = l_List_foldlM___main___at___private_Init_Lean_Elab_Tactic_Induction_13__getRecInfoDefault___spec__3___closed__3; -x_27 = lean_alloc_ctor(9, 2, 0); -lean_ctor_set(x_27, 0, x_26); -lean_ctor_set(x_27, 1, x_25); -x_28 = l_List_foldlM___main___at___private_Init_Lean_Elab_Tactic_Induction_13__getRecInfoDefault___spec__3___closed__6; -x_29 = lean_alloc_ctor(9, 2, 0); -lean_ctor_set(x_29, 0, x_27); -lean_ctor_set(x_29, 1, x_28); -lean_inc(x_4); +x_26 = lean_alloc_ctor(0, 1, 0); +lean_ctor_set(x_26, 0, x_25); +x_27 = l_List_foldlM___main___at___private_Init_Lean_Elab_Tactic_Induction_13__getRecInfoDefault___spec__3___closed__3; +x_28 = lean_alloc_ctor(9, 2, 0); +lean_ctor_set(x_28, 0, x_27); +lean_ctor_set(x_28, 1, x_26); +x_29 = l_List_foldlM___main___at___private_Init_Lean_Elab_Tactic_Induction_13__getRecInfoDefault___spec__3___closed__6; +x_30 = lean_alloc_ctor(9, 2, 0); +lean_ctor_set(x_30, 0, x_28); +lean_ctor_set(x_30, 1, x_29); +lean_inc(x_5); lean_inc(x_1); -x_30 = l_Lean_Elab_Tactic_throwError___rarg(x_1, x_29, x_4, x_5); -if (lean_obj_tag(x_30) == 0) +x_31 = l_Lean_Elab_Tactic_throwError___rarg(x_1, x_30, x_5, x_6); +if (lean_obj_tag(x_31) == 0) { -lean_object* x_31; lean_object* x_32; -x_31 = lean_ctor_get(x_30, 0); -lean_inc(x_31); -x_32 = lean_ctor_get(x_30, 1); +lean_object* x_32; lean_object* x_33; +x_32 = lean_ctor_get(x_31, 0); lean_inc(x_32); -lean_dec(x_30); -x_2 = x_31; -x_3 = x_10; -x_5 = x_32; +x_33 = lean_ctor_get(x_31, 1); +lean_inc(x_33); +lean_dec(x_31); +x_3 = x_32; +x_4 = x_11; +x_6 = x_33; goto _start; } else { -uint8_t x_34; -lean_dec(x_10); -lean_dec(x_4); +uint8_t x_35; +lean_dec(x_11); +lean_dec(x_5); lean_dec(x_1); -x_34 = !lean_is_exclusive(x_30); -if (x_34 == 0) +x_35 = !lean_is_exclusive(x_31); +if (x_35 == 0) { -return x_30; +return x_31; } else { -lean_object* x_35; lean_object* x_36; lean_object* x_37; -x_35 = lean_ctor_get(x_30, 0); -x_36 = lean_ctor_get(x_30, 1); +lean_object* x_36; lean_object* x_37; lean_object* x_38; +x_36 = lean_ctor_get(x_31, 0); +x_37 = lean_ctor_get(x_31, 1); +lean_inc(x_37); lean_inc(x_36); -lean_inc(x_35); -lean_dec(x_30); -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_dec(x_31); +x_38 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_38, 0, x_36); +lean_ctor_set(x_38, 1, x_37); +return x_38; } } } else { -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_dec(x_9); -x_38 = lean_ctor_get(x_18, 0); -lean_inc(x_38); -lean_dec(x_18); -x_39 = l___private_Init_Lean_Elab_Tactic_Induction_9__getAltVarNames(x_38); -x_40 = l_Array_toList___rarg(x_39); -lean_dec(x_39); -x_41 = lean_array_push(x_12, x_40); -x_42 = lean_unsigned_to_nat(3u); -x_43 = l_Lean_Syntax_getArg(x_38, x_42); -lean_dec(x_38); -x_44 = lean_array_push(x_15, x_43); -lean_ctor_set(x_7, 0, x_44); -lean_ctor_set(x_2, 0, x_41); -x_3 = x_10; -goto _start; -} -} -else -{ -uint8_t x_46; -lean_dec(x_18); -lean_dec(x_9); -x_46 = !lean_is_exclusive(x_8); -if (x_46 == 0) -{ -lean_object* x_47; lean_object* x_48; uint8_t x_49; -x_47 = lean_ctor_get(x_8, 1); -lean_dec(x_47); -x_48 = lean_ctor_get(x_8, 0); -lean_dec(x_48); -x_49 = !lean_is_exclusive(x_21); -if (x_49 == 0) -{ -lean_object* x_50; lean_object* x_51; lean_object* x_52; lean_object* x_53; lean_object* x_54; lean_object* x_55; lean_object* x_56; lean_object* x_57; lean_object* x_58; lean_object* x_59; -x_50 = lean_ctor_get(x_21, 0); -x_51 = l_Lean_Syntax_inhabited; -x_52 = lean_array_get(x_51, x_17, x_50); -x_53 = l___private_Init_Lean_Elab_Tactic_Induction_9__getAltVarNames(x_52); -x_54 = l_Array_toList___rarg(x_53); -lean_dec(x_53); -x_55 = lean_array_push(x_12, x_54); -x_56 = lean_unsigned_to_nat(3u); -x_57 = l_Lean_Syntax_getArg(x_52, x_56); -x_58 = lean_array_push(x_15, x_57); -x_59 = l_Array_eraseIdx___rarg(x_17, x_50); -lean_dec(x_50); -lean_ctor_set(x_21, 0, x_52); -lean_ctor_set(x_8, 1, x_21); -lean_ctor_set(x_8, 0, x_59); -lean_ctor_set(x_7, 0, x_58); -lean_ctor_set(x_2, 0, x_55); -x_3 = x_10; -goto _start; -} -else -{ -lean_object* x_61; lean_object* x_62; lean_object* x_63; lean_object* x_64; lean_object* x_65; lean_object* x_66; lean_object* x_67; lean_object* x_68; lean_object* x_69; lean_object* x_70; lean_object* x_71; -x_61 = lean_ctor_get(x_21, 0); -lean_inc(x_61); -lean_dec(x_21); -x_62 = l_Lean_Syntax_inhabited; -x_63 = lean_array_get(x_62, x_17, x_61); -x_64 = l___private_Init_Lean_Elab_Tactic_Induction_9__getAltVarNames(x_63); -x_65 = l_Array_toList___rarg(x_64); -lean_dec(x_64); -x_66 = lean_array_push(x_12, x_65); -x_67 = lean_unsigned_to_nat(3u); -x_68 = l_Lean_Syntax_getArg(x_63, x_67); -x_69 = lean_array_push(x_15, x_68); -x_70 = l_Array_eraseIdx___rarg(x_17, x_61); -lean_dec(x_61); -x_71 = lean_alloc_ctor(1, 1, 0); -lean_ctor_set(x_71, 0, x_63); -lean_ctor_set(x_8, 1, x_71); -lean_ctor_set(x_8, 0, x_70); -lean_ctor_set(x_7, 0, x_69); -lean_ctor_set(x_2, 0, x_66); -x_3 = x_10; -goto _start; -} -} -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_dec(x_8); -x_73 = lean_ctor_get(x_21, 0); -lean_inc(x_73); -if (lean_is_exclusive(x_21)) { - lean_ctor_release(x_21, 0); - x_74 = x_21; -} else { - lean_dec_ref(x_21); - x_74 = lean_box(0); -} -x_75 = l_Lean_Syntax_inhabited; -x_76 = lean_array_get(x_75, x_17, x_73); -x_77 = l___private_Init_Lean_Elab_Tactic_Induction_9__getAltVarNames(x_76); -x_78 = l_Array_toList___rarg(x_77); -lean_dec(x_77); -x_79 = lean_array_push(x_12, x_78); -x_80 = lean_unsigned_to_nat(3u); -x_81 = l_Lean_Syntax_getArg(x_76, x_80); -x_82 = lean_array_push(x_15, x_81); -x_83 = l_Array_eraseIdx___rarg(x_17, x_73); -lean_dec(x_73); -if (lean_is_scalar(x_74)) { - x_84 = lean_alloc_ctor(1, 1, 0); -} else { - x_84 = x_74; -} -lean_ctor_set(x_84, 0, x_76); -x_85 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_85, 0, x_83); -lean_ctor_set(x_85, 1, x_84); -lean_ctor_set(x_7, 1, x_85); -lean_ctor_set(x_7, 0, x_82); -lean_ctor_set(x_2, 0, x_79); -x_3 = x_10; -goto _start; -} -} -} -else -{ -uint8_t x_87; -lean_dec(x_9); -x_87 = !lean_is_exclusive(x_8); -if (x_87 == 0) -{ -lean_object* x_88; lean_object* x_89; lean_object* x_90; lean_object* x_91; lean_object* x_92; lean_object* x_93; lean_object* x_94; lean_object* x_95; lean_object* x_96; lean_object* x_97; lean_object* x_98; lean_object* x_99; -x_88 = lean_ctor_get(x_8, 1); -lean_dec(x_88); -x_89 = lean_ctor_get(x_8, 0); -lean_dec(x_89); -x_90 = lean_ctor_get(x_20, 0); -lean_inc(x_90); -lean_dec(x_20); -x_91 = l_Lean_Syntax_inhabited; -x_92 = lean_array_get(x_91, x_17, x_90); -x_93 = l___private_Init_Lean_Elab_Tactic_Induction_9__getAltVarNames(x_92); -x_94 = l_Array_toList___rarg(x_93); -lean_dec(x_93); -x_95 = lean_array_push(x_12, x_94); -x_96 = lean_unsigned_to_nat(3u); -x_97 = l_Lean_Syntax_getArg(x_92, x_96); -lean_dec(x_92); -x_98 = lean_array_push(x_15, x_97); -x_99 = l_Array_eraseIdx___rarg(x_17, x_90); -lean_dec(x_90); -lean_ctor_set(x_8, 0, x_99); -lean_ctor_set(x_7, 0, x_98); -lean_ctor_set(x_2, 0, x_95); -x_3 = x_10; -goto _start; -} -else -{ -lean_object* x_101; lean_object* x_102; lean_object* x_103; lean_object* x_104; lean_object* x_105; lean_object* x_106; lean_object* x_107; lean_object* x_108; lean_object* x_109; lean_object* x_110; lean_object* x_111; -lean_dec(x_8); -x_101 = lean_ctor_get(x_20, 0); -lean_inc(x_101); -lean_dec(x_20); -x_102 = l_Lean_Syntax_inhabited; -x_103 = lean_array_get(x_102, x_17, x_101); -x_104 = l___private_Init_Lean_Elab_Tactic_Induction_9__getAltVarNames(x_103); -x_105 = l_Array_toList___rarg(x_104); -lean_dec(x_104); -x_106 = lean_array_push(x_12, x_105); -x_107 = lean_unsigned_to_nat(3u); -x_108 = l_Lean_Syntax_getArg(x_103, x_107); -lean_dec(x_103); -x_109 = lean_array_push(x_15, x_108); -x_110 = l_Array_eraseIdx___rarg(x_17, x_101); -lean_dec(x_101); -x_111 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_111, 0, x_110); -lean_ctor_set(x_111, 1, x_18); -lean_ctor_set(x_7, 1, x_111); -lean_ctor_set(x_7, 0, x_109); -lean_ctor_set(x_2, 0, x_106); -x_3 = x_10; -goto _start; -} -} -} -else -{ -lean_object* x_113; lean_object* x_114; lean_object* x_115; lean_object* x_116; lean_object* x_117; -x_113 = lean_ctor_get(x_7, 0); -lean_inc(x_113); -lean_dec(x_7); -x_114 = lean_ctor_get(x_8, 0); -lean_inc(x_114); -x_115 = lean_ctor_get(x_8, 1); -lean_inc(x_115); -x_116 = lean_unsigned_to_nat(0u); -x_117 = l_Array_findIdxAux___main___at___private_Init_Lean_Elab_Tactic_Induction_13__getRecInfoDefault___spec__1(x_9, x_114, x_116); -if (lean_obj_tag(x_117) == 0) -{ -lean_object* x_118; -x_118 = l_Array_findIdxAux___main___at___private_Init_Lean_Elab_Tactic_Induction_13__getRecInfoDefault___spec__2(x_114, x_116); -if (lean_obj_tag(x_118) == 0) -{ -lean_dec(x_114); -if (lean_obj_tag(x_115) == 0) -{ -lean_object* x_119; lean_object* x_120; lean_object* x_121; lean_object* x_122; lean_object* x_123; lean_object* x_124; lean_object* x_125; lean_object* x_126; lean_object* x_127; -lean_dec(x_113); -lean_free_object(x_2); -lean_dec(x_12); -lean_dec(x_8); -x_119 = l_Lean_Name_toString___closed__1; -x_120 = l_Lean_Name_toStringWithSep___main(x_119, x_9); -x_121 = lean_alloc_ctor(2, 1, 0); -lean_ctor_set(x_121, 0, x_120); -x_122 = lean_alloc_ctor(0, 1, 0); -lean_ctor_set(x_122, 0, x_121); -x_123 = l_List_foldlM___main___at___private_Init_Lean_Elab_Tactic_Induction_13__getRecInfoDefault___spec__3___closed__3; -x_124 = lean_alloc_ctor(9, 2, 0); -lean_ctor_set(x_124, 0, x_123); -lean_ctor_set(x_124, 1, x_122); -x_125 = l_List_foldlM___main___at___private_Init_Lean_Elab_Tactic_Induction_13__getRecInfoDefault___spec__3___closed__6; -x_126 = lean_alloc_ctor(9, 2, 0); -lean_ctor_set(x_126, 0, x_124); -lean_ctor_set(x_126, 1, x_125); -lean_inc(x_4); -lean_inc(x_1); -x_127 = l_Lean_Elab_Tactic_throwError___rarg(x_1, x_126, x_4, x_5); -if (lean_obj_tag(x_127) == 0) -{ -lean_object* x_128; lean_object* x_129; -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_2 = x_128; -x_3 = x_10; -x_5 = x_129; -goto _start; -} -else -{ -lean_object* x_131; lean_object* x_132; lean_object* x_133; lean_object* x_134; +lean_object* x_39; lean_object* x_40; lean_object* x_41; lean_object* x_42; lean_dec(x_10); -lean_dec(x_4); -lean_dec(x_1); -x_131 = lean_ctor_get(x_127, 0); -lean_inc(x_131); -x_132 = lean_ctor_get(x_127, 1); -lean_inc(x_132); -if (lean_is_exclusive(x_127)) { - lean_ctor_release(x_127, 0); - lean_ctor_release(x_127, 1); - x_133 = x_127; -} else { - lean_dec_ref(x_127); - x_133 = lean_box(0); -} -if (lean_is_scalar(x_133)) { - x_134 = lean_alloc_ctor(1, 2, 0); -} else { - x_134 = x_133; -} -lean_ctor_set(x_134, 0, x_131); -lean_ctor_set(x_134, 1, x_132); -return x_134; -} -} -else -{ -lean_object* x_135; lean_object* x_136; lean_object* x_137; lean_object* x_138; lean_object* x_139; lean_object* x_140; lean_object* x_141; lean_object* x_142; -lean_dec(x_9); -x_135 = lean_ctor_get(x_115, 0); -lean_inc(x_135); -lean_dec(x_115); -x_136 = l___private_Init_Lean_Elab_Tactic_Induction_9__getAltVarNames(x_135); -x_137 = l_Array_toList___rarg(x_136); -lean_dec(x_136); -x_138 = lean_array_push(x_12, x_137); -x_139 = lean_unsigned_to_nat(3u); -x_140 = l_Lean_Syntax_getArg(x_135, x_139); -lean_dec(x_135); -x_141 = lean_array_push(x_113, x_140); -x_142 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_142, 0, x_141); -lean_ctor_set(x_142, 1, x_8); -lean_ctor_set(x_2, 1, x_142); -lean_ctor_set(x_2, 0, x_138); -x_3 = x_10; +x_39 = lean_box(0); +x_40 = lean_array_push(x_13, x_39); +x_41 = lean_box(0); +x_42 = lean_array_push(x_16, x_41); +lean_ctor_set(x_8, 0, x_42); +lean_ctor_set(x_3, 0, x_40); +x_4 = x_11; goto _start; } } else { -lean_object* x_144; lean_object* x_145; lean_object* x_146; lean_object* x_147; lean_object* x_148; lean_object* x_149; lean_object* x_150; lean_object* x_151; lean_object* x_152; lean_object* x_153; lean_object* x_154; lean_object* x_155; lean_object* x_156; lean_object* x_157; lean_object* x_158; -lean_dec(x_115); -lean_dec(x_9); -if (lean_is_exclusive(x_8)) { - lean_ctor_release(x_8, 0); - lean_ctor_release(x_8, 1); - x_144 = x_8; -} else { - lean_dec_ref(x_8); - x_144 = lean_box(0); -} -x_145 = lean_ctor_get(x_118, 0); -lean_inc(x_145); -if (lean_is_exclusive(x_118)) { - lean_ctor_release(x_118, 0); - x_146 = x_118; -} else { - lean_dec_ref(x_118); - x_146 = lean_box(0); -} -x_147 = l_Lean_Syntax_inhabited; -x_148 = lean_array_get(x_147, x_114, x_145); -x_149 = l___private_Init_Lean_Elab_Tactic_Induction_9__getAltVarNames(x_148); -x_150 = l_Array_toList___rarg(x_149); -lean_dec(x_149); -x_151 = lean_array_push(x_12, x_150); -x_152 = lean_unsigned_to_nat(3u); -x_153 = l_Lean_Syntax_getArg(x_148, x_152); -x_154 = lean_array_push(x_113, x_153); -x_155 = l_Array_eraseIdx___rarg(x_114, x_145); -lean_dec(x_145); -if (lean_is_scalar(x_146)) { - x_156 = lean_alloc_ctor(1, 1, 0); -} else { - x_156 = x_146; -} -lean_ctor_set(x_156, 0, x_148); -if (lean_is_scalar(x_144)) { - x_157 = lean_alloc_ctor(0, 2, 0); -} else { - x_157 = x_144; -} -lean_ctor_set(x_157, 0, x_155); -lean_ctor_set(x_157, 1, x_156); -x_158 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_158, 0, x_154); -lean_ctor_set(x_158, 1, x_157); -lean_ctor_set(x_2, 1, x_158); -lean_ctor_set(x_2, 0, x_151); -x_3 = x_10; +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_dec(x_10); +x_44 = lean_ctor_get(x_19, 0); +lean_inc(x_44); +lean_dec(x_19); +x_45 = l___private_Init_Lean_Elab_Tactic_Induction_9__getAltVarNames(x_44); +x_46 = l_Array_toList___rarg(x_45); +lean_dec(x_45); +x_47 = lean_array_push(x_13, x_46); +x_48 = lean_unsigned_to_nat(3u); +x_49 = l_Lean_Syntax_getArg(x_44, x_48); +lean_dec(x_44); +x_50 = lean_array_push(x_16, x_49); +lean_ctor_set(x_8, 0, x_50); +lean_ctor_set(x_3, 0, x_47); +x_4 = x_11; goto _start; } } else { -lean_object* x_160; lean_object* x_161; lean_object* x_162; lean_object* x_163; lean_object* x_164; lean_object* x_165; lean_object* x_166; lean_object* x_167; lean_object* x_168; lean_object* x_169; lean_object* x_170; lean_object* x_171; lean_object* x_172; +uint8_t x_52; +lean_dec(x_19); +lean_dec(x_10); +x_52 = !lean_is_exclusive(x_9); +if (x_52 == 0) +{ +lean_object* x_53; lean_object* x_54; uint8_t x_55; +x_53 = lean_ctor_get(x_9, 1); +lean_dec(x_53); +x_54 = lean_ctor_get(x_9, 0); +lean_dec(x_54); +x_55 = !lean_is_exclusive(x_22); +if (x_55 == 0) +{ +lean_object* x_56; lean_object* x_57; lean_object* x_58; lean_object* x_59; lean_object* x_60; lean_object* x_61; lean_object* x_62; lean_object* x_63; lean_object* x_64; lean_object* x_65; +x_56 = lean_ctor_get(x_22, 0); +x_57 = l_Lean_Syntax_inhabited; +x_58 = lean_array_get(x_57, x_18, x_56); +x_59 = l___private_Init_Lean_Elab_Tactic_Induction_9__getAltVarNames(x_58); +x_60 = l_Array_toList___rarg(x_59); +lean_dec(x_59); +x_61 = lean_array_push(x_13, x_60); +x_62 = lean_unsigned_to_nat(3u); +x_63 = l_Lean_Syntax_getArg(x_58, x_62); +x_64 = lean_array_push(x_16, x_63); +x_65 = l_Array_eraseIdx___rarg(x_18, x_56); +lean_dec(x_56); +lean_ctor_set(x_22, 0, x_58); +lean_ctor_set(x_9, 1, x_22); +lean_ctor_set(x_9, 0, x_65); +lean_ctor_set(x_8, 0, x_64); +lean_ctor_set(x_3, 0, x_61); +x_4 = x_11; +goto _start; +} +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; +x_67 = lean_ctor_get(x_22, 0); +lean_inc(x_67); +lean_dec(x_22); +x_68 = l_Lean_Syntax_inhabited; +x_69 = lean_array_get(x_68, x_18, x_67); +x_70 = l___private_Init_Lean_Elab_Tactic_Induction_9__getAltVarNames(x_69); +x_71 = l_Array_toList___rarg(x_70); +lean_dec(x_70); +x_72 = lean_array_push(x_13, x_71); +x_73 = lean_unsigned_to_nat(3u); +x_74 = l_Lean_Syntax_getArg(x_69, x_73); +x_75 = lean_array_push(x_16, x_74); +x_76 = l_Array_eraseIdx___rarg(x_18, x_67); +lean_dec(x_67); +x_77 = lean_alloc_ctor(1, 1, 0); +lean_ctor_set(x_77, 0, x_69); +lean_ctor_set(x_9, 1, x_77); +lean_ctor_set(x_9, 0, x_76); +lean_ctor_set(x_8, 0, x_75); +lean_ctor_set(x_3, 0, x_72); +x_4 = x_11; +goto _start; +} +} +else +{ +lean_object* x_79; lean_object* x_80; lean_object* x_81; lean_object* x_82; lean_object* x_83; lean_object* x_84; lean_object* x_85; lean_object* x_86; lean_object* x_87; lean_object* x_88; lean_object* x_89; lean_object* x_90; lean_object* x_91; lean_dec(x_9); -if (lean_is_exclusive(x_8)) { - lean_ctor_release(x_8, 0); - lean_ctor_release(x_8, 1); - x_160 = x_8; +x_79 = lean_ctor_get(x_22, 0); +lean_inc(x_79); +if (lean_is_exclusive(x_22)) { + lean_ctor_release(x_22, 0); + x_80 = x_22; } else { - lean_dec_ref(x_8); - x_160 = lean_box(0); + lean_dec_ref(x_22); + x_80 = lean_box(0); } -x_161 = lean_ctor_get(x_117, 0); -lean_inc(x_161); -lean_dec(x_117); -x_162 = l_Lean_Syntax_inhabited; -x_163 = lean_array_get(x_162, x_114, x_161); -x_164 = l___private_Init_Lean_Elab_Tactic_Induction_9__getAltVarNames(x_163); -x_165 = l_Array_toList___rarg(x_164); -lean_dec(x_164); -x_166 = lean_array_push(x_12, x_165); -x_167 = lean_unsigned_to_nat(3u); -x_168 = l_Lean_Syntax_getArg(x_163, x_167); -lean_dec(x_163); -x_169 = lean_array_push(x_113, x_168); -x_170 = l_Array_eraseIdx___rarg(x_114, x_161); -lean_dec(x_161); -if (lean_is_scalar(x_160)) { - x_171 = lean_alloc_ctor(0, 2, 0); +x_81 = l_Lean_Syntax_inhabited; +x_82 = lean_array_get(x_81, x_18, x_79); +x_83 = l___private_Init_Lean_Elab_Tactic_Induction_9__getAltVarNames(x_82); +x_84 = l_Array_toList___rarg(x_83); +lean_dec(x_83); +x_85 = lean_array_push(x_13, x_84); +x_86 = lean_unsigned_to_nat(3u); +x_87 = l_Lean_Syntax_getArg(x_82, x_86); +x_88 = lean_array_push(x_16, x_87); +x_89 = l_Array_eraseIdx___rarg(x_18, x_79); +lean_dec(x_79); +if (lean_is_scalar(x_80)) { + x_90 = lean_alloc_ctor(1, 1, 0); } else { - x_171 = x_160; + x_90 = x_80; } -lean_ctor_set(x_171, 0, x_170); -lean_ctor_set(x_171, 1, x_115); -x_172 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_172, 0, x_169); -lean_ctor_set(x_172, 1, x_171); -lean_ctor_set(x_2, 1, x_172); -lean_ctor_set(x_2, 0, x_166); -x_3 = x_10; +lean_ctor_set(x_90, 0, x_82); +x_91 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_91, 0, x_89); +lean_ctor_set(x_91, 1, x_90); +lean_ctor_set(x_8, 1, x_91); +lean_ctor_set(x_8, 0, x_88); +lean_ctor_set(x_3, 0, x_85); +x_4 = x_11; goto _start; } } } else { -lean_object* x_174; lean_object* x_175; lean_object* x_176; lean_object* x_177; lean_object* x_178; lean_object* x_179; lean_object* x_180; -x_174 = lean_ctor_get(x_2, 0); -lean_inc(x_174); -lean_dec(x_2); -x_175 = lean_ctor_get(x_7, 0); -lean_inc(x_175); -if (lean_is_exclusive(x_7)) { - lean_ctor_release(x_7, 0); - lean_ctor_release(x_7, 1); - x_176 = x_7; -} else { - lean_dec_ref(x_7); - x_176 = lean_box(0); +uint8_t x_93; +lean_dec(x_10); +x_93 = !lean_is_exclusive(x_9); +if (x_93 == 0) +{ +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; +x_94 = lean_ctor_get(x_9, 1); +lean_dec(x_94); +x_95 = lean_ctor_get(x_9, 0); +lean_dec(x_95); +x_96 = lean_ctor_get(x_21, 0); +lean_inc(x_96); +lean_dec(x_21); +x_97 = l_Lean_Syntax_inhabited; +x_98 = lean_array_get(x_97, x_18, x_96); +x_99 = l___private_Init_Lean_Elab_Tactic_Induction_9__getAltVarNames(x_98); +x_100 = l_Array_toList___rarg(x_99); +lean_dec(x_99); +x_101 = lean_array_push(x_13, x_100); +x_102 = lean_unsigned_to_nat(3u); +x_103 = l_Lean_Syntax_getArg(x_98, x_102); +lean_dec(x_98); +x_104 = lean_array_push(x_16, x_103); +x_105 = l_Array_eraseIdx___rarg(x_18, x_96); +lean_dec(x_96); +lean_ctor_set(x_9, 0, x_105); +lean_ctor_set(x_8, 0, x_104); +lean_ctor_set(x_3, 0, x_101); +x_4 = x_11; +goto _start; } -x_177 = lean_ctor_get(x_8, 0); -lean_inc(x_177); -x_178 = lean_ctor_get(x_8, 1); -lean_inc(x_178); -x_179 = lean_unsigned_to_nat(0u); -x_180 = l_Array_findIdxAux___main___at___private_Init_Lean_Elab_Tactic_Induction_13__getRecInfoDefault___spec__1(x_9, x_177, x_179); -if (lean_obj_tag(x_180) == 0) +else { -lean_object* x_181; -x_181 = l_Array_findIdxAux___main___at___private_Init_Lean_Elab_Tactic_Induction_13__getRecInfoDefault___spec__2(x_177, x_179); -if (lean_obj_tag(x_181) == 0) +lean_object* x_107; lean_object* x_108; lean_object* x_109; lean_object* x_110; lean_object* x_111; lean_object* x_112; lean_object* x_113; lean_object* x_114; lean_object* x_115; lean_object* x_116; lean_object* x_117; +lean_dec(x_9); +x_107 = lean_ctor_get(x_21, 0); +lean_inc(x_107); +lean_dec(x_21); +x_108 = l_Lean_Syntax_inhabited; +x_109 = lean_array_get(x_108, x_18, x_107); +x_110 = l___private_Init_Lean_Elab_Tactic_Induction_9__getAltVarNames(x_109); +x_111 = l_Array_toList___rarg(x_110); +lean_dec(x_110); +x_112 = lean_array_push(x_13, x_111); +x_113 = lean_unsigned_to_nat(3u); +x_114 = l_Lean_Syntax_getArg(x_109, x_113); +lean_dec(x_109); +x_115 = lean_array_push(x_16, x_114); +x_116 = l_Array_eraseIdx___rarg(x_18, x_107); +lean_dec(x_107); +x_117 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_117, 0, x_116); +lean_ctor_set(x_117, 1, x_19); +lean_ctor_set(x_8, 1, x_117); +lean_ctor_set(x_8, 0, x_115); +lean_ctor_set(x_3, 0, x_112); +x_4 = x_11; +goto _start; +} +} +} +else { -lean_dec(x_177); -if (lean_obj_tag(x_178) == 0) -{ -lean_object* x_182; lean_object* x_183; lean_object* x_184; lean_object* x_185; lean_object* x_186; lean_object* x_187; lean_object* x_188; lean_object* x_189; lean_object* x_190; -lean_dec(x_176); -lean_dec(x_175); -lean_dec(x_174); +lean_object* x_119; lean_object* x_120; lean_object* x_121; lean_object* x_122; lean_object* x_123; +x_119 = lean_ctor_get(x_8, 0); +lean_inc(x_119); lean_dec(x_8); -x_182 = l_Lean_Name_toString___closed__1; -x_183 = l_Lean_Name_toStringWithSep___main(x_182, x_9); -x_184 = lean_alloc_ctor(2, 1, 0); -lean_ctor_set(x_184, 0, x_183); -x_185 = lean_alloc_ctor(0, 1, 0); -lean_ctor_set(x_185, 0, x_184); -x_186 = l_List_foldlM___main___at___private_Init_Lean_Elab_Tactic_Induction_13__getRecInfoDefault___spec__3___closed__3; -x_187 = lean_alloc_ctor(9, 2, 0); -lean_ctor_set(x_187, 0, x_186); -lean_ctor_set(x_187, 1, x_185); -x_188 = l_List_foldlM___main___at___private_Init_Lean_Elab_Tactic_Induction_13__getRecInfoDefault___spec__3___closed__6; -x_189 = lean_alloc_ctor(9, 2, 0); -lean_ctor_set(x_189, 0, x_187); -lean_ctor_set(x_189, 1, x_188); -lean_inc(x_4); +x_120 = lean_ctor_get(x_9, 0); +lean_inc(x_120); +x_121 = lean_ctor_get(x_9, 1); +lean_inc(x_121); +x_122 = lean_unsigned_to_nat(0u); +x_123 = l_Array_findIdxAux___main___at___private_Init_Lean_Elab_Tactic_Induction_13__getRecInfoDefault___spec__1(x_10, x_120, x_122); +if (lean_obj_tag(x_123) == 0) +{ +lean_object* x_124; +x_124 = l_Array_findIdxAux___main___at___private_Init_Lean_Elab_Tactic_Induction_13__getRecInfoDefault___spec__2(x_120, x_122); +if (lean_obj_tag(x_124) == 0) +{ +lean_dec(x_120); +if (lean_obj_tag(x_121) == 0) +{ +if (x_2 == 0) +{ +lean_object* x_125; lean_object* x_126; lean_object* x_127; lean_object* x_128; lean_object* x_129; lean_object* x_130; lean_object* x_131; lean_object* x_132; lean_object* x_133; +lean_dec(x_119); +lean_free_object(x_3); +lean_dec(x_13); +lean_dec(x_9); +x_125 = l_Lean_Name_toString___closed__1; +x_126 = l_Lean_Name_toStringWithSep___main(x_125, x_10); +x_127 = lean_alloc_ctor(2, 1, 0); +lean_ctor_set(x_127, 0, x_126); +x_128 = lean_alloc_ctor(0, 1, 0); +lean_ctor_set(x_128, 0, x_127); +x_129 = l_List_foldlM___main___at___private_Init_Lean_Elab_Tactic_Induction_13__getRecInfoDefault___spec__3___closed__3; +x_130 = lean_alloc_ctor(9, 2, 0); +lean_ctor_set(x_130, 0, x_129); +lean_ctor_set(x_130, 1, x_128); +x_131 = l_List_foldlM___main___at___private_Init_Lean_Elab_Tactic_Induction_13__getRecInfoDefault___spec__3___closed__6; +x_132 = lean_alloc_ctor(9, 2, 0); +lean_ctor_set(x_132, 0, x_130); +lean_ctor_set(x_132, 1, x_131); +lean_inc(x_5); lean_inc(x_1); -x_190 = l_Lean_Elab_Tactic_throwError___rarg(x_1, x_189, x_4, x_5); +x_133 = l_Lean_Elab_Tactic_throwError___rarg(x_1, x_132, x_5, x_6); +if (lean_obj_tag(x_133) == 0) +{ +lean_object* x_134; lean_object* x_135; +x_134 = lean_ctor_get(x_133, 0); +lean_inc(x_134); +x_135 = lean_ctor_get(x_133, 1); +lean_inc(x_135); +lean_dec(x_133); +x_3 = x_134; +x_4 = x_11; +x_6 = x_135; +goto _start; +} +else +{ +lean_object* x_137; lean_object* x_138; lean_object* x_139; lean_object* x_140; +lean_dec(x_11); +lean_dec(x_5); +lean_dec(x_1); +x_137 = lean_ctor_get(x_133, 0); +lean_inc(x_137); +x_138 = lean_ctor_get(x_133, 1); +lean_inc(x_138); +if (lean_is_exclusive(x_133)) { + lean_ctor_release(x_133, 0); + lean_ctor_release(x_133, 1); + x_139 = x_133; +} else { + lean_dec_ref(x_133); + x_139 = lean_box(0); +} +if (lean_is_scalar(x_139)) { + x_140 = lean_alloc_ctor(1, 2, 0); +} else { + x_140 = x_139; +} +lean_ctor_set(x_140, 0, x_137); +lean_ctor_set(x_140, 1, x_138); +return x_140; +} +} +else +{ +lean_object* x_141; lean_object* x_142; lean_object* x_143; lean_object* x_144; lean_object* x_145; +lean_dec(x_10); +x_141 = lean_box(0); +x_142 = lean_array_push(x_13, x_141); +x_143 = lean_box(0); +x_144 = lean_array_push(x_119, x_143); +x_145 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_145, 0, x_144); +lean_ctor_set(x_145, 1, x_9); +lean_ctor_set(x_3, 1, x_145); +lean_ctor_set(x_3, 0, x_142); +x_4 = x_11; +goto _start; +} +} +else +{ +lean_object* x_147; lean_object* x_148; lean_object* x_149; lean_object* x_150; lean_object* x_151; lean_object* x_152; lean_object* x_153; lean_object* x_154; +lean_dec(x_10); +x_147 = lean_ctor_get(x_121, 0); +lean_inc(x_147); +lean_dec(x_121); +x_148 = l___private_Init_Lean_Elab_Tactic_Induction_9__getAltVarNames(x_147); +x_149 = l_Array_toList___rarg(x_148); +lean_dec(x_148); +x_150 = lean_array_push(x_13, x_149); +x_151 = lean_unsigned_to_nat(3u); +x_152 = l_Lean_Syntax_getArg(x_147, x_151); +lean_dec(x_147); +x_153 = lean_array_push(x_119, x_152); +x_154 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_154, 0, x_153); +lean_ctor_set(x_154, 1, x_9); +lean_ctor_set(x_3, 1, x_154); +lean_ctor_set(x_3, 0, x_150); +x_4 = x_11; +goto _start; +} +} +else +{ +lean_object* x_156; lean_object* x_157; lean_object* x_158; lean_object* x_159; lean_object* x_160; lean_object* x_161; lean_object* x_162; lean_object* x_163; lean_object* x_164; lean_object* x_165; lean_object* x_166; lean_object* x_167; lean_object* x_168; lean_object* x_169; lean_object* x_170; +lean_dec(x_121); +lean_dec(x_10); +if (lean_is_exclusive(x_9)) { + lean_ctor_release(x_9, 0); + lean_ctor_release(x_9, 1); + x_156 = x_9; +} else { + lean_dec_ref(x_9); + x_156 = lean_box(0); +} +x_157 = lean_ctor_get(x_124, 0); +lean_inc(x_157); +if (lean_is_exclusive(x_124)) { + lean_ctor_release(x_124, 0); + x_158 = x_124; +} else { + lean_dec_ref(x_124); + x_158 = lean_box(0); +} +x_159 = l_Lean_Syntax_inhabited; +x_160 = lean_array_get(x_159, x_120, x_157); +x_161 = l___private_Init_Lean_Elab_Tactic_Induction_9__getAltVarNames(x_160); +x_162 = l_Array_toList___rarg(x_161); +lean_dec(x_161); +x_163 = lean_array_push(x_13, x_162); +x_164 = lean_unsigned_to_nat(3u); +x_165 = l_Lean_Syntax_getArg(x_160, x_164); +x_166 = lean_array_push(x_119, x_165); +x_167 = l_Array_eraseIdx___rarg(x_120, x_157); +lean_dec(x_157); +if (lean_is_scalar(x_158)) { + x_168 = lean_alloc_ctor(1, 1, 0); +} else { + x_168 = x_158; +} +lean_ctor_set(x_168, 0, x_160); +if (lean_is_scalar(x_156)) { + x_169 = lean_alloc_ctor(0, 2, 0); +} else { + x_169 = x_156; +} +lean_ctor_set(x_169, 0, x_167); +lean_ctor_set(x_169, 1, x_168); +x_170 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_170, 0, x_166); +lean_ctor_set(x_170, 1, x_169); +lean_ctor_set(x_3, 1, x_170); +lean_ctor_set(x_3, 0, x_163); +x_4 = x_11; +goto _start; +} +} +else +{ +lean_object* x_172; lean_object* x_173; lean_object* x_174; lean_object* x_175; lean_object* x_176; lean_object* x_177; lean_object* x_178; lean_object* x_179; lean_object* x_180; lean_object* x_181; lean_object* x_182; lean_object* x_183; lean_object* x_184; +lean_dec(x_10); +if (lean_is_exclusive(x_9)) { + lean_ctor_release(x_9, 0); + lean_ctor_release(x_9, 1); + x_172 = x_9; +} else { + lean_dec_ref(x_9); + x_172 = lean_box(0); +} +x_173 = lean_ctor_get(x_123, 0); +lean_inc(x_173); +lean_dec(x_123); +x_174 = l_Lean_Syntax_inhabited; +x_175 = lean_array_get(x_174, x_120, x_173); +x_176 = l___private_Init_Lean_Elab_Tactic_Induction_9__getAltVarNames(x_175); +x_177 = l_Array_toList___rarg(x_176); +lean_dec(x_176); +x_178 = lean_array_push(x_13, x_177); +x_179 = lean_unsigned_to_nat(3u); +x_180 = l_Lean_Syntax_getArg(x_175, x_179); +lean_dec(x_175); +x_181 = lean_array_push(x_119, x_180); +x_182 = l_Array_eraseIdx___rarg(x_120, x_173); +lean_dec(x_173); +if (lean_is_scalar(x_172)) { + x_183 = lean_alloc_ctor(0, 2, 0); +} else { + x_183 = x_172; +} +lean_ctor_set(x_183, 0, x_182); +lean_ctor_set(x_183, 1, x_121); +x_184 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_184, 0, x_181); +lean_ctor_set(x_184, 1, x_183); +lean_ctor_set(x_3, 1, x_184); +lean_ctor_set(x_3, 0, x_178); +x_4 = x_11; +goto _start; +} +} +} +else +{ +lean_object* x_186; lean_object* x_187; lean_object* x_188; lean_object* x_189; lean_object* x_190; lean_object* x_191; lean_object* x_192; +x_186 = lean_ctor_get(x_3, 0); +lean_inc(x_186); +lean_dec(x_3); +x_187 = lean_ctor_get(x_8, 0); +lean_inc(x_187); +if (lean_is_exclusive(x_8)) { + lean_ctor_release(x_8, 0); + lean_ctor_release(x_8, 1); + x_188 = x_8; +} else { + lean_dec_ref(x_8); + x_188 = lean_box(0); +} +x_189 = lean_ctor_get(x_9, 0); +lean_inc(x_189); +x_190 = lean_ctor_get(x_9, 1); +lean_inc(x_190); +x_191 = lean_unsigned_to_nat(0u); +x_192 = l_Array_findIdxAux___main___at___private_Init_Lean_Elab_Tactic_Induction_13__getRecInfoDefault___spec__1(x_10, x_189, x_191); +if (lean_obj_tag(x_192) == 0) +{ +lean_object* x_193; +x_193 = l_Array_findIdxAux___main___at___private_Init_Lean_Elab_Tactic_Induction_13__getRecInfoDefault___spec__2(x_189, x_191); +if (lean_obj_tag(x_193) == 0) +{ +lean_dec(x_189); if (lean_obj_tag(x_190) == 0) { -lean_object* x_191; lean_object* x_192; -x_191 = lean_ctor_get(x_190, 0); -lean_inc(x_191); -x_192 = lean_ctor_get(x_190, 1); -lean_inc(x_192); -lean_dec(x_190); -x_2 = x_191; -x_3 = x_10; -x_5 = x_192; +if (x_2 == 0) +{ +lean_object* x_194; lean_object* x_195; lean_object* x_196; lean_object* x_197; lean_object* x_198; lean_object* x_199; lean_object* x_200; lean_object* x_201; lean_object* x_202; +lean_dec(x_188); +lean_dec(x_187); +lean_dec(x_186); +lean_dec(x_9); +x_194 = l_Lean_Name_toString___closed__1; +x_195 = l_Lean_Name_toStringWithSep___main(x_194, x_10); +x_196 = lean_alloc_ctor(2, 1, 0); +lean_ctor_set(x_196, 0, x_195); +x_197 = lean_alloc_ctor(0, 1, 0); +lean_ctor_set(x_197, 0, x_196); +x_198 = l_List_foldlM___main___at___private_Init_Lean_Elab_Tactic_Induction_13__getRecInfoDefault___spec__3___closed__3; +x_199 = lean_alloc_ctor(9, 2, 0); +lean_ctor_set(x_199, 0, x_198); +lean_ctor_set(x_199, 1, x_197); +x_200 = l_List_foldlM___main___at___private_Init_Lean_Elab_Tactic_Induction_13__getRecInfoDefault___spec__3___closed__6; +x_201 = lean_alloc_ctor(9, 2, 0); +lean_ctor_set(x_201, 0, x_199); +lean_ctor_set(x_201, 1, x_200); +lean_inc(x_5); +lean_inc(x_1); +x_202 = l_Lean_Elab_Tactic_throwError___rarg(x_1, x_201, x_5, x_6); +if (lean_obj_tag(x_202) == 0) +{ +lean_object* x_203; lean_object* x_204; +x_203 = lean_ctor_get(x_202, 0); +lean_inc(x_203); +x_204 = lean_ctor_get(x_202, 1); +lean_inc(x_204); +lean_dec(x_202); +x_3 = x_203; +x_4 = x_11; +x_6 = x_204; goto _start; } else { -lean_object* x_194; lean_object* x_195; lean_object* x_196; lean_object* x_197; -lean_dec(x_10); -lean_dec(x_4); +lean_object* x_206; lean_object* x_207; lean_object* x_208; lean_object* x_209; +lean_dec(x_11); +lean_dec(x_5); lean_dec(x_1); -x_194 = lean_ctor_get(x_190, 0); -lean_inc(x_194); -x_195 = lean_ctor_get(x_190, 1); -lean_inc(x_195); -if (lean_is_exclusive(x_190)) { - lean_ctor_release(x_190, 0); - lean_ctor_release(x_190, 1); - x_196 = x_190; +x_206 = lean_ctor_get(x_202, 0); +lean_inc(x_206); +x_207 = lean_ctor_get(x_202, 1); +lean_inc(x_207); +if (lean_is_exclusive(x_202)) { + lean_ctor_release(x_202, 0); + lean_ctor_release(x_202, 1); + x_208 = x_202; } else { - lean_dec_ref(x_190); - 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; -} -} -else -{ -lean_object* x_198; lean_object* x_199; lean_object* x_200; lean_object* x_201; lean_object* x_202; lean_object* x_203; lean_object* x_204; lean_object* x_205; lean_object* x_206; -lean_dec(x_9); -x_198 = lean_ctor_get(x_178, 0); -lean_inc(x_198); -lean_dec(x_178); -x_199 = l___private_Init_Lean_Elab_Tactic_Induction_9__getAltVarNames(x_198); -x_200 = l_Array_toList___rarg(x_199); -lean_dec(x_199); -x_201 = lean_array_push(x_174, x_200); -x_202 = lean_unsigned_to_nat(3u); -x_203 = l_Lean_Syntax_getArg(x_198, x_202); -lean_dec(x_198); -x_204 = lean_array_push(x_175, x_203); -if (lean_is_scalar(x_176)) { - x_205 = lean_alloc_ctor(0, 2, 0); -} else { - x_205 = x_176; -} -lean_ctor_set(x_205, 0, x_204); -lean_ctor_set(x_205, 1, x_8); -x_206 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_206, 0, x_201); -lean_ctor_set(x_206, 1, x_205); -x_2 = x_206; -x_3 = x_10; -goto _start; -} -} -else -{ -lean_object* x_208; lean_object* x_209; lean_object* x_210; lean_object* x_211; lean_object* x_212; lean_object* x_213; lean_object* x_214; lean_object* x_215; lean_object* x_216; lean_object* x_217; lean_object* x_218; lean_object* x_219; lean_object* x_220; lean_object* x_221; lean_object* x_222; lean_object* x_223; -lean_dec(x_178); -lean_dec(x_9); -if (lean_is_exclusive(x_8)) { - lean_ctor_release(x_8, 0); - lean_ctor_release(x_8, 1); - x_208 = x_8; -} else { - lean_dec_ref(x_8); + lean_dec_ref(x_202); x_208 = lean_box(0); } -x_209 = lean_ctor_get(x_181, 0); -lean_inc(x_209); -if (lean_is_exclusive(x_181)) { - lean_ctor_release(x_181, 0); - x_210 = x_181; -} else { - lean_dec_ref(x_181); - x_210 = lean_box(0); -} -x_211 = l_Lean_Syntax_inhabited; -x_212 = lean_array_get(x_211, x_177, x_209); -x_213 = l___private_Init_Lean_Elab_Tactic_Induction_9__getAltVarNames(x_212); -x_214 = l_Array_toList___rarg(x_213); -lean_dec(x_213); -x_215 = lean_array_push(x_174, x_214); -x_216 = lean_unsigned_to_nat(3u); -x_217 = l_Lean_Syntax_getArg(x_212, x_216); -x_218 = lean_array_push(x_175, x_217); -x_219 = l_Array_eraseIdx___rarg(x_177, x_209); -lean_dec(x_209); -if (lean_is_scalar(x_210)) { - x_220 = lean_alloc_ctor(1, 1, 0); -} else { - x_220 = x_210; -} -lean_ctor_set(x_220, 0, x_212); if (lean_is_scalar(x_208)) { - x_221 = lean_alloc_ctor(0, 2, 0); + x_209 = lean_alloc_ctor(1, 2, 0); } else { - x_221 = x_208; + x_209 = x_208; } -lean_ctor_set(x_221, 0, x_219); -lean_ctor_set(x_221, 1, x_220); -if (lean_is_scalar(x_176)) { - x_222 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_209, 0, x_206); +lean_ctor_set(x_209, 1, x_207); +return x_209; +} +} +else +{ +lean_object* x_210; lean_object* x_211; lean_object* x_212; lean_object* x_213; lean_object* x_214; lean_object* x_215; +lean_dec(x_10); +x_210 = lean_box(0); +x_211 = lean_array_push(x_186, x_210); +x_212 = lean_box(0); +x_213 = lean_array_push(x_187, x_212); +if (lean_is_scalar(x_188)) { + x_214 = lean_alloc_ctor(0, 2, 0); } else { - x_222 = x_176; + x_214 = x_188; } -lean_ctor_set(x_222, 0, x_218); -lean_ctor_set(x_222, 1, x_221); -x_223 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_223, 0, x_215); -lean_ctor_set(x_223, 1, x_222); -x_2 = x_223; -x_3 = x_10; +lean_ctor_set(x_214, 0, x_213); +lean_ctor_set(x_214, 1, x_9); +x_215 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_215, 0, x_211); +lean_ctor_set(x_215, 1, x_214); +x_3 = x_215; +x_4 = x_11; goto _start; } } else { -lean_object* x_225; lean_object* x_226; lean_object* x_227; lean_object* x_228; lean_object* x_229; lean_object* x_230; lean_object* x_231; lean_object* x_232; lean_object* x_233; lean_object* x_234; lean_object* x_235; lean_object* x_236; lean_object* x_237; lean_object* x_238; -lean_dec(x_9); -if (lean_is_exclusive(x_8)) { - lean_ctor_release(x_8, 0); - lean_ctor_release(x_8, 1); - x_225 = x_8; +lean_object* x_217; lean_object* x_218; lean_object* x_219; lean_object* x_220; lean_object* x_221; lean_object* x_222; lean_object* x_223; lean_object* x_224; lean_object* x_225; +lean_dec(x_10); +x_217 = lean_ctor_get(x_190, 0); +lean_inc(x_217); +lean_dec(x_190); +x_218 = l___private_Init_Lean_Elab_Tactic_Induction_9__getAltVarNames(x_217); +x_219 = l_Array_toList___rarg(x_218); +lean_dec(x_218); +x_220 = lean_array_push(x_186, x_219); +x_221 = lean_unsigned_to_nat(3u); +x_222 = l_Lean_Syntax_getArg(x_217, x_221); +lean_dec(x_217); +x_223 = lean_array_push(x_187, x_222); +if (lean_is_scalar(x_188)) { + x_224 = lean_alloc_ctor(0, 2, 0); } else { - lean_dec_ref(x_8); - x_225 = lean_box(0); + x_224 = x_188; } -x_226 = lean_ctor_get(x_180, 0); -lean_inc(x_226); -lean_dec(x_180); -x_227 = l_Lean_Syntax_inhabited; -x_228 = lean_array_get(x_227, x_177, x_226); -x_229 = l___private_Init_Lean_Elab_Tactic_Induction_9__getAltVarNames(x_228); -x_230 = l_Array_toList___rarg(x_229); -lean_dec(x_229); -x_231 = lean_array_push(x_174, x_230); -x_232 = lean_unsigned_to_nat(3u); -x_233 = l_Lean_Syntax_getArg(x_228, x_232); +lean_ctor_set(x_224, 0, x_223); +lean_ctor_set(x_224, 1, x_9); +x_225 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_225, 0, x_220); +lean_ctor_set(x_225, 1, x_224); +x_3 = x_225; +x_4 = x_11; +goto _start; +} +} +else +{ +lean_object* x_227; lean_object* x_228; lean_object* x_229; lean_object* x_230; lean_object* x_231; lean_object* x_232; lean_object* x_233; lean_object* x_234; lean_object* x_235; lean_object* x_236; lean_object* x_237; lean_object* x_238; lean_object* x_239; lean_object* x_240; lean_object* x_241; lean_object* x_242; +lean_dec(x_190); +lean_dec(x_10); +if (lean_is_exclusive(x_9)) { + lean_ctor_release(x_9, 0); + lean_ctor_release(x_9, 1); + x_227 = x_9; +} else { + lean_dec_ref(x_9); + x_227 = lean_box(0); +} +x_228 = lean_ctor_get(x_193, 0); +lean_inc(x_228); +if (lean_is_exclusive(x_193)) { + lean_ctor_release(x_193, 0); + x_229 = x_193; +} else { + lean_dec_ref(x_193); + x_229 = lean_box(0); +} +x_230 = l_Lean_Syntax_inhabited; +x_231 = lean_array_get(x_230, x_189, x_228); +x_232 = l___private_Init_Lean_Elab_Tactic_Induction_9__getAltVarNames(x_231); +x_233 = l_Array_toList___rarg(x_232); +lean_dec(x_232); +x_234 = lean_array_push(x_186, x_233); +x_235 = lean_unsigned_to_nat(3u); +x_236 = l_Lean_Syntax_getArg(x_231, x_235); +x_237 = lean_array_push(x_187, x_236); +x_238 = l_Array_eraseIdx___rarg(x_189, x_228); lean_dec(x_228); -x_234 = lean_array_push(x_175, x_233); -x_235 = l_Array_eraseIdx___rarg(x_177, x_226); -lean_dec(x_226); -if (lean_is_scalar(x_225)) { - x_236 = lean_alloc_ctor(0, 2, 0); +if (lean_is_scalar(x_229)) { + x_239 = lean_alloc_ctor(1, 1, 0); } else { - x_236 = x_225; + x_239 = x_229; } -lean_ctor_set(x_236, 0, x_235); -lean_ctor_set(x_236, 1, x_178); -if (lean_is_scalar(x_176)) { - x_237 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_239, 0, x_231); +if (lean_is_scalar(x_227)) { + x_240 = lean_alloc_ctor(0, 2, 0); } else { - x_237 = x_176; + x_240 = x_227; } -lean_ctor_set(x_237, 0, x_234); -lean_ctor_set(x_237, 1, x_236); -x_238 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_238, 0, x_231); -lean_ctor_set(x_238, 1, x_237); -x_2 = x_238; -x_3 = x_10; +lean_ctor_set(x_240, 0, x_238); +lean_ctor_set(x_240, 1, x_239); +if (lean_is_scalar(x_188)) { + x_241 = lean_alloc_ctor(0, 2, 0); +} else { + x_241 = x_188; +} +lean_ctor_set(x_241, 0, x_237); +lean_ctor_set(x_241, 1, x_240); +x_242 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_242, 0, x_234); +lean_ctor_set(x_242, 1, x_241); +x_3 = x_242; +x_4 = x_11; +goto _start; +} +} +else +{ +lean_object* x_244; lean_object* x_245; lean_object* x_246; lean_object* x_247; lean_object* x_248; lean_object* x_249; lean_object* x_250; lean_object* x_251; lean_object* x_252; lean_object* x_253; lean_object* x_254; lean_object* x_255; lean_object* x_256; lean_object* x_257; +lean_dec(x_10); +if (lean_is_exclusive(x_9)) { + lean_ctor_release(x_9, 0); + lean_ctor_release(x_9, 1); + x_244 = x_9; +} else { + lean_dec_ref(x_9); + x_244 = lean_box(0); +} +x_245 = lean_ctor_get(x_192, 0); +lean_inc(x_245); +lean_dec(x_192); +x_246 = l_Lean_Syntax_inhabited; +x_247 = lean_array_get(x_246, x_189, x_245); +x_248 = l___private_Init_Lean_Elab_Tactic_Induction_9__getAltVarNames(x_247); +x_249 = l_Array_toList___rarg(x_248); +lean_dec(x_248); +x_250 = lean_array_push(x_186, x_249); +x_251 = lean_unsigned_to_nat(3u); +x_252 = l_Lean_Syntax_getArg(x_247, x_251); +lean_dec(x_247); +x_253 = lean_array_push(x_187, x_252); +x_254 = l_Array_eraseIdx___rarg(x_189, x_245); +lean_dec(x_245); +if (lean_is_scalar(x_244)) { + x_255 = lean_alloc_ctor(0, 2, 0); +} else { + x_255 = x_244; +} +lean_ctor_set(x_255, 0, x_254); +lean_ctor_set(x_255, 1, x_190); +if (lean_is_scalar(x_188)) { + x_256 = lean_alloc_ctor(0, 2, 0); +} else { + x_256 = x_188; +} +lean_ctor_set(x_256, 0, x_253); +lean_ctor_set(x_256, 1, x_255); +x_257 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_257, 0, x_250); +lean_ctor_set(x_257, 1, x_256); +x_3 = x_257; +x_4 = x_11; goto _start; } } @@ -8673,581 +8756,776 @@ lean_ctor_set(x_2, 0, x_1); return x_2; } } -lean_object* l___private_Init_Lean_Elab_Tactic_Induction_13__getRecInfoDefault(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_Tactic_Induction_13__getRecInfoDefault(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_6; -lean_inc(x_4); +lean_object* x_7; +lean_inc(x_5); lean_inc(x_1); -x_6 = l_Lean_Elab_Tactic_getInductiveValFromMajor(x_1, x_2, x_4, x_5); -if (lean_obj_tag(x_6) == 0) +x_7 = l_Lean_Elab_Tactic_getInductiveValFromMajor(x_1, x_2, x_5, x_6); +if (lean_obj_tag(x_7) == 0) { -uint8_t x_7; -x_7 = !lean_is_exclusive(x_6); -if (x_7 == 0) +uint8_t x_8; +x_8 = !lean_is_exclusive(x_7); +if (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; uint8_t x_14; -x_8 = lean_ctor_get(x_6, 0); -x_9 = lean_ctor_get(x_6, 1); -x_10 = lean_ctor_get(x_8, 0); -lean_inc(x_10); -x_11 = lean_ctor_get(x_10, 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; uint8_t x_15; +x_9 = lean_ctor_get(x_7, 0); +x_10 = lean_ctor_get(x_7, 1); +x_11 = lean_ctor_get(x_9, 0); lean_inc(x_11); -lean_dec(x_10); -x_12 = l_Lean_mkRecFor___closed__1; -x_13 = lean_name_mk_string(x_11, x_12); -x_14 = l_Lean_Syntax_isNone(x_3); -if (x_14 == 0) +x_12 = lean_ctor_get(x_11, 0); +lean_inc(x_12); +lean_dec(x_11); +x_13 = l_Lean_mkRecFor___closed__1; +x_14 = lean_name_mk_string(x_12, x_13); +x_15 = l_Lean_Syntax_isNone(x_3); +if (x_15 == 0) { -lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; -lean_free_object(x_6); -x_15 = lean_ctor_get(x_8, 4); -lean_inc(x_15); -lean_dec(x_8); -x_16 = l___private_Init_Lean_Elab_Tactic_Induction_7__getAlts(x_3); -x_17 = lean_unsigned_to_nat(0u); -lean_inc(x_4); -x_18 = l_Array_forMAux___main___at___private_Init_Lean_Elab_Tactic_Induction_11__checkAltCtorNames___spec__2(x_15, x_16, x_17, x_4, x_9); -if (lean_obj_tag(x_18) == 0) +lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; +lean_free_object(x_7); +x_16 = lean_ctor_get(x_9, 4); +lean_inc(x_16); +lean_dec(x_9); +x_17 = l___private_Init_Lean_Elab_Tactic_Induction_7__getAlts(x_3); +x_18 = lean_unsigned_to_nat(0u); +lean_inc(x_5); +x_19 = l_Array_forMAux___main___at___private_Init_Lean_Elab_Tactic_Induction_11__checkAltCtorNames___spec__2(x_16, x_17, x_18, x_5, x_10); +if (lean_obj_tag(x_19) == 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; -x_19 = lean_ctor_get(x_18, 1); -lean_inc(x_19); -lean_dec(x_18); -x_20 = lean_box(0); -x_21 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_21, 0, x_16); -lean_ctor_set(x_21, 1, x_20); -x_22 = l_Array_empty___closed__1; -x_23 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_23, 0, x_22); -lean_ctor_set(x_23, 1, x_21); +lean_object* x_20; lean_object* x_21; lean_object* x_22; lean_object* x_23; lean_object* x_24; lean_object* x_25; lean_object* x_26; +x_20 = lean_ctor_get(x_19, 1); +lean_inc(x_20); +lean_dec(x_19); +x_21 = lean_box(0); +x_22 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_22, 0, x_17); +lean_ctor_set(x_22, 1, x_21); +x_23 = l_Array_empty___closed__1; x_24 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_24, 0, x_22); -lean_ctor_set(x_24, 1, x_23); -lean_inc(x_4); -x_25 = l_List_foldlM___main___at___private_Init_Lean_Elab_Tactic_Induction_13__getRecInfoDefault___spec__3(x_1, x_24, x_15, x_4, x_19); -if (lean_obj_tag(x_25) == 0) +lean_ctor_set(x_24, 0, x_23); +lean_ctor_set(x_24, 1, x_22); +x_25 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_25, 0, x_23); +lean_ctor_set(x_25, 1, x_24); +lean_inc(x_5); +lean_inc(x_16); +x_26 = l_List_foldlM___main___at___private_Init_Lean_Elab_Tactic_Induction_13__getRecInfoDefault___spec__3(x_1, x_4, x_25, x_16, x_5, x_20); +if (lean_obj_tag(x_26) == 0) { -lean_object* x_26; lean_object* x_27; lean_object* x_28; uint8_t x_29; -x_26 = lean_ctor_get(x_25, 0); -lean_inc(x_26); -x_27 = lean_ctor_get(x_26, 1); +lean_object* x_27; lean_object* x_28; lean_object* x_29; uint8_t x_30; +x_27 = lean_ctor_get(x_26, 0); lean_inc(x_27); x_28 = lean_ctor_get(x_27, 1); lean_inc(x_28); -x_29 = !lean_is_exclusive(x_25); -if (x_29 == 0) +x_29 = lean_ctor_get(x_28, 1); +lean_inc(x_29); +x_30 = !lean_is_exclusive(x_26); +if (x_30 == 0) { -lean_object* x_30; lean_object* x_31; lean_object* x_32; lean_object* x_33; lean_object* x_34; uint8_t x_35; -x_30 = lean_ctor_get(x_25, 1); -x_31 = lean_ctor_get(x_25, 0); -lean_dec(x_31); +lean_object* x_31; lean_object* x_32; lean_object* x_33; lean_object* x_34; uint8_t x_35; +x_31 = lean_ctor_get(x_26, 1); x_32 = lean_ctor_get(x_26, 0); -lean_inc(x_32); -lean_dec(x_26); +lean_dec(x_32); x_33 = lean_ctor_get(x_27, 0); lean_inc(x_33); lean_dec(x_27); x_34 = lean_ctor_get(x_28, 0); lean_inc(x_34); lean_dec(x_28); -x_35 = l_Array_isEmpty___rarg(x_34); +x_35 = !lean_is_exclusive(x_29); if (x_35 == 0) { -lean_object* x_36; lean_object* x_37; lean_object* x_38; lean_object* x_39; -lean_free_object(x_25); -x_36 = l_Lean_Syntax_inhabited; -x_37 = lean_array_get(x_36, x_34, x_17); -lean_dec(x_34); -x_38 = l___private_Init_Lean_Elab_Tactic_Induction_13__getRecInfoDefault___closed__3; -x_39 = l_Lean_Elab_Tactic_throwError___rarg(x_37, x_38, x_4, x_30); -if (lean_obj_tag(x_39) == 0) +lean_object* x_36; lean_object* x_37; uint8_t x_38; +x_36 = lean_ctor_get(x_29, 0); +x_37 = lean_ctor_get(x_29, 1); +lean_dec(x_37); +x_38 = l_Array_isEmpty___rarg(x_36); +if (x_38 == 0) { -uint8_t x_40; -x_40 = !lean_is_exclusive(x_39); -if (x_40 == 0) +lean_object* x_39; lean_object* x_40; lean_object* x_41; lean_object* x_42; +lean_free_object(x_26); +x_39 = l_Lean_Syntax_inhabited; +x_40 = lean_array_get(x_39, x_36, x_18); +lean_dec(x_36); +x_41 = l___private_Init_Lean_Elab_Tactic_Induction_13__getRecInfoDefault___closed__3; +x_42 = l_Lean_Elab_Tactic_throwError___rarg(x_40, x_41, x_5, x_31); +if (lean_obj_tag(x_42) == 0) { -lean_object* x_41; lean_object* x_42; -x_41 = lean_ctor_get(x_39, 0); -lean_dec(x_41); -x_42 = lean_alloc_ctor(0, 3, 0); -lean_ctor_set(x_42, 0, x_13); -lean_ctor_set(x_42, 1, x_32); -lean_ctor_set(x_42, 2, x_33); -lean_ctor_set(x_39, 0, x_42); -return x_39; +uint8_t x_43; +x_43 = !lean_is_exclusive(x_42); +if (x_43 == 0) +{ +lean_object* x_44; lean_object* x_45; lean_object* x_46; lean_object* x_47; lean_object* x_48; +x_44 = lean_ctor_get(x_42, 0); +lean_dec(x_44); +x_45 = lean_alloc_ctor(0, 3, 0); +lean_ctor_set(x_45, 0, x_14); +lean_ctor_set(x_45, 1, x_33); +lean_ctor_set(x_45, 2, x_34); +x_46 = l_List_redLength___main___rarg(x_16); +x_47 = lean_mk_empty_array_with_capacity(x_46); +lean_dec(x_46); +x_48 = l_List_toArrayAux___main___rarg(x_16, x_47); +lean_ctor_set(x_29, 1, x_48); +lean_ctor_set(x_29, 0, x_45); +lean_ctor_set(x_42, 0, x_29); +return x_42; } else { -lean_object* x_43; lean_object* x_44; lean_object* x_45; -x_43 = lean_ctor_get(x_39, 1); -lean_inc(x_43); -lean_dec(x_39); -x_44 = lean_alloc_ctor(0, 3, 0); -lean_ctor_set(x_44, 0, x_13); -lean_ctor_set(x_44, 1, x_32); -lean_ctor_set(x_44, 2, x_33); -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; -} -} -else -{ -uint8_t x_46; -lean_dec(x_33); -lean_dec(x_32); -lean_dec(x_13); -x_46 = !lean_is_exclusive(x_39); -if (x_46 == 0) -{ -return x_39; -} -else -{ -lean_object* x_47; lean_object* x_48; lean_object* x_49; -x_47 = lean_ctor_get(x_39, 0); -x_48 = lean_ctor_get(x_39, 1); -lean_inc(x_48); -lean_inc(x_47); -lean_dec(x_39); -x_49 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_49, 0, x_47); -lean_ctor_set(x_49, 1, x_48); -return x_49; -} -} -} -else -{ -lean_object* x_50; -lean_dec(x_34); -lean_dec(x_4); +lean_object* x_49; lean_object* x_50; lean_object* x_51; lean_object* x_52; lean_object* x_53; lean_object* x_54; +x_49 = lean_ctor_get(x_42, 1); +lean_inc(x_49); +lean_dec(x_42); x_50 = lean_alloc_ctor(0, 3, 0); -lean_ctor_set(x_50, 0, x_13); -lean_ctor_set(x_50, 1, x_32); -lean_ctor_set(x_50, 2, x_33); -lean_ctor_set(x_25, 0, x_50); -return x_25; +lean_ctor_set(x_50, 0, x_14); +lean_ctor_set(x_50, 1, x_33); +lean_ctor_set(x_50, 2, x_34); +x_51 = l_List_redLength___main___rarg(x_16); +x_52 = lean_mk_empty_array_with_capacity(x_51); +lean_dec(x_51); +x_53 = l_List_toArrayAux___main___rarg(x_16, x_52); +lean_ctor_set(x_29, 1, x_53); +lean_ctor_set(x_29, 0, x_50); +x_54 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_54, 0, x_29); +lean_ctor_set(x_54, 1, x_49); +return x_54; } } else { -lean_object* x_51; lean_object* x_52; lean_object* x_53; lean_object* x_54; uint8_t x_55; -x_51 = lean_ctor_get(x_25, 1); -lean_inc(x_51); -lean_dec(x_25); -x_52 = lean_ctor_get(x_26, 0); -lean_inc(x_52); -lean_dec(x_26); -x_53 = lean_ctor_get(x_27, 0); -lean_inc(x_53); -lean_dec(x_27); -x_54 = lean_ctor_get(x_28, 0); -lean_inc(x_54); -lean_dec(x_28); -x_55 = l_Array_isEmpty___rarg(x_54); +uint8_t x_55; +lean_free_object(x_29); +lean_dec(x_34); +lean_dec(x_33); +lean_dec(x_16); +lean_dec(x_14); +x_55 = !lean_is_exclusive(x_42); if (x_55 == 0) { -lean_object* x_56; lean_object* x_57; lean_object* x_58; lean_object* x_59; -x_56 = l_Lean_Syntax_inhabited; -x_57 = lean_array_get(x_56, x_54, x_17); -lean_dec(x_54); -x_58 = l___private_Init_Lean_Elab_Tactic_Induction_13__getRecInfoDefault___closed__3; -x_59 = l_Lean_Elab_Tactic_throwError___rarg(x_57, x_58, x_4, x_51); -if (lean_obj_tag(x_59) == 0) +return x_42; +} +else { -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; +lean_object* x_56; lean_object* x_57; lean_object* x_58; +x_56 = lean_ctor_get(x_42, 0); +x_57 = lean_ctor_get(x_42, 1); +lean_inc(x_57); +lean_inc(x_56); +lean_dec(x_42); +x_58 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_58, 0, x_56); +lean_ctor_set(x_58, 1, x_57); +return x_58; +} +} +} +else +{ +lean_object* x_59; lean_object* x_60; lean_object* x_61; lean_object* x_62; +lean_dec(x_36); +lean_dec(x_5); +x_59 = lean_alloc_ctor(0, 3, 0); +lean_ctor_set(x_59, 0, x_14); +lean_ctor_set(x_59, 1, x_33); +lean_ctor_set(x_59, 2, x_34); +x_60 = l_List_redLength___main___rarg(x_16); +x_61 = lean_mk_empty_array_with_capacity(x_60); +lean_dec(x_60); +x_62 = l_List_toArrayAux___main___rarg(x_16, x_61); +lean_ctor_set(x_29, 1, x_62); +lean_ctor_set(x_29, 0, x_59); +lean_ctor_set(x_26, 0, x_29); +return x_26; +} +} +else +{ +lean_object* x_63; uint8_t x_64; +x_63 = lean_ctor_get(x_29, 0); +lean_inc(x_63); +lean_dec(x_29); +x_64 = l_Array_isEmpty___rarg(x_63); +if (x_64 == 0) +{ +lean_object* x_65; lean_object* x_66; lean_object* x_67; lean_object* x_68; +lean_free_object(x_26); +x_65 = l_Lean_Syntax_inhabited; +x_66 = lean_array_get(x_65, x_63, x_18); +lean_dec(x_63); +x_67 = l___private_Init_Lean_Elab_Tactic_Induction_13__getRecInfoDefault___closed__3; +x_68 = l_Lean_Elab_Tactic_throwError___rarg(x_66, x_67, x_5, x_31); +if (lean_obj_tag(x_68) == 0) +{ +lean_object* x_69; lean_object* x_70; lean_object* x_71; lean_object* x_72; lean_object* x_73; lean_object* x_74; lean_object* x_75; lean_object* x_76; +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_59); - x_61 = lean_box(0); + lean_dec_ref(x_68); + x_70 = lean_box(0); } -x_62 = lean_alloc_ctor(0, 3, 0); -lean_ctor_set(x_62, 0, x_13); -lean_ctor_set(x_62, 1, x_52); -lean_ctor_set(x_62, 2, x_53); -if (lean_is_scalar(x_61)) { - x_63 = lean_alloc_ctor(0, 2, 0); +x_71 = lean_alloc_ctor(0, 3, 0); +lean_ctor_set(x_71, 0, x_14); +lean_ctor_set(x_71, 1, x_33); +lean_ctor_set(x_71, 2, x_34); +x_72 = l_List_redLength___main___rarg(x_16); +x_73 = lean_mk_empty_array_with_capacity(x_72); +lean_dec(x_72); +x_74 = l_List_toArrayAux___main___rarg(x_16, x_73); +x_75 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_75, 0, x_71); +lean_ctor_set(x_75, 1, x_74); +if (lean_is_scalar(x_70)) { + x_76 = lean_alloc_ctor(0, 2, 0); } else { - x_63 = x_61; + x_76 = x_70; } -lean_ctor_set(x_63, 0, x_62); -lean_ctor_set(x_63, 1, x_60); -return x_63; +lean_ctor_set(x_76, 0, x_75); +lean_ctor_set(x_76, 1, x_69); +return x_76; } else { -lean_object* x_64; lean_object* x_65; lean_object* x_66; lean_object* x_67; -lean_dec(x_53); -lean_dec(x_52); -lean_dec(x_13); -x_64 = lean_ctor_get(x_59, 0); -lean_inc(x_64); -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_59); - x_66 = lean_box(0); -} -if (lean_is_scalar(x_66)) { - x_67 = lean_alloc_ctor(1, 2, 0); -} else { - x_67 = 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_68; lean_object* x_69; -lean_dec(x_54); -lean_dec(x_4); -x_68 = lean_alloc_ctor(0, 3, 0); -lean_ctor_set(x_68, 0, x_13); -lean_ctor_set(x_68, 1, x_52); -lean_ctor_set(x_68, 2, x_53); -x_69 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_69, 0, x_68); -lean_ctor_set(x_69, 1, x_51); -return x_69; -} -} -} -else -{ -uint8_t x_70; -lean_dec(x_13); -lean_dec(x_4); -x_70 = !lean_is_exclusive(x_25); -if (x_70 == 0) -{ -return x_25; -} -else -{ -lean_object* x_71; lean_object* x_72; lean_object* x_73; -x_71 = lean_ctor_get(x_25, 0); -x_72 = lean_ctor_get(x_25, 1); -lean_inc(x_72); -lean_inc(x_71); -lean_dec(x_25); -x_73 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_73, 0, x_71); -lean_ctor_set(x_73, 1, x_72); -return x_73; -} -} -} -else -{ -uint8_t x_74; +lean_object* x_77; lean_object* x_78; lean_object* x_79; lean_object* x_80; +lean_dec(x_34); +lean_dec(x_33); lean_dec(x_16); -lean_dec(x_15); -lean_dec(x_13); -lean_dec(x_4); -lean_dec(x_1); -x_74 = !lean_is_exclusive(x_18); -if (x_74 == 0) -{ -return x_18; +lean_dec(x_14); +x_77 = lean_ctor_get(x_68, 0); +lean_inc(x_77); +x_78 = lean_ctor_get(x_68, 1); +lean_inc(x_78); +if (lean_is_exclusive(x_68)) { + lean_ctor_release(x_68, 0); + lean_ctor_release(x_68, 1); + x_79 = x_68; +} else { + lean_dec_ref(x_68); + x_79 = lean_box(0); } -else -{ -lean_object* x_75; lean_object* x_76; lean_object* x_77; -x_75 = lean_ctor_get(x_18, 0); -x_76 = lean_ctor_get(x_18, 1); -lean_inc(x_76); -lean_inc(x_75); -lean_dec(x_18); -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; +if (lean_is_scalar(x_79)) { + x_80 = lean_alloc_ctor(1, 2, 0); +} else { + x_80 = x_79; } +lean_ctor_set(x_80, 0, x_77); +lean_ctor_set(x_80, 1, x_78); +return x_80; } } else { -lean_object* x_78; lean_object* x_79; -lean_dec(x_8); -lean_dec(x_4); -lean_dec(x_1); -x_78 = l_Array_empty___closed__1; -x_79 = lean_alloc_ctor(0, 3, 0); -lean_ctor_set(x_79, 0, x_13); -lean_ctor_set(x_79, 1, x_78); -lean_ctor_set(x_79, 2, x_78); -lean_ctor_set(x_6, 0, x_79); -return x_6; -} -} -else -{ -lean_object* x_80; lean_object* x_81; lean_object* x_82; lean_object* x_83; lean_object* x_84; lean_object* x_85; uint8_t x_86; -x_80 = lean_ctor_get(x_6, 0); -x_81 = lean_ctor_get(x_6, 1); -lean_inc(x_81); -lean_inc(x_80); -lean_dec(x_6); -x_82 = lean_ctor_get(x_80, 0); -lean_inc(x_82); -x_83 = lean_ctor_get(x_82, 0); -lean_inc(x_83); +lean_object* x_81; lean_object* x_82; lean_object* x_83; lean_object* x_84; lean_object* x_85; +lean_dec(x_63); +lean_dec(x_5); +x_81 = lean_alloc_ctor(0, 3, 0); +lean_ctor_set(x_81, 0, x_14); +lean_ctor_set(x_81, 1, x_33); +lean_ctor_set(x_81, 2, x_34); +x_82 = l_List_redLength___main___rarg(x_16); +x_83 = lean_mk_empty_array_with_capacity(x_82); lean_dec(x_82); -x_84 = l_Lean_mkRecFor___closed__1; -x_85 = lean_name_mk_string(x_83, x_84); -x_86 = l_Lean_Syntax_isNone(x_3); -if (x_86 == 0) +x_84 = l_List_toArrayAux___main___rarg(x_16, x_83); +x_85 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_85, 0, x_81); +lean_ctor_set(x_85, 1, x_84); +lean_ctor_set(x_26, 0, x_85); +return x_26; +} +} +} +else { -lean_object* x_87; lean_object* x_88; lean_object* x_89; lean_object* x_90; -x_87 = lean_ctor_get(x_80, 4); +lean_object* x_86; lean_object* x_87; lean_object* x_88; lean_object* x_89; lean_object* x_90; uint8_t x_91; +x_86 = lean_ctor_get(x_26, 1); +lean_inc(x_86); +lean_dec(x_26); +x_87 = lean_ctor_get(x_27, 0); lean_inc(x_87); -lean_dec(x_80); -x_88 = l___private_Init_Lean_Elab_Tactic_Induction_7__getAlts(x_3); -x_89 = lean_unsigned_to_nat(0u); -lean_inc(x_4); -x_90 = l_Array_forMAux___main___at___private_Init_Lean_Elab_Tactic_Induction_11__checkAltCtorNames___spec__2(x_87, x_88, x_89, x_4, x_81); -if (lean_obj_tag(x_90) == 0) -{ -lean_object* x_91; lean_object* x_92; lean_object* x_93; lean_object* x_94; lean_object* x_95; lean_object* x_96; lean_object* x_97; -x_91 = lean_ctor_get(x_90, 1); -lean_inc(x_91); -lean_dec(x_90); -x_92 = lean_box(0); -x_93 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_93, 0, x_88); -lean_ctor_set(x_93, 1, x_92); -x_94 = l_Array_empty___closed__1; -x_95 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_95, 0, x_94); -lean_ctor_set(x_95, 1, x_93); -x_96 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_96, 0, x_94); -lean_ctor_set(x_96, 1, x_95); -lean_inc(x_4); -x_97 = l_List_foldlM___main___at___private_Init_Lean_Elab_Tactic_Induction_13__getRecInfoDefault___spec__3(x_1, x_96, x_87, x_4, x_91); -if (lean_obj_tag(x_97) == 0) -{ -lean_object* x_98; lean_object* x_99; lean_object* x_100; lean_object* x_101; lean_object* x_102; lean_object* x_103; lean_object* x_104; lean_object* x_105; uint8_t x_106; -x_98 = lean_ctor_get(x_97, 0); -lean_inc(x_98); -x_99 = lean_ctor_get(x_98, 1); -lean_inc(x_99); -x_100 = lean_ctor_get(x_99, 1); -lean_inc(x_100); -x_101 = lean_ctor_get(x_97, 1); -lean_inc(x_101); -if (lean_is_exclusive(x_97)) { - lean_ctor_release(x_97, 0); - lean_ctor_release(x_97, 1); - x_102 = x_97; +lean_dec(x_27); +x_88 = lean_ctor_get(x_28, 0); +lean_inc(x_88); +lean_dec(x_28); +x_89 = lean_ctor_get(x_29, 0); +lean_inc(x_89); +if (lean_is_exclusive(x_29)) { + lean_ctor_release(x_29, 0); + lean_ctor_release(x_29, 1); + x_90 = x_29; } else { - lean_dec_ref(x_97); - x_102 = lean_box(0); + lean_dec_ref(x_29); + x_90 = lean_box(0); } -x_103 = lean_ctor_get(x_98, 0); -lean_inc(x_103); -lean_dec(x_98); -x_104 = lean_ctor_get(x_99, 0); -lean_inc(x_104); +x_91 = l_Array_isEmpty___rarg(x_89); +if (x_91 == 0) +{ +lean_object* x_92; lean_object* x_93; lean_object* x_94; lean_object* x_95; +x_92 = l_Lean_Syntax_inhabited; +x_93 = lean_array_get(x_92, x_89, x_18); +lean_dec(x_89); +x_94 = l___private_Init_Lean_Elab_Tactic_Induction_13__getRecInfoDefault___closed__3; +x_95 = l_Lean_Elab_Tactic_throwError___rarg(x_93, x_94, x_5, x_86); +if (lean_obj_tag(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; lean_object* x_103; +x_96 = lean_ctor_get(x_95, 1); +lean_inc(x_96); +if (lean_is_exclusive(x_95)) { + lean_ctor_release(x_95, 0); + lean_ctor_release(x_95, 1); + x_97 = x_95; +} else { + lean_dec_ref(x_95); + x_97 = lean_box(0); +} +x_98 = lean_alloc_ctor(0, 3, 0); +lean_ctor_set(x_98, 0, x_14); +lean_ctor_set(x_98, 1, x_87); +lean_ctor_set(x_98, 2, x_88); +x_99 = l_List_redLength___main___rarg(x_16); +x_100 = lean_mk_empty_array_with_capacity(x_99); lean_dec(x_99); -x_105 = lean_ctor_get(x_100, 0); -lean_inc(x_105); -lean_dec(x_100); -x_106 = l_Array_isEmpty___rarg(x_105); -if (x_106 == 0) -{ -lean_object* x_107; lean_object* x_108; lean_object* x_109; lean_object* x_110; -lean_dec(x_102); -x_107 = l_Lean_Syntax_inhabited; -x_108 = lean_array_get(x_107, x_105, x_89); -lean_dec(x_105); -x_109 = l___private_Init_Lean_Elab_Tactic_Induction_13__getRecInfoDefault___closed__3; -x_110 = l_Lean_Elab_Tactic_throwError___rarg(x_108, x_109, x_4, x_101); -if (lean_obj_tag(x_110) == 0) -{ -lean_object* x_111; lean_object* x_112; lean_object* x_113; lean_object* x_114; -x_111 = lean_ctor_get(x_110, 1); -lean_inc(x_111); -if (lean_is_exclusive(x_110)) { - lean_ctor_release(x_110, 0); - lean_ctor_release(x_110, 1); - x_112 = x_110; +x_101 = l_List_toArrayAux___main___rarg(x_16, x_100); +if (lean_is_scalar(x_90)) { + x_102 = lean_alloc_ctor(0, 2, 0); } else { - lean_dec_ref(x_110); - x_112 = lean_box(0); + x_102 = x_90; } -x_113 = lean_alloc_ctor(0, 3, 0); -lean_ctor_set(x_113, 0, x_85); -lean_ctor_set(x_113, 1, x_103); -lean_ctor_set(x_113, 2, x_104); -if (lean_is_scalar(x_112)) { - x_114 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_102, 0, x_98); +lean_ctor_set(x_102, 1, x_101); +if (lean_is_scalar(x_97)) { + x_103 = lean_alloc_ctor(0, 2, 0); } else { - x_114 = x_112; + x_103 = x_97; } -lean_ctor_set(x_114, 0, x_113); -lean_ctor_set(x_114, 1, x_111); -return x_114; +lean_ctor_set(x_103, 0, x_102); +lean_ctor_set(x_103, 1, x_96); +return x_103; } else { -lean_object* x_115; lean_object* x_116; lean_object* x_117; lean_object* x_118; -lean_dec(x_104); -lean_dec(x_103); -lean_dec(x_85); -x_115 = lean_ctor_get(x_110, 0); -lean_inc(x_115); -x_116 = lean_ctor_get(x_110, 1); -lean_inc(x_116); -if (lean_is_exclusive(x_110)) { - lean_ctor_release(x_110, 0); - lean_ctor_release(x_110, 1); - x_117 = x_110; -} else { - lean_dec_ref(x_110); - x_117 = lean_box(0); -} -if (lean_is_scalar(x_117)) { - x_118 = lean_alloc_ctor(1, 2, 0); -} else { - x_118 = x_117; -} -lean_ctor_set(x_118, 0, x_115); -lean_ctor_set(x_118, 1, x_116); -return x_118; -} -} -else -{ -lean_object* x_119; lean_object* x_120; -lean_dec(x_105); -lean_dec(x_4); -x_119 = lean_alloc_ctor(0, 3, 0); -lean_ctor_set(x_119, 0, x_85); -lean_ctor_set(x_119, 1, x_103); -lean_ctor_set(x_119, 2, x_104); -if (lean_is_scalar(x_102)) { - x_120 = lean_alloc_ctor(0, 2, 0); -} else { - x_120 = x_102; -} -lean_ctor_set(x_120, 0, x_119); -lean_ctor_set(x_120, 1, x_101); -return x_120; -} -} -else -{ -lean_object* x_121; lean_object* x_122; lean_object* x_123; lean_object* x_124; -lean_dec(x_85); -lean_dec(x_4); -x_121 = lean_ctor_get(x_97, 0); -lean_inc(x_121); -x_122 = lean_ctor_get(x_97, 1); -lean_inc(x_122); -if (lean_is_exclusive(x_97)) { - lean_ctor_release(x_97, 0); - lean_ctor_release(x_97, 1); - x_123 = x_97; -} else { - lean_dec_ref(x_97); - x_123 = lean_box(0); -} -if (lean_is_scalar(x_123)) { - x_124 = lean_alloc_ctor(1, 2, 0); -} else { - x_124 = x_123; -} -lean_ctor_set(x_124, 0, x_121); -lean_ctor_set(x_124, 1, x_122); -return x_124; -} -} -else -{ -lean_object* x_125; lean_object* x_126; lean_object* x_127; lean_object* x_128; +lean_object* x_104; lean_object* x_105; lean_object* x_106; lean_object* x_107; +lean_dec(x_90); lean_dec(x_88); lean_dec(x_87); -lean_dec(x_85); -lean_dec(x_4); +lean_dec(x_16); +lean_dec(x_14); +x_104 = lean_ctor_get(x_95, 0); +lean_inc(x_104); +x_105 = lean_ctor_get(x_95, 1); +lean_inc(x_105); +if (lean_is_exclusive(x_95)) { + lean_ctor_release(x_95, 0); + lean_ctor_release(x_95, 1); + x_106 = x_95; +} else { + lean_dec_ref(x_95); + x_106 = lean_box(0); +} +if (lean_is_scalar(x_106)) { + x_107 = lean_alloc_ctor(1, 2, 0); +} else { + x_107 = x_106; +} +lean_ctor_set(x_107, 0, x_104); +lean_ctor_set(x_107, 1, x_105); +return x_107; +} +} +else +{ +lean_object* x_108; lean_object* x_109; lean_object* x_110; lean_object* x_111; lean_object* x_112; lean_object* x_113; +lean_dec(x_89); +lean_dec(x_5); +x_108 = lean_alloc_ctor(0, 3, 0); +lean_ctor_set(x_108, 0, x_14); +lean_ctor_set(x_108, 1, x_87); +lean_ctor_set(x_108, 2, x_88); +x_109 = l_List_redLength___main___rarg(x_16); +x_110 = lean_mk_empty_array_with_capacity(x_109); +lean_dec(x_109); +x_111 = l_List_toArrayAux___main___rarg(x_16, x_110); +if (lean_is_scalar(x_90)) { + x_112 = lean_alloc_ctor(0, 2, 0); +} else { + x_112 = x_90; +} +lean_ctor_set(x_112, 0, x_108); +lean_ctor_set(x_112, 1, x_111); +x_113 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_113, 0, x_112); +lean_ctor_set(x_113, 1, x_86); +return x_113; +} +} +} +else +{ +uint8_t x_114; +lean_dec(x_16); +lean_dec(x_14); +lean_dec(x_5); +x_114 = !lean_is_exclusive(x_26); +if (x_114 == 0) +{ +return x_26; +} +else +{ +lean_object* x_115; lean_object* x_116; lean_object* x_117; +x_115 = lean_ctor_get(x_26, 0); +x_116 = lean_ctor_get(x_26, 1); +lean_inc(x_116); +lean_inc(x_115); +lean_dec(x_26); +x_117 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_117, 0, x_115); +lean_ctor_set(x_117, 1, x_116); +return x_117; +} +} +} +else +{ +uint8_t x_118; +lean_dec(x_17); +lean_dec(x_16); +lean_dec(x_14); +lean_dec(x_5); lean_dec(x_1); -x_125 = lean_ctor_get(x_90, 0); -lean_inc(x_125); -x_126 = lean_ctor_get(x_90, 1); +x_118 = !lean_is_exclusive(x_19); +if (x_118 == 0) +{ +return x_19; +} +else +{ +lean_object* x_119; lean_object* x_120; lean_object* x_121; +x_119 = lean_ctor_get(x_19, 0); +x_120 = lean_ctor_get(x_19, 1); +lean_inc(x_120); +lean_inc(x_119); +lean_dec(x_19); +x_121 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_121, 0, x_119); +lean_ctor_set(x_121, 1, x_120); +return x_121; +} +} +} +else +{ +lean_object* x_122; lean_object* x_123; lean_object* x_124; +lean_dec(x_9); +lean_dec(x_5); +lean_dec(x_1); +x_122 = l_Array_empty___closed__1; +x_123 = lean_alloc_ctor(0, 3, 0); +lean_ctor_set(x_123, 0, x_14); +lean_ctor_set(x_123, 1, x_122); +lean_ctor_set(x_123, 2, 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_122); +lean_ctor_set(x_7, 0, x_124); +return x_7; +} +} +else +{ +lean_object* x_125; lean_object* x_126; lean_object* x_127; lean_object* x_128; lean_object* x_129; lean_object* x_130; uint8_t x_131; +x_125 = lean_ctor_get(x_7, 0); +x_126 = lean_ctor_get(x_7, 1); lean_inc(x_126); -if (lean_is_exclusive(x_90)) { - lean_ctor_release(x_90, 0); - lean_ctor_release(x_90, 1); - x_127 = x_90; +lean_inc(x_125); +lean_dec(x_7); +x_127 = lean_ctor_get(x_125, 0); +lean_inc(x_127); +x_128 = lean_ctor_get(x_127, 0); +lean_inc(x_128); +lean_dec(x_127); +x_129 = l_Lean_mkRecFor___closed__1; +x_130 = lean_name_mk_string(x_128, x_129); +x_131 = l_Lean_Syntax_isNone(x_3); +if (x_131 == 0) +{ +lean_object* x_132; lean_object* x_133; lean_object* x_134; lean_object* x_135; +x_132 = lean_ctor_get(x_125, 4); +lean_inc(x_132); +lean_dec(x_125); +x_133 = l___private_Init_Lean_Elab_Tactic_Induction_7__getAlts(x_3); +x_134 = lean_unsigned_to_nat(0u); +lean_inc(x_5); +x_135 = l_Array_forMAux___main___at___private_Init_Lean_Elab_Tactic_Induction_11__checkAltCtorNames___spec__2(x_132, x_133, x_134, x_5, x_126); +if (lean_obj_tag(x_135) == 0) +{ +lean_object* x_136; lean_object* x_137; lean_object* x_138; lean_object* x_139; lean_object* x_140; lean_object* x_141; lean_object* x_142; +x_136 = lean_ctor_get(x_135, 1); +lean_inc(x_136); +lean_dec(x_135); +x_137 = lean_box(0); +x_138 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_138, 0, x_133); +lean_ctor_set(x_138, 1, x_137); +x_139 = l_Array_empty___closed__1; +x_140 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_140, 0, x_139); +lean_ctor_set(x_140, 1, x_138); +x_141 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_141, 0, x_139); +lean_ctor_set(x_141, 1, x_140); +lean_inc(x_5); +lean_inc(x_132); +x_142 = l_List_foldlM___main___at___private_Init_Lean_Elab_Tactic_Induction_13__getRecInfoDefault___spec__3(x_1, x_4, x_141, x_132, x_5, x_136); +if (lean_obj_tag(x_142) == 0) +{ +lean_object* x_143; lean_object* x_144; lean_object* x_145; lean_object* x_146; lean_object* x_147; lean_object* x_148; lean_object* x_149; lean_object* x_150; lean_object* x_151; uint8_t x_152; +x_143 = lean_ctor_get(x_142, 0); +lean_inc(x_143); +x_144 = lean_ctor_get(x_143, 1); +lean_inc(x_144); +x_145 = lean_ctor_get(x_144, 1); +lean_inc(x_145); +x_146 = lean_ctor_get(x_142, 1); +lean_inc(x_146); +if (lean_is_exclusive(x_142)) { + lean_ctor_release(x_142, 0); + lean_ctor_release(x_142, 1); + x_147 = x_142; } else { - lean_dec_ref(x_90); - x_127 = lean_box(0); + lean_dec_ref(x_142); + x_147 = lean_box(0); } -if (lean_is_scalar(x_127)) { - x_128 = lean_alloc_ctor(1, 2, 0); +x_148 = lean_ctor_get(x_143, 0); +lean_inc(x_148); +lean_dec(x_143); +x_149 = lean_ctor_get(x_144, 0); +lean_inc(x_149); +lean_dec(x_144); +x_150 = lean_ctor_get(x_145, 0); +lean_inc(x_150); +if (lean_is_exclusive(x_145)) { + lean_ctor_release(x_145, 0); + lean_ctor_release(x_145, 1); + x_151 = x_145; } else { - x_128 = x_127; + lean_dec_ref(x_145); + x_151 = lean_box(0); } -lean_ctor_set(x_128, 0, x_125); -lean_ctor_set(x_128, 1, x_126); -return x_128; +x_152 = l_Array_isEmpty___rarg(x_150); +if (x_152 == 0) +{ +lean_object* x_153; lean_object* x_154; lean_object* x_155; lean_object* x_156; +lean_dec(x_147); +x_153 = l_Lean_Syntax_inhabited; +x_154 = lean_array_get(x_153, x_150, x_134); +lean_dec(x_150); +x_155 = l___private_Init_Lean_Elab_Tactic_Induction_13__getRecInfoDefault___closed__3; +x_156 = l_Lean_Elab_Tactic_throwError___rarg(x_154, x_155, x_5, x_146); +if (lean_obj_tag(x_156) == 0) +{ +lean_object* x_157; lean_object* x_158; lean_object* x_159; lean_object* x_160; lean_object* x_161; lean_object* x_162; lean_object* x_163; lean_object* x_164; +x_157 = lean_ctor_get(x_156, 1); +lean_inc(x_157); +if (lean_is_exclusive(x_156)) { + lean_ctor_release(x_156, 0); + lean_ctor_release(x_156, 1); + x_158 = x_156; +} else { + lean_dec_ref(x_156); + x_158 = lean_box(0); +} +x_159 = lean_alloc_ctor(0, 3, 0); +lean_ctor_set(x_159, 0, x_130); +lean_ctor_set(x_159, 1, x_148); +lean_ctor_set(x_159, 2, x_149); +x_160 = l_List_redLength___main___rarg(x_132); +x_161 = lean_mk_empty_array_with_capacity(x_160); +lean_dec(x_160); +x_162 = l_List_toArrayAux___main___rarg(x_132, x_161); +if (lean_is_scalar(x_151)) { + x_163 = lean_alloc_ctor(0, 2, 0); +} else { + x_163 = x_151; +} +lean_ctor_set(x_163, 0, x_159); +lean_ctor_set(x_163, 1, x_162); +if (lean_is_scalar(x_158)) { + x_164 = lean_alloc_ctor(0, 2, 0); +} else { + x_164 = x_158; +} +lean_ctor_set(x_164, 0, x_163); +lean_ctor_set(x_164, 1, x_157); +return x_164; +} +else +{ +lean_object* x_165; lean_object* x_166; lean_object* x_167; lean_object* x_168; +lean_dec(x_151); +lean_dec(x_149); +lean_dec(x_148); +lean_dec(x_132); +lean_dec(x_130); +x_165 = lean_ctor_get(x_156, 0); +lean_inc(x_165); +x_166 = lean_ctor_get(x_156, 1); +lean_inc(x_166); +if (lean_is_exclusive(x_156)) { + lean_ctor_release(x_156, 0); + lean_ctor_release(x_156, 1); + x_167 = x_156; +} else { + lean_dec_ref(x_156); + x_167 = lean_box(0); +} +if (lean_is_scalar(x_167)) { + x_168 = lean_alloc_ctor(1, 2, 0); +} else { + x_168 = x_167; +} +lean_ctor_set(x_168, 0, x_165); +lean_ctor_set(x_168, 1, x_166); +return x_168; } } else { -lean_object* x_129; lean_object* x_130; lean_object* x_131; -lean_dec(x_80); -lean_dec(x_4); +lean_object* x_169; lean_object* x_170; lean_object* x_171; lean_object* x_172; lean_object* x_173; lean_object* x_174; +lean_dec(x_150); +lean_dec(x_5); +x_169 = lean_alloc_ctor(0, 3, 0); +lean_ctor_set(x_169, 0, x_130); +lean_ctor_set(x_169, 1, x_148); +lean_ctor_set(x_169, 2, x_149); +x_170 = l_List_redLength___main___rarg(x_132); +x_171 = lean_mk_empty_array_with_capacity(x_170); +lean_dec(x_170); +x_172 = l_List_toArrayAux___main___rarg(x_132, x_171); +if (lean_is_scalar(x_151)) { + x_173 = lean_alloc_ctor(0, 2, 0); +} else { + x_173 = x_151; +} +lean_ctor_set(x_173, 0, x_169); +lean_ctor_set(x_173, 1, x_172); +if (lean_is_scalar(x_147)) { + x_174 = lean_alloc_ctor(0, 2, 0); +} else { + x_174 = x_147; +} +lean_ctor_set(x_174, 0, x_173); +lean_ctor_set(x_174, 1, x_146); +return x_174; +} +} +else +{ +lean_object* x_175; lean_object* x_176; lean_object* x_177; lean_object* x_178; +lean_dec(x_132); +lean_dec(x_130); +lean_dec(x_5); +x_175 = lean_ctor_get(x_142, 0); +lean_inc(x_175); +x_176 = lean_ctor_get(x_142, 1); +lean_inc(x_176); +if (lean_is_exclusive(x_142)) { + lean_ctor_release(x_142, 0); + lean_ctor_release(x_142, 1); + x_177 = x_142; +} else { + lean_dec_ref(x_142); + x_177 = lean_box(0); +} +if (lean_is_scalar(x_177)) { + x_178 = lean_alloc_ctor(1, 2, 0); +} else { + x_178 = x_177; +} +lean_ctor_set(x_178, 0, x_175); +lean_ctor_set(x_178, 1, x_176); +return x_178; +} +} +else +{ +lean_object* x_179; lean_object* x_180; lean_object* x_181; lean_object* x_182; +lean_dec(x_133); +lean_dec(x_132); +lean_dec(x_130); +lean_dec(x_5); lean_dec(x_1); -x_129 = l_Array_empty___closed__1; -x_130 = lean_alloc_ctor(0, 3, 0); -lean_ctor_set(x_130, 0, x_85); -lean_ctor_set(x_130, 1, x_129); -lean_ctor_set(x_130, 2, x_129); -x_131 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_131, 0, x_130); -lean_ctor_set(x_131, 1, x_81); -return x_131; +x_179 = lean_ctor_get(x_135, 0); +lean_inc(x_179); +x_180 = lean_ctor_get(x_135, 1); +lean_inc(x_180); +if (lean_is_exclusive(x_135)) { + lean_ctor_release(x_135, 0); + lean_ctor_release(x_135, 1); + x_181 = x_135; +} else { + lean_dec_ref(x_135); + x_181 = lean_box(0); } +if (lean_is_scalar(x_181)) { + x_182 = lean_alloc_ctor(1, 2, 0); +} else { + x_182 = x_181; +} +lean_ctor_set(x_182, 0, x_179); +lean_ctor_set(x_182, 1, x_180); +return x_182; } } else { -uint8_t x_132; -lean_dec(x_4); +lean_object* x_183; lean_object* x_184; lean_object* x_185; lean_object* x_186; +lean_dec(x_125); +lean_dec(x_5); lean_dec(x_1); -x_132 = !lean_is_exclusive(x_6); -if (x_132 == 0) -{ -return x_6; +x_183 = l_Array_empty___closed__1; +x_184 = lean_alloc_ctor(0, 3, 0); +lean_ctor_set(x_184, 0, x_130); +lean_ctor_set(x_184, 1, x_183); +lean_ctor_set(x_184, 2, x_183); +x_185 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_185, 0, x_184); +lean_ctor_set(x_185, 1, x_183); +x_186 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_186, 0, x_185); +lean_ctor_set(x_186, 1, x_126); +return x_186; +} +} } else { -lean_object* x_133; lean_object* x_134; lean_object* x_135; -x_133 = lean_ctor_get(x_6, 0); -x_134 = lean_ctor_get(x_6, 1); -lean_inc(x_134); -lean_inc(x_133); -lean_dec(x_6); -x_135 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_135, 0, x_133); -lean_ctor_set(x_135, 1, x_134); -return x_135; +uint8_t x_187; +lean_dec(x_5); +lean_dec(x_1); +x_187 = !lean_is_exclusive(x_7); +if (x_187 == 0) +{ +return x_7; +} +else +{ +lean_object* x_188; lean_object* x_189; lean_object* x_190; +x_188 = lean_ctor_get(x_7, 0); +x_189 = lean_ctor_get(x_7, 1); +lean_inc(x_189); +lean_inc(x_188); +lean_dec(x_7); +x_190 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_190, 0, x_188); +lean_ctor_set(x_190, 1, x_189); +return x_190; } } } @@ -9271,13 +9549,25 @@ lean_dec(x_1); return x_3; } } -lean_object* l___private_Init_Lean_Elab_Tactic_Induction_13__getRecInfoDefault___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) { +lean_object* l_List_foldlM___main___at___private_Init_Lean_Elab_Tactic_Induction_13__getRecInfoDefault___spec__3___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6) { _start: { -lean_object* x_6; -x_6 = l___private_Init_Lean_Elab_Tactic_Induction_13__getRecInfoDefault(x_1, x_2, x_3, x_4, x_5); +uint8_t x_7; lean_object* x_8; +x_7 = lean_unbox(x_2); +lean_dec(x_2); +x_8 = l_List_foldlM___main___at___private_Init_Lean_Elab_Tactic_Induction_13__getRecInfoDefault___spec__3(x_1, x_7, x_3, x_4, x_5, x_6); +return x_8; +} +} +lean_object* l___private_Init_Lean_Elab_Tactic_Induction_13__getRecInfoDefault___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___private_Init_Lean_Elab_Tactic_Induction_13__getRecInfoDefault(x_1, x_2, x_3, x_7, x_5, x_6); lean_dec(x_3); -return x_6; +return x_8; } } lean_object* l_Array_findIdxAux___main___at___private_Init_Lean_Elab_Tactic_Induction_14__getRecInfo___spec__1(lean_object* x_1, lean_object* x_2, lean_object* x_3) { @@ -11041,11 +11331,64 @@ return x_206; } else { -lean_object* x_207; +uint8_t x_207; lean_object* x_208; lean_dec(x_6); -x_207 = l___private_Init_Lean_Elab_Tactic_Induction_13__getRecInfoDefault(x_1, x_2, x_8, x_3, x_4); +x_207 = 0; +x_208 = l___private_Init_Lean_Elab_Tactic_Induction_13__getRecInfoDefault(x_1, x_2, x_8, x_207, x_3, x_4); lean_dec(x_8); -return x_207; +if (lean_obj_tag(x_208) == 0) +{ +uint8_t x_209; +x_209 = !lean_is_exclusive(x_208); +if (x_209 == 0) +{ +lean_object* x_210; lean_object* x_211; +x_210 = lean_ctor_get(x_208, 0); +x_211 = lean_ctor_get(x_210, 0); +lean_inc(x_211); +lean_dec(x_210); +lean_ctor_set(x_208, 0, x_211); +return x_208; +} +else +{ +lean_object* x_212; lean_object* x_213; lean_object* x_214; lean_object* x_215; +x_212 = lean_ctor_get(x_208, 0); +x_213 = lean_ctor_get(x_208, 1); +lean_inc(x_213); +lean_inc(x_212); +lean_dec(x_208); +x_214 = lean_ctor_get(x_212, 0); +lean_inc(x_214); +lean_dec(x_212); +x_215 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_215, 0, x_214); +lean_ctor_set(x_215, 1, x_213); +return x_215; +} +} +else +{ +uint8_t x_216; +x_216 = !lean_is_exclusive(x_208); +if (x_216 == 0) +{ +return x_208; +} +else +{ +lean_object* x_217; lean_object* x_218; lean_object* x_219; +x_217 = lean_ctor_get(x_208, 0); +x_218 = lean_ctor_get(x_208, 1); +lean_inc(x_218); +lean_inc(x_217); +lean_dec(x_208); +x_219 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_219, 0, x_217); +lean_ctor_set(x_219, 1, x_218); +return x_219; +} +} } } } @@ -11258,9 +11601,9 @@ x_11 = lean_nat_sub(x_3, x_10); x_12 = lean_nat_sub(x_11, x_9); lean_dec(x_11); x_13 = l_Lean_Meta_InductionSubgoal_inhabited; -x_14 = lean_array_get(x_13, x_1, x_12); +x_14 = lean_array_get(x_13, x_2, x_12); x_15 = l_Lean_Syntax_inhabited; -x_16 = lean_array_get(x_15, x_2, x_12); +x_16 = lean_array_get(x_15, x_1, x_12); lean_dec(x_12); x_17 = lean_ctor_get(x_14, 0); lean_inc(x_17); @@ -11469,106 +11812,105 @@ return x_2; lean_object* l___private_Init_Lean_Elab_Tactic_Induction_15__processResult(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_2, 2); -x_7 = l_Array_isEmpty___rarg(x_6); -if (x_7 == 0) +uint8_t x_6; +x_6 = l_Array_isEmpty___rarg(x_2); +if (x_6 == 0) { -lean_object* x_8; lean_object* x_9; uint8_t x_10; -x_8 = lean_array_get_size(x_6); -x_9 = lean_array_get_size(x_3); -x_10 = lean_nat_dec_eq(x_8, x_9); -if (x_10 == 0) +lean_object* x_7; lean_object* x_8; uint8_t x_9; +x_7 = lean_array_get_size(x_2); +x_8 = lean_array_get_size(x_3); +x_9 = lean_nat_dec_eq(x_7, x_8); +if (x_9 == 0) { -lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; lean_object* x_20; lean_object* x_21; lean_object* x_22; lean_object* x_23; lean_object* x_24; lean_object* x_25; lean_object* x_26; -lean_inc(x_9); -x_11 = l_Nat_repr(x_9); -x_12 = lean_alloc_ctor(2, 1, 0); +lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; lean_object* x_20; lean_object* x_21; lean_object* x_22; lean_object* x_23; lean_object* x_24; lean_object* x_25; +lean_inc(x_8); +x_10 = l_Nat_repr(x_8); +x_11 = lean_alloc_ctor(2, 1, 0); +lean_ctor_set(x_11, 0, x_10); +x_12 = lean_alloc_ctor(0, 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___private_Init_Lean_Elab_Tactic_Induction_15__processResult___closed__3; -x_15 = lean_alloc_ctor(9, 2, 0); -lean_ctor_set(x_15, 0, x_14); -lean_ctor_set(x_15, 1, x_13); -x_16 = l___private_Init_Lean_Elab_Tactic_Induction_15__processResult___closed__6; -x_17 = lean_alloc_ctor(9, 2, 0); -lean_ctor_set(x_17, 0, x_15); -lean_ctor_set(x_17, 1, x_16); -x_18 = l___private_Init_Lean_Elab_Tactic_Induction_15__processResult___closed__9; -x_19 = lean_alloc_ctor(9, 2, 0); -lean_ctor_set(x_19, 0, x_17); -lean_ctor_set(x_19, 1, x_18); -x_20 = l_Nat_repr(x_8); -x_21 = lean_alloc_ctor(2, 1, 0); +x_13 = l___private_Init_Lean_Elab_Tactic_Induction_15__processResult___closed__3; +x_14 = lean_alloc_ctor(9, 2, 0); +lean_ctor_set(x_14, 0, x_13); +lean_ctor_set(x_14, 1, x_12); +x_15 = l___private_Init_Lean_Elab_Tactic_Induction_15__processResult___closed__6; +x_16 = lean_alloc_ctor(9, 2, 0); +lean_ctor_set(x_16, 0, x_14); +lean_ctor_set(x_16, 1, x_15); +x_17 = l___private_Init_Lean_Elab_Tactic_Induction_15__processResult___closed__9; +x_18 = lean_alloc_ctor(9, 2, 0); +lean_ctor_set(x_18, 0, x_16); +lean_ctor_set(x_18, 1, x_17); +x_19 = l_Nat_repr(x_7); +x_20 = lean_alloc_ctor(2, 1, 0); +lean_ctor_set(x_20, 0, x_19); +x_21 = lean_alloc_ctor(0, 1, 0); lean_ctor_set(x_21, 0, x_20); -x_22 = lean_alloc_ctor(0, 1, 0); -lean_ctor_set(x_22, 0, x_21); -x_23 = lean_alloc_ctor(9, 2, 0); -lean_ctor_set(x_23, 0, x_19); -lean_ctor_set(x_23, 1, x_22); -x_24 = l___private_Init_Lean_Elab_Tactic_Induction_15__processResult___closed__10; -x_25 = lean_alloc_ctor(9, 2, 0); -lean_ctor_set(x_25, 0, x_23); -lean_ctor_set(x_25, 1, x_24); +x_22 = lean_alloc_ctor(9, 2, 0); +lean_ctor_set(x_22, 0, x_18); +lean_ctor_set(x_22, 1, x_21); +x_23 = l___private_Init_Lean_Elab_Tactic_Induction_15__processResult___closed__10; +x_24 = lean_alloc_ctor(9, 2, 0); +lean_ctor_set(x_24, 0, x_22); +lean_ctor_set(x_24, 1, x_23); lean_inc(x_4); -x_26 = l_Lean_Elab_Tactic_throwError___rarg(x_1, x_25, x_4, x_5); -if (lean_obj_tag(x_26) == 0) +x_25 = l_Lean_Elab_Tactic_throwError___rarg(x_1, x_24, x_4, x_5); +if (lean_obj_tag(x_25) == 0) { -lean_object* x_27; lean_object* x_28; -x_27 = lean_ctor_get(x_26, 1); -lean_inc(x_27); -lean_dec(x_26); -lean_inc(x_9); -x_28 = l_Nat_forMAux___main___at___private_Init_Lean_Elab_Tactic_Induction_15__processResult___spec__1(x_3, x_6, x_9, x_9, x_4, x_27); -lean_dec(x_9); -return x_28; +lean_object* x_26; lean_object* x_27; +x_26 = lean_ctor_get(x_25, 1); +lean_inc(x_26); +lean_dec(x_25); +lean_inc(x_8); +x_27 = l_Nat_forMAux___main___at___private_Init_Lean_Elab_Tactic_Induction_15__processResult___spec__1(x_2, x_3, x_8, x_8, x_4, x_26); +lean_dec(x_8); +return x_27; } else { -uint8_t x_29; -lean_dec(x_9); +uint8_t x_28; +lean_dec(x_8); lean_dec(x_4); -x_29 = !lean_is_exclusive(x_26); -if (x_29 == 0) +x_28 = !lean_is_exclusive(x_25); +if (x_28 == 0) { -return x_26; +return x_25; } else { -lean_object* x_30; lean_object* x_31; lean_object* x_32; -x_30 = lean_ctor_get(x_26, 0); -x_31 = lean_ctor_get(x_26, 1); -lean_inc(x_31); +lean_object* x_29; lean_object* x_30; lean_object* x_31; +x_29 = lean_ctor_get(x_25, 0); +x_30 = lean_ctor_get(x_25, 1); lean_inc(x_30); -lean_dec(x_26); -x_32 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_32, 0, x_30); -lean_ctor_set(x_32, 1, x_31); +lean_inc(x_29); +lean_dec(x_25); +x_31 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_31, 0, x_29); +lean_ctor_set(x_31, 1, x_30); +return x_31; +} +} +} +else +{ +lean_object* x_32; +lean_dec(x_7); +lean_dec(x_1); +lean_inc(x_8); +x_32 = l_Nat_forMAux___main___at___private_Init_Lean_Elab_Tactic_Induction_15__processResult___spec__1(x_2, x_3, x_8, x_8, x_4, x_5); +lean_dec(x_8); return x_32; } } -} else { -lean_object* x_33; -lean_dec(x_8); +lean_object* x_33; lean_object* x_34; lean_object* x_35; lean_dec(x_1); -lean_inc(x_9); -x_33 = l_Nat_forMAux___main___at___private_Init_Lean_Elab_Tactic_Induction_15__processResult___spec__1(x_3, x_6, x_9, x_9, x_4, x_5); -lean_dec(x_9); -return x_33; -} -} -else -{ -lean_object* x_34; lean_object* x_35; lean_object* x_36; -lean_dec(x_1); -x_34 = l_Array_toList___rarg(x_3); -x_35 = l_List_map___main___at___private_Init_Lean_Elab_Tactic_Induction_15__processResult___spec__2(x_34); -x_36 = l_Lean_Elab_Tactic_setGoals(x_35, x_4, x_5); +x_33 = l_Array_toList___rarg(x_3); +x_34 = l_List_map___main___at___private_Init_Lean_Elab_Tactic_Induction_15__processResult___spec__2(x_33); +x_35 = l_Lean_Elab_Tactic_setGoals(x_34, x_4, x_5); lean_dec(x_4); -return x_36; +return x_35; } } } @@ -11663,144 +12005,147 @@ lean_inc(x_1); x_23 = l_Lean_Elab_Tactic_liftMetaM___rarg(x_1, x_22, x_3, x_15); if (lean_obj_tag(x_23) == 0) { -lean_object* x_24; lean_object* x_25; lean_object* x_26; +lean_object* x_24; lean_object* x_25; lean_object* x_26; lean_object* x_27; x_24 = lean_ctor_get(x_23, 0); lean_inc(x_24); x_25 = lean_ctor_get(x_23, 1); lean_inc(x_25); lean_dec(x_23); -x_26 = l___private_Init_Lean_Elab_Tactic_Induction_15__processResult(x_1, x_11, x_24, x_3, x_25); -lean_dec(x_24); +x_26 = lean_ctor_get(x_11, 2); +lean_inc(x_26); lean_dec(x_11); -return x_26; +x_27 = l___private_Init_Lean_Elab_Tactic_Induction_15__processResult(x_1, x_26, x_24, x_3, x_25); +lean_dec(x_24); +lean_dec(x_26); +return x_27; } else { -uint8_t x_27; +uint8_t x_28; lean_dec(x_11); lean_dec(x_3); lean_dec(x_1); -x_27 = !lean_is_exclusive(x_23); -if (x_27 == 0) +x_28 = !lean_is_exclusive(x_23); +if (x_28 == 0) { return x_23; } else { -lean_object* x_28; lean_object* x_29; lean_object* x_30; -x_28 = lean_ctor_get(x_23, 0); -x_29 = lean_ctor_get(x_23, 1); +lean_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_inc(x_29); -lean_inc(x_28); lean_dec(x_23); -x_30 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_30, 0, x_28); -lean_ctor_set(x_30, 1, x_29); -return x_30; +x_31 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_31, 0, x_29); +lean_ctor_set(x_31, 1, x_30); +return x_31; } } } else { -uint8_t x_31; +uint8_t x_32; lean_dec(x_11); lean_dec(x_6); lean_dec(x_3); lean_dec(x_1); -x_31 = !lean_is_exclusive(x_13); -if (x_31 == 0) +x_32 = !lean_is_exclusive(x_13); +if (x_32 == 0) { return x_13; } else { -lean_object* x_32; lean_object* x_33; lean_object* x_34; -x_32 = lean_ctor_get(x_13, 0); -x_33 = lean_ctor_get(x_13, 1); +lean_object* x_33; lean_object* x_34; lean_object* x_35; +x_33 = lean_ctor_get(x_13, 0); +x_34 = lean_ctor_get(x_13, 1); +lean_inc(x_34); lean_inc(x_33); -lean_inc(x_32); lean_dec(x_13); -x_34 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_34, 0, x_32); -lean_ctor_set(x_34, 1, x_33); -return x_34; +x_35 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_35, 0, x_33); +lean_ctor_set(x_35, 1, x_34); +return x_35; } } } else { -uint8_t x_35; +uint8_t x_36; lean_dec(x_6); lean_dec(x_3); lean_dec(x_1); -x_35 = !lean_is_exclusive(x_10); -if (x_35 == 0) +x_36 = !lean_is_exclusive(x_10); +if (x_36 == 0) { return x_10; } else { -lean_object* x_36; lean_object* x_37; lean_object* x_38; -x_36 = lean_ctor_get(x_10, 0); -x_37 = lean_ctor_get(x_10, 1); +lean_object* x_37; lean_object* x_38; lean_object* x_39; +x_37 = lean_ctor_get(x_10, 0); +x_38 = lean_ctor_get(x_10, 1); +lean_inc(x_38); lean_inc(x_37); -lean_inc(x_36); lean_dec(x_10); -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; } } } else { -uint8_t x_39; +uint8_t x_40; lean_dec(x_6); lean_dec(x_3); lean_dec(x_1); -x_39 = !lean_is_exclusive(x_8); -if (x_39 == 0) +x_40 = !lean_is_exclusive(x_8); +if (x_40 == 0) { return x_8; } else { -lean_object* x_40; lean_object* x_41; lean_object* x_42; -x_40 = lean_ctor_get(x_8, 0); -x_41 = lean_ctor_get(x_8, 1); +lean_object* x_41; lean_object* x_42; lean_object* x_43; +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_inc(x_40); lean_dec(x_8); -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; +x_43 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_43, 0, x_41); +lean_ctor_set(x_43, 1, x_42); +return x_43; } } } else { -uint8_t x_43; +uint8_t x_44; lean_dec(x_3); lean_dec(x_1); -x_43 = !lean_is_exclusive(x_5); -if (x_43 == 0) +x_44 = !lean_is_exclusive(x_5); +if (x_44 == 0) { return x_5; } else { -lean_object* x_44; lean_object* x_45; lean_object* x_46; -x_44 = lean_ctor_get(x_5, 0); -x_45 = lean_ctor_get(x_5, 1); +lean_object* x_45; lean_object* x_46; lean_object* x_47; +x_45 = lean_ctor_get(x_5, 0); +x_46 = lean_ctor_get(x_5, 1); +lean_inc(x_46); lean_inc(x_45); -lean_inc(x_44); lean_dec(x_5); -x_46 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_46, 0, x_44); -lean_ctor_set(x_46, 1, x_45); -return x_46; +x_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; } } } @@ -11863,6 +12208,290 @@ x_5 = l_Lean_Elab_Tactic_addBuiltinTactic(x_2, x_3, x_4, x_1); return x_5; } } +lean_object* _init_l___private_Init_Lean_Elab_Tactic_Induction_16__checkCasesResultAux___main___closed__1() { +_start: +{ +lean_object* x_1; +x_1 = lean_mk_string("alternative for '"); +return x_1; +} +} +lean_object* _init_l___private_Init_Lean_Elab_Tactic_Induction_16__checkCasesResultAux___main___closed__2() { +_start: +{ +lean_object* x_1; lean_object* x_2; +x_1 = l___private_Init_Lean_Elab_Tactic_Induction_16__checkCasesResultAux___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_Tactic_Induction_16__checkCasesResultAux___main___closed__3() { +_start: +{ +lean_object* x_1; lean_object* x_2; +x_1 = l___private_Init_Lean_Elab_Tactic_Induction_16__checkCasesResultAux___main___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___private_Init_Lean_Elab_Tactic_Induction_16__checkCasesResultAux___main___closed__4() { +_start: +{ +lean_object* x_1; +x_1 = lean_mk_string("' has not been provided"); +return x_1; +} +} +lean_object* _init_l___private_Init_Lean_Elab_Tactic_Induction_16__checkCasesResultAux___main___closed__5() { +_start: +{ +lean_object* x_1; lean_object* x_2; +x_1 = l___private_Init_Lean_Elab_Tactic_Induction_16__checkCasesResultAux___main___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___private_Init_Lean_Elab_Tactic_Induction_16__checkCasesResultAux___main___closed__6() { +_start: +{ +lean_object* x_1; lean_object* x_2; +x_1 = l___private_Init_Lean_Elab_Tactic_Induction_16__checkCasesResultAux___main___closed__5; +x_2 = lean_alloc_ctor(0, 1, 0); +lean_ctor_set(x_2, 0, x_1); +return x_2; +} +} +lean_object* _init_l___private_Init_Lean_Elab_Tactic_Induction_16__checkCasesResultAux___main___closed__7() { +_start: +{ +lean_object* x_1; +x_1 = lean_mk_string("' is not needed"); +return x_1; +} +} +lean_object* _init_l___private_Init_Lean_Elab_Tactic_Induction_16__checkCasesResultAux___main___closed__8() { +_start: +{ +lean_object* x_1; lean_object* x_2; +x_1 = l___private_Init_Lean_Elab_Tactic_Induction_16__checkCasesResultAux___main___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___private_Init_Lean_Elab_Tactic_Induction_16__checkCasesResultAux___main___closed__9() { +_start: +{ +lean_object* x_1; lean_object* x_2; +x_1 = l___private_Init_Lean_Elab_Tactic_Induction_16__checkCasesResultAux___main___closed__8; +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_Tactic_Induction_16__checkCasesResultAux___main(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8) { +_start: +{ +lean_object* x_9; uint8_t x_10; +x_9 = lean_array_get_size(x_4); +x_10 = lean_nat_dec_lt(x_6, x_9); +lean_dec(x_9); +if (x_10 == 0) +{ +lean_object* x_11; uint8_t x_12; +lean_dec(x_6); +x_11 = lean_array_get_size(x_2); +x_12 = lean_nat_dec_lt(x_5, x_11); +lean_dec(x_11); +if (x_12 == 0) +{ +lean_object* x_13; lean_object* x_14; +lean_dec(x_7); +lean_dec(x_5); +lean_dec(x_1); +x_13 = lean_box(0); +x_14 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_14, 0, x_13); +lean_ctor_set(x_14, 1, x_8); +return x_14; +} +else +{ +lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; lean_object* x_20; lean_object* x_21; lean_object* x_22; +x_15 = lean_array_fget(x_2, x_5); +lean_dec(x_5); +x_16 = lean_ctor_get(x_15, 1); +lean_inc(x_16); +lean_dec(x_15); +x_17 = lean_alloc_ctor(4, 1, 0); +lean_ctor_set(x_17, 0, x_16); +x_18 = l___private_Init_Lean_Elab_Tactic_Induction_16__checkCasesResultAux___main___closed__3; +x_19 = lean_alloc_ctor(9, 2, 0); +lean_ctor_set(x_19, 0, x_18); +lean_ctor_set(x_19, 1, x_17); +x_20 = l___private_Init_Lean_Elab_Tactic_Induction_16__checkCasesResultAux___main___closed__6; +x_21 = lean_alloc_ctor(9, 2, 0); +lean_ctor_set(x_21, 0, x_19); +lean_ctor_set(x_21, 1, x_20); +x_22 = l_Lean_Elab_Tactic_throwError___rarg(x_1, x_21, x_7, x_8); +return x_22; +} +} +else +{ +lean_object* x_23; uint8_t x_24; +x_23 = lean_array_fget(x_4, x_6); +x_24 = l_Lean_Syntax_isMissing(x_23); +lean_dec(x_23); +if (x_24 == 0) +{ +lean_object* x_25; lean_object* x_26; lean_object* x_27; uint8_t x_28; +x_25 = l_Lean_Name_inhabited; +x_26 = lean_array_get(x_25, x_3, x_6); +x_27 = lean_array_get_size(x_2); +x_28 = lean_nat_dec_lt(x_5, x_27); +lean_dec(x_27); +if (x_28 == 0) +{ +lean_object* x_29; lean_object* x_30; lean_object* x_31; lean_object* x_32; lean_object* x_33; lean_object* x_34; +lean_dec(x_6); +lean_dec(x_5); +x_29 = lean_alloc_ctor(4, 1, 0); +lean_ctor_set(x_29, 0, x_26); +x_30 = l___private_Init_Lean_Elab_Tactic_Induction_16__checkCasesResultAux___main___closed__3; +x_31 = lean_alloc_ctor(9, 2, 0); +lean_ctor_set(x_31, 0, x_30); +lean_ctor_set(x_31, 1, x_29); +x_32 = l___private_Init_Lean_Elab_Tactic_Induction_16__checkCasesResultAux___main___closed__9; +x_33 = lean_alloc_ctor(9, 2, 0); +lean_ctor_set(x_33, 0, x_31); +lean_ctor_set(x_33, 1, x_32); +x_34 = l_Lean_Elab_Tactic_throwError___rarg(x_1, x_33, x_7, x_8); +return x_34; +} +else +{ +lean_object* x_35; lean_object* x_36; uint8_t x_37; +x_35 = lean_array_fget(x_2, x_5); +x_36 = lean_ctor_get(x_35, 1); +lean_inc(x_36); +lean_dec(x_35); +x_37 = lean_name_eq(x_26, x_36); +lean_dec(x_26); +if (x_37 == 0) +{ +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_6); +lean_dec(x_5); +x_38 = lean_alloc_ctor(4, 1, 0); +lean_ctor_set(x_38, 0, x_36); +x_39 = l___private_Init_Lean_Elab_Tactic_Induction_16__checkCasesResultAux___main___closed__3; +x_40 = lean_alloc_ctor(9, 2, 0); +lean_ctor_set(x_40, 0, x_39); +lean_ctor_set(x_40, 1, x_38); +x_41 = l___private_Init_Lean_Elab_Tactic_Induction_16__checkCasesResultAux___main___closed__6; +x_42 = lean_alloc_ctor(9, 2, 0); +lean_ctor_set(x_42, 0, x_40); +lean_ctor_set(x_42, 1, x_41); +x_43 = l_Lean_Elab_Tactic_throwError___rarg(x_1, x_42, x_7, x_8); +return x_43; +} +else +{ +lean_object* x_44; lean_object* x_45; lean_object* x_46; +lean_dec(x_36); +x_44 = lean_unsigned_to_nat(1u); +x_45 = lean_nat_add(x_5, x_44); +lean_dec(x_5); +x_46 = lean_nat_add(x_6, x_44); +lean_dec(x_6); +x_5 = x_45; +x_6 = x_46; +goto _start; +} +} +} +else +{ +lean_object* x_48; lean_object* x_49; +x_48 = lean_unsigned_to_nat(1u); +x_49 = lean_nat_add(x_6, x_48); +lean_dec(x_6); +x_6 = x_49; +goto _start; +} +} +} +} +lean_object* l___private_Init_Lean_Elab_Tactic_Induction_16__checkCasesResultAux___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, lean_object* x_7, lean_object* x_8) { +_start: +{ +lean_object* x_9; +x_9 = l___private_Init_Lean_Elab_Tactic_Induction_16__checkCasesResultAux___main(x_1, x_2, x_3, x_4, x_5, x_6, x_7, x_8); +lean_dec(x_4); +lean_dec(x_3); +lean_dec(x_2); +return x_9; +} +} +lean_object* l___private_Init_Lean_Elab_Tactic_Induction_16__checkCasesResultAux(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8) { +_start: +{ +lean_object* x_9; +x_9 = l___private_Init_Lean_Elab_Tactic_Induction_16__checkCasesResultAux___main(x_1, x_2, x_3, x_4, x_5, x_6, x_7, x_8); +return x_9; +} +} +lean_object* l___private_Init_Lean_Elab_Tactic_Induction_16__checkCasesResultAux___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8) { +_start: +{ +lean_object* x_9; +x_9 = l___private_Init_Lean_Elab_Tactic_Induction_16__checkCasesResultAux(x_1, x_2, x_3, x_4, x_5, x_6, x_7, x_8); +lean_dec(x_4); +lean_dec(x_3); +lean_dec(x_2); +return x_9; +} +} +lean_object* l___private_Init_Lean_Elab_Tactic_Induction_17__checkCasesResult(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; +x_7 = l_Array_isEmpty___rarg(x_4); +if (x_7 == 0) +{ +lean_object* x_8; lean_object* x_9; +x_8 = lean_unsigned_to_nat(0u); +x_9 = l___private_Init_Lean_Elab_Tactic_Induction_16__checkCasesResultAux___main(x_1, x_2, x_3, x_4, x_8, x_8, x_5, x_6); +return x_9; +} +else +{ +lean_object* x_10; lean_object* x_11; +lean_dec(x_5); +lean_dec(x_1); +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_6); +return x_11; +} +} +} +lean_object* l___private_Init_Lean_Elab_Tactic_Induction_17__checkCasesResult___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___private_Init_Lean_Elab_Tactic_Induction_17__checkCasesResult(x_1, x_2, x_3, x_4, x_5, x_6); +lean_dec(x_4); +lean_dec(x_3); +lean_dec(x_2); +return x_7; +} +} lean_object* l_Array_umapMAux___main___at_Lean_Elab_Tactic_evalCases___spec__1(lean_object* x_1, lean_object* x_2) { _start: { @@ -11899,6 +12528,70 @@ goto _start; } } } +lean_object* l_Array_filterAux___main___at_Lean_Elab_Tactic_evalCases___spec__2(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_1); +x_5 = lean_nat_dec_lt(x_2, x_4); +lean_dec(x_4); +if (x_5 == 0) +{ +lean_object* x_6; +lean_dec(x_2); +x_6 = l_Array_shrink___main___rarg(x_1, x_3); +lean_dec(x_3); +return x_6; +} +else +{ +lean_object* x_7; uint8_t x_8; +x_7 = lean_array_fget(x_1, x_2); +x_8 = l_Lean_Syntax_isMissing(x_7); +lean_dec(x_7); +if (x_8 == 0) +{ +uint8_t x_9; +x_9 = lean_nat_dec_lt(x_3, x_2); +if (x_9 == 0) +{ +lean_object* x_10; lean_object* x_11; lean_object* x_12; +x_10 = lean_unsigned_to_nat(1u); +x_11 = lean_nat_add(x_2, x_10); +lean_dec(x_2); +x_12 = lean_nat_add(x_3, x_10); +lean_dec(x_3); +x_2 = x_11; +x_3 = x_12; +goto _start; +} +else +{ +lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; +x_14 = lean_array_fswap(x_1, x_2, x_3); +x_15 = lean_unsigned_to_nat(1u); +x_16 = lean_nat_add(x_2, x_15); +lean_dec(x_2); +x_17 = lean_nat_add(x_3, x_15); +lean_dec(x_3); +x_1 = x_14; +x_2 = x_16; +x_3 = x_17; +goto _start; +} +} +else +{ +lean_object* x_19; lean_object* x_20; +x_19 = lean_unsigned_to_nat(1u); +x_20 = lean_nat_add(x_2, x_19); +lean_dec(x_2); +x_2 = x_20; +goto _start; +} +} +} +} lean_object* l_Lean_Elab_Tactic_evalCases___lambda__1(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { _start: { @@ -11919,7 +12612,7 @@ lean_inc(x_1); x_8 = l_Lean_Elab_Tactic_getMainGoal(x_1, x_3, x_7); if (lean_obj_tag(x_8) == 0) { -lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; +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; x_9 = lean_ctor_get(x_8, 0); lean_inc(x_9); x_10 = lean_ctor_get(x_8, 1); @@ -11930,149 +12623,197 @@ lean_inc(x_11); lean_dec(x_9); x_12 = lean_unsigned_to_nat(2u); x_13 = l_Lean_Syntax_getArg(x_1, x_12); +x_14 = 1; lean_inc(x_3); lean_inc(x_6); lean_inc(x_1); -x_14 = l___private_Init_Lean_Elab_Tactic_Induction_13__getRecInfoDefault(x_1, x_6, x_13, x_3, x_10); +x_15 = l___private_Init_Lean_Elab_Tactic_Induction_13__getRecInfoDefault(x_1, x_6, x_13, x_14, x_3, x_10); lean_dec(x_13); -if (lean_obj_tag(x_14) == 0) +if (lean_obj_tag(x_15) == 0) { -lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; uint8_t x_19; lean_object* x_20; lean_object* x_21; lean_object* x_22; -x_15 = lean_ctor_get(x_14, 0); -lean_inc(x_15); -x_16 = lean_ctor_get(x_14, 1); +lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; lean_object* x_20; lean_object* x_21; uint8_t x_22; lean_object* x_23; lean_object* x_24; lean_object* x_25; +x_16 = lean_ctor_get(x_15, 0); lean_inc(x_16); -lean_dec(x_14); -x_17 = l_Lean_Expr_fvarId_x21(x_6); -lean_dec(x_6); -x_18 = lean_ctor_get(x_15, 1); +x_17 = lean_ctor_get(x_15, 1); +lean_inc(x_17); +lean_dec(x_15); +x_18 = lean_ctor_get(x_16, 0); lean_inc(x_18); -x_19 = 0; -x_20 = lean_box(x_19); -x_21 = lean_alloc_closure((void*)(l_Lean_Meta_cases___boxed), 6, 4); -lean_closure_set(x_21, 0, x_11); -lean_closure_set(x_21, 1, x_17); -lean_closure_set(x_21, 2, x_18); -lean_closure_set(x_21, 3, x_20); +x_19 = lean_ctor_get(x_16, 1); +lean_inc(x_19); +lean_dec(x_16); +x_20 = l_Lean_Expr_fvarId_x21(x_6); +lean_dec(x_6); +x_21 = lean_ctor_get(x_18, 1); +lean_inc(x_21); +x_22 = 0; +x_23 = lean_box(x_22); +x_24 = lean_alloc_closure((void*)(l_Lean_Meta_cases___boxed), 6, 4); +lean_closure_set(x_24, 0, x_11); +lean_closure_set(x_24, 1, x_20); +lean_closure_set(x_24, 2, x_21); +lean_closure_set(x_24, 3, x_23); lean_inc(x_3); lean_inc(x_1); -x_22 = l_Lean_Elab_Tactic_liftMetaM___rarg(x_1, x_21, x_3, x_16); -if (lean_obj_tag(x_22) == 0) +x_25 = l_Lean_Elab_Tactic_liftMetaM___rarg(x_1, x_24, x_3, x_17); +if (lean_obj_tag(x_25) == 0) { -lean_object* x_23; lean_object* x_24; lean_object* x_25; lean_object* x_26; lean_object* x_27; -x_23 = lean_ctor_get(x_22, 0); -lean_inc(x_23); -x_24 = lean_ctor_get(x_22, 1); -lean_inc(x_24); -lean_dec(x_22); -x_25 = lean_unsigned_to_nat(0u); -x_26 = l_Array_umapMAux___main___at_Lean_Elab_Tactic_evalCases___spec__1(x_25, x_23); -x_27 = l___private_Init_Lean_Elab_Tactic_Induction_15__processResult(x_1, x_15, x_26, x_3, x_24); -lean_dec(x_26); -lean_dec(x_15); -return x_27; +lean_object* x_26; lean_object* x_27; lean_object* x_28; lean_object* x_29; +x_26 = lean_ctor_get(x_25, 0); +lean_inc(x_26); +x_27 = lean_ctor_get(x_25, 1); +lean_inc(x_27); +lean_dec(x_25); +x_28 = lean_ctor_get(x_18, 2); +lean_inc(x_28); +lean_dec(x_18); +lean_inc(x_3); +lean_inc(x_1); +x_29 = l___private_Init_Lean_Elab_Tactic_Induction_17__checkCasesResult(x_1, x_26, x_19, x_28, x_3, x_27); +lean_dec(x_19); +if (lean_obj_tag(x_29) == 0) +{ +lean_object* x_30; lean_object* x_31; lean_object* x_32; lean_object* x_33; lean_object* x_34; +x_30 = lean_ctor_get(x_29, 1); +lean_inc(x_30); +lean_dec(x_29); +x_31 = lean_unsigned_to_nat(0u); +x_32 = l_Array_umapMAux___main___at_Lean_Elab_Tactic_evalCases___spec__1(x_31, x_26); +x_33 = l_Array_filterAux___main___at_Lean_Elab_Tactic_evalCases___spec__2(x_28, x_31, x_31); +x_34 = l___private_Init_Lean_Elab_Tactic_Induction_15__processResult(x_1, x_33, x_32, x_3, x_30); +lean_dec(x_32); +lean_dec(x_33); +return x_34; } else { -uint8_t x_28; -lean_dec(x_15); +uint8_t x_35; +lean_dec(x_28); +lean_dec(x_26); lean_dec(x_3); lean_dec(x_1); -x_28 = !lean_is_exclusive(x_22); -if (x_28 == 0) +x_35 = !lean_is_exclusive(x_29); +if (x_35 == 0) { -return x_22; +return x_29; } else { -lean_object* x_29; lean_object* x_30; lean_object* x_31; -x_29 = lean_ctor_get(x_22, 0); -x_30 = lean_ctor_get(x_22, 1); -lean_inc(x_30); -lean_inc(x_29); -lean_dec(x_22); -x_31 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_31, 0, x_29); -lean_ctor_set(x_31, 1, x_30); -return x_31; +lean_object* x_36; lean_object* x_37; lean_object* x_38; +x_36 = lean_ctor_get(x_29, 0); +x_37 = lean_ctor_get(x_29, 1); +lean_inc(x_37); +lean_inc(x_36); +lean_dec(x_29); +x_38 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_38, 0, x_36); +lean_ctor_set(x_38, 1, x_37); +return x_38; } } } else { -uint8_t x_32; +uint8_t x_39; +lean_dec(x_19); +lean_dec(x_18); +lean_dec(x_3); +lean_dec(x_1); +x_39 = !lean_is_exclusive(x_25); +if (x_39 == 0) +{ +return x_25; +} +else +{ +lean_object* x_40; lean_object* x_41; lean_object* x_42; +x_40 = lean_ctor_get(x_25, 0); +x_41 = lean_ctor_get(x_25, 1); +lean_inc(x_41); +lean_inc(x_40); +lean_dec(x_25); +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_11); lean_dec(x_6); lean_dec(x_3); lean_dec(x_1); -x_32 = !lean_is_exclusive(x_14); -if (x_32 == 0) +x_43 = !lean_is_exclusive(x_15); +if (x_43 == 0) { -return x_14; +return x_15; } else { -lean_object* x_33; lean_object* x_34; lean_object* x_35; -x_33 = lean_ctor_get(x_14, 0); -x_34 = lean_ctor_get(x_14, 1); -lean_inc(x_34); -lean_inc(x_33); -lean_dec(x_14); -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; +lean_object* x_44; lean_object* x_45; lean_object* x_46; +x_44 = lean_ctor_get(x_15, 0); +x_45 = lean_ctor_get(x_15, 1); +lean_inc(x_45); +lean_inc(x_44); +lean_dec(x_15); +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_36; +uint8_t x_47; lean_dec(x_6); lean_dec(x_3); lean_dec(x_1); -x_36 = !lean_is_exclusive(x_8); -if (x_36 == 0) +x_47 = !lean_is_exclusive(x_8); +if (x_47 == 0) { return x_8; } else { -lean_object* x_37; lean_object* x_38; lean_object* x_39; -x_37 = lean_ctor_get(x_8, 0); -x_38 = lean_ctor_get(x_8, 1); -lean_inc(x_38); -lean_inc(x_37); +lean_object* x_48; lean_object* x_49; lean_object* x_50; +x_48 = lean_ctor_get(x_8, 0); +x_49 = lean_ctor_get(x_8, 1); +lean_inc(x_49); +lean_inc(x_48); lean_dec(x_8); -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; +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_40; +uint8_t x_51; lean_dec(x_3); lean_dec(x_1); -x_40 = !lean_is_exclusive(x_5); -if (x_40 == 0) +x_51 = !lean_is_exclusive(x_5); +if (x_51 == 0) { return x_5; } else { -lean_object* x_41; lean_object* x_42; lean_object* x_43; -x_41 = lean_ctor_get(x_5, 0); -x_42 = lean_ctor_get(x_5, 1); -lean_inc(x_42); -lean_inc(x_41); +lean_object* x_52; lean_object* x_53; lean_object* x_54; +x_52 = lean_ctor_get(x_5, 0); +x_53 = lean_ctor_get(x_5, 1); +lean_inc(x_53); +lean_inc(x_52); lean_dec(x_5); -x_43 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_43, 0, x_41); -lean_ctor_set(x_43, 1, x_42); -return x_43; +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; } } } @@ -12267,6 +13008,24 @@ lean_mark_persistent(l___regBuiltinTactic_Lean_Elab_Tactic_evalInduction___close res = l___regBuiltinTactic_Lean_Elab_Tactic_evalInduction(lean_io_mk_world()); if (lean_io_result_is_error(res)) return res; lean_dec_ref(res); +l___private_Init_Lean_Elab_Tactic_Induction_16__checkCasesResultAux___main___closed__1 = _init_l___private_Init_Lean_Elab_Tactic_Induction_16__checkCasesResultAux___main___closed__1(); +lean_mark_persistent(l___private_Init_Lean_Elab_Tactic_Induction_16__checkCasesResultAux___main___closed__1); +l___private_Init_Lean_Elab_Tactic_Induction_16__checkCasesResultAux___main___closed__2 = _init_l___private_Init_Lean_Elab_Tactic_Induction_16__checkCasesResultAux___main___closed__2(); +lean_mark_persistent(l___private_Init_Lean_Elab_Tactic_Induction_16__checkCasesResultAux___main___closed__2); +l___private_Init_Lean_Elab_Tactic_Induction_16__checkCasesResultAux___main___closed__3 = _init_l___private_Init_Lean_Elab_Tactic_Induction_16__checkCasesResultAux___main___closed__3(); +lean_mark_persistent(l___private_Init_Lean_Elab_Tactic_Induction_16__checkCasesResultAux___main___closed__3); +l___private_Init_Lean_Elab_Tactic_Induction_16__checkCasesResultAux___main___closed__4 = _init_l___private_Init_Lean_Elab_Tactic_Induction_16__checkCasesResultAux___main___closed__4(); +lean_mark_persistent(l___private_Init_Lean_Elab_Tactic_Induction_16__checkCasesResultAux___main___closed__4); +l___private_Init_Lean_Elab_Tactic_Induction_16__checkCasesResultAux___main___closed__5 = _init_l___private_Init_Lean_Elab_Tactic_Induction_16__checkCasesResultAux___main___closed__5(); +lean_mark_persistent(l___private_Init_Lean_Elab_Tactic_Induction_16__checkCasesResultAux___main___closed__5); +l___private_Init_Lean_Elab_Tactic_Induction_16__checkCasesResultAux___main___closed__6 = _init_l___private_Init_Lean_Elab_Tactic_Induction_16__checkCasesResultAux___main___closed__6(); +lean_mark_persistent(l___private_Init_Lean_Elab_Tactic_Induction_16__checkCasesResultAux___main___closed__6); +l___private_Init_Lean_Elab_Tactic_Induction_16__checkCasesResultAux___main___closed__7 = _init_l___private_Init_Lean_Elab_Tactic_Induction_16__checkCasesResultAux___main___closed__7(); +lean_mark_persistent(l___private_Init_Lean_Elab_Tactic_Induction_16__checkCasesResultAux___main___closed__7); +l___private_Init_Lean_Elab_Tactic_Induction_16__checkCasesResultAux___main___closed__8 = _init_l___private_Init_Lean_Elab_Tactic_Induction_16__checkCasesResultAux___main___closed__8(); +lean_mark_persistent(l___private_Init_Lean_Elab_Tactic_Induction_16__checkCasesResultAux___main___closed__8); +l___private_Init_Lean_Elab_Tactic_Induction_16__checkCasesResultAux___main___closed__9 = _init_l___private_Init_Lean_Elab_Tactic_Induction_16__checkCasesResultAux___main___closed__9(); +lean_mark_persistent(l___private_Init_Lean_Elab_Tactic_Induction_16__checkCasesResultAux___main___closed__9); l___regBuiltinTactic_Lean_Elab_Tactic_evalCases___closed__1 = _init_l___regBuiltinTactic_Lean_Elab_Tactic_evalCases___closed__1(); lean_mark_persistent(l___regBuiltinTactic_Lean_Elab_Tactic_evalCases___closed__1); l___regBuiltinTactic_Lean_Elab_Tactic_evalCases___closed__2 = _init_l___regBuiltinTactic_Lean_Elab_Tactic_evalCases___closed__2(); diff --git a/stage0/stdlib/Init/Lean/Elab/Tactic/Injection.c b/stage0/stdlib/Init/Lean/Elab/Tactic/Injection.c index 6482c2ce8e..7c8c78cf8f 100644 --- a/stage0/stdlib/Init/Lean/Elab/Tactic/Injection.c +++ b/stage0/stdlib/Init/Lean/Elab/Tactic/Injection.c @@ -17,26 +17,34 @@ lean_object* l_Lean_Elab_Tactic_withMVarContext___rarg(lean_object*, lean_object lean_object* l_Lean_Elab_Tactic_liftMetaM___rarg(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_ReaderT_bind___at_Lean_Meta_isClassExpensive___main___spec__4___rarg(lean_object*, lean_object*, lean_object*, lean_object*); extern lean_object* l_Lean_Elab_Tactic_liftMetaTactic___closed__1; +lean_object* l_List_toString___at_Lean_Elab_OpenDecl_HasToString___spec__2(lean_object*); lean_object* l_ReaderT_bind___at_Lean_Elab_Tactic_monadLog___spec__2___rarg(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___regBuiltinTactic_Lean_Elab_Tactic_evalInjection___closed__1; extern lean_object* l_Lean_Elab_Tactic_declareBuiltinTactic___closed__3; lean_object* l_Lean_Syntax_getId(lean_object*); +lean_object* l___private_Init_Lean_Elab_Tactic_Injection_2__checkUnusedIds___closed__3; lean_object* lean_name_mk_string(lean_object*, lean_object*); lean_object* l_Lean_Elab_Tactic_getMainGoal(lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_Elab_Tactic_evalInjection___closed__1; +lean_object* l___private_Init_Lean_Elab_Tactic_Injection_2__checkUnusedIds___closed__2; lean_object* l___private_Init_Lean_Elab_Tactic_Injection_1__getInjectionNewIds(lean_object*); lean_object* l_List_map___main___at___private_Init_Lean_Elab_Tactic_Injection_1__getInjectionNewIds___spec__1(lean_object*); +lean_object* l___private_Init_Lean_Elab_Tactic_Injection_2__checkUnusedIds___closed__1; +lean_object* l___private_Init_Lean_Elab_Tactic_Injection_2__checkUnusedIds___boxed(lean_object*, lean_object*, lean_object*, lean_object*); +extern lean_object* l_Lean_Parser_Tactic_injection___elambda__1___closed__1; +lean_object* l_Lean_Meta_throwTacticEx___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l___private_Init_Lean_Elab_Tactic_Injection_2__checkUnusedIds(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___regBuiltinTactic_Lean_Elab_Tactic_evalInjection(lean_object*); lean_object* l___regBuiltinTactic_Lean_Elab_Tactic_evalInjection___closed__2; lean_object* l_Lean_Meta_injection___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Tactic_evalInjection(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Syntax_getArgs(lean_object*); lean_object* l_Lean_Elab_Tactic_addBuiltinTactic(lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_Elab_Tactic_evalInjection___lambda__1___boxed(lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Elab_Tactic_evalInjection___lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Elab_Tactic_elabAsFVar(lean_object*, lean_object*, lean_object*, lean_object*); uint8_t l_Lean_Syntax_isNone(lean_object*); lean_object* l_Array_toList___rarg(lean_object*); -lean_object* l_Lean_Elab_Tactic_evalInjection___lambda__1(lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Elab_Tactic_evalInjection___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l___private_Init_Lean_Elab_Tactic_Injection_2__checkUnusedIds___closed__4; lean_object* l_Lean_Syntax_getArg(lean_object*, lean_object*); uint8_t l_List_isEmpty___rarg(lean_object*); lean_object* l___private_Init_Lean_Elab_Tactic_Injection_1__getInjectionNewIds___boxed(lean_object*); @@ -121,42 +129,211 @@ lean_dec(x_1); return x_2; } } -lean_object* l_Lean_Elab_Tactic_evalInjection___lambda__1(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +lean_object* _init_l___private_Init_Lean_Elab_Tactic_Injection_2__checkUnusedIds___closed__1() { _start: { -if (lean_obj_tag(x_1) == 0) -{ -lean_object* x_4; lean_object* x_5; -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 -{ -lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; -x_6 = lean_ctor_get(x_1, 0); -x_7 = lean_box(0); -lean_inc(x_6); -x_8 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_8, 0, x_6); -lean_ctor_set(x_8, 1, 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; +lean_object* x_1; lean_object* x_2; lean_object* x_3; +x_1 = lean_box(0); +x_2 = l_Lean_Parser_Tactic_injection___elambda__1___closed__1; +x_3 = lean_name_mk_string(x_1, x_2); +return x_3; } } -} -lean_object* _init_l_Lean_Elab_Tactic_evalInjection___closed__1() { +lean_object* _init_l___private_Init_Lean_Elab_Tactic_Injection_2__checkUnusedIds___closed__2() { _start: { lean_object* x_1; -x_1 = lean_alloc_closure((void*)(l_Lean_Elab_Tactic_evalInjection___lambda__1___boxed), 3, 0); +x_1 = lean_mk_string("too many identifiers provided, unused: "); return x_1; } } +lean_object* _init_l___private_Init_Lean_Elab_Tactic_Injection_2__checkUnusedIds___closed__3() { +_start: +{ +lean_object* x_1; lean_object* x_2; +x_1 = l___private_Init_Lean_Elab_Tactic_Injection_2__checkUnusedIds___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___private_Init_Lean_Elab_Tactic_Injection_2__checkUnusedIds___closed__4() { +_start: +{ +lean_object* x_1; lean_object* x_2; +x_1 = l___private_Init_Lean_Elab_Tactic_Injection_2__checkUnusedIds___closed__3; +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_Tactic_Injection_2__checkUnusedIds(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { +_start: +{ +uint8_t x_5; +x_5 = l_List_isEmpty___rarg(x_2); +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; lean_object* x_12; +x_6 = l_List_toString___at_Lean_Elab_OpenDecl_HasToString___spec__2(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___private_Init_Lean_Elab_Tactic_Injection_2__checkUnusedIds___closed__4; +x_10 = lean_alloc_ctor(9, 2, 0); +lean_ctor_set(x_10, 0, x_9); +lean_ctor_set(x_10, 1, x_8); +x_11 = l___private_Init_Lean_Elab_Tactic_Injection_2__checkUnusedIds___closed__1; +x_12 = l_Lean_Meta_throwTacticEx___rarg(x_11, x_1, x_10, x_3, x_4); +return x_12; +} +else +{ +lean_object* x_13; lean_object* x_14; +lean_dec(x_2); +lean_dec(x_1); +x_13 = lean_box(0); +x_14 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_14, 0, x_13); +lean_ctor_set(x_14, 1, x_4); +return x_14; +} +} +} +lean_object* l___private_Init_Lean_Elab_Tactic_Injection_2__checkUnusedIds___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_Tactic_Injection_2__checkUnusedIds(x_1, x_2, x_3, x_4); +lean_dec(x_3); +return x_5; +} +} +lean_object* l_Lean_Elab_Tactic_evalInjection___lambda__1(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) { +_start: +{ +if (lean_obj_tag(x_3) == 0) +{ +lean_object* x_6; +x_6 = l___private_Init_Lean_Elab_Tactic_Injection_2__checkUnusedIds(x_1, x_2, x_4, x_5); +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); +lean_dec(x_8); +x_9 = lean_box(0); +lean_ctor_set(x_6, 0, x_9); +return x_6; +} +else +{ +lean_object* x_10; lean_object* x_11; lean_object* x_12; +x_10 = lean_ctor_get(x_6, 1); +lean_inc(x_10); +lean_dec(x_6); +x_11 = lean_box(0); +x_12 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_12, 0, x_11); +lean_ctor_set(x_12, 1, x_10); +return x_12; +} +} +else +{ +uint8_t x_13; +x_13 = !lean_is_exclusive(x_6); +if (x_13 == 0) +{ +return x_6; +} +else +{ +lean_object* x_14; lean_object* x_15; lean_object* x_16; +x_14 = lean_ctor_get(x_6, 0); +x_15 = lean_ctor_get(x_6, 1); +lean_inc(x_15); +lean_inc(x_14); +lean_dec(x_6); +x_16 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_16, 0, x_14); +lean_ctor_set(x_16, 1, x_15); +return x_16; +} +} +} +else +{ +lean_object* x_17; lean_object* x_18; lean_object* x_19; +lean_dec(x_2); +x_17 = lean_ctor_get(x_3, 0); +lean_inc(x_17); +x_18 = lean_ctor_get(x_3, 2); +lean_inc(x_18); +lean_dec(x_3); +x_19 = l___private_Init_Lean_Elab_Tactic_Injection_2__checkUnusedIds(x_1, x_18, x_4, x_5); +if (lean_obj_tag(x_19) == 0) +{ +uint8_t x_20; +x_20 = !lean_is_exclusive(x_19); +if (x_20 == 0) +{ +lean_object* x_21; lean_object* x_22; lean_object* x_23; +x_21 = lean_ctor_get(x_19, 0); +lean_dec(x_21); +x_22 = lean_box(0); +x_23 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_23, 0, x_17); +lean_ctor_set(x_23, 1, x_22); +lean_ctor_set(x_19, 0, x_23); +return x_19; +} +else +{ +lean_object* x_24; lean_object* x_25; lean_object* x_26; lean_object* x_27; +x_24 = lean_ctor_get(x_19, 1); +lean_inc(x_24); +lean_dec(x_19); +x_25 = lean_box(0); +x_26 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_26, 0, x_17); +lean_ctor_set(x_26, 1, 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_24); +return x_27; +} +} +else +{ +uint8_t x_28; +lean_dec(x_17); +x_28 = !lean_is_exclusive(x_19); +if (x_28 == 0) +{ +return x_19; +} +else +{ +lean_object* x_29; lean_object* x_30; lean_object* x_31; +x_29 = lean_ctor_get(x_19, 0); +x_30 = lean_ctor_get(x_19, 1); +lean_inc(x_30); +lean_inc(x_29); +lean_dec(x_19); +x_31 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_31, 0, x_29); +lean_ctor_set(x_31, 1, x_30); +return x_31; +} +} +} +} +} lean_object* l_Lean_Elab_Tactic_evalInjection(lean_object* x_1, lean_object* x_2, lean_object* x_3) { _start: { @@ -183,7 +360,7 @@ lean_inc(x_1); x_13 = l_Lean_Elab_Tactic_getMainGoal(x_1, x_2, x_9); if (lean_obj_tag(x_13) == 0) { -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_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_14 = lean_ctor_get(x_13, 0); lean_inc(x_14); x_15 = lean_ctor_get(x_13, 1); @@ -195,23 +372,27 @@ x_17 = lean_ctor_get(x_14, 1); lean_inc(x_17); lean_dec(x_14); x_18 = l_List_isEmpty___rarg(x_12); -x_19 = lean_alloc_closure((void*)(l_Lean_Elab_Tactic_liftMetaTacticAux___rarg___lambda__1___boxed), 4, 1); -lean_closure_set(x_19, 0, x_17); +lean_inc(x_12); +lean_inc(x_16); +x_19 = lean_alloc_closure((void*)(l_Lean_Elab_Tactic_evalInjection___lambda__1___boxed), 5, 2); +lean_closure_set(x_19, 0, x_16); +lean_closure_set(x_19, 1, x_12); +x_20 = lean_alloc_closure((void*)(l_Lean_Elab_Tactic_liftMetaTacticAux___rarg___lambda__1___boxed), 4, 1); +lean_closure_set(x_20, 0, x_17); if (x_18 == 0) { -uint8_t x_20; lean_object* x_21; lean_object* x_22; lean_object* x_23; lean_object* x_24; lean_object* x_25; lean_object* x_26; lean_object* x_27; lean_object* x_28; lean_object* x_29; -x_20 = 1; -x_21 = lean_box(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; lean_object* x_29; +x_21 = 1; +x_22 = lean_box(x_21); lean_inc(x_16); -x_22 = lean_alloc_closure((void*)(l_Lean_Meta_injection___boxed), 6, 4); -lean_closure_set(x_22, 0, x_16); -lean_closure_set(x_22, 1, x_8); -lean_closure_set(x_22, 2, x_12); -lean_closure_set(x_22, 3, x_21); -x_23 = l_Lean_Elab_Tactic_evalInjection___closed__1; +x_23 = lean_alloc_closure((void*)(l_Lean_Meta_injection___boxed), 6, 4); +lean_closure_set(x_23, 0, x_16); +lean_closure_set(x_23, 1, x_8); +lean_closure_set(x_23, 2, x_12); +lean_closure_set(x_23, 3, x_22); x_24 = lean_alloc_closure((void*)(l_ReaderT_bind___at_Lean_Meta_isClassExpensive___main___spec__4___rarg), 4, 2); -lean_closure_set(x_24, 0, x_22); -lean_closure_set(x_24, 1, x_23); +lean_closure_set(x_24, 0, x_23); +lean_closure_set(x_24, 1, x_19); x_25 = l_Lean_Elab_Tactic_liftMetaTactic___closed__1; x_26 = lean_alloc_closure((void*)(l_ReaderT_bind___at_Lean_Meta_isClassExpensive___main___spec__4___rarg), 4, 2); lean_closure_set(x_26, 0, x_24); @@ -221,14 +402,14 @@ lean_closure_set(x_27, 0, x_1); lean_closure_set(x_27, 1, x_26); x_28 = lean_alloc_closure((void*)(l_ReaderT_bind___at_Lean_Elab_Tactic_monadLog___spec__2___rarg), 4, 2); lean_closure_set(x_28, 0, x_27); -lean_closure_set(x_28, 1, x_19); +lean_closure_set(x_28, 1, x_20); x_29 = l_Lean_Elab_Tactic_withMVarContext___rarg(x_16, x_28, x_2, x_15); lean_dec(x_16); return x_29; } else { -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; +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; x_30 = 0; x_31 = lean_box(x_30); lean_inc(x_16); @@ -237,86 +418,84 @@ lean_closure_set(x_32, 0, x_16); lean_closure_set(x_32, 1, x_8); lean_closure_set(x_32, 2, x_12); lean_closure_set(x_32, 3, x_31); -x_33 = l_Lean_Elab_Tactic_evalInjection___closed__1; -x_34 = lean_alloc_closure((void*)(l_ReaderT_bind___at_Lean_Meta_isClassExpensive___main___spec__4___rarg), 4, 2); -lean_closure_set(x_34, 0, x_32); -lean_closure_set(x_34, 1, x_33); -x_35 = l_Lean_Elab_Tactic_liftMetaTactic___closed__1; -x_36 = lean_alloc_closure((void*)(l_ReaderT_bind___at_Lean_Meta_isClassExpensive___main___spec__4___rarg), 4, 2); -lean_closure_set(x_36, 0, x_34); +x_33 = lean_alloc_closure((void*)(l_ReaderT_bind___at_Lean_Meta_isClassExpensive___main___spec__4___rarg), 4, 2); +lean_closure_set(x_33, 0, x_32); +lean_closure_set(x_33, 1, x_19); +x_34 = l_Lean_Elab_Tactic_liftMetaTactic___closed__1; +x_35 = lean_alloc_closure((void*)(l_ReaderT_bind___at_Lean_Meta_isClassExpensive___main___spec__4___rarg), 4, 2); +lean_closure_set(x_35, 0, x_33); +lean_closure_set(x_35, 1, x_34); +x_36 = lean_alloc_closure((void*)(l_Lean_Elab_Tactic_liftMetaM___rarg), 4, 2); +lean_closure_set(x_36, 0, x_1); lean_closure_set(x_36, 1, x_35); -x_37 = lean_alloc_closure((void*)(l_Lean_Elab_Tactic_liftMetaM___rarg), 4, 2); -lean_closure_set(x_37, 0, x_1); -lean_closure_set(x_37, 1, x_36); -x_38 = lean_alloc_closure((void*)(l_ReaderT_bind___at_Lean_Elab_Tactic_monadLog___spec__2___rarg), 4, 2); -lean_closure_set(x_38, 0, x_37); -lean_closure_set(x_38, 1, x_19); -x_39 = l_Lean_Elab_Tactic_withMVarContext___rarg(x_16, x_38, x_2, x_15); +x_37 = lean_alloc_closure((void*)(l_ReaderT_bind___at_Lean_Elab_Tactic_monadLog___spec__2___rarg), 4, 2); +lean_closure_set(x_37, 0, x_36); +lean_closure_set(x_37, 1, x_20); +x_38 = l_Lean_Elab_Tactic_withMVarContext___rarg(x_16, x_37, x_2, x_15); lean_dec(x_16); -return x_39; +return x_38; } } else { -uint8_t x_40; +uint8_t x_39; lean_dec(x_12); lean_dec(x_8); lean_dec(x_2); lean_dec(x_1); -x_40 = !lean_is_exclusive(x_13); -if (x_40 == 0) +x_39 = !lean_is_exclusive(x_13); +if (x_39 == 0) { return x_13; } else { -lean_object* x_41; lean_object* x_42; lean_object* x_43; -x_41 = lean_ctor_get(x_13, 0); -x_42 = lean_ctor_get(x_13, 1); -lean_inc(x_42); +lean_object* x_40; lean_object* x_41; lean_object* x_42; +x_40 = lean_ctor_get(x_13, 0); +x_41 = lean_ctor_get(x_13, 1); lean_inc(x_41); +lean_inc(x_40); lean_dec(x_13); -x_43 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_43, 0, x_41); -lean_ctor_set(x_43, 1, x_42); -return x_43; +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_44; +uint8_t x_43; lean_dec(x_2); lean_dec(x_1); -x_44 = !lean_is_exclusive(x_7); -if (x_44 == 0) +x_43 = !lean_is_exclusive(x_7); +if (x_43 == 0) { return x_7; } else { -lean_object* x_45; lean_object* x_46; lean_object* x_47; -x_45 = lean_ctor_get(x_7, 0); -x_46 = lean_ctor_get(x_7, 1); -lean_inc(x_46); +lean_object* x_44; lean_object* x_45; lean_object* x_46; +x_44 = lean_ctor_get(x_7, 0); +x_45 = lean_ctor_get(x_7, 1); lean_inc(x_45); +lean_inc(x_44); lean_dec(x_7); -x_47 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_47, 0, x_45); -lean_ctor_set(x_47, 1, x_46); -return x_47; +x_46 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_46, 0, x_44); +lean_ctor_set(x_46, 1, x_45); +return x_46; } } } } -lean_object* l_Lean_Elab_Tactic_evalInjection___lambda__1___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +lean_object* l_Lean_Elab_Tactic_evalInjection___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_4; -x_4 = l_Lean_Elab_Tactic_evalInjection___lambda__1(x_1, x_2, x_3); -lean_dec(x_2); -lean_dec(x_1); -return x_4; +lean_object* x_6; +x_6 = l_Lean_Elab_Tactic_evalInjection___lambda__1(x_1, x_2, x_3, x_4, x_5); +lean_dec(x_4); +return x_6; } } lean_object* _init_l___regBuiltinTactic_Lean_Elab_Tactic_evalInjection___closed__1() { @@ -369,8 +548,14 @@ lean_dec_ref(res); res = initialize_Init_Lean_Elab_Tactic_ElabTerm(lean_io_mk_world()); if (lean_io_result_is_error(res)) return res; lean_dec_ref(res); -l_Lean_Elab_Tactic_evalInjection___closed__1 = _init_l_Lean_Elab_Tactic_evalInjection___closed__1(); -lean_mark_persistent(l_Lean_Elab_Tactic_evalInjection___closed__1); +l___private_Init_Lean_Elab_Tactic_Injection_2__checkUnusedIds___closed__1 = _init_l___private_Init_Lean_Elab_Tactic_Injection_2__checkUnusedIds___closed__1(); +lean_mark_persistent(l___private_Init_Lean_Elab_Tactic_Injection_2__checkUnusedIds___closed__1); +l___private_Init_Lean_Elab_Tactic_Injection_2__checkUnusedIds___closed__2 = _init_l___private_Init_Lean_Elab_Tactic_Injection_2__checkUnusedIds___closed__2(); +lean_mark_persistent(l___private_Init_Lean_Elab_Tactic_Injection_2__checkUnusedIds___closed__2); +l___private_Init_Lean_Elab_Tactic_Injection_2__checkUnusedIds___closed__3 = _init_l___private_Init_Lean_Elab_Tactic_Injection_2__checkUnusedIds___closed__3(); +lean_mark_persistent(l___private_Init_Lean_Elab_Tactic_Injection_2__checkUnusedIds___closed__3); +l___private_Init_Lean_Elab_Tactic_Injection_2__checkUnusedIds___closed__4 = _init_l___private_Init_Lean_Elab_Tactic_Injection_2__checkUnusedIds___closed__4(); +lean_mark_persistent(l___private_Init_Lean_Elab_Tactic_Injection_2__checkUnusedIds___closed__4); l___regBuiltinTactic_Lean_Elab_Tactic_evalInjection___closed__1 = _init_l___regBuiltinTactic_Lean_Elab_Tactic_evalInjection___closed__1(); lean_mark_persistent(l___regBuiltinTactic_Lean_Elab_Tactic_evalInjection___closed__1); l___regBuiltinTactic_Lean_Elab_Tactic_evalInjection___closed__2 = _init_l___regBuiltinTactic_Lean_Elab_Tactic_evalInjection___closed__2(); diff --git a/stage0/stdlib/Init/Lean/Meta/Tactic/Cases.c b/stage0/stdlib/Init/Lean/Meta/Tactic/Cases.c index cb2df8fc96..494aa8979a 100644 --- a/stage0/stdlib/Init/Lean/Meta/Tactic/Cases.c +++ b/stage0/stdlib/Init/Lean/Meta/Tactic/Cases.c @@ -1,6 +1,6 @@ // Lean compiler output // Module: Init.Lean.Meta.Tactic.Cases -// Imports: Init.Lean.Meta.AppBuilder Init.Lean.Meta.Tactic.Induction Init.Lean.Meta.Tactic.Assert Init.Lean.Meta.Tactic.Subst +// Imports: Init.Lean.Meta.AppBuilder Init.Lean.Meta.Tactic.Induction Init.Lean.Meta.Tactic.Injection Init.Lean.Meta.Tactic.Assert Init.Lean.Meta.Tactic.Subst #include "runtime/lean.h" #if defined(__clang__) #pragma clang diagnostic ignored "-Wunused-parameter" @@ -112,7 +112,6 @@ lean_object* l___private_Init_Lean_MetavarContext_8__dep___main___at___private_I uint8_t lean_nat_dec_eq(lean_object*, lean_object*); lean_object* l___private_Init_Lean_Meta_Tactic_Cases_8__unifyEqsAux(lean_object*, lean_object*, lean_object*, lean_object*); uint8_t l_Array_anyRangeMAux___main___at___private_Init_Lean_Meta_Tactic_Cases_5__hasIndepIndices___spec__1(lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l___private_Init_Lean_Meta_Tactic_Cases_8__unifyEqsAux___main___lambda__1___closed__4; lean_object* l_Lean_Meta_getMVarType(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_MonadTracerAdapter_addTrace___at_Lean_Meta_isTypeCorrect___spec__1(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Array_umapMAux___main___at___private_Init_Lean_Meta_Tactic_Cases_8__unifyEqsAux___main___spec__5___boxed(lean_object*, lean_object*, lean_object*); @@ -123,7 +122,6 @@ uint8_t l_Array_anyRangeMAux___main___at___private_Init_Lean_Meta_Tactic_Cases_5 lean_object* l_Array_umapMAux___main___at___private_Init_Lean_Meta_Tactic_Cases_8__unifyEqsAux___main___spec__11(lean_object*, lean_object*, lean_object*); lean_object* l_Array_umapMAux___main___at___private_Init_Lean_Meta_Tactic_Cases_8__unifyEqsAux___main___spec__14(lean_object*, lean_object*, lean_object*); lean_object* l_Array_anyRangeMAux___main___at___private_Init_Lean_Meta_Tactic_Cases_5__hasIndepIndices___spec__22___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); -extern lean_object* l_Lean_Meta_mkNoConfusion___closed__3; lean_object* l_Lean_Expr_withAppAux___main___at_Lean_Meta_generalizeIndices___spec__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l___private_Init_Lean_Meta_Tactic_Cases_3__withNewIndexEqs___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); uint8_t l_PersistentArray_anyM___at___private_Init_Lean_Meta_Tactic_Cases_5__hasIndepIndices___spec__37(lean_object*, lean_object*, lean_object*, lean_object*); @@ -132,6 +130,7 @@ extern lean_object* l_Lean_Expr_heq_x3f___closed__2; lean_object* l___private_Init_Lean_Meta_Tactic_Cases_9__unifyEqs(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Array_umapMAux___main___at___private_Init_Lean_Meta_Tactic_Cases_8__unifyEqsAux___main___spec__7(lean_object*, lean_object*, lean_object*); lean_object* lean_array_get(lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Meta_injectionCore(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Expr_fvarId_x21(lean_object*); uint8_t l_Array_anyRangeMAux___main___at___private_Init_Lean_Meta_Tactic_Cases_5__hasIndepIndices___spec__41(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Expr_withAppAux___main___at_Lean_Meta_generalizeIndices___spec__1___closed__4; @@ -173,7 +172,6 @@ uint8_t l_Array_anyRangeMAux___main___at___private_Init_Lean_Meta_Tactic_Cases_5 lean_object* l_Lean_Meta_generalizeIndices___boxed(lean_object*, lean_object*, lean_object*, lean_object*); uint8_t l_Array_isEmpty___rarg(lean_object*); lean_object* l___private_Init_Lean_Meta_Tactic_Cases_2__withNewIndexEqsAux___main(lean_object*); -lean_object* l___private_Init_Lean_Meta_Tactic_Cases_8__unifyEqsAux___main___lambda__1___closed__3; lean_object* l_Array_anyRangeMAux___main___at___private_Init_Lean_Meta_Tactic_Cases_5__hasIndepIndices___spec__21___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Meta_generalizeIndices___closed__1; lean_object* l_Lean_LocalDecl_toExpr(lean_object*); @@ -282,6 +280,7 @@ lean_object* l_PersistentArray_anyMAux___main___at___private_Init_Lean_Meta_Tact lean_object* l_PersistentArray_anyMAux___main___at___private_Init_Lean_Meta_Tactic_Cases_5__hasIndepIndices___spec__14___boxed(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Expr_withAppAux___main___at_Lean_Meta_generalizeIndices___spec__1___lambda__4___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Array_umapMAux___main___at___private_Init_Lean_Meta_Tactic_Cases_8__unifyEqsAux___main___spec__8___boxed(lean_object*, lean_object*, lean_object*); +extern lean_object* l_Lean_Meta_injectionCore___lambda__1___closed__2; lean_object* l___private_Init_Lean_Meta_Tactic_Cases_7__toCasesSubgoals___boxed(lean_object*, lean_object*); lean_object* l_Lean_Meta_mkEq(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_mkAppB(lean_object*, lean_object*, lean_object*); @@ -11157,26 +11156,6 @@ x_3 = lean_name_mk_string(x_1, x_2); return x_3; } } -lean_object* _init_l___private_Init_Lean_Meta_Tactic_Cases_8__unifyEqsAux___main___lambda__1___closed__3() { -_start: -{ -lean_object* x_1; lean_object* x_2; -x_1 = l_Lean_Meta_mkNoConfusion___closed__3; -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_Meta_Tactic_Cases_8__unifyEqsAux___main___lambda__1___closed__4() { -_start: -{ -lean_object* x_1; lean_object* x_2; -x_1 = l___private_Init_Lean_Meta_Tactic_Cases_8__unifyEqsAux___main___lambda__1___closed__3; -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_Meta_Tactic_Cases_8__unifyEqsAux___main___lambda__1(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9) { _start: { @@ -11195,12 +11174,12 @@ if (x_16 == 0) { lean_object* x_17; lean_object* x_18; lean_object* x_19; lean_dec(x_10); +lean_dec(x_6); lean_dec(x_5); lean_dec(x_4); -lean_dec(x_3); lean_dec(x_2); x_17 = l___private_Init_Lean_Meta_Tactic_Cases_8__unifyEqsAux___main___lambda__1___closed__2; -x_18 = l___private_Init_Lean_Meta_Tactic_Cases_8__unifyEqsAux___main___lambda__1___closed__4; +x_18 = l_Lean_Meta_injectionCore___lambda__1___closed__2; x_19 = l_Lean_Meta_throwTacticEx___rarg(x_17, x_1, x_18, x_8, x_9); lean_dec(x_8); return x_19; @@ -11228,896 +11207,909 @@ lean_inc(x_25); x_30 = l_Lean_Meta_isExprDefEq(x_25, x_29, x_8, x_9); if (lean_obj_tag(x_30) == 0) { -lean_object* x_31; lean_object* x_32; lean_object* x_33; lean_object* x_34; lean_object* x_40; uint8_t x_59; +lean_object* x_31; uint8_t x_32; x_31 = lean_ctor_get(x_30, 0); lean_inc(x_31); -x_32 = lean_ctor_get(x_30, 1); -lean_inc(x_32); -if (lean_is_exclusive(x_30)) { - lean_ctor_release(x_30, 0); - lean_ctor_release(x_30, 1); - x_33 = x_30; -} else { - lean_dec_ref(x_30); - x_33 = lean_box(0); -} -x_59 = lean_unbox(x_31); +x_32 = lean_unbox(x_31); lean_dec(x_31); -if (x_59 == 0) +if (x_32 == 0) { -if (lean_obj_tag(x_25) == 1) +lean_object* x_33; lean_object* x_34; +x_33 = lean_ctor_get(x_30, 1); +lean_inc(x_33); +lean_dec(x_30); +lean_inc(x_8); +x_34 = l_Lean_Meta_whnf(x_25, x_8, x_33); +if (lean_obj_tag(x_34) == 0) { -lean_dec(x_33); -switch (lean_obj_tag(x_29)) { +lean_object* x_35; lean_object* x_36; lean_object* x_37; +x_35 = lean_ctor_get(x_34, 0); +lean_inc(x_35); +x_36 = lean_ctor_get(x_34, 1); +lean_inc(x_36); +lean_dec(x_34); +lean_inc(x_8); +x_37 = l_Lean_Meta_whnf(x_29, x_8, x_36); +if (lean_obj_tag(x_37) == 0) +{ +lean_object* x_38; lean_object* x_39; lean_object* x_40; +x_38 = lean_ctor_get(x_37, 0); +lean_inc(x_38); +x_39 = lean_ctor_get(x_37, 1); +lean_inc(x_39); +lean_dec(x_37); +if (lean_obj_tag(x_35) == 1) +{ +switch (lean_obj_tag(x_38)) { case 0: { -uint8_t x_60; uint8_t x_61; lean_object* x_62; -lean_dec(x_29); -lean_dec(x_25); -x_60 = 0; -x_61 = 1; -x_62 = l_Lean_Meta_substCore(x_1, x_5, x_60, x_61, x_8, x_32); -if (lean_obj_tag(x_62) == 0) +uint8_t x_77; uint8_t x_78; lean_object* x_79; +lean_dec(x_38); +lean_dec(x_35); +x_77 = 0; +x_78 = 1; +x_79 = l_Lean_Meta_substCore(x_1, x_2, x_77, x_78, x_8, x_39); +if (lean_obj_tag(x_79) == 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; lean_object* x_71; -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_63, 0); -lean_inc(x_65); -x_66 = lean_ctor_get(x_63, 1); -lean_inc(x_66); -lean_dec(x_63); -x_67 = l_Array_umapMAux___main___at___private_Init_Lean_Meta_Tactic_Cases_8__unifyEqsAux___main___spec__2(x_65, x_20, x_2); -x_68 = l_Lean_Meta_FVarSubst_compose(x_65, x_3); -x_69 = lean_alloc_ctor(0, 3, 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); -x_70 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_70, 0, x_69); -lean_ctor_set(x_70, 1, x_4); -x_71 = l___private_Init_Lean_Meta_Tactic_Cases_8__unifyEqsAux___main(x_6, x_70, x_8, x_64); +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_80 = lean_ctor_get(x_79, 0); +lean_inc(x_80); +x_81 = lean_ctor_get(x_79, 1); +lean_inc(x_81); +lean_dec(x_79); +x_82 = lean_ctor_get(x_80, 0); +lean_inc(x_82); +x_83 = lean_ctor_get(x_80, 1); +lean_inc(x_83); +lean_dec(x_80); +x_84 = l_Array_umapMAux___main___at___private_Init_Lean_Meta_Tactic_Cases_8__unifyEqsAux___main___spec__2(x_82, x_20, x_4); +x_85 = l_Lean_Meta_FVarSubst_compose(x_82, x_5); +x_86 = lean_alloc_ctor(0, 3, 0); +lean_ctor_set(x_86, 0, x_83); +lean_ctor_set(x_86, 1, x_84); +lean_ctor_set(x_86, 2, x_85); +x_87 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_87, 0, x_86); +lean_ctor_set(x_87, 1, x_6); +x_88 = l___private_Init_Lean_Meta_Tactic_Cases_8__unifyEqsAux___main(x_3, x_87, x_8, x_81); lean_dec(x_8); -return x_71; +return x_88; } else { -uint8_t x_72; +uint8_t x_89; lean_dec(x_8); +lean_dec(x_6); +lean_dec(x_5); lean_dec(x_4); -lean_dec(x_3); -lean_dec(x_2); -x_72 = !lean_is_exclusive(x_62); -if (x_72 == 0) +x_89 = !lean_is_exclusive(x_79); +if (x_89 == 0) { -return x_62; +return x_79; } else { -lean_object* x_73; lean_object* x_74; lean_object* x_75; -x_73 = lean_ctor_get(x_62, 0); -x_74 = lean_ctor_get(x_62, 1); -lean_inc(x_74); -lean_inc(x_73); -lean_dec(x_62); -x_75 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_75, 0, x_73); -lean_ctor_set(x_75, 1, x_74); -return x_75; +lean_object* x_90; lean_object* x_91; lean_object* x_92; +x_90 = lean_ctor_get(x_79, 0); +x_91 = lean_ctor_get(x_79, 1); +lean_inc(x_91); +lean_inc(x_90); +lean_dec(x_79); +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; } } } case 1: { -lean_object* x_76; lean_object* x_77; lean_object* x_78; -x_76 = lean_ctor_get(x_25, 0); -lean_inc(x_76); -lean_dec(x_25); -x_77 = lean_ctor_get(x_29, 0); -lean_inc(x_77); -lean_dec(x_29); +lean_object* x_93; lean_object* x_94; lean_object* x_95; +x_93 = lean_ctor_get(x_35, 0); +lean_inc(x_93); +lean_dec(x_35); +x_94 = lean_ctor_get(x_38, 0); +lean_inc(x_94); +lean_dec(x_38); lean_inc(x_8); -x_78 = l_Lean_Meta_getLocalDecl(x_76, x_8, x_32); -if (lean_obj_tag(x_78) == 0) +x_95 = l_Lean_Meta_getLocalDecl(x_93, x_8, x_39); +if (lean_obj_tag(x_95) == 0) { -lean_object* x_79; lean_object* x_80; -x_79 = lean_ctor_get(x_78, 1); -lean_inc(x_79); -lean_dec(x_78); -lean_inc(x_8); -x_80 = l_Lean_Meta_getLocalDecl(x_77, x_8, x_79); -if (lean_obj_tag(x_80) == 0) -{ -lean_object* x_81; uint8_t x_82; uint8_t x_83; lean_object* x_84; -x_81 = lean_ctor_get(x_80, 1); -lean_inc(x_81); -lean_dec(x_80); -x_82 = 0; -x_83 = 1; -x_84 = l_Lean_Meta_substCore(x_1, x_5, x_82, x_83, x_8, x_81); -if (lean_obj_tag(x_84) == 0) -{ -lean_object* x_85; lean_object* x_86; lean_object* x_87; lean_object* x_88; lean_object* x_89; lean_object* x_90; lean_object* x_91; lean_object* x_92; lean_object* x_93; -x_85 = lean_ctor_get(x_84, 0); -lean_inc(x_85); -x_86 = lean_ctor_get(x_84, 1); -lean_inc(x_86); -lean_dec(x_84); -x_87 = lean_ctor_get(x_85, 0); -lean_inc(x_87); -x_88 = lean_ctor_get(x_85, 1); -lean_inc(x_88); -lean_dec(x_85); -x_89 = l_Array_umapMAux___main___at___private_Init_Lean_Meta_Tactic_Cases_8__unifyEqsAux___main___spec__3(x_87, x_20, x_2); -x_90 = l_Lean_Meta_FVarSubst_compose(x_87, x_3); -x_91 = lean_alloc_ctor(0, 3, 0); -lean_ctor_set(x_91, 0, x_88); -lean_ctor_set(x_91, 1, x_89); -lean_ctor_set(x_91, 2, x_90); -x_92 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_92, 0, x_91); -lean_ctor_set(x_92, 1, x_4); -x_93 = l___private_Init_Lean_Meta_Tactic_Cases_8__unifyEqsAux___main(x_6, x_92, x_8, x_86); -lean_dec(x_8); -return x_93; -} -else -{ -uint8_t x_94; -lean_dec(x_8); -lean_dec(x_4); -lean_dec(x_3); -lean_dec(x_2); -x_94 = !lean_is_exclusive(x_84); -if (x_94 == 0) -{ -return x_84; -} -else -{ -lean_object* x_95; lean_object* x_96; lean_object* x_97; -x_95 = lean_ctor_get(x_84, 0); -x_96 = lean_ctor_get(x_84, 1); +lean_object* x_96; lean_object* x_97; +x_96 = lean_ctor_get(x_95, 1); lean_inc(x_96); -lean_inc(x_95); -lean_dec(x_84); -x_97 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_97, 0, x_95); -lean_ctor_set(x_97, 1, x_96); -return x_97; -} -} +lean_dec(x_95); +lean_inc(x_8); +x_97 = l_Lean_Meta_getLocalDecl(x_94, x_8, x_96); +if (lean_obj_tag(x_97) == 0) +{ +lean_object* x_98; uint8_t x_99; uint8_t x_100; lean_object* x_101; +x_98 = lean_ctor_get(x_97, 1); +lean_inc(x_98); +lean_dec(x_97); +x_99 = 0; +x_100 = 1; +x_101 = l_Lean_Meta_substCore(x_1, x_2, x_99, x_100, x_8, x_98); +if (lean_obj_tag(x_101) == 0) +{ +lean_object* x_102; lean_object* x_103; lean_object* x_104; lean_object* x_105; lean_object* x_106; lean_object* x_107; lean_object* x_108; lean_object* x_109; lean_object* x_110; +x_102 = lean_ctor_get(x_101, 0); +lean_inc(x_102); +x_103 = lean_ctor_get(x_101, 1); +lean_inc(x_103); +lean_dec(x_101); +x_104 = lean_ctor_get(x_102, 0); +lean_inc(x_104); +x_105 = lean_ctor_get(x_102, 1); +lean_inc(x_105); +lean_dec(x_102); +x_106 = l_Array_umapMAux___main___at___private_Init_Lean_Meta_Tactic_Cases_8__unifyEqsAux___main___spec__3(x_104, x_20, x_4); +x_107 = l_Lean_Meta_FVarSubst_compose(x_104, x_5); +x_108 = lean_alloc_ctor(0, 3, 0); +lean_ctor_set(x_108, 0, x_105); +lean_ctor_set(x_108, 1, x_106); +lean_ctor_set(x_108, 2, x_107); +x_109 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_109, 0, x_108); +lean_ctor_set(x_109, 1, x_6); +x_110 = l___private_Init_Lean_Meta_Tactic_Cases_8__unifyEqsAux___main(x_3, x_109, x_8, x_103); +lean_dec(x_8); +return x_110; } else { -uint8_t x_98; +uint8_t x_111; lean_dec(x_8); +lean_dec(x_6); lean_dec(x_5); lean_dec(x_4); -lean_dec(x_3); -lean_dec(x_2); -lean_dec(x_1); -x_98 = !lean_is_exclusive(x_80); -if (x_98 == 0) +x_111 = !lean_is_exclusive(x_101); +if (x_111 == 0) { -return x_80; -} -else -{ -lean_object* x_99; lean_object* x_100; lean_object* x_101; -x_99 = lean_ctor_get(x_80, 0); -x_100 = lean_ctor_get(x_80, 1); -lean_inc(x_100); -lean_inc(x_99); -lean_dec(x_80); -x_101 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_101, 0, x_99); -lean_ctor_set(x_101, 1, x_100); return x_101; } +else +{ +lean_object* x_112; lean_object* x_113; lean_object* x_114; +x_112 = lean_ctor_get(x_101, 0); +x_113 = lean_ctor_get(x_101, 1); +lean_inc(x_113); +lean_inc(x_112); +lean_dec(x_101); +x_114 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_114, 0, x_112); +lean_ctor_set(x_114, 1, x_113); +return x_114; +} } } else { -uint8_t x_102; -lean_dec(x_77); +uint8_t x_115; lean_dec(x_8); +lean_dec(x_6); lean_dec(x_5); lean_dec(x_4); -lean_dec(x_3); lean_dec(x_2); lean_dec(x_1); -x_102 = !lean_is_exclusive(x_78); -if (x_102 == 0) +x_115 = !lean_is_exclusive(x_97); +if (x_115 == 0) { -return x_78; +return x_97; } else { -lean_object* x_103; lean_object* x_104; lean_object* x_105; -x_103 = lean_ctor_get(x_78, 0); -x_104 = lean_ctor_get(x_78, 1); -lean_inc(x_104); -lean_inc(x_103); -lean_dec(x_78); -x_105 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_105, 0, x_103); -lean_ctor_set(x_105, 1, x_104); -return x_105; +lean_object* x_116; lean_object* x_117; lean_object* x_118; +x_116 = lean_ctor_get(x_97, 0); +x_117 = lean_ctor_get(x_97, 1); +lean_inc(x_117); +lean_inc(x_116); +lean_dec(x_97); +x_118 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_118, 0, x_116); +lean_ctor_set(x_118, 1, x_117); +return x_118; +} +} +} +else +{ +uint8_t x_119; +lean_dec(x_94); +lean_dec(x_8); +lean_dec(x_6); +lean_dec(x_5); +lean_dec(x_4); +lean_dec(x_2); +lean_dec(x_1); +x_119 = !lean_is_exclusive(x_95); +if (x_119 == 0) +{ +return x_95; +} +else +{ +lean_object* x_120; lean_object* x_121; lean_object* x_122; +x_120 = lean_ctor_get(x_95, 0); +x_121 = lean_ctor_get(x_95, 1); +lean_inc(x_121); +lean_inc(x_120); +lean_dec(x_95); +x_122 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_122, 0, x_120); +lean_ctor_set(x_122, 1, x_121); +return x_122; } } } case 2: { -uint8_t x_106; uint8_t x_107; lean_object* x_108; -lean_dec(x_29); -lean_dec(x_25); -x_106 = 0; -x_107 = 1; -x_108 = l_Lean_Meta_substCore(x_1, x_5, x_106, x_107, x_8, x_32); -if (lean_obj_tag(x_108) == 0) +uint8_t x_123; uint8_t x_124; lean_object* x_125; +lean_dec(x_38); +lean_dec(x_35); +x_123 = 0; +x_124 = 1; +x_125 = l_Lean_Meta_substCore(x_1, x_2, x_123, x_124, x_8, x_39); +if (lean_obj_tag(x_125) == 0) { -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; -x_109 = lean_ctor_get(x_108, 0); -lean_inc(x_109); -x_110 = lean_ctor_get(x_108, 1); -lean_inc(x_110); -lean_dec(x_108); -x_111 = lean_ctor_get(x_109, 0); -lean_inc(x_111); -x_112 = lean_ctor_get(x_109, 1); -lean_inc(x_112); -lean_dec(x_109); -x_113 = l_Array_umapMAux___main___at___private_Init_Lean_Meta_Tactic_Cases_8__unifyEqsAux___main___spec__4(x_111, x_20, x_2); -x_114 = l_Lean_Meta_FVarSubst_compose(x_111, x_3); -x_115 = lean_alloc_ctor(0, 3, 0); -lean_ctor_set(x_115, 0, x_112); -lean_ctor_set(x_115, 1, x_113); -lean_ctor_set(x_115, 2, x_114); -x_116 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_116, 0, x_115); -lean_ctor_set(x_116, 1, x_4); -x_117 = l___private_Init_Lean_Meta_Tactic_Cases_8__unifyEqsAux___main(x_6, x_116, x_8, x_110); +lean_object* x_126; lean_object* x_127; lean_object* x_128; lean_object* x_129; lean_object* x_130; lean_object* x_131; lean_object* x_132; lean_object* x_133; lean_object* x_134; +x_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); +x_128 = lean_ctor_get(x_126, 0); +lean_inc(x_128); +x_129 = lean_ctor_get(x_126, 1); +lean_inc(x_129); +lean_dec(x_126); +x_130 = l_Array_umapMAux___main___at___private_Init_Lean_Meta_Tactic_Cases_8__unifyEqsAux___main___spec__4(x_128, x_20, x_4); +x_131 = l_Lean_Meta_FVarSubst_compose(x_128, x_5); +x_132 = lean_alloc_ctor(0, 3, 0); +lean_ctor_set(x_132, 0, x_129); +lean_ctor_set(x_132, 1, x_130); +lean_ctor_set(x_132, 2, x_131); +x_133 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_133, 0, x_132); +lean_ctor_set(x_133, 1, x_6); +x_134 = l___private_Init_Lean_Meta_Tactic_Cases_8__unifyEqsAux___main(x_3, x_133, x_8, x_127); lean_dec(x_8); -return x_117; +return x_134; } else { -uint8_t x_118; +uint8_t x_135; lean_dec(x_8); +lean_dec(x_6); +lean_dec(x_5); lean_dec(x_4); -lean_dec(x_3); -lean_dec(x_2); -x_118 = !lean_is_exclusive(x_108); -if (x_118 == 0) +x_135 = !lean_is_exclusive(x_125); +if (x_135 == 0) { -return x_108; +return x_125; } else { -lean_object* x_119; lean_object* x_120; lean_object* x_121; -x_119 = lean_ctor_get(x_108, 0); -x_120 = lean_ctor_get(x_108, 1); -lean_inc(x_120); -lean_inc(x_119); -lean_dec(x_108); -x_121 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_121, 0, x_119); -lean_ctor_set(x_121, 1, x_120); -return x_121; +lean_object* x_136; lean_object* x_137; lean_object* x_138; +x_136 = lean_ctor_get(x_125, 0); +x_137 = lean_ctor_get(x_125, 1); +lean_inc(x_137); +lean_inc(x_136); +lean_dec(x_125); +x_138 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_138, 0, x_136); +lean_ctor_set(x_138, 1, x_137); +return x_138; } } } case 3: { -uint8_t x_122; uint8_t x_123; lean_object* x_124; -lean_dec(x_29); -lean_dec(x_25); -x_122 = 0; -x_123 = 1; -x_124 = l_Lean_Meta_substCore(x_1, x_5, x_122, x_123, x_8, x_32); -if (lean_obj_tag(x_124) == 0) +uint8_t x_139; uint8_t x_140; lean_object* x_141; +lean_dec(x_38); +lean_dec(x_35); +x_139 = 0; +x_140 = 1; +x_141 = l_Lean_Meta_substCore(x_1, x_2, x_139, x_140, x_8, x_39); +if (lean_obj_tag(x_141) == 0) { -lean_object* x_125; lean_object* x_126; lean_object* x_127; lean_object* x_128; lean_object* x_129; lean_object* x_130; lean_object* x_131; lean_object* x_132; lean_object* x_133; -x_125 = lean_ctor_get(x_124, 0); -lean_inc(x_125); -x_126 = lean_ctor_get(x_124, 1); -lean_inc(x_126); -lean_dec(x_124); -x_127 = lean_ctor_get(x_125, 0); -lean_inc(x_127); -x_128 = lean_ctor_get(x_125, 1); -lean_inc(x_128); -lean_dec(x_125); -x_129 = l_Array_umapMAux___main___at___private_Init_Lean_Meta_Tactic_Cases_8__unifyEqsAux___main___spec__5(x_127, x_20, x_2); -x_130 = l_Lean_Meta_FVarSubst_compose(x_127, x_3); -x_131 = lean_alloc_ctor(0, 3, 0); -lean_ctor_set(x_131, 0, x_128); -lean_ctor_set(x_131, 1, x_129); -lean_ctor_set(x_131, 2, x_130); -x_132 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_132, 0, x_131); -lean_ctor_set(x_132, 1, x_4); -x_133 = l___private_Init_Lean_Meta_Tactic_Cases_8__unifyEqsAux___main(x_6, x_132, x_8, x_126); +lean_object* x_142; lean_object* x_143; lean_object* x_144; lean_object* x_145; lean_object* x_146; lean_object* x_147; lean_object* x_148; lean_object* x_149; lean_object* x_150; +x_142 = lean_ctor_get(x_141, 0); +lean_inc(x_142); +x_143 = lean_ctor_get(x_141, 1); +lean_inc(x_143); +lean_dec(x_141); +x_144 = lean_ctor_get(x_142, 0); +lean_inc(x_144); +x_145 = lean_ctor_get(x_142, 1); +lean_inc(x_145); +lean_dec(x_142); +x_146 = l_Array_umapMAux___main___at___private_Init_Lean_Meta_Tactic_Cases_8__unifyEqsAux___main___spec__5(x_144, x_20, x_4); +x_147 = l_Lean_Meta_FVarSubst_compose(x_144, x_5); +x_148 = lean_alloc_ctor(0, 3, 0); +lean_ctor_set(x_148, 0, x_145); +lean_ctor_set(x_148, 1, x_146); +lean_ctor_set(x_148, 2, x_147); +x_149 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_149, 0, x_148); +lean_ctor_set(x_149, 1, x_6); +x_150 = l___private_Init_Lean_Meta_Tactic_Cases_8__unifyEqsAux___main(x_3, x_149, x_8, x_143); lean_dec(x_8); -return x_133; +return x_150; } else { -uint8_t x_134; +uint8_t x_151; lean_dec(x_8); +lean_dec(x_6); +lean_dec(x_5); lean_dec(x_4); -lean_dec(x_3); -lean_dec(x_2); -x_134 = !lean_is_exclusive(x_124); -if (x_134 == 0) +x_151 = !lean_is_exclusive(x_141); +if (x_151 == 0) { -return x_124; +return x_141; } else { -lean_object* x_135; lean_object* x_136; lean_object* x_137; -x_135 = lean_ctor_get(x_124, 0); -x_136 = lean_ctor_get(x_124, 1); -lean_inc(x_136); -lean_inc(x_135); -lean_dec(x_124); -x_137 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_137, 0, x_135); -lean_ctor_set(x_137, 1, x_136); -return x_137; +lean_object* x_152; lean_object* x_153; lean_object* x_154; +x_152 = lean_ctor_get(x_141, 0); +x_153 = lean_ctor_get(x_141, 1); +lean_inc(x_153); +lean_inc(x_152); +lean_dec(x_141); +x_154 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_154, 0, x_152); +lean_ctor_set(x_154, 1, x_153); +return x_154; } } } case 4: { -uint8_t x_138; uint8_t x_139; lean_object* x_140; -lean_dec(x_29); -lean_dec(x_25); -x_138 = 0; -x_139 = 1; -x_140 = l_Lean_Meta_substCore(x_1, x_5, x_138, x_139, x_8, x_32); -if (lean_obj_tag(x_140) == 0) +uint8_t x_155; uint8_t x_156; lean_object* x_157; +lean_dec(x_38); +lean_dec(x_35); +x_155 = 0; +x_156 = 1; +x_157 = l_Lean_Meta_substCore(x_1, x_2, x_155, x_156, x_8, x_39); +if (lean_obj_tag(x_157) == 0) { -lean_object* x_141; lean_object* x_142; lean_object* x_143; lean_object* x_144; lean_object* x_145; lean_object* x_146; lean_object* x_147; lean_object* x_148; lean_object* x_149; -x_141 = lean_ctor_get(x_140, 0); -lean_inc(x_141); -x_142 = lean_ctor_get(x_140, 1); -lean_inc(x_142); -lean_dec(x_140); -x_143 = lean_ctor_get(x_141, 0); -lean_inc(x_143); -x_144 = lean_ctor_get(x_141, 1); -lean_inc(x_144); -lean_dec(x_141); -x_145 = l_Array_umapMAux___main___at___private_Init_Lean_Meta_Tactic_Cases_8__unifyEqsAux___main___spec__6(x_143, x_20, x_2); -x_146 = l_Lean_Meta_FVarSubst_compose(x_143, x_3); -x_147 = lean_alloc_ctor(0, 3, 0); -lean_ctor_set(x_147, 0, x_144); -lean_ctor_set(x_147, 1, x_145); -lean_ctor_set(x_147, 2, x_146); -x_148 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_148, 0, x_147); -lean_ctor_set(x_148, 1, x_4); -x_149 = l___private_Init_Lean_Meta_Tactic_Cases_8__unifyEqsAux___main(x_6, x_148, x_8, x_142); +lean_object* x_158; lean_object* x_159; lean_object* x_160; lean_object* x_161; lean_object* x_162; lean_object* x_163; lean_object* x_164; lean_object* x_165; lean_object* x_166; +x_158 = lean_ctor_get(x_157, 0); +lean_inc(x_158); +x_159 = lean_ctor_get(x_157, 1); +lean_inc(x_159); +lean_dec(x_157); +x_160 = lean_ctor_get(x_158, 0); +lean_inc(x_160); +x_161 = lean_ctor_get(x_158, 1); +lean_inc(x_161); +lean_dec(x_158); +x_162 = l_Array_umapMAux___main___at___private_Init_Lean_Meta_Tactic_Cases_8__unifyEqsAux___main___spec__6(x_160, x_20, x_4); +x_163 = l_Lean_Meta_FVarSubst_compose(x_160, x_5); +x_164 = lean_alloc_ctor(0, 3, 0); +lean_ctor_set(x_164, 0, x_161); +lean_ctor_set(x_164, 1, x_162); +lean_ctor_set(x_164, 2, x_163); +x_165 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_165, 0, x_164); +lean_ctor_set(x_165, 1, x_6); +x_166 = l___private_Init_Lean_Meta_Tactic_Cases_8__unifyEqsAux___main(x_3, x_165, x_8, x_159); lean_dec(x_8); -return x_149; +return x_166; } else { -uint8_t x_150; +uint8_t x_167; lean_dec(x_8); +lean_dec(x_6); +lean_dec(x_5); lean_dec(x_4); -lean_dec(x_3); -lean_dec(x_2); -x_150 = !lean_is_exclusive(x_140); -if (x_150 == 0) +x_167 = !lean_is_exclusive(x_157); +if (x_167 == 0) { -return x_140; +return x_157; } else { -lean_object* x_151; lean_object* x_152; lean_object* x_153; -x_151 = lean_ctor_get(x_140, 0); -x_152 = lean_ctor_get(x_140, 1); -lean_inc(x_152); -lean_inc(x_151); -lean_dec(x_140); -x_153 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_153, 0, x_151); -lean_ctor_set(x_153, 1, x_152); -return x_153; +lean_object* x_168; lean_object* x_169; lean_object* x_170; +x_168 = lean_ctor_get(x_157, 0); +x_169 = lean_ctor_get(x_157, 1); +lean_inc(x_169); +lean_inc(x_168); +lean_dec(x_157); +x_170 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_170, 0, x_168); +lean_ctor_set(x_170, 1, x_169); +return x_170; } } } case 5: { -uint8_t x_154; uint8_t x_155; lean_object* x_156; -lean_dec(x_29); -lean_dec(x_25); -x_154 = 0; -x_155 = 1; -x_156 = l_Lean_Meta_substCore(x_1, x_5, x_154, x_155, x_8, x_32); -if (lean_obj_tag(x_156) == 0) +uint8_t x_171; uint8_t x_172; lean_object* x_173; +lean_dec(x_38); +lean_dec(x_35); +x_171 = 0; +x_172 = 1; +x_173 = l_Lean_Meta_substCore(x_1, x_2, x_171, x_172, x_8, x_39); +if (lean_obj_tag(x_173) == 0) { -lean_object* x_157; lean_object* x_158; lean_object* x_159; lean_object* x_160; lean_object* x_161; lean_object* x_162; lean_object* x_163; lean_object* x_164; lean_object* x_165; -x_157 = lean_ctor_get(x_156, 0); -lean_inc(x_157); -x_158 = lean_ctor_get(x_156, 1); -lean_inc(x_158); -lean_dec(x_156); -x_159 = lean_ctor_get(x_157, 0); -lean_inc(x_159); -x_160 = lean_ctor_get(x_157, 1); -lean_inc(x_160); -lean_dec(x_157); -x_161 = l_Array_umapMAux___main___at___private_Init_Lean_Meta_Tactic_Cases_8__unifyEqsAux___main___spec__7(x_159, x_20, x_2); -x_162 = l_Lean_Meta_FVarSubst_compose(x_159, x_3); -x_163 = lean_alloc_ctor(0, 3, 0); -lean_ctor_set(x_163, 0, x_160); -lean_ctor_set(x_163, 1, x_161); -lean_ctor_set(x_163, 2, x_162); -x_164 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_164, 0, x_163); -lean_ctor_set(x_164, 1, x_4); -x_165 = l___private_Init_Lean_Meta_Tactic_Cases_8__unifyEqsAux___main(x_6, x_164, x_8, x_158); +lean_object* x_174; lean_object* x_175; lean_object* x_176; lean_object* x_177; lean_object* x_178; lean_object* x_179; lean_object* x_180; lean_object* x_181; lean_object* x_182; +x_174 = lean_ctor_get(x_173, 0); +lean_inc(x_174); +x_175 = lean_ctor_get(x_173, 1); +lean_inc(x_175); +lean_dec(x_173); +x_176 = lean_ctor_get(x_174, 0); +lean_inc(x_176); +x_177 = lean_ctor_get(x_174, 1); +lean_inc(x_177); +lean_dec(x_174); +x_178 = l_Array_umapMAux___main___at___private_Init_Lean_Meta_Tactic_Cases_8__unifyEqsAux___main___spec__7(x_176, x_20, x_4); +x_179 = l_Lean_Meta_FVarSubst_compose(x_176, x_5); +x_180 = lean_alloc_ctor(0, 3, 0); +lean_ctor_set(x_180, 0, x_177); +lean_ctor_set(x_180, 1, x_178); +lean_ctor_set(x_180, 2, x_179); +x_181 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_181, 0, x_180); +lean_ctor_set(x_181, 1, x_6); +x_182 = l___private_Init_Lean_Meta_Tactic_Cases_8__unifyEqsAux___main(x_3, x_181, x_8, x_175); lean_dec(x_8); -return x_165; +return x_182; } else { -uint8_t x_166; +uint8_t x_183; lean_dec(x_8); +lean_dec(x_6); +lean_dec(x_5); lean_dec(x_4); -lean_dec(x_3); -lean_dec(x_2); -x_166 = !lean_is_exclusive(x_156); -if (x_166 == 0) +x_183 = !lean_is_exclusive(x_173); +if (x_183 == 0) { -return x_156; +return x_173; } else { -lean_object* x_167; lean_object* x_168; lean_object* x_169; -x_167 = lean_ctor_get(x_156, 0); -x_168 = lean_ctor_get(x_156, 1); -lean_inc(x_168); -lean_inc(x_167); -lean_dec(x_156); -x_169 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_169, 0, x_167); -lean_ctor_set(x_169, 1, x_168); -return x_169; +lean_object* x_184; lean_object* x_185; lean_object* x_186; +x_184 = lean_ctor_get(x_173, 0); +x_185 = lean_ctor_get(x_173, 1); +lean_inc(x_185); +lean_inc(x_184); +lean_dec(x_173); +x_186 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_186, 0, x_184); +lean_ctor_set(x_186, 1, x_185); +return x_186; } } } case 6: { -uint8_t x_170; uint8_t x_171; lean_object* x_172; -lean_dec(x_29); -lean_dec(x_25); -x_170 = 0; -x_171 = 1; -x_172 = l_Lean_Meta_substCore(x_1, x_5, x_170, x_171, x_8, x_32); -if (lean_obj_tag(x_172) == 0) +uint8_t x_187; uint8_t x_188; lean_object* x_189; +lean_dec(x_38); +lean_dec(x_35); +x_187 = 0; +x_188 = 1; +x_189 = l_Lean_Meta_substCore(x_1, x_2, x_187, x_188, x_8, x_39); +if (lean_obj_tag(x_189) == 0) { -lean_object* x_173; lean_object* x_174; lean_object* x_175; lean_object* x_176; lean_object* x_177; lean_object* x_178; lean_object* x_179; lean_object* x_180; lean_object* x_181; -x_173 = lean_ctor_get(x_172, 0); -lean_inc(x_173); -x_174 = lean_ctor_get(x_172, 1); -lean_inc(x_174); -lean_dec(x_172); -x_175 = lean_ctor_get(x_173, 0); -lean_inc(x_175); -x_176 = lean_ctor_get(x_173, 1); -lean_inc(x_176); -lean_dec(x_173); -x_177 = l_Array_umapMAux___main___at___private_Init_Lean_Meta_Tactic_Cases_8__unifyEqsAux___main___spec__8(x_175, x_20, x_2); -x_178 = l_Lean_Meta_FVarSubst_compose(x_175, x_3); -x_179 = lean_alloc_ctor(0, 3, 0); -lean_ctor_set(x_179, 0, x_176); -lean_ctor_set(x_179, 1, x_177); -lean_ctor_set(x_179, 2, x_178); -x_180 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_180, 0, x_179); -lean_ctor_set(x_180, 1, x_4); -x_181 = l___private_Init_Lean_Meta_Tactic_Cases_8__unifyEqsAux___main(x_6, x_180, x_8, x_174); +lean_object* x_190; lean_object* x_191; lean_object* x_192; lean_object* x_193; lean_object* x_194; lean_object* x_195; lean_object* x_196; lean_object* x_197; lean_object* x_198; +x_190 = lean_ctor_get(x_189, 0); +lean_inc(x_190); +x_191 = lean_ctor_get(x_189, 1); +lean_inc(x_191); +lean_dec(x_189); +x_192 = lean_ctor_get(x_190, 0); +lean_inc(x_192); +x_193 = lean_ctor_get(x_190, 1); +lean_inc(x_193); +lean_dec(x_190); +x_194 = l_Array_umapMAux___main___at___private_Init_Lean_Meta_Tactic_Cases_8__unifyEqsAux___main___spec__8(x_192, x_20, x_4); +x_195 = l_Lean_Meta_FVarSubst_compose(x_192, x_5); +x_196 = lean_alloc_ctor(0, 3, 0); +lean_ctor_set(x_196, 0, x_193); +lean_ctor_set(x_196, 1, x_194); +lean_ctor_set(x_196, 2, x_195); +x_197 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_197, 0, x_196); +lean_ctor_set(x_197, 1, x_6); +x_198 = l___private_Init_Lean_Meta_Tactic_Cases_8__unifyEqsAux___main(x_3, x_197, x_8, x_191); lean_dec(x_8); -return x_181; +return x_198; } else { -uint8_t x_182; +uint8_t x_199; lean_dec(x_8); +lean_dec(x_6); +lean_dec(x_5); lean_dec(x_4); -lean_dec(x_3); -lean_dec(x_2); -x_182 = !lean_is_exclusive(x_172); -if (x_182 == 0) +x_199 = !lean_is_exclusive(x_189); +if (x_199 == 0) { -return x_172; +return x_189; } else { -lean_object* x_183; lean_object* x_184; lean_object* x_185; -x_183 = lean_ctor_get(x_172, 0); -x_184 = lean_ctor_get(x_172, 1); -lean_inc(x_184); -lean_inc(x_183); -lean_dec(x_172); -x_185 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_185, 0, x_183); -lean_ctor_set(x_185, 1, x_184); -return x_185; +lean_object* x_200; lean_object* x_201; lean_object* x_202; +x_200 = lean_ctor_get(x_189, 0); +x_201 = lean_ctor_get(x_189, 1); +lean_inc(x_201); +lean_inc(x_200); +lean_dec(x_189); +x_202 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_202, 0, x_200); +lean_ctor_set(x_202, 1, x_201); +return x_202; } } } case 7: { -uint8_t x_186; uint8_t x_187; lean_object* x_188; -lean_dec(x_29); -lean_dec(x_25); -x_186 = 0; -x_187 = 1; -x_188 = l_Lean_Meta_substCore(x_1, x_5, x_186, x_187, x_8, x_32); -if (lean_obj_tag(x_188) == 0) +uint8_t x_203; uint8_t x_204; lean_object* x_205; +lean_dec(x_38); +lean_dec(x_35); +x_203 = 0; +x_204 = 1; +x_205 = l_Lean_Meta_substCore(x_1, x_2, x_203, x_204, x_8, x_39); +if (lean_obj_tag(x_205) == 0) { -lean_object* x_189; lean_object* x_190; lean_object* x_191; lean_object* x_192; lean_object* x_193; lean_object* x_194; lean_object* x_195; lean_object* x_196; lean_object* x_197; -x_189 = lean_ctor_get(x_188, 0); -lean_inc(x_189); -x_190 = lean_ctor_get(x_188, 1); -lean_inc(x_190); -lean_dec(x_188); -x_191 = lean_ctor_get(x_189, 0); -lean_inc(x_191); -x_192 = lean_ctor_get(x_189, 1); -lean_inc(x_192); -lean_dec(x_189); -x_193 = l_Array_umapMAux___main___at___private_Init_Lean_Meta_Tactic_Cases_8__unifyEqsAux___main___spec__9(x_191, x_20, x_2); -x_194 = l_Lean_Meta_FVarSubst_compose(x_191, x_3); -x_195 = lean_alloc_ctor(0, 3, 0); -lean_ctor_set(x_195, 0, x_192); -lean_ctor_set(x_195, 1, x_193); -lean_ctor_set(x_195, 2, x_194); -x_196 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_196, 0, x_195); -lean_ctor_set(x_196, 1, x_4); -x_197 = l___private_Init_Lean_Meta_Tactic_Cases_8__unifyEqsAux___main(x_6, x_196, x_8, x_190); +lean_object* x_206; lean_object* x_207; lean_object* x_208; lean_object* x_209; lean_object* x_210; lean_object* x_211; lean_object* x_212; lean_object* x_213; lean_object* x_214; +x_206 = lean_ctor_get(x_205, 0); +lean_inc(x_206); +x_207 = lean_ctor_get(x_205, 1); +lean_inc(x_207); +lean_dec(x_205); +x_208 = lean_ctor_get(x_206, 0); +lean_inc(x_208); +x_209 = lean_ctor_get(x_206, 1); +lean_inc(x_209); +lean_dec(x_206); +x_210 = l_Array_umapMAux___main___at___private_Init_Lean_Meta_Tactic_Cases_8__unifyEqsAux___main___spec__9(x_208, x_20, x_4); +x_211 = l_Lean_Meta_FVarSubst_compose(x_208, x_5); +x_212 = lean_alloc_ctor(0, 3, 0); +lean_ctor_set(x_212, 0, x_209); +lean_ctor_set(x_212, 1, x_210); +lean_ctor_set(x_212, 2, x_211); +x_213 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_213, 0, x_212); +lean_ctor_set(x_213, 1, x_6); +x_214 = l___private_Init_Lean_Meta_Tactic_Cases_8__unifyEqsAux___main(x_3, x_213, x_8, x_207); lean_dec(x_8); -return x_197; +return x_214; } else { -uint8_t x_198; +uint8_t x_215; lean_dec(x_8); +lean_dec(x_6); +lean_dec(x_5); lean_dec(x_4); -lean_dec(x_3); -lean_dec(x_2); -x_198 = !lean_is_exclusive(x_188); -if (x_198 == 0) +x_215 = !lean_is_exclusive(x_205); +if (x_215 == 0) { -return x_188; +return x_205; } else { -lean_object* x_199; lean_object* x_200; lean_object* x_201; -x_199 = lean_ctor_get(x_188, 0); -x_200 = lean_ctor_get(x_188, 1); -lean_inc(x_200); -lean_inc(x_199); -lean_dec(x_188); -x_201 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_201, 0, x_199); -lean_ctor_set(x_201, 1, x_200); -return x_201; +lean_object* x_216; lean_object* x_217; lean_object* x_218; +x_216 = lean_ctor_get(x_205, 0); +x_217 = lean_ctor_get(x_205, 1); +lean_inc(x_217); +lean_inc(x_216); +lean_dec(x_205); +x_218 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_218, 0, x_216); +lean_ctor_set(x_218, 1, x_217); +return x_218; } } } case 8: { -uint8_t x_202; uint8_t x_203; lean_object* x_204; -lean_dec(x_29); -lean_dec(x_25); -x_202 = 0; -x_203 = 1; -x_204 = l_Lean_Meta_substCore(x_1, x_5, x_202, x_203, x_8, x_32); -if (lean_obj_tag(x_204) == 0) +uint8_t x_219; uint8_t x_220; lean_object* x_221; +lean_dec(x_38); +lean_dec(x_35); +x_219 = 0; +x_220 = 1; +x_221 = l_Lean_Meta_substCore(x_1, x_2, x_219, x_220, x_8, x_39); +if (lean_obj_tag(x_221) == 0) { -lean_object* x_205; lean_object* x_206; lean_object* x_207; lean_object* x_208; lean_object* x_209; lean_object* x_210; lean_object* x_211; lean_object* x_212; lean_object* x_213; -x_205 = lean_ctor_get(x_204, 0); -lean_inc(x_205); -x_206 = lean_ctor_get(x_204, 1); -lean_inc(x_206); -lean_dec(x_204); -x_207 = lean_ctor_get(x_205, 0); -lean_inc(x_207); -x_208 = lean_ctor_get(x_205, 1); -lean_inc(x_208); -lean_dec(x_205); -x_209 = l_Array_umapMAux___main___at___private_Init_Lean_Meta_Tactic_Cases_8__unifyEqsAux___main___spec__10(x_207, x_20, x_2); -x_210 = l_Lean_Meta_FVarSubst_compose(x_207, x_3); -x_211 = lean_alloc_ctor(0, 3, 0); -lean_ctor_set(x_211, 0, x_208); -lean_ctor_set(x_211, 1, x_209); -lean_ctor_set(x_211, 2, x_210); -x_212 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_212, 0, x_211); -lean_ctor_set(x_212, 1, x_4); -x_213 = l___private_Init_Lean_Meta_Tactic_Cases_8__unifyEqsAux___main(x_6, x_212, x_8, x_206); +lean_object* x_222; lean_object* x_223; lean_object* x_224; lean_object* x_225; lean_object* x_226; lean_object* x_227; lean_object* x_228; lean_object* x_229; lean_object* x_230; +x_222 = lean_ctor_get(x_221, 0); +lean_inc(x_222); +x_223 = lean_ctor_get(x_221, 1); +lean_inc(x_223); +lean_dec(x_221); +x_224 = lean_ctor_get(x_222, 0); +lean_inc(x_224); +x_225 = lean_ctor_get(x_222, 1); +lean_inc(x_225); +lean_dec(x_222); +x_226 = l_Array_umapMAux___main___at___private_Init_Lean_Meta_Tactic_Cases_8__unifyEqsAux___main___spec__10(x_224, x_20, x_4); +x_227 = l_Lean_Meta_FVarSubst_compose(x_224, x_5); +x_228 = lean_alloc_ctor(0, 3, 0); +lean_ctor_set(x_228, 0, x_225); +lean_ctor_set(x_228, 1, x_226); +lean_ctor_set(x_228, 2, x_227); +x_229 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_229, 0, x_228); +lean_ctor_set(x_229, 1, x_6); +x_230 = l___private_Init_Lean_Meta_Tactic_Cases_8__unifyEqsAux___main(x_3, x_229, x_8, x_223); lean_dec(x_8); -return x_213; +return x_230; } else { -uint8_t x_214; +uint8_t x_231; lean_dec(x_8); +lean_dec(x_6); +lean_dec(x_5); lean_dec(x_4); -lean_dec(x_3); -lean_dec(x_2); -x_214 = !lean_is_exclusive(x_204); -if (x_214 == 0) +x_231 = !lean_is_exclusive(x_221); +if (x_231 == 0) { -return x_204; +return x_221; } else { -lean_object* x_215; lean_object* x_216; lean_object* x_217; -x_215 = lean_ctor_get(x_204, 0); -x_216 = lean_ctor_get(x_204, 1); -lean_inc(x_216); -lean_inc(x_215); -lean_dec(x_204); -x_217 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_217, 0, x_215); -lean_ctor_set(x_217, 1, x_216); -return x_217; +lean_object* x_232; lean_object* x_233; lean_object* x_234; +x_232 = lean_ctor_get(x_221, 0); +x_233 = lean_ctor_get(x_221, 1); +lean_inc(x_233); +lean_inc(x_232); +lean_dec(x_221); +x_234 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_234, 0, x_232); +lean_ctor_set(x_234, 1, x_233); +return x_234; } } } case 9: { -uint8_t x_218; uint8_t x_219; lean_object* x_220; -lean_dec(x_29); -lean_dec(x_25); -x_218 = 0; -x_219 = 1; -x_220 = l_Lean_Meta_substCore(x_1, x_5, x_218, x_219, x_8, x_32); -if (lean_obj_tag(x_220) == 0) +uint8_t x_235; uint8_t x_236; lean_object* x_237; +lean_dec(x_38); +lean_dec(x_35); +x_235 = 0; +x_236 = 1; +x_237 = l_Lean_Meta_substCore(x_1, x_2, x_235, x_236, x_8, x_39); +if (lean_obj_tag(x_237) == 0) { -lean_object* x_221; lean_object* x_222; lean_object* x_223; lean_object* x_224; lean_object* x_225; lean_object* x_226; lean_object* x_227; lean_object* x_228; lean_object* x_229; -x_221 = lean_ctor_get(x_220, 0); -lean_inc(x_221); -x_222 = lean_ctor_get(x_220, 1); -lean_inc(x_222); -lean_dec(x_220); -x_223 = lean_ctor_get(x_221, 0); -lean_inc(x_223); -x_224 = lean_ctor_get(x_221, 1); -lean_inc(x_224); -lean_dec(x_221); -x_225 = l_Array_umapMAux___main___at___private_Init_Lean_Meta_Tactic_Cases_8__unifyEqsAux___main___spec__11(x_223, x_20, x_2); -x_226 = l_Lean_Meta_FVarSubst_compose(x_223, x_3); -x_227 = lean_alloc_ctor(0, 3, 0); -lean_ctor_set(x_227, 0, x_224); -lean_ctor_set(x_227, 1, x_225); -lean_ctor_set(x_227, 2, x_226); -x_228 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_228, 0, x_227); -lean_ctor_set(x_228, 1, x_4); -x_229 = l___private_Init_Lean_Meta_Tactic_Cases_8__unifyEqsAux___main(x_6, x_228, x_8, x_222); +lean_object* x_238; lean_object* x_239; lean_object* x_240; lean_object* x_241; lean_object* x_242; lean_object* x_243; lean_object* x_244; lean_object* x_245; lean_object* x_246; +x_238 = lean_ctor_get(x_237, 0); +lean_inc(x_238); +x_239 = lean_ctor_get(x_237, 1); +lean_inc(x_239); +lean_dec(x_237); +x_240 = lean_ctor_get(x_238, 0); +lean_inc(x_240); +x_241 = lean_ctor_get(x_238, 1); +lean_inc(x_241); +lean_dec(x_238); +x_242 = l_Array_umapMAux___main___at___private_Init_Lean_Meta_Tactic_Cases_8__unifyEqsAux___main___spec__11(x_240, x_20, x_4); +x_243 = l_Lean_Meta_FVarSubst_compose(x_240, x_5); +x_244 = lean_alloc_ctor(0, 3, 0); +lean_ctor_set(x_244, 0, x_241); +lean_ctor_set(x_244, 1, x_242); +lean_ctor_set(x_244, 2, x_243); +x_245 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_245, 0, x_244); +lean_ctor_set(x_245, 1, x_6); +x_246 = l___private_Init_Lean_Meta_Tactic_Cases_8__unifyEqsAux___main(x_3, x_245, x_8, x_239); lean_dec(x_8); -return x_229; +return x_246; } else { -uint8_t x_230; +uint8_t x_247; lean_dec(x_8); +lean_dec(x_6); +lean_dec(x_5); lean_dec(x_4); -lean_dec(x_3); -lean_dec(x_2); -x_230 = !lean_is_exclusive(x_220); -if (x_230 == 0) +x_247 = !lean_is_exclusive(x_237); +if (x_247 == 0) { -return x_220; +return x_237; } else { -lean_object* x_231; lean_object* x_232; lean_object* x_233; -x_231 = lean_ctor_get(x_220, 0); -x_232 = lean_ctor_get(x_220, 1); -lean_inc(x_232); -lean_inc(x_231); -lean_dec(x_220); -x_233 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_233, 0, x_231); -lean_ctor_set(x_233, 1, x_232); -return x_233; +lean_object* x_248; lean_object* x_249; lean_object* x_250; +x_248 = lean_ctor_get(x_237, 0); +x_249 = lean_ctor_get(x_237, 1); +lean_inc(x_249); +lean_inc(x_248); +lean_dec(x_237); +x_250 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_250, 0, x_248); +lean_ctor_set(x_250, 1, x_249); +return x_250; } } } case 10: { -uint8_t x_234; uint8_t x_235; lean_object* x_236; -lean_dec(x_29); -lean_dec(x_25); -x_234 = 0; -x_235 = 1; -x_236 = l_Lean_Meta_substCore(x_1, x_5, x_234, x_235, x_8, x_32); -if (lean_obj_tag(x_236) == 0) +uint8_t x_251; uint8_t x_252; lean_object* x_253; +lean_dec(x_38); +lean_dec(x_35); +x_251 = 0; +x_252 = 1; +x_253 = l_Lean_Meta_substCore(x_1, x_2, x_251, x_252, x_8, x_39); +if (lean_obj_tag(x_253) == 0) { -lean_object* x_237; lean_object* x_238; lean_object* x_239; lean_object* x_240; lean_object* x_241; lean_object* x_242; lean_object* x_243; lean_object* x_244; lean_object* x_245; -x_237 = lean_ctor_get(x_236, 0); -lean_inc(x_237); -x_238 = lean_ctor_get(x_236, 1); -lean_inc(x_238); -lean_dec(x_236); -x_239 = lean_ctor_get(x_237, 0); -lean_inc(x_239); -x_240 = lean_ctor_get(x_237, 1); -lean_inc(x_240); -lean_dec(x_237); -x_241 = l_Array_umapMAux___main___at___private_Init_Lean_Meta_Tactic_Cases_8__unifyEqsAux___main___spec__12(x_239, x_20, x_2); -x_242 = l_Lean_Meta_FVarSubst_compose(x_239, x_3); -x_243 = lean_alloc_ctor(0, 3, 0); -lean_ctor_set(x_243, 0, x_240); -lean_ctor_set(x_243, 1, x_241); -lean_ctor_set(x_243, 2, x_242); -x_244 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_244, 0, x_243); -lean_ctor_set(x_244, 1, x_4); -x_245 = l___private_Init_Lean_Meta_Tactic_Cases_8__unifyEqsAux___main(x_6, x_244, x_8, x_238); +lean_object* x_254; lean_object* x_255; lean_object* x_256; lean_object* x_257; lean_object* x_258; lean_object* x_259; lean_object* x_260; lean_object* x_261; lean_object* x_262; +x_254 = lean_ctor_get(x_253, 0); +lean_inc(x_254); +x_255 = lean_ctor_get(x_253, 1); +lean_inc(x_255); +lean_dec(x_253); +x_256 = lean_ctor_get(x_254, 0); +lean_inc(x_256); +x_257 = lean_ctor_get(x_254, 1); +lean_inc(x_257); +lean_dec(x_254); +x_258 = l_Array_umapMAux___main___at___private_Init_Lean_Meta_Tactic_Cases_8__unifyEqsAux___main___spec__12(x_256, x_20, x_4); +x_259 = l_Lean_Meta_FVarSubst_compose(x_256, x_5); +x_260 = lean_alloc_ctor(0, 3, 0); +lean_ctor_set(x_260, 0, x_257); +lean_ctor_set(x_260, 1, x_258); +lean_ctor_set(x_260, 2, x_259); +x_261 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_261, 0, x_260); +lean_ctor_set(x_261, 1, x_6); +x_262 = l___private_Init_Lean_Meta_Tactic_Cases_8__unifyEqsAux___main(x_3, x_261, x_8, x_255); lean_dec(x_8); -return x_245; +return x_262; } else { -uint8_t x_246; +uint8_t x_263; lean_dec(x_8); +lean_dec(x_6); +lean_dec(x_5); lean_dec(x_4); -lean_dec(x_3); -lean_dec(x_2); -x_246 = !lean_is_exclusive(x_236); -if (x_246 == 0) +x_263 = !lean_is_exclusive(x_253); +if (x_263 == 0) { -return x_236; +return x_253; } else { -lean_object* x_247; lean_object* x_248; lean_object* x_249; -x_247 = lean_ctor_get(x_236, 0); -x_248 = lean_ctor_get(x_236, 1); -lean_inc(x_248); -lean_inc(x_247); -lean_dec(x_236); -x_249 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_249, 0, x_247); -lean_ctor_set(x_249, 1, x_248); -return x_249; +lean_object* x_264; lean_object* x_265; lean_object* x_266; +x_264 = lean_ctor_get(x_253, 0); +x_265 = lean_ctor_get(x_253, 1); +lean_inc(x_265); +lean_inc(x_264); +lean_dec(x_253); +x_266 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_266, 0, x_264); +lean_ctor_set(x_266, 1, x_265); +return x_266; } } } case 11: { -uint8_t x_250; uint8_t x_251; lean_object* x_252; -lean_dec(x_29); -lean_dec(x_25); -x_250 = 0; -x_251 = 1; -x_252 = l_Lean_Meta_substCore(x_1, x_5, x_250, x_251, x_8, x_32); -if (lean_obj_tag(x_252) == 0) +uint8_t x_267; uint8_t x_268; lean_object* x_269; +lean_dec(x_38); +lean_dec(x_35); +x_267 = 0; +x_268 = 1; +x_269 = l_Lean_Meta_substCore(x_1, x_2, x_267, x_268, x_8, x_39); +if (lean_obj_tag(x_269) == 0) { -lean_object* x_253; lean_object* x_254; lean_object* x_255; lean_object* x_256; lean_object* x_257; lean_object* x_258; lean_object* x_259; lean_object* x_260; lean_object* x_261; -x_253 = lean_ctor_get(x_252, 0); -lean_inc(x_253); -x_254 = lean_ctor_get(x_252, 1); -lean_inc(x_254); -lean_dec(x_252); -x_255 = lean_ctor_get(x_253, 0); -lean_inc(x_255); -x_256 = lean_ctor_get(x_253, 1); -lean_inc(x_256); -lean_dec(x_253); -x_257 = l_Array_umapMAux___main___at___private_Init_Lean_Meta_Tactic_Cases_8__unifyEqsAux___main___spec__13(x_255, x_20, x_2); -x_258 = l_Lean_Meta_FVarSubst_compose(x_255, x_3); -x_259 = lean_alloc_ctor(0, 3, 0); -lean_ctor_set(x_259, 0, x_256); -lean_ctor_set(x_259, 1, x_257); -lean_ctor_set(x_259, 2, x_258); -x_260 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_260, 0, x_259); -lean_ctor_set(x_260, 1, x_4); -x_261 = l___private_Init_Lean_Meta_Tactic_Cases_8__unifyEqsAux___main(x_6, x_260, x_8, x_254); +lean_object* x_270; lean_object* x_271; lean_object* x_272; lean_object* x_273; lean_object* x_274; lean_object* x_275; lean_object* x_276; lean_object* x_277; lean_object* x_278; +x_270 = lean_ctor_get(x_269, 0); +lean_inc(x_270); +x_271 = lean_ctor_get(x_269, 1); +lean_inc(x_271); +lean_dec(x_269); +x_272 = lean_ctor_get(x_270, 0); +lean_inc(x_272); +x_273 = lean_ctor_get(x_270, 1); +lean_inc(x_273); +lean_dec(x_270); +x_274 = l_Array_umapMAux___main___at___private_Init_Lean_Meta_Tactic_Cases_8__unifyEqsAux___main___spec__13(x_272, x_20, x_4); +x_275 = l_Lean_Meta_FVarSubst_compose(x_272, x_5); +x_276 = lean_alloc_ctor(0, 3, 0); +lean_ctor_set(x_276, 0, x_273); +lean_ctor_set(x_276, 1, x_274); +lean_ctor_set(x_276, 2, x_275); +x_277 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_277, 0, x_276); +lean_ctor_set(x_277, 1, x_6); +x_278 = l___private_Init_Lean_Meta_Tactic_Cases_8__unifyEqsAux___main(x_3, x_277, x_8, x_271); lean_dec(x_8); -return x_261; +return x_278; } else { -uint8_t x_262; +uint8_t x_279; lean_dec(x_8); +lean_dec(x_6); +lean_dec(x_5); lean_dec(x_4); -lean_dec(x_3); -lean_dec(x_2); -x_262 = !lean_is_exclusive(x_252); -if (x_262 == 0) +x_279 = !lean_is_exclusive(x_269); +if (x_279 == 0) { -return x_252; +return x_269; } else { -lean_object* x_263; lean_object* x_264; lean_object* x_265; -x_263 = lean_ctor_get(x_252, 0); -x_264 = lean_ctor_get(x_252, 1); -lean_inc(x_264); -lean_inc(x_263); -lean_dec(x_252); -x_265 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_265, 0, x_263); -lean_ctor_set(x_265, 1, x_264); -return x_265; +lean_object* x_280; lean_object* x_281; lean_object* x_282; +x_280 = lean_ctor_get(x_269, 0); +x_281 = lean_ctor_get(x_269, 1); +lean_inc(x_281); +lean_inc(x_280); +lean_dec(x_269); +x_282 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_282, 0, x_280); +lean_ctor_set(x_282, 1, x_281); +return x_282; } } } default: { -uint8_t x_266; uint8_t x_267; lean_object* x_268; -lean_dec(x_29); -lean_dec(x_25); -x_266 = 0; -x_267 = 1; -x_268 = l_Lean_Meta_substCore(x_1, x_5, x_266, x_267, x_8, x_32); -if (lean_obj_tag(x_268) == 0) +uint8_t x_283; uint8_t x_284; lean_object* x_285; +lean_dec(x_38); +lean_dec(x_35); +x_283 = 0; +x_284 = 1; +x_285 = l_Lean_Meta_substCore(x_1, x_2, x_283, x_284, x_8, x_39); +if (lean_obj_tag(x_285) == 0) { -lean_object* x_269; lean_object* x_270; lean_object* x_271; lean_object* x_272; lean_object* x_273; lean_object* x_274; lean_object* x_275; lean_object* x_276; lean_object* x_277; -x_269 = lean_ctor_get(x_268, 0); -lean_inc(x_269); -x_270 = lean_ctor_get(x_268, 1); -lean_inc(x_270); -lean_dec(x_268); -x_271 = lean_ctor_get(x_269, 0); -lean_inc(x_271); -x_272 = lean_ctor_get(x_269, 1); -lean_inc(x_272); -lean_dec(x_269); -x_273 = l_Array_umapMAux___main___at___private_Init_Lean_Meta_Tactic_Cases_8__unifyEqsAux___main___spec__14(x_271, x_20, x_2); -x_274 = l_Lean_Meta_FVarSubst_compose(x_271, x_3); -x_275 = lean_alloc_ctor(0, 3, 0); -lean_ctor_set(x_275, 0, x_272); -lean_ctor_set(x_275, 1, x_273); -lean_ctor_set(x_275, 2, x_274); -x_276 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_276, 0, x_275); -lean_ctor_set(x_276, 1, x_4); -x_277 = l___private_Init_Lean_Meta_Tactic_Cases_8__unifyEqsAux___main(x_6, x_276, x_8, x_270); +lean_object* x_286; lean_object* x_287; lean_object* x_288; lean_object* x_289; lean_object* x_290; lean_object* x_291; lean_object* x_292; lean_object* x_293; lean_object* x_294; +x_286 = lean_ctor_get(x_285, 0); +lean_inc(x_286); +x_287 = lean_ctor_get(x_285, 1); +lean_inc(x_287); +lean_dec(x_285); +x_288 = lean_ctor_get(x_286, 0); +lean_inc(x_288); +x_289 = lean_ctor_get(x_286, 1); +lean_inc(x_289); +lean_dec(x_286); +x_290 = l_Array_umapMAux___main___at___private_Init_Lean_Meta_Tactic_Cases_8__unifyEqsAux___main___spec__14(x_288, x_20, x_4); +x_291 = l_Lean_Meta_FVarSubst_compose(x_288, x_5); +x_292 = lean_alloc_ctor(0, 3, 0); +lean_ctor_set(x_292, 0, x_289); +lean_ctor_set(x_292, 1, x_290); +lean_ctor_set(x_292, 2, x_291); +x_293 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_293, 0, x_292); +lean_ctor_set(x_293, 1, x_6); +x_294 = l___private_Init_Lean_Meta_Tactic_Cases_8__unifyEqsAux___main(x_3, x_293, x_8, x_287); lean_dec(x_8); -return x_277; +return x_294; } else { -uint8_t x_278; +uint8_t x_295; lean_dec(x_8); +lean_dec(x_6); +lean_dec(x_5); lean_dec(x_4); -lean_dec(x_3); -lean_dec(x_2); -x_278 = !lean_is_exclusive(x_268); -if (x_278 == 0) +x_295 = !lean_is_exclusive(x_285); +if (x_295 == 0) { -return x_268; +return x_285; } else { -lean_object* x_279; lean_object* x_280; lean_object* x_281; -x_279 = lean_ctor_get(x_268, 0); -x_280 = lean_ctor_get(x_268, 1); -lean_inc(x_280); -lean_inc(x_279); -lean_dec(x_268); -x_281 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_281, 0, x_279); -lean_ctor_set(x_281, 1, x_280); -return x_281; +lean_object* x_296; lean_object* x_297; lean_object* x_298; +x_296 = lean_ctor_get(x_285, 0); +x_297 = lean_ctor_get(x_285, 1); +lean_inc(x_297); +lean_inc(x_296); +lean_dec(x_285); +x_298 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_298, 0, x_296); +lean_ctor_set(x_298, 1, x_297); +return x_298; } } } @@ -12125,99 +12117,22 @@ return x_281; } else { -lean_object* x_282; -lean_dec(x_25); -x_282 = lean_box(0); -x_40 = x_282; -goto block_58; +lean_object* x_299; +lean_dec(x_35); +x_299 = lean_box(0); +x_40 = x_299; +goto block_76; } -} -else -{ -lean_object* x_283; -lean_dec(x_33); -lean_dec(x_29); -lean_dec(x_25); -x_283 = l_Lean_Meta_clear(x_1, x_5, x_8, x_32); -if (lean_obj_tag(x_283) == 0) -{ -lean_object* x_284; lean_object* x_285; lean_object* x_286; lean_object* x_287; lean_object* x_288; -x_284 = lean_ctor_get(x_283, 0); -lean_inc(x_284); -x_285 = lean_ctor_get(x_283, 1); -lean_inc(x_285); -lean_dec(x_283); -x_286 = lean_alloc_ctor(0, 3, 0); -lean_ctor_set(x_286, 0, x_284); -lean_ctor_set(x_286, 1, x_2); -lean_ctor_set(x_286, 2, x_3); -x_287 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_287, 0, x_286); -lean_ctor_set(x_287, 1, x_4); -x_288 = l___private_Init_Lean_Meta_Tactic_Cases_8__unifyEqsAux___main(x_6, x_287, x_8, x_285); -lean_dec(x_8); -return x_288; -} -else -{ -uint8_t x_289; -lean_dec(x_8); -lean_dec(x_4); -lean_dec(x_3); -lean_dec(x_2); -x_289 = !lean_is_exclusive(x_283); -if (x_289 == 0) -{ -return x_283; -} -else -{ -lean_object* x_290; lean_object* x_291; lean_object* x_292; -x_290 = lean_ctor_get(x_283, 0); -x_291 = lean_ctor_get(x_283, 1); -lean_inc(x_291); -lean_inc(x_290); -lean_dec(x_283); -x_292 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_292, 0, x_290); -lean_ctor_set(x_292, 1, x_291); -return x_292; -} -} -} -block_39: -{ -lean_object* x_35; lean_object* x_36; lean_object* x_37; lean_object* x_38; -lean_dec(x_34); -x_35 = lean_alloc_ctor(0, 3, 0); -lean_ctor_set(x_35, 0, x_1); -lean_ctor_set(x_35, 1, x_2); -lean_ctor_set(x_35, 2, x_3); -x_36 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_36, 0, x_35); -lean_ctor_set(x_36, 1, x_4); -x_37 = lean_alloc_ctor(1, 1, 0); -lean_ctor_set(x_37, 0, x_36); -if (lean_is_scalar(x_33)) { - x_38 = lean_alloc_ctor(0, 2, 0); -} else { - x_38 = x_33; -} -lean_ctor_set(x_38, 0, x_37); -lean_ctor_set(x_38, 1, x_32); -return x_38; -} -block_58: +block_76: { lean_dec(x_40); -if (lean_obj_tag(x_29) == 1) +if (lean_obj_tag(x_38) == 1) { uint8_t x_41; uint8_t x_42; lean_object* x_43; -lean_dec(x_33); -lean_dec(x_29); +lean_dec(x_38); x_41 = 0; x_42 = 1; -x_43 = l_Lean_Meta_substCore(x_1, x_5, x_41, x_42, x_8, x_32); +x_43 = l_Lean_Meta_substCore(x_1, x_2, x_41, x_42, x_8, x_39); if (lean_obj_tag(x_43) == 0) { 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; @@ -12231,16 +12146,16 @@ lean_inc(x_46); x_47 = lean_ctor_get(x_44, 1); lean_inc(x_47); lean_dec(x_44); -x_48 = l_Array_umapMAux___main___at___private_Init_Lean_Meta_Tactic_Cases_8__unifyEqsAux___main___spec__1(x_46, x_20, x_2); -x_49 = l_Lean_Meta_FVarSubst_compose(x_46, x_3); +x_48 = l_Array_umapMAux___main___at___private_Init_Lean_Meta_Tactic_Cases_8__unifyEqsAux___main___spec__1(x_46, x_20, x_4); +x_49 = l_Lean_Meta_FVarSubst_compose(x_46, x_5); x_50 = lean_alloc_ctor(0, 3, 0); lean_ctor_set(x_50, 0, x_47); lean_ctor_set(x_50, 1, x_48); lean_ctor_set(x_50, 2, 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_4); -x_52 = l___private_Init_Lean_Meta_Tactic_Cases_8__unifyEqsAux___main(x_6, x_51, x_8, x_45); +lean_ctor_set(x_51, 1, x_6); +x_52 = l___private_Init_Lean_Meta_Tactic_Cases_8__unifyEqsAux___main(x_3, x_51, x_8, x_45); lean_dec(x_8); return x_52; } @@ -12248,9 +12163,9 @@ else { uint8_t x_53; lean_dec(x_8); +lean_dec(x_6); +lean_dec(x_5); lean_dec(x_4); -lean_dec(x_3); -lean_dec(x_2); x_53 = !lean_is_exclusive(x_43); if (x_53 == 0) { @@ -12274,230 +12189,429 @@ return x_56; else { lean_object* x_57; -lean_dec(x_29); +lean_dec(x_38); +x_57 = l_Lean_Meta_injectionCore(x_1, x_2, x_8, x_39); +if (lean_obj_tag(x_57) == 0) +{ +lean_object* x_58; +x_58 = lean_ctor_get(x_57, 0); +lean_inc(x_58); +if (lean_obj_tag(x_58) == 0) +{ +uint8_t x_59; lean_dec(x_8); +lean_dec(x_6); lean_dec(x_5); -x_57 = lean_box(0); -x_34 = x_57; -goto block_39; +lean_dec(x_4); +x_59 = !lean_is_exclusive(x_57); +if (x_59 == 0) +{ +lean_object* x_60; lean_object* x_61; +x_60 = lean_ctor_get(x_57, 0); +lean_dec(x_60); +x_61 = lean_box(0); +lean_ctor_set(x_57, 0, x_61); +return x_57; +} +else +{ +lean_object* x_62; lean_object* x_63; lean_object* x_64; +x_62 = lean_ctor_get(x_57, 1); +lean_inc(x_62); +lean_dec(x_57); +x_63 = lean_box(0); +x_64 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_64, 0, x_63); +lean_ctor_set(x_64, 1, x_62); +return x_64; +} +} +else +{ +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; +x_65 = lean_ctor_get(x_57, 1); +lean_inc(x_65); +lean_dec(x_57); +x_66 = lean_ctor_get(x_58, 0); +lean_inc(x_66); +x_67 = lean_ctor_get(x_58, 1); +lean_inc(x_67); +lean_dec(x_58); +x_68 = lean_nat_add(x_3, x_67); +lean_dec(x_67); +x_69 = lean_alloc_ctor(0, 3, 0); +lean_ctor_set(x_69, 0, x_66); +lean_ctor_set(x_69, 1, x_4); +lean_ctor_set(x_69, 2, x_5); +x_70 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_70, 0, x_69); +lean_ctor_set(x_70, 1, x_6); +x_71 = l___private_Init_Lean_Meta_Tactic_Cases_8__unifyEqsAux___main(x_68, x_70, x_8, x_65); +lean_dec(x_8); +lean_dec(x_68); +return x_71; +} +} +else +{ +uint8_t x_72; +lean_dec(x_8); +lean_dec(x_6); +lean_dec(x_5); +lean_dec(x_4); +x_72 = !lean_is_exclusive(x_57); +if (x_72 == 0) +{ +return x_57; +} +else +{ +lean_object* x_73; lean_object* x_74; lean_object* x_75; +x_73 = lean_ctor_get(x_57, 0); +x_74 = lean_ctor_get(x_57, 1); +lean_inc(x_74); +lean_inc(x_73); +lean_dec(x_57); +x_75 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_75, 0, x_73); +lean_ctor_set(x_75, 1, x_74); +return x_75; +} +} } } } else { -uint8_t x_293; +uint8_t x_300; +lean_dec(x_35); +lean_dec(x_8); +lean_dec(x_6); +lean_dec(x_5); +lean_dec(x_4); +lean_dec(x_2); +lean_dec(x_1); +x_300 = !lean_is_exclusive(x_37); +if (x_300 == 0) +{ +return x_37; +} +else +{ +lean_object* x_301; lean_object* x_302; lean_object* x_303; +x_301 = lean_ctor_get(x_37, 0); +x_302 = lean_ctor_get(x_37, 1); +lean_inc(x_302); +lean_inc(x_301); +lean_dec(x_37); +x_303 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_303, 0, x_301); +lean_ctor_set(x_303, 1, x_302); +return x_303; +} +} +} +else +{ +uint8_t x_304; +lean_dec(x_29); +lean_dec(x_8); +lean_dec(x_6); +lean_dec(x_5); +lean_dec(x_4); +lean_dec(x_2); +lean_dec(x_1); +x_304 = !lean_is_exclusive(x_34); +if (x_304 == 0) +{ +return x_34; +} +else +{ +lean_object* x_305; lean_object* x_306; lean_object* x_307; +x_305 = lean_ctor_get(x_34, 0); +x_306 = lean_ctor_get(x_34, 1); +lean_inc(x_306); +lean_inc(x_305); +lean_dec(x_34); +x_307 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_307, 0, x_305); +lean_ctor_set(x_307, 1, x_306); +return x_307; +} +} +} +else +{ +lean_object* x_308; lean_object* x_309; +lean_dec(x_29); +lean_dec(x_25); +x_308 = lean_ctor_get(x_30, 1); +lean_inc(x_308); +lean_dec(x_30); +x_309 = l_Lean_Meta_clear(x_1, x_2, x_8, x_308); +if (lean_obj_tag(x_309) == 0) +{ +lean_object* x_310; lean_object* x_311; lean_object* x_312; lean_object* x_313; lean_object* x_314; +x_310 = lean_ctor_get(x_309, 0); +lean_inc(x_310); +x_311 = lean_ctor_get(x_309, 1); +lean_inc(x_311); +lean_dec(x_309); +x_312 = lean_alloc_ctor(0, 3, 0); +lean_ctor_set(x_312, 0, x_310); +lean_ctor_set(x_312, 1, x_4); +lean_ctor_set(x_312, 2, x_5); +x_313 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_313, 0, x_312); +lean_ctor_set(x_313, 1, x_6); +x_314 = l___private_Init_Lean_Meta_Tactic_Cases_8__unifyEqsAux___main(x_3, x_313, x_8, x_311); +lean_dec(x_8); +return x_314; +} +else +{ +uint8_t x_315; +lean_dec(x_8); +lean_dec(x_6); +lean_dec(x_5); +lean_dec(x_4); +x_315 = !lean_is_exclusive(x_309); +if (x_315 == 0) +{ +return x_309; +} +else +{ +lean_object* x_316; lean_object* x_317; lean_object* x_318; +x_316 = lean_ctor_get(x_309, 0); +x_317 = lean_ctor_get(x_309, 1); +lean_inc(x_317); +lean_inc(x_316); +lean_dec(x_309); +x_318 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_318, 0, x_316); +lean_ctor_set(x_318, 1, x_317); +return x_318; +} +} +} +} +else +{ +uint8_t x_319; lean_dec(x_29); lean_dec(x_25); lean_dec(x_8); +lean_dec(x_6); lean_dec(x_5); lean_dec(x_4); -lean_dec(x_3); lean_dec(x_2); lean_dec(x_1); -x_293 = !lean_is_exclusive(x_30); -if (x_293 == 0) +x_319 = !lean_is_exclusive(x_30); +if (x_319 == 0) { return x_30; } else { -lean_object* x_294; lean_object* x_295; lean_object* x_296; -x_294 = lean_ctor_get(x_30, 0); -x_295 = lean_ctor_get(x_30, 1); -lean_inc(x_295); -lean_inc(x_294); +lean_object* x_320; lean_object* x_321; lean_object* x_322; +x_320 = lean_ctor_get(x_30, 0); +x_321 = lean_ctor_get(x_30, 1); +lean_inc(x_321); +lean_inc(x_320); lean_dec(x_30); -x_296 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_296, 0, x_294); -lean_ctor_set(x_296, 1, x_295); -return x_296; +x_322 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_322, 0, x_320); +lean_ctor_set(x_322, 1, x_321); +return x_322; } } } } else { -lean_object* x_297; lean_object* x_298; lean_object* x_299; lean_object* x_300; lean_object* x_301; lean_object* x_302; lean_object* x_303; lean_object* x_304; lean_object* x_305; lean_object* x_306; lean_object* x_307; -x_297 = lean_unsigned_to_nat(0u); -x_298 = l_Lean_Expr_getAppNumArgsAux___main(x_10, x_297); -x_299 = lean_unsigned_to_nat(1u); -x_300 = lean_nat_sub(x_298, x_299); -x_301 = lean_nat_sub(x_300, x_299); -lean_dec(x_300); -x_302 = l_Lean_Expr_getRevArg_x21___main(x_10, x_301); -x_303 = lean_nat_sub(x_298, x_12); -lean_dec(x_298); -x_304 = lean_nat_sub(x_303, x_299); -lean_dec(x_303); -x_305 = l_Lean_Expr_getRevArg_x21___main(x_10, x_304); +lean_object* x_323; lean_object* x_324; lean_object* x_325; lean_object* x_326; lean_object* x_327; lean_object* x_328; lean_object* x_329; lean_object* x_330; lean_object* x_331; lean_object* x_332; lean_object* x_333; +x_323 = lean_unsigned_to_nat(0u); +x_324 = l_Lean_Expr_getAppNumArgsAux___main(x_10, x_323); +x_325 = lean_unsigned_to_nat(1u); +x_326 = lean_nat_sub(x_324, x_325); +x_327 = lean_nat_sub(x_326, x_325); +lean_dec(x_326); +x_328 = l_Lean_Expr_getRevArg_x21___main(x_10, x_327); +x_329 = lean_nat_sub(x_324, x_12); +lean_dec(x_324); +x_330 = lean_nat_sub(x_329, x_325); +lean_dec(x_329); +x_331 = l_Lean_Expr_getRevArg_x21___main(x_10, x_330); lean_dec(x_10); -lean_inc(x_5); -x_306 = l_Lean_mkFVar(x_5); +lean_inc(x_2); +x_332 = l_Lean_mkFVar(x_2); lean_inc(x_8); -x_307 = l_Lean_Meta_mkEqOfHEq(x_306, x_8, x_9); -if (lean_obj_tag(x_307) == 0) +x_333 = l_Lean_Meta_mkEqOfHEq(x_332, x_8, x_9); +if (lean_obj_tag(x_333) == 0) { -lean_object* x_308; lean_object* x_309; lean_object* x_310; -x_308 = lean_ctor_get(x_307, 0); -lean_inc(x_308); -x_309 = lean_ctor_get(x_307, 1); -lean_inc(x_309); -lean_dec(x_307); -lean_inc(x_8); -x_310 = l_Lean_Meta_mkEq(x_302, x_305, x_8, x_309); -if (lean_obj_tag(x_310) == 0) -{ -lean_object* x_311; lean_object* x_312; lean_object* x_313; lean_object* x_314; -x_311 = lean_ctor_get(x_310, 0); -lean_inc(x_311); -x_312 = lean_ctor_get(x_310, 1); -lean_inc(x_312); -lean_dec(x_310); -x_313 = l_Lean_LocalDecl_userName(x_7); -x_314 = l_Lean_Meta_assert(x_1, x_313, x_311, x_308, x_8, x_312); -if (lean_obj_tag(x_314) == 0) -{ -lean_object* x_315; lean_object* x_316; lean_object* x_317; -x_315 = lean_ctor_get(x_314, 0); -lean_inc(x_315); -x_316 = lean_ctor_get(x_314, 1); -lean_inc(x_316); -lean_dec(x_314); -x_317 = l_Lean_Meta_clear(x_315, x_5, x_8, x_316); -if (lean_obj_tag(x_317) == 0) -{ -lean_object* x_318; lean_object* x_319; lean_object* x_320; lean_object* x_321; lean_object* x_322; lean_object* x_323; -x_318 = lean_ctor_get(x_317, 0); -lean_inc(x_318); -x_319 = lean_ctor_get(x_317, 1); -lean_inc(x_319); -lean_dec(x_317); -x_320 = lean_nat_add(x_6, x_299); -x_321 = lean_alloc_ctor(0, 3, 0); -lean_ctor_set(x_321, 0, x_318); -lean_ctor_set(x_321, 1, x_2); -lean_ctor_set(x_321, 2, x_3); -x_322 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_322, 0, x_321); -lean_ctor_set(x_322, 1, x_4); -x_323 = l___private_Init_Lean_Meta_Tactic_Cases_8__unifyEqsAux___main(x_320, x_322, x_8, x_319); -lean_dec(x_8); -lean_dec(x_320); -return x_323; -} -else -{ -uint8_t x_324; -lean_dec(x_8); -lean_dec(x_4); -lean_dec(x_3); -lean_dec(x_2); -x_324 = !lean_is_exclusive(x_317); -if (x_324 == 0) -{ -return x_317; -} -else -{ -lean_object* x_325; lean_object* x_326; lean_object* x_327; -x_325 = lean_ctor_get(x_317, 0); -x_326 = lean_ctor_get(x_317, 1); -lean_inc(x_326); -lean_inc(x_325); -lean_dec(x_317); -x_327 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_327, 0, x_325); -lean_ctor_set(x_327, 1, x_326); -return x_327; -} -} -} -else -{ -uint8_t x_328; -lean_dec(x_8); -lean_dec(x_5); -lean_dec(x_4); -lean_dec(x_3); -lean_dec(x_2); -x_328 = !lean_is_exclusive(x_314); -if (x_328 == 0) -{ -return x_314; -} -else -{ -lean_object* x_329; lean_object* x_330; lean_object* x_331; -x_329 = lean_ctor_get(x_314, 0); -x_330 = lean_ctor_get(x_314, 1); -lean_inc(x_330); -lean_inc(x_329); -lean_dec(x_314); -x_331 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_331, 0, x_329); -lean_ctor_set(x_331, 1, x_330); -return x_331; -} -} -} -else -{ -uint8_t x_332; -lean_dec(x_308); -lean_dec(x_8); -lean_dec(x_5); -lean_dec(x_4); -lean_dec(x_3); -lean_dec(x_2); -lean_dec(x_1); -x_332 = !lean_is_exclusive(x_310); -if (x_332 == 0) -{ -return x_310; -} -else -{ -lean_object* x_333; lean_object* x_334; lean_object* x_335; -x_333 = lean_ctor_get(x_310, 0); -x_334 = lean_ctor_get(x_310, 1); +lean_object* x_334; lean_object* x_335; lean_object* x_336; +x_334 = lean_ctor_get(x_333, 0); lean_inc(x_334); -lean_inc(x_333); -lean_dec(x_310); -x_335 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_335, 0, x_333); -lean_ctor_set(x_335, 1, x_334); -return x_335; -} -} +x_335 = lean_ctor_get(x_333, 1); +lean_inc(x_335); +lean_dec(x_333); +lean_inc(x_8); +x_336 = l_Lean_Meta_mkEq(x_328, x_331, x_8, x_335); +if (lean_obj_tag(x_336) == 0) +{ +lean_object* x_337; lean_object* x_338; lean_object* x_339; lean_object* x_340; +x_337 = lean_ctor_get(x_336, 0); +lean_inc(x_337); +x_338 = lean_ctor_get(x_336, 1); +lean_inc(x_338); +lean_dec(x_336); +x_339 = l_Lean_LocalDecl_userName(x_7); +x_340 = l_Lean_Meta_assert(x_1, x_339, x_337, x_334, x_8, x_338); +if (lean_obj_tag(x_340) == 0) +{ +lean_object* x_341; lean_object* x_342; lean_object* x_343; +x_341 = lean_ctor_get(x_340, 0); +lean_inc(x_341); +x_342 = lean_ctor_get(x_340, 1); +lean_inc(x_342); +lean_dec(x_340); +x_343 = l_Lean_Meta_clear(x_341, x_2, x_8, x_342); +if (lean_obj_tag(x_343) == 0) +{ +lean_object* x_344; lean_object* x_345; lean_object* x_346; lean_object* x_347; lean_object* x_348; lean_object* x_349; +x_344 = lean_ctor_get(x_343, 0); +lean_inc(x_344); +x_345 = lean_ctor_get(x_343, 1); +lean_inc(x_345); +lean_dec(x_343); +x_346 = lean_nat_add(x_3, x_325); +x_347 = lean_alloc_ctor(0, 3, 0); +lean_ctor_set(x_347, 0, x_344); +lean_ctor_set(x_347, 1, x_4); +lean_ctor_set(x_347, 2, x_5); +x_348 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_348, 0, x_347); +lean_ctor_set(x_348, 1, x_6); +x_349 = l___private_Init_Lean_Meta_Tactic_Cases_8__unifyEqsAux___main(x_346, x_348, x_8, x_345); +lean_dec(x_8); +lean_dec(x_346); +return x_349; } else { -uint8_t x_336; -lean_dec(x_305); -lean_dec(x_302); +uint8_t x_350; lean_dec(x_8); +lean_dec(x_6); lean_dec(x_5); lean_dec(x_4); -lean_dec(x_3); -lean_dec(x_2); -lean_dec(x_1); -x_336 = !lean_is_exclusive(x_307); -if (x_336 == 0) +x_350 = !lean_is_exclusive(x_343); +if (x_350 == 0) { -return x_307; +return x_343; } else { -lean_object* x_337; lean_object* x_338; lean_object* x_339; -x_337 = lean_ctor_get(x_307, 0); -x_338 = lean_ctor_get(x_307, 1); -lean_inc(x_338); -lean_inc(x_337); -lean_dec(x_307); -x_339 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_339, 0, x_337); -lean_ctor_set(x_339, 1, x_338); -return x_339; +lean_object* x_351; lean_object* x_352; lean_object* x_353; +x_351 = lean_ctor_get(x_343, 0); +x_352 = lean_ctor_get(x_343, 1); +lean_inc(x_352); +lean_inc(x_351); +lean_dec(x_343); +x_353 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_353, 0, x_351); +lean_ctor_set(x_353, 1, x_352); +return x_353; +} +} +} +else +{ +uint8_t x_354; +lean_dec(x_8); +lean_dec(x_6); +lean_dec(x_5); +lean_dec(x_4); +lean_dec(x_2); +x_354 = !lean_is_exclusive(x_340); +if (x_354 == 0) +{ +return x_340; +} +else +{ +lean_object* x_355; lean_object* x_356; lean_object* x_357; +x_355 = lean_ctor_get(x_340, 0); +x_356 = lean_ctor_get(x_340, 1); +lean_inc(x_356); +lean_inc(x_355); +lean_dec(x_340); +x_357 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_357, 0, x_355); +lean_ctor_set(x_357, 1, x_356); +return x_357; +} +} +} +else +{ +uint8_t x_358; +lean_dec(x_334); +lean_dec(x_8); +lean_dec(x_6); +lean_dec(x_5); +lean_dec(x_4); +lean_dec(x_2); +lean_dec(x_1); +x_358 = !lean_is_exclusive(x_336); +if (x_358 == 0) +{ +return x_336; +} +else +{ +lean_object* x_359; lean_object* x_360; lean_object* x_361; +x_359 = lean_ctor_get(x_336, 0); +x_360 = lean_ctor_get(x_336, 1); +lean_inc(x_360); +lean_inc(x_359); +lean_dec(x_336); +x_361 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_361, 0, x_359); +lean_ctor_set(x_361, 1, x_360); +return x_361; +} +} +} +else +{ +uint8_t x_362; +lean_dec(x_331); +lean_dec(x_328); +lean_dec(x_8); +lean_dec(x_6); +lean_dec(x_5); +lean_dec(x_4); +lean_dec(x_2); +lean_dec(x_1); +x_362 = !lean_is_exclusive(x_333); +if (x_362 == 0) +{ +return x_333; +} +else +{ +lean_object* x_363; lean_object* x_364; lean_object* x_365; +x_363 = lean_ctor_get(x_333, 0); +x_364 = lean_ctor_get(x_333, 1); +lean_inc(x_364); +lean_inc(x_363); +lean_dec(x_333); +x_365 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_365, 0, x_363); +lean_ctor_set(x_365, 1, x_364); +return x_365; } } } @@ -12709,11 +12823,11 @@ lean_closure_set(x_21, 0, x_19); lean_inc(x_20); x_22 = lean_alloc_closure((void*)(l___private_Init_Lean_Meta_Tactic_Cases_8__unifyEqsAux___main___lambda__1___boxed), 9, 6); lean_closure_set(x_22, 0, x_20); -lean_closure_set(x_22, 1, x_13); -lean_closure_set(x_22, 2, x_14); -lean_closure_set(x_22, 3, x_11); -lean_closure_set(x_22, 4, x_19); -lean_closure_set(x_22, 5, x_8); +lean_closure_set(x_22, 1, x_19); +lean_closure_set(x_22, 2, x_8); +lean_closure_set(x_22, 3, x_13); +lean_closure_set(x_22, 4, x_14); +lean_closure_set(x_22, 5, x_11); x_23 = lean_alloc_closure((void*)(l_ReaderT_bind___at_Lean_Meta_isClassExpensive___main___spec__4___rarg), 4, 2); lean_closure_set(x_23, 0, x_21); lean_closure_set(x_23, 1, x_22); @@ -13019,7 +13133,7 @@ _start: lean_object* x_10; x_10 = l___private_Init_Lean_Meta_Tactic_Cases_8__unifyEqsAux___main___lambda__1(x_1, x_2, x_3, x_4, x_5, x_6, x_7, x_8, x_9); lean_dec(x_7); -lean_dec(x_6); +lean_dec(x_3); return x_10; } } @@ -13642,6 +13756,7 @@ return x_8; } lean_object* initialize_Init_Lean_Meta_AppBuilder(lean_object*); lean_object* initialize_Init_Lean_Meta_Tactic_Induction(lean_object*); +lean_object* initialize_Init_Lean_Meta_Tactic_Injection(lean_object*); lean_object* initialize_Init_Lean_Meta_Tactic_Assert(lean_object*); lean_object* initialize_Init_Lean_Meta_Tactic_Subst(lean_object*); static bool _G_initialized = false; @@ -13655,6 +13770,9 @@ lean_dec_ref(res); res = initialize_Init_Lean_Meta_Tactic_Induction(lean_io_mk_world()); if (lean_io_result_is_error(res)) return res; lean_dec_ref(res); +res = initialize_Init_Lean_Meta_Tactic_Injection(lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); res = initialize_Init_Lean_Meta_Tactic_Assert(lean_io_mk_world()); if (lean_io_result_is_error(res)) return res; lean_dec_ref(res); @@ -13691,10 +13809,6 @@ l___private_Init_Lean_Meta_Tactic_Cases_8__unifyEqsAux___main___lambda__1___clos lean_mark_persistent(l___private_Init_Lean_Meta_Tactic_Cases_8__unifyEqsAux___main___lambda__1___closed__1); l___private_Init_Lean_Meta_Tactic_Cases_8__unifyEqsAux___main___lambda__1___closed__2 = _init_l___private_Init_Lean_Meta_Tactic_Cases_8__unifyEqsAux___main___lambda__1___closed__2(); lean_mark_persistent(l___private_Init_Lean_Meta_Tactic_Cases_8__unifyEqsAux___main___lambda__1___closed__2); -l___private_Init_Lean_Meta_Tactic_Cases_8__unifyEqsAux___main___lambda__1___closed__3 = _init_l___private_Init_Lean_Meta_Tactic_Cases_8__unifyEqsAux___main___lambda__1___closed__3(); -lean_mark_persistent(l___private_Init_Lean_Meta_Tactic_Cases_8__unifyEqsAux___main___lambda__1___closed__3); -l___private_Init_Lean_Meta_Tactic_Cases_8__unifyEqsAux___main___lambda__1___closed__4 = _init_l___private_Init_Lean_Meta_Tactic_Cases_8__unifyEqsAux___main___lambda__1___closed__4(); -lean_mark_persistent(l___private_Init_Lean_Meta_Tactic_Cases_8__unifyEqsAux___main___lambda__1___closed__4); l___private_Init_Lean_Meta_Tactic_Cases_8__unifyEqsAux___main___closed__1 = _init_l___private_Init_Lean_Meta_Tactic_Cases_8__unifyEqsAux___main___closed__1(); lean_mark_persistent(l___private_Init_Lean_Meta_Tactic_Cases_8__unifyEqsAux___main___closed__1); l___private_Init_Lean_Meta_Tactic_Cases_8__unifyEqsAux___main___closed__2 = _init_l___private_Init_Lean_Meta_Tactic_Cases_8__unifyEqsAux___main___closed__2(); diff --git a/stage0/stdlib/Init/Lean/Meta/Tactic/Injection.c b/stage0/stdlib/Init/Lean/Meta/Tactic/Injection.c index eea1f31ac2..860cd8fda1 100644 --- a/stage0/stdlib/Init/Lean/Meta/Tactic/Injection.c +++ b/stage0/stdlib/Init/Lean/Meta/Tactic/Injection.c @@ -13,207 +13,298 @@ #ifdef __cplusplus extern "C" { #endif +lean_object* l_Lean_Meta_assert(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Meta_injectionCore___closed__1; extern lean_object* l_Lean_Expr_eq_x3f___closed__2; lean_object* l_Lean_Expr_mvarId_x21(lean_object*); +lean_object* l___private_Init_Lean_Meta_Tactic_Injection_2__heqToEq___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_LocalDecl_userName(lean_object*); +lean_object* l___private_Init_Lean_Meta_Tactic_Injection_2__heqToEq___lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); uint8_t lean_name_eq(lean_object*, lean_object*); +lean_object* l___private_Init_Lean_Meta_Tactic_Injection_1__getConstructorVal(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Meta_injectionCore___lambda__1___closed__6; lean_object* l_Lean_Meta_withLocalContext___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +extern lean_object* l___private_Init_Lean_Meta_DiscrTree_6__shouldAddAsStar___closed__2; +extern lean_object* l_Array_empty___closed__1; lean_object* lean_environment_find(lean_object*, lean_object*); lean_object* l_Lean_Meta_getMVarTag(lean_object*, lean_object*, lean_object*); lean_object* l_ReaderT_bind___at_Lean_Meta_isClassExpensive___main___spec__4___rarg(lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* lean_array_push(lean_object*, lean_object*); lean_object* l_Lean_Expr_getAppFn___main(lean_object*); lean_object* l_Lean_Meta_checkNotAssigned___boxed(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* lean_nat_add(lean_object*, lean_object*); +lean_object* l_Lean_Meta_injectionIntro(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Meta_intro(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Expr_getAppNumArgsAux___main(lean_object*, lean_object*); uint8_t lean_nat_dec_eq(lean_object*, lean_object*); lean_object* l_Lean_Meta_getMVarType(lean_object*, lean_object*, lean_object*); +lean_object* l___private_Init_Lean_Meta_Tactic_Injection_2__heqToEq___boxed(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* lean_nat_sub(lean_object*, lean_object*); extern lean_object* l_Lean_Meta_mkNoConfusion___closed__3; lean_object* l_Lean_Meta_tryClear(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Expr_headBeta(lean_object*); +extern lean_object* l_Lean_Expr_heq_x3f___closed__2; lean_object* l_Lean_Meta_injectionCore(lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l___private_Init_Lean_Meta_Tactic_Injection_1__getConstructorVal___boxed(lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Meta_clear(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* lean_name_mk_string(lean_object*, lean_object*); lean_object* l_Lean_Meta_constructorApp_x3f(lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Meta_injectionIntro___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Meta_injectionIntro___main(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Meta_whnf(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_mkFVar(lean_object*); uint8_t l_Lean_Expr_isAppOfArity___main(lean_object*, lean_object*, lean_object*); +lean_object* l___private_Init_Lean_Meta_Tactic_Injection_2__heqToEq(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_LocalDecl_type(lean_object*); lean_object* l_Lean_Meta_throwTacticEx___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Meta_injectionCore___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Meta_assignExprMVar(lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_List_drop___main___rarg(lean_object*, lean_object*); lean_object* l_Lean_Meta_getLocalDecl(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Meta_injection___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Expr_getRevArg_x21___main(lean_object*, lean_object*); lean_object* l_Lean_Meta_mkFreshExprMVar(lean_object*, lean_object*, uint8_t, lean_object*, lean_object*); lean_object* l_Lean_mkApp(lean_object*, lean_object*); lean_object* l_Lean_Meta_injectionCore___boxed(lean_object*, lean_object*, lean_object*, lean_object*); -lean_object* l_Lean_Meta_introNCore___at_Lean_Meta_introN___spec__1(uint8_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Meta_injectionCore___lambda__1___closed__7; lean_object* l_Lean_Meta_inferType(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Meta_mkNoConfusion(lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Meta_intro1(lean_object*, uint8_t, lean_object*, lean_object*); lean_object* l_Lean_Meta_getMVarDecl(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Meta_injectionCore___lambda__1___closed__3; lean_object* l_Lean_Meta_constructorApp_x3f___boxed(lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Meta_injectionIntro___main___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Meta_injectionCore___lambda__1___closed__5; lean_object* l_Lean_Meta_injection(lean_object*, lean_object*, lean_object*, uint8_t, lean_object*, lean_object*); lean_object* l_Lean_Meta_injectionCore___lambda__1___closed__2; +lean_object* l_Lean_Meta_mkEq(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Meta_injectionCore___lambda__1___closed__1; lean_object* l_Lean_Meta_injectionCore___lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Meta_mkEqOfHEq(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_Meta_injectionCore___lambda__1___closed__4; lean_object* l_Lean_Meta_injectionCore___lambda__1___closed__8; lean_object* l_Lean_Meta_injectionCore___closed__2; -lean_object* l_Lean_Meta_constructorApp_x3f(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +extern lean_object* l___private_Init_Lean_Meta_DiscrTree_6__shouldAddAsStar___closed__4; +lean_object* l___private_Init_Lean_Meta_Tactic_Injection_1__getConstructorVal(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { _start: { -lean_object* x_4; -x_4 = l_Lean_Expr_getAppFn___main(x_1); -if (lean_obj_tag(x_4) == 4) -{ -lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; +lean_object* x_5; lean_object* x_6; x_5 = lean_ctor_get(x_4, 0); lean_inc(x_5); -lean_dec(x_4); -x_6 = lean_unsigned_to_nat(0u); -x_7 = l_Lean_Expr_getAppNumArgsAux___main(x_1, x_6); -x_8 = lean_ctor_get(x_3, 0); -lean_inc(x_8); -x_9 = lean_environment_find(x_8, x_5); -if (lean_obj_tag(x_9) == 0) +x_6 = lean_environment_find(x_5, x_1); +if (lean_obj_tag(x_6) == 0) { -lean_object* x_10; lean_object* x_11; -lean_dec(x_7); -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_3); -return x_11; +lean_object* x_7; lean_object* x_8; +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_4); +return x_8; } else { -uint8_t x_12; -x_12 = !lean_is_exclusive(x_9); -if (x_12 == 0) +uint8_t x_9; +x_9 = !lean_is_exclusive(x_6); +if (x_9 == 0) { -lean_object* x_13; -x_13 = lean_ctor_get(x_9, 0); -if (lean_obj_tag(x_13) == 6) +lean_object* x_10; +x_10 = lean_ctor_get(x_6, 0); +if (lean_obj_tag(x_10) == 6) { -lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; uint8_t x_18; -x_14 = lean_ctor_get(x_13, 0); -lean_inc(x_14); +lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; uint8_t x_15; +x_11 = lean_ctor_get(x_10, 0); +lean_inc(x_11); +lean_dec(x_10); +x_12 = lean_ctor_get(x_11, 3); +lean_inc(x_12); +x_13 = lean_ctor_get(x_11, 4); +lean_inc(x_13); +x_14 = lean_nat_add(x_12, x_13); lean_dec(x_13); -x_15 = lean_ctor_get(x_14, 3); -lean_inc(x_15); -x_16 = lean_ctor_get(x_14, 4); -lean_inc(x_16); -x_17 = lean_nat_add(x_15, x_16); -lean_dec(x_16); -lean_dec(x_15); -x_18 = lean_nat_dec_eq(x_7, x_17); -lean_dec(x_17); -lean_dec(x_7); -if (x_18 == 0) +lean_dec(x_12); +x_15 = lean_nat_dec_eq(x_2, x_14); +lean_dec(x_14); +if (x_15 == 0) +{ +lean_object* x_16; lean_object* x_17; +lean_dec(x_11); +lean_free_object(x_6); +x_16 = lean_box(0); +x_17 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_17, 0, x_16); +lean_ctor_set(x_17, 1, x_4); +return x_17; +} +else +{ +lean_object* x_18; +lean_ctor_set(x_6, 0, x_11); +x_18 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_18, 0, x_6); +lean_ctor_set(x_18, 1, x_4); +return x_18; +} +} +else { lean_object* x_19; lean_object* x_20; -lean_dec(x_14); -lean_free_object(x_9); +lean_free_object(x_6); +lean_dec(x_10); x_19 = lean_box(0); x_20 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_20, 0, x_19); -lean_ctor_set(x_20, 1, x_3); +lean_ctor_set(x_20, 1, x_4); return x_20; } +} else { lean_object* x_21; -lean_ctor_set(x_9, 0, x_14); -x_21 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_21, 0, x_9); -lean_ctor_set(x_21, 1, x_3); -return x_21; -} -} -else +x_21 = lean_ctor_get(x_6, 0); +lean_inc(x_21); +lean_dec(x_6); +if (lean_obj_tag(x_21) == 6) { -lean_object* x_22; lean_object* x_23; -lean_free_object(x_9); -lean_dec(x_13); -lean_dec(x_7); -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; -} -} -else -{ -lean_object* x_24; -x_24 = lean_ctor_get(x_9, 0); +lean_object* x_22; lean_object* x_23; lean_object* x_24; lean_object* x_25; uint8_t x_26; +x_22 = lean_ctor_get(x_21, 0); +lean_inc(x_22); +lean_dec(x_21); +x_23 = lean_ctor_get(x_22, 3); +lean_inc(x_23); +x_24 = lean_ctor_get(x_22, 4); lean_inc(x_24); -lean_dec(x_9); -if (lean_obj_tag(x_24) == 6) -{ -lean_object* x_25; lean_object* x_26; lean_object* x_27; lean_object* x_28; uint8_t x_29; -x_25 = lean_ctor_get(x_24, 0); -lean_inc(x_25); +x_25 = lean_nat_add(x_23, x_24); lean_dec(x_24); -x_26 = lean_ctor_get(x_25, 3); -lean_inc(x_26); -x_27 = lean_ctor_get(x_25, 4); -lean_inc(x_27); -x_28 = lean_nat_add(x_26, x_27); -lean_dec(x_27); -lean_dec(x_26); -x_29 = lean_nat_dec_eq(x_7, x_28); -lean_dec(x_28); -lean_dec(x_7); -if (x_29 == 0) -{ -lean_object* x_30; lean_object* x_31; +lean_dec(x_23); +x_26 = lean_nat_dec_eq(x_2, x_25); 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_3); -return x_31; +if (x_26 == 0) +{ +lean_object* x_27; lean_object* x_28; +lean_dec(x_22); +x_27 = lean_box(0); +x_28 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_28, 0, x_27); +lean_ctor_set(x_28, 1, x_4); +return x_28; } else { -lean_object* x_32; lean_object* x_33; -x_32 = lean_alloc_ctor(1, 1, 0); -lean_ctor_set(x_32, 0, x_25); -x_33 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_33, 0, x_32); -lean_ctor_set(x_33, 1, x_3); -return x_33; +lean_object* x_29; lean_object* x_30; +x_29 = lean_alloc_ctor(1, 1, 0); +lean_ctor_set(x_29, 0, x_22); +x_30 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_30, 0, x_29); +lean_ctor_set(x_30, 1, x_4); +return x_30; } } else { -lean_object* x_34; lean_object* x_35; -lean_dec(x_24); -lean_dec(x_7); -x_34 = lean_box(0); -x_35 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_35, 0, x_34); -lean_ctor_set(x_35, 1, x_3); -return x_35; +lean_object* x_31; lean_object* x_32; +lean_dec(x_21); +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_4); +return x_32; } } } } +} +lean_object* l___private_Init_Lean_Meta_Tactic_Injection_1__getConstructorVal___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_Meta_Tactic_Injection_1__getConstructorVal(x_1, x_2, x_3, x_4); +lean_dec(x_3); +lean_dec(x_2); +return x_5; +} +} +lean_object* l_Lean_Meta_constructorApp_x3f(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +_start: +{ +if (lean_obj_tag(x_1) == 9) +{ +lean_object* x_4; +x_4 = lean_ctor_get(x_1, 0); +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); +x_6 = lean_unsigned_to_nat(0u); +x_7 = lean_nat_dec_eq(x_5, x_6); +if (x_7 == 0) +{ +lean_object* x_8; lean_object* x_9; lean_object* x_10; +x_8 = l___private_Init_Lean_Meta_DiscrTree_6__shouldAddAsStar___closed__4; +x_9 = lean_unsigned_to_nat(1u); +x_10 = l___private_Init_Lean_Meta_Tactic_Injection_1__getConstructorVal(x_8, x_9, x_2, x_3); +return x_10; +} +else +{ +lean_object* x_11; lean_object* x_12; +x_11 = l___private_Init_Lean_Meta_DiscrTree_6__shouldAddAsStar___closed__2; +x_12 = l___private_Init_Lean_Meta_Tactic_Injection_1__getConstructorVal(x_11, x_6, x_2, x_3); +return x_12; +} +} +else +{ +lean_object* x_13; +x_13 = l_Lean_Expr_getAppFn___main(x_1); +if (lean_obj_tag(x_13) == 4) +{ +lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; +x_14 = lean_ctor_get(x_13, 0); +lean_inc(x_14); +lean_dec(x_13); +x_15 = lean_unsigned_to_nat(0u); +x_16 = l_Lean_Expr_getAppNumArgsAux___main(x_1, x_15); +x_17 = l___private_Init_Lean_Meta_Tactic_Injection_1__getConstructorVal(x_14, x_16, x_2, x_3); +lean_dec(x_16); +return x_17; +} +else +{ +lean_object* x_18; lean_object* x_19; +lean_dec(x_13); +x_18 = lean_box(0); +x_19 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_19, 0, x_18); +lean_ctor_set(x_19, 1, x_3); +return x_19; +} +} +} else { -lean_object* x_36; lean_object* x_37; -lean_dec(x_4); -x_36 = lean_box(0); -x_37 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_37, 0, x_36); -lean_ctor_set(x_37, 1, x_3); -return x_37; +lean_object* x_20; +x_20 = l_Lean_Expr_getAppFn___main(x_1); +if (lean_obj_tag(x_20) == 4) +{ +lean_object* x_21; lean_object* x_22; lean_object* x_23; lean_object* x_24; +x_21 = lean_ctor_get(x_20, 0); +lean_inc(x_21); +lean_dec(x_20); +x_22 = lean_unsigned_to_nat(0u); +x_23 = l_Lean_Expr_getAppNumArgsAux___main(x_1, x_22); +x_24 = l___private_Init_Lean_Meta_Tactic_Injection_1__getConstructorVal(x_21, x_23, x_2, x_3); +lean_dec(x_23); +return x_24; +} +else +{ +lean_object* x_25; lean_object* x_26; +lean_dec(x_20); +x_25 = lean_box(0); +x_26 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_26, 0, x_25); +lean_ctor_set(x_26, 1, x_3); +return x_26; +} } } } @@ -1048,6 +1139,834 @@ lean_dec(x_3); return x_5; } } +lean_object* l___private_Init_Lean_Meta_Tactic_Injection_2__heqToEq___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; lean_object* x_7; +x_6 = l_Lean_LocalDecl_type(x_3); +lean_inc(x_4); +x_7 = l_Lean_Meta_whnf(x_6, x_4, x_5); +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; lean_object* x_11; lean_object* x_12; uint8_t x_13; +x_9 = lean_ctor_get(x_7, 0); +x_10 = lean_ctor_get(x_7, 1); +x_11 = l_Lean_Expr_heq_x3f___closed__2; +x_12 = lean_unsigned_to_nat(4u); +x_13 = l_Lean_Expr_isAppOfArity___main(x_9, x_11, x_12); +if (x_13 == 0) +{ +lean_object* x_14; +lean_dec(x_9); +lean_dec(x_4); +x_14 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_14, 0, x_1); +lean_ctor_set(x_14, 1, x_2); +lean_ctor_set(x_7, 0, x_14); +return x_7; +} +else +{ +lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; lean_object* x_20; lean_object* x_21; lean_object* x_22; lean_object* x_23; lean_object* x_24; lean_object* x_25; +lean_free_object(x_7); +x_15 = lean_unsigned_to_nat(0u); +x_16 = l_Lean_Expr_getAppNumArgsAux___main(x_9, x_15); +x_17 = lean_unsigned_to_nat(1u); +x_18 = lean_nat_sub(x_16, x_17); +x_19 = lean_nat_sub(x_18, x_17); +lean_dec(x_18); +x_20 = l_Lean_Expr_getRevArg_x21___main(x_9, x_19); +x_21 = lean_nat_sub(x_16, x_12); +lean_dec(x_16); +x_22 = lean_nat_sub(x_21, x_17); +lean_dec(x_21); +x_23 = l_Lean_Expr_getRevArg_x21___main(x_9, x_22); +lean_dec(x_9); +lean_inc(x_1); +x_24 = l_Lean_mkFVar(x_1); +lean_inc(x_4); +x_25 = l_Lean_Meta_mkEqOfHEq(x_24, x_4, x_10); +if (lean_obj_tag(x_25) == 0) +{ +lean_object* x_26; lean_object* x_27; lean_object* x_28; +x_26 = lean_ctor_get(x_25, 0); +lean_inc(x_26); +x_27 = lean_ctor_get(x_25, 1); +lean_inc(x_27); +lean_dec(x_25); +lean_inc(x_4); +x_28 = l_Lean_Meta_mkEq(x_20, x_23, x_4, x_27); +if (lean_obj_tag(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_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_LocalDecl_userName(x_3); +x_32 = l_Lean_Meta_assert(x_2, x_31, x_29, x_26, x_4, x_30); +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, 0); +lean_inc(x_33); +x_34 = lean_ctor_get(x_32, 1); +lean_inc(x_34); +lean_dec(x_32); +x_35 = l_Lean_Meta_clear(x_33, x_1, x_4, x_34); +if (lean_obj_tag(x_35) == 0) +{ +lean_object* x_36; lean_object* x_37; uint8_t x_38; lean_object* x_39; +x_36 = lean_ctor_get(x_35, 0); +lean_inc(x_36); +x_37 = lean_ctor_get(x_35, 1); +lean_inc(x_37); +lean_dec(x_35); +x_38 = 0; +x_39 = l_Lean_Meta_intro1(x_36, x_38, x_4, x_37); +lean_dec(x_4); +if (lean_obj_tag(x_39) == 0) +{ +uint8_t x_40; +x_40 = !lean_is_exclusive(x_39); +if (x_40 == 0) +{ +return x_39; +} +else +{ +lean_object* x_41; lean_object* x_42; lean_object* x_43; +x_41 = lean_ctor_get(x_39, 0); +x_42 = lean_ctor_get(x_39, 1); +lean_inc(x_42); +lean_inc(x_41); +lean_dec(x_39); +x_43 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_43, 0, x_41); +lean_ctor_set(x_43, 1, x_42); +return x_43; +} +} +else +{ +uint8_t x_44; +x_44 = !lean_is_exclusive(x_39); +if (x_44 == 0) +{ +return x_39; +} +else +{ +lean_object* x_45; lean_object* x_46; lean_object* x_47; +x_45 = lean_ctor_get(x_39, 0); +x_46 = lean_ctor_get(x_39, 1); +lean_inc(x_46); +lean_inc(x_45); +lean_dec(x_39); +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); +x_48 = !lean_is_exclusive(x_35); +if (x_48 == 0) +{ +return x_35; +} +else +{ +lean_object* x_49; lean_object* x_50; lean_object* x_51; +x_49 = lean_ctor_get(x_35, 0); +x_50 = lean_ctor_get(x_35, 1); +lean_inc(x_50); +lean_inc(x_49); +lean_dec(x_35); +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_1); +x_52 = !lean_is_exclusive(x_32); +if (x_52 == 0) +{ +return x_32; +} +else +{ +lean_object* x_53; lean_object* x_54; lean_object* x_55; +x_53 = lean_ctor_get(x_32, 0); +x_54 = lean_ctor_get(x_32, 1); +lean_inc(x_54); +lean_inc(x_53); +lean_dec(x_32); +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_26); +lean_dec(x_4); +lean_dec(x_2); +lean_dec(x_1); +x_56 = !lean_is_exclusive(x_28); +if (x_56 == 0) +{ +return x_28; +} +else +{ +lean_object* x_57; lean_object* x_58; lean_object* x_59; +x_57 = lean_ctor_get(x_28, 0); +x_58 = lean_ctor_get(x_28, 1); +lean_inc(x_58); +lean_inc(x_57); +lean_dec(x_28); +x_59 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_59, 0, x_57); +lean_ctor_set(x_59, 1, x_58); +return x_59; +} +} +} +else +{ +uint8_t x_60; +lean_dec(x_23); +lean_dec(x_20); +lean_dec(x_4); +lean_dec(x_2); +lean_dec(x_1); +x_60 = !lean_is_exclusive(x_25); +if (x_60 == 0) +{ +return x_25; +} +else +{ +lean_object* x_61; lean_object* x_62; lean_object* x_63; +x_61 = lean_ctor_get(x_25, 0); +x_62 = lean_ctor_get(x_25, 1); +lean_inc(x_62); +lean_inc(x_61); +lean_dec(x_25); +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_object* x_67; uint8_t x_68; +x_64 = lean_ctor_get(x_7, 0); +x_65 = lean_ctor_get(x_7, 1); +lean_inc(x_65); +lean_inc(x_64); +lean_dec(x_7); +x_66 = l_Lean_Expr_heq_x3f___closed__2; +x_67 = lean_unsigned_to_nat(4u); +x_68 = l_Lean_Expr_isAppOfArity___main(x_64, x_66, x_67); +if (x_68 == 0) +{ +lean_object* x_69; lean_object* x_70; +lean_dec(x_64); +lean_dec(x_4); +x_69 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_69, 0, x_1); +lean_ctor_set(x_69, 1, x_2); +x_70 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_70, 0, x_69); +lean_ctor_set(x_70, 1, x_65); +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; +x_71 = lean_unsigned_to_nat(0u); +x_72 = l_Lean_Expr_getAppNumArgsAux___main(x_64, x_71); +x_73 = lean_unsigned_to_nat(1u); +x_74 = lean_nat_sub(x_72, x_73); +x_75 = lean_nat_sub(x_74, x_73); +lean_dec(x_74); +x_76 = l_Lean_Expr_getRevArg_x21___main(x_64, x_75); +x_77 = lean_nat_sub(x_72, x_67); +lean_dec(x_72); +x_78 = lean_nat_sub(x_77, x_73); +lean_dec(x_77); +x_79 = l_Lean_Expr_getRevArg_x21___main(x_64, x_78); +lean_dec(x_64); +lean_inc(x_1); +x_80 = l_Lean_mkFVar(x_1); +lean_inc(x_4); +x_81 = l_Lean_Meta_mkEqOfHEq(x_80, x_4, x_65); +if (lean_obj_tag(x_81) == 0) +{ +lean_object* x_82; lean_object* x_83; lean_object* x_84; +x_82 = lean_ctor_get(x_81, 0); +lean_inc(x_82); +x_83 = lean_ctor_get(x_81, 1); +lean_inc(x_83); +lean_dec(x_81); +lean_inc(x_4); +x_84 = l_Lean_Meta_mkEq(x_76, x_79, x_4, x_83); +if (lean_obj_tag(x_84) == 0) +{ +lean_object* x_85; lean_object* x_86; lean_object* x_87; lean_object* x_88; +x_85 = lean_ctor_get(x_84, 0); +lean_inc(x_85); +x_86 = lean_ctor_get(x_84, 1); +lean_inc(x_86); +lean_dec(x_84); +x_87 = l_Lean_LocalDecl_userName(x_3); +x_88 = l_Lean_Meta_assert(x_2, x_87, x_85, x_82, x_4, x_86); +if (lean_obj_tag(x_88) == 0) +{ +lean_object* x_89; lean_object* x_90; lean_object* x_91; +x_89 = lean_ctor_get(x_88, 0); +lean_inc(x_89); +x_90 = lean_ctor_get(x_88, 1); +lean_inc(x_90); +lean_dec(x_88); +x_91 = l_Lean_Meta_clear(x_89, x_1, x_4, x_90); +if (lean_obj_tag(x_91) == 0) +{ +lean_object* x_92; lean_object* x_93; uint8_t x_94; lean_object* x_95; +x_92 = lean_ctor_get(x_91, 0); +lean_inc(x_92); +x_93 = lean_ctor_get(x_91, 1); +lean_inc(x_93); +lean_dec(x_91); +x_94 = 0; +x_95 = l_Lean_Meta_intro1(x_92, x_94, x_4, x_93); +lean_dec(x_4); +if (lean_obj_tag(x_95) == 0) +{ +lean_object* x_96; lean_object* x_97; lean_object* x_98; lean_object* x_99; +x_96 = lean_ctor_get(x_95, 0); +lean_inc(x_96); +x_97 = lean_ctor_get(x_95, 1); +lean_inc(x_97); +if (lean_is_exclusive(x_95)) { + lean_ctor_release(x_95, 0); + lean_ctor_release(x_95, 1); + x_98 = x_95; +} else { + lean_dec_ref(x_95); + x_98 = lean_box(0); +} +if (lean_is_scalar(x_98)) { + x_99 = lean_alloc_ctor(0, 2, 0); +} else { + x_99 = 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_100; lean_object* x_101; lean_object* x_102; lean_object* x_103; +x_100 = lean_ctor_get(x_95, 0); +lean_inc(x_100); +x_101 = lean_ctor_get(x_95, 1); +lean_inc(x_101); +if (lean_is_exclusive(x_95)) { + lean_ctor_release(x_95, 0); + lean_ctor_release(x_95, 1); + x_102 = x_95; +} else { + lean_dec_ref(x_95); + x_102 = lean_box(0); +} +if (lean_is_scalar(x_102)) { + x_103 = lean_alloc_ctor(1, 2, 0); +} else { + x_103 = x_102; +} +lean_ctor_set(x_103, 0, x_100); +lean_ctor_set(x_103, 1, x_101); +return x_103; +} +} +else +{ +lean_object* x_104; lean_object* x_105; lean_object* x_106; lean_object* x_107; +lean_dec(x_4); +x_104 = lean_ctor_get(x_91, 0); +lean_inc(x_104); +x_105 = lean_ctor_get(x_91, 1); +lean_inc(x_105); +if (lean_is_exclusive(x_91)) { + lean_ctor_release(x_91, 0); + lean_ctor_release(x_91, 1); + x_106 = x_91; +} else { + lean_dec_ref(x_91); + x_106 = lean_box(0); +} +if (lean_is_scalar(x_106)) { + x_107 = lean_alloc_ctor(1, 2, 0); +} else { + x_107 = x_106; +} +lean_ctor_set(x_107, 0, x_104); +lean_ctor_set(x_107, 1, x_105); +return x_107; +} +} +else +{ +lean_object* x_108; lean_object* x_109; lean_object* x_110; lean_object* x_111; +lean_dec(x_4); +lean_dec(x_1); +x_108 = lean_ctor_get(x_88, 0); +lean_inc(x_108); +x_109 = lean_ctor_get(x_88, 1); +lean_inc(x_109); +if (lean_is_exclusive(x_88)) { + lean_ctor_release(x_88, 0); + lean_ctor_release(x_88, 1); + x_110 = x_88; +} else { + lean_dec_ref(x_88); + x_110 = lean_box(0); +} +if (lean_is_scalar(x_110)) { + x_111 = lean_alloc_ctor(1, 2, 0); +} else { + x_111 = x_110; +} +lean_ctor_set(x_111, 0, x_108); +lean_ctor_set(x_111, 1, x_109); +return x_111; +} +} +else +{ +lean_object* x_112; lean_object* x_113; lean_object* x_114; lean_object* x_115; +lean_dec(x_82); +lean_dec(x_4); +lean_dec(x_2); +lean_dec(x_1); +x_112 = lean_ctor_get(x_84, 0); +lean_inc(x_112); +x_113 = lean_ctor_get(x_84, 1); +lean_inc(x_113); +if (lean_is_exclusive(x_84)) { + lean_ctor_release(x_84, 0); + lean_ctor_release(x_84, 1); + x_114 = x_84; +} else { + lean_dec_ref(x_84); + 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 +{ +lean_object* x_116; lean_object* x_117; lean_object* x_118; lean_object* x_119; +lean_dec(x_79); +lean_dec(x_76); +lean_dec(x_4); +lean_dec(x_2); +lean_dec(x_1); +x_116 = lean_ctor_get(x_81, 0); +lean_inc(x_116); +x_117 = lean_ctor_get(x_81, 1); +lean_inc(x_117); +if (lean_is_exclusive(x_81)) { + lean_ctor_release(x_81, 0); + lean_ctor_release(x_81, 1); + x_118 = x_81; +} else { + lean_dec_ref(x_81); + x_118 = lean_box(0); +} +if (lean_is_scalar(x_118)) { + x_119 = lean_alloc_ctor(1, 2, 0); +} else { + x_119 = x_118; +} +lean_ctor_set(x_119, 0, x_116); +lean_ctor_set(x_119, 1, x_117); +return x_119; +} +} +} +} +else +{ +uint8_t x_120; +lean_dec(x_4); +lean_dec(x_2); +lean_dec(x_1); +x_120 = !lean_is_exclusive(x_7); +if (x_120 == 0) +{ +return x_7; +} +else +{ +lean_object* x_121; lean_object* x_122; lean_object* x_123; +x_121 = lean_ctor_get(x_7, 0); +x_122 = lean_ctor_get(x_7, 1); +lean_inc(x_122); +lean_inc(x_121); +lean_dec(x_7); +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___private_Init_Lean_Meta_Tactic_Injection_2__heqToEq(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_inc(x_2); +x_5 = lean_alloc_closure((void*)(l_Lean_Meta_getLocalDecl), 3, 1); +lean_closure_set(x_5, 0, x_2); +lean_inc(x_1); +x_6 = lean_alloc_closure((void*)(l___private_Init_Lean_Meta_Tactic_Injection_2__heqToEq___lambda__1___boxed), 5, 2); +lean_closure_set(x_6, 0, x_2); +lean_closure_set(x_6, 1, x_1); +x_7 = lean_alloc_closure((void*)(l_ReaderT_bind___at_Lean_Meta_isClassExpensive___main___spec__4___rarg), 4, 2); +lean_closure_set(x_7, 0, x_5); +lean_closure_set(x_7, 1, x_6); +x_8 = l_Lean_Meta_getMVarDecl(x_1, x_3, x_4); +if (lean_obj_tag(x_8) == 0) +{ +lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; +x_9 = lean_ctor_get(x_8, 0); +lean_inc(x_9); +x_10 = lean_ctor_get(x_8, 1); +lean_inc(x_10); +lean_dec(x_8); +x_11 = lean_ctor_get(x_9, 1); +lean_inc(x_11); +x_12 = lean_ctor_get(x_9, 4); +lean_inc(x_12); +lean_dec(x_9); +x_13 = l_Lean_Meta_withLocalContext___rarg(x_11, x_12, x_7, x_3, x_10); +return x_13; +} +else +{ +uint8_t x_14; +lean_dec(x_7); +x_14 = !lean_is_exclusive(x_8); +if (x_14 == 0) +{ +return x_8; +} +else +{ +lean_object* x_15; lean_object* x_16; lean_object* x_17; +x_15 = lean_ctor_get(x_8, 0); +x_16 = lean_ctor_get(x_8, 1); +lean_inc(x_16); +lean_inc(x_15); +lean_dec(x_8); +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___private_Init_Lean_Meta_Tactic_Injection_2__heqToEq___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___private_Init_Lean_Meta_Tactic_Injection_2__heqToEq___lambda__1(x_1, x_2, x_3, x_4, x_5); +lean_dec(x_3); +return x_6; +} +} +lean_object* l___private_Init_Lean_Meta_Tactic_Injection_2__heqToEq___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_Meta_Tactic_Injection_2__heqToEq(x_1, x_2, x_3, x_4); +lean_dec(x_3); +return x_5; +} +} +lean_object* l_Lean_Meta_injectionIntro___main(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_unsigned_to_nat(0u); +x_8 = lean_nat_dec_eq(x_1, x_7); +if (x_8 == 0) +{ +lean_object* x_9; lean_object* x_10; +x_9 = lean_unsigned_to_nat(1u); +x_10 = lean_nat_sub(x_1, x_9); +lean_dec(x_1); +if (lean_obj_tag(x_4) == 0) +{ +uint8_t x_11; lean_object* x_12; +x_11 = 1; +x_12 = l_Lean_Meta_intro1(x_2, x_11, x_5, x_6); +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; +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_ctor_get(x_13, 0); +lean_inc(x_15); +x_16 = lean_ctor_get(x_13, 1); +lean_inc(x_16); +lean_dec(x_13); +x_17 = l___private_Init_Lean_Meta_Tactic_Injection_2__heqToEq(x_16, x_15, x_5, x_14); +if (lean_obj_tag(x_17) == 0) +{ +lean_object* x_18; lean_object* x_19; lean_object* x_20; lean_object* x_21; lean_object* x_22; +x_18 = lean_ctor_get(x_17, 0); +lean_inc(x_18); +x_19 = lean_ctor_get(x_17, 1); +lean_inc(x_19); +lean_dec(x_17); +x_20 = lean_ctor_get(x_18, 0); +lean_inc(x_20); +x_21 = lean_ctor_get(x_18, 1); +lean_inc(x_21); +lean_dec(x_18); +x_22 = lean_array_push(x_3, x_20); +x_1 = x_10; +x_2 = x_21; +x_3 = x_22; +x_6 = x_19; +goto _start; +} +else +{ +uint8_t x_24; +lean_dec(x_10); +lean_dec(x_3); +x_24 = !lean_is_exclusive(x_17); +if (x_24 == 0) +{ +return x_17; +} +else +{ +lean_object* x_25; lean_object* x_26; lean_object* x_27; +x_25 = lean_ctor_get(x_17, 0); +x_26 = lean_ctor_get(x_17, 1); +lean_inc(x_26); +lean_inc(x_25); +lean_dec(x_17); +x_27 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_27, 0, x_25); +lean_ctor_set(x_27, 1, x_26); +return x_27; +} +} +} +else +{ +uint8_t x_28; +lean_dec(x_10); +lean_dec(x_3); +x_28 = !lean_is_exclusive(x_12); +if (x_28 == 0) +{ +return x_12; +} +else +{ +lean_object* x_29; lean_object* x_30; lean_object* x_31; +x_29 = lean_ctor_get(x_12, 0); +x_30 = lean_ctor_get(x_12, 1); +lean_inc(x_30); +lean_inc(x_29); +lean_dec(x_12); +x_31 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_31, 0, x_29); +lean_ctor_set(x_31, 1, x_30); +return x_31; +} +} +} +else +{ +lean_object* x_32; lean_object* x_33; lean_object* x_34; +x_32 = lean_ctor_get(x_4, 0); +lean_inc(x_32); +x_33 = lean_ctor_get(x_4, 1); +lean_inc(x_33); +lean_dec(x_4); +x_34 = l_Lean_Meta_intro(x_2, x_32, x_5, x_6); +if (lean_obj_tag(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_34, 0); +lean_inc(x_35); +x_36 = lean_ctor_get(x_34, 1); +lean_inc(x_36); +lean_dec(x_34); +x_37 = lean_ctor_get(x_35, 0); +lean_inc(x_37); +x_38 = lean_ctor_get(x_35, 1); +lean_inc(x_38); +lean_dec(x_35); +x_39 = l___private_Init_Lean_Meta_Tactic_Injection_2__heqToEq(x_38, x_37, x_5, x_36); +if (lean_obj_tag(x_39) == 0) +{ +lean_object* x_40; lean_object* x_41; lean_object* x_42; lean_object* x_43; lean_object* x_44; +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 = lean_ctor_get(x_40, 0); +lean_inc(x_42); +x_43 = lean_ctor_get(x_40, 1); +lean_inc(x_43); +lean_dec(x_40); +x_44 = lean_array_push(x_3, x_42); +x_1 = x_10; +x_2 = x_43; +x_3 = x_44; +x_4 = x_33; +x_6 = x_41; +goto _start; +} +else +{ +uint8_t x_46; +lean_dec(x_33); +lean_dec(x_10); +lean_dec(x_3); +x_46 = !lean_is_exclusive(x_39); +if (x_46 == 0) +{ +return x_39; +} +else +{ +lean_object* x_47; lean_object* x_48; lean_object* x_49; +x_47 = lean_ctor_get(x_39, 0); +x_48 = lean_ctor_get(x_39, 1); +lean_inc(x_48); +lean_inc(x_47); +lean_dec(x_39); +x_49 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_49, 0, x_47); +lean_ctor_set(x_49, 1, x_48); +return x_49; +} +} +} +else +{ +uint8_t x_50; +lean_dec(x_33); +lean_dec(x_10); +lean_dec(x_3); +x_50 = !lean_is_exclusive(x_34); +if (x_50 == 0) +{ +return x_34; +} +else +{ +lean_object* x_51; lean_object* x_52; lean_object* x_53; +x_51 = lean_ctor_get(x_34, 0); +x_52 = lean_ctor_get(x_34, 1); +lean_inc(x_52); +lean_inc(x_51); +lean_dec(x_34); +x_53 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_53, 0, x_51); +lean_ctor_set(x_53, 1, x_52); +return x_53; +} +} +} +} +else +{ +lean_object* x_54; lean_object* x_55; +lean_dec(x_1); +x_54 = lean_alloc_ctor(1, 3, 0); +lean_ctor_set(x_54, 0, x_2); +lean_ctor_set(x_54, 1, x_3); +lean_ctor_set(x_54, 2, x_4); +x_55 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_55, 0, x_54); +lean_ctor_set(x_55, 1, x_6); +return x_55; +} +} +} +lean_object* l_Lean_Meta_injectionIntro___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: +{ +lean_object* x_7; +x_7 = l_Lean_Meta_injectionIntro___main(x_1, x_2, x_3, x_4, x_5, x_6); +lean_dec(x_5); +return x_7; +} +} +lean_object* l_Lean_Meta_injectionIntro(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_Meta_injectionIntro___main(x_1, x_2, x_3, x_4, x_5, x_6); +return x_7; +} +} +lean_object* l_Lean_Meta_injectionIntro___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_Meta_injectionIntro(x_1, x_2, x_3, x_4, x_5, x_6); +lean_dec(x_5); +return x_7; +} +} lean_object* l_Lean_Meta_injection(lean_object* x_1, lean_object* x_2, lean_object* x_3, uint8_t x_4, lean_object* x_5, lean_object* x_6) { _start: { @@ -1087,7 +2006,7 @@ return x_14; } else { -lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; +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_7, 1); lean_inc(x_15); lean_dec(x_7); @@ -1096,103 +2015,32 @@ lean_inc(x_16); x_17 = lean_ctor_get(x_8, 1); lean_inc(x_17); lean_dec(x_8); -lean_inc(x_3); -lean_inc(x_17); -x_18 = l_Lean_Meta_introNCore___at_Lean_Meta_introN___spec__1(x_4, x_16, x_17, x_3, x_5, x_15); -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; lean_object* x_21; lean_object* x_22; lean_object* x_23; lean_object* x_24; -x_20 = lean_ctor_get(x_18, 0); -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_drop___main___rarg(x_17, x_3); -lean_dec(x_3); -x_24 = lean_alloc_ctor(1, 3, 0); -lean_ctor_set(x_24, 0, x_22); -lean_ctor_set(x_24, 1, x_21); -lean_ctor_set(x_24, 2, x_23); -lean_ctor_set(x_18, 0, x_24); -return x_18; -} -else -{ -lean_object* x_25; lean_object* x_26; lean_object* x_27; lean_object* x_28; lean_object* x_29; lean_object* x_30; lean_object* x_31; -x_25 = lean_ctor_get(x_18, 0); -x_26 = lean_ctor_get(x_18, 1); -lean_inc(x_26); -lean_inc(x_25); -lean_dec(x_18); -x_27 = lean_ctor_get(x_25, 0); -lean_inc(x_27); -x_28 = lean_ctor_get(x_25, 1); -lean_inc(x_28); -lean_dec(x_25); -x_29 = l_List_drop___main___rarg(x_17, x_3); -lean_dec(x_3); -x_30 = lean_alloc_ctor(1, 3, 0); -lean_ctor_set(x_30, 0, x_28); -lean_ctor_set(x_30, 1, x_27); -lean_ctor_set(x_30, 2, 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_26); -return x_31; +x_18 = l_Array_empty___closed__1; +x_19 = l_Lean_Meta_injectionIntro___main(x_17, x_16, x_18, x_3, x_5, x_15); +return x_19; } } else { -uint8_t x_32; -lean_dec(x_17); +uint8_t x_20; lean_dec(x_3); -x_32 = !lean_is_exclusive(x_18); -if (x_32 == 0) -{ -return x_18; -} -else -{ -lean_object* x_33; lean_object* x_34; lean_object* x_35; -x_33 = lean_ctor_get(x_18, 0); -x_34 = lean_ctor_get(x_18, 1); -lean_inc(x_34); -lean_inc(x_33); -lean_dec(x_18); -x_35 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_35, 0, x_33); -lean_ctor_set(x_35, 1, x_34); -return x_35; -} -} -} -} -else -{ -uint8_t x_36; -lean_dec(x_3); -x_36 = !lean_is_exclusive(x_7); -if (x_36 == 0) +x_20 = !lean_is_exclusive(x_7); +if (x_20 == 0) { return x_7; } else { -lean_object* x_37; lean_object* x_38; lean_object* x_39; -x_37 = lean_ctor_get(x_7, 0); -x_38 = lean_ctor_get(x_7, 1); -lean_inc(x_38); -lean_inc(x_37); +lean_object* x_21; lean_object* x_22; lean_object* x_23; +x_21 = lean_ctor_get(x_7, 0); +x_22 = lean_ctor_get(x_7, 1); +lean_inc(x_22); +lean_inc(x_21); lean_dec(x_7); -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; +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; } } } diff --git a/stage0/stdlib/Init/Lean/Meta/Tactic/Subst.c b/stage0/stdlib/Init/Lean/Meta/Tactic/Subst.c index e95200d84a..e0d4da8a10 100644 --- a/stage0/stdlib/Init/Lean/Meta/Tactic/Subst.c +++ b/stage0/stdlib/Init/Lean/Meta/Tactic/Subst.c @@ -75,6 +75,7 @@ lean_object* l_Lean_Meta_substCore___lambda__3___closed__10; lean_object* l_Lean_Meta_subst___boxed(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Array_findSomeMAux___main___at_Lean_Meta_subst___spec__6(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_PersistentArray_findSomeMAux___main___at_Lean_Meta_subst___spec__3___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Meta_whnf(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_mkFVar(lean_object*); lean_object* l_Nat_foldMAux___main___at_Lean_Meta_substCore___spec__2(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); uint8_t l_Lean_Expr_isAppOfArity___main(lean_object*, lean_object*, lean_object*); @@ -1829,406 +1830,446 @@ lean_dec(x_26); x_28 = l_Lean_Expr_getRevArg_x21___main(x_13, x_27); if (x_3 == 0) { -uint8_t x_114; -x_114 = 0; -x_29 = x_114; -goto block_113; +uint8_t x_121; +x_121 = 0; +x_29 = x_121; +goto block_120; } else { -uint8_t x_115; -x_115 = 1; -x_29 = x_115; -goto block_113; +uint8_t x_122; +x_122 = 1; +x_29 = x_122; +goto block_120; } -block_113: +block_120: { -lean_object* x_30; lean_object* x_40; +lean_object* x_30; if (x_29 == 0) { lean_inc(x_24); -x_40 = x_24; -goto block_112; +x_30 = x_24; +goto block_119; } else { lean_inc(x_28); -x_40 = x_28; -goto block_112; +x_30 = x_28; +goto block_119; } -block_39: +block_119: { -lean_object* x_31; lean_object* x_32; -lean_dec(x_30); -x_31 = lean_alloc_ctor(2, 1, 0); -lean_ctor_set(x_31, 0, x_13); -x_32 = l_Lean_indentExpr(x_31); -if (x_29 == 0) -{ -lean_object* x_33; lean_object* x_34; lean_object* x_35; -x_33 = l_Lean_Meta_substCore___lambda__3___closed__12; -x_34 = lean_alloc_ctor(9, 2, 0); -lean_ctor_set(x_34, 0, x_33); -lean_ctor_set(x_34, 1, x_32); -x_35 = l_Lean_Meta_throwTacticEx___rarg(x_7, x_1, x_34, x_5, x_12); -lean_dec(x_5); -return x_35; -} -else -{ -lean_object* x_36; lean_object* x_37; lean_object* x_38; -x_36 = l_Lean_Meta_substCore___lambda__3___closed__16; -x_37 = lean_alloc_ctor(9, 2, 0); -lean_ctor_set(x_37, 0, x_36); -lean_ctor_set(x_37, 1, x_32); -x_38 = l_Lean_Meta_throwTacticEx___rarg(x_7, x_1, x_37, x_5, x_12); -lean_dec(x_5); -return x_38; -} -} -block_112: -{ -lean_object* x_41; +lean_object* x_31; if (x_29 == 0) { lean_dec(x_24); -x_41 = x_28; -goto block_111; +x_31 = x_28; +goto block_118; } else { lean_dec(x_28); -x_41 = x_24; -goto block_111; +x_31 = x_24; +goto block_118; } -block_111: +block_118: { -if (lean_obj_tag(x_40) == 1) -{ -lean_object* x_42; lean_object* x_43; lean_object* x_44; lean_object* x_95; uint8_t x_96; -lean_dec(x_13); -x_42 = lean_ctor_get(x_40, 0); -lean_inc(x_42); -x_43 = lean_ctor_get(x_12, 1); -lean_inc(x_43); -lean_inc(x_41); -x_95 = l_Lean_MetavarContext_exprDependsOn(x_43, x_41, x_42); -x_96 = lean_unbox(x_95); -lean_dec(x_95); -if (x_96 == 0) -{ -lean_dec(x_41); -lean_dec(x_40); -x_44 = x_12; -goto block_94; -} -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; uint8_t x_106; -lean_dec(x_42); -lean_dec(x_4); -lean_dec(x_2); -x_97 = lean_alloc_ctor(2, 1, 0); -lean_ctor_set(x_97, 0, x_40); -x_98 = l_Array_forMAux___main___at_Lean_Meta_clear___spec__5___closed__8; -x_99 = lean_alloc_ctor(9, 2, 0); -lean_ctor_set(x_99, 0, x_98); -lean_ctor_set(x_99, 1, x_97); -x_100 = l_Lean_Meta_substCore___lambda__3___closed__19; -x_101 = lean_alloc_ctor(9, 2, 0); -lean_ctor_set(x_101, 0, x_99); -lean_ctor_set(x_101, 1, x_100); -x_102 = lean_alloc_ctor(2, 1, 0); -lean_ctor_set(x_102, 0, x_41); -x_103 = l_Lean_indentExpr(x_102); -x_104 = lean_alloc_ctor(9, 2, 0); -lean_ctor_set(x_104, 0, x_101); -lean_ctor_set(x_104, 1, x_103); -x_105 = l_Lean_Meta_throwTacticEx___rarg(x_7, x_1, x_104, x_5, x_12); -lean_dec(x_5); -x_106 = !lean_is_exclusive(x_105); -if (x_106 == 0) -{ -return x_105; -} -else -{ -lean_object* x_107; lean_object* x_108; lean_object* x_109; -x_107 = lean_ctor_get(x_105, 0); -x_108 = lean_ctor_get(x_105, 1); -lean_inc(x_108); -lean_inc(x_107); -lean_dec(x_105); -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; -} -} -block_94: -{ -lean_object* x_45; +lean_object* x_32; lean_inc(x_5); -lean_inc(x_42); -x_45 = l_Lean_Meta_getLocalDecl(x_42, x_5, x_44); -if (lean_obj_tag(x_45) == 0) +x_32 = l_Lean_Meta_whnf(x_30, x_5, x_12); +if (lean_obj_tag(x_32) == 0) { -lean_object* x_46; lean_object* x_47; lean_object* x_48; lean_object* x_49; uint8_t x_50; lean_object* x_51; -x_46 = lean_ctor_get(x_45, 1); +lean_object* x_33; lean_object* x_34; lean_object* x_35; +x_33 = lean_ctor_get(x_32, 0); +lean_inc(x_33); +x_34 = lean_ctor_get(x_32, 1); +lean_inc(x_34); +lean_dec(x_32); +if (lean_obj_tag(x_33) == 1) +{ +lean_object* x_45; lean_object* x_46; lean_object* x_47; lean_object* x_98; uint8_t x_99; +lean_dec(x_13); +x_45 = lean_ctor_get(x_33, 0); +lean_inc(x_45); +x_46 = lean_ctor_get(x_34, 1); lean_inc(x_46); -lean_dec(x_45); -x_47 = l_Lean_mkAppStx___closed__9; -x_48 = lean_array_push(x_47, x_42); -x_49 = lean_array_push(x_48, x_2); -x_50 = 1; -x_51 = l_Lean_Meta_revert(x_1, x_49, x_50, x_5, x_46); -if (lean_obj_tag(x_51) == 0) +lean_inc(x_31); +x_98 = l_Lean_MetavarContext_exprDependsOn(x_46, x_31, x_45); +x_99 = lean_unbox(x_98); +lean_dec(x_98); +if (x_99 == 0) { -lean_object* x_52; lean_object* x_53; lean_object* x_54; lean_object* x_55; lean_object* x_56; uint8_t x_57; lean_object* x_58; -x_52 = lean_ctor_get(x_51, 0); -lean_inc(x_52); -x_53 = lean_ctor_get(x_51, 1); -lean_inc(x_53); -lean_dec(x_51); -x_54 = lean_ctor_get(x_52, 0); -lean_inc(x_54); -x_55 = lean_ctor_get(x_52, 1); +lean_dec(x_33); +lean_dec(x_31); +x_47 = x_34; +goto block_97; +} +else +{ +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; uint8_t x_109; +lean_dec(x_45); +lean_dec(x_4); +lean_dec(x_2); +x_100 = lean_alloc_ctor(2, 1, 0); +lean_ctor_set(x_100, 0, x_33); +x_101 = l_Array_forMAux___main___at_Lean_Meta_clear___spec__5___closed__8; +x_102 = lean_alloc_ctor(9, 2, 0); +lean_ctor_set(x_102, 0, x_101); +lean_ctor_set(x_102, 1, x_100); +x_103 = l_Lean_Meta_substCore___lambda__3___closed__19; +x_104 = lean_alloc_ctor(9, 2, 0); +lean_ctor_set(x_104, 0, x_102); +lean_ctor_set(x_104, 1, x_103); +x_105 = lean_alloc_ctor(2, 1, 0); +lean_ctor_set(x_105, 0, x_31); +x_106 = l_Lean_indentExpr(x_105); +x_107 = lean_alloc_ctor(9, 2, 0); +lean_ctor_set(x_107, 0, x_104); +lean_ctor_set(x_107, 1, x_106); +x_108 = l_Lean_Meta_throwTacticEx___rarg(x_7, x_1, x_107, x_5, x_34); +lean_dec(x_5); +x_109 = !lean_is_exclusive(x_108); +if (x_109 == 0) +{ +return x_108; +} +else +{ +lean_object* x_110; lean_object* x_111; lean_object* x_112; +x_110 = lean_ctor_get(x_108, 0); +x_111 = lean_ctor_get(x_108, 1); +lean_inc(x_111); +lean_inc(x_110); +lean_dec(x_108); +x_112 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_112, 0, x_110); +lean_ctor_set(x_112, 1, x_111); +return x_112; +} +} +block_97: +{ +lean_object* x_48; +lean_inc(x_5); +lean_inc(x_45); +x_48 = l_Lean_Meta_getLocalDecl(x_45, x_5, x_47); +if (lean_obj_tag(x_48) == 0) +{ +lean_object* x_49; lean_object* x_50; lean_object* x_51; lean_object* x_52; uint8_t x_53; lean_object* x_54; +x_49 = lean_ctor_get(x_48, 1); +lean_inc(x_49); +lean_dec(x_48); +x_50 = l_Lean_mkAppStx___closed__9; +x_51 = lean_array_push(x_50, x_45); +x_52 = lean_array_push(x_51, x_2); +x_53 = 1; +x_54 = l_Lean_Meta_revert(x_1, x_52, x_53, x_5, x_49); +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; lean_object* x_61; +x_55 = lean_ctor_get(x_54, 0); lean_inc(x_55); -lean_dec(x_52); -x_56 = lean_box(0); -x_57 = 0; -x_58 = l_Lean_Meta_introNCore___at_Lean_Meta_introN___spec__1(x_57, x_55, x_25, x_56, x_5, x_53); -if (lean_obj_tag(x_58) == 0) -{ -lean_object* x_59; lean_object* x_60; lean_object* x_61; lean_object* x_62; lean_object* x_63; lean_object* x_64; lean_object* x_65; lean_object* x_66; lean_object* x_67; lean_object* x_68; lean_object* x_69; lean_object* x_70; lean_object* x_71; lean_object* x_72; -x_59 = lean_ctor_get(x_58, 0); -lean_inc(x_59); -x_60 = lean_ctor_get(x_58, 1); -lean_inc(x_60); -lean_dec(x_58); -x_61 = lean_ctor_get(x_59, 0); -lean_inc(x_61); -x_62 = lean_ctor_get(x_59, 1); -lean_inc(x_62); -lean_dec(x_59); -x_63 = l_Lean_Name_inhabited; -x_64 = lean_array_get(x_63, x_61, x_19); -lean_inc(x_64); -x_65 = l_Lean_mkFVar(x_64); -x_66 = lean_array_get(x_63, x_61, x_21); -lean_dec(x_61); -lean_inc(x_66); -x_67 = l_Lean_mkFVar(x_66); -lean_inc(x_62); -x_68 = lean_alloc_closure((void*)(l_Lean_Meta_getMVarDecl___boxed), 3, 1); -lean_closure_set(x_68, 0, x_62); -x_69 = lean_box(x_29); -lean_inc(x_62); -x_70 = lean_alloc_closure((void*)(l_Lean_Meta_substCore___lambda__2___boxed), 14, 11); -lean_closure_set(x_70, 0, x_66); -lean_closure_set(x_70, 1, x_65); -lean_closure_set(x_70, 2, x_4); -lean_closure_set(x_70, 3, x_62); -lean_closure_set(x_70, 4, x_64); -lean_closure_set(x_70, 5, x_54); -lean_closure_set(x_70, 6, x_56); -lean_closure_set(x_70, 7, x_69); -lean_closure_set(x_70, 8, x_67); -lean_closure_set(x_70, 9, x_47); -lean_closure_set(x_70, 10, x_14); -x_71 = lean_alloc_closure((void*)(l_ReaderT_bind___at_Lean_Meta_isClassExpensive___main___spec__4___rarg), 4, 2); -lean_closure_set(x_71, 0, x_68); -lean_closure_set(x_71, 1, x_70); -x_72 = l_Lean_Meta_getMVarDecl(x_62, x_5, x_60); -if (lean_obj_tag(x_72) == 0) -{ -lean_object* x_73; lean_object* x_74; lean_object* x_75; lean_object* x_76; lean_object* x_77; -x_73 = lean_ctor_get(x_72, 0); -lean_inc(x_73); -x_74 = lean_ctor_get(x_72, 1); -lean_inc(x_74); -lean_dec(x_72); -x_75 = lean_ctor_get(x_73, 1); -lean_inc(x_75); -x_76 = lean_ctor_get(x_73, 4); -lean_inc(x_76); -lean_dec(x_73); -x_77 = l_Lean_Meta_withLocalContext___rarg(x_75, x_76, x_71, x_5, x_74); -lean_dec(x_5); -return x_77; -} -else -{ -uint8_t x_78; -lean_dec(x_71); -lean_dec(x_5); -x_78 = !lean_is_exclusive(x_72); -if (x_78 == 0) -{ -return x_72; -} -else -{ -lean_object* x_79; lean_object* x_80; lean_object* x_81; -x_79 = lean_ctor_get(x_72, 0); -x_80 = lean_ctor_get(x_72, 1); -lean_inc(x_80); -lean_inc(x_79); -lean_dec(x_72); -x_81 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_81, 0, x_79); -lean_ctor_set(x_81, 1, x_80); -return x_81; -} -} -} -else -{ -uint8_t x_82; +x_56 = lean_ctor_get(x_54, 1); +lean_inc(x_56); lean_dec(x_54); -lean_dec(x_5); -lean_dec(x_4); -x_82 = !lean_is_exclusive(x_58); -if (x_82 == 0) +x_57 = lean_ctor_get(x_55, 0); +lean_inc(x_57); +x_58 = lean_ctor_get(x_55, 1); +lean_inc(x_58); +lean_dec(x_55); +x_59 = lean_box(0); +x_60 = 0; +x_61 = l_Lean_Meta_introNCore___at_Lean_Meta_introN___spec__1(x_60, x_58, x_25, x_59, x_5, x_56); +if (lean_obj_tag(x_61) == 0) { -return x_58; +lean_object* x_62; lean_object* x_63; lean_object* x_64; lean_object* x_65; lean_object* x_66; lean_object* x_67; lean_object* x_68; lean_object* x_69; lean_object* x_70; lean_object* x_71; lean_object* x_72; lean_object* x_73; lean_object* x_74; lean_object* x_75; +x_62 = lean_ctor_get(x_61, 0); +lean_inc(x_62); +x_63 = lean_ctor_get(x_61, 1); +lean_inc(x_63); +lean_dec(x_61); +x_64 = lean_ctor_get(x_62, 0); +lean_inc(x_64); +x_65 = lean_ctor_get(x_62, 1); +lean_inc(x_65); +lean_dec(x_62); +x_66 = l_Lean_Name_inhabited; +x_67 = lean_array_get(x_66, x_64, x_19); +lean_inc(x_67); +x_68 = l_Lean_mkFVar(x_67); +x_69 = lean_array_get(x_66, x_64, x_21); +lean_dec(x_64); +lean_inc(x_69); +x_70 = l_Lean_mkFVar(x_69); +lean_inc(x_65); +x_71 = lean_alloc_closure((void*)(l_Lean_Meta_getMVarDecl___boxed), 3, 1); +lean_closure_set(x_71, 0, x_65); +x_72 = lean_box(x_29); +lean_inc(x_65); +x_73 = lean_alloc_closure((void*)(l_Lean_Meta_substCore___lambda__2___boxed), 14, 11); +lean_closure_set(x_73, 0, x_69); +lean_closure_set(x_73, 1, x_68); +lean_closure_set(x_73, 2, x_4); +lean_closure_set(x_73, 3, x_65); +lean_closure_set(x_73, 4, x_67); +lean_closure_set(x_73, 5, x_57); +lean_closure_set(x_73, 6, x_59); +lean_closure_set(x_73, 7, x_72); +lean_closure_set(x_73, 8, x_70); +lean_closure_set(x_73, 9, x_50); +lean_closure_set(x_73, 10, x_14); +x_74 = lean_alloc_closure((void*)(l_ReaderT_bind___at_Lean_Meta_isClassExpensive___main___spec__4___rarg), 4, 2); +lean_closure_set(x_74, 0, x_71); +lean_closure_set(x_74, 1, x_73); +x_75 = l_Lean_Meta_getMVarDecl(x_65, x_5, x_63); +if (lean_obj_tag(x_75) == 0) +{ +lean_object* x_76; lean_object* x_77; lean_object* x_78; lean_object* x_79; lean_object* x_80; +x_76 = lean_ctor_get(x_75, 0); +lean_inc(x_76); +x_77 = lean_ctor_get(x_75, 1); +lean_inc(x_77); +lean_dec(x_75); +x_78 = lean_ctor_get(x_76, 1); +lean_inc(x_78); +x_79 = lean_ctor_get(x_76, 4); +lean_inc(x_79); +lean_dec(x_76); +x_80 = l_Lean_Meta_withLocalContext___rarg(x_78, x_79, x_74, x_5, x_77); +lean_dec(x_5); +return x_80; } else { -lean_object* x_83; lean_object* x_84; lean_object* x_85; -x_83 = lean_ctor_get(x_58, 0); -x_84 = lean_ctor_get(x_58, 1); -lean_inc(x_84); +uint8_t x_81; +lean_dec(x_74); +lean_dec(x_5); +x_81 = !lean_is_exclusive(x_75); +if (x_81 == 0) +{ +return x_75; +} +else +{ +lean_object* x_82; lean_object* x_83; lean_object* x_84; +x_82 = lean_ctor_get(x_75, 0); +x_83 = lean_ctor_get(x_75, 1); lean_inc(x_83); -lean_dec(x_58); -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; +lean_inc(x_82); +lean_dec(x_75); +x_84 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_84, 0, x_82); +lean_ctor_set(x_84, 1, x_83); +return x_84; } } } else { -uint8_t x_86; +uint8_t x_85; +lean_dec(x_57); lean_dec(x_5); lean_dec(x_4); -x_86 = !lean_is_exclusive(x_51); -if (x_86 == 0) +x_85 = !lean_is_exclusive(x_61); +if (x_85 == 0) { -return x_51; +return x_61; } else { -lean_object* x_87; lean_object* x_88; lean_object* x_89; -x_87 = lean_ctor_get(x_51, 0); -x_88 = lean_ctor_get(x_51, 1); -lean_inc(x_88); +lean_object* x_86; lean_object* x_87; lean_object* x_88; +x_86 = lean_ctor_get(x_61, 0); +x_87 = lean_ctor_get(x_61, 1); lean_inc(x_87); -lean_dec(x_51); -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_inc(x_86); +lean_dec(x_61); +x_88 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_88, 0, x_86); +lean_ctor_set(x_88, 1, x_87); +return x_88; } } } else { -uint8_t x_90; -lean_dec(x_42); +uint8_t x_89; lean_dec(x_5); lean_dec(x_4); -lean_dec(x_2); -lean_dec(x_1); -x_90 = !lean_is_exclusive(x_45); -if (x_90 == 0) +x_89 = !lean_is_exclusive(x_54); +if (x_89 == 0) { -return x_45; +return x_54; } else { -lean_object* x_91; lean_object* x_92; lean_object* x_93; -x_91 = lean_ctor_get(x_45, 0); -x_92 = lean_ctor_get(x_45, 1); -lean_inc(x_92); +lean_object* x_90; lean_object* x_91; lean_object* x_92; +x_90 = lean_ctor_get(x_54, 0); +x_91 = lean_ctor_get(x_54, 1); lean_inc(x_91); +lean_inc(x_90); +lean_dec(x_54); +x_92 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_92, 0, x_90); +lean_ctor_set(x_92, 1, x_91); +return x_92; +} +} +} +else +{ +uint8_t x_93; lean_dec(x_45); -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_110; -lean_dec(x_41); -lean_dec(x_40); -lean_dec(x_4); -lean_dec(x_2); -x_110 = lean_box(0); -x_30 = x_110; -goto block_39; -} -} -} -} -} -} -else -{ -uint8_t x_116; lean_dec(x_5); lean_dec(x_4); lean_dec(x_2); lean_dec(x_1); -x_116 = !lean_is_exclusive(x_10); -if (x_116 == 0) +x_93 = !lean_is_exclusive(x_48); +if (x_93 == 0) +{ +return x_48; +} +else +{ +lean_object* x_94; lean_object* x_95; lean_object* x_96; +x_94 = lean_ctor_get(x_48, 0); +x_95 = lean_ctor_get(x_48, 1); +lean_inc(x_95); +lean_inc(x_94); +lean_dec(x_48); +x_96 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_96, 0, x_94); +lean_ctor_set(x_96, 1, x_95); +return x_96; +} +} +} +} +else +{ +lean_object* x_113; +lean_dec(x_33); +lean_dec(x_31); +lean_dec(x_4); +lean_dec(x_2); +x_113 = lean_box(0); +x_35 = x_113; +goto block_44; +} +block_44: +{ +lean_object* x_36; lean_object* x_37; +lean_dec(x_35); +x_36 = lean_alloc_ctor(2, 1, 0); +lean_ctor_set(x_36, 0, x_13); +x_37 = l_Lean_indentExpr(x_36); +if (x_29 == 0) +{ +lean_object* x_38; lean_object* x_39; lean_object* x_40; +x_38 = l_Lean_Meta_substCore___lambda__3___closed__12; +x_39 = lean_alloc_ctor(9, 2, 0); +lean_ctor_set(x_39, 0, x_38); +lean_ctor_set(x_39, 1, x_37); +x_40 = l_Lean_Meta_throwTacticEx___rarg(x_7, x_1, x_39, x_5, x_34); +lean_dec(x_5); +return x_40; +} +else +{ +lean_object* x_41; lean_object* x_42; lean_object* x_43; +x_41 = l_Lean_Meta_substCore___lambda__3___closed__16; +x_42 = lean_alloc_ctor(9, 2, 0); +lean_ctor_set(x_42, 0, x_41); +lean_ctor_set(x_42, 1, x_37); +x_43 = l_Lean_Meta_throwTacticEx___rarg(x_7, x_1, x_42, x_5, x_34); +lean_dec(x_5); +return x_43; +} +} +} +else +{ +uint8_t x_114; +lean_dec(x_31); +lean_dec(x_13); +lean_dec(x_5); +lean_dec(x_4); +lean_dec(x_2); +lean_dec(x_1); +x_114 = !lean_is_exclusive(x_32); +if (x_114 == 0) +{ +return x_32; +} +else +{ +lean_object* x_115; lean_object* x_116; lean_object* x_117; +x_115 = lean_ctor_get(x_32, 0); +x_116 = lean_ctor_get(x_32, 1); +lean_inc(x_116); +lean_inc(x_115); +lean_dec(x_32); +x_117 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_117, 0, x_115); +lean_ctor_set(x_117, 1, x_116); +return x_117; +} +} +} +} +} +} +} +else +{ +uint8_t x_123; +lean_dec(x_5); +lean_dec(x_4); +lean_dec(x_2); +lean_dec(x_1); +x_123 = !lean_is_exclusive(x_10); +if (x_123 == 0) { return x_10; } else { -lean_object* x_117; lean_object* x_118; lean_object* x_119; -x_117 = lean_ctor_get(x_10, 0); -x_118 = lean_ctor_get(x_10, 1); -lean_inc(x_118); -lean_inc(x_117); +lean_object* x_124; lean_object* x_125; lean_object* x_126; +x_124 = lean_ctor_get(x_10, 0); +x_125 = lean_ctor_get(x_10, 1); +lean_inc(x_125); +lean_inc(x_124); lean_dec(x_10); -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; +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; } } } else { -uint8_t x_120; +uint8_t x_127; lean_dec(x_5); lean_dec(x_4); lean_dec(x_2); lean_dec(x_1); -x_120 = !lean_is_exclusive(x_8); -if (x_120 == 0) +x_127 = !lean_is_exclusive(x_8); +if (x_127 == 0) { return x_8; } else { -lean_object* x_121; lean_object* x_122; lean_object* x_123; -x_121 = lean_ctor_get(x_8, 0); -x_122 = lean_ctor_get(x_8, 1); -lean_inc(x_122); -lean_inc(x_121); +lean_object* x_128; lean_object* x_129; lean_object* x_130; +x_128 = lean_ctor_get(x_8, 0); +x_129 = lean_ctor_get(x_8, 1); +lean_inc(x_129); +lean_inc(x_128); lean_dec(x_8); -x_123 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_123, 0, x_121); -lean_ctor_set(x_123, 1, x_122); -return x_123; +x_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; } } } diff --git a/stage0/stdlib/Init/Lean/MetavarContext.c b/stage0/stdlib/Init/Lean/MetavarContext.c index c23f828cc0..aa8569b550 100644 --- a/stage0/stdlib/Init/Lean/MetavarContext.c +++ b/stage0/stdlib/Init/Lean/MetavarContext.c @@ -9538,7 +9538,7 @@ return x_247; block_223: { uint8_t x_198; -x_198 = l_Lean_Expr_hasMVar(x_196); +x_198 = l_Lean_Expr_hasExprMVar(x_196); if (x_198 == 0) { lean_object* x_199; lean_object* x_200; uint8_t x_201;