-
Notifications
You must be signed in to change notification settings - Fork 89
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Discourage indirect usage of ax-13? #3879
Comments
By the way, this proposal from wolf might not be a bad idea:
Only thing to note is that currently about 1300 theorems use ax-13, so currently we would have to add that number of these tags. However I'm confident that I can bring ax-13 usage below 1000, and maybe I can push it really low with extra effort, but even in the best case scenario they will still be hundreds of theorems. |
In my opinion the "discouraged" mechanism which already exists can be used for discouraging new usage of theorems that make use of This does not mean that it won't be possible to use those theorems, it's just that it will not be possible to use them without noticing. |
I sense two competing ideas in this topic: One strives for minimizing axiom usage, not at all costs, but at costs, and the other aims at minimizing prerequisites for theorems, at the expense of using more axioms. The axiom at question here is ax-13, which in essence states that a term x ≠ y implies the distinctness of the variables x and y. This axiom is not disputed. Unlike the axiom of choice it has no ring of doubt about it. So what is wrong with it that its usage should be discouraged? |
I'm glad you brought up this topic, I have a few words to say about this.
This is the same question I asked myself before starting the series. The example you mention is appropriate, we can currently remove the dv condition between n and p in bnj1018, but if it would depend on a weaker version of bnj985 then we could not anymore. So either we remove a dv condition or we remove an axiom, we can't remove both. Therefore we have a conflict between two goals. So how do we determine the best direction? Well, I do have an answer for that, and the result might surprise you. We can take advantage of Jerry James's amazing tool that automatically checks for all unnecessary dv conditions in the datatabase. Let's look at commit e468a4e, which is the start of the PR series about ax-13. These are the data for that time:
Now let's take a look at the data from the most recent commit 2dc7de4, which dates back to yesterday. These are the current numbers:
I'm not sure if I'm properly conveying how impressive these data are. Essentially, they indicate that the cost of lowering ax-13 usage by 96% has been negligible so far (the close proximity between the dv numbers is probably luck, I'm guessing they fluctuate by a few units, but still impressive). So, my answer to your concern is: we can have both. We can have a database with low ax-13 usage and with less dv conditions. Not only that, the conflict between these two goals is surprisingly weak (however a tool is needed for the second goal, because removing 14,406 dv conditions by hand is not practical). But it gets better: the number 14,406 is actually a lower bound, we can likely remove much more dv conditions than that. Why? Because once you remove a dv condition from a theorem, then Jerry James's tool can detect the improvement on the ones depending on it (the same thing happens in the opposite direction: if you add a dv condition on a theorem then the verifier will complain about the dv conditions of the ones directly dependent on it). |
I really appreciate your work, @GinoGiotto . It has clearly shown that ax-13 has the smallest range of effect of all axioms. Far smaller than I had expected a year ago. It even might be that you don't need this axiom at all to express mathematics at higher levels (i.e. apart from some results in predicate logic and basic set theory). |
There are simpler ways to support ax-13 free proofs right out of the box. Appropriate comments to theorems is one such way. Look at chvar and chvarv, for example. Both theorems have a version chvarvv that is not linked to. How is someone unaware of this discussion assumed to find it, if s/he happened to come accross chvar first? |
Yep, my way of thinking is statistical. I believe this is the right approach when we have to deal with huge amount of data and especially when we have to deal with opposing goals (which aren't really opposing here, see below).
The bnj1018 case is not a problem, both versions can be kept (is the dv condition between p and n that important even?), but in any case this would be problematic only if we would have to deal with a lot of these conflicts, but luckily for us that's not the case.
Just to really understand how small this is, let's take a look at an extreme example, the branch ax-13-complete in my repository. The base branch of that database contained 32,347 proofs depending on ax-13, while the number of removable dv conditions were 14,406. That number changed to 14,402 after I lowered ax-13 usage to 716 theorems. Note that I'm the only author of the additional commits in there. So the price for eliminating ax-13 almost everywhere was really just 4 dv conditions. 4 out of 14,000. This is very good evidence that the example of bnj1018 is just a sporadic occurrence, not the rule. And I say it again: ax-13-complete is the extreme version of a database leaning towards axiom reduction at the expense of dv eliminations.
This is already in my to do list, however comments alone are not satisfactory for me because there is lack of a verification system that someone will unawarely produce proofs with them. Ideally, the proof assistant would directly output the reason why the use of a theorem is discouraged. But this is difficult to achieve right now. An easier alternative could be to change the current mm-exe output: MM-PA> ASSIGN <step> <label> >>> ?Error: Attempt to assign a statement whose usage is discouraged. >>> Use ASSIGN ... / OVERRIDE if you really want to do this. To something like this: MM-PA> ASSIGN <step> <label> >>> ?Error: Attempt to assign a statement whose usage is discouraged. >>> Use ASSIGN ... / OVERRIDE if you really want to do this. >>> Type "SHOW SOURCE <label>" to know why it's discouraged. The command |
I agree with @tirix that the "discouraged" mechanism can and should be used now - it is available and serves the required purpose (to wait for new tools or accordingly modified tool may be a too long time). And it is still accpording to the "Conventions":
Since there was a kind of agreement to reduce the numer of usages of ax-13 before @GinoGiotto started his series, this agreement should be supported to the best. Therefore, the rule should be to value theorems with more dv conditions over theorems requiring ax-13. Especially since the need for more dv conditions is negligible, as @GinoGiotto has shown. And maybe it is sufficient to start with a few commonly used theorems using ax-13 to be tagged with "(New usage is discouraged.)". Candidates are at least ~cbvralv (currently ~cbralv is still used 48 times, but ~cbvralvw 301 times) and ~cbvrexv (currently ~cbralv is still used 45 times, but ~cbvralvw 243 times), and @GinoGiotto may be able to propose additional ones. Looking at ~chvar*, the usage is much lower (currently ~chvar, ~chvarv are used 48 times, and ~chvarvv 72 times). Additional tags can be added later (if needed). After @GinoGiotto has finished his work, it would be helpful to have a list of the theorems still using ax-13 at a central place (maybe a subpage of the metamath homepage). |
OK, this list can be created by the command |
Some theorems depending on ax-13 are not used in proofs of other theorems anymore (e.g., ~nfsum, which was replaced by ~nfsumw), so these theorems could be renamed by appending the suffix ALTV (currently (to be) used in mathboxes only, but I see no reason to use it in the main body, too. But this was discussed already elsewhere...) and tagged by "(New usage is discouraged.)". Furthermore, the comments should be aligned. For example Current version:
New version:
|
I added discouragement tags for all ax-13 dependent theorems in main #3896.
This is outdated, the most recent commit ade85ef shows 674 theorems using ax-13. |
The role of axc11r. When removing ax-13 rigorously, you have to look at the axiom ax-12 as well. This axiom has two applications: one is ax12v, a weakening of this axiom from which we want to prove theorems based on this axiom. The other is axc11r. EDIT: ax12 has a proof that uses axc11r, so there is a circle in the proof idea. |
About this, I don't have a strong opinion about whether ALTV should be allowed in main, but I remember that some people opposed it. The old conventions used to say "Alternate (*ALTV) theorems or definitions are usually contained in mathboxes". When this was noticed, a convention change was done by @benjub in October 2023 to explicitly forbid ALTV in main. Since that convention change was merged, it should mean that this decision was agreed by others. So this proposal would imply to change the conventions again and populate main with the first ALTV versions (currently there are none). |
This suggestion would introduce ax-10 and ax-13 to bj-axc11v as well, whose comment says "Version of ~ axc11 with a disjoint variable condition, which does not require ~ ax-13 nor ~ ax-10 ". The original axc11v in main already doesn't use them, so it would be possible to fix this by changing BJ proof. However his version has a "Proof modification is discouraged" tag, so you have to ask @benjub about this. Except for dral1v (which you already addressed) and bj-axc11v (which is fixable by using axc11rv instead of axc11r), your suggestion doesn't introduce new axioms to other theorems. So it's fine for me. |
Yes, bj-axc11v should obviously use axc11rv, which was made for these cases. Looking at the contribution dates, I probably forgot to update it when I introduced axc11rv. Could you please make that change? |
A system to automatically avoid non-deliberate ax-13 usage is now implemented. Additionally, $j tags, comments and cross references have been added. I think this properly addresses this issue, so I'm closing it. Feel free to open new ones if you think there are other topics to address. |
This question arised while reviewing #3877. Checkout the discussion from #3877 (comment) for more context.
For this issue description I'm going to simply quote myself since what I wrote already effectively communicates my intentions:
To this I'll add that we also have the tags
$j usage '<theorem>' avoids 'ax-13'
, which can be added to a few early theorems (I'll do this soon). While they help a little if put in strategic places, they don't communicate anything over newly added theorems (unless the newly added theorems come with their own $j tags).The text was updated successfully, but these errors were encountered: