6.30 andprop and orprop evaluating (29.7.97)

6.30.1 Jaroslav Hajtmar
6.30.2 Robert Israel (30.7.97)
6.30.3 Gaston Gonnet (6.8.97)

6.30.1 Jaroslav Hajtmar

Is there a way to evaluate AndProp and OrProp functions? These functions works very good, but output form is not mathematical. I would like to get result in RealRange(s) form(s).

For example:

 
> rr1:=RealRange(0,10); 
> rr2:=RealRange(5,20); 
> result1:=AndProp(rr1,rr2); 
> result2:=OrProp(rr1,rr2); 
 
 
                       rr1 := RealRange(0, 10) 
 
 
                       rr2 := RealRange(5, 20) 
 
 
        result1 := AndProp(RealRange(0, 10), RealRange(5, 20)) 
 
 
        result2 := OrProp(RealRange(0, 10), RealRange(5, 20))
 

I want to get result1 in form RealRange(5,10) and result2 in form RealRange(0,20).

I think that is it a big problem, especially when borders of real intervals are open.

I want to write any procedures, which do set operations on RealRanges by analogy set operations "union", "intersect" and "minus", because AndProp and OrProp output forms are very unintelligible. What do you think about?

6.30.2 Robert Israel (30.7.97)

Since "about" knows how to simplify range expressions, the easiest way may be to use it. The properties of an object can be recovered from the table `property/object`.

 
> assume(zz, result1); 
> `property/object`[zz]; 
 
           RealRange(5,10) 
 
> assume(zz, result2); 
> `property/object`[zz]; 
 
           RealRange(0,20)
 

6.30.3 Gaston Gonnet (6.8.97)

If you load the assume function, then the functions are deļ¬ned and you will have the desired behaviour. E.g.

> assume(x>0); 
> rr1:=RealRange(0,10); 
                            rr1 := RealRange(0, 10) 
 
> rr2:=RealRange(5,20); 
                            rr2 := RealRange(5, 20) 
 
> result1:=AndProp(rr1,rr2); 
                          result1 := RealRange(5, 10) 
 
> result2:=OrProp(rr1,rr2); 
                          result2 := RealRange(0, 20)