Skip to content

Commit 8c9e519

Browse files
authored
CONTRIBUTING.md: fix URLs, fix .md syntax, some rewrapping and minor rephrasing (#3603)
1 parent 1f81415 commit 8c9e519

File tree

1 file changed

+97
-109
lines changed

1 file changed

+97
-109
lines changed

CONTRIBUTING.md

Lines changed: 97 additions & 109 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,12 @@ meet those criteria when creating a contribution.
1818

1919
First, take a look at some existing proofs.
2020
Walking through the
21-
[Metamath Proof Explorer (MPE, aka set.mm)](http://us.metamath.org/mpeuni/mmset.html) is a good way to start.
21+
[Metamath Proof Explorer (MPE, aka set.mm)](https://us.metamath.org/mpeuni/mmset.html) is a good way to start.
2222

2323
To create a proof, you need to pick a tool.
2424
The Metamath system specifies a common file format, not a single tool
2525
everyone has to use.
26-
Many in the community use the [mmj2 tool](http://us.metamath.org#mmj2), and
26+
Many in the community use the [mmj2 tool](https://us.metamath.org#mmj2), and
2727
many of the rest use the original metamath C program (aka "metamath.exe").
2828
A third option is the [metamath-lamp tool](https://lamp-guide.metamath.org/),
2929
which can be accessed directly from your web browser at
@@ -39,7 +39,7 @@ to watch it, there's a video giving a
3939
You should start small and try to reprove what's already
4040
proven with Metamath before you try to prove something new.
4141
If you're contributing to set.mm or iset.mm, take a look at its
42-
[conventions and style](http://us.metamath.org/mpeuni/conventions.html).
42+
[conventions and style](https://us.metamath.org/mpeuni/conventions.html).
4343

4444
At some point you should join the
4545
[Metamath mailing list](https://groups.google.com/g/metamath).
@@ -48,30 +48,28 @@ If you're seriously working on proofs, we'd love to help you get started!
4848
For contributing a final proof once you have one,
4949
you'll basically create a "pull request" on GitHub to request
5050
merging of some change(s) into the corresponding Git repository.
51-
**Warning**: Changes are made to the **develop** branch.
51+
**Warning:** Changes are made to the **develop** branch.
5252
The Wiki page
5353
[Getting started with contributing](https://github.com/metamath/set.mm/wiki/Getting-started-with-contributing)
5454
will walk you through the process of contributing a final proof once you have one.
5555

56-
**NOTE**: Any proposed contribution must be licensed under the
56+
**NOTE:** Any proposed contribution must be licensed under the
5757
[Creative Commons 0 (CC0) License](LICENSE), so any proposed contribution
5858
is automatically licensed as such.
5959

6060
## Formatting recommendation prior to submitting a pull request
6161

62-
On pull requests we check that set.mm and iset.mm have been rewrapped to
63-
help conform to their formatting conventions.
62+
On pull requests, we check that `set.mm` and `iset.mm` have been rewrapped to
63+
help conform to their formatting conventions. You may run the script
64+
`scripts/rewrap set.mm` to make sure your pull request passes this check.
6465

65-
Locally you will need to run `scripts/rewrap set.mm` to avoid failing this
66-
check.
66+
If you prefer to run `metamath.exe` directly rather than via `scripts/rewrap`,
67+
the following commands should do the same thing, and/or help you detect other
68+
problems before submission. If you want, you can just leave it up to the
69+
automated verification checks and worry about rewrapping and the other checks
70+
only if and when something fails.
6771

68-
If you prefer to run metamath yourself rather than via `scripts/rewrap`,
69-
the following commands should do the same thing, and/or help you detect
70-
other problems before submission. But if you want you can just leave it up to
71-
the automated verification checks and worry about rewrapping and the
72-
others if and when something fails.
73-
74-
<PRE>
72+
```bash
7573
./metamath
7674
MM> read set.mm
7775
MM> write source set.mm /rewrap
@@ -82,149 +80,139 @@ MM> verify markup */file_skip/top_date_skip
8280
MM> verify proof *
8381
MM> write source set.mm
8482
MM> quit
85-
</PRE>
83+
```
8684

8785
This can also be done as a single command in bash:
8886

89-
<PRE>
87+
```bash
9088
./metamath 'read set.mm' 'write source set.mm /rewrap' \
9189
erase 'read set.mm' 'save proof */compressed/fast' \
9290
'verify markup */file_skip/top_date_skip' 'verify proof *' \
9391
'write source set.mm' quit
94-
</PRE>
95-
96-
or in one line, for ease of copypasting:
97-
98-
<PRE>
99-
./metamath 'read set.mm' 'write source set.mm /rewrap' erase 'read set.mm' 'save proof */compressed/fast' 'verify markup */file_skip/top_date_skip' 'verify proof *' 'write source set.mm' quit
100-
</PRE>
92+
```
10193

102-
and for iset.mm:
94+
and for `iset.mm`:
10395

104-
<PRE>
105-
./metamath 'read iset.mm' 'write source iset.mm /rewrap' erase 'read iset.mm' 'save proof */compressed/fast' 'verify markup */file_skip/top_date_skip' 'verify proof *' 'write source iset.mm' quit
106-
</PRE>
96+
```bash
97+
./metamath 'read iset.mm' 'write source iset.mm /rewrap' \
98+
erase 'read iset.mm' 'save proof */compressed/fast' \
99+
'verify markup */file_skip/top_date_skip' 'verify proof *' \
100+
'write source iset.mm' quit
101+
```
107102

108-
The reason for doing /rewrap first is so that 'save proof' will subsequently
109-
adjust the proof indentation to match any indentation changes made by /rewrap.
110-
Then, 'verify markup' will check that no lines became too long due to different
111-
indentation. Finally, 'verify proof' is there because you might as well.
103+
The reason for doing `/rewrap` first is so that `save proof` will subsequently
104+
adjust the proof indentation to match any indentation changes made by
105+
`/rewrap`. Then, `verify markup` will check that no lines became too long due
106+
to different indentation. Finally, `verify proof` is there because you might
107+
as well.
112108

113109
In addition, you are encouraged to run `scripts/minimize label`, where label is
114110
the name of your theorem. This script attempts to shorten the proof using other
115111
theorems in the database. Over many proofs, this can make a big difference in
116112
speeding up various functions, such as loading the database into a tool.
117113
However, this step is not a requirement for submissions to be accepted.
118114

119-
(You can also check definitional soundness with mmj2 and any 'discouraged'
115+
You can also check definitional soundness with mmj2 and any "discouraged"
120116
markup changes before submission if you want, or you can just leave it up to
121-
the automated verification checks to check those.)
117+
the automated verification checks to check those.
122118

123119
## Regenerating the `discouraged` file
124120

125-
In almost all cases, especially when you're starting, you won't need to
126-
regenerate the `discouraged` file. So if you're just starting out, you can
127-
probably ignore this section. However, there are rare cases when that
128-
is needed. This section explains what the discouraged file is all about.
121+
In almost all cases, especially when you are starting, you will not need to
122+
regenerate the `discouraged` file. So if you are just starting out, you can
123+
probably ignore this section. However, there are rare cases when that is
124+
needed. This section explains what the discouraged file is all about.
129125

130126
Some statement descriptions in `set.mm` and `iset.mm` have one or both of the
131-
markup tags `(New usage is discouraged.)` and `(Proof modification is discouraged.)`.
132-
In order to monitor accidental violations of these tags in set.mm and iset.mm,
133-
we store the usage and proof lengths of statements with these tags in a file
134-
called `discouraged` for set.mm and `iset-discouraged` for iset.mm.
135-
The automated check will return an error if this file does not exactly match the
136-
one that it generates for a set.mm pull request.
127+
markup tags `(New usage is discouraged.)` and
128+
`(Proof modification is discouraged.)`. In order to monitor accidental
129+
violations of these tags in `set.mm` and `iset.mm`, we store the usage and
130+
proof lengths of statements with these tags in a file called `discouraged` for
131+
`set.mm` and `iset-discouraged` for `iset.mm`. The automated check will return
132+
an error if this file does not exactly match the one that it generates for a
133+
`set.mm` or `iset.mm` pull request.
137134

138135
If you make modifications that affect the `discouraged` file, you should
139136
regenerate it with the following command under Linux or Cygwin bash:
140137

141-
<PRE>
138+
```bash
142139
./metamath 'read set.mm' 'set width 9999' 'show discouraged' quit \
143140
| tr -d '\015' | grep '^SHOW DISCOURAGED.' \
144141
| sed -E -e 's/^SHOW DISCOURAGED. ?//' | LC_ALL=C sort > discouraged
145-
</PRE>
146-
147-
or in one line, for ease of copypasting:
142+
```
148143

149-
<PRE>
150-
./metamath 'read set.mm' 'set width 9999' 'show discouraged' quit | tr -d '\015' | grep '^SHOW DISCOURAGED.' | sed -E -e 's/^SHOW DISCOURAGED. ?//' | LC_ALL=C sort > discouraged
151-
</PRE>
144+
and for `iset.mm`:
152145

153-
and for iset.mm:
154-
155-
<PRE>
156-
./metamath 'read iset.mm' 'set width 9999' 'show discouraged' quit | tr -d '\015' | grep '^SHOW DISCOURAGED.' | sed -E -e 's/^SHOW DISCOURAGED. ?//' | LC_ALL=C sort > iset-discouraged
157-
</PRE>
146+
```bash
147+
./metamath 'read iset.mm' 'set width 9999' 'show discouraged' quit \
148+
| tr -d '\015' | grep '^SHOW DISCOURAGED.' \
149+
| sed -E -e 's/^SHOW DISCOURAGED. ?//' | LC_ALL=C sort > iset-discouraged
150+
```
158151

159-
The "tr -d '\015'" is needed with Cygwin to strip carriage returns and has no
160-
effect in Linux.
152+
The `tr -d '\015'` command is needed with Cygwin to strip carriage returns and
153+
has no effect in Linux.
161154

162155
The `discouraged` file can also be regenerated with mmj2, which currently runs
163-
faster than metamath.exe for this function.
164-
See the automated verification script for the details.
165-
156+
faster than `metamath.exe` for this function. See the automated verification
157+
script for the details.
166158

167-
The metamath.exe and mmj2 proof assistants will prevent most accidental
168-
violations. The behavior of the metamath.exe proof assistant in the presence
159+
The `metamath.exe` and `mmj2` proof assistants will prevent most accidental
160+
violations. The behavior of the `metamath.exe` proof assistant in the presence
169161
of these tags and how to override them is described in the 11-May-2016 entry of
170-
<http://us.metamath.org/mpeuni/mmnotes.txt>.
162+
<https://us.metamath.org/mpeuni/mmnotes.txt>.
171163

172164
Please note that when you regenerate the `discouraged` file, before comitting
173165
it you should compare it to the existing one to make sure the differences are
174-
what you expected and there are no accidental changes elsewhere.
175-
The purpose of this file is to help detect such accidental changes, and if it
176-
is not inspected manually that purpose is defeated.
166+
what you expected and there are no accidental changes elsewhere. The purpose
167+
of this file is to help detect such accidental changes, and if it is not
168+
inspected manually that purpose is defeated.
177169

178170
## What are the requirements for acceptance (merging)?
179171

180-
A pull request (proposed change) *must* pass all verifiers before
181-
it will be merged (accepted). This even enforces some style rules on
182-
some databases, e.g., we want a name and date for each new theorem.
172+
A pull request (proposed change) *must* pass all verifiers before it will be
173+
merged (accepted). This even enforces some style rules on some databases,
174+
e.g., we want a name and date for each new theorem.
183175

184176
To be merged, a pull request must be approved by a different existing
185-
contributor (someone who's already had some previous contributions accepted).
186-
You can approve a change by viewing the pull request, selecting
187-
the tab "Files Changed", clicking on the "Review Changes" button,
188-
clicking on "Approve", and submitting the review.
189-
You can also approve by using the comment "+1".
190-
Feel free to approve something others have approved, that makes it clear
191-
there's no serious issue.
192-
193-
*Note*: Reviewers should investigate a commit that changes a
194-
`discouraged` file, since this means the commit is doing something
195-
that is normally discouraged. That doesn't make it wrong, it just means a
196-
rationale is needed.
197-
198-
Once a pull request is approved (other than the person
199-
originally proposing the change), any maintainer can merge it,
200-
including the approver.
201-
A maintainer is a member or owner of the Metamath GitHub organization.
177+
contributor (someone who has already had some previous contributions accepted).
178+
You can approve a change by viewing the pull request, selecting the tab "Files
179+
Changed", clicking on the "Review Changes" button, clicking on "Approve", and
180+
submitting the review. Feel free to approve something other contributors have
181+
already approved: that makes it clearer that there are no serious issues.
182+
183+
**Note:** Reviewers should investigate a commit that changes a `discouraged`
184+
file, since modifying it means that the commit is doing something that is
185+
discouraged. That does not make it wrong, it just means a rationale is needed.
186+
187+
Once a pull request is approved (by someone other than the person originally
188+
proposing the change), any maintainer can merge it, including the approver. A
189+
maintainer is a member or owner of the Metamath GitHub organization.
202190

203191
We generally tend to have a bias towards "merge this now" with separate
204-
follow-up fixes for minor issues (e.g., to use a better name). That reduces the
205-
risk of losing good ideas, or a lot of rework, due to some minor
206-
blemish like an odd name. It's a pain to fix "merge conflicts"
207-
because differences have accumulated over time, and we'd rather avoid
208-
merge conflicts if there's no good reason to have them.
192+
follow-up fixes for minor issues (e.g., to use a better name). That reduces
193+
the risk of losing good ideas, or a lot of rework, due to some minor blemish
194+
like an odd name. It is a pain to fix "merge conflicts" because differences
195+
have accumulated over time, and we would rather avoid merge conflicts if
196+
there are no good reasons to have them.
209197

210-
We encourage changes to be smaller, focusing on a single logical idea.
211-
That makes changes much easier to review.
212-
It also makes it easy to accept some changes while not accepting others.
198+
We encourage changes to be smaller, focusing on a single logical idea. That
199+
makes changes much easier to review. It also makes it easy to accept some
200+
changes while not accepting others.
213201

214202
Many contributors have or create a personal "mathbox" - a sandbox of work that
215-
is visible to others. Changes to someone's own mathbox still go through a
216-
review, but usually it's cursory - we generally just want to ensure that those
217-
changes don't interfere with or confuse others.
218-
Mathbox changes must still pass all verifiers, though, and that is
219-
a very rigorous check.
220-
Mathboxes should normally only be changed by the owner of the
221-
mathbox (unless it's a general improvement that applies across the database).
222-
223-
The following people are active and are willing to be contacted
224-
concerning the areas listed. This area maintainership is not (at least
225-
currently) part of the approval/merge process described above, but hopefully
226-
this list will help you find people who work on a particular area.
227-
Please propose a change to this file if you want to be an area maintainer.
203+
is visible to others. Changes to someone's own mathbox still go through a
204+
review, but usually it is cursory - we generally just want to ensure that those
205+
changes do not interfere with other parts of the database or confuse other
206+
contributors. Mathbox changes must still pass all verifiers, though, and that
207+
is a very rigorous check. Mathboxes should normally only be changed by the
208+
owner of the mathbox (unless it is a general improvement that applies across
209+
the database).
210+
211+
The following people are active and are willing to be contacted concerning the
212+
areas listed. This area maintainership is not (at least currently) part of the
213+
approval/merge process described above, but hopefully this list will help you
214+
find people who work on a particular area. Please propose a change to this
215+
file if you want to be an area maintainer.
228216

229217
* Mario Carneiro (@digama0): Any part of set.mm or iset.mm
230218

0 commit comments

Comments
 (0)