- fvar: Lean.FVarId → Lean.HeadIndex
- mvar: Lean.MVarId → Lean.HeadIndex
- const: Lake.Name → Lean.HeadIndex
- proj: Lake.Name → Nat → Lean.HeadIndex
- lit: Lean.Literal → Lean.HeadIndex
- sort: Lean.HeadIndex
- lam: Lean.HeadIndex
- forallE: Lean.HeadIndex
Datastructure for representing the "head symbol" of an expression.
It is the key of KExprMap.
Examples:
- The head of
f ais.const f - The head of
let x := 1; f xis.const f - The head of
fun x => funis.lam
HeadIndex is a very simple index, and is used in situations where
we want to find definitionally equal terms, but we want to minimize
the search by checking only pairs of terms that have the same
HeadIndex.
Instances For
Hash code for a HeadIndex value.
Instances For
Return the number of arguments in the given expression with respect to its HeadIndex
Instances For
Equations
- Lean.Expr.headNumArgs.go (Lean.Expr.app f arg) x = Lean.Expr.headNumArgs.go f (x + 1)
- Lean.Expr.headNumArgs.go (Lean.Expr.letE declName type value b nonDep) x = Lean.Expr.headNumArgs.go b x
- Lean.Expr.headNumArgs.go (Lean.Expr.mdata data e) x = Lean.Expr.headNumArgs.go e x
- Lean.Expr.headNumArgs.go x x = x
Instances For
Convert the given expression into a HeadIndex.