Data for user-defined theorems marked with the congr
attribute.
This type should be confused with CongrTheorem
which represents different kinds of automatically
generated congruence theorems. The simp
tactic also uses some of them.
Equations
- Lean.Meta.instInhabitedSimpCongrTheorem = { default := { theoremName := default, funName := default, hypothesesPos := default, priority := default } }
Equations
- Lean.Meta.instReprSimpCongrTheorem = { reprPrec := Lean.Meta.reprSimpCongrTheorem✝ }
Equations
- Lean.Meta.instInhabitedSimpCongrTheorems = { default := { lemmas := default } }
Equations
- Lean.Meta.instReprSimpCongrTheorems = { reprPrec := Lean.Meta.reprSimpCongrTheorems✝ }
def
Lean.Meta.addSimpCongrTheoremEntry
(d : Lean.Meta.SimpCongrTheorems)
(e : Lean.Meta.SimpCongrTheorem)
:
Equations
- One or more equations did not get rendered due to their size.
Equations
- Lean.Meta.addSimpCongrTheoremEntry.insert e [] = [e]
- Lean.Meta.addSimpCongrTheoremEntry.insert e (e' :: es) = if e.priority ≥ e'.priority then e :: e' :: es else e' :: Lean.Meta.addSimpCongrTheoremEntry.insert e es
Equations
- One or more equations did not get rendered due to their size.
Return true
if t
contains a metavariable that is not in mvarSet
Equations
- Lean.Meta.mkSimpCongrTheorem.onlyMVarsAt t mvarSet = (Lean.Expr.find? (fun (e : Lean.Expr) => e.isMVar && !Lean.RBTree.contains mvarSet e.mvarId!) t).isNone
def
Lean.Meta.addSimpCongrTheorem
(declName : Lake.Name)
(attrKind : Lean.AttributeKind)
(prio : Nat)
:
Equations
- Lean.Meta.addSimpCongrTheorem declName attrKind prio = do let lemma ← Lean.Meta.mkSimpCongrTheorem declName prio Lean.ScopedEnvExtension.add Lean.Meta.congrExtension lemma attrKind
Equations
- Lean.Meta.getSimpCongrTheorems = do let __do_lift ← Lean.getEnv pure (Lean.ScopedEnvExtension.getState Lean.Meta.congrExtension __do_lift)