Re: The naive test for equality

From: Marshall Spight <marshall.spight_at_gmail.com>
Date: 8 Aug 2005 09:01:30 -0700
Message-ID: <1123516890.932363.109840_at_f14g2000cwb.googlegroups.com>


David Cressey wrote:
>
> Right. The entire equivalence class is a single element as viewed by the
> rationals engine.
> In order to manipulate this "single element" as data, we need a symbol for
> it, to represent it.
>
> So we choose one of the elements of the original set to stand as a
> representative of the entire set that is going to be seen as an element. In
> this case we might choose the rational with the lowest denominater, namely
> 1/2.
>
> Now, whenever we are given an unnormalized rational, such as 5/10, we ask
> the rationals engine to normalize it for us.
> The rationals engine knows the rule for normalizing, namely remove common
> factors in the numerator and denominator. So it returns 1/2, the
> normalized equivalent of 5/10.
>
> If we ask the rationals engine to normalize 1/2, it will give us back 1/2.
>
> So the process of normalizing is choosing one, out of an equivalence class,
> according to some criterion, and using the symbol that represents the
> chosen element to act as the normalized form for the entire class.

I don't see how this is a particularly useful way to look at the issue. It doesn't separate the idea of the lexical symbols we use to display and enter values, and the abstract values themselves.

The way I look at it is, when the compiler sees "5/10" it converts it into a value. The value it converts it into is the same value as when it sees "1/2" because the two are the same value.

I also don't see the benefit of talking about separate engines.

Marshall Received on Mon Aug 08 2005 - 18:01:30 CEST

Original text of this message