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
{{ message }}
This repository has been archived by the owner on Oct 14, 2023. It is now read-only.
Reduced the issue to a self-contained, reproducible test case.
Description
Consider the following code:
namespace foo
sectionparameter x : ℕ
defmy_x : ℕ := x
lemmabar : my_x = my_x + 0
:= nat.add_zero my_x
lemmabar' : my_x = my_x + 0
:= begin apply (nat.add_zero my_x) end--error on this lineendend foo
Actual behavior: Definition of bar' fails with the error
type mismatch at application
nat.add_zero my_x
term
my_x
has type
ℕ → ℕ
but is expected to have type
ℕ
state:
x : ℕ
⊢ my_x = my_x + 0
What is happening is that inside the tactic mode, the environment is behaving as if it were outside the section, and thus my_x takes an argument corresponding to the parameter x. If one removes the lines namespace foo and end foo, so that the section is no longer within a namespace, then the definition of bar' works.
Expected behavior: The environment should behave similarly in tactic mode as outside of tactic mode. That is, it should behave as it does behave for sections that are not within namespaces.
Versions
Lean HEAD from July 21, 2017, Lean (version 3.2.1, commit 667e1e1, Release)
The text was updated successfully, but these errors were encountered:
bmsherman
changed the title
Tactic mode "escapes sections" for sections within namespaces
Tactic mode "escapes" sections for sections within namespaces
Jul 28, 2017
Prerequisites
or feature requests.
Description
Consider the following code:
Actual behavior: Definition of
bar'
fails with the errorWhat is happening is that inside the tactic mode, the environment is behaving as if it were outside the section, and thus
my_x
takes an argument corresponding to the parameterx
. If one removes the linesnamespace foo
andend foo
, so that the section is no longer within a namespace, then the definition ofbar'
works.Expected behavior: The environment should behave similarly in tactic mode as outside of tactic mode. That is, it should behave as it does behave for sections that are not within namespaces.
Versions
Lean HEAD from July 21, 2017, Lean (version 3.2.1, commit 667e1e1, Release)
The text was updated successfully, but these errors were encountered: