Documentation

Lean.ProjFns

  • ctorName : Lake.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

    true if the structure is a class.

Given a structure S, Lean automatically creates an auxiliary definition (projection function) for each field. This structure caches information about these auxiliary definitions.

Instances For
    @[export lean_mk_projection_info]
    def Lean.mkProjectionInfoEx (ctorName : Lake.Name) (numParams : Nat) (i : Nat) (fromClass : Bool) :
    Instances For
      @[export lean_projection_info_from_class]
      Instances For
        @[export lean_add_projection_info]
        def Lean.addProjectionFnInfo (env : Lean.Environment) (projName : Lake.Name) (ctorName : Lake.Name) (numParams : Nat) (i : Nat) (fromClass : Bool) :
        Instances For
          @[export lean_get_projection_info]
          Instances For

            If projName is the name of a projection function, return the associated structure name

            Instances For
              def Lean.isProjectionFn {m : TypeType} [Lean.MonadEnv m] [Monad m] (declName : Lake.Name) :
              Instances For