Re: Re: problem with EvenQ
- To: mathgroup at smc.vnet.net
- Subject: [mg105971] Re: [mg105947] Re: [mg105923] problem with EvenQ
- From: Andrzej Kozlowski <akoz at mimuw.edu.pl>
- Date: Mon, 28 Dec 2009 04:58:14 -0500 (EST)
- References: <200912270006.TAA12116@smc.vnet.net> <200912270726.CAA21183@smc.vnet.net>
One can also do it as follows:
evenQ[x_?NumberQ] := EvenQ[x]
FindInstance[evenQ[x], x, Integers]
{{x->0}}
Andrzej Kozlowski
On 27 Dec 2009, at 16:26, Murray Eisenberg wrote:
> That seems to be an incomplete implementation of FindInstance. But the
> following will work, albeit with the very unsurprising result shown:
>
> FindInstance[2 y < 100 && Mod[y, 2] == 0, {y}, Integers]
> {{y->0}}
>
> (* for a less unsurprising result: *)
> FindInstance[2 y < 100 && Mod[y, 2] == 0 && y > 0, {y}, Integers]
> {{y->48}}
>
> dvholten wrote:
>> Hi folks,
>> i puzzled all afternoon, but couldnt get this one solved:
>> what is the proper way of using EvenQ[] within FindInstance[] ?
>> I cant use it like
>> FindInstance[ y*2 < 100 && EvenQ[y], {y}, Integers ]
>> or even
>> FindInstance[ EvenQ[y], {y}, Integers ]
>>
>> Actually, the expression used in FindInstance is much more complex,
>> but i condensed the problem to be EvenQ[] - i expect some kind of
>> special notation to help here.
>>
>> thanks
>> dvh
>>
>
> --
> Murray Eisenberg murray at math.umass.edu
> Mathematics & Statistics Dept.
> Lederle Graduate Research Tower phone 413 549-1020 (H)
> University of Massachusetts 413 545-2859 (W)
> 710 North Pleasant Street fax 413 545-1801
> Amherst, MA 01003-9305
>
- References:
- problem with EvenQ
- From: dvholten <info@dvholten.de>
- Re: problem with EvenQ
- From: Murray Eisenberg <murray@math.umass.edu>
- problem with EvenQ