You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I just created an Issue on the Lean 4 Repo that is I think relevant to you'r Issue: Variables not visible inside calc statement. Someone directed me to the release notes for 4.11.0 which state that the mechanism for variable inclusion has changed. Among other things: variables are only available to the proof if they have been mentioned in the theorem header, which is I think the reason why I haven't run into problems sooner. Many examples mention variables in the header.
Description
Lean gives the error "unknown identifier 'hp'" when I put this example code into an otherwise empty file:
Edit: Lean release v4.11.0 made it so that variables are not recognized in theorems unless we use
include var0 var1...
. The following snippet works:Possible solution
The code will type check if I change
hp: p
to anaxiom
:However,
#print t1
gives menot
which is what the book states the type should be.
Other things I tried that didn't type check
I tried applying one, the other, or both of the following:
variable {hp : p}
to makehp
get used implicitly.t1
tot1 : p → q → p
.With both applied:
Environment
Edit: Changed
#check t1
to#print t1
.Edit 2: Added link to book section
The text was updated successfully, but these errors were encountered: