l3lab/ntp-mathlib huggingface dataset:
@[reassoc, elementwise, simp, nolint simpNF] -- see std4#365 for the simpNF issue
theorem stalkSpecializes_stalkMap {X Y : PresheafedSpace.{_, _, v} C}
    (f : X ⟶ Y) {x y : X} (h : x ⤳ y) :
    Y.presheaf.stalkSpecializes (f.base.map_specializes h) ≫ stalkMap f x =
      stalkMap f y ≫ X.presheaf.stalkSpecializes h := by
  -- Porting note : the original one liner `dsimp [stalkMap]; simp [stalkMap]` doesn't work,
  -- I had to uglify this
  dsimp [stalkSpecializes, stalkMap, stalkFunctor, stalkPushforward]
  -- We can't use `ext` here due to https://github.com/leanprover/std4/pull/159
  refine colimit.hom_ext fun j => ?_
  induction j with | h j => ?_
  dsimp
  simp only [colimit.ι_desc_assoc, comp_obj, op_obj, unop_op, ι_colimMap_assoc, colimit.map_desc,
    OpenNhds.inclusion_obj, pushforwardObj_obj, whiskerLeft_app, OpenNhds.map_obj, whiskerRight_app,
    NatTrans.id_app, map_id, colimit.ι_pre, id_comp, assoc, colimit.pre_desc]
  erw [colimit.ι_desc]
  dsimp
  

Proof state:
case h
C : Type u
inst✝¹ : Category.{v, u} C
inst✝ : HasColimits C
X Y : PresheafedSpace C
f : X ⟶ Y
x y : ↑↑X
h : x ⤳ y
j : OpenNhds (f.base y)
⊢ f.c.app (op j.obj) ≫
      colimit.ι ((OpenNhds.inclusion x).op ⋙ X.presheaf)
        (op { obj := (Opens.map f.base).obj j.obj, property := (_ : f.base x ∈ (op j).unop.obj.carrier) }) =
    f.c.app (op ((OpenNhds.inclusion (f.base y)).obj j)) ≫
      X.presheaf.map (𝟙 (op ((OpenNhds.inclusion y).obj ((OpenNhds.map f.base y).obj j)))) ≫
        colimit.ι ((OpenNhds.inclusion x).op ⋙ X.presheaf)
          (op
            { obj := ((OpenNhds.map f.base y).obj j).obj,
              property := (_ : x ∈ (op ((OpenNhds.map f.base y).obj j)).unop.obj.carrier) })

Next tactic:
erw [X.presheaf.map_id, id_comp]
@[reassoc, elementwise, simp, nolint simpNF] -- see std4#365 for the simpNF issue
theorem stalkSpecializes_stalkMap {X Y : PresheafedSpace.{_, _, v} C}
    (f : X ⟶ Y) {x y : X} (h : x ⤳ y) :
    Y.presheaf.stalkSpecializes (f.base.map_specializes h) ≫ stalkMap f x =
      stalkMap f y ≫ X.presheaf.stalkSpecializes h := by
  -- Porting note : the original one liner `dsimp [stalkMap]; simp [stalkMap]` doesn't work,
  -- I had to uglify this
  dsimp [stalkSpecializes, stalkMap, stalkFunctor, stalkPushforward]
  -- We can't use `ext` here due to https://github.com/leanprover/std4/pull/159
  refine colimit.hom_ext fun j => ?_
  induction j with | h j => ?_
  dsimp
  simp only [colimit.ι_desc_assoc, comp_obj, op_obj, unop_op, ι_colimMap_assoc, colimit.map_desc,
    OpenNhds.inclusion_obj, pushforwardObj_obj, whiskerLeft_app, OpenNhds.map_obj, whiskerRight_app,
    NatTrans.id_app, map_id, colimit.ι_pre, id_comp, assoc, colimit.pre_desc]
  erw [colimit.ι_desc]
  dsimp
  erw [X.presheaf.map_id, id_comp]
  

Proof state:
case h
C : Type u
inst✝¹ : Category.{v, u} C
inst✝ : HasColimits C
X Y : PresheafedSpace C
f : X ⟶ Y
x y : ↑↑X
h : x ⤳ y
j : OpenNhds (f.base y)
⊢ f.c.app (op j.obj) ≫
      colimit.ι ((OpenNhds.inclusion x).op ⋙ X.presheaf)
        (op { obj := (Opens.map f.base).obj j.obj, property := (_ : f.base x ∈ (op j).unop.obj.carrier) }) =
    f.c.app (op ((OpenNhds.inclusion (f.base y)).obj j)) ≫
      colimit.ι ((OpenNhds.inclusion x).op ⋙ X.presheaf)
        (op
          { obj := ((OpenNhds.map f.base y).obj j).obj,
            property := (_ : x ∈ (op ((OpenNhds.map f.base y).obj j)).unop.obj.carrier) })

Next tactic:
rfl
theorem embedding_coe : Embedding ((↑) : ℝ → EReal) :=
  coe_strictMono.embedding_of_ordConnected <| by 

Proof state:
α : Type u_1
inst✝ : TopologicalSpace α
⊢ OrdConnected (range Real.toEReal)

Next tactic:
rw [range_coe_eq_Ioo]
theorem embedding_coe : Embedding ((↑) : ℝ → EReal) :=
  coe_strictMono.embedding_of_ordConnected <| by rw [range_coe_eq_Ioo]; 

Proof state:
α : Type u_1
inst✝ : TopologicalSpace α
⊢ OrdConnected (Ioo ⊥ ⊤)

Next tactic:
exact ordConnected_Ioo
theorem openEmbedding_coe : OpenEmbedding ((↑) : ℝ → EReal) :=
  ⟨embedding_coe, by 

Proof state:
α : Type u_1
inst✝ : TopologicalSpace α
⊢ IsOpen (range Real.toEReal)

Next tactic:
simp only [range_coe_eq_Ioo, isOpen_Ioo]
theorem tendsto_toReal {a : EReal} (ha : a ≠ ⊤) (h'a : a ≠ ⊥) :
    Tendsto EReal.toReal (𝓝 a) (𝓝 a.toReal) := by
  

Proof state:
α : Type u_1
inst✝ : TopologicalSpace α
a : EReal
ha : a ≠ ⊤
h'a : a ≠ ⊥
⊢ Tendsto toReal (𝓝 a) (𝓝 (toReal a))

Next tactic:
lift a to ℝ using ⟨ha, h'a⟩
theorem tendsto_toReal {a : EReal} (ha : a ≠ ⊤) (h'a : a ≠ ⊥) :
    Tendsto EReal.toReal (𝓝 a) (𝓝 a.toReal) := by
  lift a to ℝ using ⟨ha, h'a⟩
  

Proof state:
case intro
α : Type u_1
inst✝ : TopologicalSpace α
a : ℝ
ha : ↑a ≠ ⊤
h'a : ↑a ≠ ⊥
⊢ Tendsto toReal (𝓝 ↑a) (𝓝 (toReal ↑a))

Next tactic:
rw [nhds_coe, tendsto_map'_iff]
theorem tendsto_toReal {a : EReal} (ha : a ≠ ⊤) (h'a : a ≠ ⊥) :
    Tendsto EReal.toReal (𝓝 a) (𝓝 a.toReal) := by
  lift a to ℝ using ⟨ha, h'a⟩
  rw [nhds_coe, tendsto_map'_iff]
  

Proof state:
case intro
α : Type u_1
inst✝ : TopologicalSpace α
a : ℝ
ha : ↑a ≠ ⊤
h'a : ↑a ≠ ⊥
⊢ Tendsto (toReal ∘ Real.toEReal) (𝓝 a) (𝓝 (toReal ↑a))

Next tactic:
exact tendsto_id
theorem embedding_coe_ennreal : Embedding ((↑) : ℝ≥0∞ → EReal) :=
  coe_ennreal_strictMono.embedding_of_ordConnected <| by
    

Proof state:
α : Type u_1
inst✝ : TopologicalSpace α
⊢ OrdConnected (range ENNReal.toEReal)

Next tactic:
rw [range_coe_ennreal]
theorem embedding_coe_ennreal : Embedding ((↑) : ℝ≥0∞ → EReal) :=
  coe_ennreal_strictMono.embedding_of_ordConnected <| by
    rw [range_coe_ennreal]; 

Proof state:
α : Type u_1
inst✝ : TopologicalSpace α
⊢ OrdConnected (Ici 0)

Next tactic:
exact ordConnected_Ici
theorem closedEmbedding_coe_ennreal : ClosedEmbedding ((↑) : ℝ≥0∞ → EReal) :=
  ⟨embedding_coe_ennreal, by 

Proof state:
α : Type u_1
inst✝ : TopologicalSpace α
⊢ IsClosed (range ENNReal.toEReal)

Next tactic:
rw [range_coe_ennreal]
theorem closedEmbedding_coe_ennreal : ClosedEmbedding ((↑) : ℝ≥0∞ → EReal) :=
  ⟨embedding_coe_ennreal, by rw [range_coe_ennreal]; 

Proof state:
α : Type u_1
inst✝ : TopologicalSpace α
⊢ IsClosed (Ici 0)

Next tactic:
exact isClosed_Ici
theorem nhds_top : 𝓝 (⊤ : EReal) = ⨅ (a) (_ : a ≠ ⊤), 𝓟 (Ioi a) :=
  nhds_top_order.trans <| by 

Proof state:
α : Type u_1
inst✝ : TopologicalSpace α
⊢ ⨅ l, ⨅ (_ : l < ⊤), 𝓟 (Ioi l) = ⨅ a, ⨅ (_ : a ≠ ⊤), 𝓟 (Ioi a)

Next tactic:
simp only [lt_top_iff_ne_top]
nonrec theorem nhds_top_basis : (𝓝 (⊤ : EReal)).HasBasis (fun _ : ℝ ↦ True) (Ioi ·) := by
  

Proof state:
α : Type u_1
inst✝ : TopologicalSpace α
⊢ HasBasis (𝓝 ⊤) (fun x => True) fun x => Ioi ↑x

Next tactic:
refine nhds_top_basis.to_hasBasis (fun x hx => ?_) fun _ _ ↦ ⟨_, coe_lt_top _, Subset.rfl⟩
nonrec theorem nhds_top_basis : (𝓝 (⊤ : EReal)).HasBasis (fun _ : ℝ ↦ True) (Ioi ·) := by
  refine nhds_top_basis.to_hasBasis (fun x hx => ?_) fun _ _ ↦ ⟨_, coe_lt_top _, Subset.rfl⟩
  

Proof state:
α : Type u_1
inst✝ : TopologicalSpace α
x : EReal
hx : x < ⊤
⊢ ∃ i', True ∧ Ioi ↑i' ⊆ Ioi x

Next tactic:
rcases exists_rat_btwn_of_lt hx with ⟨y, hxy, -⟩
nonrec theorem nhds_top_basis : (𝓝 (⊤ : EReal)).HasBasis (fun _ : ℝ ↦ True) (Ioi ·) := by
  refine nhds_top_basis.to_hasBasis (fun x hx => ?_) fun _ _ ↦ ⟨_, coe_lt_top _, Subset.rfl⟩
  rcases exists_rat_btwn_of_lt hx with ⟨y, hxy, -⟩
  

Proof state:
case intro.intro
α : Type u_1
inst✝ : TopologicalSpace α
x : EReal
hx : x < ⊤
y : ℚ
hxy : x < ↑↑y
⊢ ∃ i', True ∧ Ioi ↑i' ⊆ Ioi x

Next tactic:
exact ⟨_, trivial, Ioi_subset_Ioi hxy.le⟩
theorem mem_nhds_top_iff {s : Set EReal} : s ∈ 𝓝 (⊤ : EReal) ↔ ∃ y : ℝ, Ioi (y : EReal) ⊆ s :=
  nhds_top_basis.mem_iff.trans <| by 

Proof state:
α : Type u_1
inst✝ : TopologicalSpace α
s : Set EReal
⊢ (∃ i, True ∧ Ioi ↑i ⊆ s) ↔ ∃ y, Ioi ↑y ⊆ s

Next tactic:
simp only [true_and]
theorem tendsto_nhds_top_iff_real {α : Type*} {m : α → EReal} {f : Filter α} :
    Tendsto m f (𝓝 ⊤) ↔ ∀ x : ℝ, ∀ᶠ a in f, ↑x < m a :=
  nhds_top_basis.tendsto_right_iff.trans <| by 

Proof state:
α✝ : Type u_1
inst✝ : TopologicalSpace α✝
α : Type u_2
m : α → EReal
f : Filter α
⊢ (∀ (i : ℝ), True → ∀ᶠ (x : α) in f, m x ∈ Ioi ↑i) ↔ ∀ (x : ℝ), ∀ᶠ (a : α) in f, ↑x < m a

Next tactic:
simp only [true_implies, mem_Ioi]
theorem nhds_bot : 𝓝 (⊥ : EReal) = ⨅ (a) (_ : a ≠ ⊥), 𝓟 (Iio a) :=
  nhds_bot_order.trans <| by 

Proof state:
α : Type u_1
inst✝ : TopologicalSpace α
⊢ ⨅ l, ⨅ (_ : ⊥ < l), 𝓟 (Iio l) = ⨅ a, ⨅ (_ : a ≠ ⊥), 𝓟 (Iio a)

Next tactic:
simp only [bot_lt_iff_ne_bot]
theorem nhds_bot_basis : (𝓝 (⊥ : EReal)).HasBasis (fun _ : ℝ ↦ True) (Iio ·) := by
  

Proof state:
α : Type u_1
inst✝ : TopologicalSpace α
⊢ HasBasis (𝓝 ⊥) (fun x => True) fun x => Iio ↑x

Next tactic:
refine nhds_bot_basis.to_hasBasis (fun x hx => ?_) fun _ _ ↦ ⟨_, bot_lt_coe _, Subset.rfl⟩
theorem nhds_bot_basis : (𝓝 (⊥ : EReal)).HasBasis (fun _ : ℝ ↦ True) (Iio ·) := by
  refine nhds_bot_basis.to_hasBasis (fun x hx => ?_) fun _ _ ↦ ⟨_, bot_lt_coe _, Subset.rfl⟩
  

Proof state:
α : Type u_1
inst✝ : TopologicalSpace α
x : EReal
hx : ⊥ < x
⊢ ∃ i', True ∧ Iio ↑i' ⊆ Iio x

Next tactic:
rcases exists_rat_btwn_of_lt hx with ⟨y, -, hxy⟩
theorem nhds_bot_basis : (𝓝 (⊥ : EReal)).HasBasis (fun _ : ℝ ↦ True) (Iio ·) := by
  refine nhds_bot_basis.to_hasBasis (fun x hx => ?_) fun _ _ ↦ ⟨_, bot_lt_coe _, Subset.rfl⟩
  rcases exists_rat_btwn_of_lt hx with ⟨y, -, hxy⟩
  

Proof state:
case intro.intro
α : Type u_1
inst✝ : TopologicalSpace α
x : EReal
hx : ⊥ < x
y : ℚ
hxy : ↑↑y < x
⊢ ∃ i', True ∧ Iio ↑i' ⊆ Iio x

Next tactic:
exact ⟨_, trivial, Iio_subset_Iio hxy.le⟩
theorem mem_nhds_bot_iff {s : Set EReal} : s ∈ 𝓝 (⊥ : EReal) ↔ ∃ y : ℝ, Iio (y : EReal) ⊆ s :=
  nhds_bot_basis.mem_iff.trans <| by 

Proof state:
α : Type u_1
inst✝ : TopologicalSpace α
s : Set EReal
⊢ (∃ i, True ∧ Iio ↑i ⊆ s) ↔ ∃ y, Iio ↑y ⊆ s

Next tactic:
simp only [true_and]
theorem tendsto_nhds_bot_iff_real {α : Type*} {m : α → EReal} {f : Filter α} :
    Tendsto m f (𝓝 ⊥) ↔ ∀ x : ℝ, ∀ᶠ a in f, m a < x :=
  nhds_bot_basis.tendsto_right_iff.trans <| by 

Proof state:
α✝ : Type u_1
inst✝ : TopologicalSpace α✝
α : Type u_2
m : α → EReal
f : Filter α
⊢ (∀ (i : ℝ), True → ∀ᶠ (x : α) in f, m x ∈ Iio ↑i) ↔ ∀ (x : ℝ), ∀ᶠ (a : α) in f, m a < ↑x

Next tactic:
simp only [true_implies, mem_Iio]
theorem continuousAt_add_coe_coe (a b : ℝ) :
    ContinuousAt (fun p : EReal × EReal => p.1 + p.2) (a, b) := by
  

Proof state:
α : Type u_1
inst✝ : TopologicalSpace α
a b : ℝ
⊢ ContinuousAt (fun p => p.1 + p.2) (↑a, ↑b)

Next tactic:
simp only [ContinuousAt, nhds_coe_coe, ← coe_add, tendsto_map'_iff, (· ∘ ·), tendsto_coe,
    tendsto_add]
theorem continuousAt_add_top_coe (a : ℝ) :
    ContinuousAt (fun p : EReal × EReal => p.1 + p.2) (⊤, a) := by
  

Proof state:
α : Type u_1
inst✝ : TopologicalSpace α
a : ℝ
⊢ ContinuousAt (fun p => p.1 + p.2) (⊤, ↑a)

Next tactic:
simp only [ContinuousAt, tendsto_nhds_top_iff_real, top_add_coe]
theorem continuousAt_add_top_coe (a : ℝ) :
    ContinuousAt (fun p : EReal × EReal => p.1 + p.2) (⊤, a) := by
  simp only [ContinuousAt, tendsto_nhds_top_iff_real, top_add_coe]
  

Proof state:
α : Type u_1
inst✝ : TopologicalSpace α
a : ℝ
⊢ ∀ (x : ℝ), ∀ᶠ (a : EReal × EReal) in 𝓝 (⊤, ↑a), ↑x < a.1 + a.2

Next tactic:
refine fun r ↦ ((lt_mem_nhds (coe_lt_top (r - (a - 1)))).prod_nhds
    (lt_mem_nhds <| EReal.coe_lt_coe_iff.2 <| sub_one_lt _)).mono fun _ h ↦ ?_
theorem continuousAt_add_top_coe (a : ℝ) :
    ContinuousAt (fun p : EReal × EReal => p.1 + p.2) (⊤, a) := by
  simp only [ContinuousAt, tendsto_nhds_top_iff_real, top_add_coe]
  refine fun r ↦ ((lt_mem_nhds (coe_lt_top (r - (a - 1)))).prod_nhds
    (lt_mem_nhds <| EReal.coe_lt_coe_iff.2 <| sub_one_lt _)).mono fun _ h ↦ ?_
  

Proof state:
α : Type u_1
inst✝ : TopologicalSpace α
a r : ℝ
x✝ : EReal × EReal
h : ↑(r - (a - 1)) < x✝.1 ∧ ↑(a - 1) < x✝.2
⊢ ↑r < x✝.1 + x✝.2

Next tactic:
simpa only [← coe_add, sub_add_cancel] using add_lt_add h.1 h.2
theorem continuousAt_add_coe_top (a : ℝ) :
    ContinuousAt (fun p : EReal × EReal => p.1 + p.2) (a, ⊤) := by
  

Proof state:
α : Type u_1
inst✝ : TopologicalSpace α
a : ℝ
⊢ ContinuousAt (fun p => p.1 + p.2) (↑a, ⊤)

Next tactic:
simpa only [add_comm, (· ∘ ·), ContinuousAt, Prod.swap]
    using Tendsto.comp (continuousAt_add_top_coe a) (continuous_swap.tendsto ((a : EReal), ⊤))
theorem continuousAt_add_top_top : ContinuousAt (fun p : EReal × EReal => p.1 + p.2) (⊤, ⊤) := by
  

Proof state:
α : Type u_1
inst✝ : TopologicalSpace α
⊢ ContinuousAt (fun p => p.1 + p.2) (⊤, ⊤)

Next tactic:
simp only [ContinuousAt, tendsto_nhds_top_iff_real, top_add_top]
theorem continuousAt_add_top_top : ContinuousAt (fun p : EReal × EReal => p.1 + p.2) (⊤, ⊤) := by
  simp only [ContinuousAt, tendsto_nhds_top_iff_real, top_add_top]
  

Proof state:
α : Type u_1
inst✝ : TopologicalSpace α
⊢ ∀ (x : ℝ), ∀ᶠ (a : EReal × EReal) in 𝓝 (⊤, ⊤), ↑x < a.1 + a.2

Next tactic:
refine fun r ↦ ((lt_mem_nhds (coe_lt_top 0)).prod_nhds
    (lt_mem_nhds <| coe_lt_top r)).mono fun _ h ↦ ?_
theorem continuousAt_add_top_top : ContinuousAt (fun p : EReal × EReal => p.1 + p.2) (⊤, ⊤) := by
  simp only [ContinuousAt, tendsto_nhds_top_iff_real, top_add_top]
  refine fun r ↦ ((lt_mem_nhds (coe_lt_top 0)).prod_nhds
    (lt_mem_nhds <| coe_lt_top r)).mono fun _ h ↦ ?_
  

Proof state:
α : Type u_1
inst✝ : TopologicalSpace α
r : ℝ
x✝ : EReal × EReal
h : ↑0 < x✝.1 ∧ ↑r < x✝.2
⊢ ↑r < x✝.1 + x✝.2

Next tactic:
simpa only [coe_zero, zero_add] using add_lt_add h.1 h.2
theorem continuousAt_add_bot_coe (a : ℝ) :
    ContinuousAt (fun p : EReal × EReal => p.1 + p.2) (⊥, a) := by
  

Proof state:
α : Type u_1
inst✝ : TopologicalSpace α
a : ℝ
⊢ ContinuousAt (fun p => p.1 + p.2) (⊥, ↑a)

Next tactic:
simp only [ContinuousAt, tendsto_nhds_bot_iff_real, bot_add]
theorem continuousAt_add_bot_coe (a : ℝ) :
    ContinuousAt (fun p : EReal × EReal => p.1 + p.2) (⊥, a) := by
  simp only [ContinuousAt, tendsto_nhds_bot_iff_real, bot_add]
  

Proof state:
α : Type u_1
inst✝ : TopologicalSpace α
a : ℝ
⊢ ∀ (x : ℝ), ∀ᶠ (a : EReal × EReal) in 𝓝 (⊥, ↑a), a.1 + a.2 < ↑x

Next tactic:
refine fun r ↦ ((gt_mem_nhds (bot_lt_coe (r - (a + 1)))).prod_nhds
    (gt_mem_nhds <| EReal.coe_lt_coe_iff.2 <| lt_add_one _)).mono fun _ h ↦ ?_
theorem continuousAt_add_bot_coe (a : ℝ) :
    ContinuousAt (fun p : EReal × EReal => p.1 + p.2) (⊥, a) := by
  simp only [ContinuousAt, tendsto_nhds_bot_iff_real, bot_add]
  refine fun r ↦ ((gt_mem_nhds (bot_lt_coe (r - (a + 1)))).prod_nhds
    (gt_mem_nhds <| EReal.coe_lt_coe_iff.2 <| lt_add_one _)).mono fun _ h ↦ ?_
  

Proof state:
α : Type u_1
inst✝ : TopologicalSpace α
a r : ℝ
x✝ : EReal × EReal
h : x✝.1 < ↑(r - (a + 1)) ∧ x✝.2 < ↑(a + 1)
⊢ x✝.1 + x✝.2 < ↑r

Next tactic:
simpa only [← coe_add, sub_add_cancel] using add_lt_add h.1 h.2
theorem continuousAt_add_coe_bot (a : ℝ) :
    ContinuousAt (fun p : EReal × EReal => p.1 + p.2) (a, ⊥) := by
  

Proof state:
α : Type u_1
inst✝ : TopologicalSpace α
a : ℝ
⊢ ContinuousAt (fun p => p.1 + p.2) (↑a, ⊥)

Next tactic:
simpa only [add_comm, (· ∘ ·), ContinuousAt, Prod.swap]
    using Tendsto.comp (continuousAt_add_bot_coe a) (continuous_swap.tendsto ((a : EReal), ⊥))
theorem continuousAt_add_bot_bot : ContinuousAt (fun p : EReal × EReal => p.1 + p.2) (⊥, ⊥) := by
  

Proof state:
α : Type u_1
inst✝ : TopologicalSpace α
⊢ ContinuousAt (fun p => p.1 + p.2) (⊥, ⊥)

Next tactic:
simp only [ContinuousAt, tendsto_nhds_bot_iff_real, bot_add]
theorem continuousAt_add_bot_bot : ContinuousAt (fun p : EReal × EReal => p.1 + p.2) (⊥, ⊥) := by
  simp only [ContinuousAt, tendsto_nhds_bot_iff_real, bot_add]
  

Proof state:
α : Type u_1
inst✝ : TopologicalSpace α
⊢ ∀ (x : ℝ), ∀ᶠ (a : EReal × EReal) in 𝓝 (⊥, ⊥), a.1 + a.2 < ↑x

Next tactic:
refine fun r ↦ ((gt_mem_nhds (bot_lt_coe 0)).prod_nhds
    (gt_mem_nhds <| bot_lt_coe r)).mono fun _ h ↦ ?_
theorem continuousAt_add_bot_bot : ContinuousAt (fun p : EReal × EReal => p.1 + p.2) (⊥, ⊥) := by
  simp only [ContinuousAt, tendsto_nhds_bot_iff_real, bot_add]
  refine fun r ↦ ((gt_mem_nhds (bot_lt_coe 0)).prod_nhds
    (gt_mem_nhds <| bot_lt_coe r)).mono fun _ h ↦ ?_
  

Proof state:
α : Type u_1
inst✝ : TopologicalSpace α
r : ℝ
x✝ : EReal × EReal
h : x✝.1 < ↑0 ∧ x✝.2 < ↑r
⊢ x✝.1 + x✝.2 < ↑r

Next tactic:
simpa only [coe_zero, zero_add] using add_lt_add h.1 h.2
/-- The addition on `EReal` is continuous except where it doesn't make sense (i.e., at `(⊥, ⊤)`
and at `(⊤, ⊥)`). -/
theorem continuousAt_add {p : EReal × EReal} (h : p.1 ≠ ⊤ ∨ p.2 ≠ ⊥) (h' : p.1 ≠ ⊥ ∨ p.2 ≠ ⊤) :
    ContinuousAt (fun p : EReal × EReal => p.1 + p.2) p := by
  

Proof state:
α : Type u_1
inst✝ : TopologicalSpace α
p : EReal × EReal
h : p.1 ≠ ⊤ ∨ p.2 ≠ ⊥
h' : p.1 ≠ ⊥ ∨ p.2 ≠ ⊤
⊢ ContinuousAt (fun p => p.1 + p.2) p

Next tactic:
rcases p with ⟨x, y⟩
/-- The addition on `EReal` is continuous except where it doesn't make sense (i.e., at `(⊥, ⊤)`
and at `(⊤, ⊥)`). -/
theorem continuousAt_add {p : EReal × EReal} (h : p.1 ≠ ⊤ ∨ p.2 ≠ ⊥) (h' : p.1 ≠ ⊥ ∨ p.2 ≠ ⊤) :
    ContinuousAt (fun p : EReal × EReal => p.1 + p.2) p := by
  rcases p with ⟨x, y⟩
  

Proof state:
case mk
α : Type u_1
inst✝ : TopologicalSpace α
x y : EReal
h : (x, y).1 ≠ ⊤ ∨ (x, y).2 ≠ ⊥
h' : (x, y).1 ≠ ⊥ ∨ (x, y).2 ≠ ⊤
⊢ ContinuousAt (fun p => p.1 + p.2) (x, y)

Next tactic:
induction x using EReal.rec
/-- The addition on `EReal` is continuous except where it doesn't make sense (i.e., at `(⊥, ⊤)`
and at `(⊤, ⊥)`). -/
theorem continuousAt_add {p : EReal × EReal} (h : p.1 ≠ ⊤ ∨ p.2 ≠ ⊥) (h' : p.1 ≠ ⊥ ∨ p.2 ≠ ⊤) :
    ContinuousAt (fun p : EReal × EReal => p.1 + p.2) p := by
  rcases p with ⟨x, y⟩
  induction x using EReal.rec <;> 

Proof state:
case mk.h_bot
α : Type u_1
inst✝ : TopologicalSpace α
y : EReal
h : (⊥, y).1 ≠ ⊤ ∨ (⊥, y).2 ≠ ⊥
h' : (⊥, y).1 ≠ ⊥ ∨ (⊥, y).2 ≠ ⊤
⊢ ContinuousAt (fun p => p.1 + p.2) (⊥, y)

Next tactic:
induction y using EReal.rec
/-- The addition on `EReal` is continuous except where it doesn't make sense (i.e., at `(⊥, ⊤)`
and at `(⊤, ⊥)`). -/
theorem continuousAt_add {p : EReal × EReal} (h : p.1 ≠ ⊤ ∨ p.2 ≠ ⊥) (h' : p.1 ≠ ⊥ ∨ p.2 ≠ ⊤) :
    ContinuousAt (fun p : EReal × EReal => p.1 + p.2) p := by
  rcases p with ⟨x, y⟩
  induction x using EReal.rec <;> 

Proof state:
case mk.h_real
α : Type u_1
inst✝ : TopologicalSpace α
y : EReal
a✝ : ℝ
h : (↑a✝, y).1 ≠ ⊤ ∨ (↑a✝, y).2 ≠ ⊥
h' : (↑a✝, y).1 ≠ ⊥ ∨ (↑a✝, y).2 ≠ ⊤
⊢ ContinuousAt (fun p => p.1 + p.2) (↑a✝, y)

Next tactic:
induction y using EReal.rec
/-- The addition on `EReal` is continuous except where it doesn't make sense (i.e., at `(⊥, ⊤)`
and at `(⊤, ⊥)`). -/
theorem continuousAt_add {p : EReal × EReal} (h : p.1 ≠ ⊤ ∨ p.2 ≠ ⊥) (h' : p.1 ≠ ⊥ ∨ p.2 ≠ ⊤) :
    ContinuousAt (fun p : EReal × EReal => p.1 + p.2) p := by
  rcases p with ⟨x, y⟩
  induction x using EReal.rec <;> 

Proof state:
case mk.h_top
α : Type u_1
inst✝ : TopologicalSpace α
y : EReal
h : (⊤, y).1 ≠ ⊤ ∨ (⊤, y).2 ≠ ⊥
h' : (⊤, y).1 ≠ ⊥ ∨ (⊤, y).2 ≠ ⊤
⊢ ContinuousAt (fun p => p.1 + p.2) (⊤, y)

Next tactic:
induction y using EReal.rec
/-- The addition on `EReal` is continuous except where it doesn't make sense (i.e., at `(⊥, ⊤)`
and at `(⊤, ⊥)`). -/
theorem continuousAt_add {p : EReal × EReal} (h : p.1 ≠ ⊤ ∨ p.2 ≠ ⊥) (h' : p.1 ≠ ⊥ ∨ p.2 ≠ ⊤) :
    ContinuousAt (fun p : EReal × EReal => p.1 + p.2) p := by
  rcases p with ⟨x, y⟩
  induction x using EReal.rec <;> induction y using EReal.rec
  · 

Proof state:
case mk.h_bot.h_bot
α : Type u_1
inst✝ : TopologicalSpace α
h : (⊥, ⊥).1 ≠ ⊤ ∨ (⊥, ⊥).2 ≠ ⊥
h' : (⊥, ⊥).1 ≠ ⊥ ∨ (⊥, ⊥).2 ≠ ⊤
⊢ ContinuousAt (fun p => p.1 + p.2) (⊥, ⊥)

Next tactic:
exact continuousAt_add_bot_bot
/-- The addition on `EReal` is continuous except where it doesn't make sense (i.e., at `(⊥, ⊤)`
and at `(⊤, ⊥)`). -/
theorem continuousAt_add {p : EReal × EReal} (h : p.1 ≠ ⊤ ∨ p.2 ≠ ⊥) (h' : p.1 ≠ ⊥ ∨ p.2 ≠ ⊤) :
    ContinuousAt (fun p : EReal × EReal => p.1 + p.2) p := by
  rcases p with ⟨x, y⟩
  induction x using EReal.rec <;> induction y using EReal.rec
  · exact continuousAt_add_bot_bot
  · 

Proof state:
case mk.h_bot.h_real
α : Type u_1
inst✝ : TopologicalSpace α
a✝ : ℝ
h : (⊥, ↑a✝).1 ≠ ⊤ ∨ (⊥, ↑a✝).2 ≠ ⊥
h' : (⊥, ↑a✝).1 ≠ ⊥ ∨ (⊥, ↑a✝).2 ≠ ⊤
⊢ ContinuousAt (fun p => p.1 + p.2) (⊥, ↑a✝)

Next tactic:
exact continuousAt_add_bot_coe _
/-- The addition on `EReal` is continuous except where it doesn't make sense (i.e., at `(⊥, ⊤)`
and at `(⊤, ⊥)`). -/
theorem continuousAt_add {p : EReal × EReal} (h : p.1 ≠ ⊤ ∨ p.2 ≠ ⊥) (h' : p.1 ≠ ⊥ ∨ p.2 ≠ ⊤) :
    ContinuousAt (fun p : EReal × EReal => p.1 + p.2) p := by
  rcases p with ⟨x, y⟩
  induction x using EReal.rec <;> induction y using EReal.rec
  · exact continuousAt_add_bot_bot
  · exact continuousAt_add_bot_coe _
  · 

Proof state:
case mk.h_bot.h_top
α : Type u_1
inst✝ : TopologicalSpace α
h : (⊥, ⊤).1 ≠ ⊤ ∨ (⊥, ⊤).2 ≠ ⊥
h' : (⊥, ⊤).1 ≠ ⊥ ∨ (⊥, ⊤).2 ≠ ⊤
⊢ ContinuousAt (fun p => p.1 + p.2) (⊥, ⊤)

Next tactic:
simp at h'
/-- The addition on `EReal` is continuous except where it doesn't make sense (i.e., at `(⊥, ⊤)`
and at `(⊤, ⊥)`). -/
theorem continuousAt_add {p : EReal × EReal} (h : p.1 ≠ ⊤ ∨ p.2 ≠ ⊥) (h' : p.1 ≠ ⊥ ∨ p.2 ≠ ⊤) :
    ContinuousAt (fun p : EReal × EReal => p.1 + p.2) p := by
  rcases p with ⟨x, y⟩
  induction x using EReal.rec <;> induction y using EReal.rec
  · exact continuousAt_add_bot_bot
  · exact continuousAt_add_bot_coe _
  · simp at h'
  · 

Proof state:
case mk.h_real.h_bot
α : Type u_1
inst✝ : TopologicalSpace α
a✝ : ℝ
h : (↑a✝, ⊥).1 ≠ ⊤ ∨ (↑a✝, ⊥).2 ≠ ⊥
h' : (↑a✝, ⊥).1 ≠ ⊥ ∨ (↑a✝, ⊥).2 ≠ ⊤
⊢ ContinuousAt (fun p => p.1 + p.2) (↑a✝, ⊥)

Next tactic:
exact continuousAt_add_coe_bot _
/-- The addition on `EReal` is continuous except where it doesn't make sense (i.e., at `(⊥, ⊤)`
and at `(⊤, ⊥)`). -/
theorem continuousAt_add {p : EReal × EReal} (h : p.1 ≠ ⊤ ∨ p.2 ≠ ⊥) (h' : p.1 ≠ ⊥ ∨ p.2 ≠ ⊤) :
    ContinuousAt (fun p : EReal × EReal => p.1 + p.2) p := by
  rcases p with ⟨x, y⟩
  induction x using EReal.rec <;> induction y using EReal.rec
  · exact continuousAt_add_bot_bot
  · exact continuousAt_add_bot_coe _
  · simp at h'
  · exact continuousAt_add_coe_bot _
  · 

Proof state:
case mk.h_real.h_real
α : Type u_1
inst✝ : TopologicalSpace α
a✝¹ a✝ : ℝ
h : (↑a✝¹, ↑a✝).1 ≠ ⊤ ∨ (↑a✝¹, ↑a✝).2 ≠ ⊥
h' : (↑a✝¹, ↑a✝).1 ≠ ⊥ ∨ (↑a✝¹, ↑a✝).2 ≠ ⊤
⊢ ContinuousAt (fun p => p.1 + p.2) (↑a✝¹, ↑a✝)

Next tactic:
exact continuousAt_add_coe_coe _ _
/-- The addition on `EReal` is continuous except where it doesn't make sense (i.e., at `(⊥, ⊤)`
and at `(⊤, ⊥)`). -/
theorem continuousAt_add {p : EReal × EReal} (h : p.1 ≠ ⊤ ∨ p.2 ≠ ⊥) (h' : p.1 ≠ ⊥ ∨ p.2 ≠ ⊤) :
    ContinuousAt (fun p : EReal × EReal => p.1 + p.2) p := by
  rcases p with ⟨x, y⟩
  induction x using EReal.rec <;> induction y using EReal.rec
  · exact continuousAt_add_bot_bot
  · exact continuousAt_add_bot_coe _
  · simp at h'
  · exact continuousAt_add_coe_bot _
  · exact continuousAt_add_coe_coe _ _
  · 

Proof state:
case mk.h_real.h_top
α : Type u_1
inst✝ : TopologicalSpace α
a✝ : ℝ
h : (↑a✝, ⊤).1 ≠ ⊤ ∨ (↑a✝, ⊤).2 ≠ ⊥
h' : (↑a✝, ⊤).1 ≠ ⊥ ∨ (↑a✝, ⊤).2 ≠ ⊤
⊢ ContinuousAt (fun p => p.1 + p.2) (↑a✝, ⊤)

Next tactic:
exact continuousAt_add_coe_top _
/-- The addition on `EReal` is continuous except where it doesn't make sense (i.e., at `(⊥, ⊤)`
and at `(⊤, ⊥)`). -/
theorem continuousAt_add {p : EReal × EReal} (h : p.1 ≠ ⊤ ∨ p.2 ≠ ⊥) (h' : p.1 ≠ ⊥ ∨ p.2 ≠ ⊤) :
    ContinuousAt (fun p : EReal × EReal => p.1 + p.2) p := by
  rcases p with ⟨x, y⟩
  induction x using EReal.rec <;> induction y using EReal.rec
  · exact continuousAt_add_bot_bot
  · exact continuousAt_add_bot_coe _
  · simp at h'
  · exact continuousAt_add_coe_bot _
  · exact continuousAt_add_coe_coe _ _
  · exact continuousAt_add_coe_top _
  · 

Proof state:
case mk.h_top.h_bot
α : Type u_1
inst✝ : TopologicalSpace α
h : (⊤, ⊥).1 ≠ ⊤ ∨ (⊤, ⊥).2 ≠ ⊥
h' : (⊤, ⊥).1 ≠ ⊥ ∨ (⊤, ⊥).2 ≠ ⊤
⊢ ContinuousAt (fun p => p.1 + p.2) (⊤, ⊥)

Next tactic:
simp at h