# Tuple definition and iteration of sets

• Apr 28th 2011, 06:17 AM
CT2011
Tuple definition and iteration of sets
Hi,

I wonder if someone would like to give a tip or two on these topics...so here goes. :)

1. I want to define a tuple of three sets where one set can possibly be empty. How can I describe this?

2. I wonder how to apply a function to all elements of a set.

3. How can I specify that the legal type of argument to the function 'iterate' is all kind of sets (or eventually a special kind of sets)? That is, how do I specify the type of argument of a function?

Please see the description here: Zippyshare.com
(Latex or picture upload on this forum doesn't work at the moment.)
• Apr 29th 2011, 02:15 PM
MoeBlee
1. What do you mean? Do you mean to define <x y z> where any of x, y, or z might be empty?

This is simple:

<x y> = {{x} {x y}}

<x y z> = <<x y> z>

That any of x, y, or z might be empty is irrelevant.

2. What do you mean? Given a set S and a function f, it might or might not be the case that S is a subset of the domain of f.

3. I don't know what function 'iterate' you have in mind.
• May 2nd 2011, 01:16 AM
CT2011
Quote:

Originally Posted by MoeBlee
1. What do you mean? Do you mean to define <x y z> where any of x, y, or z might be empty?

This is simple:

<x y> = {{x} {x y}}

<x y z> = <<x y> z>

That any of x, y, or z might be empty is irrelevant.

2. What do you mean? Given a set S and a function f, it might or might not be the case that S is a subset of the domain of f.

3. I don't know what function 'iterate' you have in mind.

Thanks for taking the time to give a reply to this. I see that my initial description was kinda confusing. Regarding 3.: obviously the types of arguments a function can be applied on is specified explicitly like f : X x Y -> Z. That was basically what I was after.