Documentation

Lean.Meta.Tactic.Simp.SimpTheorems

structure Lean.Meta.SimpTheorem:
Type
  • It stores universe parameter names for universe polymorphic proofs. Recall that it is non-empty only when we elaborate an expression provided by the user. When proof is just a constant, we can use the universe parameter names stored in the declaration.

    levelParams : Array Lean.Name
  • proof : Lean.Expr
  • priority : Nat
  • post : Bool
  • perm is true if lhs and rhs are identical modulo permutation of variables.

    perm : Bool
  • name? is mainly relevant for producing trace messages. It is also viewed an id used to "erase" simp theorems from SimpTheorems.

  • rfl is true if proof is by Eq.refl or rfl.

    rfl : Bool

The fields levelParams and proof are used to encode the proof of the simp theorem. If the proof is a global declaration c, we store Expr.const c [] at proof without the universe levels, and levelParams is set to #[] When using the lemma, we create fresh universe metavariables. Motivation: most simp theorems are global declarations, and this approach is faster and saves memory.

The field levelParams is not empty only when we elaborate an expression provided by the user, and it contains universe metavariables. Then, we use abstractMVars to abstract the universe metavariables and create new fresh universe parameters that are stored at the field levelParams.

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

Return true if declName is tagged to be unfolded using unfoldDefinition? (i.e., without using equational theorems).

Equations

Register the equational theorems for the given definition.

Equations
  • One or more equations did not get rendered due to their size.
def Lean.Meta.SimpTheorems.erase {m : TypeType} [inst : Monad m] [inst : Lean.MonadError m] (d : Lean.Meta.SimpTheorems) (declName : Lean.Name) :
Equations
  • One or more equations did not get rendered due to their size.
def Lean.Meta.addSimpTheorem (ext : Lean.Meta.SimpExtension) (declName : Lean.Name) (post : Bool) (inv : Bool) (attrKind : Lean.AttributeKind) (prio : Nat) :
Equations
  • One or more equations did not get rendered due to their size.
def Lean.Meta.mkSimpAttr (attrName : Lean.Name) (attrDescr : String) (ext : Lean.Meta.SimpExtension) :
Equations
  • One or more equations did not get rendered due to their size.
Equations
  • One or more equations did not get rendered due to their size.
Equations
  • One or more equations did not get rendered due to their size.
Equations
  • One or more equations did not get rendered due to their size.
Equations
  • One or more equations did not get rendered due to their size.
Equations
  • One or more equations did not get rendered due to their size.
Equations
  • One or more equations did not get rendered due to their size.
Equations
  • One or more equations did not get rendered due to their size.
Equations
  • One or more equations did not get rendered due to their size.
Equations
  • One or more equations did not get rendered due to their size.
Equations
Equations
  • One or more equations did not get rendered due to their size.