/* file: maths_function.swift 	 generated: Mon Jan  3 16:32:52 2022 */

/* This file was generated by the EXPRESS to Swift translator "exp2swift", 
    derived from STEPcode (formerly NIST's SCL).
 exp2swift version: v.1.0.1, derived from stepcode v0.8 as of 2019/11/23 
 WARNING: You probably don't want to edit it since your modifications 
    will be lost if exp2swift is used to regenerate it.
 */

 
import SwiftSDAIcore

extension AP242_MANAGED_MODEL_BASED_3D_ENGINEERING_MIM_LF {
//MARK: -ENTITY DEFINITION in EXPRESS
/*

  ENTITY maths_function
    ABSTRACT SUPERTYPE OF ( 
        ONEOF ( 
            finite_function, 
            constant_function, 
            selector_function, 
            elementary_function, 
            restriction_function, 
            repackaging_function, 
            reindexed_array_function, 
            series_composed_function, 
            parallel_composed_function, 
            explicit_table_function, 
            homogeneous_linear_function, 
            general_linear_function, 
            b_spline_basis, 
            b_spline_function, 
            rationalize_function, 
            partial_derivative_function, 
            definite_integral_function, 
            abstracted_expression_function, 
            expression_denoted_function, 
            imported_point_function, 
            imported_curve_function, 
            imported_surface_function, 
            imported_volume_function, 
            application_defined_function ) )
    SUBTYPE OF ( generic_expression );
    DERIVE
      domain  : tuple_space := derive_function_domain( SELF );
      range   : tuple_space := derive_function_range( SELF );
  END_ENTITY; -- maths_function (line:20295 file:ap242ed2_mim_lf_v1.101.TY.exp)

*/


//MARK: - ALL DEFINED ATTRIBUTES
/*
  SUPER- ENTITY(1)	generic_expression
    (no local attributes)

  ENTITY(SELF)	maths_function
    ATTR:  domain,	TYPE: tuple_space -- DERIVED
      := derive_function_domain( SELF )

    ATTR:  range,	TYPE: tuple_space -- DERIVED
      := derive_function_range( SELF )


  SUB- ENTITY(3)	series_composed_function
    REDCR: operands,	TYPE: LIST [2 : ?] OF maths_function -- EXPLICIT
      -- OVERRIDING ENTITY: multiple_arity_generic_expression


  SUB- ENTITY(4)	restriction_function
    REDCR: operand,	TYPE: maths_space -- EXPLICIT
      -- OVERRIDING ENTITY: unary_generic_expression


  SUB- ENTITY(5)	imported_curve_function
    ATTR:  geometry,	TYPE: curve -- EXPLICIT	(AMBIGUOUS/MASKED)

    ATTR:  parametric_domain,	TYPE: tuple_space -- EXPLICIT	(AMBIGUOUS/MASKED)


  SUB- ENTITY(6)	repackaging_function
    REDCR: operand,	TYPE: maths_function -- EXPLICIT
      -- OVERRIDING ENTITY: unary_generic_expression

    ATTR:  input_repack,	TYPE: repackage_options -- EXPLICIT

    ATTR:  output_repack,	TYPE: repackage_options -- EXPLICIT

    ATTR:  selected_output,	TYPE: nonnegative_integer -- EXPLICIT


  SUB- ENTITY(7)	abstracted_expression_function
    REDCR: variables,	TYPE: LIST [1 : ?] OF UNIQUE generic_variable -- DERIVED (DYNAMIC)
      := remove_first( SELF\multiple_arity_generic_expression.operands )
      -- OVERRIDING ENTITY: quantifier_expression

    ATTR:  expr,	TYPE: generic_expression -- DERIVED	(AMBIGUOUS/MASKED)
      := SELF\multiple_arity_generic_expression.operands[1]


  SUB- ENTITY(8)	b_spline_basis
    ATTR:  degree,	TYPE: nonnegative_integer -- EXPLICIT

    ATTR:  repeated_knots,	TYPE: LIST [2 : ?] OF REAL -- EXPLICIT

    ATTR:  order,	TYPE: positive_integer -- DERIVED	(AMBIGUOUS/MASKED)
      := degree + 1

    ATTR:  num_basis,	TYPE: positive_integer -- DERIVED
      := SIZEOF( repeated_knots ) - order


  SUB- ENTITY(9)	reindexed_array_function
    REDCR: operand,	TYPE: maths_function -- EXPLICIT
      -- OVERRIDING ENTITY: unary_generic_expression

    ATTR:  starting_indices,	TYPE: LIST [1 : ?] OF INTEGER -- EXPLICIT


  SUB- ENTITY(10)	homogeneous_linear_function
    REDCR: operand,	TYPE: maths_function -- EXPLICIT
      -- OVERRIDING ENTITY: unary_generic_expression

    ATTR:  sum_index,	TYPE: one_or_two -- EXPLICIT	(AMBIGUOUS/MASKED)

    ATTR:  mat,	TYPE: maths_function -- DERIVED	(AMBIGUOUS/MASKED)
      := SELF\unary_generic_expression.operand


  SUB- ENTITY(11)	selector_function
    ATTR:  selector,	TYPE: input_selector -- EXPLICIT

    ATTR:  source_of_domain,	TYPE: maths_space_or_function -- EXPLICIT	(AMBIGUOUS/MASKED)


  SUB- ENTITY(12)	finite_function
    ATTR:  pairs,	TYPE: SET [1 : ?] OF LIST [2 : 2] OF maths_value -- EXPLICIT


  SUB- ENTITY(13)	constant_function
    ATTR:  sole_output,	TYPE: maths_value -- EXPLICIT

    ATTR:  source_of_domain,	TYPE: maths_space_or_function -- EXPLICIT	(AMBIGUOUS/MASKED)


  SUB- ENTITY(14)	elementary_function
    ATTR:  func_id,	TYPE: elementary_function_enumerators -- EXPLICIT


  SUB- ENTITY(15)	parallel_composed_function
    ATTR:  source_of_domain,	TYPE: maths_space_or_function -- EXPLICIT	(AMBIGUOUS/MASKED)

    ATTR:  prep_functions,	TYPE: LIST [1 : ?] OF maths_function -- EXPLICIT

    ATTR:  final_function,	TYPE: maths_function_select -- EXPLICIT

    REDCR: operands,	TYPE: LIST [2 : ?] OF generic_expression -- DERIVED (DYNAMIC)
      := convert_to_operands_prcmfn( source_of_domain, prep_functions, final_function )
      -- OVERRIDING ENTITY: multiple_arity_generic_expression


  SUB- ENTITY(16)	standard_table_function
    ATTR:  order,	TYPE: ordering_type -- EXPLICIT	(AMBIGUOUS/MASKED)


  SUB- ENTITY(17)	regular_table_function
    ATTR:  increments,	TYPE: LIST [1 : ?] OF INTEGER -- EXPLICIT


  SUB- ENTITY(18)	strict_triangular_matrix
    ATTR:  main_diagonal_value,	TYPE: maths_value -- EXPLICIT


  SUB- ENTITY(19)	triangular_matrix
    ATTR:  default_entry,	TYPE: maths_value -- EXPLICIT	(AMBIGUOUS/MASKED)

    ATTR:  lo_up,	TYPE: lower_upper -- EXPLICIT

    ATTR:  order,	TYPE: ordering_type -- EXPLICIT	(AMBIGUOUS/MASKED)


  SUB- ENTITY(20)	symmetric_banded_matrix
    ATTR:  default_entry,	TYPE: maths_value -- EXPLICIT	(AMBIGUOUS/MASKED)

    ATTR:  above,	TYPE: nonnegative_integer -- EXPLICIT	(AMBIGUOUS/MASKED)


  SUB- ENTITY(21)	symmetric_matrix
    ATTR:  symmetry,	TYPE: symmetry_type -- EXPLICIT

    ATTR:  triangle,	TYPE: lower_upper -- EXPLICIT

    ATTR:  order,	TYPE: ordering_type -- EXPLICIT	(AMBIGUOUS/MASKED)


  SUB- ENTITY(22)	banded_matrix
    ATTR:  default_entry,	TYPE: maths_value -- EXPLICIT	(AMBIGUOUS/MASKED)

    ATTR:  below,	TYPE: INTEGER -- EXPLICIT

    ATTR:  above,	TYPE: INTEGER -- EXPLICIT	(AMBIGUOUS/MASKED)

    ATTR:  order,	TYPE: ordering_type -- EXPLICIT	(AMBIGUOUS/MASKED)


  SUB- ENTITY(23)	linearized_table_function
    REDCR: operand,	TYPE: maths_function -- EXPLICIT
      -- OVERRIDING ENTITY: unary_generic_expression

    ATTR:  first,	TYPE: INTEGER -- EXPLICIT

    ATTR:  source,	TYPE: maths_function -- DERIVED
      := SELF\unary_generic_expression.operand


  SUB- ENTITY(24)	listed_integer_data
    ATTR:  values,	TYPE: LIST [1 : ?] OF INTEGER -- EXPLICIT	(AMBIGUOUS/MASKED)

    REDCR: shape,	TYPE: LIST [1 : ?] OF positive_integer -- DERIVED (DYNAMIC)
      := [SIZEOF( values )]
      -- OVERRIDING ENTITY: explicit_table_function


  SUB- ENTITY(25)	listed_data
    ATTR:  values,	TYPE: LIST [1 : ?] OF maths_value -- EXPLICIT	(AMBIGUOUS/MASKED)

    ATTR:  value_range,	TYPE: maths_space -- EXPLICIT	(AMBIGUOUS/MASKED)

    REDCR: shape,	TYPE: LIST [1 : ?] OF positive_integer -- DERIVED (DYNAMIC)
      := [SIZEOF( values )]
      -- OVERRIDING ENTITY: explicit_table_function


  SUB- ENTITY(26)	listed_string_data
    ATTR:  values,	TYPE: LIST [1 : ?] OF STRING -- EXPLICIT	(AMBIGUOUS/MASKED)

    REDCR: shape,	TYPE: LIST [1 : ?] OF positive_integer -- DERIVED (DYNAMIC)
      := [SIZEOF( values )]
      -- OVERRIDING ENTITY: explicit_table_function


  SUB- ENTITY(27)	listed_real_data
    ATTR:  values,	TYPE: LIST [1 : ?] OF REAL -- EXPLICIT	(AMBIGUOUS/MASKED)

    REDCR: shape,	TYPE: LIST [1 : ?] OF positive_integer -- DERIVED (DYNAMIC)
      := [SIZEOF( values )]
      -- OVERRIDING ENTITY: explicit_table_function


  SUB- ENTITY(28)	listed_logical_data
    ATTR:  values,	TYPE: LIST [1 : ?] OF LOGICAL -- EXPLICIT	(AMBIGUOUS/MASKED)

    REDCR: shape,	TYPE: LIST [1 : ?] OF positive_integer -- DERIVED (DYNAMIC)
      := [SIZEOF( values )]
      -- OVERRIDING ENTITY: explicit_table_function


  SUB- ENTITY(29)	listed_complex_number_data
    ATTR:  values,	TYPE: LIST [2 : ?] OF REAL -- EXPLICIT	(AMBIGUOUS/MASKED)

    REDCR: shape,	TYPE: LIST [1 : ?] OF positive_integer -- DERIVED (DYNAMIC)
      := [SIZEOF( values ) DIV 2]
      -- OVERRIDING ENTITY: explicit_table_function


  SUB- ENTITY(30)	externally_listed_data
    ATTR:  value_range,	TYPE: maths_space -- EXPLICIT	(AMBIGUOUS/MASKED)


  SUB- ENTITY(31)	basic_sparse_matrix
    REDCR: operands,	TYPE: LIST [3 : 3] OF maths_function -- EXPLICIT
      -- OVERRIDING ENTITY: multiple_arity_generic_expression

    ATTR:  default_entry,	TYPE: maths_value -- EXPLICIT	(AMBIGUOUS/MASKED)

    ATTR:  order,	TYPE: ordering_type -- EXPLICIT	(AMBIGUOUS/MASKED)

    ATTR:  index,	TYPE: maths_function -- DERIVED
      := SELF\multiple_arity_generic_expression.operands[1]

    ATTR:  loc,	TYPE: maths_function -- DERIVED
      := SELF\multiple_arity_generic_expression.operands[2]

    ATTR:  val,	TYPE: maths_function -- DERIVED
      := SELF\multiple_arity_generic_expression.operands[3]


  SUB- ENTITY(32)	explicit_table_function
    ATTR:  index_base,	TYPE: zero_or_one -- EXPLICIT

    ATTR:  shape,	TYPE: LIST [1 : ?] OF positive_integer -- EXPLICIT (DYNAMIC)
      -- possibly overriden by
          ENTITY: listed_integer_data,	TYPE: LIST [1 : ?] OF positive_integer	(as DERIVED)
          ENTITY: listed_data,	TYPE: LIST [1 : ?] OF positive_integer	(as DERIVED)
          ENTITY: listed_string_data,	TYPE: LIST [1 : ?] OF positive_integer	(as DERIVED)
          ENTITY: listed_logical_data,	TYPE: LIST [1 : ?] OF positive_integer	(as DERIVED)
          ENTITY: listed_complex_number_data,	TYPE: LIST [1 : ?] OF positive_integer	(as DERIVED)
          ENTITY: listed_real_data,	TYPE: LIST [1 : ?] OF positive_integer	(as DERIVED)


  SUB- ENTITY(33)	general_linear_function
    REDCR: operand,	TYPE: maths_function -- EXPLICIT
      -- OVERRIDING ENTITY: unary_generic_expression

    ATTR:  sum_index,	TYPE: one_or_two -- EXPLICIT	(AMBIGUOUS/MASKED)

    ATTR:  mat,	TYPE: maths_function -- DERIVED	(AMBIGUOUS/MASKED)
      := SELF\unary_generic_expression.operand


  SUB- ENTITY(34)	b_spline_function
    REDCR: operand,	TYPE: maths_function -- EXPLICIT
      -- OVERRIDING ENTITY: unary_generic_expression

    ATTR:  basis,	TYPE: LIST [1 : ?] OF b_spline_basis -- EXPLICIT

    ATTR:  coef,	TYPE: maths_function -- DERIVED
      := SELF\unary_generic_expression.operand


  SUB- ENTITY(35)	rationalize_function
    REDCR: operand,	TYPE: maths_function -- EXPLICIT
      -- OVERRIDING ENTITY: unary_generic_expression

    ATTR:  fun,	TYPE: maths_function -- DERIVED
      := SELF\unary_generic_expression.operand


  SUB- ENTITY(36)	partial_derivative_function
    REDCR: operand,	TYPE: maths_function -- EXPLICIT
      -- OVERRIDING ENTITY: unary_generic_expression

    ATTR:  d_variables,	TYPE: LIST [1 : ?] OF input_selector -- EXPLICIT

    ATTR:  extension,	TYPE: extension_options -- EXPLICIT

    ATTR:  derivand,	TYPE: maths_function -- DERIVED
      := SELF\unary_generic_expression.operand


  SUB- ENTITY(37)	definite_integral_function
    REDCR: operand,	TYPE: maths_function -- EXPLICIT
      -- OVERRIDING ENTITY: unary_generic_expression

    ATTR:  variable_of_integration,	TYPE: input_selector -- EXPLICIT

    ATTR:  lower_limit_neg_infinity,	TYPE: BOOLEAN -- EXPLICIT

    ATTR:  upper_limit_pos_infinity,	TYPE: BOOLEAN -- EXPLICIT

    ATTR:  integrand,	TYPE: maths_function -- DERIVED
      := SELF\unary_generic_expression.operand


  SUB- ENTITY(38)	expression_denoted_function
    ATTR:  expr,	TYPE: generic_expression -- DERIVED	(AMBIGUOUS/MASKED)
      := SELF\unary_generic_expression.operand


  SUB- ENTITY(39)	imported_point_function
    ATTR:  geometry,	TYPE: point -- EXPLICIT	(AMBIGUOUS/MASKED)


  SUB- ENTITY(40)	imported_surface_function
    ATTR:  geometry,	TYPE: surface -- EXPLICIT	(AMBIGUOUS/MASKED)

    ATTR:  parametric_domain,	TYPE: tuple_space -- EXPLICIT	(AMBIGUOUS/MASKED)


  SUB- ENTITY(41)	imported_volume_function
    ATTR:  geometry,	TYPE: volume -- EXPLICIT	(AMBIGUOUS/MASKED)

    ATTR:  parametric_domain,	TYPE: tuple_space -- EXPLICIT	(AMBIGUOUS/MASKED)


  SUB- ENTITY(42)	application_defined_function
    ATTR:  explicit_domain,	TYPE: tuple_space -- EXPLICIT

    ATTR:  explicit_range,	TYPE: tuple_space -- EXPLICIT

    ATTR:  parameters,	TYPE: LIST OF maths_value -- EXPLICIT


*/


//MARK: - Partial Entity
  public final class _maths_function : SDAI.PartialEntity {
    public override class var entityReferenceType: SDAI.EntityReference.Type {
      eMATHS_FUNCTION.self
    }

    //ATTRIBUTES
    /// DERIVE ATTRIBUTE
    internal func _domain__getter(SELF: eMATHS_FUNCTION) -> sTUPLE_SPACE?  {

      let _TEMP1 = DERIVE_FUNCTION_DOMAIN(SELF)
      return _TEMP1
    }

    /// DERIVE ATTRIBUTE
    internal func _range__getter(SELF: eMATHS_FUNCTION) -> sTUPLE_SPACE?  {

      let _TEMP1 = DERIVE_FUNCTION_RANGE(SELF)
      return _TEMP1
    }

    public override var typeMembers: Set<SDAI.STRING> {
      var members = Set<SDAI.STRING>()
      members.insert(SDAI.STRING(Self.typeName))
      //SELECT data types (indirectly) referencing the current type as a member of the select list
      members.insert(SDAI.STRING(sMATHS_FUNCTION_SELECT.typeName)) // -> Self
      members.insert(SDAI.STRING(sMATHS_SPACE_OR_FUNCTION.typeName)) // -> Self
      return members
    }


    //VALUE COMPARISON SUPPORT
    public override func hashAsValue(into hasher: inout Hasher, visited complexEntities: inout Set<SDAI.ComplexEntity>) {
      super.hashAsValue(into: &hasher, visited: &complexEntities)
    }

    public override func isValueEqual(to rhs: SDAI.PartialEntity, visited comppairs: inout Set<SDAI.ComplexPair>) -> Bool {
      guard let rhs = rhs as? Self else { return false }
      if !super.isValueEqual(to: rhs, visited: &comppairs) { return false }
      return true
    }

    public override func isValueEqualOptionally(to rhs: SDAI.PartialEntity, visited comppairs: inout Set<SDAI.ComplexPair>) -> Bool? {
      guard let rhs = rhs as? Self else { return false }
      var result: Bool? = true
      if let comp = super.isValueEqualOptionally(to: rhs, visited: &comppairs) {
        if !comp { return false }
      }
      else { result = nil }
      return result
    }


    //EXPRESS IMPLICIT PARTIAL ENTITY CONSTRUCTOR
    public init() {
      super.init(asAbstructSuperclass:())

    }

    //p21 PARTIAL ENTITY CONSTRUCTOR
    public required convenience init?(parameters: [P21Decode.ExchangeStructure.Parameter], exchangeStructure: P21Decode.ExchangeStructure) {
      let numParams = 0
      guard parameters.count == numParams
      else { exchangeStructure.error = "number of p21 parameters(\(parameters.count)) are different from expected(\(numParams)) for entity(\(Self.entityName)) constructor"; return nil }

      self.init( )
    }
  }


//MARK: - Entity Reference

/** ENTITY reference
- EXPRESS:
```express
  ENTITY maths_function
    ABSTRACT SUPERTYPE OF ( 
        ONEOF ( 
            finite_function, 
            constant_function, 
            selector_function, 
            elementary_function, 
            restriction_function, 
            repackaging_function, 
            reindexed_array_function, 
            series_composed_function, 
            parallel_composed_function, 
            explicit_table_function, 
            homogeneous_linear_function, 
            general_linear_function, 
            b_spline_basis, 
            b_spline_function, 
            rationalize_function, 
            partial_derivative_function, 
            definite_integral_function, 
            abstracted_expression_function, 
            expression_denoted_function, 
            imported_point_function, 
            imported_curve_function, 
            imported_surface_function, 
            imported_volume_function, 
            application_defined_function ) )
    SUBTYPE OF ( generic_expression );
    DERIVE
      domain  : tuple_space := derive_function_domain( SELF );
      range   : tuple_space := derive_function_range( SELF );
  END_ENTITY; -- maths_function (line:20295 file:ap242ed2_mim_lf_v1.101.TY.exp)

```
*/
  public final class eMATHS_FUNCTION : SDAI.EntityReference {

    //MARK: PARTIAL ENTITY
    public override class var partialEntityType: SDAI.PartialEntity.Type {
      _maths_function.self
    }
    public let partialEntity: _maths_function

    //MARK: SUPERTYPES
    public let super_eGENERIC_EXPRESSION: eGENERIC_EXPRESSION 	// [1]
    public var super_eMATHS_FUNCTION: eMATHS_FUNCTION { return self } 	// [2]

    //MARK: SUBTYPES
    public var sub_eSERIES_COMPOSED_FUNCTION: eSERIES_COMPOSED_FUNCTION? {	// [3]
      return self.complexEntity.entityReference(eSERIES_COMPOSED_FUNCTION.self)
    }

    public var sub_eRESTRICTION_FUNCTION: eRESTRICTION_FUNCTION? {	// [4]
      return self.complexEntity.entityReference(eRESTRICTION_FUNCTION.self)
    }

    public var sub_eIMPORTED_CURVE_FUNCTION: eIMPORTED_CURVE_FUNCTION? {	// [5]
      return self.complexEntity.entityReference(eIMPORTED_CURVE_FUNCTION.self)
    }

    public var sub_eREPACKAGING_FUNCTION: eREPACKAGING_FUNCTION? {	// [6]
      return self.complexEntity.entityReference(eREPACKAGING_FUNCTION.self)
    }

    public var sub_eABSTRACTED_EXPRESSION_FUNCTION: eABSTRACTED_EXPRESSION_FUNCTION? {	// [7]
      return self.complexEntity.entityReference(eABSTRACTED_EXPRESSION_FUNCTION.self)
    }

    public var sub_eB_SPLINE_BASIS: eB_SPLINE_BASIS? {	// [8]
      return self.complexEntity.entityReference(eB_SPLINE_BASIS.self)
    }

    public var sub_eREINDEXED_ARRAY_FUNCTION: eREINDEXED_ARRAY_FUNCTION? {	// [9]
      return self.complexEntity.entityReference(eREINDEXED_ARRAY_FUNCTION.self)
    }

    public var sub_eHOMOGENEOUS_LINEAR_FUNCTION: eHOMOGENEOUS_LINEAR_FUNCTION? {	// [10]
      return self.complexEntity.entityReference(eHOMOGENEOUS_LINEAR_FUNCTION.self)
    }

    public var sub_eSELECTOR_FUNCTION: eSELECTOR_FUNCTION? {	// [11]
      return self.complexEntity.entityReference(eSELECTOR_FUNCTION.self)
    }

    public var sub_eFINITE_FUNCTION: eFINITE_FUNCTION? {	// [12]
      return self.complexEntity.entityReference(eFINITE_FUNCTION.self)
    }

    public var sub_eCONSTANT_FUNCTION: eCONSTANT_FUNCTION? {	// [13]
      return self.complexEntity.entityReference(eCONSTANT_FUNCTION.self)
    }

    public var sub_eELEMENTARY_FUNCTION: eELEMENTARY_FUNCTION? {	// [14]
      return self.complexEntity.entityReference(eELEMENTARY_FUNCTION.self)
    }

    public var sub_ePARALLEL_COMPOSED_FUNCTION: ePARALLEL_COMPOSED_FUNCTION? {	// [15]
      return self.complexEntity.entityReference(ePARALLEL_COMPOSED_FUNCTION.self)
    }

    public var sub_eSTANDARD_TABLE_FUNCTION: eSTANDARD_TABLE_FUNCTION? {	// [16]
      return self.complexEntity.entityReference(eSTANDARD_TABLE_FUNCTION.self)
    }

    public var sub_eREGULAR_TABLE_FUNCTION: eREGULAR_TABLE_FUNCTION? {	// [17]
      return self.complexEntity.entityReference(eREGULAR_TABLE_FUNCTION.self)
    }

    public var sub_eSTRICT_TRIANGULAR_MATRIX: eSTRICT_TRIANGULAR_MATRIX? {	// [18]
      return self.complexEntity.entityReference(eSTRICT_TRIANGULAR_MATRIX.self)
    }

    public var sub_eTRIANGULAR_MATRIX: eTRIANGULAR_MATRIX? {	// [19]
      return self.complexEntity.entityReference(eTRIANGULAR_MATRIX.self)
    }

    public var sub_eSYMMETRIC_BANDED_MATRIX: eSYMMETRIC_BANDED_MATRIX? {	// [20]
      return self.complexEntity.entityReference(eSYMMETRIC_BANDED_MATRIX.self)
    }

    public var sub_eSYMMETRIC_MATRIX: eSYMMETRIC_MATRIX? {	// [21]
      return self.complexEntity.entityReference(eSYMMETRIC_MATRIX.self)
    }

    public var sub_eBANDED_MATRIX: eBANDED_MATRIX? {	// [22]
      return self.complexEntity.entityReference(eBANDED_MATRIX.self)
    }

    public var sub_eLINEARIZED_TABLE_FUNCTION: eLINEARIZED_TABLE_FUNCTION? {	// [23]
      return self.complexEntity.entityReference(eLINEARIZED_TABLE_FUNCTION.self)
    }

    public var sub_eLISTED_INTEGER_DATA: eLISTED_INTEGER_DATA? {	// [24]
      return self.complexEntity.entityReference(eLISTED_INTEGER_DATA.self)
    }

    public var sub_eLISTED_DATA: eLISTED_DATA? {	// [25]
      return self.complexEntity.entityReference(eLISTED_DATA.self)
    }

    public var sub_eLISTED_STRING_DATA: eLISTED_STRING_DATA? {	// [26]
      return self.complexEntity.entityReference(eLISTED_STRING_DATA.self)
    }

    public var sub_eLISTED_REAL_DATA: eLISTED_REAL_DATA? {	// [27]
      return self.complexEntity.entityReference(eLISTED_REAL_DATA.self)
    }

    public var sub_eLISTED_LOGICAL_DATA: eLISTED_LOGICAL_DATA? {	// [28]
      return self.complexEntity.entityReference(eLISTED_LOGICAL_DATA.self)
    }

    public var sub_eLISTED_COMPLEX_NUMBER_DATA: eLISTED_COMPLEX_NUMBER_DATA? {	// [29]
      return self.complexEntity.entityReference(eLISTED_COMPLEX_NUMBER_DATA.self)
    }

    public var sub_eEXTERNALLY_LISTED_DATA: eEXTERNALLY_LISTED_DATA? {	// [30]
      return self.complexEntity.entityReference(eEXTERNALLY_LISTED_DATA.self)
    }

    public var sub_eBASIC_SPARSE_MATRIX: eBASIC_SPARSE_MATRIX? {	// [31]
      return self.complexEntity.entityReference(eBASIC_SPARSE_MATRIX.self)
    }

    public var sub_eEXPLICIT_TABLE_FUNCTION: eEXPLICIT_TABLE_FUNCTION? {	// [32]
      return self.complexEntity.entityReference(eEXPLICIT_TABLE_FUNCTION.self)
    }

    public var sub_eGENERAL_LINEAR_FUNCTION: eGENERAL_LINEAR_FUNCTION? {	// [33]
      return self.complexEntity.entityReference(eGENERAL_LINEAR_FUNCTION.self)
    }

    public var sub_eB_SPLINE_FUNCTION: eB_SPLINE_FUNCTION? {	// [34]
      return self.complexEntity.entityReference(eB_SPLINE_FUNCTION.self)
    }

    public var sub_eRATIONALIZE_FUNCTION: eRATIONALIZE_FUNCTION? {	// [35]
      return self.complexEntity.entityReference(eRATIONALIZE_FUNCTION.self)
    }

    public var sub_ePARTIAL_DERIVATIVE_FUNCTION: ePARTIAL_DERIVATIVE_FUNCTION? {	// [36]
      return self.complexEntity.entityReference(ePARTIAL_DERIVATIVE_FUNCTION.self)
    }

    public var sub_eDEFINITE_INTEGRAL_FUNCTION: eDEFINITE_INTEGRAL_FUNCTION? {	// [37]
      return self.complexEntity.entityReference(eDEFINITE_INTEGRAL_FUNCTION.self)
    }

    public var sub_eEXPRESSION_DENOTED_FUNCTION: eEXPRESSION_DENOTED_FUNCTION? {	// [38]
      return self.complexEntity.entityReference(eEXPRESSION_DENOTED_FUNCTION.self)
    }

    public var sub_eIMPORTED_POINT_FUNCTION: eIMPORTED_POINT_FUNCTION? {	// [39]
      return self.complexEntity.entityReference(eIMPORTED_POINT_FUNCTION.self)
    }

    public var sub_eIMPORTED_SURFACE_FUNCTION: eIMPORTED_SURFACE_FUNCTION? {	// [40]
      return self.complexEntity.entityReference(eIMPORTED_SURFACE_FUNCTION.self)
    }

    public var sub_eIMPORTED_VOLUME_FUNCTION: eIMPORTED_VOLUME_FUNCTION? {	// [41]
      return self.complexEntity.entityReference(eIMPORTED_VOLUME_FUNCTION.self)
    }

    public var sub_eAPPLICATION_DEFINED_FUNCTION: eAPPLICATION_DEFINED_FUNCTION? {	// [42]
      return self.complexEntity.entityReference(eAPPLICATION_DEFINED_FUNCTION.self)
    }


    //MARK: ATTRIBUTES
    // VALUE_RANGE: (2 AMBIGUOUS REFs)

    // DEFAULT_ENTRY: (4 AMBIGUOUS REFs)

    // EXPR: (2 AMBIGUOUS REFs)

    // GEOMETRY: (4 AMBIGUOUS REFs)

    // ORDER: (6 AMBIGUOUS REFs)

    // SOURCE_OF_DOMAIN: (3 AMBIGUOUS REFs)

    // VALUES: (6 AMBIGUOUS REFs)

    // PARAMETRIC_DOMAIN: (3 AMBIGUOUS REFs)

    // MAT: (2 AMBIGUOUS REFs)

    // SUM_INDEX: (2 AMBIGUOUS REFs)

    // ABOVE: (2 AMBIGUOUS REFs)

    /// __EXPLICIT__ attribute
    /// - origin: SUB( ``eREPACKAGING_FUNCTION`` )
    public var INPUT_REPACK: nREPACKAGE_OPTIONS?  {
      get {
        return sub_eREPACKAGING_FUNCTION?.partialEntity._input_repack
      }
      set(newValue) {
        guard let partial = sub_eREPACKAGING_FUNCTION?.super_eREPACKAGING_FUNCTION.partialEntity
          else { return }
        partial._input_repack = SDAI.UNWRAP(newValue)
      }
    }

    /// __EXPLICIT__ attribute
    /// - origin: SUB( ``ePARALLEL_COMPOSED_FUNCTION`` )
    public var FINAL_FUNCTION: sMATHS_FUNCTION_SELECT?  {
      get {
        return sub_ePARALLEL_COMPOSED_FUNCTION?.partialEntity._final_function
      }
      set(newValue) {
        guard let partial = sub_ePARALLEL_COMPOSED_FUNCTION?.super_ePARALLEL_COMPOSED_FUNCTION.partialEntity
          else { return }
        partial._final_function = SDAI.UNWRAP(newValue)
      }
    }

    /// __DERIVE__ attribute
    /// - origin: SUB( ``eB_SPLINE_FUNCTION`` )
    public var COEF: eMATHS_FUNCTION?  {
      get {
        if let cached = cachedValue(derivedAttributeName:"COEF") {
          return cached.value as! eMATHS_FUNCTION? 
        }
        guard let origin = sub_eB_SPLINE_FUNCTION else { return nil }
        let value = eMATHS_FUNCTION(origin.partialEntity._coef__getter(SELF: origin))
        updateCache(derivedAttributeName:"COEF", value:value)
        return value
      }
    }

    /// __EXPLICIT__ attribute
    /// - origin: SUB( ``eFINITE_FUNCTION`` )
    public var PAIRS: (SDAI.SET<SDAI.LIST<sMATHS_VALUE>/*[2:2]*/ >/*[1:nil]*/ )?  {
      get {
        return sub_eFINITE_FUNCTION?.partialEntity._pairs
      }
      set(newValue) {
        guard let partial = sub_eFINITE_FUNCTION?.super_eFINITE_FUNCTION.partialEntity else { return }
        partial._pairs = SDAI.UNWRAP(newValue)
      }
    }

    /// __EXPLICIT(DYNAMIC)__ attribute
    /// - origin: SUB( ``eEXPLICIT_TABLE_FUNCTION`` )
    public var SHAPE: (SDAI.LIST<tPOSITIVE_INTEGER>/*[1:nil]*/ )?  {
      get {
        if let resolved = _explicit_table_function._shape__provider(complex: self.complexEntity) {
          let value = resolved._shape__getter(complex: self.complexEntity)
          return value
        }
        else {
          return sub_eEXPLICIT_TABLE_FUNCTION?.partialEntity._shape
        }
      }
      set(newValue) {
        if let _ = _explicit_table_function._shape__provider(complex: self.complexEntity) { return }

        guard let partial = sub_eEXPLICIT_TABLE_FUNCTION?.super_eEXPLICIT_TABLE_FUNCTION.partialEntity
          else { return }
        partial._shape = SDAI.UNWRAP(newValue)
      }
    }

    /// __EXPLICIT__ attribute
    /// - origin: SUB( ``eREGULAR_TABLE_FUNCTION`` )
    public var INCREMENTS: (SDAI.LIST<SDAI.INTEGER>/*[1:nil]*/ )?  {
      get {
        return sub_eREGULAR_TABLE_FUNCTION?.partialEntity._increments
      }
      set(newValue) {
        guard let partial = sub_eREGULAR_TABLE_FUNCTION?.super_eREGULAR_TABLE_FUNCTION.partialEntity
          else { return }
        partial._increments = SDAI.UNWRAP(newValue)
      }
    }

    /// __EXPLICIT__ attribute
    /// - origin: SUB( ``eB_SPLINE_BASIS`` )
    public var REPEATED_KNOTS: (SDAI.LIST<SDAI.REAL>/*[2:nil]*/ )?  {
      get {
        return sub_eB_SPLINE_BASIS?.partialEntity._repeated_knots
      }
      set(newValue) {
        guard let partial = sub_eB_SPLINE_BASIS?.super_eB_SPLINE_BASIS.partialEntity else { return }
        partial._repeated_knots = SDAI.UNWRAP(newValue)
      }
    }

    /// __EXPLICIT__ attribute
    /// - origin: SUB( ``eDEFINITE_INTEGRAL_FUNCTION`` )
    public var VARIABLE_OF_INTEGRATION: tINPUT_SELECTOR?  {
      get {
        return sub_eDEFINITE_INTEGRAL_FUNCTION?.partialEntity._variable_of_integration
      }
      set(newValue) {
        guard let partial = sub_eDEFINITE_INTEGRAL_FUNCTION?.super_eDEFINITE_INTEGRAL_FUNCTION.partialEntity
          else { return }
        partial._variable_of_integration = SDAI.UNWRAP(newValue)
      }
    }

    /// __EXPLICIT__ attribute
    /// - origin: SUB( ``eB_SPLINE_BASIS`` )
    public var DEGREE: tNONNEGATIVE_INTEGER?  {
      get {
        return sub_eB_SPLINE_BASIS?.partialEntity._degree
      }
      set(newValue) {
        guard let partial = sub_eB_SPLINE_BASIS?.super_eB_SPLINE_BASIS.partialEntity else { return }
        partial._degree = SDAI.UNWRAP(newValue)
      }
    }

    /// __EXPLICIT__ attribute
    /// - origin: SUB( ``eAPPLICATION_DEFINED_FUNCTION`` )
    public var PARAMETERS: SDAI.LIST<sMATHS_VALUE>?  {
      get {
        return sub_eAPPLICATION_DEFINED_FUNCTION?.partialEntity._parameters
      }
      set(newValue) {
        guard let partial = sub_eAPPLICATION_DEFINED_FUNCTION?.super_eAPPLICATION_DEFINED_FUNCTION
          .partialEntity else { return }
        partial._parameters = SDAI.UNWRAP(newValue)
      }
    }

    /// __EXPLICIT__ attribute
    /// - origin: SUB( ``eCONSTANT_FUNCTION`` )
    public var SOLE_OUTPUT: sMATHS_VALUE?  {
      get {
        return sub_eCONSTANT_FUNCTION?.partialEntity._sole_output
      }
      set(newValue) {
        guard let partial = sub_eCONSTANT_FUNCTION?.super_eCONSTANT_FUNCTION.partialEntity else { return }
        partial._sole_output = SDAI.UNWRAP(newValue)
      }
    }

    /// __EXPLICIT__ attribute
    /// - origin: SUB( ``ePARTIAL_DERIVATIVE_FUNCTION`` )
    public var EXTENSION: nEXTENSION_OPTIONS?  {
      get {
        return sub_ePARTIAL_DERIVATIVE_FUNCTION?.partialEntity._extension
      }
      set(newValue) {
        guard let partial = sub_ePARTIAL_DERIVATIVE_FUNCTION?.super_ePARTIAL_DERIVATIVE_FUNCTION
          .partialEntity else { return }
        partial._extension = SDAI.UNWRAP(newValue)
      }
    }

    /// __EXPLICIT__ attribute
    /// - origin: SUB( ``eB_SPLINE_FUNCTION`` )
    public var BASIS: (SDAI.LIST<eB_SPLINE_BASIS>/*[1:nil]*/ )?  {
      get {
        return sub_eB_SPLINE_FUNCTION?.partialEntity._basis
      }
      set(newValue) {
        guard let partial = sub_eB_SPLINE_FUNCTION?.super_eB_SPLINE_FUNCTION.partialEntity else { return }
        partial._basis = SDAI.UNWRAP(newValue)
      }
    }

    /// __EXPLICIT__ attribute
    /// - origin: SUB( ``eTRIANGULAR_MATRIX`` )
    public var LO_UP: nLOWER_UPPER?  {
      get {
        return sub_eTRIANGULAR_MATRIX?.partialEntity._lo_up
      }
      set(newValue) {
        guard let partial = sub_eTRIANGULAR_MATRIX?.super_eTRIANGULAR_MATRIX.partialEntity else { return }
        partial._lo_up = SDAI.UNWRAP(newValue)
      }
    }

    /// __EXPLICIT__ attribute
    /// - origin: SUB( ``eSYMMETRIC_MATRIX`` )
    public var SYMMETRY: nSYMMETRY_TYPE?  {
      get {
        return sub_eSYMMETRIC_MATRIX?.partialEntity._symmetry
      }
      set(newValue) {
        guard let partial = sub_eSYMMETRIC_MATRIX?.super_eSYMMETRIC_MATRIX.partialEntity else { return }
        partial._symmetry = SDAI.UNWRAP(newValue)
      }
    }

    /// __EXPLICIT__ attribute
    /// - origin: SUB( ``eEXPLICIT_TABLE_FUNCTION`` )
    public var INDEX_BASE: tZERO_OR_ONE?  {
      get {
        return sub_eEXPLICIT_TABLE_FUNCTION?.partialEntity._index_base
      }
      set(newValue) {
        guard let partial = sub_eEXPLICIT_TABLE_FUNCTION?.super_eEXPLICIT_TABLE_FUNCTION.partialEntity
          else { return }
        partial._index_base = SDAI.UNWRAP(newValue)
      }
    }

    /// __DERIVE__ attribute
    /// - origin: SUB( ``ePARTIAL_DERIVATIVE_FUNCTION`` )
    public var DERIVAND: eMATHS_FUNCTION?  {
      get {
        if let cached = cachedValue(derivedAttributeName:"DERIVAND") {
          return cached.value as! eMATHS_FUNCTION? 
        }
        guard let origin = sub_ePARTIAL_DERIVATIVE_FUNCTION else { return nil }
        let value = eMATHS_FUNCTION(origin.partialEntity._derivand__getter(SELF: origin))
        updateCache(derivedAttributeName:"DERIVAND", value:value)
        return value
      }
    }

    /// __EXPLICIT__ attribute
    /// - origin: SUB( ``eBANDED_MATRIX`` )
    public var BELOW: SDAI.INTEGER?  {
      get {
        return sub_eBANDED_MATRIX?.partialEntity._below
      }
      set(newValue) {
        guard let partial = sub_eBANDED_MATRIX?.super_eBANDED_MATRIX.partialEntity else { return }
        partial._below = SDAI.UNWRAP(newValue)
      }
    }

    /// __EXPLICIT__ attribute
    /// - origin: SUB( ``eAPPLICATION_DEFINED_FUNCTION`` )
    public var EXPLICIT_RANGE: sTUPLE_SPACE?  {
      get {
        return sub_eAPPLICATION_DEFINED_FUNCTION?.partialEntity._explicit_range
      }
      set(newValue) {
        guard let partial = sub_eAPPLICATION_DEFINED_FUNCTION?.super_eAPPLICATION_DEFINED_FUNCTION
          .partialEntity else { return }
        partial._explicit_range = SDAI.UNWRAP(newValue)
      }
    }

    /// __DERIVE__ attribute
    /// - origin: SUB( ``eBASIC_SPARSE_MATRIX`` )
    public var VAL: eMATHS_FUNCTION?  {
      get {
        if let cached = cachedValue(derivedAttributeName:"VAL") {
          return cached.value as! eMATHS_FUNCTION? 
        }
        guard let origin = sub_eBASIC_SPARSE_MATRIX else { return nil }
        let value = eMATHS_FUNCTION(origin.partialEntity._val__getter(SELF: origin))
        updateCache(derivedAttributeName:"VAL", value:value)
        return value
      }
    }

    /// __DERIVE__ attribute
    /// - origin: SUB( ``eRATIONALIZE_FUNCTION`` )
    public var FUN: eMATHS_FUNCTION?  {
      get {
        if let cached = cachedValue(derivedAttributeName:"FUN") {
          return cached.value as! eMATHS_FUNCTION? 
        }
        guard let origin = sub_eRATIONALIZE_FUNCTION else { return nil }
        let value = eMATHS_FUNCTION(origin.partialEntity._fun__getter(SELF: origin))
        updateCache(derivedAttributeName:"FUN", value:value)
        return value
      }
    }

    /// __EXPLICIT__ attribute
    /// - origin: SUB( ``eELEMENTARY_FUNCTION`` )
    public var FUNC_ID: nELEMENTARY_FUNCTION_ENUMERATORS?  {
      get {
        return sub_eELEMENTARY_FUNCTION?.partialEntity._func_id
      }
      set(newValue) {
        guard let partial = sub_eELEMENTARY_FUNCTION?.super_eELEMENTARY_FUNCTION.partialEntity
          else { return }
        partial._func_id = SDAI.UNWRAP(newValue)
      }
    }

    /// __DERIVE__ attribute
    /// - origin: SUB( ``eDEFINITE_INTEGRAL_FUNCTION`` )
    public var INTEGRAND: eMATHS_FUNCTION?  {
      get {
        if let cached = cachedValue(derivedAttributeName:"INTEGRAND") {
          return cached.value as! eMATHS_FUNCTION? 
        }
        guard let origin = sub_eDEFINITE_INTEGRAL_FUNCTION else { return nil }
        let value = eMATHS_FUNCTION(origin.partialEntity._integrand__getter(SELF: origin))
        updateCache(derivedAttributeName:"INTEGRAND", value:value)
        return value
      }
    }

    /// __DERIVE__ attribute
    /// - origin: SUB( ``eBASIC_SPARSE_MATRIX`` )
    public var LOC: eMATHS_FUNCTION?  {
      get {
        if let cached = cachedValue(derivedAttributeName:"LOC") {
          return cached.value as! eMATHS_FUNCTION? 
        }
        guard let origin = sub_eBASIC_SPARSE_MATRIX else { return nil }
        let value = eMATHS_FUNCTION(origin.partialEntity._loc__getter(SELF: origin))
        updateCache(derivedAttributeName:"LOC", value:value)
        return value
      }
    }

    /// __EXPLICIT__ attribute
    /// - origin: SUB( ``eDEFINITE_INTEGRAL_FUNCTION`` )
    public var UPPER_LIMIT_POS_INFINITY: SDAI.BOOLEAN?  {
      get {
        return sub_eDEFINITE_INTEGRAL_FUNCTION?.partialEntity._upper_limit_pos_infinity
      }
      set(newValue) {
        guard let partial = sub_eDEFINITE_INTEGRAL_FUNCTION?.super_eDEFINITE_INTEGRAL_FUNCTION.partialEntity
          else { return }
        partial._upper_limit_pos_infinity = SDAI.UNWRAP(newValue)
      }
    }

    /// __EXPLICIT__ attribute
    /// - origin: SUB( ``eLINEARIZED_TABLE_FUNCTION`` )
    public var FIRST: SDAI.INTEGER?  {
      get {
        return sub_eLINEARIZED_TABLE_FUNCTION?.partialEntity._first
      }
      set(newValue) {
        guard let partial = sub_eLINEARIZED_TABLE_FUNCTION?.super_eLINEARIZED_TABLE_FUNCTION.partialEntity
          else { return }
        partial._first = SDAI.UNWRAP(newValue)
      }
    }

    /// __EXPLICIT__ attribute
    /// - origin: SUB( ``ePARTIAL_DERIVATIVE_FUNCTION`` )
    public var D_VARIABLES: (SDAI.LIST<tINPUT_SELECTOR>/*[1:nil]*/ )?  {
      get {
        return sub_ePARTIAL_DERIVATIVE_FUNCTION?.partialEntity._d_variables
      }
      set(newValue) {
        guard let partial = sub_ePARTIAL_DERIVATIVE_FUNCTION?.super_ePARTIAL_DERIVATIVE_FUNCTION
          .partialEntity else { return }
        partial._d_variables = SDAI.UNWRAP(newValue)
      }
    }

    /// __EXPLICIT REDEF(DYNAMIC)__ attribute
    /// - origin: SUB( ``eSERIES_COMPOSED_FUNCTION`` )
    public var OPERANDS: (SDAI.LIST<eMATHS_FUNCTION>/*[2:nil]*/ )?  {
      get {
        if let resolved = _multiple_arity_generic_expression._operands__provider(complex: self.complexEntity) {
          let value = SDAI.LIST<eMATHS_FUNCTION>(resolved._operands__getter(complex: self.complexEntity))
          return value
        }
        else {
          return SDAI.LIST<eMATHS_FUNCTION>(sub_eSERIES_COMPOSED_FUNCTION?.super_eMULTIPLE_ARITY_GENERIC_EXPRESSION
            .partialEntity._operands)
        }
      }
      set(newValue) {
        if let _ = _multiple_arity_generic_expression._operands__provider(complex: self.complexEntity) { return }

        guard let partial = sub_eSERIES_COMPOSED_FUNCTION?.super_eMULTIPLE_ARITY_GENERIC_EXPRESSION
          .partialEntity else { return }
        partial._operands = SDAI.UNWRAP(
          SDAI.LIST<eGENERIC_EXPRESSION>(newValue))
      }
    }

    /// __EXPLICIT__ attribute
    /// - origin: SUB( ``eSELECTOR_FUNCTION`` )
    public var SELECTOR: tINPUT_SELECTOR?  {
      get {
        return sub_eSELECTOR_FUNCTION?.partialEntity._selector
      }
      set(newValue) {
        guard let partial = sub_eSELECTOR_FUNCTION?.super_eSELECTOR_FUNCTION.partialEntity else { return }
        partial._selector = SDAI.UNWRAP(newValue)
      }
    }

    /// __EXPLICIT__ attribute
    /// - origin: SUB( ``eREINDEXED_ARRAY_FUNCTION`` )
    public var STARTING_INDICES: (SDAI.LIST<SDAI.INTEGER>/*[1:nil]*/ )?  {
      get {
        return sub_eREINDEXED_ARRAY_FUNCTION?.partialEntity._starting_indices
      }
      set(newValue) {
        guard let partial = sub_eREINDEXED_ARRAY_FUNCTION?.super_eREINDEXED_ARRAY_FUNCTION.partialEntity
          else { return }
        partial._starting_indices = SDAI.UNWRAP(newValue)
      }
    }

    /// __DERIVE__ attribute
    /// - origin: SUB( ``eBASIC_SPARSE_MATRIX`` )
    public var INDEX: eMATHS_FUNCTION?  {
      get {
        if let cached = cachedValue(derivedAttributeName:"INDEX") {
          return cached.value as! eMATHS_FUNCTION? 
        }
        guard let origin = sub_eBASIC_SPARSE_MATRIX else { return nil }
        let value = eMATHS_FUNCTION(origin.partialEntity._index__getter(SELF: origin))
        updateCache(derivedAttributeName:"INDEX", value:value)
        return value
      }
    }

    /// __EXPLICIT REDEF(DERIVE)__ attribute
    /// - origin: SUB( ``eABSTRACTED_EXPRESSION_FUNCTION`` )
    public var VARIABLES: (SDAI.LIST_UNIQUE<eGENERIC_VARIABLE>/*[1:nil]*/ )?  {
      get {
        if let cached = cachedValue(derivedAttributeName:"VARIABLES") {
          return cached.value as! (SDAI.LIST_UNIQUE<eGENERIC_VARIABLE>/*[1:nil]*/ )? 
        }
        guard let origin = sub_eABSTRACTED_EXPRESSION_FUNCTION else { return nil }
        let value = SDAI.LIST_UNIQUE<eGENERIC_VARIABLE>(origin.partialEntity._variables__getter(SELF: origin))
        updateCache(derivedAttributeName:"VARIABLES", value:value)
        return value
      }
    }

    /// __DERIVE__ attribute
    /// - origin: SUB( ``eLINEARIZED_TABLE_FUNCTION`` )
    public var SOURCE: eMATHS_FUNCTION?  {
      get {
        if let cached = cachedValue(derivedAttributeName:"SOURCE") {
          return cached.value as! eMATHS_FUNCTION? 
        }
        guard let origin = sub_eLINEARIZED_TABLE_FUNCTION else { return nil }
        let value = eMATHS_FUNCTION(origin.partialEntity._source__getter(SELF: origin))
        updateCache(derivedAttributeName:"SOURCE", value:value)
        return value
      }
    }

    /// __EXPLICIT__ attribute
    /// - origin: SUB( ``eSTRICT_TRIANGULAR_MATRIX`` )
    public var MAIN_DIAGONAL_VALUE: sMATHS_VALUE?  {
      get {
        return sub_eSTRICT_TRIANGULAR_MATRIX?.partialEntity._main_diagonal_value
      }
      set(newValue) {
        guard let partial = sub_eSTRICT_TRIANGULAR_MATRIX?.super_eSTRICT_TRIANGULAR_MATRIX.partialEntity
          else { return }
        partial._main_diagonal_value = SDAI.UNWRAP(newValue)
      }
    }

    /// __DERIVE__ attribute
    /// - origin: SUB( ``eB_SPLINE_BASIS`` )
    public var NUM_BASIS: tPOSITIVE_INTEGER?  {
      get {
        if let cached = cachedValue(derivedAttributeName:"NUM_BASIS") {
          return cached.value as! tPOSITIVE_INTEGER? 
        }
        guard let origin = sub_eB_SPLINE_BASIS else { return nil }
        let value = tPOSITIVE_INTEGER(origin.partialEntity._num_basis__getter(SELF: origin))
        updateCache(derivedAttributeName:"NUM_BASIS", value:value)
        return value
      }
    }

    /// __EXPLICIT REDEF__ attribute
    /// - origin: SUB( ``eRESTRICTION_FUNCTION`` )
    public var OPERAND: eMATHS_SPACE?  {
      get {
        return eMATHS_SPACE( sub_eRESTRICTION_FUNCTION?.super_eUNARY_GENERIC_EXPRESSION.partialEntity
          ._operand )
      }
      set(newValue) {
        guard let partial = sub_eRESTRICTION_FUNCTION?.super_eUNARY_GENERIC_EXPRESSION.partialEntity
          else { return }
        partial._operand = SDAI.UNWRAP(
          eGENERIC_EXPRESSION(newValue))
      }
    }

    /// __EXPLICIT__ attribute
    /// - origin: SUB( ``eAPPLICATION_DEFINED_FUNCTION`` )
    public var EXPLICIT_DOMAIN: sTUPLE_SPACE?  {
      get {
        return sub_eAPPLICATION_DEFINED_FUNCTION?.partialEntity._explicit_domain
      }
      set(newValue) {
        guard let partial = sub_eAPPLICATION_DEFINED_FUNCTION?.super_eAPPLICATION_DEFINED_FUNCTION
          .partialEntity else { return }
        partial._explicit_domain = SDAI.UNWRAP(newValue)
      }
    }

    /// __EXPLICIT__ attribute
    /// - origin: SUB( ``eREPACKAGING_FUNCTION`` )
    public var SELECTED_OUTPUT: tNONNEGATIVE_INTEGER?  {
      get {
        return sub_eREPACKAGING_FUNCTION?.partialEntity._selected_output
      }
      set(newValue) {
        guard let partial = sub_eREPACKAGING_FUNCTION?.super_eREPACKAGING_FUNCTION.partialEntity
          else { return }
        partial._selected_output = SDAI.UNWRAP(newValue)
      }
    }

    /// __EXPLICIT__ attribute
    /// - origin: SUB( ``eDEFINITE_INTEGRAL_FUNCTION`` )
    public var LOWER_LIMIT_NEG_INFINITY: SDAI.BOOLEAN?  {
      get {
        return sub_eDEFINITE_INTEGRAL_FUNCTION?.partialEntity._lower_limit_neg_infinity
      }
      set(newValue) {
        guard let partial = sub_eDEFINITE_INTEGRAL_FUNCTION?.super_eDEFINITE_INTEGRAL_FUNCTION.partialEntity
          else { return }
        partial._lower_limit_neg_infinity = SDAI.UNWRAP(newValue)
      }
    }

    /// __EXPLICIT__ attribute
    /// - origin: SUB( ``ePARALLEL_COMPOSED_FUNCTION`` )
    public var PREP_FUNCTIONS: (SDAI.LIST<eMATHS_FUNCTION>/*[1:nil]*/ )?  {
      get {
        return sub_ePARALLEL_COMPOSED_FUNCTION?.partialEntity._prep_functions
      }
      set(newValue) {
        guard let partial = sub_ePARALLEL_COMPOSED_FUNCTION?.super_ePARALLEL_COMPOSED_FUNCTION.partialEntity
          else { return }
        partial._prep_functions = SDAI.UNWRAP(newValue)
      }
    }

    /// __DERIVE__ attribute
    /// - origin: SELF( ``eMATHS_FUNCTION`` )
    public var DOMAIN: sTUPLE_SPACE?  {
      get {
        if let cached = cachedValue(derivedAttributeName:"DOMAIN") {
          return cached.value as! sTUPLE_SPACE? 
        }
        let origin = self
        let value = origin.partialEntity._domain__getter(SELF: origin)
        updateCache(derivedAttributeName:"DOMAIN", value:value)
        return value
      }
    }

    /// __EXPLICIT__ attribute
    /// - origin: SUB( ``eSYMMETRIC_MATRIX`` )
    public var TRIANGLE: nLOWER_UPPER?  {
      get {
        return sub_eSYMMETRIC_MATRIX?.partialEntity._triangle
      }
      set(newValue) {
        guard let partial = sub_eSYMMETRIC_MATRIX?.super_eSYMMETRIC_MATRIX.partialEntity else { return }
        partial._triangle = SDAI.UNWRAP(newValue)
      }
    }

    /// __DERIVE__ attribute
    /// - origin: SELF( ``eMATHS_FUNCTION`` )
    public var RANGE: sTUPLE_SPACE?  {
      get {
        if let cached = cachedValue(derivedAttributeName:"RANGE") {
          return cached.value as! sTUPLE_SPACE? 
        }
        let origin = self
        let value = origin.partialEntity._range__getter(SELF: origin)
        updateCache(derivedAttributeName:"RANGE", value:value)
        return value
      }
    }

    /// __EXPLICIT__ attribute
    /// - origin: SUB( ``eREPACKAGING_FUNCTION`` )
    public var OUTPUT_REPACK: nREPACKAGE_OPTIONS?  {
      get {
        return sub_eREPACKAGING_FUNCTION?.partialEntity._output_repack
      }
      set(newValue) {
        guard let partial = sub_eREPACKAGING_FUNCTION?.super_eREPACKAGING_FUNCTION.partialEntity
          else { return }
        partial._output_repack = SDAI.UNWRAP(newValue)
      }
    }


    //MARK: INITIALIZERS
    public convenience init?(_ entityRef: SDAI.EntityReference?) {
      let complex = entityRef?.complexEntity
      self.init(complex: complex)
    }

    public required init?(complex complexEntity: SDAI.ComplexEntity?) {
      guard let partial = complexEntity?.partialEntityInstance(_maths_function.self) else { return nil }
      self.partialEntity = partial

      guard let super1 = complexEntity?.entityReference(eGENERIC_EXPRESSION.self) else { return nil }
      self.super_eGENERIC_EXPRESSION = super1

      super.init(complex: complexEntity)
    }

    public required convenience init?<G: SDAIGenericType>(fromGeneric generic: G?) {
      guard let entityRef = generic?.entityReference else { return nil }
      self.init(complex: entityRef.complexEntity)
    }

    public convenience init?<S: SDAISelectType>(_ select: S?) { self.init(possiblyFrom: select) }
    public convenience init?(_ complex: SDAI.ComplexEntity?) { self.init(complex: complex) }


    //MARK: DICTIONARY DEFINITION
    public class override var entityDefinition: SDAIDictionarySchema.EntityDefinition { _entityDefinition }
    private static let _entityDefinition: SDAIDictionarySchema.EntityDefinition = createEntityDefinition()

    private static func createEntityDefinition() -> SDAIDictionarySchema.EntityDefinition {
      let entityDef = SDAIDictionarySchema.EntityDefinition(name: "MATHS_FUNCTION", type: self, explicitAttributeCount: 0)

      //MARK: SUPERTYPE REGISTRATIONS
      entityDef.add(supertype: eGENERIC_EXPRESSION.self)
      entityDef.add(supertype: eMATHS_FUNCTION.self)

      //MARK: ATTRIBUTE REGISTRATIONS
      entityDef.addAttribute(name: "INPUT_REPACK", keyPath: \eMATHS_FUNCTION.INPUT_REPACK, 
        kind: .explicit, source: .subEntity, mayYieldEntityReference: false)
      entityDef.addAttribute(name: "FINAL_FUNCTION", keyPath: \eMATHS_FUNCTION.FINAL_FUNCTION, 
        kind: .explicit, source: .subEntity, mayYieldEntityReference: true)
      entityDef.addAttribute(name: "COEF", keyPath: \eMATHS_FUNCTION.COEF, 
        kind: .derived, source: .subEntity, mayYieldEntityReference: true)
      entityDef.addAttribute(name: "PAIRS", keyPath: \eMATHS_FUNCTION.PAIRS, 
        kind: .explicit, source: .subEntity, mayYieldEntityReference: true)
      entityDef.addAttribute(name: "SHAPE", keyPath: \eMATHS_FUNCTION.SHAPE, 
        kind: .explicit, source: .subEntity, mayYieldEntityReference: false)
      entityDef.addAttribute(name: "INCREMENTS", keyPath: \eMATHS_FUNCTION.INCREMENTS, 
        kind: .explicit, source: .subEntity, mayYieldEntityReference: false)
      entityDef.addAttribute(name: "REPEATED_KNOTS", keyPath: \eMATHS_FUNCTION.REPEATED_KNOTS, 
        kind: .explicit, source: .subEntity, mayYieldEntityReference: false)
      entityDef.addAttribute(name: "VARIABLE_OF_INTEGRATION", keyPath: \eMATHS_FUNCTION.VARIABLE_OF_INTEGRATION, 
        kind: .explicit, source: .subEntity, mayYieldEntityReference: false)
      entityDef.addAttribute(name: "DEGREE", keyPath: \eMATHS_FUNCTION.DEGREE, 
        kind: .explicit, source: .subEntity, mayYieldEntityReference: false)
      entityDef.addAttribute(name: "PARAMETERS", keyPath: \eMATHS_FUNCTION.PARAMETERS, 
        kind: .explicit, source: .subEntity, mayYieldEntityReference: true)
      entityDef.addAttribute(name: "SOLE_OUTPUT", keyPath: \eMATHS_FUNCTION.SOLE_OUTPUT, 
        kind: .explicit, source: .subEntity, mayYieldEntityReference: true)
      entityDef.addAttribute(name: "EXTENSION", keyPath: \eMATHS_FUNCTION.EXTENSION, 
        kind: .explicit, source: .subEntity, mayYieldEntityReference: false)
      entityDef.addAttribute(name: "BASIS", keyPath: \eMATHS_FUNCTION.BASIS, 
        kind: .explicit, source: .subEntity, mayYieldEntityReference: true)
      entityDef.addAttribute(name: "LO_UP", keyPath: \eMATHS_FUNCTION.LO_UP, 
        kind: .explicit, source: .subEntity, mayYieldEntityReference: false)
      entityDef.addAttribute(name: "SYMMETRY", keyPath: \eMATHS_FUNCTION.SYMMETRY, 
        kind: .explicit, source: .subEntity, mayYieldEntityReference: false)
      entityDef.addAttribute(name: "INDEX_BASE", keyPath: \eMATHS_FUNCTION.INDEX_BASE, 
        kind: .explicit, source: .subEntity, mayYieldEntityReference: false)
      entityDef.addAttribute(name: "DERIVAND", keyPath: \eMATHS_FUNCTION.DERIVAND, 
        kind: .derived, source: .subEntity, mayYieldEntityReference: true)
      entityDef.addAttribute(name: "BELOW", keyPath: \eMATHS_FUNCTION.BELOW, 
        kind: .explicit, source: .subEntity, mayYieldEntityReference: false)
      entityDef.addAttribute(name: "EXPLICIT_RANGE", keyPath: \eMATHS_FUNCTION.EXPLICIT_RANGE, 
        kind: .explicit, source: .subEntity, mayYieldEntityReference: true)
      entityDef.addAttribute(name: "VAL", keyPath: \eMATHS_FUNCTION.VAL, 
        kind: .derived, source: .subEntity, mayYieldEntityReference: true)
      entityDef.addAttribute(name: "FUN", keyPath: \eMATHS_FUNCTION.FUN, 
        kind: .derived, source: .subEntity, mayYieldEntityReference: true)
      entityDef.addAttribute(name: "FUNC_ID", keyPath: \eMATHS_FUNCTION.FUNC_ID, 
        kind: .explicit, source: .subEntity, mayYieldEntityReference: false)
      entityDef.addAttribute(name: "INTEGRAND", keyPath: \eMATHS_FUNCTION.INTEGRAND, 
        kind: .derived, source: .subEntity, mayYieldEntityReference: true)
      entityDef.addAttribute(name: "LOC", keyPath: \eMATHS_FUNCTION.LOC, 
        kind: .derived, source: .subEntity, mayYieldEntityReference: true)
      entityDef.addAttribute(name: "UPPER_LIMIT_POS_INFINITY", keyPath: \eMATHS_FUNCTION.UPPER_LIMIT_POS_INFINITY, 
        kind: .explicit, source: .subEntity, mayYieldEntityReference: false)
      entityDef.addAttribute(name: "FIRST", keyPath: \eMATHS_FUNCTION.FIRST, 
        kind: .explicit, source: .subEntity, mayYieldEntityReference: false)
      entityDef.addAttribute(name: "D_VARIABLES", keyPath: \eMATHS_FUNCTION.D_VARIABLES, 
        kind: .explicit, source: .subEntity, mayYieldEntityReference: false)
      entityDef.addAttribute(name: "OPERANDS", keyPath: \eMATHS_FUNCTION.OPERANDS, 
        kind: .explicitRedeclaring, source: .subEntity, mayYieldEntityReference: true)
      entityDef.addAttribute(name: "SELECTOR", keyPath: \eMATHS_FUNCTION.SELECTOR, 
        kind: .explicit, source: .subEntity, mayYieldEntityReference: false)
      entityDef.addAttribute(name: "STARTING_INDICES", keyPath: \eMATHS_FUNCTION.STARTING_INDICES, 
        kind: .explicit, source: .subEntity, mayYieldEntityReference: false)
      entityDef.addAttribute(name: "INDEX", keyPath: \eMATHS_FUNCTION.INDEX, 
        kind: .derived, source: .subEntity, mayYieldEntityReference: true)
      entityDef.addAttribute(name: "VARIABLES", keyPath: \eMATHS_FUNCTION.VARIABLES, 
        kind: .derivedRedeclaring, source: .subEntity, mayYieldEntityReference: true)
      entityDef.addAttribute(name: "SOURCE", keyPath: \eMATHS_FUNCTION.SOURCE, 
        kind: .derived, source: .subEntity, mayYieldEntityReference: true)
      entityDef.addAttribute(name: "MAIN_DIAGONAL_VALUE", keyPath: \eMATHS_FUNCTION.MAIN_DIAGONAL_VALUE, 
        kind: .explicit, source: .subEntity, mayYieldEntityReference: true)
      entityDef.addAttribute(name: "NUM_BASIS", keyPath: \eMATHS_FUNCTION.NUM_BASIS, 
        kind: .derived, source: .subEntity, mayYieldEntityReference: false)
      entityDef.addAttribute(name: "OPERAND", keyPath: \eMATHS_FUNCTION.OPERAND, 
        kind: .explicitRedeclaring, source: .subEntity, mayYieldEntityReference: true)
      entityDef.addAttribute(name: "EXPLICIT_DOMAIN", keyPath: \eMATHS_FUNCTION.EXPLICIT_DOMAIN, 
        kind: .explicit, source: .subEntity, mayYieldEntityReference: true)
      entityDef.addAttribute(name: "SELECTED_OUTPUT", keyPath: \eMATHS_FUNCTION.SELECTED_OUTPUT, 
        kind: .explicit, source: .subEntity, mayYieldEntityReference: false)
      entityDef.addAttribute(name: "LOWER_LIMIT_NEG_INFINITY", keyPath: \eMATHS_FUNCTION.LOWER_LIMIT_NEG_INFINITY, 
        kind: .explicit, source: .subEntity, mayYieldEntityReference: false)
      entityDef.addAttribute(name: "PREP_FUNCTIONS", keyPath: \eMATHS_FUNCTION.PREP_FUNCTIONS, 
        kind: .explicit, source: .subEntity, mayYieldEntityReference: true)
      entityDef.addAttribute(name: "DOMAIN", keyPath: \eMATHS_FUNCTION.DOMAIN, 
        kind: .derived, source: .thisEntity, mayYieldEntityReference: true)
      entityDef.addAttribute(name: "TRIANGLE", keyPath: \eMATHS_FUNCTION.TRIANGLE, 
        kind: .explicit, source: .subEntity, mayYieldEntityReference: false)
      entityDef.addAttribute(name: "RANGE", keyPath: \eMATHS_FUNCTION.RANGE, 
        kind: .derived, source: .thisEntity, mayYieldEntityReference: true)
      entityDef.addAttribute(name: "OUTPUT_REPACK", keyPath: \eMATHS_FUNCTION.OUTPUT_REPACK, 
        kind: .explicit, source: .subEntity, mayYieldEntityReference: false)

      return entityDef
    }

  }
}
