Re: Proposal: 6NF

From: Jan Hidders <hidders_at_gmail.com>
Date: 16 Oct 2006 14:33:17 -0700
Message-ID: <1161034397.589082.152190_at_k70g2000cwa.googlegroups.com>


vc wrote:
> Jan Hidders wrote:
> >
> > When I say "the set of integers" I mean "the set of integers" and not
> > "the set of integers plus some operations" which is a tuple and not a
> > set.
>
> When one says "the set of integers", one usually refers to a set of
> things possessing some properties, addition/multiplication/subtraction
> operations obeying certain laws. If one says "the set of integers" and
> excludes one or more operations, then one makes the mistake of
> misnaming the structure one is talking about. You can call the
> structure 'my_private_integers', but it's not the same thing we came
> to love and respect at primary school.

I'm not excluding the operations, I'm just making a distinction between the set itself and the tuple that defines the algebraic structure. I know that this set and the tuple are often identified in common terminology, but this is in some sense sloppy and it is this sloppyness that makes it in this case harder to see what the relationship is between the subtype=subset interpretation and inheritance between abstract data types.

Allow my to explain my position a bit more to avoid quibbles over misunderstandings. I would argue that it is sloppy to say that the algebraic definition for Q defines *the* set of rationals. The abstract algebraic definition allows us to construct several sets and operations that satisfy the axioms, and not one of these constructions can claim to be *the* set of rationals. This, however, allows us to construct Z and Q such that Z is a subset of Q while still respecting the axioms of both algebraic structures. I'm arguing that this gives us an intuitive and consistent interpretation of what these sets mean along with an easy to understand semantics of subtyping that ensures LSP. So, just to be clear on this, what I'm *not* saying is that this is necessarily so, i.e., we can just as well define constructions for Z and Q such that they are disjoint.

> > I get the impression that every time I write "the set of X" you
> > actually read "the algebraic structure that descibes X", which might
> > explain why you think I'm being imprecise. If I understand you
> > correctly you don't accept that "the set of X" is actually a meaningful
> > concept? Correct?
>
> It depends on what the set of X is. If it's just a collection of three
> thing without any known properties, then the most one can say is that
> "it's a set of three things".

Indeed, but you can construct the set of reals like for example happens with the surreal numbers, of which they are, dare I say it, a subset. :-) Along with the construction the operations are defined, and the construction is not based on these operations.

> No, it's not based on that. Although, a typical construction of
> reals makes 2.0 and 2 quite distinct, we can pretend that they are the
> same ("up to the isomorphism").

So where is that distinction in the definition of the surreal numbers?

> The substantial point is that Z loses
> some properties after being 'subsetted' from R, e.g the division
> operation, which means in particular that one cannot substitute an
> integer(subtype) for a real(type) in any arbitrary expression as the
> LSP requires.

I assume you think that an example of a problematic expression would be (2.0 / 3.0) where I could subtitute the 2.0 and 3.0 with their integer counterparts 2 and 3 and obtain (2 / 3) which would not have a defined result, right?

Well, no. Since it is assumed that the integers are a subset of the reals the result of / is defined also for all the integers. So LSP holds.

Since I think we touched the main issues above, I will resist the urge to give knee-jerk responses to all you other comments. :-)

  • Jan Hidders
Received on Mon Oct 16 2006 - 23:33:17 CEST

Original text of this message