| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> comp.databases.theory -> Re: Proposal: 6NF
Marshall wrote:
> On Oct 19, 4:36 pm, "vc" <boston..._at_hotmail.com> wrote:
> > Marshall wrote:
> > > On Oct 19, 7:06 am, "vc" <boston..._at_hotmail.com> wrote:
> > > > Jan Hidders wrote:
> > > > > vc wrote:
> > > > > > Jan Hidders wrote:
> > > > > > [...]
> >
> > > > > > A much simpler example. Let {0, 1, 2, 3} be a set of four integers
> > > > > > with addition modulo 4. Then, none of its subsets, except {0} and
> > > > > > {0, 2}, retains the addition mod 4 operation which makes the idea of
> > > > > > 'subtype as subset' utterly silly, [....].
> >
> > > > > You keep on making the same mistake. The expression a +[mod 4] b has a
> > > > > well defined result if a and b are from any subset of {0, 1, 2, 3}.
> >
> > > > Consider the subset {2, 3}. What is the result of (2+3) mod 4 ? If
> > > > you say it's '1', what is '1'? There is no such element in {2, 3}.
> >
> > > That doesn't matter. The answer is 1. The fact that 1 is not a member
> > > of {2,3} is irrelevant. The function +[mod4] still exists, unchanged,
> > > even though you took a subset of its domain.
> > The original function maps pairs of values from {0,1,2,3} to the values
> > in the same set. In particular, (2,3) -> 1. Sunce we do not have '1'
> > in the subset {2,3}, the binary operation is not defined any longer.
>
It means precisely that: if the binary operation is not defined for the entire SxS domain it's not a binary operation, read some algebra book or at least the reference I gave earlier.
> >
>
Not closed means not defined for the entire SxS domain which means that is not an operation and that the LSP does not hold (obviously) because in order for LSP to hold, the function must be defined for the entire domain. Take another example, the set of odd numbers as a subset of the natural numbers with respect to addition. The addition 'operation' is defined nowhere in the domain. Does the example convince you that you cannot use the idea of 'subtype as subset' and that subsetting can lose an operation or two ?
> ***
> >> > Are you saying that the OOPL foundation is voodoo rather than logic and
> > > You're conflating math with type issues from OOPLs.
>
> >> > is a subset of the natural numbers implemented by the computer) to
> > > > Objects in subclass B = {2, 3} won't understand 'plusMod4' because the
> > > > operation does not exist in B, it was lost as soon as you've subsetted
> > > > A = {0,1,2,3}. That is of course if you understand 'operation' in the
> > > > ordinary mathematical sense such that the set is closed under it. If
> > > > you have to go outside the set in question, it ain't no operation no
> > > > more in the accepted mathematical sense.
> >
> > > Certainly they will understand it. Behold:
> >
> > > class ModFour {
> > > private final int val;
> > > ModFour(int i) {
> > > if (i < 0 || i > 3) throw new RuntimeException();
> > > val = i;
> > > }
> >
> > > public ModFour addModFour(ModFour a) {
> > > return new ModFour((val+a.val)%4);
> > > }
> >
> > > public String toString() { return "" + val; }
> >
> > > }
> >
> > > public class TwoOrThree extends ModFour {
> > > TwoOrThree(int i) {
> > > super(i);
> > > if (i < 2 || i > 3) throw new RuntimeException();
> > > }
> >
> > > public static void main(String[] args) {
> > > TwoOrThree v2 = new TwoOrThree(2);
> > > TwoOrThree v3 = new TwoOrThree(3);
> > > System.out.println(v2.addModFour(v3));
> > > }
> > > }
> >
> > > If you run this program it prints "1". Notice that the
> > > code doesn't care that addModFour() isn't automatically
> > > covariant.
> >
> > "return new ModFour((val+a.val)%4)" is called a bug or cheating
> > because you used a function defined on the entire domain NxN (where N
>
So producing an absurd result is no big deal ? You seem to have agreed that in the {2,3} subset there is no '1', how come your java implementation manages to extract '1' out of nowhere ?
> >
>
How can it be 'fully defined' over {2,3} and 'not closed' at the same time ? What does (2,3) map to ? If you say to one, then you exctract '1' out of nowhere again.
> over the subset, it does not qualify as a binary function
> on that subset. It remain a closed binary function over
> {0,1,2,3} however.
> > >> > > seen any math books that give functions the same
> >
> > > The *only* trouble anywhere in here is if you want to
> > > have methods which are mutator methods; that is,
> > > methods which modify the distinguished object in place.
> > > And yes, in that case, closure is an issue. I have not
>
We may tackle those issues later after we come to some agreement re. the trivial stuff like functions and binary operations.
> >> > You may want to find out how integers and real numbers are actually
> > > Furthermore, 2 = 2.0.
That ("this is simple arithmetic") does not make any obvious sense, sorry.
> >> > The equation looks like a random collection of characters. What do
> > > Also, I found this equation in a math book on page 3:
> >
> > > P ⊆ N ⊆ Z ⊆ Q ⊆ R
> >
>
>
>
That's truly a trivial observation which is not strictly speaking correct (see the earlier discussion re. real construction).
>
>
> Marshall
Received on Thu Oct 19 2006 - 22:40:21 CDT
![]() |
![]() |