l3lab/ntp-mathlib huggingface dataset:
instance (priority := 100) NonarchAddGroupSeminormClass.toAddGroupSeminormClass [AddGroup E]
    [NonarchAddGroupSeminormClass F E] : AddGroupSeminormClass F E ℝ :=
  { ‹NonarchAddGroupSeminormClass F E› with
    map_add_le_add := fun f x y =>
      haveI h_nonneg : ∀ a, 0 ≤ f a := 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✝ : NonarchAddGroupSeminormClass F E
src✝ : NonarchAddGroupSeminormClass F E := inst✝
f : F
x y : E
⊢ ∀ (a : E), 0 ≤ f a

Next tactic:
intro a
instance (priority := 100) NonarchAddGroupSeminormClass.toAddGroupSeminormClass [AddGroup E]
    [NonarchAddGroupSeminormClass F E] : AddGroupSeminormClass F E ℝ :=
  { ‹NonarchAddGroupSeminormClass F E› with
    map_add_le_add := fun f x y =>
      haveI h_nonneg : ∀ a, 0 ≤ f a := by
        intro a
        

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✝ : NonarchAddGroupSeminormClass F E
src✝ : NonarchAddGroupSeminormClass F E := inst✝
f : F
x y a : E
⊢ 0 ≤ f a

Next tactic:
rw [← NonarchAddGroupSeminormClass.map_zero f, ← sub_self a]
instance (priority := 100) NonarchAddGroupSeminormClass.toAddGroupSeminormClass [AddGroup E]
    [NonarchAddGroupSeminormClass F E] : AddGroupSeminormClass F E ℝ :=
  { ‹NonarchAddGroupSeminormClass F E› with
    map_add_le_add := fun f x y =>
      haveI h_nonneg : ∀ a, 0 ≤ f a := by
        intro a
        rw [← NonarchAddGroupSeminormClass.map_zero f, ← sub_self a]
        

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✝ : NonarchAddGroupSeminormClass F E
src✝ : NonarchAddGroupSeminormClass F E := inst✝
f : F
x y a : E
⊢ f (a - a) ≤ f a

Next tactic:
exact le_trans (map_sub_le_max _ _ _) (by rw [max_self (f a)])
instance (priority := 100) NonarchAddGroupSeminormClass.toAddGroupSeminormClass [AddGroup E]
    [NonarchAddGroupSeminormClass F E] : AddGroupSeminormClass F E ℝ :=
  { ‹NonarchAddGroupSeminormClass F E› with
    map_add_le_add := fun f x y =>
      haveI h_nonneg : ∀ a, 0 ≤ f a := by
        intro a
        rw [← NonarchAddGroupSeminormClass.map_zero f, ← sub_self a]
        exact le_trans (map_sub_le_max _ _ _) (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✝ : NonarchAddGroupSeminormClass F E
src✝ : NonarchAddGroupSeminormClass F E := inst✝
f : F
x y a : E
⊢ max (f a) (f a) ≤ f a

Next tactic:
rw [max_self (f a)]
@[to_additive]
instance groupSeminormClass : GroupSeminormClass (GroupSeminorm 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 : GroupSeminorm E
h : (fun f => f.toFun) f = (fun f => f.toFun) g
⊢ f = g

Next tactic:
cases f
@[to_additive]
instance groupSeminormClass : GroupSeminormClass (GroupSeminorm E) E ℝ
    where
  coe f := f.toFun
  coe_injective' f g h := by cases f; 

Proof state:
case 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 : GroupSeminorm 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
h :
  (fun f => f.toFun) { toFun := toFun✝, map_one' := map_one'✝, mul_le' := mul_le'✝, inv' := inv'✝ } =
    (fun f => f.toFun) g
⊢ { toFun := toFun✝, map_one' := map_one'✝, mul_le' := mul_le'✝, inv' := inv'✝ } = g

Next tactic:
cases g
@[to_additive]
instance groupSeminormClass : GroupSeminormClass (GroupSeminorm E) E ℝ
    where
  coe f := f.toFun
  coe_injective' f g h := by cases f; cases g; 

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 : GroupSeminorm 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
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
h :
  (fun f => f.toFun) { toFun := toFun✝¹, map_one' := map_one'✝¹, mul_le' := mul_le'✝¹, inv' := inv'✝¹ } =
    (fun f => f.toFun) { toFun := toFun✝, map_one' := map_one'✝, mul_le' := mul_le'✝, inv' := inv'✝ }
⊢ { toFun := toFun✝¹, map_one' := map_one'✝¹, mul_le' := mul_le'✝¹, inv' := inv'✝¹ } =
    { toFun := toFun✝, map_one' := map_one'✝, mul_le' := mul_le'✝, inv' := inv'✝ }

Next tactic:
congr
@[to_additive]
instance : Add (GroupSeminorm E) :=
  ⟨fun p q =>
    { toFun := fun x => p x + q 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✝¹ : Group F
inst✝ : Group G
p✝ q✝ : GroupSeminorm E
f : F →* E
p q : GroupSeminorm E
⊢ (fun x => p x + q x) 1 = 0

Next tactic:
simp_rw [map_one_eq_zero p, map_one_eq_zero q, zero_add]
@[to_additive]
instance : Add (GroupSeminorm E) :=
  ⟨fun p q =>
    { toFun := fun x => p x + q x
      map_one' := by simp_rw [map_one_eq_zero p, map_one_eq_zero q, zero_add]
      mul_le' := fun _ _ =>
        (add_le_add (map_mul_le_add p _ _) <| map_mul_le_add q _ _).trans_eq <|
          add_add_add_comm _ _ _ _
      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✝¹ : Group F
inst✝ : Group G
p✝ q✝ : GroupSeminorm E
f : F →* E
p q : GroupSeminorm E
x : E
⊢ (fun x => p x + q x) x⁻¹ = (fun x => p x + q x) x

Next tactic:
simp_rw [map_inv_eq_map p, map_inv_eq_map q]
@[to_additive]
instance : Sup (GroupSeminorm E) :=
  ⟨fun p q =>
    { toFun := p ⊔ q
      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✝¹ : Group F
inst✝ : Group G
p✝ q✝ : GroupSeminorm E
f : F →* E
p q : GroupSeminorm E
⊢ (⇑p ⊔ ⇑q) 1 = 0

Next tactic:
rw [Pi.sup_apply, ← map_one_eq_zero p, sup_eq_left, map_one_eq_zero p, map_one_eq_zero q]
@[to_additive]
instance : Sup (GroupSeminorm E) :=
  ⟨fun p q =>
    { toFun := p ⊔ q
      map_one' := by
        rw [Pi.sup_apply, ← map_one_eq_zero p, sup_eq_left, map_one_eq_zero p, map_one_eq_zero q]
      mul_le' := fun x y =>
        sup_le ((map_mul_le_add p x y).trans <| add_le_add le_sup_left le_sup_left)
          ((map_mul_le_add q x y).trans <| add_le_add le_sup_right le_sup_right)
      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✝¹ : Group F
inst✝ : Group G
p✝ q✝ : GroupSeminorm E
f : F →* E
p q : GroupSeminorm E
x : E
⊢ (⇑p ⊔ ⇑q) x⁻¹ = (⇑p ⊔ ⇑q) x

Next tactic:
rw [Pi.sup_apply, Pi.sup_apply, map_inv_eq_map p, map_inv_eq_map q]
/-- Composition of a group seminorm with a monoid homomorphism as a group seminorm. -/
@[to_additive "Composition of an additive group seminorm with an additive monoid homomorphism as an
additive group seminorm."]
def comp (p : GroupSeminorm E) (f : F →* E) : GroupSeminorm F
    where
  toFun x := p (f 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✝¹ : Group F
inst✝ : Group G
p✝ q : GroupSeminorm E
f✝ : F →* E
p : GroupSeminorm E
f : F →* E
⊢ (fun x => p (f x)) 1 = 0

Next tactic:
simp_rw [f.map_one, map_one_eq_zero p]
/-- Composition of a group seminorm with a monoid homomorphism as a group seminorm. -/
@[to_additive "Composition of an additive group seminorm with an additive monoid homomorphism as an
additive group seminorm."]
def comp (p : GroupSeminorm E) (f : F →* E) : GroupSeminorm F
    where
  toFun x := p (f x)
  map_one' := by simp_rw [f.map_one, map_one_eq_zero p]
  mul_le' _ _ := (congr_arg p <| f.map_mul _ _).trans_le <| map_mul_le_add p _ _
  inv' 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✝¹ : Group F
inst✝ : Group G
p✝ q : GroupSeminorm E
f✝ : F →* E
p : GroupSeminorm E
f : F →* E
x : F
⊢ (fun x => p (f x)) x⁻¹ = (fun x => p (f x)) x

Next tactic:
simp_rw [map_inv, map_inv_eq_map p]
@[to_additive]
theorem mul_bddBelow_range_add {p q : GroupSeminorm 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✝¹ : CommGroup E
inst✝ : CommGroup F
p✝ q✝ : GroupSeminorm E
x✝ y : E
p q : GroupSeminorm E
x : E
⊢ 0 ∈ lowerBounds (range fun y => p y + q (x / y))

Next tactic:
rintro _ ⟨x, rfl⟩
@[to_additive]
theorem mul_bddBelow_range_add {p q : GroupSeminorm 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✝¹ : CommGroup E
inst✝ : CommGroup F
p✝ q✝ : GroupSeminorm E
x✝¹ y : E
p q : GroupSeminorm E
x✝ x : E
⊢ 0 ≤ (fun y => p y + q (x✝ / y)) x

Next tactic:
dsimp
@[to_additive]
theorem mul_bddBelow_range_add {p q : GroupSeminorm 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✝¹ : CommGroup E
inst✝ : CommGroup F
p✝ q✝ : GroupSeminorm E
x✝¹ y : E
p q : GroupSeminorm E
x✝ x : E
⊢ 0 ≤ p x + q (x✝ / x)

Next tactic:
positivity
@[to_additive]
noncomputable instance : Inf (GroupSeminorm E) :=
  ⟨fun p q =>
    { toFun := fun x => ⨅ y, p y + q (x / y)
      map_one' :=
        ciInf_eq_of_forall_ge_of_forall_gt_exists_lt
          -- porting note: replace `add_nonneg` with `positivity` once we have the extension
          (fun x => add_nonneg (map_nonneg _ _) (map_nonneg _ _)) fun r hr =>
          ⟨1, 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✝¹ : CommGroup E
inst✝ : CommGroup F
p✝ q✝ : GroupSeminorm E
x y : E
p q : GroupSeminorm E
r : ℝ
hr : 0 < r
⊢ p 1 + q (1 / 1) < r

Next tactic:
rwa [div_one, map_one_eq_zero p, map_one_eq_zero q, add_zero]
@[to_additive]
noncomputable instance : Inf (GroupSeminorm E) :=
  ⟨fun p q =>
    { toFun := fun x => ⨅ y, p y + q (x / y)
      map_one' :=
        ciInf_eq_of_forall_ge_of_forall_gt_exists_lt
          -- porting note: replace `add_nonneg` with `positivity` once we have the extension
          (fun x => add_nonneg (map_nonneg _ _) (map_nonneg _ _)) fun r hr =>
          ⟨1, by rwa [div_one, map_one_eq_zero p, map_one_eq_zero q, add_zero]⟩
      mul_le' := fun x y =>
        le_ciInf_add_ciInf fun u v => 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✝¹ : CommGroup E
inst✝ : CommGroup F
p✝ q✝ : GroupSeminorm E
x✝ y✝ : E
p q : GroupSeminorm E
x y u v : E
⊢ (fun x => ⨅ y, p y + q (x / y)) (x * y) ≤ p u + q (x / u) + (p v + q (y / v))

Next tactic:
refine' ciInf_le_of_le mul_bddBelow_range_add (u * v) _
@[to_additive]
noncomputable instance : Inf (GroupSeminorm E) :=
  ⟨fun p q =>
    { toFun := fun x => ⨅ y, p y + q (x / y)
      map_one' :=
        ciInf_eq_of_forall_ge_of_forall_gt_exists_lt
          -- porting note: replace `add_nonneg` with `positivity` once we have the extension
          (fun x => add_nonneg (map_nonneg _ _) (map_nonneg _ _)) fun r hr =>
          ⟨1, by rwa [div_one, map_one_eq_zero p, map_one_eq_zero q, add_zero]⟩
      mul_le' := fun x y =>
        le_ciInf_add_ciInf fun u v => by
          refine' ciInf_le_of_le mul_bddBelow_range_add (u * v) _
          

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✝¹ : CommGroup E
inst✝ : CommGroup F
p✝ q✝ : GroupSeminorm E
x✝ y✝ : E
p q : GroupSeminorm E
x y u v : E
⊢ p (u * v) + q (x * y / (u * v)) ≤ p u + q (x / u) + (p v + q (y / v))

Next tactic:
rw [mul_div_mul_comm, add_add_add_comm]
@[to_additive]
noncomputable instance : Inf (GroupSeminorm E) :=
  ⟨fun p q =>
    { toFun := fun x => ⨅ y, p y + q (x / y)
      map_one' :=
        ciInf_eq_of_forall_ge_of_forall_gt_exists_lt
          -- porting note: replace `add_nonneg` with `positivity` once we have the extension
          (fun x => add_nonneg (map_nonneg _ _) (map_nonneg _ _)) fun r hr =>
          ⟨1, by rwa [div_one, map_one_eq_zero p, map_one_eq_zero q, add_zero]⟩
      mul_le' := fun x y =>
        le_ciInf_add_ciInf fun u v => by
          refine' ciInf_le_of_le mul_bddBelow_range_add (u * v) _
          rw [mul_div_mul_comm, add_add_add_comm]
          

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✝¹ : CommGroup E
inst✝ : CommGroup F
p✝ q✝ : GroupSeminorm E
x✝ y✝ : E
p q : GroupSeminorm E
x y u v : E
⊢ p (u * v) + q (x / u * (y / v)) ≤ p u + p v + (q (x / u) + q (y / v))

Next tactic:
exact add_le_add (map_mul_le_add p _ _) (map_mul_le_add q _ _)
@[to_additive]
noncomputable instance : Inf (GroupSeminorm E) :=
  ⟨fun p q =>
    { toFun := fun x => ⨅ y, p y + q (x / y)
      map_one' :=
        ciInf_eq_of_forall_ge_of_forall_gt_exists_lt
          -- porting note: replace `add_nonneg` with `positivity` once we have the extension
          (fun x => add_nonneg (map_nonneg _ _) (map_nonneg _ _)) fun r hr =>
          ⟨1, by rwa [div_one, map_one_eq_zero p, map_one_eq_zero q, add_zero]⟩
      mul_le' := fun x y =>
        le_ciInf_add_ciInf fun u v => by
          refine' ciInf_le_of_le mul_bddBelow_range_add (u * v) _
          rw [mul_div_mul_comm, add_add_add_comm]
          exact add_le_add (map_mul_le_add p _ _) (map_mul_le_add q _ _)
      inv' := fun x =>
        (inv_surjective.iInf_comp _).symm.trans <| 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✝¹ : CommGroup E
inst✝ : CommGroup F
p✝ q✝ : GroupSeminorm E
x✝ y : E
p q : GroupSeminorm E
x : E
⊢ ⨅ x_1, p x_1⁻¹ + q (x⁻¹ / x_1⁻¹) = (fun x => ⨅ y, p y + q (x / y)) x

Next tactic:
simp_rw [map_inv_eq_map p, ← inv_div', map_inv_eq_map q]
@[to_additive]
noncomputable instance : Lattice (GroupSeminorm E) :=
  { GroupSeminorm.semilatticeSup with
    inf := (· ⊓ ·)
    inf_le_left := fun p q x =>
      ciInf_le_of_le mul_bddBelow_range_add 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✝¹ : CommGroup E
inst✝ : CommGroup F
p✝ q✝ : GroupSeminorm E
x✝ y : E
src✝ : SemilatticeSup (GroupSeminorm E) := semilatticeSup
p q : GroupSeminorm E
x : E
⊢ p x + q (x / x) ≤ (fun f => ⇑f) p x

Next tactic:
rw [div_self', map_one_eq_zero q, add_zero]
@[to_additive]
noncomputable instance : Lattice (GroupSeminorm E) :=
  { GroupSeminorm.semilatticeSup with
    inf := (· ⊓ ·)
    inf_le_left := fun p q x =>
      ciInf_le_of_le mul_bddBelow_range_add x <| by rw [div_self', map_one_eq_zero q, add_zero]
    inf_le_right := fun p q x =>
      ciInf_le_of_le mul_bddBelow_range_add (1 : E) <| 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✝¹ : CommGroup E
inst✝ : CommGroup F
p✝ q✝ : GroupSeminorm E
x✝ y : E
src✝ : SemilatticeSup (GroupSeminorm E) := semilatticeSup
p q : GroupSeminorm E
x : E
⊢ p 1 + q (x / 1) ≤ (fun f => ⇑f) q x

Next tactic:
simpa only [div_one x, map_one_eq_zero p, zero_add (q x)] using le_rfl
instance toOne [DecidableEq E] : One (AddGroupSeminorm E) :=
  ⟨{  toFun := fun x => if x = 0 then 0 else 1
      map_zero' := if_pos rfl
      add_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✝⁴ : AddGroup E
inst✝³ : SMul R ℝ
inst✝² : SMul R ℝ≥0
inst✝¹ : IsScalarTower R ℝ≥0 ℝ
p : AddGroupSeminorm E
inst✝ : DecidableEq E
x y : E
⊢ (fun x => if x = 0 then 0 else 1) (x + y) ≤ (fun x => if x = 0 then 0 else 1) x + (fun x => if x = 0 then 0 else 1) y

Next tactic:
by_cases hx : x = 0
instance toOne [DecidableEq E] : One (AddGroupSeminorm E) :=
  ⟨{  toFun := fun x => if x = 0 then 0 else 1
      map_zero' := if_pos rfl
      add_le' := 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 ℝ
p : AddGroupSeminorm E
inst✝ : DecidableEq E
x y : E
hx : x = 0
⊢ (fun x => if x = 0 then 0 else 1) (x + y) ≤ (fun x => if x = 0 then 0 else 1) x + (fun x => if x = 0 then 0 else 1) y

Next tactic:
simp only
instance toOne [DecidableEq E] : One (AddGroupSeminorm E) :=
  ⟨{  toFun := fun x => if x = 0 then 0 else 1
      map_zero' := if_pos rfl
      add_le' := fun x y => by
        by_cases hx : x = 0
        · 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✝⁴ : AddGroup E
inst✝³ : SMul R ℝ
inst✝² : SMul R ℝ≥0
inst✝¹ : IsScalarTower R ℝ≥0 ℝ
p : AddGroupSeminorm E
inst✝ : DecidableEq E
x y : E
hx : x = 0
⊢ (if x + y = 0 then 0 else 1) ≤ (if x = 0 then 0 else 1) + if y = 0 then 0 else 1

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

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

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

Next tactic:
refine' le_add_of_le_of_nonneg _ _
instance toOne [DecidableEq E] : One (AddGroupSeminorm E) :=
  ⟨{  toFun := fun x => if x = 0 then 0 else 1
      map_zero' := if_pos rfl
      add_le' := fun x y => by
        by_cases hx : x = 0
        · simp only
          rw [if_pos hx, hx, zero_add, 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✝⁴ : AddGroup E
inst✝³ : SMul R ℝ
inst✝² : SMul R ℝ≥0
inst✝¹ : IsScalarTower R ℝ≥0 ℝ
p : AddGroupSeminorm E
inst✝ : DecidableEq E
x y : E
hx : ¬x = 0
⊢ (if x + y = 0 then 0 else 1) ≤ 1

Next tactic:
split_ifs
instance toOne [DecidableEq E] : One (AddGroupSeminorm E) :=
  ⟨{  toFun := fun x => if x = 0 then 0 else 1
      map_zero' := if_pos rfl
      add_le' := fun x y => by
        by_cases hx : x = 0
        · simp only
          rw [if_pos hx, hx, zero_add, 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✝⁴ : AddGroup E
inst✝³ : SMul R ℝ
inst✝² : SMul R ℝ≥0
inst✝¹ : IsScalarTower R ℝ≥0 ℝ
p : AddGroupSeminorm E
inst✝ : DecidableEq E
x y : E
hx : ¬x = 0
⊢ 0 ≤ if y = 0 then 0 else 1

Next tactic:
split_ifs
instance toOne [DecidableEq E] : One (AddGroupSeminorm E) :=
  ⟨{  toFun := fun x => if x = 0 then 0 else 1
      map_zero' := if_pos rfl
      add_le' := fun x y => by
        by_cases hx : x = 0
        · simp only
          rw [if_pos hx, hx, zero_add, 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✝⁴ : AddGroup E
inst✝³ : SMul R ℝ
inst✝² : SMul R ℝ≥0
inst✝¹ : IsScalarTower R ℝ≥0 ℝ
p : AddGroupSeminorm E
inst✝ : DecidableEq E
x y : E
hx : ¬x = 0
h✝ : x + y = 0
⊢ 0 ≤ 1

Next tactic:
norm_num
instance toOne [DecidableEq E] : One (AddGroupSeminorm E) :=
  ⟨{  toFun := fun x => if x = 0 then 0 else 1
      map_zero' := if_pos rfl
      add_le' := fun x y => by
        by_cases hx : x = 0
        · simp only
          rw [if_pos hx, hx, zero_add, 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✝⁴ : AddGroup E
inst✝³ : SMul R ℝ
inst✝² : SMul R ℝ≥0
inst✝¹ : IsScalarTower R ℝ≥0 ℝ
p : AddGroupSeminorm E
inst✝ : DecidableEq E
x y : E
hx : ¬x = 0
h✝ : ¬x + y = 0
⊢ 1 ≤ 1

Next tactic:
norm_num
instance toOne [DecidableEq E] : One (AddGroupSeminorm E) :=
  ⟨{  toFun := fun x => if x = 0 then 0 else 1
      map_zero' := if_pos rfl
      add_le' := fun x y => by
        by_cases hx : x = 0
        · simp only
          rw [if_pos hx, hx, zero_add, 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✝⁴ : AddGroup E
inst✝³ : SMul R ℝ
inst✝² : SMul R ℝ≥0
inst✝¹ : IsScalarTower R ℝ≥0 ℝ
p : AddGroupSeminorm E
inst✝ : DecidableEq E
x y : E
hx : ¬x = 0
h✝ : y = 0
⊢ 0 ≤ 0

Next tactic:
norm_num
instance toOne [DecidableEq E] : One (AddGroupSeminorm E) :=
  ⟨{  toFun := fun x => if x = 0 then 0 else 1
      map_zero' := if_pos rfl
      add_le' := fun x y => by
        by_cases hx : x = 0
        · simp only
          rw [if_pos hx, hx, zero_add, 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✝⁴ : AddGroup E
inst✝³ : SMul R ℝ
inst✝² : SMul R ℝ≥0
inst✝¹ : IsScalarTower R ℝ≥0 ℝ
p : AddGroupSeminorm E
inst✝ : DecidableEq E
x y : E
hx : ¬x = 0
h✝ : ¬y = 0
⊢ 0 ≤ 1

Next tactic:
norm_num
instance toOne [DecidableEq E] : One (AddGroupSeminorm E) :=
  ⟨{  toFun := fun x => if x = 0 then 0 else 1
      map_zero' := if_pos rfl
      add_le' := fun x y => by
        by_cases hx : x = 0
        · simp only
          rw [if_pos hx, hx, zero_add, zero_add]
        · simp only
          rw [if_neg hx]
          refine' le_add_of_le_of_nonneg _ _ <;> 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 ℝ
p : AddGroupSeminorm E
inst✝ : DecidableEq E
x : E
⊢ (fun x => if x = 0 then 0 else 1) (-x) = (fun x => if x = 0 then 0 else 1) x

Next tactic:
simp_rw [neg_eq_zero]