Documentation

Lean.Structure

Instances For
    Equations
    Instances For
      Equations
      Equations
      Equations
      • One or more equations did not get rendered due to their size.
      Instances For
        Equations
        Equations
        • One or more equations did not get rendered due to their size.
        Equations
        • One or more equations did not get rendered due to their size.
        Equations
        • One or more equations did not get rendered due to their size.

        Get direct field names for the given structure.

        Equations
        • One or more equations did not get rendered due to their size.
        Equations
        • One or more equations did not get rendered due to their size.

        If fieldName represents the relation to a parent structure S, return S

        Equations

        Return immediate parent structures

        Equations
        • One or more equations did not get rendered due to their size.

        Return all parent structures

        Equations
        partial def Lean.findField? (env : Lean.Environment) (structName : Lean.Name) (fieldName : Lean.Name) :

        findField? env S fname. If fname is defined in a parent S' of S, return S'

        def Lean.getStructureFieldsFlattened (env : Lean.Environment) (structName : Lean.Name) (includeSubobjectFields : optParam Bool true) :

        Return field names for the given structure, including "flattened" fields from parent structures. To omit toParent projections, set includeSubobjectFields := false.

        For example, given Bar such that

        structure Foo where a : Nat
        structure Bar extends Foo where b : Nat
        

        return #[toFoo,a,b] or #[a,b] with subobject fields omitted.

        Equations
        def Lean.isStructure (env : Lean.Environment) (constName : Lean.Name) :

        Return true if constName is the name of an inductive datatype created using the structure or class commands.

        We perform the check by testing whether auxiliary projection functions have been created.

        Equations
        Equations
        Equations
        • One or more equations did not get rendered due to their size.
        Equations
        Equations
        • One or more equations did not get rendered due to their size.
        partial def Lean.getPathToBaseStructureAux (env : Lean.Environment) (baseStructName : Lean.Name) (structName : Lean.Name) (path : List Lean.Name) :
        def Lean.getPathToBaseStructure? (env : Lean.Environment) (baseStructName : Lean.Name) (structName : Lean.Name) :

        If baseStructName is an ancestor structure for structName, then return a sequence of projection functions to go from structName to baseStructName.

        Equations

        Return true iff constName is the a non-recursive inductive datatype that has only one constructor.

        Equations
        • One or more equations did not get rendered due to their size.

        Return number of fields for a structure-like type

        Equations
        • One or more equations did not get rendered due to their size.