Philip Ansteth writes:

> --- In sicp-vsg@yahoogroups.com, Pascal J.Bourguignon <pjb@i...> wrote:

>

> > numbers. Therefore dividing an interval by this interval doesn't give

> > one interval, but two: ]a,b[ / ]-x,+x[ |---> ]-oo,-b/x[ U ]a/x,+oo[

Oops, that must be: ]a,b[ / ]-x,+x[ |---> ]-oo,-a/x[ U ]a/x,+oo[

> > Since you want your operations on interval return new intervals and

> > not random sets, you cannot accept that anymore than you can accept to

> > divide by zero.

> >

>

> Why did you turn the square brackets outward, as in ]a,b[ as opposed

> to [a,b]?

This is not important. I was just thinking of open intervals instead

of closed intervals.

> Also, what is the force of your term "random." Are you using it in

> a formal way?

No, in an informal way. Change it with a universal quantifier.

Actually, one could _define_ arithmetic operations on sets, but the

point is that these operations would not have any definite properties

if you don't restrict the set of sets you're considering.

Let P(R) be the set of all subsets of R.

Let's define these operations:

+ : P(R) x P(R) ------> P(R)

(U , V) |-----> W={w|there is a u in U and a v in V such as w=u+v}

- : P(R) x P(R) ------> P(R)

(U , V) |-----> W={w|there is a u in U and a v in V such as w=u-v}

* : P(R) x P(R) ------> P(R)

(U , V) |-----> W={w|there is a u in U and a v in V such as w=u*v}

/ : P(R) x P(R) ------> P(R)

(U , V) |-----> W={w|there is a u in U and a v in V such as w=u/v}

And let's define an interval as:

An element U of P(R) is an interval

<=def=> there are a,b in R, such as a<=b and U={x|0<=(x-a)<=(b-a)}

Notation: U=[a,b]

Theorem: for all interval U and V, U+V, U-V and U*V are intervals.

Theorem: for all interval U=[a,b] and V=[c,d],

for all op in {+,-,*,/},

for all e in U and f in V,

U op V = [a,e] op V union [e,b] op V

U op V = U op [c,f] union U op [f,d].

But, if U and V are closed intervals and V contains 0

then U/V is not an interval.

For example, [1,1]/[-1,1] = [1,1]/[-1,0] union [1,1]/[0,1]

[1,1]/[-1,0] = ]-oo,-1] [a]

and: [1,1]/[0,1] = [1,+oo[ [b]

So: [1,1]/[-1,1] = ]-oo,-1] union [1,+oo[ [c]

Unfortunately, ]-oo,-1] and [1,+oo[ are not intervals per the above

definition, and neither is ]-oo,-1] union [1,+oo[.

So, if you want your operations on intervals to be endomorphic, you

need to prevent division by an interval containing 0.

Note that / is endomorphic on P(R), but everytime you divide by a set

containing 0, you obtain more and more complex sets, for which you

need more and more bits to describe.

--

__Pascal Bourguignon__

http://www.informatimago.com/
There is no worse tyranny than to force a man to pay for what he does not

want merely because you think it would be good for him. -- Robert Heinlein