Skip to content
This repository was archived by the owner on Jul 24, 2024. It is now read-only.

Commit fea68aa

Browse files
committed
chore(data/fintype/basic): documenting elaboration bug (#11247)
Simplifying an expression and documenting an elaboration bug that it was avoiding.
1 parent 3aa5b8a commit fea68aa

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/data/fintype/basic.lean

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1138,8 +1138,11 @@ instance Prop.fintype : fintype Prop :=
11381138
instance subtype.fintype (p : α → Prop) [decidable_pred p] [fintype α] : fintype {x // p x} :=
11391139
fintype.subtype (univ.filter p) (by simp)
11401140

1141-
@[simp] lemma set.to_finset_univ [hu : fintype (set.univ : set α)] [fintype α] :
1142-
@set.to_finset _ (set.univ : set α) hu = finset.univ :=
1141+
/- TODO Without the coercion arrow (`↥`) there is an elaboration bug;
1142+
it essentially infers `fintype.{v} (set.univ.{u} : set α)` with `v` and `u` distinct.
1143+
Reported in leanprover-community/lean#672 -/
1144+
@[simp] lemma set.to_finset_univ [fintype ↥(set.univ : set α)] [fintype α] :
1145+
(set.univ : set α).to_finset = finset.univ :=
11431146
by { ext, simp only [set.mem_univ, mem_univ, set.mem_to_finset] }
11441147

11451148
@[simp] lemma set.to_finset_eq_empty_iff {s : set α} [fintype s] : s.to_finset = ∅ ↔ s = ∅ :=

0 commit comments

Comments
 (0)