Zulip Chat Archive

Stream: new members

Topic: Multiple indices in iSup


Gareth Ma (Jul 29 2024 at 21:23):

How should I prove the following, or deal with iSup with multiple arguments in general?

example {f :     } {s t : Set } {a b : } (ha : a  s) (hb : b  t)
      (hf : BddAbove (Set.range f.uncurry)) :
    f a b   (x  s) (y  t), f x y := by
  sorry

Gareth Ma (Jul 29 2024 at 21:24):

If it's a single index f a <= sup (x in s), f x, then I can use le_iSup and prove a is in s

Gareth Ma (Jul 29 2024 at 21:24):

But it seems the multiple indexing iSup above is just a shorthand for ⨆ x ∈ s, ⨆ y ∈ t, f x y

Kevin Buzzard (Jul 29 2024 at 21:28):

Not at lean right now but why doesn't the le_iSup approach still work?

Gareth Ma (Jul 29 2024 at 21:29):

Because le_iSup is xs    f(x)xsf(x)x \in s \implies f(x) \leq \bigsqcup_{x \in s} f(x), but here f(a,b)ytf(x,y)f(a, b) \neq \bigsqcup_{y \in t} f(x, y) for any xx

Gareth Ma (Jul 29 2024 at 21:30):

Oh but replacing \neq by \le holds, so I can use le_iSup for the inner iSup, then for the outer one, and trans them/calc them together

Gareth Ma (Jul 29 2024 at 21:30):

oops, let me try

Kevin Buzzard (Jul 29 2024 at 21:31):

Oh I see, so you need some lemma relating the sup of the sup to the sup over the set prod probably

Gareth Ma (Jul 29 2024 at 21:33):

Yeah exactly

Gareth Ma (Jul 29 2024 at 21:33):

There is

Gareth Ma (Jul 29 2024 at 21:33):

!docs4 le_iSup₂

Gareth Ma (Jul 29 2024 at 21:33):

#docs4 le_iSup₂

Gareth Ma (Jul 29 2024 at 21:34):

ok i give up but

Gareth Ma (Jul 29 2024 at 21:34):

le_iSup₂

Gareth Ma (Jul 29 2024 at 21:34):

But that is indexing over a type, and apparently we don't have

example {f :   } (s : Set ) : ( (x  s), f x) = ( (x : s), f (x : )) := by
  exact?

I can work on that I guess

Gareth Ma (Jul 29 2024 at 21:37):

Nevermind, there is iSup_subtype'. What I stated is incorrect because \R doesn't have a \top

Gareth Ma (Jul 29 2024 at 22:06):

No it's incorrect because of this

Gareth Ma (Jul 29 2024 at 22:06):

def f' :    := -1
def s' : Set  := {1}

example :  (x  s'), f' x = 0 := by
  have : Set.range (fun x   (_ : x  s'), f' x) = {0, -1} := by
    apply subset_antisymm
    · intro x
      simp [s', f']
      rintro y rfl
      by_cases hy : y = 1 <;> [right; left] <;> simp [hy]
    · intro x h
      simp_all [s', f']
      cases' h with h h <;> subst h <;> [use 0; use 1] <;> simp
  rw [iSup, this]
  simp

example :  (x : s'), f' x = -1 := by
  have : Set.range (fun x : s'  f' x) = {-1} := by ext x; simp [s', f']
  rw [iSup, this, csSup_singleton]

Gareth Ma (Jul 29 2024 at 22:07):

I feel like this might be confusing to other new members..

Yakov Pechersky (Jul 29 2024 at 23:40):

I have a PR currently improving our ciSup API

Yakov Pechersky (Jul 29 2024 at 23:41):

And a branch I'm working on that further treats it like a big operator

Yakov Pechersky (Jul 29 2024 at 23:42):

Gareth Ma said:

Nevermind, there is iSup_subtype'. What I stated is incorrect because \R doesn't have a \top

Actually, because it doesn't have a bot if we're talking ciSup

Yakov Pechersky (Jul 29 2024 at 23:44):

Gareth, you need a hypothesis either that your f is nonnegative along s x t, or that s and t are univ

Gareth Ma (Jul 29 2024 at 23:57):

Great to hear about your PR, looking forward to it :D

Gareth, you need a hypothesis either that your f is nonnegative along s x t, or that s and t are univ

Yes I realised. I think if s and t are univ then I can change it to iSup (not ciSup), and I saw a lemma that rewrites iSup (fun x => iSup (fun y => f x y)) to iSup over the product type. Anyways it's not what I want, what I really want is the \Sup (x : s) one, so I will just use that :)

Yakov Pechersky (Jul 30 2024 at 02:31):

#15271, #15284


Last updated: May 02 2025 at 03:31 UTC