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
Reduced the issue to a self-contained, reproducible test case.
Description
Under the following conditions, we get an error in the kernel:
two variables, one depending on another
the dependent one is included, transitively includeing its dependency
there is a local variable with the same name as the dependency
the included variables are not used in the declaration
Steps to Reproduce
The following code errors:
variables (a : ℕ)
variables (ha : a = a)
include ha
theoremex (a : ℕ) : a = a := rfl
/-error:kernel failed to type check declaration 'ex' this is usually due to a buggy tactic or a bug in the builtin elaboratorelaborated type: a = a → ℕ → ∀ (a : ℕ), a = aelaborated value: λ (ha : a = a) (a a : ℕ), rflnested exception message:failed to add declaration to environment, it contains local constants-/
Expected behavior: No errors in the kernel, like when there's no name clash.
Actual behavior: An error:
error:
kernel failed to type check declaration 'ex' this is usually due to a buggy tactic or a bug in the builtin elaborator
elaborated type:
a = a → ℕ → ∀ (a : ℕ), a = a
elaborated value:
λ (ha : a = a) (a a : ℕ), rfl
nested exception message:
failed to add declaration to environment, it contains local constants
Prerequisites
or feature requests.
Description
Under the following conditions, we get an error in the kernel:
variables
, one depending on anotherinclude
ing its dependencyvariables
are not used in the declarationSteps to Reproduce
The following code errors:
Expected behavior: No errors in the kernel, like when there's no name clash.
Actual behavior: An error:
Reproduces how often: always
Versions
Lean (version 3.45.0, commit 22b09be, Release)
The text was updated successfully, but these errors were encountered: