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.
Instances For
Instances For
Instances For
Instances For
Instances For
def Lean.Meta.Sym.Internal.mkMDataS {m : Type → Type} [MonadShareCommon m] [Monad m] (d : MData) (e : Expr) :
m Expr
Instances For
def Lean.Meta.Sym.Internal.mkProjS {m : Type → Type} [MonadShareCommon m] [Monad m] (structName : Name) (idx : Nat) (struct : Expr) :
m Expr
Instances For
def Lean.Meta.Sym.Internal.mkAppS {m : Type → Type} [MonadShareCommon m] [Monad m] (f a : Expr) :
m Expr
Instances For
def Lean.Meta.Sym.Internal.mkLambdaS {m : Type → Type} [MonadShareCommon m] [Monad m] (x : Name) (bi : BinderInfo) (t b : Expr) :
m Expr
Instances For
def Lean.Meta.Sym.Internal.mkForallS {m : Type → Type} [MonadShareCommon m] [Monad m] (x : Name) (bi : BinderInfo) (t b : Expr) :
m Expr
Instances For
def Lean.Meta.Sym.Internal.mkHaveS {m : Type → Type} [MonadShareCommon m] [Monad m] (x : Name) (t v b : Expr) :
m Expr
Instances For
@[inline]
def Lean.Expr.updateAppS! {m : Type → Type} [Meta.Sym.Internal.MonadShareCommon m] [Monad m] (e newFn newArg : Expr) :
m Expr
Instances For
@[inline]
def Lean.Expr.updateMDataS! {m : Type → Type} [Meta.Sym.Internal.MonadShareCommon m] [Monad m] (e newExpr : Expr) :
m Expr
Instances For
@[inline]
def Lean.Expr.updateProjS! {m : Type → Type} [Meta.Sym.Internal.MonadShareCommon m] [Monad m] (e newExpr : Expr) :
m Expr
Instances For
@[inline]
def Lean.Expr.updateForallS! {m : Type → Type} [Meta.Sym.Internal.MonadShareCommon m] [Monad m] (e newDomain newBody : Expr) :
m Expr
Instances For
@[inline]
def Lean.Expr.updateLambdaS! {m : Type → Type} [Meta.Sym.Internal.MonadShareCommon m] [Monad m] (e newDomain newBody : Expr) :
m Expr
Instances For
@[inline]
def Lean.Expr.updateLetS! {m : Type → Type} [Meta.Sym.Internal.MonadShareCommon m] [Monad m] (e newType newVal newBody : Expr) :
m Expr
Instances For
def Lean.Meta.Sym.Internal.mkAppS₂ {m : Type → Type} [MonadShareCommon m] [Monad m] (f a₁ a₂ : Expr) :
m Expr
Instances For
def Lean.Meta.Sym.Internal.mkAppS₃ {m : Type → Type} [MonadShareCommon m] [Monad m] (f a₁ a₂ a₃ : Expr) :
m Expr
Instances For
def Lean.Meta.Sym.Internal.mkAppS₄ {m : Type → Type} [MonadShareCommon m] [Monad m] (f a₁ a₂ a₃ a₄ : Expr) :
m Expr
Instances For
def Lean.Meta.Sym.Internal.mkAppS₅ {m : Type → Type} [MonadShareCommon m] [Monad m] (f a₁ a₂ a₃ a₄ a₅ : Expr) :
m Expr
Instances For
def Lean.Meta.Sym.Internal.mkAppS₆ {m : Type → Type} [MonadShareCommon m] [Monad m] (f a₁ a₂ a₃ a₄ a₅ a₆ : Expr) :
m Expr
Instances For
def Lean.Meta.Sym.Internal.mkAppS₇ {m : Type → Type} [MonadShareCommon m] [Monad m] (f a₁ a₂ a₃ a₄ a₅ a₆ a₇ : Expr) :
m Expr
Instances For
def Lean.Meta.Sym.Internal.mkAppS₈ {m : Type → Type} [MonadShareCommon m] [Monad m] (f a₁ a₂ a₃ a₄ a₅ a₆ a₇ a₈ : Expr) :
m Expr
Instances For
def Lean.Meta.Sym.Internal.mkAppS₉ {m : Type → Type} [MonadShareCommon m] [Monad m] (f a₁ a₂ a₃ a₄ a₅ a₆ a₇ a₈ a₉ : Expr) :
m Expr
Instances For
def Lean.Meta.Sym.Internal.mkAppS₁₀ {m : Type → Type} [MonadShareCommon m] [Monad m] (f a₁ a₂ a₃ a₄ a₅ a₆ a₇ a₈ a₉ a₁₀ : Expr) :
m Expr
Instances For
def Lean.Meta.Sym.Internal.mkAppS₁₁ {m : Type → Type} [MonadShareCommon m] [Monad m] (f a₁ a₂ a₃ a₄ a₅ a₆ a₇ a₈ a₉ a₁₀ a₁₁ : Expr) :
m Expr
Instances For
def Lean.Meta.Sym.Internal.mkAppRangeS {m : Type → Type} [MonadShareCommon m] [Monad m] (f : Expr) (beginIdx endIdx : Nat) (args : Array Expr) :
m Expr
mkAppRangeS f i j #[a₀, ..., aᵢ, ..., aⱼ, ...] ==> f aᵢ ... aⱼ₋₁ with max sharing.
Instances For
def Lean.Meta.Sym.Internal.mkAppRevRangeS {m : Type → Type} [MonadShareCommon m] [Monad m] (f : Expr) (beginIdx endIdx : Nat) (revArgs : Array Expr) :
m Expr
mkAppRevRangeS f b e revArgs ==> mkAppRev f (revArgs.extract b e) with max sharing.