Closed metakunt closed 6 months ago
Your first code block shows a theorem by the name of syllogism
, but you are proving a different theorem, prodsplit
. mmj2 uses some information regarding the positioning of a theorem in context so I don't recommend writing the theorem signature directly in mmj2. Instead, first create the theorem signature in the mm file but put ... $= ? $.
for the proof, then load the mm file and open the theorem in mmj2; do the proof there, without changing the header line (and mmj2 will enforce that the hypotheses and QED step match what is in the mm file).
Generation of new theorems directly from mmj2 doesn't quite work correctly; you can see ( syllogism.1 ...
appearing in the compressed proof but those hypotheses (1) shouldn't show up in compressed proofs and (2) don't exist in the first place because the theorem is called prodsplit
, not syllogism
, so the resulting proof will not check.
How do I do that? I have never used a mm file before and I couldn't find good documentation that explains the basics.
The easiest I've found was to somehow get mmj2 running. So far I've copy pasted all proofs back to the main set.mm file.
That also explains why I could likely just copy paste a proof without hypotheses.
Would this be a mm file?
${
prodsplit.1 $e |- ( ph -> M e. ZZ ) $.
prodsplit.2 $e |- ( ph -> N e. ZZ ) $.
prodsplit.3 $e |- ( ph -> M <_ N ) $.
prodsplit.4 $e |- ( ph -> K e. NN ) $.
prodsplit.5 $e |- ( ( ph /\ k e. ( M ... ( N + K ) ) ) -> A e. CC ) $.
prodsplit $p |- ( ph ->
( prod_ k e. ( M ... N ) A x. prod_ k e. ( ( N + 1 ) ... ( N + K ) ) A )
= prod_ k e. ( M ... ( N + K ) ) A ) $=
$}
And if so, how do I load it into mmj2. I've tried to name the file prodsplit.mm and prodsplit.mmp. But the first one didn't load and the second one just looked really weird in mmj2
Yes, that is what the theorem statement would look like, except that you did not close the statement, you need to add ? $.
after the $=
. (Normally there would also be a comment before the statement.) The easiest way to get all the fiddly details right is to just copy and paste from another statement in set.mm .
To load a database (which is needed for mmj2 to work at all), you need to specify the path to the file in the RunParms.txt
. See https://github.com/digama0/mmj2/blob/master/quickstart.md .
Yeah, I still don't know what I need to do to do import a file in mmj2.
First if the file is wrong, what is missing. So far I have understood that ? $. is missing. So this file should work
${
prodsplit.1 $e |- ( ph -> M e. ZZ ) $.
prodsplit.2 $e |- ( ph -> N e. ZZ ) $.
prodsplit.3 $e |- ( ph -> M <_ N ) $.
prodsplit.4 $e |- ( ph -> K e. NN ) $.
prodsplit.5 $e |- ( ( ph /\ k e. ( M ... ( N + K ) ) ) -> A e. CC ) $.
prodsplit $p |- ( ph ->
( prod_ k e. ( M ... N ) A x. prod_ k e. ( ( N + 1 ) ... ( N + K ) ) A )
= prod_ k e. ( M ... ( N + K ) ) A ) $= ? $.
$}
i've tried, this is how it looks and I am doing something wrong. I did specify the database in RunParms.txt This is my RunParms.txt
LoadFile,set.mm
VerifyProof,*
Parse,*
ProofAsstUnifySearchExclude,biigb,xxxid,dummylink
ProofAsstProofFolder,myproofs
TheoremLoaderMMTFolder,myproofs
ProofAsstDeriveAutocomplete, yes
ProofAsstUseAutotransformations, yes,no,yes
RunProofAsstGUI
RunMacro,definitionCheck,ax-*,df-bi,df-clab,df-cleq,df-clel
*done
And this is my script to start mmj2
java -Xms128M -Xmx2048M -jar mmj2.jar RunParms.txt Y "" d:\metamath\set.mm ""
It points to the correct, and only, set.mm database I have on my disk.
Or do you mean that I have to put the incomplete theorem in set.mm and work the proof from there?
Or do you mean that I have to put the incomplete theorem in set.mm and work the proof from there?
Yes. Go to the place in set.mm where you would like your theorem to live eventually (e.g. in your mathbox), add the theorem, and then start up mmj2 pointing to your copy of set.mm. Then use the navigation commands in mmj2 to open the "prodsplit" theorem, and it will create a worksheet for the theorem which you can then edit as normal. Most likely you can just copy the proof steps from the first version at that point, and mmj2 will generate the completed proof on a line starting with $=
, which you then copy back into set.mm, replacing the ?
.
It worked. Thank you very much.
I have tried to use mmj2 for proofs. So far so good. But in the morning it generates me wrong proofs that give issues when i try to import the results into set.mm.
And here is the metamath output
This is how I converted the proof to metamath
This is the second proof that's broken. And I have no clue what is the cause. Another broken proof is found in https://github.com/metamath/set.mm/pull/3939 I'd hope to know why it breaks so I can avoid it in the future. MMJ2 seems to output a proof, so I'd hope that works.