Skip to content
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

Improve disjoint variable error message #109

Open
tirix opened this issue May 20, 2023 · 1 comment
Open

Improve disjoint variable error message #109

tirix opened this issue May 20, 2023 · 1 comment

Comments

@tirix
Copy link
Collaborator

tirix commented May 20, 2023

The error message for missing disjoint variables, Disjoint variable constraint violated, does not mention which constraint is violated, or which additional DV constraint could solve the error.

It would be a nice addition.

$ metamath-knife --verify set.mm
error: Distinct variable violation
      --> set.mm:467384:9
       |
467384 |           qusscaval $p |- ( ( ph /\ K e. S /\ X e. B ) -> ( K .xb [ X ] ( M ~QG G ) ) = [ ( K .x. X ) ] ( M ~QG G ) ) $=
       |  _________^
467385 | |           ( wcel w3a vx cv cqg co cec cmpt cfv cqs csca clmod vv vk vu cvv cqus wceq
467386 | |           a1i cbs eqid ovex qusval quslem wa wbr adantr clss simpr1 eqgvscpbl csubg
467387 | |           wer lsssubg syl2anc eqger syl simpr2 erth lmodvscl syl3anc 3imtr3d eceq1
467388 | |           ecexg ax-mp fvmpt simpr3 eqeq12d 3imtr4d imasvscaval simp3 oveq2d syl3an1
...      |
467404 | |           XCXEURAYLWNWOYTPHFXFDBIKLXFVAONVSWLUCXBWSXEBWTWQXBWRWBWTVAXKXEUPUAIGUEVBXBUP
467405 | |           WRWCWDWEVPWM $.
       | |_________________________^ Disjoint variable constraint violated
       |
1 diagnostics issued.
@jkingdon
Copy link
Contributor

I'd use metamath-exe as the inspiration - it shows the names of the variables both before and after substitution. The output probably could be improved even further, but it would be a place to start.

mmj2 seems capable of something similar (at least in the one quick test I tried) but I guess it only prints a message for the first error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants