l3lab/ntp-mathlib huggingface dataset:
/-- The submonoid of pointwise inverse of `S` is `MulEquiv` to `S`. -/
@[to_additive (attr := simps apply) "The additive submonoid of pointwise additive inverse of `S` is
`AddEquiv` to `S`."]
noncomputable def leftInvEquiv : S.leftInv ≃* S :=
  { S.fromCommLeftInv with
    invFun := fun x ↦ by
      

Proof state:
M : Type u_1
inst✝ : CommMonoid M
S : Submonoid M
hS : S ≤ IsUnit.submonoid M
src✝ : ↥(leftInv S) →* ↥S := fromCommLeftInv S
x : ↥S
⊢ ↥(leftInv S)

Next tactic:
choose x' hx using hS x.prop
/-- The submonoid of pointwise inverse of `S` is `MulEquiv` to `S`. -/
@[to_additive (attr := simps apply) "The additive submonoid of pointwise additive inverse of `S` is
`AddEquiv` to `S`."]
noncomputable def leftInvEquiv : S.leftInv ≃* S :=
  { S.fromCommLeftInv with
    invFun := fun x ↦ by
      choose x' hx using hS x.prop
      

Proof state:
M : Type u_1
inst✝ : CommMonoid M
S : Submonoid M
hS : S ≤ IsUnit.submonoid M
src✝ : ↥(leftInv S) →* ↥S := fromCommLeftInv S
x : ↥S
x' : Mˣ
hx : ↑x' = ↑x
⊢ ↥(leftInv S)

Next tactic:
exact ⟨x'.inv, x, hx ▸ x'.inv_val⟩
/-- The submonoid of pointwise inverse of `S` is `MulEquiv` to `S`. -/
@[to_additive (attr := simps apply) "The additive submonoid of pointwise additive inverse of `S` is
`AddEquiv` to `S`."]
noncomputable def leftInvEquiv : S.leftInv ≃* S :=
  { S.fromCommLeftInv with
    invFun := fun x ↦ by
      choose x' hx using hS x.prop
      exact ⟨x'.inv, x, hx ▸ x'.inv_val⟩
    left_inv := fun x ↦
      Subtype.eq <| by
        

Proof state:
M : Type u_1
inst✝ : CommMonoid M
S : Submonoid M
hS : S ≤ IsUnit.submonoid M
src✝ : ↥(leftInv S) →* ↥S := fromCommLeftInv S
x : ↥(leftInv S)
⊢ ↑((fun x =>
          (fun x' hx => { val := x'.inv, property := (_ : ∃ y, x'.inv * ↑y = 1) })
            (Classical.choose (_ : ↑x ∈ IsUnit.submonoid M))
            (_ : ↑(Classical.choose (_ : ↑x ∈ IsUnit.submonoid M)) = ↑x))
        (OneHom.toFun (↑src✝) x)) =
    ↑x

Next tactic:
dsimp only
/-- The submonoid of pointwise inverse of `S` is `MulEquiv` to `S`. -/
@[to_additive (attr := simps apply) "The additive submonoid of pointwise additive inverse of `S` is
`AddEquiv` to `S`."]
noncomputable def leftInvEquiv : S.leftInv ≃* S :=
  { S.fromCommLeftInv with
    invFun := fun x ↦ by
      choose x' hx using hS x.prop
      exact ⟨x'.inv, x, hx ▸ x'.inv_val⟩
    left_inv := fun x ↦
      Subtype.eq <| by
        dsimp only; 

Proof state:
M : Type u_1
inst✝ : CommMonoid M
S : Submonoid M
hS : S ≤ IsUnit.submonoid M
src✝ : ↥(leftInv S) →* ↥S := fromCommLeftInv S
x : ↥(leftInv S)
⊢ (Classical.choose (_ : ↑(OneHom.toFun (↑(fromCommLeftInv S)) x) ∈ IsUnit.submonoid M)).inv = ↑x

Next tactic:
generalize_proofs h
/-- The submonoid of pointwise inverse of `S` is `MulEquiv` to `S`. -/
@[to_additive (attr := simps apply) "The additive submonoid of pointwise additive inverse of `S` is
`AddEquiv` to `S`."]
noncomputable def leftInvEquiv : S.leftInv ≃* S :=
  { S.fromCommLeftInv with
    invFun := fun x ↦ by
      choose x' hx using hS x.prop
      exact ⟨x'.inv, x, hx ▸ x'.inv_val⟩
    left_inv := fun x ↦
      Subtype.eq <| by
        dsimp only; generalize_proofs h; 

Proof state:
M : Type u_1
inst✝ : CommMonoid M
S : Submonoid M
hS : S ≤ IsUnit.submonoid M
src✝ : ↥(leftInv S) →* ↥S := fromCommLeftInv S
x : ↥(leftInv S)
h : ↑(OneHom.toFun (↑(fromCommLeftInv S)) x) ∈ IsUnit.submonoid M
⊢ (Classical.choose h).inv = ↑x

Next tactic:
rw [← h.choose.mul_left_inj]
/-- The submonoid of pointwise inverse of `S` is `MulEquiv` to `S`. -/
@[to_additive (attr := simps apply) "The additive submonoid of pointwise additive inverse of `S` is
`AddEquiv` to `S`."]
noncomputable def leftInvEquiv : S.leftInv ≃* S :=
  { S.fromCommLeftInv with
    invFun := fun x ↦ by
      choose x' hx using hS x.prop
      exact ⟨x'.inv, x, hx ▸ x'.inv_val⟩
    left_inv := fun x ↦
      Subtype.eq <| by
        dsimp only; generalize_proofs h; rw [← h.choose.mul_left_inj]
        

Proof state:
M : Type u_1
inst✝ : CommMonoid M
S : Submonoid M
hS : S ≤ IsUnit.submonoid M
src✝ : ↥(leftInv S) →* ↥S := fromCommLeftInv S
x : ↥(leftInv S)
h : ↑(OneHom.toFun (↑(fromCommLeftInv S)) x) ∈ IsUnit.submonoid M
⊢ (Classical.choose h).inv * ↑(Exists.choose h) = ↑x * ↑(Exists.choose h)

Next tactic:
conv => rhs; rw [h.choose_spec]
/-- The submonoid of pointwise inverse of `S` is `MulEquiv` to `S`. -/
@[to_additive (attr := simps apply) "The additive submonoid of pointwise additive inverse of `S` is
`AddEquiv` to `S`."]
noncomputable def leftInvEquiv : S.leftInv ≃* S :=
  { S.fromCommLeftInv with
    invFun := fun x ↦ by
      choose x' hx using hS x.prop
      exact ⟨x'.inv, x, hx ▸ x'.inv_val⟩
    left_inv := fun x ↦
      Subtype.eq <| by
        dsimp only; generalize_proofs h; rw [← h.choose.mul_left_inj]
        conv => 

Proof state:
M : Type u_1
inst✝ : CommMonoid M
S : Submonoid M
hS : S ≤ IsUnit.submonoid M
src✝ : ↥(leftInv S) →* ↥S := fromCommLeftInv S
x : ↥(leftInv S)
h : ↑(OneHom.toFun (↑(fromCommLeftInv S)) x) ∈ IsUnit.submonoid M
| (Classical.choose h).inv * ↑(Exists.choose h) = ↑x * ↑(Exists.choose h)

Next tactic:
rhs; rw [h.choose_spec]
/-- The submonoid of pointwise inverse of `S` is `MulEquiv` to `S`. -/
@[to_additive (attr := simps apply) "The additive submonoid of pointwise additive inverse of `S` is
`AddEquiv` to `S`."]
noncomputable def leftInvEquiv : S.leftInv ≃* S :=
  { S.fromCommLeftInv with
    invFun := fun x ↦ by
      choose x' hx using hS x.prop
      exact ⟨x'.inv, x, hx ▸ x'.inv_val⟩
    left_inv := fun x ↦
      Subtype.eq <| by
        dsimp only; generalize_proofs h; rw [← h.choose.mul_left_inj]
        conv => 

Proof state:
M : Type u_1
inst✝ : CommMonoid M
S : Submonoid M
hS : S ≤ IsUnit.submonoid M
src✝ : ↥(leftInv S) →* ↥S := fromCommLeftInv S
x : ↥(leftInv S)
h : ↑(OneHom.toFun (↑(fromCommLeftInv S)) x) ∈ IsUnit.submonoid M
| (Classical.choose h).inv * ↑(Exists.choose h) = ↑x * ↑(Exists.choose h)

Next tactic:
rhs
/-- The submonoid of pointwise inverse of `S` is `MulEquiv` to `S`. -/
@[to_additive (attr := simps apply) "The additive submonoid of pointwise additive inverse of `S` is
`AddEquiv` to `S`."]
noncomputable def leftInvEquiv : S.leftInv ≃* S :=
  { S.fromCommLeftInv with
    invFun := fun x ↦ by
      choose x' hx using hS x.prop
      exact ⟨x'.inv, x, hx ▸ x'.inv_val⟩
    left_inv := fun x ↦
      Subtype.eq <| by
        dsimp only; generalize_proofs h; rw [← h.choose.mul_left_inj]
        conv => rhs; 

Proof state:
M : Type u_1
inst✝ : CommMonoid M
S : Submonoid M
hS : S ≤ IsUnit.submonoid M
src✝ : ↥(leftInv S) →* ↥S := fromCommLeftInv S
x : ↥(leftInv S)
h : ↑(OneHom.toFun (↑(fromCommLeftInv S)) x) ∈ IsUnit.submonoid M
| ↑x * ↑(Exists.choose h)

Next tactic:
rw [h.choose_spec]
/-- The submonoid of pointwise inverse of `S` is `MulEquiv` to `S`. -/
@[to_additive (attr := simps apply) "The additive submonoid of pointwise additive inverse of `S` is
`AddEquiv` to `S`."]
noncomputable def leftInvEquiv : S.leftInv ≃* S :=
  { S.fromCommLeftInv with
    invFun := fun x ↦ by
      choose x' hx using hS x.prop
      exact ⟨x'.inv, x, hx ▸ x'.inv_val⟩
    left_inv := fun x ↦
      Subtype.eq <| by
        dsimp only; generalize_proofs h; rw [← h.choose.mul_left_inj]
        conv => rhs; rw [h.choose_spec]
        

Proof state:
M : Type u_1
inst✝ : CommMonoid M
S : Submonoid M
hS : S ≤ IsUnit.submonoid M
src✝ : ↥(leftInv S) →* ↥S := fromCommLeftInv S
x : ↥(leftInv S)
h : ↑(OneHom.toFun (↑(fromCommLeftInv S)) x) ∈ IsUnit.submonoid M
⊢ (Classical.choose h).inv * ↑(Exists.choose h) = ↑x * ↑(OneHom.toFun (↑(fromCommLeftInv S)) x)

Next tactic:
exact h.choose.inv_val.trans (S.mul_fromLeftInv x).symm
/-- The submonoid of pointwise inverse of `S` is `MulEquiv` to `S`. -/
@[to_additive (attr := simps apply) "The additive submonoid of pointwise additive inverse of `S` is
`AddEquiv` to `S`."]
noncomputable def leftInvEquiv : S.leftInv ≃* S :=
  { S.fromCommLeftInv with
    invFun := fun x ↦ by
      choose x' hx using hS x.prop
      exact ⟨x'.inv, x, hx ▸ x'.inv_val⟩
    left_inv := fun x ↦
      Subtype.eq <| by
        dsimp only; generalize_proofs h; rw [← h.choose.mul_left_inj]
        conv => rhs; rw [h.choose_spec]
        exact h.choose.inv_val.trans (S.mul_fromLeftInv x).symm
    right_inv := fun x ↦ by
      

Proof state:
M : Type u_1
inst✝ : CommMonoid M
S : Submonoid M
hS : S ≤ IsUnit.submonoid M
src✝ : ↥(leftInv S) →* ↥S := fromCommLeftInv S
x : ↥S
⊢ OneHom.toFun (↑src✝)
      ((fun x =>
          (fun x' hx => { val := x'.inv, property := (_ : ∃ y, x'.inv * ↑y = 1) })
            (Classical.choose (_ : ↑x ∈ IsUnit.submonoid M))
            (_ : ↑(Classical.choose (_ : ↑x ∈ IsUnit.submonoid M)) = ↑x))
        x) =
    x

Next tactic:
dsimp only [fromCommLeftInv]
/-- The submonoid of pointwise inverse of `S` is `MulEquiv` to `S`. -/
@[to_additive (attr := simps apply) "The additive submonoid of pointwise additive inverse of `S` is
`AddEquiv` to `S`."]
noncomputable def leftInvEquiv : S.leftInv ≃* S :=
  { S.fromCommLeftInv with
    invFun := fun x ↦ by
      choose x' hx using hS x.prop
      exact ⟨x'.inv, x, hx ▸ x'.inv_val⟩
    left_inv := fun x ↦
      Subtype.eq <| by
        dsimp only; generalize_proofs h; rw [← h.choose.mul_left_inj]
        conv => rhs; rw [h.choose_spec]
        exact h.choose.inv_val.trans (S.mul_fromLeftInv x).symm
    right_inv := fun x ↦ by
      dsimp only [fromCommLeftInv]
      

Proof state:
M : Type u_1
inst✝ : CommMonoid M
S : Submonoid M
hS : S ≤ IsUnit.submonoid M
src✝ : ↥(leftInv S) →* ↥S := fromCommLeftInv S
x : ↥S
⊢ fromLeftInv S
      { val := (Classical.choose (_ : ↑x ∈ IsUnit.submonoid M)).inv,
        property := (_ : ∃ y, (Classical.choose (_ : ↑x ∈ IsUnit.submonoid M)).inv * ↑y = 1) } =
    x

Next tactic:
ext
/-- The submonoid of pointwise inverse of `S` is `MulEquiv` to `S`. -/
@[to_additive (attr := simps apply) "The additive submonoid of pointwise additive inverse of `S` is
`AddEquiv` to `S`."]
noncomputable def leftInvEquiv : S.leftInv ≃* S :=
  { S.fromCommLeftInv with
    invFun := fun x ↦ by
      choose x' hx using hS x.prop
      exact ⟨x'.inv, x, hx ▸ x'.inv_val⟩
    left_inv := fun x ↦
      Subtype.eq <| by
        dsimp only; generalize_proofs h; rw [← h.choose.mul_left_inj]
        conv => rhs; rw [h.choose_spec]
        exact h.choose.inv_val.trans (S.mul_fromLeftInv x).symm
    right_inv := fun x ↦ by
      dsimp only [fromCommLeftInv]
      ext
      

Proof state:
case a
M : Type u_1
inst✝ : CommMonoid M
S : Submonoid M
hS : S ≤ IsUnit.submonoid M
src✝ : ↥(leftInv S) →* ↥S := fromCommLeftInv S
x : ↥S
⊢ ↑(fromLeftInv S
        { val := (Classical.choose (_ : ↑x ∈ IsUnit.submonoid M)).inv,
          property := (_ : ∃ y, (Classical.choose (_ : ↑x ∈ IsUnit.submonoid M)).inv * ↑y = 1) }) =
    ↑x

Next tactic:
rw [fromLeftInv_eq_iff]
/-- The submonoid of pointwise inverse of `S` is `MulEquiv` to `S`. -/
@[to_additive (attr := simps apply) "The additive submonoid of pointwise additive inverse of `S` is
`AddEquiv` to `S`."]
noncomputable def leftInvEquiv : S.leftInv ≃* S :=
  { S.fromCommLeftInv with
    invFun := fun x ↦ by
      choose x' hx using hS x.prop
      exact ⟨x'.inv, x, hx ▸ x'.inv_val⟩
    left_inv := fun x ↦
      Subtype.eq <| by
        dsimp only; generalize_proofs h; rw [← h.choose.mul_left_inj]
        conv => rhs; rw [h.choose_spec]
        exact h.choose.inv_val.trans (S.mul_fromLeftInv x).symm
    right_inv := fun x ↦ by
      dsimp only [fromCommLeftInv]
      ext
      rw [fromLeftInv_eq_iff]
      

Proof state:
case a
M : Type u_1
inst✝ : CommMonoid M
S : Submonoid M
hS : S ≤ IsUnit.submonoid M
src✝ : ↥(leftInv S) →* ↥S := fromCommLeftInv S
x : ↥S
⊢ ↑{ val := (Classical.choose (_ : ↑x ∈ IsUnit.submonoid M)).inv,
          property := (_ : ∃ y, (Classical.choose (_ : ↑x ∈ IsUnit.submonoid M)).inv * ↑y = 1) } *
      ↑x =
    1

Next tactic:
convert (hS x.prop).choose.inv_val
/-- The submonoid of pointwise inverse of `S` is `MulEquiv` to `S`. -/
@[to_additive (attr := simps apply) "The additive submonoid of pointwise additive inverse of `S` is
`AddEquiv` to `S`."]
noncomputable def leftInvEquiv : S.leftInv ≃* S :=
  { S.fromCommLeftInv with
    invFun := fun x ↦ by
      choose x' hx using hS x.prop
      exact ⟨x'.inv, x, hx ▸ x'.inv_val⟩
    left_inv := fun x ↦
      Subtype.eq <| by
        dsimp only; generalize_proofs h; rw [← h.choose.mul_left_inj]
        conv => rhs; rw [h.choose_spec]
        exact h.choose.inv_val.trans (S.mul_fromLeftInv x).symm
    right_inv := fun x ↦ by
      dsimp only [fromCommLeftInv]
      ext
      rw [fromLeftInv_eq_iff]
      convert (hS x.prop).choose.inv_val
      

Proof state:
case h.e'_2.h.e'_6
M : Type u_1
inst✝ : CommMonoid M
S : Submonoid M
hS : S ≤ IsUnit.submonoid M
src✝ : ↥(leftInv S) →* ↥S := fromCommLeftInv S
x : ↥S
⊢ ↑x = ↑(Exists.choose (_ : ↑x ∈ IsUnit.submonoid M))

Next tactic:
exact (hS x.prop).choose_spec.symm
@[to_additive]
theorem leftInvEquiv_mul (x : S.leftInv) : (S.leftInvEquiv hS x : M) * x = 1 := by
  

Proof state:
M : Type u_1
inst✝ : CommMonoid M
S : Submonoid M
hS : S ≤ IsUnit.submonoid M
x : ↥(leftInv S)
⊢ ↑((leftInvEquiv S hS) x) * ↑x = 1

Next tactic:
simpa only [leftInvEquiv_apply, fromCommLeftInv] using fromLeftInv_mul S x
@[to_additive]
theorem mul_leftInvEquiv (x : S.leftInv) : (x : M) * S.leftInvEquiv hS x = 1 := by
  

Proof state:
M : Type u_1
inst✝ : CommMonoid M
S : Submonoid M
hS : S ≤ IsUnit.submonoid M
x : ↥(leftInv S)
⊢ ↑x * ↑((leftInvEquiv S hS) x) = 1

Next tactic:
simp only [leftInvEquiv_apply, fromCommLeftInv, mul_fromLeftInv]
@[to_additive (attr := simp)]
theorem leftInvEquiv_symm_mul (x : S) : ((S.leftInvEquiv hS).symm x : M) * x = 1 := by
  

Proof state:
M : Type u_1
inst✝ : CommMonoid M
S : Submonoid M
hS : S ≤ IsUnit.submonoid M
x : ↥S
⊢ ↑((MulEquiv.symm (leftInvEquiv S hS)) x) * ↑x = 1

Next tactic:
convert S.mul_leftInvEquiv hS ((S.leftInvEquiv hS).symm x)
@[to_additive (attr := simp)]
theorem leftInvEquiv_symm_mul (x : S) : ((S.leftInvEquiv hS).symm x : M) * x = 1 := by
  convert S.mul_leftInvEquiv hS ((S.leftInvEquiv hS).symm x)
  

Proof state:
case h.e'_2.h.e'_6.h.e'_3
M : Type u_1
inst✝ : CommMonoid M
S : Submonoid M
hS : S ≤ IsUnit.submonoid M
x : ↥S
⊢ x = (leftInvEquiv S hS) ((MulEquiv.symm (leftInvEquiv S hS)) x)

Next tactic:
simp
@[to_additive (attr := simp)]
theorem mul_leftInvEquiv_symm (x : S) : (x : M) * (S.leftInvEquiv hS).symm x = 1 := by
  

Proof state:
M : Type u_1
inst✝ : CommMonoid M
S : Submonoid M
hS : S ≤ IsUnit.submonoid M
x : ↥S
⊢ ↑x * ↑((MulEquiv.symm (leftInvEquiv S hS)) x) = 1

Next tactic:
convert S.leftInvEquiv_mul hS ((S.leftInvEquiv hS).symm x)
@[to_additive (attr := simp)]
theorem mul_leftInvEquiv_symm (x : S) : (x : M) * (S.leftInvEquiv hS).symm x = 1 := by
  convert S.leftInvEquiv_mul hS ((S.leftInvEquiv hS).symm x)
  

Proof state:
case h.e'_2.h.e'_5.h.e'_3
M : Type u_1
inst✝ : CommMonoid M
S : Submonoid M
hS : S ≤ IsUnit.submonoid M
x : ↥S
⊢ x = (leftInvEquiv S hS) ((MulEquiv.symm (leftInvEquiv S hS)) x)

Next tactic:
simp
@[to_additive (attr := simp)]
theorem fromLeftInv_eq_inv (x : S.leftInv) : (S.fromLeftInv x : M) = (x : M)⁻¹ := by
  

Proof state:
M : Type u_1
inst✝ : Group M
S : Submonoid M
x : ↥(leftInv S)
⊢ ↑(fromLeftInv S x) = (↑x)⁻¹

Next tactic:
rw [← mul_right_inj (x : M), mul_right_inv, mul_fromLeftInv]
@[to_additive (attr := simp)]
theorem leftInvEquiv_symm_eq_inv (x : S) : ((S.leftInvEquiv hS).symm x : M) = (x : M)⁻¹ := by
  

Proof state:
M : Type u_1
inst✝ : CommGroup M
S : Submonoid M
hS : S ≤ IsUnit.submonoid M
x : ↥S
⊢ ↑((MulEquiv.symm (leftInvEquiv S hS)) x) = (↑x)⁻¹

Next tactic:
rw [← mul_right_inj (x : M), mul_right_inv, mul_leftInvEquiv_symm]
theorem continuousOn_ball [NormedSpace ℝ E] {x : E} {r : ℝ} (h : DiffContOnCl 𝕜 f (ball x r)) :
    ContinuousOn f (closedBall x r) := by
  

Proof state:
𝕜 : Type u_1
E : Type u_2
F : Type u_3
G : Type u_4
inst✝⁷ : NontriviallyNormedField 𝕜
inst✝⁶ : NormedAddCommGroup E
inst✝⁵ : NormedAddCommGroup F
inst✝⁴ : NormedSpace 𝕜 E
inst✝³ : NormedSpace 𝕜 F
inst✝² : NormedAddCommGroup G
inst✝¹ : NormedSpace 𝕜 G
f g : E → F
s t : Set E
x✝ : E
inst✝ : NormedSpace ℝ E
x : E
r : ℝ
h : DiffContOnCl 𝕜 f (ball x r)
⊢ ContinuousOn f (closedBall x r)

Next tactic:
rcases eq_or_ne r 0 with (rfl | hr)
theorem continuousOn_ball [NormedSpace ℝ E] {x : E} {r : ℝ} (h : DiffContOnCl 𝕜 f (ball x r)) :
    ContinuousOn f (closedBall x r) := by
  rcases eq_or_ne r 0 with (rfl | hr)
  · 

Proof state:
case inl
𝕜 : Type u_1
E : Type u_2
F : Type u_3
G : Type u_4
inst✝⁷ : NontriviallyNormedField 𝕜
inst✝⁶ : NormedAddCommGroup E
inst✝⁵ : NormedAddCommGroup F
inst✝⁴ : NormedSpace 𝕜 E
inst✝³ : NormedSpace 𝕜 F
inst✝² : NormedAddCommGroup G
inst✝¹ : NormedSpace 𝕜 G
f g : E → F
s t : Set E
x✝ : E
inst✝ : NormedSpace ℝ E
x : E
h : DiffContOnCl 𝕜 f (ball x 0)
⊢ ContinuousOn f (closedBall x 0)

Next tactic:
rw [closedBall_zero]
theorem continuousOn_ball [NormedSpace ℝ E] {x : E} {r : ℝ} (h : DiffContOnCl 𝕜 f (ball x r)) :
    ContinuousOn f (closedBall x r) := by
  rcases eq_or_ne r 0 with (rfl | hr)
  · rw [closedBall_zero]
    

Proof state:
case inl
𝕜 : Type u_1
E : Type u_2
F : Type u_3
G : Type u_4
inst✝⁷ : NontriviallyNormedField 𝕜
inst✝⁶ : NormedAddCommGroup E
inst✝⁵ : NormedAddCommGroup F
inst✝⁴ : NormedSpace 𝕜 E
inst✝³ : NormedSpace 𝕜 F
inst✝² : NormedAddCommGroup G
inst✝¹ : NormedSpace 𝕜 G
f g : E → F
s t : Set E
x✝ : E
inst✝ : NormedSpace ℝ E
x : E
h : DiffContOnCl 𝕜 f (ball x 0)
⊢ ContinuousOn f {x}

Next tactic:
exact continuousOn_singleton f x
theorem continuousOn_ball [NormedSpace ℝ E] {x : E} {r : ℝ} (h : DiffContOnCl 𝕜 f (ball x r)) :
    ContinuousOn f (closedBall x r) := by
  rcases eq_or_ne r 0 with (rfl | hr)
  · rw [closedBall_zero]
    exact continuousOn_singleton f x
  · 

Proof state:
case inr
𝕜 : Type u_1
E : Type u_2
F : Type u_3
G : Type u_4
inst✝⁷ : NontriviallyNormedField 𝕜
inst✝⁶ : NormedAddCommGroup E
inst✝⁵ : NormedAddCommGroup F
inst✝⁴ : NormedSpace 𝕜 E
inst✝³ : NormedSpace 𝕜 F
inst✝² : NormedAddCommGroup G
inst✝¹ : NormedSpace 𝕜 G
f g : E → F
s t : Set E
x✝ : E
inst✝ : NormedSpace ℝ E
x : E
r : ℝ
h : DiffContOnCl 𝕜 f (ball x r)
hr : r ≠ 0
⊢ ContinuousOn f (closedBall x r)

Next tactic:
rw [← closure_ball x hr]
theorem continuousOn_ball [NormedSpace ℝ E] {x : E} {r : ℝ} (h : DiffContOnCl 𝕜 f (ball x r)) :
    ContinuousOn f (closedBall x r) := by
  rcases eq_or_ne r 0 with (rfl | hr)
  · rw [closedBall_zero]
    exact continuousOn_singleton f x
  · rw [← closure_ball x hr]
    

Proof state:
case inr
𝕜 : Type u_1
E : Type u_2
F : Type u_3
G : Type u_4
inst✝⁷ : NontriviallyNormedField 𝕜
inst✝⁶ : NormedAddCommGroup E
inst✝⁵ : NormedAddCommGroup F
inst✝⁴ : NormedSpace 𝕜 E
inst✝³ : NormedSpace 𝕜 F
inst✝² : NormedAddCommGroup G
inst✝¹ : NormedSpace 𝕜 G
f g : E → F
s t : Set E
x✝ : E
inst✝ : NormedSpace ℝ E
x : E
r : ℝ
h : DiffContOnCl 𝕜 f (ball x r)
hr : r ≠ 0
⊢ ContinuousOn f (closure (ball x r))

Next tactic:
exact h.continuousOn
/-- The unit `1 - r⁻¹ • a` constructed from `r • 1 - a` when the latter is a unit. -/
@[simps]
noncomputable def IsUnit.subInvSMul {r : Rˣ} {s : R} {a : A} (h : IsUnit <| r • ↑ₐ s - a) : Aˣ where
  val := ↑ₐ s - r⁻¹ • a
  inv := r • ↑h.unit⁻¹
  val_inv := by 

Proof state:
R : Type u
A : Type v
inst✝² : CommSemiring R
inst✝¹ : Ring A
inst✝ : Algebra R A
r : Rˣ
s : R
a : A
h : IsUnit (r • ↑ₐ s - a)
⊢ (↑ₐ s - r⁻¹ • a) * r • ↑(IsUnit.unit h)⁻¹ = 1

Next tactic:
rw [mul_smul_comm, ← smul_mul_assoc, smul_sub, smul_inv_smul, h.mul_val_inv]
/-- The unit `1 - r⁻¹ • a` constructed from `r • 1 - a` when the latter is a unit. -/
@[simps]
noncomputable def IsUnit.subInvSMul {r : Rˣ} {s : R} {a : A} (h : IsUnit <| r • ↑ₐ s - a) : Aˣ where
  val := ↑ₐ s - r⁻¹ • a
  inv := r • ↑h.unit⁻¹
  val_inv := by rw [mul_smul_comm, ← smul_mul_assoc, smul_sub, smul_inv_smul, h.mul_val_inv]
  inv_val := by 

Proof state:
R : Type u
A : Type v
inst✝² : CommSemiring R
inst✝¹ : Ring A
inst✝ : Algebra R A
r : Rˣ
s : R
a : A
h : IsUnit (r • ↑ₐ s - a)
⊢ r • ↑(IsUnit.unit h)⁻¹ * (↑ₐ s - r⁻¹ • a) = 1

Next tactic:
rw [smul_mul_assoc, ← mul_smul_comm, smul_sub, smul_inv_smul, h.val_inv_mul]
theorem not_mem_iff {r : R} {a : A} : r ∉ σ a ↔ IsUnit (↑ₐ r - a) := by
  

Proof state:
R : Type u
A : Type v
inst✝² : CommSemiring R
inst✝¹ : Ring A
inst✝ : Algebra R A
r : R
a : A
⊢ r ∉ σ a ↔ IsUnit (↑ₐ r - a)

Next tactic:
apply not_iff_not.mp
theorem not_mem_iff {r : R} {a : A} : r ∉ σ a ↔ IsUnit (↑ₐ r - a) := by
  apply not_iff_not.mp
  

Proof state:
R : Type u
A : Type v
inst✝² : CommSemiring R
inst✝¹ : Ring A
inst✝ : Algebra R A
r : R
a : A
⊢ ¬r ∉ σ a ↔ ¬IsUnit (↑ₐ r - a)

Next tactic:
simp [Set.not_not_mem, mem_iff]
theorem zero_mem_iff {a : A} : (0 : R) ∈ σ a ↔ ¬IsUnit a := by
  

Proof state:
R : Type u
A : Type v
inst✝² : CommSemiring R
inst✝¹ : Ring A
inst✝ : Algebra R A
a : A
⊢ 0 ∈ σ a ↔ ¬IsUnit a

Next tactic:
rw [mem_iff, map_zero, zero_sub, IsUnit.neg_iff]
theorem zero_not_mem_iff {a : A} : (0 : R) ∉ σ a ↔ IsUnit a := by
  

Proof state:
R : Type u
A : Type v
inst✝² : CommSemiring R
inst✝¹ : Ring A
inst✝ : Algebra R A
a : A
⊢ 0 ∉ σ a ↔ IsUnit a

Next tactic:
rw [zero_mem_iff, Classical.not_not]
theorem mem_resolventSet_of_left_right_inverse {r : R} {a b c : A} (h₁ : (↑ₐ r - a) * b = 1)
    (h₂ : c * (↑ₐ r - a) = 1) : r ∈ resolventSet R a :=
  Units.isUnit ⟨↑ₐ r - a, b, h₁, by 

Proof state:
R : Type u
A : Type v
inst✝² : CommSemiring R
inst✝¹ : Ring A
inst✝ : Algebra R A
r : R
a b c : A
h₁ : (↑ₐ r - a) * b = 1
h₂ : c * (↑ₐ r - a) = 1
⊢ b * (↑ₐ r - a) = 1

Next tactic:
rwa [← left_inv_eq_right_inv h₂ h₁]
@[simp]
theorem resolventSet_of_subsingleton [Subsingleton A] (a : A) : resolventSet R a = Set.univ := by
  

Proof state:
R : Type u
A : Type v
inst✝³ : CommSemiring R
inst✝² : Ring A
inst✝¹ : Algebra R A
inst✝ : Subsingleton A
a : A
⊢ resolventSet R a = univ

Next tactic:
simp_rw [resolventSet, Subsingleton.elim (algebraMap R A _ - a) 1, isUnit_one, Set.setOf_true]
@[simp]
theorem of_subsingleton [Subsingleton A] (a : A) : spectrum R a = ∅ := by
  

Proof state:
R : Type u
A : Type v
inst✝³ : CommSemiring R
inst✝² : Ring A
inst✝¹ : Algebra R A
inst✝ : Subsingleton A
a : A
⊢ σ a = ∅

Next tactic:
rw [spectrum, resolventSet_of_subsingleton, Set.compl_univ]
theorem units_smul_resolvent {r : Rˣ} {s : R} {a : A} :
    r • resolvent a (s : R) = resolvent (r⁻¹ • a) (r⁻¹ • s : R) := by
  

Proof state:
R : Type u
A : Type v
inst✝² : CommSemiring R
inst✝¹ : Ring A
inst✝ : Algebra R A
r : Rˣ
s : R
a : A
⊢ r • resolvent a s = resolvent (r⁻¹ • a) (r⁻¹ • s)

Next tactic:
by_cases h : s ∈ spectrum R a
theorem units_smul_resolvent {r : Rˣ} {s : R} {a : A} :
    r • resolvent a (s : R) = resolvent (r⁻¹ • a) (r⁻¹ • s : R) := by
  by_cases h : s ∈ spectrum R a
  · 

Proof state:
case pos
R : Type u
A : Type v
inst✝² : CommSemiring R
inst✝¹ : Ring A
inst✝ : Algebra R A
r : Rˣ
s : R
a : A
h : s ∈ σ a
⊢ r • resolvent a s = resolvent (r⁻¹ • a) (r⁻¹ • s)

Next tactic:
rw [mem_iff] at h
theorem units_smul_resolvent {r : Rˣ} {s : R} {a : A} :
    r • resolvent a (s : R) = resolvent (r⁻¹ • a) (r⁻¹ • s : R) := by
  by_cases h : s ∈ spectrum R a
  · rw [mem_iff] at h
    

Proof state:
case pos
R : Type u
A : Type v
inst✝² : CommSemiring R
inst✝¹ : Ring A
inst✝ : Algebra R A
r : Rˣ
s : R
a : A
h : ¬IsUnit (↑ₐ s - a)
⊢ r • resolvent a s = resolvent (r⁻¹ • a) (r⁻¹ • s)

Next tactic:
simp only [resolvent, Algebra.algebraMap_eq_smul_one] at *
theorem units_smul_resolvent {r : Rˣ} {s : R} {a : A} :
    r • resolvent a (s : R) = resolvent (r⁻¹ • a) (r⁻¹ • s : R) := by
  by_cases h : s ∈ spectrum R a
  · rw [mem_iff] at h
    simp only [resolvent, Algebra.algebraMap_eq_smul_one] at *
    

Proof state:
case pos
R : Type u
A : Type v
inst✝² : CommSemiring R
inst✝¹ : Ring A
inst✝ : Algebra R A
r : Rˣ
s : R
a : A
h : ¬IsUnit (s • 1 - a)
⊢ r • Ring.inverse (s • 1 - a) = Ring.inverse ((r⁻¹ • s) • 1 - r⁻¹ • a)

Next tactic:
rw [smul_assoc, ← smul_sub]