l3lab/ntp-mathlib huggingface dataset:
@[to_additive existing AddGroupSeminorm.smul_sup]
theorem smul_sup (r : R) (p q : GroupSeminorm E) : r • (p ⊔ q) = r • p ⊔ r • q :=
  have Real.smul_max : ∀ x y : ℝ, r • max x y = max (r • x) (r • y) := fun x y => by
    

Proof state:
ι : Type u_1
R : Type u_2
R' : Type u_3
E : Type u_4
F : Type u_5
G : Type u_6
inst✝³ : Group E
inst✝² : SMul R ℝ
inst✝¹ : SMul R ℝ≥0
inst✝ : IsScalarTower R ℝ≥0 ℝ
r : R
p q : GroupSeminorm E
x y : ℝ
⊢ r • max x y = max (r • x) (r • y)

Next tactic:
simpa only [← smul_eq_mul, ← NNReal.smul_def, smul_one_smul ℝ≥0 r (_ : ℝ)] using
      mul_max_of_nonneg x y (r • (1 : ℝ≥0) : ℝ≥0).coe_nonneg
instance [DecidableEq E] : One (NonarchAddGroupSeminorm E) :=
  ⟨{  toFun := fun x => if x = 0 then 0 else 1
      map_zero' := if_pos rfl
      add_le_max' := fun x y => by
        

Proof state:
ι : Type u_1
R : Type u_2
R' : Type u_3
E : Type u_4
F : Type u_5
G : Type u_6
inst✝⁴ : AddGroup E
inst✝³ : SMul R ℝ
inst✝² : SMul R ℝ≥0
inst✝¹ : IsScalarTower R ℝ≥0 ℝ
inst✝ : DecidableEq E
x y : E
⊢ ZeroHom.toFun { toFun := fun x => if x = 0 then 0 else 1, map_zero' := (_ : (if 0 = 0 then 0 else 1) = 0) } (x + y) ≤
    max (ZeroHom.toFun { toFun := fun x => if x = 0 then 0 else 1, map_zero' := (_ : (if 0 = 0 then 0 else 1) = 0) } x)
      (ZeroHom.toFun { toFun := fun x => if x = 0 then 0 else 1, map_zero' := (_ : (if 0 = 0 then 0 else 1) = 0) } y)

Next tactic:
by_cases hx : x = 0
instance [DecidableEq E] : One (NonarchAddGroupSeminorm E) :=
  ⟨{  toFun := fun x => if x = 0 then 0 else 1
      map_zero' := if_pos rfl
      add_le_max' := fun x y => by
        by_cases hx : x = 0
        · 

Proof state:
case pos
ι : Type u_1
R : Type u_2
R' : Type u_3
E : Type u_4
F : Type u_5
G : Type u_6
inst✝⁴ : AddGroup E
inst✝³ : SMul R ℝ
inst✝² : SMul R ℝ≥0
inst✝¹ : IsScalarTower R ℝ≥0 ℝ
inst✝ : DecidableEq E
x y : E
hx : x = 0
⊢ ZeroHom.toFun { toFun := fun x => if x = 0 then 0 else 1, map_zero' := (_ : (if 0 = 0 then 0 else 1) = 0) } (x + y) ≤
    max (ZeroHom.toFun { toFun := fun x => if x = 0 then 0 else 1, map_zero' := (_ : (if 0 = 0 then 0 else 1) = 0) } x)
      (ZeroHom.toFun { toFun := fun x => if x = 0 then 0 else 1, map_zero' := (_ : (if 0 = 0 then 0 else 1) = 0) } y)

Next tactic:
simp_rw [if_pos hx, hx, zero_add]
instance [DecidableEq E] : One (NonarchAddGroupSeminorm E) :=
  ⟨{  toFun := fun x => if x = 0 then 0 else 1
      map_zero' := if_pos rfl
      add_le_max' := fun x y => by
        by_cases hx : x = 0
        · simp_rw [if_pos hx, hx, zero_add]
          

Proof state:
case pos
ι : Type u_1
R : Type u_2
R' : Type u_3
E : Type u_4
F : Type u_5
G : Type u_6
inst✝⁴ : AddGroup E
inst✝³ : SMul R ℝ
inst✝² : SMul R ℝ≥0
inst✝¹ : IsScalarTower R ℝ≥0 ℝ
inst✝ : DecidableEq E
x y : E
hx : x = 0
⊢ (if y = 0 then 0 else 1) ≤ max 0 (if y = 0 then 0 else 1)

Next tactic:
exact le_max_of_le_right (le_refl _)
instance [DecidableEq E] : One (NonarchAddGroupSeminorm E) :=
  ⟨{  toFun := fun x => if x = 0 then 0 else 1
      map_zero' := if_pos rfl
      add_le_max' := fun x y => by
        by_cases hx : x = 0
        · simp_rw [if_pos hx, hx, zero_add]
          exact le_max_of_le_right (le_refl _)
        · 

Proof state:
case neg
ι : Type u_1
R : Type u_2
R' : Type u_3
E : Type u_4
F : Type u_5
G : Type u_6
inst✝⁴ : AddGroup E
inst✝³ : SMul R ℝ
inst✝² : SMul R ℝ≥0
inst✝¹ : IsScalarTower R ℝ≥0 ℝ
inst✝ : DecidableEq E
x y : E
hx : ¬x = 0
⊢ ZeroHom.toFun { toFun := fun x => if x = 0 then 0 else 1, map_zero' := (_ : (if 0 = 0 then 0 else 1) = 0) } (x + y) ≤
    max (ZeroHom.toFun { toFun := fun x => if x = 0 then 0 else 1, map_zero' := (_ : (if 0 = 0 then 0 else 1) = 0) } x)
      (ZeroHom.toFun { toFun := fun x => if x = 0 then 0 else 1, map_zero' := (_ : (if 0 = 0 then 0 else 1) = 0) } y)

Next tactic:
simp_rw [if_neg hx]
instance [DecidableEq E] : One (NonarchAddGroupSeminorm E) :=
  ⟨{  toFun := fun x => if x = 0 then 0 else 1
      map_zero' := if_pos rfl
      add_le_max' := fun x y => by
        by_cases hx : x = 0
        · simp_rw [if_pos hx, hx, zero_add]
          exact le_max_of_le_right (le_refl _)
        · simp_rw [if_neg hx]
          

Proof state:
case neg
ι : Type u_1
R : Type u_2
R' : Type u_3
E : Type u_4
F : Type u_5
G : Type u_6
inst✝⁴ : AddGroup E
inst✝³ : SMul R ℝ
inst✝² : SMul R ℝ≥0
inst✝¹ : IsScalarTower R ℝ≥0 ℝ
inst✝ : DecidableEq E
x y : E
hx : ¬x = 0
⊢ (if x + y = 0 then 0 else 1) ≤ max 1 (if y = 0 then 0 else 1)

Next tactic:
split_ifs
instance [DecidableEq E] : One (NonarchAddGroupSeminorm E) :=
  ⟨{  toFun := fun x => if x = 0 then 0 else 1
      map_zero' := if_pos rfl
      add_le_max' := fun x y => by
        by_cases hx : x = 0
        · simp_rw [if_pos hx, hx, zero_add]
          exact le_max_of_le_right (le_refl _)
        · simp_rw [if_neg hx]
          split_ifs <;> 

Proof state:
case pos
ι : Type u_1
R : Type u_2
R' : Type u_3
E : Type u_4
F : Type u_5
G : Type u_6
inst✝⁴ : AddGroup E
inst✝³ : SMul R ℝ
inst✝² : SMul R ℝ≥0
inst✝¹ : IsScalarTower R ℝ≥0 ℝ
inst✝ : DecidableEq E
x y : E
hx : ¬x = 0
h✝¹ : x + y = 0
h✝ : y = 0
⊢ 0 ≤ max 1 0

Next tactic:
norm_num
instance [DecidableEq E] : One (NonarchAddGroupSeminorm E) :=
  ⟨{  toFun := fun x => if x = 0 then 0 else 1
      map_zero' := if_pos rfl
      add_le_max' := fun x y => by
        by_cases hx : x = 0
        · simp_rw [if_pos hx, hx, zero_add]
          exact le_max_of_le_right (le_refl _)
        · simp_rw [if_neg hx]
          split_ifs <;> 

Proof state:
case neg
ι : Type u_1
R : Type u_2
R' : Type u_3
E : Type u_4
F : Type u_5
G : Type u_6
inst✝⁴ : AddGroup E
inst✝³ : SMul R ℝ
inst✝² : SMul R ℝ≥0
inst✝¹ : IsScalarTower R ℝ≥0 ℝ
inst✝ : DecidableEq E
x y : E
hx : ¬x = 0
h✝¹ : x + y = 0
h✝ : ¬y = 0
⊢ 0 ≤ max 1 1

Next tactic:
norm_num
instance [DecidableEq E] : One (NonarchAddGroupSeminorm E) :=
  ⟨{  toFun := fun x => if x = 0 then 0 else 1
      map_zero' := if_pos rfl
      add_le_max' := fun x y => by
        by_cases hx : x = 0
        · simp_rw [if_pos hx, hx, zero_add]
          exact le_max_of_le_right (le_refl _)
        · simp_rw [if_neg hx]
          split_ifs <;> 

Proof state:
case pos
ι : Type u_1
R : Type u_2
R' : Type u_3
E : Type u_4
F : Type u_5
G : Type u_6
inst✝⁴ : AddGroup E
inst✝³ : SMul R ℝ
inst✝² : SMul R ℝ≥0
inst✝¹ : IsScalarTower R ℝ≥0 ℝ
inst✝ : DecidableEq E
x y : E
hx : ¬x = 0
h✝¹ : ¬x + y = 0
h✝ : y = 0
⊢ 1 ≤ max 1 0

Next tactic:
norm_num
instance [DecidableEq E] : One (NonarchAddGroupSeminorm E) :=
  ⟨{  toFun := fun x => if x = 0 then 0 else 1
      map_zero' := if_pos rfl
      add_le_max' := fun x y => by
        by_cases hx : x = 0
        · simp_rw [if_pos hx, hx, zero_add]
          exact le_max_of_le_right (le_refl _)
        · simp_rw [if_neg hx]
          split_ifs <;> 

Proof state:
case neg
ι : Type u_1
R : Type u_2
R' : Type u_3
E : Type u_4
F : Type u_5
G : Type u_6
inst✝⁴ : AddGroup E
inst✝³ : SMul R ℝ
inst✝² : SMul R ℝ≥0
inst✝¹ : IsScalarTower R ℝ≥0 ℝ
inst✝ : DecidableEq E
x y : E
hx : ¬x = 0
h✝¹ : ¬x + y = 0
h✝ : ¬y = 0
⊢ 1 ≤ max 1 1

Next tactic:
norm_num
instance [DecidableEq E] : One (NonarchAddGroupSeminorm E) :=
  ⟨{  toFun := fun x => if x = 0 then 0 else 1
      map_zero' := if_pos rfl
      add_le_max' := fun x y => by
        by_cases hx : x = 0
        · simp_rw [if_pos hx, hx, zero_add]
          exact le_max_of_le_right (le_refl _)
        · simp_rw [if_neg hx]
          split_ifs <;> norm_num
      neg' := fun x => by 

Proof state:
ι : Type u_1
R : Type u_2
R' : Type u_3
E : Type u_4
F : Type u_5
G : Type u_6
inst✝⁴ : AddGroup E
inst✝³ : SMul R ℝ
inst✝² : SMul R ℝ≥0
inst✝¹ : IsScalarTower R ℝ≥0 ℝ
inst✝ : DecidableEq E
x : E
⊢ ZeroHom.toFun { toFun := fun x => if x = 0 then 0 else 1, map_zero' := (_ : (if 0 = 0 then 0 else 1) = 0) } (-x) =
    ZeroHom.toFun { toFun := fun x => if x = 0 then 0 else 1, map_zero' := (_ : (if 0 = 0 then 0 else 1) = 0) } x

Next tactic:
simp_rw [neg_eq_zero]
/-- Any action on `ℝ` which factors through `ℝ≥0` applies to a `NonarchAddGroupSeminorm`. -/
instance : SMul R (NonarchAddGroupSeminorm E) :=
  ⟨fun r p =>
    { toFun := fun x => r • p x
      map_zero' := by
        

Proof state:
ι : Type u_1
R : Type u_2
R' : Type u_3
E : Type u_4
F : Type u_5
G : Type u_6
inst✝³ : AddGroup E
inst✝² : SMul R ℝ
inst✝¹ : SMul R ℝ≥0
inst✝ : IsScalarTower R ℝ≥0 ℝ
r : R
p : NonarchAddGroupSeminorm E
⊢ (fun x => r • p x) 0 = 0

Next tactic:
simp only [← smul_one_smul ℝ≥0 r (_ : ℝ), NNReal.smul_def, smul_eq_mul, map_zero p,
          mul_zero]
/-- Any action on `ℝ` which factors through `ℝ≥0` applies to a `NonarchAddGroupSeminorm`. -/
instance : SMul R (NonarchAddGroupSeminorm E) :=
  ⟨fun r p =>
    { toFun := fun x => r • p x
      map_zero' := by
        simp only [← smul_one_smul ℝ≥0 r (_ : ℝ), NNReal.smul_def, smul_eq_mul, map_zero p,
          mul_zero]
      add_le_max' := fun x y => by
        

Proof state:
ι : Type u_1
R : Type u_2
R' : Type u_3
E : Type u_4
F : Type u_5
G : Type u_6
inst✝³ : AddGroup E
inst✝² : SMul R ℝ
inst✝¹ : SMul R ℝ≥0
inst✝ : IsScalarTower R ℝ≥0 ℝ
r : R
p : NonarchAddGroupSeminorm E
x y : E
⊢ ZeroHom.toFun { toFun := fun x => r • p x, map_zero' := (_ : r • p 0 = 0) } (x + y) ≤
    max (ZeroHom.toFun { toFun := fun x => r • p x, map_zero' := (_ : r • p 0 = 0) } x)
      (ZeroHom.toFun { toFun := fun x => r • p x, map_zero' := (_ : r • p 0 = 0) } y)

Next tactic:
simp only [← smul_one_smul ℝ≥0 r (_ : ℝ), NNReal.smul_def, smul_eq_mul, ←
          mul_max_of_nonneg _ _ NNReal.zero_le_coe]
/-- Any action on `ℝ` which factors through `ℝ≥0` applies to a `NonarchAddGroupSeminorm`. -/
instance : SMul R (NonarchAddGroupSeminorm E) :=
  ⟨fun r p =>
    { toFun := fun x => r • p x
      map_zero' := by
        simp only [← smul_one_smul ℝ≥0 r (_ : ℝ), NNReal.smul_def, smul_eq_mul, map_zero p,
          mul_zero]
      add_le_max' := fun x y => by
        simp only [← smul_one_smul ℝ≥0 r (_ : ℝ), NNReal.smul_def, smul_eq_mul, ←
          mul_max_of_nonneg _ _ NNReal.zero_le_coe]
        

Proof state:
ι : Type u_1
R : Type u_2
R' : Type u_3
E : Type u_4
F : Type u_5
G : Type u_6
inst✝³ : AddGroup E
inst✝² : SMul R ℝ
inst✝¹ : SMul R ℝ≥0
inst✝ : IsScalarTower R ℝ≥0 ℝ
r : R
p : NonarchAddGroupSeminorm E
x y : E
⊢ ↑(r • 1) * p (x + y) ≤ ↑(r • 1) * max (p x) (p y)

Next tactic:
gcongr
/-- Any action on `ℝ` which factors through `ℝ≥0` applies to a `NonarchAddGroupSeminorm`. -/
instance : SMul R (NonarchAddGroupSeminorm E) :=
  ⟨fun r p =>
    { toFun := fun x => r • p x
      map_zero' := by
        simp only [← smul_one_smul ℝ≥0 r (_ : ℝ), NNReal.smul_def, smul_eq_mul, map_zero p,
          mul_zero]
      add_le_max' := fun x y => by
        simp only [← smul_one_smul ℝ≥0 r (_ : ℝ), NNReal.smul_def, smul_eq_mul, ←
          mul_max_of_nonneg _ _ NNReal.zero_le_coe]
        gcongr
        

Proof state:
case h
ι : Type u_1
R : Type u_2
R' : Type u_3
E : Type u_4
F : Type u_5
G : Type u_6
inst✝³ : AddGroup E
inst✝² : SMul R ℝ
inst✝¹ : SMul R ℝ≥0
inst✝ : IsScalarTower R ℝ≥0 ℝ
r : R
p : NonarchAddGroupSeminorm E
x y : E
⊢ p (x + y) ≤ max (p x) (p y)

Next tactic:
apply map_add_le_max
/-- Any action on `ℝ` which factors through `ℝ≥0` applies to a `NonarchAddGroupSeminorm`. -/
instance : SMul R (NonarchAddGroupSeminorm E) :=
  ⟨fun r p =>
    { toFun := fun x => r • p x
      map_zero' := by
        simp only [← smul_one_smul ℝ≥0 r (_ : ℝ), NNReal.smul_def, smul_eq_mul, map_zero p,
          mul_zero]
      add_le_max' := fun x y => by
        simp only [← smul_one_smul ℝ≥0 r (_ : ℝ), NNReal.smul_def, smul_eq_mul, ←
          mul_max_of_nonneg _ _ NNReal.zero_le_coe]
        gcongr
        apply map_add_le_max
      neg' := fun x => by 

Proof state:
ι : Type u_1
R : Type u_2
R' : Type u_3
E : Type u_4
F : Type u_5
G : Type u_6
inst✝³ : AddGroup E
inst✝² : SMul R ℝ
inst✝¹ : SMul R ℝ≥0
inst✝ : IsScalarTower R ℝ≥0 ℝ
r : R
p : NonarchAddGroupSeminorm E
x : E
⊢ ZeroHom.toFun { toFun := fun x => r • p x, map_zero' := (_ : r • p 0 = 0) } (-x) =
    ZeroHom.toFun { toFun := fun x => r • p x, map_zero' := (_ : r • p 0 = 0) } x

Next tactic:
simp_rw [map_neg_eq_map p]
theorem smul_sup (r : R) (p q : NonarchAddGroupSeminorm E) : r • (p ⊔ q) = r • p ⊔ r • q :=
  have Real.smul_max : ∀ x y : ℝ, r • max x y = max (r • x) (r • y) := fun x y => by
    

Proof state:
ι : Type u_1
R : Type u_2
R' : Type u_3
E : Type u_4
F : Type u_5
G : Type u_6
inst✝³ : AddGroup E
inst✝² : SMul R ℝ
inst✝¹ : SMul R ℝ≥0
inst✝ : IsScalarTower R ℝ≥0 ℝ
r : R
p q : NonarchAddGroupSeminorm E
x y : ℝ
⊢ r • max x y = max (r • x) (r • y)

Next tactic:
simpa only [← smul_eq_mul, ← NNReal.smul_def, smul_one_smul ℝ≥0 r (_ : ℝ)] using
      mul_max_of_nonneg x y (r • (1 : ℝ≥0) : ℝ≥0).coe_nonneg
@[to_additive]
instance groupNormClass : GroupNormClass (GroupNorm E) E ℝ
    where
  coe f := f.toFun
  coe_injective' f g h := by 

Proof state:
ι : Type u_1
R : Type u_2
R' : Type u_3
E : Type u_4
F : Type u_5
G : Type u_6
inst✝² : Group E
inst✝¹ : Group F
inst✝ : Group G
p q f g : GroupNorm E
h : (fun f => f.toFun) f = (fun f => f.toFun) g
⊢ f = g

Next tactic:
obtain ⟨⟨_, _, _, _⟩, _⟩ := f
@[to_additive]
instance groupNormClass : GroupNormClass (GroupNorm E) E ℝ
    where
  coe f := f.toFun
  coe_injective' f g h := by obtain ⟨⟨_, _, _, _⟩, _⟩ := f; 

Proof state:
case mk.mk
ι : Type u_1
R : Type u_2
R' : Type u_3
E : Type u_4
F : Type u_5
G : Type u_6
inst✝² : Group E
inst✝¹ : Group F
inst✝ : Group G
p q g : GroupNorm E
toFun✝ : E → ℝ
map_one'✝ : toFun✝ 1 = 0
mul_le'✝ : ∀ (x y : E), toFun✝ (x * y) ≤ toFun✝ x + toFun✝ y
inv'✝ : ∀ (x : E), toFun✝ x⁻¹ = toFun✝ x
eq_one_of_map_eq_zero'✝ :
  ∀ (x : E),
    GroupSeminorm.toFun { toFun := toFun✝, map_one' := map_one'✝, mul_le' := mul_le'✝, inv' := inv'✝ } x = 0 → x = 1
h :
  (fun f => f.toFun)
      { toGroupSeminorm := { toFun := toFun✝, map_one' := map_one'✝, mul_le' := mul_le'✝, inv' := inv'✝ },
        eq_one_of_map_eq_zero' := eq_one_of_map_eq_zero'✝ } =
    (fun f => f.toFun) g
⊢ { toGroupSeminorm := { toFun := toFun✝, map_one' := map_one'✝, mul_le' := mul_le'✝, inv' := inv'✝ },
      eq_one_of_map_eq_zero' := eq_one_of_map_eq_zero'✝ } =
    g

Next tactic:
cases g
@[to_additive]
instance groupNormClass : GroupNormClass (GroupNorm E) E ℝ
    where
  coe f := f.toFun
  coe_injective' f g h := by obtain ⟨⟨_, _, _, _⟩, _⟩ := f; cases g; 

Proof state:
case mk.mk.mk
ι : Type u_1
R : Type u_2
R' : Type u_3
E : Type u_4
F : Type u_5
G : Type u_6
inst✝² : Group E
inst✝¹ : Group F
inst✝ : Group G
p q : GroupNorm E
toFun✝ : E → ℝ
map_one'✝ : toFun✝ 1 = 0
mul_le'✝ : ∀ (x y : E), toFun✝ (x * y) ≤ toFun✝ x + toFun✝ y
inv'✝ : ∀ (x : E), toFun✝ x⁻¹ = toFun✝ x
eq_one_of_map_eq_zero'✝¹ :
  ∀ (x : E),
    GroupSeminorm.toFun { toFun := toFun✝, map_one' := map_one'✝, mul_le' := mul_le'✝, inv' := inv'✝ } x = 0 → x = 1
toGroupSeminorm✝ : GroupSeminorm E
eq_one_of_map_eq_zero'✝ : ∀ (x : E), GroupSeminorm.toFun toGroupSeminorm✝ x = 0 → x = 1
h :
  (fun f => f.toFun)
      { toGroupSeminorm := { toFun := toFun✝, map_one' := map_one'✝, mul_le' := mul_le'✝, inv' := inv'✝ },
        eq_one_of_map_eq_zero' := eq_one_of_map_eq_zero'✝¹ } =
    (fun f => f.toFun) { toGroupSeminorm := toGroupSeminorm✝, eq_one_of_map_eq_zero' := eq_one_of_map_eq_zero'✝ }
⊢ { toGroupSeminorm := { toFun := toFun✝, map_one' := map_one'✝, mul_le' := mul_le'✝, inv' := inv'✝ },
      eq_one_of_map_eq_zero' := eq_one_of_map_eq_zero'✝¹ } =
    { toGroupSeminorm := toGroupSeminorm✝, eq_one_of_map_eq_zero' := eq_one_of_map_eq_zero'✝ }

Next tactic:
congr
instance nonarchAddGroupNormClass : NonarchAddGroupNormClass (NonarchAddGroupNorm E) E
    where
  coe f := f.toFun
  coe_injective' f g h := by 

Proof state:
ι : Type u_1
R : Type u_2
R' : Type u_3
E : Type u_4
F : Type u_5
G : Type u_6
inst✝¹ : AddGroup E
inst✝ : AddGroup F
p q f g : NonarchAddGroupNorm E
h : (fun f => f.toFun) f = (fun f => f.toFun) g
⊢ f = g

Next tactic:
obtain ⟨⟨⟨_, _⟩, _, _⟩, _⟩ := f
instance nonarchAddGroupNormClass : NonarchAddGroupNormClass (NonarchAddGroupNorm E) E
    where
  coe f := f.toFun
  coe_injective' f g h := by obtain ⟨⟨⟨_, _⟩, _, _⟩, _⟩ := f; 

Proof state:
case mk.mk.mk
ι : Type u_1
R : Type u_2
R' : Type u_3
E : Type u_4
F : Type u_5
G : Type u_6
inst✝¹ : AddGroup E
inst✝ : AddGroup F
p q g : NonarchAddGroupNorm E
toFun✝ : E → ℝ
map_zero'✝ : toFun✝ 0 = 0
add_le_max'✝ :
  ∀ (r s : E),
    ZeroHom.toFun { toFun := toFun✝, map_zero' := map_zero'✝ } (r + s) ≤
      max (ZeroHom.toFun { toFun := toFun✝, map_zero' := map_zero'✝ } r)
        (ZeroHom.toFun { toFun := toFun✝, map_zero' := map_zero'✝ } s)
neg'✝ :
  ∀ (r : E),
    ZeroHom.toFun { toFun := toFun✝, map_zero' := map_zero'✝ } (-r) =
      ZeroHom.toFun { toFun := toFun✝, map_zero' := map_zero'✝ } r
eq_zero_of_map_eq_zero'✝ :
  ∀ (x : E),
    ZeroHom.toFun
          { toZeroHom := { toFun := toFun✝, map_zero' := map_zero'✝ }, add_le_max' := add_le_max'✝,
              neg' := neg'✝ }.toZeroHom
          x =
        0 →
      x = 0
h :
  (fun f => f.toFun)
      {
        toNonarchAddGroupSeminorm :=
          { toZeroHom := { toFun := toFun✝, map_zero' := map_zero'✝ }, add_le_max' := add_le_max'✝, neg' := neg'✝ },
        eq_zero_of_map_eq_zero' := eq_zero_of_map_eq_zero'✝ } =
    (fun f => f.toFun) g
⊢ {
      toNonarchAddGroupSeminorm :=
        { toZeroHom := { toFun := toFun✝, map_zero' := map_zero'✝ }, add_le_max' := add_le_max'✝, neg' := neg'✝ },
      eq_zero_of_map_eq_zero' := eq_zero_of_map_eq_zero'✝ } =
    g

Next tactic:
cases g
instance nonarchAddGroupNormClass : NonarchAddGroupNormClass (NonarchAddGroupNorm E) E
    where
  coe f := f.toFun
  coe_injective' f g h := by obtain ⟨⟨⟨_, _⟩, _, _⟩, _⟩ := f; cases g; 

Proof state:
case mk.mk.mk.mk
ι : Type u_1
R : Type u_2
R' : Type u_3
E : Type u_4
F : Type u_5
G : Type u_6
inst✝¹ : AddGroup E
inst✝ : AddGroup F
p q : NonarchAddGroupNorm E
toFun✝ : E → ℝ
map_zero'✝ : toFun✝ 0 = 0
add_le_max'✝ :
  ∀ (r s : E),
    ZeroHom.toFun { toFun := toFun✝, map_zero' := map_zero'✝ } (r + s) ≤
      max (ZeroHom.toFun { toFun := toFun✝, map_zero' := map_zero'✝ } r)
        (ZeroHom.toFun { toFun := toFun✝, map_zero' := map_zero'✝ } s)
neg'✝ :
  ∀ (r : E),
    ZeroHom.toFun { toFun := toFun✝, map_zero' := map_zero'✝ } (-r) =
      ZeroHom.toFun { toFun := toFun✝, map_zero' := map_zero'✝ } r
eq_zero_of_map_eq_zero'✝¹ :
  ∀ (x : E),
    ZeroHom.toFun
          { toZeroHom := { toFun := toFun✝, map_zero' := map_zero'✝ }, add_le_max' := add_le_max'✝,
              neg' := neg'✝ }.toZeroHom
          x =
        0 →
      x = 0
toNonarchAddGroupSeminorm✝ : NonarchAddGroupSeminorm E
eq_zero_of_map_eq_zero'✝ : ∀ (x : E), ZeroHom.toFun toNonarchAddGroupSeminorm✝.toZeroHom x = 0 → x = 0
h :
  (fun f => f.toFun)
      {
        toNonarchAddGroupSeminorm :=
          { toZeroHom := { toFun := toFun✝, map_zero' := map_zero'✝ }, add_le_max' := add_le_max'✝, neg' := neg'✝ },
        eq_zero_of_map_eq_zero' := eq_zero_of_map_eq_zero'✝¹ } =
    (fun f => f.toFun)
      { toNonarchAddGroupSeminorm := toNonarchAddGroupSeminorm✝, eq_zero_of_map_eq_zero' := eq_zero_of_map_eq_zero'✝ }
⊢ {
      toNonarchAddGroupSeminorm :=
        { toZeroHom := { toFun := toFun✝, map_zero' := map_zero'✝ }, add_le_max' := add_le_max'✝, neg' := neg'✝ },
      eq_zero_of_map_eq_zero' := eq_zero_of_map_eq_zero'✝¹ } =
    { toNonarchAddGroupSeminorm := toNonarchAddGroupSeminorm✝, eq_zero_of_map_eq_zero' := eq_zero_of_map_eq_zero'✝ }

Next tactic:
congr
instance instSetLike : SetLike (NonUnitalStarSubalgebra R A) A where
  coe {s} := s.carrier
  coe_injective' p q h := by 

Proof state:
F : Type v'
R' : Type u'
R : Type u
A : Type v
B : Type w
C : Type w'
inst✝¹⁰ : CommSemiring R
inst✝⁹ : NonUnitalNonAssocSemiring A
inst✝⁸ : Module R A
inst✝⁷ : Star A
inst✝⁶ : NonUnitalNonAssocSemiring B
inst✝⁵ : Module R B
inst✝⁴ : Star B
inst✝³ : NonUnitalNonAssocSemiring C
inst✝² : Module R C
inst✝¹ : Star C
inst✝ : NonUnitalStarAlgHomClass F R A B
p q : NonUnitalStarSubalgebra R A
h : (fun {s} => s.carrier) = fun {s} => s.carrier
⊢ p = q

Next tactic:
cases p
instance instSetLike : SetLike (NonUnitalStarSubalgebra R A) A where
  coe {s} := s.carrier
  coe_injective' p q h := by cases p; 

Proof state:
case mk
F : Type v'
R' : Type u'
R : Type u
A : Type v
B : Type w
C : Type w'
inst✝¹⁰ : CommSemiring R
inst✝⁹ : NonUnitalNonAssocSemiring A
inst✝⁸ : Module R A
inst✝⁷ : Star A
inst✝⁶ : NonUnitalNonAssocSemiring B
inst✝⁵ : Module R B
inst✝⁴ : Star B
inst✝³ : NonUnitalNonAssocSemiring C
inst✝² : Module R C
inst✝¹ : Star C
inst✝ : NonUnitalStarAlgHomClass F R A B
q : NonUnitalStarSubalgebra R A
toNonUnitalSubalgebra✝ : NonUnitalSubalgebra R A
star_mem'✝ : ∀ {a : A}, a ∈ toNonUnitalSubalgebra✝.carrier → star a ∈ toNonUnitalSubalgebra✝.carrier
h : (fun {s} => s.carrier) = fun {s} => s.carrier
⊢ { toNonUnitalSubalgebra := toNonUnitalSubalgebra✝, star_mem' := star_mem'✝ } = q

Next tactic:
cases q
instance instSetLike : SetLike (NonUnitalStarSubalgebra R A) A where
  coe {s} := s.carrier
  coe_injective' p q h := by cases p; cases q; 

Proof state:
case mk.mk
F : Type v'
R' : Type u'
R : Type u
A : Type v
B : Type w
C : Type w'
inst✝¹⁰ : CommSemiring R
inst✝⁹ : NonUnitalNonAssocSemiring A
inst✝⁸ : Module R A
inst✝⁷ : Star A
inst✝⁶ : NonUnitalNonAssocSemiring B
inst✝⁵ : Module R B
inst✝⁴ : Star B
inst✝³ : NonUnitalNonAssocSemiring C
inst✝² : Module R C
inst✝¹ : Star C
inst✝ : NonUnitalStarAlgHomClass F R A B
toNonUnitalSubalgebra✝¹ : NonUnitalSubalgebra R A
star_mem'✝¹ : ∀ {a : A}, a ∈ toNonUnitalSubalgebra✝¹.carrier → star a ∈ toNonUnitalSubalgebra✝¹.carrier
toNonUnitalSubalgebra✝ : NonUnitalSubalgebra R A
star_mem'✝ : ∀ {a : A}, a ∈ toNonUnitalSubalgebra✝.carrier → star a ∈ toNonUnitalSubalgebra✝.carrier
h : (fun {s} => s.carrier) = fun {s} => s.carrier
⊢ { toNonUnitalSubalgebra := toNonUnitalSubalgebra✝¹, star_mem' := star_mem'✝¹ } =
    { toNonUnitalSubalgebra := toNonUnitalSubalgebra✝, star_mem' := star_mem'✝ }

Next tactic:
congr
instance instSetLike : SetLike (NonUnitalStarSubalgebra R A) A where
  coe {s} := s.carrier
  coe_injective' p q h := by cases p; cases q; congr; 

Proof state:
case mk.mk.e_toNonUnitalSubalgebra
F : Type v'
R' : Type u'
R : Type u
A : Type v
B : Type w
C : Type w'
inst✝¹⁰ : CommSemiring R
inst✝⁹ : NonUnitalNonAssocSemiring A
inst✝⁸ : Module R A
inst✝⁷ : Star A
inst✝⁶ : NonUnitalNonAssocSemiring B
inst✝⁵ : Module R B
inst✝⁴ : Star B
inst✝³ : NonUnitalNonAssocSemiring C
inst✝² : Module R C
inst✝¹ : Star C
inst✝ : NonUnitalStarAlgHomClass F R A B
toNonUnitalSubalgebra✝¹ : NonUnitalSubalgebra R A
star_mem'✝¹ : ∀ {a : A}, a ∈ toNonUnitalSubalgebra✝¹.carrier → star a ∈ toNonUnitalSubalgebra✝¹.carrier
toNonUnitalSubalgebra✝ : NonUnitalSubalgebra R A
star_mem'✝ : ∀ {a : A}, a ∈ toNonUnitalSubalgebra✝.carrier → star a ∈ toNonUnitalSubalgebra✝.carrier
h : (fun {s} => s.carrier) = fun {s} => s.carrier
⊢ toNonUnitalSubalgebra✝¹ = toNonUnitalSubalgebra✝

Next tactic:
exact SetLike.coe_injective h
theorem toNonUnitalSubalgebra_injective :
    Function.Injective
      (toNonUnitalSubalgebra : NonUnitalStarSubalgebra R A → NonUnitalSubalgebra R A) :=
  fun S T h =>
  ext fun x => by 

Proof state:
F : Type v'
R' : Type u'
R : Type u
A : Type v
B : Type w
C : Type w'
inst✝¹⁰ : CommSemiring R
inst✝⁹ : NonUnitalNonAssocSemiring A
inst✝⁸ : Module R A
inst✝⁷ : Star A
inst✝⁶ : NonUnitalNonAssocSemiring B
inst✝⁵ : Module R B
inst✝⁴ : Star B
inst✝³ : NonUnitalNonAssocSemiring C
inst✝² : Module R C
inst✝¹ : Star C
inst✝ : NonUnitalStarAlgHomClass F R A B
S T : NonUnitalStarSubalgebra R A
h : S.toNonUnitalSubalgebra = T.toNonUnitalSubalgebra
x : A
⊢ x ∈ S ↔ x ∈ T

Next tactic:
rw [← mem_toNonUnitalSubalgebra, ← mem_toNonUnitalSubalgebra, h]