Commit b0fa012
committed
Decompose Max/MinInterval to avoid CHOOSE in one-liner BY
THEOREM MaxInterval and THEOREM MinInterval in
FiniteSetsExtTheorems_proofs were both discharged by a single
BY DEF Max (resp. BY DEF Min)
After unfolding, the obligation contains the raw CHOOSE that defines
Max/Min, e.g.
(CHOOSE x \in a..b : \A y \in a..b : x >= y) = b
To close that in one shot, a backend has to reason about CHOOSE
uniqueness while simultaneously doing arithmetic on the interval a..b.
Zenon has very limited support for CHOOSE and reported "exhausted search
space" with the macOS arm64 build of TLAPS 1.6.0-pre, while another
bundled prover happened to find the proof on Linux. Either way, relying
on a CHOOSE-savvy backend for these two facts is fragile across tlapm
builds.
Rewrite both proofs to go through the existing MaxInt / MinInt
introduction rules of the same module, which already hide the CHOOSE
behind
ASSUME S \in SUBSET Int, x \in S, \A y \in S : x >= y
PROVE Max(S) = x
interface. Each new proof supplies the two trivial arithmetic side
conditions (b \in a..b and \A y \in a..b : b >= y, and the symmetric
pair for Min) so that no backend ever sees the CHOOSE.
All 419 obligations of FiniteSetsExtTheorems_proofs continue to check
locally with `tlapm --cleanfp`.
[Proofs]
Signed-off-by: Markus Alexander Kuppe <github.com@lemmster.de>1 parent 4d49b1f commit b0fa012
1 file changed
Lines changed: 10 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
550 | 550 | | |
551 | 551 | | |
552 | 552 | | |
553 | | - | |
| 553 | + | |
| 554 | + | |
| 555 | + | |
| 556 | + | |
| 557 | + | |
554 | 558 | | |
555 | 559 | | |
556 | 560 | | |
| |||
605 | 609 | | |
606 | 610 | | |
607 | 611 | | |
608 | | - | |
| 612 | + | |
| 613 | + | |
| 614 | + | |
| 615 | + | |
| 616 | + | |
609 | 617 | | |
610 | 618 | | |
611 | 619 | | |
| |||
0 commit comments