Equations
- Aesop.time x = do let start ← liftM IO.monoNanosNow let a ← x let stop ← liftM IO.monoNanosNow pure (a, { nanos := stop - start })
Equations
- Aesop.time' x = do let start ← liftM IO.monoNanosNow x let stop ← liftM IO.monoNanosNow pure { nanos := stop - start }
Equations
- Aesop.PersistentHashSet.toList s = Lean.PersistentHashSet.fold (fun (as : List α) (a : α) => a :: as) [] s
Equations
- Aesop.PersistentHashSet.toArray s = Lean.PersistentHashSet.fold (fun (as : Array α) (a : α) => as.push a) #[] s
Equations
- Aesop.PersistentHashSet.toHashSet s = Lean.PersistentHashSet.fold (fun (result : Std.HashSet α) (a : α) => result.insert a) ∅ s
Equations
- Aesop.PersistentHashSet.filter p s = Lean.PersistentHashSet.fold (fun (s : Lean.PHashSet α) (a : α) => if p a = true then s else Lean.PersistentHashSet.erase s a) s s
Equations
- Aesop.instForInHashMapProd_aesop = { forIn := fun {β_1 : Type ?u.44} [Monad m] => ForM.forIn }
Equations
- One or more equations did not get rendered due to their size.
Equations
- One or more equations did not get rendered due to their size.
Equations
- Aesop.isEmptyTrie (Lean.Meta.DiscrTree.Trie.node vs children) = (vs.isEmpty && children.isEmpty)
Remove elements for which p
returns false
from the given DiscrTree
.
The removed elements are monadically folded over using f
and init
, so f
is called once for each removed element and the final state of type σ
is
returned.
Equations
- One or more equations did not get rendered due to their size.
Remove elements for which p
returns false
from the given DiscrTree
.
The removed elements are folded over using f
and init
, so f
is called
once for each removed element and the final state of type σ
is returned.
Equations
- Aesop.filterDiscrTree p f init t = (Aesop.filterDiscrTreeM (fun (a : α) => pure { down := p a }) (fun (s : σ) (a : α) => pure (f s a)) init t).run
Equations
- One or more equations did not get rendered due to their size.
- Aesop.SimpTheorems.addSimpEntry s (Lean.Meta.SimpEntry.toUnfoldThms n thms) = s.registerDeclToUnfoldThms n thms
Equations
- One or more equations did not get rendered due to their size.
Equations
- Aesop.SimpTheorems.foldSimpEntriesM.processTheorem f thms s thm = if Lean.PersistentHashSet.contains thms.erased thm.origin = true then pure s else f s (Lean.Meta.SimpEntry.thm thm)
Equations
- Aesop.SimpTheorems.foldSimpEntries f init thms = (Aesop.SimpTheorems.foldSimpEntriesM f init thms).run
Equations
- Aesop.SimpTheorems.simpEntries thms = Aesop.SimpTheorems.foldSimpEntries (fun (s : Array Lean.Meta.SimpEntry) (thm : Lean.Meta.SimpEntry) => s.push thm) #[] thms
Equations
- Aesop.SimpTheorems.containsDecl thms decl = (thms.isLemma (Lean.Meta.Origin.decl decl) || thms.isDeclToUnfold decl || Lean.PersistentHashMap.contains thms.toUnfoldThms decl)
Equations
- One or more equations did not get rendered due to their size.
Equations
- Aesop.forEachExprInLDecl' ldecl g = (Aesop.forEachExprInLDeclCore ldecl g).run
Equations
- Aesop.forEachExprInLDecl ldecl g = (Aesop.forEachExprInLDeclCore ldecl fun (e : Lean.Expr) => do g e pure true).run
Equations
- One or more equations did not get rendered due to their size.
Equations
- Aesop.forEachExprInLCtx' mvarId g = mvarId.withContext do let __do_lift ← liftM mvarId.getDecl (Aesop.forEachExprInLCtxCore __do_lift.lctx g).run
Equations
- Aesop.forEachExprInLCtx mvarId g = Aesop.forEachExprInLCtx' mvarId fun (e : Lean.Expr) => do g e pure true
Equations
- One or more equations did not get rendered due to their size.
Equations
- Aesop.forEachExprInGoal' mvarId g = (Aesop.forEachExprInGoalCore mvarId g).run
Equations
- Aesop.forEachExprInGoal mvarId g = Aesop.forEachExprInGoal' mvarId fun (e : Lean.Expr) => do g e pure true
Equations
- Aesop.setThe σ s = set s
Equations
Equations
Equations
- One or more equations did not get rendered due to their size.
Equations
- Aesop.runTacticSyntaxAsMetaM stx goals = do let __do_lift ← Aesop.runTacticMAsMetaM (Lean.Elab.Tactic.evalTactic stx) goals pure __do_lift.snd
Equations
- One or more equations did not get rendered due to their size.
- Aesop.updateSimpEntryPriority priority (Lean.Meta.SimpEntry.toUnfoldThms a a_1) = Lean.Meta.SimpEntry.toUnfoldThms a a_1
- Aesop.updateSimpEntryPriority priority (Lean.Meta.SimpEntry.toUnfold a) = Lean.Meta.SimpEntry.toUnfold a
Equations
- Aesop.getMVarDependencies e = do let __discr ← (Lean.MVarId.getMVarDependencies.addMVars true e).run ∅ match __discr with | (fst, deps) => pure deps
Equations
- Aesop.hasSorry e = do let __do_lift ← Lean.getMCtx pure (Aesop.hasSorry.go __do_lift e)
Equations
- One or more equations did not get rendered due to their size.
If the input expression e
reduces to f x₁ ... xₙ
via repeated whnf
, this
function returns f
and [x₁, ⋯, xₙ]
. Otherwise it returns e
(unchanged, not
in WHNF!) and []
.
Equations
Partition an array of structures containing MVarId
s into 'goals' and
'proper mvars'. An MVarId
from the input array goals
is classified as a
proper mvar if any of the MVarId
s depend on it, and as a goal otherwise.
Additionally, for each goal, we report the set of mvars that the goal depends
on.
Equations
- One or more equations did not get rendered due to their size.
Equations
- One or more equations did not get rendered due to their size.
Equations
- Aesop.runTacticCapturingPostState t preState preGoals = Aesop.runTacticMCapturingPostState (Lean.Elab.Tactic.evalTactic t.raw) preState preGoals
Equations
- Aesop.runTacticSeqCapturingPostState t preState preGoals = Aesop.runTacticMCapturingPostState (Lean.Elab.Tactic.evalTactic t.raw) preState preGoals
Equations
- One or more equations did not get rendered due to their size.
Equations
- One or more equations did not get rendered due to their size.
- Aesop.withTransparencySeqSyntax Lean.Meta.TransparencyMode.default k = (pure k).run
Equations
- One or more equations did not get rendered due to their size.
- Aesop.withAllTransparencySeqSyntax md k = k
Equations
- One or more equations did not get rendered due to their size.
- Aesop.withTransparencySyntax Lean.Meta.TransparencyMode.default k = (pure k).run
Equations
- One or more equations did not get rendered due to their size.
- Aesop.withAllTransparencySyntax md k = k
Register a "Try this" suggestion for a tactic sequence.
It works when the tactic to replace appears on its own line:
by
aesop?
It doesn't work (i.e., the suggestion will appear but in the wrong place) when the tactic to replace is preceded by other text on the same line:
have x := by aesop?
The Try this:
suggestion in the infoview is not correctly formatted, but
there's nothing we can do about this at the moment.
Equations
- One or more equations did not get rendered due to their size.
Equations
- One or more equations did not get rendered due to their size.
Runs a computation for at most the given number of heartbeats times 1000, ignoring the global heartbeat limit. Note that heartbeats spent on the computation still count towards the global heartbeat count.
Equations
- One or more equations did not get rendered due to their size.
Runs a computation for at most the given number of heartbeats times 1000 or the global heartbeat limit, whichever is lower. Note that heartbeats spent on the computation still count towards the global heartbeat count. If 0 is given, the global heartbeat limit is used.
Equations
- One or more equations did not get rendered due to their size.
Equations
Equations
- One or more equations did not get rendered due to their size.
Equations
Note: the returned local context contains invalid LocalDecl
s.
Equations
- Aesop.getUnusedNames lctx suggestions = Aesop.getUnusedNames.go suggestions 0 (Array.mkEmpty suggestions.size) lctx
Equations
- One or more equations did not get rendered due to their size.
Equations
- Aesop.getUnusedNames.dummyLDecl name = Lean.LocalDecl.cdecl 0 { name := `_ } name (Lean.Expr.sort Lean.levelZero) Lean.BinderInfo.default Lean.LocalDeclKind.default
Equations
- One or more equations did not get rendered due to their size.
Equations
- One or more equations did not get rendered due to their size.
Equations
- Aesop.withExceptionPrefix pre = Aesop.withExceptionTransform fun (msg : Lean.MessageData) => pre ++ msg
Equations
- Aesop.withPPAnalyze x = Lean.withOptions (fun (x : Lean.Options) => (Lean.KVMap.setBool x `pp.analyze true).setBool `pp.proofs true) x
Equations
- Aesop.instMonadCacheStateRefT'_aesop = { findCached? := fun (a : α) => liftM (Lean.MonadCache.findCached? a), cache := fun (a : α) (b : β) => liftM (Lean.MonadCache.cache a b) }
A generalized variant of Meta.SavedState.runMetaM
Equations
- Aesop.runInMetaState s x = do let initialState ← let_fun this := Lean.saveState; liftM this tryFinally (do liftM s.restore x) (liftM initialState.restore)
Equations
- Aesop.compareArraySizeThenLex cmp xs ys = (compare xs.size ys.size).then (Aesop.compareArrayLex cmp xs ys)