-
Notifications
You must be signed in to change notification settings - Fork 295
[Merged by Bors] - refactor(data/set/finite): protect set.finite
#14344
Conversation
@b-mehta I put the documentation you suggested for #14136 in this PR. That Edit: this has now been split off into #14363 |
@@ -87,13 +87,13 @@ open_locale classical | |||
/-- Sum of `f x` as `x` ranges over the elements of the support of `f`, if it's finite. Zero | |||
otherwise. -/ | |||
@[irreducible] noncomputable def finsum {M α} [add_comm_monoid M] (f : α → M) : M := | |||
if h : finite (support (f ∘ plift.down)) then ∑ i in h.to_finset, f i.down else 0 | |||
if h : (support (f ∘ plift.down)).finite then ∑ i in h.to_finset, f i.down else 0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For the sake of clarity on my part, this change is needed because finite
no longer typechecks here, right? And you could have instead changed it to set.finite (support ...)
(not that you should have!)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Indeed, that's what's going on (in particular, error: unknown identifier 'finite'
). I generally switched things over to dot notation when it worked, but I used set.finite
when dot notation didn't work due to elaboration order.
928ac1c
to
aa84f1a
Compare
aa84f1a
to
537ddcb
Compare
Can you please fix the conflict (and see if it still compiles...)? Thanks! bors d+ |
✌️ kmill can now approve this pull request. To approve and merge a pull request, simply reply with |
bors r+ |
This change will make it so that it does not conflict with a top-level `finite` that will be added to complement `infinite`.
Pull request successfully merged into master. Build succeeded: |
set.finite
set.finite
This change will make it so that it does not conflict with a top-level `finite` that will be added to complement `infinite`.
This change will make it so that it does not conflict with a top-level
finite
that will be added to complementinfinite
.