Documentation

Mathlib.Lean.Meta

Additional utilities in Lean.MVarId #

Add the hypothesis h : t, given v : t, and return the new FVarId.

Equations
Instances For

    Has the effect of refine ⟨e₁,e₂,⋯, ?_⟩.

    Equations
    • One or more equations did not get rendered due to their size.
    Instances For

      Applies intro repeatedly until it fails. We use this instead of Lean.MVarId.intros to allowing unfolding. For example, if we want to do introductions for propositions like ¬p, the ¬ needs to be unfolded into False, and intros does not do such unfolding.

      Equations
      Instances For

        Try to convert an Iff into an Eq by applying iff_of_eq. If successful, returns the new goal, and otherwise returns the original MVarId.

        This may be regarded as being a special case of Lean.MVarId.liftReflToEq, specifically for Iff.

        Equations
        • One or more equations did not get rendered due to their size.
        Instances For

          Try to convert an Eq into an Iff by applying propext. If successful, then returns then new goal, otherwise returns the original MVarId.

          Equations
          • One or more equations did not get rendered due to their size.
          Instances For

            Try to close the goal with using proof_irrel_heq. Returns whether or not it succeeds.

            We need to be somewhat careful not to assign metavariables while doing this, otherwise we might specialize Sort _ to Prop.

            Equations
            • One or more equations did not get rendered due to their size.
            Instances For

              Try to close the goal using Subsingleton.elim. Returns whether or not it succeeds.

              We are careful to apply Subsingleton.elim in a way that does not assign any metavariables. This is to prevent the Subsingleton Prop instance from being used as justification to specialize Sort _ to Prop.

              Equations
              • One or more equations did not get rendered due to their size.
              Instances For

                Count how many local hypotheses appear in an expression.

                Equations
                • One or more equations did not get rendered due to their size.
                Instances For

                  Get the type the given metavariable after instantiating metavariables and cleaning up annotations.

                  Equations
                  Instances For

                    Analogue of liftMetaTactic for tactics that return a single goal.

                    Equations
                    Instances For

                      Copy of Lean.Elab.Tactic.run that can return a value.

                      Equations
                      • One or more equations did not get rendered due to their size.
                      Instances For