Skip to content

Commit 0b3cfde

Browse files
Fixing broken proof in LearnProofs/FindHighest (#158)
fixed (and simplified) proof of FindHighest Signed-off-by: Stephan Merz <[email protected]>
1 parent 04b80a1 commit 0b3cfde

File tree

1 file changed

+5
-25
lines changed

1 file changed

+5
-25
lines changed

specifications/LearnProofs/FindHighest.tla

+5-25
Original file line numberDiff line numberDiff line change
@@ -139,32 +139,12 @@ Correctness ==
139139
pc = "Done" =>
140140
\A idx \in DOMAIN f : f[idx] <= h
141141

142+
\* Correctness is implied by the preceding invariants.
142143
THEOREM IsCorrect == Spec => []Correctness
143-
PROOF
144-
<1>a. Init => Correctness
145-
BY DEF Init, Correctness
146-
<1>b. Correctness /\ UNCHANGED vars => Correctness'
147-
BY DEF Correctness, vars
148-
<1>c. /\ Correctness
149-
/\ InductiveInvariant'
150-
/\ DoneIndexValue'
151-
/\ Next
152-
=> Correctness'
153-
<2>a. Correctness /\ Terminating => Correctness'
154-
BY DEF Correctness, Terminating, vars
155-
<2>b.
156-
/\ Correctness
157-
/\ InductiveInvariant'
158-
/\ DoneIndexValue'
159-
/\ lb
160-
=> Correctness'
161-
BY DEFS Correctness, InductiveInvariant, DoneIndexValue, lb
162-
<2> QED BY <2>a, <2>b DEF Next
163-
<1> QED
164-
BY
165-
<1>a, <1>b, <1>c,
166-
InductiveInvariantHolds, DoneIndexValueThm, PTL
167-
DEF Spec
144+
<1>1. TypeOK /\ InductiveInvariant /\ DoneIndexValue => Correctness
145+
BY DEF TypeOK, InductiveInvariant, DoneIndexValue, Correctness
146+
<1>. QED
147+
BY <1>1, TypeInvariantHolds, InductiveInvariantHolds, DoneIndexValueThm, PTL
168148

169149
=============================================================================
170150

0 commit comments

Comments
 (0)