proving a property of some predefined set item

23 views
Skip to first unread message

Алексей Тимаков

unread,
Feb 16, 2022, 4:22:11 PM2/16/22
to tlaplus

Hi all.
I'm a newbie on TLAPS and need some help.
Can not manage to prove a simple fact

LEMMA LEM1 ==  ASSUME NEW S1, NEW S2,
                      NEW Set \in SUBSET {<<x, y>> : x \in S1, y \in S2},
                      NEW p \in Set
                      PROVE  p[1] \in S1
               OBVIOUS

Set of tuples is not supported.

However

LEMMA LEM2 ==  ASSUME NEW S1,
                      NEW Set \in SUBSET {x : x \in S1},
                      NEW p \in Set
                      PROVE  p \in S1
               OBVIOUS

works.

Should we accept LEMMA1 as an axiom?


Thanks in advance.

Stephan Merz

unread,
Feb 17, 2022, 2:32:39 AM2/17/22
to tla...@googlegroups.com
Hello,

tuple declarations will soon be supported, apologies for the long wait!

However, in your example, they are unnecessary: you can simply write

LEMMA LEM1 ==  ASSUME NEW S1, NEW S2,
                      NEW Set \in SUBSET (S1 \X S2),

                      NEW p \in Set
                      PROVE  p[1] \in S1
               OBVIOUS

which is equivalent, and proved.

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+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/tlaplus/27027cc2-b30b-4efa-a6bd-7dee86f8235bn%40googlegroups.com.

Алексей Тимаков

unread,
Feb 18, 2022, 10:29:31 AM2/18/22
to tlaplus
Hi. Thanks a lot. I will use ASSUME for a while. The example i provided is a simplified version of a real one ).

четверг, 17 февраля 2022 г. в 10:32:39 UTC+3, Stephan Merz:

Stephan Merz

unread,
Feb 18, 2022, 11:07:21 AM2/18/22
to tla...@googlegroups.com
The general transformation is to write

{ e(p[1], p[2]) : p \in S \X T }  instead of  { e(x,y) : x \in S, y \in T }

for a fresh identifier p.

Hope this helps,
Stephan


Reply all
Reply to author
Forward
0 new messages