Skip to content

Commit

Permalink
Merge master into nightly-testing
Browse files Browse the repository at this point in the history
  • Loading branch information
leanprover-community-mathlib4-bot committed Jan 17, 2024
2 parents 81b639c + 5919dba commit eae567d
Showing 1 changed file with 0 additions and 18 deletions.
18 changes: 0 additions & 18 deletions Mathlib/Lean/Meta.lean
Original file line number Diff line number Diff line change
Expand Up @@ -121,24 +121,6 @@ def countLocalHypsUsed [Monad m] [MonadLCtx m] [MonadMCtx m] (e : Expr) : m Nat
let e' ← instantiateMVars e
return (← getLocalHyps).toList.countP fun h => h.occurs e'

/--
Given a monadic function `F` that takes a type and a term of that type and produces a new term,
lifts this to the monadic function that opens a `∀` telescope, applies `F` to the body,
and then builds the lambda telescope term for the new term.
-/
def mapForallTelescope' (F : Expr → Expr → MetaM Expr) (forallTerm : Expr) : MetaM Expr := do
forallTelescope (← Meta.inferType forallTerm) fun xs ty => do
Meta.mkLambdaFVars xs (← F ty (mkAppN forallTerm xs))

/--
Given a monadic function `F` that takes a term and produces a new term,
lifts this to the monadic function that opens a `∀` telescope, applies `F` to the body,
and then builds the lambda telescope term for the new term.
-/
def mapForallTelescope (F : Expr → MetaM Expr) (forallTerm : Expr) : MetaM Expr := do
mapForallTelescope' (fun _ e => F e) forallTerm


/-- Get the type the given metavariable after instantiating metavariables and cleaning up
annotations. -/
def _root_.Lean.MVarId.getType'' (mvarId : MVarId) : MetaM Expr :=
Expand Down

0 comments on commit eae567d

Please sign in to comment.