another simple theorem

18 views
Skip to first unread message

jack malkovick

unread,
Dec 1, 2022, 1:58:42 PM12/1/22
to tlaplus
How could I help TLAPS to prove this simple theorem?

THEOREM TT ==
    ASSUME
        NEW P(_), NEW Q(_)
    PROVE
        \A x : (P(x) # Q(x)) => (P(x) = ~Q(x))
    PROOF
        OBVIOUS

PS. it can prove with no problem the reverse implication
       \A x : (P(x) = ~Q(x)) => (P(x) # Q(x))

Stephan Merz

unread,
Dec 1, 2022, 2:29:02 PM12/1/22
to tla...@googlegroups.com
Hi,

I am glad that TLAPS doesn’t prove this because it’s wrong. As a simple counter-example consider

P(x) == 1
Q(x) == 2

Clearly, you have P(x) # Q(x) for any x but we do not expect to prove 1 = ~2.

What TLAPS should prove is

ASSUME NEW P(), NEW Q()
PROVE \A x : ~(P(x) <=> Q(x)) => (P(x) <=> ~Q(x))

Stephan

On 1 Dec 2022, at 19:58, jack malkovick <sillym...@gmail.com> wrote:


--
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/42656e1a-326f-4713-a373-4f639db81fdcn%40googlegroups.com.
Message has been deleted

jack malkovick

unread,
Dec 1, 2022, 2:44:42 PM12/1/22
to tlaplus
Ah... I supposed that P and Q will be predicates.
It this the canonical way to specify that P and Q are predicates?  

THEOREM TT ==
    ASSUME
        NEW P(_), NEW Q(_),
        \A x : P(x) \in {TRUE, FALSE} /\ Q(x) \in {TRUE, FALSE}
    PROVE
        \A x : (P(x) # Q(x)) => (P(x) = ~Q(x))
    PROOF
        OBVIOUS

Stephan Merz

unread,
Dec 1, 2022, 2:53:54 PM12/1/22
to tla...@googlegroups.com
Yes, you can also write … \in BOOLEAN. -s

On 1 Dec 2022, at 20:44, jack malkovick <sillym...@gmail.com> wrote:

Ah... I supposed that P and Q will be predicates.

jack malkovick

unread,
Dec 1, 2022, 2:58:15 PM12/1/22
to tlaplus
Right... silly me. Thank you!
Reply all
Reply to author
Forward
0 new messages