Zulip Chat Archive
Stream: Is there code for X?
Topic: Bounded conditional supremum
Yaël Dillies (Jan 02 2022 at 19:39):
In the naming convention, we have supr
for the indexed supremum, bsupr
for the bounded indexed supremum, csupr
for the conditional indexed supremum. Are people fine with me using bcsupr
for the bounded conditional indexed supremum or do you have better alternatives?
Eric Wieser (Jan 05 2022 at 00:23):
Bounded csuprs don't work in the current design unfortunately (at least, on generalized types), because the csupr when the condition is false is unspecified
Yaël Dillies (Jan 05 2022 at 08:08):
But I still have a few lemmas about them.
Eric Wieser (Jan 05 2022 at 10:10):
I'm curious; can you give an example?
Yaël Dillies (Jan 05 2022 at 10:11):
Yaël Dillies (Jan 05 2022 at 10:14):
You can see that I'm using the fact that when csupr
is unspecified it is still equal to some definite value.
Eric Wieser (Jan 05 2022 at 12:09):
I guess my argument would be that those statements are perhaps worse than useless, as they suggest that bcsupr
is actually a useful meaningful thing; but all the times I've seen someone actually try to use it in a generic setting the conclusion was it didn't mean what they wanted it to mean
Eric Wieser (Jan 05 2022 at 12:10):
lemma bcsupr_mono_right (hg : bdd_above (set.range g)) (hfg : ∀ i, p i → f i ≤ g i) :
(⨆ (i : ι) (hi : p i), f i) ≤ ⨆ (i : ι) (hi : p i), g i :=
Is indeed a true lemma, but the left and right hand side are not what would usually be considered a bounded supremum, as the semantics are not "exclude the elements where p i
doesn't hold", but "replace them with some unspecified constant"
Eric Wieser (Jan 05 2022 at 12:12):
The meaningful version of that lemma is
lemma csupr_subtype_mono_right (hg : bdd_above (set.range g)) (hfg : ∀ i, p i → f i ≤ g i) :
(⨆ i : subtype p, f i) ≤ ⨆ i : subtype p, g i :=
But I suspect that's an obvious special case of an existing lemma
Yaël Dillies (Jan 05 2022 at 12:31):
So what are you suggesting? That I take one sup over all pairs x
and y
?
Eric Wieser (Jan 05 2022 at 12:35):
Does taking the nnreal norm make things easier?
Yaël Dillies (Jan 05 2022 at 12:40):
Why would it? :thinking:
Eric Wieser (Jan 05 2022 at 12:42):
Because that's a docs#conditionally_complete_lattice_bot which has well-behaved bounded supremums
Yaël Dillies (Jan 05 2022 at 12:42):
No it doesn't. What you're taking the supremum of must be bounded.
Yaël Dillies (Jan 05 2022 at 12:43):
Ahah, stop editing :rofl:
Eric Wieser (Jan 05 2022 at 12:43):
Hmm, is conditionally_complete_lattice_bot
gone?
Eric Wieser (Jan 05 2022 at 12:43):
Oh yeah, order_bot
Yaël Dillies (Jan 05 2022 at 12:43):
Yeah, since Yakov's refactor
Eric Wieser (Jan 05 2022 at 12:43):
Sorry, by "bounded" i mean in the sense of bsupr
not bdd_below
Yaël Dillies (Jan 05 2022 at 12:44):
Then I maintain my "no". What if you take Sup univ
?
Eric Wieser (Jan 05 2022 at 12:45):
My claim is that on types with order_bot
, ⨆ (i : ι) (hi : p i)
and ⨆ i : subtype p,
coincide because ⨆ (i : false), _ = bot
Eric Wieser (Jan 05 2022 at 12:46):
The lemmas you have right now are odd because you know nothing about ⨆ i : false, _
Yaël Dillies (Jan 05 2022 at 12:46):
Is that a lemma? I doubt it's true because you are still not addressing the case of unbounded sets.
Eric Wieser (Jan 05 2022 at 12:47):
A lot of the lemmas here look like they ought to generalize to order_bot: https://leanprover-community.github.io/mathlib_docs/order/conditionally_complete_lattice.html#lemmas-about-a-conditionally-complete-linear-order-with-bottom-element
Eric Wieser (Jan 05 2022 at 12:48):
Oh, at any rate what I meant to link above was docs#conditionally_complete_linear_order_bot
Eric Wieser (Jan 05 2022 at 12:48):
Which nnreal
satisfies
Yaël Dillies (Jan 05 2022 at 12:49):
I don't like the idea of going through nnreal
.
Eric Wieser (Jan 05 2022 at 12:49):
We have docs#has_nnnorm.nnnorm (∥a∥₊
) presumably to help with this kind of thing
Yaël Dillies (Jan 05 2022 at 12:52):
Yeah but that means I have to coerce back from nnreal
to real
or have convex_mod
be nnreal
-valued.
Eric Wieser (Jan 05 2022 at 12:53):
Is having convex_mod
be nnreal
-valued a problem?
Eric Wieser (Jan 05 2022 at 12:53):
That seems like the obvious choice
Yaël Dillies (Jan 05 2022 at 12:54):
I have yet to formalize a single bit of the applications of convex_mod
, so I really don't know.
Yaël Dillies (Jan 05 2022 at 12:57):
In the literature, they even define convex_mod : Icc 0 2 → Icc 0 1
, but that's definitely too extreme.
Yaël Dillies (Mar 23 2022 at 20:27):
Thinking about this again, @Eric Wieser, should we have a dedicated API for ⨆ x : subtype p, f x
?
Eric Wieser (Mar 23 2022 at 20:30):
Either that or something akin to finsum
but for supr
Eric Wieser (Mar 23 2022 at 20:31):
But maybe that can't exist
Yaël Dillies (Mar 23 2022 at 20:31):
Isn't supr
already akin finsum
? Just a badly behaved one.
Yaël Dillies (Mar 23 2022 at 20:33):
I guess we could have a separate notation and a different naming convention (bcsupr
anyone?), bur I'm not yet sure what the notation should look like.
Floris van Doorn (Mar 24 2022 at 10:27):
Yaël Dillies said:
Thinking about this again, Eric Wieser, should we have a dedicated API for
⨆ x : subtype p, f x
?
I think we should have API for ⨆ x : s, f x
, but we maybe already have that? It's way more common (for me) to work with sets than with subtypes, so I personally don't see the value of also having API for ⨆ x : subtype p, f x
.
Yaël Dillies (Mar 24 2022 at 11:04):
Can't they be used interchangeably?
Floris van Doorn (Mar 24 2022 at 11:38):
more or less yes (not in rw
/simp
probably). I think it would be nicer if they are stated using sets instead of subtypes.
Yaël Dillies (Mar 24 2022 at 11:49):
I don't really see the point. subtype
is morally more general.
Floris van Doorn (Mar 24 2022 at 13:04):
Note: Sup (f '' s)
means the same, and has currently more API. I just think ⨆ x : s, f x
is a much nicer way of writing this term.
Yaël Dillies (Mar 24 2022 at 14:09):
I am fighting my way through a possible API for conditional suprema in branch#convexity_modulus. If people have ocmments on which lemmas are worthy of living, that would be great.
Last updated: Dec 20 2023 at 11:08 UTC