MathGroup Archive 2007

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Re: (x|y) \[element] Integers in Reduce function

  • To: mathgroup at smc.vnet.net
  • Subject: [mg82629] Re: [mg82582] Re: (x|y) \[element] Integers in Reduce function
  • From: "Jean-Marc Gulliet" <jeanmarc.gulliet at gmail.com>
  • Date: Fri, 26 Oct 2007 05:29:06 -0400 (EDT)
  • References: <ffn0le$5sp$1@smc.vnet.net> <200710251009.GAA21790@smc.vnet.net>

Andrzej Kozlowski wrote:

> On 25 Oct 2007, at 19:09, Jean-Marc Gulliet wrote:
>
> > Steven Siew wrote:
> >> Consider the following
> >>
> >> Reduce[x^2 - 2 y^2 == 1 && x>= 0 && y>=0 && (x|y) \[element]
> >> Integers,
> >> {x,y} ]
> >>
> >> What does " (x|y) \[element] Integers "   mean?
> >>
> >> Does it mean:
> >>
> >> (a) x is an Integer  AND  y is an Integer
> >>
> >> (b) x is an Integer  OR  y is an Integer
> >
> > The correct answer is (b). The vertical bar | stands for
> > *Alternatives*
> > in pattern matching (equivalent to the non-exclusive logical OR). See
> > ref/Alternatives and also the tutorial "Patterns Involving
> > Alternatives"
> > in the documentation center (tutorial/PatternsInvolvingAlternatives).
> >
> > Note that the correct syntax for \[element] is \[Element] (with a
> > capital 'e').
> >
> > Regards,
> > --
> > Jean-Marc
> >
>
> No, the correct answer is (A)
>
> FullSimplify[Im[a] + Im[b], Element[a | b, Reals]]
> 0
>
> This only is correct when both a and b are real (given no other
> knowledge of a and b). For the explanation why the answer is A and
> not B see my first post in this thread.
>
> Andrzej Kozlowski

Andrzej,

Of course, you are right. I stand corrected.

Best regards,
-- 
Jean-Marc


  • Prev by Date: The Wolfram 2,3 Turing Machine Research Prize - Announcement
  • Next by Date: Re: eigenvectors is taking lot of time
  • Previous by thread: Re: Re: (x|y) \[element] Integers in Reduce function
  • Next by thread: Re: (x|y) \[element] Integers in Reduce function