You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on May 23, 2023. It is now read-only.
Following #22, I renamed the module Sequences to Sequences_copy, and used it within other modules, in order to see whether the proofs hold in absence of the unprovable (and I believe invalid) assertion Len(x) \in Nat for the operator Len from the module Sequences, which seems to be builtin to TLAPS v1.4.3 (see also #22 (comment)).
The module FiniteSets instantiates Sequences, so I copied it to FiniteSets_copy, and instantiated the module Sequences_copy instead of Sequences.
I did similarly for the module FiniteSetTheorems_proofs. It turns out that TLAPS fails to check some proofs in the module FiniteSetTheorems_proofs after the above rearrangement. I had to refine those proofs in order for TLAPS to succeed. During this process, I encountered several cases where Isabelle (Isabelle2011-1: October 2011) never completed checking a proof until the proof was modified / refined, or Isabelle rejected proofs. I describe one case below.
Isabelle rejects the proof of step <1> QED in the module FiniteSetTheoremsDev below, which is:
Changing <1> HIDE DEF SZ, CS, fn to <1> HIDE DEF Size, SZ, CS, fn leads to Isabelle accepting the proof of that step.
I have added the directive Zenon to the proof of step <1> QED in order to ensure TLAPS uses the same backend under both cases, and thus demonstrate that Isabelle succeeds when Size is hidden. A comment in the module below gives more details.
In other words, with or without the directive Zenon, the output of TLAPS reads (invoked with tlapm -v -C --cleanfp FiniteSetTheoremsDev.tla):
(* trying obligation 1 generated from file "./FiniteSetTheoremsDev.tla", line 51, characters 5-6 *)
...
(* Obligation checking trace follows. *)
(* +1 +6 *)
Isabelle/TLA+ rejected the proof of obligation 1.
(With the directive present, the second obligation is indexed as 7, but obligation 1 is relevant to this issue, and remains the same.)
After hiding the definition of the operator Size, and with the directive Zenon present, the output is:
I had to make more changes in order for TLAPS to successfully check the proofs in FiniteSetTheorems_proofs when using the renamed Sequences module, but those changes are outside the scope of this issue.
--------------------- MODULEFiniteSetTheoremsDev ---------------------
(* Isabelle rejects the proof of <1> QED when DEF Size is not hidden. *)EXTENDSFiniteSets_copy,Sequences_copy,FunctionTheorems,WellFoundedInduction,TLAPSLEMMAFS_CountingElements==ASSUMENEWS,NEWn\inNat,ExistsBijection(1..n,S)PROVECardinality(S)=nPROOF<1>DEFINESize(T)==CHOOSEi\inNat:ExistsBijection(1..i,T)SZ==[T\inSUBSETS|->Size(T)]fn(CS,T)==IFT={}THEN0ELSE1+CS[T\{CHOOSEx:x\inT}]IsCS(CS)==CS=[T\inSUBSETS|->fn(CS,T)]CS==CHOOSECS:IsCS(CS)<1>HIDEDEFSZ,CS,fn<1>1. IsCS(SZ)<1>2. ASSUMENEWCS1,IsCS(CS1),NEWCS2,IsCS(CS2)PROVECS1=CS2<1>3. IsCS(CS)BY<1>1DEFCS<1>4. CS=SZBY<1>1,<1>2,<1>3<1>5. Cardinality(S)=CS[S]BYDEFCardinality,CS,fn,IsCS<1>6. S\inSUBSETSOBVIOUS<1>7. SZ[S]=Size(S)BY<1>6DEFSZ<1>8. Size(S)=n<2>1. /\n\inNat/\ExistsBijection(1..n,S)OBVIOUS<2>2. Size(S)=CHOOSEi\inNat:ExistsBijection(1..i,S)BYDEFSize<2>QEDBY<2>1,<2>2DEFSize<1>QEDBY<1>4,<1>5,<1>7,<1>8,Zenon(* The directive `Zenon` is used to ensure that TLAPS chooses the same backend both when the definition of `Size` is visible, as well as when it is hidden. Otherwise, TLAPS on its own switches from Zenon to SMT when `Size` is hidden, which doesn't produce any proof, so it wouldn't demonstrate that Isabelle succeeds when `Size` is hidden. *)
=============================================================================
The text was updated successfully, but these errors were encountered:
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Following #22, I renamed the module
Sequences
toSequences_copy
, and used it within other modules, in order to see whether the proofs hold in absence of the unprovable (and I believe invalid) assertionLen(x) \in Nat
for the operatorLen
from the moduleSequences
, which seems to be builtin to TLAPS v1.4.3 (see also #22 (comment)).The module
FiniteSets
instantiatesSequences
, so I copied it toFiniteSets_copy
, and instantiated the moduleSequences_copy
instead ofSequences
.https://github.com/tlaplus/v2-tlapm/blob/12a046f21d0be1c057167d7a8a0f95ce22efb8c3/library/FiniteSets.tla#L3
I did similarly for the module
FiniteSetTheorems_proofs
. It turns out that TLAPS fails to check some proofs in the moduleFiniteSetTheorems_proofs
after the above rearrangement. I had to refine those proofs in order for TLAPS to succeed. During this process, I encountered several cases where Isabelle (Isabelle2011-1: October 2011) never completed checking a proof until the proof was modified / refined, or Isabelle rejected proofs. I describe one case below.Isabelle rejects the proof of step
<1> QED
in the moduleFiniteSetTheoremsDev
below, which is:https://github.com/tlaplus/v2-tlapm/blob/12a046f21d0be1c057167d7a8a0f95ce22efb8c3/library/FiniteSetTheorems_proofs.tla#L226
Changing
<1> HIDE DEF SZ, CS, fn
to<1> HIDE DEF Size, SZ, CS, fn
leads to Isabelle accepting the proof of that step.I have added the directive
Zenon
to the proof of step<1> QED
in order to ensure TLAPS uses the same backend under both cases, and thus demonstrate that Isabelle succeeds whenSize
is hidden. A comment in the module below gives more details.In other words, with or without the directive
Zenon
, the output of TLAPS reads (invoked withtlapm -v -C --cleanfp FiniteSetTheoremsDev.tla
):(With the directive present, the second obligation is indexed as 7, but obligation 1 is relevant to this issue, and remains the same.)
After hiding the definition of the operator
Size
, and with the directiveZenon
present, the output is:I had to make more changes in order for TLAPS to successfully check the proofs in
FiniteSetTheorems_proofs
when using the renamedSequences
module, but those changes are outside the scope of this issue.The text was updated successfully, but these errors were encountered: