l3lab/ntp-mathlib huggingface dataset:
theorem support_update (p : R[X]) (n : ℕ) (a : R) [Decidable (a = 0)] :
    support (p.update n a) = if a = 0 then p.support.erase n else insert n p.support := by
  classical
    cases p
    

Proof state:
case ofFinsupp
R : Type u
a✝ b : R
m n✝ : ℕ
inst✝¹ : Semiring R
p q : R[X]
n : ℕ
a : R
inst✝ : Decidable (a = 0)
toFinsupp✝ : R[ℕ]
⊢ support (update { toFinsupp := toFinsupp✝ } n a) =
    if a = 0 then Finset.erase (support { toFinsupp := toFinsupp✝ }) n
    else insert n (support { toFinsupp := toFinsupp✝ })

Next tactic:
simp only [support, update, Finsupp.support_update]
theorem support_update (p : R[X]) (n : ℕ) (a : R) [Decidable (a = 0)] :
    support (p.update n a) = if a = 0 then p.support.erase n else insert n p.support := by
  classical
    cases p
    simp only [support, update, Finsupp.support_update]
    

Proof state:
case ofFinsupp
R : Type u
a✝ b : R
m n✝ : ℕ
inst✝¹ : Semiring R
p q : R[X]
n : ℕ
a : R
inst✝ : Decidable (a = 0)
toFinsupp✝ : R[ℕ]
⊢ (if a = 0 then Finset.erase toFinsupp✝.support n else insert n toFinsupp✝.support) =
    if a = 0 then Finset.erase toFinsupp✝.support n else insert n toFinsupp✝.support

Next tactic:
congr
theorem support_update_zero (p : R[X]) (n : ℕ) : support (p.update n 0) = p.support.erase n := by
  

Proof state:
R : Type u
a b : R
m n✝ : ℕ
inst✝ : Semiring R
p✝ q p : R[X]
n : ℕ
⊢ support (update p n 0) = Finset.erase (support p) n

Next tactic:
rw [update_zero_eq_erase, support_erase]
theorem support_update_ne_zero (p : R[X]) (n : ℕ) {a : R} (ha : a ≠ 0) :
    support (p.update n a) = insert n p.support := by 

Proof state:
R : Type u
a✝ b : R
m n✝ : ℕ
inst✝ : Semiring R
p✝ q p : R[X]
n : ℕ
a : R
ha : a ≠ 0
⊢ support (update p n a) = insert n (support p)

Next tactic:
classical rw [support_update, if_neg ha]
theorem support_update_ne_zero (p : R[X]) (n : ℕ) {a : R} (ha : a ≠ 0) :
    support (p.update n a) = insert n p.support := by classical 

Proof state:
R : Type u
a✝ b : R
m n✝ : ℕ
inst✝ : Semiring R
p✝ q p : R[X]
n : ℕ
a : R
ha : a ≠ 0
⊢ support (update p n a) = insert n (support p)

Next tactic:
rw [support_update, if_neg ha]
@[simp]
theorem coeff_neg (p : R[X]) (n : ℕ) : coeff (-p) n = -coeff p n := by
  

Proof state:
R : Type u
a b : R
m n✝ : ℕ
inst✝ : Ring R
p : R[X]
n : ℕ
⊢ coeff (-p) n = -coeff p n

Next tactic:
rcases p with ⟨⟩
@[simp]
theorem coeff_neg (p : R[X]) (n : ℕ) : coeff (-p) n = -coeff p n := by
  rcases p with ⟨⟩
  -- Porting note: The last rule should be `apply`ed.
  

Proof state:
case ofFinsupp
R : Type u
a b : R
m n✝ : ℕ
inst✝ : Ring R
n : ℕ
toFinsupp✝ : R[ℕ]
⊢ coeff (-{ toFinsupp := toFinsupp✝ }) n = -coeff { toFinsupp := toFinsupp✝ } n

Next tactic:
rw [← ofFinsupp_neg, coeff, coeff]
@[simp]
theorem coeff_neg (p : R[X]) (n : ℕ) : coeff (-p) n = -coeff p n := by
  rcases p with ⟨⟩
  -- Porting note: The last rule should be `apply`ed.
  rw [← ofFinsupp_neg, coeff, coeff]; 

Proof state:
case ofFinsupp
R : Type u
a b : R
m n✝ : ℕ
inst✝ : Ring R
n : ℕ
toFinsupp✝ : R[ℕ]
⊢ (match (motive := R[X] → ℕ → R) { toFinsupp := -toFinsupp✝ } with
      | { toFinsupp := p } => ⇑p)
      n =
    -(match (motive := R[X] → ℕ → R) { toFinsupp := toFinsupp✝ } with
        | { toFinsupp := p } => ⇑p)
        n

Next tactic:
apply Finsupp.neg_apply
@[simp]
theorem coeff_sub (p q : R[X]) (n : ℕ) : coeff (p - q) n = coeff p n - coeff q n := by
  

Proof state:
R : Type u
a b : R
m n✝ : ℕ
inst✝ : Ring R
p q : R[X]
n : ℕ
⊢ coeff (p - q) n = coeff p n - coeff q n

Next tactic:
rcases p with ⟨⟩
@[simp]
theorem coeff_sub (p q : R[X]) (n : ℕ) : coeff (p - q) n = coeff p n - coeff q n := by
  rcases p with ⟨⟩
  

Proof state:
case ofFinsupp
R : Type u
a b : R
m n✝ : ℕ
inst✝ : Ring R
q : R[X]
n : ℕ
toFinsupp✝ : R[ℕ]
⊢ coeff ({ toFinsupp := toFinsupp✝ } - q) n = coeff { toFinsupp := toFinsupp✝ } n - coeff q n

Next tactic:
rcases q with ⟨⟩
@[simp]
theorem coeff_sub (p q : R[X]) (n : ℕ) : coeff (p - q) n = coeff p n - coeff q n := by
  rcases p with ⟨⟩
  rcases q with ⟨⟩
  -- Porting note: The last rule should be `apply`ed.
  

Proof state:
case ofFinsupp.ofFinsupp
R : Type u
a b : R
m n✝ : ℕ
inst✝ : Ring R
n : ℕ
toFinsupp✝¹ toFinsupp✝ : R[ℕ]
⊢ coeff ({ toFinsupp := toFinsupp✝¹ } - { toFinsupp := toFinsupp✝ }) n =
    coeff { toFinsupp := toFinsupp✝¹ } n - coeff { toFinsupp := toFinsupp✝ } n

Next tactic:
rw [← ofFinsupp_sub, coeff, coeff, coeff]
@[simp]
theorem coeff_sub (p q : R[X]) (n : ℕ) : coeff (p - q) n = coeff p n - coeff q n := by
  rcases p with ⟨⟩
  rcases q with ⟨⟩
  -- Porting note: The last rule should be `apply`ed.
  rw [← ofFinsupp_sub, coeff, coeff, coeff]; 

Proof state:
case ofFinsupp.ofFinsupp
R : Type u
a b : R
m n✝ : ℕ
inst✝ : Ring R
n : ℕ
toFinsupp✝¹ toFinsupp✝ : R[ℕ]
⊢ (match (motive := R[X] → ℕ → R) { toFinsupp := toFinsupp✝¹ - toFinsupp✝ } with
      | { toFinsupp := p } => ⇑p)
      n =
    (match (motive := R[X] → ℕ → R) { toFinsupp := toFinsupp✝¹ } with
        | { toFinsupp := p } => ⇑p)
        n -
      (match (motive := R[X] → ℕ → R) { toFinsupp := toFinsupp✝ } with
        | { toFinsupp := p } => ⇑p)
        n

Next tactic:
apply Finsupp.sub_apply
theorem monomial_neg (n : ℕ) (a : R) : monomial n (-a) = -monomial n a := by
  

Proof state:
R : Type u
a✝ b : R
m n✝ : ℕ
inst✝ : Ring R
n : ℕ
a : R
⊢ (monomial n) (-a) = -(monomial n) a

Next tactic:
rw [eq_neg_iff_add_eq_zero, ← monomial_add, neg_add_self, monomial_zero_right]
@[simp]
theorem support_neg {p : R[X]} : (-p).support = p.support := by
  

Proof state:
R : Type u
a b : R
m n : ℕ
inst✝ : Ring R
p : R[X]
⊢ support (-p) = support p

Next tactic:
rcases p with ⟨⟩
@[simp]
theorem support_neg {p : R[X]} : (-p).support = p.support := by
  rcases p with ⟨⟩
  -- Porting note: The last rule should be `apply`ed.
  

Proof state:
case ofFinsupp
R : Type u
a b : R
m n : ℕ
inst✝ : Ring R
toFinsupp✝ : R[ℕ]
⊢ support (-{ toFinsupp := toFinsupp✝ }) = support { toFinsupp := toFinsupp✝ }

Next tactic:
rw [← ofFinsupp_neg, support, support]
@[simp]
theorem support_neg {p : R[X]} : (-p).support = p.support := by
  rcases p with ⟨⟩
  -- Porting note: The last rule should be `apply`ed.
  rw [← ofFinsupp_neg, support, support]; 

Proof state:
case ofFinsupp
R : Type u
a b : R
m n : ℕ
inst✝ : Ring R
toFinsupp✝ : R[ℕ]
⊢ (match { toFinsupp := -toFinsupp✝ } with
    | { toFinsupp := p } => p.support) =
    match { toFinsupp := toFinsupp✝ } with
    | { toFinsupp := p } => p.support

Next tactic:
apply Finsupp.support_neg
theorem C_eq_int_cast (n : ℤ) : C (n : R) = n := by 

Proof state:
R : Type u
a b : R
m n✝ : ℕ
inst✝ : Ring R
n : ℤ
⊢ C ↑n = ↑n

Next tactic:
simp
instance nontrivial : Nontrivial R[X] := by
  

Proof state:
R : Type u
a b : R
m n : ℕ
inst✝¹ : Semiring R
inst✝ : Nontrivial R
⊢ Nontrivial R[X]

Next tactic:
have h : Nontrivial R[ℕ] := by infer_instance
instance nontrivial : Nontrivial R[X] := by
  have h : Nontrivial R[ℕ] := by 

Proof state:
R : Type u
a b : R
m n : ℕ
inst✝¹ : Semiring R
inst✝ : Nontrivial R
⊢ Nontrivial R[ℕ]

Next tactic:
infer_instance
instance nontrivial : Nontrivial R[X] := by
  have h : Nontrivial R[ℕ] := by infer_instance
  

Proof state:
R : Type u
a b : R
m n : ℕ
inst✝¹ : Semiring R
inst✝ : Nontrivial R
h : Nontrivial R[ℕ]
⊢ Nontrivial R[X]

Next tactic:
rcases h.exists_pair_ne with ⟨x, y, hxy⟩
instance nontrivial : Nontrivial R[X] := by
  have h : Nontrivial R[ℕ] := by infer_instance
  rcases h.exists_pair_ne with ⟨x, y, hxy⟩
  

Proof state:
case intro.intro
R : Type u
a b : R
m n : ℕ
inst✝¹ : Semiring R
inst✝ : Nontrivial R
h : Nontrivial R[ℕ]
x y : R[ℕ]
hxy : x ≠ y
⊢ Nontrivial R[X]

Next tactic:
refine' ⟨⟨⟨x⟩, ⟨y⟩, _⟩⟩
instance nontrivial : Nontrivial R[X] := by
  have h : Nontrivial R[ℕ] := by infer_instance
  rcases h.exists_pair_ne with ⟨x, y, hxy⟩
  refine' ⟨⟨⟨x⟩, ⟨y⟩, _⟩⟩
  

Proof state:
case intro.intro
R : Type u
a b : R
m n : ℕ
inst✝¹ : Semiring R
inst✝ : Nontrivial R
h : Nontrivial R[ℕ]
x y : R[ℕ]
hxy : x ≠ y
⊢ { toFinsupp := x } ≠ { toFinsupp := y }

Next tactic:
simp [hxy]
theorem X_ne_zero : (X : R[X]) ≠ 0 :=
  mt (congr_arg fun p => coeff p 1) (by 

Proof state:
R : Type u
a b : R
m n : ℕ
inst✝¹ : Semiring R
inst✝ : Nontrivial R
⊢ ¬coeff X 1 = coeff 0 1

Next tactic:
simp
theorem rat_smul_eq_C_mul (a : ℚ) (f : R[X]) : a • f = Polynomial.C (a : R) * f := by
  

Proof state:
R : Type u
a✝ b : R
m n : ℕ
inst✝ : DivisionRing R
a : ℚ
f : R[X]
⊢ a • f = C ↑a * f

Next tactic:
rw [← Rat.smul_one_eq_coe, ← Polynomial.smul_C, C_1, smul_one_mul]
lemma op_norm_mul_flip_apply (a : E) : ‖(mul 𝕜 E).flip a‖ = ‖a‖ := by
  

Proof state:
𝕜 : Type u_1
E : Type u_2
inst✝⁷ : NontriviallyNormedField 𝕜
inst✝⁶ : NonUnitalNormedRing E
inst✝⁵ : StarRing E
inst✝⁴ : NormedStarGroup E
inst✝³ : NormedSpace 𝕜 E
inst✝² : IsScalarTower 𝕜 E E
inst✝¹ : SMulCommClass 𝕜 E E
inst✝ : RegularNormedAlgebra 𝕜 E
a : E
⊢ ‖(flip (mul 𝕜 E)) a‖ = ‖a‖

Next tactic:
refine le_antisymm
    (op_norm_le_bound _ (norm_nonneg _) fun b => by simpa only [mul_comm] using norm_mul_le b a) ?_
lemma op_norm_mul_flip_apply (a : E) : ‖(mul 𝕜 E).flip a‖ = ‖a‖ := by
  refine le_antisymm
    (op_norm_le_bound _ (norm_nonneg _) fun b => by 

Proof state:
𝕜 : Type u_1
E : Type u_2
inst✝⁷ : NontriviallyNormedField 𝕜
inst✝⁶ : NonUnitalNormedRing E
inst✝⁵ : StarRing E
inst✝⁴ : NormedStarGroup E
inst✝³ : NormedSpace 𝕜 E
inst✝² : IsScalarTower 𝕜 E E
inst✝¹ : SMulCommClass 𝕜 E E
inst✝ : RegularNormedAlgebra 𝕜 E
a b : E
⊢ ‖((flip (mul 𝕜 E)) a) b‖ ≤ ‖a‖ * ‖b‖

Next tactic:
simpa only [mul_comm] using norm_mul_le b a
lemma op_norm_mul_flip_apply (a : E) : ‖(mul 𝕜 E).flip a‖ = ‖a‖ := by
  refine le_antisymm
    (op_norm_le_bound _ (norm_nonneg _) fun b => by simpa only [mul_comm] using norm_mul_le b a) ?_
  

Proof state:
𝕜 : Type u_1
E : Type u_2
inst✝⁷ : NontriviallyNormedField 𝕜
inst✝⁶ : NonUnitalNormedRing E
inst✝⁵ : StarRing E
inst✝⁴ : NormedStarGroup E
inst✝³ : NormedSpace 𝕜 E
inst✝² : IsScalarTower 𝕜 E E
inst✝¹ : SMulCommClass 𝕜 E E
inst✝ : RegularNormedAlgebra 𝕜 E
a : E
⊢ ‖a‖ ≤ ‖(flip (mul 𝕜 E)) a‖

Next tactic:
suffices ‖mul 𝕜 E (star a)‖ ≤ ‖(mul 𝕜 E).flip a‖ by simpa using this
lemma op_norm_mul_flip_apply (a : E) : ‖(mul 𝕜 E).flip a‖ = ‖a‖ := by
  refine le_antisymm
    (op_norm_le_bound _ (norm_nonneg _) fun b => by simpa only [mul_comm] using norm_mul_le b a) ?_
  suffices ‖mul 𝕜 E (star a)‖ ≤ ‖(mul 𝕜 E).flip a‖ by 

Proof state:
𝕜 : Type u_1
E : Type u_2
inst✝⁷ : NontriviallyNormedField 𝕜
inst✝⁶ : NonUnitalNormedRing E
inst✝⁵ : StarRing E
inst✝⁴ : NormedStarGroup E
inst✝³ : NormedSpace 𝕜 E
inst✝² : IsScalarTower 𝕜 E E
inst✝¹ : SMulCommClass 𝕜 E E
inst✝ : RegularNormedAlgebra 𝕜 E
a : E
this : ‖(mul 𝕜 E) a⋆‖ ≤ ‖(flip (mul 𝕜 E)) a‖
⊢ ‖a‖ ≤ ‖(flip (mul 𝕜 E)) a‖

Next tactic:
simpa using this
lemma op_norm_mul_flip_apply (a : E) : ‖(mul 𝕜 E).flip a‖ = ‖a‖ := by
  refine le_antisymm
    (op_norm_le_bound _ (norm_nonneg _) fun b => by simpa only [mul_comm] using norm_mul_le b a) ?_
  suffices ‖mul 𝕜 E (star a)‖ ≤ ‖(mul 𝕜 E).flip a‖ by simpa using this
  

Proof state:
𝕜 : Type u_1
E : Type u_2
inst✝⁷ : NontriviallyNormedField 𝕜
inst✝⁶ : NonUnitalNormedRing E
inst✝⁵ : StarRing E
inst✝⁴ : NormedStarGroup E
inst✝³ : NormedSpace 𝕜 E
inst✝² : IsScalarTower 𝕜 E E
inst✝¹ : SMulCommClass 𝕜 E E
inst✝ : RegularNormedAlgebra 𝕜 E
a : E
⊢ ‖(mul 𝕜 E) a⋆‖ ≤ ‖(flip (mul 𝕜 E)) a‖

Next tactic:
refine op_norm_le_bound _ (norm_nonneg _) fun b => ?_
lemma op_norm_mul_flip_apply (a : E) : ‖(mul 𝕜 E).flip a‖ = ‖a‖ := by
  refine le_antisymm
    (op_norm_le_bound _ (norm_nonneg _) fun b => by simpa only [mul_comm] using norm_mul_le b a) ?_
  suffices ‖mul 𝕜 E (star a)‖ ≤ ‖(mul 𝕜 E).flip a‖ by simpa using this
  refine op_norm_le_bound _ (norm_nonneg _) fun b => ?_
  

Proof state:
𝕜 : Type u_1
E : Type u_2
inst✝⁷ : NontriviallyNormedField 𝕜
inst✝⁶ : NonUnitalNormedRing E
inst✝⁵ : StarRing E
inst✝⁴ : NormedStarGroup E
inst✝³ : NormedSpace 𝕜 E
inst✝² : IsScalarTower 𝕜 E E
inst✝¹ : SMulCommClass 𝕜 E E
inst✝ : RegularNormedAlgebra 𝕜 E
a b : E
⊢ ‖((mul 𝕜 E) a⋆) b‖ ≤ ‖(flip (mul 𝕜 E)) a‖ * ‖b‖

Next tactic:
calc ‖mul 𝕜 E (star a) b‖ = ‖(mul 𝕜 E).flip a (star b)‖ := by simpa using norm_star (star b * a)
    _ ≤ ‖(mul 𝕜 E).flip a‖ * ‖b‖ := by simpa using le_op_norm ((mul 𝕜 E).flip a) (star b)
lemma op_norm_mul_flip_apply (a : E) : ‖(mul 𝕜 E).flip a‖ = ‖a‖ := by
  refine le_antisymm
    (op_norm_le_bound _ (norm_nonneg _) fun b => by simpa only [mul_comm] using norm_mul_le b a) ?_
  suffices ‖mul 𝕜 E (star a)‖ ≤ ‖(mul 𝕜 E).flip a‖ by simpa using this
  refine op_norm_le_bound _ (norm_nonneg _) fun b => ?_
  calc ‖mul 𝕜 E (star a) b‖ = ‖(mul 𝕜 E).flip a (star b)‖ := by 

Proof state:
𝕜 : Type u_1
E : Type u_2
inst✝⁷ : NontriviallyNormedField 𝕜
inst✝⁶ : NonUnitalNormedRing E
inst✝⁵ : StarRing E
inst✝⁴ : NormedStarGroup E
inst✝³ : NormedSpace 𝕜 E
inst✝² : IsScalarTower 𝕜 E E
inst✝¹ : SMulCommClass 𝕜 E E
inst✝ : RegularNormedAlgebra 𝕜 E
a b : E
⊢ ‖((mul 𝕜 E) a⋆) b‖ = ‖((flip (mul 𝕜 E)) a) b⋆‖

Next tactic:
simpa using norm_star (star b * a)
lemma op_norm_mul_flip_apply (a : E) : ‖(mul 𝕜 E).flip a‖ = ‖a‖ := by
  refine le_antisymm
    (op_norm_le_bound _ (norm_nonneg _) fun b => by simpa only [mul_comm] using norm_mul_le b a) ?_
  suffices ‖mul 𝕜 E (star a)‖ ≤ ‖(mul 𝕜 E).flip a‖ by simpa using this
  refine op_norm_le_bound _ (norm_nonneg _) fun b => ?_
  calc ‖mul 𝕜 E (star a) b‖ = ‖(mul 𝕜 E).flip a (star b)‖ := by simpa using norm_star (star b * a)
    _ ≤ ‖(mul 𝕜 E).flip a‖ * ‖b‖ := by 

Proof state:
𝕜 : Type u_1
E : Type u_2
inst✝⁷ : NontriviallyNormedField 𝕜
inst✝⁶ : NonUnitalNormedRing E
inst✝⁵ : StarRing E
inst✝⁴ : NormedStarGroup E
inst✝³ : NormedSpace 𝕜 E
inst✝² : IsScalarTower 𝕜 E E
inst✝¹ : SMulCommClass 𝕜 E E
inst✝ : RegularNormedAlgebra 𝕜 E
a b : E
⊢ ‖((flip (mul 𝕜 E)) a) b⋆‖ ≤ ‖(flip (mul 𝕜 E)) a‖ * ‖b‖

Next tactic:
simpa using le_op_norm ((mul 𝕜 E).flip a) (star b)
/-- A C⋆-algebra over a densely normed field is a regular normed algebra. -/
instance CstarRing.instRegularNormedAlgebra : RegularNormedAlgebra 𝕜 E where
  isometry_mul' := AddMonoidHomClass.isometry_of_norm (mul 𝕜 E) fun a => NNReal.eq_iff.mpr <|
    show ‖mul 𝕜 E a‖₊ = ‖a‖₊ by
    

Proof state:
𝕜 : Type u_1
E : Type u_2
inst✝⁶ : DenselyNormedField 𝕜
inst✝⁵ : NonUnitalNormedRing E
inst✝⁴ : StarRing E
inst✝³ : CstarRing E
inst✝² : NormedSpace 𝕜 E
inst✝¹ : IsScalarTower 𝕜 E E
inst✝ : SMulCommClass 𝕜 E E
a : E
⊢ ‖(mul 𝕜 E) a‖₊ = ‖a‖₊

Next tactic:
rw [← sSup_closed_unit_ball_eq_nnnorm]
/-- A C⋆-algebra over a densely normed field is a regular normed algebra. -/
instance CstarRing.instRegularNormedAlgebra : RegularNormedAlgebra 𝕜 E where
  isometry_mul' := AddMonoidHomClass.isometry_of_norm (mul 𝕜 E) fun a => NNReal.eq_iff.mpr <|
    show ‖mul 𝕜 E a‖₊ = ‖a‖₊ by
    rw [← sSup_closed_unit_ball_eq_nnnorm]
    

Proof state:
𝕜 : Type u_1
E : Type u_2
inst✝⁶ : DenselyNormedField 𝕜
inst✝⁵ : NonUnitalNormedRing E
inst✝⁴ : StarRing E
inst✝³ : CstarRing E
inst✝² : NormedSpace 𝕜 E
inst✝¹ : IsScalarTower 𝕜 E E
inst✝ : SMulCommClass 𝕜 E E
a : E
⊢ sSup ((fun x => ‖((mul 𝕜 E) a) x‖₊) '' Metric.closedBall 0 1) = ‖a‖₊

Next tactic:
refine' csSup_eq_of_forall_le_of_forall_lt_exists_gt _ _ fun r hr => _
/-- A C⋆-algebra over a densely normed field is a regular normed algebra. -/
instance CstarRing.instRegularNormedAlgebra : RegularNormedAlgebra 𝕜 E where
  isometry_mul' := AddMonoidHomClass.isometry_of_norm (mul 𝕜 E) fun a => NNReal.eq_iff.mpr <|
    show ‖mul 𝕜 E a‖₊ = ‖a‖₊ by
    rw [← sSup_closed_unit_ball_eq_nnnorm]
    refine' csSup_eq_of_forall_le_of_forall_lt_exists_gt _ _ fun r hr => _
    · 

Proof state:
case refine'_1
𝕜 : Type u_1
E : Type u_2
inst✝⁶ : DenselyNormedField 𝕜
inst✝⁵ : NonUnitalNormedRing E
inst✝⁴ : StarRing E
inst✝³ : CstarRing E
inst✝² : NormedSpace 𝕜 E
inst✝¹ : IsScalarTower 𝕜 E E
inst✝ : SMulCommClass 𝕜 E E
a : E
⊢ Set.Nonempty ((fun x => ‖((mul 𝕜 E) a) x‖₊) '' Metric.closedBall 0 1)

Next tactic:
exact (Metric.nonempty_closedBall.mpr zero_le_one).image _
/-- A C⋆-algebra over a densely normed field is a regular normed algebra. -/
instance CstarRing.instRegularNormedAlgebra : RegularNormedAlgebra 𝕜 E where
  isometry_mul' := AddMonoidHomClass.isometry_of_norm (mul 𝕜 E) fun a => NNReal.eq_iff.mpr <|
    show ‖mul 𝕜 E a‖₊ = ‖a‖₊ by
    rw [← sSup_closed_unit_ball_eq_nnnorm]
    refine' csSup_eq_of_forall_le_of_forall_lt_exists_gt _ _ fun r hr => _
    · exact (Metric.nonempty_closedBall.mpr zero_le_one).image _
    · 

Proof state:
case refine'_2
𝕜 : Type u_1
E : Type u_2
inst✝⁶ : DenselyNormedField 𝕜
inst✝⁵ : NonUnitalNormedRing E
inst✝⁴ : StarRing E
inst✝³ : CstarRing E
inst✝² : NormedSpace 𝕜 E
inst✝¹ : IsScalarTower 𝕜 E E
inst✝ : SMulCommClass 𝕜 E E
a : E
⊢ ∀ a_1 ∈ (fun x => ‖((mul 𝕜 E) a) x‖₊) '' Metric.closedBall 0 1, a_1 ≤ ‖a‖₊

Next tactic:
rintro - ⟨x, hx, rfl⟩
/-- A C⋆-algebra over a densely normed field is a regular normed algebra. -/
instance CstarRing.instRegularNormedAlgebra : RegularNormedAlgebra 𝕜 E where
  isometry_mul' := AddMonoidHomClass.isometry_of_norm (mul 𝕜 E) fun a => NNReal.eq_iff.mpr <|
    show ‖mul 𝕜 E a‖₊ = ‖a‖₊ by
    rw [← sSup_closed_unit_ball_eq_nnnorm]
    refine' csSup_eq_of_forall_le_of_forall_lt_exists_gt _ _ fun r hr => _
    · exact (Metric.nonempty_closedBall.mpr zero_le_one).image _
    · rintro - ⟨x, hx, rfl⟩
      

Proof state:
case refine'_2.intro.intro
𝕜 : Type u_1
E : Type u_2
inst✝⁶ : DenselyNormedField 𝕜
inst✝⁵ : NonUnitalNormedRing E
inst✝⁴ : StarRing E
inst✝³ : CstarRing E
inst✝² : NormedSpace 𝕜 E
inst✝¹ : IsScalarTower 𝕜 E E
inst✝ : SMulCommClass 𝕜 E E
a x : E
hx : x ∈ Metric.closedBall 0 1
⊢ (fun x => ‖((mul 𝕜 E) a) x‖₊) x ≤ ‖a‖₊

Next tactic:
exact
        ((mul 𝕜 E a).unit_le_op_norm x <| mem_closedBall_zero_iff.mp hx).trans
          (op_norm_mul_apply_le 𝕜 E a)
/-- A C⋆-algebra over a densely normed field is a regular normed algebra. -/
instance CstarRing.instRegularNormedAlgebra : RegularNormedAlgebra 𝕜 E where
  isometry_mul' := AddMonoidHomClass.isometry_of_norm (mul 𝕜 E) fun a => NNReal.eq_iff.mpr <|
    show ‖mul 𝕜 E a‖₊ = ‖a‖₊ by
    rw [← sSup_closed_unit_ball_eq_nnnorm]
    refine' csSup_eq_of_forall_le_of_forall_lt_exists_gt _ _ fun r hr => _
    · exact (Metric.nonempty_closedBall.mpr zero_le_one).image _
    · rintro - ⟨x, hx, rfl⟩
      exact
        ((mul 𝕜 E a).unit_le_op_norm x <| mem_closedBall_zero_iff.mp hx).trans
          (op_norm_mul_apply_le 𝕜 E a)
    · 

Proof state:
case refine'_3
𝕜 : Type u_1
E : Type u_2
inst✝⁶ : DenselyNormedField 𝕜
inst✝⁵ : NonUnitalNormedRing E
inst✝⁴ : StarRing E
inst✝³ : CstarRing E
inst✝² : NormedSpace 𝕜 E
inst✝¹ : IsScalarTower 𝕜 E E
inst✝ : SMulCommClass 𝕜 E E
a : E
r : NNReal
hr : r < ‖a‖₊
⊢ ∃ a_1 ∈ (fun x => ‖((mul 𝕜 E) a) x‖₊) '' Metric.closedBall 0 1, r < a_1

Next tactic:
have ha : 0 < ‖a‖₊ := zero_le'.trans_lt hr
/-- A C⋆-algebra over a densely normed field is a regular normed algebra. -/
instance CstarRing.instRegularNormedAlgebra : RegularNormedAlgebra 𝕜 E where
  isometry_mul' := AddMonoidHomClass.isometry_of_norm (mul 𝕜 E) fun a => NNReal.eq_iff.mpr <|
    show ‖mul 𝕜 E a‖₊ = ‖a‖₊ by
    rw [← sSup_closed_unit_ball_eq_nnnorm]
    refine' csSup_eq_of_forall_le_of_forall_lt_exists_gt _ _ fun r hr => _
    · exact (Metric.nonempty_closedBall.mpr zero_le_one).image _
    · rintro - ⟨x, hx, rfl⟩
      exact
        ((mul 𝕜 E a).unit_le_op_norm x <| mem_closedBall_zero_iff.mp hx).trans
          (op_norm_mul_apply_le 𝕜 E a)
    · have ha : 0 < ‖a‖₊ := zero_le'.trans_lt hr
      

Proof state:
case refine'_3
𝕜 : Type u_1
E : Type u_2
inst✝⁶ : DenselyNormedField 𝕜
inst✝⁵ : NonUnitalNormedRing E
inst✝⁴ : StarRing E
inst✝³ : CstarRing E
inst✝² : NormedSpace 𝕜 E
inst✝¹ : IsScalarTower 𝕜 E E
inst✝ : SMulCommClass 𝕜 E E
a : E
r : NNReal
hr : r < ‖a‖₊
ha : 0 < ‖a‖₊
⊢ ∃ a_1 ∈ (fun x => ‖((mul 𝕜 E) a) x‖₊) '' Metric.closedBall 0 1, r < a_1

Next tactic:
rw [← inv_inv ‖a‖₊, NNReal.lt_inv_iff_mul_lt (inv_ne_zero ha.ne')] at hr
/-- A C⋆-algebra over a densely normed field is a regular normed algebra. -/
instance CstarRing.instRegularNormedAlgebra : RegularNormedAlgebra 𝕜 E where
  isometry_mul' := AddMonoidHomClass.isometry_of_norm (mul 𝕜 E) fun a => NNReal.eq_iff.mpr <|
    show ‖mul 𝕜 E a‖₊ = ‖a‖₊ by
    rw [← sSup_closed_unit_ball_eq_nnnorm]
    refine' csSup_eq_of_forall_le_of_forall_lt_exists_gt _ _ fun r hr => _
    · exact (Metric.nonempty_closedBall.mpr zero_le_one).image _
    · rintro - ⟨x, hx, rfl⟩
      exact
        ((mul 𝕜 E a).unit_le_op_norm x <| mem_closedBall_zero_iff.mp hx).trans
          (op_norm_mul_apply_le 𝕜 E a)
    · have ha : 0 < ‖a‖₊ := zero_le'.trans_lt hr
      rw [← inv_inv ‖a‖₊, NNReal.lt_inv_iff_mul_lt (inv_ne_zero ha.ne')] at hr
      

Proof state:
case refine'_3
𝕜 : Type u_1
E : Type u_2
inst✝⁶ : DenselyNormedField 𝕜
inst✝⁵ : NonUnitalNormedRing E
inst✝⁴ : StarRing E
inst✝³ : CstarRing E
inst✝² : NormedSpace 𝕜 E
inst✝¹ : IsScalarTower 𝕜 E E
inst✝ : SMulCommClass 𝕜 E E
a : E
r : NNReal
hr : r * ‖a‖₊⁻¹ < 1
ha : 0 < ‖a‖₊
⊢ ∃ a_1 ∈ (fun x => ‖((mul 𝕜 E) a) x‖₊) '' Metric.closedBall 0 1, r < a_1

Next tactic:
obtain ⟨k, hk₁, hk₂⟩ :=
        NormedField.exists_lt_nnnorm_lt 𝕜 (mul_lt_mul_of_pos_right hr <| inv_pos.2 ha)
/-- A C⋆-algebra over a densely normed field is a regular normed algebra. -/
instance CstarRing.instRegularNormedAlgebra : RegularNormedAlgebra 𝕜 E where
  isometry_mul' := AddMonoidHomClass.isometry_of_norm (mul 𝕜 E) fun a => NNReal.eq_iff.mpr <|
    show ‖mul 𝕜 E a‖₊ = ‖a‖₊ by
    rw [← sSup_closed_unit_ball_eq_nnnorm]
    refine' csSup_eq_of_forall_le_of_forall_lt_exists_gt _ _ fun r hr => _
    · exact (Metric.nonempty_closedBall.mpr zero_le_one).image _
    · rintro - ⟨x, hx, rfl⟩
      exact
        ((mul 𝕜 E a).unit_le_op_norm x <| mem_closedBall_zero_iff.mp hx).trans
          (op_norm_mul_apply_le 𝕜 E a)
    · have ha : 0 < ‖a‖₊ := zero_le'.trans_lt hr
      rw [← inv_inv ‖a‖₊, NNReal.lt_inv_iff_mul_lt (inv_ne_zero ha.ne')] at hr
      obtain ⟨k, hk₁, hk₂⟩ :=
        NormedField.exists_lt_nnnorm_lt 𝕜 (mul_lt_mul_of_pos_right hr <| inv_pos.2 ha)
      

Proof state:
case refine'_3.intro.intro
𝕜 : Type u_1
E : Type u_2
inst✝⁶ : DenselyNormedField 𝕜
inst✝⁵ : NonUnitalNormedRing E
inst✝⁴ : StarRing E
inst✝³ : CstarRing E
inst✝² : NormedSpace 𝕜 E
inst✝¹ : IsScalarTower 𝕜 E E
inst✝ : SMulCommClass 𝕜 E E
a : E
r : NNReal
hr : r * ‖a‖₊⁻¹ < 1
ha : 0 < ‖a‖₊
k : 𝕜
hk₁ : r * ‖a‖₊⁻¹ * ‖a‖₊⁻¹ < ‖k‖₊
hk₂ : ‖k‖₊ < 1 * ‖a‖₊⁻¹
⊢ ∃ a_1 ∈ (fun x => ‖((mul 𝕜 E) a) x‖₊) '' Metric.closedBall 0 1, r < a_1

Next tactic:
refine' ⟨_, ⟨k • star a, _, rfl⟩, _⟩
/-- A C⋆-algebra over a densely normed field is a regular normed algebra. -/
instance CstarRing.instRegularNormedAlgebra : RegularNormedAlgebra 𝕜 E where
  isometry_mul' := AddMonoidHomClass.isometry_of_norm (mul 𝕜 E) fun a => NNReal.eq_iff.mpr <|
    show ‖mul 𝕜 E a‖₊ = ‖a‖₊ by
    rw [← sSup_closed_unit_ball_eq_nnnorm]
    refine' csSup_eq_of_forall_le_of_forall_lt_exists_gt _ _ fun r hr => _
    · exact (Metric.nonempty_closedBall.mpr zero_le_one).image _
    · rintro - ⟨x, hx, rfl⟩
      exact
        ((mul 𝕜 E a).unit_le_op_norm x <| mem_closedBall_zero_iff.mp hx).trans
          (op_norm_mul_apply_le 𝕜 E a)
    · have ha : 0 < ‖a‖₊ := zero_le'.trans_lt hr
      rw [← inv_inv ‖a‖₊, NNReal.lt_inv_iff_mul_lt (inv_ne_zero ha.ne')] at hr
      obtain ⟨k, hk₁, hk₂⟩ :=
        NormedField.exists_lt_nnnorm_lt 𝕜 (mul_lt_mul_of_pos_right hr <| inv_pos.2 ha)
      refine' ⟨_, ⟨k • star a, _, rfl⟩, _⟩
      · 

Proof state:
case refine'_3.intro.intro.refine'_1
𝕜 : Type u_1
E : Type u_2
inst✝⁶ : DenselyNormedField 𝕜
inst✝⁵ : NonUnitalNormedRing E
inst✝⁴ : StarRing E
inst✝³ : CstarRing E
inst✝² : NormedSpace 𝕜 E
inst✝¹ : IsScalarTower 𝕜 E E
inst✝ : SMulCommClass 𝕜 E E
a : E
r : NNReal
hr : r * ‖a‖₊⁻¹ < 1
ha : 0 < ‖a‖₊
k : 𝕜
hk₁ : r * ‖a‖₊⁻¹ * ‖a‖₊⁻¹ < ‖k‖₊
hk₂ : ‖k‖₊ < 1 * ‖a‖₊⁻¹
⊢ k • a⋆ ∈ Metric.closedBall 0 1

Next tactic:
simpa only [mem_closedBall_zero_iff, norm_smul, one_mul, norm_star] using
          (NNReal.le_inv_iff_mul_le ha.ne').1 (one_mul ‖a‖₊⁻¹ ▸ hk₂.le : ‖k‖₊ ≤ ‖a‖₊⁻¹)