l3lab/ntp-mathlib huggingface dataset:
/-- Any action on `ℝ` which factors through `ℝ≥0` applies to an `AddGroupSeminorm`. -/
instance toSMul : SMul R (AddGroupSeminorm 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 ℝ
p✝ : AddGroupSeminorm E
r : R
p : AddGroupSeminorm 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, mul_zero]
/-- Any action on `ℝ` which factors through `ℝ≥0` applies to an `AddGroupSeminorm`. -/
instance toSMul : SMul R (AddGroupSeminorm 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, mul_zero]
      add_le' := fun _ _ => 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 ℝ
p✝ : AddGroupSeminorm E
r : R
p : AddGroupSeminorm E
x✝¹ x✝ : E
⊢ (fun x => r • p x) (x✝¹ + x✝) ≤ (fun x => r • p x) x✝¹ + (fun x => r • p x) x✝

Next tactic:
simp only [← smul_one_smul ℝ≥0 r (_ : ℝ), NNReal.smul_def, smul_eq_mul, ← mul_add]
/-- Any action on `ℝ` which factors through `ℝ≥0` applies to an `AddGroupSeminorm`. -/
instance toSMul : SMul R (AddGroupSeminorm 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, mul_zero]
      add_le' := fun _ _ => by
        simp only [← smul_one_smul ℝ≥0 r (_ : ℝ), NNReal.smul_def, smul_eq_mul, ← mul_add]
        

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 ℝ
p✝ : AddGroupSeminorm E
r : R
p : AddGroupSeminorm E
x✝¹ x✝ : E
⊢ ↑(r • 1) * p (x✝¹ + x✝) ≤ ↑(r • 1) * (p x✝¹ + p x✝)

Next tactic:
gcongr
/-- Any action on `ℝ` which factors through `ℝ≥0` applies to an `AddGroupSeminorm`. -/
instance toSMul : SMul R (AddGroupSeminorm 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, mul_zero]
      add_le' := fun _ _ => by
        simp only [← smul_one_smul ℝ≥0 r (_ : ℝ), NNReal.smul_def, smul_eq_mul, ← mul_add]
        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 ℝ
p✝ : AddGroupSeminorm E
r : R
p : AddGroupSeminorm E
x✝¹ x✝ : E
⊢ p (x✝¹ + x✝) ≤ p x✝¹ + p x✝

Next tactic:
apply map_add_le_add
/-- Any action on `ℝ` which factors through `ℝ≥0` applies to an `AddGroupSeminorm`. -/
instance toSMul : SMul R (AddGroupSeminorm 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, mul_zero]
      add_le' := fun _ _ => by
        simp only [← smul_one_smul ℝ≥0 r (_ : ℝ), NNReal.smul_def, smul_eq_mul, ← mul_add]
        gcongr
        apply map_add_le_add
      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 ℝ
p✝ : AddGroupSeminorm E
r : R
p : AddGroupSeminorm E
x : E
⊢ (fun x => r • p x) (-x) = (fun x => r • p x) x

Next tactic:
simp_rw [map_neg_eq_map]
theorem smul_sup (r : R) (p q : AddGroupSeminorm 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 ℝ
p✝ : AddGroupSeminorm E
r : R
p q : AddGroupSeminorm 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 nonarchAddGroupSeminormClass : NonarchAddGroupSeminormClass (NonarchAddGroupSeminorm 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
inst✝ : AddGroup G
p q f g : NonarchAddGroupSeminorm E
h : (fun f => f.toFun) f = (fun f => f.toFun) g
⊢ f = g

Next tactic:
obtain ⟨⟨_, _⟩, _, _⟩ := f
instance nonarchAddGroupSeminormClass : NonarchAddGroupSeminormClass (NonarchAddGroupSeminorm 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✝² : AddGroup E
inst✝¹ : AddGroup F
inst✝ : AddGroup G
p q g : NonarchAddGroupSeminorm 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
h :
  (fun f => f.toFun)
      { toZeroHom := { toFun := toFun✝, map_zero' := map_zero'✝ }, add_le_max' := add_le_max'✝, neg' := neg'✝ } =
    (fun f => f.toFun) g
⊢ { toZeroHom := { toFun := toFun✝, map_zero' := map_zero'✝ }, add_le_max' := add_le_max'✝, neg' := neg'✝ } = g

Next tactic:
cases g
instance nonarchAddGroupSeminormClass : NonarchAddGroupSeminormClass (NonarchAddGroupSeminorm 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✝² : AddGroup E
inst✝¹ : AddGroup F
inst✝ : AddGroup G
p q : NonarchAddGroupSeminorm 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
toZeroHom✝ : ZeroHom E ℝ
add_le_max'✝ :
  ∀ (r s : E), ZeroHom.toFun toZeroHom✝ (r + s) ≤ max (ZeroHom.toFun toZeroHom✝ r) (ZeroHom.toFun toZeroHom✝ s)
neg'✝ : ∀ (r : E), ZeroHom.toFun toZeroHom✝ (-r) = ZeroHom.toFun toZeroHom✝ r
h :
  (fun f => f.toFun)
      { toZeroHom := { toFun := toFun✝, map_zero' := map_zero'✝ }, add_le_max' := add_le_max'✝¹, neg' := neg'✝¹ } =
    (fun f => f.toFun) { toZeroHom := toZeroHom✝, add_le_max' := add_le_max'✝, neg' := neg'✝ }
⊢ { toZeroHom := { toFun := toFun✝, map_zero' := map_zero'✝ }, add_le_max' := add_le_max'✝¹, neg' := neg'✝¹ } =
    { toZeroHom := toZeroHom✝, add_le_max' := add_le_max'✝, neg' := neg'✝ }

Next tactic:
congr
@[simp]
theorem toZeroHom_eq_coe : ⇑p.toZeroHom = p := 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
inst✝ : AddGroup G
p q : NonarchAddGroupSeminorm E
⊢ ⇑p.toZeroHom = ⇑p

Next tactic:
rfl
instance : Zero (NonarchAddGroupSeminorm E) :=
  ⟨{  toFun := 0
      map_zero' := Pi.zero_apply _
      add_le_max' := fun r s => 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
inst✝ : AddGroup G
p q : NonarchAddGroupSeminorm E
f : F →+ E
r s : E
⊢ ZeroHom.toFun { toFun := 0, map_zero' := (_ : OfNat.ofNat 0 0 = 0) } (r + s) ≤
    max (ZeroHom.toFun { toFun := 0, map_zero' := (_ : OfNat.ofNat 0 0 = 0) } r)
      (ZeroHom.toFun { toFun := 0, map_zero' := (_ : OfNat.ofNat 0 0 = 0) } s)

Next tactic:
simp only [Pi.zero_apply]
instance : Zero (NonarchAddGroupSeminorm E) :=
  ⟨{  toFun := 0
      map_zero' := Pi.zero_apply _
      add_le_max' := fun r s => by simp only [Pi.zero_apply]; 

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
inst✝ : AddGroup G
p q : NonarchAddGroupSeminorm E
f : F →+ E
r s : E
⊢ 0 ≤ max 0 0

Next tactic:
rw [max_eq_right]
instance : Zero (NonarchAddGroupSeminorm E) :=
  ⟨{  toFun := 0
      map_zero' := Pi.zero_apply _
      add_le_max' := fun r s => by simp only [Pi.zero_apply]; rw [max_eq_right]; 

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
inst✝ : AddGroup G
p q : NonarchAddGroupSeminorm E
f : F →+ E
r s : E
⊢ 0 ≤ 0

Next tactic:
rfl
instance : Sup (NonarchAddGroupSeminorm E) :=
  ⟨fun p q =>
    { toFun := p ⊔ q
      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✝¹ : AddGroup F
inst✝ : AddGroup G
p✝ q✝ : NonarchAddGroupSeminorm E
f : F →+ E
p q : NonarchAddGroupSeminorm E
⊢ (⇑p ⊔ ⇑q) 0 = 0

Next tactic:
rw [Pi.sup_apply, ← map_zero p, sup_eq_left, map_zero p, map_zero q]
instance : Sup (NonarchAddGroupSeminorm E) :=
  ⟨fun p q =>
    { toFun := p ⊔ q
      map_zero' := by rw [Pi.sup_apply, ← map_zero p, sup_eq_left, map_zero p, map_zero q]
      add_le_max' := fun x y =>
        sup_le ((map_add_le_max p x y).trans <| max_le_max le_sup_left le_sup_left)
          ((map_add_le_max q x y).trans <| max_le_max le_sup_right le_sup_right)
      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✝¹ : AddGroup F
inst✝ : AddGroup G
p✝ q✝ : NonarchAddGroupSeminorm E
f : F →+ E
p q : NonarchAddGroupSeminorm E
x : E
⊢ ZeroHom.toFun { toFun := ⇑p ⊔ ⇑q, map_zero' := (_ : (⇑p ⊔ ⇑q) 0 = 0) } (-x) =
    ZeroHom.toFun { toFun := ⇑p ⊔ ⇑q, map_zero' := (_ : (⇑p ⊔ ⇑q) 0 = 0) } x

Next tactic:
simp_rw [Pi.sup_apply, map_neg_eq_map p, map_neg_eq_map q]
theorem add_bddBelow_range_add {p q : NonarchAddGroupSeminorm E} {x : E} :
    BddBelow (range fun y => p y + q (x - y)) :=
  ⟨0, 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✝¹ : AddCommGroup E
inst✝ : AddCommGroup F
p✝ q✝ : NonarchAddGroupSeminorm E
x✝ y : E
p q : NonarchAddGroupSeminorm E
x : E
⊢ 0 ∈ lowerBounds (range fun y => p y + q (x - y))

Next tactic:
rintro _ ⟨x, rfl⟩
theorem add_bddBelow_range_add {p q : NonarchAddGroupSeminorm E} {x : E} :
    BddBelow (range fun y => p y + q (x - y)) :=
  ⟨0, by
    rintro _ ⟨x, rfl⟩
    

Proof state:
case intro
ι : Type u_1
R : Type u_2
R' : Type u_3
E : Type u_4
F : Type u_5
G : Type u_6
inst✝¹ : AddCommGroup E
inst✝ : AddCommGroup F
p✝ q✝ : NonarchAddGroupSeminorm E
x✝¹ y : E
p q : NonarchAddGroupSeminorm E
x✝ x : E
⊢ 0 ≤ (fun y => p y + q (x✝ - y)) x

Next tactic:
dsimp
theorem add_bddBelow_range_add {p q : NonarchAddGroupSeminorm E} {x : E} :
    BddBelow (range fun y => p y + q (x - y)) :=
  ⟨0, by
    rintro _ ⟨x, rfl⟩
    dsimp
    

Proof state:
case intro
ι : Type u_1
R : Type u_2
R' : Type u_3
E : Type u_4
F : Type u_5
G : Type u_6
inst✝¹ : AddCommGroup E
inst✝ : AddCommGroup F
p✝ q✝ : NonarchAddGroupSeminorm E
x✝¹ y : E
p q : NonarchAddGroupSeminorm E
x✝ x : E
⊢ 0 ≤ p x + q (x✝ - x)

Next tactic:
positivity
@[to_additive existing AddGroupSeminorm.toOne]
instance toOne [DecidableEq E] : One (GroupSeminorm E) :=
  ⟨{  toFun := fun x => if x = 1 then 0 else 1
      map_one' := if_pos rfl
      mul_le' := 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 ℝ
inst✝ : DecidableEq E
x y : E
⊢ (fun x => if x = 1 then 0 else 1) (x * y) ≤ (fun x => if x = 1 then 0 else 1) x + (fun x => if x = 1 then 0 else 1) y

Next tactic:
by_cases hx : x = 1
@[to_additive existing AddGroupSeminorm.toOne]
instance toOne [DecidableEq E] : One (GroupSeminorm E) :=
  ⟨{  toFun := fun x => if x = 1 then 0 else 1
      map_one' := if_pos rfl
      mul_le' := fun x y => by
        by_cases hx : x = 1
        · 

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✝⁴ : Group E
inst✝³ : SMul R ℝ
inst✝² : SMul R ℝ≥0
inst✝¹ : IsScalarTower R ℝ≥0 ℝ
inst✝ : DecidableEq E
x y : E
hx : x = 1
⊢ (fun x => if x = 1 then 0 else 1) (x * y) ≤ (fun x => if x = 1 then 0 else 1) x + (fun x => if x = 1 then 0 else 1) y

Next tactic:
simp only
@[to_additive existing AddGroupSeminorm.toOne]
instance toOne [DecidableEq E] : One (GroupSeminorm E) :=
  ⟨{  toFun := fun x => if x = 1 then 0 else 1
      map_one' := if_pos rfl
      mul_le' := fun x y => by
        by_cases hx : x = 1
        · simp only
          

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✝⁴ : Group E
inst✝³ : SMul R ℝ
inst✝² : SMul R ℝ≥0
inst✝¹ : IsScalarTower R ℝ≥0 ℝ
inst✝ : DecidableEq E
x y : E
hx : x = 1
⊢ (if x * y = 1 then 0 else 1) ≤ (if x = 1 then 0 else 1) + if y = 1 then 0 else 1

Next tactic:
rw [if_pos hx, hx, one_mul, zero_add]
@[to_additive existing AddGroupSeminorm.toOne]
instance toOne [DecidableEq E] : One (GroupSeminorm E) :=
  ⟨{  toFun := fun x => if x = 1 then 0 else 1
      map_one' := if_pos rfl
      mul_le' := fun x y => by
        by_cases hx : x = 1
        · simp only
          rw [if_pos hx, hx, one_mul, zero_add]
        · 

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✝⁴ : Group E
inst✝³ : SMul R ℝ
inst✝² : SMul R ℝ≥0
inst✝¹ : IsScalarTower R ℝ≥0 ℝ
inst✝ : DecidableEq E
x y : E
hx : ¬x = 1
⊢ (fun x => if x = 1 then 0 else 1) (x * y) ≤ (fun x => if x = 1 then 0 else 1) x + (fun x => if x = 1 then 0 else 1) y

Next tactic:
simp only
@[to_additive existing AddGroupSeminorm.toOne]
instance toOne [DecidableEq E] : One (GroupSeminorm E) :=
  ⟨{  toFun := fun x => if x = 1 then 0 else 1
      map_one' := if_pos rfl
      mul_le' := fun x y => by
        by_cases hx : x = 1
        · simp only
          rw [if_pos hx, hx, one_mul, zero_add]
        · simp only
          

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✝⁴ : Group E
inst✝³ : SMul R ℝ
inst✝² : SMul R ℝ≥0
inst✝¹ : IsScalarTower R ℝ≥0 ℝ
inst✝ : DecidableEq E
x y : E
hx : ¬x = 1
⊢ (if x * y = 1 then 0 else 1) ≤ (if x = 1 then 0 else 1) + if y = 1 then 0 else 1

Next tactic:
rw [if_neg hx]
@[to_additive existing AddGroupSeminorm.toOne]
instance toOne [DecidableEq E] : One (GroupSeminorm E) :=
  ⟨{  toFun := fun x => if x = 1 then 0 else 1
      map_one' := if_pos rfl
      mul_le' := fun x y => by
        by_cases hx : x = 1
        · simp only
          rw [if_pos hx, hx, one_mul, zero_add]
        · simp only
          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✝⁴ : Group E
inst✝³ : SMul R ℝ
inst✝² : SMul R ℝ≥0
inst✝¹ : IsScalarTower R ℝ≥0 ℝ
inst✝ : DecidableEq E
x y : E
hx : ¬x = 1
⊢ (if x * y = 1 then 0 else 1) ≤ 1 + if y = 1 then 0 else 1

Next tactic:
refine' le_add_of_le_of_nonneg _ _
@[to_additive existing AddGroupSeminorm.toOne]
instance toOne [DecidableEq E] : One (GroupSeminorm E) :=
  ⟨{  toFun := fun x => if x = 1 then 0 else 1
      map_one' := if_pos rfl
      mul_le' := fun x y => by
        by_cases hx : x = 1
        · simp only
          rw [if_pos hx, hx, one_mul, zero_add]
        · simp only
          rw [if_neg hx]
          refine' le_add_of_le_of_nonneg _ _ <;> 

Proof state:
case neg.refine'_1
ι : 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 ℝ
inst✝ : DecidableEq E
x y : E
hx : ¬x = 1
⊢ (if x * y = 1 then 0 else 1) ≤ 1

Next tactic:
split_ifs
@[to_additive existing AddGroupSeminorm.toOne]
instance toOne [DecidableEq E] : One (GroupSeminorm E) :=
  ⟨{  toFun := fun x => if x = 1 then 0 else 1
      map_one' := if_pos rfl
      mul_le' := fun x y => by
        by_cases hx : x = 1
        · simp only
          rw [if_pos hx, hx, one_mul, zero_add]
        · simp only
          rw [if_neg hx]
          refine' le_add_of_le_of_nonneg _ _ <;> 

Proof state:
case neg.refine'_2
ι : 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 ℝ
inst✝ : DecidableEq E
x y : E
hx : ¬x = 1
⊢ 0 ≤ if y = 1 then 0 else 1

Next tactic:
split_ifs
@[to_additive existing AddGroupSeminorm.toOne]
instance toOne [DecidableEq E] : One (GroupSeminorm E) :=
  ⟨{  toFun := fun x => if x = 1 then 0 else 1
      map_one' := if_pos rfl
      mul_le' := fun x y => by
        by_cases hx : x = 1
        · simp only
          rw [if_pos hx, hx, one_mul, zero_add]
        · simp only
          rw [if_neg hx]
          refine' le_add_of_le_of_nonneg _ _ <;> 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✝⁴ : Group E
inst✝³ : SMul R ℝ
inst✝² : SMul R ℝ≥0
inst✝¹ : IsScalarTower R ℝ≥0 ℝ
inst✝ : DecidableEq E
x y : E
hx : ¬x = 1
h✝ : x * y = 1
⊢ 0 ≤ 1

Next tactic:
norm_num
@[to_additive existing AddGroupSeminorm.toOne]
instance toOne [DecidableEq E] : One (GroupSeminorm E) :=
  ⟨{  toFun := fun x => if x = 1 then 0 else 1
      map_one' := if_pos rfl
      mul_le' := fun x y => by
        by_cases hx : x = 1
        · simp only
          rw [if_pos hx, hx, one_mul, zero_add]
        · simp only
          rw [if_neg hx]
          refine' le_add_of_le_of_nonneg _ _ <;> 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✝⁴ : Group E
inst✝³ : SMul R ℝ
inst✝² : SMul R ℝ≥0
inst✝¹ : IsScalarTower R ℝ≥0 ℝ
inst✝ : DecidableEq E
x y : E
hx : ¬x = 1
h✝ : ¬x * y = 1
⊢ 1 ≤ 1

Next tactic:
norm_num
@[to_additive existing AddGroupSeminorm.toOne]
instance toOne [DecidableEq E] : One (GroupSeminorm E) :=
  ⟨{  toFun := fun x => if x = 1 then 0 else 1
      map_one' := if_pos rfl
      mul_le' := fun x y => by
        by_cases hx : x = 1
        · simp only
          rw [if_pos hx, hx, one_mul, zero_add]
        · simp only
          rw [if_neg hx]
          refine' le_add_of_le_of_nonneg _ _ <;> 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✝⁴ : Group E
inst✝³ : SMul R ℝ
inst✝² : SMul R ℝ≥0
inst✝¹ : IsScalarTower R ℝ≥0 ℝ
inst✝ : DecidableEq E
x y : E
hx : ¬x = 1
h✝ : y = 1
⊢ 0 ≤ 0

Next tactic:
norm_num
@[to_additive existing AddGroupSeminorm.toOne]
instance toOne [DecidableEq E] : One (GroupSeminorm E) :=
  ⟨{  toFun := fun x => if x = 1 then 0 else 1
      map_one' := if_pos rfl
      mul_le' := fun x y => by
        by_cases hx : x = 1
        · simp only
          rw [if_pos hx, hx, one_mul, zero_add]
        · simp only
          rw [if_neg hx]
          refine' le_add_of_le_of_nonneg _ _ <;> 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✝⁴ : Group E
inst✝³ : SMul R ℝ
inst✝² : SMul R ℝ≥0
inst✝¹ : IsScalarTower R ℝ≥0 ℝ
inst✝ : DecidableEq E
x y : E
hx : ¬x = 1
h✝ : ¬y = 1
⊢ 0 ≤ 1

Next tactic:
norm_num
@[to_additive existing AddGroupSeminorm.toOne]
instance toOne [DecidableEq E] : One (GroupSeminorm E) :=
  ⟨{  toFun := fun x => if x = 1 then 0 else 1
      map_one' := if_pos rfl
      mul_le' := fun x y => by
        by_cases hx : x = 1
        · simp only
          rw [if_pos hx, hx, one_mul, zero_add]
        · simp only
          rw [if_neg hx]
          refine' le_add_of_le_of_nonneg _ _ <;> split_ifs <;> norm_num
      inv' := 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✝⁴ : Group E
inst✝³ : SMul R ℝ
inst✝² : SMul R ℝ≥0
inst✝¹ : IsScalarTower R ℝ≥0 ℝ
inst✝ : DecidableEq E
x : E
⊢ (fun x => if x = 1 then 0 else 1) x⁻¹ = (fun x => if x = 1 then 0 else 1) x

Next tactic:
simp_rw [inv_eq_one]
/-- Any action on `ℝ` which factors through `ℝ≥0` applies to an `AddGroupSeminorm`. -/
@[to_additive existing AddGroupSeminorm.toSMul]
instance : SMul R (GroupSeminorm E) :=
  ⟨fun r p =>
    { toFun := fun x => r • p x
      map_one' := 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 : GroupSeminorm E
⊢ (fun x => r • p x) 1 = 0

Next tactic:
simp only [← smul_one_smul ℝ≥0 r (_ : ℝ), NNReal.smul_def, smul_eq_mul, map_one_eq_zero p,
          mul_zero]
/-- Any action on `ℝ` which factors through `ℝ≥0` applies to an `AddGroupSeminorm`. -/
@[to_additive existing AddGroupSeminorm.toSMul]
instance : SMul R (GroupSeminorm E) :=
  ⟨fun r p =>
    { toFun := fun x => r • p x
      map_one' := by
        simp only [← smul_one_smul ℝ≥0 r (_ : ℝ), NNReal.smul_def, smul_eq_mul, map_one_eq_zero p,
          mul_zero]
      mul_le' := fun _ _ => 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 : GroupSeminorm E
x✝¹ x✝ : E
⊢ (fun x => r • p x) (x✝¹ * x✝) ≤ (fun x => r • p x) x✝¹ + (fun x => r • p x) x✝

Next tactic:
simp only [← smul_one_smul ℝ≥0 r (_ : ℝ), NNReal.smul_def, smul_eq_mul, ← mul_add]
/-- Any action on `ℝ` which factors through `ℝ≥0` applies to an `AddGroupSeminorm`. -/
@[to_additive existing AddGroupSeminorm.toSMul]
instance : SMul R (GroupSeminorm E) :=
  ⟨fun r p =>
    { toFun := fun x => r • p x
      map_one' := by
        simp only [← smul_one_smul ℝ≥0 r (_ : ℝ), NNReal.smul_def, smul_eq_mul, map_one_eq_zero p,
          mul_zero]
      mul_le' := fun _ _ => by
        simp only [← smul_one_smul ℝ≥0 r (_ : ℝ), NNReal.smul_def, smul_eq_mul, ← mul_add]
        

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 : GroupSeminorm E
x✝¹ x✝ : E
⊢ ↑(r • 1) * p (x✝¹ * x✝) ≤ ↑(r • 1) * (p x✝¹ + p x✝)

Next tactic:
gcongr
/-- Any action on `ℝ` which factors through `ℝ≥0` applies to an `AddGroupSeminorm`. -/
@[to_additive existing AddGroupSeminorm.toSMul]
instance : SMul R (GroupSeminorm E) :=
  ⟨fun r p =>
    { toFun := fun x => r • p x
      map_one' := by
        simp only [← smul_one_smul ℝ≥0 r (_ : ℝ), NNReal.smul_def, smul_eq_mul, map_one_eq_zero p,
          mul_zero]
      mul_le' := fun _ _ => by
        simp only [← smul_one_smul ℝ≥0 r (_ : ℝ), NNReal.smul_def, smul_eq_mul, ← mul_add]
        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✝³ : Group E
inst✝² : SMul R ℝ
inst✝¹ : SMul R ℝ≥0
inst✝ : IsScalarTower R ℝ≥0 ℝ
r : R
p : GroupSeminorm E
x✝¹ x✝ : E
⊢ p (x✝¹ * x✝) ≤ p x✝¹ + p x✝

Next tactic:
apply map_mul_le_add
/-- Any action on `ℝ` which factors through `ℝ≥0` applies to an `AddGroupSeminorm`. -/
@[to_additive existing AddGroupSeminorm.toSMul]
instance : SMul R (GroupSeminorm E) :=
  ⟨fun r p =>
    { toFun := fun x => r • p x
      map_one' := by
        simp only [← smul_one_smul ℝ≥0 r (_ : ℝ), NNReal.smul_def, smul_eq_mul, map_one_eq_zero p,
          mul_zero]
      mul_le' := fun _ _ => by
        simp only [← smul_one_smul ℝ≥0 r (_ : ℝ), NNReal.smul_def, smul_eq_mul, ← mul_add]
        gcongr
        apply map_mul_le_add
      inv' := 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✝³ : Group E
inst✝² : SMul R ℝ
inst✝¹ : SMul R ℝ≥0
inst✝ : IsScalarTower R ℝ≥0 ℝ
r : R
p : GroupSeminorm E
x : E
⊢ (fun x => r • p x) x⁻¹ = (fun x => r • p x) x

Next tactic:
simp_rw [map_inv_eq_map p]