EWD998: close the nine lemmas that were stated without proof - #218
Conversation
EWD998_proof.tla asserted nine lemmas with no proof. Steps carrying no proof generate no obligation, so tlapm reported "All 807 obligations proved" and exited 0, and `--strict` (tlaplus/tlapm#278) exits 11. The six FoldFunctionOnSet* lemmas are now imported from FunctionTheorems, where they are proved. SumIsInt, SumIsNat and SumEqual get structured proofs on top of them, using FS_Subset to carry finiteness from Node to the index set. SumIterate and SumUnion do not go through that way: TLAPS cannot instantiate the second-order op(_,_) against the LAMBDA in Sum. They are proved instead from MapThenSumSetAddElement and MapThenSumSetDisjointUnion in FiniteSetsExtTheorems, whose operator is unary, and which coincide with Sum once the definitions are unfolded. Functions.tla gains SumFunctionOnSet and SumFunction, which FunctionTheorems requires and the vendored copy predates. With tlapm 1.6.0-pre: 851 obligations, all proved, `--strict` exit 0. Runtime rose from roughly one minute to a minute and a half locally, so maxRuntimeMinutes goes from 2 to 4. Signed-off-by: Vasilis Nasopoulos <vasilis_nasopoulos@hotmail.com>
muenchnerkindl
left a comment
There was a problem hiding this comment.
Thanks a lot for this quick fix! I only have two suggestions on removing operators that now have become irrelevant and on removing the local copy of the Functions module, which seems irrelevant.
NB: The BagsExt module is also part of the Community Modules. Also note that EWD998PCal_proof.tla contains a theorem whose proof is OMITTED, but this is documented in a comment.
| BY <2>1, <2>2, <2>3, <2>4, <2>5, <2>6 DEF Environment, Next, System | ||
| <1>. QED BY <1>1, <1>2, PTL | ||
|
|
||
| (***************************************************************************) |
There was a problem hiding this comment.
If I am not mistaken, these operators aren't used anywhere in this module. If that is indeed so, I suggest removing what follows up until LEMMA PlusACI, except for lemma NodeIsFinite, which is indeed required.
| (* \vspace{12pt}}^' *) | ||
| (***************************************************************************) | ||
|
|
||
| EXTENDS Integers |
There was a problem hiding this comment.
Since this is a subset of module Functions of the Community Modules, I suggest removing this copy of the module: we anyway import some of the Community Modules, and there is no reason to have a local copy here. (This is probably historical: the module originated from within the TLAPS distribution and was later migrated to the Community Modules and subsequently extended.)
…ators Functions.tla here was a subset of the Community Modules version, which is already on the include path, so the local copy is removed. IsAssociativeOn, IsCommutativeOn and IsIdentityOn were only there to state PlusACI, and PlusACI is no longer referenced now that the fold lemmas come from FunctionTheorems. All four are removed; NodeIsFinite stays. 850 obligations, all proved, --strict exit 0. Signed-off-by: Vasilis Nasopoulos <vasilis_nasopoulos@hotmail.com>
|
Both applied, thank you.
On the operators: 850 obligations, all proved, Also confirming your two notes, now that I have |
muenchnerkindl
left a comment
There was a problem hiding this comment.
Thanks, all looks good to me! Merging into master.
The module was removed in the previous commit but its manifest entry was left behind, so check_manifest_files.py failed on every platform. Signed-off-by: Vasilis Nasopoulos <vasilis_nasopoulos@hotmail.com>
|
Sorry, that was my fault: I removed I reproduced the check locally this time — both |
Follow-up to the discussion in tlaplus/CommunityModules#128.
EWD998_proof.tlastates nine lemmas with no proof at all. Steps carrying no proof generate no obligation, sotlapmreports All 807 obligations proved and exits 0 — while--strict(tlaplus/tlapm#278) exits 11. This closes all nine.The six
FoldFunctionOnSet*lemmas are removed and imported fromFunctionTheorems, where they are proved. Their statements are the same up to generalisation; the community versions have weaker hypotheses.SumIsInt,SumIsNat,SumEqualget structured proofs on top of those, usingFS_Subsetto carry finiteness fromNodedown to the index set — which is what the oldBYlines were missing.SumIterateandSumUniondo not go through that route. TLAPS cannot instantiate the second-orderop(_,_)against theLAMBDA x1, x2 : x1 + x2insideSum; the file already carried commented-out attempts marked(* fails *). They are proved instead fromMapThenSumSetAddElementandMapThenSumSetDisjointUnioninFiniteSetsExtTheorems, whose operator is unary, and which coincide withSumonce the definitions are unfolded. Thanks to @muenchnerkindl for the pointer.Functions.tlagainsSumFunctionOnSetandSumFunction(10 added lines, nothing removed).FunctionTheoremsneeds them and the vendored copy predates them.manifest.json:maxRuntimeMinutes2 → 4. Locally the module went from about a minute to 1m33s with--stretch 5on a cold cache.Result
--strictexitVerified with
tlapm 1.6.0-pre(4600b24), invoked as the CI does:AsyncTerminationDetection_proof.tlain the same directory is unaffected (exit 0, 30 obligations).EWD998PCal_proof.tlafails for me withUnknown module "BagsExt"both before and after this change, so that is my include path rather than anything here.