chore: update stage0
This commit is contained in:
parent
b9dc76df35
commit
af4a88b615
16 changed files with 13157 additions and 1226 deletions
|
|
@ -80,6 +80,7 @@ def inferType (ref : Syntax) (e : Expr) : TacticM Expr := liftTermElabM $ Term.i
|
|||
def whnf (ref : Syntax) (e : Expr) : TacticM Expr := liftTermElabM $ Term.whnf ref e
|
||||
def whnfCore (ref : Syntax) (e : Expr) : TacticM Expr := liftTermElabM $ Term.whnfCore ref e
|
||||
def unfoldDefinition? (ref : Syntax) (e : Expr) : TacticM (Option Expr) := liftTermElabM $ Term.unfoldDefinition? ref e
|
||||
def resolveGlobalName (n : Name) : TacticM (List (Name × List String)) := liftTermElabM $ Term.resolveGlobalName n
|
||||
|
||||
/-- Collect unassigned metavariables -/
|
||||
def collectMVars (ref : Syntax) (e : Expr) : TacticM (List MVarId) := do
|
||||
|
|
@ -283,14 +284,17 @@ def done (ref : Syntax) : TacticM Unit := do
|
|||
gs ← getUnsolvedGoals;
|
||||
unless gs.isEmpty $ reportUnsolvedGoals ref gs
|
||||
|
||||
def focus {α} (ref : Syntax) (tactic : TacticM α) : TacticM α := do
|
||||
def focusAux {α} (ref : Syntax) (tactic : TacticM α) : TacticM α := do
|
||||
(g, gs) ← getMainGoal ref;
|
||||
setGoals [g];
|
||||
a ← tactic;
|
||||
done ref;
|
||||
setGoals gs;
|
||||
gs' ← getGoals;
|
||||
setGoals (gs' ++ gs);
|
||||
pure a
|
||||
|
||||
def focus {α} (ref : Syntax) (tactic : TacticM α) : TacticM α :=
|
||||
focusAux ref (do a ← tactic; done ref; pure a)
|
||||
|
||||
/--
|
||||
Use `parentTag` to tag untagged goals at `newGoals`.
|
||||
If there are multiple new goals, they are named using `<parentTag>.<newSuffix>_<idx>` where `idx > 0`.
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@ Authors: Leonardo de Moura, Sebastian Ullrich
|
|||
-/
|
||||
prelude
|
||||
import Init.Lean.Meta.RecursorInfo
|
||||
import Init.Lean.Meta.Tactic.Induction
|
||||
import Init.Lean.Elab.Tactic.ElabTerm
|
||||
import Init.Lean.Elab.Tactic.Generalize
|
||||
|
||||
|
|
@ -133,9 +134,20 @@ private partial def getRecFromUsingLoop (ref : Syntax) (baseRecName : Name) : Ex
|
|||
| none => continue majorType
|
||||
| _ => continue majorType
|
||||
|
||||
|
||||
def getRecFromUsing (ref : Syntax) (major : Expr) (baseRecName : Name) : TacticM Name := do
|
||||
throw $ arbitrary _
|
||||
def getRecFromUsing (ref : Syntax) (major : Expr) (baseRecName : Name) : TacticM Meta.RecursorInfo := do
|
||||
majorType ← inferType ref major;
|
||||
recInfo? ← getRecFromUsingLoop ref baseRecName majorType;
|
||||
match recInfo? with
|
||||
| some recInfo => pure recInfo
|
||||
| none => do
|
||||
result ← resolveGlobalName baseRecName;
|
||||
match result with
|
||||
| _::_::_ => throwError ref ("ambiguous recursor name '" ++ baseRecName ++ "', " ++ toString (result.map Prod.fst))
|
||||
| [(recName, [])] => do
|
||||
catch
|
||||
(liftMetaMAtMain ref $ fun _ => Meta.mkRecursorInfo recName)
|
||||
(fun _ => throwError ref ("invalid recursor name '" ++ baseRecName ++ "'"))
|
||||
| _ => throwError ref ("invalid recursor name '" ++ baseRecName ++ "'")
|
||||
|
||||
/-
|
||||
Recall that
|
||||
|
|
@ -178,20 +190,47 @@ if usingRecStx.isNone then do
|
|||
pure { recName := recName, altVars := altVars, altRHSs := altRHSs }
|
||||
else do
|
||||
let baseRecName := (usingRecStx.getIdAt 1).eraseMacroScopes;
|
||||
let recName := getRecFromUsing ref major baseRecName;
|
||||
-- TODO
|
||||
throw $ arbitrary _
|
||||
recInfo ← getRecFromUsing ref major baseRecName;
|
||||
let recName := recInfo.recursorName;
|
||||
if withAlts.isNone then pure { recName := recName }
|
||||
else do
|
||||
let alts := getAlts withAlts;
|
||||
paramNames ← liftMetaMAtMain ref $ fun _ => Meta.getParamNames recInfo.recursorName;
|
||||
(altVars, altRHSs, remainingAlts, _) ← paramNames.size.foldM
|
||||
(fun (i : Nat) (result : Array (List Name) × Array Syntax × Array Syntax × Option Syntax) =>
|
||||
if recInfo.isMinor i then
|
||||
let paramName := paramNames.get! i;
|
||||
let (altVars, altRHSs, remainingAlts, prevAnonymousAlt?) := result;
|
||||
match remainingAlts.findIdx? (fun alt => getAltName alt == paramName) with
|
||||
| some idx =>
|
||||
let newAlt := remainingAlts.get! idx;
|
||||
pure (altVars.push (getAltVarNames newAlt).toList, altRHSs.push (getAltRHS newAlt), remainingAlts.eraseIdx idx, prevAnonymousAlt?)
|
||||
| none => match remainingAlts.findIdx? (fun alt => getAltName alt == `_) with
|
||||
| some idx =>
|
||||
let newAlt := remainingAlts.get! idx;
|
||||
pure (altVars.push (getAltVarNames newAlt).toList, altRHSs.push (getAltRHS newAlt), remainingAlts.eraseIdx idx, some newAlt)
|
||||
| none => match prevAnonymousAlt? with
|
||||
| some alt =>
|
||||
pure (altVars.push (getAltVarNames alt).toList, altRHSs.push (getAltRHS alt), remainingAlts, prevAnonymousAlt?)
|
||||
| none => throwError ref ("alternative for minor premise '" ++ toString paramName ++ "' is missing")
|
||||
else
|
||||
pure result)
|
||||
(#[], #[], alts, none);
|
||||
unless remainingAlts.isEmpty $
|
||||
throwError (remainingAlts.get! 0) "unused alternative";
|
||||
pure { recName := recName, altVars := altVars, altRHSs := altRHSs }
|
||||
|
||||
@[builtinTactic «induction»] def evalInduction : Tactic :=
|
||||
fun stx => focus stx $ do
|
||||
fun stx => focusAux stx $ do
|
||||
let h? := getAuxHypothesisName stx;
|
||||
major ← elabMajor stx h? (getMajor stx);
|
||||
major ← generalizeMajor stx major;
|
||||
n ← generalizeVars stx major;
|
||||
recInfo ← getRecInfo stx major;
|
||||
goals ← getGoals;
|
||||
throwError stx ("WIP " ++ stx ++ major ++ ", n : " ++ toString n ++ Format.line ++ goalsToMessageData goals ++
|
||||
Format.line ++ toString recInfo.altVars ++ Format.line ++ toString recInfo.altRHSs)
|
||||
liftMetaTactic stx $ fun mvarId => do
|
||||
result ← Meta.induction mvarId major.fvarId! recInfo.recName recInfo.altVars;
|
||||
-- TODO: use RHS
|
||||
pure $ result.toList.map $ fun s => s.mvarId
|
||||
|
||||
end Tactic
|
||||
end Elab
|
||||
|
|
|
|||
|
|
@ -607,6 +607,14 @@ forallTelescopeReducingAux isClassExpensive type none k
|
|||
def forallBoundedTelescope {α} (type : Expr) (maxFVars? : Option Nat) (k : Array Expr → Expr → MetaM α) : MetaM α :=
|
||||
forallTelescopeReducingAux isClassExpensive type maxFVars? k
|
||||
|
||||
/-- Return the parameter names for the givel global declaration. -/
|
||||
def getParamNames (declName : Name) : MetaM (Array Name) := do
|
||||
cinfo ← getConstInfo declName;
|
||||
forallTelescopeReducing cinfo.type $ fun xs _ => do
|
||||
xs.mapM $ fun x => do
|
||||
localDecl ← getLocalDecl x.fvarId!;
|
||||
pure localDecl.userName
|
||||
|
||||
def isClass (type : Expr) : MetaM (Option Name) := do
|
||||
c? ← isClassQuick type;
|
||||
match c? with
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@ structure RecursorInfo :=
|
|||
(recursive : Bool)
|
||||
(numArgs : Nat) -- Total number of arguments
|
||||
(majorPos : Nat)
|
||||
(paramsPos : List (Option Nat)) -- Position of the recursor parameters in the major premise
|
||||
(paramsPos : List (Option Nat)) -- Position of the recursor parameters in the major premise, instance implicit arguments are `none`
|
||||
(indicesPos : List Nat) -- Position of the recursor indices in the major premise
|
||||
(produceMotive : List Bool) -- If the i-th element is true then i-th minor premise produces the motive
|
||||
|
||||
|
|
|
|||
|
|
@ -14,3 +14,4 @@ import Init.Lean.Meta.Tactic.Target
|
|||
import Init.Lean.Meta.Tactic.Rewrite
|
||||
import Init.Lean.Meta.Tactic.Generalize
|
||||
import Init.Lean.Meta.Tactic.LocalDecl
|
||||
import Init.Lean.Meta.Tactic.Induction
|
||||
|
|
|
|||
|
|
@ -33,5 +33,8 @@ withMVarContext mvarId $ do
|
|||
assignExprMVar mvarId newMVar;
|
||||
pure newMVar.mvarId!
|
||||
|
||||
def tryClear (mvarId : MVarId) (fvarId : FVarId) : MetaM MVarId :=
|
||||
clear mvarId fvarId <|> pure mvarId
|
||||
|
||||
end Meta
|
||||
end Lean
|
||||
|
|
|
|||
|
|
@ -17,6 +17,7 @@ def introNCoreAux {σ} (mvarId : MVarId) (mkName : LocalContext → Name → σ
|
|||
adaptReader (fun (ctx : Context) => { lctx := lctx, .. ctx }) $
|
||||
withNewLocalInstances isClassExpensive fvars j $ do
|
||||
tag ← getMVarTag mvarId;
|
||||
let type := type.headBeta;
|
||||
newMVar ← mkFreshExprSyntheticOpaqueMVar type tag;
|
||||
lctx ← getLCtx;
|
||||
newVal ← mkLambda fvars newMVar;
|
||||
|
|
@ -24,6 +25,7 @@ def introNCoreAux {σ} (mvarId : MVarId) (mkName : LocalContext → Name → σ
|
|||
pure $ (fvars, newMVar.mvarId!)
|
||||
| (i+1), lctx, fvars, j, s, Expr.letE n type val body _ => do
|
||||
let type := type.instantiateRevRange j fvars.size fvars;
|
||||
let type := type.headBeta;
|
||||
let val := val.instantiateRevRange j fvars.size fvars;
|
||||
fvarId ← mkFreshId;
|
||||
let (n, s) := mkName lctx n s;
|
||||
|
|
@ -33,6 +35,7 @@ def introNCoreAux {σ} (mvarId : MVarId) (mkName : LocalContext → Name → σ
|
|||
introNCoreAux i lctx fvars j s body
|
||||
| (i+1), lctx, fvars, j, s, Expr.forallE n type body c => do
|
||||
let type := type.instantiateRevRange j fvars.size fvars;
|
||||
let type := type.headBeta;
|
||||
fvarId ← mkFreshId;
|
||||
let (n, s) := mkName lctx n s;
|
||||
let lctx := lctx.mkLocalDecl fvarId n type c.binderInfo;
|
||||
|
|
|
|||
|
|
@ -551,12 +551,14 @@ public:
|
|||
unsigned minor_idx = 1;
|
||||
d_idx = 0;
|
||||
for (inductive_type const & ind_type : m_ind_types) {
|
||||
name ind_type_name = ind_type.get_name();
|
||||
for (constructor const & cnstr : ind_type.get_cnstrs()) {
|
||||
buffer<expr> b_u; // nonrec and rec args;
|
||||
buffer<expr> u; // rec args
|
||||
buffer<expr> v; // inductive args
|
||||
expr t = constructor_type(cnstr);
|
||||
unsigned i = 0;
|
||||
name cnstr_name = constructor_name(cnstr);
|
||||
expr t = constructor_type(cnstr);
|
||||
unsigned i = 0;
|
||||
while (is_pi(t)) {
|
||||
if (i < m_nparams) {
|
||||
t = instantiate(binding_body(t), m_params[i]);
|
||||
|
|
@ -572,7 +574,7 @@ public:
|
|||
buffer<expr> it_indices;
|
||||
unsigned it_idx = get_I_indices(t, it_indices);
|
||||
expr C_app = mk_app(m_rec_infos[it_idx].m_C, it_indices);
|
||||
expr intro_app = mk_app(mk_app(mk_constant(constructor_name(cnstr), m_levels), m_params), b_u);
|
||||
expr intro_app = mk_app(mk_app(mk_constant(cnstr_name, m_levels), m_params), b_u);
|
||||
C_app = mk_app(C_app, intro_app);
|
||||
/* populate v using u */
|
||||
for (unsigned i = 0; i < u.size(); i++) {
|
||||
|
|
@ -593,8 +595,9 @@ public:
|
|||
expr v_i = mk_local_decl(name("v").append_after(i), v_i_ty, binder_info());
|
||||
v.push_back(v_i);
|
||||
}
|
||||
expr minor_ty = mk_pi(b_u, mk_pi(v, C_app));
|
||||
expr minor = mk_local_decl(name("m").append_after(minor_idx), minor_ty);
|
||||
expr minor_ty = mk_pi(b_u, mk_pi(v, C_app));
|
||||
name minor_name = cnstr_name.replace_prefix(ind_type_name, name());
|
||||
expr minor = mk_local_decl(minor_name, minor_ty);
|
||||
m_rec_infos[d_idx].m_minors.push_back(minor);
|
||||
minor_idx++;
|
||||
}
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
|
|
@ -58,6 +58,7 @@ lean_object* l_PersistentHashMap_findAtAux___main___at_Lean_Elab_Tactic_evalTact
|
|||
lean_object* l_Lean_Elab_Tactic_getEnv(lean_object*);
|
||||
uint8_t lean_name_eq(lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Elab_Tactic_evalSkip(lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Elab_Tactic_focus___rarg___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
extern size_t l_PersistentHashMap_insertAux___main___rarg___closed__2;
|
||||
lean_object* l_Lean_Elab_Tactic_reportUnsolvedGoals(lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Elab_Tactic_evalClear(lean_object*, lean_object*, lean_object*);
|
||||
|
|
@ -71,6 +72,7 @@ lean_object* l_Lean_Elab_Tactic_monadQuotation___closed__2;
|
|||
lean_object* l___private_Init_Lean_Elab_Tactic_Basic_2__expandTacticMacroFns___main(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l___regBuiltinTactic_Lean_Elab_Tactic_evalSubst___closed__2;
|
||||
lean_object* l_Lean_Elab_Tactic_evalIntro___lambda__2___boxed(lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Elab_Tactic_resolveGlobalName(lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Elab_Tactic_liftMetaM___rarg(lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Elab_Tactic_evalCase___closed__1;
|
||||
lean_object* l_Lean_Elab_Tactic_done(lean_object*, lean_object*, lean_object*);
|
||||
|
|
@ -355,6 +357,7 @@ lean_object* l_Lean_Elab_Tactic_ensureHasNoMVars___closed__2;
|
|||
lean_object* l_Lean_Elab_Tactic_evalNestedTacticBlockCurly(lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_ReaderT_bind___at_Lean_Elab_Tactic_monadLog___spec__2(lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Elab_Tactic_liftMetaTactic___lambda__1___boxed(lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Elab_Tactic_focusAux(lean_object*);
|
||||
lean_object* l_Lean_Elab_Tactic_evalTactic___main(lean_object*, lean_object*, lean_object*);
|
||||
uint8_t l_Lean_Expr_hasMVar(lean_object*);
|
||||
lean_object* l___regBuiltinTactic_Lean_Elab_Tactic_evalSubst(lean_object*);
|
||||
|
|
@ -387,6 +390,7 @@ lean_object* l_Lean_Elab_Tactic_tagUntaggedGoals(lean_object*, lean_object*, lea
|
|||
extern lean_object* l_Lean_Parser_Tactic_orelse___elambda__1___closed__1;
|
||||
lean_object* l_Lean_Elab_Tactic_getOptions___boxed(lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Elab_Tactic_declareBuiltinTactic___closed__2;
|
||||
lean_object* l_Lean_Elab_Term_resolveGlobalName___boxed(lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l___regBuiltinTactic_Lean_Elab_Tactic_evalChoice___closed__2;
|
||||
lean_object* l_Lean_Elab_Tactic_withMVarContext___rarg___boxed(lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
uint8_t l_Lean_Name_isSuffixOf___main(lean_object*, lean_object*);
|
||||
|
|
@ -423,6 +427,7 @@ lean_object* l_Lean_Elab_Tactic_tacticElabAttribute___closed__5;
|
|||
lean_object* l_Lean_Elab_Tactic_liftMetaTacticAux(lean_object*);
|
||||
lean_object* l_Lean_Elab_Tactic_Lean_Elab_MonadMacroAdapter___closed__6;
|
||||
lean_object* l_Lean_Elab_Tactic_adaptExpander(lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Elab_Tactic_focusAux___rarg(lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Elab_Tactic_getFVarIds(lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Elab_log___at_Lean_Elab_Tactic_evalTraceState___spec__1(lean_object*, uint8_t, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Elab_Tactic_getEnv___rarg(lean_object*);
|
||||
|
|
@ -1628,6 +1633,16 @@ x_6 = l_Lean_Elab_Tactic_liftTermElabM___rarg(x_5, x_3, x_4);
|
|||
return x_6;
|
||||
}
|
||||
}
|
||||
lean_object* l_Lean_Elab_Tactic_resolveGlobalName(lean_object* x_1, lean_object* x_2, lean_object* x_3) {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_4; lean_object* x_5;
|
||||
x_4 = lean_alloc_closure((void*)(l_Lean_Elab_Term_resolveGlobalName___boxed), 3, 1);
|
||||
lean_closure_set(x_4, 0, x_1);
|
||||
x_5 = l_Lean_Elab_Tactic_liftTermElabM___rarg(x_4, x_2, x_3);
|
||||
return x_5;
|
||||
}
|
||||
}
|
||||
lean_object* _init_l_Lean_Elab_Tactic_collectMVars___closed__1() {
|
||||
_start:
|
||||
{
|
||||
|
|
@ -12665,12 +12680,11 @@ return x_20;
|
|||
}
|
||||
}
|
||||
}
|
||||
lean_object* l_Lean_Elab_Tactic_focus___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) {
|
||||
lean_object* l_Lean_Elab_Tactic_focusAux___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_5;
|
||||
lean_inc(x_3);
|
||||
lean_inc(x_1);
|
||||
x_5 = l_Lean_Elab_Tactic_getMainGoal(x_1, x_3, x_4);
|
||||
if (lean_obj_tag(x_5) == 0)
|
||||
{
|
||||
|
|
@ -12697,122 +12711,169 @@ lean_inc(x_3);
|
|||
x_14 = lean_apply_2(x_2, x_3, x_13);
|
||||
if (lean_obj_tag(x_14) == 0)
|
||||
{
|
||||
lean_object* x_15; lean_object* x_16; lean_object* x_17;
|
||||
lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; lean_object* x_20; lean_object* x_21; uint8_t x_22;
|
||||
x_15 = lean_ctor_get(x_14, 0);
|
||||
lean_inc(x_15);
|
||||
x_16 = lean_ctor_get(x_14, 1);
|
||||
lean_inc(x_16);
|
||||
lean_dec(x_14);
|
||||
lean_inc(x_3);
|
||||
x_17 = l_Lean_Elab_Tactic_done(x_1, x_3, x_16);
|
||||
if (lean_obj_tag(x_17) == 0)
|
||||
{
|
||||
lean_object* x_18; lean_object* x_19; uint8_t x_20;
|
||||
x_18 = lean_ctor_get(x_17, 1);
|
||||
x_17 = l_Lean_Elab_Tactic_getGoals___rarg(x_16);
|
||||
x_18 = lean_ctor_get(x_17, 0);
|
||||
lean_inc(x_18);
|
||||
x_19 = lean_ctor_get(x_17, 1);
|
||||
lean_inc(x_19);
|
||||
lean_dec(x_17);
|
||||
x_19 = l_Lean_Elab_Tactic_setGoals(x_9, x_3, x_18);
|
||||
x_20 = l_List_append___rarg(x_18, x_9);
|
||||
x_21 = l_Lean_Elab_Tactic_setGoals(x_20, x_3, x_19);
|
||||
lean_dec(x_3);
|
||||
x_20 = !lean_is_exclusive(x_19);
|
||||
if (x_20 == 0)
|
||||
x_22 = !lean_is_exclusive(x_21);
|
||||
if (x_22 == 0)
|
||||
{
|
||||
lean_object* x_21;
|
||||
x_21 = lean_ctor_get(x_19, 0);
|
||||
lean_object* x_23;
|
||||
x_23 = lean_ctor_get(x_21, 0);
|
||||
lean_dec(x_23);
|
||||
lean_ctor_set(x_21, 0, x_15);
|
||||
return x_21;
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_24; lean_object* x_25;
|
||||
x_24 = lean_ctor_get(x_21, 1);
|
||||
lean_inc(x_24);
|
||||
lean_dec(x_21);
|
||||
lean_ctor_set(x_19, 0, x_15);
|
||||
return x_19;
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_22; lean_object* x_23;
|
||||
x_22 = lean_ctor_get(x_19, 1);
|
||||
lean_inc(x_22);
|
||||
lean_dec(x_19);
|
||||
x_23 = lean_alloc_ctor(0, 2, 0);
|
||||
lean_ctor_set(x_23, 0, x_15);
|
||||
lean_ctor_set(x_23, 1, x_22);
|
||||
return x_23;
|
||||
x_25 = lean_alloc_ctor(0, 2, 0);
|
||||
lean_ctor_set(x_25, 0, x_15);
|
||||
lean_ctor_set(x_25, 1, x_24);
|
||||
return x_25;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
uint8_t x_24;
|
||||
lean_dec(x_15);
|
||||
uint8_t x_26;
|
||||
lean_dec(x_9);
|
||||
lean_dec(x_3);
|
||||
x_24 = !lean_is_exclusive(x_17);
|
||||
if (x_24 == 0)
|
||||
{
|
||||
return x_17;
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_25; lean_object* x_26; lean_object* x_27;
|
||||
x_25 = lean_ctor_get(x_17, 0);
|
||||
x_26 = lean_ctor_get(x_17, 1);
|
||||
lean_inc(x_26);
|
||||
lean_inc(x_25);
|
||||
lean_dec(x_17);
|
||||
x_27 = lean_alloc_ctor(1, 2, 0);
|
||||
lean_ctor_set(x_27, 0, x_25);
|
||||
lean_ctor_set(x_27, 1, x_26);
|
||||
return x_27;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
uint8_t x_28;
|
||||
lean_dec(x_9);
|
||||
lean_dec(x_3);
|
||||
lean_dec(x_1);
|
||||
x_28 = !lean_is_exclusive(x_14);
|
||||
if (x_28 == 0)
|
||||
x_26 = !lean_is_exclusive(x_14);
|
||||
if (x_26 == 0)
|
||||
{
|
||||
return x_14;
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_29; lean_object* x_30; lean_object* x_31;
|
||||
x_29 = lean_ctor_get(x_14, 0);
|
||||
x_30 = lean_ctor_get(x_14, 1);
|
||||
lean_inc(x_30);
|
||||
lean_inc(x_29);
|
||||
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_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;
|
||||
x_29 = lean_alloc_ctor(1, 2, 0);
|
||||
lean_ctor_set(x_29, 0, x_27);
|
||||
lean_ctor_set(x_29, 1, x_28);
|
||||
return x_29;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
uint8_t x_32;
|
||||
uint8_t x_30;
|
||||
lean_dec(x_3);
|
||||
lean_dec(x_2);
|
||||
lean_dec(x_1);
|
||||
x_32 = !lean_is_exclusive(x_5);
|
||||
if (x_32 == 0)
|
||||
x_30 = !lean_is_exclusive(x_5);
|
||||
if (x_30 == 0)
|
||||
{
|
||||
return x_5;
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_33; lean_object* x_34; lean_object* x_35;
|
||||
x_33 = lean_ctor_get(x_5, 0);
|
||||
x_34 = lean_ctor_get(x_5, 1);
|
||||
lean_inc(x_34);
|
||||
lean_inc(x_33);
|
||||
lean_object* x_31; lean_object* x_32; lean_object* x_33;
|
||||
x_31 = lean_ctor_get(x_5, 0);
|
||||
x_32 = lean_ctor_get(x_5, 1);
|
||||
lean_inc(x_32);
|
||||
lean_inc(x_31);
|
||||
lean_dec(x_5);
|
||||
x_35 = lean_alloc_ctor(1, 2, 0);
|
||||
lean_ctor_set(x_35, 0, x_33);
|
||||
lean_ctor_set(x_35, 1, x_34);
|
||||
return x_35;
|
||||
x_33 = lean_alloc_ctor(1, 2, 0);
|
||||
lean_ctor_set(x_33, 0, x_31);
|
||||
lean_ctor_set(x_33, 1, x_32);
|
||||
return x_33;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
lean_object* l_Lean_Elab_Tactic_focusAux(lean_object* x_1) {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_2;
|
||||
x_2 = lean_alloc_closure((void*)(l_Lean_Elab_Tactic_focusAux___rarg), 4, 0);
|
||||
return x_2;
|
||||
}
|
||||
}
|
||||
lean_object* l_Lean_Elab_Tactic_focus___rarg___lambda__1(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_5;
|
||||
x_5 = l_Lean_Elab_Tactic_done(x_1, x_3, x_4);
|
||||
if (lean_obj_tag(x_5) == 0)
|
||||
{
|
||||
uint8_t x_6;
|
||||
x_6 = !lean_is_exclusive(x_5);
|
||||
if (x_6 == 0)
|
||||
{
|
||||
lean_object* x_7;
|
||||
x_7 = lean_ctor_get(x_5, 0);
|
||||
lean_dec(x_7);
|
||||
lean_ctor_set(x_5, 0, x_2);
|
||||
return x_5;
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_8; lean_object* x_9;
|
||||
x_8 = lean_ctor_get(x_5, 1);
|
||||
lean_inc(x_8);
|
||||
lean_dec(x_5);
|
||||
x_9 = lean_alloc_ctor(0, 2, 0);
|
||||
lean_ctor_set(x_9, 0, x_2);
|
||||
lean_ctor_set(x_9, 1, x_8);
|
||||
return x_9;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
uint8_t x_10;
|
||||
lean_dec(x_2);
|
||||
x_10 = !lean_is_exclusive(x_5);
|
||||
if (x_10 == 0)
|
||||
{
|
||||
return x_5;
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_11; lean_object* x_12; lean_object* x_13;
|
||||
x_11 = lean_ctor_get(x_5, 0);
|
||||
x_12 = lean_ctor_get(x_5, 1);
|
||||
lean_inc(x_12);
|
||||
lean_inc(x_11);
|
||||
lean_dec(x_5);
|
||||
x_13 = lean_alloc_ctor(1, 2, 0);
|
||||
lean_ctor_set(x_13, 0, x_11);
|
||||
lean_ctor_set(x_13, 1, x_12);
|
||||
return x_13;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
lean_object* l_Lean_Elab_Tactic_focus___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_5; lean_object* x_6; lean_object* x_7;
|
||||
lean_inc(x_1);
|
||||
x_5 = lean_alloc_closure((void*)(l_Lean_Elab_Tactic_focus___rarg___lambda__1), 4, 1);
|
||||
lean_closure_set(x_5, 0, x_1);
|
||||
x_6 = lean_alloc_closure((void*)(l_ReaderT_bind___at_Lean_Elab_Tactic_monadLog___spec__2___rarg), 4, 2);
|
||||
lean_closure_set(x_6, 0, x_2);
|
||||
lean_closure_set(x_6, 1, x_5);
|
||||
x_7 = l_Lean_Elab_Tactic_focusAux___rarg(x_1, x_6, x_3, x_4);
|
||||
return x_7;
|
||||
}
|
||||
}
|
||||
lean_object* l_Lean_Elab_Tactic_focus(lean_object* x_1) {
|
||||
_start:
|
||||
{
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
|
|
@ -35,6 +35,7 @@ lean_object* l_Lean_Meta_withNewLocalInstances___main___at_Lean_Meta_forallTeles
|
|||
lean_object* l_Lean_Meta_getLocalInstances___boxed(lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Meta_mkFreshLevelMVarId___rarg(lean_object*);
|
||||
lean_object* l_ReaderT_pure___at_Lean_Meta_MetaExtState_inhabited___spec__1___rarg(lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_LocalDecl_userName(lean_object*);
|
||||
lean_object* l_unreachable_x21___rarg(lean_object*);
|
||||
lean_object* l_Lean_Meta_isClassExpensive___main(lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Meta_throwBug(lean_object*);
|
||||
|
|
@ -78,6 +79,7 @@ lean_object* l_Lean_Meta_withNewLocalInstances___main___at_Lean_Meta_forallTeles
|
|||
lean_object* l_Lean_Meta_lambdaTelescope(lean_object*);
|
||||
lean_object* l_Lean_Meta_elimMVarDeps(lean_object*, lean_object*, uint8_t, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_MetavarContext_setMVarKind(lean_object*, lean_object*, uint8_t);
|
||||
lean_object* l_Lean_Meta_getParamNames___closed__1;
|
||||
lean_object* l_Lean_Meta_withNewLocalInstances___main___at_Lean_Meta_forallTelescopeReducing___spec__5___rarg___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* lean_dbg_trace(lean_object*, lean_object*);
|
||||
lean_object* lean_io_mk_ref(lean_object*, lean_object*);
|
||||
|
|
@ -123,6 +125,7 @@ lean_object* l_Lean_Meta_getConstNoEx(lean_object*, lean_object*, lean_object*);
|
|||
lean_object* l_Lean_Meta_withMVarContext(lean_object*);
|
||||
lean_object* l_Lean_Meta_MetaM_inhabited___boxed(lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Meta_withNewLocalInstances___main___at_Lean_Meta_forallTelescope___spec__4(lean_object*);
|
||||
lean_object* l_Array_umapMAux___main___at_Lean_Meta_getParamNames___spec__1(lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Meta_withNewLocalInstances___main___at_Lean_Meta_isClassExpensive___main___spec__6(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Meta_withLocalDeclD(lean_object*);
|
||||
lean_object* l_Lean_Meta_withNewLocalInstances___main___at_Lean_Meta_forallBoundedTelescope___spec__3___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
|
|
@ -188,6 +191,7 @@ lean_object* l_Lean_Meta_withTransparency(lean_object*);
|
|||
lean_object* l_Lean_Meta_tracer___closed__5;
|
||||
lean_object* l_Lean_Meta_withLocalContext___rarg___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Meta_mkSynthPendingRef___lambda__1(lean_object*, lean_object*, lean_object*);
|
||||
lean_object* lean_array_fset(lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Meta_mkForallUsedOnly(lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l___private_Init_Lean_Meta_Basic_2__getTraceState___rarg(lean_object*);
|
||||
lean_object* l_Lean_Meta_withNewLocalInstances___main___at_Lean_Meta_forallTelescopeReducing___spec__4(lean_object*);
|
||||
|
|
@ -249,6 +253,7 @@ lean_object* l_Lean_Meta_withNewLocalInstances___main___at_Lean_Meta_forallTeles
|
|||
lean_object* l_Lean_Meta_withNewLocalInstances___main___at_Lean_Meta_forallBoundedTelescope___spec__5(lean_object*);
|
||||
lean_object* l_Lean_Meta_tracer___closed__4;
|
||||
lean_object* l_Lean_Meta_withNewLocalInstances___main___at_Lean_Meta_forallTelescopeReducing___spec__4___rarg(lean_object*, uint8_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Meta_getParamNames___lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
uint8_t l_Lean_Expr_isForall(lean_object*);
|
||||
uint8_t l_Lean_BinderInfo_isInstImplicit(uint8_t);
|
||||
lean_object* l_Lean_Meta_whnf(lean_object*, lean_object*, lean_object*);
|
||||
|
|
@ -263,6 +268,7 @@ size_t lean_usize_of_nat(lean_object*);
|
|||
lean_object* l_Lean_Meta_mkMetaExtension___lambda__1(lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Meta_withLocalDecl___rarg___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Meta_withNewLocalInstances___main___at_Lean_Meta_forallTelescopeReducing___spec__4___rarg___lambda__1(lean_object*, lean_object*, lean_object*, uint8_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_ConstantInfo_type(lean_object*);
|
||||
lean_object* l_Lean_Meta_withNewLocalInstances___main___at_Lean_Meta_isClassExpensive___main___spec__5(uint8_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_mkLevelMVar(lean_object*);
|
||||
lean_object* l_Lean_Meta_withIncRecDepth___rarg(lean_object*, lean_object*, lean_object*);
|
||||
|
|
@ -299,6 +305,7 @@ lean_object* l_Lean_Meta_mkIsExprDefEqAuxRef___lambda__1___closed__2;
|
|||
lean_object* l_Lean_Meta_withNewLocalInstances___main___rarg___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Meta_ParamInfo_inhabited;
|
||||
lean_object* l_Lean_Meta_setMVarKind___boxed(lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Meta_getParamNames___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Meta_getExprMVarAssignment_x3f(lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Meta_metaExt;
|
||||
lean_object* l_Lean_Meta_getLocalDecl(lean_object*, lean_object*, lean_object*);
|
||||
|
|
@ -413,6 +420,7 @@ lean_object* l___private_Init_Lean_Meta_Basic_2__getTraceState(lean_object*);
|
|||
lean_object* l_Lean_Meta_MetaExtState_inhabited___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* lean_local_ctx_find(lean_object*, lean_object*);
|
||||
lean_object* l___private_Init_Lean_Meta_Basic_7__forallMetaTelescopeReducingAux___main(uint8_t, lean_object*, uint8_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Meta_getParamNames(lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Meta_mkFreshLevelMVarId___boxed(lean_object*);
|
||||
extern lean_object* l_HashMap_Inhabited___closed__1;
|
||||
lean_object* l_Lean_Meta_mkInferTypeRef___closed__1;
|
||||
|
|
@ -39154,6 +39162,155 @@ x_11 = l___private_Init_Lean_Meta_Basic_4__forallTelescopeReducingAuxAux___main_
|
|||
return x_11;
|
||||
}
|
||||
}
|
||||
lean_object* l_Array_umapMAux___main___at_Lean_Meta_getParamNames___spec__1(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_5; uint8_t x_6;
|
||||
x_5 = lean_array_get_size(x_2);
|
||||
x_6 = lean_nat_dec_lt(x_1, x_5);
|
||||
lean_dec(x_5);
|
||||
if (x_6 == 0)
|
||||
{
|
||||
lean_object* x_7; lean_object* x_8; lean_object* x_9;
|
||||
lean_dec(x_3);
|
||||
lean_dec(x_1);
|
||||
x_7 = l_Array_empty___closed__1;
|
||||
x_8 = x_2;
|
||||
x_9 = lean_alloc_ctor(0, 2, 0);
|
||||
lean_ctor_set(x_9, 0, x_8);
|
||||
lean_ctor_set(x_9, 1, x_4);
|
||||
return x_9;
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15;
|
||||
x_10 = lean_array_fget(x_2, x_1);
|
||||
x_11 = lean_box(0);
|
||||
x_12 = x_11;
|
||||
x_13 = lean_array_fset(x_2, x_1, x_12);
|
||||
x_14 = l_Lean_Expr_fvarId_x21(x_10);
|
||||
lean_inc(x_3);
|
||||
x_15 = l_Lean_Meta_getLocalDecl(x_14, x_3, x_4);
|
||||
if (lean_obj_tag(x_15) == 0)
|
||||
{
|
||||
lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; lean_object* x_20; lean_object* x_21; lean_object* x_22;
|
||||
x_16 = lean_ctor_get(x_15, 0);
|
||||
lean_inc(x_16);
|
||||
x_17 = lean_ctor_get(x_15, 1);
|
||||
lean_inc(x_17);
|
||||
lean_dec(x_15);
|
||||
x_18 = l_Lean_LocalDecl_userName(x_16);
|
||||
lean_dec(x_16);
|
||||
x_19 = lean_unsigned_to_nat(1u);
|
||||
x_20 = lean_nat_add(x_1, x_19);
|
||||
x_21 = x_18;
|
||||
lean_dec(x_10);
|
||||
x_22 = lean_array_fset(x_13, x_1, x_21);
|
||||
lean_dec(x_1);
|
||||
x_1 = x_20;
|
||||
x_2 = x_22;
|
||||
x_4 = x_17;
|
||||
goto _start;
|
||||
}
|
||||
else
|
||||
{
|
||||
uint8_t x_24;
|
||||
lean_dec(x_13);
|
||||
lean_dec(x_10);
|
||||
lean_dec(x_3);
|
||||
lean_dec(x_1);
|
||||
x_24 = !lean_is_exclusive(x_15);
|
||||
if (x_24 == 0)
|
||||
{
|
||||
return x_15;
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_25; lean_object* x_26; lean_object* x_27;
|
||||
x_25 = lean_ctor_get(x_15, 0);
|
||||
x_26 = lean_ctor_get(x_15, 1);
|
||||
lean_inc(x_26);
|
||||
lean_inc(x_25);
|
||||
lean_dec(x_15);
|
||||
x_27 = lean_alloc_ctor(1, 2, 0);
|
||||
lean_ctor_set(x_27, 0, x_25);
|
||||
lean_ctor_set(x_27, 1, x_26);
|
||||
return x_27;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
lean_object* l_Lean_Meta_getParamNames___lambda__1(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_5; lean_object* x_6;
|
||||
x_5 = lean_unsigned_to_nat(0u);
|
||||
x_6 = l_Array_umapMAux___main___at_Lean_Meta_getParamNames___spec__1(x_5, x_1, x_3, x_4);
|
||||
return x_6;
|
||||
}
|
||||
}
|
||||
lean_object* _init_l_Lean_Meta_getParamNames___closed__1() {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_1;
|
||||
x_1 = lean_alloc_closure((void*)(l_Lean_Meta_getParamNames___lambda__1___boxed), 4, 0);
|
||||
return x_1;
|
||||
}
|
||||
}
|
||||
lean_object* l_Lean_Meta_getParamNames(lean_object* x_1, lean_object* x_2, lean_object* x_3) {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_4;
|
||||
x_4 = l_Lean_Meta_getConstInfo(x_1, x_2, x_3);
|
||||
if (lean_obj_tag(x_4) == 0)
|
||||
{
|
||||
lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9;
|
||||
x_5 = lean_ctor_get(x_4, 0);
|
||||
lean_inc(x_5);
|
||||
x_6 = lean_ctor_get(x_4, 1);
|
||||
lean_inc(x_6);
|
||||
lean_dec(x_4);
|
||||
x_7 = l_Lean_ConstantInfo_type(x_5);
|
||||
lean_dec(x_5);
|
||||
x_8 = l_Lean_Meta_getParamNames___closed__1;
|
||||
x_9 = l_Lean_Meta_forallTelescopeReducing___rarg(x_7, x_8, x_2, x_6);
|
||||
return x_9;
|
||||
}
|
||||
else
|
||||
{
|
||||
uint8_t x_10;
|
||||
lean_dec(x_2);
|
||||
x_10 = !lean_is_exclusive(x_4);
|
||||
if (x_10 == 0)
|
||||
{
|
||||
return x_4;
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_11; lean_object* x_12; lean_object* x_13;
|
||||
x_11 = lean_ctor_get(x_4, 0);
|
||||
x_12 = lean_ctor_get(x_4, 1);
|
||||
lean_inc(x_12);
|
||||
lean_inc(x_11);
|
||||
lean_dec(x_4);
|
||||
x_13 = lean_alloc_ctor(1, 2, 0);
|
||||
lean_ctor_set(x_13, 0, x_11);
|
||||
lean_ctor_set(x_13, 1, x_12);
|
||||
return x_13;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
lean_object* l_Lean_Meta_getParamNames___lambda__1___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_5;
|
||||
x_5 = l_Lean_Meta_getParamNames___lambda__1(x_1, x_2, x_3, x_4);
|
||||
lean_dec(x_2);
|
||||
return x_5;
|
||||
}
|
||||
}
|
||||
lean_object* l_Lean_Meta_isClass(lean_object* x_1, lean_object* x_2, lean_object* x_3) {
|
||||
_start:
|
||||
{
|
||||
|
|
@ -48235,6 +48392,8 @@ l_Lean_Meta_isClassQuick___main___closed__1 = _init_l_Lean_Meta_isClassQuick___m
|
|||
lean_mark_persistent(l_Lean_Meta_isClassQuick___main___closed__1);
|
||||
l_Lean_Meta_resettingSynthInstanceCache___rarg___closed__1 = _init_l_Lean_Meta_resettingSynthInstanceCache___rarg___closed__1();
|
||||
lean_mark_persistent(l_Lean_Meta_resettingSynthInstanceCache___rarg___closed__1);
|
||||
l_Lean_Meta_getParamNames___closed__1 = _init_l_Lean_Meta_getParamNames___closed__1();
|
||||
lean_mark_persistent(l_Lean_Meta_getParamNames___closed__1);
|
||||
l___private_Init_Lean_Meta_Basic_10__regTraceClasses___closed__1 = _init_l___private_Init_Lean_Meta_Basic_10__regTraceClasses___closed__1();
|
||||
lean_mark_persistent(l___private_Init_Lean_Meta_Basic_10__regTraceClasses___closed__1);
|
||||
l___private_Init_Lean_Meta_Basic_10__regTraceClasses___closed__2 = _init_l___private_Init_Lean_Meta_Basic_10__regTraceClasses___closed__2();
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
// Lean compiler output
|
||||
// Module: Init.Lean.Meta.Tactic
|
||||
// Imports: Init.Lean.Meta.Tactic.Intro Init.Lean.Meta.Tactic.Assumption Init.Lean.Meta.Tactic.Apply Init.Lean.Meta.Tactic.Revert Init.Lean.Meta.Tactic.Clear Init.Lean.Meta.Tactic.Assert Init.Lean.Meta.Tactic.Target Init.Lean.Meta.Tactic.Rewrite Init.Lean.Meta.Tactic.Generalize Init.Lean.Meta.Tactic.LocalDecl
|
||||
// Imports: Init.Lean.Meta.Tactic.Intro Init.Lean.Meta.Tactic.Assumption Init.Lean.Meta.Tactic.Apply Init.Lean.Meta.Tactic.Revert Init.Lean.Meta.Tactic.Clear Init.Lean.Meta.Tactic.Assert Init.Lean.Meta.Tactic.Target Init.Lean.Meta.Tactic.Rewrite Init.Lean.Meta.Tactic.Generalize Init.Lean.Meta.Tactic.LocalDecl Init.Lean.Meta.Tactic.Induction
|
||||
#include "runtime/lean.h"
|
||||
#if defined(__clang__)
|
||||
#pragma clang diagnostic ignored "-Wunused-parameter"
|
||||
|
|
@ -23,6 +23,7 @@ lean_object* initialize_Init_Lean_Meta_Tactic_Target(lean_object*);
|
|||
lean_object* initialize_Init_Lean_Meta_Tactic_Rewrite(lean_object*);
|
||||
lean_object* initialize_Init_Lean_Meta_Tactic_Generalize(lean_object*);
|
||||
lean_object* initialize_Init_Lean_Meta_Tactic_LocalDecl(lean_object*);
|
||||
lean_object* initialize_Init_Lean_Meta_Tactic_Induction(lean_object*);
|
||||
static bool _G_initialized = false;
|
||||
lean_object* initialize_Init_Lean_Meta_Tactic(lean_object* w) {
|
||||
lean_object * res;
|
||||
|
|
@ -58,6 +59,9 @@ lean_dec_ref(res);
|
|||
res = initialize_Init_Lean_Meta_Tactic_LocalDecl(lean_io_mk_world());
|
||||
if (lean_io_result_is_error(res)) return res;
|
||||
lean_dec_ref(res);
|
||||
res = initialize_Init_Lean_Meta_Tactic_Induction(lean_io_mk_world());
|
||||
if (lean_io_result_is_error(res)) return res;
|
||||
lean_dec_ref(res);
|
||||
return lean_mk_io_result(lean_box(0));
|
||||
}
|
||||
#ifdef __cplusplus
|
||||
|
|
|
|||
|
|
@ -14,6 +14,7 @@
|
|||
extern "C" {
|
||||
#endif
|
||||
lean_object* l_Lean_Meta_clear___lambda__1___closed__3;
|
||||
lean_object* l_Lean_Meta_restore(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Expr_mvarId_x21(lean_object*);
|
||||
lean_object* l_Array_eraseIdx___rarg(lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Meta_clear___lambda__1___closed__2;
|
||||
|
|
@ -37,9 +38,11 @@ lean_object* l_Array_forMAux___main___at_Lean_Meta_clear___spec__5___closed__4;
|
|||
lean_object* lean_array_fget(lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Meta_clear___lambda__1___closed__1;
|
||||
lean_object* l_Lean_Meta_clear___closed__1;
|
||||
lean_object* l_Lean_Meta_tryClear(lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Meta_clear___closed__2;
|
||||
lean_object* l_Lean_Expr_fvarId_x21(lean_object*);
|
||||
lean_object* l_Lean_Meta_clear(lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Meta_tryClear___boxed(lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Meta_clear___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
extern lean_object* l_Char_HasRepr___closed__1;
|
||||
lean_object* l_PersistentArray_forMAux___main___at_Lean_Meta_clear___spec__3___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
|
|
@ -1185,6 +1188,65 @@ lean_dec(x_3);
|
|||
return x_5;
|
||||
}
|
||||
}
|
||||
lean_object* l_Lean_Meta_tryClear(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_5;
|
||||
lean_inc(x_4);
|
||||
lean_inc(x_1);
|
||||
x_5 = l_Lean_Meta_clear(x_1, x_2, x_3, x_4);
|
||||
if (lean_obj_tag(x_5) == 0)
|
||||
{
|
||||
lean_dec(x_4);
|
||||
lean_dec(x_1);
|
||||
return x_5;
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; uint8_t x_11;
|
||||
x_6 = lean_ctor_get(x_5, 1);
|
||||
lean_inc(x_6);
|
||||
lean_dec(x_5);
|
||||
x_7 = lean_ctor_get(x_4, 0);
|
||||
lean_inc(x_7);
|
||||
x_8 = lean_ctor_get(x_4, 1);
|
||||
lean_inc(x_8);
|
||||
x_9 = lean_ctor_get(x_4, 5);
|
||||
lean_inc(x_9);
|
||||
lean_dec(x_4);
|
||||
x_10 = l_Lean_Meta_restore(x_7, x_8, x_9, x_3, x_6);
|
||||
x_11 = !lean_is_exclusive(x_10);
|
||||
if (x_11 == 0)
|
||||
{
|
||||
lean_object* x_12;
|
||||
x_12 = lean_ctor_get(x_10, 0);
|
||||
lean_dec(x_12);
|
||||
lean_ctor_set(x_10, 0, x_1);
|
||||
return x_10;
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_13; lean_object* x_14;
|
||||
x_13 = lean_ctor_get(x_10, 1);
|
||||
lean_inc(x_13);
|
||||
lean_dec(x_10);
|
||||
x_14 = lean_alloc_ctor(0, 2, 0);
|
||||
lean_ctor_set(x_14, 0, x_1);
|
||||
lean_ctor_set(x_14, 1, x_13);
|
||||
return x_14;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
lean_object* l_Lean_Meta_tryClear___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_5;
|
||||
x_5 = l_Lean_Meta_tryClear(x_1, x_2, x_3, x_4);
|
||||
lean_dec(x_3);
|
||||
return x_5;
|
||||
}
|
||||
}
|
||||
lean_object* initialize_Init_Lean_Meta_Tactic_Util(lean_object*);
|
||||
static bool _G_initialized = false;
|
||||
lean_object* initialize_Init_Lean_Meta_Tactic_Clear(lean_object* w) {
|
||||
|
|
|
|||
9540
stage0/stdlib/Init/Lean/Meta/Tactic/Induction.c
Normal file
9540
stage0/stdlib/Init/Lean/Meta/Tactic/Induction.c
Normal file
File diff suppressed because it is too large
Load diff
|
|
@ -48,6 +48,7 @@ lean_object* lean_expr_instantiate_rev_range(lean_object*, lean_object*, lean_ob
|
|||
uint8_t lean_nat_dec_eq(lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Meta_getMVarType(lean_object*, lean_object*, lean_object*);
|
||||
lean_object* lean_nat_sub(lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Expr_headBeta(lean_object*);
|
||||
lean_object* lean_array_get(lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Expr_fvarId_x21(lean_object*);
|
||||
lean_object* l_Lean_Meta_introNCore___at_Lean_Meta_introN___spec__1___lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
|
|
@ -180,112 +181,113 @@ return x_15;
|
|||
lean_object* l_Lean_Meta_introNCoreAux___main___rarg___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) {
|
||||
_start:
|
||||
{
|
||||
uint8_t x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11;
|
||||
x_7 = 2;
|
||||
lean_object* x_7; uint8_t x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12;
|
||||
x_7 = l_Lean_Expr_headBeta(x_1);
|
||||
x_8 = 2;
|
||||
lean_inc(x_5);
|
||||
x_8 = l_Lean_Meta_mkFreshExprMVar(x_1, x_4, x_7, x_5, x_6);
|
||||
x_9 = lean_ctor_get(x_8, 0);
|
||||
lean_inc(x_9);
|
||||
x_10 = lean_ctor_get(x_8, 1);
|
||||
x_9 = l_Lean_Meta_mkFreshExprMVar(x_7, x_4, x_8, x_5, x_6);
|
||||
x_10 = lean_ctor_get(x_9, 0);
|
||||
lean_inc(x_10);
|
||||
lean_dec(x_8);
|
||||
x_11 = lean_ctor_get(x_9, 1);
|
||||
lean_inc(x_11);
|
||||
lean_dec(x_9);
|
||||
lean_inc(x_5);
|
||||
lean_inc(x_9);
|
||||
lean_inc(x_10);
|
||||
lean_inc(x_2);
|
||||
x_11 = l_Lean_Meta_mkLambda(x_2, x_9, x_5, x_10);
|
||||
if (lean_obj_tag(x_11) == 0)
|
||||
x_12 = l_Lean_Meta_mkLambda(x_2, x_10, x_5, x_11);
|
||||
if (lean_obj_tag(x_12) == 0)
|
||||
{
|
||||
lean_object* x_12; lean_object* x_13; lean_object* x_14;
|
||||
x_12 = lean_ctor_get(x_11, 0);
|
||||
lean_inc(x_12);
|
||||
x_13 = lean_ctor_get(x_11, 1);
|
||||
lean_object* x_13; lean_object* x_14; lean_object* x_15;
|
||||
x_13 = lean_ctor_get(x_12, 0);
|
||||
lean_inc(x_13);
|
||||
lean_dec(x_11);
|
||||
x_14 = l_Lean_Meta_assignExprMVar(x_3, x_12, x_5, x_13);
|
||||
x_14 = lean_ctor_get(x_12, 1);
|
||||
lean_inc(x_14);
|
||||
lean_dec(x_12);
|
||||
x_15 = l_Lean_Meta_assignExprMVar(x_3, x_13, x_5, x_14);
|
||||
lean_dec(x_5);
|
||||
if (lean_obj_tag(x_14) == 0)
|
||||
if (lean_obj_tag(x_15) == 0)
|
||||
{
|
||||
uint8_t x_15;
|
||||
x_15 = !lean_is_exclusive(x_14);
|
||||
if (x_15 == 0)
|
||||
uint8_t x_16;
|
||||
x_16 = !lean_is_exclusive(x_15);
|
||||
if (x_16 == 0)
|
||||
{
|
||||
lean_object* x_16; lean_object* x_17; lean_object* x_18;
|
||||
x_16 = lean_ctor_get(x_14, 0);
|
||||
lean_dec(x_16);
|
||||
x_17 = l_Lean_Expr_mvarId_x21(x_9);
|
||||
lean_dec(x_9);
|
||||
x_18 = lean_alloc_ctor(0, 2, 0);
|
||||
lean_ctor_set(x_18, 0, x_2);
|
||||
lean_ctor_set(x_18, 1, x_17);
|
||||
lean_ctor_set(x_14, 0, x_18);
|
||||
return x_14;
|
||||
lean_object* x_17; lean_object* x_18; lean_object* x_19;
|
||||
x_17 = lean_ctor_get(x_15, 0);
|
||||
lean_dec(x_17);
|
||||
x_18 = l_Lean_Expr_mvarId_x21(x_10);
|
||||
lean_dec(x_10);
|
||||
x_19 = lean_alloc_ctor(0, 2, 0);
|
||||
lean_ctor_set(x_19, 0, x_2);
|
||||
lean_ctor_set(x_19, 1, x_18);
|
||||
lean_ctor_set(x_15, 0, x_19);
|
||||
return x_15;
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_19; lean_object* x_20; lean_object* x_21; lean_object* x_22;
|
||||
x_19 = lean_ctor_get(x_14, 1);
|
||||
lean_inc(x_19);
|
||||
lean_dec(x_14);
|
||||
x_20 = l_Lean_Expr_mvarId_x21(x_9);
|
||||
lean_dec(x_9);
|
||||
x_21 = lean_alloc_ctor(0, 2, 0);
|
||||
lean_ctor_set(x_21, 0, x_2);
|
||||
lean_ctor_set(x_21, 1, x_20);
|
||||
lean_object* x_20; lean_object* x_21; lean_object* x_22; lean_object* x_23;
|
||||
x_20 = lean_ctor_get(x_15, 1);
|
||||
lean_inc(x_20);
|
||||
lean_dec(x_15);
|
||||
x_21 = l_Lean_Expr_mvarId_x21(x_10);
|
||||
lean_dec(x_10);
|
||||
x_22 = lean_alloc_ctor(0, 2, 0);
|
||||
lean_ctor_set(x_22, 0, x_21);
|
||||
lean_ctor_set(x_22, 1, x_19);
|
||||
return x_22;
|
||||
lean_ctor_set(x_22, 0, x_2);
|
||||
lean_ctor_set(x_22, 1, x_21);
|
||||
x_23 = lean_alloc_ctor(0, 2, 0);
|
||||
lean_ctor_set(x_23, 0, x_22);
|
||||
lean_ctor_set(x_23, 1, x_20);
|
||||
return x_23;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
uint8_t x_23;
|
||||
lean_dec(x_9);
|
||||
uint8_t x_24;
|
||||
lean_dec(x_10);
|
||||
lean_dec(x_2);
|
||||
x_23 = !lean_is_exclusive(x_14);
|
||||
if (x_23 == 0)
|
||||
x_24 = !lean_is_exclusive(x_15);
|
||||
if (x_24 == 0)
|
||||
{
|
||||
return x_14;
|
||||
return x_15;
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_24; lean_object* x_25; lean_object* x_26;
|
||||
x_24 = lean_ctor_get(x_14, 0);
|
||||
x_25 = lean_ctor_get(x_14, 1);
|
||||
lean_object* x_25; lean_object* x_26; lean_object* x_27;
|
||||
x_25 = lean_ctor_get(x_15, 0);
|
||||
x_26 = lean_ctor_get(x_15, 1);
|
||||
lean_inc(x_26);
|
||||
lean_inc(x_25);
|
||||
lean_inc(x_24);
|
||||
lean_dec(x_14);
|
||||
x_26 = lean_alloc_ctor(1, 2, 0);
|
||||
lean_ctor_set(x_26, 0, x_24);
|
||||
lean_ctor_set(x_26, 1, x_25);
|
||||
return x_26;
|
||||
lean_dec(x_15);
|
||||
x_27 = lean_alloc_ctor(1, 2, 0);
|
||||
lean_ctor_set(x_27, 0, x_25);
|
||||
lean_ctor_set(x_27, 1, x_26);
|
||||
return x_27;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
uint8_t x_27;
|
||||
lean_dec(x_9);
|
||||
uint8_t x_28;
|
||||
lean_dec(x_10);
|
||||
lean_dec(x_5);
|
||||
lean_dec(x_3);
|
||||
lean_dec(x_2);
|
||||
x_27 = !lean_is_exclusive(x_11);
|
||||
if (x_27 == 0)
|
||||
x_28 = !lean_is_exclusive(x_12);
|
||||
if (x_28 == 0)
|
||||
{
|
||||
return x_11;
|
||||
return x_12;
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_28; lean_object* x_29; lean_object* x_30;
|
||||
x_28 = lean_ctor_get(x_11, 0);
|
||||
x_29 = lean_ctor_get(x_11, 1);
|
||||
lean_object* x_29; lean_object* x_30; lean_object* x_31;
|
||||
x_29 = lean_ctor_get(x_12, 0);
|
||||
x_30 = lean_ctor_get(x_12, 1);
|
||||
lean_inc(x_30);
|
||||
lean_inc(x_29);
|
||||
lean_inc(x_28);
|
||||
lean_dec(x_11);
|
||||
x_30 = lean_alloc_ctor(1, 2, 0);
|
||||
lean_ctor_set(x_30, 0, x_28);
|
||||
lean_ctor_set(x_30, 1, x_29);
|
||||
return x_30;
|
||||
lean_dec(x_12);
|
||||
x_31 = lean_alloc_ctor(1, 2, 0);
|
||||
lean_ctor_set(x_31, 0, x_29);
|
||||
lean_ctor_set(x_31, 1, x_30);
|
||||
return x_31;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -313,7 +315,7 @@ lean_dec(x_3);
|
|||
switch (lean_obj_tag(x_8)) {
|
||||
case 7:
|
||||
{
|
||||
lean_object* x_34; lean_object* x_35; lean_object* x_36; uint64_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; uint8_t x_46; lean_object* x_47; lean_object* x_48; lean_object* x_49;
|
||||
lean_object* x_34; lean_object* x_35; lean_object* x_36; uint64_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; uint8_t x_47; lean_object* x_48; lean_object* x_49; lean_object* x_50;
|
||||
x_34 = lean_ctor_get(x_8, 0);
|
||||
lean_inc(x_34);
|
||||
x_35 = lean_ctor_get(x_8, 1);
|
||||
|
|
@ -326,82 +328,84 @@ x_38 = lean_array_get_size(x_5);
|
|||
x_39 = lean_expr_instantiate_rev_range(x_35, x_6, x_38, x_5);
|
||||
lean_dec(x_38);
|
||||
lean_dec(x_35);
|
||||
x_40 = l_Lean_Meta_mkFreshId___rarg(x_10);
|
||||
x_41 = lean_ctor_get(x_40, 0);
|
||||
lean_inc(x_41);
|
||||
x_42 = lean_ctor_get(x_40, 1);
|
||||
x_40 = l_Lean_Expr_headBeta(x_39);
|
||||
x_41 = l_Lean_Meta_mkFreshId___rarg(x_10);
|
||||
x_42 = lean_ctor_get(x_41, 0);
|
||||
lean_inc(x_42);
|
||||
lean_dec(x_40);
|
||||
x_43 = lean_ctor_get(x_41, 1);
|
||||
lean_inc(x_43);
|
||||
lean_dec(x_41);
|
||||
lean_inc(x_2);
|
||||
lean_inc(x_4);
|
||||
x_43 = lean_apply_3(x_2, x_4, x_34, x_7);
|
||||
x_44 = lean_ctor_get(x_43, 0);
|
||||
lean_inc(x_44);
|
||||
x_45 = lean_ctor_get(x_43, 1);
|
||||
x_44 = lean_apply_3(x_2, x_4, x_34, x_7);
|
||||
x_45 = lean_ctor_get(x_44, 0);
|
||||
lean_inc(x_45);
|
||||
lean_dec(x_43);
|
||||
x_46 = (uint8_t)((x_37 << 24) >> 61);
|
||||
lean_inc(x_41);
|
||||
x_47 = lean_local_ctx_mk_local_decl(x_4, x_41, x_44, x_39, x_46);
|
||||
x_48 = l_Lean_mkFVar(x_41);
|
||||
x_49 = lean_array_push(x_5, x_48);
|
||||
x_46 = lean_ctor_get(x_44, 1);
|
||||
lean_inc(x_46);
|
||||
lean_dec(x_44);
|
||||
x_47 = (uint8_t)((x_37 << 24) >> 61);
|
||||
lean_inc(x_42);
|
||||
x_48 = lean_local_ctx_mk_local_decl(x_4, x_42, x_45, x_40, x_47);
|
||||
x_49 = l_Lean_mkFVar(x_42);
|
||||
x_50 = lean_array_push(x_5, x_49);
|
||||
x_3 = x_14;
|
||||
x_4 = x_47;
|
||||
x_5 = x_49;
|
||||
x_7 = x_45;
|
||||
x_4 = x_48;
|
||||
x_5 = x_50;
|
||||
x_7 = x_46;
|
||||
x_8 = x_36;
|
||||
x_10 = x_42;
|
||||
x_10 = x_43;
|
||||
goto _start;
|
||||
}
|
||||
case 8:
|
||||
{
|
||||
lean_object* x_51; lean_object* x_52; lean_object* x_53; lean_object* x_54; lean_object* x_55; lean_object* x_56; lean_object* x_57; lean_object* x_58; lean_object* x_59; lean_object* x_60; lean_object* x_61; lean_object* x_62; lean_object* x_63; lean_object* x_64; lean_object* x_65; lean_object* x_66;
|
||||
x_51 = lean_ctor_get(x_8, 0);
|
||||
lean_inc(x_51);
|
||||
x_52 = lean_ctor_get(x_8, 1);
|
||||
lean_object* x_52; lean_object* x_53; lean_object* x_54; lean_object* x_55; lean_object* x_56; lean_object* x_57; lean_object* x_58; lean_object* x_59; lean_object* x_60; lean_object* x_61; lean_object* x_62; lean_object* x_63; lean_object* x_64; lean_object* x_65; lean_object* x_66; lean_object* x_67; lean_object* x_68;
|
||||
x_52 = lean_ctor_get(x_8, 0);
|
||||
lean_inc(x_52);
|
||||
x_53 = lean_ctor_get(x_8, 2);
|
||||
x_53 = lean_ctor_get(x_8, 1);
|
||||
lean_inc(x_53);
|
||||
x_54 = lean_ctor_get(x_8, 3);
|
||||
x_54 = lean_ctor_get(x_8, 2);
|
||||
lean_inc(x_54);
|
||||
x_55 = lean_ctor_get(x_8, 3);
|
||||
lean_inc(x_55);
|
||||
lean_dec(x_8);
|
||||
x_55 = lean_array_get_size(x_5);
|
||||
x_56 = lean_expr_instantiate_rev_range(x_52, x_6, x_55, x_5);
|
||||
lean_dec(x_52);
|
||||
x_57 = lean_expr_instantiate_rev_range(x_53, x_6, x_55, x_5);
|
||||
lean_dec(x_55);
|
||||
x_56 = lean_array_get_size(x_5);
|
||||
x_57 = lean_expr_instantiate_rev_range(x_53, x_6, x_56, x_5);
|
||||
lean_dec(x_53);
|
||||
x_58 = l_Lean_Meta_mkFreshId___rarg(x_10);
|
||||
x_59 = lean_ctor_get(x_58, 0);
|
||||
lean_inc(x_59);
|
||||
x_60 = lean_ctor_get(x_58, 1);
|
||||
lean_inc(x_60);
|
||||
lean_dec(x_58);
|
||||
x_58 = l_Lean_Expr_headBeta(x_57);
|
||||
x_59 = lean_expr_instantiate_rev_range(x_54, x_6, x_56, x_5);
|
||||
lean_dec(x_56);
|
||||
lean_dec(x_54);
|
||||
x_60 = l_Lean_Meta_mkFreshId___rarg(x_10);
|
||||
x_61 = lean_ctor_get(x_60, 0);
|
||||
lean_inc(x_61);
|
||||
x_62 = lean_ctor_get(x_60, 1);
|
||||
lean_inc(x_62);
|
||||
lean_dec(x_60);
|
||||
lean_inc(x_2);
|
||||
lean_inc(x_4);
|
||||
x_61 = lean_apply_3(x_2, x_4, x_51, x_7);
|
||||
x_62 = lean_ctor_get(x_61, 0);
|
||||
lean_inc(x_62);
|
||||
x_63 = lean_ctor_get(x_61, 1);
|
||||
lean_inc(x_63);
|
||||
lean_dec(x_61);
|
||||
lean_inc(x_59);
|
||||
x_64 = lean_local_ctx_mk_let_decl(x_4, x_59, x_62, x_56, x_57);
|
||||
x_65 = l_Lean_mkFVar(x_59);
|
||||
x_66 = lean_array_push(x_5, x_65);
|
||||
x_63 = lean_apply_3(x_2, x_4, x_52, x_7);
|
||||
x_64 = lean_ctor_get(x_63, 0);
|
||||
lean_inc(x_64);
|
||||
x_65 = lean_ctor_get(x_63, 1);
|
||||
lean_inc(x_65);
|
||||
lean_dec(x_63);
|
||||
lean_inc(x_61);
|
||||
x_66 = lean_local_ctx_mk_let_decl(x_4, x_61, x_64, x_58, x_59);
|
||||
x_67 = l_Lean_mkFVar(x_61);
|
||||
x_68 = lean_array_push(x_5, x_67);
|
||||
x_3 = x_14;
|
||||
x_4 = x_64;
|
||||
x_5 = x_66;
|
||||
x_7 = x_63;
|
||||
x_8 = x_54;
|
||||
x_10 = x_60;
|
||||
x_4 = x_66;
|
||||
x_5 = x_68;
|
||||
x_7 = x_65;
|
||||
x_8 = x_55;
|
||||
x_10 = x_62;
|
||||
goto _start;
|
||||
}
|
||||
default:
|
||||
{
|
||||
lean_object* x_68;
|
||||
x_68 = lean_box(0);
|
||||
x_15 = x_68;
|
||||
lean_object* x_70;
|
||||
x_70 = lean_box(0);
|
||||
x_15 = x_70;
|
||||
goto block_33;
|
||||
}
|
||||
}
|
||||
|
|
@ -470,63 +474,63 @@ return x_32;
|
|||
}
|
||||
else
|
||||
{
|
||||
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_71; lean_object* x_72; lean_object* x_73; lean_object* x_74; lean_object* x_75; lean_object* x_76; uint8_t x_77;
|
||||
lean_dec(x_7);
|
||||
lean_dec(x_3);
|
||||
lean_dec(x_2);
|
||||
x_69 = lean_array_get_size(x_5);
|
||||
x_70 = lean_expr_instantiate_rev_range(x_8, x_6, x_69, x_5);
|
||||
lean_dec(x_69);
|
||||
x_71 = lean_array_get_size(x_5);
|
||||
x_72 = lean_expr_instantiate_rev_range(x_8, x_6, x_71, x_5);
|
||||
lean_dec(x_71);
|
||||
lean_dec(x_8);
|
||||
lean_inc(x_1);
|
||||
x_71 = lean_alloc_closure((void*)(l_Lean_Meta_getMVarTag___boxed), 3, 1);
|
||||
lean_closure_set(x_71, 0, x_1);
|
||||
x_73 = lean_alloc_closure((void*)(l_Lean_Meta_getMVarTag___boxed), 3, 1);
|
||||
lean_closure_set(x_73, 0, x_1);
|
||||
lean_inc(x_5);
|
||||
x_72 = lean_alloc_closure((void*)(l_Lean_Meta_introNCoreAux___main___rarg___lambda__2), 6, 3);
|
||||
lean_closure_set(x_72, 0, x_70);
|
||||
lean_closure_set(x_72, 1, x_5);
|
||||
lean_closure_set(x_72, 2, x_1);
|
||||
x_73 = l_EIO_Monad___closed__1;
|
||||
x_74 = lean_alloc_closure((void*)(l_ReaderT_bind___rarg), 6, 5);
|
||||
lean_closure_set(x_74, 0, x_73);
|
||||
lean_closure_set(x_74, 1, lean_box(0));
|
||||
lean_closure_set(x_74, 2, lean_box(0));
|
||||
lean_closure_set(x_74, 3, x_71);
|
||||
lean_closure_set(x_74, 4, x_72);
|
||||
x_75 = !lean_is_exclusive(x_9);
|
||||
if (x_75 == 0)
|
||||
x_74 = lean_alloc_closure((void*)(l_Lean_Meta_introNCoreAux___main___rarg___lambda__2), 6, 3);
|
||||
lean_closure_set(x_74, 0, x_72);
|
||||
lean_closure_set(x_74, 1, x_5);
|
||||
lean_closure_set(x_74, 2, x_1);
|
||||
x_75 = l_EIO_Monad___closed__1;
|
||||
x_76 = lean_alloc_closure((void*)(l_ReaderT_bind___rarg), 6, 5);
|
||||
lean_closure_set(x_76, 0, x_75);
|
||||
lean_closure_set(x_76, 1, lean_box(0));
|
||||
lean_closure_set(x_76, 2, lean_box(0));
|
||||
lean_closure_set(x_76, 3, x_73);
|
||||
lean_closure_set(x_76, 4, x_74);
|
||||
x_77 = !lean_is_exclusive(x_9);
|
||||
if (x_77 == 0)
|
||||
{
|
||||
lean_object* x_76; lean_object* x_77; lean_object* x_78;
|
||||
x_76 = lean_ctor_get(x_9, 1);
|
||||
lean_dec(x_76);
|
||||
lean_object* x_78; lean_object* x_79; lean_object* x_80;
|
||||
x_78 = lean_ctor_get(x_9, 1);
|
||||
lean_dec(x_78);
|
||||
lean_ctor_set(x_9, 1, x_4);
|
||||
x_77 = l_Lean_Meta_introNCoreAux___main___rarg___closed__1;
|
||||
x_78 = l_Lean_Meta_withNewLocalInstances___main___rarg(x_77, x_5, x_6, x_74, x_9, x_10);
|
||||
x_79 = l_Lean_Meta_introNCoreAux___main___rarg___closed__1;
|
||||
x_80 = l_Lean_Meta_withNewLocalInstances___main___rarg(x_79, x_5, x_6, x_76, x_9, x_10);
|
||||
lean_dec(x_5);
|
||||
return x_78;
|
||||
return x_80;
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_79; lean_object* x_80; lean_object* x_81; lean_object* x_82; lean_object* x_83; lean_object* x_84; lean_object* x_85;
|
||||
x_79 = lean_ctor_get(x_9, 0);
|
||||
x_80 = lean_ctor_get(x_9, 2);
|
||||
x_81 = lean_ctor_get(x_9, 3);
|
||||
x_82 = lean_ctor_get(x_9, 4);
|
||||
lean_object* x_81; lean_object* x_82; lean_object* x_83; lean_object* x_84; lean_object* x_85; lean_object* x_86; lean_object* x_87;
|
||||
x_81 = lean_ctor_get(x_9, 0);
|
||||
x_82 = lean_ctor_get(x_9, 2);
|
||||
x_83 = lean_ctor_get(x_9, 3);
|
||||
x_84 = lean_ctor_get(x_9, 4);
|
||||
lean_inc(x_84);
|
||||
lean_inc(x_83);
|
||||
lean_inc(x_82);
|
||||
lean_inc(x_81);
|
||||
lean_inc(x_80);
|
||||
lean_inc(x_79);
|
||||
lean_dec(x_9);
|
||||
x_83 = lean_alloc_ctor(0, 5, 0);
|
||||
lean_ctor_set(x_83, 0, x_79);
|
||||
lean_ctor_set(x_83, 1, x_4);
|
||||
lean_ctor_set(x_83, 2, x_80);
|
||||
lean_ctor_set(x_83, 3, x_81);
|
||||
lean_ctor_set(x_83, 4, x_82);
|
||||
x_84 = l_Lean_Meta_introNCoreAux___main___rarg___closed__1;
|
||||
x_85 = l_Lean_Meta_withNewLocalInstances___main___rarg(x_84, x_5, x_6, x_74, x_83, x_10);
|
||||
x_85 = lean_alloc_ctor(0, 5, 0);
|
||||
lean_ctor_set(x_85, 0, x_81);
|
||||
lean_ctor_set(x_85, 1, x_4);
|
||||
lean_ctor_set(x_85, 2, x_82);
|
||||
lean_ctor_set(x_85, 3, x_83);
|
||||
lean_ctor_set(x_85, 4, x_84);
|
||||
x_86 = l_Lean_Meta_introNCoreAux___main___rarg___closed__1;
|
||||
x_87 = l_Lean_Meta_withNewLocalInstances___main___rarg(x_86, x_5, x_6, x_76, x_85, x_10);
|
||||
lean_dec(x_5);
|
||||
return x_85;
|
||||
return x_87;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -5323,7 +5327,7 @@ lean_dec(x_3);
|
|||
switch (lean_obj_tag(x_8)) {
|
||||
case 7:
|
||||
{
|
||||
lean_object* x_27; lean_object* x_28; lean_object* x_29; uint64_t x_30; lean_object* x_31; lean_object* x_32; lean_object* x_33; lean_object* x_34; lean_object* x_35; lean_object* x_36; lean_object* x_37; lean_object* x_38; uint8_t x_39; lean_object* x_40; lean_object* x_41; lean_object* x_42;
|
||||
lean_object* x_27; lean_object* x_28; lean_object* x_29; uint64_t x_30; lean_object* x_31; lean_object* x_32; lean_object* x_33; lean_object* x_34; lean_object* x_35; lean_object* x_36; lean_object* x_37; lean_object* x_38; lean_object* x_39; uint8_t x_40; lean_object* x_41; lean_object* x_42; lean_object* x_43;
|
||||
x_27 = lean_ctor_get(x_8, 0);
|
||||
lean_inc(x_27);
|
||||
x_28 = lean_ctor_get(x_8, 1);
|
||||
|
|
@ -5336,80 +5340,82 @@ x_31 = lean_array_get_size(x_5);
|
|||
x_32 = lean_expr_instantiate_rev_range(x_28, x_6, x_31, x_5);
|
||||
lean_dec(x_31);
|
||||
lean_dec(x_28);
|
||||
x_33 = l_Lean_Meta_mkFreshId___rarg(x_10);
|
||||
x_34 = lean_ctor_get(x_33, 0);
|
||||
lean_inc(x_34);
|
||||
x_35 = lean_ctor_get(x_33, 1);
|
||||
x_33 = l_Lean_Expr_headBeta(x_32);
|
||||
x_34 = l_Lean_Meta_mkFreshId___rarg(x_10);
|
||||
x_35 = lean_ctor_get(x_34, 0);
|
||||
lean_inc(x_35);
|
||||
lean_dec(x_33);
|
||||
x_36 = lean_ctor_get(x_34, 1);
|
||||
lean_inc(x_36);
|
||||
lean_dec(x_34);
|
||||
lean_inc(x_4);
|
||||
x_36 = l_Lean_Meta_mkAuxName(x_1, x_4, x_27, x_7);
|
||||
x_37 = lean_ctor_get(x_36, 0);
|
||||
lean_inc(x_37);
|
||||
x_38 = lean_ctor_get(x_36, 1);
|
||||
x_37 = l_Lean_Meta_mkAuxName(x_1, x_4, x_27, x_7);
|
||||
x_38 = lean_ctor_get(x_37, 0);
|
||||
lean_inc(x_38);
|
||||
lean_dec(x_36);
|
||||
x_39 = (uint8_t)((x_30 << 24) >> 61);
|
||||
lean_inc(x_34);
|
||||
x_40 = lean_local_ctx_mk_local_decl(x_4, x_34, x_37, x_32, x_39);
|
||||
x_41 = l_Lean_mkFVar(x_34);
|
||||
x_42 = lean_array_push(x_5, x_41);
|
||||
x_39 = lean_ctor_get(x_37, 1);
|
||||
lean_inc(x_39);
|
||||
lean_dec(x_37);
|
||||
x_40 = (uint8_t)((x_30 << 24) >> 61);
|
||||
lean_inc(x_35);
|
||||
x_41 = lean_local_ctx_mk_local_decl(x_4, x_35, x_38, x_33, x_40);
|
||||
x_42 = l_Lean_mkFVar(x_35);
|
||||
x_43 = lean_array_push(x_5, x_42);
|
||||
x_3 = x_14;
|
||||
x_4 = x_40;
|
||||
x_5 = x_42;
|
||||
x_7 = x_38;
|
||||
x_4 = x_41;
|
||||
x_5 = x_43;
|
||||
x_7 = x_39;
|
||||
x_8 = x_29;
|
||||
x_10 = x_35;
|
||||
x_10 = x_36;
|
||||
goto _start;
|
||||
}
|
||||
case 8:
|
||||
{
|
||||
lean_object* x_44; lean_object* x_45; lean_object* x_46; lean_object* x_47; lean_object* x_48; lean_object* x_49; lean_object* x_50; lean_object* x_51; lean_object* x_52; lean_object* x_53; lean_object* x_54; lean_object* x_55; lean_object* x_56; lean_object* x_57; lean_object* x_58; lean_object* x_59;
|
||||
x_44 = lean_ctor_get(x_8, 0);
|
||||
lean_inc(x_44);
|
||||
x_45 = lean_ctor_get(x_8, 1);
|
||||
lean_object* x_45; lean_object* x_46; lean_object* x_47; lean_object* x_48; lean_object* x_49; lean_object* x_50; lean_object* x_51; lean_object* x_52; lean_object* x_53; lean_object* x_54; lean_object* x_55; lean_object* x_56; lean_object* x_57; lean_object* x_58; lean_object* x_59; lean_object* x_60; lean_object* x_61;
|
||||
x_45 = lean_ctor_get(x_8, 0);
|
||||
lean_inc(x_45);
|
||||
x_46 = lean_ctor_get(x_8, 2);
|
||||
x_46 = lean_ctor_get(x_8, 1);
|
||||
lean_inc(x_46);
|
||||
x_47 = lean_ctor_get(x_8, 3);
|
||||
x_47 = lean_ctor_get(x_8, 2);
|
||||
lean_inc(x_47);
|
||||
x_48 = lean_ctor_get(x_8, 3);
|
||||
lean_inc(x_48);
|
||||
lean_dec(x_8);
|
||||
x_48 = lean_array_get_size(x_5);
|
||||
x_49 = lean_expr_instantiate_rev_range(x_45, x_6, x_48, x_5);
|
||||
lean_dec(x_45);
|
||||
x_50 = lean_expr_instantiate_rev_range(x_46, x_6, x_48, x_5);
|
||||
lean_dec(x_48);
|
||||
x_49 = lean_array_get_size(x_5);
|
||||
x_50 = lean_expr_instantiate_rev_range(x_46, x_6, x_49, x_5);
|
||||
lean_dec(x_46);
|
||||
x_51 = l_Lean_Meta_mkFreshId___rarg(x_10);
|
||||
x_52 = lean_ctor_get(x_51, 0);
|
||||
lean_inc(x_52);
|
||||
x_53 = lean_ctor_get(x_51, 1);
|
||||
lean_inc(x_53);
|
||||
lean_dec(x_51);
|
||||
lean_inc(x_4);
|
||||
x_54 = l_Lean_Meta_mkAuxName(x_1, x_4, x_44, x_7);
|
||||
x_55 = lean_ctor_get(x_54, 0);
|
||||
x_51 = l_Lean_Expr_headBeta(x_50);
|
||||
x_52 = lean_expr_instantiate_rev_range(x_47, x_6, x_49, x_5);
|
||||
lean_dec(x_49);
|
||||
lean_dec(x_47);
|
||||
x_53 = l_Lean_Meta_mkFreshId___rarg(x_10);
|
||||
x_54 = lean_ctor_get(x_53, 0);
|
||||
lean_inc(x_54);
|
||||
x_55 = lean_ctor_get(x_53, 1);
|
||||
lean_inc(x_55);
|
||||
x_56 = lean_ctor_get(x_54, 1);
|
||||
lean_inc(x_56);
|
||||
lean_dec(x_54);
|
||||
lean_inc(x_52);
|
||||
x_57 = lean_local_ctx_mk_let_decl(x_4, x_52, x_55, x_49, x_50);
|
||||
x_58 = l_Lean_mkFVar(x_52);
|
||||
x_59 = lean_array_push(x_5, x_58);
|
||||
lean_dec(x_53);
|
||||
lean_inc(x_4);
|
||||
x_56 = l_Lean_Meta_mkAuxName(x_1, x_4, x_45, x_7);
|
||||
x_57 = lean_ctor_get(x_56, 0);
|
||||
lean_inc(x_57);
|
||||
x_58 = lean_ctor_get(x_56, 1);
|
||||
lean_inc(x_58);
|
||||
lean_dec(x_56);
|
||||
lean_inc(x_54);
|
||||
x_59 = lean_local_ctx_mk_let_decl(x_4, x_54, x_57, x_51, x_52);
|
||||
x_60 = l_Lean_mkFVar(x_54);
|
||||
x_61 = lean_array_push(x_5, x_60);
|
||||
x_3 = x_14;
|
||||
x_4 = x_57;
|
||||
x_5 = x_59;
|
||||
x_7 = x_56;
|
||||
x_8 = x_47;
|
||||
x_10 = x_53;
|
||||
x_4 = x_59;
|
||||
x_5 = x_61;
|
||||
x_7 = x_58;
|
||||
x_8 = x_48;
|
||||
x_10 = x_55;
|
||||
goto _start;
|
||||
}
|
||||
default:
|
||||
{
|
||||
lean_object* x_61;
|
||||
x_61 = lean_box(0);
|
||||
x_15 = x_61;
|
||||
lean_object* x_63;
|
||||
x_63 = lean_box(0);
|
||||
x_15 = x_63;
|
||||
goto block_26;
|
||||
}
|
||||
}
|
||||
|
|
@ -5465,47 +5471,47 @@ return x_25;
|
|||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_62; lean_object* x_63; uint8_t x_64;
|
||||
lean_object* x_64; lean_object* x_65; uint8_t x_66;
|
||||
lean_dec(x_7);
|
||||
lean_dec(x_3);
|
||||
x_62 = lean_array_get_size(x_5);
|
||||
x_63 = lean_expr_instantiate_rev_range(x_8, x_6, x_62, x_5);
|
||||
lean_dec(x_62);
|
||||
x_64 = lean_array_get_size(x_5);
|
||||
x_65 = lean_expr_instantiate_rev_range(x_8, x_6, x_64, x_5);
|
||||
lean_dec(x_64);
|
||||
lean_dec(x_8);
|
||||
x_64 = !lean_is_exclusive(x_9);
|
||||
if (x_64 == 0)
|
||||
x_66 = !lean_is_exclusive(x_9);
|
||||
if (x_66 == 0)
|
||||
{
|
||||
lean_object* x_65; lean_object* x_66;
|
||||
x_65 = lean_ctor_get(x_9, 1);
|
||||
lean_dec(x_65);
|
||||
lean_object* x_67; lean_object* x_68;
|
||||
x_67 = lean_ctor_get(x_9, 1);
|
||||
lean_dec(x_67);
|
||||
lean_ctor_set(x_9, 1, x_4);
|
||||
lean_inc(x_5);
|
||||
x_66 = l_Lean_Meta_withNewLocalInstances___main___at_Lean_Meta_introN___spec__3(x_2, x_5, x_63, x_5, x_6, x_9, x_10);
|
||||
x_68 = l_Lean_Meta_withNewLocalInstances___main___at_Lean_Meta_introN___spec__3(x_2, x_5, x_65, x_5, x_6, x_9, x_10);
|
||||
lean_dec(x_5);
|
||||
return x_66;
|
||||
return x_68;
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_67; lean_object* x_68; lean_object* x_69; lean_object* x_70; lean_object* x_71; lean_object* x_72;
|
||||
x_67 = lean_ctor_get(x_9, 0);
|
||||
x_68 = lean_ctor_get(x_9, 2);
|
||||
x_69 = lean_ctor_get(x_9, 3);
|
||||
x_70 = lean_ctor_get(x_9, 4);
|
||||
lean_object* x_69; lean_object* x_70; lean_object* x_71; lean_object* x_72; lean_object* x_73; lean_object* x_74;
|
||||
x_69 = lean_ctor_get(x_9, 0);
|
||||
x_70 = lean_ctor_get(x_9, 2);
|
||||
x_71 = lean_ctor_get(x_9, 3);
|
||||
x_72 = lean_ctor_get(x_9, 4);
|
||||
lean_inc(x_72);
|
||||
lean_inc(x_71);
|
||||
lean_inc(x_70);
|
||||
lean_inc(x_69);
|
||||
lean_inc(x_68);
|
||||
lean_inc(x_67);
|
||||
lean_dec(x_9);
|
||||
x_71 = lean_alloc_ctor(0, 5, 0);
|
||||
lean_ctor_set(x_71, 0, x_67);
|
||||
lean_ctor_set(x_71, 1, x_4);
|
||||
lean_ctor_set(x_71, 2, x_68);
|
||||
lean_ctor_set(x_71, 3, x_69);
|
||||
lean_ctor_set(x_71, 4, x_70);
|
||||
x_73 = lean_alloc_ctor(0, 5, 0);
|
||||
lean_ctor_set(x_73, 0, x_69);
|
||||
lean_ctor_set(x_73, 1, x_4);
|
||||
lean_ctor_set(x_73, 2, x_70);
|
||||
lean_ctor_set(x_73, 3, x_71);
|
||||
lean_ctor_set(x_73, 4, x_72);
|
||||
lean_inc(x_5);
|
||||
x_72 = l_Lean_Meta_withNewLocalInstances___main___at_Lean_Meta_introN___spec__3(x_2, x_5, x_63, x_5, x_6, x_71, x_10);
|
||||
x_74 = l_Lean_Meta_withNewLocalInstances___main___at_Lean_Meta_introN___spec__3(x_2, x_5, x_65, x_5, x_6, x_73, x_10);
|
||||
lean_dec(x_5);
|
||||
return x_72;
|
||||
return x_74;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue