Zulip Chat Archive

Stream: Is there code for X?

Topic: Lower bound for set bounds sInf


Terence Tao (Oct 28 2023 at 02:14):

Why isn't this lemma in MathLib?? (le_sInf doesn't work because isn't an instance of CompleteSemilatticeInf.) (Also there should be a Real.sSup_le' in which the upper bound a is not required to be non-negative, but the set is now required to be non-empty.)

import Mathlib

lemma Real.le_sInf {s : Set } {a : } (h : BddBelow s) (h' : Set.Nonempty s) (hS :  (x : ), x  s  a  x) : a  sInf s := by
  by_contra ha
  simp at ha
  let ε := a - sInf s
  have  : 0 < ε/2 := by linarith
  have : sInf s  a - ε/2 := by linarith
  rw [Real.sInf_le_iff h h'] at this
  replace this := this (ε/2) 
  rcases this with  x,  hx, hx'  
  replace hS := hS x hx
  linarith

Andrew Yang (Oct 28 2023 at 02:33):

I think docs#le_csInf_iff is what you need.

Terence Tao (Oct 28 2023 at 02:41):

OK, thanks. (Somehow I had missed this in my initial search of MathLib.)

Sebastien Gouezel (Oct 28 2023 at 08:01):

The best way to find this kind of lemma is to use exact?, as in

import Mathlib

lemma Real.le_sInf {s : Set } {a : } (h : BddBelow s) (h' : Set.Nonempty s)
    (hS :  (x : ), x  s  a  x) : a  sInf s := by
  exact?

https://loogle.lean-lang.org/ is also extremely useful.


Last updated: Dec 20 2023 at 11:08 UTC