classes
Every thing x belongs to a class X -- a
hash table that indicates in a weak sort of way what type of thing x
is. We may also say that x is an instance
of X. The mathematical notion of a set X and an
element x of X can be
modeled this way. The class of x can be obtained with the function
class.
Every thing X also has a parent P, which
indicates a larger class to which every instance x of X belongs. We
also say that
X is a subclass of P. For example, the mathematical
notion of a module P and a submodule X may be modelled this way.
The parent of x can be obtained with the function parent.
i1 : parent 2
o1 = Nothing
o1 : Type
'Nothing' -- the empty class. |
i2 : parent parent 2
o2 = Thing
o2 : Type
'Thing' -- the class of all things. |
i3 : class 2
o3 = ZZ
o3 : Ring
'ZZ' -- denotes the class of all integers. |
i4 : parent class 2
o4 = Thing
o4 : Type
'Thing' -- the class of all things. |
i5 : class class 2
o5 = Ring
o5 : Type
'Ring' -- the class of all rings. |
i6 : parent class class 2
o6 = Type
o6 : Type
'Type' -- the class of all types. |
The classes and parents provide a uniform way for operations on
things to locate the appropriate functions needed to perform them.
Please see using methods and binary method now for a
brief discussion.
For more details, see one of the topics below.
For related topics, see one of the following.



