Data for user-defined theorems marked with the congr
attribute.
This type should be confused with CongrTheorem
which reprents different kinds of automatically
generated congruence theorems. The simp
tactic also uses some of them.
Instances For
Equations
- Lean.Meta.instInhabitedSimpCongrTheorem = { default := { theoremName := default, funName := default, hypothesesPos := default, priority := default } }
Equations
- Lean.Meta.instReprSimpCongrTheorem = { reprPrec := Lean.Meta.reprSimpCongrTheorem✝ }
- lemmas : Lean.SMap Lake.Name (List Lean.Meta.SimpCongrTheorem)
Instances For
Equations
- Lean.Meta.instInhabitedSimpCongrTheorems = { default := { lemmas := default } }
Equations
- Lean.Meta.instReprSimpCongrTheorems = { reprPrec := Lean.Meta.reprSimpCongrTheorems✝ }
Equations
- Lean.Meta.SimpCongrTheorems.get d declName = match Lean.SMap.find? d.lemmas declName with | none => [] | some cs => cs
Instances For
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.
Instances For
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
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Return true
if t
contains a metavariable that is not in mvarSet
Equations
- Lean.Meta.mkSimpCongrTheorem.onlyMVarsAt t mvarSet = Option.isNone (Lean.Expr.find? (fun e => Lean.Expr.isMVar e && !Lean.RBTree.contains mvarSet (Lean.Expr.mvarId! e)) t)
Instances For
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
Instances For
Equations
- Lean.Meta.getSimpCongrTheorems = do let __do_lift ← Lean.getEnv pure (Lean.ScopedEnvExtension.getState Lean.Meta.congrExtension __do_lift)