Helper functions for constructing maximally shared expressions from maximally shared expressions.
That is, mkAppS f a assumes that f and a are maximally shared.
These functions are in the Internal namespace because they can be easily misused.
We use them to construct safe functions.
@[reducible, inline]
Helper function for lifting a AlphaShareBuilderM action to GrindM
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
Instances For
def
Lean.Meta.Sym.Internal.mkConstS
{m : Type → Type}
[MonadShareCommon m]
(declName : Name)
(us : List Level := [])
:
m Expr
Equations
- Lean.Meta.Sym.Internal.mkConstS declName us = Lean.Meta.Sym.Internal.MonadShareCommon.share1 (Lean.Expr.const declName us)
Instances For
Equations
Instances For
Equations
Instances For
Equations
Instances For
Equations
Instances For
def
Lean.Meta.Sym.Internal.mkMDataS
{m : Type → Type}
[MonadShareCommon m]
[Monad m]
(d : MData)
(e : Expr)
:
m Expr
Equations
- One or more equations did not get rendered due to their size.
Instances For
def
Lean.Meta.Sym.Internal.mkProjS
{m : Type → Type}
[MonadShareCommon m]
[Monad m]
(structName : Name)
(idx : Nat)
(struct : Expr)
:
m Expr
Equations
- One or more equations did not get rendered due to their size.
Instances For
def
Lean.Meta.Sym.Internal.mkAppS
{m : Type → Type}
[MonadShareCommon m]
[Monad m]
(f a : Expr)
:
m Expr
Equations
- One or more equations did not get rendered due to their size.
Instances For
def
Lean.Meta.Sym.Internal.mkLambdaS
{m : Type → Type}
[MonadShareCommon m]
[Monad m]
(x : Name)
(bi : BinderInfo)
(t b : Expr)
:
m Expr
Equations
- One or more equations did not get rendered due to their size.
Instances For
def
Lean.Meta.Sym.Internal.mkForallS
{m : Type → Type}
[MonadShareCommon m]
[Monad m]
(x : Name)
(bi : BinderInfo)
(t b : Expr)
:
m Expr
Equations
- One or more equations did not get rendered due to their size.
Instances For
def
Lean.Meta.Sym.Internal.mkHaveS
{m : Type → Type}
[MonadShareCommon m]
[Monad m]
(x : Name)
(t v b : Expr)
:
m Expr
Equations
- One or more equations did not get rendered due to their size.
Instances For
@[inline]
def
Lean.Expr.updateAppS!
{m : Type → Type}
[Meta.Sym.Internal.MonadShareCommon m]
[Monad m]
(e newFn newArg : Expr)
:
m Expr
Equations
- (fn.app arg).updateAppS! newFn newArg = if (Lean.Meta.Sym.isSameExpr fn newFn && Lean.Meta.Sym.isSameExpr arg newArg) = true then pure (fn.app arg) else Lean.Meta.Sym.Internal.mkAppS newFn newArg
- e.updateAppS! newFn newArg = panicWithPosWithDecl "Lean.Meta.Sym.AlphaShareBuilder" "Lean.Expr.updateAppS!" 148 25 "application expected"
Instances For
@[inline]
def
Lean.Expr.updateMDataS!
{m : Type → Type}
[Meta.Sym.Internal.MonadShareCommon m]
[Monad m]
(e newExpr : Expr)
:
m Expr
Equations
- (Lean.Expr.mdata d a).updateMDataS! newExpr = if Lean.Meta.Sym.isSameExpr a newExpr = true then pure (Lean.Expr.mdata d a) else Lean.Meta.Sym.Internal.mkMDataS d newExpr
- e.updateMDataS! newExpr = panicWithPosWithDecl "Lean.Meta.Sym.AlphaShareBuilder" "Lean.Expr.updateMDataS!" 152 24 "mdata expected"
Instances For
@[inline]
def
Lean.Expr.updateProjS!
{m : Type → Type}
[Meta.Sym.Internal.MonadShareCommon m]
[Monad m]
(e newExpr : Expr)
:
m Expr
Equations
- (Lean.Expr.proj s i a).updateProjS! newExpr = if Lean.Meta.Sym.isSameExpr a newExpr = true then pure (Lean.Expr.proj s i a) else Lean.Meta.Sym.Internal.mkProjS s i newExpr
- e.updateProjS! newExpr = panicWithPosWithDecl "Lean.Meta.Sym.AlphaShareBuilder" "Lean.Expr.updateProjS!" 156 25 "proj expected"
Instances For
@[inline]
def
Lean.Expr.updateForallS!
{m : Type → Type}
[Meta.Sym.Internal.MonadShareCommon m]
[Monad m]
(e newDomain newBody : Expr)
:
m Expr
Equations
- One or more equations did not get rendered due to their size.
- e.updateForallS! newDomain newBody = panicWithPosWithDecl "Lean.Meta.Sym.AlphaShareBuilder" "Lean.Expr.updateForallS!" 160 31 "forall expected"
Instances For
@[inline]
def
Lean.Expr.updateLambdaS!
{m : Type → Type}
[Meta.Sym.Internal.MonadShareCommon m]
[Monad m]
(e newDomain newBody : Expr)
:
m Expr
Equations
- One or more equations did not get rendered due to their size.
- e.updateLambdaS! newDomain newBody = panicWithPosWithDecl "Lean.Meta.Sym.AlphaShareBuilder" "Lean.Expr.updateLambdaS!" 167 27 "lambda expected"
Instances For
@[inline]
def
Lean.Expr.updateLetS!
{m : Type → Type}
[Meta.Sym.Internal.MonadShareCommon m]
[Monad m]
(e newType newVal newBody : Expr)
:
m Expr
Equations
- One or more equations did not get rendered due to their size.
- e.updateLetS! newType newVal newBody = panicWithPosWithDecl "Lean.Meta.Sym.AlphaShareBuilder" "Lean.Expr.updateLetS!" 174 34 "let expression expected"
Instances For
def
Lean.Meta.Sym.Internal.mkAppS₂
{m : Type → Type}
[MonadShareCommon m]
[Monad m]
(f a₁ a₂ : Expr)
:
m Expr
Equations
- Lean.Meta.Sym.Internal.mkAppS₂ f a₁ a₂ = do let __do_lift ← Lean.Meta.Sym.Internal.mkAppS f a₁ Lean.Meta.Sym.Internal.mkAppS __do_lift a₂
Instances For
def
Lean.Meta.Sym.Internal.mkAppS₃
{m : Type → Type}
[MonadShareCommon m]
[Monad m]
(f a₁ a₂ a₃ : Expr)
:
m Expr
Equations
- Lean.Meta.Sym.Internal.mkAppS₃ f a₁ a₂ a₃ = do let __do_lift ← Lean.Meta.Sym.Internal.mkAppS₂ f a₁ a₂ Lean.Meta.Sym.Internal.mkAppS __do_lift a₃
Instances For
def
Lean.Meta.Sym.Internal.mkAppS₄
{m : Type → Type}
[MonadShareCommon m]
[Monad m]
(f a₁ a₂ a₃ a₄ : Expr)
:
m Expr
Equations
- Lean.Meta.Sym.Internal.mkAppS₄ f a₁ a₂ a₃ a₄ = do let __do_lift ← Lean.Meta.Sym.Internal.mkAppS₃ f a₁ a₂ a₃ Lean.Meta.Sym.Internal.mkAppS __do_lift a₄
Instances For
def
Lean.Meta.Sym.Internal.mkAppS₅
{m : Type → Type}
[MonadShareCommon m]
[Monad m]
(f a₁ a₂ a₃ a₄ a₅ : Expr)
:
m Expr
Equations
- Lean.Meta.Sym.Internal.mkAppS₅ f a₁ a₂ a₃ a₄ a₅ = do let __do_lift ← Lean.Meta.Sym.Internal.mkAppS₄ f a₁ a₂ a₃ a₄ Lean.Meta.Sym.Internal.mkAppS __do_lift a₅