# Math Help - Set to Sequence

1. ## Set to Sequence

Hi all,

Give a sset, how can we convert that into a sequence? Like for example

set S = { 1, 2, 3, 4 }
seq S = < 1, 2, 3, 4 >

thanks

ssharish

2. ## Re: Set to Sequence

Originally Posted by ssharish
Give a sset
Is it a typo?

Originally Posted by ssharish
how can we convert that into a sequence?
There are many ways to convert a set into a sequence. For an n-element set, n! ways, to be precise. Note that {1, 2, 3, 4} = {4, 3, 2, 1} as sets. If a set A has n elements, then any injection {1, ..., n} -> A can be considered a sequence of elements of A.

3. ## Re: Set to Sequence

Thanks a lot emakarov for the reply.
Sorry yeah definitely that a typo. I do slip out of my typing now and then

So from what you’re saying can the following be considered as a sequence?

$\{ e:\{1,2,3,4\}|\exists n:\mathbb{N} \bullet n \mapsto e \}$

And of course $n \mapsto e$ is n injective function.

thanks

ssharish

4. ## Re: Set to Sequence

Originally Posted by ssharish
$\{ e:\{1,2,3,4\}|\exists n:\mathbb{N} \bullet n \mapsto e \}$

And of course $n \mapsto e$ is n injective function.
In regular mathematics, as opposed to type theory or programming, one uses ∈ instead of : . Next, the set {e ∈ {1,2,3,4} | ...} is just a subset of {1,2,3,4}, not a sequence.

The question is about the meaning of the question "how can we convert that [a set] into a sequence?" Do you mean conversion in some formal system or programming language? Do you mean some mathematical expression for a sequence? In this case, it is good to have a precise definition of a sequence. Otherwise, converting a set into a sequence informally is easy: choose the order of elements and change { } into < >.

5. ## Re: Set to Sequence

I certainly mean mathematical expression.

I'm involved in writing an function which gets just gets a set of elements from a set of relations.

So what I’m really doing is writing a axiomatic definition or a function which takes a set and returns a sequence.

I've already managed to get a set of elements which i will have to return it in terms of sequence. Hence the question.

thanks

ssharish

6. ## Re: Set to Sequence

>Next, the set {e ∈ {1,2,3,4} | ...} is just a subset of {1,2,3,4}, not a sequence.

And I also understand why use ∈ rather than ':'. I think thats how its been used in Z. Sorry about that. Although what i was doing there was a set comperhensin to create a set of mapletsto form a sequence given a set.

thanks a lot

ssharish