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

surprising behavior of intros when names are given in unexpected way. #97

Open
gasche opened this issue Jan 8, 2018 · 3 comments
Open

Comments

@gasche
Copy link

gasche commented Jan 8, 2018

intros <name>* is not documented in the reference manual. It would be helpful to know what the intended semantics is. I don't know whether any of the following are bugs, but they look strange anyway.

Starting from:

Theorem foo : true -> true -> true.

I can do either intros or intros HA HB, which work as expected: intros makes up a fresh hypothesis name, and intros HA HB uses the names I gave. But the following are strange:

Conflicting names (I guess that's ok):

  intros A A.
(*
A : true
A1 : true
============================
 true
*)

Too many names (I guess that's ok, although for script robustness I would rather have a failure here):

  intros A B C.
(*
A : true
B : true
============================
 true
*)

Giving "not enough names" works fine (later names are picked by the system), except if the name given are H1, H2...:

  intros H1.
(*
H1 : true
H1 : true
============================
 true
*)

(notice that two hypotheses now have the same name)

@gasche
Copy link
Author

gasche commented Jan 8, 2018

In fact, explicitly giving intros H1 H2. works badly even if the correct number of variables are given, because it disturbs the fresh-name generation later in the script to reuse H1 and H2 again. This means that given a script that uses intros., rewriting it to use intros H1 ... Hn explicitly will in general break the rest of the proof script as it will change the generated variable names.

I guess the fix is: whenever the user chooses a variable name, checks if it coincides with the "next fresh name", and in that case increment the fresh name counter (do as if it had been generated by the system).

@chaudhuri
Copy link
Member

chaudhuri commented Jan 9, 2018 via email

@chaudhuri chaudhuri reopened this Jun 5, 2018
@chaudhuri
Copy link
Member

This breaks too many existing proofs. More testing is needed.

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