Hi Mark,
Overall I find the learning curve for Metamath quite steep, but
David and others are really trying to make it more accessible. For
example, I find the "Conventions" page recently added by David is
a great resource. (http://us.metamath.org/mpeuni/conventions.html)
$[ set.mm $]
$c heredfinf $.cheredfinf $a class heredfinf $.
df-heredfinf $a |- heredfinf = ( n e. NN |-> if ( n = 0 , (/) , ~P ( heredfinf ` ( n - 1 ) ) ) ) $.
$( There are countably many hereditarily finite sets. $)
heredfinfct $p |- heredfinf ~~ om $=
? $.

100::fundmeng
100::fundmeng |- ( ( &C1 e. &C2 /\ Fun &C1 ) -> dom &C1 ~~ &C1 )It is sufficient to replace one of the "&C1" instances and to press CTRL-U again to get it automatically filled in. This is very practical, as it avoids syntax errors:
100::fundmeng |- ( ( heredfinf e. _V /\ Fun heredfinf ) -> dom heredfinf ~~ heredfinf )Of course we shall use our definition ~df-heredfinf, too: this goes the same way.
50:: |- heredfinf e. _VWhich I would prove using ~mptexg, ~funmpt, and ~dmmptg. : I go on filling in the blanks... For example, for step 90 here, ~funeqi is the last step I need.
90:: |- Fun heredfinf
150:: |- dom heredfinf ~~ om
df-heredfinf $a |- heredfinf = ( n e. NN |-> if ( n = 0 , (/) , ~P ( heredfinf ` ( n - 1 ) ) ) ) $.I've replaced the om, which is the set of ordinal numbers, by NN, which is the set of integer numbers, on which ( n - 1 ) is defined. (You would probably use something like ` suc n ` in a definition using the ordinals, for the successor of a number). This is mentioned in David's Conventions.
Well, after a lot of work/exploring documentation, I think I'm a bit closer to having the answers to my questions, but I still am missing a lot of basic info.
- A lot of info on Metamath 100 progress seems to be at "Metamath 100... would love to see more" in the google group, and there are spin-off discussions on Github it seems.
- I haven't really figured out how to use mmj2 yet. For writing a proof I think I could figure it out by loading the various tutorial mmp files in turn, but I'm not sure how I'd use it for definitions and such.
- However, I found that I can add lines to the bottom of my local set.mm file and get them to work if I mimic metamath.pdf and/or David Wheeler's videos very carefully.
- Right now, my workflow for figuring out how to type things is 1. google "metamath [object]" to find a theorem/definition [whatever] about the object 2. Use metamath.exe with the commands "read set.mm" and "show statement [whatever]" and figure out that, say, (/) is the empty set. Is there an easier way to find the ASCII inputs on the metamath website directly?
As a test, I tried to make a function that gives the nth level of the hereditarily finite sets, and I think metamath.exe says they don't have syntax errors, but I'm not certain they say what they should/if I'm breaking some important/useful convention, etc.
$c heredfinf $.cheredfinf $a class heredfinf $.
df-heredfinf $a |- heredfinf = ( n e. om |-> if ( n = 0 , (/) , ~P ( heredfinf n - 1 ) ) ) $.
1. "Area of a Circle" still hasn't been proven in Metamath. Is there a thread (either in this Google Group or on some other site/medium) for a collaboration on this? Did someone start working on it get stuck? Is there a cold trail of "here's what we'd need to do first to approach it"? Since this has already been done in other systems, is there a big obstacle to translating this to Metamath?
2. I might be interested in toying with building up some new stuff (e.g. some combinatorial game theory). On the practical level, how do I use the Metamath program and/or mmj2 to create and manage a tower of new definitions and theorems? Is there an easy tutorial/other documentation explaining how to approach this sort of thing? Do I just add lines to the set.mm on my machine?
Relatedly, what does it take to get a userbox and what is the use of one?
Well, after a lot of work/exploring documentation, I think I'm a bit closer to having the answers to my questions, but I still am missing a lot of basic info.
- A lot of info on Metamath 100 progress seems to be at "Metamath 100... would love to see more" in the google group, and there are spin-off discussions on Github it seems.
- I haven't really figured out how to use mmj2 yet. For writing a proof I think I could figure it out by loading the various tutorial mmp files in turn, but I'm not sure how I'd use it for definitions and such.
- However, I found that I can add lines to the bottom of my local set.mm file and get them to work if I mimic metamath.pdf and/or David Wheeler's videos very carefully.
- Right now, my workflow for figuring out how to type things is 1. google "metamath [object]" to find a theorem/definition [whatever] about the object
- 2. Use metamath.exe with the commands "read set.mm" and "show statement [whatever]" and figure out that, say, (/) is the empty set. Is there an easier way to find the ASCII inputs on the metamath website directly?
As a test, I tried to make a function that gives the nth level of the hereditarily finite sets, and I think metamath.exe says they don't have syntax errors, but I'm not certain they say what they should/if I'm breaking some important/useful convention, etc.
$c heredfinf $.cheredfinf $a class heredfinf $.
df-heredfinf $a |- heredfinf = ( n e. om |-> if ( n = 0 , (/) , ~P ( heredfinf n - 1 ) ) ) $.
Now on your definition:
I think what you've pasted below is still not syntactically correct. What you mean is probably something like:
df-heredfinf $a |- heredfinf = ( n e. NN |-> if ( n = 0 , (/) , ~P ( heredfinf ` ( n - 1 ) ) ) ) $.I've replaced the om, which is the set of ordinal numbers, by NN, which is the set of integer numbers, on which ( n - 1 ) is defined. (You would probably use something like ` suc n ` in a definition using the ordinals, for the successor of a number). This is mentioned in David's Conventions.
I've also corrected the function value : ( heredfinf ` ( n - 1 ) ) is the way to compute the value of the function ` heredfinf ` at the point ` ( n - 1 ) ` - note that here too, parenthesis are mandatory.
Finally, and this is probably the most important remark, which will make you write the definition completely differently, I suggest you follow David's advice on the conventions page about definition of recursive functions:
I suggest you also study the already existing class of transitive sets, "Tr", which is related with your hereditarily finite sets, and "Fin", the class of finite sets.
- Recursion. We define recursive functions using various "recursion constructors". These allow us to define, with compact direct definitions, functions that are usually defined in textbooks with indirect self-referencing recursive definitions. This produces compact definition and much simpler proofs, and greatly reduces the risk of creating unsound definitions. Examples of recursion constructors include recs(𝐹) in df-recs 6274, rec(𝐹, 𝐼) in df-rdg 6309, seq𝜔(𝐹, 𝐼) in df-seqom 6346, and seq𝑀( + , 𝐹) in df-seq 10925. These have characteristic function 𝐹 and initial value 𝐼. (Σg in df-gsum 13279 isn't really designed for arbitrary recursion, but you could do it with the right magma.) The logically primary one is df-recs 6274, but for the "average user" the most useful one is probably df-seq 10925- provided that a countable sequence is sufficient for the recursion.
Here you've got a choice to work at a higher level, with natural numbers and a definition using "seq", or at a lower level, where "Tr" is defined.