1. I accept that I am under the control of a higher power (Muppet).

Set notation confusing

S = { (x,y) E R^2 : a <= x <= b, 0 <= y <= f(x) }

(E = epsilon symbol)

OK, what?

It sort of resembles a list comprehension in Python, but I can't exactly map it 1:1.

S = [ x,y for x,y in ratsqs(): (a <= x <= b) and (0 <= y <= f(x)) ]

def ratsqs():
    for r in all_rational_numbers():
        yield r,(r*r)

What am I misunderstanding?
Permalink Michael B 
March 7th, 2007 6:06pm
E isn't actually epsilon, it is "member of" or "belonging to".

Read it like this:

"S is the set of all pairs of numbers (x,y) belonging to the set of all pairs of real numbers, where a <= x <= b, and 0 <= y <= f(x)"
Permalink Send private email bon vivant 
March 7th, 2007 6:16pm
Maybe "found in" is more apt than "belonging to".
Permalink Send private email bon vivant 
March 7th, 2007 6:22pm
So, erhm..

Other symbols which seem to appear interchangeably inside of curly brackets are the | and : and ,

They're not really defined either.

Programming is so much easier. ;)
Permalink Michael B 
March 7th, 2007 6:24pm
: means "such that"
, means "and"

| I don't see anywhere...?
Permalink Send private email bon vivant 
March 7th, 2007 6:30pm
http://en.wikipedia.org/wiki/Set-builder_notation

Note: While Python's list comprehension works similarly to set-builder notation, it does not denote a set but rather creates a mathematical tuple (as opposed to Python's native tuple datatype; the actual returned value's type is list) based on existing tuples. It is possible to use true sets in Python with the set keyword and set class, but this causes additional deviations from set-builder notation:

    * set(l for l in L)
    * set((k, x) for k in K for x in X if P(x))
Permalink Send private email strawberry snowflake 
March 7th, 2007 6:44pm
Oh neat, this helps a lot.  Thank you!

There's no | in that example, but I have seen it in set comprehensions.

e.g.

S = {x E N | x mod 2 = 0}

is supposed to be 'The set S consists of x "found in" all natural numbers "such that" x mod 2 = 0'?  End result is S is all even natural numbers.

Is | the same as : ?
Permalink Michael B 
March 7th, 2007 9:44pm
Yes, it does seem that | is the same as :.
Permalink Send private email bon vivant 
March 7th, 2007 9:46pm
Such is life. Or "∃ x | x is life".
Permalink Send private email strawberry snowflake 
March 7th, 2007 9:56pm
as an opposite of ∀, i did a really good job finding this sucker to copy/paste..
Permalink  
March 7th, 2007 11:03pm
The forum allows html entities?

&#917;
Permalink Michael B 
March 8th, 2007 1:16am
:(
Permalink Michael B 
March 8th, 2007 1:17am
> Maybe "found in" is more apt than "belonging to".

"Element of" is how I remember it.
Permalink  
March 8th, 2007 6:03am

This topic is archived. No further replies will be accepted.

Other topics: March, 2007 Other topics: March, 2007 Recent topics Recent topics