Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/Lean/Mathlib/Mathlib/Util/     Datei vom 15.10.2026 mit Größe 631 B image not shown  

Quelle  ElabWithoutMVars.lean   Sprache: Lean

 

/-
Copyright (c) 2025 Vasilii Nesterov. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Vasilii Nesterov
-/

module

public import Mathlib.Init

/-!
# `elabTermWithoutNewMVars`
-/


public meta section

open Lean Elab Tactic

/-- Elaborates a term with `errToSorry = false` and ensuring it has no metavariables. -/
def elabTermWithoutNewMVars (tactic : Name) (t : Term) : TacticM Expr := Term.withoutErrToSorry do
  let (e, mvars) ← elabTermWithHoles t none tactic
  unless mvars.isEmpty do
    throwErrorAt t "Argument passed to {tactic} has metavariables:{indentD e}"
  return e

Messung
CHZG
9410010097

¤ Dauer der Verarbeitung: 0.4 Sekunden  ¤

*© Formatika GbR, Deutschland