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

Re: [tlaplus] Checking or proving machine closure of a temporal formula



Thanks, Stephan. I am not very acquainted with reasoning using \EE and \AA (since, as you say, nothing really uses them) but what you have written makes sense. Basically at every index in every x-behavior we try to produce a witness y-behavior satisfying F whose prefix is that x-behavior up to the index being considered. Lamport does say we can do this in his Proving Possibility Properties paper, although doesn't state the formula:

Screenshot 2026-10-19 at 6.47.34 PM.png
What is a good resource for proof rules for \EE and \AA statements? Like given a proposition which uses \EE or \AA, what suffices as proof of that proposition?

Andrew Helwer

On Saturday, October 17, 2026 at 6:15:49 AM UTC-7 Stephan Merz wrote:
Hi Andrew,

I don’t know an elegant _expression_ of machine closure in TLA+, below is a clumsy way to express the closure of a given formula F. 

For notational simplicity, let’s assume that F contains a single (free) state variable x. I’ll write F(x) to make this explicit, and write F(y) for the formula F with y substituted for x. Let’s start by defining a couple of auxiliary formulas:

H(x,h) == h = << x >> /\ [][x’ # x /\ h’ = Append(h,x’)]_<<x,h>>

The variable h is a history variable that records the previous values of x. Note that both of the following are valid:

\AA x : \EE h : H(x,h)
F(x) <=> \EE h : F(x) /\ H(x,h)

Now we can define the machine closure of F(x) as the formula

CF(x) == \EE hx : 
   /\ H(x, hx)       \* record the values of x as hx
   /\ [](LET n == Len(hx)  \* fix the current length of the history
         IN  \EE y, hy :  \* find a new sequence y and history hy such that
             /\ F(y) /\ H(y,hy)   \* y satisfies F and agrees with x on all values up to step n
             /\ [](\A i \in 1 .. Min(n, Len(hy)) : hy[i] = hx[i]))

Note that, like F(x), CF(x) again has precisely one free state variable x. Now, F is machine closed iff

\AA x, hx : 
    CF(x) /\ H(x,hx) => 
    [](LET n == Len(hx)
       IN  \EE y, hy : F(y) /\ H(y,hy) /\ [](\A i \in 1 .. Min(n, Len(hy)) : hy[i] = hx[i]))

that is, any finite prefix of a behavior satisfying CF can be extended to some behavior satisfying F. Really, all these formulas do is mirror the semantic definitions of machine closure in TLA+, that’s why they are not really satisfactory.

Because no tool supports reasoning about \EE and \AA, I don’t see how to mechanically check machine closure of a formula.

What do you think?

Stephan 

On 17 Oct 2026, at 07:10, Andrew Helwer <andrew...@xxxxxxxxx> wrote:

All the proofs of machine closure of a temporal formula I've seen are written outside of TLA, talking about things like prefixes of behaviors and other such things that can't really be expressed inside TLA. So how do you:
1. State "formula F is machine-closed" as a proposition in TLA
2. Write a proof of that theorem using functionality available in TLAPS
3. Alternatively, model-check that F is machine closed over a finite model

Is it possible to do any of these things? Thanks!

Andrew Helwer

--
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...@xxxxxxxxxxxxxxxx.
To view this discussion visit https://groups.google.com/d/msgid/tlaplus/CABj%3DxUVOPq401185sHDHdbgkuZeagncnsTtw9265ZPVdE82MKA%40mail.gmail.com.

--
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 visit https://groups.google.com/d/msgid/tlaplus/0fddaf0c-5874-4bac-85d3-f91b0b9c45ebn%40googlegroups.com.