[GOAL]
x : { x // x ∈ 𝓞 ℚ }
⊢ IsUnit x ↔ ↑x = 1 ∨ ↑x = -1
[PROOFSTEP]
simp_rw [(isUnit_map_iff (Rat.ringOfIntegersEquiv : 𝓞 ℚ →+* ℤ) x).symm, Int.isUnit_iff, RingEquiv.coe_toRingHom,
  RingEquiv.map_eq_one_iff, RingEquiv.map_eq_neg_one_iff, ← Subtype.coe_injective.eq_iff]
[GOAL]
x : { x // x ∈ 𝓞 ℚ }
⊢ ↑x = ↑1 ∨ ↑x = ↑(-1) ↔ ↑x = 1 ∨ ↑x = -1
[PROOFSTEP]
rfl
[GOAL]
K : Type u_1
inst✝¹ : Field K
inst✝ : NumberField K
x : { x // x ∈ 𝓞 K }
⊢ IsUnit x ↔ |↑(↑(RingOfIntegers.norm ℚ) x)| = 1
[PROOFSTEP]
convert (RingOfIntegers.isUnit_norm ℚ (F := K)).symm
[GOAL]
case h.e'_2.a
K : Type u_1
inst✝¹ : Field K
inst✝ : NumberField K
x : { x // x ∈ 𝓞 K }
⊢ |↑(↑(RingOfIntegers.norm ℚ) x)| = 1 ↔ IsUnit (↑(RingOfIntegers.norm ℚ) x)
[PROOFSTEP]
rw [← abs_one, abs_eq_abs, ← Rat.RingOfIntegers.isUnit_iff]
[GOAL]
K : Type u_1
inst✝ : Field K
x✝¹ x✝ : { x // x ∈ 𝓞 K }ˣ
h : (fun x => ↑↑x) x✝¹ = (fun x => ↑↑x) x✝
⊢ x✝¹ = x✝
[PROOFSTEP]
rwa [SetLike.coe_eq_coe, Units.eq_iff] at h
[GOAL]
K : Type u_1
inst✝ : Field K
x : { x // x ∈ 𝓞 K }ˣ
n : ℕ
⊢ ↑↑(x ^ n) = ↑↑x ^ n
[PROOFSTEP]
rw [← SubmonoidClass.coe_pow, ← val_pow_eq_pow_val]
[GOAL]
K : Type u_1
inst✝ : Field K
x : { x // x ∈ 𝓞 K }ˣ
n : ℤ
⊢ ↑↑(x ^ n) = ↑↑x ^ n
[PROOFSTEP]
change ((Units.coeHom K).comp (map (algebraMap (𝓞 K) K))) (x ^ n) = _
[GOAL]
K : Type u_1
inst✝ : Field K
x : { x // x ∈ 𝓞 K }ˣ
n : ℤ
⊢ ↑(MonoidHom.comp (coeHom K) (map ↑(algebraMap { x // x ∈ 𝓞 K } K))) (x ^ n) = ↑↑x ^ n
[PROOFSTEP]
exact map_zpow _ x n
[GOAL]
K : Type u_1
inst✝¹ : Field K
x : { x // x ∈ 𝓞 K }ˣ
inst✝ : NumberField K
⊢ x ∈ torsion K ↔ ∀ (w : InfinitePlace K), ↑w ↑↑x = 1
[PROOFSTEP]
rw [eq_iff_eq (x : K) 1, torsion, CommGroup.mem_torsion, isOfFinOrder_iff_pow_eq_one]
[GOAL]
K : Type u_1
inst✝¹ : Field K
x : { x // x ∈ 𝓞 K }ˣ
inst✝ : NumberField K
⊢ (∃ n, 0 < n ∧ x ^ n = 1) ↔ ∀ (φ : K →+* ℂ), ‖↑φ ↑↑x‖ = 1
[PROOFSTEP]
refine ⟨fun ⟨n, h_pos, h_eq⟩ φ => ?_, fun h => ?_⟩
[GOAL]
case refine_1
K : Type u_1
inst✝¹ : Field K
x : { x // x ∈ 𝓞 K }ˣ
inst✝ : NumberField K
x✝ : ∃ n, 0 < n ∧ x ^ n = 1
φ : K →+* ℂ
n : ℕ
h_pos : 0 < n
h_eq : x ^ n = 1
⊢ ‖↑φ ↑↑x‖ = 1
[PROOFSTEP]
refine norm_map_one_of_pow_eq_one φ.toMonoidHom (k := ⟨n, h_pos⟩) ?_
[GOAL]
case refine_1
K : Type u_1
inst✝¹ : Field K
x : { x // x ∈ 𝓞 K }ˣ
inst✝ : NumberField K
x✝ : ∃ n, 0 < n ∧ x ^ n = 1
φ : K →+* ℂ
n : ℕ
h_pos : 0 < n
h_eq : x ^ n = 1
⊢ ↑↑x ^ ↑{ val := n, property := h_pos } = 1
[PROOFSTEP]
rw [PNat.mk_coe, ← coe_pow, h_eq, coe_one]
[GOAL]
case refine_2
K : Type u_1
inst✝¹ : Field K
x : { x // x ∈ 𝓞 K }ˣ
inst✝ : NumberField K
h : ∀ (φ : K →+* ℂ), ‖↑φ ↑↑x‖ = 1
⊢ ∃ n, 0 < n ∧ x ^ n = 1
[PROOFSTEP]
obtain ⟨n, hn, hx⟩ := Embeddings.pow_eq_one_of_norm_eq_one K ℂ x.val.prop h
[GOAL]
case refine_2.intro.intro
K : Type u_1
inst✝¹ : Field K
x : { x // x ∈ 𝓞 K }ˣ
inst✝ : NumberField K
h : ∀ (φ : K →+* ℂ), ‖↑φ ↑↑x‖ = 1
n : ℕ
hn : 0 < n
hx : ↑↑x ^ n = 1
⊢ ∃ n, 0 < n ∧ x ^ n = 1
[PROOFSTEP]
exact ⟨n, hn, by ext; rw [coe_pow, hx, coe_one]⟩
[GOAL]
K : Type u_1
inst✝¹ : Field K
x : { x // x ∈ 𝓞 K }ˣ
inst✝ : NumberField K
h : ∀ (φ : K →+* ℂ), ‖↑φ ↑↑x‖ = 1
n : ℕ
hn : 0 < n
hx : ↑↑x ^ n = 1
⊢ x ^ n = 1
[PROOFSTEP]
ext
[GOAL]
case a.a
K : Type u_1
inst✝¹ : Field K
x : { x // x ∈ 𝓞 K }ˣ
inst✝ : NumberField K
h : ∀ (φ : K →+* ℂ), ‖↑φ ↑↑x‖ = 1
n : ℕ
hn : 0 < n
hx : ↑↑x ^ n = 1
⊢ ↑↑(x ^ n) = ↑↑1
[PROOFSTEP]
rw [coe_pow, hx, coe_one]
[GOAL]
K : Type u_1
inst✝¹ : Field K
inst✝ : NumberField K
⊢ Fintype { x // x ∈ torsion K }
[PROOFSTEP]
refine @Fintype.ofFinite _ (Set.finite_coe_iff.mpr ?_)
[GOAL]
K : Type u_1
inst✝¹ : Field K
inst✝ : NumberField K
⊢ Set.Finite ↑(torsion K)
[PROOFSTEP]
refine Set.Finite.of_finite_image ?_ ((coe_injective K).injOn _)
[GOAL]
K : Type u_1
inst✝¹ : Field K
inst✝ : NumberField K
⊢ Set.Finite ((fun x => ↑↑x) '' ↑(torsion K))
[PROOFSTEP]
refine (Embeddings.finite_of_norm_le K ℂ 1).subset (fun a ⟨u, ⟨h_tors, h_ua⟩⟩ => ⟨?_, fun φ => ?_⟩)
[GOAL]
case refine_1
K : Type u_1
inst✝¹ : Field K
inst✝ : NumberField K
a : K
x✝ : a ∈ (fun x => ↑↑x) '' ↑(torsion K)
u : { x // x ∈ 𝓞 K }ˣ
h_tors : u ∈ ↑(torsion K)
h_ua : (fun x => ↑↑x) u = a
⊢ IsIntegral ℤ a
[PROOFSTEP]
rw [← h_ua]
[GOAL]
case refine_1
K : Type u_1
inst✝¹ : Field K
inst✝ : NumberField K
a : K
x✝ : a ∈ (fun x => ↑↑x) '' ↑(torsion K)
u : { x // x ∈ 𝓞 K }ˣ
h_tors : u ∈ ↑(torsion K)
h_ua : (fun x => ↑↑x) u = a
⊢ IsIntegral ℤ ((fun x => ↑↑x) u)
[PROOFSTEP]
exact u.val.prop
[GOAL]
case refine_2
K : Type u_1
inst✝¹ : Field K
inst✝ : NumberField K
a : K
x✝ : a ∈ (fun x => ↑↑x) '' ↑(torsion K)
u : { x // x ∈ 𝓞 K }ˣ
h_tors : u ∈ ↑(torsion K)
h_ua : (fun x => ↑↑x) u = a
φ : K →+* ℂ
⊢ ‖↑φ a‖ ≤ 1
[PROOFSTEP]
rw [← h_ua]
[GOAL]
case refine_2
K : Type u_1
inst✝¹ : Field K
inst✝ : NumberField K
a : K
x✝ : a ∈ (fun x => ↑↑x) '' ↑(torsion K)
u : { x // x ∈ 𝓞 K }ˣ
h_tors : u ∈ ↑(torsion K)
h_ua : (fun x => ↑↑x) u = a
φ : K →+* ℂ
⊢ ‖↑φ ((fun x => ↑↑x) u)‖ ≤ 1
[PROOFSTEP]
exact
  le_of_eq
    ((eq_iff_eq _ 1).mp ((mem_torsion K).mp h_tors) φ)
      -- a shortcut instance to stop the next instance from timing out
[GOAL]
K : Type u_1
inst✝¹ : Field K
ζ : { x // x ∈ 𝓞 K }ˣ
inst✝ : NumberField K
k : ℕ+
hc : Nat.coprime ↑k ↑(torsion_order K)
⊢ ζ ∈ rootsOfUnity k { x // x ∈ 𝓞 K } ↔ ζ = 1
[PROOFSTEP]
rw [mem_rootsOfUnity]
[GOAL]
K : Type u_1
inst✝¹ : Field K
ζ : { x // x ∈ 𝓞 K }ˣ
inst✝ : NumberField K
k : ℕ+
hc : Nat.coprime ↑k ↑(torsion_order K)
⊢ ζ ^ ↑k = 1 ↔ ζ = 1
[PROOFSTEP]
refine ⟨fun h => ?_, fun h => by rw [h, one_pow]⟩
[GOAL]
K : Type u_1
inst✝¹ : Field K
ζ : { x // x ∈ 𝓞 K }ˣ
inst✝ : NumberField K
k : ℕ+
hc : Nat.coprime ↑k ↑(torsion_order K)
h : ζ = 1
⊢ ζ ^ ↑k = 1
[PROOFSTEP]
rw [h, one_pow]
[GOAL]
K : Type u_1
inst✝¹ : Field K
ζ : { x // x ∈ 𝓞 K }ˣ
inst✝ : NumberField K
k : ℕ+
hc : Nat.coprime ↑k ↑(torsion_order K)
h : ζ ^ ↑k = 1
⊢ ζ = 1
[PROOFSTEP]
refine orderOf_eq_one_iff.mp (Nat.eq_one_of_dvd_coprimes hc ?_ ?_)
[GOAL]
case refine_1
K : Type u_1
inst✝¹ : Field K
ζ : { x // x ∈ 𝓞 K }ˣ
inst✝ : NumberField K
k : ℕ+
hc : Nat.coprime ↑k ↑(torsion_order K)
h : ζ ^ ↑k = 1
⊢ orderOf ζ ∣ ↑k
[PROOFSTEP]
exact orderOf_dvd_of_pow_eq_one h
[GOAL]
case refine_2
K : Type u_1
inst✝¹ : Field K
ζ : { x // x ∈ 𝓞 K }ˣ
inst✝ : NumberField K
k : ℕ+
hc : Nat.coprime ↑k ↑(torsion_order K)
h : ζ ^ ↑k = 1
⊢ orderOf ζ ∣ ↑(torsion_order K)
[PROOFSTEP]
have hζ : ζ ∈ torsion K := by
  rw [torsion, CommGroup.mem_torsion, isOfFinOrder_iff_pow_eq_one]
  exact ⟨k, k.prop, h⟩
[GOAL]
K : Type u_1
inst✝¹ : Field K
ζ : { x // x ∈ 𝓞 K }ˣ
inst✝ : NumberField K
k : ℕ+
hc : Nat.coprime ↑k ↑(torsion_order K)
h : ζ ^ ↑k = 1
⊢ ζ ∈ torsion K
[PROOFSTEP]
rw [torsion, CommGroup.mem_torsion, isOfFinOrder_iff_pow_eq_one]
[GOAL]
K : Type u_1
inst✝¹ : Field K
ζ : { x // x ∈ 𝓞 K }ˣ
inst✝ : NumberField K
k : ℕ+
hc : Nat.coprime ↑k ↑(torsion_order K)
h : ζ ^ ↑k = 1
⊢ ∃ n, 0 < n ∧ ζ ^ n = 1
[PROOFSTEP]
exact ⟨k, k.prop, h⟩
[GOAL]
case refine_2
K : Type u_1
inst✝¹ : Field K
ζ : { x // x ∈ 𝓞 K }ˣ
inst✝ : NumberField K
k : ℕ+
hc : Nat.coprime ↑k ↑(torsion_order K)
h : ζ ^ ↑k = 1
hζ : ζ ∈ torsion K
⊢ orderOf ζ ∣ ↑(torsion_order K)
[PROOFSTEP]
rw [orderOf_submonoid (⟨ζ, hζ⟩ : torsion K)]
[GOAL]
case refine_2
K : Type u_1
inst✝¹ : Field K
ζ : { x // x ∈ 𝓞 K }ˣ
inst✝ : NumberField K
k : ℕ+
hc : Nat.coprime ↑k ↑(torsion_order K)
h : ζ ^ ↑k = 1
hζ : ζ ∈ torsion K
⊢ orderOf { val := ζ, property := hζ } ∣ ↑(torsion_order K)
[PROOFSTEP]
exact orderOf_dvd_card_univ
[GOAL]
K : Type u_1
inst✝¹ : Field K
inst✝ : NumberField K
⊢ rootsOfUnity (torsion_order K) { x // x ∈ 𝓞 K } = torsion K
[PROOFSTEP]
ext ζ
[GOAL]
case h
K : Type u_1
inst✝¹ : Field K
inst✝ : NumberField K
ζ : { x // x ∈ 𝓞 K }ˣ
⊢ ζ ∈ rootsOfUnity (torsion_order K) { x // x ∈ 𝓞 K } ↔ ζ ∈ torsion K
[PROOFSTEP]
rw [torsion, mem_rootsOfUnity]
[GOAL]
case h
K : Type u_1
inst✝¹ : Field K
inst✝ : NumberField K
ζ : { x // x ∈ 𝓞 K }ˣ
⊢ ζ ^ ↑(torsion_order K) = 1 ↔ ζ ∈ CommGroup.torsion { x // x ∈ 𝓞 K }ˣ
[PROOFSTEP]
refine ⟨fun h => ?_, fun h => ?_⟩
[GOAL]
case h.refine_1
K : Type u_1
inst✝¹ : Field K
inst✝ : NumberField K
ζ : { x // x ∈ 𝓞 K }ˣ
h : ζ ^ ↑(torsion_order K) = 1
⊢ ζ ∈ CommGroup.torsion { x // x ∈ 𝓞 K }ˣ
[PROOFSTEP]
rw [CommGroup.mem_torsion, isOfFinOrder_iff_pow_eq_one]
[GOAL]
case h.refine_1
K : Type u_1
inst✝¹ : Field K
inst✝ : NumberField K
ζ : { x // x ∈ 𝓞 K }ˣ
h : ζ ^ ↑(torsion_order K) = 1
⊢ ∃ n, 0 < n ∧ ζ ^ n = 1
[PROOFSTEP]
exact ⟨↑(torsion_order K), (torsion_order K).prop, h⟩
[GOAL]
case h.refine_2
K : Type u_1
inst✝¹ : Field K
inst✝ : NumberField K
ζ : { x // x ∈ 𝓞 K }ˣ
h : ζ ∈ CommGroup.torsion { x // x ∈ 𝓞 K }ˣ
⊢ ζ ^ ↑(torsion_order K) = 1
[PROOFSTEP]
exact Subtype.ext_iff.mp (@pow_card_eq_one (torsion K) _ ⟨ζ, h⟩ _)


[GOAL]
C : Type u
inst✝ : Category.{v, u} C
F : C ⥤ C
A A₀ A₁ A₂ : Algebra F
f : A₀ ⟶ A₁
g : A₁ ⟶ A₂
h : A₀.a ≅ A₁.a
w : autoParam (F.map h.hom ≫ A₁.str = A₀.str ≫ h.hom) _auto✝
⊢ F.map h.inv ≫ A₀.str = A₁.str ≫ h.inv
[PROOFSTEP]
rw [h.eq_comp_inv, Category.assoc, ← w, ← Functor.map_comp_assoc]
[GOAL]
C : Type u
inst✝ : Category.{v, u} C
F : C ⥤ C
A A₀ A₁ A₂ : Algebra F
f : A₀ ⟶ A₁
g : A₁ ⟶ A₂
h : A₀.a ≅ A₁.a
w : autoParam (F.map h.hom ≫ A₁.str = A₀.str ≫ h.hom) _auto✝
⊢ F.map (h.inv ≫ h.hom) ≫ A₁.str = A₁.str
[PROOFSTEP]
simp
[GOAL]
C : Type u
inst✝¹ : Category.{v, u} C
F : C ⥤ C
A A₀ A₁ A₂ : Algebra F
f✝ : A₀ ⟶ A₁
g : A₁ ⟶ A₂
f : A₀ ⟶ A₁
inst✝ : IsIso f.f
⊢ F.map (inv f.f) ≫ A₀.str = A₁.str ≫ inv f.f
[PROOFSTEP]
rw [IsIso.eq_comp_inv f.1, Category.assoc, ← f.h]
[GOAL]
C : Type u
inst✝¹ : Category.{v, u} C
F : C ⥤ C
A A₀ A₁ A₂ : Algebra F
f✝ : A₀ ⟶ A₁
g : A₁ ⟶ A₂
f : A₀ ⟶ A₁
inst✝ : IsIso f.f
⊢ F.map (inv f.f) ≫ F.map f.f ≫ A₁.str = A₁.str
[PROOFSTEP]
simp
[GOAL]
C : Type u
inst✝¹ : Category.{v, u} C
F : C ⥤ C
A A₀ A₁ A₂ : Algebra F
f✝ : A₀ ⟶ A₁
g : A₁ ⟶ A₂
f : A₀ ⟶ A₁
inst✝ : IsIso f.f
⊢ f ≫ Hom.mk (inv f.f) = 𝟙 A₀
[PROOFSTEP]
aesop_cat
[GOAL]
C : Type u
inst✝¹ : Category.{v, u} C
F : C ⥤ C
A A₀ A₁ A₂ : Algebra F
f✝ : A₀ ⟶ A₁
g : A₁ ⟶ A₂
f : A₀ ⟶ A₁
inst✝ : IsIso f.f
⊢ Hom.mk (inv f.f) ≫ f = 𝟙 A₁
[PROOFSTEP]
aesop_cat
[GOAL]
C : Type u
inst✝ : Category.{v, u} C
F✝ : C ⥤ C
A A₀ A₁ A₂ : Algebra F✝
f : A₀ ⟶ A₁
g : A₁ ⟶ A₂
F G : C ⥤ C
α : F ≅ G
⊢ 𝟙 F = α.hom ≫ α.inv
[PROOFSTEP]
simp
[GOAL]
C : Type u
inst✝ : Category.{v, u} C
F✝ : C ⥤ C
A A₀ A₁ A₂ : Algebra F✝
f : A₀ ⟶ A₁
g : A₁ ⟶ A₂
F G : C ⥤ C
α : F ≅ G
⊢ α.inv ≫ α.hom = 𝟙 G
[PROOFSTEP]
simp
[GOAL]
C : Type u
inst✝ : Category.{v, u} C
F : C ⥤ C
A A₀ A₁ A₂ : Algebra F
f : A₀ ⟶ A₁
g : A₁ ⟶ A₂
h : Limits.IsInitial A
⊢ F.map (strInv h ≫ A.str) ≫ A.str = A.str ≫ strInv h ≫ A.str
[PROOFSTEP]
rw [← Category.assoc, F.map_comp, strInv, ← Hom.h]
[GOAL]
C : Type u
inst✝ : Category.{v, u} C
F : C ⥤ C
A A₀ A₁ A₂ : Algebra F
f : A₀ ⟶ A₁
g : A₁ ⟶ A₂
h : Limits.IsInitial A
⊢ A.str ≫ strInv h = 𝟙 (F.obj A.a)
[PROOFSTEP]
rw [strInv, ← (h.to ⟨F.obj A.1, F.map A.str⟩).h, ← F.map_id, ← F.map_comp]
[GOAL]
C : Type u
inst✝ : Category.{v, u} C
F : C ⥤ C
A A₀ A₁ A₂ : Algebra F
f : A₀ ⟶ A₁
g : A₁ ⟶ A₂
h : Limits.IsInitial A
⊢ F.map ((Limits.IsInitial.to h { a := F.obj A.a, str := F.map A.str }).f ≫ A.str) = F.map (𝟙 A.a)
[PROOFSTEP]
congr
[GOAL]
case e_a
C : Type u
inst✝ : Category.{v, u} C
F : C ⥤ C
A A₀ A₁ A₂ : Algebra F
f : A₀ ⟶ A₁
g : A₁ ⟶ A₂
h : Limits.IsInitial A
⊢ (Limits.IsInitial.to h { a := F.obj A.a, str := F.map A.str }).f ≫ A.str = 𝟙 A.a
[PROOFSTEP]
exact left_inv h
[GOAL]
C : Type u
inst✝ : Category.{v, u} C
F : C ⥤ C
V V₀ V₁ V₂ : Coalgebra F
f : V₀ ⟶ V₁
g : V₁ ⟶ V₂
h : V₀.V ≅ V₁.V
w : autoParam (V₀.str ≫ F.map h.hom = h.hom ≫ V₁.str) _auto✝
⊢ V₁.str ≫ F.map h.inv = h.inv ≫ V₀.str
[PROOFSTEP]
rw [h.eq_inv_comp, ← Category.assoc, ← w, Category.assoc, ← F.map_comp]
[GOAL]
C : Type u
inst✝ : Category.{v, u} C
F : C ⥤ C
V V₀ V₁ V₂ : Coalgebra F
f : V₀ ⟶ V₁
g : V₁ ⟶ V₂
h : V₀.V ≅ V₁.V
w : autoParam (V₀.str ≫ F.map h.hom = h.hom ≫ V₁.str) _auto✝
⊢ V₀.str ≫ F.map (h.hom ≫ h.inv) = V₀.str
[PROOFSTEP]
simp only [Iso.hom_inv_id, Functor.map_id, Category.comp_id]
[GOAL]
C : Type u
inst✝¹ : Category.{v, u} C
F : C ⥤ C
V V₀ V₁ V₂ : Coalgebra F
f✝ : V₀ ⟶ V₁
g : V₁ ⟶ V₂
f : V₀ ⟶ V₁
inst✝ : IsIso f.f
⊢ V₁.str ≫ F.map (inv f.f) = inv f.f ≫ V₀.str
[PROOFSTEP]
rw [IsIso.eq_inv_comp f.1, ← Category.assoc, ← f.h, Category.assoc]
[GOAL]
C : Type u
inst✝¹ : Category.{v, u} C
F : C ⥤ C
V V₀ V₁ V₂ : Coalgebra F
f✝ : V₀ ⟶ V₁
g : V₁ ⟶ V₂
f : V₀ ⟶ V₁
inst✝ : IsIso f.f
⊢ V₀.str ≫ F.map f.f ≫ F.map (inv f.f) = V₀.str
[PROOFSTEP]
simp
[GOAL]
C : Type u
inst✝¹ : Category.{v, u} C
F : C ⥤ C
V V₀ V₁ V₂ : Coalgebra F
f✝ : V₀ ⟶ V₁
g : V₁ ⟶ V₂
f : V₀ ⟶ V₁
inst✝ : IsIso f.f
⊢ f ≫ Hom.mk (inv f.f) = 𝟙 V₀
[PROOFSTEP]
aesop_cat
[GOAL]
C : Type u
inst✝¹ : Category.{v, u} C
F : C ⥤ C
V V₀ V₁ V₂ : Coalgebra F
f✝ : V₀ ⟶ V₁
g : V₁ ⟶ V₂
f : V₀ ⟶ V₁
inst✝ : IsIso f.f
⊢ Hom.mk (inv f.f) ≫ f = 𝟙 V₁
[PROOFSTEP]
aesop_cat
[GOAL]
C : Type u
inst✝ : Category.{v, u} C
F✝ : C ⥤ C
V V₀ V₁ V₂ : Coalgebra F✝
f✝ : V₀ ⟶ V₁
g : V₁ ⟶ V₂
F G : C ⥤ C
α : F ⟶ G
X✝ Y✝ : Coalgebra F
f : X✝ ⟶ Y✝
⊢ ((fun V => { V := V.V, str := V.str ≫ NatTrans.app α V.V }) X✝).str ≫ G.map f.f =
    f.f ≫ ((fun V => { V := V.V, str := V.str ≫ NatTrans.app α V.V }) Y✝).str
[PROOFSTEP]
rw [Category.assoc, ← α.naturality, ← Category.assoc, f.h, Category.assoc]
[GOAL]
C : Type u
inst✝ : Category.{v, u} C
F✝ : C ⥤ C
V V₀ V₁ V₂ : Coalgebra F✝
f : V₀ ⟶ V₁
g : V₁ ⟶ V₂
F G : C ⥤ C
α : F ≅ G
⊢ 𝟙 F = α.hom ≫ α.inv
[PROOFSTEP]
simp
[GOAL]
C : Type u
inst✝ : Category.{v, u} C
F✝ : C ⥤ C
V V₀ V₁ V₂ : Coalgebra F✝
f : V₀ ⟶ V₁
g : V₁ ⟶ V₂
F G : C ⥤ C
α : F ≅ G
⊢ α.inv ≫ α.hom = 𝟙 G
[PROOFSTEP]
simp
[GOAL]
C : Type u
inst✝ : Category.{v, u} C
F G : C ⥤ C
adj : F ⊣ G
A₁ A₂ : Algebra F
f : A₁ ⟶ A₂
⊢ ↑(Adjunction.homEquiv adj A₁.a A₁.a) A₁.str ≫ G.map f.f = f.f ≫ ↑(Adjunction.homEquiv adj A₂.a A₂.a) A₂.str
[PROOFSTEP]
rw [← Adjunction.homEquiv_naturality_right, ← Adjunction.homEquiv_naturality_left, f.h]
[GOAL]
C : Type u
inst✝ : Category.{v, u} C
F G : C ⥤ C
adj : F ⊣ G
V₁ V₂ : Coalgebra G
f : V₁ ⟶ V₂
⊢ F.map f.f ≫ ↑(Adjunction.homEquiv adj V₂.V V₂.V).symm V₂.str = ↑(Adjunction.homEquiv adj V₁.V V₁.V).symm V₁.str ≫ f.f
[PROOFSTEP]
rw [← Adjunction.homEquiv_naturality_left_symm, ← Adjunction.homEquiv_naturality_right_symm, f.h]
[GOAL]
C : Type u
inst✝ : Category.{v, u} C
F G : C ⥤ C
adj : F ⊣ G
A : Algebra F
⊢ F.map (𝟙 A.a) ≫ ((Algebra.toCoalgebraOf adj ⋙ Coalgebra.toAlgebraOf adj).obj A).str =
    ((𝟭 (Algebra F)).obj A).str ≫ 𝟙 A.a
[PROOFSTEP]
erw [F.map_id, Category.id_comp, Category.comp_id]
[GOAL]
C : Type u
inst✝ : Category.{v, u} C
F G : C ⥤ C
adj : F ⊣ G
A : Algebra F
⊢ ((Algebra.toCoalgebraOf adj ⋙ Coalgebra.toAlgebraOf adj).obj A).str = ((𝟭 (Algebra F)).obj A).str
[PROOFSTEP]
apply (adj.homEquiv _ _).left_inv A.str
[GOAL]
C : Type u
inst✝ : Category.{v, u} C
F G : C ⥤ C
adj : F ⊣ G
A : Algebra F
⊢ F.map (𝟙 A.a) ≫ ((𝟭 (Algebra F)).obj A).str =
    ((Algebra.toCoalgebraOf adj ⋙ Coalgebra.toAlgebraOf adj).obj A).str ≫ 𝟙 A.a
[PROOFSTEP]
erw [F.map_id, Category.id_comp, Category.comp_id]
[GOAL]
C : Type u
inst✝ : Category.{v, u} C
F G : C ⥤ C
adj : F ⊣ G
A : Algebra F
⊢ ((𝟭 (Algebra F)).obj A).str = ((Algebra.toCoalgebraOf adj ⋙ Coalgebra.toAlgebraOf adj).obj A).str
[PROOFSTEP]
apply ((adj.homEquiv _ _).left_inv A.str).symm
[GOAL]
C : Type u
inst✝ : Category.{v, u} C
F G : C ⥤ C
adj : F ⊣ G
A₁ A₂ : Algebra F
f : A₁ ⟶ A₂
⊢ (Algebra.toCoalgebraOf adj ⋙ Coalgebra.toAlgebraOf adj).map f ≫ (fun A => Algebra.Hom.mk (𝟙 A.a)) A₂ =
    (fun A => Algebra.Hom.mk (𝟙 A.a)) A₁ ≫ (𝟭 (Algebra F)).map f
[PROOFSTEP]
ext
[GOAL]
case w
C : Type u
inst✝ : Category.{v, u} C
F G : C ⥤ C
adj : F ⊣ G
A₁ A₂ : Algebra F
f : A₁ ⟶ A₂
⊢ autoParam
    (((Algebra.toCoalgebraOf adj ⋙ Coalgebra.toAlgebraOf adj).map f ≫ (fun A => Algebra.Hom.mk (𝟙 A.a)) A₂).f =
      ((fun A => Algebra.Hom.mk (𝟙 A.a)) A₁ ≫ (𝟭 (Algebra F)).map f).f)
    _auto✝
[PROOFSTEP]
dsimp
[GOAL]
case w
C : Type u
inst✝ : Category.{v, u} C
F G : C ⥤ C
adj : F ⊣ G
A₁ A₂ : Algebra F
f : A₁ ⟶ A₂
⊢ autoParam (((Coalgebra.toAlgebraOf adj).map ((Algebra.toCoalgebraOf adj).map f)).f ≫ 𝟙 A₂.a = 𝟙 A₁.a ≫ f.f) _auto✝
[PROOFSTEP]
erw [Category.comp_id, Category.id_comp]
[GOAL]
case w
C : Type u
inst✝ : Category.{v, u} C
F G : C ⥤ C
adj : F ⊣ G
A₁ A₂ : Algebra F
f : A₁ ⟶ A₂
⊢ autoParam (((Coalgebra.toAlgebraOf adj).map ((Algebra.toCoalgebraOf adj).map f)).f = f.f) _auto✝
[PROOFSTEP]
rfl
[GOAL]
C : Type u
inst✝ : Category.{v, u} C
F G : C ⥤ C
adj : F ⊣ G
V : Coalgebra G
⊢ ((Coalgebra.toAlgebraOf adj ⋙ Algebra.toCoalgebraOf adj).obj V).str ≫ G.map (𝟙 V.V) =
    𝟙 V.V ≫ ((𝟭 (Coalgebra G)).obj V).str
[PROOFSTEP]
dsimp
[GOAL]
C : Type u
inst✝ : Category.{v, u} C
F G : C ⥤ C
adj : F ⊣ G
V : Coalgebra G
⊢ ((Algebra.toCoalgebraOf adj).obj ((Coalgebra.toAlgebraOf adj).obj V)).str ≫ G.map (𝟙 V.V) = 𝟙 V.V ≫ V.str
[PROOFSTEP]
erw [G.map_id, Category.id_comp, Category.comp_id]
[GOAL]
C : Type u
inst✝ : Category.{v, u} C
F G : C ⥤ C
adj : F ⊣ G
V : Coalgebra G
⊢ ((Algebra.toCoalgebraOf adj).obj ((Coalgebra.toAlgebraOf adj).obj V)).str = V.str
[PROOFSTEP]
apply (adj.homEquiv _ _).right_inv V.str
[GOAL]
C : Type u
inst✝ : Category.{v, u} C
F G : C ⥤ C
adj : F ⊣ G
V₁ V₂ : Coalgebra G
f : V₁ ⟶ V₂
⊢ (Coalgebra.toAlgebraOf adj ⋙ Algebra.toCoalgebraOf adj).map f ≫ (fun V => Coalgebra.Hom.mk (𝟙 V.V)) V₂ =
    (fun V => Coalgebra.Hom.mk (𝟙 V.V)) V₁ ≫ (𝟭 (Coalgebra G)).map f
[PROOFSTEP]
ext
[GOAL]
case w
C : Type u
inst✝ : Category.{v, u} C
F G : C ⥤ C
adj : F ⊣ G
V₁ V₂ : Coalgebra G
f : V₁ ⟶ V₂
⊢ autoParam
    (((Coalgebra.toAlgebraOf adj ⋙ Algebra.toCoalgebraOf adj).map f ≫ (fun V => Coalgebra.Hom.mk (𝟙 V.V)) V₂).f =
      ((fun V => Coalgebra.Hom.mk (𝟙 V.V)) V₁ ≫ (𝟭 (Coalgebra G)).map f).f)
    _auto✝
[PROOFSTEP]
dsimp
[GOAL]
case w
C : Type u
inst✝ : Category.{v, u} C
F G : C ⥤ C
adj : F ⊣ G
V₁ V₂ : Coalgebra G
f : V₁ ⟶ V₂
⊢ autoParam (((Algebra.toCoalgebraOf adj).map ((Coalgebra.toAlgebraOf adj).map f)).f ≫ 𝟙 V₂.V = 𝟙 V₁.V ≫ f.f) _auto✝
[PROOFSTEP]
erw [Category.comp_id, Category.id_comp]
[GOAL]
case w
C : Type u
inst✝ : Category.{v, u} C
F G : C ⥤ C
adj : F ⊣ G
V₁ V₂ : Coalgebra G
f : V₁ ⟶ V₂
⊢ autoParam (((Algebra.toCoalgebraOf adj).map ((Coalgebra.toAlgebraOf adj).map f)).f = f.f) _auto✝
[PROOFSTEP]
rfl
[GOAL]
C : Type u
inst✝ : Category.{v, u} C
F G : C ⥤ C
adj : F ⊣ G
V : Coalgebra G
⊢ ((𝟭 (Coalgebra G)).obj V).str ≫ G.map (𝟙 V.V) =
    𝟙 V.V ≫ ((Coalgebra.toAlgebraOf adj ⋙ Algebra.toCoalgebraOf adj).obj V).str
[PROOFSTEP]
dsimp
[GOAL]
C : Type u
inst✝ : Category.{v, u} C
F G : C ⥤ C
adj : F ⊣ G
V : Coalgebra G
⊢ V.str ≫ G.map (𝟙 V.V) = 𝟙 V.V ≫ ((Algebra.toCoalgebraOf adj).obj ((Coalgebra.toAlgebraOf adj).obj V)).str
[PROOFSTEP]
rw [G.map_id, Category.comp_id, Category.id_comp]
[GOAL]
C : Type u
inst✝ : Category.{v, u} C
F G : C ⥤ C
adj : F ⊣ G
V : Coalgebra G
⊢ V.str = ((Algebra.toCoalgebraOf adj).obj ((Coalgebra.toAlgebraOf adj).obj V)).str
[PROOFSTEP]
apply ((adj.homEquiv _ _).right_inv V.str).symm
[GOAL]
C : Type u
inst✝ : Category.{v, u} C
F G : C ⥤ C
adj : F ⊣ G
A : Algebra F
⊢ (Algebra.toCoalgebraOf adj).map (NatTrans.app (AlgCoalgEquiv.unitIso adj).hom A) ≫
      NatTrans.app (AlgCoalgEquiv.counitIso adj).hom ((Algebra.toCoalgebraOf adj).obj A) =
    𝟙 ((Algebra.toCoalgebraOf adj).obj A)
[PROOFSTEP]
ext
  -- Porting note: why doesn't `simp` work here?
[GOAL]
case w
C : Type u
inst✝ : Category.{v, u} C
F G : C ⥤ C
adj : F ⊣ G
A : Algebra F
⊢ autoParam
    (((Algebra.toCoalgebraOf adj).map (NatTrans.app (AlgCoalgEquiv.unitIso adj).hom A) ≫
          NatTrans.app (AlgCoalgEquiv.counitIso adj).hom ((Algebra.toCoalgebraOf adj).obj A)).f =
      (𝟙 ((Algebra.toCoalgebraOf adj).obj A)).f)
    _auto✝
[PROOFSTEP]
exact Category.comp_id _


[GOAL]
C : Type u
inst✝ : Category.{v, u} C
X : TopCat
F✝ : Presheaf C X
ι : Type v
U✝ : ι → Opens ↑X
F : Presheaf (Discrete Unit) X
x✝² : Discrete Unit
U : Opens ↑X
S : Sieve U
x✝¹ : S ∈ GrothendieckTopology.sieves (Opens.grothendieckTopology ↑X) U
x : Presieve.FamilyOfElements (F ⋙ coyoneda.obj (op x✝²)) S.arrows
x✝ : Presieve.FamilyOfElements.Compatible x
⊢ (fun t => Presieve.FamilyOfElements.IsAmalgamation x t) (eqToHom (_ : (op x✝²).unop = F.obj (op U)))
[PROOFSTEP]
aesop_cat
[GOAL]
C : Type u
inst✝ : Category.{v, u} C
X : TopCat
F✝ : Presheaf C X
ι : Type v
U✝ : ι → Opens ↑X
F : Presheaf (Discrete Unit) X
x✝³ : Discrete Unit
U : Opens ↑X
S : Sieve U
x✝² : S ∈ GrothendieckTopology.sieves (Opens.grothendieckTopology ↑X) U
x : Presieve.FamilyOfElements (F ⋙ coyoneda.obj (op x✝³)) S.arrows
x✝¹ : Presieve.FamilyOfElements.Compatible x
x✝ : (F ⋙ coyoneda.obj (op x✝³)).obj (op U)
⊢ (fun t => Presieve.FamilyOfElements.IsAmalgamation x t) x✝ → x✝ = eqToHom (_ : (op x✝³).unop = F.obj (op U))
[PROOFSTEP]
aesop_cat


[GOAL]
C : Type u
inst✝¹ : Category.{v, u} C
inst✝ : Preadditive C
X Y Z : C
r : ℕ
f : X ⟶ Y
g : Y ⟶ Z
⊢ (r • f) ≫ g = r • f ≫ g
[PROOFSTEP]
exact (Preadditive.rightComp X g).map_nsmul f r
[GOAL]
C : Type u
inst✝¹ : Category.{v, u} C
inst✝ : Preadditive C
X Y Z : C
f : X ⟶ Y
r : ℕ
g : Y ⟶ Z
⊢ f ≫ (r • g) = r • f ≫ g
[PROOFSTEP]
exact (Preadditive.leftComp Z f).map_nsmul g r
[GOAL]
C : Type u
inst✝¹ : Category.{v, u} C
inst✝ : Preadditive C
X Y Z : C
r : ℤ
f : X ⟶ Y
g : Y ⟶ Z
⊢ (r • f) ≫ g = r • f ≫ g
[PROOFSTEP]
exact (Preadditive.rightComp X g).map_zsmul f r
[GOAL]
C : Type u
inst✝¹ : Category.{v, u} C
inst✝ : Preadditive C
X Y Z : C
f : X ⟶ Y
r : ℤ
g : Y ⟶ Z
⊢ f ≫ (r • g) = r • f ≫ g
[PROOFSTEP]
exact (Preadditive.leftComp Z f).map_zsmul g r
[GOAL]
C : Type u
inst✝³ : Category.{v, u} C
inst✝² : Preadditive C
R : Type w
inst✝¹ : Semiring R
inst✝ : Linear R C
X : C
⊢ Module R (End X)
[PROOFSTEP]
dsimp [End]
[GOAL]
C : Type u
inst✝³ : Category.{v, u} C
inst✝² : Preadditive C
R : Type w
inst✝¹ : Semiring R
inst✝ : Linear R C
X : C
⊢ Module R (X ⟶ X)
[PROOFSTEP]
infer_instance
[GOAL]
C : Type u
inst✝³ : Category.{v, u} C
inst✝² : Preadditive C
R : Type w
inst✝¹ : Semiring R
inst✝ : Linear R C
X Y Z : C
f : X ⟶ Y
⊢ ∀ (x y : Y ⟶ Z), (fun g => f ≫ g) (x + y) = (fun g => f ≫ g) x + (fun g => f ≫ g) y
[PROOFSTEP]
simp
[GOAL]
C : Type u
inst✝³ : Category.{v, u} C
inst✝² : Preadditive C
R : Type w
inst✝¹ : Semiring R
inst✝ : Linear R C
X Y Z : C
f : X ⟶ Y
⊢ ∀ (r : R) (x : Y ⟶ Z),
    AddHom.toFun { toFun := fun g => f ≫ g, map_add' := (_ : ∀ (a a_1 : Y ⟶ Z), f ≫ (a + a_1) = f ≫ a + f ≫ a_1) }
        (r • x) =
      ↑(RingHom.id R) r •
        AddHom.toFun { toFun := fun g => f ≫ g, map_add' := (_ : ∀ (a a_1 : Y ⟶ Z), f ≫ (a + a_1) = f ≫ a + f ≫ a_1) } x
[PROOFSTEP]
simp
[GOAL]
C : Type u
inst✝³ : Category.{v, u} C
inst✝² : Preadditive C
R : Type w
inst✝¹ : Semiring R
inst✝ : Linear R C
X Y Z : C
g : Y ⟶ Z
⊢ ∀ (x y : X ⟶ Y), (fun f => f ≫ g) (x + y) = (fun f => f ≫ g) x + (fun f => f ≫ g) y
[PROOFSTEP]
simp
[GOAL]
C : Type u
inst✝³ : Category.{v, u} C
inst✝² : Preadditive C
R : Type w
inst✝¹ : Semiring R
inst✝ : Linear R C
X Y Z : C
g : Y ⟶ Z
⊢ ∀ (r : R) (x : X ⟶ Y),
    AddHom.toFun { toFun := fun f => f ≫ g, map_add' := (_ : ∀ (a a_1 : X ⟶ Y), (a + a_1) ≫ g = a ≫ g + a_1 ≫ g) }
        (r • x) =
      ↑(RingHom.id R) r •
        AddHom.toFun { toFun := fun f => f ≫ g, map_add' := (_ : ∀ (a a_1 : X ⟶ Y), (a + a_1) ≫ g = a ≫ g + a_1 ≫ g) } x
[PROOFSTEP]
simp
[GOAL]
C : Type u
inst✝⁵ : Category.{v, u} C
inst✝⁴ : Preadditive C
R : Type w
inst✝³ : Semiring R
inst✝² : Linear R C
X Y : C
f : X ⟶ Y
inst✝¹ : Epi f
r : R
inst✝ : Invertible r
Z✝ : C
g g' : Y ⟶ Z✝
H : (r • f) ≫ g = (r • f) ≫ g'
⊢ g = g'
[PROOFSTEP]
rw [smul_comp, smul_comp, ← comp_smul, ← comp_smul, cancel_epi] at H
[GOAL]
C : Type u
inst✝⁵ : Category.{v, u} C
inst✝⁴ : Preadditive C
R : Type w
inst✝³ : Semiring R
inst✝² : Linear R C
X Y : C
f : X ⟶ Y
inst✝¹ : Epi f
r : R
inst✝ : Invertible r
Z✝ : C
g g' : Y ⟶ Z✝
H : r • g = r • g'
⊢ g = g'
[PROOFSTEP]
simpa [smul_smul] using congr_arg (fun f => ⅟r • f) H
[GOAL]
C : Type u
inst✝⁵ : Category.{v, u} C
inst✝⁴ : Preadditive C
R : Type w
inst✝³ : Semiring R
inst✝² : Linear R C
X Y : C
f : X ⟶ Y
inst✝¹ : Mono f
r : R
inst✝ : Invertible r
Z✝ : C
g g' : Z✝ ⟶ X
H : g ≫ (r • f) = g' ≫ (r • f)
⊢ g = g'
[PROOFSTEP]
rw [comp_smul, comp_smul, ← smul_comp, ← smul_comp, cancel_mono] at H
[GOAL]
C : Type u
inst✝⁵ : Category.{v, u} C
inst✝⁴ : Preadditive C
R : Type w
inst✝³ : Semiring R
inst✝² : Linear R C
X Y : C
f : X ⟶ Y
inst✝¹ : Mono f
r : R
inst✝ : Invertible r
Z✝ : C
g g' : Z✝ ⟶ X
H : r • g = r • g'
⊢ g = g'
[PROOFSTEP]
simpa [smul_smul] using congr_arg (fun f => ⅟r • f) H
[GOAL]
C✝ : Type u
inst✝⁷ : Category.{v, u} C✝
inst✝⁶ : Preadditive C✝
R : Type w
inst✝⁵ : Semiring R
inst✝⁴ : Linear R C✝
k : Type u_1
C : Type u_2
inst✝³ : Category.{?u.35990, u_2} C
inst✝² : Semiring k
inst✝¹ : Preadditive C
inst✝ : Linear k C
X Y W Z : C
f₁ : X ≅ Y
f₂ : W ≅ Z
src✝ : (X ⟶ W) →ₗ[k] Y ⟶ Z := comp (rightComp k Y f₂.hom) (leftComp k W f₁.symm.hom)
x : X ⟶ W
⊢ ↑(comp (leftComp k W f₁.hom) (rightComp k Y f₂.symm.hom))
      (AddHom.toFun
        { toAddHom := src✝.toAddHom,
            map_smul' :=
              (_ :
                ∀ (r : k) (x : X ⟶ W),
                  AddHom.toFun src✝.toAddHom (r • x) = ↑(RingHom.id k) r • AddHom.toFun src✝.toAddHom x) }.toAddHom
        x) =
    x
[PROOFSTEP]
simp only [Iso.symm_hom, LinearMap.toFun_eq_coe, LinearMap.coe_comp, Function.comp_apply, leftComp_apply,
  rightComp_apply, Category.assoc, Iso.hom_inv_id, Category.comp_id, Iso.hom_inv_id_assoc]
[GOAL]
C✝ : Type u
inst✝⁷ : Category.{v, u} C✝
inst✝⁶ : Preadditive C✝
R : Type w
inst✝⁵ : Semiring R
inst✝⁴ : Linear R C✝
k : Type u_1
C : Type u_2
inst✝³ : Category.{?u.35990, u_2} C
inst✝² : Semiring k
inst✝¹ : Preadditive C
inst✝ : Linear k C
X Y W Z : C
f₁ : X ≅ Y
f₂ : W ≅ Z
src✝ : (X ⟶ W) →ₗ[k] Y ⟶ Z := comp (rightComp k Y f₂.hom) (leftComp k W f₁.symm.hom)
x : Y ⟶ Z
⊢ AddHom.toFun
      { toAddHom := src✝.toAddHom,
          map_smul' :=
            (_ :
              ∀ (r : k) (x : X ⟶ W),
                AddHom.toFun src✝.toAddHom (r • x) = ↑(RingHom.id k) r • AddHom.toFun src✝.toAddHom x) }.toAddHom
      (↑(comp (leftComp k W f₁.hom) (rightComp k Y f₂.symm.hom)) x) =
    x
[PROOFSTEP]
simp only [Iso.symm_hom, LinearMap.coe_comp, Function.comp_apply, rightComp_apply, leftComp_apply,
  LinearMap.toFun_eq_coe, Iso.inv_hom_id_assoc, Category.assoc, Iso.inv_hom_id, Category.comp_id]
[GOAL]
C : Type u
inst✝³ : Category.{v, u} C
inst✝² : Preadditive C
S : Type w
inst✝¹ : CommSemiring S
inst✝ : Linear S C
X Y Z : C
⊢ ∀ (x y : X ⟶ Y), (fun f => leftComp S Z f) (x + y) = (fun f => leftComp S Z f) x + (fun f => leftComp S Z f) y
[PROOFSTEP]
intros
[GOAL]
C : Type u
inst✝³ : Category.{v, u} C
inst✝² : Preadditive C
S : Type w
inst✝¹ : CommSemiring S
inst✝ : Linear S C
X Y Z : C
x✝ y✝ : X ⟶ Y
⊢ (fun f => leftComp S Z f) (x✝ + y✝) = (fun f => leftComp S Z f) x✝ + (fun f => leftComp S Z f) y✝
[PROOFSTEP]
ext
[GOAL]
case h
C : Type u
inst✝³ : Category.{v, u} C
inst✝² : Preadditive C
S : Type w
inst✝¹ : CommSemiring S
inst✝ : Linear S C
X Y Z : C
x✝¹ y✝ : X ⟶ Y
x✝ : Y ⟶ Z
⊢ ↑((fun f => leftComp S Z f) (x✝¹ + y✝)) x✝ = ↑((fun f => leftComp S Z f) x✝¹ + (fun f => leftComp S Z f) y✝) x✝
[PROOFSTEP]
simp
[GOAL]
C : Type u
inst✝³ : Category.{v, u} C
inst✝² : Preadditive C
S : Type w
inst✝¹ : CommSemiring S
inst✝ : Linear S C
X Y Z : C
⊢ ∀ (r : S) (x : X ⟶ Y),
    AddHom.toFun
        { toFun := fun f => leftComp S Z f,
          map_add' :=
            (_ :
              ∀ (x y : X ⟶ Y),
                (fun f => leftComp S Z f) (x + y) = (fun f => leftComp S Z f) x + (fun f => leftComp S Z f) y) }
        (r • x) =
      ↑(RingHom.id S) r •
        AddHom.toFun
          { toFun := fun f => leftComp S Z f,
            map_add' :=
              (_ :
                ∀ (x y : X ⟶ Y),
                  (fun f => leftComp S Z f) (x + y) = (fun f => leftComp S Z f) x + (fun f => leftComp S Z f) y) }
          x
[PROOFSTEP]
intros
[GOAL]
C : Type u
inst✝³ : Category.{v, u} C
inst✝² : Preadditive C
S : Type w
inst✝¹ : CommSemiring S
inst✝ : Linear S C
X Y Z : C
r✝ : S
x✝ : X ⟶ Y
⊢ AddHom.toFun
      { toFun := fun f => leftComp S Z f,
        map_add' :=
          (_ :
            ∀ (x y : X ⟶ Y),
              (fun f => leftComp S Z f) (x + y) = (fun f => leftComp S Z f) x + (fun f => leftComp S Z f) y) }
      (r✝ • x✝) =
    ↑(RingHom.id S) r✝ •
      AddHom.toFun
        { toFun := fun f => leftComp S Z f,
          map_add' :=
            (_ :
              ∀ (x y : X ⟶ Y),
                (fun f => leftComp S Z f) (x + y) = (fun f => leftComp S Z f) x + (fun f => leftComp S Z f) y) }
        x✝
[PROOFSTEP]
ext
[GOAL]
case h
C : Type u
inst✝³ : Category.{v, u} C
inst✝² : Preadditive C
S : Type w
inst✝¹ : CommSemiring S
inst✝ : Linear S C
X Y Z : C
r✝ : S
x✝¹ : X ⟶ Y
x✝ : Y ⟶ Z
⊢ ↑(AddHom.toFun
          { toFun := fun f => leftComp S Z f,
            map_add' :=
              (_ :
                ∀ (x y : X ⟶ Y),
                  (fun f => leftComp S Z f) (x + y) = (fun f => leftComp S Z f) x + (fun f => leftComp S Z f) y) }
          (r✝ • x✝¹))
      x✝ =
    ↑(↑(RingHom.id S) r✝ •
          AddHom.toFun
            { toFun := fun f => leftComp S Z f,
              map_add' :=
                (_ :
                  ∀ (x y : X ⟶ Y),
                    (fun f => leftComp S Z f) (x + y) = (fun f => leftComp S Z f) x + (fun f => leftComp S Z f) y) }
            x✝¹)
      x✝
[PROOFSTEP]
simp