- keys : Array Lean.Meta.DiscrTree.Key
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
proofis just a constant, we can use the universe parameter names stored in the declaration.- proof : Lean.Expr
- priority : Nat
- post : Bool
permis true if lhs and rhs are identical modulo permutation of variables.perm : Boolname?is mainly relevant for producing trace messages. It is also viewed anidused to "erase"simptheorems fromSimpTheorems.- 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
- Lean.Meta.SimpTheorem.getName s = match s.name? with | some n => n | none => Lean.Name.mkSimple "<unknown>"
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
- Lean.Meta.instToMessageDataSimpTheorem = { toMessageData := fun s => Lean.MessageData.ofFormat (Lean.format s) }
Equations
- Lean.Meta.instBEqSimpTheorem = { beq := fun e₁ e₂ => e₁.proof == e₂.proof }
- lemmaNames : Std.PHashSet Lean.Name
- toUnfold : Std.PHashSet Lean.Name
- erased : Std.PHashSet Lean.Name
- toUnfoldThms : Std.PHashMap Lean.Name (Array Lean.Name)
Equations
- Lean.Meta.instInhabitedSimpTheorems = { default := { pre := default, post := default, lemmaNames := default, toUnfold := default, erased := default, toUnfoldThms := default } }
Equations
- One or more equations did not get rendered due to their size.
Equations
- Lean.Meta.addSimpTheoremEntry.updateLemmaNames e s = match e.name? with | none => s | some name => Std.PersistentHashSet.insert s name
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
- Lean.Meta.SimpTheorems.isDeclToUnfold d declName = Std.PersistentHashSet.contains d.toUnfold declName
Equations
- Lean.Meta.SimpTheorems.isLemma d declName = Std.PersistentHashSet.contains d.lemmaNames declName
Register the equational theorems for the given definition.
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.
- thm: Lean.Meta.SimpTheorem → Lean.Meta.SimpEntry
- toUnfold: Lean.Name → Lean.Meta.SimpEntry
- toUnfoldThms: Lean.Name → Array Lean.Name → Lean.Meta.SimpEntry
Equations
- Lean.Meta.instInhabitedSimpEntry = { default := Lean.Meta.SimpEntry.thm default }
Equations
- Lean.Meta.SimpExtension.getTheorems ext = do let a ← Lean.getEnv pure (Lean.ScopedEnvExtension.getState ext a)
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
- Lean.Meta.getSimpExtension? attrName = do let a ← ST.Ref.get Lean.Meta.simpExtensionMapRef pure (Std.HashMap.find? a attrName)
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
- Lean.Meta.SimpTheoremsArray.eraseTheorem thmsArray thmId = Array.map (fun thms => Lean.Meta.SimpTheorems.eraseCore thms thmId) thmsArray
Equations
- Lean.Meta.SimpTheoremsArray.isErased thmsArray thmId = Array.any thmsArray (fun thms => Std.PersistentHashSet.contains thms.erased thmId) 0 (Array.size thmsArray)
Equations
- Lean.Meta.SimpTheoremsArray.isDeclToUnfold thmsArray declName = Array.any thmsArray (fun thms => Lean.Meta.SimpTheorems.isDeclToUnfold thms declName) 0 (Array.size thmsArray)
Equations
- One or more equations did not get rendered due to their size.