Skip to content

Commit 622f41a

Browse files
committed
feat: Tendsto (√·) atTop atTop (#33837)
From [CLT](https://github.com/RemyDegenne/CLT/blob/07a49e97b1c745d306d301200a97c48eeb299205/Clt/CLT.lean#L34). I proved the more strong statements: `map (√·) atTop = atTop` and `comap (√·) atTop = atTop`. While I'm at it, I added a `fun_prop` attr to `Continuous (√·)`. Co-authored-by: Komyyy <pol_tta@outlook.jp>
1 parent 19e41d0 commit 622f41a

1 file changed

Lines changed: 16 additions & 4 deletions

File tree

Mathlib/Data/Real/Sqrt.lean

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -119,12 +119,24 @@ variable {x y : ℝ}
119119
theorem coe_sqrt {x : ℝ≥0} : (NNReal.sqrt x : ℝ) = √(x : ℝ) := by
120120
rw [Real.sqrt, Real.toNNReal_coe]
121121

122-
@[continuity]
123-
theorem continuous_sqrt : Continuous (√· : ℝ → ℝ) := by
122+
@[continuity, fun_prop]
123+
theorem continuous_sqrt : Continuous (√· : ℝ → ℝ) := by unfold sqrt; fun_prop
124+
125+
@[simp]
126+
lemma map_sqrt_atTop : map (√·) atTop = atTop := by
124127
unfold sqrt
125-
exact NNReal.continuous_coe.comp <| NNReal.continuous_sqrt.comp continuous_real_toNNReal
128+
change map (NNReal.toReal ∘ NNReal.sqrt ∘ Real.toNNReal) atTop = atTop
129+
simp [← map_map]
130+
131+
@[simp]
132+
lemma comap_sqrt_atTop : comap (√·) atTop = atTop := by
133+
unfold sqrt
134+
change comap (NNReal.toReal ∘ NNReal.sqrt ∘ Real.toNNReal) atTop = atTop
135+
simp [← comap_comap]
136+
137+
lemma tendsto_sqrt_atTop : Tendsto (√·) atTop atTop := map_sqrt_atTop.le
126138

127-
theorem sqrt_eq_zero_of_nonpos (h : x ≤ 0) : sqrt x = 0 := by simp [sqrt, Real.toNNReal_eq_zero.2 h]
139+
theorem sqrt_eq_zero_of_nonpos (h : x ≤ 0) : x = 0 := by simp [sqrt, Real.toNNReal_eq_zero.2 h]
128140

129141
@[simp] theorem sqrt_nonneg (x : ℝ) : 0 ≤ √x := by
130142
unfold sqrt

0 commit comments

Comments
 (0)