Skip to content

EWD998: close the nine lemmas that were stated without proof - #218

Open
vasilisnasopoulos-stack wants to merge 1 commit into
tlaplus:masterfrom
vasilisnasopoulos-stack:ewd998-close-proof-gaps
Open

EWD998: close the nine lemmas that were stated without proof#218
vasilisnasopoulos-stack wants to merge 1 commit into
tlaplus:masterfrom
vasilisnasopoulos-stack:ewd998-close-proof-gaps

Conversation

@vasilisnasopoulos-stack

Copy link
Copy Markdown

Follow-up to the discussion in tlaplus/CommunityModules#128.

EWD998_proof.tla states nine lemmas with no proof at all. Steps carrying no proof generate no obligation, so tlapm reports 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 from FunctionTheorems, where they are proved. Their statements are the same up to generalisation; the community versions have weaker hypotheses.

SumIsInt, SumIsNat, SumEqual get structured proofs on top of those, using FS_Subset to carry finiteness from Node down to the index set — which is what the old BY lines were missing.

SumIterate and SumUnion do not go through that route. TLAPS cannot instantiate the second-order op(_,_) against the LAMBDA x1, x2 : x1 + x2 inside Sum; the file already carried commented-out attempts marked (* fails *). They are proved instead from MapThenSumSetAddElement and MapThenSumSetDisjointUnion in FiniteSetsExtTheorems, whose operator is unary, and which coincide with Sum once the definitions are unfolded. Thanks to @muenchnerkindl for the pointer.

Functions.tla gains SumFunctionOnSet and SumFunction (10 added lines, nothing removed). FunctionTheorems needs them and the vendored copy predates them.

manifest.json: maxRuntimeMinutes 2 → 4. Locally the module went from about a minute to 1m33s with --stretch 5 on a cold cache.

Result

before after
lemmas stated without proof 9 0
--strict exit 11 0
obligations 807 851, all proved

Verified with tlapm 1.6.0-pre (4600b24), invoked as the CI does:

tlapm --strict specifications/ewd998/EWD998_proof.tla -I <community> --stretch 5

AsyncTerminationDetection_proof.tla in the same directory is unaffected (exit 0, 30 obligations). EWD998PCal_proof.tla fails for me with Unknown module "BagsExt" both before and after this change, so that is my include path rather than anything here.

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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant