Mathematica 9 is now available
Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2005
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2005

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

Search the Archive

Re: operators for relations in sets

  • To: mathgroup at smc.vnet.net
  • Subject: [mg60351] Re: [mg60338] operators for relations in sets
  • From: "David Park" <djmp at earthlink.net>
  • Date: Wed, 14 Sep 2005 03:27:18 -0400 (EDT)
  • Sender: owner-wri-mathgroup at wolfram.com

SubsetEqual is an 'operator' that has no predefined definition. But you
could make a definition, something like the following:

SubsetEqual[set1_List, set2_List] := Union[set1, set2] === set1

SubsetEqual[{1}, {1}]
True

SubsetEqual[{1, 2, 5, 7}, {5, 7, 7, 2, 1}]
True

SubsetEqual[{1, 2, 3}, {2, 4, 7}]
False


David Park
djmp at earthlink.net
http://home.earthlink.net/~djmp/


From: hawkmoon269 [mailto:rson at new.rr.com]
To: mathgroup at smc.vnet.net


I'm having some difficulty understanding the behaviour of the operators
for relations in sets in Mathematica.  For instance,

TrueQ[{1}\[SubsetEqual]{1}]

returns

False

I'm not getting what's going on here...

h



  • Prev by Date: Re: plots with variation of arbitrary constant
  • Next by Date: Re: plots with variation of arbitrary constant
  • Previous by thread: Re: Batch
  • Next by thread: Re: operators for relations in sets