Given a structure S, Lean automatically creates an auxiliary definition (projection function)
for each field. This structure caches information about these auxiliary definitions.
- ctorName : Name
Constructor associated with the auxiliary projection function.
- numParams : Nat
Number of parameters in the structure
- i : Nat
The field index associated with the auxiliary projection function.
- fromClass : Bool
trueif the structure is a class.
Instances For
Equations
Equations
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
Equations
- Lean.mkProjectionInfoEx ctorName numParams i fromClass = { ctorName := ctorName, numParams := numParams, i := i, fromClass := fromClass }
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- env.getProjectionFnInfo? projName = Lean.projectionFnInfoExt.find? env projName
Instances For
Equations
- env.isProjectionFn declName = Lean.projectionFnInfoExt.contains env declName
Instances For
If projName is the name of a projection function, return the associated structure name
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- Lean.isProjectionFn declName = do let __do_lift ← Lean.getEnv pure (__do_lift.isProjectionFn declName)
Instances For
Equations
- Lean.getProjectionFnInfo? declName = do let __do_lift ← Lean.getEnv pure (__do_lift.getProjectionFnInfo? declName)
Instances For
Auxiliary parent projection created when a parent structure cannot be represented as a subobject
(e.g., due to diamond inheritance). Unlike regular projections, these construct the parent value
from individual fields rather than extracting a single field.
Example: AddMonoid'.toAddZero' when AddZero' cannot be a subobject of AddMonoid'.
- numParams : Nat
Number of parameters in the child structure.
- fromClass : Bool
trueif the child structure is a class.
Instances For
Equations
Instances For
Equations
Equations
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- Lean.addAuxParentProjectionInfo env projName numParams fromClass = Lean.auxParentProjInfoExt.insert env projName { numParams := numParams, fromClass := fromClass }
Instances For
Equations
- env.getAuxParentProjectionInfo? projName = Lean.auxParentProjInfoExt.find? env projName
Instances For
Equations
- Lean.getAuxParentProjectionInfo? declName = do let __do_lift ← Lean.getEnv pure (__do_lift.getAuxParentProjectionInfo? declName)