[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

*From*: Stephan Merz <stephan.merz@xxxxxxxxx>*Date*: Tue, 20 Oct 2020 18:56:54 +0200*References*: <777d286f-858b-42c2-ac89-1d2eac77f01en@googlegroups.com> <B6601963-34E5-412A-BAB2-3CBEEEC0B736@gmail.com> <8e33ff4b-097b-43a8-b58a-e35010782ae2n@googlegroups.com>

Thanks for the explanations. This operator (I renamed it to Shuffle for lack of a better name) could be defined as follows. Range(f) == {f[x] : x \in DOMAIN f} (***************************************************************************) (* If Sets is a set of (non-empty) sets then Choice(Sets) is the set of *) (* all choice functions over Sets, that is, functions that associate some *) (* with every set in Sets. *) (***************************************************************************) Choice(Sets) == { f \in [Sets -> UNION Sets] : \A S \in Sets : f[S] \in S } (***************************************************************************) (* Compute all sets that contain one element from each of the input sets: *) (* Shuffle({{1,2}, {3,4}, {5}}) = {{1,3,5}, {1,4,5}, {2,3,5}, {2,4,5}} *) (***************************************************************************) Shuffle(Sets) == { Range(f) : f \in Choice(Sets) } Regards, Stephan
You received this message because you are subscribed to the Google Groups "tlaplus" group. To unsubscribe from this group and stop receiving emails from it, send an email to tlaplus+unsubscribe@xxxxxxxxxxxxxxxx. To view this discussion on the web visit https://groups.google.com/d/msgid/tlaplus/D6B92ECC-5325-4ADA-99BA-59CC601B9260%40gmail.com. |

**Follow-Ups**:**Re: [tlaplus] n-ary Cartesian product***From:*Mariusz Ryndzionek

**References**:**[tlaplus] n-ary Cartesian product***From:*Mariusz Ryndzionek

**Re: [tlaplus] n-ary Cartesian product***From:*Stephan Merz

**Re: [tlaplus] n-ary Cartesian product***From:*Mariusz Ryndzionek

- Prev by Date:
**Re: [tlaplus] n-ary Cartesian product** - Next by Date:
**Re: [tlaplus] n-ary Cartesian product** - Previous by thread:
**Re: [tlaplus] n-ary Cartesian product** - Next by thread:
**Re: [tlaplus] n-ary Cartesian product** - Index(es):