chore: update stage0
This commit is contained in:
parent
9a9f3263d4
commit
c3ce32a4e9
41 changed files with 25385 additions and 16768 deletions
18
stage0/src/Init/Conv.lean
generated
18
stage0/src/Init/Conv.lean
generated
|
|
@ -72,7 +72,7 @@ syntax (name := arg) "arg " "@"? num : conv
|
|||
|
||||
/-- `ext x` traverses into a binder (a `fun x => e` or `∀ x, e` expression)
|
||||
to target `e`, introducing name `x` in the process. -/
|
||||
syntax (name := ext) "ext " (colGt ident)* : conv
|
||||
syntax (name := ext) "ext" (colGt ident)* : conv
|
||||
|
||||
/-- `change t'` replaces the target `t` with `t'`,
|
||||
assuming `t` and `t'` are definitionally equal. -/
|
||||
|
|
@ -96,11 +96,11 @@ syntax (name := unfold) "unfold " (colGt ident)+ : conv
|
|||
syntax (name := pattern) "pattern " term : conv
|
||||
|
||||
/-- `rw [thm]` rewrites the target using `thm`. See the `rw` tactic for more information. -/
|
||||
syntax (name := rewrite) "rewrite " (config)? rwRuleSeq : conv
|
||||
syntax (name := rewrite) "rewrite" (config)? rwRuleSeq : conv
|
||||
|
||||
/-- `simp [thm]` performs simplification using `thm` and marked `@[simp]` lemmas.
|
||||
See the `simp` tactic for more information. -/
|
||||
syntax (name := simp) "simp " (config)? (discharger)? (&"only ")? ("[" (simpStar <|> simpErase <|> simpLemma),* "]")? : conv
|
||||
syntax (name := simp) "simp" (config)? (discharger)? (&" only")? (" [" (simpStar <|> simpErase <|> simpLemma),* "]")? : conv
|
||||
|
||||
/-- `simp_match` simplifies match expressions. For example,
|
||||
```
|
||||
|
|
@ -128,19 +128,19 @@ syntax (name := paren) "(" convSeq ")" : conv
|
|||
|
||||
/-- `conv => cs` runs `cs` in sequence on the target `t`,
|
||||
resulting in `t'`, which becomes the new target subgoal. -/
|
||||
syntax (name := convConvSeq) "conv " " => " convSeq : conv
|
||||
syntax (name := convConvSeq) "conv" " => " convSeq : conv
|
||||
|
||||
/-- `· conv` focuses on the main conv goal and tries to solve it using `s` -/
|
||||
macro dot:("·" <|> ".") s:convSeq : conv => `({%$dot ($s) })
|
||||
|
||||
/-- `rw [rules]` applies the given list of rewrite rules to the target.
|
||||
See the `rw` tactic for more information. -/
|
||||
macro "rw " c:(config)? s:rwRuleSeq : conv => `(rewrite $[$c]? $s)
|
||||
macro "rw" c:(config)? s:rwRuleSeq : conv => `(rewrite $[$c]? $s)
|
||||
|
||||
/-- `erw [rules]` is a shorthand for `rw (config := { transparency := .default }) [rules]`.
|
||||
This does rewriting up to unfolding of regular definitions (by comparison to regular `rw`
|
||||
which only unfolds `@[reducible]` definitions). -/
|
||||
macro "erw " s:rwRuleSeq : conv => `(rw (config := { transparency := .default }) $s)
|
||||
macro "erw" s:rwRuleSeq : conv => `(rw (config := { transparency := .default }) $s)
|
||||
|
||||
/-- `args` traverses into all arguments. Synonym for `congr`. -/
|
||||
macro "args" : conv => `(congr)
|
||||
|
|
@ -149,7 +149,7 @@ macro "left" : conv => `(lhs)
|
|||
/-- `right` traverses into the right argument. Synonym for `rhs`. -/
|
||||
macro "right" : conv => `(rhs)
|
||||
/-- `intro` traverses into binders. Synonym for `ext`. -/
|
||||
macro "intro " xs:(colGt ident)* : conv => `(conv| ext $xs*)
|
||||
macro "intro" xs:(colGt ident)* : conv => `(conv| ext $xs*)
|
||||
|
||||
syntax enterArg := ident <|> ("@"? num)
|
||||
|
||||
|
|
@ -160,7 +160,7 @@ It is a shorthand for other conv tactics as follows:
|
|||
* `enter [x]` (where `x` is an identifier) is equivalent to `ext x`.
|
||||
For example, given the target `f (g a (fun x => x b))`, `enter [1, 2, x, 1]`
|
||||
will traverse to the subterm `b`. -/
|
||||
syntax "enter " "[" (colGt enterArg),+ "]": conv
|
||||
syntax "enter" " [" (colGt enterArg),+ "]": conv
|
||||
macro_rules
|
||||
| `(conv| enter [$i:num]) => `(conv| arg $i)
|
||||
| `(conv| enter [@$i]) => `(conv| arg @$i)
|
||||
|
|
@ -187,7 +187,7 @@ macro "apply " e:term : conv => `(tactic => apply $e)
|
|||
syntax (name := first) "first " withPosition((colGe "|" convSeq)+) : conv
|
||||
|
||||
/-- `repeat convs` runs the sequence `convs` repeatedly until it fails to apply. -/
|
||||
syntax "repeat " convSeq : conv
|
||||
syntax "repeat" convSeq : conv
|
||||
macro_rules
|
||||
| `(conv| repeat $seq) => `(conv| first | ($seq); repeat $seq | rfl)
|
||||
|
||||
|
|
|
|||
6
stage0/src/Init/Meta.lean
generated
6
stage0/src/Init/Meta.lean
generated
|
|
@ -1278,11 +1278,11 @@ syntax dsimpKind := atomic("(" &"dsimp") " := " &"true" ")"
|
|||
macro (name := declareSimpLikeTactic) doc?:(docComment)? "declare_simp_like_tactic" opt:((simpAllKind <|> dsimpKind)?) tacName:ident tacToken:str updateCfg:term : command => do
|
||||
let (kind, tkn, stx) ←
|
||||
if opt.raw.isNone then
|
||||
pure (← `(``simp), ← `("simp "), ← `($[$doc?:docComment]? syntax (name := $tacName) $tacToken:str (config)? (discharger)? (&"only ")? ("[" (simpStar <|> simpErase <|> simpLemma),* "]")? (location)? : tactic))
|
||||
pure (← `(``simp), ← `("simp"), ← `($[$doc?:docComment]? syntax (name := $tacName) $tacToken:str (config)? (discharger)? (&" only")? (" [" (simpStar <|> simpErase <|> simpLemma),* "]")? (location)? : tactic))
|
||||
else if opt.raw[0].getKind == ``simpAllKind then
|
||||
pure (← `(``simpAll), ← `("simp_all "), ← `($[$doc?:docComment]? syntax (name := $tacName) $tacToken:str (config)? (discharger)? (&"only ")? ("[" (simpErase <|> simpLemma),* "]")? : tactic))
|
||||
pure (← `(``simpAll), ← `("simp_all"), ← `($[$doc?:docComment]? syntax (name := $tacName) $tacToken:str (config)? (discharger)? (&" only")? (" [" (simpErase <|> simpLemma),* "]")? : tactic))
|
||||
else
|
||||
pure (← `(``dsimp), ← `("dsimp "), ← `($[$doc?:docComment]? syntax (name := $tacName) $tacToken:str (config)? (discharger)? (&"only ")? ("[" (simpErase <|> simpLemma),* "]")? (location)? : tactic))
|
||||
pure (← `(``dsimp), ← `("dsimp"), ← `($[$doc?:docComment]? syntax (name := $tacName) $tacToken:str (config)? (discharger)? (&" only")? (" [" (simpErase <|> simpLemma),* "]")? (location)? : tactic))
|
||||
`($stx:command
|
||||
@[macro $tacName] def expandSimp : Macro := fun s => do
|
||||
let c ← match s[1][0] with
|
||||
|
|
|
|||
22
stage0/src/Init/Tactics.lean
generated
22
stage0/src/Init/Tactics.lean
generated
|
|
@ -303,7 +303,7 @@ It synthesizes a value of any target type by typeclass inference.
|
|||
macro "infer_instance" : tactic => `(exact inferInstance)
|
||||
|
||||
/-- Optional configuration option for tactics -/
|
||||
syntax config := atomic("(" &"config") " := " term ")"
|
||||
syntax config := atomic(" (" &"config") " := " term ")"
|
||||
|
||||
/-- The `*` location refers to all hypotheses and the goal. -/
|
||||
syntax locationWildcard := "*"
|
||||
|
|
@ -347,7 +347,7 @@ If `thm` is a theorem `a = b`, then as a rewrite rule,
|
|||
-/
|
||||
syntax rwRule := ("← " <|> "<- ")? term
|
||||
/-- A `rwRuleSeq` is a list of `rwRule` in brackets. -/
|
||||
syntax rwRuleSeq := "[" rwRule,*,? "]"
|
||||
syntax rwRuleSeq := " [" rwRule,*,? "]"
|
||||
|
||||
/--
|
||||
`rewrite [e]` applies identity `e` as a rewrite rule to the target of the main goal.
|
||||
|
|
@ -359,12 +359,12 @@ This provides a convenient way to unfold `e`.
|
|||
list of hypotheses in the local context. In the latter case, a turnstile `⊢` or `|-`
|
||||
can also be used, to signify the target of the goal.
|
||||
-/
|
||||
syntax (name := rewriteSeq) "rewrite " (config)? rwRuleSeq (location)? : tactic
|
||||
syntax (name := rewriteSeq) "rewrite" (config)? rwRuleSeq (location)? : tactic
|
||||
|
||||
/--
|
||||
`rw` is like `rewrite`, but also tries to close the goal by "cheap" (reducible) `rfl` afterwards.
|
||||
-/
|
||||
macro (name := rwSeq) "rw " c:(config)? s:rwRuleSeq l:(location)? : tactic =>
|
||||
macro (name := rwSeq) "rw" c:(config)? s:rwRuleSeq l:(location)? : tactic =>
|
||||
match s with
|
||||
| `(rwRuleSeq| [$rs,*]%$rbrak) =>
|
||||
-- We show the `rfl` state on `]`
|
||||
|
|
@ -396,7 +396,7 @@ syntax (name := injections) "injections" (colGt (ident <|> hole))* : tactic
|
|||
The discharger clause of `simp` and related tactics.
|
||||
This is a tactic used to discharge the side conditions on conditional rewrite rules.
|
||||
-/
|
||||
syntax discharger := atomic("(" (&"discharger" <|> &"disch")) " := " tacticSeq ")"
|
||||
syntax discharger := atomic(" (" (&"discharger" <|> &"disch")) " := " tacticSeq ")"
|
||||
|
||||
/-- Use this rewrite rule before entering the subterms -/
|
||||
syntax simpPre := "↓"
|
||||
|
|
@ -433,23 +433,23 @@ non-dependent hypotheses. It has many variants:
|
|||
- `simp [*] at *` simplifies target and all (propositional) hypotheses using the
|
||||
other hypotheses.
|
||||
-/
|
||||
syntax (name := simp) "simp " (config)? (discharger)? (&"only ")?
|
||||
("[" (simpStar <|> simpErase <|> simpLemma),* "]")? (location)? : tactic
|
||||
syntax (name := simp) "simp" (config)? (discharger)? (&" only")?
|
||||
(" [" (simpStar <|> simpErase <|> simpLemma),* "]")? (location)? : tactic
|
||||
/--
|
||||
`simp_all` is a stronger version of `simp [*] at *` where the hypotheses and target
|
||||
are simplified multiple times until no simplication is applicable.
|
||||
Only non-dependent propositional hypotheses are considered.
|
||||
-/
|
||||
syntax (name := simpAll) "simp_all " (config)? (discharger)? (&"only ")?
|
||||
("[" (simpErase <|> simpLemma),* "]")? : tactic
|
||||
syntax (name := simpAll) "simp_all" (config)? (discharger)? (&" only")?
|
||||
(" [" (simpErase <|> simpLemma),* "]")? : tactic
|
||||
|
||||
/--
|
||||
The `dsimp` tactic is the definitional simplifier. It is similar to `simp` but only
|
||||
applies theorems that hold by reflexivity. Thus, the result is guaranteed to be
|
||||
definitionally equal to the input.
|
||||
-/
|
||||
syntax (name := dsimp) "dsimp " (config)? (discharger)? (&"only ")?
|
||||
("[" (simpErase <|> simpLemma),* "]")? (location)? : tactic
|
||||
syntax (name := dsimp) "dsimp" (config)? (discharger)? (&" only")?
|
||||
(" [" (simpErase <|> simpLemma),* "]")? (location)? : tactic
|
||||
|
||||
/--
|
||||
`delta id1 id2 ...` delta-expands the definitions `id1`, `id2`, ....
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@ where
|
|||
go mvarId
|
||||
else if let some mvarId ← whnfReducibleLHS? mvarId then
|
||||
go mvarId
|
||||
else match (← simpTargetStar mvarId {}) with
|
||||
else match (← simpTargetStar mvarId {}).1 with
|
||||
| TacticResultCNM.closed => return ()
|
||||
| TacticResultCNM.modified mvarId => go mvarId
|
||||
| TacticResultCNM.noChange =>
|
||||
|
|
|
|||
4
stage0/src/Lean/Elab/PreDefinition/WF/Eqns.lean
generated
4
stage0/src/Lean/Elab/PreDefinition/WF/Eqns.lean
generated
|
|
@ -105,7 +105,7 @@ where
|
|||
def simpMatchWF? (info : EqnInfo) (us : List Level) (fixedPrefix : Array Expr) (mvarId : MVarId) : MetaM (Option MVarId) :=
|
||||
mvarId.withContext do
|
||||
let target ← instantiateMVars (← mvarId.getType)
|
||||
let targetNew ← Simp.main target (← Split.getSimpMatchContext) (methods := { pre })
|
||||
let (targetNew, _) ← Simp.main target (← Split.getSimpMatchContext) (methods := { pre })
|
||||
let mvarIdNew ← applySimpResultToTarget mvarId target targetNew
|
||||
if mvarId != mvarIdNew then return some mvarIdNew else return none
|
||||
where
|
||||
|
|
@ -169,7 +169,7 @@ private partial def mkProof (declName : Name) (info : EqnInfo) (type : Expr) : M
|
|||
go mvarId
|
||||
else if let some mvarId ← whnfReducibleLHS? mvarId then
|
||||
go mvarId
|
||||
else match (← simpTargetStar mvarId { config.dsimp := false }) with
|
||||
else match (← simpTargetStar mvarId { config.dsimp := false }).1 with
|
||||
| TacticResultCNM.closed => return ()
|
||||
| TacticResultCNM.modified mvarId => go mvarId
|
||||
| TacticResultCNM.noChange =>
|
||||
|
|
|
|||
2
stage0/src/Lean/Elab/Tactic/Conv/Pattern.lean
generated
2
stage0/src/Lean/Elab/Tactic/Conv/Pattern.lean
generated
|
|
@ -48,7 +48,7 @@ private def pre (pattern : AbstractMVarsResult) (found? : IO.Ref (Option Expr))
|
|||
|
||||
private def findPattern? (pattern : AbstractMVarsResult) (e : Expr) : MetaM (Option (MVarId × Simp.Result)) := do
|
||||
let found? ← IO.mkRef none
|
||||
let result ← Simp.main e (← getContext) (methods := { pre := pre pattern found? })
|
||||
let (result, _) ← Simp.main e (← getContext) (methods := { pre := pre pattern found? })
|
||||
if let some newGoal ← found?.get then
|
||||
return some (newGoal.mvarId!, result)
|
||||
else
|
||||
|
|
|
|||
2
stage0/src/Lean/Elab/Tactic/Conv/Simp.lean
generated
2
stage0/src/Lean/Elab/Tactic/Conv/Simp.lean
generated
|
|
@ -19,7 +19,7 @@ def applySimpResult (result : Simp.Result) : TacticM Unit := do
|
|||
@[builtinTactic Lean.Parser.Tactic.Conv.simp] def evalSimp : Tactic := fun stx => withMainContext do
|
||||
let { ctx, dischargeWrapper, .. } ← mkSimpContext stx (eraseLocal := false)
|
||||
let lhs ← getLhs
|
||||
let result ← dischargeWrapper.with fun d? => simp lhs ctx (discharge? := d?)
|
||||
let (result, _) ← dischargeWrapper.with fun d? => simp lhs ctx (discharge? := d?)
|
||||
applySimpResult result
|
||||
|
||||
@[builtinTactic Lean.Parser.Tactic.Conv.simpMatch] def evalSimpMatch : Tactic := fun _ => withMainContext do
|
||||
|
|
|
|||
90
stage0/src/Lean/Elab/Tactic/Simp.lean
generated
90
stage0/src/Lean/Elab/Tactic/Simp.lean
generated
|
|
@ -87,7 +87,7 @@ def elabSimpConfig (optConfig : Syntax) (kind : SimpKind) : TermElabM Meta.Simp.
|
|||
| .simpAll => return (← elabSimpConfigCtxCore optConfig).toConfig
|
||||
| .dsimp => return { (← elabDSimpConfigCore optConfig) with }
|
||||
|
||||
private def addDeclToUnfoldOrTheorem (thms : Meta.SimpTheorems) (e : Expr) (post : Bool) (inv : Bool) (kind : SimpKind) : MetaM Meta.SimpTheorems := do
|
||||
private def addDeclToUnfoldOrTheorem (thms : Meta.SimpTheorems) (name : Name) (e : Expr) (post : Bool) (inv : Bool) (kind : SimpKind) : MetaM Meta.SimpTheorems := do
|
||||
if e.isConst then
|
||||
let declName := e.constName!
|
||||
let info ← getConstInfo declName
|
||||
|
|
@ -101,9 +101,9 @@ private def addDeclToUnfoldOrTheorem (thms : Meta.SimpTheorems) (e : Expr) (post
|
|||
else
|
||||
thms.addDeclToUnfold declName
|
||||
else
|
||||
thms.add #[] e (post := post) (inv := inv)
|
||||
thms.add name #[] e (post := post) (inv := inv)
|
||||
|
||||
private def addSimpTheorem (thms : Meta.SimpTheorems) (stx : Syntax) (post : Bool) (inv : Bool) : TermElabM Meta.SimpTheorems := do
|
||||
private def addSimpTheorem (thms : Meta.SimpTheorems) (name : Name) (stx : Syntax) (post : Bool) (inv : Bool) : TermElabM Meta.SimpTheorems := do
|
||||
let (levelParams, proof) ← Term.withoutModifyingElabMetaStateWithInfo <| withRef stx <| Term.withoutErrToSorry do
|
||||
let e ← Term.elabTerm stx none
|
||||
Term.synthesizeSyntheticMVars (mayPostpone := false) (ignoreStuckTC := true)
|
||||
|
|
@ -114,7 +114,7 @@ private def addSimpTheorem (thms : Meta.SimpTheorems) (stx : Syntax) (post : Boo
|
|||
return (r.paramNames, r.expr)
|
||||
else
|
||||
return (#[], e)
|
||||
thms.add levelParams proof (post := post) (inv := inv)
|
||||
thms.add name levelParams proof (post := post) (inv := inv)
|
||||
|
||||
structure ElabSimpArgsResult where
|
||||
ctx : Simp.Context
|
||||
|
|
@ -143,6 +143,7 @@ def elabSimpArgs (stx : Syntax) (ctx : Simp.Context) (eraseLocal : Bool) (kind :
|
|||
-/
|
||||
withMainContext do
|
||||
let mut thmsArray := ctx.simpTheorems
|
||||
let mut namedStx := ctx.namedStx
|
||||
let mut thms := thmsArray[0]!
|
||||
let mut starArg := false
|
||||
for arg in stx[1].getSepArgs do
|
||||
|
|
@ -166,14 +167,21 @@ def elabSimpArgs (stx : Syntax) (ctx : Simp.Context) (eraseLocal : Bool) (kind :
|
|||
let term := arg[2]
|
||||
|
||||
match (← resolveSimpIdTheorem? term) with
|
||||
| .expr e => thms ← addDeclToUnfoldOrTheorem thms e post inv kind
|
||||
| .ext ext => thmsArray := thmsArray.push (← ext.getTheorems)
|
||||
| .none => thms ← addSimpTheorem thms term post inv
|
||||
| .expr e =>
|
||||
let name ← mkFreshId
|
||||
namedStx := namedStx.insert name arg
|
||||
thms ← addDeclToUnfoldOrTheorem thms name e post inv kind
|
||||
| .ext ext =>
|
||||
thmsArray := thmsArray.push (← ext.getTheorems)
|
||||
| .none =>
|
||||
let name ← mkFreshId
|
||||
namedStx := namedStx.insert name arg
|
||||
thms ← addSimpTheorem thms name term post inv
|
||||
else if arg.getKind == ``Lean.Parser.Tactic.simpStar then
|
||||
starArg := true
|
||||
else
|
||||
throwUnsupportedSyntax
|
||||
return { ctx := { ctx with simpTheorems := thmsArray.set! 0 thms }, starArg }
|
||||
return { ctx := { ctx with namedStx, simpTheorems := thmsArray.set! 0 thms }, starArg }
|
||||
where
|
||||
resolveSimpIdTheorem? (simpArgTerm : Term) : TacticM ResolveSimpIdResult := do
|
||||
let resolveExt (n : Name) : TacticM ResolveSimpIdResult := do
|
||||
|
|
@ -236,12 +244,52 @@ def mkSimpContext (stx : Syntax) (eraseLocal : Bool) (kind := SimpKind.simp) (ig
|
|||
unless simpTheorems.isErased localDecl.userName do
|
||||
let fvarId := localDecl.fvarId
|
||||
let proof := localDecl.toExpr
|
||||
let id ← mkFreshUserName `h
|
||||
fvarIdToLemmaId := fvarIdToLemmaId.insert fvarId id
|
||||
simpTheorems ← simpTheorems.addTheorem proof (name? := id)
|
||||
fvarIdToLemmaId := fvarIdToLemmaId.insert fvarId fvarId.name
|
||||
simpTheorems ← simpTheorems.addTheorem fvarId.name proof
|
||||
let ctx := { ctx with simpTheorems }
|
||||
return { ctx, fvarIdToLemmaId, dischargeWrapper }
|
||||
|
||||
register_builtin_option tactic.simp.trace : Bool := {
|
||||
defValue := false
|
||||
descr := "When tracing is enabled, calls to `simp` or `dsimp` will print an equivalent `simp only` call."
|
||||
}
|
||||
|
||||
def traceSimpCall (stx : Syntax) (ctx : Simp.Context) (usedSimps : NameSet) : MetaM Unit := do
|
||||
let mut stx := stx
|
||||
if stx[3].isNone then
|
||||
stx := stx.setArg 3 (mkNullNode #[mkAtom "only"])
|
||||
let mut args := #[]
|
||||
let mut localsOrStar := some #[]
|
||||
let lc ← getLCtx
|
||||
let env ← getEnv
|
||||
for thm in usedSimps do
|
||||
-- simp theorems provided in the local invocation
|
||||
if let some thmStx := ctx.namedStx.find? thm then
|
||||
args := args.push thmStx
|
||||
-- local hypotheses in the context
|
||||
else if let some ldecl := lc.find? ⟨thm⟩ then
|
||||
localsOrStar := localsOrStar.bind fun locals =>
|
||||
if !ldecl.userName.isInaccessibleUserName &&
|
||||
(lc.findFromUserName? ldecl.userName).get!.fvarId == ldecl.fvarId then
|
||||
some (locals.push ldecl.userName)
|
||||
else
|
||||
none
|
||||
-- global definitions in the environment
|
||||
else if env.contains thm then
|
||||
if thm != ``eq_self then -- this one is implicitly available
|
||||
args := args.push (← `(Parser.Tactic.simpLemma| $(mkIdent (← unresolveNameGlobal thm)):ident))
|
||||
-- Ignore everything else.
|
||||
-- Note: this is possible for `simp (config := {contextual := true})` when
|
||||
-- rewriting with a variable that was introduced in a scope.
|
||||
else pure ()
|
||||
if let some locals := localsOrStar then
|
||||
args := args ++ (← locals.mapM fun id => `(Parser.Tactic.simpLemma| $(mkIdent id):ident))
|
||||
else
|
||||
args := args.push (← `(Parser.Tactic.simpStar| *))
|
||||
let argsStx := if args.isEmpty then #[] else #[mkAtom "[", (mkAtom ",").mkSep args, mkAtom "]"]
|
||||
stx := stx.setArg 4 (mkNullNode argsStx)
|
||||
logInfoAt stx[0] m!"Try this: {stx}"
|
||||
|
||||
/--
|
||||
`simpLocation ctx discharge? varIdToLemmaId loc`
|
||||
runs the simplifier at locations specified by `loc`,
|
||||
|
|
@ -258,7 +306,7 @@ For many tactics other than the simplifier,
|
|||
one should use the `withLocation` tactic combinator
|
||||
when working with a `location`.
|
||||
-/
|
||||
def simpLocation (ctx : Simp.Context) (discharge? : Option Simp.Discharge := none) (fvarIdToLemmaId : FVarIdToLemmaId := {}) (loc : Location) : TacticM Unit := do
|
||||
def simpLocation (ctx : Simp.Context) (discharge? : Option Simp.Discharge := none) (fvarIdToLemmaId : FVarIdToLemmaId := {}) (loc : Location) : TacticM NameSet := do
|
||||
match loc with
|
||||
| Location.targets hyps simplifyTarget =>
|
||||
withMainContext do
|
||||
|
|
@ -268,26 +316,32 @@ def simpLocation (ctx : Simp.Context) (discharge? : Option Simp.Discharge := non
|
|||
withMainContext do
|
||||
go (← (← getMainGoal).getNondepPropHyps) (simplifyTarget := true) fvarIdToLemmaId
|
||||
where
|
||||
go (fvarIdsToSimp : Array FVarId) (simplifyTarget : Bool) (fvarIdToLemmaId : Lean.Meta.FVarIdToLemmaId) : TacticM Unit := do
|
||||
go (fvarIdsToSimp : Array FVarId) (simplifyTarget : Bool) (fvarIdToLemmaId : Lean.Meta.FVarIdToLemmaId) : TacticM NameSet := do
|
||||
let mvarId ← getMainGoal
|
||||
let result? ← simpGoal mvarId ctx (simplifyTarget := simplifyTarget) (discharge? := discharge?) (fvarIdsToSimp := fvarIdsToSimp) (fvarIdToLemmaId := fvarIdToLemmaId)
|
||||
let (result?, usedSimps) ← simpGoal mvarId ctx (simplifyTarget := simplifyTarget) (discharge? := discharge?) (fvarIdsToSimp := fvarIdsToSimp) (fvarIdToLemmaId := fvarIdToLemmaId)
|
||||
match result? with
|
||||
| none => replaceMainGoal []
|
||||
| some (_, mvarId) => replaceMainGoal [mvarId]
|
||||
return usedSimps
|
||||
|
||||
/-
|
||||
"simp " (config)? (discharger)? ("only ")? ("[" simpLemma,* "]")? (location)?
|
||||
-/
|
||||
@[builtinTactic Lean.Parser.Tactic.simp] def evalSimp : Tactic := fun stx => do
|
||||
let { ctx, fvarIdToLemmaId, dischargeWrapper } ← withMainContext <| mkSimpContext stx (eraseLocal := false)
|
||||
dischargeWrapper.with fun discharge? =>
|
||||
let usedSimps ← dischargeWrapper.with fun discharge? =>
|
||||
simpLocation ctx discharge? fvarIdToLemmaId (expandOptLocation stx[5])
|
||||
if tactic.simp.trace.get (← getOptions) then
|
||||
traceSimpCall stx ctx usedSimps
|
||||
|
||||
@[builtinTactic Lean.Parser.Tactic.simpAll] def evalSimpAll : Tactic := fun stx => do
|
||||
let { ctx, .. } ← mkSimpContext stx (eraseLocal := true) (kind := .simpAll) (ignoreStarArg := true)
|
||||
match (← simpAll (← getMainGoal) ctx) with
|
||||
let (result?, usedSimps) ← simpAll (← getMainGoal) ctx
|
||||
match result? with
|
||||
| none => replaceMainGoal []
|
||||
| some mvarId => replaceMainGoal [mvarId]
|
||||
if tactic.simp.trace.get (← getOptions) then
|
||||
traceSimpCall stx ctx usedSimps
|
||||
|
||||
def dsimpLocation (ctx : Simp.Context) (loc : Location) : TacticM Unit := do
|
||||
match loc with
|
||||
|
|
@ -301,10 +355,12 @@ def dsimpLocation (ctx : Simp.Context) (loc : Location) : TacticM Unit := do
|
|||
where
|
||||
go (fvarIdsToSimp : Array FVarId) (simplifyTarget : Bool) : TacticM Unit := do
|
||||
let mvarId ← getMainGoal
|
||||
let result? ← dsimpGoal mvarId ctx (simplifyTarget := simplifyTarget) (fvarIdsToSimp := fvarIdsToSimp)
|
||||
let (result?, usedSimps) ← dsimpGoal mvarId ctx (simplifyTarget := simplifyTarget) (fvarIdsToSimp := fvarIdsToSimp)
|
||||
match result? with
|
||||
| none => replaceMainGoal []
|
||||
| some mvarId => replaceMainGoal [mvarId]
|
||||
if tactic.simp.trace.get (← getOptions) then
|
||||
traceSimpCall (← getRef) ctx usedSimps
|
||||
|
||||
@[builtinTactic Lean.Parser.Tactic.dsimp] def evalDSimp : Tactic := fun stx => do
|
||||
let { ctx, .. } ← withMainContext <| mkSimpContext stx (eraseLocal := false) (kind := .dsimp)
|
||||
|
|
|
|||
2
stage0/src/Lean/Meta/Tactic/AC/Main.lean
generated
2
stage0/src/Lean/Meta/Tactic/AC/Main.lean
generated
|
|
@ -145,7 +145,7 @@ def rewriteUnnormalized (mvarId : MVarId) : MetaM Unit := do
|
|||
config := Simp.neutralConfig
|
||||
}
|
||||
let tgt ← instantiateMVars (← mvarId.getType)
|
||||
let res ← Simp.main tgt simpCtx (methods := { post })
|
||||
let (res, _) ← Simp.main tgt simpCtx (methods := { post })
|
||||
let newGoal ← applySimpResultToTarget mvarId tgt res
|
||||
newGoal.refl
|
||||
where
|
||||
|
|
|
|||
2
stage0/src/Lean/Meta/Tactic/Acyclic.lean
generated
2
stage0/src/Lean/Meta/Tactic/Acyclic.lean
generated
|
|
@ -37,7 +37,7 @@ where
|
|||
let sizeOfEq ← mkLT sizeOf_lhs sizeOf_rhs
|
||||
let hlt ← mkFreshExprSyntheticOpaqueMVar sizeOfEq
|
||||
-- TODO: we only need the `sizeOf` simp theorems
|
||||
match (← simpTarget hlt.mvarId! { config.arith := true, simpTheorems := #[ (← getSimpTheorems) ] }) with
|
||||
match (← simpTarget hlt.mvarId! { config.arith := true, simpTheorems := #[ (← getSimpTheorems) ] }).1 with
|
||||
| some _ => return false
|
||||
| none =>
|
||||
let heq ← mkCongrArg sizeOf_lhs.appFn! (← mkEqSymm h)
|
||||
|
|
|
|||
109
stage0/src/Lean/Meta/Tactic/Simp/Main.lean
generated
109
stage0/src/Lean/Meta/Tactic/Simp/Main.lean
generated
|
|
@ -165,7 +165,9 @@ private partial def reduce (e : Expr) : SimpM Expr := withIncRecDepth do
|
|||
| some e => return (← reduce e)
|
||||
| none => pure ()
|
||||
match (← unfold? e) with
|
||||
| some e => reduce e
|
||||
| some e' =>
|
||||
recordSimpTheorem e.getAppFn.constName!
|
||||
reduce e'
|
||||
| none => return e
|
||||
|
||||
private partial def dsimp (e : Expr) : M Expr := do
|
||||
|
|
@ -579,7 +581,7 @@ where
|
|||
let mut updated := false
|
||||
for x in xs do
|
||||
if (← isProof x) then
|
||||
s ← s.addTheorem x
|
||||
s ← s.addTheorem x.fvarId!.name x
|
||||
updated := true
|
||||
if updated then
|
||||
withSimpTheorems s f
|
||||
|
|
@ -609,7 +611,7 @@ where
|
|||
trace[Debug.Meta.Tactic.simp] "ctx arrow {rp.expr} -> {q}"
|
||||
withLocalDeclD e.bindingName! rp.expr fun h => do
|
||||
let s ← getSimpTheorems
|
||||
let s ← s.addTheorem h
|
||||
let s ← s.addTheorem h.fvarId!.name h
|
||||
withSimpTheorems s do
|
||||
let rq ← simp q
|
||||
match rq.proof? with
|
||||
|
|
@ -687,18 +689,20 @@ where
|
|||
modify fun s => { s with cache := s.cache.insert e { r with dischargeDepth } }
|
||||
return r
|
||||
|
||||
def main (e : Expr) (ctx : Context) (methods : Methods := {}) : MetaM Result := do
|
||||
def main (e : Expr) (ctx : Context) (usedSimps : NameSet := {}) (methods : Methods := {}) : MetaM (Result × NameSet) := do
|
||||
let ctx := { ctx with config := (← ctx.config.updateArith) }
|
||||
withConfig (fun c => { c with etaStruct := ctx.config.etaStruct }) <| withReducible do
|
||||
try
|
||||
simp e methods ctx |>.run' {}
|
||||
let (r, s) ← simp e methods ctx |>.run { usedTheorems := usedSimps }
|
||||
pure (r, s.usedTheorems)
|
||||
catch ex =>
|
||||
if ex.isMaxHeartbeat then throwNestedTacticEx `simp ex else throw ex
|
||||
|
||||
def dsimpMain (e : Expr) (ctx : Context) (methods : Methods := {}) : MetaM Expr := do
|
||||
def dsimpMain (e : Expr) (ctx : Context) (usedSimps : NameSet := {}) (methods : Methods := {}) : MetaM (Expr × NameSet) := do
|
||||
withConfig (fun c => { c with etaStruct := ctx.config.etaStruct }) <| withReducible do
|
||||
try
|
||||
dsimp e methods ctx |>.run' {}
|
||||
let (r, s) ← dsimp e methods ctx |>.run { usedTheorems := usedSimps }
|
||||
pure (r, s.usedTheorems)
|
||||
catch ex =>
|
||||
if ex.isMaxHeartbeat then throwNestedTacticEx `dsimp ex else throw ex
|
||||
|
||||
|
|
@ -806,13 +810,15 @@ end DefaultMethods
|
|||
|
||||
end Simp
|
||||
|
||||
def simp (e : Expr) (ctx : Simp.Context) (discharge? : Option Simp.Discharge := none) : MetaM Simp.Result := do profileitM Exception "simp" (← getOptions) do
|
||||
def simp (e : Expr) (ctx : Simp.Context) (discharge? : Option Simp.Discharge := none)
|
||||
(usedSimps : NameSet := {}) : MetaM (Simp.Result × NameSet) := do profileitM Exception "simp" (← getOptions) do
|
||||
match discharge? with
|
||||
| none => Simp.main e ctx (methods := Simp.DefaultMethods.methods)
|
||||
| some d => Simp.main e ctx (methods := { pre := (Simp.preDefault · d), post := (Simp.postDefault · d), discharge? := d })
|
||||
| none => Simp.main e ctx usedSimps (methods := Simp.DefaultMethods.methods)
|
||||
| some d => Simp.main e ctx usedSimps (methods := { pre := (Simp.preDefault · d), post := (Simp.postDefault · d), discharge? := d })
|
||||
|
||||
def dsimp (e : Expr) (ctx : Simp.Context) : MetaM Expr := do profileitM Exception "dsimp" (← getOptions) do
|
||||
Simp.dsimpMain e ctx (methods := Simp.DefaultMethods.methods)
|
||||
def dsimp (e : Expr) (ctx : Simp.Context)
|
||||
(usedSimps : NameSet := {}) : MetaM (Expr × NameSet) := do profileitM Exception "dsimp" (← getOptions) do
|
||||
Simp.dsimpMain e ctx usedSimps (methods := Simp.DefaultMethods.methods)
|
||||
|
||||
/--
|
||||
Auxiliary method.
|
||||
|
|
@ -828,24 +834,26 @@ def applySimpResultToTarget (mvarId : MVarId) (target : Expr) (r : Simp.Result)
|
|||
return mvarId
|
||||
|
||||
/-- See `simpTarget`. This method assumes `mvarId` is not assigned, and we are already using `mvarId`s local context. -/
|
||||
def simpTargetCore (mvarId : MVarId) (ctx : Simp.Context) (discharge? : Option Simp.Discharge := none) (mayCloseGoal := true) : MetaM (Option MVarId) := do
|
||||
def simpTargetCore (mvarId : MVarId) (ctx : Simp.Context) (discharge? : Option Simp.Discharge := none)
|
||||
(mayCloseGoal := true) (usedSimps : NameSet := {}) : MetaM (Option MVarId × NameSet) := do
|
||||
let target ← instantiateMVars (← mvarId.getType)
|
||||
let r ← simp target ctx discharge?
|
||||
let (r, usedSimps) ← simp target ctx discharge? usedSimps
|
||||
if mayCloseGoal && r.expr.isConstOf ``True then
|
||||
match r.proof? with
|
||||
| some proof => mvarId.assign (← mkOfEqTrue proof)
|
||||
| none => mvarId.assign (mkConst ``True.intro)
|
||||
return none
|
||||
return (none, usedSimps)
|
||||
else
|
||||
applySimpResultToTarget mvarId target r
|
||||
return (← applySimpResultToTarget mvarId target r, usedSimps)
|
||||
|
||||
/--
|
||||
Simplify the given goal target (aka type). Return `none` if the goal was closed. Return `some mvarId'` otherwise,
|
||||
where `mvarId'` is the simplified new goal. -/
|
||||
def simpTarget (mvarId : MVarId) (ctx : Simp.Context) (discharge? : Option Simp.Discharge := none) (mayCloseGoal := true) : MetaM (Option MVarId) :=
|
||||
def simpTarget (mvarId : MVarId) (ctx : Simp.Context) (discharge? : Option Simp.Discharge := none)
|
||||
(mayCloseGoal := true) (usedSimps : NameSet := {}) : MetaM (Option MVarId × NameSet) :=
|
||||
mvarId.withContext do
|
||||
mvarId.checkNotAssigned `simp
|
||||
simpTargetCore mvarId ctx discharge? mayCloseGoal
|
||||
simpTargetCore mvarId ctx discharge? mayCloseGoal usedSimps
|
||||
|
||||
/--
|
||||
Apply the result `r` for `prop` (which is inhabited by `proof`). Return `none` if the goal was closed. Return `some (proof', prop')`
|
||||
|
|
@ -876,9 +884,10 @@ def applySimpResultToFVarId (mvarId : MVarId) (fvarId : FVarId) (r : Simp.Result
|
|||
otherwise, where `proof' : prop'` and `prop'` is the simplified `prop`.
|
||||
|
||||
This method assumes `mvarId` is not assigned, and we are already using `mvarId`s local context. -/
|
||||
def simpStep (mvarId : MVarId) (proof : Expr) (prop : Expr) (ctx : Simp.Context) (discharge? : Option Simp.Discharge := none) (mayCloseGoal := true) : MetaM (Option (Expr × Expr)) := do
|
||||
let r ← simp prop ctx discharge?
|
||||
applySimpResultToProp mvarId proof prop r (mayCloseGoal := mayCloseGoal)
|
||||
def simpStep (mvarId : MVarId) (proof : Expr) (prop : Expr) (ctx : Simp.Context) (discharge? : Option Simp.Discharge := none)
|
||||
(mayCloseGoal := true) (usedSimps : NameSet := {}) : MetaM (Option (Expr × Expr) × NameSet) := do
|
||||
let (r, usedSimps) ← simp prop ctx discharge? usedSimps
|
||||
return (← applySimpResultToProp mvarId proof prop r (mayCloseGoal := mayCloseGoal), usedSimps)
|
||||
|
||||
def applySimpResultToLocalDeclCore (mvarId : MVarId) (fvarId : FVarId) (r : Option (Expr × Expr)) : MetaM (Option (FVarId × MVarId)) := do
|
||||
match r with
|
||||
|
|
@ -908,87 +917,99 @@ def applySimpResultToLocalDecl (mvarId : MVarId) (fvarId : FVarId) (r : Simp.Res
|
|||
else
|
||||
applySimpResultToLocalDeclCore mvarId fvarId (← applySimpResultToFVarId mvarId fvarId r mayCloseGoal)
|
||||
|
||||
def simpLocalDecl (mvarId : MVarId) (fvarId : FVarId) (ctx : Simp.Context) (discharge? : Option Simp.Discharge := none) (mayCloseGoal := true) : MetaM (Option (FVarId × MVarId)) := do
|
||||
def simpLocalDecl (mvarId : MVarId) (fvarId : FVarId) (ctx : Simp.Context) (discharge? : Option Simp.Discharge := none)
|
||||
(mayCloseGoal := true) (usedSimps : NameSet := {}) : MetaM (Option (FVarId × MVarId) × NameSet) := do
|
||||
mvarId.withContext do
|
||||
mvarId.checkNotAssigned `simp
|
||||
let type ← instantiateMVars (← fvarId.getType)
|
||||
applySimpResultToLocalDeclCore mvarId fvarId (← simpStep mvarId (mkFVar fvarId) type ctx discharge? mayCloseGoal)
|
||||
let (r, usedSimps) ← simpStep mvarId (mkFVar fvarId) type ctx discharge? mayCloseGoal usedSimps
|
||||
return (← applySimpResultToLocalDeclCore mvarId fvarId r, usedSimps)
|
||||
|
||||
abbrev FVarIdToLemmaId := FVarIdMap Name
|
||||
|
||||
def simpGoal (mvarId : MVarId) (ctx : Simp.Context) (discharge? : Option Simp.Discharge := none) (simplifyTarget : Bool := true) (fvarIdsToSimp : Array FVarId := #[]) (fvarIdToLemmaId : FVarIdToLemmaId := {}) : MetaM (Option (Array FVarId × MVarId)) := do
|
||||
def simpGoal (mvarId : MVarId) (ctx : Simp.Context) (discharge? : Option Simp.Discharge := none)
|
||||
(simplifyTarget : Bool := true) (fvarIdsToSimp : Array FVarId := #[]) (fvarIdToLemmaId : FVarIdToLemmaId := {})
|
||||
(usedSimps : NameSet := {}) : MetaM (Option (Array FVarId × MVarId) × NameSet) := do
|
||||
mvarId.withContext do
|
||||
mvarId.checkNotAssigned `simp
|
||||
let mut mvarId := mvarId
|
||||
let mut toAssert := #[]
|
||||
let mut replaced := #[]
|
||||
let mut usedSimps := usedSimps
|
||||
for fvarId in fvarIdsToSimp do
|
||||
let localDecl ← fvarId.getDecl
|
||||
let type ← instantiateMVars localDecl.type
|
||||
let ctx ← match fvarIdToLemmaId.find? localDecl.fvarId with
|
||||
| none => pure ctx
|
||||
| some thmId => pure { ctx with simpTheorems := ctx.simpTheorems.eraseTheorem thmId }
|
||||
let r ← simp type ctx discharge?
|
||||
let (r, usedSimps') ← simp type ctx discharge? usedSimps
|
||||
usedSimps := usedSimps'
|
||||
match r.proof? with
|
||||
| some _ => match (← applySimpResultToProp mvarId (mkFVar fvarId) type r) with
|
||||
| none => return none
|
||||
| none => return (none, usedSimps)
|
||||
| some (value, type) => toAssert := toAssert.push { userName := localDecl.userName, type := type, value := value }
|
||||
| none =>
|
||||
if r.expr.isConstOf ``False then
|
||||
mvarId.assign (← mkFalseElim (← mvarId.getType) (mkFVar fvarId))
|
||||
return none
|
||||
return (none, usedSimps)
|
||||
-- TODO: if there are no forwards dependencies we may consider using the same approach we used when `r.proof?` is a `some ...`
|
||||
-- Reason: it introduces a `mkExpectedTypeHint`
|
||||
mvarId ← mvarId.replaceLocalDeclDefEq fvarId r.expr
|
||||
replaced := replaced.push fvarId
|
||||
if simplifyTarget then
|
||||
match (← simpTarget mvarId ctx discharge?) with
|
||||
| none => return none
|
||||
| some mvarIdNew => mvarId := mvarIdNew
|
||||
| (none, usedSimps') => return (none, usedSimps')
|
||||
| (some mvarIdNew, usedSimps') => mvarId := mvarIdNew; usedSimps := usedSimps'
|
||||
let (fvarIdsNew, mvarIdNew) ← mvarId.assertHypotheses toAssert
|
||||
let toClear := fvarIdsToSimp.filter fun fvarId => !replaced.contains fvarId
|
||||
let mvarIdNew ← mvarIdNew.tryClearMany toClear
|
||||
return (fvarIdsNew, mvarIdNew)
|
||||
return (some (fvarIdsNew, mvarIdNew), usedSimps)
|
||||
|
||||
def simpTargetStar (mvarId : MVarId) (ctx : Simp.Context) (discharge? : Option Simp.Discharge := none) : MetaM TacticResultCNM := mvarId.withContext do
|
||||
def simpTargetStar (mvarId : MVarId) (ctx : Simp.Context) (discharge? : Option Simp.Discharge := none)
|
||||
(usedSimps : NameSet := {}) : MetaM (TacticResultCNM × NameSet) := mvarId.withContext do
|
||||
let mut ctx := ctx
|
||||
for h in (← getPropHyps) do
|
||||
let localDecl ← h.getDecl
|
||||
let proof := localDecl.toExpr
|
||||
let simpTheorems ← ctx.simpTheorems.addTheorem proof
|
||||
let simpTheorems ← ctx.simpTheorems.addTheorem localDecl.fvarId.name proof
|
||||
ctx := { ctx with simpTheorems }
|
||||
match (← simpTarget mvarId ctx discharge?) with
|
||||
| none => return TacticResultCNM.closed
|
||||
| some mvarId' =>
|
||||
match (← simpTarget mvarId ctx discharge? (usedSimps := usedSimps)) with
|
||||
| (none, usedSimps) => return (TacticResultCNM.closed, usedSimps)
|
||||
| (some mvarId', usedSimps') =>
|
||||
if (← mvarId.getType) == (← mvarId'.getType) then
|
||||
return TacticResultCNM.noChange
|
||||
return (TacticResultCNM.noChange, usedSimps)
|
||||
else
|
||||
return TacticResultCNM.modified mvarId'
|
||||
return (TacticResultCNM.modified mvarId', usedSimps')
|
||||
|
||||
def dsimpGoal (mvarId : MVarId) (ctx : Simp.Context) (simplifyTarget : Bool := true) (fvarIdsToSimp : Array FVarId := #[]) : MetaM (Option MVarId) := do
|
||||
def dsimpGoal (mvarId : MVarId) (ctx : Simp.Context) (simplifyTarget : Bool := true) (fvarIdsToSimp : Array FVarId := #[])
|
||||
(usedSimps : NameSet := {}) : MetaM (Option MVarId × NameSet) := do
|
||||
mvarId.withContext do
|
||||
mvarId.checkNotAssigned `simp
|
||||
let mut mvarId := mvarId
|
||||
let mut usedSimps : NameSet := usedSimps
|
||||
for fvarId in fvarIdsToSimp do
|
||||
let type ← instantiateMVars (← fvarId.getType)
|
||||
let typeNew ← dsimp type ctx
|
||||
let (typeNew, usedSimps') ← dsimp type ctx
|
||||
usedSimps := usedSimps'
|
||||
if typeNew.isConstOf ``False then
|
||||
mvarId.assign (← mkFalseElim (← mvarId.getType) (mkFVar fvarId))
|
||||
return none
|
||||
return (none, usedSimps)
|
||||
if typeNew != type then
|
||||
mvarId ← mvarId.replaceLocalDeclDefEq fvarId typeNew
|
||||
if simplifyTarget then
|
||||
let target ← mvarId.getType
|
||||
let targetNew ← dsimp target ctx
|
||||
let (targetNew, usedSimps') ← dsimp target ctx usedSimps
|
||||
usedSimps := usedSimps'
|
||||
if targetNew.isConstOf ``True then
|
||||
mvarId.assign (mkConst ``True.intro)
|
||||
return none
|
||||
return (none, usedSimps)
|
||||
if let some (_, lhs, rhs) := targetNew.eq? then
|
||||
if (← withReducible <| isDefEq lhs rhs) then
|
||||
mvarId.assign (← mkEqRefl lhs)
|
||||
return none
|
||||
return (none, usedSimps)
|
||||
if target != targetNew then
|
||||
mvarId ← mvarId.replaceTargetDefEq targetNew
|
||||
return some mvarId
|
||||
pure () -- FIXME: bug in do notation if this is removed?
|
||||
return (some mvarId, usedSimps)
|
||||
|
||||
end Lean.Meta
|
||||
|
|
|
|||
9
stage0/src/Lean/Meta/Tactic/Simp/Rewrite.lean
generated
9
stage0/src/Lean/Meta/Tactic/Simp/Rewrite.lean
generated
|
|
@ -55,7 +55,7 @@ where
|
|||
private def tryTheoremCore (lhs : Expr) (xs : Array Expr) (bis : Array BinderInfo) (val : Expr) (type : Expr) (e : Expr) (thm : SimpTheorem) (numExtraArgs : Nat) (discharge? : Expr → SimpM (Option Expr)) : SimpM (Option Result) := do
|
||||
let rec go (e : Expr) : SimpM (Option Result) := do
|
||||
if (← isDefEq lhs e) then
|
||||
unless (← synthesizeArgs thm.getName xs bis discharge?) do
|
||||
unless (← synthesizeArgs thm.name xs bis discharge?) do
|
||||
return none
|
||||
let proof? ← if thm.rfl then
|
||||
pure none
|
||||
|
|
@ -73,6 +73,7 @@ private def tryTheoremCore (lhs : Expr) (xs : Array Expr) (bis : Array BinderInf
|
|||
trace[Meta.Tactic.simp.rewrite] "{thm}, perm rejected {e} ==> {rhs}"
|
||||
return none
|
||||
trace[Meta.Tactic.simp.rewrite] "{thm}, {e} ==> {rhs}"
|
||||
recordSimpTheorem thm.name
|
||||
return some { expr := rhs, proof? }
|
||||
else
|
||||
unless lhs.isMVar do
|
||||
|
|
@ -141,9 +142,7 @@ def rewrite? (e : Expr) (s : DiscrTree SimpTheorem) (erased : Std.PHashSet Name)
|
|||
return none
|
||||
where
|
||||
inErasedSet (thm : SimpTheorem) : Bool :=
|
||||
match thm.name? with
|
||||
| none => false
|
||||
| some name => erased.contains name
|
||||
erased.contains thm.name
|
||||
|
||||
@[inline] def andThen (s : Step) (f? : Expr → SimpM (Option Step)) : SimpM Step := do
|
||||
match s with
|
||||
|
|
@ -207,7 +206,7 @@ def simpArith? (e : Expr) : SimpM (Option Step) := do
|
|||
def simpMatchCore? (app : MatcherApp) (e : Expr) (discharge? : Expr → SimpM (Option Expr)) : SimpM (Option Step) := do
|
||||
for matchEq in (← Match.getEquationsFor app.matcherName).eqnNames do
|
||||
-- Try lemma
|
||||
match (← withReducible <| Simp.tryTheorem? e { proof := mkConst matchEq, name? := some matchEq, rfl := (← isRflTheorem matchEq) } discharge?) with
|
||||
match (← withReducible <| Simp.tryTheorem? e { name := matchEq, proof := mkConst matchEq, rfl := (← isRflTheorem matchEq) } discharge?) with
|
||||
| none => pure ()
|
||||
| some r => return some (Simp.Step.done r)
|
||||
return none
|
||||
|
|
|
|||
30
stage0/src/Lean/Meta/Tactic/Simp/SimpAll.lean
generated
30
stage0/src/Lean/Meta/Tactic/Simp/SimpAll.lean
generated
|
|
@ -20,10 +20,11 @@ structure Entry where
|
|||
deriving Inhabited
|
||||
|
||||
structure State where
|
||||
modified : Bool := false
|
||||
mvarId : MVarId
|
||||
entries : Array Entry := #[]
|
||||
ctx : Simp.Context
|
||||
modified : Bool := false
|
||||
mvarId : MVarId
|
||||
entries : Array Entry := #[]
|
||||
ctx : Simp.Context
|
||||
usedSimps : NameSet := {}
|
||||
|
||||
abbrev M := StateRefT State MetaM
|
||||
|
||||
|
|
@ -36,8 +37,8 @@ private def initEntries : M Unit := do
|
|||
unless simpThms.isErased localDecl.userName do
|
||||
let fvarId := localDecl.fvarId
|
||||
let proof := localDecl.toExpr
|
||||
let id ← mkFreshUserName `h
|
||||
simpThms ← simpThms.addTheorem proof (name? := id)
|
||||
let id := fvarId.name
|
||||
simpThms ← simpThms.addTheorem id proof
|
||||
modify fun s => { s with ctx.simpTheorems := simpThms }
|
||||
if hsNonDeps.contains h then
|
||||
-- We only simplify nondependent hypotheses
|
||||
|
|
@ -56,7 +57,9 @@ private partial def loop : M Bool := do
|
|||
-- We disable the current entry to prevent it to be simplified to `True`
|
||||
let simpThmsWithoutEntry := (← getSimpTheorems).eraseTheorem entry.id
|
||||
let ctx := { ctx with simpTheorems := simpThmsWithoutEntry }
|
||||
match (← simpStep (← get).mvarId entry.proof entry.type ctx) with
|
||||
let (r, usedSimps) ← simpStep (← get).mvarId entry.proof entry.type ctx (usedSimps := (← get).usedSimps)
|
||||
modify fun s => { s with usedSimps }
|
||||
match r with
|
||||
| none => return true -- closed the goal
|
||||
| some (proofNew, typeNew) =>
|
||||
unless typeNew == entry.type do
|
||||
|
|
@ -85,8 +88,8 @@ private partial def loop : M Bool := do
|
|||
-/
|
||||
trace[Meta.Tactic.simp.all] "entry.id: {entry.id}, {entry.type} => {typeNew}"
|
||||
let mut simpThmsNew := (← getSimpTheorems).eraseTheorem entry.id
|
||||
let idNew ← mkFreshUserName `h
|
||||
simpThmsNew ← simpThmsNew.addTheorem (← mkExpectedTypeHint proofNew typeNew) (name? := idNew)
|
||||
let idNew ← mkFreshId
|
||||
simpThmsNew ← simpThmsNew.addTheorem idNew (← mkExpectedTypeHint proofNew typeNew)
|
||||
modify fun s => { s with
|
||||
modified := true
|
||||
ctx.simpTheorems := simpThmsNew
|
||||
|
|
@ -94,7 +97,9 @@ private partial def loop : M Bool := do
|
|||
}
|
||||
-- simplify target
|
||||
let mvarId := (← get).mvarId
|
||||
match (← simpTarget mvarId (← get).ctx) with
|
||||
let (r, usedSimps) ← simpTarget mvarId (← get).ctx (usedSimps := (← get).usedSimps)
|
||||
modify fun s => { s with usedSimps }
|
||||
match r with
|
||||
| none => return true
|
||||
| some mvarIdNew =>
|
||||
unless mvarId == mvarIdNew do
|
||||
|
|
@ -121,8 +126,9 @@ def main : M (Option MVarId) := do
|
|||
|
||||
end SimpAll
|
||||
|
||||
def simpAll (mvarId : MVarId) (ctx : Simp.Context) : MetaM (Option MVarId) := do
|
||||
def simpAll (mvarId : MVarId) (ctx : Simp.Context) (usedSimps : NameSet := {}) : MetaM (Option MVarId × NameSet) := do
|
||||
mvarId.withContext do
|
||||
SimpAll.main.run' { mvarId := mvarId, ctx := ctx }
|
||||
let (r, s) ← SimpAll.main.run { mvarId, ctx, usedSimps }
|
||||
return (r, s.usedSimps)
|
||||
|
||||
end Lean.Meta
|
||||
|
|
|
|||
61
stage0/src/Lean/Meta/Tactic/Simp/SimpTheorems.lean
generated
61
stage0/src/Lean/Meta/Tactic/Simp/SimpTheorems.lean
generated
|
|
@ -38,16 +38,11 @@ structure SimpTheorem where
|
|||
`name?` is mainly relevant for producing trace messages.
|
||||
It is also viewed an `id` used to "erase" `simp` theorems from `SimpTheorems`.
|
||||
-/
|
||||
name? : Option Name := none
|
||||
name : Name
|
||||
/-- `rfl` is true if `proof` is by `Eq.refl` or `rfl`. -/
|
||||
rfl : Bool
|
||||
deriving Inhabited
|
||||
|
||||
def SimpTheorem.getName (s : SimpTheorem) : Name :=
|
||||
match s.name? with
|
||||
| some n => n
|
||||
| none => "<unknown>"
|
||||
|
||||
mutual
|
||||
partial def isRflProofCore (type : Expr) (proof : Expr) : CoreM Bool := do
|
||||
match type with
|
||||
|
|
@ -85,7 +80,7 @@ def isRflProof (proof : Expr) : MetaM Bool := do
|
|||
instance : ToFormat SimpTheorem where
|
||||
format s :=
|
||||
let perm := if s.perm then ":perm" else ""
|
||||
let name := format s.getName
|
||||
let name := format s.name
|
||||
let prio := f!":{s.priority}"
|
||||
name ++ prio ++ perm
|
||||
|
||||
|
|
@ -111,9 +106,7 @@ def addSimpTheoremEntry (d : SimpTheorems) (e : SimpTheorem) : SimpTheorems :=
|
|||
{ d with pre := d.pre.insertCore e.keys e, lemmaNames := updateLemmaNames d.lemmaNames }
|
||||
where
|
||||
updateLemmaNames (s : Std.PHashSet Name) : Std.PHashSet Name :=
|
||||
match e.name? with
|
||||
| none => s
|
||||
| some name => s.insert name
|
||||
s.insert e.name
|
||||
|
||||
def SimpTheorems.addDeclToUnfoldCore (d : SimpTheorems) (declName : Name) : SimpTheorems :=
|
||||
{ d with toUnfold := d.toUnfold.insert declName }
|
||||
|
|
@ -233,7 +226,7 @@ private def checkTypeIsProp (type : Expr) : MetaM Unit :=
|
|||
unless (← isProp type) do
|
||||
throwError "invalid 'simp', proposition expected{indentExpr type}"
|
||||
|
||||
private def mkSimpTheoremCore (e : Expr) (levelParams : Array Name) (proof : Expr) (post : Bool) (prio : Nat) (name? : Option Name) : MetaM SimpTheorem := do
|
||||
private def mkSimpTheoremCore (name : Name) (e : Expr) (levelParams : Array Name) (proof : Expr) (post : Bool) (prio : Nat) : MetaM SimpTheorem := do
|
||||
let type ← instantiateMVars (← inferType e)
|
||||
withNewMCtxDepth do
|
||||
let (_, _, type) ← withReducible <| forallMetaTelescopeReducing type
|
||||
|
|
@ -242,7 +235,7 @@ private def mkSimpTheoremCore (e : Expr) (levelParams : Array Name) (proof : Exp
|
|||
match type.eq? with
|
||||
| some (_, lhs, rhs) => pure (← DiscrTree.mkPath lhs, ← isPerm lhs rhs)
|
||||
| none => throwError "unexpected kind of 'simp' theorem{indentExpr type}"
|
||||
return { keys, perm, post, levelParams, proof, name?, priority := prio, rfl := (← isRflProof proof) }
|
||||
return { name, keys, perm, post, levelParams, proof, priority := prio, rfl := (← isRflProof proof) }
|
||||
|
||||
private def mkSimpTheoremsFromConst (declName : Name) (post : Bool) (inv : Bool) (prio : Nat) : MetaM (Array SimpTheorem) := do
|
||||
let cinfo ← getConstInfo declName
|
||||
|
|
@ -254,10 +247,10 @@ private def mkSimpTheoremsFromConst (declName : Name) (post : Bool) (inv : Bool)
|
|||
let mut r := #[]
|
||||
for (val, type) in (← preprocess val type inv (isGlobal := true)) do
|
||||
let auxName ← mkAuxLemma cinfo.levelParams type val
|
||||
r := r.push <| (← mkSimpTheoremCore (mkConst auxName (cinfo.levelParams.map mkLevelParam)) #[] (mkConst auxName) post prio declName)
|
||||
r := r.push <| (← mkSimpTheoremCore declName (mkConst auxName (cinfo.levelParams.map mkLevelParam)) #[] (mkConst auxName) post prio)
|
||||
return r
|
||||
else
|
||||
return #[← mkSimpTheoremCore (mkConst declName (cinfo.levelParams.map mkLevelParam)) #[] (mkConst declName) post prio declName]
|
||||
return #[← mkSimpTheoremCore declName (mkConst declName (cinfo.levelParams.map mkLevelParam)) #[] (mkConst declName) post prio]
|
||||
|
||||
inductive SimpEntry where
|
||||
| thm : SimpTheorem → SimpEntry
|
||||
|
|
@ -362,30 +355,30 @@ private def preprocessProof (val : Expr) (inv : Bool) : MetaM (Array Expr) := do
|
|||
return ps.toArray.map fun (val, _) => val
|
||||
|
||||
/-- Auxiliary method for creating simp theorems from a proof term `val`. -/
|
||||
def mkSimpTheorems (levelParams : Array Name) (proof : Expr) (post : Bool := true) (inv : Bool := false) (prio : Nat := eval_prio default) (name? : Option Name := none): MetaM (Array SimpTheorem) :=
|
||||
def mkSimpTheorems (name : Name) (levelParams : Array Name) (proof : Expr) (post : Bool := true) (inv : Bool := false) (prio : Nat := eval_prio default) : MetaM (Array SimpTheorem) :=
|
||||
withReducible do
|
||||
(← preprocessProof proof inv).mapM fun val => mkSimpTheoremCore val levelParams val post prio name?
|
||||
(← preprocessProof proof inv).mapM fun val => mkSimpTheoremCore name val levelParams val post prio
|
||||
|
||||
/-- Auxiliary method for adding a local simp theorem to a `SimpTheorems` datastructure. -/
|
||||
def SimpTheorems.add (s : SimpTheorems) (levelParams : Array Name) (proof : Expr) (inv : Bool := false) (post : Bool := true) (prio : Nat := eval_prio default) (name? : Option Name := none): MetaM SimpTheorems := do
|
||||
def SimpTheorems.add (s : SimpTheorems) (name : Name) (levelParams : Array Name) (proof : Expr) (inv : Bool := false) (post : Bool := true) (prio : Nat := eval_prio default) : MetaM SimpTheorems := do
|
||||
if proof.isConst then
|
||||
s.addConst proof.constName! post inv prio
|
||||
else
|
||||
let simpThms ← mkSimpTheorems levelParams proof post inv prio (← getName? proof)
|
||||
let simpThms ← mkSimpTheorems name levelParams proof post inv prio
|
||||
return simpThms.foldl addSimpTheoremEntry s
|
||||
where
|
||||
getName? (e : Expr) : MetaM (Option Name) := do
|
||||
match name? with
|
||||
| some _ => return name?
|
||||
| none =>
|
||||
let f := e.getAppFn
|
||||
if f.isConst then
|
||||
return f.constName!
|
||||
else if f.isFVar then
|
||||
let localDecl ← getFVarLocalDecl f
|
||||
return localDecl.userName
|
||||
else
|
||||
return none
|
||||
-- where
|
||||
-- getName? (e : Expr) : MetaM (Option Name) := do
|
||||
-- match name? with
|
||||
-- | some _ => return name?
|
||||
-- | none =>
|
||||
-- let f := e.getAppFn
|
||||
-- if f.isConst then
|
||||
-- return f.constName!
|
||||
-- else if f.isFVar then
|
||||
-- let localDecl ← getFVarLocalDecl f
|
||||
-- return localDecl.userName
|
||||
-- else
|
||||
-- return none
|
||||
|
||||
def SimpTheorems.addDeclToUnfold (d : SimpTheorems) (declName : Name) : MetaM SimpTheorems := do
|
||||
if let some eqns ← getEqnsFor? declName then
|
||||
|
|
@ -400,12 +393,12 @@ def SimpTheorems.addDeclToUnfold (d : SimpTheorems) (declName : Name) : MetaM Si
|
|||
|
||||
abbrev SimpTheoremsArray := Array SimpTheorems
|
||||
|
||||
def SimpTheoremsArray.addTheorem (thmsArray : SimpTheoremsArray) (h : Expr) (name? : Option Name := none) : MetaM SimpTheoremsArray :=
|
||||
def SimpTheoremsArray.addTheorem (thmsArray : SimpTheoremsArray) (name : Name) (h : Expr) : MetaM SimpTheoremsArray :=
|
||||
if thmsArray.isEmpty then
|
||||
let thms : SimpTheorems := {}
|
||||
return #[ (← thms.add #[] h (name? := name?)) ]
|
||||
return #[ (← thms.add name #[] h) ]
|
||||
else
|
||||
thmsArray.modifyM 0 fun thms => thms.add #[] h (name? := name?)
|
||||
thmsArray.modifyM 0 fun thms => thms.add name #[] h
|
||||
|
||||
def SimpTheoremsArray.eraseTheorem (thmsArray : SimpTheoremsArray) (thmId : Name) : SimpTheoremsArray :=
|
||||
thmsArray.map fun thms => thms.eraseCore thmId
|
||||
|
|
|
|||
17
stage0/src/Lean/Meta/Tactic/Simp/Types.lean
generated
17
stage0/src/Lean/Meta/Tactic/Simp/Types.lean
generated
|
|
@ -22,11 +22,12 @@ abbrev Cache := ExprMap Result
|
|||
abbrev CongrCache := ExprMap (Option CongrTheorem)
|
||||
|
||||
structure Context where
|
||||
config : Config := {}
|
||||
simpTheorems : SimpTheoremsArray := {}
|
||||
config : Config := {}
|
||||
simpTheorems : SimpTheoremsArray := {}
|
||||
congrTheorems : SimpCongrTheorems := {}
|
||||
namedStx : NameMap Syntax := {}
|
||||
parent? : Option Expr := none
|
||||
dischargeDepth : Nat := 0
|
||||
dischargeDepth : Nat := 0
|
||||
deriving Inhabited
|
||||
|
||||
def Context.isDeclToUnfold (ctx : Context) (declName : Name) : Bool :=
|
||||
|
|
@ -36,9 +37,10 @@ def Context.mkDefault : MetaM Context :=
|
|||
return { config := {}, simpTheorems := #[(← getSimpTheorems)], congrTheorems := (← getSimpCongrTheorems) }
|
||||
|
||||
structure State where
|
||||
cache : Cache := {}
|
||||
congrCache : CongrCache := {}
|
||||
numSteps : Nat := 0
|
||||
cache : Cache := {}
|
||||
congrCache : CongrCache := {}
|
||||
usedTheorems : NameSet := {}
|
||||
numSteps : Nat := 0
|
||||
|
||||
abbrev SimpM := ReaderT Context $ StateRefT State MetaM
|
||||
|
||||
|
|
@ -97,6 +99,9 @@ def getSimpCongrTheorems : M SimpCongrTheorems :=
|
|||
finally
|
||||
modify fun s => { s with cache := cacheSaved }
|
||||
|
||||
def recordSimpTheorem (n : Name) : SimpM Unit :=
|
||||
modify fun s => { s with usedTheorems := s.usedTheorems.insert n }
|
||||
|
||||
end Simp
|
||||
|
||||
export Simp (SimpM)
|
||||
|
|
|
|||
6
stage0/src/Lean/Meta/Tactic/Split.lean
generated
6
stage0/src/Lean/Meta/Tactic/Split.lean
generated
|
|
@ -17,7 +17,7 @@ def getSimpMatchContext : MetaM Simp.Context :=
|
|||
}
|
||||
|
||||
def simpMatch (e : Expr) : MetaM Simp.Result := do
|
||||
Simp.main e (← getSimpMatchContext) (methods := { pre })
|
||||
(·.1) <$> Simp.main e (← getSimpMatchContext) (methods := { pre })
|
||||
where
|
||||
pre (e : Expr) : SimpM Simp.Step := do
|
||||
let some app ← matchMatcherApp? e | return Simp.Step.visit { expr := e }
|
||||
|
|
@ -35,7 +35,7 @@ def simpMatchTarget (mvarId : MVarId) : MetaM MVarId := mvarId.withContext do
|
|||
applySimpResultToTarget mvarId target r
|
||||
|
||||
private def simpMatchCore (matchDeclName : Name) (matchEqDeclName : Name) (e : Expr) : MetaM Simp.Result := do
|
||||
Simp.main e (← getSimpMatchContext) (methods := { pre })
|
||||
(·.1) <$> Simp.main e (← getSimpMatchContext) (methods := { pre })
|
||||
where
|
||||
pre (e : Expr) : SimpM Simp.Step := do
|
||||
if e.isAppOf matchDeclName then
|
||||
|
|
@ -44,7 +44,7 @@ where
|
|||
| some e' => return Simp.Step.done { expr := e' }
|
||||
| none =>
|
||||
-- Try lemma
|
||||
match (← withReducible <| Simp.tryTheorem? e { proof := mkConst matchEqDeclName, name? := matchEqDeclName, rfl := (← isRflTheorem matchEqDeclName) } SplitIf.discharge?) with
|
||||
match (← withReducible <| Simp.tryTheorem? e { name := matchEqDeclName, proof := mkConst matchEqDeclName, rfl := (← isRflTheorem matchEqDeclName) } SplitIf.discharge?) with
|
||||
| none => return Simp.Step.visit { expr := e }
|
||||
| some r => return Simp.Step.done r
|
||||
else
|
||||
|
|
|
|||
4
stage0/src/Lean/Meta/Tactic/SplitIf.lean
generated
4
stage0/src/Lean/Meta/Tactic/SplitIf.lean
generated
|
|
@ -82,14 +82,14 @@ open SplitIf
|
|||
|
||||
def simpIfTarget (mvarId : MVarId) (useDecide := false) : MetaM MVarId := do
|
||||
let mut ctx ← getSimpContext
|
||||
if let some mvarId' ← simpTarget mvarId ctx (discharge? useDecide) (mayCloseGoal := false) then
|
||||
if let (some mvarId', _) ← simpTarget mvarId ctx (discharge? useDecide) (mayCloseGoal := false) then
|
||||
return mvarId'
|
||||
else
|
||||
unreachable!
|
||||
|
||||
def simpIfLocalDecl (mvarId : MVarId) (fvarId : FVarId) : MetaM MVarId := do
|
||||
let mut ctx ← getSimpContext
|
||||
if let some (_, mvarId') ← simpLocalDecl mvarId fvarId ctx discharge? (mayCloseGoal := false) then
|
||||
if let (some (_, mvarId'), _) ← simpLocalDecl mvarId fvarId ctx discharge? (mayCloseGoal := false) then
|
||||
return mvarId'
|
||||
else
|
||||
unreachable!
|
||||
|
|
|
|||
5
stage0/src/Lean/Meta/Tactic/Unfold.lean
generated
5
stage0/src/Lean/Meta/Tactic/Unfold.lean
generated
|
|
@ -11,19 +11,18 @@ namespace Lean.Meta
|
|||
|
||||
private def getSimpUnfoldContext : MetaM Simp.Context :=
|
||||
return {
|
||||
simpTheorems := {}
|
||||
congrTheorems := (← getSimpCongrTheorems)
|
||||
config := Simp.neutralConfig
|
||||
}
|
||||
|
||||
def unfold (e : Expr) (declName : Name) : MetaM Simp.Result := do
|
||||
if let some unfoldThm ← getUnfoldEqnFor? declName then
|
||||
Simp.main e (← getSimpUnfoldContext) (methods := { pre := pre unfoldThm })
|
||||
(·.1) <$> Simp.main e (← getSimpUnfoldContext) (methods := { pre := pre unfoldThm })
|
||||
else
|
||||
return { expr := (← deltaExpand e (· == declName)) }
|
||||
where
|
||||
pre (unfoldThm : Name) (e : Expr) : SimpM Simp.Step := do
|
||||
match (← withReducible <| Simp.tryTheorem? e { proof := mkConst unfoldThm, name? := some unfoldThm, rfl := (← isRflTheorem unfoldThm) } (fun _ => return none)) with
|
||||
match (← withReducible <| Simp.tryTheorem? e { name := unfoldThm, proof := mkConst unfoldThm, rfl := (← isRflTheorem unfoldThm) } (fun _ => return none)) with
|
||||
| none => pure ()
|
||||
| some r => match (← reduceMatcher? r.expr) with
|
||||
| .reduced e' => return Simp.Step.done { r with expr := e' }
|
||||
|
|
|
|||
|
|
@ -59,38 +59,12 @@ def delabSort : Delab := do
|
|||
| none => `(Sort $(Level.quote l max_prec))
|
||||
|
||||
|
||||
def unresolveNameGlobal (n₀ : Name) : DelabM Name := do
|
||||
if n₀.hasMacroScopes then return n₀
|
||||
if (← getPPOption getPPFullNames) then
|
||||
match (← resolveGlobalName n₀) with
|
||||
| [(potentialMatch, _)] => if potentialMatch == n₀ then return n₀ else return rootNamespace ++ n₀
|
||||
| _ => return n₀ -- if can't resolve, return the original
|
||||
let mut initialNames := (getRevAliases (← getEnv) n₀).toArray
|
||||
initialNames := initialNames.push (rootNamespace ++ n₀)
|
||||
for initialName in initialNames do
|
||||
match (← unresolveNameCore initialName) with
|
||||
| none => continue
|
||||
| some n => return n
|
||||
return n₀ -- if can't resolve, return the original
|
||||
where
|
||||
unresolveNameCore (n : Name) : DelabM (Option Name) := do
|
||||
let mut revComponents := n.components'
|
||||
let mut candidate := Name.anonymous
|
||||
for _ in [:revComponents.length] do
|
||||
match revComponents with
|
||||
| [] => return none
|
||||
| cmpt::rest => candidate := cmpt ++ candidate; revComponents := rest
|
||||
match (← resolveGlobalName candidate) with
|
||||
| [(potentialMatch, _)] => if potentialMatch == n₀ then return some candidate else continue
|
||||
| _ => continue
|
||||
return none
|
||||
|
||||
-- NOTE: not a registered delaborator, as `const` is never called (see [delab] description)
|
||||
def delabConst : Delab := do
|
||||
let Expr.const c₀ ls ← getExpr | unreachable!
|
||||
let c₀ := if (← getPPOption getPPPrivateNames) then c₀ else (privateToUserName? c₀).getD c₀
|
||||
|
||||
let mut c ← unresolveNameGlobal c₀
|
||||
let mut c ← unresolveNameGlobal c₀ (fullNames := ← getPPOption getPPFullNames)
|
||||
let stx ← if ls.isEmpty || !(← getPPOption getPPUniverses) then
|
||||
if (← getLCtx).usesUserName c then
|
||||
-- `c` is also a local declaration
|
||||
|
|
|
|||
26
stage0/src/Lean/ResolveName.lean
generated
26
stage0/src/Lean/ResolveName.lean
generated
|
|
@ -306,4 +306,30 @@ def resolveGlobalConstNoOverload [Monad m] [MonadResolveName m] [MonadEnv m] [Mo
|
|||
| [c] => pure c
|
||||
| _ => throwErrorAt id s!"ambiguous identifier '{id}', possible interpretations: {cs.map mkConst}"
|
||||
|
||||
def unresolveNameGlobal [Monad m] [MonadResolveName m] [MonadEnv m] (n₀ : Name) (fullNames := false) : m Name := do
|
||||
if n₀.hasMacroScopes then return n₀
|
||||
if fullNames then
|
||||
match (← resolveGlobalName n₀) with
|
||||
| [(potentialMatch, _)] => if potentialMatch == n₀ then return n₀ else return rootNamespace ++ n₀
|
||||
| _ => return n₀ -- if can't resolve, return the original
|
||||
let mut initialNames := (getRevAliases (← getEnv) n₀).toArray
|
||||
initialNames := initialNames.push (rootNamespace ++ n₀)
|
||||
for initialName in initialNames do
|
||||
match (← unresolveNameCore initialName) with
|
||||
| none => continue
|
||||
| some n => return n
|
||||
return n₀ -- if can't resolve, return the original
|
||||
where
|
||||
unresolveNameCore (n : Name) : m (Option Name) := do
|
||||
let mut revComponents := n.components'
|
||||
let mut candidate := Name.anonymous
|
||||
for _ in [:revComponents.length] do
|
||||
match revComponents with
|
||||
| [] => return none
|
||||
| cmpt::rest => candidate := cmpt ++ candidate; revComponents := rest
|
||||
match (← resolveGlobalName candidate) with
|
||||
| [(potentialMatch, _)] => if potentialMatch == n₀ then return some candidate else continue
|
||||
| _ => continue
|
||||
return none
|
||||
|
||||
end Lean
|
||||
|
|
|
|||
536
stage0/stdlib/Init/Conv.c
generated
536
stage0/stdlib/Init/Conv.c
generated
File diff suppressed because it is too large
Load diff
147
stage0/stdlib/Init/Meta.c
generated
147
stage0/stdlib/Init/Meta.c
generated
|
|
@ -346,6 +346,7 @@ LEAN_EXPORT lean_object* l_Lean_TSyntax_instCoeTSyntaxConsSyntaxNodeKindNil(lean
|
|||
static lean_object* l_Lean_toolchain___closed__5;
|
||||
static lean_object* l_Lean_Parser_Tactic___aux__Init__Meta______macroRules__Lean__Parser__Tactic__declareSimpLikeTactic__1___lambda__1___closed__42;
|
||||
uint8_t lean_usize_dec_lt(size_t, size_t);
|
||||
static lean_object* l_Lean_Parser_Tactic_simpAutoUnfold___closed__26;
|
||||
static lean_object* l___private_Init_Meta_0__Lean_Meta_Simp_reprConfig____x40_Init_Meta___hyg_12088____closed__14;
|
||||
static lean_object* l_Lean_Option_hasQuote___rarg___closed__1;
|
||||
LEAN_EXPORT lean_object* l_Lean_version_patch;
|
||||
|
|
@ -629,7 +630,6 @@ LEAN_EXPORT lean_object* l_Lean_TSyntax_instCoeStrLitTerm(lean_object*);
|
|||
LEAN_EXPORT lean_object* l_Lean_TSyntax_expandInterpolatedStrChunks(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Syntax_setKind(lean_object*, lean_object*);
|
||||
static lean_object* l_Lean_Parser_Tactic___aux__Init__Meta______macroRules__Lean__Parser__Tactic__declareSimpLikeTactic__1___closed__42;
|
||||
static lean_object* l_Lean_Parser_Tactic_expandSimp____x40_Init_Meta___hyg_22774____lambda__1___closed__1;
|
||||
LEAN_EXPORT lean_object* lean_name_append_index_after(lean_object*, lean_object*);
|
||||
LEAN_EXPORT lean_object* l_Lean_Name_eraseSuffix_x3f(lean_object*, lean_object*);
|
||||
static lean_object* l___private_Init_Meta_0__Lean_Meta_reprTransparencyMode____x40_Init_Meta___hyg_10846____closed__7;
|
||||
|
|
@ -1035,7 +1035,6 @@ LEAN_EXPORT lean_object* l_Lean_Parser_Tactic_tacticErw____;
|
|||
static lean_object* l___private_Init_Meta_0__Lean_Syntax_reprSyntax____x40_Init_Meta___hyg_2120____closed__3;
|
||||
lean_object* l_Lean_Syntax_getKind(lean_object*);
|
||||
static lean_object* l_Lean_Parser_Tactic_simpAllArith___closed__8;
|
||||
static lean_object* l_Lean_Parser_Tactic_expandSimp____x40_Init_Meta___hyg_16762____lambda__1___closed__1;
|
||||
static lean_object* l_Lean_TSyntax_expandInterpolatedStr___closed__6;
|
||||
LEAN_EXPORT lean_object* l_Lean___aux__Init__Meta______macroRules__Lean__Parser__Syntax__subPrec__1(lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_MacroScopesView_review(lean_object*);
|
||||
|
|
@ -26892,7 +26891,7 @@ static lean_object* _init_l_Lean_Parser_Tactic___aux__Init__Meta______macroRules
|
|||
_start:
|
||||
{
|
||||
lean_object* x_1;
|
||||
x_1 = lean_mk_string_from_bytes("\"dsimp \"", 8);
|
||||
x_1 = lean_mk_string_from_bytes("\"dsimp\"", 7);
|
||||
return x_1;
|
||||
}
|
||||
}
|
||||
|
|
@ -27179,7 +27178,7 @@ static lean_object* _init_l_Lean_Parser_Tactic___aux__Init__Meta______macroRules
|
|||
_start:
|
||||
{
|
||||
lean_object* x_1;
|
||||
x_1 = lean_mk_string_from_bytes("\"only \"", 7);
|
||||
x_1 = lean_mk_string_from_bytes("\" only\"", 7);
|
||||
return x_1;
|
||||
}
|
||||
}
|
||||
|
|
@ -27187,7 +27186,7 @@ static lean_object* _init_l_Lean_Parser_Tactic___aux__Init__Meta______macroRules
|
|||
_start:
|
||||
{
|
||||
lean_object* x_1;
|
||||
x_1 = lean_mk_string_from_bytes("\"[\"", 3);
|
||||
x_1 = lean_mk_string_from_bytes("\" [\"", 4);
|
||||
return x_1;
|
||||
}
|
||||
}
|
||||
|
|
@ -27693,7 +27692,7 @@ static lean_object* _init_l_Lean_Parser_Tactic___aux__Init__Meta______macroRules
|
|||
_start:
|
||||
{
|
||||
lean_object* x_1;
|
||||
x_1 = lean_mk_string_from_bytes("\"simp_all \"", 11);
|
||||
x_1 = lean_mk_string_from_bytes("\"simp_all\"", 10);
|
||||
return x_1;
|
||||
}
|
||||
}
|
||||
|
|
@ -27798,7 +27797,7 @@ static lean_object* _init_l_Lean_Parser_Tactic___aux__Init__Meta______macroRules
|
|||
_start:
|
||||
{
|
||||
lean_object* x_1;
|
||||
x_1 = lean_mk_string_from_bytes("\"simp \"", 7);
|
||||
x_1 = lean_mk_string_from_bytes("\"simp\"", 6);
|
||||
return x_1;
|
||||
}
|
||||
}
|
||||
|
|
@ -29770,7 +29769,7 @@ static lean_object* _init_l_Lean_Parser_Tactic_simpAutoUnfold___closed__9() {
|
|||
_start:
|
||||
{
|
||||
lean_object* x_1;
|
||||
x_1 = lean_mk_string_from_bytes("only ", 5);
|
||||
x_1 = lean_mk_string_from_bytes(" only", 5);
|
||||
return x_1;
|
||||
}
|
||||
}
|
||||
|
|
@ -29815,14 +29814,22 @@ return x_4;
|
|||
static lean_object* _init_l_Lean_Parser_Tactic_simpAutoUnfold___closed__13() {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_1;
|
||||
x_1 = lean_mk_string_from_bytes(" [", 2);
|
||||
return x_1;
|
||||
}
|
||||
}
|
||||
static lean_object* _init_l_Lean_Parser_Tactic_simpAutoUnfold___closed__14() {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_1; lean_object* x_2;
|
||||
x_1 = l_List_repr_x27___at___private_Init_Meta_0__Lean_Syntax_reprPreresolved____x40_Init_Meta___hyg_2003____spec__1___closed__6;
|
||||
x_1 = l_Lean_Parser_Tactic_simpAutoUnfold___closed__13;
|
||||
x_2 = lean_alloc_ctor(5, 1, 0);
|
||||
lean_ctor_set(x_2, 0, x_1);
|
||||
return x_2;
|
||||
}
|
||||
}
|
||||
static lean_object* _init_l_Lean_Parser_Tactic_simpAutoUnfold___closed__14() {
|
||||
static lean_object* _init_l_Lean_Parser_Tactic_simpAutoUnfold___closed__15() {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4;
|
||||
|
|
@ -29836,13 +29843,13 @@ lean_ctor_set(x_4, 2, x_3);
|
|||
return x_4;
|
||||
}
|
||||
}
|
||||
static lean_object* _init_l_Lean_Parser_Tactic_simpAutoUnfold___closed__15() {
|
||||
static lean_object* _init_l_Lean_Parser_Tactic_simpAutoUnfold___closed__16() {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4;
|
||||
x_1 = l_Lean_Parser_Tactic_declareSimpLikeTactic___closed__11;
|
||||
x_2 = l_Lean_Parser_Tactic_simpStar;
|
||||
x_3 = l_Lean_Parser_Tactic_simpAutoUnfold___closed__14;
|
||||
x_3 = l_Lean_Parser_Tactic_simpAutoUnfold___closed__15;
|
||||
x_4 = lean_alloc_ctor(2, 3, 0);
|
||||
lean_ctor_set(x_4, 0, x_1);
|
||||
lean_ctor_set(x_4, 1, x_2);
|
||||
|
|
@ -29850,7 +29857,7 @@ lean_ctor_set(x_4, 2, x_3);
|
|||
return x_4;
|
||||
}
|
||||
}
|
||||
static lean_object* _init_l_Lean_Parser_Tactic_simpAutoUnfold___closed__16() {
|
||||
static lean_object* _init_l_Lean_Parser_Tactic_simpAutoUnfold___closed__17() {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_1;
|
||||
|
|
@ -29858,23 +29865,23 @@ x_1 = lean_mk_string_from_bytes(", ", 2);
|
|||
return x_1;
|
||||
}
|
||||
}
|
||||
static lean_object* _init_l_Lean_Parser_Tactic_simpAutoUnfold___closed__17() {
|
||||
static lean_object* _init_l_Lean_Parser_Tactic_simpAutoUnfold___closed__18() {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_1; lean_object* x_2;
|
||||
x_1 = l_Lean_Parser_Tactic_simpAutoUnfold___closed__16;
|
||||
x_1 = l_Lean_Parser_Tactic_simpAutoUnfold___closed__17;
|
||||
x_2 = lean_alloc_ctor(5, 1, 0);
|
||||
lean_ctor_set(x_2, 0, x_1);
|
||||
return x_2;
|
||||
}
|
||||
}
|
||||
static lean_object* _init_l_Lean_Parser_Tactic_simpAutoUnfold___closed__18() {
|
||||
static lean_object* _init_l_Lean_Parser_Tactic_simpAutoUnfold___closed__19() {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_1; lean_object* x_2; lean_object* x_3; uint8_t x_4; lean_object* x_5;
|
||||
x_1 = l_Lean_Parser_Tactic_simpAutoUnfold___closed__15;
|
||||
x_1 = l_Lean_Parser_Tactic_simpAutoUnfold___closed__16;
|
||||
x_2 = l_List_repr_x27___at___private_Init_Meta_0__Lean_Syntax_reprPreresolved____x40_Init_Meta___hyg_2003____spec__1___closed__3;
|
||||
x_3 = l_Lean_Parser_Tactic_simpAutoUnfold___closed__17;
|
||||
x_3 = l_Lean_Parser_Tactic_simpAutoUnfold___closed__18;
|
||||
x_4 = 0;
|
||||
x_5 = lean_alloc_ctor(10, 3, 1);
|
||||
lean_ctor_set(x_5, 0, x_1);
|
||||
|
|
@ -29884,13 +29891,13 @@ lean_ctor_set_uint8(x_5, sizeof(void*)*3, x_4);
|
|||
return x_5;
|
||||
}
|
||||
}
|
||||
static lean_object* _init_l_Lean_Parser_Tactic_simpAutoUnfold___closed__19() {
|
||||
static lean_object* _init_l_Lean_Parser_Tactic_simpAutoUnfold___closed__20() {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4;
|
||||
x_1 = l_Lean_termEval__prec_____closed__4;
|
||||
x_2 = l_Lean_Parser_Tactic_simpAutoUnfold___closed__13;
|
||||
x_3 = l_Lean_Parser_Tactic_simpAutoUnfold___closed__18;
|
||||
x_2 = l_Lean_Parser_Tactic_simpAutoUnfold___closed__14;
|
||||
x_3 = l_Lean_Parser_Tactic_simpAutoUnfold___closed__19;
|
||||
x_4 = lean_alloc_ctor(2, 3, 0);
|
||||
lean_ctor_set(x_4, 0, x_1);
|
||||
lean_ctor_set(x_4, 1, x_2);
|
||||
|
|
@ -29898,7 +29905,7 @@ lean_ctor_set(x_4, 2, x_3);
|
|||
return x_4;
|
||||
}
|
||||
}
|
||||
static lean_object* _init_l_Lean_Parser_Tactic_simpAutoUnfold___closed__20() {
|
||||
static lean_object* _init_l_Lean_Parser_Tactic_simpAutoUnfold___closed__21() {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_1; lean_object* x_2;
|
||||
|
|
@ -29908,13 +29915,13 @@ lean_ctor_set(x_2, 0, x_1);
|
|||
return x_2;
|
||||
}
|
||||
}
|
||||
static lean_object* _init_l_Lean_Parser_Tactic_simpAutoUnfold___closed__21() {
|
||||
static lean_object* _init_l_Lean_Parser_Tactic_simpAutoUnfold___closed__22() {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4;
|
||||
x_1 = l_Lean_termEval__prec_____closed__4;
|
||||
x_2 = l_Lean_Parser_Tactic_simpAutoUnfold___closed__19;
|
||||
x_3 = l_Lean_Parser_Tactic_simpAutoUnfold___closed__20;
|
||||
x_2 = l_Lean_Parser_Tactic_simpAutoUnfold___closed__20;
|
||||
x_3 = l_Lean_Parser_Tactic_simpAutoUnfold___closed__21;
|
||||
x_4 = lean_alloc_ctor(2, 3, 0);
|
||||
lean_ctor_set(x_4, 0, x_1);
|
||||
lean_ctor_set(x_4, 1, x_2);
|
||||
|
|
@ -29922,30 +29929,16 @@ lean_ctor_set(x_4, 2, x_3);
|
|||
return x_4;
|
||||
}
|
||||
}
|
||||
static lean_object* _init_l_Lean_Parser_Tactic_simpAutoUnfold___closed__22() {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_1; lean_object* x_2; lean_object* x_3;
|
||||
x_1 = l_Lean_Parser_Tactic_tacticErw_______closed__9;
|
||||
x_2 = l_Lean_Parser_Tactic_simpAutoUnfold___closed__21;
|
||||
x_3 = lean_alloc_ctor(1, 2, 0);
|
||||
lean_ctor_set(x_3, 0, x_1);
|
||||
lean_ctor_set(x_3, 1, x_2);
|
||||
return x_3;
|
||||
}
|
||||
}
|
||||
static lean_object* _init_l_Lean_Parser_Tactic_simpAutoUnfold___closed__23() {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4;
|
||||
x_1 = l_Lean_termEval__prec_____closed__4;
|
||||
x_2 = l_Lean_Parser_Tactic_simpAutoUnfold___closed__12;
|
||||
x_3 = l_Lean_Parser_Tactic_simpAutoUnfold___closed__22;
|
||||
x_4 = lean_alloc_ctor(2, 3, 0);
|
||||
lean_ctor_set(x_4, 0, x_1);
|
||||
lean_ctor_set(x_4, 1, x_2);
|
||||
lean_ctor_set(x_4, 2, x_3);
|
||||
return x_4;
|
||||
lean_object* x_1; lean_object* x_2; lean_object* x_3;
|
||||
x_1 = l_Lean_Parser_Tactic_tacticErw_______closed__9;
|
||||
x_2 = l_Lean_Parser_Tactic_simpAutoUnfold___closed__22;
|
||||
x_3 = lean_alloc_ctor(1, 2, 0);
|
||||
lean_ctor_set(x_3, 0, x_1);
|
||||
lean_ctor_set(x_3, 1, x_2);
|
||||
return x_3;
|
||||
}
|
||||
}
|
||||
static lean_object* _init_l_Lean_Parser_Tactic_simpAutoUnfold___closed__24() {
|
||||
|
|
@ -29953,8 +29946,8 @@ _start:
|
|||
{
|
||||
lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4;
|
||||
x_1 = l_Lean_termEval__prec_____closed__4;
|
||||
x_2 = l_Lean_Parser_Tactic_simpAutoUnfold___closed__23;
|
||||
x_3 = l_Lean_Parser_Tactic_tacticErw_______closed__10;
|
||||
x_2 = l_Lean_Parser_Tactic_simpAutoUnfold___closed__12;
|
||||
x_3 = l_Lean_Parser_Tactic_simpAutoUnfold___closed__23;
|
||||
x_4 = lean_alloc_ctor(2, 3, 0);
|
||||
lean_ctor_set(x_4, 0, x_1);
|
||||
lean_ctor_set(x_4, 1, x_2);
|
||||
|
|
@ -29966,9 +29959,23 @@ static lean_object* _init_l_Lean_Parser_Tactic_simpAutoUnfold___closed__25() {
|
|||
_start:
|
||||
{
|
||||
lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4;
|
||||
x_1 = l_Lean_termEval__prec_____closed__4;
|
||||
x_2 = l_Lean_Parser_Tactic_simpAutoUnfold___closed__24;
|
||||
x_3 = l_Lean_Parser_Tactic_tacticErw_______closed__10;
|
||||
x_4 = lean_alloc_ctor(2, 3, 0);
|
||||
lean_ctor_set(x_4, 0, x_1);
|
||||
lean_ctor_set(x_4, 1, x_2);
|
||||
lean_ctor_set(x_4, 2, x_3);
|
||||
return x_4;
|
||||
}
|
||||
}
|
||||
static lean_object* _init_l_Lean_Parser_Tactic_simpAutoUnfold___closed__26() {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4;
|
||||
x_1 = l_Lean_Parser_Tactic_simpAutoUnfold___closed__2;
|
||||
x_2 = lean_unsigned_to_nat(1022u);
|
||||
x_3 = l_Lean_Parser_Tactic_simpAutoUnfold___closed__24;
|
||||
x_3 = l_Lean_Parser_Tactic_simpAutoUnfold___closed__25;
|
||||
x_4 = lean_alloc_ctor(3, 3, 0);
|
||||
lean_ctor_set(x_4, 0, x_1);
|
||||
lean_ctor_set(x_4, 1, x_2);
|
||||
|
|
@ -29980,15 +29987,7 @@ static lean_object* _init_l_Lean_Parser_Tactic_simpAutoUnfold() {
|
|||
_start:
|
||||
{
|
||||
lean_object* x_1;
|
||||
x_1 = l_Lean_Parser_Tactic_simpAutoUnfold___closed__25;
|
||||
return x_1;
|
||||
}
|
||||
}
|
||||
static lean_object* _init_l_Lean_Parser_Tactic_expandSimp____x40_Init_Meta___hyg_16762____lambda__1___closed__1() {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_1;
|
||||
x_1 = lean_mk_string_from_bytes("simp ", 5);
|
||||
x_1 = l_Lean_Parser_Tactic_simpAutoUnfold___closed__26;
|
||||
return x_1;
|
||||
}
|
||||
}
|
||||
|
|
@ -30000,7 +29999,7 @@ x_5 = l_Lean_Parser_Tactic___aux__Init__Meta______macroRules__Lean__Parser__Tact
|
|||
x_6 = l_Lean_Syntax_setKind(x_1, x_5);
|
||||
x_7 = lean_unsigned_to_nat(0u);
|
||||
x_8 = l_Lean_Syntax_getArg(x_6, x_7);
|
||||
x_9 = l_Lean_Parser_Tactic_expandSimp____x40_Init_Meta___hyg_16762____lambda__1___closed__1;
|
||||
x_9 = l_Lean_Parser_Tactic___aux__Init__Meta______macroRules__Lean__Parser__Tactic__declareSimpLikeTactic__1___closed__91;
|
||||
x_10 = l_Lean_mkAtomFrom(x_8, x_9);
|
||||
x_11 = l_Lean_Syntax_setArg(x_6, x_7, x_10);
|
||||
x_12 = l_Lean_mkOptionalNode___closed__2;
|
||||
|
|
@ -30937,7 +30936,7 @@ _start:
|
|||
lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4;
|
||||
x_1 = l_Lean_termEval__prec_____closed__4;
|
||||
x_2 = l_Lean_Parser_Tactic_simpArith___closed__7;
|
||||
x_3 = l_Lean_Parser_Tactic_simpAutoUnfold___closed__22;
|
||||
x_3 = l_Lean_Parser_Tactic_simpAutoUnfold___closed__23;
|
||||
x_4 = lean_alloc_ctor(2, 3, 0);
|
||||
lean_ctor_set(x_4, 0, x_1);
|
||||
lean_ctor_set(x_4, 1, x_2);
|
||||
|
|
@ -31682,7 +31681,7 @@ _start:
|
|||
lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4;
|
||||
x_1 = l_Lean_termEval__prec_____closed__4;
|
||||
x_2 = l_Lean_Parser_Tactic_simpArithAutoUnfold___closed__7;
|
||||
x_3 = l_Lean_Parser_Tactic_simpAutoUnfold___closed__22;
|
||||
x_3 = l_Lean_Parser_Tactic_simpAutoUnfold___closed__23;
|
||||
x_4 = lean_alloc_ctor(2, 3, 0);
|
||||
lean_ctor_set(x_4, 0, x_1);
|
||||
lean_ctor_set(x_4, 1, x_2);
|
||||
|
|
@ -32464,9 +32463,9 @@ static lean_object* _init_l_Lean_Parser_Tactic_simpAllAutoUnfold___closed__8() {
|
|||
_start:
|
||||
{
|
||||
lean_object* x_1; lean_object* x_2; lean_object* x_3; uint8_t x_4; lean_object* x_5;
|
||||
x_1 = l_Lean_Parser_Tactic_simpAutoUnfold___closed__14;
|
||||
x_1 = l_Lean_Parser_Tactic_simpAutoUnfold___closed__15;
|
||||
x_2 = l_List_repr_x27___at___private_Init_Meta_0__Lean_Syntax_reprPreresolved____x40_Init_Meta___hyg_2003____spec__1___closed__3;
|
||||
x_3 = l_Lean_Parser_Tactic_simpAutoUnfold___closed__17;
|
||||
x_3 = l_Lean_Parser_Tactic_simpAutoUnfold___closed__18;
|
||||
x_4 = 0;
|
||||
x_5 = lean_alloc_ctor(10, 3, 1);
|
||||
lean_ctor_set(x_5, 0, x_1);
|
||||
|
|
@ -32481,7 +32480,7 @@ _start:
|
|||
{
|
||||
lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4;
|
||||
x_1 = l_Lean_termEval__prec_____closed__4;
|
||||
x_2 = l_Lean_Parser_Tactic_simpAutoUnfold___closed__13;
|
||||
x_2 = l_Lean_Parser_Tactic_simpAutoUnfold___closed__14;
|
||||
x_3 = l_Lean_Parser_Tactic_simpAllAutoUnfold___closed__8;
|
||||
x_4 = lean_alloc_ctor(2, 3, 0);
|
||||
lean_ctor_set(x_4, 0, x_1);
|
||||
|
|
@ -32496,7 +32495,7 @@ _start:
|
|||
lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4;
|
||||
x_1 = l_Lean_termEval__prec_____closed__4;
|
||||
x_2 = l_Lean_Parser_Tactic_simpAllAutoUnfold___closed__9;
|
||||
x_3 = l_Lean_Parser_Tactic_simpAutoUnfold___closed__20;
|
||||
x_3 = l_Lean_Parser_Tactic_simpAutoUnfold___closed__21;
|
||||
x_4 = lean_alloc_ctor(2, 3, 0);
|
||||
lean_ctor_set(x_4, 0, x_1);
|
||||
lean_ctor_set(x_4, 1, x_2);
|
||||
|
|
@ -32556,7 +32555,7 @@ static lean_object* _init_l_Lean_Parser_Tactic_expandSimp____x40_Init_Meta___hyg
|
|||
_start:
|
||||
{
|
||||
lean_object* x_1;
|
||||
x_1 = lean_mk_string_from_bytes("simp_all ", 9);
|
||||
x_1 = lean_mk_string_from_bytes("simp_all", 8);
|
||||
return x_1;
|
||||
}
|
||||
}
|
||||
|
|
@ -34871,14 +34870,6 @@ x_1 = l_Lean_Parser_Tactic_dsimpAutoUnfold___closed__10;
|
|||
return x_1;
|
||||
}
|
||||
}
|
||||
static lean_object* _init_l_Lean_Parser_Tactic_expandSimp____x40_Init_Meta___hyg_22774____lambda__1___closed__1() {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_1;
|
||||
x_1 = lean_mk_string_from_bytes("dsimp ", 6);
|
||||
return x_1;
|
||||
}
|
||||
}
|
||||
LEAN_EXPORT lean_object* l_Lean_Parser_Tactic_expandSimp____x40_Init_Meta___hyg_22774____lambda__1(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) {
|
||||
_start:
|
||||
{
|
||||
|
|
@ -34887,7 +34878,7 @@ x_5 = l_Lean_Parser_Tactic___aux__Init__Meta______macroRules__Lean__Parser__Tact
|
|||
x_6 = l_Lean_Syntax_setKind(x_1, x_5);
|
||||
x_7 = lean_unsigned_to_nat(0u);
|
||||
x_8 = l_Lean_Syntax_getArg(x_6, x_7);
|
||||
x_9 = l_Lean_Parser_Tactic_expandSimp____x40_Init_Meta___hyg_22774____lambda__1___closed__1;
|
||||
x_9 = l___private_Init_Meta_0__Lean_Meta_Simp_reprConfig____x40_Init_Meta___hyg_12088____closed__19;
|
||||
x_10 = l_Lean_mkAtomFrom(x_8, x_9);
|
||||
x_11 = l_Lean_Syntax_setArg(x_6, x_7, x_10);
|
||||
x_12 = l_Lean_mkOptionalNode___closed__2;
|
||||
|
|
@ -37139,10 +37130,10 @@ l_Lean_Parser_Tactic_simpAutoUnfold___closed__24 = _init_l_Lean_Parser_Tactic_si
|
|||
lean_mark_persistent(l_Lean_Parser_Tactic_simpAutoUnfold___closed__24);
|
||||
l_Lean_Parser_Tactic_simpAutoUnfold___closed__25 = _init_l_Lean_Parser_Tactic_simpAutoUnfold___closed__25();
|
||||
lean_mark_persistent(l_Lean_Parser_Tactic_simpAutoUnfold___closed__25);
|
||||
l_Lean_Parser_Tactic_simpAutoUnfold___closed__26 = _init_l_Lean_Parser_Tactic_simpAutoUnfold___closed__26();
|
||||
lean_mark_persistent(l_Lean_Parser_Tactic_simpAutoUnfold___closed__26);
|
||||
l_Lean_Parser_Tactic_simpAutoUnfold = _init_l_Lean_Parser_Tactic_simpAutoUnfold();
|
||||
lean_mark_persistent(l_Lean_Parser_Tactic_simpAutoUnfold);
|
||||
l_Lean_Parser_Tactic_expandSimp____x40_Init_Meta___hyg_16762____lambda__1___closed__1 = _init_l_Lean_Parser_Tactic_expandSimp____x40_Init_Meta___hyg_16762____lambda__1___closed__1();
|
||||
lean_mark_persistent(l_Lean_Parser_Tactic_expandSimp____x40_Init_Meta___hyg_16762____lambda__1___closed__1);
|
||||
l_Lean_Parser_Tactic_expandSimp____x40_Init_Meta___hyg_16762____closed__1 = _init_l_Lean_Parser_Tactic_expandSimp____x40_Init_Meta___hyg_16762____closed__1();
|
||||
lean_mark_persistent(l_Lean_Parser_Tactic_expandSimp____x40_Init_Meta___hyg_16762____closed__1);
|
||||
l_Lean_Parser_Tactic_expandSimp____x40_Init_Meta___hyg_16762____closed__2 = _init_l_Lean_Parser_Tactic_expandSimp____x40_Init_Meta___hyg_16762____closed__2();
|
||||
|
|
@ -37349,8 +37340,6 @@ l_Lean_Parser_Tactic_dsimpAutoUnfold___closed__10 = _init_l_Lean_Parser_Tactic_d
|
|||
lean_mark_persistent(l_Lean_Parser_Tactic_dsimpAutoUnfold___closed__10);
|
||||
l_Lean_Parser_Tactic_dsimpAutoUnfold = _init_l_Lean_Parser_Tactic_dsimpAutoUnfold();
|
||||
lean_mark_persistent(l_Lean_Parser_Tactic_dsimpAutoUnfold);
|
||||
l_Lean_Parser_Tactic_expandSimp____x40_Init_Meta___hyg_22774____lambda__1___closed__1 = _init_l_Lean_Parser_Tactic_expandSimp____x40_Init_Meta___hyg_22774____lambda__1___closed__1();
|
||||
lean_mark_persistent(l_Lean_Parser_Tactic_expandSimp____x40_Init_Meta___hyg_22774____lambda__1___closed__1);
|
||||
l_Lean_Parser_Tactic_expandSimp____x40_Init_Meta___hyg_22774____closed__1 = _init_l_Lean_Parser_Tactic_expandSimp____x40_Init_Meta___hyg_22774____closed__1();
|
||||
lean_mark_persistent(l_Lean_Parser_Tactic_expandSimp____x40_Init_Meta___hyg_22774____closed__1);
|
||||
l_Lean_Parser_Tactic_expandSimp____x40_Init_Meta___hyg_22774____closed__2 = _init_l_Lean_Parser_Tactic_expandSimp____x40_Init_Meta___hyg_22774____closed__2();
|
||||
|
|
|
|||
381
stage0/stdlib/Init/Tactics.c
generated
381
stage0/stdlib/Init/Tactics.c
generated
|
|
@ -248,11 +248,9 @@ static lean_object* l_Lean_Parser_Tactic___aux__Init__Tactics______macroRules__L
|
|||
static lean_object* l_Lean_Parser_Tactic___aux__Init__Tactics______macroRules__Lean__Parser__Tactic__tactic___x3c_x3b_x3e____1___closed__1;
|
||||
static lean_object* l_Lean_Parser_Tactic___aux__Init__Tactics______macroRules__Lean__Parser__Tactic__rwSeq__1___closed__5;
|
||||
static lean_object* l_Lean_Parser_Tactic_contradiction___closed__1;
|
||||
static lean_object* l_Lean_Parser_Tactic_simp___closed__20;
|
||||
static lean_object* l___aux__Init__Tactics______macroRules__term_u2039___u203a__1___closed__3;
|
||||
static lean_object* l_term_____x5b___x5d_x27_____closed__2;
|
||||
static lean_object* l_Lean_Parser_Tactic___aux__Init__Tactics______macroRules__Lean__Parser__Tactic__tacticHave____1___closed__5;
|
||||
static lean_object* l_Lean_Parser_Tactic_dsimp___closed__10;
|
||||
static lean_object* l_Lean_Parser_Tactic_rotateLeft___closed__7;
|
||||
static lean_object* l_Lean_Parser_Tactic_subst___closed__4;
|
||||
static lean_object* l_Lean_Parser_Tactic_tacticHave_x27___x3a_x3d_____closed__4;
|
||||
|
|
@ -391,6 +389,7 @@ static lean_object* l_Lean_Parser_Tactic_inductionAlt___closed__10;
|
|||
static lean_object* l_Lean_Parser_Tactic_config___closed__7;
|
||||
static lean_object* l_Lean_Parser_Tactic_location___closed__6;
|
||||
static lean_object* l_Lean_Parser_Tactic_clear___closed__3;
|
||||
static lean_object* l_term_____x5b___x5d___closed__11;
|
||||
static lean_object* l_Lean_Parser_Tactic_intros___closed__8;
|
||||
static lean_object* l_Lean_Parser_Tactic___aux__Init__Tactics______macroRules__Lean__Parser__Tactic__tacticTrivial__5___closed__3;
|
||||
static lean_object* l_Lean_Parser_Tactic_split___closed__1;
|
||||
|
|
@ -798,7 +797,6 @@ static lean_object* l_Lean_Parser_Tactic_induction___closed__6;
|
|||
static lean_object* l_Lean_Parser_Tactic_simpAll___closed__7;
|
||||
static lean_object* l_Lean_Parser_Tactic_discharger___closed__12;
|
||||
static lean_object* l_Lean_Parser_Tactic___aux__Init__Tactics______macroRules__Lean__Parser__Tactic__tacticTrivial__6___closed__3;
|
||||
static lean_object* l_Lean_Parser_Attr_simp___closed__11;
|
||||
static lean_object* l_Lean_Parser_Tactic_letrec___closed__2;
|
||||
LEAN_EXPORT lean_object* l_Lean_Parser_Tactic___aux__Init__Tactics______macroRules__Lean__Parser__Tactic__tacticInfer__instance__1(lean_object*, lean_object*, lean_object*);
|
||||
static lean_object* l_term_u2039___u203a___closed__2;
|
||||
|
|
@ -1132,6 +1130,7 @@ static lean_object* l_term_u2039___u203a___closed__4;
|
|||
static lean_object* l_Lean_Parser_Tactic_rewriteSeq___closed__2;
|
||||
static lean_object* l_Lean_Parser_Tactic_dbgTrace___closed__1;
|
||||
static lean_object* l_Lean_Parser_Tactic_inductionAltLHS___closed__7;
|
||||
static lean_object* l_Lean_Parser_Tactic_config___closed__15;
|
||||
static lean_object* l_Lean_Parser_Attr_simp___closed__9;
|
||||
static lean_object* l_Lean_Parser_Tactic_letrec___closed__10;
|
||||
static lean_object* l_Lean_Parser_Tactic_withAnnotateState___closed__23;
|
||||
|
|
@ -7294,14 +7293,22 @@ return x_3;
|
|||
static lean_object* _init_l_Lean_Parser_Tactic_config___closed__5() {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_1;
|
||||
x_1 = lean_mk_string_from_bytes(" (", 2);
|
||||
return x_1;
|
||||
}
|
||||
}
|
||||
static lean_object* _init_l_Lean_Parser_Tactic_config___closed__6() {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_1; lean_object* x_2;
|
||||
x_1 = l_Lean_Parser_Tactic_paren___closed__3;
|
||||
x_1 = l_Lean_Parser_Tactic_config___closed__5;
|
||||
x_2 = lean_alloc_ctor(5, 1, 0);
|
||||
lean_ctor_set(x_2, 0, x_1);
|
||||
return x_2;
|
||||
}
|
||||
}
|
||||
static lean_object* _init_l_Lean_Parser_Tactic_config___closed__6() {
|
||||
static lean_object* _init_l_Lean_Parser_Tactic_config___closed__7() {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_1; uint8_t x_2; lean_object* x_3;
|
||||
|
|
@ -7313,13 +7320,13 @@ lean_ctor_set_uint8(x_3, sizeof(void*)*1, x_2);
|
|||
return x_3;
|
||||
}
|
||||
}
|
||||
static lean_object* _init_l_Lean_Parser_Tactic_config___closed__7() {
|
||||
static lean_object* _init_l_Lean_Parser_Tactic_config___closed__8() {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4;
|
||||
x_1 = l_Lean_Parser_Tactic_withAnnotateState___closed__10;
|
||||
x_2 = l_Lean_Parser_Tactic_config___closed__5;
|
||||
x_3 = l_Lean_Parser_Tactic_config___closed__6;
|
||||
x_2 = l_Lean_Parser_Tactic_config___closed__6;
|
||||
x_3 = l_Lean_Parser_Tactic_config___closed__7;
|
||||
x_4 = lean_alloc_ctor(2, 3, 0);
|
||||
lean_ctor_set(x_4, 0, x_1);
|
||||
lean_ctor_set(x_4, 1, x_2);
|
||||
|
|
@ -7327,19 +7334,19 @@ lean_ctor_set(x_4, 2, x_3);
|
|||
return x_4;
|
||||
}
|
||||
}
|
||||
static lean_object* _init_l_Lean_Parser_Tactic_config___closed__8() {
|
||||
static lean_object* _init_l_Lean_Parser_Tactic_config___closed__9() {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_1; lean_object* x_2; lean_object* x_3;
|
||||
x_1 = l_Lean_Parser_Tactic_config___closed__4;
|
||||
x_2 = l_Lean_Parser_Tactic_config___closed__7;
|
||||
x_2 = l_Lean_Parser_Tactic_config___closed__8;
|
||||
x_3 = lean_alloc_ctor(1, 2, 0);
|
||||
lean_ctor_set(x_3, 0, x_1);
|
||||
lean_ctor_set(x_3, 1, x_2);
|
||||
return x_3;
|
||||
}
|
||||
}
|
||||
static lean_object* _init_l_Lean_Parser_Tactic_config___closed__9() {
|
||||
static lean_object* _init_l_Lean_Parser_Tactic_config___closed__10() {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_1;
|
||||
|
|
@ -7347,28 +7354,14 @@ x_1 = lean_mk_string_from_bytes(" := ", 4);
|
|||
return x_1;
|
||||
}
|
||||
}
|
||||
static lean_object* _init_l_Lean_Parser_Tactic_config___closed__10() {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_1; lean_object* x_2;
|
||||
x_1 = l_Lean_Parser_Tactic_config___closed__9;
|
||||
x_2 = lean_alloc_ctor(5, 1, 0);
|
||||
lean_ctor_set(x_2, 0, x_1);
|
||||
return x_2;
|
||||
}
|
||||
}
|
||||
static lean_object* _init_l_Lean_Parser_Tactic_config___closed__11() {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4;
|
||||
x_1 = l_Lean_Parser_Tactic_withAnnotateState___closed__10;
|
||||
x_2 = l_Lean_Parser_Tactic_config___closed__8;
|
||||
x_3 = l_Lean_Parser_Tactic_config___closed__10;
|
||||
x_4 = lean_alloc_ctor(2, 3, 0);
|
||||
lean_ctor_set(x_4, 0, x_1);
|
||||
lean_ctor_set(x_4, 1, x_2);
|
||||
lean_ctor_set(x_4, 2, x_3);
|
||||
return x_4;
|
||||
lean_object* x_1; lean_object* x_2;
|
||||
x_1 = l_Lean_Parser_Tactic_config___closed__10;
|
||||
x_2 = lean_alloc_ctor(5, 1, 0);
|
||||
lean_ctor_set(x_2, 0, x_1);
|
||||
return x_2;
|
||||
}
|
||||
}
|
||||
static lean_object* _init_l_Lean_Parser_Tactic_config___closed__12() {
|
||||
|
|
@ -7376,8 +7369,8 @@ _start:
|
|||
{
|
||||
lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4;
|
||||
x_1 = l_Lean_Parser_Tactic_withAnnotateState___closed__10;
|
||||
x_2 = l_Lean_Parser_Tactic_config___closed__11;
|
||||
x_3 = l_Lean_Parser_Tactic_rename___closed__5;
|
||||
x_2 = l_Lean_Parser_Tactic_config___closed__9;
|
||||
x_3 = l_Lean_Parser_Tactic_config___closed__11;
|
||||
x_4 = lean_alloc_ctor(2, 3, 0);
|
||||
lean_ctor_set(x_4, 0, x_1);
|
||||
lean_ctor_set(x_4, 1, x_2);
|
||||
|
|
@ -7391,7 +7384,7 @@ _start:
|
|||
lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4;
|
||||
x_1 = l_Lean_Parser_Tactic_withAnnotateState___closed__10;
|
||||
x_2 = l_Lean_Parser_Tactic_config___closed__12;
|
||||
x_3 = l_Lean_Parser_Tactic_paren___closed__7;
|
||||
x_3 = l_Lean_Parser_Tactic_rename___closed__5;
|
||||
x_4 = lean_alloc_ctor(2, 3, 0);
|
||||
lean_ctor_set(x_4, 0, x_1);
|
||||
lean_ctor_set(x_4, 1, x_2);
|
||||
|
|
@ -7403,9 +7396,23 @@ static lean_object* _init_l_Lean_Parser_Tactic_config___closed__14() {
|
|||
_start:
|
||||
{
|
||||
lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4;
|
||||
x_1 = l_Lean_Parser_Tactic_withAnnotateState___closed__10;
|
||||
x_2 = l_Lean_Parser_Tactic_config___closed__13;
|
||||
x_3 = l_Lean_Parser_Tactic_paren___closed__7;
|
||||
x_4 = lean_alloc_ctor(2, 3, 0);
|
||||
lean_ctor_set(x_4, 0, x_1);
|
||||
lean_ctor_set(x_4, 1, x_2);
|
||||
lean_ctor_set(x_4, 2, x_3);
|
||||
return x_4;
|
||||
}
|
||||
}
|
||||
static lean_object* _init_l_Lean_Parser_Tactic_config___closed__15() {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4;
|
||||
x_1 = l_Lean_Parser_Tactic_config___closed__1;
|
||||
x_2 = l_Lean_Parser_Tactic_config___closed__2;
|
||||
x_3 = l_Lean_Parser_Tactic_config___closed__13;
|
||||
x_3 = l_Lean_Parser_Tactic_config___closed__14;
|
||||
x_4 = lean_alloc_ctor(9, 3, 0);
|
||||
lean_ctor_set(x_4, 0, x_1);
|
||||
lean_ctor_set(x_4, 1, x_2);
|
||||
|
|
@ -7417,7 +7424,7 @@ static lean_object* _init_l_Lean_Parser_Tactic_config() {
|
|||
_start:
|
||||
{
|
||||
lean_object* x_1;
|
||||
x_1 = l_Lean_Parser_Tactic_config___closed__14;
|
||||
x_1 = l_Lean_Parser_Tactic_config___closed__15;
|
||||
return x_1;
|
||||
}
|
||||
}
|
||||
|
|
@ -8031,7 +8038,7 @@ static lean_object* _init_l_Lean_Parser_Tactic_rwRuleSeq___closed__3() {
|
|||
_start:
|
||||
{
|
||||
lean_object* x_1;
|
||||
x_1 = lean_mk_string_from_bytes("[", 1);
|
||||
x_1 = lean_mk_string_from_bytes(" [", 2);
|
||||
return x_1;
|
||||
}
|
||||
}
|
||||
|
|
@ -8177,7 +8184,7 @@ static lean_object* _init_l_Lean_Parser_Tactic_rewriteSeq___closed__3() {
|
|||
_start:
|
||||
{
|
||||
lean_object* x_1;
|
||||
x_1 = lean_mk_string_from_bytes("rewrite ", 8);
|
||||
x_1 = lean_mk_string_from_bytes("rewrite", 7);
|
||||
return x_1;
|
||||
}
|
||||
}
|
||||
|
|
@ -8291,7 +8298,7 @@ static lean_object* _init_l_Lean_Parser_Tactic_rwSeq___closed__3() {
|
|||
_start:
|
||||
{
|
||||
lean_object* x_1;
|
||||
x_1 = lean_mk_string_from_bytes("rw ", 3);
|
||||
x_1 = lean_mk_string_from_bytes("rw", 2);
|
||||
return x_1;
|
||||
}
|
||||
}
|
||||
|
|
@ -8375,7 +8382,7 @@ static lean_object* _init_l_Lean_Parser_Tactic___aux__Init__Tactics______macroRu
|
|||
_start:
|
||||
{
|
||||
lean_object* x_1;
|
||||
x_1 = lean_mk_string_from_bytes("rewrite", 7);
|
||||
x_1 = lean_mk_string_from_bytes("[", 1);
|
||||
return x_1;
|
||||
}
|
||||
}
|
||||
|
|
@ -8542,12 +8549,12 @@ if (lean_is_exclusive(x_25)) {
|
|||
lean_dec_ref(x_25);
|
||||
x_28 = lean_box(0);
|
||||
}
|
||||
x_29 = l_Lean_Parser_Tactic___aux__Init__Tactics______macroRules__Lean__Parser__Tactic__rwSeq__1___closed__1;
|
||||
x_29 = l_Lean_Parser_Tactic_rewriteSeq___closed__3;
|
||||
lean_inc(x_26);
|
||||
x_30 = lean_alloc_ctor(2, 2, 0);
|
||||
lean_ctor_set(x_30, 0, x_26);
|
||||
lean_ctor_set(x_30, 1, x_29);
|
||||
x_31 = l_Lean_Parser_Tactic_rwRuleSeq___closed__3;
|
||||
x_31 = l_Lean_Parser_Tactic___aux__Init__Tactics______macroRules__Lean__Parser__Tactic__rwSeq__1___closed__1;
|
||||
lean_inc(x_26);
|
||||
x_32 = lean_alloc_ctor(2, 2, 0);
|
||||
lean_ctor_set(x_32, 0, x_26);
|
||||
|
|
@ -9116,7 +9123,7 @@ _start:
|
|||
{
|
||||
lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4;
|
||||
x_1 = l_Lean_Parser_Tactic_withAnnotateState___closed__10;
|
||||
x_2 = l_Lean_Parser_Tactic_config___closed__5;
|
||||
x_2 = l_Lean_Parser_Tactic_config___closed__6;
|
||||
x_3 = l_Lean_Parser_Tactic_discharger___closed__6;
|
||||
x_4 = lean_alloc_ctor(2, 3, 0);
|
||||
lean_ctor_set(x_4, 0, x_1);
|
||||
|
|
@ -9143,7 +9150,7 @@ _start:
|
|||
lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4;
|
||||
x_1 = l_Lean_Parser_Tactic_withAnnotateState___closed__10;
|
||||
x_2 = l_Lean_Parser_Tactic_discharger___closed__8;
|
||||
x_3 = l_Lean_Parser_Tactic_config___closed__10;
|
||||
x_3 = l_Lean_Parser_Tactic_config___closed__11;
|
||||
x_4 = lean_alloc_ctor(2, 3, 0);
|
||||
lean_ctor_set(x_4, 0, x_1);
|
||||
lean_ctor_set(x_4, 1, x_2);
|
||||
|
|
@ -9544,16 +9551,8 @@ return x_3;
|
|||
static lean_object* _init_l_Lean_Parser_Tactic_simp___closed__3() {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_1;
|
||||
x_1 = lean_mk_string_from_bytes("simp ", 5);
|
||||
return x_1;
|
||||
}
|
||||
}
|
||||
static lean_object* _init_l_Lean_Parser_Tactic_simp___closed__4() {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_1; uint8_t x_2; lean_object* x_3;
|
||||
x_1 = l_Lean_Parser_Tactic_simp___closed__3;
|
||||
x_1 = l_Lean_Parser_Tactic_simp___closed__1;
|
||||
x_2 = 0;
|
||||
x_3 = lean_alloc_ctor(6, 1, 1);
|
||||
lean_ctor_set(x_3, 0, x_1);
|
||||
|
|
@ -9561,12 +9560,12 @@ lean_ctor_set_uint8(x_3, sizeof(void*)*1, x_2);
|
|||
return x_3;
|
||||
}
|
||||
}
|
||||
static lean_object* _init_l_Lean_Parser_Tactic_simp___closed__5() {
|
||||
static lean_object* _init_l_Lean_Parser_Tactic_simp___closed__4() {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4;
|
||||
x_1 = l_Lean_Parser_Tactic_withAnnotateState___closed__10;
|
||||
x_2 = l_Lean_Parser_Tactic_simp___closed__4;
|
||||
x_2 = l_Lean_Parser_Tactic_simp___closed__3;
|
||||
x_3 = l_Lean_Parser_Tactic_rewriteSeq___closed__5;
|
||||
x_4 = lean_alloc_ctor(2, 3, 0);
|
||||
lean_ctor_set(x_4, 0, x_1);
|
||||
|
|
@ -9575,7 +9574,7 @@ lean_ctor_set(x_4, 2, x_3);
|
|||
return x_4;
|
||||
}
|
||||
}
|
||||
static lean_object* _init_l_Lean_Parser_Tactic_simp___closed__6() {
|
||||
static lean_object* _init_l_Lean_Parser_Tactic_simp___closed__5() {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_1; lean_object* x_2; lean_object* x_3;
|
||||
|
|
@ -9587,13 +9586,13 @@ lean_ctor_set(x_3, 1, x_2);
|
|||
return x_3;
|
||||
}
|
||||
}
|
||||
static lean_object* _init_l_Lean_Parser_Tactic_simp___closed__7() {
|
||||
static lean_object* _init_l_Lean_Parser_Tactic_simp___closed__6() {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4;
|
||||
x_1 = l_Lean_Parser_Tactic_withAnnotateState___closed__10;
|
||||
x_2 = l_Lean_Parser_Tactic_simp___closed__5;
|
||||
x_3 = l_Lean_Parser_Tactic_simp___closed__6;
|
||||
x_2 = l_Lean_Parser_Tactic_simp___closed__4;
|
||||
x_3 = l_Lean_Parser_Tactic_simp___closed__5;
|
||||
x_4 = lean_alloc_ctor(2, 3, 0);
|
||||
lean_ctor_set(x_4, 0, x_1);
|
||||
lean_ctor_set(x_4, 1, x_2);
|
||||
|
|
@ -9601,19 +9600,19 @@ lean_ctor_set(x_4, 2, x_3);
|
|||
return x_4;
|
||||
}
|
||||
}
|
||||
static lean_object* _init_l_Lean_Parser_Tactic_simp___closed__8() {
|
||||
static lean_object* _init_l_Lean_Parser_Tactic_simp___closed__7() {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_1;
|
||||
x_1 = lean_mk_string_from_bytes("only ", 5);
|
||||
x_1 = lean_mk_string_from_bytes(" only", 5);
|
||||
return x_1;
|
||||
}
|
||||
}
|
||||
static lean_object* _init_l_Lean_Parser_Tactic_simp___closed__9() {
|
||||
static lean_object* _init_l_Lean_Parser_Tactic_simp___closed__8() {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_1; uint8_t x_2; lean_object* x_3;
|
||||
x_1 = l_Lean_Parser_Tactic_simp___closed__8;
|
||||
x_1 = l_Lean_Parser_Tactic_simp___closed__7;
|
||||
x_2 = 0;
|
||||
x_3 = lean_alloc_ctor(6, 1, 1);
|
||||
lean_ctor_set(x_3, 0, x_1);
|
||||
|
|
@ -9621,25 +9620,25 @@ lean_ctor_set_uint8(x_3, sizeof(void*)*1, x_2);
|
|||
return x_3;
|
||||
}
|
||||
}
|
||||
static lean_object* _init_l_Lean_Parser_Tactic_simp___closed__10() {
|
||||
static lean_object* _init_l_Lean_Parser_Tactic_simp___closed__9() {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_1; lean_object* x_2; lean_object* x_3;
|
||||
x_1 = l_Lean_Parser_Tactic_rotateLeft___closed__6;
|
||||
x_2 = l_Lean_Parser_Tactic_simp___closed__9;
|
||||
x_2 = l_Lean_Parser_Tactic_simp___closed__8;
|
||||
x_3 = lean_alloc_ctor(1, 2, 0);
|
||||
lean_ctor_set(x_3, 0, x_1);
|
||||
lean_ctor_set(x_3, 1, x_2);
|
||||
return x_3;
|
||||
}
|
||||
}
|
||||
static lean_object* _init_l_Lean_Parser_Tactic_simp___closed__11() {
|
||||
static lean_object* _init_l_Lean_Parser_Tactic_simp___closed__10() {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4;
|
||||
x_1 = l_Lean_Parser_Tactic_withAnnotateState___closed__10;
|
||||
x_2 = l_Lean_Parser_Tactic_simp___closed__7;
|
||||
x_3 = l_Lean_Parser_Tactic_simp___closed__10;
|
||||
x_2 = l_Lean_Parser_Tactic_simp___closed__6;
|
||||
x_3 = l_Lean_Parser_Tactic_simp___closed__9;
|
||||
x_4 = lean_alloc_ctor(2, 3, 0);
|
||||
lean_ctor_set(x_4, 0, x_1);
|
||||
lean_ctor_set(x_4, 1, x_2);
|
||||
|
|
@ -9647,7 +9646,7 @@ lean_ctor_set(x_4, 2, x_3);
|
|||
return x_4;
|
||||
}
|
||||
}
|
||||
static lean_object* _init_l_Lean_Parser_Tactic_simp___closed__12() {
|
||||
static lean_object* _init_l_Lean_Parser_Tactic_simp___closed__11() {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4;
|
||||
|
|
@ -9661,13 +9660,13 @@ lean_ctor_set(x_4, 2, x_3);
|
|||
return x_4;
|
||||
}
|
||||
}
|
||||
static lean_object* _init_l_Lean_Parser_Tactic_simp___closed__13() {
|
||||
static lean_object* _init_l_Lean_Parser_Tactic_simp___closed__12() {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4;
|
||||
x_1 = l_Lean_Parser_Tactic_intros___closed__6;
|
||||
x_2 = l_Lean_Parser_Tactic_simpStar;
|
||||
x_3 = l_Lean_Parser_Tactic_simp___closed__12;
|
||||
x_3 = l_Lean_Parser_Tactic_simp___closed__11;
|
||||
x_4 = lean_alloc_ctor(2, 3, 0);
|
||||
lean_ctor_set(x_4, 0, x_1);
|
||||
lean_ctor_set(x_4, 1, x_2);
|
||||
|
|
@ -9675,11 +9674,11 @@ lean_ctor_set(x_4, 2, x_3);
|
|||
return x_4;
|
||||
}
|
||||
}
|
||||
static lean_object* _init_l_Lean_Parser_Tactic_simp___closed__14() {
|
||||
static lean_object* _init_l_Lean_Parser_Tactic_simp___closed__13() {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_1; lean_object* x_2; lean_object* x_3; uint8_t x_4; lean_object* x_5;
|
||||
x_1 = l_Lean_Parser_Tactic_simp___closed__13;
|
||||
x_1 = l_Lean_Parser_Tactic_simp___closed__12;
|
||||
x_2 = l_Lean_Parser_Tactic_rwRuleSeq___closed__7;
|
||||
x_3 = l_Lean_Parser_Tactic_rwRuleSeq___closed__6;
|
||||
x_4 = 0;
|
||||
|
|
@ -9691,13 +9690,27 @@ lean_ctor_set_uint8(x_5, sizeof(void*)*3, x_4);
|
|||
return x_5;
|
||||
}
|
||||
}
|
||||
static lean_object* _init_l_Lean_Parser_Tactic_simp___closed__15() {
|
||||
static lean_object* _init_l_Lean_Parser_Tactic_simp___closed__14() {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4;
|
||||
x_1 = l_Lean_Parser_Tactic_withAnnotateState___closed__10;
|
||||
x_2 = l_Lean_Parser_Tactic_rwRuleSeq___closed__4;
|
||||
x_3 = l_Lean_Parser_Tactic_simp___closed__14;
|
||||
x_3 = l_Lean_Parser_Tactic_simp___closed__13;
|
||||
x_4 = lean_alloc_ctor(2, 3, 0);
|
||||
lean_ctor_set(x_4, 0, x_1);
|
||||
lean_ctor_set(x_4, 1, x_2);
|
||||
lean_ctor_set(x_4, 2, x_3);
|
||||
return x_4;
|
||||
}
|
||||
}
|
||||
static lean_object* _init_l_Lean_Parser_Tactic_simp___closed__15() {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4;
|
||||
x_1 = l_Lean_Parser_Tactic_withAnnotateState___closed__10;
|
||||
x_2 = l_Lean_Parser_Tactic_simp___closed__14;
|
||||
x_3 = l_Lean_Parser_Tactic_rwRuleSeq___closed__11;
|
||||
x_4 = lean_alloc_ctor(2, 3, 0);
|
||||
lean_ctor_set(x_4, 0, x_1);
|
||||
lean_ctor_set(x_4, 1, x_2);
|
||||
|
|
@ -9708,10 +9721,22 @@ return x_4;
|
|||
static lean_object* _init_l_Lean_Parser_Tactic_simp___closed__16() {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_1; lean_object* x_2; lean_object* x_3;
|
||||
x_1 = l_Lean_Parser_Tactic_rotateLeft___closed__6;
|
||||
x_2 = l_Lean_Parser_Tactic_simp___closed__15;
|
||||
x_3 = lean_alloc_ctor(1, 2, 0);
|
||||
lean_ctor_set(x_3, 0, x_1);
|
||||
lean_ctor_set(x_3, 1, x_2);
|
||||
return x_3;
|
||||
}
|
||||
}
|
||||
static lean_object* _init_l_Lean_Parser_Tactic_simp___closed__17() {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4;
|
||||
x_1 = l_Lean_Parser_Tactic_withAnnotateState___closed__10;
|
||||
x_2 = l_Lean_Parser_Tactic_simp___closed__15;
|
||||
x_3 = l_Lean_Parser_Tactic_rwRuleSeq___closed__11;
|
||||
x_2 = l_Lean_Parser_Tactic_simp___closed__10;
|
||||
x_3 = l_Lean_Parser_Tactic_simp___closed__16;
|
||||
x_4 = lean_alloc_ctor(2, 3, 0);
|
||||
lean_ctor_set(x_4, 0, x_1);
|
||||
lean_ctor_set(x_4, 1, x_2);
|
||||
|
|
@ -9719,25 +9744,13 @@ lean_ctor_set(x_4, 2, x_3);
|
|||
return x_4;
|
||||
}
|
||||
}
|
||||
static lean_object* _init_l_Lean_Parser_Tactic_simp___closed__17() {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_1; lean_object* x_2; lean_object* x_3;
|
||||
x_1 = l_Lean_Parser_Tactic_rotateLeft___closed__6;
|
||||
x_2 = l_Lean_Parser_Tactic_simp___closed__16;
|
||||
x_3 = lean_alloc_ctor(1, 2, 0);
|
||||
lean_ctor_set(x_3, 0, x_1);
|
||||
lean_ctor_set(x_3, 1, x_2);
|
||||
return x_3;
|
||||
}
|
||||
}
|
||||
static lean_object* _init_l_Lean_Parser_Tactic_simp___closed__18() {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4;
|
||||
x_1 = l_Lean_Parser_Tactic_withAnnotateState___closed__10;
|
||||
x_2 = l_Lean_Parser_Tactic_simp___closed__11;
|
||||
x_3 = l_Lean_Parser_Tactic_simp___closed__17;
|
||||
x_2 = l_Lean_Parser_Tactic_simp___closed__17;
|
||||
x_3 = l_Lean_Parser_Tactic_change___closed__6;
|
||||
x_4 = lean_alloc_ctor(2, 3, 0);
|
||||
lean_ctor_set(x_4, 0, x_1);
|
||||
lean_ctor_set(x_4, 1, x_2);
|
||||
|
|
@ -9749,23 +9762,9 @@ static lean_object* _init_l_Lean_Parser_Tactic_simp___closed__19() {
|
|||
_start:
|
||||
{
|
||||
lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4;
|
||||
x_1 = l_Lean_Parser_Tactic_withAnnotateState___closed__10;
|
||||
x_2 = l_Lean_Parser_Tactic_simp___closed__18;
|
||||
x_3 = l_Lean_Parser_Tactic_change___closed__6;
|
||||
x_4 = lean_alloc_ctor(2, 3, 0);
|
||||
lean_ctor_set(x_4, 0, x_1);
|
||||
lean_ctor_set(x_4, 1, x_2);
|
||||
lean_ctor_set(x_4, 2, x_3);
|
||||
return x_4;
|
||||
}
|
||||
}
|
||||
static lean_object* _init_l_Lean_Parser_Tactic_simp___closed__20() {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4;
|
||||
x_1 = l_Lean_Parser_Tactic_simp___closed__2;
|
||||
x_2 = lean_unsigned_to_nat(1022u);
|
||||
x_3 = l_Lean_Parser_Tactic_simp___closed__19;
|
||||
x_3 = l_Lean_Parser_Tactic_simp___closed__18;
|
||||
x_4 = lean_alloc_ctor(3, 3, 0);
|
||||
lean_ctor_set(x_4, 0, x_1);
|
||||
lean_ctor_set(x_4, 1, x_2);
|
||||
|
|
@ -9777,7 +9776,7 @@ static lean_object* _init_l_Lean_Parser_Tactic_simp() {
|
|||
_start:
|
||||
{
|
||||
lean_object* x_1;
|
||||
x_1 = l_Lean_Parser_Tactic_simp___closed__20;
|
||||
x_1 = l_Lean_Parser_Tactic_simp___closed__19;
|
||||
return x_1;
|
||||
}
|
||||
}
|
||||
|
|
@ -9803,7 +9802,7 @@ static lean_object* _init_l_Lean_Parser_Tactic_simpAll___closed__3() {
|
|||
_start:
|
||||
{
|
||||
lean_object* x_1;
|
||||
x_1 = lean_mk_string_from_bytes("simp_all ", 9);
|
||||
x_1 = lean_mk_string_from_bytes("simp_all", 8);
|
||||
return x_1;
|
||||
}
|
||||
}
|
||||
|
|
@ -9839,7 +9838,7 @@ _start:
|
|||
lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4;
|
||||
x_1 = l_Lean_Parser_Tactic_withAnnotateState___closed__10;
|
||||
x_2 = l_Lean_Parser_Tactic_simpAll___closed__5;
|
||||
x_3 = l_Lean_Parser_Tactic_simp___closed__6;
|
||||
x_3 = l_Lean_Parser_Tactic_simp___closed__5;
|
||||
x_4 = lean_alloc_ctor(2, 3, 0);
|
||||
lean_ctor_set(x_4, 0, x_1);
|
||||
lean_ctor_set(x_4, 1, x_2);
|
||||
|
|
@ -9853,7 +9852,7 @@ _start:
|
|||
lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4;
|
||||
x_1 = l_Lean_Parser_Tactic_withAnnotateState___closed__10;
|
||||
x_2 = l_Lean_Parser_Tactic_simpAll___closed__6;
|
||||
x_3 = l_Lean_Parser_Tactic_simp___closed__10;
|
||||
x_3 = l_Lean_Parser_Tactic_simp___closed__9;
|
||||
x_4 = lean_alloc_ctor(2, 3, 0);
|
||||
lean_ctor_set(x_4, 0, x_1);
|
||||
lean_ctor_set(x_4, 1, x_2);
|
||||
|
|
@ -9865,7 +9864,7 @@ static lean_object* _init_l_Lean_Parser_Tactic_simpAll___closed__8() {
|
|||
_start:
|
||||
{
|
||||
lean_object* x_1; lean_object* x_2; lean_object* x_3; uint8_t x_4; lean_object* x_5;
|
||||
x_1 = l_Lean_Parser_Tactic_simp___closed__12;
|
||||
x_1 = l_Lean_Parser_Tactic_simp___closed__11;
|
||||
x_2 = l_Lean_Parser_Tactic_rwRuleSeq___closed__7;
|
||||
x_3 = l_Lean_Parser_Tactic_rwRuleSeq___closed__6;
|
||||
x_4 = 0;
|
||||
|
|
@ -9974,16 +9973,8 @@ return x_3;
|
|||
static lean_object* _init_l_Lean_Parser_Tactic_dsimp___closed__3() {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_1;
|
||||
x_1 = lean_mk_string_from_bytes("dsimp ", 6);
|
||||
return x_1;
|
||||
}
|
||||
}
|
||||
static lean_object* _init_l_Lean_Parser_Tactic_dsimp___closed__4() {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_1; uint8_t x_2; lean_object* x_3;
|
||||
x_1 = l_Lean_Parser_Tactic_dsimp___closed__3;
|
||||
x_1 = l_Lean_Parser_Tactic_dsimp___closed__1;
|
||||
x_2 = 0;
|
||||
x_3 = lean_alloc_ctor(6, 1, 1);
|
||||
lean_ctor_set(x_3, 0, x_1);
|
||||
|
|
@ -9991,13 +9982,27 @@ lean_ctor_set_uint8(x_3, sizeof(void*)*1, x_2);
|
|||
return x_3;
|
||||
}
|
||||
}
|
||||
static lean_object* _init_l_Lean_Parser_Tactic_dsimp___closed__4() {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4;
|
||||
x_1 = l_Lean_Parser_Tactic_withAnnotateState___closed__10;
|
||||
x_2 = l_Lean_Parser_Tactic_dsimp___closed__3;
|
||||
x_3 = l_Lean_Parser_Tactic_rewriteSeq___closed__5;
|
||||
x_4 = lean_alloc_ctor(2, 3, 0);
|
||||
lean_ctor_set(x_4, 0, x_1);
|
||||
lean_ctor_set(x_4, 1, x_2);
|
||||
lean_ctor_set(x_4, 2, x_3);
|
||||
return x_4;
|
||||
}
|
||||
}
|
||||
static lean_object* _init_l_Lean_Parser_Tactic_dsimp___closed__5() {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4;
|
||||
x_1 = l_Lean_Parser_Tactic_withAnnotateState___closed__10;
|
||||
x_2 = l_Lean_Parser_Tactic_dsimp___closed__4;
|
||||
x_3 = l_Lean_Parser_Tactic_rewriteSeq___closed__5;
|
||||
x_3 = l_Lean_Parser_Tactic_simp___closed__5;
|
||||
x_4 = lean_alloc_ctor(2, 3, 0);
|
||||
lean_ctor_set(x_4, 0, x_1);
|
||||
lean_ctor_set(x_4, 1, x_2);
|
||||
|
|
@ -10011,7 +10016,7 @@ _start:
|
|||
lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4;
|
||||
x_1 = l_Lean_Parser_Tactic_withAnnotateState___closed__10;
|
||||
x_2 = l_Lean_Parser_Tactic_dsimp___closed__5;
|
||||
x_3 = l_Lean_Parser_Tactic_simp___closed__6;
|
||||
x_3 = l_Lean_Parser_Tactic_simp___closed__9;
|
||||
x_4 = lean_alloc_ctor(2, 3, 0);
|
||||
lean_ctor_set(x_4, 0, x_1);
|
||||
lean_ctor_set(x_4, 1, x_2);
|
||||
|
|
@ -10025,7 +10030,7 @@ _start:
|
|||
lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4;
|
||||
x_1 = l_Lean_Parser_Tactic_withAnnotateState___closed__10;
|
||||
x_2 = l_Lean_Parser_Tactic_dsimp___closed__6;
|
||||
x_3 = l_Lean_Parser_Tactic_simp___closed__10;
|
||||
x_3 = l_Lean_Parser_Tactic_simpAll___closed__11;
|
||||
x_4 = lean_alloc_ctor(2, 3, 0);
|
||||
lean_ctor_set(x_4, 0, x_1);
|
||||
lean_ctor_set(x_4, 1, x_2);
|
||||
|
|
@ -10039,7 +10044,7 @@ _start:
|
|||
lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4;
|
||||
x_1 = l_Lean_Parser_Tactic_withAnnotateState___closed__10;
|
||||
x_2 = l_Lean_Parser_Tactic_dsimp___closed__7;
|
||||
x_3 = l_Lean_Parser_Tactic_simpAll___closed__11;
|
||||
x_3 = l_Lean_Parser_Tactic_change___closed__6;
|
||||
x_4 = lean_alloc_ctor(2, 3, 0);
|
||||
lean_ctor_set(x_4, 0, x_1);
|
||||
lean_ctor_set(x_4, 1, x_2);
|
||||
|
|
@ -10051,23 +10056,9 @@ static lean_object* _init_l_Lean_Parser_Tactic_dsimp___closed__9() {
|
|||
_start:
|
||||
{
|
||||
lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4;
|
||||
x_1 = l_Lean_Parser_Tactic_withAnnotateState___closed__10;
|
||||
x_2 = l_Lean_Parser_Tactic_dsimp___closed__8;
|
||||
x_3 = l_Lean_Parser_Tactic_change___closed__6;
|
||||
x_4 = lean_alloc_ctor(2, 3, 0);
|
||||
lean_ctor_set(x_4, 0, x_1);
|
||||
lean_ctor_set(x_4, 1, x_2);
|
||||
lean_ctor_set(x_4, 2, x_3);
|
||||
return x_4;
|
||||
}
|
||||
}
|
||||
static lean_object* _init_l_Lean_Parser_Tactic_dsimp___closed__10() {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4;
|
||||
x_1 = l_Lean_Parser_Tactic_dsimp___closed__2;
|
||||
x_2 = lean_unsigned_to_nat(1022u);
|
||||
x_3 = l_Lean_Parser_Tactic_dsimp___closed__9;
|
||||
x_3 = l_Lean_Parser_Tactic_dsimp___closed__8;
|
||||
x_4 = lean_alloc_ctor(3, 3, 0);
|
||||
lean_ctor_set(x_4, 0, x_1);
|
||||
lean_ctor_set(x_4, 1, x_2);
|
||||
|
|
@ -10079,7 +10070,7 @@ static lean_object* _init_l_Lean_Parser_Tactic_dsimp() {
|
|||
_start:
|
||||
{
|
||||
lean_object* x_1;
|
||||
x_1 = l_Lean_Parser_Tactic_dsimp___closed__10;
|
||||
x_1 = l_Lean_Parser_Tactic_dsimp___closed__9;
|
||||
return x_1;
|
||||
}
|
||||
}
|
||||
|
|
@ -13123,7 +13114,7 @@ _start:
|
|||
lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4;
|
||||
x_1 = l_Lean_Parser_Tactic_withAnnotateState___closed__10;
|
||||
x_2 = l_Lean_Parser_Tactic_tacticHave_x27___x3a_x3d_____closed__5;
|
||||
x_3 = l_Lean_Parser_Tactic_config___closed__10;
|
||||
x_3 = l_Lean_Parser_Tactic_config___closed__11;
|
||||
x_4 = lean_alloc_ctor(2, 3, 0);
|
||||
lean_ctor_set(x_4, 0, x_1);
|
||||
lean_ctor_set(x_4, 1, x_2);
|
||||
|
|
@ -17937,21 +17928,9 @@ return x_3;
|
|||
static lean_object* _init_l_Lean_Parser_Attr_simp___closed__4() {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_1; uint8_t x_2; lean_object* x_3;
|
||||
x_1 = l_Lean_Parser_Tactic_simp___closed__1;
|
||||
x_2 = 0;
|
||||
x_3 = lean_alloc_ctor(6, 1, 1);
|
||||
lean_ctor_set(x_3, 0, x_1);
|
||||
lean_ctor_set_uint8(x_3, sizeof(void*)*1, x_2);
|
||||
return x_3;
|
||||
}
|
||||
}
|
||||
static lean_object* _init_l_Lean_Parser_Attr_simp___closed__5() {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4;
|
||||
x_1 = l_Lean_Parser_Tactic_withAnnotateState___closed__10;
|
||||
x_2 = l_Lean_Parser_Attr_simp___closed__4;
|
||||
x_2 = l_Lean_Parser_Tactic_simp___closed__3;
|
||||
x_3 = l_Lean_Parser_Tactic_simpLemma___closed__4;
|
||||
x_4 = lean_alloc_ctor(2, 3, 0);
|
||||
lean_ctor_set(x_4, 0, x_1);
|
||||
|
|
@ -17960,7 +17939,7 @@ lean_ctor_set(x_4, 2, x_3);
|
|||
return x_4;
|
||||
}
|
||||
}
|
||||
static lean_object* _init_l_Lean_Parser_Attr_simp___closed__6() {
|
||||
static lean_object* _init_l_Lean_Parser_Attr_simp___closed__5() {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_1;
|
||||
|
|
@ -17968,23 +17947,35 @@ x_1 = lean_mk_string_from_bytes("prio", 4);
|
|||
return x_1;
|
||||
}
|
||||
}
|
||||
static lean_object* _init_l_Lean_Parser_Attr_simp___closed__7() {
|
||||
static lean_object* _init_l_Lean_Parser_Attr_simp___closed__6() {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_1; lean_object* x_2; lean_object* x_3;
|
||||
x_1 = lean_box(0);
|
||||
x_2 = l_Lean_Parser_Attr_simp___closed__6;
|
||||
x_2 = l_Lean_Parser_Attr_simp___closed__5;
|
||||
x_3 = l_Lean_Name_str___override(x_1, x_2);
|
||||
return x_3;
|
||||
}
|
||||
}
|
||||
static lean_object* _init_l_Lean_Parser_Attr_simp___closed__7() {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_1; lean_object* x_2; lean_object* x_3;
|
||||
x_1 = l_Lean_Parser_Attr_simp___closed__6;
|
||||
x_2 = lean_unsigned_to_nat(0u);
|
||||
x_3 = lean_alloc_ctor(7, 2, 0);
|
||||
lean_ctor_set(x_3, 0, x_1);
|
||||
lean_ctor_set(x_3, 1, x_2);
|
||||
return x_3;
|
||||
}
|
||||
}
|
||||
static lean_object* _init_l_Lean_Parser_Attr_simp___closed__8() {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_1; lean_object* x_2; lean_object* x_3;
|
||||
x_1 = l_Lean_Parser_Attr_simp___closed__7;
|
||||
x_2 = lean_unsigned_to_nat(0u);
|
||||
x_3 = lean_alloc_ctor(7, 2, 0);
|
||||
x_1 = l_Lean_Parser_Tactic_rotateLeft___closed__6;
|
||||
x_2 = l_Lean_Parser_Attr_simp___closed__7;
|
||||
x_3 = lean_alloc_ctor(1, 2, 0);
|
||||
lean_ctor_set(x_3, 0, x_1);
|
||||
lean_ctor_set(x_3, 1, x_2);
|
||||
return x_3;
|
||||
|
|
@ -17993,22 +17984,10 @@ return x_3;
|
|||
static lean_object* _init_l_Lean_Parser_Attr_simp___closed__9() {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_1; lean_object* x_2; lean_object* x_3;
|
||||
x_1 = l_Lean_Parser_Tactic_rotateLeft___closed__6;
|
||||
x_2 = l_Lean_Parser_Attr_simp___closed__8;
|
||||
x_3 = lean_alloc_ctor(1, 2, 0);
|
||||
lean_ctor_set(x_3, 0, x_1);
|
||||
lean_ctor_set(x_3, 1, x_2);
|
||||
return x_3;
|
||||
}
|
||||
}
|
||||
static lean_object* _init_l_Lean_Parser_Attr_simp___closed__10() {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4;
|
||||
x_1 = l_Lean_Parser_Tactic_withAnnotateState___closed__10;
|
||||
x_2 = l_Lean_Parser_Attr_simp___closed__5;
|
||||
x_3 = l_Lean_Parser_Attr_simp___closed__9;
|
||||
x_2 = l_Lean_Parser_Attr_simp___closed__4;
|
||||
x_3 = l_Lean_Parser_Attr_simp___closed__8;
|
||||
x_4 = lean_alloc_ctor(2, 3, 0);
|
||||
lean_ctor_set(x_4, 0, x_1);
|
||||
lean_ctor_set(x_4, 1, x_2);
|
||||
|
|
@ -18016,13 +17995,13 @@ lean_ctor_set(x_4, 2, x_3);
|
|||
return x_4;
|
||||
}
|
||||
}
|
||||
static lean_object* _init_l_Lean_Parser_Attr_simp___closed__11() {
|
||||
static lean_object* _init_l_Lean_Parser_Attr_simp___closed__10() {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4;
|
||||
x_1 = l_Lean_Parser_Attr_simp___closed__3;
|
||||
x_2 = lean_unsigned_to_nat(1022u);
|
||||
x_3 = l_Lean_Parser_Attr_simp___closed__10;
|
||||
x_3 = l_Lean_Parser_Attr_simp___closed__9;
|
||||
x_4 = lean_alloc_ctor(3, 3, 0);
|
||||
lean_ctor_set(x_4, 0, x_1);
|
||||
lean_ctor_set(x_4, 1, x_2);
|
||||
|
|
@ -18034,7 +18013,7 @@ static lean_object* _init_l_Lean_Parser_Attr_simp() {
|
|||
_start:
|
||||
{
|
||||
lean_object* x_1;
|
||||
x_1 = l_Lean_Parser_Attr_simp___closed__11;
|
||||
x_1 = l_Lean_Parser_Attr_simp___closed__10;
|
||||
return x_1;
|
||||
}
|
||||
}
|
||||
|
|
@ -19630,15 +19609,11 @@ return x_3;
|
|||
static lean_object* _init_l_term_____x5b___x5d___closed__7() {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4;
|
||||
x_1 = l_Lean_Parser_Tactic_withAnnotateState___closed__10;
|
||||
x_2 = l_term_____x5b___x5d___closed__6;
|
||||
x_3 = l_Lean_Parser_Tactic_rwRuleSeq___closed__4;
|
||||
x_4 = lean_alloc_ctor(2, 3, 0);
|
||||
lean_ctor_set(x_4, 0, x_1);
|
||||
lean_ctor_set(x_4, 1, x_2);
|
||||
lean_ctor_set(x_4, 2, x_3);
|
||||
return x_4;
|
||||
lean_object* x_1; lean_object* x_2;
|
||||
x_1 = l_Lean_Parser_Tactic___aux__Init__Tactics______macroRules__Lean__Parser__Tactic__rwSeq__1___closed__1;
|
||||
x_2 = lean_alloc_ctor(5, 1, 0);
|
||||
lean_ctor_set(x_2, 0, x_1);
|
||||
return x_2;
|
||||
}
|
||||
}
|
||||
static lean_object* _init_l_term_____x5b___x5d___closed__8() {
|
||||
|
|
@ -19646,8 +19621,8 @@ _start:
|
|||
{
|
||||
lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4;
|
||||
x_1 = l_Lean_Parser_Tactic_withAnnotateState___closed__10;
|
||||
x_2 = l_term_____x5b___x5d___closed__7;
|
||||
x_3 = l_Lean_Parser_Tactic_rename___closed__5;
|
||||
x_2 = l_term_____x5b___x5d___closed__6;
|
||||
x_3 = l_term_____x5b___x5d___closed__7;
|
||||
x_4 = lean_alloc_ctor(2, 3, 0);
|
||||
lean_ctor_set(x_4, 0, x_1);
|
||||
lean_ctor_set(x_4, 1, x_2);
|
||||
|
|
@ -19661,7 +19636,7 @@ _start:
|
|||
lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4;
|
||||
x_1 = l_Lean_Parser_Tactic_withAnnotateState___closed__10;
|
||||
x_2 = l_term_____x5b___x5d___closed__8;
|
||||
x_3 = l_Lean_Parser_Tactic_rwRuleSeq___closed__11;
|
||||
x_3 = l_Lean_Parser_Tactic_rename___closed__5;
|
||||
x_4 = lean_alloc_ctor(2, 3, 0);
|
||||
lean_ctor_set(x_4, 0, x_1);
|
||||
lean_ctor_set(x_4, 1, x_2);
|
||||
|
|
@ -19672,11 +19647,25 @@ return x_4;
|
|||
static lean_object* _init_l_term_____x5b___x5d___closed__10() {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4;
|
||||
x_1 = l_Lean_Parser_Tactic_withAnnotateState___closed__10;
|
||||
x_2 = l_term_____x5b___x5d___closed__9;
|
||||
x_3 = l_Lean_Parser_Tactic_rwRuleSeq___closed__11;
|
||||
x_4 = lean_alloc_ctor(2, 3, 0);
|
||||
lean_ctor_set(x_4, 0, x_1);
|
||||
lean_ctor_set(x_4, 1, x_2);
|
||||
lean_ctor_set(x_4, 2, x_3);
|
||||
return x_4;
|
||||
}
|
||||
}
|
||||
static lean_object* _init_l_term_____x5b___x5d___closed__11() {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4; lean_object* x_5;
|
||||
x_1 = l_term_____x5b___x5d___closed__2;
|
||||
x_2 = lean_unsigned_to_nat(1024u);
|
||||
x_3 = lean_unsigned_to_nat(0u);
|
||||
x_4 = l_term_____x5b___x5d___closed__9;
|
||||
x_4 = l_term_____x5b___x5d___closed__10;
|
||||
x_5 = lean_alloc_ctor(4, 4, 0);
|
||||
lean_ctor_set(x_5, 0, x_1);
|
||||
lean_ctor_set(x_5, 1, x_2);
|
||||
|
|
@ -19689,7 +19678,7 @@ static lean_object* _init_l_term_____x5b___x5d() {
|
|||
_start:
|
||||
{
|
||||
lean_object* x_1;
|
||||
x_1 = l_term_____x5b___x5d___closed__10;
|
||||
x_1 = l_term_____x5b___x5d___closed__11;
|
||||
return x_1;
|
||||
}
|
||||
}
|
||||
|
|
@ -20101,7 +20090,7 @@ _start:
|
|||
{
|
||||
lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4;
|
||||
x_1 = l_Lean_Parser_Tactic_withAnnotateState___closed__10;
|
||||
x_2 = l_term_____x5b___x5d___closed__8;
|
||||
x_2 = l_term_____x5b___x5d___closed__9;
|
||||
x_3 = l_term_____x5b___x5d_x27_____closed__4;
|
||||
x_4 = lean_alloc_ctor(2, 3, 0);
|
||||
lean_ctor_set(x_4, 0, x_1);
|
||||
|
|
@ -21163,6 +21152,8 @@ l_Lean_Parser_Tactic_config___closed__13 = _init_l_Lean_Parser_Tactic_config___c
|
|||
lean_mark_persistent(l_Lean_Parser_Tactic_config___closed__13);
|
||||
l_Lean_Parser_Tactic_config___closed__14 = _init_l_Lean_Parser_Tactic_config___closed__14();
|
||||
lean_mark_persistent(l_Lean_Parser_Tactic_config___closed__14);
|
||||
l_Lean_Parser_Tactic_config___closed__15 = _init_l_Lean_Parser_Tactic_config___closed__15();
|
||||
lean_mark_persistent(l_Lean_Parser_Tactic_config___closed__15);
|
||||
l_Lean_Parser_Tactic_config = _init_l_Lean_Parser_Tactic_config();
|
||||
lean_mark_persistent(l_Lean_Parser_Tactic_config);
|
||||
l_Lean_Parser_Tactic_locationWildcard___closed__1 = _init_l_Lean_Parser_Tactic_locationWildcard___closed__1();
|
||||
|
|
@ -21511,8 +21502,6 @@ l_Lean_Parser_Tactic_simp___closed__18 = _init_l_Lean_Parser_Tactic_simp___close
|
|||
lean_mark_persistent(l_Lean_Parser_Tactic_simp___closed__18);
|
||||
l_Lean_Parser_Tactic_simp___closed__19 = _init_l_Lean_Parser_Tactic_simp___closed__19();
|
||||
lean_mark_persistent(l_Lean_Parser_Tactic_simp___closed__19);
|
||||
l_Lean_Parser_Tactic_simp___closed__20 = _init_l_Lean_Parser_Tactic_simp___closed__20();
|
||||
lean_mark_persistent(l_Lean_Parser_Tactic_simp___closed__20);
|
||||
l_Lean_Parser_Tactic_simp = _init_l_Lean_Parser_Tactic_simp();
|
||||
lean_mark_persistent(l_Lean_Parser_Tactic_simp);
|
||||
l_Lean_Parser_Tactic_simpAll___closed__1 = _init_l_Lean_Parser_Tactic_simpAll___closed__1();
|
||||
|
|
@ -21561,8 +21550,6 @@ l_Lean_Parser_Tactic_dsimp___closed__8 = _init_l_Lean_Parser_Tactic_dsimp___clos
|
|||
lean_mark_persistent(l_Lean_Parser_Tactic_dsimp___closed__8);
|
||||
l_Lean_Parser_Tactic_dsimp___closed__9 = _init_l_Lean_Parser_Tactic_dsimp___closed__9();
|
||||
lean_mark_persistent(l_Lean_Parser_Tactic_dsimp___closed__9);
|
||||
l_Lean_Parser_Tactic_dsimp___closed__10 = _init_l_Lean_Parser_Tactic_dsimp___closed__10();
|
||||
lean_mark_persistent(l_Lean_Parser_Tactic_dsimp___closed__10);
|
||||
l_Lean_Parser_Tactic_dsimp = _init_l_Lean_Parser_Tactic_dsimp();
|
||||
lean_mark_persistent(l_Lean_Parser_Tactic_dsimp);
|
||||
l_Lean_Parser_Tactic_delta___closed__1 = _init_l_Lean_Parser_Tactic_delta___closed__1();
|
||||
|
|
@ -22317,8 +22304,6 @@ l_Lean_Parser_Attr_simp___closed__9 = _init_l_Lean_Parser_Attr_simp___closed__9(
|
|||
lean_mark_persistent(l_Lean_Parser_Attr_simp___closed__9);
|
||||
l_Lean_Parser_Attr_simp___closed__10 = _init_l_Lean_Parser_Attr_simp___closed__10();
|
||||
lean_mark_persistent(l_Lean_Parser_Attr_simp___closed__10);
|
||||
l_Lean_Parser_Attr_simp___closed__11 = _init_l_Lean_Parser_Attr_simp___closed__11();
|
||||
lean_mark_persistent(l_Lean_Parser_Attr_simp___closed__11);
|
||||
l_Lean_Parser_Attr_simp = _init_l_Lean_Parser_Attr_simp();
|
||||
lean_mark_persistent(l_Lean_Parser_Attr_simp);
|
||||
l_term_u2039___u203a___closed__1 = _init_l_term_u2039___u203a___closed__1();
|
||||
|
|
@ -22443,6 +22428,8 @@ l_term_____x5b___x5d___closed__9 = _init_l_term_____x5b___x5d___closed__9();
|
|||
lean_mark_persistent(l_term_____x5b___x5d___closed__9);
|
||||
l_term_____x5b___x5d___closed__10 = _init_l_term_____x5b___x5d___closed__10();
|
||||
lean_mark_persistent(l_term_____x5b___x5d___closed__10);
|
||||
l_term_____x5b___x5d___closed__11 = _init_l_term_____x5b___x5d___closed__11();
|
||||
lean_mark_persistent(l_term_____x5b___x5d___closed__11);
|
||||
l_term_____x5b___x5d = _init_l_term_____x5b___x5d();
|
||||
lean_mark_persistent(l_term_____x5b___x5d);
|
||||
l___aux__Init__Tactics______macroRules__term_____x5b___x5d__1___closed__1 = _init_l___aux__Init__Tactics______macroRules__term_____x5b___x5d__1___closed__1();
|
||||
|
|
|
|||
843
stage0/stdlib/Lean/Elab/PreDefinition/Structural/Eqns.c
generated
843
stage0/stdlib/Lean/Elab/PreDefinition/Structural/Eqns.c
generated
File diff suppressed because it is too large
Load diff
1011
stage0/stdlib/Lean/Elab/PreDefinition/WF/Eqns.c
generated
1011
stage0/stdlib/Lean/Elab/PreDefinition/WF/Eqns.c
generated
File diff suppressed because it is too large
Load diff
360
stage0/stdlib/Lean/Elab/Tactic/Conv/Pattern.c
generated
360
stage0/stdlib/Lean/Elab/Tactic/Conv/Pattern.c
generated
|
|
@ -48,7 +48,7 @@ lean_object* l_Lean_mkAppN(lean_object*, lean_object*);
|
|||
LEAN_EXPORT lean_object* l_Lean_Elab_Tactic_Conv_evalPattern___lambda__3(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
extern lean_object* l_Lean_Meta_Simp_neutralConfig;
|
||||
lean_object* l_Lean_Meta_abstractMVars(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Meta_Simp_main(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Meta_Simp_main(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Elab_Term_elabTerm(lean_object*, lean_object*, uint8_t, uint8_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_replaceRef(lean_object*, lean_object*);
|
||||
static lean_object* l_Lean_Elab_Tactic_Conv_evalPattern___lambda__3___closed__4;
|
||||
|
|
@ -66,6 +66,7 @@ lean_object* l_Lean_Elab_Tactic_getMainGoal(lean_object*, lean_object*, lean_obj
|
|||
lean_object* l_Lean_Expr_toHeadIndex(lean_object*);
|
||||
lean_object* l_Lean_Elab_Tactic_Conv_getLhs(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
size_t lean_usize_of_nat(lean_object*);
|
||||
extern lean_object* l_Lean_NameSet_empty;
|
||||
extern lean_object* l_Lean_Elab_Tactic_tacticElabAttribute;
|
||||
lean_object* l_Lean_Elab_Term_withoutErrToSorryImp___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_throwError___at_Lean_Elab_Tactic_evalTactic_throwExs___spec__2(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
|
|
@ -127,43 +128,47 @@ x_3 = l_Lean_Meta_getSimpCongrTheorems___rarg(x_1, x_2);
|
|||
x_4 = !lean_is_exclusive(x_3);
|
||||
if (x_4 == 0)
|
||||
{
|
||||
lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10;
|
||||
lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11;
|
||||
x_5 = lean_ctor_get(x_3, 0);
|
||||
x_6 = lean_box(0);
|
||||
x_7 = l_Lean_Meta_Simp_neutralConfig;
|
||||
x_8 = l___private_Lean_Elab_Tactic_Conv_Pattern_0__Lean_Elab_Tactic_Conv_getContext___rarg___closed__1;
|
||||
x_9 = lean_unsigned_to_nat(0u);
|
||||
x_10 = lean_alloc_ctor(0, 5, 0);
|
||||
lean_ctor_set(x_10, 0, x_7);
|
||||
lean_ctor_set(x_10, 1, x_8);
|
||||
lean_ctor_set(x_10, 2, x_5);
|
||||
lean_ctor_set(x_10, 3, x_6);
|
||||
lean_ctor_set(x_10, 4, x_9);
|
||||
lean_ctor_set(x_3, 0, x_10);
|
||||
x_7 = lean_box(0);
|
||||
x_8 = l_Lean_Meta_Simp_neutralConfig;
|
||||
x_9 = l___private_Lean_Elab_Tactic_Conv_Pattern_0__Lean_Elab_Tactic_Conv_getContext___rarg___closed__1;
|
||||
x_10 = lean_unsigned_to_nat(0u);
|
||||
x_11 = lean_alloc_ctor(0, 6, 0);
|
||||
lean_ctor_set(x_11, 0, x_8);
|
||||
lean_ctor_set(x_11, 1, x_9);
|
||||
lean_ctor_set(x_11, 2, x_5);
|
||||
lean_ctor_set(x_11, 3, x_6);
|
||||
lean_ctor_set(x_11, 4, x_7);
|
||||
lean_ctor_set(x_11, 5, x_10);
|
||||
lean_ctor_set(x_3, 0, x_11);
|
||||
return x_3;
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18;
|
||||
x_11 = lean_ctor_get(x_3, 0);
|
||||
x_12 = lean_ctor_get(x_3, 1);
|
||||
lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; lean_object* x_20;
|
||||
x_12 = lean_ctor_get(x_3, 0);
|
||||
x_13 = lean_ctor_get(x_3, 1);
|
||||
lean_inc(x_13);
|
||||
lean_inc(x_12);
|
||||
lean_inc(x_11);
|
||||
lean_dec(x_3);
|
||||
x_13 = lean_box(0);
|
||||
x_14 = l_Lean_Meta_Simp_neutralConfig;
|
||||
x_15 = l___private_Lean_Elab_Tactic_Conv_Pattern_0__Lean_Elab_Tactic_Conv_getContext___rarg___closed__1;
|
||||
x_16 = lean_unsigned_to_nat(0u);
|
||||
x_17 = lean_alloc_ctor(0, 5, 0);
|
||||
lean_ctor_set(x_17, 0, x_14);
|
||||
lean_ctor_set(x_17, 1, x_15);
|
||||
lean_ctor_set(x_17, 2, x_11);
|
||||
lean_ctor_set(x_17, 3, x_13);
|
||||
lean_ctor_set(x_17, 4, x_16);
|
||||
x_18 = lean_alloc_ctor(0, 2, 0);
|
||||
lean_ctor_set(x_18, 0, x_17);
|
||||
lean_ctor_set(x_18, 1, x_12);
|
||||
return x_18;
|
||||
x_14 = lean_box(0);
|
||||
x_15 = lean_box(0);
|
||||
x_16 = l_Lean_Meta_Simp_neutralConfig;
|
||||
x_17 = l___private_Lean_Elab_Tactic_Conv_Pattern_0__Lean_Elab_Tactic_Conv_getContext___rarg___closed__1;
|
||||
x_18 = lean_unsigned_to_nat(0u);
|
||||
x_19 = lean_alloc_ctor(0, 6, 0);
|
||||
lean_ctor_set(x_19, 0, x_16);
|
||||
lean_ctor_set(x_19, 1, x_17);
|
||||
lean_ctor_set(x_19, 2, x_12);
|
||||
lean_ctor_set(x_19, 3, x_14);
|
||||
lean_ctor_set(x_19, 4, x_15);
|
||||
lean_ctor_set(x_19, 5, x_18);
|
||||
x_20 = lean_alloc_ctor(0, 2, 0);
|
||||
lean_ctor_set(x_20, 0, x_19);
|
||||
lean_ctor_set(x_20, 1, x_13);
|
||||
return x_20;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1266,7 +1271,7 @@ return x_10;
|
|||
LEAN_EXPORT lean_object* l___private_Lean_Elab_Tactic_Conv_Pattern_0__Lean_Elab_Tactic_Conv_findPattern_x3f(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7) {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; lean_object* x_20; lean_object* x_21;
|
||||
lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; lean_object* x_20; lean_object* x_21; lean_object* x_22;
|
||||
x_8 = lean_box(0);
|
||||
x_9 = lean_st_ref_get(x_6, x_7);
|
||||
x_10 = lean_ctor_get(x_9, 1);
|
||||
|
|
@ -1296,141 +1301,228 @@ x_20 = lean_alloc_ctor(0, 3, 0);
|
|||
lean_ctor_set(x_20, 0, x_17);
|
||||
lean_ctor_set(x_20, 1, x_18);
|
||||
lean_ctor_set(x_20, 2, x_19);
|
||||
x_21 = l_Lean_NameSet_empty;
|
||||
lean_inc(x_6);
|
||||
x_21 = l_Lean_Meta_Simp_main(x_2, x_15, x_20, x_3, x_4, x_5, x_6, x_16);
|
||||
if (lean_obj_tag(x_21) == 0)
|
||||
x_22 = l_Lean_Meta_Simp_main(x_2, x_15, x_21, x_20, x_3, x_4, x_5, x_6, x_16);
|
||||
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;
|
||||
x_22 = lean_ctor_get(x_21, 0);
|
||||
lean_inc(x_22);
|
||||
x_23 = lean_ctor_get(x_21, 1);
|
||||
lean_object* x_23; lean_object* x_24; uint8_t x_25;
|
||||
x_23 = lean_ctor_get(x_22, 0);
|
||||
lean_inc(x_23);
|
||||
lean_dec(x_21);
|
||||
x_24 = lean_st_ref_get(x_6, x_23);
|
||||
lean_dec(x_6);
|
||||
x_25 = lean_ctor_get(x_24, 1);
|
||||
lean_inc(x_25);
|
||||
lean_dec(x_24);
|
||||
x_26 = lean_st_ref_get(x_12, x_25);
|
||||
lean_dec(x_12);
|
||||
x_27 = lean_ctor_get(x_26, 0);
|
||||
lean_inc(x_27);
|
||||
if (lean_obj_tag(x_27) == 0)
|
||||
{
|
||||
uint8_t x_28;
|
||||
x_24 = lean_ctor_get(x_22, 1);
|
||||
lean_inc(x_24);
|
||||
lean_dec(x_22);
|
||||
x_28 = !lean_is_exclusive(x_26);
|
||||
if (x_28 == 0)
|
||||
x_25 = !lean_is_exclusive(x_23);
|
||||
if (x_25 == 0)
|
||||
{
|
||||
lean_object* x_29;
|
||||
x_29 = lean_ctor_get(x_26, 0);
|
||||
lean_dec(x_29);
|
||||
lean_ctor_set(x_26, 0, x_8);
|
||||
return x_26;
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_30; lean_object* x_31;
|
||||
x_30 = lean_ctor_get(x_26, 1);
|
||||
lean_inc(x_30);
|
||||
lean_dec(x_26);
|
||||
x_31 = lean_alloc_ctor(0, 2, 0);
|
||||
lean_ctor_set(x_31, 0, x_8);
|
||||
lean_ctor_set(x_31, 1, x_30);
|
||||
return x_31;
|
||||
}
|
||||
}
|
||||
else
|
||||
lean_object* x_26; lean_object* x_27; lean_object* x_28; lean_object* x_29; lean_object* x_30; lean_object* x_31;
|
||||
x_26 = lean_ctor_get(x_23, 0);
|
||||
x_27 = lean_ctor_get(x_23, 1);
|
||||
lean_dec(x_27);
|
||||
x_28 = lean_st_ref_get(x_6, x_24);
|
||||
lean_dec(x_6);
|
||||
x_29 = lean_ctor_get(x_28, 1);
|
||||
lean_inc(x_29);
|
||||
lean_dec(x_28);
|
||||
x_30 = lean_st_ref_get(x_12, x_29);
|
||||
lean_dec(x_12);
|
||||
x_31 = lean_ctor_get(x_30, 0);
|
||||
lean_inc(x_31);
|
||||
if (lean_obj_tag(x_31) == 0)
|
||||
{
|
||||
uint8_t x_32;
|
||||
x_32 = !lean_is_exclusive(x_26);
|
||||
lean_free_object(x_23);
|
||||
lean_dec(x_26);
|
||||
x_32 = !lean_is_exclusive(x_30);
|
||||
if (x_32 == 0)
|
||||
{
|
||||
lean_object* x_33; uint8_t x_34;
|
||||
x_33 = lean_ctor_get(x_26, 0);
|
||||
lean_object* x_33;
|
||||
x_33 = lean_ctor_get(x_30, 0);
|
||||
lean_dec(x_33);
|
||||
x_34 = !lean_is_exclusive(x_27);
|
||||
if (x_34 == 0)
|
||||
{
|
||||
lean_object* x_35; lean_object* x_36; lean_object* x_37;
|
||||
x_35 = lean_ctor_get(x_27, 0);
|
||||
x_36 = l_Lean_Expr_mvarId_x21(x_35);
|
||||
x_37 = lean_alloc_ctor(0, 2, 0);
|
||||
lean_ctor_set(x_37, 0, x_36);
|
||||
lean_ctor_set(x_37, 1, x_22);
|
||||
lean_ctor_set(x_27, 0, x_37);
|
||||
return x_26;
|
||||
lean_ctor_set(x_30, 0, x_8);
|
||||
return x_30;
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_38; lean_object* x_39; lean_object* x_40; lean_object* x_41;
|
||||
x_38 = lean_ctor_get(x_27, 0);
|
||||
lean_inc(x_38);
|
||||
lean_dec(x_27);
|
||||
x_39 = l_Lean_Expr_mvarId_x21(x_38);
|
||||
x_40 = lean_alloc_ctor(0, 2, 0);
|
||||
lean_ctor_set(x_40, 0, x_39);
|
||||
lean_ctor_set(x_40, 1, x_22);
|
||||
x_41 = lean_alloc_ctor(1, 1, 0);
|
||||
lean_ctor_set(x_41, 0, x_40);
|
||||
lean_ctor_set(x_26, 0, x_41);
|
||||
return x_26;
|
||||
lean_object* x_34; lean_object* x_35;
|
||||
x_34 = lean_ctor_get(x_30, 1);
|
||||
lean_inc(x_34);
|
||||
lean_dec(x_30);
|
||||
x_35 = lean_alloc_ctor(0, 2, 0);
|
||||
lean_ctor_set(x_35, 0, x_8);
|
||||
lean_ctor_set(x_35, 1, x_34);
|
||||
return x_35;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_42; lean_object* x_43; lean_object* x_44; lean_object* x_45; lean_object* x_46; lean_object* x_47; lean_object* x_48;
|
||||
x_42 = lean_ctor_get(x_26, 1);
|
||||
lean_inc(x_42);
|
||||
lean_dec(x_26);
|
||||
x_43 = lean_ctor_get(x_27, 0);
|
||||
lean_inc(x_43);
|
||||
if (lean_is_exclusive(x_27)) {
|
||||
lean_ctor_release(x_27, 0);
|
||||
x_44 = x_27;
|
||||
uint8_t x_36;
|
||||
x_36 = !lean_is_exclusive(x_30);
|
||||
if (x_36 == 0)
|
||||
{
|
||||
lean_object* x_37; uint8_t x_38;
|
||||
x_37 = lean_ctor_get(x_30, 0);
|
||||
lean_dec(x_37);
|
||||
x_38 = !lean_is_exclusive(x_31);
|
||||
if (x_38 == 0)
|
||||
{
|
||||
lean_object* x_39; lean_object* x_40;
|
||||
x_39 = lean_ctor_get(x_31, 0);
|
||||
x_40 = l_Lean_Expr_mvarId_x21(x_39);
|
||||
lean_ctor_set(x_23, 1, x_26);
|
||||
lean_ctor_set(x_23, 0, x_40);
|
||||
lean_ctor_set(x_31, 0, x_23);
|
||||
return x_30;
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_41; lean_object* x_42; lean_object* x_43;
|
||||
x_41 = lean_ctor_get(x_31, 0);
|
||||
lean_inc(x_41);
|
||||
lean_dec(x_31);
|
||||
x_42 = l_Lean_Expr_mvarId_x21(x_41);
|
||||
lean_ctor_set(x_23, 1, x_26);
|
||||
lean_ctor_set(x_23, 0, x_42);
|
||||
x_43 = lean_alloc_ctor(1, 1, 0);
|
||||
lean_ctor_set(x_43, 0, x_23);
|
||||
lean_ctor_set(x_30, 0, x_43);
|
||||
return x_30;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_44; lean_object* x_45; lean_object* x_46; lean_object* x_47; lean_object* x_48; lean_object* x_49;
|
||||
x_44 = lean_ctor_get(x_30, 1);
|
||||
lean_inc(x_44);
|
||||
lean_dec(x_30);
|
||||
x_45 = lean_ctor_get(x_31, 0);
|
||||
lean_inc(x_45);
|
||||
if (lean_is_exclusive(x_31)) {
|
||||
lean_ctor_release(x_31, 0);
|
||||
x_46 = x_31;
|
||||
} else {
|
||||
lean_dec_ref(x_27);
|
||||
x_44 = lean_box(0);
|
||||
lean_dec_ref(x_31);
|
||||
x_46 = lean_box(0);
|
||||
}
|
||||
x_45 = l_Lean_Expr_mvarId_x21(x_43);
|
||||
x_46 = lean_alloc_ctor(0, 2, 0);
|
||||
lean_ctor_set(x_46, 0, x_45);
|
||||
lean_ctor_set(x_46, 1, x_22);
|
||||
if (lean_is_scalar(x_44)) {
|
||||
x_47 = lean_alloc_ctor(1, 1, 0);
|
||||
x_47 = l_Lean_Expr_mvarId_x21(x_45);
|
||||
lean_ctor_set(x_23, 1, x_26);
|
||||
lean_ctor_set(x_23, 0, x_47);
|
||||
if (lean_is_scalar(x_46)) {
|
||||
x_48 = lean_alloc_ctor(1, 1, 0);
|
||||
} else {
|
||||
x_47 = x_44;
|
||||
x_48 = x_46;
|
||||
}
|
||||
lean_ctor_set(x_47, 0, x_46);
|
||||
x_48 = lean_alloc_ctor(0, 2, 0);
|
||||
lean_ctor_set(x_48, 0, x_47);
|
||||
lean_ctor_set(x_48, 1, x_42);
|
||||
return x_48;
|
||||
lean_ctor_set(x_48, 0, x_23);
|
||||
x_49 = lean_alloc_ctor(0, 2, 0);
|
||||
lean_ctor_set(x_49, 0, x_48);
|
||||
lean_ctor_set(x_49, 1, x_44);
|
||||
return x_49;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
uint8_t x_49;
|
||||
lean_object* x_50; lean_object* x_51; lean_object* x_52; lean_object* x_53; lean_object* x_54;
|
||||
x_50 = lean_ctor_get(x_23, 0);
|
||||
lean_inc(x_50);
|
||||
lean_dec(x_23);
|
||||
x_51 = lean_st_ref_get(x_6, x_24);
|
||||
lean_dec(x_6);
|
||||
x_52 = lean_ctor_get(x_51, 1);
|
||||
lean_inc(x_52);
|
||||
lean_dec(x_51);
|
||||
x_53 = lean_st_ref_get(x_12, x_52);
|
||||
lean_dec(x_12);
|
||||
x_54 = lean_ctor_get(x_53, 0);
|
||||
lean_inc(x_54);
|
||||
if (lean_obj_tag(x_54) == 0)
|
||||
{
|
||||
lean_object* x_55; lean_object* x_56; lean_object* x_57;
|
||||
lean_dec(x_50);
|
||||
x_55 = lean_ctor_get(x_53, 1);
|
||||
lean_inc(x_55);
|
||||
if (lean_is_exclusive(x_53)) {
|
||||
lean_ctor_release(x_53, 0);
|
||||
lean_ctor_release(x_53, 1);
|
||||
x_56 = x_53;
|
||||
} else {
|
||||
lean_dec_ref(x_53);
|
||||
x_56 = lean_box(0);
|
||||
}
|
||||
if (lean_is_scalar(x_56)) {
|
||||
x_57 = lean_alloc_ctor(0, 2, 0);
|
||||
} else {
|
||||
x_57 = x_56;
|
||||
}
|
||||
lean_ctor_set(x_57, 0, x_8);
|
||||
lean_ctor_set(x_57, 1, x_55);
|
||||
return x_57;
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_58; lean_object* x_59; lean_object* x_60; lean_object* x_61; lean_object* x_62; lean_object* x_63; lean_object* x_64; lean_object* x_65;
|
||||
x_58 = lean_ctor_get(x_53, 1);
|
||||
lean_inc(x_58);
|
||||
if (lean_is_exclusive(x_53)) {
|
||||
lean_ctor_release(x_53, 0);
|
||||
lean_ctor_release(x_53, 1);
|
||||
x_59 = x_53;
|
||||
} else {
|
||||
lean_dec_ref(x_53);
|
||||
x_59 = lean_box(0);
|
||||
}
|
||||
x_60 = lean_ctor_get(x_54, 0);
|
||||
lean_inc(x_60);
|
||||
if (lean_is_exclusive(x_54)) {
|
||||
lean_ctor_release(x_54, 0);
|
||||
x_61 = x_54;
|
||||
} else {
|
||||
lean_dec_ref(x_54);
|
||||
x_61 = lean_box(0);
|
||||
}
|
||||
x_62 = l_Lean_Expr_mvarId_x21(x_60);
|
||||
x_63 = lean_alloc_ctor(0, 2, 0);
|
||||
lean_ctor_set(x_63, 0, x_62);
|
||||
lean_ctor_set(x_63, 1, x_50);
|
||||
if (lean_is_scalar(x_61)) {
|
||||
x_64 = lean_alloc_ctor(1, 1, 0);
|
||||
} else {
|
||||
x_64 = x_61;
|
||||
}
|
||||
lean_ctor_set(x_64, 0, x_63);
|
||||
if (lean_is_scalar(x_59)) {
|
||||
x_65 = lean_alloc_ctor(0, 2, 0);
|
||||
} else {
|
||||
x_65 = x_59;
|
||||
}
|
||||
lean_ctor_set(x_65, 0, x_64);
|
||||
lean_ctor_set(x_65, 1, x_58);
|
||||
return x_65;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
uint8_t x_66;
|
||||
lean_dec(x_12);
|
||||
lean_dec(x_6);
|
||||
x_49 = !lean_is_exclusive(x_21);
|
||||
if (x_49 == 0)
|
||||
x_66 = !lean_is_exclusive(x_22);
|
||||
if (x_66 == 0)
|
||||
{
|
||||
return x_21;
|
||||
return x_22;
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_50; lean_object* x_51; lean_object* x_52;
|
||||
x_50 = lean_ctor_get(x_21, 0);
|
||||
x_51 = lean_ctor_get(x_21, 1);
|
||||
lean_inc(x_51);
|
||||
lean_inc(x_50);
|
||||
lean_dec(x_21);
|
||||
x_52 = lean_alloc_ctor(1, 2, 0);
|
||||
lean_ctor_set(x_52, 0, x_50);
|
||||
lean_ctor_set(x_52, 1, x_51);
|
||||
return x_52;
|
||||
lean_object* x_67; lean_object* x_68; lean_object* x_69;
|
||||
x_67 = lean_ctor_get(x_22, 0);
|
||||
x_68 = lean_ctor_get(x_22, 1);
|
||||
lean_inc(x_68);
|
||||
lean_inc(x_67);
|
||||
lean_dec(x_22);
|
||||
x_69 = lean_alloc_ctor(1, 2, 0);
|
||||
lean_ctor_set(x_69, 0, x_67);
|
||||
lean_ctor_set(x_69, 1, x_68);
|
||||
return x_69;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
85
stage0/stdlib/Lean/Elab/Tactic/Conv/Simp.c
generated
85
stage0/stdlib/Lean/Elab/Tactic/Conv/Simp.c
generated
|
|
@ -54,6 +54,7 @@ LEAN_EXPORT lean_object* l_Lean_Elab_Tactic_Conv_evalSimpMatch___rarg___lambda__
|
|||
static lean_object* l___regBuiltin_Lean_Elab_Tactic_Conv_evalSimp_declRange___closed__3;
|
||||
static lean_object* l___regBuiltin_Lean_Elab_Tactic_Conv_evalSimp_declRange___closed__5;
|
||||
lean_object* l_Lean_Elab_Tactic_Conv_getLhs(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
extern lean_object* l_Lean_NameSet_empty;
|
||||
extern lean_object* l_Lean_Elab_Tactic_tacticElabAttribute;
|
||||
static lean_object* l___regBuiltin_Lean_Elab_Tactic_Conv_evalSimp___closed__11;
|
||||
lean_object* l_Lean_Elab_Tactic_Simp_DischargeWrapper_with___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
|
|
@ -75,7 +76,7 @@ static lean_object* l___regBuiltin_Lean_Elab_Tactic_Conv_evalSimp___closed__12;
|
|||
static lean_object* l___regBuiltin_Lean_Elab_Tactic_Conv_evalSimpMatch_declRange___closed__5;
|
||||
LEAN_EXPORT lean_object* l_Lean_Elab_Tactic_Conv_applySimpResult(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
static lean_object* l___regBuiltin_Lean_Elab_Tactic_Conv_evalSimpMatch_declRange___closed__3;
|
||||
lean_object* l_Lean_Meta_simp(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Meta_simp(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
static lean_object* l___regBuiltin_Lean_Elab_Tactic_Conv_evalSimp___closed__10;
|
||||
LEAN_EXPORT lean_object* l_Lean_Elab_Tactic_Conv_applySimpResult(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_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:
|
||||
|
|
@ -153,9 +154,10 @@ return x_22;
|
|||
LEAN_EXPORT lean_object* l_Lean_Elab_Tactic_Conv_evalSimp___lambda__1(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9, lean_object* x_10, lean_object* x_11, lean_object* x_12) {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_13;
|
||||
x_13 = l_Lean_Meta_simp(x_1, x_2, x_3, x_8, x_9, x_10, x_11, x_12);
|
||||
return x_13;
|
||||
lean_object* x_13; lean_object* x_14;
|
||||
x_13 = l_Lean_NameSet_empty;
|
||||
x_14 = l_Lean_Meta_simp(x_1, x_2, x_3, x_13, x_8, x_9, x_10, x_11, x_12);
|
||||
return x_14;
|
||||
}
|
||||
}
|
||||
LEAN_EXPORT lean_object* l_Lean_Elab_Tactic_Conv_evalSimp___lambda__2(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9, lean_object* x_10) {
|
||||
|
|
@ -218,18 +220,21 @@ x_22 = l_Lean_Elab_Tactic_Simp_DischargeWrapper_with___rarg(x_17, x_21, x_2, x_3
|
|||
lean_dec(x_17);
|
||||
if (lean_obj_tag(x_22) == 0)
|
||||
{
|
||||
lean_object* x_23; lean_object* x_24; lean_object* x_25;
|
||||
lean_object* x_23; lean_object* x_24; lean_object* x_25; lean_object* x_26;
|
||||
x_23 = lean_ctor_get(x_22, 0);
|
||||
lean_inc(x_23);
|
||||
x_24 = lean_ctor_get(x_22, 1);
|
||||
lean_inc(x_24);
|
||||
lean_dec(x_22);
|
||||
x_25 = l_Lean_Elab_Tactic_Conv_applySimpResult(x_23, x_2, x_3, x_4, x_5, x_6, x_7, x_8, x_9, x_24);
|
||||
return x_25;
|
||||
x_25 = lean_ctor_get(x_23, 0);
|
||||
lean_inc(x_25);
|
||||
lean_dec(x_23);
|
||||
x_26 = l_Lean_Elab_Tactic_Conv_applySimpResult(x_25, x_2, x_3, x_4, x_5, x_6, x_7, x_8, x_9, x_24);
|
||||
return x_26;
|
||||
}
|
||||
else
|
||||
{
|
||||
uint8_t x_26;
|
||||
uint8_t x_27;
|
||||
lean_dec(x_9);
|
||||
lean_dec(x_8);
|
||||
lean_dec(x_7);
|
||||
|
|
@ -238,29 +243,29 @@ lean_dec(x_5);
|
|||
lean_dec(x_4);
|
||||
lean_dec(x_3);
|
||||
lean_dec(x_2);
|
||||
x_26 = !lean_is_exclusive(x_22);
|
||||
if (x_26 == 0)
|
||||
x_27 = !lean_is_exclusive(x_22);
|
||||
if (x_27 == 0)
|
||||
{
|
||||
return x_22;
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_27; lean_object* x_28; lean_object* x_29;
|
||||
x_27 = lean_ctor_get(x_22, 0);
|
||||
x_28 = lean_ctor_get(x_22, 1);
|
||||
lean_object* x_28; lean_object* x_29; lean_object* x_30;
|
||||
x_28 = lean_ctor_get(x_22, 0);
|
||||
x_29 = lean_ctor_get(x_22, 1);
|
||||
lean_inc(x_29);
|
||||
lean_inc(x_28);
|
||||
lean_inc(x_27);
|
||||
lean_dec(x_22);
|
||||
x_29 = lean_alloc_ctor(1, 2, 0);
|
||||
lean_ctor_set(x_29, 0, x_27);
|
||||
lean_ctor_set(x_29, 1, x_28);
|
||||
return x_29;
|
||||
x_30 = lean_alloc_ctor(1, 2, 0);
|
||||
lean_ctor_set(x_30, 0, x_28);
|
||||
lean_ctor_set(x_30, 1, x_29);
|
||||
return x_30;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
uint8_t x_30;
|
||||
uint8_t x_31;
|
||||
lean_dec(x_17);
|
||||
lean_dec(x_16);
|
||||
lean_dec(x_9);
|
||||
|
|
@ -271,29 +276,29 @@ lean_dec(x_5);
|
|||
lean_dec(x_4);
|
||||
lean_dec(x_3);
|
||||
lean_dec(x_2);
|
||||
x_30 = !lean_is_exclusive(x_18);
|
||||
if (x_30 == 0)
|
||||
x_31 = !lean_is_exclusive(x_18);
|
||||
if (x_31 == 0)
|
||||
{
|
||||
return x_18;
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_31; lean_object* x_32; lean_object* x_33;
|
||||
x_31 = lean_ctor_get(x_18, 0);
|
||||
x_32 = lean_ctor_get(x_18, 1);
|
||||
lean_object* x_32; lean_object* x_33; lean_object* x_34;
|
||||
x_32 = lean_ctor_get(x_18, 0);
|
||||
x_33 = lean_ctor_get(x_18, 1);
|
||||
lean_inc(x_33);
|
||||
lean_inc(x_32);
|
||||
lean_inc(x_31);
|
||||
lean_dec(x_18);
|
||||
x_33 = lean_alloc_ctor(1, 2, 0);
|
||||
lean_ctor_set(x_33, 0, x_31);
|
||||
lean_ctor_set(x_33, 1, x_32);
|
||||
return x_33;
|
||||
x_34 = lean_alloc_ctor(1, 2, 0);
|
||||
lean_ctor_set(x_34, 0, x_32);
|
||||
lean_ctor_set(x_34, 1, x_33);
|
||||
return x_34;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
uint8_t x_34;
|
||||
uint8_t x_35;
|
||||
lean_dec(x_9);
|
||||
lean_dec(x_8);
|
||||
lean_dec(x_7);
|
||||
|
|
@ -302,23 +307,23 @@ lean_dec(x_5);
|
|||
lean_dec(x_4);
|
||||
lean_dec(x_3);
|
||||
lean_dec(x_2);
|
||||
x_34 = !lean_is_exclusive(x_13);
|
||||
if (x_34 == 0)
|
||||
x_35 = !lean_is_exclusive(x_13);
|
||||
if (x_35 == 0)
|
||||
{
|
||||
return x_13;
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_35; lean_object* x_36; lean_object* x_37;
|
||||
x_35 = lean_ctor_get(x_13, 0);
|
||||
x_36 = lean_ctor_get(x_13, 1);
|
||||
lean_object* x_36; lean_object* x_37; lean_object* x_38;
|
||||
x_36 = lean_ctor_get(x_13, 0);
|
||||
x_37 = lean_ctor_get(x_13, 1);
|
||||
lean_inc(x_37);
|
||||
lean_inc(x_36);
|
||||
lean_inc(x_35);
|
||||
lean_dec(x_13);
|
||||
x_37 = lean_alloc_ctor(1, 2, 0);
|
||||
lean_ctor_set(x_37, 0, x_35);
|
||||
lean_ctor_set(x_37, 1, x_36);
|
||||
return x_37;
|
||||
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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
4
stage0/stdlib/Lean/Elab/Tactic/Conv/Unfold.c
generated
4
stage0/stdlib/Lean/Elab/Tactic/Conv/Unfold.c
generated
|
|
@ -21,7 +21,6 @@ static lean_object* l___regBuiltin_Lean_Elab_Tactic_Conv_evalUnfold___closed__10
|
|||
lean_object* lean_array_get_size(lean_object*);
|
||||
lean_object* l_Lean_Elab_Tactic_withMainContext___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
static lean_object* l___regBuiltin_Lean_Elab_Tactic_Conv_evalUnfold_declRange___closed__7;
|
||||
lean_object* l_Lean_Elab_resolveGlobalConstNoOverloadWithInfo___at_Lean_Elab_Tactic_elabSimpArgs___spec__2(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_KeyedDeclsAttribute_addBuiltin___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
uint8_t lean_usize_dec_lt(size_t, size_t);
|
||||
LEAN_EXPORT lean_object* l___regBuiltin_Lean_Elab_Tactic_Conv_evalUnfold_declRange(lean_object*);
|
||||
|
|
@ -43,6 +42,7 @@ static lean_object* l___regBuiltin_Lean_Elab_Tactic_Conv_evalUnfold___closed__13
|
|||
static lean_object* l___regBuiltin_Lean_Elab_Tactic_Conv_evalUnfold_declRange___closed__5;
|
||||
static lean_object* l___regBuiltin_Lean_Elab_Tactic_Conv_evalUnfold___closed__1;
|
||||
static lean_object* l___regBuiltin_Lean_Elab_Tactic_Conv_evalUnfold___closed__5;
|
||||
lean_object* l_Lean_Elab_resolveGlobalConstNoOverloadWithInfo___at_Lean_Elab_Tactic_elabSimpArgs___spec__3(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
LEAN_EXPORT lean_object* l_Lean_Elab_Tactic_Conv_evalUnfold___boxed__const__1;
|
||||
lean_object* l_Lean_Meta_unfold(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
LEAN_EXPORT lean_object* l_Lean_Elab_Tactic_Conv_evalUnfold___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
|
|
@ -98,7 +98,7 @@ lean_inc(x_8);
|
|||
lean_inc(x_7);
|
||||
lean_inc(x_6);
|
||||
lean_inc(x_5);
|
||||
x_18 = l_Lean_Elab_resolveGlobalConstNoOverloadWithInfo___at_Lean_Elab_Tactic_elabSimpArgs___spec__2(x_16, x_17, x_5, x_6, x_7, x_8, x_9, x_10, x_11, x_12, x_13);
|
||||
x_18 = l_Lean_Elab_resolveGlobalConstNoOverloadWithInfo___at_Lean_Elab_Tactic_elabSimpArgs___spec__3(x_16, x_17, x_5, x_6, x_7, x_8, x_9, x_10, x_11, x_12, x_13);
|
||||
if (lean_obj_tag(x_18) == 0)
|
||||
{
|
||||
lean_object* x_19; lean_object* x_20; lean_object* x_21;
|
||||
|
|
|
|||
9630
stage0/stdlib/Lean/Elab/Tactic/Simp.c
generated
9630
stage0/stdlib/Lean/Elab/Tactic/Simp.c
generated
File diff suppressed because it is too large
Load diff
253
stage0/stdlib/Lean/Meta/Tactic/AC/Main.c
generated
253
stage0/stdlib/Lean/Meta/Tactic/AC/Main.c
generated
|
|
@ -39,7 +39,7 @@ LEAN_EXPORT lean_object* l_Lean_Meta_AC_buildNormProof(lean_object*, lean_object
|
|||
uint8_t lean_usize_dec_eq(size_t, size_t);
|
||||
lean_object* lean_array_uget(lean_object*, size_t);
|
||||
static lean_object* l_Lean_Meta_AC_getInstance___closed__6;
|
||||
LEAN_EXPORT lean_object* l_Lean_Meta_AC_initFn____x40_Lean_Meta_Tactic_AC_Main___hyg_2246_(lean_object*);
|
||||
LEAN_EXPORT lean_object* l_Lean_Meta_AC_initFn____x40_Lean_Meta_Tactic_AC_Main___hyg_2270_(lean_object*);
|
||||
LEAN_EXPORT lean_object* l_Lean_Meta_AC_acRflTactic___rarg___lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
LEAN_EXPORT lean_object* l_Std_HashSet_toArray___at_Lean_Meta_AC_toACExpr___spec__1(lean_object*);
|
||||
LEAN_EXPORT lean_object* l_Lean_Meta_AC_acRflTactic___boxed(lean_object*);
|
||||
|
|
@ -103,7 +103,7 @@ static lean_object* l_Lean_Meta_AC_buildNormProof_mkContext___closed__5;
|
|||
LEAN_EXPORT lean_object* l_Lean_Meta_AC_buildNormProof_convert(lean_object*);
|
||||
LEAN_EXPORT lean_object* l_Lean_Meta_AC_buildNormProof_convertTarget(lean_object*, lean_object*, lean_object*);
|
||||
static lean_object* l___regBuiltin_Lean_Meta_AC_acRflTactic___closed__5;
|
||||
lean_object* l_Lean_Meta_Simp_main(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Meta_Simp_main(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
static lean_object* l_Lean_Meta_AC_buildNormProof___closed__7;
|
||||
lean_object* lean_nat_sub(lean_object*, lean_object*);
|
||||
static lean_object* l_Array_mapMUnsafe_map___at_Lean_Meta_AC_buildNormProof_mkContext___spec__1___closed__3;
|
||||
|
|
@ -167,6 +167,7 @@ LEAN_EXPORT lean_object* l_Array_mapMUnsafe_map___at_Lean_Meta_AC_buildNormProof
|
|||
static lean_object* l_Array_mapMUnsafe_map___at_Lean_Meta_AC_buildNormProof_mkContext___spec__1___closed__1;
|
||||
LEAN_EXPORT lean_object* l_Std_HashMapImp_expand___at_Lean_Meta_AC_toACExpr___spec__8(lean_object*, lean_object*);
|
||||
size_t lean_usize_of_nat(lean_object*);
|
||||
extern lean_object* l_Lean_NameSet_empty;
|
||||
extern lean_object* l_Lean_Elab_Tactic_tacticElabAttribute;
|
||||
static lean_object* l_Std_HashMap_find_x21___at_Lean_Meta_AC_toACExpr___spec__13___closed__2;
|
||||
static lean_object* l_Std_HashMap_find_x21___at_Lean_Meta_AC_toACExpr___spec__13___closed__1;
|
||||
|
|
@ -4593,7 +4594,7 @@ lean_inc(x_9);
|
|||
if (lean_obj_tag(x_9) == 5)
|
||||
{
|
||||
lean_object* x_10;
|
||||
x_10 = lean_ctor_get(x_2, 3);
|
||||
x_10 = lean_ctor_get(x_2, 4);
|
||||
lean_inc(x_10);
|
||||
if (lean_obj_tag(x_10) == 0)
|
||||
{
|
||||
|
|
@ -5604,7 +5605,7 @@ return x_1;
|
|||
LEAN_EXPORT lean_object* l_Lean_Meta_AC_rewriteUnnormalized(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_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16;
|
||||
x_7 = l_Lean_Meta_getSimpCongrTheorems___rarg(x_5, x_6);
|
||||
x_8 = lean_ctor_get(x_7, 0);
|
||||
lean_inc(x_8);
|
||||
|
|
@ -5612,153 +5613,159 @@ x_9 = lean_ctor_get(x_7, 1);
|
|||
lean_inc(x_9);
|
||||
lean_dec(x_7);
|
||||
x_10 = lean_box(0);
|
||||
x_11 = l_Lean_Meta_Simp_neutralConfig;
|
||||
x_12 = l_Std_HashSet_toArray___at_Lean_Meta_AC_toACExpr___spec__1___closed__1;
|
||||
x_13 = lean_unsigned_to_nat(0u);
|
||||
x_14 = lean_alloc_ctor(0, 5, 0);
|
||||
lean_ctor_set(x_14, 0, x_11);
|
||||
lean_ctor_set(x_14, 1, x_12);
|
||||
lean_ctor_set(x_14, 2, x_8);
|
||||
lean_ctor_set(x_14, 3, x_10);
|
||||
lean_ctor_set(x_14, 4, x_13);
|
||||
x_11 = lean_box(0);
|
||||
x_12 = l_Lean_Meta_Simp_neutralConfig;
|
||||
x_13 = l_Std_HashSet_toArray___at_Lean_Meta_AC_toACExpr___spec__1___closed__1;
|
||||
x_14 = lean_unsigned_to_nat(0u);
|
||||
x_15 = lean_alloc_ctor(0, 6, 0);
|
||||
lean_ctor_set(x_15, 0, x_12);
|
||||
lean_ctor_set(x_15, 1, x_13);
|
||||
lean_ctor_set(x_15, 2, x_8);
|
||||
lean_ctor_set(x_15, 3, x_10);
|
||||
lean_ctor_set(x_15, 4, x_11);
|
||||
lean_ctor_set(x_15, 5, x_14);
|
||||
lean_inc(x_1);
|
||||
x_15 = l_Lean_MVarId_getType(x_1, x_2, x_3, x_4, x_5, x_9);
|
||||
if (lean_obj_tag(x_15) == 0)
|
||||
x_16 = l_Lean_MVarId_getType(x_1, x_2, x_3, x_4, x_5, x_9);
|
||||
if (lean_obj_tag(x_16) == 0)
|
||||
{
|
||||
lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; lean_object* x_20; lean_object* x_21; lean_object* x_22; lean_object* x_23; lean_object* x_24; lean_object* x_25;
|
||||
x_16 = lean_ctor_get(x_15, 0);
|
||||
lean_inc(x_16);
|
||||
x_17 = lean_ctor_get(x_15, 1);
|
||||
lean_object* x_17; lean_object* x_18; lean_object* x_19; lean_object* x_20; lean_object* x_21; lean_object* x_22; lean_object* x_23; lean_object* x_24; lean_object* x_25; lean_object* x_26; lean_object* x_27;
|
||||
x_17 = lean_ctor_get(x_16, 0);
|
||||
lean_inc(x_17);
|
||||
lean_dec(x_15);
|
||||
x_18 = l_Lean_instantiateMVars___at___private_Lean_Meta_Basic_0__Lean_Meta_mkLeveErrorMessageCore___spec__2(x_16, x_2, x_3, x_4, x_5, x_17);
|
||||
x_19 = lean_ctor_get(x_18, 0);
|
||||
lean_inc(x_19);
|
||||
x_20 = lean_ctor_get(x_18, 1);
|
||||
x_18 = lean_ctor_get(x_16, 1);
|
||||
lean_inc(x_18);
|
||||
lean_dec(x_16);
|
||||
x_19 = l_Lean_instantiateMVars___at___private_Lean_Meta_Basic_0__Lean_Meta_mkLeveErrorMessageCore___spec__2(x_17, x_2, x_3, x_4, x_5, x_18);
|
||||
x_20 = lean_ctor_get(x_19, 0);
|
||||
lean_inc(x_20);
|
||||
lean_dec(x_18);
|
||||
x_21 = lean_alloc_closure((void*)(l_Lean_Meta_AC_rewriteUnnormalized___lambda__1___boxed), 9, 1);
|
||||
lean_closure_set(x_21, 0, x_10);
|
||||
x_22 = lean_alloc_closure((void*)(l_Lean_Meta_AC_rewriteUnnormalized___lambda__2___boxed), 9, 1);
|
||||
lean_closure_set(x_22, 0, x_10);
|
||||
x_23 = l_Lean_Meta_AC_rewriteUnnormalized___closed__1;
|
||||
x_24 = lean_alloc_ctor(0, 3, 0);
|
||||
lean_ctor_set(x_24, 0, x_21);
|
||||
lean_ctor_set(x_24, 1, x_23);
|
||||
lean_ctor_set(x_24, 2, x_22);
|
||||
lean_inc(x_5);
|
||||
lean_inc(x_4);
|
||||
lean_inc(x_3);
|
||||
lean_inc(x_2);
|
||||
lean_inc(x_19);
|
||||
x_25 = l_Lean_Meta_Simp_main(x_19, x_14, x_24, x_2, x_3, x_4, x_5, x_20);
|
||||
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_5);
|
||||
lean_inc(x_4);
|
||||
lean_inc(x_3);
|
||||
lean_inc(x_2);
|
||||
x_28 = l_Lean_Meta_applySimpResultToTarget(x_1, x_19, x_26, x_2, x_3, x_4, x_5, x_27);
|
||||
x_21 = lean_ctor_get(x_19, 1);
|
||||
lean_inc(x_21);
|
||||
lean_dec(x_19);
|
||||
if (lean_obj_tag(x_28) == 0)
|
||||
x_22 = lean_alloc_closure((void*)(l_Lean_Meta_AC_rewriteUnnormalized___lambda__1___boxed), 9, 1);
|
||||
lean_closure_set(x_22, 0, x_11);
|
||||
x_23 = lean_alloc_closure((void*)(l_Lean_Meta_AC_rewriteUnnormalized___lambda__2___boxed), 9, 1);
|
||||
lean_closure_set(x_23, 0, x_11);
|
||||
x_24 = l_Lean_Meta_AC_rewriteUnnormalized___closed__1;
|
||||
x_25 = lean_alloc_ctor(0, 3, 0);
|
||||
lean_ctor_set(x_25, 0, x_22);
|
||||
lean_ctor_set(x_25, 1, x_24);
|
||||
lean_ctor_set(x_25, 2, x_23);
|
||||
x_26 = l_Lean_NameSet_empty;
|
||||
lean_inc(x_5);
|
||||
lean_inc(x_4);
|
||||
lean_inc(x_3);
|
||||
lean_inc(x_2);
|
||||
lean_inc(x_20);
|
||||
x_27 = l_Lean_Meta_Simp_main(x_20, x_15, x_26, x_25, x_2, x_3, x_4, x_5, x_21);
|
||||
if (lean_obj_tag(x_27) == 0)
|
||||
{
|
||||
lean_object* x_29; lean_object* x_30; lean_object* x_31;
|
||||
x_29 = lean_ctor_get(x_28, 0);
|
||||
lean_object* x_28; lean_object* x_29; lean_object* x_30; lean_object* x_31;
|
||||
x_28 = lean_ctor_get(x_27, 0);
|
||||
lean_inc(x_28);
|
||||
x_29 = lean_ctor_get(x_27, 1);
|
||||
lean_inc(x_29);
|
||||
x_30 = lean_ctor_get(x_28, 1);
|
||||
lean_dec(x_27);
|
||||
x_30 = lean_ctor_get(x_28, 0);
|
||||
lean_inc(x_30);
|
||||
lean_dec(x_28);
|
||||
x_31 = l_Lean_MVarId_refl(x_29, x_2, x_3, x_4, x_5, x_30);
|
||||
lean_inc(x_5);
|
||||
lean_inc(x_4);
|
||||
lean_inc(x_3);
|
||||
lean_inc(x_2);
|
||||
x_31 = l_Lean_Meta_applySimpResultToTarget(x_1, x_20, x_30, x_2, x_3, x_4, x_5, x_29);
|
||||
lean_dec(x_20);
|
||||
if (lean_obj_tag(x_31) == 0)
|
||||
{
|
||||
lean_object* x_32; lean_object* x_33; lean_object* x_34;
|
||||
x_32 = lean_ctor_get(x_31, 0);
|
||||
lean_inc(x_32);
|
||||
x_33 = lean_ctor_get(x_31, 1);
|
||||
lean_inc(x_33);
|
||||
lean_dec(x_31);
|
||||
x_34 = l_Lean_MVarId_refl(x_32, x_2, x_3, x_4, x_5, x_33);
|
||||
return x_34;
|
||||
}
|
||||
else
|
||||
{
|
||||
uint8_t x_35;
|
||||
lean_dec(x_5);
|
||||
lean_dec(x_4);
|
||||
lean_dec(x_3);
|
||||
lean_dec(x_2);
|
||||
x_35 = !lean_is_exclusive(x_31);
|
||||
if (x_35 == 0)
|
||||
{
|
||||
return x_31;
|
||||
}
|
||||
else
|
||||
{
|
||||
uint8_t x_32;
|
||||
lean_dec(x_5);
|
||||
lean_dec(x_4);
|
||||
lean_dec(x_3);
|
||||
lean_dec(x_2);
|
||||
x_32 = !lean_is_exclusive(x_28);
|
||||
if (x_32 == 0)
|
||||
{
|
||||
return x_28;
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_33; lean_object* x_34; lean_object* x_35;
|
||||
x_33 = lean_ctor_get(x_28, 0);
|
||||
x_34 = lean_ctor_get(x_28, 1);
|
||||
lean_inc(x_34);
|
||||
lean_inc(x_33);
|
||||
lean_dec(x_28);
|
||||
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_19);
|
||||
lean_dec(x_5);
|
||||
lean_dec(x_4);
|
||||
lean_dec(x_3);
|
||||
lean_dec(x_2);
|
||||
lean_dec(x_1);
|
||||
x_36 = !lean_is_exclusive(x_25);
|
||||
if (x_36 == 0)
|
||||
{
|
||||
return x_25;
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_37; lean_object* x_38; lean_object* x_39;
|
||||
x_37 = lean_ctor_get(x_25, 0);
|
||||
x_38 = lean_ctor_get(x_25, 1);
|
||||
lean_inc(x_38);
|
||||
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_dec(x_25);
|
||||
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_inc(x_36);
|
||||
lean_dec(x_31);
|
||||
x_38 = lean_alloc_ctor(1, 2, 0);
|
||||
lean_ctor_set(x_38, 0, x_36);
|
||||
lean_ctor_set(x_38, 1, x_37);
|
||||
return x_38;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
uint8_t x_40;
|
||||
lean_dec(x_14);
|
||||
uint8_t x_39;
|
||||
lean_dec(x_20);
|
||||
lean_dec(x_5);
|
||||
lean_dec(x_4);
|
||||
lean_dec(x_3);
|
||||
lean_dec(x_2);
|
||||
lean_dec(x_1);
|
||||
x_40 = !lean_is_exclusive(x_15);
|
||||
if (x_40 == 0)
|
||||
x_39 = !lean_is_exclusive(x_27);
|
||||
if (x_39 == 0)
|
||||
{
|
||||
return x_15;
|
||||
return x_27;
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_41; lean_object* x_42; lean_object* x_43;
|
||||
x_41 = lean_ctor_get(x_15, 0);
|
||||
x_42 = lean_ctor_get(x_15, 1);
|
||||
lean_inc(x_42);
|
||||
lean_object* x_40; lean_object* x_41; lean_object* x_42;
|
||||
x_40 = lean_ctor_get(x_27, 0);
|
||||
x_41 = lean_ctor_get(x_27, 1);
|
||||
lean_inc(x_41);
|
||||
lean_inc(x_40);
|
||||
lean_dec(x_27);
|
||||
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_15);
|
||||
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;
|
||||
lean_dec(x_5);
|
||||
lean_dec(x_4);
|
||||
lean_dec(x_3);
|
||||
lean_dec(x_2);
|
||||
lean_dec(x_1);
|
||||
x_43 = !lean_is_exclusive(x_16);
|
||||
if (x_43 == 0)
|
||||
{
|
||||
return x_16;
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_44; lean_object* x_45; lean_object* x_46;
|
||||
x_44 = lean_ctor_get(x_16, 0);
|
||||
x_45 = lean_ctor_get(x_16, 1);
|
||||
lean_inc(x_45);
|
||||
lean_inc(x_44);
|
||||
lean_dec(x_16);
|
||||
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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -6110,7 +6117,7 @@ x_4 = l_Lean_addBuiltinDeclarationRanges(x_2, x_3, x_1);
|
|||
return x_4;
|
||||
}
|
||||
}
|
||||
LEAN_EXPORT lean_object* l_Lean_Meta_AC_initFn____x40_Lean_Meta_Tactic_AC_Main___hyg_2246_(lean_object* x_1) {
|
||||
LEAN_EXPORT lean_object* l_Lean_Meta_AC_initFn____x40_Lean_Meta_Tactic_AC_Main___hyg_2270_(lean_object* x_1) {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_2; uint8_t x_3; lean_object* x_4;
|
||||
|
|
@ -6355,7 +6362,7 @@ lean_mark_persistent(l___regBuiltin_Lean_Meta_AC_acRflTactic_declRange___closed_
|
|||
res = l___regBuiltin_Lean_Meta_AC_acRflTactic_declRange(lean_io_mk_world());
|
||||
if (lean_io_result_is_error(res)) return res;
|
||||
lean_dec_ref(res);
|
||||
res = l_Lean_Meta_AC_initFn____x40_Lean_Meta_Tactic_AC_Main___hyg_2246_(lean_io_mk_world());
|
||||
res = l_Lean_Meta_AC_initFn____x40_Lean_Meta_Tactic_AC_Main___hyg_2270_(lean_io_mk_world());
|
||||
if (lean_io_result_is_error(res)) return res;
|
||||
lean_dec_ref(res);
|
||||
return lean_io_result_mk_ok(lean_box(0));
|
||||
|
|
|
|||
605
stage0/stdlib/Lean/Meta/Tactic/Acyclic.c
generated
605
stage0/stdlib/Lean/Meta/Tactic/Acyclic.c
generated
|
|
@ -16,7 +16,7 @@ extern "C" {
|
|||
static lean_object* l_Lean_MVarId_acyclic_go___closed__18;
|
||||
static lean_object* l_Lean_MVarId_acyclic_go___closed__28;
|
||||
static lean_object* l_Lean_MVarId_acyclic_go___closed__14;
|
||||
lean_object* l_Lean_Meta_simpTarget(lean_object*, lean_object*, lean_object*, uint8_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Meta_simpTarget(lean_object*, lean_object*, lean_object*, uint8_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
static lean_object* l_Lean_MVarId_acyclic_go___closed__3;
|
||||
lean_object* l_Lean_Expr_mvarId_x21(lean_object*);
|
||||
lean_object* l_Lean_registerTraceClass(lean_object*, uint8_t, lean_object*);
|
||||
|
|
@ -57,7 +57,7 @@ extern lean_object* l_Lean_Meta_simpExtension;
|
|||
static lean_object* l_Lean_MVarId_acyclic_go___closed__29;
|
||||
lean_object* l_Std_mkHashMapImp___rarg(lean_object*);
|
||||
static lean_object* l_Lean_MVarId_acyclic_go___closed__25;
|
||||
LEAN_EXPORT lean_object* l_Lean_MVarId_initFn____x40_Lean_Meta_Tactic_Acyclic___hyg_868_(lean_object*);
|
||||
LEAN_EXPORT lean_object* l_Lean_MVarId_initFn____x40_Lean_Meta_Tactic_Acyclic___hyg_869_(lean_object*);
|
||||
lean_object* l_Lean_isTracingEnabledFor___at_Lean_Meta_processPostponed_loop___spec__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Std_PersistentHashMap_mkEmptyEntriesArray(lean_object*, lean_object*);
|
||||
static lean_object* l_Lean_MVarId_acyclic_go___closed__6;
|
||||
|
|
@ -68,6 +68,7 @@ LEAN_EXPORT lean_object* l_Lean_MVarId_acyclic_go___lambda__2(lean_object*, lean
|
|||
lean_object* lean_whnf(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
static lean_object* l_Lean_MVarId_acyclic_go___closed__2;
|
||||
static lean_object* l_Lean_MVarId_acyclic_go___closed__8;
|
||||
extern lean_object* l_Lean_NameSet_empty;
|
||||
LEAN_EXPORT lean_object* l_Lean_MVarId_acyclic___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
static lean_object* l_Lean_MVarId_acyclic_go___closed__17;
|
||||
LEAN_EXPORT lean_object* l_Lean_MVarId_acyclic_go(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
|
|
@ -597,7 +598,7 @@ lean_inc(x_50);
|
|||
x_56 = l_Lean_Meta_mkLT(x_50, x_54, x_5, x_6, x_7, x_8, x_55);
|
||||
if (lean_obj_tag(x_56) == 0)
|
||||
{
|
||||
lean_object* x_57; lean_object* x_58; lean_object* x_59; lean_object* x_60; lean_object* x_61; lean_object* x_62; lean_object* x_63; lean_object* x_64; lean_object* x_65; lean_object* x_66; lean_object* x_67; lean_object* x_68; lean_object* x_69; lean_object* x_70; lean_object* x_71; lean_object* x_72; lean_object* x_73; uint8_t x_74; lean_object* x_75;
|
||||
lean_object* x_57; lean_object* x_58; lean_object* x_59; lean_object* x_60; lean_object* x_61; lean_object* x_62; lean_object* x_63; lean_object* x_64; lean_object* x_65; lean_object* x_66; lean_object* x_67; lean_object* x_68; lean_object* x_69; lean_object* x_70; lean_object* x_71; lean_object* x_72; lean_object* x_73; lean_object* x_74; uint8_t x_75; lean_object* x_76; lean_object* x_77;
|
||||
x_57 = lean_ctor_get(x_56, 0);
|
||||
lean_inc(x_57);
|
||||
x_58 = lean_ctor_get(x_56, 1);
|
||||
|
|
@ -622,328 +623,334 @@ lean_inc(x_61);
|
|||
x_67 = l_Lean_Expr_mvarId_x21(x_61);
|
||||
x_68 = lean_array_push(x_46, x_65);
|
||||
x_69 = lean_box(0);
|
||||
x_70 = l_Lean_MVarId_acyclic_go___closed__18;
|
||||
x_71 = l_Lean_MVarId_acyclic_go___closed__23;
|
||||
x_72 = lean_unsigned_to_nat(0u);
|
||||
x_73 = lean_alloc_ctor(0, 5, 0);
|
||||
lean_ctor_set(x_73, 0, x_70);
|
||||
lean_ctor_set(x_73, 1, x_68);
|
||||
lean_ctor_set(x_73, 2, x_71);
|
||||
lean_ctor_set(x_73, 3, x_69);
|
||||
lean_ctor_set(x_73, 4, x_72);
|
||||
x_74 = 1;
|
||||
x_70 = lean_box(0);
|
||||
x_71 = l_Lean_MVarId_acyclic_go___closed__18;
|
||||
x_72 = l_Lean_MVarId_acyclic_go___closed__23;
|
||||
x_73 = lean_unsigned_to_nat(0u);
|
||||
x_74 = lean_alloc_ctor(0, 6, 0);
|
||||
lean_ctor_set(x_74, 0, x_71);
|
||||
lean_ctor_set(x_74, 1, x_68);
|
||||
lean_ctor_set(x_74, 2, x_72);
|
||||
lean_ctor_set(x_74, 3, x_69);
|
||||
lean_ctor_set(x_74, 4, x_70);
|
||||
lean_ctor_set(x_74, 5, x_73);
|
||||
x_75 = 1;
|
||||
x_76 = l_Lean_NameSet_empty;
|
||||
lean_inc(x_8);
|
||||
lean_inc(x_7);
|
||||
lean_inc(x_6);
|
||||
lean_inc(x_5);
|
||||
x_75 = l_Lean_Meta_simpTarget(x_67, x_73, x_69, x_74, x_5, x_6, x_7, x_8, x_66);
|
||||
if (lean_obj_tag(x_75) == 0)
|
||||
x_77 = l_Lean_Meta_simpTarget(x_67, x_74, x_70, x_75, x_76, x_5, x_6, x_7, x_8, x_66);
|
||||
if (lean_obj_tag(x_77) == 0)
|
||||
{
|
||||
lean_object* x_76;
|
||||
x_76 = lean_ctor_get(x_75, 0);
|
||||
lean_inc(x_76);
|
||||
if (lean_obj_tag(x_76) == 0)
|
||||
{
|
||||
lean_object* x_77; lean_object* x_78;
|
||||
x_77 = lean_ctor_get(x_75, 1);
|
||||
lean_inc(x_77);
|
||||
lean_dec(x_75);
|
||||
lean_inc(x_8);
|
||||
lean_inc(x_7);
|
||||
lean_inc(x_6);
|
||||
lean_inc(x_5);
|
||||
x_78 = l_Lean_Meta_mkEqSymm(x_2, x_5, x_6, x_7, x_8, x_77);
|
||||
if (lean_obj_tag(x_78) == 0)
|
||||
{
|
||||
lean_object* x_79; lean_object* x_80; lean_object* x_81; lean_object* x_82;
|
||||
lean_object* x_78; lean_object* x_79;
|
||||
x_78 = lean_ctor_get(x_77, 0);
|
||||
lean_inc(x_78);
|
||||
x_79 = lean_ctor_get(x_78, 0);
|
||||
lean_inc(x_79);
|
||||
x_80 = lean_ctor_get(x_78, 1);
|
||||
lean_inc(x_80);
|
||||
lean_dec(x_78);
|
||||
x_81 = l_Lean_Expr_appFn_x21(x_50);
|
||||
if (lean_obj_tag(x_79) == 0)
|
||||
{
|
||||
lean_object* x_80; lean_object* x_81;
|
||||
x_80 = lean_ctor_get(x_77, 1);
|
||||
lean_inc(x_80);
|
||||
lean_dec(x_77);
|
||||
lean_inc(x_8);
|
||||
lean_inc(x_7);
|
||||
lean_inc(x_6);
|
||||
lean_inc(x_5);
|
||||
x_82 = l_Lean_Meta_mkCongrArg(x_81, x_79, x_5, x_6, x_7, x_8, x_80);
|
||||
if (lean_obj_tag(x_82) == 0)
|
||||
x_81 = l_Lean_Meta_mkEqSymm(x_2, x_5, x_6, x_7, x_8, x_80);
|
||||
if (lean_obj_tag(x_81) == 0)
|
||||
{
|
||||
lean_object* x_83; lean_object* x_84; lean_object* x_85; lean_object* x_86; lean_object* x_87; lean_object* x_88; lean_object* x_89;
|
||||
x_83 = lean_ctor_get(x_82, 0);
|
||||
lean_object* x_82; lean_object* x_83; lean_object* x_84; lean_object* x_85;
|
||||
x_82 = lean_ctor_get(x_81, 0);
|
||||
lean_inc(x_82);
|
||||
x_83 = lean_ctor_get(x_81, 1);
|
||||
lean_inc(x_83);
|
||||
x_84 = lean_ctor_get(x_82, 1);
|
||||
lean_inc(x_84);
|
||||
lean_dec(x_82);
|
||||
x_85 = l_Lean_MVarId_acyclic_go___closed__28;
|
||||
x_86 = lean_array_push(x_85, x_61);
|
||||
x_87 = lean_array_push(x_86, x_83);
|
||||
x_88 = l_Lean_MVarId_acyclic_go___closed__27;
|
||||
lean_dec(x_81);
|
||||
x_84 = l_Lean_Expr_appFn_x21(x_50);
|
||||
lean_inc(x_8);
|
||||
lean_inc(x_7);
|
||||
lean_inc(x_6);
|
||||
lean_inc(x_5);
|
||||
x_89 = l_Lean_Meta_mkAppM(x_88, x_87, x_5, x_6, x_7, x_8, x_84);
|
||||
if (lean_obj_tag(x_89) == 0)
|
||||
x_85 = l_Lean_Meta_mkCongrArg(x_84, x_82, x_5, x_6, x_7, x_8, x_83);
|
||||
if (lean_obj_tag(x_85) == 0)
|
||||
{
|
||||
lean_object* x_90; lean_object* x_91; lean_object* x_92; lean_object* x_93; lean_object* x_94;
|
||||
x_90 = lean_ctor_get(x_89, 0);
|
||||
lean_inc(x_90);
|
||||
x_91 = lean_ctor_get(x_89, 1);
|
||||
lean_inc(x_91);
|
||||
lean_dec(x_89);
|
||||
x_92 = lean_array_push(x_46, x_50);
|
||||
x_93 = l_Lean_MVarId_acyclic_go___closed__30;
|
||||
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;
|
||||
x_86 = lean_ctor_get(x_85, 0);
|
||||
lean_inc(x_86);
|
||||
x_87 = lean_ctor_get(x_85, 1);
|
||||
lean_inc(x_87);
|
||||
lean_dec(x_85);
|
||||
x_88 = l_Lean_MVarId_acyclic_go___closed__28;
|
||||
x_89 = lean_array_push(x_88, x_61);
|
||||
x_90 = lean_array_push(x_89, x_86);
|
||||
x_91 = l_Lean_MVarId_acyclic_go___closed__27;
|
||||
lean_inc(x_8);
|
||||
lean_inc(x_7);
|
||||
lean_inc(x_6);
|
||||
lean_inc(x_5);
|
||||
x_94 = l_Lean_Meta_mkAppM(x_93, x_92, x_5, x_6, x_7, x_8, x_91);
|
||||
if (lean_obj_tag(x_94) == 0)
|
||||
x_92 = l_Lean_Meta_mkAppM(x_91, x_90, x_5, x_6, x_7, x_8, x_87);
|
||||
if (lean_obj_tag(x_92) == 0)
|
||||
{
|
||||
lean_object* x_95; lean_object* x_96; lean_object* x_97;
|
||||
x_95 = lean_ctor_get(x_94, 0);
|
||||
lean_inc(x_95);
|
||||
x_96 = lean_ctor_get(x_94, 1);
|
||||
lean_inc(x_96);
|
||||
lean_dec(x_94);
|
||||
lean_inc(x_1);
|
||||
x_97 = l_Lean_MVarId_getType(x_1, x_5, x_6, x_7, x_8, x_96);
|
||||
lean_object* x_93; lean_object* x_94; lean_object* x_95; lean_object* x_96; lean_object* x_97;
|
||||
x_93 = lean_ctor_get(x_92, 0);
|
||||
lean_inc(x_93);
|
||||
x_94 = lean_ctor_get(x_92, 1);
|
||||
lean_inc(x_94);
|
||||
lean_dec(x_92);
|
||||
x_95 = lean_array_push(x_46, x_50);
|
||||
x_96 = l_Lean_MVarId_acyclic_go___closed__30;
|
||||
lean_inc(x_8);
|
||||
lean_inc(x_7);
|
||||
lean_inc(x_6);
|
||||
lean_inc(x_5);
|
||||
x_97 = l_Lean_Meta_mkAppM(x_96, x_95, x_5, x_6, x_7, x_8, x_94);
|
||||
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_98; lean_object* x_99; lean_object* x_100;
|
||||
x_98 = lean_ctor_get(x_97, 0);
|
||||
lean_inc(x_98);
|
||||
x_99 = lean_ctor_get(x_97, 1);
|
||||
lean_inc(x_99);
|
||||
lean_dec(x_97);
|
||||
x_100 = l_Lean_Expr_app___override(x_95, x_90);
|
||||
lean_inc(x_8);
|
||||
lean_inc(x_7);
|
||||
lean_inc(x_6);
|
||||
lean_inc(x_5);
|
||||
x_101 = l_Lean_Meta_mkFalseElim(x_98, x_100, x_5, x_6, x_7, x_8, x_99);
|
||||
if (lean_obj_tag(x_101) == 0)
|
||||
lean_inc(x_1);
|
||||
x_100 = l_Lean_MVarId_getType(x_1, x_5, x_6, x_7, x_8, x_99);
|
||||
if (lean_obj_tag(x_100) == 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; uint8_t x_111;
|
||||
x_102 = lean_ctor_get(x_101, 0);
|
||||
lean_object* x_101; lean_object* x_102; lean_object* x_103; lean_object* x_104;
|
||||
x_101 = lean_ctor_get(x_100, 0);
|
||||
lean_inc(x_101);
|
||||
x_102 = lean_ctor_get(x_100, 1);
|
||||
lean_inc(x_102);
|
||||
x_103 = lean_ctor_get(x_101, 1);
|
||||
lean_inc(x_103);
|
||||
lean_dec(x_101);
|
||||
x_104 = l_Lean_MVarId_assign___at_Lean_Meta_getLevel___spec__1(x_1, x_102, x_5, x_6, x_7, x_8, x_103);
|
||||
x_105 = lean_ctor_get(x_104, 1);
|
||||
lean_inc(x_105);
|
||||
lean_dec(x_104);
|
||||
x_106 = l_Lean_MVarId_acyclic_go___closed__6;
|
||||
x_107 = l_Lean_isTracingEnabledFor___at_Lean_Meta_processPostponed_loop___spec__1(x_106, x_5, x_6, x_7, x_8, x_105);
|
||||
x_108 = lean_ctor_get(x_107, 0);
|
||||
lean_inc(x_108);
|
||||
x_109 = lean_ctor_get(x_107, 1);
|
||||
lean_inc(x_109);
|
||||
lean_dec(x_107);
|
||||
x_110 = l_Lean_MVarId_acyclic_go___closed__31;
|
||||
x_111 = lean_unbox(x_108);
|
||||
lean_dec(x_108);
|
||||
if (x_111 == 0)
|
||||
{
|
||||
lean_object* x_112; lean_object* x_113;
|
||||
x_112 = lean_box(0);
|
||||
lean_dec(x_100);
|
||||
x_103 = l_Lean_Expr_app___override(x_98, x_93);
|
||||
lean_inc(x_8);
|
||||
lean_inc(x_7);
|
||||
lean_inc(x_6);
|
||||
lean_inc(x_5);
|
||||
x_113 = lean_apply_6(x_110, x_112, x_5, x_6, x_7, x_8, x_109);
|
||||
if (lean_obj_tag(x_113) == 0)
|
||||
x_104 = l_Lean_Meta_mkFalseElim(x_101, x_103, x_5, x_6, x_7, x_8, x_102);
|
||||
if (lean_obj_tag(x_104) == 0)
|
||||
{
|
||||
uint8_t x_114;
|
||||
lean_dec(x_8);
|
||||
lean_dec(x_7);
|
||||
lean_dec(x_6);
|
||||
lean_dec(x_5);
|
||||
x_114 = !lean_is_exclusive(x_113);
|
||||
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; uint8_t x_114;
|
||||
x_105 = lean_ctor_get(x_104, 0);
|
||||
lean_inc(x_105);
|
||||
x_106 = lean_ctor_get(x_104, 1);
|
||||
lean_inc(x_106);
|
||||
lean_dec(x_104);
|
||||
x_107 = l_Lean_MVarId_assign___at_Lean_Meta_getLevel___spec__1(x_1, x_105, x_5, x_6, x_7, x_8, x_106);
|
||||
x_108 = lean_ctor_get(x_107, 1);
|
||||
lean_inc(x_108);
|
||||
lean_dec(x_107);
|
||||
x_109 = l_Lean_MVarId_acyclic_go___closed__6;
|
||||
x_110 = l_Lean_isTracingEnabledFor___at_Lean_Meta_processPostponed_loop___spec__1(x_109, x_5, x_6, x_7, x_8, x_108);
|
||||
x_111 = lean_ctor_get(x_110, 0);
|
||||
lean_inc(x_111);
|
||||
x_112 = lean_ctor_get(x_110, 1);
|
||||
lean_inc(x_112);
|
||||
lean_dec(x_110);
|
||||
x_113 = l_Lean_MVarId_acyclic_go___closed__31;
|
||||
x_114 = lean_unbox(x_111);
|
||||
lean_dec(x_111);
|
||||
if (x_114 == 0)
|
||||
{
|
||||
return x_113;
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_115; lean_object* x_116; lean_object* x_117;
|
||||
x_115 = lean_ctor_get(x_113, 0);
|
||||
x_116 = lean_ctor_get(x_113, 1);
|
||||
lean_inc(x_116);
|
||||
lean_inc(x_115);
|
||||
lean_dec(x_113);
|
||||
x_117 = lean_alloc_ctor(0, 2, 0);
|
||||
lean_ctor_set(x_117, 0, x_115);
|
||||
lean_ctor_set(x_117, 1, x_116);
|
||||
return x_117;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_118; lean_object* x_119;
|
||||
x_118 = lean_ctor_get(x_113, 0);
|
||||
lean_inc(x_118);
|
||||
x_119 = lean_ctor_get(x_113, 1);
|
||||
lean_inc(x_119);
|
||||
lean_dec(x_113);
|
||||
x_10 = x_118;
|
||||
x_11 = x_119;
|
||||
goto block_45;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_120; lean_object* x_121; lean_object* x_122; lean_object* x_123; lean_object* x_124;
|
||||
x_120 = l_Lean_MVarId_acyclic_go___closed__33;
|
||||
x_121 = l_Lean_addTrace___at_Lean_Meta_processPostponed_loop___spec__2(x_106, x_120, x_5, x_6, x_7, x_8, x_109);
|
||||
x_122 = lean_ctor_get(x_121, 0);
|
||||
lean_inc(x_122);
|
||||
x_123 = lean_ctor_get(x_121, 1);
|
||||
lean_inc(x_123);
|
||||
lean_dec(x_121);
|
||||
lean_object* x_115; lean_object* x_116;
|
||||
x_115 = lean_box(0);
|
||||
lean_inc(x_8);
|
||||
lean_inc(x_7);
|
||||
lean_inc(x_6);
|
||||
lean_inc(x_5);
|
||||
x_124 = lean_apply_6(x_110, x_122, x_5, x_6, x_7, x_8, x_123);
|
||||
if (lean_obj_tag(x_124) == 0)
|
||||
x_116 = lean_apply_6(x_113, x_115, x_5, x_6, x_7, x_8, x_112);
|
||||
if (lean_obj_tag(x_116) == 0)
|
||||
{
|
||||
uint8_t x_125;
|
||||
uint8_t x_117;
|
||||
lean_dec(x_8);
|
||||
lean_dec(x_7);
|
||||
lean_dec(x_6);
|
||||
lean_dec(x_5);
|
||||
x_125 = !lean_is_exclusive(x_124);
|
||||
if (x_125 == 0)
|
||||
x_117 = !lean_is_exclusive(x_116);
|
||||
if (x_117 == 0)
|
||||
{
|
||||
return x_124;
|
||||
return x_116;
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_126; lean_object* x_127; lean_object* x_128;
|
||||
x_126 = lean_ctor_get(x_124, 0);
|
||||
x_127 = lean_ctor_get(x_124, 1);
|
||||
lean_inc(x_127);
|
||||
lean_object* x_118; lean_object* x_119; lean_object* x_120;
|
||||
x_118 = lean_ctor_get(x_116, 0);
|
||||
x_119 = lean_ctor_get(x_116, 1);
|
||||
lean_inc(x_119);
|
||||
lean_inc(x_118);
|
||||
lean_dec(x_116);
|
||||
x_120 = lean_alloc_ctor(0, 2, 0);
|
||||
lean_ctor_set(x_120, 0, x_118);
|
||||
lean_ctor_set(x_120, 1, x_119);
|
||||
return x_120;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_121; lean_object* x_122;
|
||||
x_121 = lean_ctor_get(x_116, 0);
|
||||
lean_inc(x_121);
|
||||
x_122 = lean_ctor_get(x_116, 1);
|
||||
lean_inc(x_122);
|
||||
lean_dec(x_116);
|
||||
x_10 = x_121;
|
||||
x_11 = x_122;
|
||||
goto block_45;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_123; lean_object* x_124; lean_object* x_125; lean_object* x_126; lean_object* x_127;
|
||||
x_123 = l_Lean_MVarId_acyclic_go___closed__33;
|
||||
x_124 = l_Lean_addTrace___at_Lean_Meta_processPostponed_loop___spec__2(x_109, x_123, x_5, x_6, x_7, x_8, x_112);
|
||||
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_128 = lean_alloc_ctor(0, 2, 0);
|
||||
lean_ctor_set(x_128, 0, x_126);
|
||||
lean_ctor_set(x_128, 1, x_127);
|
||||
return x_128;
|
||||
}
|
||||
lean_inc(x_8);
|
||||
lean_inc(x_7);
|
||||
lean_inc(x_6);
|
||||
lean_inc(x_5);
|
||||
x_127 = lean_apply_6(x_113, x_125, x_5, x_6, x_7, x_8, x_126);
|
||||
if (lean_obj_tag(x_127) == 0)
|
||||
{
|
||||
uint8_t x_128;
|
||||
lean_dec(x_8);
|
||||
lean_dec(x_7);
|
||||
lean_dec(x_6);
|
||||
lean_dec(x_5);
|
||||
x_128 = !lean_is_exclusive(x_127);
|
||||
if (x_128 == 0)
|
||||
{
|
||||
return x_127;
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_129; lean_object* x_130;
|
||||
x_129 = lean_ctor_get(x_124, 0);
|
||||
lean_inc(x_129);
|
||||
x_130 = lean_ctor_get(x_124, 1);
|
||||
lean_object* x_129; lean_object* x_130; lean_object* x_131;
|
||||
x_129 = lean_ctor_get(x_127, 0);
|
||||
x_130 = lean_ctor_get(x_127, 1);
|
||||
lean_inc(x_130);
|
||||
lean_dec(x_124);
|
||||
x_10 = x_129;
|
||||
x_11 = x_130;
|
||||
goto block_45;
|
||||
}
|
||||
lean_inc(x_129);
|
||||
lean_dec(x_127);
|
||||
x_131 = lean_alloc_ctor(0, 2, 0);
|
||||
lean_ctor_set(x_131, 0, x_129);
|
||||
lean_ctor_set(x_131, 1, x_130);
|
||||
return x_131;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_131; lean_object* x_132;
|
||||
lean_dec(x_1);
|
||||
x_131 = lean_ctor_get(x_101, 0);
|
||||
lean_inc(x_131);
|
||||
x_132 = lean_ctor_get(x_101, 1);
|
||||
lean_object* x_132; lean_object* x_133;
|
||||
x_132 = lean_ctor_get(x_127, 0);
|
||||
lean_inc(x_132);
|
||||
lean_dec(x_101);
|
||||
x_10 = x_131;
|
||||
x_11 = x_132;
|
||||
goto block_45;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_133; lean_object* x_134;
|
||||
lean_dec(x_95);
|
||||
lean_dec(x_90);
|
||||
lean_dec(x_1);
|
||||
x_133 = lean_ctor_get(x_97, 0);
|
||||
x_133 = lean_ctor_get(x_127, 1);
|
||||
lean_inc(x_133);
|
||||
x_134 = lean_ctor_get(x_97, 1);
|
||||
lean_dec(x_127);
|
||||
x_10 = x_132;
|
||||
x_11 = x_133;
|
||||
goto block_45;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_134; lean_object* x_135;
|
||||
lean_dec(x_1);
|
||||
x_134 = lean_ctor_get(x_104, 0);
|
||||
lean_inc(x_134);
|
||||
lean_dec(x_97);
|
||||
x_10 = x_133;
|
||||
x_11 = x_134;
|
||||
goto block_45;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_135; lean_object* x_136;
|
||||
lean_dec(x_90);
|
||||
lean_dec(x_1);
|
||||
x_135 = lean_ctor_get(x_94, 0);
|
||||
x_135 = lean_ctor_get(x_104, 1);
|
||||
lean_inc(x_135);
|
||||
x_136 = lean_ctor_get(x_94, 1);
|
||||
lean_dec(x_104);
|
||||
x_10 = x_134;
|
||||
x_11 = x_135;
|
||||
goto block_45;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_136; lean_object* x_137;
|
||||
lean_dec(x_98);
|
||||
lean_dec(x_93);
|
||||
lean_dec(x_1);
|
||||
x_136 = lean_ctor_get(x_100, 0);
|
||||
lean_inc(x_136);
|
||||
lean_dec(x_94);
|
||||
x_10 = x_135;
|
||||
x_11 = x_136;
|
||||
goto block_45;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_137; lean_object* x_138;
|
||||
lean_dec(x_50);
|
||||
lean_dec(x_1);
|
||||
x_137 = lean_ctor_get(x_89, 0);
|
||||
x_137 = lean_ctor_get(x_100, 1);
|
||||
lean_inc(x_137);
|
||||
x_138 = lean_ctor_get(x_89, 1);
|
||||
lean_dec(x_100);
|
||||
x_10 = x_136;
|
||||
x_11 = x_137;
|
||||
goto block_45;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_138; lean_object* x_139;
|
||||
lean_dec(x_93);
|
||||
lean_dec(x_1);
|
||||
x_138 = lean_ctor_get(x_97, 0);
|
||||
lean_inc(x_138);
|
||||
lean_dec(x_89);
|
||||
x_10 = x_137;
|
||||
x_11 = x_138;
|
||||
goto block_45;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_139; lean_object* x_140;
|
||||
lean_dec(x_61);
|
||||
lean_dec(x_50);
|
||||
lean_dec(x_1);
|
||||
x_139 = lean_ctor_get(x_82, 0);
|
||||
x_139 = lean_ctor_get(x_97, 1);
|
||||
lean_inc(x_139);
|
||||
x_140 = lean_ctor_get(x_82, 1);
|
||||
lean_inc(x_140);
|
||||
lean_dec(x_82);
|
||||
x_10 = x_139;
|
||||
x_11 = x_140;
|
||||
lean_dec(x_97);
|
||||
x_10 = x_138;
|
||||
x_11 = x_139;
|
||||
goto block_45;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_141; lean_object* x_142;
|
||||
lean_object* x_140; lean_object* x_141;
|
||||
lean_dec(x_50);
|
||||
lean_dec(x_1);
|
||||
x_140 = lean_ctor_get(x_92, 0);
|
||||
lean_inc(x_140);
|
||||
x_141 = lean_ctor_get(x_92, 1);
|
||||
lean_inc(x_141);
|
||||
lean_dec(x_92);
|
||||
x_10 = x_140;
|
||||
x_11 = x_141;
|
||||
goto block_45;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_142; lean_object* x_143;
|
||||
lean_dec(x_61);
|
||||
lean_dec(x_50);
|
||||
lean_dec(x_1);
|
||||
x_141 = lean_ctor_get(x_78, 0);
|
||||
lean_inc(x_141);
|
||||
x_142 = lean_ctor_get(x_78, 1);
|
||||
x_142 = lean_ctor_get(x_85, 0);
|
||||
lean_inc(x_142);
|
||||
lean_dec(x_78);
|
||||
x_10 = x_141;
|
||||
x_11 = x_142;
|
||||
x_143 = lean_ctor_get(x_85, 1);
|
||||
lean_inc(x_143);
|
||||
lean_dec(x_85);
|
||||
x_10 = x_142;
|
||||
x_11 = x_143;
|
||||
goto block_45;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
uint8_t x_143;
|
||||
lean_dec(x_76);
|
||||
lean_object* x_144; lean_object* x_145;
|
||||
lean_dec(x_61);
|
||||
lean_dec(x_50);
|
||||
lean_dec(x_1);
|
||||
x_144 = lean_ctor_get(x_81, 0);
|
||||
lean_inc(x_144);
|
||||
x_145 = lean_ctor_get(x_81, 1);
|
||||
lean_inc(x_145);
|
||||
lean_dec(x_81);
|
||||
x_10 = x_144;
|
||||
x_11 = x_145;
|
||||
goto block_45;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
uint8_t x_146;
|
||||
lean_dec(x_79);
|
||||
lean_dec(x_61);
|
||||
lean_dec(x_50);
|
||||
lean_dec(x_8);
|
||||
|
|
@ -952,94 +959,94 @@ lean_dec(x_6);
|
|||
lean_dec(x_5);
|
||||
lean_dec(x_2);
|
||||
lean_dec(x_1);
|
||||
x_143 = !lean_is_exclusive(x_75);
|
||||
if (x_143 == 0)
|
||||
x_146 = !lean_is_exclusive(x_77);
|
||||
if (x_146 == 0)
|
||||
{
|
||||
lean_object* x_144; uint8_t x_145; lean_object* x_146;
|
||||
x_144 = lean_ctor_get(x_75, 0);
|
||||
lean_dec(x_144);
|
||||
x_145 = 0;
|
||||
x_146 = lean_box(x_145);
|
||||
lean_ctor_set(x_75, 0, x_146);
|
||||
return x_75;
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_147; uint8_t x_148; lean_object* x_149; lean_object* x_150;
|
||||
x_147 = lean_ctor_get(x_75, 1);
|
||||
lean_inc(x_147);
|
||||
lean_dec(x_75);
|
||||
lean_object* x_147; uint8_t x_148; lean_object* x_149;
|
||||
x_147 = lean_ctor_get(x_77, 0);
|
||||
lean_dec(x_147);
|
||||
x_148 = 0;
|
||||
x_149 = lean_box(x_148);
|
||||
x_150 = lean_alloc_ctor(0, 2, 0);
|
||||
lean_ctor_set(x_150, 0, x_149);
|
||||
lean_ctor_set(x_150, 1, x_147);
|
||||
return x_150;
|
||||
lean_ctor_set(x_77, 0, x_149);
|
||||
return x_77;
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_150; uint8_t x_151; lean_object* x_152; lean_object* x_153;
|
||||
x_150 = lean_ctor_get(x_77, 1);
|
||||
lean_inc(x_150);
|
||||
lean_dec(x_77);
|
||||
x_151 = 0;
|
||||
x_152 = lean_box(x_151);
|
||||
x_153 = lean_alloc_ctor(0, 2, 0);
|
||||
lean_ctor_set(x_153, 0, x_152);
|
||||
lean_ctor_set(x_153, 1, x_150);
|
||||
return x_153;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_151; lean_object* x_152;
|
||||
lean_object* x_154; lean_object* x_155;
|
||||
lean_dec(x_61);
|
||||
lean_dec(x_50);
|
||||
lean_dec(x_2);
|
||||
lean_dec(x_1);
|
||||
x_151 = lean_ctor_get(x_75, 0);
|
||||
lean_inc(x_151);
|
||||
x_152 = lean_ctor_get(x_75, 1);
|
||||
lean_inc(x_152);
|
||||
lean_dec(x_75);
|
||||
x_10 = x_151;
|
||||
x_11 = x_152;
|
||||
goto block_45;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_153; lean_object* x_154;
|
||||
lean_dec(x_50);
|
||||
lean_dec(x_2);
|
||||
lean_dec(x_1);
|
||||
x_153 = lean_ctor_get(x_56, 0);
|
||||
lean_inc(x_153);
|
||||
x_154 = lean_ctor_get(x_56, 1);
|
||||
x_154 = lean_ctor_get(x_77, 0);
|
||||
lean_inc(x_154);
|
||||
lean_dec(x_56);
|
||||
x_10 = x_153;
|
||||
x_11 = x_154;
|
||||
x_155 = lean_ctor_get(x_77, 1);
|
||||
lean_inc(x_155);
|
||||
lean_dec(x_77);
|
||||
x_10 = x_154;
|
||||
x_11 = x_155;
|
||||
goto block_45;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_155; lean_object* x_156;
|
||||
lean_object* x_156; lean_object* x_157;
|
||||
lean_dec(x_50);
|
||||
lean_dec(x_2);
|
||||
lean_dec(x_1);
|
||||
x_155 = lean_ctor_get(x_53, 0);
|
||||
lean_inc(x_155);
|
||||
x_156 = lean_ctor_get(x_53, 1);
|
||||
x_156 = lean_ctor_get(x_56, 0);
|
||||
lean_inc(x_156);
|
||||
lean_dec(x_53);
|
||||
x_10 = x_155;
|
||||
x_11 = x_156;
|
||||
x_157 = lean_ctor_get(x_56, 1);
|
||||
lean_inc(x_157);
|
||||
lean_dec(x_56);
|
||||
x_10 = x_156;
|
||||
x_11 = x_157;
|
||||
goto block_45;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_157; lean_object* x_158;
|
||||
lean_object* x_158; lean_object* x_159;
|
||||
lean_dec(x_50);
|
||||
lean_dec(x_2);
|
||||
lean_dec(x_1);
|
||||
x_158 = lean_ctor_get(x_53, 0);
|
||||
lean_inc(x_158);
|
||||
x_159 = lean_ctor_get(x_53, 1);
|
||||
lean_inc(x_159);
|
||||
lean_dec(x_53);
|
||||
x_10 = x_158;
|
||||
x_11 = x_159;
|
||||
goto block_45;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_160; lean_object* x_161;
|
||||
lean_dec(x_4);
|
||||
lean_dec(x_2);
|
||||
lean_dec(x_1);
|
||||
x_157 = lean_ctor_get(x_49, 0);
|
||||
lean_inc(x_157);
|
||||
x_158 = lean_ctor_get(x_49, 1);
|
||||
lean_inc(x_158);
|
||||
x_160 = lean_ctor_get(x_49, 0);
|
||||
lean_inc(x_160);
|
||||
x_161 = lean_ctor_get(x_49, 1);
|
||||
lean_inc(x_161);
|
||||
lean_dec(x_49);
|
||||
x_10 = x_157;
|
||||
x_11 = x_158;
|
||||
x_10 = x_160;
|
||||
x_11 = x_161;
|
||||
goto block_45;
|
||||
}
|
||||
block_45:
|
||||
|
|
@ -1619,7 +1626,7 @@ lean_dec(x_1);
|
|||
return x_10;
|
||||
}
|
||||
}
|
||||
LEAN_EXPORT lean_object* l_Lean_MVarId_initFn____x40_Lean_Meta_Tactic_Acyclic___hyg_868_(lean_object* x_1) {
|
||||
LEAN_EXPORT lean_object* l_Lean_MVarId_initFn____x40_Lean_Meta_Tactic_Acyclic___hyg_869_(lean_object* x_1) {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_2; uint8_t x_3; lean_object* x_4;
|
||||
|
|
@ -1720,7 +1727,7 @@ l_Lean_MVarId_acyclic___lambda__2___closed__1 = _init_l_Lean_MVarId_acyclic___la
|
|||
lean_mark_persistent(l_Lean_MVarId_acyclic___lambda__2___closed__1);
|
||||
l_Lean_MVarId_acyclic___lambda__2___closed__2 = _init_l_Lean_MVarId_acyclic___lambda__2___closed__2();
|
||||
lean_mark_persistent(l_Lean_MVarId_acyclic___lambda__2___closed__2);
|
||||
res = l_Lean_MVarId_initFn____x40_Lean_Meta_Tactic_Acyclic___hyg_868_(lean_io_mk_world());
|
||||
res = l_Lean_MVarId_initFn____x40_Lean_Meta_Tactic_Acyclic___hyg_869_(lean_io_mk_world());
|
||||
if (lean_io_result_is_error(res)) return res;
|
||||
lean_dec_ref(res);
|
||||
return lean_io_result_mk_ok(lean_box(0));
|
||||
|
|
|
|||
15787
stage0/stdlib/Lean/Meta/Tactic/Simp/Main.c
generated
15787
stage0/stdlib/Lean/Meta/Tactic/Simp/Main.c
generated
File diff suppressed because it is too large
Load diff
618
stage0/stdlib/Lean/Meta/Tactic/Simp/Rewrite.c
generated
618
stage0/stdlib/Lean/Meta/Tactic/Simp/Rewrite.c
generated
|
|
@ -14,7 +14,7 @@
|
|||
extern "C" {
|
||||
#endif
|
||||
static lean_object* l___private_Lean_Meta_Tactic_Simp_Rewrite_0__Lean_Meta_Simp_tryTheoremCore_go___lambda__3___closed__6;
|
||||
LEAN_EXPORT lean_object* l___private_Lean_Meta_Tactic_Simp_Rewrite_0__Lean_Meta_Simp_tryTheoremCore_go___lambda__2___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
LEAN_EXPORT lean_object* l___private_Lean_Meta_Tactic_Simp_Rewrite_0__Lean_Meta_Simp_tryTheoremCore_go___lambda__2___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
static lean_object* l_Lean_isLevelMVarAssignable___at___private_Lean_Meta_Tactic_Simp_Rewrite_0__Lean_Meta_Simp_tryTheoremCore_go___spec__4___closed__4;
|
||||
static lean_object* l_Lean_Meta_Simp_rewriteCtorEq_x3f___lambda__1___closed__2;
|
||||
static lean_object* l_Lean_Meta_Simp_rewrite_x3f___closed__5;
|
||||
|
|
@ -49,7 +49,6 @@ LEAN_EXPORT lean_object* l_Lean_Meta_Simp_rewrite_x3f___lambda__1___boxed(lean_o
|
|||
lean_object* lean_array_fswap(lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Array_extract___rarg(lean_object*, lean_object*, lean_object*);
|
||||
static lean_object* l_panic___at___private_Lean_Meta_Tactic_Simp_Rewrite_0__Lean_Meta_Simp_tryTheoremCore_go___spec__5___closed__2;
|
||||
lean_object* l_Lean_Meta_SimpTheorem_getName(lean_object*);
|
||||
static lean_object* l_Lean_Meta_Simp_rewrite_x3f___closed__2;
|
||||
LEAN_EXPORT lean_object* l_Lean_Meta_Simp_tryTheoremWithExtraArgs_x3f___lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
LEAN_EXPORT lean_object* l_Lean_Meta_Simp_synthesizeArgs_synthesizeInstance___lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
|
|
@ -197,7 +196,7 @@ static lean_object* l_Lean_Meta_Simp_rewriteUsingDecide_x3f___closed__12;
|
|||
static lean_object* l_Array_forInUnsafe_loop___at_Lean_Meta_Simp_rewritePre___spec__1___closed__1;
|
||||
LEAN_EXPORT lean_object* l_Lean_instantiateMVars___at_Lean_Meta_Simp_synthesizeArgs___spec__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
static lean_object* l_Lean_Meta_Simp_synthesizeArgs_synthesizeInstance___closed__6;
|
||||
LEAN_EXPORT lean_object* l___private_Lean_Meta_Tactic_Simp_Rewrite_0__Lean_Meta_Simp_tryTheoremCore_go___lambda__2(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
LEAN_EXPORT lean_object* l___private_Lean_Meta_Tactic_Simp_Rewrite_0__Lean_Meta_Simp_tryTheoremCore_go___lambda__2(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
LEAN_EXPORT lean_object* l_Array_forInUnsafe_loop___at_Lean_Meta_Simp_rewrite_x3f___spec__3___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
LEAN_EXPORT lean_object* l_Lean_Meta_Simp_andThen(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
static lean_object* l_Lean_Meta_Simp_rewriteCtorEq_x3f___closed__1;
|
||||
|
|
@ -269,6 +268,7 @@ lean_object* lean_mk_array(lean_object*, lean_object*);
|
|||
LEAN_EXPORT lean_object* l_Lean_MVarId_isAssignable___at___private_Lean_Meta_Tactic_Simp_Rewrite_0__Lean_Meta_Simp_tryTheoremCore_go___spec__2___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
LEAN_EXPORT lean_object* l_Array_forInUnsafe_loop___at_Lean_Meta_Simp_simpMatchCore_x3f___spec__1(lean_object*, lean_object*, lean_object*, lean_object*, size_t, size_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
static lean_object* l___private_Lean_Meta_Tactic_Simp_Rewrite_0__Lean_Meta_Simp_tryTheoremCore_go___lambda__3___closed__2;
|
||||
lean_object* l_Lean_Meta_Simp_recordSimpTheorem(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_ReaderT_instMonadReaderT___rarg(lean_object*);
|
||||
lean_object* l_Lean_Meta_Simp_Step_updateResult(lean_object*, lean_object*);
|
||||
static lean_object* l_Array_forInUnsafe_loop___at_Lean_Meta_Simp_rewrite_x3f___spec__3___closed__5;
|
||||
|
|
@ -5930,21 +5930,45 @@ lean_ctor_set(x_10, 1, x_8);
|
|||
return x_10;
|
||||
}
|
||||
}
|
||||
LEAN_EXPORT lean_object* l___private_Lean_Meta_Tactic_Simp_Rewrite_0__Lean_Meta_Simp_tryTheoremCore_go___lambda__2(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9, lean_object* x_10) {
|
||||
LEAN_EXPORT lean_object* l___private_Lean_Meta_Tactic_Simp_Rewrite_0__Lean_Meta_Simp_tryTheoremCore_go___lambda__2(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9, lean_object* x_10, lean_object* x_11) {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14;
|
||||
x_11 = lean_unsigned_to_nat(0u);
|
||||
x_12 = lean_alloc_ctor(0, 3, 0);
|
||||
lean_ctor_set(x_12, 0, x_1);
|
||||
lean_ctor_set(x_12, 1, x_2);
|
||||
lean_ctor_set(x_12, 2, x_11);
|
||||
x_13 = lean_alloc_ctor(1, 1, 0);
|
||||
lean_ctor_set(x_13, 0, x_12);
|
||||
x_14 = lean_alloc_ctor(0, 2, 0);
|
||||
lean_ctor_set(x_14, 0, x_13);
|
||||
lean_ctor_set(x_14, 1, x_10);
|
||||
return x_14;
|
||||
lean_object* x_12; uint8_t x_13;
|
||||
x_12 = l_Lean_Meta_Simp_recordSimpTheorem(x_1, x_5, x_6, x_7, x_8, x_9, x_10, x_11);
|
||||
x_13 = !lean_is_exclusive(x_12);
|
||||
if (x_13 == 0)
|
||||
{
|
||||
lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17;
|
||||
x_14 = lean_ctor_get(x_12, 0);
|
||||
lean_dec(x_14);
|
||||
x_15 = lean_unsigned_to_nat(0u);
|
||||
x_16 = lean_alloc_ctor(0, 3, 0);
|
||||
lean_ctor_set(x_16, 0, x_2);
|
||||
lean_ctor_set(x_16, 1, x_3);
|
||||
lean_ctor_set(x_16, 2, x_15);
|
||||
x_17 = lean_alloc_ctor(1, 1, 0);
|
||||
lean_ctor_set(x_17, 0, x_16);
|
||||
lean_ctor_set(x_12, 0, x_17);
|
||||
return x_12;
|
||||
}
|
||||
else
|
||||
{
|
||||
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_12, 1);
|
||||
lean_inc(x_18);
|
||||
lean_dec(x_12);
|
||||
x_19 = lean_unsigned_to_nat(0u);
|
||||
x_20 = lean_alloc_ctor(0, 3, 0);
|
||||
lean_ctor_set(x_20, 0, x_2);
|
||||
lean_ctor_set(x_20, 1, x_3);
|
||||
lean_ctor_set(x_20, 2, x_19);
|
||||
x_21 = lean_alloc_ctor(1, 1, 0);
|
||||
lean_ctor_set(x_21, 0, x_20);
|
||||
x_22 = lean_alloc_ctor(0, 2, 0);
|
||||
lean_ctor_set(x_22, 0, x_21);
|
||||
lean_ctor_set(x_22, 1, x_18);
|
||||
return x_22;
|
||||
}
|
||||
}
|
||||
}
|
||||
static lean_object* _init_l___private_Lean_Meta_Tactic_Simp_Rewrite_0__Lean_Meta_Simp_tryTheoremCore_go___lambda__3___closed__1() {
|
||||
|
|
@ -6060,13 +6084,13 @@ if (x_17 == 0)
|
|||
lean_object* x_18; lean_object* x_19; lean_object* x_20;
|
||||
lean_dec(x_5);
|
||||
lean_dec(x_4);
|
||||
lean_dec(x_3);
|
||||
x_18 = lean_ctor_get(x_15, 1);
|
||||
lean_inc(x_18);
|
||||
lean_dec(x_15);
|
||||
x_19 = lean_box(0);
|
||||
x_20 = l___private_Lean_Meta_Tactic_Simp_Rewrite_0__Lean_Meta_Simp_tryTheoremCore_go___lambda__2(x_1, x_2, x_19, x_7, x_8, x_9, x_10, x_11, x_12, x_18);
|
||||
lean_dec(x_10);
|
||||
x_20 = l___private_Lean_Meta_Tactic_Simp_Rewrite_0__Lean_Meta_Simp_tryTheoremCore_go___lambda__2(x_1, x_2, x_3, x_19, x_7, x_8, x_9, x_10, x_11, x_12, x_18);
|
||||
lean_dec(x_11);
|
||||
lean_dec(x_9);
|
||||
lean_dec(x_7);
|
||||
return x_20;
|
||||
}
|
||||
|
|
@ -6076,14 +6100,15 @@ lean_object* x_21; uint8_t x_22; uint8_t x_23; lean_object* x_24; lean_object* x
|
|||
x_21 = lean_ctor_get(x_15, 1);
|
||||
lean_inc(x_21);
|
||||
lean_dec(x_15);
|
||||
x_22 = lean_ctor_get_uint8(x_3, sizeof(void*)*5 + 1);
|
||||
x_22 = lean_ctor_get_uint8(x_4, sizeof(void*)*5 + 1);
|
||||
x_23 = 1;
|
||||
x_24 = l_Lean_Name_toString(x_4, x_23);
|
||||
lean_inc(x_1);
|
||||
x_24 = l_Lean_Name_toString(x_1, x_23);
|
||||
x_25 = lean_alloc_ctor(2, 1, 0);
|
||||
lean_ctor_set(x_25, 0, x_24);
|
||||
x_26 = lean_ctor_get(x_3, 3);
|
||||
x_26 = lean_ctor_get(x_4, 3);
|
||||
lean_inc(x_26);
|
||||
lean_dec(x_3);
|
||||
lean_dec(x_4);
|
||||
x_27 = l_Nat_repr(x_26);
|
||||
x_28 = lean_alloc_ctor(2, 1, 0);
|
||||
lean_ctor_set(x_28, 0, x_27);
|
||||
|
|
@ -6100,9 +6125,9 @@ lean_ctor_set(x_33, 0, x_25);
|
|||
lean_ctor_set(x_33, 1, x_32);
|
||||
x_34 = lean_alloc_ctor(2, 1, 0);
|
||||
lean_ctor_set(x_34, 0, x_5);
|
||||
lean_inc(x_1);
|
||||
lean_inc(x_2);
|
||||
x_35 = lean_alloc_ctor(2, 1, 0);
|
||||
lean_ctor_set(x_35, 0, x_1);
|
||||
lean_ctor_set(x_35, 0, x_2);
|
||||
if (x_22 == 0)
|
||||
{
|
||||
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;
|
||||
|
|
@ -6138,8 +6163,9 @@ lean_inc(x_48);
|
|||
x_49 = lean_ctor_get(x_47, 1);
|
||||
lean_inc(x_49);
|
||||
lean_dec(x_47);
|
||||
x_50 = l___private_Lean_Meta_Tactic_Simp_Rewrite_0__Lean_Meta_Simp_tryTheoremCore_go___lambda__2(x_1, x_2, x_48, x_7, x_8, x_9, x_10, x_11, x_12, x_49);
|
||||
lean_dec(x_10);
|
||||
x_50 = l___private_Lean_Meta_Tactic_Simp_Rewrite_0__Lean_Meta_Simp_tryTheoremCore_go___lambda__2(x_1, x_2, x_3, x_48, x_7, x_8, x_9, x_10, x_11, x_12, x_49);
|
||||
lean_dec(x_11);
|
||||
lean_dec(x_9);
|
||||
lean_dec(x_7);
|
||||
lean_dec(x_48);
|
||||
return x_50;
|
||||
|
|
@ -6180,8 +6206,9 @@ lean_inc(x_64);
|
|||
x_65 = lean_ctor_get(x_63, 1);
|
||||
lean_inc(x_65);
|
||||
lean_dec(x_63);
|
||||
x_66 = l___private_Lean_Meta_Tactic_Simp_Rewrite_0__Lean_Meta_Simp_tryTheoremCore_go___lambda__2(x_1, x_2, x_64, x_7, x_8, x_9, x_10, x_11, x_12, x_65);
|
||||
lean_dec(x_10);
|
||||
x_66 = l___private_Lean_Meta_Tactic_Simp_Rewrite_0__Lean_Meta_Simp_tryTheoremCore_go___lambda__2(x_1, x_2, x_3, x_64, x_7, x_8, x_9, x_10, x_11, x_12, x_65);
|
||||
lean_dec(x_11);
|
||||
lean_dec(x_9);
|
||||
lean_dec(x_7);
|
||||
lean_dec(x_64);
|
||||
return x_66;
|
||||
|
|
@ -6219,15 +6246,14 @@ _start:
|
|||
{
|
||||
uint8_t x_14;
|
||||
lean_dec(x_6);
|
||||
x_14 = lean_ctor_get_uint8(x_3, sizeof(void*)*5 + 1);
|
||||
x_14 = lean_ctor_get_uint8(x_4, sizeof(void*)*5 + 1);
|
||||
if (x_14 == 0)
|
||||
{
|
||||
lean_object* x_15; lean_object* x_16;
|
||||
x_15 = lean_box(0);
|
||||
x_16 = l___private_Lean_Meta_Tactic_Simp_Rewrite_0__Lean_Meta_Simp_tryTheoremCore_go___lambda__3(x_1, x_2, x_3, x_4, x_5, x_15, x_7, x_8, x_9, x_10, x_11, x_12, x_13);
|
||||
lean_dec(x_12);
|
||||
lean_dec(x_11);
|
||||
lean_dec(x_9);
|
||||
lean_dec(x_10);
|
||||
lean_dec(x_8);
|
||||
return x_16;
|
||||
}
|
||||
|
|
@ -6239,8 +6265,8 @@ lean_inc(x_11);
|
|||
lean_inc(x_10);
|
||||
lean_inc(x_9);
|
||||
lean_inc(x_5);
|
||||
lean_inc(x_1);
|
||||
x_17 = l_Lean_Meta_ACLt_lt(x_1, x_5, x_9, x_10, x_11, x_12, x_13);
|
||||
lean_inc(x_2);
|
||||
x_17 = l_Lean_Meta_ACLt_lt(x_2, x_5, x_9, x_10, x_11, x_12, x_13);
|
||||
if (lean_obj_tag(x_17) == 0)
|
||||
{
|
||||
lean_object* x_18; uint8_t x_19;
|
||||
|
|
@ -6251,7 +6277,7 @@ lean_dec(x_18);
|
|||
if (x_19 == 0)
|
||||
{
|
||||
lean_object* x_20; lean_object* x_21; lean_object* x_22; lean_object* x_23; lean_object* x_24; lean_object* x_25; uint8_t x_26;
|
||||
lean_dec(x_2);
|
||||
lean_dec(x_3);
|
||||
x_20 = lean_ctor_get(x_17, 1);
|
||||
lean_inc(x_20);
|
||||
lean_dec(x_17);
|
||||
|
|
@ -6270,7 +6296,7 @@ if (x_26 == 0)
|
|||
lean_object* x_27; lean_object* x_28;
|
||||
lean_dec(x_5);
|
||||
lean_dec(x_4);
|
||||
lean_dec(x_3);
|
||||
lean_dec(x_2);
|
||||
lean_dec(x_1);
|
||||
x_27 = lean_box(0);
|
||||
x_28 = lean_apply_8(x_25, x_27, x_7, x_8, x_9, x_10, x_11, x_12, x_24);
|
||||
|
|
@ -6280,12 +6306,12 @@ else
|
|||
{
|
||||
uint8_t x_29; lean_object* x_30; lean_object* x_31; lean_object* x_32; lean_object* x_33; lean_object* x_34; lean_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;
|
||||
x_29 = 1;
|
||||
x_30 = l_Lean_Name_toString(x_4, x_29);
|
||||
x_30 = l_Lean_Name_toString(x_1, x_29);
|
||||
x_31 = lean_alloc_ctor(2, 1, 0);
|
||||
lean_ctor_set(x_31, 0, x_30);
|
||||
x_32 = lean_ctor_get(x_3, 3);
|
||||
x_32 = lean_ctor_get(x_4, 3);
|
||||
lean_inc(x_32);
|
||||
lean_dec(x_3);
|
||||
lean_dec(x_4);
|
||||
x_33 = l_Nat_repr(x_32);
|
||||
x_34 = lean_alloc_ctor(2, 1, 0);
|
||||
lean_ctor_set(x_34, 0, x_33);
|
||||
|
|
@ -6303,7 +6329,7 @@ lean_ctor_set(x_39, 1, x_38);
|
|||
x_40 = lean_alloc_ctor(2, 1, 0);
|
||||
lean_ctor_set(x_40, 0, x_5);
|
||||
x_41 = lean_alloc_ctor(2, 1, 0);
|
||||
lean_ctor_set(x_41, 0, x_1);
|
||||
lean_ctor_set(x_41, 0, x_2);
|
||||
x_42 = l___private_Lean_Meta_Tactic_Simp_Rewrite_0__Lean_Meta_Simp_tryTheoremCore_go___lambda__3___closed__11;
|
||||
x_43 = lean_alloc_ctor(4, 2, 0);
|
||||
lean_ctor_set(x_43, 0, x_39);
|
||||
|
|
@ -6350,8 +6376,7 @@ lean_dec(x_17);
|
|||
x_59 = lean_box(0);
|
||||
x_60 = l___private_Lean_Meta_Tactic_Simp_Rewrite_0__Lean_Meta_Simp_tryTheoremCore_go___lambda__3(x_1, x_2, x_3, x_4, x_5, x_59, x_7, x_8, x_9, x_10, x_11, x_12, x_58);
|
||||
lean_dec(x_12);
|
||||
lean_dec(x_11);
|
||||
lean_dec(x_9);
|
||||
lean_dec(x_10);
|
||||
lean_dec(x_8);
|
||||
return x_60;
|
||||
}
|
||||
|
|
@ -6411,7 +6436,7 @@ if (x_18 == 0)
|
|||
lean_object* x_19; lean_object* x_20;
|
||||
lean_free_object(x_13);
|
||||
x_19 = lean_box(0);
|
||||
x_20 = l___private_Lean_Meta_Tactic_Simp_Rewrite_0__Lean_Meta_Simp_tryTheoremCore_go___lambda__4(x_17, x_5, x_2, x_3, x_4, x_19, x_6, x_7, x_8, x_9, x_10, x_11, x_16);
|
||||
x_20 = l___private_Lean_Meta_Tactic_Simp_Rewrite_0__Lean_Meta_Simp_tryTheoremCore_go___lambda__4(x_2, x_17, x_5, x_3, x_4, x_19, x_6, x_7, x_8, x_9, x_10, x_11, x_16);
|
||||
return x_20;
|
||||
}
|
||||
else
|
||||
|
|
@ -6448,7 +6473,7 @@ if (x_25 == 0)
|
|||
{
|
||||
lean_object* x_26; lean_object* x_27;
|
||||
x_26 = lean_box(0);
|
||||
x_27 = l___private_Lean_Meta_Tactic_Simp_Rewrite_0__Lean_Meta_Simp_tryTheoremCore_go___lambda__4(x_24, x_5, x_2, x_3, x_4, x_26, x_6, x_7, x_8, x_9, x_10, x_11, x_23);
|
||||
x_27 = l___private_Lean_Meta_Tactic_Simp_Rewrite_0__Lean_Meta_Simp_tryTheoremCore_go___lambda__4(x_2, x_24, x_5, x_3, x_4, x_26, x_6, x_7, x_8, x_9, x_10, x_11, x_23);
|
||||
return x_27;
|
||||
}
|
||||
else
|
||||
|
|
@ -6506,7 +6531,7 @@ _start:
|
|||
{
|
||||
uint8_t x_15;
|
||||
lean_dec(x_7);
|
||||
x_15 = lean_ctor_get_uint8(x_2, sizeof(void*)*5 + 2);
|
||||
x_15 = lean_ctor_get_uint8(x_3, sizeof(void*)*5 + 2);
|
||||
if (x_15 == 0)
|
||||
{
|
||||
lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; lean_object* x_20; lean_object* x_21;
|
||||
|
|
@ -6581,14 +6606,14 @@ return x_35;
|
|||
else
|
||||
{
|
||||
uint8_t x_36; uint8_t x_37; lean_object* x_38; lean_object* x_39; lean_object* x_40; lean_object* x_41; lean_object* x_42; lean_object* x_43; lean_object* x_44; lean_object* x_45; lean_object* x_46; lean_object* x_47;
|
||||
x_36 = lean_ctor_get_uint8(x_2, sizeof(void*)*5 + 1);
|
||||
x_36 = lean_ctor_get_uint8(x_3, sizeof(void*)*5 + 1);
|
||||
x_37 = 1;
|
||||
x_38 = l_Lean_Name_toString(x_3, x_37);
|
||||
x_38 = l_Lean_Name_toString(x_2, x_37);
|
||||
x_39 = lean_alloc_ctor(2, 1, 0);
|
||||
lean_ctor_set(x_39, 0, x_38);
|
||||
x_40 = lean_ctor_get(x_2, 3);
|
||||
x_40 = lean_ctor_get(x_3, 3);
|
||||
lean_inc(x_40);
|
||||
lean_dec(x_2);
|
||||
lean_dec(x_3);
|
||||
x_41 = l_Nat_repr(x_40);
|
||||
x_42 = lean_alloc_ctor(2, 1, 0);
|
||||
lean_ctor_set(x_42, 0, x_41);
|
||||
|
|
@ -6813,7 +6838,8 @@ x_29 = lean_ctor_get(x_23, 1);
|
|||
lean_inc(x_29);
|
||||
lean_dec(x_23);
|
||||
x_30 = lean_ctor_get_uint8(x_6, sizeof(void*)*5 + 1);
|
||||
x_31 = l_Lean_Meta_SimpTheorem_getName(x_6);
|
||||
x_31 = lean_ctor_get(x_6, 4);
|
||||
lean_inc(x_31);
|
||||
x_32 = 1;
|
||||
x_33 = l_Lean_Name_toString(x_31, x_32);
|
||||
x_34 = lean_alloc_ctor(2, 1, 0);
|
||||
|
|
@ -6934,7 +6960,8 @@ lean_dec(x_1);
|
|||
x_78 = lean_ctor_get(x_16, 1);
|
||||
lean_inc(x_78);
|
||||
lean_dec(x_16);
|
||||
x_79 = l_Lean_Meta_SimpTheorem_getName(x_6);
|
||||
x_79 = lean_ctor_get(x_6, 4);
|
||||
lean_inc(x_79);
|
||||
lean_inc(x_14);
|
||||
lean_inc(x_13);
|
||||
lean_inc(x_12);
|
||||
|
|
@ -6995,7 +7022,7 @@ x_89 = lean_ctor_get(x_80, 1);
|
|||
lean_inc(x_89);
|
||||
lean_dec(x_80);
|
||||
x_90 = lean_box(0);
|
||||
x_91 = l___private_Lean_Meta_Tactic_Simp_Rewrite_0__Lean_Meta_Simp_tryTheoremCore_go___lambda__7(x_5, x_6, x_79, x_8, x_4, x_2, x_90, x_9, x_10, x_11, x_12, x_13, x_14, x_89);
|
||||
x_91 = l___private_Lean_Meta_Tactic_Simp_Rewrite_0__Lean_Meta_Simp_tryTheoremCore_go___lambda__7(x_5, x_79, x_6, x_8, x_4, x_2, x_90, x_9, x_10, x_11, x_12, x_13, x_14, x_89);
|
||||
return x_91;
|
||||
}
|
||||
}
|
||||
|
|
@ -7102,19 +7129,19 @@ lean_dec(x_1);
|
|||
return x_9;
|
||||
}
|
||||
}
|
||||
LEAN_EXPORT lean_object* l___private_Lean_Meta_Tactic_Simp_Rewrite_0__Lean_Meta_Simp_tryTheoremCore_go___lambda__2___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9, lean_object* x_10) {
|
||||
LEAN_EXPORT lean_object* l___private_Lean_Meta_Tactic_Simp_Rewrite_0__Lean_Meta_Simp_tryTheoremCore_go___lambda__2___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9, lean_object* x_10, lean_object* x_11) {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_11;
|
||||
x_11 = l___private_Lean_Meta_Tactic_Simp_Rewrite_0__Lean_Meta_Simp_tryTheoremCore_go___lambda__2(x_1, x_2, x_3, x_4, x_5, x_6, x_7, x_8, x_9, x_10);
|
||||
lean_object* x_12;
|
||||
x_12 = l___private_Lean_Meta_Tactic_Simp_Rewrite_0__Lean_Meta_Simp_tryTheoremCore_go___lambda__2(x_1, x_2, x_3, x_4, x_5, x_6, x_7, x_8, x_9, x_10, x_11);
|
||||
lean_dec(x_10);
|
||||
lean_dec(x_9);
|
||||
lean_dec(x_8);
|
||||
lean_dec(x_7);
|
||||
lean_dec(x_6);
|
||||
lean_dec(x_5);
|
||||
lean_dec(x_4);
|
||||
lean_dec(x_3);
|
||||
return x_11;
|
||||
return x_12;
|
||||
}
|
||||
}
|
||||
LEAN_EXPORT lean_object* l___private_Lean_Meta_Tactic_Simp_Rewrite_0__Lean_Meta_Simp_tryTheoremCore_go___lambda__3___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9, lean_object* x_10, lean_object* x_11, lean_object* x_12, lean_object* x_13) {
|
||||
|
|
@ -7123,8 +7150,7 @@ _start:
|
|||
lean_object* x_14;
|
||||
x_14 = l___private_Lean_Meta_Tactic_Simp_Rewrite_0__Lean_Meta_Simp_tryTheoremCore_go___lambda__3(x_1, x_2, x_3, x_4, x_5, x_6, x_7, x_8, x_9, x_10, x_11, x_12, x_13);
|
||||
lean_dec(x_12);
|
||||
lean_dec(x_11);
|
||||
lean_dec(x_9);
|
||||
lean_dec(x_10);
|
||||
lean_dec(x_8);
|
||||
lean_dec(x_6);
|
||||
return x_14;
|
||||
|
|
@ -8644,27 +8670,13 @@ return x_14;
|
|||
LEAN_EXPORT uint8_t l_Lean_Meta_Simp_rewrite_x3f_inErasedSet(lean_object* x_1, lean_object* x_2) {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_3;
|
||||
lean_object* x_3; uint8_t x_4;
|
||||
x_3 = lean_ctor_get(x_2, 4);
|
||||
lean_inc(x_3);
|
||||
lean_dec(x_2);
|
||||
if (lean_obj_tag(x_3) == 0)
|
||||
{
|
||||
uint8_t x_4;
|
||||
lean_dec(x_1);
|
||||
x_4 = 0;
|
||||
x_4 = l_Std_PersistentHashMap_contains___at_Lean_NameSSet_contains___spec__3(x_1, x_3);
|
||||
return x_4;
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_5; uint8_t x_6;
|
||||
x_5 = lean_ctor_get(x_3, 0);
|
||||
lean_inc(x_5);
|
||||
lean_dec(x_3);
|
||||
x_6 = l_Std_PersistentHashMap_contains___at_Lean_NameSSet_contains___spec__3(x_1, x_5);
|
||||
return x_6;
|
||||
}
|
||||
}
|
||||
}
|
||||
LEAN_EXPORT lean_object* l_Lean_Meta_Simp_rewrite_x3f_inErasedSet___boxed(lean_object* x_1, lean_object* x_2) {
|
||||
_start:
|
||||
|
|
@ -12677,7 +12689,7 @@ LEAN_EXPORT lean_object* l_Lean_Meta_Simp_simpArith_x3f___lambda__1(lean_object*
|
|||
_start:
|
||||
{
|
||||
lean_object* x_10; lean_object* x_11;
|
||||
x_10 = lean_ctor_get(x_3, 3);
|
||||
x_10 = lean_ctor_get(x_3, 4);
|
||||
lean_inc(x_10);
|
||||
lean_dec(x_3);
|
||||
x_11 = l_Lean_Meta_Linear_simp_x3f(x_1, x_10, x_5, x_6, x_7, x_8, x_9);
|
||||
|
|
@ -12916,7 +12928,7 @@ lean_inc(x_17);
|
|||
x_18 = l_Lean_Meta_isRflTheorem(x_17, x_12, x_13, x_14);
|
||||
if (lean_obj_tag(x_18) == 0)
|
||||
{
|
||||
lean_object* x_19; lean_object* x_20; lean_object* x_21; lean_object* x_22; lean_object* x_23; lean_object* x_24; lean_object* x_25; uint8_t x_26; uint8_t x_27; lean_object* x_28; uint8_t x_29; lean_object* x_30; lean_object* x_31; lean_object* x_32; lean_object* x_33; lean_object* x_34; lean_object* x_35; uint8_t x_36;
|
||||
lean_object* x_19; lean_object* x_20; lean_object* x_21; lean_object* x_22; lean_object* x_23; lean_object* x_24; uint8_t x_25; uint8_t x_26; lean_object* x_27; uint8_t x_28; lean_object* x_29; lean_object* x_30; lean_object* x_31; lean_object* x_32; lean_object* x_33; lean_object* x_34; uint8_t x_35;
|
||||
x_19 = lean_ctor_get(x_18, 0);
|
||||
lean_inc(x_19);
|
||||
x_20 = lean_ctor_get(x_18, 1);
|
||||
|
|
@ -12925,48 +12937,46 @@ lean_dec(x_18);
|
|||
x_21 = lean_box(0);
|
||||
lean_inc(x_17);
|
||||
x_22 = l_Lean_Expr_const___override(x_17, x_21);
|
||||
x_23 = lean_alloc_ctor(1, 1, 0);
|
||||
lean_ctor_set(x_23, 0, x_17);
|
||||
x_24 = l_Lean_addTrace___at_Lean_Meta_Simp_synthesizeArgs_synthesizeInstance___spec__2___closed__1;
|
||||
x_25 = lean_unsigned_to_nat(1000u);
|
||||
x_26 = 1;
|
||||
x_27 = 0;
|
||||
x_28 = lean_alloc_ctor(0, 5, 3);
|
||||
lean_ctor_set(x_28, 0, x_24);
|
||||
lean_ctor_set(x_28, 1, x_24);
|
||||
lean_ctor_set(x_28, 2, x_22);
|
||||
lean_ctor_set(x_28, 3, x_25);
|
||||
lean_ctor_set(x_28, 4, x_23);
|
||||
lean_ctor_set_uint8(x_28, sizeof(void*)*5, x_26);
|
||||
lean_ctor_set_uint8(x_28, sizeof(void*)*5 + 1, x_27);
|
||||
x_29 = lean_unbox(x_19);
|
||||
x_23 = l_Lean_addTrace___at_Lean_Meta_Simp_synthesizeArgs_synthesizeInstance___spec__2___closed__1;
|
||||
x_24 = lean_unsigned_to_nat(1000u);
|
||||
x_25 = 1;
|
||||
x_26 = 0;
|
||||
x_27 = lean_alloc_ctor(0, 5, 3);
|
||||
lean_ctor_set(x_27, 0, x_23);
|
||||
lean_ctor_set(x_27, 1, x_23);
|
||||
lean_ctor_set(x_27, 2, x_22);
|
||||
lean_ctor_set(x_27, 3, x_24);
|
||||
lean_ctor_set(x_27, 4, x_17);
|
||||
lean_ctor_set_uint8(x_27, sizeof(void*)*5, x_25);
|
||||
lean_ctor_set_uint8(x_27, sizeof(void*)*5 + 1, x_26);
|
||||
x_28 = lean_unbox(x_19);
|
||||
lean_dec(x_19);
|
||||
lean_ctor_set_uint8(x_28, sizeof(void*)*5 + 2, x_29);
|
||||
x_30 = lean_ctor_get(x_10, 0);
|
||||
lean_ctor_set_uint8(x_27, sizeof(void*)*5 + 2, x_28);
|
||||
x_29 = lean_ctor_get(x_10, 0);
|
||||
lean_inc(x_29);
|
||||
x_30 = lean_ctor_get(x_10, 1);
|
||||
lean_inc(x_30);
|
||||
x_31 = lean_ctor_get(x_10, 1);
|
||||
x_31 = lean_ctor_get(x_10, 2);
|
||||
lean_inc(x_31);
|
||||
x_32 = lean_ctor_get(x_10, 2);
|
||||
x_32 = lean_ctor_get(x_10, 3);
|
||||
lean_inc(x_32);
|
||||
x_33 = lean_ctor_get(x_10, 3);
|
||||
x_33 = lean_ctor_get(x_10, 4);
|
||||
lean_inc(x_33);
|
||||
x_34 = lean_ctor_get(x_10, 4);
|
||||
x_34 = lean_ctor_get(x_10, 5);
|
||||
lean_inc(x_34);
|
||||
x_35 = lean_ctor_get(x_10, 5);
|
||||
lean_inc(x_35);
|
||||
x_36 = !lean_is_exclusive(x_30);
|
||||
if (x_36 == 0)
|
||||
x_35 = !lean_is_exclusive(x_29);
|
||||
if (x_35 == 0)
|
||||
{
|
||||
uint8_t x_37; lean_object* x_38; lean_object* x_39;
|
||||
x_37 = 2;
|
||||
lean_ctor_set_uint8(x_30, 5, x_37);
|
||||
x_38 = lean_alloc_ctor(0, 6, 0);
|
||||
lean_ctor_set(x_38, 0, x_30);
|
||||
lean_ctor_set(x_38, 1, x_31);
|
||||
lean_ctor_set(x_38, 2, x_32);
|
||||
lean_ctor_set(x_38, 3, x_33);
|
||||
lean_ctor_set(x_38, 4, x_34);
|
||||
lean_ctor_set(x_38, 5, x_35);
|
||||
uint8_t x_36; lean_object* x_37; lean_object* x_38;
|
||||
x_36 = 2;
|
||||
lean_ctor_set_uint8(x_29, 5, x_36);
|
||||
x_37 = lean_alloc_ctor(0, 6, 0);
|
||||
lean_ctor_set(x_37, 0, x_29);
|
||||
lean_ctor_set(x_37, 1, x_30);
|
||||
lean_ctor_set(x_37, 2, x_31);
|
||||
lean_ctor_set(x_37, 3, x_32);
|
||||
lean_ctor_set(x_37, 4, x_33);
|
||||
lean_ctor_set(x_37, 5, x_34);
|
||||
lean_inc(x_13);
|
||||
lean_inc(x_12);
|
||||
lean_inc(x_11);
|
||||
|
|
@ -12974,25 +12984,25 @@ lean_inc(x_9);
|
|||
lean_inc(x_8);
|
||||
lean_inc(x_2);
|
||||
lean_inc(x_1);
|
||||
x_39 = l_Lean_Meta_Simp_tryTheorem_x3f(x_1, x_28, x_2, x_8, x_9, x_38, x_11, x_12, x_13, x_20);
|
||||
x_38 = l_Lean_Meta_Simp_tryTheorem_x3f(x_1, x_27, x_2, x_8, x_9, x_37, x_11, x_12, x_13, x_20);
|
||||
if (lean_obj_tag(x_38) == 0)
|
||||
{
|
||||
lean_object* x_39;
|
||||
x_39 = lean_ctor_get(x_38, 0);
|
||||
lean_inc(x_39);
|
||||
if (lean_obj_tag(x_39) == 0)
|
||||
{
|
||||
lean_object* x_40;
|
||||
x_40 = lean_ctor_get(x_39, 0);
|
||||
lean_object* x_40; size_t x_41; size_t x_42;
|
||||
x_40 = lean_ctor_get(x_38, 1);
|
||||
lean_inc(x_40);
|
||||
if (lean_obj_tag(x_40) == 0)
|
||||
{
|
||||
lean_object* x_41; size_t x_42; size_t x_43;
|
||||
x_41 = lean_ctor_get(x_39, 1);
|
||||
lean_inc(x_41);
|
||||
lean_dec(x_39);
|
||||
x_42 = 1;
|
||||
x_43 = lean_usize_add(x_6, x_42);
|
||||
lean_dec(x_38);
|
||||
x_41 = 1;
|
||||
x_42 = lean_usize_add(x_6, x_41);
|
||||
lean_inc(x_3);
|
||||
{
|
||||
size_t _tmp_5 = x_43;
|
||||
size_t _tmp_5 = x_42;
|
||||
lean_object* _tmp_6 = x_3;
|
||||
lean_object* _tmp_13 = x_41;
|
||||
lean_object* _tmp_13 = x_40;
|
||||
x_6 = _tmp_5;
|
||||
x_7 = _tmp_6;
|
||||
x_14 = _tmp_13;
|
||||
|
|
@ -13001,7 +13011,7 @@ goto _start;
|
|||
}
|
||||
else
|
||||
{
|
||||
uint8_t x_45;
|
||||
uint8_t x_44;
|
||||
lean_dec(x_13);
|
||||
lean_dec(x_12);
|
||||
lean_dec(x_11);
|
||||
|
|
@ -13011,88 +13021,88 @@ lean_dec(x_8);
|
|||
lean_dec(x_3);
|
||||
lean_dec(x_2);
|
||||
lean_dec(x_1);
|
||||
x_45 = !lean_is_exclusive(x_39);
|
||||
if (x_45 == 0)
|
||||
x_44 = !lean_is_exclusive(x_38);
|
||||
if (x_44 == 0)
|
||||
{
|
||||
lean_object* x_46; uint8_t x_47;
|
||||
x_46 = lean_ctor_get(x_39, 0);
|
||||
lean_dec(x_46);
|
||||
x_47 = !lean_is_exclusive(x_40);
|
||||
if (x_47 == 0)
|
||||
lean_object* x_45; uint8_t x_46;
|
||||
x_45 = lean_ctor_get(x_38, 0);
|
||||
lean_dec(x_45);
|
||||
x_46 = !lean_is_exclusive(x_39);
|
||||
if (x_46 == 0)
|
||||
{
|
||||
lean_object* x_48; lean_object* x_49; lean_object* x_50; lean_object* x_51; lean_object* x_52;
|
||||
x_48 = lean_ctor_get(x_40, 0);
|
||||
lean_object* x_47; lean_object* x_48; lean_object* x_49; lean_object* x_50; lean_object* x_51;
|
||||
x_47 = lean_ctor_get(x_39, 0);
|
||||
x_48 = lean_alloc_ctor(1, 1, 0);
|
||||
lean_ctor_set(x_48, 0, x_47);
|
||||
lean_ctor_set(x_39, 0, x_48);
|
||||
x_49 = lean_alloc_ctor(1, 1, 0);
|
||||
lean_ctor_set(x_49, 0, x_48);
|
||||
lean_ctor_set(x_40, 0, x_49);
|
||||
x_50 = lean_alloc_ctor(1, 1, 0);
|
||||
lean_ctor_set(x_50, 0, x_40);
|
||||
x_51 = lean_box(0);
|
||||
x_52 = lean_alloc_ctor(0, 2, 0);
|
||||
lean_ctor_set(x_52, 0, x_50);
|
||||
lean_ctor_set(x_52, 1, x_51);
|
||||
lean_ctor_set(x_39, 0, x_52);
|
||||
return x_39;
|
||||
lean_ctor_set(x_49, 0, x_39);
|
||||
x_50 = lean_box(0);
|
||||
x_51 = lean_alloc_ctor(0, 2, 0);
|
||||
lean_ctor_set(x_51, 0, x_49);
|
||||
lean_ctor_set(x_51, 1, x_50);
|
||||
lean_ctor_set(x_38, 0, x_51);
|
||||
return x_38;
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_53; lean_object* x_54; lean_object* x_55; lean_object* x_56; lean_object* x_57; lean_object* x_58;
|
||||
x_53 = lean_ctor_get(x_40, 0);
|
||||
lean_inc(x_53);
|
||||
lean_dec(x_40);
|
||||
lean_object* x_52; lean_object* x_53; lean_object* x_54; lean_object* x_55; lean_object* x_56; lean_object* x_57;
|
||||
x_52 = lean_ctor_get(x_39, 0);
|
||||
lean_inc(x_52);
|
||||
lean_dec(x_39);
|
||||
x_53 = lean_alloc_ctor(1, 1, 0);
|
||||
lean_ctor_set(x_53, 0, x_52);
|
||||
x_54 = lean_alloc_ctor(1, 1, 0);
|
||||
lean_ctor_set(x_54, 0, x_53);
|
||||
x_55 = lean_alloc_ctor(1, 1, 0);
|
||||
lean_ctor_set(x_55, 0, x_54);
|
||||
x_56 = lean_alloc_ctor(1, 1, 0);
|
||||
lean_ctor_set(x_56, 0, x_55);
|
||||
x_57 = lean_box(0);
|
||||
x_58 = lean_alloc_ctor(0, 2, 0);
|
||||
lean_ctor_set(x_58, 0, x_56);
|
||||
lean_ctor_set(x_58, 1, x_57);
|
||||
lean_ctor_set(x_39, 0, x_58);
|
||||
return x_39;
|
||||
x_56 = lean_box(0);
|
||||
x_57 = lean_alloc_ctor(0, 2, 0);
|
||||
lean_ctor_set(x_57, 0, x_55);
|
||||
lean_ctor_set(x_57, 1, x_56);
|
||||
lean_ctor_set(x_38, 0, x_57);
|
||||
return x_38;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_59; lean_object* x_60; lean_object* x_61; lean_object* x_62; lean_object* x_63; lean_object* x_64; lean_object* x_65; lean_object* x_66; lean_object* x_67;
|
||||
x_59 = lean_ctor_get(x_39, 1);
|
||||
lean_object* x_58; lean_object* x_59; lean_object* x_60; lean_object* x_61; lean_object* x_62; lean_object* x_63; lean_object* x_64; lean_object* x_65; lean_object* x_66;
|
||||
x_58 = lean_ctor_get(x_38, 1);
|
||||
lean_inc(x_58);
|
||||
lean_dec(x_38);
|
||||
x_59 = lean_ctor_get(x_39, 0);
|
||||
lean_inc(x_59);
|
||||
lean_dec(x_39);
|
||||
x_60 = lean_ctor_get(x_40, 0);
|
||||
lean_inc(x_60);
|
||||
if (lean_is_exclusive(x_40)) {
|
||||
lean_ctor_release(x_40, 0);
|
||||
x_61 = x_40;
|
||||
if (lean_is_exclusive(x_39)) {
|
||||
lean_ctor_release(x_39, 0);
|
||||
x_60 = x_39;
|
||||
} else {
|
||||
lean_dec_ref(x_40);
|
||||
x_61 = lean_box(0);
|
||||
lean_dec_ref(x_39);
|
||||
x_60 = lean_box(0);
|
||||
}
|
||||
x_62 = lean_alloc_ctor(1, 1, 0);
|
||||
lean_ctor_set(x_62, 0, x_60);
|
||||
if (lean_is_scalar(x_61)) {
|
||||
x_63 = lean_alloc_ctor(1, 1, 0);
|
||||
x_61 = lean_alloc_ctor(1, 1, 0);
|
||||
lean_ctor_set(x_61, 0, x_59);
|
||||
if (lean_is_scalar(x_60)) {
|
||||
x_62 = lean_alloc_ctor(1, 1, 0);
|
||||
} else {
|
||||
x_63 = x_61;
|
||||
x_62 = x_60;
|
||||
}
|
||||
lean_ctor_set(x_62, 0, x_61);
|
||||
x_63 = lean_alloc_ctor(1, 1, 0);
|
||||
lean_ctor_set(x_63, 0, x_62);
|
||||
x_64 = lean_alloc_ctor(1, 1, 0);
|
||||
lean_ctor_set(x_64, 0, x_63);
|
||||
x_65 = lean_box(0);
|
||||
x_64 = lean_box(0);
|
||||
x_65 = lean_alloc_ctor(0, 2, 0);
|
||||
lean_ctor_set(x_65, 0, x_63);
|
||||
lean_ctor_set(x_65, 1, x_64);
|
||||
x_66 = lean_alloc_ctor(0, 2, 0);
|
||||
lean_ctor_set(x_66, 0, x_64);
|
||||
lean_ctor_set(x_66, 1, x_65);
|
||||
x_67 = lean_alloc_ctor(0, 2, 0);
|
||||
lean_ctor_set(x_67, 0, x_66);
|
||||
lean_ctor_set(x_67, 1, x_59);
|
||||
return x_67;
|
||||
lean_ctor_set(x_66, 0, x_65);
|
||||
lean_ctor_set(x_66, 1, x_58);
|
||||
return x_66;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
uint8_t x_68;
|
||||
uint8_t x_67;
|
||||
lean_dec(x_13);
|
||||
lean_dec(x_12);
|
||||
lean_dec(x_11);
|
||||
|
|
@ -13102,66 +13112,66 @@ lean_dec(x_8);
|
|||
lean_dec(x_3);
|
||||
lean_dec(x_2);
|
||||
lean_dec(x_1);
|
||||
x_68 = !lean_is_exclusive(x_39);
|
||||
if (x_68 == 0)
|
||||
x_67 = !lean_is_exclusive(x_38);
|
||||
if (x_67 == 0)
|
||||
{
|
||||
return x_39;
|
||||
return x_38;
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_69; lean_object* x_70; lean_object* x_71;
|
||||
x_69 = lean_ctor_get(x_39, 0);
|
||||
x_70 = lean_ctor_get(x_39, 1);
|
||||
lean_inc(x_70);
|
||||
lean_object* x_68; lean_object* x_69; lean_object* x_70;
|
||||
x_68 = lean_ctor_get(x_38, 0);
|
||||
x_69 = lean_ctor_get(x_38, 1);
|
||||
lean_inc(x_69);
|
||||
lean_dec(x_39);
|
||||
x_71 = lean_alloc_ctor(1, 2, 0);
|
||||
lean_ctor_set(x_71, 0, x_69);
|
||||
lean_ctor_set(x_71, 1, x_70);
|
||||
return x_71;
|
||||
lean_inc(x_68);
|
||||
lean_dec(x_38);
|
||||
x_70 = lean_alloc_ctor(1, 2, 0);
|
||||
lean_ctor_set(x_70, 0, x_68);
|
||||
lean_ctor_set(x_70, 1, x_69);
|
||||
return x_70;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
uint8_t x_72; uint8_t x_73; uint8_t x_74; uint8_t x_75; uint8_t x_76; uint8_t x_77; uint8_t x_78; uint8_t x_79; uint8_t x_80; uint8_t x_81; uint8_t x_82; uint8_t x_83; uint8_t x_84; uint8_t x_85; lean_object* x_86; lean_object* x_87; lean_object* x_88;
|
||||
x_72 = lean_ctor_get_uint8(x_30, 0);
|
||||
x_73 = lean_ctor_get_uint8(x_30, 1);
|
||||
x_74 = lean_ctor_get_uint8(x_30, 2);
|
||||
x_75 = lean_ctor_get_uint8(x_30, 3);
|
||||
x_76 = lean_ctor_get_uint8(x_30, 4);
|
||||
x_77 = lean_ctor_get_uint8(x_30, 6);
|
||||
x_78 = lean_ctor_get_uint8(x_30, 7);
|
||||
x_79 = lean_ctor_get_uint8(x_30, 8);
|
||||
x_80 = lean_ctor_get_uint8(x_30, 9);
|
||||
x_81 = lean_ctor_get_uint8(x_30, 10);
|
||||
x_82 = lean_ctor_get_uint8(x_30, 11);
|
||||
x_83 = lean_ctor_get_uint8(x_30, 12);
|
||||
x_84 = lean_ctor_get_uint8(x_30, 13);
|
||||
lean_dec(x_30);
|
||||
x_85 = 2;
|
||||
x_86 = lean_alloc_ctor(0, 0, 14);
|
||||
lean_ctor_set_uint8(x_86, 0, x_72);
|
||||
lean_ctor_set_uint8(x_86, 1, x_73);
|
||||
lean_ctor_set_uint8(x_86, 2, x_74);
|
||||
lean_ctor_set_uint8(x_86, 3, x_75);
|
||||
lean_ctor_set_uint8(x_86, 4, x_76);
|
||||
lean_ctor_set_uint8(x_86, 5, x_85);
|
||||
lean_ctor_set_uint8(x_86, 6, x_77);
|
||||
lean_ctor_set_uint8(x_86, 7, x_78);
|
||||
lean_ctor_set_uint8(x_86, 8, x_79);
|
||||
lean_ctor_set_uint8(x_86, 9, x_80);
|
||||
lean_ctor_set_uint8(x_86, 10, x_81);
|
||||
lean_ctor_set_uint8(x_86, 11, x_82);
|
||||
lean_ctor_set_uint8(x_86, 12, x_83);
|
||||
lean_ctor_set_uint8(x_86, 13, x_84);
|
||||
x_87 = lean_alloc_ctor(0, 6, 0);
|
||||
lean_ctor_set(x_87, 0, x_86);
|
||||
lean_ctor_set(x_87, 1, x_31);
|
||||
lean_ctor_set(x_87, 2, x_32);
|
||||
lean_ctor_set(x_87, 3, x_33);
|
||||
lean_ctor_set(x_87, 4, x_34);
|
||||
lean_ctor_set(x_87, 5, x_35);
|
||||
uint8_t x_71; uint8_t x_72; uint8_t x_73; uint8_t x_74; uint8_t x_75; uint8_t x_76; uint8_t x_77; uint8_t x_78; uint8_t x_79; uint8_t x_80; uint8_t x_81; uint8_t x_82; uint8_t x_83; uint8_t x_84; lean_object* x_85; lean_object* x_86; lean_object* x_87;
|
||||
x_71 = lean_ctor_get_uint8(x_29, 0);
|
||||
x_72 = lean_ctor_get_uint8(x_29, 1);
|
||||
x_73 = lean_ctor_get_uint8(x_29, 2);
|
||||
x_74 = lean_ctor_get_uint8(x_29, 3);
|
||||
x_75 = lean_ctor_get_uint8(x_29, 4);
|
||||
x_76 = lean_ctor_get_uint8(x_29, 6);
|
||||
x_77 = lean_ctor_get_uint8(x_29, 7);
|
||||
x_78 = lean_ctor_get_uint8(x_29, 8);
|
||||
x_79 = lean_ctor_get_uint8(x_29, 9);
|
||||
x_80 = lean_ctor_get_uint8(x_29, 10);
|
||||
x_81 = lean_ctor_get_uint8(x_29, 11);
|
||||
x_82 = lean_ctor_get_uint8(x_29, 12);
|
||||
x_83 = lean_ctor_get_uint8(x_29, 13);
|
||||
lean_dec(x_29);
|
||||
x_84 = 2;
|
||||
x_85 = lean_alloc_ctor(0, 0, 14);
|
||||
lean_ctor_set_uint8(x_85, 0, x_71);
|
||||
lean_ctor_set_uint8(x_85, 1, x_72);
|
||||
lean_ctor_set_uint8(x_85, 2, x_73);
|
||||
lean_ctor_set_uint8(x_85, 3, x_74);
|
||||
lean_ctor_set_uint8(x_85, 4, x_75);
|
||||
lean_ctor_set_uint8(x_85, 5, x_84);
|
||||
lean_ctor_set_uint8(x_85, 6, x_76);
|
||||
lean_ctor_set_uint8(x_85, 7, x_77);
|
||||
lean_ctor_set_uint8(x_85, 8, x_78);
|
||||
lean_ctor_set_uint8(x_85, 9, x_79);
|
||||
lean_ctor_set_uint8(x_85, 10, x_80);
|
||||
lean_ctor_set_uint8(x_85, 11, x_81);
|
||||
lean_ctor_set_uint8(x_85, 12, x_82);
|
||||
lean_ctor_set_uint8(x_85, 13, x_83);
|
||||
x_86 = lean_alloc_ctor(0, 6, 0);
|
||||
lean_ctor_set(x_86, 0, x_85);
|
||||
lean_ctor_set(x_86, 1, x_30);
|
||||
lean_ctor_set(x_86, 2, x_31);
|
||||
lean_ctor_set(x_86, 3, x_32);
|
||||
lean_ctor_set(x_86, 4, x_33);
|
||||
lean_ctor_set(x_86, 5, x_34);
|
||||
lean_inc(x_13);
|
||||
lean_inc(x_12);
|
||||
lean_inc(x_11);
|
||||
|
|
@ -13169,25 +13179,25 @@ lean_inc(x_9);
|
|||
lean_inc(x_8);
|
||||
lean_inc(x_2);
|
||||
lean_inc(x_1);
|
||||
x_88 = l_Lean_Meta_Simp_tryTheorem_x3f(x_1, x_28, x_2, x_8, x_9, x_87, x_11, x_12, x_13, x_20);
|
||||
x_87 = l_Lean_Meta_Simp_tryTheorem_x3f(x_1, x_27, x_2, x_8, x_9, x_86, x_11, x_12, x_13, x_20);
|
||||
if (lean_obj_tag(x_87) == 0)
|
||||
{
|
||||
lean_object* x_88;
|
||||
x_88 = lean_ctor_get(x_87, 0);
|
||||
lean_inc(x_88);
|
||||
if (lean_obj_tag(x_88) == 0)
|
||||
{
|
||||
lean_object* x_89;
|
||||
x_89 = lean_ctor_get(x_88, 0);
|
||||
lean_object* x_89; size_t x_90; size_t x_91;
|
||||
x_89 = lean_ctor_get(x_87, 1);
|
||||
lean_inc(x_89);
|
||||
if (lean_obj_tag(x_89) == 0)
|
||||
{
|
||||
lean_object* x_90; size_t x_91; size_t x_92;
|
||||
x_90 = lean_ctor_get(x_88, 1);
|
||||
lean_inc(x_90);
|
||||
lean_dec(x_88);
|
||||
x_91 = 1;
|
||||
x_92 = lean_usize_add(x_6, x_91);
|
||||
lean_dec(x_87);
|
||||
x_90 = 1;
|
||||
x_91 = lean_usize_add(x_6, x_90);
|
||||
lean_inc(x_3);
|
||||
{
|
||||
size_t _tmp_5 = x_92;
|
||||
size_t _tmp_5 = x_91;
|
||||
lean_object* _tmp_6 = x_3;
|
||||
lean_object* _tmp_13 = x_90;
|
||||
lean_object* _tmp_13 = x_89;
|
||||
x_6 = _tmp_5;
|
||||
x_7 = _tmp_6;
|
||||
x_14 = _tmp_13;
|
||||
|
|
@ -13196,7 +13206,7 @@ goto _start;
|
|||
}
|
||||
else
|
||||
{
|
||||
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_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_dec(x_13);
|
||||
lean_dec(x_12);
|
||||
lean_dec(x_11);
|
||||
|
|
@ -13206,52 +13216,52 @@ lean_dec(x_8);
|
|||
lean_dec(x_3);
|
||||
lean_dec(x_2);
|
||||
lean_dec(x_1);
|
||||
x_94 = lean_ctor_get(x_88, 1);
|
||||
lean_inc(x_94);
|
||||
x_93 = lean_ctor_get(x_87, 1);
|
||||
lean_inc(x_93);
|
||||
if (lean_is_exclusive(x_87)) {
|
||||
lean_ctor_release(x_87, 0);
|
||||
lean_ctor_release(x_87, 1);
|
||||
x_94 = x_87;
|
||||
} else {
|
||||
lean_dec_ref(x_87);
|
||||
x_94 = lean_box(0);
|
||||
}
|
||||
x_95 = lean_ctor_get(x_88, 0);
|
||||
lean_inc(x_95);
|
||||
if (lean_is_exclusive(x_88)) {
|
||||
lean_ctor_release(x_88, 0);
|
||||
lean_ctor_release(x_88, 1);
|
||||
x_95 = x_88;
|
||||
x_96 = x_88;
|
||||
} else {
|
||||
lean_dec_ref(x_88);
|
||||
x_95 = lean_box(0);
|
||||
x_96 = lean_box(0);
|
||||
}
|
||||
x_96 = lean_ctor_get(x_89, 0);
|
||||
lean_inc(x_96);
|
||||
if (lean_is_exclusive(x_89)) {
|
||||
lean_ctor_release(x_89, 0);
|
||||
x_97 = x_89;
|
||||
x_97 = lean_alloc_ctor(1, 1, 0);
|
||||
lean_ctor_set(x_97, 0, x_95);
|
||||
if (lean_is_scalar(x_96)) {
|
||||
x_98 = lean_alloc_ctor(1, 1, 0);
|
||||
} else {
|
||||
lean_dec_ref(x_89);
|
||||
x_97 = lean_box(0);
|
||||
}
|
||||
x_98 = lean_alloc_ctor(1, 1, 0);
|
||||
lean_ctor_set(x_98, 0, x_96);
|
||||
if (lean_is_scalar(x_97)) {
|
||||
x_99 = lean_alloc_ctor(1, 1, 0);
|
||||
} else {
|
||||
x_99 = x_97;
|
||||
x_98 = x_96;
|
||||
}
|
||||
lean_ctor_set(x_98, 0, x_97);
|
||||
x_99 = lean_alloc_ctor(1, 1, 0);
|
||||
lean_ctor_set(x_99, 0, x_98);
|
||||
x_100 = lean_alloc_ctor(1, 1, 0);
|
||||
lean_ctor_set(x_100, 0, x_99);
|
||||
x_101 = lean_box(0);
|
||||
x_102 = lean_alloc_ctor(0, 2, 0);
|
||||
lean_ctor_set(x_102, 0, x_100);
|
||||
lean_ctor_set(x_102, 1, x_101);
|
||||
if (lean_is_scalar(x_95)) {
|
||||
x_103 = lean_alloc_ctor(0, 2, 0);
|
||||
x_100 = lean_box(0);
|
||||
x_101 = lean_alloc_ctor(0, 2, 0);
|
||||
lean_ctor_set(x_101, 0, x_99);
|
||||
lean_ctor_set(x_101, 1, x_100);
|
||||
if (lean_is_scalar(x_94)) {
|
||||
x_102 = lean_alloc_ctor(0, 2, 0);
|
||||
} else {
|
||||
x_103 = x_95;
|
||||
x_102 = x_94;
|
||||
}
|
||||
lean_ctor_set(x_103, 0, x_102);
|
||||
lean_ctor_set(x_103, 1, x_94);
|
||||
return x_103;
|
||||
lean_ctor_set(x_102, 0, x_101);
|
||||
lean_ctor_set(x_102, 1, x_93);
|
||||
return x_102;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_104; lean_object* x_105; lean_object* x_106; lean_object* x_107;
|
||||
lean_object* x_103; lean_object* x_104; lean_object* x_105; lean_object* x_106;
|
||||
lean_dec(x_13);
|
||||
lean_dec(x_12);
|
||||
lean_dec(x_11);
|
||||
|
|
@ -13261,32 +13271,32 @@ lean_dec(x_8);
|
|||
lean_dec(x_3);
|
||||
lean_dec(x_2);
|
||||
lean_dec(x_1);
|
||||
x_104 = lean_ctor_get(x_88, 0);
|
||||
x_103 = lean_ctor_get(x_87, 0);
|
||||
lean_inc(x_103);
|
||||
x_104 = lean_ctor_get(x_87, 1);
|
||||
lean_inc(x_104);
|
||||
x_105 = lean_ctor_get(x_88, 1);
|
||||
lean_inc(x_105);
|
||||
if (lean_is_exclusive(x_88)) {
|
||||
lean_ctor_release(x_88, 0);
|
||||
lean_ctor_release(x_88, 1);
|
||||
x_106 = x_88;
|
||||
if (lean_is_exclusive(x_87)) {
|
||||
lean_ctor_release(x_87, 0);
|
||||
lean_ctor_release(x_87, 1);
|
||||
x_105 = x_87;
|
||||
} else {
|
||||
lean_dec_ref(x_88);
|
||||
x_106 = lean_box(0);
|
||||
lean_dec_ref(x_87);
|
||||
x_105 = lean_box(0);
|
||||
}
|
||||
if (lean_is_scalar(x_106)) {
|
||||
x_107 = lean_alloc_ctor(1, 2, 0);
|
||||
if (lean_is_scalar(x_105)) {
|
||||
x_106 = lean_alloc_ctor(1, 2, 0);
|
||||
} else {
|
||||
x_107 = x_106;
|
||||
x_106 = x_105;
|
||||
}
|
||||
lean_ctor_set(x_107, 0, x_104);
|
||||
lean_ctor_set(x_107, 1, x_105);
|
||||
return x_107;
|
||||
lean_ctor_set(x_106, 0, x_103);
|
||||
lean_ctor_set(x_106, 1, x_104);
|
||||
return x_106;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
uint8_t x_108;
|
||||
uint8_t x_107;
|
||||
lean_dec(x_17);
|
||||
lean_dec(x_13);
|
||||
lean_dec(x_12);
|
||||
|
|
@ -13297,23 +13307,23 @@ lean_dec(x_8);
|
|||
lean_dec(x_3);
|
||||
lean_dec(x_2);
|
||||
lean_dec(x_1);
|
||||
x_108 = !lean_is_exclusive(x_18);
|
||||
if (x_108 == 0)
|
||||
x_107 = !lean_is_exclusive(x_18);
|
||||
if (x_107 == 0)
|
||||
{
|
||||
return x_18;
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_109; lean_object* x_110; lean_object* x_111;
|
||||
x_109 = lean_ctor_get(x_18, 0);
|
||||
x_110 = lean_ctor_get(x_18, 1);
|
||||
lean_inc(x_110);
|
||||
lean_object* x_108; lean_object* x_109; lean_object* x_110;
|
||||
x_108 = lean_ctor_get(x_18, 0);
|
||||
x_109 = lean_ctor_get(x_18, 1);
|
||||
lean_inc(x_109);
|
||||
lean_inc(x_108);
|
||||
lean_dec(x_18);
|
||||
x_111 = lean_alloc_ctor(1, 2, 0);
|
||||
lean_ctor_set(x_111, 0, x_109);
|
||||
lean_ctor_set(x_111, 1, x_110);
|
||||
return x_111;
|
||||
x_110 = lean_alloc_ctor(1, 2, 0);
|
||||
lean_ctor_set(x_110, 0, x_108);
|
||||
lean_ctor_set(x_110, 1, x_109);
|
||||
return x_110;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
3584
stage0/stdlib/Lean/Meta/Tactic/Simp/SimpAll.c
generated
3584
stage0/stdlib/Lean/Meta/Tactic/Simp/SimpAll.c
generated
File diff suppressed because it is too large
Load diff
2331
stage0/stdlib/Lean/Meta/Tactic/Simp/SimpTheorems.c
generated
2331
stage0/stdlib/Lean/Meta/Tactic/Simp/SimpTheorems.c
generated
File diff suppressed because it is too large
Load diff
964
stage0/stdlib/Lean/Meta/Tactic/Simp/Types.c
generated
964
stage0/stdlib/Lean/Meta/Tactic/Simp/Types.c
generated
File diff suppressed because it is too large
Load diff
929
stage0/stdlib/Lean/Meta/Tactic/Split.c
generated
929
stage0/stdlib/Lean/Meta/Tactic/Split.c
generated
File diff suppressed because it is too large
Load diff
451
stage0/stdlib/Lean/Meta/Tactic/SplitIf.c
generated
451
stage0/stdlib/Lean/Meta/Tactic/SplitIf.c
generated
|
|
@ -18,7 +18,7 @@ static lean_object* l_Lean_Meta_SplitIf_initFn____x40_Lean_Meta_Tactic_SplitIf__
|
|||
static lean_object* l_Lean_LazyInitExtension_get___at_Lean_Meta_SplitIf_getSimpContext___spec__1___closed__7;
|
||||
static lean_object* l_Lean_Meta_SplitIf_initFn____x40_Lean_Meta_Tactic_SplitIf___hyg_5____closed__6;
|
||||
LEAN_EXPORT lean_object* l_Lean_LocalContext_findDeclRevM_x3f___at_Lean_Meta_SplitIf_discharge_x3f___spec__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Meta_simpTarget(lean_object*, lean_object*, lean_object*, uint8_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Meta_simpTarget(lean_object*, lean_object*, lean_object*, uint8_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
static lean_object* l_Lean_Meta_SplitIf_discharge_x3f___closed__2;
|
||||
lean_object* l_Lean_registerTraceClass(lean_object*, uint8_t, lean_object*);
|
||||
static lean_object* l_Array_findSomeRevM_x3f_find___at_Lean_Meta_SplitIf_discharge_x3f___spec__3___closed__2;
|
||||
|
|
@ -102,7 +102,7 @@ lean_object* l_Lean_LocalDecl_toExpr(lean_object*);
|
|||
uint8_t l_Lean_Expr_isConstOf(lean_object*, lean_object*);
|
||||
LEAN_EXPORT lean_object* l_Lean_commitWhenSome_x3f___at_Lean_Meta_splitIfLocalDecl_x3f___spec__1___at_Lean_Meta_splitIfLocalDecl_x3f___spec__2___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
static lean_object* l_Lean_LazyInitExtension_get___at_Lean_Meta_SplitIf_getSimpContext___spec__1___closed__4;
|
||||
LEAN_EXPORT lean_object* l_Lean_Meta_initFn____x40_Lean_Meta_Tactic_SplitIf___hyg_1453_(lean_object*);
|
||||
LEAN_EXPORT lean_object* l_Lean_Meta_initFn____x40_Lean_Meta_Tactic_SplitIf___hyg_1481_(lean_object*);
|
||||
static lean_object* l_Lean_Meta_SplitIf_discharge_x3f___lambda__2___closed__7;
|
||||
static lean_object* l_Lean_Meta_SplitIf_initFn____x40_Lean_Meta_Tactic_SplitIf___hyg_5____closed__1;
|
||||
LEAN_EXPORT lean_object* l_Lean_Meta_splitIfLocalDecl_x3f(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
|
|
@ -115,6 +115,7 @@ static lean_object* l_Array_findSomeRevM_x3f_find___at_Lean_Meta_SplitIf_dischar
|
|||
LEAN_EXPORT lean_object* l_Lean_commitWhenSome_x3f___at_Lean_Meta_splitIfLocalDecl_x3f___spec__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
static lean_object* l_Lean_LazyInitExtension_get___at_Lean_Meta_SplitIf_getSimpContext___spec__1___closed__8;
|
||||
lean_object* l_Lean_Meta_SavedState_restore(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
extern lean_object* l_Lean_NameSet_empty;
|
||||
extern lean_object* l_Std_PersistentHashMap_empty___at_Lean_Meta_Instances_instanceNames___default___spec__1;
|
||||
lean_object* l_instBEqProd___rarg(lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
static lean_object* l_Lean_LazyInitExtension_get___at_Lean_Meta_SplitIf_getSimpContext___spec__1___closed__1;
|
||||
|
|
@ -137,7 +138,7 @@ static lean_object* l_Lean_Meta_simpIfTarget___closed__1;
|
|||
LEAN_EXPORT lean_object* l_Lean_Meta_SplitIf_discharge_x3f(uint8_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
static lean_object* l_Lean_Meta_SplitIf_discharge_x3f___closed__10;
|
||||
static lean_object* l_Lean_LazyInitExtension_get___at_Lean_Meta_SplitIf_getSimpContext___spec__1___closed__9;
|
||||
lean_object* l_Lean_Meta_simpLocalDecl(lean_object*, lean_object*, lean_object*, lean_object*, uint8_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Meta_simpLocalDecl(lean_object*, lean_object*, lean_object*, lean_object*, uint8_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
LEAN_EXPORT lean_object* l_Lean_Meta_simpIfTarget(lean_object*, uint8_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
LEAN_EXPORT lean_object* l_Lean_commitWhenSome_x3f___at_Lean_Meta_splitIfTarget_x3f___spec__1___at_Lean_Meta_splitIfTarget_x3f___spec__2(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
LEAN_EXPORT lean_object* l_Lean_Meta_simpIfTarget___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
|
|
@ -342,149 +343,153 @@ lean_dec(x_6);
|
|||
x_27 = !lean_is_exclusive(x_26);
|
||||
if (x_27 == 0)
|
||||
{
|
||||
lean_object* x_28; lean_object* x_29; lean_object* x_30; lean_object* x_31; lean_object* x_32; lean_object* x_33; lean_object* x_34;
|
||||
lean_object* x_28; lean_object* x_29; lean_object* x_30; lean_object* x_31; lean_object* x_32; lean_object* x_33; lean_object* x_34; lean_object* x_35;
|
||||
x_28 = lean_ctor_get(x_26, 0);
|
||||
x_29 = l_Lean_Meta_SplitIf_initFn____x40_Lean_Meta_Tactic_SplitIf___hyg_5____lambda__1___closed__8;
|
||||
x_30 = lean_array_push(x_29, x_24);
|
||||
x_31 = lean_box(0);
|
||||
x_32 = l_Lean_Meta_SplitIf_initFn____x40_Lean_Meta_Tactic_SplitIf___hyg_5____lambda__1___closed__7;
|
||||
x_33 = lean_unsigned_to_nat(0u);
|
||||
x_34 = lean_alloc_ctor(0, 5, 0);
|
||||
lean_ctor_set(x_34, 0, x_32);
|
||||
lean_ctor_set(x_34, 1, x_30);
|
||||
lean_ctor_set(x_34, 2, x_28);
|
||||
lean_ctor_set(x_34, 3, x_31);
|
||||
lean_ctor_set(x_34, 4, x_33);
|
||||
lean_ctor_set(x_26, 0, x_34);
|
||||
x_32 = lean_box(0);
|
||||
x_33 = l_Lean_Meta_SplitIf_initFn____x40_Lean_Meta_Tactic_SplitIf___hyg_5____lambda__1___closed__7;
|
||||
x_34 = lean_unsigned_to_nat(0u);
|
||||
x_35 = lean_alloc_ctor(0, 6, 0);
|
||||
lean_ctor_set(x_35, 0, x_33);
|
||||
lean_ctor_set(x_35, 1, x_30);
|
||||
lean_ctor_set(x_35, 2, x_28);
|
||||
lean_ctor_set(x_35, 3, x_31);
|
||||
lean_ctor_set(x_35, 4, x_32);
|
||||
lean_ctor_set(x_35, 5, x_34);
|
||||
lean_ctor_set(x_26, 0, x_35);
|
||||
return x_26;
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_35; lean_object* x_36; lean_object* x_37; lean_object* x_38; lean_object* x_39; lean_object* x_40; lean_object* x_41; lean_object* x_42; lean_object* x_43;
|
||||
x_35 = lean_ctor_get(x_26, 0);
|
||||
x_36 = lean_ctor_get(x_26, 1);
|
||||
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;
|
||||
x_36 = lean_ctor_get(x_26, 0);
|
||||
x_37 = lean_ctor_get(x_26, 1);
|
||||
lean_inc(x_37);
|
||||
lean_inc(x_36);
|
||||
lean_inc(x_35);
|
||||
lean_dec(x_26);
|
||||
x_37 = l_Lean_Meta_SplitIf_initFn____x40_Lean_Meta_Tactic_SplitIf___hyg_5____lambda__1___closed__8;
|
||||
x_38 = lean_array_push(x_37, x_24);
|
||||
x_39 = lean_box(0);
|
||||
x_40 = l_Lean_Meta_SplitIf_initFn____x40_Lean_Meta_Tactic_SplitIf___hyg_5____lambda__1___closed__7;
|
||||
x_41 = lean_unsigned_to_nat(0u);
|
||||
x_42 = lean_alloc_ctor(0, 5, 0);
|
||||
lean_ctor_set(x_42, 0, x_40);
|
||||
lean_ctor_set(x_42, 1, x_38);
|
||||
lean_ctor_set(x_42, 2, x_35);
|
||||
lean_ctor_set(x_42, 3, x_39);
|
||||
lean_ctor_set(x_42, 4, x_41);
|
||||
x_43 = lean_alloc_ctor(0, 2, 0);
|
||||
lean_ctor_set(x_43, 0, x_42);
|
||||
lean_ctor_set(x_43, 1, x_36);
|
||||
return x_43;
|
||||
x_38 = l_Lean_Meta_SplitIf_initFn____x40_Lean_Meta_Tactic_SplitIf___hyg_5____lambda__1___closed__8;
|
||||
x_39 = lean_array_push(x_38, x_24);
|
||||
x_40 = lean_box(0);
|
||||
x_41 = lean_box(0);
|
||||
x_42 = l_Lean_Meta_SplitIf_initFn____x40_Lean_Meta_Tactic_SplitIf___hyg_5____lambda__1___closed__7;
|
||||
x_43 = lean_unsigned_to_nat(0u);
|
||||
x_44 = lean_alloc_ctor(0, 6, 0);
|
||||
lean_ctor_set(x_44, 0, x_42);
|
||||
lean_ctor_set(x_44, 1, x_39);
|
||||
lean_ctor_set(x_44, 2, x_36);
|
||||
lean_ctor_set(x_44, 3, x_40);
|
||||
lean_ctor_set(x_44, 4, x_41);
|
||||
lean_ctor_set(x_44, 5, x_43);
|
||||
x_45 = lean_alloc_ctor(0, 2, 0);
|
||||
lean_ctor_set(x_45, 0, x_44);
|
||||
lean_ctor_set(x_45, 1, x_37);
|
||||
return x_45;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
uint8_t x_44;
|
||||
uint8_t x_46;
|
||||
lean_dec(x_6);
|
||||
x_44 = !lean_is_exclusive(x_23);
|
||||
if (x_44 == 0)
|
||||
x_46 = !lean_is_exclusive(x_23);
|
||||
if (x_46 == 0)
|
||||
{
|
||||
return x_23;
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_45; lean_object* x_46; lean_object* x_47;
|
||||
x_45 = lean_ctor_get(x_23, 0);
|
||||
x_46 = lean_ctor_get(x_23, 1);
|
||||
lean_inc(x_46);
|
||||
lean_inc(x_45);
|
||||
lean_object* x_47; lean_object* x_48; lean_object* x_49;
|
||||
x_47 = lean_ctor_get(x_23, 0);
|
||||
x_48 = lean_ctor_get(x_23, 1);
|
||||
lean_inc(x_48);
|
||||
lean_inc(x_47);
|
||||
lean_dec(x_23);
|
||||
x_47 = lean_alloc_ctor(1, 2, 0);
|
||||
lean_ctor_set(x_47, 0, x_45);
|
||||
lean_ctor_set(x_47, 1, x_46);
|
||||
return x_47;
|
||||
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_48;
|
||||
uint8_t x_50;
|
||||
lean_dec(x_6);
|
||||
lean_dec(x_5);
|
||||
lean_dec(x_4);
|
||||
lean_dec(x_3);
|
||||
x_48 = !lean_is_exclusive(x_19);
|
||||
if (x_48 == 0)
|
||||
x_50 = !lean_is_exclusive(x_19);
|
||||
if (x_50 == 0)
|
||||
{
|
||||
return x_19;
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_49; lean_object* x_50; lean_object* x_51;
|
||||
x_49 = lean_ctor_get(x_19, 0);
|
||||
x_50 = lean_ctor_get(x_19, 1);
|
||||
lean_inc(x_50);
|
||||
lean_inc(x_49);
|
||||
lean_object* x_51; lean_object* x_52; lean_object* x_53;
|
||||
x_51 = lean_ctor_get(x_19, 0);
|
||||
x_52 = lean_ctor_get(x_19, 1);
|
||||
lean_inc(x_52);
|
||||
lean_inc(x_51);
|
||||
lean_dec(x_19);
|
||||
x_51 = lean_alloc_ctor(1, 2, 0);
|
||||
lean_ctor_set(x_51, 0, x_49);
|
||||
lean_ctor_set(x_51, 1, x_50);
|
||||
return x_51;
|
||||
x_53 = lean_alloc_ctor(1, 2, 0);
|
||||
lean_ctor_set(x_53, 0, x_51);
|
||||
lean_ctor_set(x_53, 1, x_52);
|
||||
return x_53;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
uint8_t x_52;
|
||||
uint8_t x_54;
|
||||
lean_dec(x_6);
|
||||
lean_dec(x_5);
|
||||
lean_dec(x_4);
|
||||
lean_dec(x_3);
|
||||
x_52 = !lean_is_exclusive(x_15);
|
||||
if (x_52 == 0)
|
||||
x_54 = !lean_is_exclusive(x_15);
|
||||
if (x_54 == 0)
|
||||
{
|
||||
return x_15;
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_53; lean_object* x_54; lean_object* x_55;
|
||||
x_53 = lean_ctor_get(x_15, 0);
|
||||
x_54 = lean_ctor_get(x_15, 1);
|
||||
lean_inc(x_54);
|
||||
lean_inc(x_53);
|
||||
lean_object* x_55; lean_object* x_56; lean_object* x_57;
|
||||
x_55 = lean_ctor_get(x_15, 0);
|
||||
x_56 = lean_ctor_get(x_15, 1);
|
||||
lean_inc(x_56);
|
||||
lean_inc(x_55);
|
||||
lean_dec(x_15);
|
||||
x_55 = lean_alloc_ctor(1, 2, 0);
|
||||
lean_ctor_set(x_55, 0, x_53);
|
||||
lean_ctor_set(x_55, 1, x_54);
|
||||
return x_55;
|
||||
x_57 = lean_alloc_ctor(1, 2, 0);
|
||||
lean_ctor_set(x_57, 0, x_55);
|
||||
lean_ctor_set(x_57, 1, x_56);
|
||||
return x_57;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
uint8_t x_56;
|
||||
uint8_t x_58;
|
||||
lean_dec(x_6);
|
||||
lean_dec(x_5);
|
||||
lean_dec(x_4);
|
||||
lean_dec(x_3);
|
||||
x_56 = !lean_is_exclusive(x_11);
|
||||
if (x_56 == 0)
|
||||
x_58 = !lean_is_exclusive(x_11);
|
||||
if (x_58 == 0)
|
||||
{
|
||||
return x_11;
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_57; lean_object* x_58; lean_object* x_59;
|
||||
x_57 = lean_ctor_get(x_11, 0);
|
||||
x_58 = lean_ctor_get(x_11, 1);
|
||||
lean_inc(x_58);
|
||||
lean_inc(x_57);
|
||||
lean_object* x_59; lean_object* x_60; lean_object* x_61;
|
||||
x_59 = lean_ctor_get(x_11, 0);
|
||||
x_60 = lean_ctor_get(x_11, 1);
|
||||
lean_inc(x_60);
|
||||
lean_inc(x_59);
|
||||
lean_dec(x_11);
|
||||
x_59 = lean_alloc_ctor(1, 2, 0);
|
||||
lean_ctor_set(x_59, 0, x_57);
|
||||
lean_ctor_set(x_59, 1, x_58);
|
||||
return x_59;
|
||||
x_61 = lean_alloc_ctor(1, 2, 0);
|
||||
lean_ctor_set(x_61, 0, x_59);
|
||||
lean_ctor_set(x_61, 1, x_60);
|
||||
return x_61;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -3772,7 +3777,7 @@ lean_inc(x_3);
|
|||
x_9 = l_Lean_LazyInitExtension_get___at_Lean_Meta_SplitIf_getSimpContext___spec__1(x_8, x_3, x_4, x_5, x_6, x_7);
|
||||
if (lean_obj_tag(x_9) == 0)
|
||||
{
|
||||
lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; uint8_t x_15; lean_object* x_16;
|
||||
lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; uint8_t x_15; lean_object* x_16; lean_object* x_17;
|
||||
x_10 = lean_ctor_get(x_9, 0);
|
||||
lean_inc(x_10);
|
||||
x_11 = lean_ctor_get(x_9, 1);
|
||||
|
|
@ -3784,113 +3789,117 @@ lean_closure_set(x_13, 0, x_12);
|
|||
x_14 = lean_alloc_ctor(1, 1, 0);
|
||||
lean_ctor_set(x_14, 0, x_13);
|
||||
x_15 = 0;
|
||||
x_16 = l_Lean_NameSet_empty;
|
||||
lean_inc(x_6);
|
||||
lean_inc(x_5);
|
||||
lean_inc(x_4);
|
||||
lean_inc(x_3);
|
||||
x_16 = l_Lean_Meta_simpTarget(x_1, x_10, x_14, x_15, x_3, x_4, x_5, x_6, x_11);
|
||||
if (lean_obj_tag(x_16) == 0)
|
||||
{
|
||||
lean_object* x_17;
|
||||
x_17 = lean_ctor_get(x_16, 0);
|
||||
lean_inc(x_17);
|
||||
x_17 = l_Lean_Meta_simpTarget(x_1, x_10, x_14, x_15, x_16, x_3, x_4, x_5, x_6, x_11);
|
||||
if (lean_obj_tag(x_17) == 0)
|
||||
{
|
||||
lean_object* x_18; lean_object* x_19; lean_object* x_20;
|
||||
x_18 = lean_ctor_get(x_16, 1);
|
||||
lean_object* x_18; lean_object* x_19;
|
||||
x_18 = lean_ctor_get(x_17, 0);
|
||||
lean_inc(x_18);
|
||||
lean_dec(x_16);
|
||||
x_19 = l_Lean_Meta_simpIfTarget___closed__4;
|
||||
x_20 = l_panic___at_Lean_Meta_subst_substEq___spec__1(x_19, x_3, x_4, x_5, x_6, x_18);
|
||||
return x_20;
|
||||
x_19 = lean_ctor_get(x_18, 0);
|
||||
lean_inc(x_19);
|
||||
lean_dec(x_18);
|
||||
if (lean_obj_tag(x_19) == 0)
|
||||
{
|
||||
lean_object* x_20; lean_object* x_21; lean_object* x_22;
|
||||
x_20 = lean_ctor_get(x_17, 1);
|
||||
lean_inc(x_20);
|
||||
lean_dec(x_17);
|
||||
x_21 = l_Lean_Meta_simpIfTarget___closed__4;
|
||||
x_22 = l_panic___at_Lean_Meta_subst_substEq___spec__1(x_21, x_3, x_4, x_5, x_6, x_20);
|
||||
return x_22;
|
||||
}
|
||||
else
|
||||
{
|
||||
uint8_t x_21;
|
||||
uint8_t x_23;
|
||||
lean_dec(x_6);
|
||||
lean_dec(x_5);
|
||||
lean_dec(x_4);
|
||||
lean_dec(x_3);
|
||||
x_21 = !lean_is_exclusive(x_16);
|
||||
if (x_21 == 0)
|
||||
x_23 = !lean_is_exclusive(x_17);
|
||||
if (x_23 == 0)
|
||||
{
|
||||
lean_object* x_22; lean_object* x_23;
|
||||
x_22 = lean_ctor_get(x_16, 0);
|
||||
lean_dec(x_22);
|
||||
x_23 = lean_ctor_get(x_17, 0);
|
||||
lean_inc(x_23);
|
||||
lean_dec(x_17);
|
||||
lean_ctor_set(x_16, 0, x_23);
|
||||
return x_16;
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_24; lean_object* x_25; lean_object* x_26;
|
||||
x_24 = lean_ctor_get(x_16, 1);
|
||||
lean_inc(x_24);
|
||||
lean_dec(x_16);
|
||||
x_25 = lean_ctor_get(x_17, 0);
|
||||
lean_object* x_24; lean_object* x_25;
|
||||
x_24 = lean_ctor_get(x_17, 0);
|
||||
lean_dec(x_24);
|
||||
x_25 = lean_ctor_get(x_19, 0);
|
||||
lean_inc(x_25);
|
||||
lean_dec(x_19);
|
||||
lean_ctor_set(x_17, 0, x_25);
|
||||
return x_17;
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_26; lean_object* x_27; lean_object* x_28;
|
||||
x_26 = lean_ctor_get(x_17, 1);
|
||||
lean_inc(x_26);
|
||||
lean_dec(x_17);
|
||||
x_26 = lean_alloc_ctor(0, 2, 0);
|
||||
lean_ctor_set(x_26, 0, x_25);
|
||||
lean_ctor_set(x_26, 1, x_24);
|
||||
return x_26;
|
||||
x_27 = lean_ctor_get(x_19, 0);
|
||||
lean_inc(x_27);
|
||||
lean_dec(x_19);
|
||||
x_28 = lean_alloc_ctor(0, 2, 0);
|
||||
lean_ctor_set(x_28, 0, x_27);
|
||||
lean_ctor_set(x_28, 1, x_26);
|
||||
return x_28;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
uint8_t x_27;
|
||||
uint8_t x_29;
|
||||
lean_dec(x_6);
|
||||
lean_dec(x_5);
|
||||
lean_dec(x_4);
|
||||
lean_dec(x_3);
|
||||
x_27 = !lean_is_exclusive(x_16);
|
||||
if (x_27 == 0)
|
||||
x_29 = !lean_is_exclusive(x_17);
|
||||
if (x_29 == 0)
|
||||
{
|
||||
return x_16;
|
||||
return x_17;
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_28; lean_object* x_29; lean_object* x_30;
|
||||
x_28 = lean_ctor_get(x_16, 0);
|
||||
x_29 = lean_ctor_get(x_16, 1);
|
||||
lean_inc(x_29);
|
||||
lean_inc(x_28);
|
||||
lean_dec(x_16);
|
||||
x_30 = lean_alloc_ctor(1, 2, 0);
|
||||
lean_ctor_set(x_30, 0, x_28);
|
||||
lean_ctor_set(x_30, 1, x_29);
|
||||
return x_30;
|
||||
lean_object* x_30; lean_object* x_31; lean_object* x_32;
|
||||
x_30 = lean_ctor_get(x_17, 0);
|
||||
x_31 = lean_ctor_get(x_17, 1);
|
||||
lean_inc(x_31);
|
||||
lean_inc(x_30);
|
||||
lean_dec(x_17);
|
||||
x_32 = lean_alloc_ctor(1, 2, 0);
|
||||
lean_ctor_set(x_32, 0, x_30);
|
||||
lean_ctor_set(x_32, 1, x_31);
|
||||
return x_32;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
uint8_t x_31;
|
||||
uint8_t x_33;
|
||||
lean_dec(x_6);
|
||||
lean_dec(x_5);
|
||||
lean_dec(x_4);
|
||||
lean_dec(x_3);
|
||||
lean_dec(x_1);
|
||||
x_31 = !lean_is_exclusive(x_9);
|
||||
if (x_31 == 0)
|
||||
x_33 = !lean_is_exclusive(x_9);
|
||||
if (x_33 == 0)
|
||||
{
|
||||
return x_9;
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_32; lean_object* x_33; lean_object* x_34;
|
||||
x_32 = lean_ctor_get(x_9, 0);
|
||||
x_33 = lean_ctor_get(x_9, 1);
|
||||
lean_inc(x_33);
|
||||
lean_inc(x_32);
|
||||
lean_object* x_34; lean_object* x_35; lean_object* x_36;
|
||||
x_34 = lean_ctor_get(x_9, 0);
|
||||
x_35 = lean_ctor_get(x_9, 1);
|
||||
lean_inc(x_35);
|
||||
lean_inc(x_34);
|
||||
lean_dec(x_9);
|
||||
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_36 = lean_alloc_ctor(1, 2, 0);
|
||||
lean_ctor_set(x_36, 0, x_34);
|
||||
lean_ctor_set(x_36, 1, x_35);
|
||||
return x_36;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -3959,7 +3968,7 @@ lean_inc(x_3);
|
|||
x_9 = l_Lean_LazyInitExtension_get___at_Lean_Meta_SplitIf_getSimpContext___spec__1(x_8, x_3, x_4, x_5, x_6, x_7);
|
||||
if (lean_obj_tag(x_9) == 0)
|
||||
{
|
||||
lean_object* x_10; lean_object* x_11; lean_object* x_12; uint8_t x_13; lean_object* x_14;
|
||||
lean_object* x_10; lean_object* x_11; lean_object* x_12; uint8_t x_13; lean_object* x_14; lean_object* x_15;
|
||||
x_10 = lean_ctor_get(x_9, 0);
|
||||
lean_inc(x_10);
|
||||
x_11 = lean_ctor_get(x_9, 1);
|
||||
|
|
@ -3967,117 +3976,121 @@ lean_inc(x_11);
|
|||
lean_dec(x_9);
|
||||
x_12 = l_Lean_Meta_simpIfLocalDecl___closed__2;
|
||||
x_13 = 0;
|
||||
x_14 = l_Lean_NameSet_empty;
|
||||
lean_inc(x_6);
|
||||
lean_inc(x_5);
|
||||
lean_inc(x_4);
|
||||
lean_inc(x_3);
|
||||
x_14 = l_Lean_Meta_simpLocalDecl(x_1, x_2, x_10, x_12, x_13, x_3, x_4, x_5, x_6, x_11);
|
||||
if (lean_obj_tag(x_14) == 0)
|
||||
{
|
||||
lean_object* x_15;
|
||||
x_15 = lean_ctor_get(x_14, 0);
|
||||
lean_inc(x_15);
|
||||
x_15 = l_Lean_Meta_simpLocalDecl(x_1, x_2, x_10, x_12, x_13, x_14, x_3, x_4, x_5, x_6, x_11);
|
||||
if (lean_obj_tag(x_15) == 0)
|
||||
{
|
||||
lean_object* x_16; lean_object* x_17; lean_object* x_18;
|
||||
x_16 = lean_ctor_get(x_14, 1);
|
||||
lean_object* x_16; lean_object* x_17;
|
||||
x_16 = lean_ctor_get(x_15, 0);
|
||||
lean_inc(x_16);
|
||||
lean_dec(x_14);
|
||||
x_17 = l_Lean_Meta_simpIfLocalDecl___closed__4;
|
||||
x_18 = l_panic___at_Lean_Meta_subst_substEq___spec__1(x_17, x_3, x_4, x_5, x_6, x_16);
|
||||
return x_18;
|
||||
}
|
||||
else
|
||||
x_17 = lean_ctor_get(x_16, 0);
|
||||
lean_inc(x_17);
|
||||
lean_dec(x_16);
|
||||
if (lean_obj_tag(x_17) == 0)
|
||||
{
|
||||
lean_object* x_19; uint8_t x_20;
|
||||
lean_dec(x_6);
|
||||
lean_dec(x_5);
|
||||
lean_dec(x_4);
|
||||
lean_dec(x_3);
|
||||
x_19 = lean_ctor_get(x_15, 0);
|
||||
lean_inc(x_19);
|
||||
lean_object* x_18; lean_object* x_19; lean_object* x_20;
|
||||
x_18 = lean_ctor_get(x_15, 1);
|
||||
lean_inc(x_18);
|
||||
lean_dec(x_15);
|
||||
x_20 = !lean_is_exclusive(x_14);
|
||||
if (x_20 == 0)
|
||||
{
|
||||
lean_object* x_21; lean_object* x_22;
|
||||
x_21 = lean_ctor_get(x_14, 0);
|
||||
lean_dec(x_21);
|
||||
x_22 = lean_ctor_get(x_19, 1);
|
||||
lean_inc(x_22);
|
||||
lean_dec(x_19);
|
||||
lean_ctor_set(x_14, 0, x_22);
|
||||
return x_14;
|
||||
x_19 = l_Lean_Meta_simpIfLocalDecl___closed__4;
|
||||
x_20 = l_panic___at_Lean_Meta_subst_substEq___spec__1(x_19, x_3, x_4, x_5, x_6, x_18);
|
||||
return x_20;
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_23; lean_object* x_24; lean_object* x_25;
|
||||
x_23 = lean_ctor_get(x_14, 1);
|
||||
lean_inc(x_23);
|
||||
lean_dec(x_14);
|
||||
x_24 = lean_ctor_get(x_19, 1);
|
||||
lean_inc(x_24);
|
||||
lean_dec(x_19);
|
||||
x_25 = lean_alloc_ctor(0, 2, 0);
|
||||
lean_ctor_set(x_25, 0, x_24);
|
||||
lean_ctor_set(x_25, 1, x_23);
|
||||
return x_25;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
uint8_t x_26;
|
||||
lean_object* x_21; uint8_t x_22;
|
||||
lean_dec(x_6);
|
||||
lean_dec(x_5);
|
||||
lean_dec(x_4);
|
||||
lean_dec(x_3);
|
||||
x_26 = !lean_is_exclusive(x_14);
|
||||
if (x_26 == 0)
|
||||
x_21 = lean_ctor_get(x_17, 0);
|
||||
lean_inc(x_21);
|
||||
lean_dec(x_17);
|
||||
x_22 = !lean_is_exclusive(x_15);
|
||||
if (x_22 == 0)
|
||||
{
|
||||
return x_14;
|
||||
lean_object* x_23; lean_object* x_24;
|
||||
x_23 = lean_ctor_get(x_15, 0);
|
||||
lean_dec(x_23);
|
||||
x_24 = lean_ctor_get(x_21, 1);
|
||||
lean_inc(x_24);
|
||||
lean_dec(x_21);
|
||||
lean_ctor_set(x_15, 0, x_24);
|
||||
return x_15;
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_27; lean_object* x_28; lean_object* x_29;
|
||||
x_27 = lean_ctor_get(x_14, 0);
|
||||
x_28 = lean_ctor_get(x_14, 1);
|
||||
lean_inc(x_28);
|
||||
lean_inc(x_27);
|
||||
lean_dec(x_14);
|
||||
x_29 = lean_alloc_ctor(1, 2, 0);
|
||||
lean_ctor_set(x_29, 0, x_27);
|
||||
lean_ctor_set(x_29, 1, x_28);
|
||||
return x_29;
|
||||
lean_object* x_25; lean_object* x_26; lean_object* x_27;
|
||||
x_25 = lean_ctor_get(x_15, 1);
|
||||
lean_inc(x_25);
|
||||
lean_dec(x_15);
|
||||
x_26 = lean_ctor_get(x_21, 1);
|
||||
lean_inc(x_26);
|
||||
lean_dec(x_21);
|
||||
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_30;
|
||||
uint8_t x_28;
|
||||
lean_dec(x_6);
|
||||
lean_dec(x_5);
|
||||
lean_dec(x_4);
|
||||
lean_dec(x_3);
|
||||
x_28 = !lean_is_exclusive(x_15);
|
||||
if (x_28 == 0)
|
||||
{
|
||||
return x_15;
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_29; lean_object* x_30; lean_object* x_31;
|
||||
x_29 = lean_ctor_get(x_15, 0);
|
||||
x_30 = lean_ctor_get(x_15, 1);
|
||||
lean_inc(x_30);
|
||||
lean_inc(x_29);
|
||||
lean_dec(x_15);
|
||||
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_32;
|
||||
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_30 = !lean_is_exclusive(x_9);
|
||||
if (x_30 == 0)
|
||||
x_32 = !lean_is_exclusive(x_9);
|
||||
if (x_32 == 0)
|
||||
{
|
||||
return x_9;
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_31; lean_object* x_32; lean_object* x_33;
|
||||
x_31 = lean_ctor_get(x_9, 0);
|
||||
x_32 = lean_ctor_get(x_9, 1);
|
||||
lean_inc(x_32);
|
||||
lean_inc(x_31);
|
||||
lean_object* x_33; lean_object* x_34; lean_object* x_35;
|
||||
x_33 = lean_ctor_get(x_9, 0);
|
||||
x_34 = lean_ctor_get(x_9, 1);
|
||||
lean_inc(x_34);
|
||||
lean_inc(x_33);
|
||||
lean_dec(x_9);
|
||||
x_33 = lean_alloc_ctor(1, 2, 0);
|
||||
lean_ctor_set(x_33, 0, x_31);
|
||||
lean_ctor_set(x_33, 1, x_32);
|
||||
return x_33;
|
||||
x_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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -6201,7 +6214,7 @@ x_10 = l_Lean_commitWhenSome_x3f___at_Lean_Meta_splitIfLocalDecl_x3f___spec__1__
|
|||
return x_10;
|
||||
}
|
||||
}
|
||||
LEAN_EXPORT lean_object* l_Lean_Meta_initFn____x40_Lean_Meta_Tactic_SplitIf___hyg_1453_(lean_object* x_1) {
|
||||
LEAN_EXPORT lean_object* l_Lean_Meta_initFn____x40_Lean_Meta_Tactic_SplitIf___hyg_1481_(lean_object* x_1) {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_2; uint8_t x_3; lean_object* x_4;
|
||||
|
|
@ -6373,7 +6386,7 @@ l_Lean_Meta_simpIfLocalDecl___closed__3 = _init_l_Lean_Meta_simpIfLocalDecl___cl
|
|||
lean_mark_persistent(l_Lean_Meta_simpIfLocalDecl___closed__3);
|
||||
l_Lean_Meta_simpIfLocalDecl___closed__4 = _init_l_Lean_Meta_simpIfLocalDecl___closed__4();
|
||||
lean_mark_persistent(l_Lean_Meta_simpIfLocalDecl___closed__4);
|
||||
res = l_Lean_Meta_initFn____x40_Lean_Meta_Tactic_SplitIf___hyg_1453_(lean_io_mk_world());
|
||||
res = l_Lean_Meta_initFn____x40_Lean_Meta_Tactic_SplitIf___hyg_1481_(lean_io_mk_world());
|
||||
if (lean_io_result_is_error(res)) return res;
|
||||
lean_dec_ref(res);
|
||||
return lean_io_result_mk_ok(lean_box(0));
|
||||
|
|
|
|||
836
stage0/stdlib/Lean/Meta/Tactic/Unfold.c
generated
836
stage0/stdlib/Lean/Meta/Tactic/Unfold.c
generated
File diff suppressed because it is too large
Load diff
1334
stage0/stdlib/Lean/PrettyPrinter/Delaborator/Builtins.c
generated
1334
stage0/stdlib/Lean/PrettyPrinter/Delaborator/Builtins.c
generated
File diff suppressed because it is too large
Load diff
1019
stage0/stdlib/Lean/ResolveName.c
generated
1019
stage0/stdlib/Lean/ResolveName.c
generated
File diff suppressed because it is too large
Load diff
Loading…
Add table
Reference in a new issue