Anchor (aka stable hash) support for grind. We use
anchors to reference terms in the grind state.
Example: { numDigits := 4, anchorPrefix := 0x0c88 }.matches 0x0c88ab10ef20206a returns true
Equations
Instances For
Returns the number of digits needed to distinguish the anchors in es.
Elements with identical (full) anchors cannot be distinguished by adding more digits.
Thus, they are ignored by this function. Callers must handle these collisions separately
(e.g., the cases tactic uses ordinal references such as #a56e/2).
Equations
Instances For
@[implicit_reducible]
Equations
- Lean.Meta.Grind.instHasAnchorExprWithAnchor = { getAnchor := fun (e : Lean.Meta.Grind.ExprWithAnchor) => e.anchor }
Equations
- Lean.Meta.Grind.mkAnchorSyntax numDigits anchor = Lean.Meta.Grind.mkAnchorSyntaxFromPrefix numDigits (anchor >>> (64 - 4 * numDigits.toUInt64))