Re: (x|y) \[element] Integers in Reduce function
- To: mathgroup at smc.vnet.net
- Subject: [mg82582] Re: (x|y) \[element] Integers in Reduce function
- From: Jean-Marc Gulliet <jeanmarc.gulliet at gmail.com>
- Date: Thu, 25 Oct 2007 06:09:39 -0400 (EDT)
- Organization: The Open University, Milton Keynes, UK
- References: <ffn0le$5sp$1@smc.vnet.net>
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
- Follow-Ups:
- Re: Re: (x|y) \[element] Integers in Reduce function
- From: "Jean-Marc Gulliet" <jeanmarc.gulliet@gmail.com>
- Re: Re: (x|y) \[element] Integers in Reduce function
- From: Andrzej Kozlowski <akoz@mimuw.edu.pl>
- Re: Re: (x|y) \[element] Integers in Reduce function