fix(library/data/finset/to_set.lean): to_set does not require decidable equality
This commit is contained in:
parent
1238f43575
commit
cdecc309b3
1 changed files with 3 additions and 2 deletions
|
@ -12,10 +12,9 @@ namespace finset
|
|||
|
||||
variable {A : Type}
|
||||
variable [deceq : decidable_eq A]
|
||||
include deceq
|
||||
|
||||
definition to_set (s : finset A) : set A := λx, x ∈ s
|
||||
abbreviation ts := @to_set A _ -- until coercion is working
|
||||
abbreviation ts := @to_set A
|
||||
|
||||
variables (s t : finset A) (x : A)
|
||||
|
||||
|
@ -28,6 +27,8 @@ theorem mem_to_set_univ [h : fintype A] : (x ∈ ts univ) = (x ∈ set.univ) :=
|
|||
propext (iff.intro (assume H, trivial) (assume H, !mem_univ))
|
||||
theorem to_set_univ [h : fintype A] : ts univ = (set.univ : set A) := funext (λ x, !mem_to_set_univ)
|
||||
|
||||
include deceq
|
||||
|
||||
theorem mem_to_set_union : (x ∈ ts (s ∪ t)) = (x ∈ ts s ∪ ts t) := !finset.mem_union_eq
|
||||
theorem to_set_union : ts (s ∪ t) = ts s ∪ ts t := funext (λ x, !mem_to_set_union)
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue