Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.soft-sys.math.mathematica > #12356
| From | Andrzej Kozlowski <akozlowski@gmail.com> |
|---|---|
| Newsgroups | comp.soft-sys.math.mathematica |
| Subject | Re: Relational operators on intervals: bug? |
| Date | 2012-11-16 07:14 +0000 |
| Message-ID | <k84p3v$gaq$1@smc.vnet.net> (permalink) |
| References | (2 earlier) <k7skt2$ku3$1@smc.vnet.net> <20121114062826.C02FC69AC@smc.vnet.net> <6F6D7B27-201F-4AC9-9553-809ABA30A7CE@mimuw.edu.pl> <9488D537-DAE3-45F6-A088-38486CB999AB@math.umass.edu> <20121115085735.202336A1D@smc.vnet.net> |
| Organization | Time-Warner Telecom |
On 15 Nov 2012, at 09:57, Andrzej Kozlowski <akozlowski@gmail.com> wrote:
>
> On 14 Nov 2012, at 22:01, Murray Eisenberg <murray@math.umass.edu> wrote:
>
>> On Nov 14, 2012, at 5:39 AM, Andrzej Kozlowski <akozlowski@gmail.com> wrote:
>>
>>>
>>> On 14 Nov 2012, at 07:28, Richard Fateman <fateman@cs.berkeley.edu> wrote:
>>>
>>>> On 11/12/2012 9:13 PM, Murray Eisenberg wrote:
>>>>
>>>>>
>>>>> Here is the empty interval in Mathematica:
>>>>>
>>>>> Interval[{1, 0}]
>>>>>
>>>>> Indeed:
>>>>>
>>>>> Resolve[Exists[x, IntervalMemberQ[Interval[{1, 0}], x]]]
>>>>> False
>>>>>
>>>> Apparently this doesn't mean what you think it does. It gives the same
>>>> answer for Interval[{0,1}].
>>>
>>> Of course that is because
>>>
>>> IntervalMemberQ[Interval[{0, 1}], x]
>>>
>>> False
>>
>> What remains surprising to me is:
>>
>> Resolve[Exists[x, x \[Element] Reals, IntervalMemberQ[Interval[{0, 1}], x]]]
>> False
>>
>
>
> I don't find it surprising.
> All you are doing is, evaluating Exists[x,Element[x,Reals],False] which is False and then Resolve[False] which is also False.The fact that IntervalMemberQ[Interval[{0, 1}], x] immediately evaluates to False (unlike, for example, 0<x<1, which evaluates to itself) is responsible for this and shows that IntervalMemberQ is not intended to be used in symbolic expressions. Compare this with
>
> Resolve[Exists[x, x \[Element] Reals, 0 < x < 1]]
>
> True
>
> Andrzej Kozlowski
>
>
Maybe the following example will make my point clearer.
Compare:
Resolve[Exists[x, Element[x, Primes]]]
True
with
Resolve[Exists[x, PrimeQ[x]]]
False
Mathematica `predicates (functions ending with Q) always evaluate immediately to True or False and thus are generally unsuitable for use in symbolic expressions of the above kind.
Andrzej Kozlowski
Back to comp.soft-sys.math.mathematica | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Relational operators on intervals: bug? bertiiiiiiiiiiiiiiiiiiiiiiiiii@gmail.com - 2012-11-11 20:59 +0000
Re: Relational operators on intervals: bug? Richard Fateman <fateman@cs.berkeley.edu> - 2012-11-12 08:12 +0000
Re: Relational operators on intervals: bug? Murray Eisenberg <murray@math.umass.edu> - 2012-11-13 05:13 +0000
Re: Relational operators on intervals: bug? Richard Fateman <fateman@cs.berkeley.edu> - 2012-11-14 06:33 +0000
Re: Relational operators on intervals: bug? Andrzej Kozlowski <akozlowski@gmail.com> - 2012-11-15 09:04 +0000
Re: Relational operators on intervals: bug? Murray Eisenberg <murray@math.umass.edu> - 2012-11-15 09:07 +0000
Re: Relational operators on intervals: bug? Murray Eisenberg <murray@math.umass.edu> - 2012-11-15 09:07 +0000
Re: Relational operators on intervals: bug? Andrzej Kozlowski <akozlowski@gmail.com> - 2012-11-15 09:07 +0000
Re: Relational operators on intervals: bug? Andrzej Kozlowski <akozlowski@gmail.com> - 2012-11-16 07:14 +0000
Re: Relational operators on intervals: bug? Murray Eisenberg <murray@math.umass.edu> - 2012-11-16 07:14 +0000
Re: Relational operators on intervals: bug? Andrzej Kozlowski <akozlowski@gmail.com> - 2012-11-16 07:14 +0000
Re: Relational operators on intervals: bug? Andrzej Kozlowski <akozlowski@gmail.com> - 2012-11-17 08:49 +0000
Re: Relational operators on intervals: bug? Richard Fateman <fateman@cs.berkeley.edu> - 2012-11-17 08:51 +0000
Re: Relational operators on intervals: bug? Bob Hanlon <hanlonr357@gmail.com> - 2012-11-13 05:13 +0000
Re: Relational operators on intervals: bug? Richard Fateman <fateman@eecs.berkeley.edu> - 2012-11-13 05:13 +0000
csiph-web