File: .lake/packages/Qq/Qq/MetaM.lean

full_name: Qq.mkFreshExprMVarQ
code: def mkFreshExprMVarQ (ty : Q(Sort u)) (kind := MetavarKind.natural) (userName := Name.anonymous) : MetaM Q($ty) 
goal: Lean.MetaM Q(«$ty»)

full_name: Qq.withLocalDeclDQ
code: def withLocalDeclDQ [Monad n] [MonadControlT MetaM n] (name : Name) (β : Q(Sort u)) (k : Q($β) → n α) : n α 
goal: n α

full_name: Qq.withLocalDeclQ
code: def withLocalDeclQ [Monad n] [MonadControlT MetaM n] (name : Name) (bi : BinderInfo) (β : Q(Sort u)) (k : Q($β) → n α) : n α 
goal: n α

full_name: Qq.trySynthInstanceQ
code: def trySynthInstanceQ (α : Q(Sort u)) : MetaM (LOption Q($α)) 
goal: Lean.MetaM (Lean.LOption Q(«$α»))

full_name: Qq.synthInstanceQ
code: def synthInstanceQ (α : Q(Sort u)) : MetaM Q($α) 
goal: Lean.MetaM Q(«$α»)

full_name: Qq.instantiateMVarsQ
code: def instantiateMVarsQ {α : Q(Sort u)} (e : Q($α)) : MetaM Q($α) 
goal: Lean.MetaM Q(«$α»)

full_name: Qq.elabTermEnsuringTypeQ
code: def elabTermEnsuringTypeQ (stx : Syntax) (expectedType : Q(Sort u))
    (catchExPostpone := true) (implicitLambda := true) (errorMsgHeader? : Option String := none) :
    TermElabM Q($expectedType) 
goal: Lean.Elab.TermElabM Q(«$expectedType»)

full_name: Qq.inferTypeQ
code: /--
A `Qq`-ified version of `Lean.Meta.inferType`

Instead of writing `let α ← inferType e`, this allows writing `let ⟨u, α, e⟩ ← inferTypeQ e`,
which results in a context of
```
e✝ : Expr
u : Level
α : Q(Type u)
e : Q($α)
```
Here, the new `e` is defeq to the old one, but now has `Qq`-ascribed type information.

This is frequently useful when using the `~q` matching from `QQ/Match.lean`,
as it allows an `Expr` to be turned into something that can be matched upon.
-/
def inferTypeQ (e : Expr) : MetaM ((u : Level) × (α : Q(Sort $u)) × Q($α)) 
goal: Lean.MetaM
  ((u : Lean.Level) ×
    (α :
      let u := u;
      Q(Sort u)) ×
      Q(«$α»))

full_name: Qq.checkTypeQ
code: /-- If `e` is a `ty`, then view it as a term of `Q($ty)`. -/
def checkTypeQ (e : Expr) (ty : Q(Sort $u)) : MetaM (Option Q($ty)) 
goal: Lean.MetaM (Option Q(«$ty»))

full_name: Qq.MaybeDefEq.notDefEq
code: /-- The result of `Qq.isDefEqQ`; `MaybeDefEq a b` is an optional version of `$a =Q $b`. -/
inductive MaybeDefEq {α : Q(Sort $u)} (a b : Q($α)) where
  | defEq : QuotedDefEq a b → MaybeDefEq a b
  | notDefEq : MaybeDefEq a b
goal: Qq.MaybeDefEq a b

full_name: Qq.MaybeDefEq.defEq
code: /-- The result of `Qq.isDefEqQ`; `MaybeDefEq a b` is an optional version of `$a =Q $b`. -/
inductive MaybeDefEq {α : Q(Sort $u)} (a b : Q($α)) where
  | defEq : QuotedDefEq a b → MaybeDefEq a b
  | notDefEq : MaybeDefEq a b
goal: «$a» =Q «$b» → Qq.MaybeDefEq a b

full_name: Qq.MaybeDefEq
code: /-- The result of `Qq.isDefEqQ`; `MaybeDefEq a b` is an optional version of `$a =Q $b`. -/
inductive MaybeDefEq {α : Q(Sort $u)} (a b : Q($α)) where
  | defEq : QuotedDefEq a b → MaybeDefEq a b
  | notDefEq : MaybeDefEq a b
goal: Type

full_name: Qq.instReprMaybeDefEq
code: instance : Repr (MaybeDefEq a b) 
goal: {u : Lean.Level} →
  {α :
      let u := u;
      Q(Sort u)} →
    {a b : Q(«$α»)} → Repr (Qq.MaybeDefEq a b)

full_name: Qq.isDefEqQ
code: /-- A version of `Lean.Meta.isDefEq` which returns a strongly-typed witness rather than a bool. -/
def isDefEqQ {α : Q(Sort $u)} (a b : Q($α)) : MetaM (MaybeDefEq a b) 
goal: Lean.MetaM (Qq.MaybeDefEq a b)

full_name: Qq.assertDefEqQ
code: /-- Like `Qq.isDefEqQ`, but throws an error if not defeq. -/
def assertDefEqQ {α : Q(Sort $u)} (a b : Q($α)) : MetaM (PLift (QuotedDefEq a b)) 
goal: Lean.MetaM (PLift («$a» =Q «$b»))