[GOAL]
ι : Type u_1
I J : Box ι
x y : ι → ℝ
⊢ List.TFAE [I ≤ J, ↑I ⊆ ↑J, Icc I.lower I.upper ⊆ Icc J.lower J.upper, J.lower ≤ I.lower ∧ I.upper ≤ J.upper]
[PROOFSTEP]
tfae_have 1 ↔ 2
[GOAL]
case tfae_1_iff_2
ι : Type u_1
I J : Box ι
x y : ι → ℝ
⊢ I ≤ J ↔ ↑I ⊆ ↑J
ι : Type u_1
I J : Box ι
x y : ι → ℝ
tfae_1_iff_2 : I ≤ J ↔ ↑I ⊆ ↑J
⊢ List.TFAE [I ≤ J, ↑I ⊆ ↑J, Icc I.lower I.upper ⊆ Icc J.lower J.upper, J.lower ≤ I.lower ∧ I.upper ≤ J.upper]
[PROOFSTEP]
exact Iff.rfl
[GOAL]
ι : Type u_1
I J : Box ι
x y : ι → ℝ
tfae_1_iff_2 : I ≤ J ↔ ↑I ⊆ ↑J
⊢ List.TFAE [I ≤ J, ↑I ⊆ ↑J, Icc I.lower I.upper ⊆ Icc J.lower J.upper, J.lower ≤ I.lower ∧ I.upper ≤ J.upper]
[PROOFSTEP]
tfae_have 2 → 3
[GOAL]
case tfae_2_to_3
ι : Type u_1
I J : Box ι
x y : ι → ℝ
tfae_1_iff_2 : I ≤ J ↔ ↑I ⊆ ↑J
⊢ ↑I ⊆ ↑J → Icc I.lower I.upper ⊆ Icc J.lower J.upper
[PROOFSTEP]
intro h
[GOAL]
case tfae_2_to_3
ι : Type u_1
I J : Box ι
x y : ι → ℝ
tfae_1_iff_2 : I ≤ J ↔ ↑I ⊆ ↑J
h : ↑I ⊆ ↑J
⊢ Icc I.lower I.upper ⊆ Icc J.lower J.upper
[PROOFSTEP]
simpa [coe_eq_pi, closure_pi_set, lower_ne_upper] using closure_mono h
[GOAL]
ι : Type u_1
I J : Box ι
x y : ι → ℝ
tfae_1_iff_2 : I ≤ J ↔ ↑I ⊆ ↑J
tfae_2_to_3 : ↑I ⊆ ↑J → Icc I.lower I.upper ⊆ Icc J.lower J.upper
⊢ List.TFAE [I ≤ J, ↑I ⊆ ↑J, Icc I.lower I.upper ⊆ Icc J.lower J.upper, J.lower ≤ I.lower ∧ I.upper ≤ J.upper]
[PROOFSTEP]
tfae_have 3 ↔ 4
[GOAL]
case tfae_3_iff_4
ι : Type u_1
I J : Box ι
x y : ι → ℝ
tfae_1_iff_2 : I ≤ J ↔ ↑I ⊆ ↑J
tfae_2_to_3 : ↑I ⊆ ↑J → Icc I.lower I.upper ⊆ Icc J.lower J.upper
⊢ Icc I.lower I.upper ⊆ Icc J.lower J.upper ↔ J.lower ≤ I.lower ∧ I.upper ≤ J.upper
ι : Type u_1
I J : Box ι
x y : ι → ℝ
tfae_1_iff_2 : I ≤ J ↔ ↑I ⊆ ↑J
tfae_2_to_3 : ↑I ⊆ ↑J → Icc I.lower I.upper ⊆ Icc J.lower J.upper
tfae_3_iff_4 : Icc I.lower I.upper ⊆ Icc J.lower J.upper ↔ J.lower ≤ I.lower ∧ I.upper ≤ J.upper
⊢ List.TFAE [I ≤ J, ↑I ⊆ ↑J, Icc I.lower I.upper ⊆ Icc J.lower J.upper, J.lower ≤ I.lower ∧ I.upper ≤ J.upper]
[PROOFSTEP]
exact Icc_subset_Icc_iff I.lower_le_upper
[GOAL]
ι : Type u_1
I J : Box ι
x y : ι → ℝ
tfae_1_iff_2 : I ≤ J ↔ ↑I ⊆ ↑J
tfae_2_to_3 : ↑I ⊆ ↑J → Icc I.lower I.upper ⊆ Icc J.lower J.upper
tfae_3_iff_4 : Icc I.lower I.upper ⊆ Icc J.lower J.upper ↔ J.lower ≤ I.lower ∧ I.upper ≤ J.upper
⊢ List.TFAE [I ≤ J, ↑I ⊆ ↑J, Icc I.lower I.upper ⊆ Icc J.lower J.upper, J.lower ≤ I.lower ∧ I.upper ≤ J.upper]
[PROOFSTEP]
tfae_have 4 → 2
[GOAL]
case tfae_4_to_2
ι : Type u_1
I J : Box ι
x y : ι → ℝ
tfae_1_iff_2 : I ≤ J ↔ ↑I ⊆ ↑J
tfae_2_to_3 : ↑I ⊆ ↑J → Icc I.lower I.upper ⊆ Icc J.lower J.upper
tfae_3_iff_4 : Icc I.lower I.upper ⊆ Icc J.lower J.upper ↔ J.lower ≤ I.lower ∧ I.upper ≤ J.upper
⊢ J.lower ≤ I.lower ∧ I.upper ≤ J.upper → ↑I ⊆ ↑J
ι : Type u_1
I J : Box ι
x y : ι → ℝ
tfae_1_iff_2 : I ≤ J ↔ ↑I ⊆ ↑J
tfae_2_to_3 : ↑I ⊆ ↑J → Icc I.lower I.upper ⊆ Icc J.lower J.upper
tfae_3_iff_4 : Icc I.lower I.upper ⊆ Icc J.lower J.upper ↔ J.lower ≤ I.lower ∧ I.upper ≤ J.upper
tfae_4_to_2 : J.lower ≤ I.lower ∧ I.upper ≤ J.upper → ↑I ⊆ ↑J
⊢ List.TFAE [I ≤ J, ↑I ⊆ ↑J, Icc I.lower I.upper ⊆ Icc J.lower J.upper, J.lower ≤ I.lower ∧ I.upper ≤ J.upper]
[PROOFSTEP]
exact fun h x hx i ↦ Ioc_subset_Ioc (h.1 i) (h.2 i) (hx i)
[GOAL]
ι : Type u_1
I J : Box ι
x y : ι → ℝ
tfae_1_iff_2 : I ≤ J ↔ ↑I ⊆ ↑J
tfae_2_to_3 : ↑I ⊆ ↑J → Icc I.lower I.upper ⊆ Icc J.lower J.upper
tfae_3_iff_4 : Icc I.lower I.upper ⊆ Icc J.lower J.upper ↔ J.lower ≤ I.lower ∧ I.upper ≤ J.upper
tfae_4_to_2 : J.lower ≤ I.lower ∧ I.upper ≤ J.upper → ↑I ⊆ ↑J
⊢ List.TFAE [I ≤ J, ↑I ⊆ ↑J, Icc I.lower I.upper ⊆ Icc J.lower J.upper, J.lower ≤ I.lower ∧ I.upper ≤ J.upper]
[PROOFSTEP]
tfae_finish
[GOAL]
ι : Type u_1
I J : Box ι
x y : ι → ℝ
⊢ Injective toSet
[PROOFSTEP]
rintro ⟨l₁, u₁, h₁⟩ ⟨l₂, u₂, h₂⟩ h
[GOAL]
case mk.mk
ι : Type u_1
I J : Box ι
x y l₁ u₁ : ι → ℝ
h₁ : ∀ (i : ι), l₁ i < u₁ i
l₂ u₂ : ι → ℝ
h₂ : ∀ (i : ι), l₂ i < u₂ i
h : ↑{ lower := l₁, upper := u₁, lower_lt_upper := h₁ } = ↑{ lower := l₂, upper := u₂, lower_lt_upper := h₂ }
⊢ { lower := l₁, upper := u₁, lower_lt_upper := h₁ } = { lower := l₂, upper := u₂, lower_lt_upper := h₂ }
[PROOFSTEP]
simp only [Subset.antisymm_iff, coe_subset_coe, le_iff_bounds] at h 
[GOAL]
case mk.mk
ι : Type u_1
I J : Box ι
x y l₁ u₁ : ι → ℝ
h₁ : ∀ (i : ι), l₁ i < u₁ i
l₂ u₂ : ι → ℝ
h₂ : ∀ (i : ι), l₂ i < u₂ i
h : (l₂ ≤ l₁ ∧ u₁ ≤ u₂) ∧ l₁ ≤ l₂ ∧ u₂ ≤ u₁
⊢ { lower := l₁, upper := u₁, lower_lt_upper := h₁ } = { lower := l₂, upper := u₂, lower_lt_upper := h₂ }
[PROOFSTEP]
congr
[GOAL]
case mk.mk.e_lower
ι : Type u_1
I J : Box ι
x y l₁ u₁ : ι → ℝ
h₁ : ∀ (i : ι), l₁ i < u₁ i
l₂ u₂ : ι → ℝ
h₂ : ∀ (i : ι), l₂ i < u₂ i
h : (l₂ ≤ l₁ ∧ u₁ ≤ u₂) ∧ l₁ ≤ l₂ ∧ u₂ ≤ u₁
⊢ l₁ = l₂
case mk.mk.e_upper
ι : Type u_1
I J : Box ι
x y l₁ u₁ : ι → ℝ
h₁ : ∀ (i : ι), l₁ i < u₁ i
l₂ u₂ : ι → ℝ
h₂ : ∀ (i : ι), l₂ i < u₂ i
h : (l₂ ≤ l₁ ∧ u₁ ≤ u₂) ∧ l₁ ≤ l₂ ∧ u₂ ≤ u₁
⊢ u₁ = u₂
[PROOFSTEP]
exacts [le_antisymm h.2.1 h.1.1, le_antisymm h.1.2 h.2.2]
[GOAL]
ι : Type u_1
I J : Box ι
x y : ι → ℝ
⊢ Option.isSome ⊥ = true ↔ Set.Nonempty ↑⊥
[PROOFSTEP]
erw [Option.isSome]
[GOAL]
ι : Type u_1
I J : Box ι
x y : ι → ℝ
⊢ (match ⊥ with
      | some val => true
      | none => false) =
      true ↔
    Set.Nonempty ↑⊥
[PROOFSTEP]
simp
[GOAL]
ι : Type u_1
I✝ J : Box ι
x y : ι → ℝ
I : Box ι
⊢ Option.isSome ↑I = true ↔ Set.Nonempty ↑↑I
[PROOFSTEP]
erw [Option.isSome]
[GOAL]
ι : Type u_1
I✝ J : Box ι
x y : ι → ℝ
I : Box ι
⊢ (match ↑I with
      | some val => true
      | none => false) =
      true ↔
    Set.Nonempty ↑↑I
[PROOFSTEP]
simp [I.nonempty_coe]
[GOAL]
ι : Type u_1
I✝ J : Box ι
x y : ι → ℝ
I : WithBot (Box ι)
⊢ ⋃ (J : Box ι) (_ : ↑J = I), ↑J = ↑I
[PROOFSTEP]
induction I using WithBot.recBotCoe
[GOAL]
case bot
ι : Type u_1
I J : Box ι
x y : ι → ℝ
⊢ ⋃ (J : Box ι) (_ : ↑J = ⊥), ↑J = ↑⊥
[PROOFSTEP]
simp [WithBot.coe_eq_coe]
[GOAL]
case coe
ι : Type u_1
I J : Box ι
x y : ι → ℝ
a✝ : Box ι
⊢ ⋃ (J : Box ι) (_ : ↑J = ↑a✝), ↑J = ↑↑a✝
[PROOFSTEP]
simp [WithBot.coe_eq_coe]
[GOAL]
ι : Type u_1
I✝ J✝ : Box ι
x y : ι → ℝ
I J : WithBot (Box ι)
⊢ ↑I ⊆ ↑J ↔ I ≤ J
[PROOFSTEP]
induction I using WithBot.recBotCoe
[GOAL]
case bot
ι : Type u_1
I J✝ : Box ι
x y : ι → ℝ
J : WithBot (Box ι)
⊢ ↑⊥ ⊆ ↑J ↔ ⊥ ≤ J
[PROOFSTEP]
simp
[GOAL]
case coe
ι : Type u_1
I J✝ : Box ι
x y : ι → ℝ
J : WithBot (Box ι)
a✝ : Box ι
⊢ ↑↑a✝ ⊆ ↑J ↔ ↑a✝ ≤ J
[PROOFSTEP]
induction J using WithBot.recBotCoe
[GOAL]
case coe.bot
ι : Type u_1
I J : Box ι
x y : ι → ℝ
a✝ : Box ι
⊢ ↑↑a✝ ⊆ ↑⊥ ↔ ↑a✝ ≤ ⊥
[PROOFSTEP]
simp [subset_empty_iff]
[GOAL]
case coe.coe
ι : Type u_1
I J : Box ι
x y : ι → ℝ
a✝¹ a✝ : Box ι
⊢ ↑↑a✝¹ ⊆ ↑↑a✝ ↔ ↑a✝¹ ≤ ↑a✝
[PROOFSTEP]
simp [le_def]
[GOAL]
ι : Type u_1
I✝ J✝ : Box ι
x y : ι → ℝ
I J : WithBot (Box ι)
⊢ ↑I = ↑J ↔ I = J
[PROOFSTEP]
simp only [Subset.antisymm_iff, ← le_antisymm_iff, withBotCoe_subset_iff]
[GOAL]
ι : Type u_1
I J : Box ι
x y l u : ι → ℝ
⊢ mk' l u = ⊥ ↔ ∃ i, u i ≤ l i
[PROOFSTEP]
rw [mk']
[GOAL]
ι : Type u_1
I J : Box ι
x y l u : ι → ℝ
⊢ (if h : ∀ (i : ι), l i < u i then ↑{ lower := l, upper := u, lower_lt_upper := h } else ⊥) = ⊥ ↔ ∃ i, u i ≤ l i
[PROOFSTEP]
split_ifs with h
[GOAL]
case pos
ι : Type u_1
I J : Box ι
x y l u : ι → ℝ
h : ∀ (i : ι), l i < u i
⊢ ↑{ lower := l, upper := u, lower_lt_upper := h } = ⊥ ↔ ∃ i, u i ≤ l i
[PROOFSTEP]
simpa using h
[GOAL]
case neg
ι : Type u_1
I J : Box ι
x y l u : ι → ℝ
h : ¬∀ (i : ι), l i < u i
⊢ ⊥ = ⊥ ↔ ∃ i, u i ≤ l i
[PROOFSTEP]
simpa using h
[GOAL]
ι : Type u_1
I J : Box ι
x y l u : ι → ℝ
⊢ mk' l u = ↑I ↔ l = I.lower ∧ u = I.upper
[PROOFSTEP]
cases' I with lI uI hI
[GOAL]
case mk
ι : Type u_1
J : Box ι
x y l u lI uI : ι → ℝ
hI : ∀ (i : ι), lI i < uI i
⊢ mk' l u = ↑{ lower := lI, upper := uI, lower_lt_upper := hI } ↔
    l = { lower := lI, upper := uI, lower_lt_upper := hI }.lower ∧
      u = { lower := lI, upper := uI, lower_lt_upper := hI }.upper
[PROOFSTEP]
rw [mk']
[GOAL]
case mk
ι : Type u_1
J : Box ι
x y l u lI uI : ι → ℝ
hI : ∀ (i : ι), lI i < uI i
⊢ (if h : ∀ (i : ι), l i < u i then ↑{ lower := l, upper := u, lower_lt_upper := h } else ⊥) =
      ↑{ lower := lI, upper := uI, lower_lt_upper := hI } ↔
    l = { lower := lI, upper := uI, lower_lt_upper := hI }.lower ∧
      u = { lower := lI, upper := uI, lower_lt_upper := hI }.upper
[PROOFSTEP]
split_ifs with h
[GOAL]
case pos
ι : Type u_1
J : Box ι
x y l u lI uI : ι → ℝ
hI : ∀ (i : ι), lI i < uI i
h : ∀ (i : ι), l i < u i
⊢ ↑{ lower := l, upper := u, lower_lt_upper := h } = ↑{ lower := lI, upper := uI, lower_lt_upper := hI } ↔
    l = { lower := lI, upper := uI, lower_lt_upper := hI }.lower ∧
      u = { lower := lI, upper := uI, lower_lt_upper := hI }.upper
[PROOFSTEP]
simp [WithBot.coe_eq_coe]
[GOAL]
case neg
ι : Type u_1
J : Box ι
x y l u lI uI : ι → ℝ
hI : ∀ (i : ι), lI i < uI i
h : ¬∀ (i : ι), l i < u i
⊢ ⊥ = ↑{ lower := lI, upper := uI, lower_lt_upper := hI } ↔
    l = { lower := lI, upper := uI, lower_lt_upper := hI }.lower ∧
      u = { lower := lI, upper := uI, lower_lt_upper := hI }.upper
[PROOFSTEP]
suffices l = lI → u ≠ uI by simpa
[GOAL]
ι : Type u_1
J : Box ι
x y l u lI uI : ι → ℝ
hI : ∀ (i : ι), lI i < uI i
h : ¬∀ (i : ι), l i < u i
this : l = lI → u ≠ uI
⊢ ⊥ = ↑{ lower := lI, upper := uI, lower_lt_upper := hI } ↔
    l = { lower := lI, upper := uI, lower_lt_upper := hI }.lower ∧
      u = { lower := lI, upper := uI, lower_lt_upper := hI }.upper
[PROOFSTEP]
simpa
[GOAL]
case neg
ι : Type u_1
J : Box ι
x y l u lI uI : ι → ℝ
hI : ∀ (i : ι), lI i < uI i
h : ¬∀ (i : ι), l i < u i
⊢ l = lI → u ≠ uI
[PROOFSTEP]
rintro rfl rfl
[GOAL]
case neg
ι : Type u_1
J : Box ι
x y l u : ι → ℝ
h : ¬∀ (i : ι), l i < u i
hI : ∀ (i : ι), l i < u i
⊢ False
[PROOFSTEP]
exact h hI
[GOAL]
ι : Type u_1
I J : Box ι
x y l u : ι → ℝ
⊢ ↑(mk' l u) = Set.pi univ fun i => Ioc (l i) (u i)
[PROOFSTEP]
rw [mk']
[GOAL]
ι : Type u_1
I J : Box ι
x y l u : ι → ℝ
⊢ ↑(if h : ∀ (i : ι), l i < u i then ↑{ lower := l, upper := u, lower_lt_upper := h } else ⊥) =
    Set.pi univ fun i => Ioc (l i) (u i)
[PROOFSTEP]
split_ifs with h
[GOAL]
case pos
ι : Type u_1
I J : Box ι
x y l u : ι → ℝ
h : ∀ (i : ι), l i < u i
⊢ ↑↑{ lower := l, upper := u, lower_lt_upper := h } = Set.pi univ fun i => Ioc (l i) (u i)
[PROOFSTEP]
exact coe_eq_pi _
[GOAL]
case neg
ι : Type u_1
I J : Box ι
x y l u : ι → ℝ
h : ¬∀ (i : ι), l i < u i
⊢ ↑⊥ = Set.pi univ fun i => Ioc (l i) (u i)
[PROOFSTEP]
rcases not_forall.mp h with ⟨i, hi⟩
[GOAL]
case neg.intro
ι : Type u_1
I J : Box ι
x y l u : ι → ℝ
h : ¬∀ (i : ι), l i < u i
i : ι
hi : ¬l i < u i
⊢ ↑⊥ = Set.pi univ fun i => Ioc (l i) (u i)
[PROOFSTEP]
rw [coe_bot, univ_pi_eq_empty]
[GOAL]
case neg.intro
ι : Type u_1
I J : Box ι
x y l u : ι → ℝ
h : ¬∀ (i : ι), l i < u i
i : ι
hi : ¬l i < u i
⊢ Ioc (l ?m.301759) (u ?m.301759) = ∅
ι : Type u_1 I J : Box ι x y l u : ι → ℝ h : ¬∀ (i : ι), l i < u i i : ι hi : ¬l i < u i ⊢ ι
[PROOFSTEP]
exact Ioc_eq_empty hi
[GOAL]
ι : Type u_1
I✝ J✝ : Box ι
x y : ι → ℝ
I J : WithBot (Box ι)
⊢ ↑(I ⊓ J) = ↑I ∩ ↑J
[PROOFSTEP]
induction I using WithBot.recBotCoe
[GOAL]
case bot
ι : Type u_1
I J✝ : Box ι
x y : ι → ℝ
J : WithBot (Box ι)
⊢ ↑(⊥ ⊓ J) = ↑⊥ ∩ ↑J
[PROOFSTEP]
change ∅ = _
[GOAL]
case bot
ι : Type u_1
I J✝ : Box ι
x y : ι → ℝ
J : WithBot (Box ι)
⊢ ∅ = ↑⊥ ∩ ↑J
[PROOFSTEP]
simp
[GOAL]
case coe
ι : Type u_1
I J✝ : Box ι
x y : ι → ℝ
J : WithBot (Box ι)
a✝ : Box ι
⊢ ↑(↑a✝ ⊓ J) = ↑↑a✝ ∩ ↑J
[PROOFSTEP]
induction J using WithBot.recBotCoe
[GOAL]
case coe.bot
ι : Type u_1
I J : Box ι
x y : ι → ℝ
a✝ : Box ι
⊢ ↑(↑a✝ ⊓ ⊥) = ↑↑a✝ ∩ ↑⊥
[PROOFSTEP]
change ∅ = _
[GOAL]
case coe.bot
ι : Type u_1
I J : Box ι
x y : ι → ℝ
a✝ : Box ι
⊢ ∅ = ↑↑a✝ ∩ ↑⊥
[PROOFSTEP]
simp
[GOAL]
case coe.coe
ι : Type u_1
I J : Box ι
x y : ι → ℝ
a✝¹ a✝ : Box ι
⊢ ↑(↑a✝¹ ⊓ ↑a✝) = ↑↑a✝¹ ∩ ↑↑a✝
[PROOFSTEP]
change ((mk' _ _ : WithBot (Box ι)) : Set (ι → ℝ)) = _
[GOAL]
case coe.coe
ι : Type u_1
I J : Box ι
x y : ι → ℝ
a✝¹ a✝ : Box ι
⊢ ↑(mk' (fun i => (a✝¹.lower ⊔ a✝.lower) i) fun i => (a✝¹.upper ⊓ a✝.upper) i) = ↑↑a✝¹ ∩ ↑↑a✝
[PROOFSTEP]
simp only [coe_eq_pi, ← pi_inter_distrib, Ioc_inter_Ioc, Pi.sup_apply, Pi.inf_apply, coe_mk', coe_coe]
[GOAL]
ι : Type u_1
I✝ J✝ : Box ι
x y : ι → ℝ
src✝¹ : SemilatticeSup (WithBot (Box ι)) := WithBot.semilatticeSup
src✝ : Inf (WithBot (Box ι)) := WithBot.inf
I J : WithBot (Box ι)
⊢ I ⊓ J ≤ I
[PROOFSTEP]
rw [← withBotCoe_subset_iff, coe_inf]
[GOAL]
ι : Type u_1
I✝ J✝ : Box ι
x y : ι → ℝ
src✝¹ : SemilatticeSup (WithBot (Box ι)) := WithBot.semilatticeSup
src✝ : Inf (WithBot (Box ι)) := WithBot.inf
I J : WithBot (Box ι)
⊢ ↑I ∩ ↑J ⊆ ↑I
[PROOFSTEP]
exact inter_subset_left _ _
[GOAL]
ι : Type u_1
I✝ J✝ : Box ι
x y : ι → ℝ
src✝¹ : SemilatticeSup (WithBot (Box ι)) := WithBot.semilatticeSup
src✝ : Inf (WithBot (Box ι)) := WithBot.inf
I J : WithBot (Box ι)
⊢ I ⊓ J ≤ J
[PROOFSTEP]
rw [← withBotCoe_subset_iff, coe_inf]
[GOAL]
ι : Type u_1
I✝ J✝ : Box ι
x y : ι → ℝ
src✝¹ : SemilatticeSup (WithBot (Box ι)) := WithBot.semilatticeSup
src✝ : Inf (WithBot (Box ι)) := WithBot.inf
I J : WithBot (Box ι)
⊢ ↑I ∩ ↑J ⊆ ↑J
[PROOFSTEP]
exact inter_subset_right _ _
[GOAL]
ι : Type u_1
I✝ J : Box ι
x y : ι → ℝ
src✝¹ : SemilatticeSup (WithBot (Box ι)) := WithBot.semilatticeSup
src✝ : Inf (WithBot (Box ι)) := WithBot.inf
I J₁ J₂ : WithBot (Box ι)
h₁ : I ≤ J₁
h₂ : I ≤ J₂
⊢ I ≤ J₁ ⊓ J₂
[PROOFSTEP]
simp only [← withBotCoe_subset_iff, coe_inf] at *
[GOAL]
ι : Type u_1
I✝ J : Box ι
x y : ι → ℝ
src✝¹ : SemilatticeSup (WithBot (Box ι)) := WithBot.semilatticeSup
src✝ : Inf (WithBot (Box ι)) := WithBot.inf
I J₁ J₂ : WithBot (Box ι)
h₁ : ↑I ⊆ ↑J₁
h₂ : ↑I ⊆ ↑J₂
⊢ ↑I ⊆ ↑J₁ ∩ ↑J₂
[PROOFSTEP]
exact subset_inter h₁ h₂
[GOAL]
ι : Type u_1
I✝ J✝ : Box ι
x y : ι → ℝ
I J : WithBot (Box ι)
⊢ Disjoint ↑I ↑J ↔ Disjoint I J
[PROOFSTEP]
simp only [disjoint_iff_inf_le, ← withBotCoe_subset_iff, coe_inf]
[GOAL]
ι : Type u_1
I✝ J✝ : Box ι
x y : ι → ℝ
I J : WithBot (Box ι)
⊢ ↑I ⊓ ↑J ≤ ⊥ ↔ ↑I ∩ ↑J ⊆ ↑⊥
[PROOFSTEP]
rfl
[GOAL]
ι : Type u_1
I J : Box ι
x y : ι → ℝ
⊢ ¬Disjoint ↑I ↑J ↔ Set.Nonempty (↑I ∩ ↑J)
[PROOFSTEP]
rw [disjoint_coe, Set.not_disjoint_iff_nonempty_inter]
[GOAL]
ι : Type u_1
I✝ J : Box ι
x✝ y : ι → ℝ
n : ℕ
I : Box (Fin (n + 1))
i : Fin (n + 1)
x : ℝ
hx : x ∈ Ioc (lower I i) (upper I i)
⊢ MapsTo (Fin.insertNth i x) ↑(face I i) ↑I
[PROOFSTEP]
intro y hy
[GOAL]
ι : Type u_1
I✝ J : Box ι
x✝ y✝ : ι → ℝ
n : ℕ
I : Box (Fin (n + 1))
i : Fin (n + 1)
x : ℝ
hx : x ∈ Ioc (lower I i) (upper I i)
y : Fin n → ℝ
hy : y ∈ ↑(face I i)
⊢ Fin.insertNth i x y ∈ ↑I
[PROOFSTEP]
simp_rw [mem_coe, mem_def, i.forall_iff_succAbove, Fin.insertNth_apply_same, Fin.insertNth_apply_succAbove]
[GOAL]
ι : Type u_1
I✝ J : Box ι
x✝ y✝ : ι → ℝ
n : ℕ
I : Box (Fin (n + 1))
i : Fin (n + 1)
x : ℝ
hx : x ∈ Ioc (lower I i) (upper I i)
y : Fin n → ℝ
hy : y ∈ ↑(face I i)
⊢ x ∈ Ioc (lower I i) (upper I i) ∧ ∀ (j : Fin n), y j ∈ Ioc (lower I (Fin.succAbove i j)) (upper I (Fin.succAbove i j))
[PROOFSTEP]
exact ⟨hx, hy⟩
[GOAL]
ι : Type u_1
I✝ J : Box ι
x y : ι → ℝ
I : Box ι
⊢ ∃ J,
    (∀ (n : ℕ), ↑Box.Icc (↑J n) ⊆ ↑Box.Ioo I) ∧
      Tendsto (lower ∘ ↑J) atTop (𝓝 I.lower) ∧ Tendsto (upper ∘ ↑J) atTop (𝓝 I.upper)
[PROOFSTEP]
choose a b ha_anti hb_mono ha_mem hb_mem hab ha_tendsto hb_tendsto using fun i ↦
  exists_seq_strictAnti_strictMono_tendsto (I.lower_lt_upper i)
[GOAL]
ι : Type u_1
I✝ J : Box ι
x y : ι → ℝ
I : Box ι
a b : ι → ℕ → ℝ
ha_anti : ∀ (i : ι), StrictAnti (a i)
hb_mono : ∀ (i : ι), StrictMono (b i)
ha_mem : ∀ (i : ι) (k : ℕ), a i k ∈ Ioo (lower I i) (upper I i)
hb_mem : ∀ (i : ι) (l : ℕ), b i l ∈ Ioo (lower I i) (upper I i)
hab : ∀ (i : ι) (k l : ℕ), a i k < b i l
ha_tendsto : ∀ (i : ι), Tendsto (a i) atTop (𝓝 (lower I i))
hb_tendsto : ∀ (i : ι), Tendsto (b i) atTop (𝓝 (upper I i))
⊢ ∃ J,
    (∀ (n : ℕ), ↑Box.Icc (↑J n) ⊆ ↑Box.Ioo I) ∧
      Tendsto (lower ∘ ↑J) atTop (𝓝 I.lower) ∧ Tendsto (upper ∘ ↑J) atTop (𝓝 I.upper)
[PROOFSTEP]
exact
  ⟨⟨fun k ↦ ⟨flip a k, flip b k, fun i ↦ hab _ _ _⟩, fun k l hkl ↦
      le_iff_bounds.2 ⟨fun i ↦ (ha_anti i).antitone hkl, fun i ↦ (hb_mono i).monotone hkl⟩⟩,
    fun n x hx i _ ↦ ⟨(ha_mem _ _).1.trans_le (hx.1 _), (hx.2 _).trans_lt (hb_mem _ _).2⟩, tendsto_pi_nhds.2 ha_tendsto,
    tendsto_pi_nhds.2 hb_tendsto⟩
[GOAL]
ι : Type u_1
I✝ J✝ : Box ι
x y : ι → ℝ
inst✝ : Fintype ι
I J : Box ι
r : ℝ
h : ∀ (i : ι), upper I i - lower I i = (upper J i - lower J i) / r
⊢ distortion I = distortion J
[PROOFSTEP]
simp only [distortion, nndist_pi_def, Real.nndist_eq', h, map_div₀]
[GOAL]
ι : Type u_1
I✝ J✝ : Box ι
x y : ι → ℝ
inst✝ : Fintype ι
I J : Box ι
r : ℝ
h : ∀ (i : ι), upper I i - lower I i = (upper J i - lower J i) / r
⊢ (Finset.sup Finset.univ fun i =>
      (Finset.sup Finset.univ fun b => ↑Real.nnabs (upper J b - lower J b) / ↑Real.nnabs r) /
        (↑Real.nnabs (upper J i - lower J i) / ↑Real.nnabs r)) =
    Finset.sup Finset.univ fun i =>
      (Finset.sup Finset.univ fun b => ↑Real.nnabs (upper J b - lower J b)) / ↑Real.nnabs (upper J i - lower J i)
[PROOFSTEP]
congr 1 with i
[GOAL]
case e_f.h.a
ι : Type u_1
I✝ J✝ : Box ι
x y : ι → ℝ
inst✝ : Fintype ι
I J : Box ι
r : ℝ
h : ∀ (i : ι), upper I i - lower I i = (upper J i - lower J i) / r
i : ι
⊢ ↑((Finset.sup Finset.univ fun b => ↑Real.nnabs (upper J b - lower J b) / ↑Real.nnabs r) /
        (↑Real.nnabs (upper J i - lower J i) / ↑Real.nnabs r)) =
    ↑((Finset.sup Finset.univ fun b => ↑Real.nnabs (upper J b - lower J b)) / ↑Real.nnabs (upper J i - lower J i))
[PROOFSTEP]
have : 0 < r := by
  by_contra hr
  have := div_nonpos_of_nonneg_of_nonpos (sub_nonneg.2 <| J.lower_le_upper i) (not_lt.1 hr)
  rw [← h] at this 
  exact this.not_lt (sub_pos.2 <| I.lower_lt_upper i)
[GOAL]
ι : Type u_1
I✝ J✝ : Box ι
x y : ι → ℝ
inst✝ : Fintype ι
I J : Box ι
r : ℝ
h : ∀ (i : ι), upper I i - lower I i = (upper J i - lower J i) / r
i : ι
⊢ 0 < r
[PROOFSTEP]
by_contra hr
[GOAL]
ι : Type u_1
I✝ J✝ : Box ι
x y : ι → ℝ
inst✝ : Fintype ι
I J : Box ι
r : ℝ
h : ∀ (i : ι), upper I i - lower I i = (upper J i - lower J i) / r
i : ι
hr : ¬0 < r
⊢ False
[PROOFSTEP]
have := div_nonpos_of_nonneg_of_nonpos (sub_nonneg.2 <| J.lower_le_upper i) (not_lt.1 hr)
[GOAL]
ι : Type u_1
I✝ J✝ : Box ι
x y : ι → ℝ
inst✝ : Fintype ι
I J : Box ι
r : ℝ
h : ∀ (i : ι), upper I i - lower I i = (upper J i - lower J i) / r
i : ι
hr : ¬0 < r
this : (upper J i - lower J i) / r ≤ 0
⊢ False
[PROOFSTEP]
rw [← h] at this 
[GOAL]
ι : Type u_1
I✝ J✝ : Box ι
x y : ι → ℝ
inst✝ : Fintype ι
I J : Box ι
r : ℝ
h : ∀ (i : ι), upper I i - lower I i = (upper J i - lower J i) / r
i : ι
hr : ¬0 < r
this : upper I i - lower I i ≤ 0
⊢ False
[PROOFSTEP]
exact this.not_lt (sub_pos.2 <| I.lower_lt_upper i)
[GOAL]
case e_f.h.a
ι : Type u_1
I✝ J✝ : Box ι
x y : ι → ℝ
inst✝ : Fintype ι
I J : Box ι
r : ℝ
h : ∀ (i : ι), upper I i - lower I i = (upper J i - lower J i) / r
i : ι
this : 0 < r
⊢ ↑((Finset.sup Finset.univ fun b => ↑Real.nnabs (upper J b - lower J b) / ↑Real.nnabs r) /
        (↑Real.nnabs (upper J i - lower J i) / ↑Real.nnabs r)) =
    ↑((Finset.sup Finset.univ fun b => ↑Real.nnabs (upper J b - lower J b)) / ↑Real.nnabs (upper J i - lower J i))
[PROOFSTEP]
have hn0 := (map_ne_zero Real.nnabs).2 this.ne'
[GOAL]
case e_f.h.a
ι : Type u_1
I✝ J✝ : Box ι
x y : ι → ℝ
inst✝ : Fintype ι
I J : Box ι
r : ℝ
h : ∀ (i : ι), upper I i - lower I i = (upper J i - lower J i) / r
i : ι
this : 0 < r
hn0 : ↑Real.nnabs r ≠ 0
⊢ ↑((Finset.sup Finset.univ fun b => ↑Real.nnabs (upper J b - lower J b) / ↑Real.nnabs r) /
        (↑Real.nnabs (upper J i - lower J i) / ↑Real.nnabs r)) =
    ↑((Finset.sup Finset.univ fun b => ↑Real.nnabs (upper J b - lower J b)) / ↑Real.nnabs (upper J i - lower J i))
[PROOFSTEP]
simp_rw [NNReal.finset_sup_div, div_div_div_cancel_right _ hn0]
[GOAL]
ι : Type u_1
I✝ J : Box ι
x y : ι → ℝ
inst✝ : Fintype ι
I : Box ι
i : ι
⊢ nndist I.lower I.upper / nndist (lower I i) (upper I i) * nndist (lower I i) (upper I i) ≤
    distortion I * nndist (lower I i) (upper I i)
[PROOFSTEP]
apply mul_le_mul_right'
[GOAL]
case bc
ι : Type u_1
I✝ J : Box ι
x y : ι → ℝ
inst✝ : Fintype ι
I : Box ι
i : ι
⊢ nndist I.lower I.upper / nndist (lower I i) (upper I i) ≤ distortion I
[PROOFSTEP]
apply Finset.le_sup (Finset.mem_univ i)
[GOAL]
ι : Type u_1
I✝ J : Box ι
x y : ι → ℝ
inst✝ : Fintype ι
I : Box ι
i : ι
⊢ dist I.lower I.upper ≤ ↑(distortion I) * (upper I i - lower I i)
[PROOFSTEP]
have A : I.lower i - I.upper i < 0 := sub_neg.2 (I.lower_lt_upper i)
[GOAL]
ι : Type u_1
I✝ J : Box ι
x y : ι → ℝ
inst✝ : Fintype ι
I : Box ι
i : ι
A : lower I i - upper I i < 0
⊢ dist I.lower I.upper ≤ ↑(distortion I) * (upper I i - lower I i)
[PROOFSTEP]
simpa only [← NNReal.coe_le_coe, ← dist_nndist, NNReal.coe_mul, Real.dist_eq, abs_of_neg A, neg_sub] using
  I.nndist_le_distortion_mul i
[GOAL]
ι : Type u_1
I✝ J : Box ι
x✝ y✝ : ι → ℝ
inst✝ : Fintype ι
I : Box ι
i : ι
c : ℝ≥0
h : distortion I ≤ c
this : 0 ≤ ↑c * (upper I i - lower I i)
x : ι → ℝ
hx : x ∈ ↑Box.Icc I
y : ι → ℝ
hy : y ∈ ↑Box.Icc I
⊢ ↑(distortion I) * (upper I i - lower I i) ≤ ↑c * (upper I i - lower I i)
[PROOFSTEP]
gcongr
[GOAL]
case a0
ι : Type u_1
I✝ J : Box ι
x✝ y✝ : ι → ℝ
inst✝ : Fintype ι
I : Box ι
i : ι
c : ℝ≥0
h : distortion I ≤ c
this : 0 ≤ ↑c * (upper I i - lower I i)
x : ι → ℝ
hx : x ∈ ↑Box.Icc I
y : ι → ℝ
hy : y ∈ ↑Box.Icc I
⊢ 0 ≤ upper I i - lower I i
[PROOFSTEP]
exact sub_nonneg.2 (I.lower_le_upper i)
