Documentation

Lean.Meta.Tactic.Grind.Attr

The grind normalization theorems as Sym.simp theorem sets, the state of normSymExt. The [grind norm]/[grind unfold] attributes populate it together with normExt, so both normalizers see the same declarations.

  • Theorems applied before visiting subterms ([grind norm ↓]).

  • Theorems applied after visiting subterms ([grind norm]), and the equational theorems of the declarations to unfold ([grind unfold]).

  • The rfl-theorems of post and the declarations to unfold, for Sym.dsimp. grind needs dsimp in one place: the right-hand side of a generalized pattern (mkGeneralizedPatternEqProof) must stay definitionally equal to the term it replaces, e.g. Nat.succ x becomes x + 1.

Instances For
    Equations
    Instances For
      def Lean.Meta.Grind.addNormTheorem (declName : Name) (post inv : Bool) (attrKind : AttributeKind) (prio : Nat := 1000) :

      Adds the [grind norm] theorem declName to normExt and normSymExt.

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

        Adds the [grind unfold] declaration declName to normSymExt.

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

          Adds the [grind unfold] declaration declName to normExt and normSymExt. Returns false if the declaration cannot be unfolded.

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

              Return theorem kind for stx of the form Attr.grindThmMod

              Equations
              • One or more equations did not get rendered due to their size.
              Instances For
                Equations
                Instances For
                  Equations
                  • One or more equations did not get rendered due to their size.
                  Instances For
                    def Lean.Meta.Grind.registerAttr (attrName : Name) (ref : Name := by exact decl_name%) :
                    Equations
                    • One or more equations did not get rendered due to their size.
                    Instances For

                      Extension backing the @[lia] attribute. It uses the same recording mechanism as @[grind] (see registerAttr), but provides a separate, smaller E-matching lemma set that the lia tactic instantiates (e.g. Nat.max_def), without enabling the full @[grind] set.

                      Returns true is declName is a builtin split or has been tagged with [grind] attribute.

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