| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> comp.databases.theory -> Re: Proposal: 6NF
Marshall wrote:
> On Oct 20, 3:12 am, "vc" <boston..._at_hotmail.com> wrote:
> > Marshall wrote:
> > > On Oct 19, 8:40 pm, "vc" <boston..._at_hotmail.com> wrote:
> > > > Marshall wrote:
> >
> > > > > > "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
> > > > > > is a subset of the natural numbers implemented by the computer) to
> > > > > > generate a result which is undefined for the (2,3) pair.
> >
> > > > > It's not a bug, since the program produces the correct result, which is
> > > > > 1. It's not "cheating" because WTF does cheating even mean in
> > > > > this context. What it is, is the absence of closure over the subclass.
> > > > > Which is no big deal.
> >
> > > > 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 ?
> >
> > > Consider the below function:
> >
> > > Let S4 = {0, 1, 2, 3}
> > > Let S23 = {2, 3}
> > > f : S23, S23 -> S4
> >
> > The binary operation over S23 is g:S23:S23 -> S23, your f does not
> > qualify. A common example is '+'.
> >
> >
> > > f(2,2) = 0
> > > f(2,3) = 1
> > > f(3,2) = 1
> > > f(3,3) = 2
> >
> > > Your claim is what, exactly? That this is not a function? That
> > > it doesn't exist? That it's cheating? That it's invalidly defined
> > > because the result type is not the same as the types of
> > > both parameters?
> > It's not a binary opeartion that we've been talking about all along.
> > Did you read the reference I gave earlier or not ?
>
OK.
> Do we also agree that:
>> 2) f exists
> 1) f is a function
Yes.
> Apparently you also think that f is "absurd." Can we take
> as a definition of "absurd" to be any function that is not of
> the type g:A,A->A? Because it seems to me that there
> are many such functions.
No, we can take as absurd the contention that addMod4 is a binary operation over {2,3 } yielding 1.
> >> >
> > > > > > At thispoint, it may be useful to recall what a function is and
> > > > > > apply the memory, if any, to the addMod4 operation.
> >
> > > > > Indeed. A function is a mapping from one set to another.
> > > > > In this case, the domain is pairs of values from {0,1,2,3}
> > > > > and the range is that same set. This particular
> > > > > function qualifies as a binary function, and also
> > > > > exhibits closure over the set {0,1,2,3}. Since {2,3} is a
> > > > > subset of {0,1,2,3}, the function is fully defined over
> > > > > that subset. However, since that function is not closed
> >
> > > > 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.
> >
> > > I don't understand this "out of nowhere" business. It's just
> > > a plain, regular number one. Nothing could be simpler.
>
Your desire for any such function to be an operation over the set in question.
>
Your imagination is playing tricks on you -- I never said that, it was not 'a function', but the specific addMod4 operation (which happens to be a special kind of function of course). For that operation the pair ((2,3), ..) does not exist which clearly means that the operation is not defined for this element of S23xS23.
>Is closure required
It would probably be prudent to ask at this point what you mean by "to qualify as a function something has to be well-defined", but t's a nice diversion that has nothing to do with the binary operation inheritance discussion. In any case, you can easily find out that a fucntion is defined as a relation, mathematical, of course such that it uniquely associates elements of one set with elements of some other set, or possibly the same set.
> >> > Your 'f' has nothing to do with the whole discussion of 'inheriting'
> > > > > > > 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
> > > > > > > seen any math books that give functions the same
> > > > > > > semantics as inherited OOPL mutator methods however.
> >
> > > > > I note you did not respond to this important paragraph. Yes,
> > > > > in OOPLs, there is a problem with closure, subtyping,
> > > > > and mutator methods. Outside of OOPLs (in math, that
> > > > > is) this problem does not apply.
> >
> > > > We may tackle those issues later after we come to some agreement re.
> > > > the trivial stuff like functions and binary operations.
> >
> > > Okay. What is your definition of a function, then, and how
> > > does my f above stack up with regards to your
> > > definition?
Because your function ain't a binary operation derivable from the supertype operation (see the definition of waht the operation is). You've defined something different which is structurally different from the supertype operation.
>I already showed an example of working Java
The specifc implementation is irrelevant, you might as well have just used System.out.println(1). What is important is the fact that the base type has a binary operation and the derived type does not have it any more, instead you implemented a function which I hope by now is clearly a different animal altogether.
>
See above re. the S23xS23 -> S0123 function vs. the S0123xS0123 -> S0123 operation.
>
Again, the above is pure fantasy of yours, I never said that. The operations, on the other hand, are "inextricably bound to", or rather are properties, of some familiar sets such as the set of natural numbers with addition (or successor). Without the successor/addition operation, calling the thing 'natural numbers' is as absurd as calling addMod4 an operation over {2, 3}.
>The algebra books I have read (admitedly few
>
>
>
>
It does not matter whether you consider, for example, the natural numbers as a primitive abstract objects with some intrinsic operations or an algebraic structure satisfying the commutative monoid axioms. In any interpretations, you will lose the addition operation when you move to the subset of odd numbers for instance. That's not what an OOP programmer would expect, the expectation being that the new structure should have more, not fewer properties, or in other words the (N, +) monoid should not disintegrate as a result of such subtyping.
Besides, you got it backwards, algebraic axioms capture and generalize some interesting properties of existing mathematical objects such as the natural numbers, the axioms do not 'define' a structure that is *the* natural numbers. Much less do they give one a license to throw away existing mathematical object properties, where did that come from ?
Example :
class Natural {
Rational '+' { .. return .. }
}
class oddNatural extends Natural {
...
}
o, x =3, y =5 oddNatural;
n Natural;
...
o = x + y; -- makes sense
z = x + y; -- does not make sense mathematically but is something the programmer would expect
If the language does not support covariance, then it will mangle the binary operation '+' in the second case into a function oddNaturalxoddNatural -> Natural
Now, I must retract my statement that the LSP will be violated with subset subtyping, my apologies to Jan and you for saying that . The LSP will not be violated with covariance, but the artificial '+' will be nonsensical. The LSP won't be violated in the first case either at least superficially, although the interpretation depends on whether you consider converting an operation to a function acceptable behavior. I do not consider either acceptable because of getting unexpected properties in both cases.
> >> > reals. In cases when the subtlety is unimportant, one can say that
> > > > > > > Also, I found this equation in a math book on page 3:
> >
> > > > > > > P ⊆ N ⊆ Z ⊆ Q ⊆ R
> >
> > > > > > The equation looks like a random collection of characters. What do
> > > > > > you suppose it means ?
> >
> > > > > I suppose your browser doesn't have the necessary font.
> >
> > > > > In prose, it means:
> >
> > > > > The set of positive integers is a subset of the set of nonnegative
> > > > > integers which is a subset of the integers which is a subset
> > > > > of the rationals which is a subset of the reals.
> >
> > > > That's truly a trivial observation which is not strictly speaking
> > > > correct (see the earlier discussion re. real construction).
> >
> > > Wait, you're saying it's both trivial *and* incorrect? Earlier
> > > I recall you suggesting various people consult math books
> > > for such questions; I did consult one and it was quite clear
> > > on the question: every integer is also a real.
> > I guess you need another book because integers as commonly constructed
> > are not a subset of reals but rather are isomorphic to some subset of
>
Although that is correct up to a point, what framework do you have in mind ?
>and that
If they are embedded, you cannot technically say one is a subset of another, but it does not matter.
>
![]() |
![]() |