Documentation

Mathlib.Tactic.Translate.UnfoldBoundary

Modify proof terms so that they don't rely on unfolding certain constants #

This file defines a procedure for inserting casts into (proof) terms in order to make them well typed in a setting where certain constants aren't allowed to be unfolded.

We make use of withCanUnfoldPred in order to modify which constants can and cannot be unfolded. This way, whnf and isDefEq do not unfold these constants.

So, the procedure is to check that an expression is well typed, analogous to Meta.check, and at each type mismatch, we try to insert a cast.

There are two kinds of casts:

UnfoldBoundaries stores abstraction boundaries for definitions that shouldn't be unfolded.

Instances For

    Modify e so that it has type expectedType if the constants in b cannot be unfolded.

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

      Modify e so that it is well typed if the constants in b cannot be unfolded.

      Note: it may be that e contains some constant whose type is not well typed in this setting. We don't make an effort to replace such constants. It seems that this approximation works well enough.

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

        Unfold all of the auxiliary functions that were inserted as unfold boundaries.

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

          An entry for the UnfoldBoundaries environment extension.

          Instances For

            Register a new UnfoldBoundaryExt.

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