Theorem: PartialHomeomorph.univUnitBall_apply
File: Mathlib/Analysis/NormedSpace/HomeomorphBall.lean

Proof steps:
state_before: E : Type u_1
inst✝¹ : SeminormedAddCommGroup E
inst✝ : NormedSpace ℝ E
x : E
x✝ : x ∈ univ
⊢ (fun x => (√(1 + ‖x‖ ^ 2))⁻¹ • x) x ∈ ball 0 1
state_after: E : Type u_1
inst✝¹ : SeminormedAddCommGroup E
inst✝ : NormedSpace ℝ E
x : E
x✝ : x ∈ univ
this : 0 < 1 + ‖x‖ ^ 2
⊢ (fun x => (√(1 + ‖x‖ ^ 2))⁻¹ • x) x ∈ ball 0 1
tactic: have : 0 < 1 + ‖x‖ ^ 2 := by positivity
state_before: E : Type u_1
inst✝¹ : SeminormedAddCommGroup E
inst✝ : NormedSpace ℝ E
x : E
x✝ : x ∈ univ
this : 0 < 1 + ‖x‖ ^ 2
⊢ (fun x => (√(1 + ‖x‖ ^ 2))⁻¹ • x) x ∈ ball 0 1
state_after: E : Type u_1
inst✝¹ : SeminormedAddCommGroup E
inst✝ : NormedSpace ℝ E
x : E
x✝ : x ∈ univ
this : 0 < 1 + ‖x‖ ^ 2
⊢ ‖x‖ ^ 2 < 1 + ‖x‖ ^ 2
tactic: rw [mem_ball_zero_iff, norm_smul, Real.norm_eq_abs, abs_inv, ← _root_.div_eq_inv_mul,
      div_lt_one (abs_pos.mpr <| Real.sqrt_ne_zero'.mpr this), ← abs_norm x, ← sq_lt_sq,
      abs_norm, Real.sq_sqrt this.le]
state_before: E : Type u_1
inst✝¹ : SeminormedAddCommGroup E
inst✝ : NormedSpace ℝ E
x : E
x✝ : x ∈ univ
this : 0 < 1 + ‖x‖ ^ 2
⊢ ‖x‖ ^ 2 < 1 + ‖x‖ ^ 2
state_after: no goals
tactic: exact lt_one_add _
state_before: E : Type u_1
inst✝¹ : SeminormedAddCommGroup E
inst✝ : NormedSpace ℝ E
x : E
x✝ : x ∈ univ
⊢ (fun y => (√(1 - ‖y‖ ^ 2))⁻¹ • y) ((fun x => (√(1 + ‖x‖ ^ 2))⁻¹ • x) x) = x
state_after: no goals
tactic: field_simp [norm_smul, smul_smul, (zero_lt_one_add_norm_sq x).ne', sq_abs,
      Real.sq_sqrt (zero_lt_one_add_norm_sq x).le, ← Real.sqrt_div (zero_lt_one_add_norm_sq x).le]
state_before: E : Type u_1
inst✝¹ : SeminormedAddCommGroup E
inst✝ : NormedSpace ℝ E
y : E
hy : y ∈ ball 0 1
⊢ (fun x => (√(1 + ‖x‖ ^ 2))⁻¹ • x) ((fun y => (√(1 - ‖y‖ ^ 2))⁻¹ • y) y) = y
state_after: E : Type u_1
inst✝¹ : SeminormedAddCommGroup E
inst✝ : NormedSpace ℝ E
y : E
hy : y ∈ ball 0 1
this : 0 < 1 - ‖y‖ ^ 2
⊢ (fun x => (√(1 + ‖x‖ ^ 2))⁻¹ • x) ((fun y => (√(1 - ‖y‖ ^ 2))⁻¹ • y) y) = y
tactic: have : 0 < 1 - ‖y‖ ^ 2 := by nlinarith [norm_nonneg y, mem_ball_zero_iff.1 hy]
state_before: E : Type u_1
inst✝¹ : SeminormedAddCommGroup E
inst✝ : NormedSpace ℝ E
y : E
hy : y ∈ ball 0 1
this : 0 < 1 - ‖y‖ ^ 2
⊢ (fun x => (√(1 + ‖x‖ ^ 2))⁻¹ • x) ((fun y => (√(1 - ‖y‖ ^ 2))⁻¹ • y) y) = y
state_after: no goals
tactic: field_simp [norm_smul, smul_smul, this.ne', sq_abs, Real.sq_sqrt this.le,
      ← Real.sqrt_div this.le]
state_before: E : Type u_1
inst✝¹ : SeminormedAddCommGroup E
inst✝ : NormedSpace ℝ E
⊢ ContinuousOn
    ↑{ toFun := fun x => (√(1 + ‖x‖ ^ 2))⁻¹ • x, invFun := fun y => (√(1 - ‖y‖ ^ 2))⁻¹ • y, source := univ,
        target := ball 0 1, map_source' := ⋯, map_target' := ⋯, left_inv' := ⋯, right_inv' := ⋯ }
    { toFun := fun x => (√(1 + ‖x‖ ^ 2))⁻¹ • x, invFun := fun y => (√(1 - ‖y‖ ^ 2))⁻¹ • y, source := univ,
        target := ball 0 1, map_source' := ⋯, map_target' := ⋯, left_inv' := ⋯, right_inv' := ⋯ }.source
state_after: E : Type u_1
inst✝¹ : SeminormedAddCommGroup E
inst✝ : NormedSpace ℝ E
⊢ Continuous fun x => (√(1 + ‖x‖ ^ 2))⁻¹
tactic: suffices Continuous fun (x : E) => (√(1 + ‖x‖ ^ 2))⁻¹
     from (this.smul continuous_id).continuousOn
state_before: E : Type u_1
inst✝¹ : SeminormedAddCommGroup E
inst✝ : NormedSpace ℝ E
⊢ Continuous fun x => (√(1 + ‖x‖ ^ 2))⁻¹
state_after: E : Type u_1
inst✝¹ : SeminormedAddCommGroup E
inst✝ : NormedSpace ℝ E
⊢ Continuous fun x => √(1 + ‖x‖ ^ 2)
tactic: refine Continuous.inv₀ ?_ fun x => Real.sqrt_ne_zero'.mpr (by positivity)
state_before: E : Type u_1
inst✝¹ : SeminormedAddCommGroup E
inst✝ : NormedSpace ℝ E
⊢ Continuous fun x => √(1 + ‖x‖ ^ 2)
state_after: no goals
tactic: continuity
state_before: E : Type u_1
inst✝¹ : SeminormedAddCommGroup E
inst✝ : NormedSpace ℝ E
⊢ ContinuousOn
    { toFun := fun x => (√(1 + ‖x‖ ^ 2))⁻¹ • x, invFun := fun y => (√(1 - ‖y‖ ^ 2))⁻¹ • y, source := univ,
        target := ball 0 1, map_source' := ⋯, map_target' := ⋯, left_inv' := ⋯, right_inv' := ⋯ }.invFun
    { toFun := fun x => (√(1 + ‖x‖ ^ 2))⁻¹ • x, invFun := fun y => (√(1 - ‖y‖ ^ 2))⁻¹ • y, source := univ,
        target := ball 0 1, map_source' := ⋯, map_target' := ⋯, left_inv' := ⋯, right_inv' := ⋯ }.target
state_after: E : Type u_1
inst✝¹ : SeminormedAddCommGroup E
inst✝ : NormedSpace ℝ E
this : ∀ y ∈ ball 0 1, √(1 - ‖y‖ ^ 2) ≠ 0
⊢ ContinuousOn
    { toFun := fun x => (√(1 + ‖x‖ ^ 2))⁻¹ • x, invFun := fun y => (√(1 - ‖y‖ ^ 2))⁻¹ • y, source := univ,
        target := ball 0 1, map_source' := ⋯, map_target' := ⋯, left_inv' := ⋯, right_inv' := ⋯ }.invFun
    { toFun := fun x => (√(1 + ‖x‖ ^ 2))⁻¹ • x, invFun := fun y => (√(1 - ‖y‖ ^ 2))⁻¹ • y, source := univ,
        target := ball 0 1, map_source' := ⋯, map_target' := ⋯, left_inv' := ⋯, right_inv' := ⋯ }.target
tactic: have : ∀ y ∈ ball (0 : E) 1, √(1 - ‖(y : E)‖ ^ 2) ≠ 0 := fun y hy ↦ by
      rw [Real.sqrt_ne_zero']
      nlinarith [norm_nonneg y, mem_ball_zero_iff.1 hy]
state_before: E : Type u_1
inst✝¹ : SeminormedAddCommGroup E
inst✝ : NormedSpace ℝ E
this : ∀ y ∈ ball 0 1, √(1 - ‖y‖ ^ 2) ≠ 0
⊢ ContinuousOn
    { toFun := fun x => (√(1 + ‖x‖ ^ 2))⁻¹ • x, invFun := fun y => (√(1 - ‖y‖ ^ 2))⁻¹ • y, source := univ,
        target := ball 0 1, map_source' := ⋯, map_target' := ⋯, left_inv' := ⋯, right_inv' := ⋯ }.invFun
    { toFun := fun x => (√(1 + ‖x‖ ^ 2))⁻¹ • x, invFun := fun y => (√(1 - ‖y‖ ^ 2))⁻¹ • y, source := univ,
        target := ball 0 1, map_source' := ⋯, map_target' := ⋯, left_inv' := ⋯, right_inv' := ⋯ }.target
state_after: no goals
tactic: exact ContinuousOn.smul (ContinuousOn.inv₀
      (continuousOn_const.sub (continuous_norm.continuousOn.pow _)).sqrt this) continuousOn_id