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
When using a set as an argument to a class that expects a Sort, there is a "kernel failed to type check declaration" error.
Steps to Reproduce
Load the following file into Lean:
universes u
variables {α : Type u}
instance : has_coe_to_sort (set α) (Type*) := ⟨λ s, {x // x ∈ s}⟩
-- OKlemmaex1 [inhabited α] : true := trivial
-- Not OKlemmaex2 [inhabited (set.univ : set α)] : true := trivial
/-kernel failed to type check declaration 'ex2' this is usually due to a buggy tactic or a bug in the builtin elaboratorelaborated type: ∀ {α : Type u} [_inst_1 : inhabited ↥set.univ], trueelaborated value: λ {α : Type u} [_inst_1 : inhabited ↥set.univ], trivialnested exception message:type mismatch at application inhabited ↥set.univterm ↥set.univhas type Type ubut is expected to have type Sort u_1-/-- OKlemmaex3 [inhabited.{u+1} (set.univ : set α)] : true := trivial
-- OKlemmaex4 [inhabited ↥(set.univ : set α)] : true := trivial
-- OKlemmaex5 (s : set α) [inhabited s] : true := trivial
Expected behavior: That there are no errors.
Actual behavior: The lemma ex2 has the error listed in the above comment.
Reproduces how often: 100%
Versions
Lean 3.38.0 on Linux 5.14.12-arch1-1 #1 SMP PREEMPT Wed, 13 Oct 2021 16:58:16 +0000 x86_64 GNU/Linux
Prerequisites
or feature requests.
Description
When using a
set
as an argument to a class that expects a Sort, there is a "kernel failed to type check declaration" error.Steps to Reproduce
Load the following file into Lean:
Expected behavior: That there are no errors.
Actual behavior: The lemma
ex2
has the error listed in the above comment.Reproduces how often: 100%
Versions
Lean 3.38.0 on Linux 5.14.12-arch1-1 #1 SMP PREEMPT Wed, 13 Oct 2021 16:58:16 +0000 x86_64 GNU/Linux
Additional Information
This might be related to #474.
This affects
set.to_finset_univ
in mathlib, but we are using thelemma ex4
workaround.The text was updated successfully, but these errors were encountered: