l3lab/ntp-mathlib huggingface dataset:
instance mulRingSeminormClass : MulRingSeminormClass (MulRingSeminorm R) R ℝ where
  coe f := f.toFun
  coe_injective' f g h := by
    cases f
    cases g
    congr
    ext x
    

Proof state:
case mk.mk.e_toAddGroupSeminorm.a
F : Type u_1
R : Type u_2
S : Type u_3
x✝ y : R
r : ℝ
inst✝ : NonAssocRing R
toAddGroupSeminorm✝¹ : AddGroupSeminorm R
map_one'✝¹ : AddGroupSeminorm.toFun toAddGroupSeminorm✝¹ 1 = 1
map_mul'✝¹ :
  ∀ (x y : R),
    AddGroupSeminorm.toFun toAddGroupSeminorm✝¹ (x * y) =
      AddGroupSeminorm.toFun toAddGroupSeminorm✝¹ x * AddGroupSeminorm.toFun toAddGroupSeminorm✝¹ y
toAddGroupSeminorm✝ : AddGroupSeminorm R
map_one'✝ : AddGroupSeminorm.toFun toAddGroupSeminorm✝ 1 = 1
map_mul'✝ :
  ∀ (x y : R),
    AddGroupSeminorm.toFun toAddGroupSeminorm✝ (x * y) =
      AddGroupSeminorm.toFun toAddGroupSeminorm✝ x * AddGroupSeminorm.toFun toAddGroupSeminorm✝ y
h :
  (fun f => f.toFun) { toAddGroupSeminorm := toAddGroupSeminorm✝¹, map_one' := map_one'✝¹, map_mul' := map_mul'✝¹ } =
    (fun f => f.toFun) { toAddGroupSeminorm := toAddGroupSeminorm✝, map_one' := map_one'✝, map_mul' := map_mul'✝ }
x : R
⊢ toAddGroupSeminorm✝¹ x = toAddGroupSeminorm✝ x

Next tactic:
exact congr_fun h x
/-- The trivial seminorm on a ring `R` is the `MulRingSeminorm` taking value `0` at `0` and `1` at
every other element. -/
instance : One (MulRingSeminorm R) :=
  ⟨{ (1 : AddGroupSeminorm R) with
      map_one' := if_neg one_ne_zero
      map_mul' := fun x y => by
        

Proof state:
F : Type u_1
R : Type u_2
S : Type u_3
x✝ y✝ : R
r : ℝ
inst✝³ : NonAssocRing R
inst✝² : DecidableEq R
inst✝¹ : NoZeroDivisors R
inst✝ : Nontrivial R
src✝ : AddGroupSeminorm R := 1
x y : R
⊢ AddGroupSeminorm.toFun
      { toFun := src✝.toFun, map_zero' := (_ : AddGroupSeminorm.toFun src✝ 0 = 0),
        add_le' :=
          (_ :
            ∀ (r s : R),
              AddGroupSeminorm.toFun src✝ (r + s) ≤ AddGroupSeminorm.toFun src✝ r + AddGroupSeminorm.toFun src✝ s),
        neg' := (_ : ∀ (r : R), AddGroupSeminorm.toFun src✝ (-r) = AddGroupSeminorm.toFun src✝ r) }
      (x * y) =
    AddGroupSeminorm.toFun
        { toFun := src✝.toFun, map_zero' := (_ : AddGroupSeminorm.toFun src✝ 0 = 0),
          add_le' :=
            (_ :
              ∀ (r s : R),
                AddGroupSeminorm.toFun src✝ (r + s) ≤ AddGroupSeminorm.toFun src✝ r + AddGroupSeminorm.toFun src✝ s),
          neg' := (_ : ∀ (r : R), AddGroupSeminorm.toFun src✝ (-r) = AddGroupSeminorm.toFun src✝ r) }
        x *
      AddGroupSeminorm.toFun
        { toFun := src✝.toFun, map_zero' := (_ : AddGroupSeminorm.toFun src✝ 0 = 0),
          add_le' :=
            (_ :
              ∀ (r s : R),
                AddGroupSeminorm.toFun src✝ (r + s) ≤ AddGroupSeminorm.toFun src✝ r + AddGroupSeminorm.toFun src✝ s),
          neg' := (_ : ∀ (r : R), AddGroupSeminorm.toFun src✝ (-r) = AddGroupSeminorm.toFun src✝ r) }
        y

Next tactic:
obtain rfl | hx := eq_or_ne x 0
/-- The trivial seminorm on a ring `R` is the `MulRingSeminorm` taking value `0` at `0` and `1` at
every other element. -/
instance : One (MulRingSeminorm R) :=
  ⟨{ (1 : AddGroupSeminorm R) with
      map_one' := if_neg one_ne_zero
      map_mul' := fun x y => by
        obtain rfl | hx := eq_or_ne x 0
        · 

Proof state:
case inl
F : Type u_1
R : Type u_2
S : Type u_3
x y✝ : R
r : ℝ
inst✝³ : NonAssocRing R
inst✝² : DecidableEq R
inst✝¹ : NoZeroDivisors R
inst✝ : Nontrivial R
src✝ : AddGroupSeminorm R := 1
y : R
⊢ AddGroupSeminorm.toFun
      { toFun := src✝.toFun, map_zero' := (_ : AddGroupSeminorm.toFun src✝ 0 = 0),
        add_le' :=
          (_ :
            ∀ (r s : R),
              AddGroupSeminorm.toFun src✝ (r + s) ≤ AddGroupSeminorm.toFun src✝ r + AddGroupSeminorm.toFun src✝ s),
        neg' := (_ : ∀ (r : R), AddGroupSeminorm.toFun src✝ (-r) = AddGroupSeminorm.toFun src✝ r) }
      (0 * y) =
    AddGroupSeminorm.toFun
        { toFun := src✝.toFun, map_zero' := (_ : AddGroupSeminorm.toFun src✝ 0 = 0),
          add_le' :=
            (_ :
              ∀ (r s : R),
                AddGroupSeminorm.toFun src✝ (r + s) ≤ AddGroupSeminorm.toFun src✝ r + AddGroupSeminorm.toFun src✝ s),
          neg' := (_ : ∀ (r : R), AddGroupSeminorm.toFun src✝ (-r) = AddGroupSeminorm.toFun src✝ r) }
        0 *
      AddGroupSeminorm.toFun
        { toFun := src✝.toFun, map_zero' := (_ : AddGroupSeminorm.toFun src✝ 0 = 0),
          add_le' :=
            (_ :
              ∀ (r s : R),
                AddGroupSeminorm.toFun src✝ (r + s) ≤ AddGroupSeminorm.toFun src✝ r + AddGroupSeminorm.toFun src✝ s),
          neg' := (_ : ∀ (r : R), AddGroupSeminorm.toFun src✝ (-r) = AddGroupSeminorm.toFun src✝ r) }
        y

Next tactic:
simp
/-- The trivial seminorm on a ring `R` is the `MulRingSeminorm` taking value `0` at `0` and `1` at
every other element. -/
instance : One (MulRingSeminorm R) :=
  ⟨{ (1 : AddGroupSeminorm R) with
      map_one' := if_neg one_ne_zero
      map_mul' := fun x y => by
        obtain rfl | hx := eq_or_ne x 0
        · simp
        

Proof state:
case inr
F : Type u_1
R : Type u_2
S : Type u_3
x✝ y✝ : R
r : ℝ
inst✝³ : NonAssocRing R
inst✝² : DecidableEq R
inst✝¹ : NoZeroDivisors R
inst✝ : Nontrivial R
src✝ : AddGroupSeminorm R := 1
x y : R
hx : x ≠ 0
⊢ AddGroupSeminorm.toFun
      { toFun := src✝.toFun, map_zero' := (_ : AddGroupSeminorm.toFun src✝ 0 = 0),
        add_le' :=
          (_ :
            ∀ (r s : R),
              AddGroupSeminorm.toFun src✝ (r + s) ≤ AddGroupSeminorm.toFun src✝ r + AddGroupSeminorm.toFun src✝ s),
        neg' := (_ : ∀ (r : R), AddGroupSeminorm.toFun src✝ (-r) = AddGroupSeminorm.toFun src✝ r) }
      (x * y) =
    AddGroupSeminorm.toFun
        { toFun := src✝.toFun, map_zero' := (_ : AddGroupSeminorm.toFun src✝ 0 = 0),
          add_le' :=
            (_ :
              ∀ (r s : R),
                AddGroupSeminorm.toFun src✝ (r + s) ≤ AddGroupSeminorm.toFun src✝ r + AddGroupSeminorm.toFun src✝ s),
          neg' := (_ : ∀ (r : R), AddGroupSeminorm.toFun src✝ (-r) = AddGroupSeminorm.toFun src✝ r) }
        x *
      AddGroupSeminorm.toFun
        { toFun := src✝.toFun, map_zero' := (_ : AddGroupSeminorm.toFun src✝ 0 = 0),
          add_le' :=
            (_ :
              ∀ (r s : R),
                AddGroupSeminorm.toFun src✝ (r + s) ≤ AddGroupSeminorm.toFun src✝ r + AddGroupSeminorm.toFun src✝ s),
          neg' := (_ : ∀ (r : R), AddGroupSeminorm.toFun src✝ (-r) = AddGroupSeminorm.toFun src✝ r) }
        y

Next tactic:
obtain rfl | hy := eq_or_ne y 0
/-- The trivial seminorm on a ring `R` is the `MulRingSeminorm` taking value `0` at `0` and `1` at
every other element. -/
instance : One (MulRingSeminorm R) :=
  ⟨{ (1 : AddGroupSeminorm R) with
      map_one' := if_neg one_ne_zero
      map_mul' := fun x y => by
        obtain rfl | hx := eq_or_ne x 0
        · simp
        obtain rfl | hy := eq_or_ne y 0
        · 

Proof state:
case inr.inl
F : Type u_1
R : Type u_2
S : Type u_3
x✝ y : R
r : ℝ
inst✝³ : NonAssocRing R
inst✝² : DecidableEq R
inst✝¹ : NoZeroDivisors R
inst✝ : Nontrivial R
src✝ : AddGroupSeminorm R := 1
x : R
hx : x ≠ 0
⊢ AddGroupSeminorm.toFun
      { toFun := src✝.toFun, map_zero' := (_ : AddGroupSeminorm.toFun src✝ 0 = 0),
        add_le' :=
          (_ :
            ∀ (r s : R),
              AddGroupSeminorm.toFun src✝ (r + s) ≤ AddGroupSeminorm.toFun src✝ r + AddGroupSeminorm.toFun src✝ s),
        neg' := (_ : ∀ (r : R), AddGroupSeminorm.toFun src✝ (-r) = AddGroupSeminorm.toFun src✝ r) }
      (x * 0) =
    AddGroupSeminorm.toFun
        { toFun := src✝.toFun, map_zero' := (_ : AddGroupSeminorm.toFun src✝ 0 = 0),
          add_le' :=
            (_ :
              ∀ (r s : R),
                AddGroupSeminorm.toFun src✝ (r + s) ≤ AddGroupSeminorm.toFun src✝ r + AddGroupSeminorm.toFun src✝ s),
          neg' := (_ : ∀ (r : R), AddGroupSeminorm.toFun src✝ (-r) = AddGroupSeminorm.toFun src✝ r) }
        x *
      AddGroupSeminorm.toFun
        { toFun := src✝.toFun, map_zero' := (_ : AddGroupSeminorm.toFun src✝ 0 = 0),
          add_le' :=
            (_ :
              ∀ (r s : R),
                AddGroupSeminorm.toFun src✝ (r + s) ≤ AddGroupSeminorm.toFun src✝ r + AddGroupSeminorm.toFun src✝ s),
          neg' := (_ : ∀ (r : R), AddGroupSeminorm.toFun src✝ (-r) = AddGroupSeminorm.toFun src✝ r) }
        0

Next tactic:
simp
/-- The trivial seminorm on a ring `R` is the `MulRingSeminorm` taking value `0` at `0` and `1` at
every other element. -/
instance : One (MulRingSeminorm R) :=
  ⟨{ (1 : AddGroupSeminorm R) with
      map_one' := if_neg one_ne_zero
      map_mul' := fun x y => by
        obtain rfl | hx := eq_or_ne x 0
        · simp
        obtain rfl | hy := eq_or_ne y 0
        · simp
        · 

Proof state:
case inr.inr
F : Type u_1
R : Type u_2
S : Type u_3
x✝ y✝ : R
r : ℝ
inst✝³ : NonAssocRing R
inst✝² : DecidableEq R
inst✝¹ : NoZeroDivisors R
inst✝ : Nontrivial R
src✝ : AddGroupSeminorm R := 1
x y : R
hx : x ≠ 0
hy : y ≠ 0
⊢ AddGroupSeminorm.toFun
      { toFun := src✝.toFun, map_zero' := (_ : AddGroupSeminorm.toFun src✝ 0 = 0),
        add_le' :=
          (_ :
            ∀ (r s : R),
              AddGroupSeminorm.toFun src✝ (r + s) ≤ AddGroupSeminorm.toFun src✝ r + AddGroupSeminorm.toFun src✝ s),
        neg' := (_ : ∀ (r : R), AddGroupSeminorm.toFun src✝ (-r) = AddGroupSeminorm.toFun src✝ r) }
      (x * y) =
    AddGroupSeminorm.toFun
        { toFun := src✝.toFun, map_zero' := (_ : AddGroupSeminorm.toFun src✝ 0 = 0),
          add_le' :=
            (_ :
              ∀ (r s : R),
                AddGroupSeminorm.toFun src✝ (r + s) ≤ AddGroupSeminorm.toFun src✝ r + AddGroupSeminorm.toFun src✝ s),
          neg' := (_ : ∀ (r : R), AddGroupSeminorm.toFun src✝ (-r) = AddGroupSeminorm.toFun src✝ r) }
        x *
      AddGroupSeminorm.toFun
        { toFun := src✝.toFun, map_zero' := (_ : AddGroupSeminorm.toFun src✝ 0 = 0),
          add_le' :=
            (_ :
              ∀ (r s : R),
                AddGroupSeminorm.toFun src✝ (r + s) ≤ AddGroupSeminorm.toFun src✝ r + AddGroupSeminorm.toFun src✝ s),
          neg' := (_ : ∀ (r : R), AddGroupSeminorm.toFun src✝ (-r) = AddGroupSeminorm.toFun src✝ r) }
        y

Next tactic:
simp [hx, hy]
instance mulRingNormClass : MulRingNormClass (MulRingNorm R) R ℝ where
  coe f := f.toFun
  coe_injective' f g h := by
    

Proof state:
F : Type u_1
R : Type u_2
S : Type u_3
x y : R
r : ℝ
inst✝ : NonAssocRing R
f g : MulRingNorm R
h : (fun f => f.toFun) f = (fun f => f.toFun) g
⊢ f = g

Next tactic:
cases f
instance mulRingNormClass : MulRingNormClass (MulRingNorm R) R ℝ where
  coe f := f.toFun
  coe_injective' f g h := by
    cases f
    

Proof state:
case mk
F : Type u_1
R : Type u_2
S : Type u_3
x y : R
r : ℝ
inst✝ : NonAssocRing R
g : MulRingNorm R
toMulRingSeminorm✝ : MulRingSeminorm R
eq_zero_of_map_eq_zero'✝ : ∀ (x : R), AddGroupSeminorm.toFun toMulRingSeminorm✝.toAddGroupSeminorm x = 0 → x = 0
h :
  (fun f => f.toFun) { toMulRingSeminorm := toMulRingSeminorm✝, eq_zero_of_map_eq_zero' := eq_zero_of_map_eq_zero'✝ } =
    (fun f => f.toFun) g
⊢ { toMulRingSeminorm := toMulRingSeminorm✝, eq_zero_of_map_eq_zero' := eq_zero_of_map_eq_zero'✝ } = g

Next tactic:
cases g
instance mulRingNormClass : MulRingNormClass (MulRingNorm R) R ℝ where
  coe f := f.toFun
  coe_injective' f g h := by
    cases f
    cases g
    

Proof state:
case mk.mk
F : Type u_1
R : Type u_2
S : Type u_3
x y : R
r : ℝ
inst✝ : NonAssocRing R
toMulRingSeminorm✝¹ : MulRingSeminorm R
eq_zero_of_map_eq_zero'✝¹ : ∀ (x : R), AddGroupSeminorm.toFun toMulRingSeminorm✝¹.toAddGroupSeminorm x = 0 → x = 0
toMulRingSeminorm✝ : MulRingSeminorm R
eq_zero_of_map_eq_zero'✝ : ∀ (x : R), AddGroupSeminorm.toFun toMulRingSeminorm✝.toAddGroupSeminorm x = 0 → x = 0
h :
  (fun f => f.toFun)
      { toMulRingSeminorm := toMulRingSeminorm✝¹, eq_zero_of_map_eq_zero' := eq_zero_of_map_eq_zero'✝¹ } =
    (fun f => f.toFun) { toMulRingSeminorm := toMulRingSeminorm✝, eq_zero_of_map_eq_zero' := eq_zero_of_map_eq_zero'✝ }
⊢ { toMulRingSeminorm := toMulRingSeminorm✝¹, eq_zero_of_map_eq_zero' := eq_zero_of_map_eq_zero'✝¹ } =
    { toMulRingSeminorm := toMulRingSeminorm✝, eq_zero_of_map_eq_zero' := eq_zero_of_map_eq_zero'✝ }

Next tactic:
congr
instance mulRingNormClass : MulRingNormClass (MulRingNorm R) R ℝ where
  coe f := f.toFun
  coe_injective' f g h := by
    cases f
    cases g
    congr
    

Proof state:
case mk.mk.e_toMulRingSeminorm
F : Type u_1
R : Type u_2
S : Type u_3
x y : R
r : ℝ
inst✝ : NonAssocRing R
toMulRingSeminorm✝¹ : MulRingSeminorm R
eq_zero_of_map_eq_zero'✝¹ : ∀ (x : R), AddGroupSeminorm.toFun toMulRingSeminorm✝¹.toAddGroupSeminorm x = 0 → x = 0
toMulRingSeminorm✝ : MulRingSeminorm R
eq_zero_of_map_eq_zero'✝ : ∀ (x : R), AddGroupSeminorm.toFun toMulRingSeminorm✝.toAddGroupSeminorm x = 0 → x = 0
h :
  (fun f => f.toFun)
      { toMulRingSeminorm := toMulRingSeminorm✝¹, eq_zero_of_map_eq_zero' := eq_zero_of_map_eq_zero'✝¹ } =
    (fun f => f.toFun) { toMulRingSeminorm := toMulRingSeminorm✝, eq_zero_of_map_eq_zero' := eq_zero_of_map_eq_zero'✝ }
⊢ toMulRingSeminorm✝¹ = toMulRingSeminorm✝

Next tactic:
ext x
instance mulRingNormClass : MulRingNormClass (MulRingNorm R) R ℝ where
  coe f := f.toFun
  coe_injective' f g h := by
    cases f
    cases g
    congr
    ext x
    

Proof state:
case mk.mk.e_toMulRingSeminorm.a
F : Type u_1
R : Type u_2
S : Type u_3
x✝ y : R
r : ℝ
inst✝ : NonAssocRing R
toMulRingSeminorm✝¹ : MulRingSeminorm R
eq_zero_of_map_eq_zero'✝¹ : ∀ (x : R), AddGroupSeminorm.toFun toMulRingSeminorm✝¹.toAddGroupSeminorm x = 0 → x = 0
toMulRingSeminorm✝ : MulRingSeminorm R
eq_zero_of_map_eq_zero'✝ : ∀ (x : R), AddGroupSeminorm.toFun toMulRingSeminorm✝.toAddGroupSeminorm x = 0 → x = 0
h :
  (fun f => f.toFun)
      { toMulRingSeminorm := toMulRingSeminorm✝¹, eq_zero_of_map_eq_zero' := eq_zero_of_map_eq_zero'✝¹ } =
    (fun f => f.toFun) { toMulRingSeminorm := toMulRingSeminorm✝, eq_zero_of_map_eq_zero' := eq_zero_of_map_eq_zero'✝ }
x : R
⊢ toMulRingSeminorm✝¹ x = toMulRingSeminorm✝ x

Next tactic:
exact congr_fun h x
/-- A nonzero ring seminorm on a field `K` is a ring norm. -/
def RingSeminorm.toRingNorm {K : Type*} [Field K] (f : RingSeminorm K) (hnt : f ≠ 0) :
    RingNorm K :=
  { f with
    eq_zero_of_map_eq_zero' := fun x hx => by
      

Proof state:
F : Type u_1
R : Type u_2
S : Type u_3
x✝ y : R
r : ℝ
K : Type u_4
inst✝ : Field K
f : RingSeminorm K
hnt : f ≠ 0
x : K
hx :
  AddGroupSeminorm.toFun
      { toAddGroupSeminorm := f.toAddGroupSeminorm,
          mul_le' :=
            (_ :
              ∀ (x y : K),
                AddGroupSeminorm.toFun f.toAddGroupSeminorm (x * y) ≤
                  AddGroupSeminorm.toFun f.toAddGroupSeminorm x *
                    AddGroupSeminorm.toFun f.toAddGroupSeminorm y) }.toAddGroupSeminorm
      x =
    0
⊢ x = 0

Next tactic:
obtain ⟨c, hc⟩ := RingSeminorm.ne_zero_iff.mp hnt
/-- A nonzero ring seminorm on a field `K` is a ring norm. -/
def RingSeminorm.toRingNorm {K : Type*} [Field K] (f : RingSeminorm K) (hnt : f ≠ 0) :
    RingNorm K :=
  { f with
    eq_zero_of_map_eq_zero' := fun x hx => by
      obtain ⟨c, hc⟩ := RingSeminorm.ne_zero_iff.mp hnt
      

Proof state:
case intro
F : Type u_1
R : Type u_2
S : Type u_3
x✝ y : R
r : ℝ
K : Type u_4
inst✝ : Field K
f : RingSeminorm K
hnt : f ≠ 0
x : K
hx :
  AddGroupSeminorm.toFun
      { toAddGroupSeminorm := f.toAddGroupSeminorm,
          mul_le' :=
            (_ :
              ∀ (x y : K),
                AddGroupSeminorm.toFun f.toAddGroupSeminorm (x * y) ≤
                  AddGroupSeminorm.toFun f.toAddGroupSeminorm x *
                    AddGroupSeminorm.toFun f.toAddGroupSeminorm y) }.toAddGroupSeminorm
      x =
    0
c : K
hc : f c ≠ 0
⊢ x = 0

Next tactic:
by_contra hn0
/-- A nonzero ring seminorm on a field `K` is a ring norm. -/
def RingSeminorm.toRingNorm {K : Type*} [Field K] (f : RingSeminorm K) (hnt : f ≠ 0) :
    RingNorm K :=
  { f with
    eq_zero_of_map_eq_zero' := fun x hx => by
      obtain ⟨c, hc⟩ := RingSeminorm.ne_zero_iff.mp hnt
      by_contra hn0
      

Proof state:
case intro
F : Type u_1
R : Type u_2
S : Type u_3
x✝ y : R
r : ℝ
K : Type u_4
inst✝ : Field K
f : RingSeminorm K
hnt : f ≠ 0
x : K
hx :
  AddGroupSeminorm.toFun
      { toAddGroupSeminorm := f.toAddGroupSeminorm,
          mul_le' :=
            (_ :
              ∀ (x y : K),
                AddGroupSeminorm.toFun f.toAddGroupSeminorm (x * y) ≤
                  AddGroupSeminorm.toFun f.toAddGroupSeminorm x *
                    AddGroupSeminorm.toFun f.toAddGroupSeminorm y) }.toAddGroupSeminorm
      x =
    0
c : K
hc : f c ≠ 0
hn0 : ¬x = 0
⊢ False

Next tactic:
have hc0 : f c = 0 := by
        rw [← mul_one c, ← mul_inv_cancel hn0, ← mul_assoc, mul_comm c, mul_assoc]
        exact
          le_antisymm
            (le_trans (map_mul_le_mul f _ _)
              (by rw [← RingSeminorm.toFun_eq_coe, ← AddGroupSeminorm.toFun_eq_coe, hx,
                zero_mul]))
            (map_nonneg f _)
/-- A nonzero ring seminorm on a field `K` is a ring norm. -/
def RingSeminorm.toRingNorm {K : Type*} [Field K] (f : RingSeminorm K) (hnt : f ≠ 0) :
    RingNorm K :=
  { f with
    eq_zero_of_map_eq_zero' := fun x hx => by
      obtain ⟨c, hc⟩ := RingSeminorm.ne_zero_iff.mp hnt
      by_contra hn0
      have hc0 : f c = 0 := by
        

Proof state:
F : Type u_1
R : Type u_2
S : Type u_3
x✝ y : R
r : ℝ
K : Type u_4
inst✝ : Field K
f : RingSeminorm K
hnt : f ≠ 0
x : K
hx :
  AddGroupSeminorm.toFun
      { toAddGroupSeminorm := f.toAddGroupSeminorm,
          mul_le' :=
            (_ :
              ∀ (x y : K),
                AddGroupSeminorm.toFun f.toAddGroupSeminorm (x * y) ≤
                  AddGroupSeminorm.toFun f.toAddGroupSeminorm x *
                    AddGroupSeminorm.toFun f.toAddGroupSeminorm y) }.toAddGroupSeminorm
      x =
    0
c : K
hc : f c ≠ 0
hn0 : ¬x = 0
⊢ f c = 0

Next tactic:
rw [← mul_one c, ← mul_inv_cancel hn0, ← mul_assoc, mul_comm c, mul_assoc]
/-- A nonzero ring seminorm on a field `K` is a ring norm. -/
def RingSeminorm.toRingNorm {K : Type*} [Field K] (f : RingSeminorm K) (hnt : f ≠ 0) :
    RingNorm K :=
  { f with
    eq_zero_of_map_eq_zero' := fun x hx => by
      obtain ⟨c, hc⟩ := RingSeminorm.ne_zero_iff.mp hnt
      by_contra hn0
      have hc0 : f c = 0 := by
        rw [← mul_one c, ← mul_inv_cancel hn0, ← mul_assoc, mul_comm c, mul_assoc]
        

Proof state:
F : Type u_1
R : Type u_2
S : Type u_3
x✝ y : R
r : ℝ
K : Type u_4
inst✝ : Field K
f : RingSeminorm K
hnt : f ≠ 0
x : K
hx :
  AddGroupSeminorm.toFun
      { toAddGroupSeminorm := f.toAddGroupSeminorm,
          mul_le' :=
            (_ :
              ∀ (x y : K),
                AddGroupSeminorm.toFun f.toAddGroupSeminorm (x * y) ≤
                  AddGroupSeminorm.toFun f.toAddGroupSeminorm x *
                    AddGroupSeminorm.toFun f.toAddGroupSeminorm y) }.toAddGroupSeminorm
      x =
    0
c : K
hc : f c ≠ 0
hn0 : ¬x = 0
⊢ f (x * (c * x⁻¹)) = 0

Next tactic:
exact
          le_antisymm
            (le_trans (map_mul_le_mul f _ _)
              (by rw [← RingSeminorm.toFun_eq_coe, ← AddGroupSeminorm.toFun_eq_coe, hx,
                zero_mul]))
            (map_nonneg f _)
/-- A nonzero ring seminorm on a field `K` is a ring norm. -/
def RingSeminorm.toRingNorm {K : Type*} [Field K] (f : RingSeminorm K) (hnt : f ≠ 0) :
    RingNorm K :=
  { f with
    eq_zero_of_map_eq_zero' := fun x hx => by
      obtain ⟨c, hc⟩ := RingSeminorm.ne_zero_iff.mp hnt
      by_contra hn0
      have hc0 : f c = 0 := by
        rw [← mul_one c, ← mul_inv_cancel hn0, ← mul_assoc, mul_comm c, mul_assoc]
        exact
          le_antisymm
            (le_trans (map_mul_le_mul f _ _)
              (by 

Proof state:
F : Type u_1
R : Type u_2
S : Type u_3
x✝ y : R
r : ℝ
K : Type u_4
inst✝ : Field K
f : RingSeminorm K
hnt : f ≠ 0
x : K
hx :
  AddGroupSeminorm.toFun
      { toAddGroupSeminorm := f.toAddGroupSeminorm,
          mul_le' :=
            (_ :
              ∀ (x y : K),
                AddGroupSeminorm.toFun f.toAddGroupSeminorm (x * y) ≤
                  AddGroupSeminorm.toFun f.toAddGroupSeminorm x *
                    AddGroupSeminorm.toFun f.toAddGroupSeminorm y) }.toAddGroupSeminorm
      x =
    0
c : K
hc : f c ≠ 0
hn0 : ¬x = 0
⊢ f x * f (c * x⁻¹) ≤ 0

Next tactic:
rw [← RingSeminorm.toFun_eq_coe, ← AddGroupSeminorm.toFun_eq_coe, hx,
                zero_mul]
/-- A nonzero ring seminorm on a field `K` is a ring norm. -/
def RingSeminorm.toRingNorm {K : Type*} [Field K] (f : RingSeminorm K) (hnt : f ≠ 0) :
    RingNorm K :=
  { f with
    eq_zero_of_map_eq_zero' := fun x hx => by
      obtain ⟨c, hc⟩ := RingSeminorm.ne_zero_iff.mp hnt
      by_contra hn0
      have hc0 : f c = 0 := by
        rw [← mul_one c, ← mul_inv_cancel hn0, ← mul_assoc, mul_comm c, mul_assoc]
        exact
          le_antisymm
            (le_trans (map_mul_le_mul f _ _)
              (by rw [← RingSeminorm.toFun_eq_coe, ← AddGroupSeminorm.toFun_eq_coe, hx,
                zero_mul]))
            (map_nonneg f _)
      

Proof state:
case intro
F : Type u_1
R : Type u_2
S : Type u_3
x✝ y : R
r : ℝ
K : Type u_4
inst✝ : Field K
f : RingSeminorm K
hnt : f ≠ 0
x : K
hx :
  AddGroupSeminorm.toFun
      { toAddGroupSeminorm := f.toAddGroupSeminorm,
          mul_le' :=
            (_ :
              ∀ (x y : K),
                AddGroupSeminorm.toFun f.toAddGroupSeminorm (x * y) ≤
                  AddGroupSeminorm.toFun f.toAddGroupSeminorm x *
                    AddGroupSeminorm.toFun f.toAddGroupSeminorm y) }.toAddGroupSeminorm
      x =
    0
c : K
hc : f c ≠ 0
hn0 : ¬x = 0
hc0 : f c = 0
⊢ False

Next tactic:
exact hc hc0
@[simp]
theorem cond_self.{u} {α : Type u} (b : Bool) (a : α) : cond b a a = a := by 

Proof state:
α : Type u
b : Bool
a : α
⊢ (bif b then a else a) = a

Next tactic:
cases b
@[simp]
theorem cond_self.{u} {α : Type u} (b : Bool) (a : α) : cond b a a = a := by cases b <;> 

Proof state:
case false
α : Type u
a : α
⊢ (bif false then a else a) = a

Next tactic:
rfl
@[simp]
theorem cond_self.{u} {α : Type u} (b : Bool) (a : α) : cond b a a = a := by cases b <;> 

Proof state:
case true
α : Type u
a : α
⊢ (bif true then a else a) = a

Next tactic:
rfl
theorem true_eq_false_eq_False : ¬true = false := by 

Proof state:
⊢ ¬true = false

Next tactic:
decide
theorem false_eq_true_eq_False : ¬false = true := by 

Proof state:
⊢ ¬false = true

Next tactic:
decide
theorem eq_false_eq_not_eq_true (b : Bool) : (¬b = true) = (b = false) := by 

Proof state:
b : Bool
⊢ (¬b = true) = (b = false)

Next tactic:
simp
theorem eq_true_eq_not_eq_false (b : Bool) : (¬b = false) = (b = true) := by 

Proof state:
b : Bool
⊢ (¬b = false) = (b = true)

Next tactic:
simp
theorem and_eq_true_eq_eq_true_and_eq_true (a b : Bool) :
    ((a && b) = true) = (a = true ∧ b = true) := by 

Proof state:
a b : Bool
⊢ ((a && b) = true) = (a = true ∧ b = true)

Next tactic:
simp
theorem or_eq_true_eq_eq_true_or_eq_true (a b : Bool) :
    ((a || b) = true) = (a = true ∨ b = true) := by 

Proof state:
a b : Bool
⊢ ((a || b) = true) = (a = true ∨ b = true)

Next tactic:
simp
theorem not_eq_true_eq_eq_false (a : Bool) : (not a = true) = (a = false) := by 

Proof state:
a : Bool
⊢ ((!a) = true) = (a = false)

Next tactic:
cases a
theorem not_eq_true_eq_eq_false (a : Bool) : (not a = true) = (a = false) := by cases a <;> 

Proof state:
case false
⊢ ((!false) = true) = (false = false)

Next tactic:
simp
theorem not_eq_true_eq_eq_false (a : Bool) : (not a = true) = (a = false) := by cases a <;> 

Proof state:
case true
⊢ ((!true) = true) = (true = false)

Next tactic:
simp
@[simp]
theorem and_eq_false_eq_eq_false_or_eq_false (a b : Bool) :
    ((a && b) = false) = (a = false ∨ b = false) := by
  

Proof state:
a b : Bool
⊢ ((a && b) = false) = (a = false ∨ b = false)

Next tactic:
cases a
@[simp]
theorem and_eq_false_eq_eq_false_or_eq_false (a b : Bool) :
    ((a && b) = false) = (a = false ∨ b = false) := by
  cases a <;> 

Proof state:
case false
b : Bool
⊢ ((false && b) = false) = (false = false ∨ b = false)

Next tactic:
cases b
@[simp]
theorem and_eq_false_eq_eq_false_or_eq_false (a b : Bool) :
    ((a && b) = false) = (a = false ∨ b = false) := by
  cases a <;> 

Proof state:
case true
b : Bool
⊢ ((true && b) = false) = (true = false ∨ b = false)

Next tactic:
cases b