# [FOM] Object-Oriented Formal Mathematical Languages

Victor Makarov viktormakarov at hotmail.com
Thu Apr 29 10:58:51 EDT 2004

On Wed, 28 Apr 2004 11:34:14 , Brian Postow wrote:
"There are several object oriented models at the level of the lambda
calculus.The $\varsigma$ calculus by Cardelli and Abadi and the $\lambda \&$
calculus by Castagna are two good places to start."

On Wed, 28 Apr 2004 19:51:19, Jacques Carette wrote:

"the systems above are lambda-calculus models of object-oriented
programming.  The two
models above (ie $\varsigma$ and $\lambda \&$) are beautiful pieces
of mathematics that nicely capture most (but unfortunately not all)
of the essence of object-oriented systems."

I doubt that the lambda calculus (or calculi baset on it) can be a good
theoretical foundation of Object-Oriented Programming.

For me, the essence of the Object-Oriented Programming paradigm is as
follows.

The main concepts of OOP are the concepts of object and class. An object is
a k-tuple of values. A value can be, for example, an integer or real number,
a character or a string of characters or another object. Any object is an
instance of a class. A class is a description (in an object-oriented
programming language) of the structure of its objects, some conditions
(called class invariant) that all objects of the class must satisfy and some
operations on its objects. A class is to an object (of its class) as a
blueprint of a real object (a bicycle, for example) is to the real object.

Note the similarity between the concept of object in OOP and the concept
of mathematical object. A mathematical object, such as a group, a graph and
so on, is also usually defined as a k-tuple of sets, functions or other
mathematical objects. For example, a group is a pair( or a 2-tuple) <G, f>
where G is the carrier set and f is a function from G x G to G, satisfying
certain conditions – group axioms. Note that a concrete group is a model of
the group theory and, more generally, a concrete mathematical object is a
model of the corresponding theory (excluding primitive mathematical objects
such as, for example, integer numbers). So we may say that a class is to an
object (of the class) as a mathematical theory is to a model of the theory
(and the class invariant is the analogue of the axioms of a theory).

As mathematical theories are the main way of structuring of the
mathematical knowledge, so classes are the main way of structuring of the
“programming knowledge”. A very important feature of OOP is the possibility
to build class hierarchies by defining a class as an heir of other class
(simple inheritance) or classes (multiple inheritance). In mathematics, a
similar method is used when we define, for example, the theory of linear
ordered groups referring to the theory of linear order and the group theory.

This analogy suggests that the theoretical foundation of Object-Oriented
Programming can be rather Foundations of Mathematics (according to  Stephen
G. Simpson, "Foundations of mathematics is the study of the most basic
concepts and logical structure of mathematics, with an eye to the unity of
human knowledge. Among the most basic mathematical concepts are: number,
shape, set, function, algorithm, mathematical axiom, mathematical
definition, mathematical proof."

Sure, we can add to this list the concept of mathematical theory).

Victor Makarov

http://home.nyu.edu/~yvm204/vm/vm.htm

_________________________________________________________________
Test your ‘Travel Quotient’ and get the chance to win your dream trip!
http://travel.msn.com