Equations
- Auto.Expr.eraseMData (fn.app arg) = (Auto.Expr.eraseMData fn).app (Auto.Expr.eraseMData arg)
- Auto.Expr.eraseMData (Lean.Expr.lam name ty body bi) = Lean.Expr.lam name (Auto.Expr.eraseMData ty) (Auto.Expr.eraseMData body) bi
- Auto.Expr.eraseMData (Lean.Expr.forallE name ty body bi) = Lean.Expr.forallE name (Auto.Expr.eraseMData ty) (Auto.Expr.eraseMData body) bi
- Auto.Expr.eraseMData (Lean.Expr.letE name type value body nonDep) = Lean.Expr.letE name (Auto.Expr.eraseMData type) (Auto.Expr.eraseMData value) (Auto.Expr.eraseMData body) nonDep
- Auto.Expr.eraseMData (Lean.Expr.mdata data expr) = expr
- Auto.Expr.eraseMData (Lean.Expr.proj typeName idx struct) = Lean.Expr.proj typeName idx (Auto.Expr.eraseMData struct)
- Auto.Expr.eraseMData x✝ = x✝
Instances For
Equations
- One or more equations did not get rendered due to their size.
- Auto.Expr.hasCurrentDepthLevelMVar (Lean.Expr.sort l) = Auto.Level.hasCurrentDepthLevelMVar l
- Auto.Expr.hasCurrentDepthLevelMVar (Lean.Expr.const declName ls) = List.anyM Auto.Level.hasCurrentDepthLevelMVar ls
- Auto.Expr.hasCurrentDepthLevelMVar (Lean.Expr.forallE binderName d b binderInfo) = or <$> Auto.Expr.hasCurrentDepthLevelMVar d <*> Auto.Expr.hasCurrentDepthLevelMVar b
- Auto.Expr.hasCurrentDepthLevelMVar (Lean.Expr.lam binderName d b binderInfo) = or <$> Auto.Expr.hasCurrentDepthLevelMVar d <*> Auto.Expr.hasCurrentDepthLevelMVar b
- Auto.Expr.hasCurrentDepthLevelMVar (f.app a) = or <$> Auto.Expr.hasCurrentDepthLevelMVar f <*> Auto.Expr.hasCurrentDepthLevelMVar a
- Auto.Expr.hasCurrentDepthLevelMVar (Lean.Expr.mdata data b) = Auto.Expr.hasCurrentDepthLevelMVar b
- Auto.Expr.hasCurrentDepthLevelMVar (Lean.Expr.proj typeName idx e) = Auto.Expr.hasCurrentDepthLevelMVar e
- Auto.Expr.hasCurrentDepthLevelMVar x✝ = pure false
Instances For
Equations
- Auto.Expr.findParam? p (Lean.Expr.sort l) = Auto.Level.findParam? p l
- Auto.Expr.findParam? p (Lean.Expr.const declName ls) = List.foldl (fun (acc : Option Lean.Name) (x : Lean.Level) => acc.orElse fun (x_1 : Unit) => Auto.Level.findParam? p x) none ls
- Auto.Expr.findParam? p (Lean.Expr.forallE binderName d b binderInfo) = (Auto.Expr.findParam? p d).orElse fun (x : Unit) => Auto.Expr.findParam? p b
- Auto.Expr.findParam? p (Lean.Expr.lam binderName d b binderInfo) = (Auto.Expr.findParam? p d).orElse fun (x : Unit) => Auto.Expr.findParam? p b
- Auto.Expr.findParam? p (Lean.Expr.letE declName t v b nonDep) = (Auto.Expr.findParam? p t).orElse fun (x : Unit) => (Auto.Expr.findParam? p v).orElse fun (x : Unit) => Auto.Expr.findParam? p b
- Auto.Expr.findParam? p (f.app a) = (Auto.Expr.findParam? p f).orElse fun (x : Unit) => Auto.Expr.findParam? p a
- Auto.Expr.findParam? p (Lean.Expr.mdata data b) = Auto.Expr.findParam? p b
- Auto.Expr.findParam? p (Lean.Expr.proj typeName idx e) = Auto.Expr.findParam? p e
- Auto.Expr.findParam? p x✝ = none
Instances For
Equations
- Auto.Expr.forallBinders e = { toList := Auto.Expr.forallBinders.aux e }
Instances For
Equations
- Auto.Expr.forallBinders.aux (Lean.Expr.forallE n ty b bi) = (n, ty, bi) :: Auto.Expr.forallBinders.aux b
- Auto.Expr.forallBinders.aux e = []
Instances For
Equations
- One or more equations did not get rendered due to their size.
- Auto.Expr.collectRawM p (f.app a) = do let hf ← Auto.Expr.collectRawM p f let ha ← Auto.Expr.collectRawM p a Auto.Expr.collectRawM.addp? p (f.app a) (Auto.mergeHashSet hf ha)
- Auto.Expr.collectRawM p (Lean.Expr.mdata data b) = do let hb ← Auto.Expr.collectRawM p b Auto.Expr.collectRawM.addp? p (Lean.Expr.mdata data b) hb
- Auto.Expr.collectRawM p (Lean.Expr.proj typeName idx b) = do let hb ← Auto.Expr.collectRawM p b Auto.Expr.collectRawM.addp? p (Lean.Expr.proj typeName idx b) hb
- Auto.Expr.collectRawM p x✝ = Auto.Expr.collectRawM.addp? p x✝ Std.HashSet.emptyWithCapacity
Instances For
Equations
Instances For
Equations
- Auto.Expr.lambdaBinders e = { toList := Auto.Expr.lambdaBinders.aux e }
Instances For
Equations
- Auto.Expr.lambdaBinders.aux (Lean.Expr.lam n ty b bi) = (n, ty, bi) :: Auto.Expr.lambdaBinders.aux b
- Auto.Expr.lambdaBinders.aux e = []
Instances For
Equations
- Auto.Expr.isDepForall (Lean.Expr.forallE n ty b bi) = b.hasLooseBVar 0
- Auto.Expr.isDepForall e = false
Instances For
Equations
- Auto.Expr.isDepLambda (Lean.Expr.lam n ty b bi) = b.hasLooseBVar 0
- Auto.Expr.isDepLambda e = false
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- Auto.Expr.stripForall (Lean.Expr.forallE n ty b bi) = Auto.Expr.stripForall b
- Auto.Expr.stripForall e = e
Instances For
Equations
- Auto.Expr.stripLeadingDepForall (Lean.Expr.forallE n ty b bi) = if b.hasLooseBVar 0 = true then Auto.Expr.stripLeadingDepForall b else Lean.Expr.forallE n ty b bi
- Auto.Expr.stripLeadingDepForall e = e
Instances For
Equations
- Auto.Expr.stripForallN 0 e = some e
- Auto.Expr.stripForallN n'.succ (Lean.Expr.forallE n ty b bi) = Auto.Expr.stripForallN n' b
- Auto.Expr.stripForallN n'.succ e = none
Instances For
Equations
- Auto.Expr.stripLambda (Lean.Expr.lam n ty b bi) = Auto.Expr.stripLambda b
- Auto.Expr.stripLambda e = e
Instances For
Equations
- Auto.Expr.stripLeadingDepLambda (Lean.Expr.lam n ty b bi) = if b.hasLooseBVar 0 = true then Auto.Expr.stripLeadingDepLambda b else Lean.Expr.lam n ty b bi
- Auto.Expr.stripLeadingDepLambda e = e
Instances For
Equations
- Auto.Expr.stripLambdaN 0 e = some e
- Auto.Expr.stripLambdaN n'.succ (Lean.Expr.lam n ty b bi) = Auto.Expr.stripLambdaN n' b
- Auto.Expr.stripLambdaN n'.succ e = none
Instances For
Equations
- Auto.Expr.getAppFnN 0 e = some e
- Auto.Expr.getAppFnN n'.succ (fn.app arg) = Auto.Expr.getAppFnN n' fn
- Auto.Expr.getAppFnN n'.succ e = none
Instances For
Equations
- Auto.Expr.getAppBoundedArgs n e = { toList := (Auto.Expr.getAppBoundedArgsAux✝ n e).reverse }
Instances For
Given an expression e
, which is the type of some term
t
, find the arguments of t
that are class instances
Equations
- Auto.Expr.instArgs e = { toList := Auto.Expr.instArgsIdx✝ e 0 }
Instances For
Given e = ∀ (xs : αs), t
, return the indexes of dependent ∀
binders
within xs
. This function only works for expressions that does not
contain loose bound variables
Equations
- Auto.Expr.depArgs e = { toList := Auto.Expr.depArgsIdx✝ e 0 }
Instances For
Given the name c
of a constant, suppose @c : ty
, return
Expr.depArgs ty
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- Auto.Expr.numLeadingDepArgs (Lean.Expr.forallE n ty b bi) = if b.hasLooseBVar 0 = true then Auto.Expr.numLeadingDepArgs b + 1 else 0
- Auto.Expr.numLeadingDepArgs x✝ = 0
Instances For
This should only be used when we're sure that reducing ty
won't be too expensive
e.g. ty
must be defeq to Expr.sort <?lvl>
Equations
- Auto.Expr.normalizeType ty = do let ty ← Lean.Meta.reduceAll ty let __do_lift ← Lean.instantiateMVars ty pure __do_lift
Instances For
Equations
Instances For
Given expression e₁, e₂
where e₁
have universe level parameters
params
, attempt to find variables x₁, ⋯, xₗ
,
terms t₁, ⋯, tₖ
and a m ≤ l
such that ∀ x₁ ⋯ xₗ. e₁ t₁ ⋯ tₖ = e₂ x₁ ⋯ xₘ
Note that universe polymorphism is not supported
If successful, return
(fun x₁ ⋯ xₗ => Eq.refl (e₂ x₁ ⋯ xₘ), ∀ x₁ ⋯ xₗ. e₁ t₁ ⋯ tₖ = e₂ x₁ ⋯ xₘ)
Otherwise, return .none
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
ident
must be of type Expr → TermElabM Unit
Compiles term
into Expr
, then applies ident
to it
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Consider the canonical instance of Lean.ToExpr Expr
. We require that
(← exprFromExpr (← Lean.toExpr e)) ≝ e
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- Auto.lazyReduce = Lean.ParserDescr.node `Auto.lazyReduce 1022 (Lean.ParserDescr.binary `andthen (Lean.ParserDescr.symbol "#lazyReduce") (Lean.ParserDescr.cat `term 0))
Instances For
Equations
- One or more equations did not get rendered due to their size.