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

*From*: Jam <wawrzynchonewicz@xxxxxxxxx>*Date*: Sat, 20 Apr 2019 07:26:49 -0700 (PDT)*References*: <ec8df666-5129-4c3d-a2f5-c7ccb8b0c2da@googlegroups.com> <d9af7387-c0b7-4799-aa4f-94702a176c82@googlegroups.com> <ae6f2491-7463-411f-a286-1a66a9f476d2@Spark>

Hi, thanks for the answer! I haven't been able to get your solution to work, and I don't know hot to troubleshoot it yet. I have decided to abandon this part of the model for simplicity. I hope you didn't spend too much time on this! I will take another look at it after i get more familiar with recursive actions.

On Friday, April 19, 2019 at 12:12:07 AM UTC+2, Steve Glaser wrote:

-- On Friday, April 19, 2019 at 12:12:07 AM UTC+2, Steve Glaser wrote:

I think you want something like:

RECURSIVEunion_set2(_, _)

union_set2(x, y) ==

IFx = {}

THENy

ELSECHOOSEa \in x :

IF\E b \in y :UNIONa =UNIONb

THENunion_set2(x \ a, y)

ELSEunion_set2(x \ a, y \cup {a})

union_set(x) == union_set2(x, {})

On Apr 18, 2019, 3:01 PM -0700, Leslie Lamport <tlap...@xxxxxxxxx>, wrote:

--In constructing the second set, you have removed from s the element {{3}, {2,4}} the union of the elements of that set is the set {2,3,4}. That set is not in s, since s has no 3-element sets, so it does not satisfy your condition for an element to be removed from s. Therefore, what you have written makes no sense to me.You seem to want to define an operator Op such that Op(s) equals the second set. By talking about "removing elements", I presume you meant that Op(s) should be a subset of s. Hence, I believe that the definition you want should be expressible asOp(t) == CHOOSE u \in SUBSET t : P(t, u)for some formula P(t, u). This definition of Op may not satisfy you because to evaluate it, TLC must compute all elements of SUBSET t and evaluate P(t,u) for all the elements u of SUBSET t until it finds one that evaluates to TRUE. However, it will at least tell people what operator Op you want.

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 tla...@googlegroups.com .

To post to this group, send email to tla...@xxxxxxxxxxxxxxxx.

Visit this group at https://groups.google.com/group/tlaplus .

For more options, visit https://groups.google.com/d/optout .

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 post to this group, send email to tlaplus@xxxxxxxxxxxxxxxx.

Visit this group at https://groups.google.com/group/tlaplus.

For more options, visit https://groups.google.com/d/optout.

**References**:**[tlaplus] Removing "equivalents" from a set***From:*Jam

**[tlaplus] Re: Removing "equivalents" from a set***From:*Leslie Lamport

**Re: [tlaplus] Re: Removing "equivalents" from a set***From:*sglaser

- Prev by Date:
**[tlaplus] Re: Removing "equivalents" from a set** - Next by Date:
**[tlaplus] Re: When TLC error trace send with stuttering - what does this mean?** - Previous by thread:
**Re: [tlaplus] Re: Removing "equivalents" from a set** - Next by thread:
**[tlaplus] Re: Removing "equivalents" from a set** - Index(es):