Skip to content

Commit a4939b2

Browse files
lemmyclaude
andcommitted
Name the previously-anonymous ASSUMEs in PaxosCommit and EWD687a
TLAPS' backends sometimes fail to find facts contributed by an unnamed ASSUME, so two of the proofs in this branch had been working around that by re-stating the spec's anonymous ASSUME under a fresh name inside the proof file (PaxosCommitAssumptions in transaction_commit/PaxosCommit_proof.tla and EdgeFacts in ewd687a/EWD687a_proof.tla). Move each name into the spec itself and drop the duplicates from the proof files. The conjuncts of each ASSUME are unchanged; only a name is attached. The named-ASSUME pattern is already used by sibling specs such as Paxos/Voting.tla and ewd840/EWD840.tla. Affected pairs: specifications/transaction_commit/PaxosCommit.tla + ASSUME PaxosCommitAssumptions == ... specifications/transaction_commit/PaxosCommit_proof.tla - duplicate restatement removed; existing references unchanged. specifications/ewd687a/EWD687a.tla + ASSUME EdgeFacts == ... specifications/ewd687a/EWD687a_proof.tla - duplicate restatement removed. (The third anonymous ASSUME in this branch -- in PaxosHowToWinATuringAward/Voting.tla -- is named in its own introducing commit. The auxiliary ASSUME ProcsFinite == IsFiniteSet(Procs) in EWD687a_proof.tla is *not* a restatement -- it is a genuinely new hypothesis added by the proof for the chain-of-upEdges argument -- and stays in the proof file.) Both proofs re-checked with TLAPS: - PaxosCommit_proof.tla: 5 obligations - EWD687a_proof.tla: 642 obligations Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com> Signed-off-by: Markus Alexander Kuppe <github.com@lemmster.de>
1 parent 7cfd223 commit a4939b2

4 files changed

Lines changed: 4 additions & 22 deletions

File tree

specifications/ewd687a/EWD687a.tla

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,8 @@ OutEdges(p) == {e \in Edges : e[1] = p}
123123
(* something that was not stated explicitly: that a process can't send *)
124124
(* messages to itself, so an edge joins two different processes. *)
125125
(***************************************************************************)
126-
ASSUME /\ \* Every edge is a pair of distinct processes
126+
ASSUME EdgeFacts ==
127+
/\ \* Every edge is a pair of distinct processes
127128
\A e \in Edges :
128129
/\ (e \in Procs \X Procs)
129130
/\ (e[1] # e[2])

specifications/ewd687a/EWD687a_proof.tla

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,6 @@
44
(***************************************************************************)
55
EXTENDS EWD687a, NaturalsInduction, FiniteSetTheorems, TLAPS
66

7-
-----------------------------------------------------------------------------
8-
(***************************************************************************)
9-
(* Re-state the (unnamed) ASSUME from EWD687a as a named assumption so we *)
10-
(* can refer to it by name in proofs. TLAPS does not currently expose *)
11-
(* unnamed ASSUMEs to backends. *)
12-
(***************************************************************************)
13-
ASSUME EdgeFacts ==
14-
/\ \A e \in Edges : (e \in Procs \X Procs) /\ (e[1] # e[2])
15-
/\ Leader \in Procs
16-
/\ InEdges(Leader) = {}
17-
187
-----------------------------------------------------------------------------
198
(***************************************************************************)
209
(* Theorem 1: Spec => CountersConsistent *)

specifications/transaction_commit/PaxosCommit.tla

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,8 @@ CONSTANT RM, \* The set of resource managers.
4444
Majority, \* The set of majorities of acceptors
4545
Ballot \* The set of ballot numbers
4646

47-
ASSUME \* We assume these properties of the declared constants.
47+
ASSUME PaxosCommitAssumptions ==
48+
\* We assume these properties of the declared constants.
4849
/\ Ballot \subseteq Nat
4950
/\ 0 \in Ballot
5051
/\ Majority \subseteq SUBSET Acceptor

specifications/transaction_commit/PaxosCommit_proof.tla

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,6 @@
1414
(***************************************************************************)
1515
EXTENDS PaxosCommit, TLAPS
1616

17-
(***************************************************************************)
18-
(* Pull the relevant facts out of the unnamed ASSUME in PaxosCommit.tla. *)
19-
(***************************************************************************)
20-
ASSUME PaxosCommitAssumptions ==
21-
/\ Ballot \subseteq Nat
22-
/\ 0 \in Ballot
23-
/\ Majority \subseteq SUBSET Acceptor
24-
/\ \A MS1, MS2 \in Majority : MS1 \cap MS2 # {}
25-
2617
THEOREM TypeOK_Init == PCSpec => PCTypeOK
2718
<1>1. PCInit => PCTypeOK
2819
BY PaxosCommitAssumptions DEF PCInit, PCTypeOK

0 commit comments

Comments
 (0)