3.2 Creating Representations

  • NewRepresentation( name, super, slots )

    NewRepresentation returns a new representation rep that has the name name and is a subrepresentation of the representation super. This means that every object in rep lies automatically also in super. We say also that super is an implied filter of rep.

    Each representation in GAP is a subrepresentation of exactly one of the four representations IsInternalRep, IsDataObjectRep, IsComponentObjectRep, IsPositionalObjectRep. The data describing objects in the former two can be accessed only via GAP kernel functions, the data describing objects in the latter two is accessible also in library functions, see Component Objects and Positional Objects for the details.

    The third argument slots is a list either of integers or of strings. In the former case, rep must be IsPositionalObjectRep or a subrepresentation of it, and slots tells what positions of the objects in the representation rep may be bound. In the latter case, rep must be IsComponentObjectRep or a subrepresentation of, and slots lists the admissible names of components that objects in the representation rep may have. The admissible positions resp. component names of super need not be be listed in slots.

    The incremental rank (see Filters in the Reference Manual) of rep is 1.

    Note that for objects in the representation rep, of course some of the component names and positions reserved via slots may be unbound.

    Examples for the use of NewRepresentation can be found in Component Objects, Positional Objects, and also in A Second Attempt to Implement Elements of Residue Class Rings.

    [Top] [Previous] [Up] [Next] [Index]

    GAP 4 manual
    February 2000