Documentation

PfsProgs25.Unit13.MetaSolve

Given the expression of a term, we can try to directly match it, and there are helpers for this. But there is a smarter way using Lean's unification function isDefEq.

The function isDefEq takes two terms and returns a MetaM Bool. It returns true if the two terms are definitionally equal. More interestingly, if the terms have metavariables, it will try to solve them.

Equations
  • leExpr? e = match e.app4? `LE.le with | some (a, fst, b, c) => some (a, b, c) | x => none
Instances For
    Equations
    • One or more equations did not get rendered due to their size.
    Instances For

      We will match in a smarted way:

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

          We will experiment with universe meta-levels. We will create a list [0] as List.cons 0 List.nil.

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