Recall that the `structure command syntax is
leading_parser (structureTk <|> classTk) >> declId >> optDeclSig >> optional «extends» >> optional (" := " >> optional structCtor >> structFields)
- optParam (value : Syntax) : StructFieldViewDefault
- autoParam (tactic : Syntax) : StructFieldViewDefault
Instances For
Represents the data of the syntax of a structure field declaration.
- ref : Syntax
- modifiers : Modifiers
- binderInfo : BinderInfo
- declName : Name
- nameId : SyntaxRef for the field name 
- name : NameThe name of the field (without macro scopes). 
- rawName : NameThe name of the field (with macro scopes). Used when adding the field to the local context, for field elaboration. 
- binders : Syntax
- default? : Option StructFieldViewDefault
Instances For
- docString? : Option (TSyntax `Lean.Parser.Command.docComment × Bool)
- parents : Array StructParentView
- fields : Array StructFieldView
Instances For
Equations
Instances For
Gets the single constructor view from the underlying InductiveView.
Recall that structures have exactly one constructor.
Instances For
Elaborated parent info.
- ref : Syntax
- addTermInfo : BoolWhether to add term info to the ref. False if there's no user-provided parent projection. 
- fvar : ExprA let variable that represents this structure parent. 
- structName : Name
- name : NameField name for parent. 
- declName : NameName of the projection function. 
- subobject : BoolWhether this parent corresponds to a subobjectfield.
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Records the way in which a field is represented in a structure.
Standard fields are one of .newField, .copiedField, or .fromSubobject.
Parent fields are one of .subobject or .otherParent.
- newField : StructFieldKindNew field defined by the structure. Represented as a constructor argument. Will have a projection function.
- copiedField : StructFieldKindField that comes from a parent but will be represented as a new field. Represented as a constructor argument. Will have a projection function. Its inherited default value may be overridden. 
- fromSubobject : StructFieldKindField that comes from a embedded parent field, and is represented within a subobjectfield. Not represented as a constructor argument. Will not have a projection function. Its inherited default value may be overridden.
- subobject
(structName : Name)
 : StructFieldKindThe field is an embedded parent structure. Represented as a constructor argument. Will have a projection function. Default values are not allowed. 
- otherParent
(structName : Name)
 : StructFieldKindThe field represents a parent projection for a parent that is not itself embedded as a subobject. (Note: parents of subobjectfields areotherParentfields.) Not represented as a constructor argument. Will only have a projection function if it is a direct parent. Default values are not allowed.
Instances For
Equations
- One or more equations did not get rendered due to their size.
- Lean.Elab.Command.Structure.instDecidableEqStructFieldKind.decEq Lean.Elab.Command.Structure.StructFieldKind.newField Lean.Elab.Command.Structure.StructFieldKind.newField = isTrue ⋯
- Lean.Elab.Command.Structure.instDecidableEqStructFieldKind.decEq Lean.Elab.Command.Structure.StructFieldKind.copiedField Lean.Elab.Command.Structure.StructFieldKind.copiedField = isTrue ⋯
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
Instances For
Equations
- (Lean.Elab.Command.Structure.StructFieldKind.subobject structName).isSubobject = true
- kind.isSubobject = false
Instances For
Returns true if the field represents a parent projection.
Equations
Instances For
Returns true if the field is represented as a field in the constructor.
Equations
Instances For
- optParam (value : Expr) : StructFieldDefault
- autoParam (tactic : Expr) : StructFieldDefault
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Elaborated field info.
- ref : Syntax
- name : Name
- kind : StructFieldKind
- declName : NameName of projection function. Remark: for fields that don't get projection functions (like fromSubobjectfields), only relevant for the auxiliary "default value" functions.
- binfo : BinderInfoBinder info to use when making the constructor. Only applies to those fields that will appear in the constructor. 
- paramInfoOverrides : ExprMap (Syntax × BinderInfo)Overrides for the parameters' binder infos when making the projections. The first component is a ref for the binder. 
- Structure names that are responsible for this field being here. - Empty if the field is a newField.
- Otherwise, it is a stack with the last element being a parent in the extendsclause. The first element is the (indirect) parent that is responsible for this field.
 
- Empty if the field is a 
- fvar : ExprLocal variable for the field. All fields (both real fields and parent projection fields) get a local variable. Parent fields are ldecls constructed from non-parent fields. 
- An expression representing a - .fromSubobjectfield as a projection of a- .subobjectfield. Used when making the constructor. Note:- .otherParentfields are let decls, there is no need for- projExpr?.
- default? : Option StructFieldDefaultThe default value, as explicitly given in this structure.
- If this is an inherited field, the name of the projection function. Used for adding terminfo for fields with overridden default values. 
- inheritedDefaults : Array (Name × StructFieldDefault)The inherited default values, as parent structure / value pairs. 
- resolvedDefault? : Option StructFieldDefaultThe default that will be used for this structure. 
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
View construction #
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Elaboration #
Equations
- One or more equations did not get rendered due to their size.