A collection of theorems. We use it to implement E-matching and injectivity theorems used by grind
.
- decl
(declName : Name)
: Origin
A global declaration in the environment.
- fvar
(fvarId : FVarId)
: Origin
A local hypothesis.
- stx
(id : Name)
(ref : Syntax)
: Origin
A proof term provided directly to a call to
grind
whereref
is the provided grind argument. Theid
is a unique identifier for the call. - local
(id : Name)
: Origin
It is local, but we don't have a local hypothesis for it.
Instances For
Equations
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
A unique identifier corresponding to the origin.
Equations
- (Lean.Meta.Grind.Origin.decl a).key = a
- (Lean.Meta.Grind.Origin.fvar a).key = a.name
- (Lean.Meta.Grind.Origin.stx a a_1).key = a
- (Lean.Meta.Grind.Origin.local a).key = a
Instances For
Equations
Instances For
Equations
- Lean.Meta.Grind.instBEqOrigin = { beq := fun (a b : Lean.Meta.Grind.Origin) => a.key == b.key }
Equations
- Lean.Meta.Grind.instHashableOrigin = { hash := fun (a : Lean.Meta.Grind.Origin) => hash a.key }
- smap : Lean.PHashMap Lean.Name (List α)
- origins : Lean.PHashSet Lean.Meta.Grind.Origin
- erased : Lean.PHashSet Lean.Meta.Grind.Origin
- omap : Lean.PHashMap Lean.Meta.Grind.Origin (List α)
Instances For
Equations
Inserts a thm
with symbols [s_1, ..., s_n]
to s
.
We add s_1 -> { thm with symbols := [s_2, ..., s_n] }
.
When grind
internalizes a term containing symbol s
, we
process all theorems thm
associated with key s
.
If their thm.symbols
is empty, we say they are activated.
Otherwise, we reinsert into map
.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Returns true
if s
contains a theorem with the given origin.
Equations
- s.contains origin = Lean.PersistentHashSet.contains (Lean.Meta.Grind.Theorems.origins✝ s) origin
Instances For
Returns true
if the theorem has been marked as erased.
Equations
- s.isErased origin = Lean.PersistentHashSet.contains (Lean.Meta.Grind.Theorems.erased✝ s) origin
Instances For
Retrieves theorems from s
associated with the given symbol. See Theorems.insert
.
The theorems are removed from s
.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Returns theorems associated with the given origin.
Equations
- s.find origin = match Lean.PersistentHashMap.find? (Lean.Meta.Grind.Theorems.omap✝ s) origin with | some thms => thms | x => []
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Instances For
Equations
Instances For
Equations
- Lean.Meta.Grind.instEmptyCollectionTheorems = { emptyCollection := Lean.Meta.Grind.Theorems.mkEmpty α }
Equations
- One or more equations did not get rendered due to their size.