l3lab/ntp-mathlib huggingface dataset:
instance : Algebra R (v.adicCompletionIntegers K) where
  smul r x :=
    ⟨r • (x : v.adicCompletion K), by
      have h :
        (algebraMap R (adicCompletion K v)) r = (algebraMap R K r : adicCompletion K v) := rfl
      rw [Algebra.smul_def]
      refine' ValuationSubring.mul_mem _ _ _ _ x.2
      --Porting note: added instance
      letI : Valued K ℤₘ₀ := adicValued v
      -- This used to be `rw`, but we need `erw` after leanprover/lean4#2644
      erw [mem_adicCompletionIntegers, h, Valued.valuedCompletion_apply]
      exact v.valuation_le_one _⟩
  toFun r :=
    ⟨(algebraMap R K r : adicCompletion K v), by
      -- Porting note: added instance
      letI : Valued K ℤₘ₀ := adicValued v
      --Porting note: rest of proof was `simpa only
      --   [mem_adicCompletionIntegers, Valued.valuedCompletion_apply] using
      --   v.valuation_le_one _
      -- This used to be `rw`, but we need `erw` after leanprover/lean4#2644
      erw [mem_adicCompletionIntegers, Valued.valuedCompletion_apply]
      exact v.valuation_le_one _⟩
  map_one' := by simp only [map_one]; rfl
  map_mul' x y := by
    ext
    --Porting note: added instance
    letI : Valued K ℤₘ₀ := adicValued v
    

Proof state:
case a
R : Type u_1
inst✝⁵ : CommRing R
inst✝⁴ : IsDomain R
inst✝³ : IsDedekindDomain R
K : Type u_2
inst✝² : Field K
inst✝¹ : Algebra R K
inst✝ : IsFractionRing R K
v : HeightOneSpectrum R
x y : R
this : Valued K ℤₘ₀ := adicValued v
⊢ ↑(OneHom.toFun
        {
          toFun := fun r =>
            { val := ↑K ((algebraMap R K) r), property := (_ : ↑K ((algebraMap R K) r) ∈ adicCompletionIntegers K v) },
          map_one' :=
            (_ :
              (fun r =>
                    { val := ↑K ((algebraMap R K) r),
                      property := (_ : ↑K ((algebraMap R K) r) ∈ adicCompletionIntegers K v) })
                  1 =
                1) }
        (x * y)) =
    ↑(OneHom.toFun
          {
            toFun := fun r =>
              { val := ↑K ((algebraMap R K) r),
                property := (_ : ↑K ((algebraMap R K) r) ∈ adicCompletionIntegers K v) },
            map_one' :=
              (_ :
                (fun r =>
                      { val := ↑K ((algebraMap R K) r),
                        property := (_ : ↑K ((algebraMap R K) r) ∈ adicCompletionIntegers K v) })
                    1 =
                  1) }
          x *
        OneHom.toFun
          {
            toFun := fun r =>
              { val := ↑K ((algebraMap R K) r),
                property := (_ : ↑K ((algebraMap R K) r) ∈ adicCompletionIntegers K v) },
            map_one' :=
              (_ :
                (fun r =>
                      { val := ↑K ((algebraMap R K) r),
                        property := (_ : ↑K ((algebraMap R K) r) ∈ adicCompletionIntegers K v) })
                    1 =
                  1) }
          y)

Next tactic:
simp_rw [RingHom.map_mul, Subring.coe_mul, UniformSpace.Completion.coe_mul]
instance : Algebra R (v.adicCompletionIntegers K) where
  smul r x :=
    ⟨r • (x : v.adicCompletion K), by
      have h :
        (algebraMap R (adicCompletion K v)) r = (algebraMap R K r : adicCompletion K v) := rfl
      rw [Algebra.smul_def]
      refine' ValuationSubring.mul_mem _ _ _ _ x.2
      --Porting note: added instance
      letI : Valued K ℤₘ₀ := adicValued v
      -- This used to be `rw`, but we need `erw` after leanprover/lean4#2644
      erw [mem_adicCompletionIntegers, h, Valued.valuedCompletion_apply]
      exact v.valuation_le_one _⟩
  toFun r :=
    ⟨(algebraMap R K r : adicCompletion K v), by
      -- Porting note: added instance
      letI : Valued K ℤₘ₀ := adicValued v
      --Porting note: rest of proof was `simpa only
      --   [mem_adicCompletionIntegers, Valued.valuedCompletion_apply] using
      --   v.valuation_le_one _
      -- This used to be `rw`, but we need `erw` after leanprover/lean4#2644
      erw [mem_adicCompletionIntegers, Valued.valuedCompletion_apply]
      exact v.valuation_le_one _⟩
  map_one' := by simp only [map_one]; rfl
  map_mul' x y := by
    ext
    --Porting note: added instance
    letI : Valued K ℤₘ₀ := adicValued v
    simp_rw [RingHom.map_mul, Subring.coe_mul, UniformSpace.Completion.coe_mul]
  map_zero' := by simp only [map_zero]; 

Proof state:
R : Type u_1
inst✝⁵ : CommRing R
inst✝⁴ : IsDomain R
inst✝³ : IsDedekindDomain R
K : Type u_2
inst✝² : Field K
inst✝¹ : Algebra R K
inst✝ : IsFractionRing R K
v : HeightOneSpectrum R
⊢ { val := ↑K 0, property := (_ : (fun x => x ∈ adicCompletionIntegers K v) (↑K 0)) } = 0

Next tactic:
rfl
instance : Algebra R (v.adicCompletionIntegers K) where
  smul r x :=
    ⟨r • (x : v.adicCompletion K), by
      have h :
        (algebraMap R (adicCompletion K v)) r = (algebraMap R K r : adicCompletion K v) := rfl
      rw [Algebra.smul_def]
      refine' ValuationSubring.mul_mem _ _ _ _ x.2
      --Porting note: added instance
      letI : Valued K ℤₘ₀ := adicValued v
      -- This used to be `rw`, but we need `erw` after leanprover/lean4#2644
      erw [mem_adicCompletionIntegers, h, Valued.valuedCompletion_apply]
      exact v.valuation_le_one _⟩
  toFun r :=
    ⟨(algebraMap R K r : adicCompletion K v), by
      -- Porting note: added instance
      letI : Valued K ℤₘ₀ := adicValued v
      --Porting note: rest of proof was `simpa only
      --   [mem_adicCompletionIntegers, Valued.valuedCompletion_apply] using
      --   v.valuation_le_one _
      -- This used to be `rw`, but we need `erw` after leanprover/lean4#2644
      erw [mem_adicCompletionIntegers, Valued.valuedCompletion_apply]
      exact v.valuation_le_one _⟩
  map_one' := by simp only [map_one]; rfl
  map_mul' x y := by
    ext
    --Porting note: added instance
    letI : Valued K ℤₘ₀ := adicValued v
    simp_rw [RingHom.map_mul, Subring.coe_mul, UniformSpace.Completion.coe_mul]
  map_zero' := by simp only [map_zero]; rfl
  map_add' x y := by
    ext
    --Porting note: added instance
    letI : Valued K ℤₘ₀ := adicValued v
    simp_rw [RingHom.map_add, Subring.coe_add, UniformSpace.Completion.coe_add]
  commutes' r x := by
    -- Porting note: added `dsimp` line
    dsimp
    

Proof state:
R : Type u_1
inst✝⁵ : CommRing R
inst✝⁴ : IsDomain R
inst✝³ : IsDedekindDomain R
K : Type u_2
inst✝² : Field K
inst✝¹ : Algebra R K
inst✝ : IsFractionRing R K
v : HeightOneSpectrum R
r : R
x : ↥(adicCompletionIntegers K v)
⊢ { val := ↑K ((algebraMap R K) r), property := (_ : Valued.v (↑K ((algebraMap R K) r)) ≤ 1) } * x =
    x * { val := ↑K ((algebraMap R K) r), property := (_ : Valued.v (↑K ((algebraMap R K) r)) ≤ 1) }

Next tactic:
rw [mul_comm]
instance : Algebra R (v.adicCompletionIntegers K) where
  smul r x :=
    ⟨r • (x : v.adicCompletion K), by
      have h :
        (algebraMap R (adicCompletion K v)) r = (algebraMap R K r : adicCompletion K v) := rfl
      rw [Algebra.smul_def]
      refine' ValuationSubring.mul_mem _ _ _ _ x.2
      --Porting note: added instance
      letI : Valued K ℤₘ₀ := adicValued v
      -- This used to be `rw`, but we need `erw` after leanprover/lean4#2644
      erw [mem_adicCompletionIntegers, h, Valued.valuedCompletion_apply]
      exact v.valuation_le_one _⟩
  toFun r :=
    ⟨(algebraMap R K r : adicCompletion K v), by
      -- Porting note: added instance
      letI : Valued K ℤₘ₀ := adicValued v
      --Porting note: rest of proof was `simpa only
      --   [mem_adicCompletionIntegers, Valued.valuedCompletion_apply] using
      --   v.valuation_le_one _
      -- This used to be `rw`, but we need `erw` after leanprover/lean4#2644
      erw [mem_adicCompletionIntegers, Valued.valuedCompletion_apply]
      exact v.valuation_le_one _⟩
  map_one' := by simp only [map_one]; rfl
  map_mul' x y := by
    ext
    --Porting note: added instance
    letI : Valued K ℤₘ₀ := adicValued v
    simp_rw [RingHom.map_mul, Subring.coe_mul, UniformSpace.Completion.coe_mul]
  map_zero' := by simp only [map_zero]; rfl
  map_add' x y := by
    ext
    --Porting note: added instance
    letI : Valued K ℤₘ₀ := adicValued v
    simp_rw [RingHom.map_add, Subring.coe_add, UniformSpace.Completion.coe_add]
  commutes' r x := by
    -- Porting note: added `dsimp` line
    dsimp
    rw [mul_comm]
  smul_def' r x := by
    ext
    --Porting note: added `dsimp`
    dsimp
    --Porting note: added instance
    

Proof state:
case a
R : Type u_1
inst✝⁵ : CommRing R
inst✝⁴ : IsDomain R
inst✝³ : IsDedekindDomain R
K : Type u_2
inst✝² : Field K
inst✝¹ : Algebra R K
inst✝ : IsFractionRing R K
v : HeightOneSpectrum R
r : R
x : ↥(adicCompletionIntegers K v)
⊢ ↑(r • x) = ↑K ((algebraMap R K) r) * ↑x

Next tactic:
letI : Valued K ℤₘ₀ := adicValued v
instance : Algebra R (v.adicCompletionIntegers K) where
  smul r x :=
    ⟨r • (x : v.adicCompletion K), by
      have h :
        (algebraMap R (adicCompletion K v)) r = (algebraMap R K r : adicCompletion K v) := rfl
      rw [Algebra.smul_def]
      refine' ValuationSubring.mul_mem _ _ _ _ x.2
      --Porting note: added instance
      letI : Valued K ℤₘ₀ := adicValued v
      -- This used to be `rw`, but we need `erw` after leanprover/lean4#2644
      erw [mem_adicCompletionIntegers, h, Valued.valuedCompletion_apply]
      exact v.valuation_le_one _⟩
  toFun r :=
    ⟨(algebraMap R K r : adicCompletion K v), by
      -- Porting note: added instance
      letI : Valued K ℤₘ₀ := adicValued v
      --Porting note: rest of proof was `simpa only
      --   [mem_adicCompletionIntegers, Valued.valuedCompletion_apply] using
      --   v.valuation_le_one _
      -- This used to be `rw`, but we need `erw` after leanprover/lean4#2644
      erw [mem_adicCompletionIntegers, Valued.valuedCompletion_apply]
      exact v.valuation_le_one _⟩
  map_one' := by simp only [map_one]; rfl
  map_mul' x y := by
    ext
    --Porting note: added instance
    letI : Valued K ℤₘ₀ := adicValued v
    simp_rw [RingHom.map_mul, Subring.coe_mul, UniformSpace.Completion.coe_mul]
  map_zero' := by simp only [map_zero]; rfl
  map_add' x y := by
    ext
    --Porting note: added instance
    letI : Valued K ℤₘ₀ := adicValued v
    simp_rw [RingHom.map_add, Subring.coe_add, UniformSpace.Completion.coe_add]
  commutes' r x := by
    -- Porting note: added `dsimp` line
    dsimp
    rw [mul_comm]
  smul_def' r x := by
    ext
    --Porting note: added `dsimp`
    dsimp
    --Porting note: added instance
    letI : Valued K ℤₘ₀ := adicValued v
    

Proof state:
case a
R : Type u_1
inst✝⁵ : CommRing R
inst✝⁴ : IsDomain R
inst✝³ : IsDedekindDomain R
K : Type u_2
inst✝² : Field K
inst✝¹ : Algebra R K
inst✝ : IsFractionRing R K
v : HeightOneSpectrum R
r : R
x : ↥(adicCompletionIntegers K v)
this : Valued K ℤₘ₀ := adicValued v
⊢ ↑(r • x) = ↑K ((algebraMap R K) r) * ↑x

Next tactic:
simp only [Subring.coe_mul, Algebra.smul_def]
instance : Algebra R (v.adicCompletionIntegers K) where
  smul r x :=
    ⟨r • (x : v.adicCompletion K), by
      have h :
        (algebraMap R (adicCompletion K v)) r = (algebraMap R K r : adicCompletion K v) := rfl
      rw [Algebra.smul_def]
      refine' ValuationSubring.mul_mem _ _ _ _ x.2
      --Porting note: added instance
      letI : Valued K ℤₘ₀ := adicValued v
      -- This used to be `rw`, but we need `erw` after leanprover/lean4#2644
      erw [mem_adicCompletionIntegers, h, Valued.valuedCompletion_apply]
      exact v.valuation_le_one _⟩
  toFun r :=
    ⟨(algebraMap R K r : adicCompletion K v), by
      -- Porting note: added instance
      letI : Valued K ℤₘ₀ := adicValued v
      --Porting note: rest of proof was `simpa only
      --   [mem_adicCompletionIntegers, Valued.valuedCompletion_apply] using
      --   v.valuation_le_one _
      -- This used to be `rw`, but we need `erw` after leanprover/lean4#2644
      erw [mem_adicCompletionIntegers, Valued.valuedCompletion_apply]
      exact v.valuation_le_one _⟩
  map_one' := by simp only [map_one]; rfl
  map_mul' x y := by
    ext
    --Porting note: added instance
    letI : Valued K ℤₘ₀ := adicValued v
    simp_rw [RingHom.map_mul, Subring.coe_mul, UniformSpace.Completion.coe_mul]
  map_zero' := by simp only [map_zero]; rfl
  map_add' x y := by
    ext
    --Porting note: added instance
    letI : Valued K ℤₘ₀ := adicValued v
    simp_rw [RingHom.map_add, Subring.coe_add, UniformSpace.Completion.coe_add]
  commutes' r x := by
    -- Porting note: added `dsimp` line
    dsimp
    rw [mul_comm]
  smul_def' r x := by
    ext
    --Porting note: added `dsimp`
    dsimp
    --Porting note: added instance
    letI : Valued K ℤₘ₀ := adicValued v
    simp only [Subring.coe_mul, Algebra.smul_def]
    

Proof state:
case a
R : Type u_1
inst✝⁵ : CommRing R
inst✝⁴ : IsDomain R
inst✝³ : IsDedekindDomain R
K : Type u_2
inst✝² : Field K
inst✝¹ : Algebra R K
inst✝ : IsFractionRing R K
v : HeightOneSpectrum R
r : R
x : ↥(adicCompletionIntegers K v)
this : Valued K ℤₘ₀ := adicValued v
⊢ ↑(r • x) = ↑K ((algebraMap R K) r) * ↑x

Next tactic:
rfl
instance : NoZeroSMulDivisors R (v.adicCompletionIntegers K) where
  eq_zero_or_eq_zero_of_smul_eq_zero {c x} hcx := by
    

Proof state:
R : Type u_1
inst✝⁵ : CommRing R
inst✝⁴ : IsDomain R
inst✝³ : IsDedekindDomain R
K : Type u_2
inst✝² : Field K
inst✝¹ : Algebra R K
inst✝ : IsFractionRing R K
v : HeightOneSpectrum R
c : R
x : ↥(adicCompletionIntegers K v)
hcx : c • x = 0
⊢ c = 0 ∨ x = 0

Next tactic:
rw [Algebra.smul_def, mul_eq_zero] at hcx
instance : NoZeroSMulDivisors R (v.adicCompletionIntegers K) where
  eq_zero_or_eq_zero_of_smul_eq_zero {c x} hcx := by
    rw [Algebra.smul_def, mul_eq_zero] at hcx
    

Proof state:
R : Type u_1
inst✝⁵ : CommRing R
inst✝⁴ : IsDomain R
inst✝³ : IsDedekindDomain R
K : Type u_2
inst✝² : Field K
inst✝¹ : Algebra R K
inst✝ : IsFractionRing R K
v : HeightOneSpectrum R
c : R
x : ↥(adicCompletionIntegers K v)
hcx : (algebraMap R ↥(adicCompletionIntegers K v)) c = 0 ∨ x = 0
⊢ c = 0 ∨ x = 0

Next tactic:
refine' hcx.imp_left fun hc => _
instance : NoZeroSMulDivisors R (v.adicCompletionIntegers K) where
  eq_zero_or_eq_zero_of_smul_eq_zero {c x} hcx := by
    rw [Algebra.smul_def, mul_eq_zero] at hcx
    refine' hcx.imp_left fun hc => _
    

Proof state:
R : Type u_1
inst✝⁵ : CommRing R
inst✝⁴ : IsDomain R
inst✝³ : IsDedekindDomain R
K : Type u_2
inst✝² : Field K
inst✝¹ : Algebra R K
inst✝ : IsFractionRing R K
v : HeightOneSpectrum R
c : R
x : ↥(adicCompletionIntegers K v)
hcx : (algebraMap R ↥(adicCompletionIntegers K v)) c = 0 ∨ x = 0
hc : (algebraMap R ↥(adicCompletionIntegers K v)) c = 0
⊢ c = 0

Next tactic:
letI : UniformSpace K := v.adicValued.toUniformSpace
instance : NoZeroSMulDivisors R (v.adicCompletionIntegers K) where
  eq_zero_or_eq_zero_of_smul_eq_zero {c x} hcx := by
    rw [Algebra.smul_def, mul_eq_zero] at hcx
    refine' hcx.imp_left fun hc => _
    letI : UniformSpace K := v.adicValued.toUniformSpace
    

Proof state:
R : Type u_1
inst✝⁵ : CommRing R
inst✝⁴ : IsDomain R
inst✝³ : IsDedekindDomain R
K : Type u_2
inst✝² : Field K
inst✝¹ : Algebra R K
inst✝ : IsFractionRing R K
v : HeightOneSpectrum R
c : R
x : ↥(adicCompletionIntegers K v)
hcx : (algebraMap R ↥(adicCompletionIntegers K v)) c = 0 ∨ x = 0
hc : (algebraMap R ↥(adicCompletionIntegers K v)) c = 0
this : UniformSpace K := Valued.toUniformSpace
⊢ c = 0

Next tactic:
rw [← map_zero (algebraMap R (v.adicCompletionIntegers K))] at hc
instance : NoZeroSMulDivisors R (v.adicCompletionIntegers K) where
  eq_zero_or_eq_zero_of_smul_eq_zero {c x} hcx := by
    rw [Algebra.smul_def, mul_eq_zero] at hcx
    refine' hcx.imp_left fun hc => _
    letI : UniformSpace K := v.adicValued.toUniformSpace
    rw [← map_zero (algebraMap R (v.adicCompletionIntegers K))] at hc
    

Proof state:
R : Type u_1
inst✝⁵ : CommRing R
inst✝⁴ : IsDomain R
inst✝³ : IsDedekindDomain R
K : Type u_2
inst✝² : Field K
inst✝¹ : Algebra R K
inst✝ : IsFractionRing R K
v : HeightOneSpectrum R
c : R
x : ↥(adicCompletionIntegers K v)
hcx : (algebraMap R ↥(adicCompletionIntegers K v)) c = 0 ∨ x = 0
hc : (algebraMap R ↥(adicCompletionIntegers K v)) c = (algebraMap R ↥(adicCompletionIntegers K v)) 0
this : UniformSpace K := Valued.toUniformSpace
⊢ c = 0

Next tactic:
exact
      IsFractionRing.injective R K (UniformSpace.Completion.coe_injective K (Subtype.ext_iff.mp hc))
instance AdicCompletion.instIsScalarTower' :
    IsScalarTower R (v.adicCompletionIntegers K) (v.adicCompletion K) where
  smul_assoc x y z := by 

Proof state:
R : Type u_1
inst✝⁵ : CommRing R
inst✝⁴ : IsDomain R
inst✝³ : IsDedekindDomain R
K : Type u_2
inst✝² : Field K
inst✝¹ : Algebra R K
inst✝ : IsFractionRing R K
v : HeightOneSpectrum R
x : R
y : ↥(adicCompletionIntegers K v)
z : adicCompletion K v
⊢ (x • y) • z = x • y • z

Next tactic:
simp only [Algebra.smul_def]
instance AdicCompletion.instIsScalarTower' :
    IsScalarTower R (v.adicCompletionIntegers K) (v.adicCompletion K) where
  smul_assoc x y z := by simp only [Algebra.smul_def]; 

Proof state:
R : Type u_1
inst✝⁵ : CommRing R
inst✝⁴ : IsDomain R
inst✝³ : IsDedekindDomain R
K : Type u_2
inst✝² : Field K
inst✝¹ : Algebra R K
inst✝ : IsFractionRing R K
v : HeightOneSpectrum R
x : R
y : ↥(adicCompletionIntegers K v)
z : adicCompletion K v
⊢ (algebraMap (↥(adicCompletionIntegers K v)) (adicCompletion K v))
        ((algebraMap R ↥(adicCompletionIntegers K v)) x * y) *
      z =
    (algebraMap R (adicCompletion K v)) x * ((algebraMap (↥(adicCompletionIntegers K v)) (adicCompletion K v)) y * z)

Next tactic:
apply mul_assoc
theorem of_iso (hY : IsZero Y) (e : X ≅ Y) : IsZero X := by
  

Proof state:
C : Type u
inst✝¹ : Category.{v, u} C
D : Type u'
inst✝ : Category.{v', u'} D
X Y : C
hY : IsZero Y
e : X ≅ Y
⊢ IsZero X

Next tactic:
refine' ⟨fun Z => ⟨⟨⟨e.hom ≫ hY.to_ Z⟩, fun f => _⟩⟩,
    fun Z => ⟨⟨⟨hY.from_ Z ≫ e.inv⟩, fun f => _⟩⟩⟩
theorem of_iso (hY : IsZero Y) (e : X ≅ Y) : IsZero X := by
  refine' ⟨fun Z => ⟨⟨⟨e.hom ≫ hY.to_ Z⟩, fun f => _⟩⟩,
    fun Z => ⟨⟨⟨hY.from_ Z ≫ e.inv⟩, fun f => _⟩⟩⟩
  · 

Proof state:
case refine'_1
C : Type u
inst✝¹ : Category.{v, u} C
D : Type u'
inst✝ : Category.{v', u'} D
X Y : C
hY : IsZero Y
e : X ≅ Y
Z : C
f : X ⟶ Z
⊢ f = default

Next tactic:
rw [← cancel_epi e.inv]
theorem of_iso (hY : IsZero Y) (e : X ≅ Y) : IsZero X := by
  refine' ⟨fun Z => ⟨⟨⟨e.hom ≫ hY.to_ Z⟩, fun f => _⟩⟩,
    fun Z => ⟨⟨⟨hY.from_ Z ≫ e.inv⟩, fun f => _⟩⟩⟩
  · rw [← cancel_epi e.inv]
    

Proof state:
case refine'_1
C : Type u
inst✝¹ : Category.{v, u} C
D : Type u'
inst✝ : Category.{v', u'} D
X Y : C
hY : IsZero Y
e : X ≅ Y
Z : C
f : X ⟶ Z
⊢ e.inv ≫ f = e.inv ≫ default

Next tactic:
apply hY.eq_of_src
theorem of_iso (hY : IsZero Y) (e : X ≅ Y) : IsZero X := by
  refine' ⟨fun Z => ⟨⟨⟨e.hom ≫ hY.to_ Z⟩, fun f => _⟩⟩,
    fun Z => ⟨⟨⟨hY.from_ Z ≫ e.inv⟩, fun f => _⟩⟩⟩
  · rw [← cancel_epi e.inv]
    apply hY.eq_of_src
  · 

Proof state:
case refine'_2
C : Type u
inst✝¹ : Category.{v, u} C
D : Type u'
inst✝ : Category.{v', u'} D
X Y : C
hY : IsZero Y
e : X ≅ Y
Z : C
f : Z ⟶ X
⊢ f = default

Next tactic:
rw [← cancel_mono e.hom]
theorem of_iso (hY : IsZero Y) (e : X ≅ Y) : IsZero X := by
  refine' ⟨fun Z => ⟨⟨⟨e.hom ≫ hY.to_ Z⟩, fun f => _⟩⟩,
    fun Z => ⟨⟨⟨hY.from_ Z ≫ e.inv⟩, fun f => _⟩⟩⟩
  · rw [← cancel_epi e.inv]
    apply hY.eq_of_src
  · rw [← cancel_mono e.hom]
    

Proof state:
case refine'_2
C : Type u
inst✝¹ : Category.{v, u} C
D : Type u'
inst✝ : Category.{v', u'} D
X Y : C
hY : IsZero Y
e : X ≅ Y
Z : C
f : Z ⟶ X
⊢ f ≫ e.hom = default ≫ e.hom

Next tactic:
apply hY.eq_of_tgt
theorem Functor.isZero (F : C ⥤ D) (hF : ∀ X, IsZero (F.obj X)) : IsZero F := by
  

Proof state:
C : Type u
inst✝¹ : Category.{v, u} C
D : Type u'
inst✝ : Category.{v', u'} D
F : C ⥤ D
hF : ∀ (X : C), IsZero (F.obj X)
⊢ IsZero F

Next tactic:
constructor
theorem Functor.isZero (F : C ⥤ D) (hF : ∀ X, IsZero (F.obj X)) : IsZero F := by
  constructor <;> 

Proof state:
case unique_to
C : Type u
inst✝¹ : Category.{v, u} C
D : Type u'
inst✝ : Category.{v', u'} D
F : C ⥤ D
hF : ∀ (X : C), IsZero (F.obj X)
⊢ ∀ (Y : C ⥤ D), Nonempty (Unique (F ⟶ Y))

Next tactic:
intro G
theorem Functor.isZero (F : C ⥤ D) (hF : ∀ X, IsZero (F.obj X)) : IsZero F := by
  constructor <;> 

Proof state:
case unique_from
C : Type u
inst✝¹ : Category.{v, u} C
D : Type u'
inst✝ : Category.{v', u'} D
F : C ⥤ D
hF : ∀ (X : C), IsZero (F.obj X)
⊢ ∀ (Y : C ⥤ D), Nonempty (Unique (Y ⟶ F))

Next tactic:
intro G
theorem Functor.isZero (F : C ⥤ D) (hF : ∀ X, IsZero (F.obj X)) : IsZero F := by
  constructor <;> intro G <;> 

Proof state:
case unique_to
C : Type u
inst✝¹ : Category.{v, u} C
D : Type u'
inst✝ : Category.{v', u'} D
F : C ⥤ D
hF : ∀ (X : C), IsZero (F.obj X)
G : C ⥤ D
⊢ Nonempty (Unique (F ⟶ G))

Next tactic:
refine' ⟨⟨⟨_⟩, _⟩⟩
theorem Functor.isZero (F : C ⥤ D) (hF : ∀ X, IsZero (F.obj X)) : IsZero F := by
  constructor <;> intro G <;> 

Proof state:
case unique_from
C : Type u
inst✝¹ : Category.{v, u} C
D : Type u'
inst✝ : Category.{v', u'} D
F : C ⥤ D
hF : ∀ (X : C), IsZero (F.obj X)
G : C ⥤ D
⊢ Nonempty (Unique (G ⟶ F))

Next tactic:
refine' ⟨⟨⟨_⟩, _⟩⟩
theorem Functor.isZero (F : C ⥤ D) (hF : ∀ X, IsZero (F.obj X)) : IsZero F := by
  constructor <;> intro G <;> refine' ⟨⟨⟨_⟩, _⟩⟩
  · 

Proof state:
case unique_to.refine'_1
C : Type u
inst✝¹ : Category.{v, u} C
D : Type u'
inst✝ : Category.{v', u'} D
F : C ⥤ D
hF : ∀ (X : C), IsZero (F.obj X)
G : C ⥤ D
⊢ F ⟶ G

Next tactic:
refine'
      { app := fun X => (hF _).to_ _
        naturality := _ }
theorem Functor.isZero (F : C ⥤ D) (hF : ∀ X, IsZero (F.obj X)) : IsZero F := by
  constructor <;> intro G <;> refine' ⟨⟨⟨_⟩, _⟩⟩
  · refine'
      { app := fun X => (hF _).to_ _
        naturality := _ }
    

Proof state:
case unique_to.refine'_1
C : Type u
inst✝¹ : Category.{v, u} C
D : Type u'
inst✝ : Category.{v', u'} D
F : C ⥤ D
hF : ∀ (X : C), IsZero (F.obj X)
G : C ⥤ D
⊢ ∀ ⦃X Y : C⦄ (f : X ⟶ Y),
    F.map f ≫ (fun X => IsZero.to_ (_ : IsZero (F.obj X)) (G.obj X)) Y =
      (fun X => IsZero.to_ (_ : IsZero (F.obj X)) (G.obj X)) X ≫ G.map f

Next tactic:
intros
theorem Functor.isZero (F : C ⥤ D) (hF : ∀ X, IsZero (F.obj X)) : IsZero F := by
  constructor <;> intro G <;> refine' ⟨⟨⟨_⟩, _⟩⟩
  · refine'
      { app := fun X => (hF _).to_ _
        naturality := _ }
    intros
    

Proof state:
case unique_to.refine'_1
C : Type u
inst✝¹ : Category.{v, u} C
D : Type u'
inst✝ : Category.{v', u'} D
F : C ⥤ D
hF : ∀ (X : C), IsZero (F.obj X)
G : C ⥤ D
X✝ Y✝ : C
f✝ : X✝ ⟶ Y✝
⊢ F.map f✝ ≫ (fun X => IsZero.to_ (_ : IsZero (F.obj X)) (G.obj X)) Y✝ =
    (fun X => IsZero.to_ (_ : IsZero (F.obj X)) (G.obj X)) X✝ ≫ G.map f✝

Next tactic:
exact (hF _).eq_of_src _ _
theorem Functor.isZero (F : C ⥤ D) (hF : ∀ X, IsZero (F.obj X)) : IsZero F := by
  constructor <;> intro G <;> refine' ⟨⟨⟨_⟩, _⟩⟩
  · refine'
      { app := fun X => (hF _).to_ _
        naturality := _ }
    intros
    exact (hF _).eq_of_src _ _
  · 

Proof state:
case unique_to.refine'_2
C : Type u
inst✝¹ : Category.{v, u} C
D : Type u'
inst✝ : Category.{v', u'} D
F : C ⥤ D
hF : ∀ (X : C), IsZero (F.obj X)
G : C ⥤ D
⊢ ∀ (a : F ⟶ G), a = default

Next tactic:
intro f
theorem Functor.isZero (F : C ⥤ D) (hF : ∀ X, IsZero (F.obj X)) : IsZero F := by
  constructor <;> intro G <;> refine' ⟨⟨⟨_⟩, _⟩⟩
  · refine'
      { app := fun X => (hF _).to_ _
        naturality := _ }
    intros
    exact (hF _).eq_of_src _ _
  · intro f
    

Proof state:
case unique_to.refine'_2
C : Type u
inst✝¹ : Category.{v, u} C
D : Type u'
inst✝ : Category.{v', u'} D
F : C ⥤ D
hF : ∀ (X : C), IsZero (F.obj X)
G : C ⥤ D
f : F ⟶ G
⊢ f = default

Next tactic:
ext
theorem Functor.isZero (F : C ⥤ D) (hF : ∀ X, IsZero (F.obj X)) : IsZero F := by
  constructor <;> intro G <;> refine' ⟨⟨⟨_⟩, _⟩⟩
  · refine'
      { app := fun X => (hF _).to_ _
        naturality := _ }
    intros
    exact (hF _).eq_of_src _ _
  · intro f
    ext
    

Proof state:
case unique_to.refine'_2.w.h
C : Type u
inst✝¹ : Category.{v, u} C
D : Type u'
inst✝ : Category.{v', u'} D
F : C ⥤ D
hF : ∀ (X : C), IsZero (F.obj X)
G : C ⥤ D
f : F ⟶ G
x✝ : C
⊢ f.app x✝ = default.app x✝

Next tactic:
apply (hF _).eq_of_src _ _