[System] You are Leanstral, a Lean 4 proof assistant. The target mathlib commit is 5e932f97dd25535344f80f9dd8da3aab83df0fe6 (module Mathlib.FieldTheory.Fixed).

[User]
Complete the following proof.

```lean
theorem AlgHom.card_le {F K : Type*} [Field F] [Field K] [Algebra F K] [FiniteDimensional F K] :
    Fintype.card (K →ₐ[F] K) ≤ Module.finrank F K
```

Provide a complete Lean proof for the statement above. Do not include the statement in your answer.

<s>[SYSTEM_PROMPT]You are Leanstral, a Lean 4 proof assistant. The target mathlib commit is 5e932f97dd25535344f80f9dd8da3aab83df0fe6 (module Mathlib.FieldTheory.Fixed).[/SYSTEM_PROMPT][MODEL_SETTINGS]{"reasoning_effort": "none"}[/MODEL_SETTINGS][INST]Complete the following proof.

```lean
theorem AlgHom.card_le {F K : Type*} [Field F] [Field K] [Algebra F K] [FiniteDimensional F K] :
    Fintype.card (K →ₐ[F] K) ≤ Module.finrank F K
```

Provide a complete Lean proof for the statement above. Do not include the statement in your answer.[/INST]


[System] You are Leanstral, a Lean 4 proof assistant. The target mathlib commit is 5e932f97dd25535344f80f9dd8da3aab83df0fe6 (module Mathlib.CategoryTheory.Action.Limits).

[User]
Complete the following proof.

```lean
lemma preservesColimitsOfShape_of_preserves (F : C ⥤ Action V G) {J : Type*}
    [Category* J] (h : PreservesColimitsOfShape J (F ⋙ Action.forget V G)) :
    PreservesColimitsOfShape J F
```

Provide a complete Lean proof for the statement above. Do not include the statement in your answer.

<s>[SYSTEM_PROMPT]You are Leanstral, a Lean 4 proof assistant. The target mathlib commit is 5e932f97dd25535344f80f9dd8da3aab83df0fe6 (module Mathlib.CategoryTheory.Action.Limits).[/SYSTEM_PROMPT][MODEL_SETTINGS]{"reasoning_effort": "none"}[/MODEL_SETTINGS][INST]Complete the following proof.

```lean
lemma preservesColimitsOfShape_of_preserves (F : C ⥤ Action V G) {J : Type*}
    [Category* J] (h : PreservesColimitsOfShape J (F ⋙ Action.forget V G)) :
    PreservesColimitsOfShape J F
```

Provide a complete Lean proof for the statement above. Do not include the statement in your answer.[/INST]


[System] You are Leanstral, a Lean 4 proof assistant. The target mathlib commit is 5e932f97dd25535344f80f9dd8da3aab83df0fe6 (module Mathlib.Geometry.Euclidean.Sphere.SecondInter).

[User]
Complete the following proof.

```lean
theorem Sphere.eq_or_eq_secondInter_of_mem_mk'_span_singleton_iff_mem {s : Sphere P} {p : P}
    (hp : p ∈ s) {v : V} {p' : P} (hp' : p' ∈ AffineSubspace.mk' p (ℝ ∙ v)) :
    p' = p ∨ p' = s.secondInter p v ↔ p' ∈ s
```

Provide a complete Lean proof for the statement above. Do not include the statement in your answer.

<s>[SYSTEM_PROMPT]You are Leanstral, a Lean 4 proof assistant. The target mathlib commit is 5e932f97dd25535344f80f9dd8da3aab83df0fe6 (module Mathlib.Geometry.Euclidean.Sphere.SecondInter).[/SYSTEM_PROMPT][MODEL_SETTINGS]{"reasoning_effort": "none"}[/MODEL_SETTINGS][INST]Complete the following proof.

```lean
theorem Sphere.eq_or_eq_secondInter_of_mem_mk'_span_singleton_iff_mem {s : Sphere P} {p : P}
    (hp : p ∈ s) {v : V} {p' : P} (hp' : p' ∈ AffineSubspace.mk' p (ℝ ∙ v)) :
    p' = p ∨ p' = s.secondInter p v ↔ p' ∈ s
```

Provide a complete Lean proof for the statement above. Do not include the statement in your answer.[/INST]


[System] You are Leanstral, a Lean 4 proof assistant. The target mathlib commit is 5e932f97dd25535344f80f9dd8da3aab83df0fe6 (module Mathlib.CategoryTheory.Limits.Connected).

[User]
Complete the following proof.

```lean
instance widePullbackShape_connected (J : Type v₁) : IsConnected (WidePullbackShape J)
```

Provide a complete Lean proof for the statement above. Do not include the statement in your answer.

<s>[SYSTEM_PROMPT]You are Leanstral, a Lean 4 proof assistant. The target mathlib commit is 5e932f97dd25535344f80f9dd8da3aab83df0fe6 (module Mathlib.CategoryTheory.Limits.Connected).[/SYSTEM_PROMPT][MODEL_SETTINGS]{"reasoning_effort": "none"}[/MODEL_SETTINGS][INST]Complete the following proof.

```lean
instance widePullbackShape_connected (J : Type v₁) : IsConnected (WidePullbackShape J)
```

Provide a complete Lean proof for the statement above. Do not include the statement in your answer.[/INST]


[System] You are Leanstral, a Lean 4 proof assistant. The target mathlib commit is 5e932f97dd25535344f80f9dd8da3aab83df0fe6 (module Mathlib.FieldTheory.AlgebraicClosure).

[User]
Complete the following proof.

```lean
theorem le_algebraicClosure_iff (L : IntermediateField F E) :
    L ≤ algebraicClosure F E ↔ Algebra.IsAlgebraic F L
```

Provide a complete Lean proof for the statement above. Do not include the statement in your answer.

<s>[SYSTEM_PROMPT]You are Leanstral, a Lean 4 proof assistant. The target mathlib commit is 5e932f97dd25535344f80f9dd8da3aab83df0fe6 (module Mathlib.FieldTheory.AlgebraicClosure).[/SYSTEM_PROMPT][MODEL_SETTINGS]{"reasoning_effort": "none"}[/MODEL_SETTINGS][INST]Complete the following proof.

```lean
theorem le_algebraicClosure_iff (L : IntermediateField F E) :
    L ≤ algebraicClosure F E ↔ Algebra.IsAlgebraic F L
```

Provide a complete Lean proof for the statement above. Do not include the statement in your answer.[/INST]


[System] You are Leanstral, a Lean 4 proof assistant. The target mathlib commit is 5e932f97dd25535344f80f9dd8da3aab83df0fe6 (module Mathlib.CategoryTheory.Sites.GlobalSections).

[User]
Complete the following proof.

```lean
lemma Sheaf.ΓObjEquivHom_naturality_symm [HasWeakSheafify J (Type w)]
    [HasGlobalSectionsFunctor J (Type w)] {X : Type w} [Unique X] {F G : Sheaf J (Type w)}
    (f : F ⟶ G) (x : (constantSheaf J _).obj X ⟶ F) :
    (ΓObjEquivHom J G X).symm (x ≫ f) = (Γ J _).map f ((ΓObjEquivHom J F X).symm x)
```

Provide a complete Lean proof for the statement above. Do not include the statement in your answer.

<s>[SYSTEM_PROMPT]You are Leanstral, a Lean 4 proof assistant. The target mathlib commit is 5e932f97dd25535344f80f9dd8da3aab83df0fe6 (module Mathlib.CategoryTheory.Sites.GlobalSections).[/SYSTEM_PROMPT][MODEL_SETTINGS]{"reasoning_effort": "none"}[/MODEL_SETTINGS][INST]Complete the following proof.

```lean
lemma Sheaf.ΓObjEquivHom_naturality_symm [HasWeakSheafify J (Type w)]
    [HasGlobalSectionsFunctor J (Type w)] {X : Type w} [Unique X] {F G : Sheaf J (Type w)}
    (f : F ⟶ G) (x : (constantSheaf J _).obj X ⟶ F) :
    (ΓObjEquivHom J G X).symm (x ≫ f) = (Γ J _).map f ((ΓObjEquivHom J F X).symm x)
```

Provide a complete Lean proof for the statement above. Do not include the statement in your answer.[/INST]


[System] You are Leanstral, a Lean 4 proof assistant. The target mathlib commit is 5e932f97dd25535344f80f9dd8da3aab83df0fe6 (module Mathlib.FieldTheory.AbelRuffini).

[User]
Complete the following proof.

```lean
theorem gal_X_pow_isSolvable (n : ℕ) : IsSolvable (X ^ n : F[X]).Gal
```

Provide a complete Lean proof for the statement above. Do not include the statement in your answer.

<s>[SYSTEM_PROMPT]You are Leanstral, a Lean 4 proof assistant. The target mathlib commit is 5e932f97dd25535344f80f9dd8da3aab83df0fe6 (module Mathlib.FieldTheory.AbelRuffini).[/SYSTEM_PROMPT][MODEL_SETTINGS]{"reasoning_effort": "none"}[/MODEL_SETTINGS][INST]Complete the following proof.

```lean
theorem gal_X_pow_isSolvable (n : ℕ) : IsSolvable (X ^ n : F[X]).Gal
```

Provide a complete Lean proof for the statement above. Do not include the statement in your answer.[/INST]


[System] You are Leanstral, a Lean 4 proof assistant. The target mathlib commit is 5e932f97dd25535344f80f9dd8da3aab83df0fe6 (module Mathlib.MeasureTheory.Measure.Typeclasses.NoAtoms).

[User]
Complete the following proof.

```lean
theorem Ioo_ae_eq_Ioc : Ioo a b =ᵐ[μ] Ioc a b
```

Provide a complete Lean proof for the statement above. Do not include the statement in your answer.

<s>[SYSTEM_PROMPT]You are Leanstral, a Lean 4 proof assistant. The target mathlib commit is 5e932f97dd25535344f80f9dd8da3aab83df0fe6 (module Mathlib.MeasureTheory.Measure.Typeclasses.NoAtoms).[/SYSTEM_PROMPT][MODEL_SETTINGS]{"reasoning_effort": "none"}[/MODEL_SETTINGS][INST]Complete the following proof.

```lean
theorem Ioo_ae_eq_Ioc : Ioo a b =ᵐ[μ] Ioc a b
```

Provide a complete Lean proof for the statement above. Do not include the statement in your answer.[/INST]


[System] You are Leanstral, a Lean 4 proof assistant. The target mathlib commit is 5e932f97dd25535344f80f9dd8da3aab83df0fe6 (module Mathlib.CategoryTheory.Shift.Linear).

[User]
Complete the following proof.

```lean
lemma linear_of_localization [L.IsLocalization W] [L.Linear R] [HasShift D M]
    [L.CommShift M] (n : M) : (shiftFunctor D n).Linear R
```

Provide a complete Lean proof for the statement above. Do not include the statement in your answer.

<s>[SYSTEM_PROMPT]You are Leanstral, a Lean 4 proof assistant. The target mathlib commit is 5e932f97dd25535344f80f9dd8da3aab83df0fe6 (module Mathlib.CategoryTheory.Shift.Linear).[/SYSTEM_PROMPT][MODEL_SETTINGS]{"reasoning_effort": "none"}[/MODEL_SETTINGS][INST]Complete the following proof.

```lean
lemma linear_of_localization [L.IsLocalization W] [L.Linear R] [HasShift D M]
    [L.CommShift M] (n : M) : (shiftFunctor D n).Linear R
```

Provide a complete Lean proof for the statement above. Do not include the statement in your answer.[/INST]


[System] You are Leanstral, a Lean 4 proof assistant. The target mathlib commit is 5e932f97dd25535344f80f9dd8da3aab83df0fe6 (module Mathlib.CategoryTheory.Category.Cat).

[User]
Complete the following proof.

```lean
lemma inv_hom_id_toNatTrans {X Y : Cat.{v, u}} {F G : X ⟶ Y} (e : F ≅ G) :
    e.inv.toNatTrans ≫ e.hom.toNatTrans = 𝟙 _
```

Provide a complete Lean proof for the statement above. Do not include the statement in your answer.

<s>[SYSTEM_PROMPT]You are Leanstral, a Lean 4 proof assistant. The target mathlib commit is 5e932f97dd25535344f80f9dd8da3aab83df0fe6 (module Mathlib.CategoryTheory.Category.Cat).[/SYSTEM_PROMPT][MODEL_SETTINGS]{"reasoning_effort": "none"}[/MODEL_SETTINGS][INST]Complete the following proof.

```lean
lemma inv_hom_id_toNatTrans {X Y : Cat.{v, u}} {F G : X ⟶ Y} (e : F ≅ G) :
    e.inv.toNatTrans ≫ e.hom.toNatTrans = 𝟙 _
```

Provide a complete Lean proof for the statement above. Do not include the statement in your answer.[/INST]


[System] You are Leanstral, a Lean 4 proof assistant. The target mathlib commit is 5e932f97dd25535344f80f9dd8da3aab83df0fe6 (module Mathlib.CategoryTheory.Shift.Adjunction).

[User]
Complete the following proof.

```lean
lemma compatibilityUnit_iso (a : A) :
    CommShift.CompatibilityUnit adj (iso adj a) (G.commShiftIso a)
```

Provide a complete Lean proof for the statement above. Do not include the statement in your answer.

<s>[SYSTEM_PROMPT]You are Leanstral, a Lean 4 proof assistant. The target mathlib commit is 5e932f97dd25535344f80f9dd8da3aab83df0fe6 (module Mathlib.CategoryTheory.Shift.Adjunction).[/SYSTEM_PROMPT][MODEL_SETTINGS]{"reasoning_effort": "none"}[/MODEL_SETTINGS][INST]Complete the following proof.

```lean
lemma compatibilityUnit_iso (a : A) :
    CommShift.CompatibilityUnit adj (iso adj a) (G.commShiftIso a)
```

Provide a complete Lean proof for the statement above. Do not include the statement in your answer.[/INST]


[System] You are Leanstral, a Lean 4 proof assistant. The target mathlib commit is 5e932f97dd25535344f80f9dd8da3aab83df0fe6 (module Mathlib.CategoryTheory.Localization.Construction).

[User]
Complete the following proof.

```lean
def natTransExtension {F₁ F₂ : W.Localization ⥤ D} (τ : W.Q ⋙ F₁ ⟶ W.Q ⋙ F₂) : F₁ ⟶ F₂ where
  app
```

Provide a complete Lean proof for the statement above. Do not include the statement in your answer.

<s>[SYSTEM_PROMPT]You are Leanstral, a Lean 4 proof assistant. The target mathlib commit is 5e932f97dd25535344f80f9dd8da3aab83df0fe6 (module Mathlib.CategoryTheory.Localization.Construction).[/SYSTEM_PROMPT][MODEL_SETTINGS]{"reasoning_effort": "none"}[/MODEL_SETTINGS][INST]Complete the following proof.

```lean
def natTransExtension {F₁ F₂ : W.Localization ⥤ D} (τ : W.Q ⋙ F₁ ⟶ W.Q ⋙ F₂) : F₁ ⟶ F₂ where
  app
```

Provide a complete Lean proof for the statement above. Do not include the statement in your answer.[/INST]


[System] You are Leanstral, a Lean 4 proof assistant. The target mathlib commit is 5e932f97dd25535344f80f9dd8da3aab83df0fe6 (module Mathlib.CategoryTheory.NatIso).

[User]
Complete the following proof.

```lean
theorem trans_app {F G H : C ⥤ D} (α : F ≅ G) (β : G ≅ H) (X : C) :
    (α ≪≫ β).app X = α.app X ≪≫ β.app X
```

Provide a complete Lean proof for the statement above. Do not include the statement in your answer.

<s>[SYSTEM_PROMPT]You are Leanstral, a Lean 4 proof assistant. The target mathlib commit is 5e932f97dd25535344f80f9dd8da3aab83df0fe6 (module Mathlib.CategoryTheory.NatIso).[/SYSTEM_PROMPT][MODEL_SETTINGS]{"reasoning_effort": "none"}[/MODEL_SETTINGS][INST]Complete the following proof.

```lean
theorem trans_app {F G H : C ⥤ D} (α : F ≅ G) (β : G ≅ H) (X : C) :
    (α ≪≫ β).app X = α.app X ≪≫ β.app X
```

Provide a complete Lean proof for the statement above. Do not include the statement in your answer.[/INST]


[System] You are Leanstral, a Lean 4 proof assistant. The target mathlib commit is 5e932f97dd25535344f80f9dd8da3aab83df0fe6 (module Mathlib.MeasureTheory.Measure.Count).

[User]
Complete the following proof.

```lean
theorem count_apply_eq_top' (s_mble : MeasurableSet s) : count s = ∞ ↔ s.Infinite
```

Provide a complete Lean proof for the statement above. Do not include the statement in your answer.

<s>[SYSTEM_PROMPT]You are Leanstral, a Lean 4 proof assistant. The target mathlib commit is 5e932f97dd25535344f80f9dd8da3aab83df0fe6 (module Mathlib.MeasureTheory.Measure.Count).[/SYSTEM_PROMPT][MODEL_SETTINGS]{"reasoning_effort": "none"}[/MODEL_SETTINGS][INST]Complete the following proof.

```lean
theorem count_apply_eq_top' (s_mble : MeasurableSet s) : count s = ∞ ↔ s.Infinite
```

Provide a complete Lean proof for the statement above. Do not include the statement in your answer.[/INST]


[System] You are Leanstral, a Lean 4 proof assistant. The target mathlib commit is 5e932f97dd25535344f80f9dd8da3aab83df0fe6 (module Mathlib.Probability.Independence.Integration).

[User]
Complete the following proof.

```lean
theorem IndepFun.integrable_right_of_integrable_mul {β : Type*} [MeasurableSpace β] {X Y : Ω → β}
    [NormedDivisionRing β] [OpensMeasurableSpace β]
    (hXY : X ⟂ᵢ[μ] Y) (h'XY : Integrable (X * Y) μ)
    (hX : AEStronglyMeasurable X μ) (hY : AEStronglyMeasurable Y μ) (h'X : ¬X =ᵐ[μ] 0) :
    Integrable Y μ
```

Provide a complete Lean proof for the statement above. Do not include the statement in your answer.

<s>[SYSTEM_PROMPT]You are Leanstral, a Lean 4 proof assistant. The target mathlib commit is 5e932f97dd25535344f80f9dd8da3aab83df0fe6 (module Mathlib.Probability.Independence.Integration).[/SYSTEM_PROMPT][MODEL_SETTINGS]{"reasoning_effort": "none"}[/MODEL_SETTINGS][INST]Complete the following proof.

```lean
theorem IndepFun.integrable_right_of_integrable_mul {β : Type*} [MeasurableSpace β] {X Y : Ω → β}
    [NormedDivisionRing β] [OpensMeasurableSpace β]
    (hXY : X ⟂ᵢ[μ] Y) (h'XY : Integrable (X * Y) μ)
    (hX : AEStronglyMeasurable X μ) (hY : AEStronglyMeasurable Y μ) (h'X : ¬X =ᵐ[μ] 0) :
    Integrable Y μ
```

Provide a complete Lean proof for the statement above. Do not include the statement in your answer.[/INST]


[System] You are Leanstral, a Lean 4 proof assistant. The target mathlib commit is 5e932f97dd25535344f80f9dd8da3aab83df0fe6 (module Mathlib.CategoryTheory.Abelian.RightDerived).

[User]
Complete the following proof.

```lean
lemma toRightDerivedZero'_naturality {C} [Category* C] [Abelian C] {X Y : C} (f : X ⟶ Y)
    (P : InjectiveResolution X) (Q : InjectiveResolution Y)
    (φ : P.cocomplex ⟶ Q.cocomplex) (comm : P.ι.f 0 ≫ φ.f 0 = f ≫ Q.ι.f 0)
    (F : C ⥤ D) [F.Additive] :
    F.map f ≫ Q.toRightDerivedZero' F =
      P.toRightDerivedZero' F ≫
        HomologicalComplex.cyclesMap ((F.mapHomologicalComplex _).map φ) 0
```

Provide a complete Lean proof for the statement above. Do not include the statement in your answer.

<s>[SYSTEM_PROMPT]You are Leanstral, a Lean 4 proof assistant. The target mathlib commit is 5e932f97dd25535344f80f9dd8da3aab83df0fe6 (module Mathlib.CategoryTheory.Abelian.RightDerived).[/SYSTEM_PROMPT][MODEL_SETTINGS]{"reasoning_effort": "none"}[/MODEL_SETTINGS][INST]Complete the following proof.

```lean
lemma toRightDerivedZero'_naturality {C} [Category* C] [Abelian C] {X Y : C} (f : X ⟶ Y)
    (P : InjectiveResolution X) (Q : InjectiveResolution Y)
    (φ : P.cocomplex ⟶ Q.cocomplex) (comm : P.ι.f 0 ≫ φ.f 0 = f ≫ Q.ι.f 0)
    (F : C ⥤ D) [F.Additive] :
    F.map f ≫ Q.toRightDerivedZero' F =
      P.toRightDerivedZero' F ≫
        HomologicalComplex.cyclesMap ((F.mapHomologicalComplex _).map φ) 0
```

Provide a complete Lean proof for the statement above. Do not include the statement in your answer.[/INST]


[System] You are Leanstral, a Lean 4 proof assistant. The target mathlib commit is 5e932f97dd25535344f80f9dd8da3aab83df0fe6 (module Mathlib.Geometry.Manifold.MFDeriv.Defs).

[User]
Complete the following proof.

```lean
def mfderiv (f : M → M') (x : M) : TangentSpace I x →L[𝕜] TangentSpace I' (f x)
```

Provide a complete Lean proof for the statement above. Do not include the statement in your answer.

<s>[SYSTEM_PROMPT]You are Leanstral, a Lean 4 proof assistant. The target mathlib commit is 5e932f97dd25535344f80f9dd8da3aab83df0fe6 (module Mathlib.Geometry.Manifold.MFDeriv.Defs).[/SYSTEM_PROMPT][MODEL_SETTINGS]{"reasoning_effort": "none"}[/MODEL_SETTINGS][INST]Complete the following proof.

```lean
def mfderiv (f : M → M') (x : M) : TangentSpace I x →L[𝕜] TangentSpace I' (f x)
```

Provide a complete Lean proof for the statement above. Do not include the statement in your answer.[/INST]


[System] You are Leanstral, a Lean 4 proof assistant. The target mathlib commit is 5e932f97dd25535344f80f9dd8da3aab83df0fe6 (module Mathlib.CategoryTheory.Elements).

[User]
Complete the following proof.

```lean
lemma Functor.Elements.ext {F : C ⥤ Type w} (x y : F.Elements) (h₁ : x.fst = y.fst)
    (h₂ : F.map (eqToHom h₁) x.snd = y.snd) : x = y
```

Provide a complete Lean proof for the statement above. Do not include the statement in your answer.

<s>[SYSTEM_PROMPT]You are Leanstral, a Lean 4 proof assistant. The target mathlib commit is 5e932f97dd25535344f80f9dd8da3aab83df0fe6 (module Mathlib.CategoryTheory.Elements).[/SYSTEM_PROMPT][MODEL_SETTINGS]{"reasoning_effort": "none"}[/MODEL_SETTINGS][INST]Complete the following proof.

```lean
lemma Functor.Elements.ext {F : C ⥤ Type w} (x y : F.Elements) (h₁ : x.fst = y.fst)
    (h₂ : F.map (eqToHom h₁) x.snd = y.snd) : x = y
```

Provide a complete Lean proof for the statement above. Do not include the statement in your answer.[/INST]


[System] You are Leanstral, a Lean 4 proof assistant. The target mathlib commit is 5e932f97dd25535344f80f9dd8da3aab83df0fe6 (module Mathlib.MeasureTheory.Measure.Typeclasses.NoAtoms).

[User]
Complete the following proof.

```lean
theorem restrict_Ioo_eq_restrict_Icc : μ.restrict (Ioo a b) = μ.restrict (Icc a b)
```

Provide a complete Lean proof for the statement above. Do not include the statement in your answer.

<s>[SYSTEM_PROMPT]You are Leanstral, a Lean 4 proof assistant. The target mathlib commit is 5e932f97dd25535344f80f9dd8da3aab83df0fe6 (module Mathlib.MeasureTheory.Measure.Typeclasses.NoAtoms).[/SYSTEM_PROMPT][MODEL_SETTINGS]{"reasoning_effort": "none"}[/MODEL_SETTINGS][INST]Complete the following proof.

```lean
theorem restrict_Ioo_eq_restrict_Icc : μ.restrict (Ioo a b) = μ.restrict (Icc a b)
```

Provide a complete Lean proof for the statement above. Do not include the statement in your answer.[/INST]


[System] You are Leanstral, a Lean 4 proof assistant. The target mathlib commit is 5e932f97dd25535344f80f9dd8da3aab83df0fe6 (module Mathlib.MeasureTheory.MeasurableSpace.CountablyGenerated).

[User]
Complete the following proof.

```lean
lemma measurableSet_generateFrom_countablePartition_iff (n : ℕ) (s : Set α) :
    MeasurableSet[generateFrom (countablePartition α n)] s
      ↔ ∃ S : Finset (Set α), ↑S ⊆ countablePartition α n ∧ s = ⋃₀ S
```

Provide a complete Lean proof for the statement above. Do not include the statement in your answer.

<s>[SYSTEM_PROMPT]You are Leanstral, a Lean 4 proof assistant. The target mathlib commit is 5e932f97dd25535344f80f9dd8da3aab83df0fe6 (module Mathlib.MeasureTheory.MeasurableSpace.CountablyGenerated).[/SYSTEM_PROMPT][MODEL_SETTINGS]{"reasoning_effort": "none"}[/MODEL_SETTINGS][INST]Complete the following proof.

```lean
lemma measurableSet_generateFrom_countablePartition_iff (n : ℕ) (s : Set α) :
    MeasurableSet[generateFrom (countablePartition α n)] s
      ↔ ∃ S : Finset (Set α), ↑S ⊆ countablePartition α n ∧ s = ⋃₀ S
```

Provide a complete Lean proof for the statement above. Do not include the statement in your answer.[/INST]


[System] You are Leanstral, a Lean 4 proof assistant. The target mathlib commit is 5e932f97dd25535344f80f9dd8da3aab83df0fe6 (module Mathlib.MeasureTheory.Function.LpSeminorm.Basic).

[User]
Complete the following proof.

```lean
theorem eLpNorm_le_add_measure_right (f : α → ε) (μ ν : Measure α) {p : ℝ≥0∞} :
    eLpNorm f p μ ≤ eLpNorm f p (μ + ν)
```

Provide a complete Lean proof for the statement above. Do not include the statement in your answer.

<s>[SYSTEM_PROMPT]You are Leanstral, a Lean 4 proof assistant. The target mathlib commit is 5e932f97dd25535344f80f9dd8da3aab83df0fe6 (module Mathlib.MeasureTheory.Function.LpSeminorm.Basic).[/SYSTEM_PROMPT][MODEL_SETTINGS]{"reasoning_effort": "none"}[/MODEL_SETTINGS][INST]Complete the following proof.

```lean
theorem eLpNorm_le_add_measure_right (f : α → ε) (μ ν : Measure α) {p : ℝ≥0∞} :
    eLpNorm f p μ ≤ eLpNorm f p (μ + ν)
```

Provide a complete Lean proof for the statement above. Do not include the statement in your answer.[/INST]


[System] You are Leanstral, a Lean 4 proof assistant. The target mathlib commit is 5e932f97dd25535344f80f9dd8da3aab83df0fe6 (module Mathlib.MeasureTheory.Measure.TightNormed).

[User]
Complete the following proof.

```lean
lemma isTightMeasureSet_of_inner_tendsto
    (h : ∀ y, Tendsto (fun r : ℝ ↦ ⨆ μ ∈ S, μ {x | r < ‖⟪y, x⟫_𝕜‖}) atTop (𝓝 0)) :
    IsTightMeasureSet S
```

Provide a complete Lean proof for the statement above. Do not include the statement in your answer.

<s>[SYSTEM_PROMPT]You are Leanstral, a Lean 4 proof assistant. The target mathlib commit is 5e932f97dd25535344f80f9dd8da3aab83df0fe6 (module Mathlib.MeasureTheory.Measure.TightNormed).[/SYSTEM_PROMPT][MODEL_SETTINGS]{"reasoning_effort": "none"}[/MODEL_SETTINGS][INST]Complete the following proof.

```lean
lemma isTightMeasureSet_of_inner_tendsto
    (h : ∀ y, Tendsto (fun r : ℝ ↦ ⨆ μ ∈ S, μ {x | r < ‖⟪y, x⟫_𝕜‖}) atTop (𝓝 0)) :
    IsTightMeasureSet S
```

Provide a complete Lean proof for the statement above. Do not include the statement in your answer.[/INST]


[System] You are Leanstral, a Lean 4 proof assistant. The target mathlib commit is 5e932f97dd25535344f80f9dd8da3aab83df0fe6 (module Mathlib.Geometry.Manifold.VectorField.LieBracket).

[User]
Complete the following proof.

```lean
lemma mpullback_mlieBracket
    {f : M → M'} {V W : Π (x : M'), TangentSpace I' x} {x₀ : M}
    (hV : MDiffAt (T% V) (f x₀)) (hW : MDiffAt (T% W) (f x₀))
    (hf : CMDiffAt n f x₀) (hn : minSmoothness 𝕜 2 ≤ n) :
    mpullback I I' f (mlieBracket I' V W) x₀ =
      mlieBracket I (mpullback I I' f V) (mpullback I I' f W) x₀
```

Provide a complete Lean proof for the statement above. Do not include the statement in your answer.

<s>[SYSTEM_PROMPT]You are Leanstral, a Lean 4 proof assistant. The target mathlib commit is 5e932f97dd25535344f80f9dd8da3aab83df0fe6 (module Mathlib.Geometry.Manifold.VectorField.LieBracket).[/SYSTEM_PROMPT][MODEL_SETTINGS]{"reasoning_effort": "none"}[/MODEL_SETTINGS][INST]Complete the following proof.

```lean
lemma mpullback_mlieBracket
    {f : M → M'} {V W : Π (x : M'), TangentSpace I' x} {x₀ : M}
    (hV : MDiffAt (T% V) (f x₀)) (hW : MDiffAt (T% W) (f x₀))
    (hf : CMDiffAt n f x₀) (hn : minSmoothness 𝕜 2 ≤ n) :
    mpullback I I' f (mlieBracket I' V W) x₀ =
      mlieBracket I (mpullback I I' f V) (mpullback I I' f W) x₀
```

Provide a complete Lean proof for the statement above. Do not include the statement in your answer.[/INST]


[System] You are Leanstral, a Lean 4 proof assistant. The target mathlib commit is 5e932f97dd25535344f80f9dd8da3aab83df0fe6 (module Mathlib.CategoryTheory.Limits.Shapes.BinaryBiproducts).

[User]
Complete the following proof.

```lean
theorem biprod.inl_map {W X Y Z : C} [HasBinaryBiproduct W X] [HasBinaryBiproduct Y Z] (f : W ⟶ Y)
    (g : X ⟶ Z) : biprod.inl ≫ biprod.map f g = f ≫ biprod.inl
```

Provide a complete Lean proof for the statement above. Do not include the statement in your answer.

<s>[SYSTEM_PROMPT]You are Leanstral, a Lean 4 proof assistant. The target mathlib commit is 5e932f97dd25535344f80f9dd8da3aab83df0fe6 (module Mathlib.CategoryTheory.Limits.Shapes.BinaryBiproducts).[/SYSTEM_PROMPT][MODEL_SETTINGS]{"reasoning_effort": "none"}[/MODEL_SETTINGS][INST]Complete the following proof.

```lean
theorem biprod.inl_map {W X Y Z : C} [HasBinaryBiproduct W X] [HasBinaryBiproduct Y Z] (f : W ⟶ Y)
    (g : X ⟶ Z) : biprod.inl ≫ biprod.map f g = f ≫ biprod.inl
```

Provide a complete Lean proof for the statement above. Do not include the statement in your answer.[/INST]


[System] You are Leanstral, a Lean 4 proof assistant. The target mathlib commit is 5e932f97dd25535344f80f9dd8da3aab83df0fe6 (module Mathlib.MeasureTheory.SetSemiring).

[User]
Complete the following proof.

```lean
lemma pairwiseDisjoint_disjointOfUnion (hC : IsSetSemiring C) (hJ : ↑J ⊆ C) :
    PairwiseDisjoint J (hC.disjointOfUnion hJ)
```

Provide a complete Lean proof for the statement above. Do not include the statement in your answer.

<s>[SYSTEM_PROMPT]You are Leanstral, a Lean 4 proof assistant. The target mathlib commit is 5e932f97dd25535344f80f9dd8da3aab83df0fe6 (module Mathlib.MeasureTheory.SetSemiring).[/SYSTEM_PROMPT][MODEL_SETTINGS]{"reasoning_effort": "none"}[/MODEL_SETTINGS][INST]Complete the following proof.

```lean
lemma pairwiseDisjoint_disjointOfUnion (hC : IsSetSemiring C) (hJ : ↑J ⊆ C) :
    PairwiseDisjoint J (hC.disjointOfUnion hJ)
```

Provide a complete Lean proof for the statement above. Do not include the statement in your answer.[/INST]


[System] You are Leanstral, a Lean 4 proof assistant. The target mathlib commit is 5e932f97dd25535344f80f9dd8da3aab83df0fe6 (module Mathlib.Geometry.RingedSpace.PresheafedSpace.Gluing).

[User]
Complete the following proof.

```lean
theorem f_invApp_f_app (i j k : D.J) (U : Opens (D.V (i, j)).carrier) :
    (D.f_open i j).invApp _ U ≫ (D.f i k).c.app _ =
      (π₁ i, j, k).c.app (op U) ≫
        (π₂⁻¹ i, j, k) (unop _) ≫
          (D.V _).presheaf.map
            (eqToHom
              (by
                delta IsOpenImmersion.opensFunctor IsOpenEmbedding.functor
                dsimp only [Functor.op, IsOpenMap.functor, Opens.map, unop_op]
                congr
                apply pullback_base))
```

Provide a complete Lean proof for the statement above. Do not include the statement in your answer.

<s>[SYSTEM_PROMPT]You are Leanstral, a Lean 4 proof assistant. The target mathlib commit is 5e932f97dd25535344f80f9dd8da3aab83df0fe6 (module Mathlib.Geometry.RingedSpace.PresheafedSpace.Gluing).[/SYSTEM_PROMPT][MODEL_SETTINGS]{"reasoning_effort": "none"}[/MODEL_SETTINGS][INST]Complete the following proof.

```lean
theorem f_invApp_f_app (i j k : D.J) (U : Opens (D.V (i, j)).carrier) :
    (D.f_open i j).invApp _ U ≫ (D.f i k).c.app _ =
      (π₁ i, j, k).c.app (op U) ≫
        (π₂⁻¹ i, j, k) (unop _) ≫
          (D.V _).presheaf.map
            (eqToHom
              (by
                delta IsOpenImmersion.opensFunctor IsOpenEmbedding.functor
                dsimp only [Functor.op, IsOpenMap.functor, Opens.map, unop_op]
                congr
                apply pullback_base))
```

Provide a complete Lean proof for the statement above. Do not include the statement in your answer.[/INST]


[System] You are Leanstral, a Lean 4 proof assistant. The target mathlib commit is 5e932f97dd25535344f80f9dd8da3aab83df0fe6 (module Mathlib.CategoryTheory.Limits.Shapes.Pullback.Assoc).

[User]
Complete the following proof.

```lean
def pullbackAssocIsPullback [HasPullback (g₂ ≫ f₃) f₄] :
    IsLimit
      (PullbackCone.mk (l₁ ≫ g₁) l₂
        (show (l₁ ≫ g₁) ≫ f₁ = l₂ ≫ g₃ ≫ f₂ by
          rw [pullback.lift_fst_assoc, Category.assoc, Category.assoc, pullback.condition]))
```

Provide a complete Lean proof for the statement above. Do not include the statement in your answer.

<s>[SYSTEM_PROMPT]You are Leanstral, a Lean 4 proof assistant. The target mathlib commit is 5e932f97dd25535344f80f9dd8da3aab83df0fe6 (module Mathlib.CategoryTheory.Limits.Shapes.Pullback.Assoc).[/SYSTEM_PROMPT][MODEL_SETTINGS]{"reasoning_effort": "none"}[/MODEL_SETTINGS][INST]Complete the following proof.

```lean
def pullbackAssocIsPullback [HasPullback (g₂ ≫ f₃) f₄] :
    IsLimit
      (PullbackCone.mk (l₁ ≫ g₁) l₂
        (show (l₁ ≫ g₁) ≫ f₁ = l₂ ≫ g₃ ≫ f₂ by
          rw [pullback.lift_fst_assoc, Category.assoc, Category.assoc, pullback.condition]))
```

Provide a complete Lean proof for the statement above. Do not include the statement in your answer.[/INST]


[System] You are Leanstral, a Lean 4 proof assistant. Complete the task below using the provided Lean source context. The target mathlib commit is 5e932f97dd25535344f80f9dd8da3aab83df0fe6 (module Mathlib.Geometry.Manifold.VectorBundle.MDifferentiable).

[User]
Prove the following theorem. The retrieved context below may help.

```lean
theorem mdifferentiableAt_coordChangeL {x : B}
    (h : x ∈ e.baseSet) (h' : x ∈ e'.baseSet) :
    MDiffAt (fun b : B ↦ (e.coordChangeL 𝕜 e' b : F →L[𝕜] F)) x
```

## Retrieved context
-- snippet 1
```lean
-- Mathlib.Geometry.Manifold.VectorBundle.MDifferentiable.mdifferentiableWithinAt_totalSpace (L42-L63)
theorem mdifferentiableWithinAt_totalSpace (f : M → TotalSpace F E) {s : Set M} {x₀ : M} :
    MDifferentiableWithinAt IM (IB.prod 𝓘(𝕜, F)) f s x₀ ↔
      MDiffAt[s] (fun x => (f x).proj) x₀ ∧
      MDiffAt[s] (fun x ↦ (trivializationAt F E (f x₀).proj (f x)).2) x₀
```

-- snippet 2
```lean
-- Mathlib.Geometry.Manifold.VectorBundle.MDifferentiable.mdifferentiableAt_totalSpace (L64-L71)
theorem mdifferentiableAt_totalSpace (f : M → TotalSpace F E) {x₀ : M} :
    MDifferentiableAt IM (IB.prod 𝓘(𝕜, F)) f x₀ ↔
      MDiffAt (fun x => (f x).proj) x₀ ∧
      MDiffAt (fun x ↦ (trivializationAt F E (f x₀).proj (f x)).2) x₀
```

-- snippet 3
```lean
-- Mathlib.Geometry.Manifold.VectorBundle.MDifferentiable.mdifferentiableWithinAt_section (L72-L80)
theorem mdifferentiableWithinAt_section (s : Π b, E b) {u : Set B} {b₀ : B} :
    MDifferentiableWithinAt IB (IB.prod 𝓘(𝕜, F)) (T% s) u b₀ ↔
      MDiffAt[u] (fun b ↦ (trivializationAt F E b₀ (s b)).2) b₀
```

-- snippet 4
```lean
-- Mathlib.Geometry.Manifold.VectorBundle.MDifferentiable.mdifferentiableAt_section (L81-L88)
theorem mdifferentiableAt_section (s : Π b, E b) {b₀ : B} :
    MDiffAt (T% s) b₀ ↔ MDiffAt (fun b ↦ (trivializationAt F E b₀ (s b)).2) b₀
```

-- snippet 5
```lean
-- Mathlib.Geometry.Manifold.VectorBundle.MDifferentiable.mdifferentiable_proj (L89-L93)
theorem mdifferentiable_proj : MDifferentiable (IB.prod 𝓘(𝕜, F)) IB (π F E)
```

-- snippet 6
```lean
-- Mathlib.Geometry.Manifold.VectorBundle.MDifferentiable.mdifferentiableOn_proj (L94-L97)
theorem mdifferentiableOn_proj {s : Set (TotalSpace F E)} :
    MDifferentiableOn (IB.prod 𝓘(𝕜, F)) IB (π F E) s
```

-- snippet 7
```lean
-- Mathlib.Geometry.Manifold.VectorBundle.MDifferentiable.mdifferentiableAt_proj (L98-L101)
theorem mdifferentiableAt_proj {p : TotalSpace F E} :
    MDifferentiableAt (IB.prod 𝓘(𝕜, F)) IB (π F E) p
```

-- snippet 8
```lean
-- Mathlib.Geometry.Manifold.VectorBundle.MDifferentiable.mdifferentiableWithinAt_proj (L102-L108)
theorem mdifferentiableWithinAt_proj {s : Set (TotalSpace F E)} {p : TotalSpace F E} :
    MDifferentiableWithinAt (IB.prod 𝓘(𝕜, F)) IB (π F E) s p
```

-- snippet 9
```lean
-- Mathlib.Geometry.Manifold.Algebra.LeftInvariantDerivation.ext (L83-L86)
theorem ext (h : ∀ f, X f = Y f) : X = Y
```

-- snippet 10
```lean
-- Mathlib.Geometry.Manifold.Algebra.LeftInvariantDerivation.toDerivation_injective (L61-L64)
theorem toDerivation_injective :
    Function.Injective (toDerivation : LeftInvariantDerivation I G → _)
```

-- snippet 11
```lean
-- Mathlib.Geometry.Manifold.Algebra.LeftInvariantDerivation.coe_derivation (L87-L91)
theorem coe_derivation :
    ⇑(X : Derivation 𝕜 C^∞⟮I, G; 𝕜⟯ C^∞⟮I, G; 𝕜⟯) = (X : C^∞⟮I, G; 𝕜⟯ → C^∞⟮I, G; 𝕜⟯)
```

-- snippet 12
```lean
-- Mathlib.Geometry.Manifold.Algebra.LeftInvariantDerivation.left_invariant' (L92-L105)
theorem left_invariant' :
    𝒅ₕ (smoothLeftMul_one I g) (Derivation.evalAt (1 : G) ↑X) = Derivation.evalAt g ↑X
```

-- snippet 13
```lean
-- Mathlib.Geometry.Manifold.Algebra.LeftInvariantDerivation.toFun_eq_coe (L75-L77)
theorem toFun_eq_coe : X.toFun = ⇑X
```

-- snippet 14
```lean
-- Mathlib.Geometry.Manifold.Algebra.LeftInvariantDerivation.coe_injective (L78-L81)
theorem coe_injective :
    @Function.Injective (LeftInvariantDerivation I G) (_ → C^∞⟮I, G; 𝕜⟯) DFunLike.coe
```

<s>[SYSTEM_PROMPT]You are Leanstral, a Lean 4 proof assistant. Complete the task below using the provided Lean source context. The target mathlib commit is 5e932f97dd25535344f80f9dd8da3aab83df0fe6 (module Mathlib.Geometry.Manifold.VectorBundle.MDifferentiable).[/SYSTEM_PROMPT][MODEL_SETTINGS]{"reasoning_effort": "none"}[/MODEL_SETTINGS][INST]Prove the following theorem. The retrieved context below may help.

```lean
theorem mdifferentiableAt_coordChangeL {x : B}
    (h : x ∈ e.baseSet) (h' : x ∈ e'.baseSet) :
    MDiffAt (fun b : B ↦ (e.coordChangeL 𝕜 e' b : F →L[𝕜] F)) x
```

## Retrieved context
-- snippet 1
```lean
-- Mathlib.Geometry.Manifold.VectorBundle.MDifferentiable.mdifferentiableWithinAt_totalSpace (L42-L63)
theorem mdifferentiableWithinAt_totalSpace (f : M → TotalSpace F E) {s : Set M} {x₀ : M} :
    MDifferentiableWithinAt IM (IB.prod 𝓘(𝕜, F)) f s x₀ ↔
      MDiffAt[s] (fun x => (f x).proj) x₀ ∧
      MDiffAt[s] (fun x ↦ (trivializationAt F E (f x₀).proj (f x)).2) x₀
```

-- snippet 2
```lean
-- Mathlib.Geometry.Manifold.VectorBundle.MDifferentiable.mdifferentiableAt_totalSpace (L64-L71)
theorem mdifferentiableAt_totalSpace (f : M → TotalSpace F E) {x₀ : M} :
    MDifferentiableAt IM (IB.prod 𝓘(𝕜, F)) f x₀ ↔
      MDiffAt (fun x => (f x).proj) x₀ ∧
      MDiffAt (fun x ↦ (trivializationAt F E (f x₀).proj (f x)).2) x₀
```

-- snippet 3
```lean
-- Mathlib.Geometry.Manifold.VectorBundle.MDifferentiable.mdifferentiableWithinAt_section (L72-L80)
theorem mdifferentiableWithinAt_section (s : Π b, E b) {u : Set B} {b₀ : B} :
    MDifferentiableWithinAt IB (IB.prod 𝓘(𝕜, F)) (T% s) u b₀ ↔
      MDiffAt[u] (fun b ↦ (trivializationAt F E b₀ (s b)).2) b₀
```

-- snippet 4
```lean
-- Mathlib.Geometry.Manifold.VectorBundle.MDifferentiable.mdifferentiableAt_section (L81-L88)
theorem mdifferentiableAt_section (s : Π b, E b) {b₀ : B} :
    MDiffAt (T% s) b₀ ↔ MDiffAt (fun b ↦ (trivializationAt F E b₀ (s b)).2) b₀
```

-- snippet 5
```lean
-- Mathlib.Geometry.Manifold.VectorBundle.MDifferentiable.mdifferentiable_proj (L89-L93)
theorem mdifferentiable_proj : MDifferentiable (IB.prod 𝓘(𝕜, F)) IB (π F E)
```

-- snippet 6
```lean
-- Mathlib.Geometry.Manifold.VectorBundle.MDifferentiable.mdifferentiableOn_proj (L94-L97)
theorem mdifferentiableOn_proj {s : Set (TotalSpace F E)} :
    MDifferentiableOn (IB.prod 𝓘(𝕜, F)) IB (π F E) s
```

-- snippet 7
```lean
-- Mathlib.Geometry.Manifold.VectorBundle.MDifferentiable.mdifferentiableAt_proj (L98-L101)
theorem mdifferentiableAt_proj {p : TotalSpace F E} :
    MDifferentiableAt (IB.prod 𝓘(𝕜, F)) IB (π F E) p
```

-- snippet 8
```lean
-- Mathlib.Geometry.Manifold.VectorBundle.MDifferentiable.mdifferentiableWithinAt_proj (L102-L108)
theorem mdifferentiableWithinAt_proj {s : Set (TotalSpace F E)} {p : TotalSpace F E} :
    MDifferentiableWithinAt (IB.prod 𝓘(𝕜, F)) IB (π F E) s p
```

-- snippet 9
```lean
-- Mathlib.Geometry.Manifold.Algebra.LeftInvariantDerivation.ext (L83-L86)
theorem ext (h : ∀ f, X f = Y f) : X = Y
```

-- snippet 10
```lean
-- Mathlib.Geometry.Manifold.Algebra.LeftInvariantDerivation.toDerivation_injective (L61-L64)
theorem toDerivation_injective :
    Function.Injective (toDerivation : LeftInvariantDerivation I G → _)
```

-- snippet 11
```lean
-- Mathlib.Geometry.Manifold.Algebra.LeftInvariantDerivation.coe_derivation (L87-L91)
theorem coe_derivation :
    ⇑(X : Derivation 𝕜 C^∞⟮I, G; 𝕜⟯ C^∞⟮I, G; 𝕜⟯) = (X : C^∞⟮I, G; 𝕜⟯ → C^∞⟮I, G; 𝕜⟯)
```

-- snippet 12
```lean
-- Mathlib.Geometry.Manifold.Algebra.LeftInvariantDerivation.left_invariant' (L92-L105)
theorem left_invariant' :
    𝒅ₕ (smoothLeftMul_one I g) (Derivation.evalAt (1 : G) ↑X) = Derivation.evalAt g ↑X
```

-- snippet 13
```lean
-- Mathlib.Geometry.Manifold.Algebra.LeftInvariantDerivation.toFun_eq_coe (L75-L77)
theorem toFun_eq_coe : X.toFun = ⇑X
```

-- snippet 14
```lean
-- Mathlib.Geometry.Manifold.Algebra.LeftInvariantDerivation.coe_injective (L78-L81)
theorem coe_injective :
    @Function.Injective (LeftInvariantDerivation I G) (_ → C^∞⟮I, G; 𝕜⟯) DFunLike.coe
```
[/INST]


[System] You are Leanstral, a Lean 4 proof assistant. Complete the task below using the provided Lean source context. The target mathlib commit is 5e932f97dd25535344f80f9dd8da3aab83df0fe6 (module Mathlib.CategoryTheory.Sites.Sieves).

[User]
Prove the following theorem. The retrieved context below may help.

```lean
lemma BindStruct.bind {S : Presieve X} {R : ∀ ⦃Y⦄ ⦃f : Y ⟶ X⦄, S f → Presieve Y}
    {Z : C} {h : Z ⟶ X} (b : BindStruct S R h) : bind S R h
```

## Retrieved context
-- snippet 1
```lean
-- Mathlib.CategoryTheory.Sites.Sieves.Presieve (L41-L44)
def Presieve (X : C)
```

-- snippet 2
```lean
-- Mathlib.CategoryTheory.Sites.Sieves.top_apply (L46-L48)
lemma top_apply (f : Y ⟶ X) : (⊤ : Presieve X) f
```

-- snippet 3
```lean
-- Mathlib.CategoryTheory.Sites.Sieves.bot_apply (L50-L56)
lemma bot_apply (f : Y ⟶ X) : (⊥ : Presieve X) f ↔ False
```

-- snippet 4
```lean
-- Mathlib.CategoryTheory.Sites.Sieves.category (L57-L60)
abbrev category {X : C} (P : Presieve X)
```

-- snippet 5
```lean
-- Mathlib.CategoryTheory.Sites.Sieves.categoryMk (L61-L66)
abbrev categoryMk {X : C} (P : Presieve X) {Y : C} (f : Y ⟶ X) (hf : P f) : P.category
```

-- snippet 6
```lean
-- Mathlib.CategoryTheory.Sites.Sieves.diagram (L67-L71)
abbrev diagram (S : Presieve X) : S.category ⥤ C
```

-- snippet 7
```lean
-- Mathlib.CategoryTheory.Sites.Sieves.cocone (L72-L78)
abbrev cocone (S : Presieve X) : Cocone S.diagram
```

-- snippet 8
```lean
-- Mathlib.CategoryTheory.Sites.Sieves.bind (L79-L95)
def bind (S : Presieve X) (R : ∀ ⦃Y⦄ ⦃f : Y ⟶ X⦄, S f → Presieve Y) : Presieve X
```

-- snippet 9
```lean
-- Mathlib.CategoryTheory.Sites.Abelian.presheafToSheaf_additive (L46-L51)
instance presheafToSheaf_additive : (presheafToSheaf J D).Additive
```

-- snippet 10
```lean
-- Mathlib.CategoryTheory.Sites.Adjunction.adjunction_counit_app_hom (L68-L74)
lemma adjunction_counit_app_hom [HasWeakSheafify J D] [HasSheafCompose J F] (adj : G ⊣ F)
    (Y : Sheaf J D) : ((adjunction J adj).counit.app Y).hom =
      sheafifyLift J (((adj.whiskerRight Cᵒᵖ).counit.app Y.obj)) Y.property
```

-- snippet 11
```lean
-- Mathlib.CategoryTheory.Sites.Adjunction.sheafForget (L35-L46)
abbrev sheafForget {FD : D → D → Type*} {CD : D → Type*}
    [∀ X Y, FunLike (FD X Y) (CD X) (CD Y)] [ConcreteCategory D FD]
    [HasSheafCompose J (forget D)] : Sheaf J D ⥤ Sheaf J (Type _)
```

-- snippet 12
```lean
-- Mathlib.CategoryTheory.Sites.Adjunction.adjunction_unit_app_hom (L54-L63)
lemma adjunction_unit_app_hom [HasWeakSheafify J D] [HasSheafCompose J F] (adj : G ⊣ F)
    (X : Sheaf J E) : ((adjunction J adj).unit.app X).hom =
      (adj.whiskerRight Cᵒᵖ).unit.app _ ≫ whiskerRight (toSheafify J (X.obj ⋙ G)) F
```

-- snippet 13
```lean
-- Mathlib.CategoryTheory.Sites.Abelian.sheafIsAbelian (L40-L43)
instance sheafIsAbelian : Abelian (Sheaf J D)
```

-- snippet 14
```lean
-- Mathlib.CategoryTheory.Sites.Adjunction.adjunction (L47-L52)
def adjunction [HasWeakSheafify J D] [HasSheafCompose J F] (adj : G ⊣ F) :
    composeAndSheafify J G ⊣ sheafCompose J F
```

<s>[SYSTEM_PROMPT]You are Leanstral, a Lean 4 proof assistant. Complete the task below using the provided Lean source context. The target mathlib commit is 5e932f97dd25535344f80f9dd8da3aab83df0fe6 (module Mathlib.CategoryTheory.Sites.Sieves).[/SYSTEM_PROMPT][MODEL_SETTINGS]{"reasoning_effort": "none"}[/MODEL_SETTINGS][INST]Prove the following theorem. The retrieved context below may help.

```lean
lemma BindStruct.bind {S : Presieve X} {R : ∀ ⦃Y⦄ ⦃f : Y ⟶ X⦄, S f → Presieve Y}
    {Z : C} {h : Z ⟶ X} (b : BindStruct S R h) : bind S R h
```

## Retrieved context
-- snippet 1
```lean
-- Mathlib.CategoryTheory.Sites.Sieves.Presieve (L41-L44)
def Presieve (X : C)
```

-- snippet 2
```lean
-- Mathlib.CategoryTheory.Sites.Sieves.top_apply (L46-L48)
lemma top_apply (f : Y ⟶ X) : (⊤ : Presieve X) f
```

-- snippet 3
```lean
-- Mathlib.CategoryTheory.Sites.Sieves.bot_apply (L50-L56)
lemma bot_apply (f : Y ⟶ X) : (⊥ : Presieve X) f ↔ False
```

-- snippet 4
```lean
-- Mathlib.CategoryTheory.Sites.Sieves.category (L57-L60)
abbrev category {X : C} (P : Presieve X)
```

-- snippet 5
```lean
-- Mathlib.CategoryTheory.Sites.Sieves.categoryMk (L61-L66)
abbrev categoryMk {X : C} (P : Presieve X) {Y : C} (f : Y ⟶ X) (hf : P f) : P.category
```

-- snippet 6
```lean
-- Mathlib.CategoryTheory.Sites.Sieves.diagram (L67-L71)
abbrev diagram (S : Presieve X) : S.category ⥤ C
```

-- snippet 7
```lean
-- Mathlib.CategoryTheory.Sites.Sieves.cocone (L72-L78)
abbrev cocone (S : Presieve X) : Cocone S.diagram
```

-- snippet 8
```lean
-- Mathlib.CategoryTheory.Sites.Sieves.bind (L79-L95)
def bind (S : Presieve X) (R : ∀ ⦃Y⦄ ⦃f : Y ⟶ X⦄, S f → Presieve Y) : Presieve X
```

-- snippet 9
```lean
-- Mathlib.CategoryTheory.Sites.Abelian.presheafToSheaf_additive (L46-L51)
instance presheafToSheaf_additive : (presheafToSheaf J D).Additive
```

-- snippet 10
```lean
-- Mathlib.CategoryTheory.Sites.Adjunction.adjunction_counit_app_hom (L68-L74)
lemma adjunction_counit_app_hom [HasWeakSheafify J D] [HasSheafCompose J F] (adj : G ⊣ F)
    (Y : Sheaf J D) : ((adjunction J adj).counit.app Y).hom =
      sheafifyLift J (((adj.whiskerRight Cᵒᵖ).counit.app Y.obj)) Y.property
```

-- snippet 11
```lean
-- Mathlib.CategoryTheory.Sites.Adjunction.sheafForget (L35-L46)
abbrev sheafForget {FD : D → D → Type*} {CD : D → Type*}
    [∀ X Y, FunLike (FD X Y) (CD X) (CD Y)] [ConcreteCategory D FD]
    [HasSheafCompose J (forget D)] : Sheaf J D ⥤ Sheaf J (Type _)
```

-- snippet 12
```lean
-- Mathlib.CategoryTheory.Sites.Adjunction.adjunction_unit_app_hom (L54-L63)
lemma adjunction_unit_app_hom [HasWeakSheafify J D] [HasSheafCompose J F] (adj : G ⊣ F)
    (X : Sheaf J E) : ((adjunction J adj).unit.app X).hom =
      (adj.whiskerRight Cᵒᵖ).unit.app _ ≫ whiskerRight (toSheafify J (X.obj ⋙ G)) F
```

-- snippet 13
```lean
-- Mathlib.CategoryTheory.Sites.Abelian.sheafIsAbelian (L40-L43)
instance sheafIsAbelian : Abelian (Sheaf J D)
```

-- snippet 14
```lean
-- Mathlib.CategoryTheory.Sites.Adjunction.adjunction (L47-L52)
def adjunction [HasWeakSheafify J D] [HasSheafCompose J F] (adj : G ⊣ F) :
    composeAndSheafify J G ⊣ sheafCompose J F
```
[/INST]


[System] You are Leanstral, a Lean 4 proof assistant. Complete the task below using the provided Lean source context. The target mathlib commit is 5e932f97dd25535344f80f9dd8da3aab83df0fe6 (module Mathlib.CategoryTheory.Limits.Shapes.WidePullbacks).

[User]
Prove the following theorem. The retrieved context below may help.

```lean
lemma reindex_base {ι : Type*} {X : C} {Y : ι → C} {f : ∀ i, Y i ⟶ X} (s : WidePullbackCone f)
    {ι' : Type*} (e : ι' ≃ ι) :
    (s.reindex e).base = s.base
```

## Retrieved context
-- snippet 1
```lean
-- Mathlib.CategoryTheory.Limits.Shapes.WidePullbacks.WidePullbackShape (L40-L41)
def WidePullbackShape
```

-- snippet 2
```lean
-- Mathlib.CategoryTheory.Limits.Shapes.WidePullbacks.WidePushoutShape (L46-L47)
def WidePushoutShape
```

-- snippet 3
```lean
-- Mathlib.CategoryTheory.Limits.Shapes.WidePullbacks.struct (L66-L74)
instance struct : CategoryStruct (WidePullbackShape J) where
  Hom
```

-- snippet 4
```lean
-- Mathlib.CategoryTheory.Limits.Shapes.WidePullbacks.Hom (L75-L81)
instance Hom.inhabited : Inhabited (Hom (none : WidePullbackShape J) none)
```

-- snippet 5
```lean
-- Mathlib.CategoryTheory.Limits.Shapes.WidePullbacks.evalCasesBash (L82-L86)
def evalCasesBash : TacticM Unit
```

-- snippet 6
```lean
-- Mathlib.CategoryTheory.Limits.Shapes.WidePullbacks.subsingleton_hom (L89-L96)
instance subsingleton_hom : Quiver.IsThin (WidePullbackShape J)
```

-- snippet 7
```lean
-- Mathlib.CategoryTheory.Limits.Shapes.WidePullbacks.category (L97-L99)
instance category : SmallCategory (WidePullbackShape J)
```

-- snippet 8
```lean
-- Mathlib.CategoryTheory.Limits.Shapes.WidePullbacks.hom_id (L101-L108)
theorem hom_id (X : WidePullbackShape J) : Hom.id X = 𝟙 X
```

-- snippet 9
```lean
-- Mathlib.CategoryTheory.Limits.Bicones.BiconeHom (L70-L72)
instance BiconeHom.decidableEq {j k : Bicone J} : DecidableEq (BiconeHom J j k)
```

-- snippet 10
```lean
-- Mathlib.CategoryTheory.Limits.Bicones.finBiconeHom (L124-L157)
instance finBiconeHom [FinCategory J] (j k : Bicone J) : Fintype (j ⟶ k)
```

-- snippet 11
```lean
-- Mathlib.CategoryTheory.Limits.Bicones.biconeMk (L102-L123)
def biconeMk {C : Type u₁} [Category.{v₁} C] {F : J ⥤ C} (c₁ c₂ : Cone F) : Bicone J ⥤ C where
  obj X
```

-- snippet 12
```lean
-- Mathlib.CategoryTheory.Limits.Bicones.finBicone (L52-L66)
instance finBicone [Fintype J] : Fintype (Bicone J) where
  elems
```

-- snippet 13
```lean
-- Mathlib.CategoryTheory.Limits.Bicones.biconeCategoryStruct (L74-L87)
instance biconeCategoryStruct : CategoryStruct (Bicone J) where
  Hom
```

-- snippet 14
```lean
-- Mathlib.CategoryTheory.Limits.Bicones.biconeCategory (L88-L100)
instance biconeCategory : Category (Bicone J) where
  id_comp f
```

<s>[SYSTEM_PROMPT]You are Leanstral, a Lean 4 proof assistant. Complete the task below using the provided Lean source context. The target mathlib commit is 5e932f97dd25535344f80f9dd8da3aab83df0fe6 (module Mathlib.CategoryTheory.Limits.Shapes.WidePullbacks).[/SYSTEM_PROMPT][MODEL_SETTINGS]{"reasoning_effort": "none"}[/MODEL_SETTINGS][INST]Prove the following theorem. The retrieved context below may help.

```lean
lemma reindex_base {ι : Type*} {X : C} {Y : ι → C} {f : ∀ i, Y i ⟶ X} (s : WidePullbackCone f)
    {ι' : Type*} (e : ι' ≃ ι) :
    (s.reindex e).base = s.base
```

## Retrieved context
-- snippet 1
```lean
-- Mathlib.CategoryTheory.Limits.Shapes.WidePullbacks.WidePullbackShape (L40-L41)
def WidePullbackShape
```

-- snippet 2
```lean
-- Mathlib.CategoryTheory.Limits.Shapes.WidePullbacks.WidePushoutShape (L46-L47)
def WidePushoutShape
```

-- snippet 3
```lean
-- Mathlib.CategoryTheory.Limits.Shapes.WidePullbacks.struct (L66-L74)
instance struct : CategoryStruct (WidePullbackShape J) where
  Hom
```

-- snippet 4
```lean
-- Mathlib.CategoryTheory.Limits.Shapes.WidePullbacks.Hom (L75-L81)
instance Hom.inhabited : Inhabited (Hom (none : WidePullbackShape J) none)
```

-- snippet 5
```lean
-- Mathlib.CategoryTheory.Limits.Shapes.WidePullbacks.evalCasesBash (L82-L86)
def evalCasesBash : TacticM Unit
```

-- snippet 6
```lean
-- Mathlib.CategoryTheory.Limits.Shapes.WidePullbacks.subsingleton_hom (L89-L96)
instance subsingleton_hom : Quiver.IsThin (WidePullbackShape J)
```

-- snippet 7
```lean
-- Mathlib.CategoryTheory.Limits.Shapes.WidePullbacks.category (L97-L99)
instance category : SmallCategory (WidePullbackShape J)
```

-- snippet 8
```lean
-- Mathlib.CategoryTheory.Limits.Shapes.WidePullbacks.hom_id (L101-L108)
theorem hom_id (X : WidePullbackShape J) : Hom.id X = 𝟙 X
```

-- snippet 9
```lean
-- Mathlib.CategoryTheory.Limits.Bicones.BiconeHom (L70-L72)
instance BiconeHom.decidableEq {j k : Bicone J} : DecidableEq (BiconeHom J j k)
```

-- snippet 10
```lean
-- Mathlib.CategoryTheory.Limits.Bicones.finBiconeHom (L124-L157)
instance finBiconeHom [FinCategory J] (j k : Bicone J) : Fintype (j ⟶ k)
```

-- snippet 11
```lean
-- Mathlib.CategoryTheory.Limits.Bicones.biconeMk (L102-L123)
def biconeMk {C : Type u₁} [Category.{v₁} C] {F : J ⥤ C} (c₁ c₂ : Cone F) : Bicone J ⥤ C where
  obj X
```

-- snippet 12
```lean
-- Mathlib.CategoryTheory.Limits.Bicones.finBicone (L52-L66)
instance finBicone [Fintype J] : Fintype (Bicone J) where
  elems
```

-- snippet 13
```lean
-- Mathlib.CategoryTheory.Limits.Bicones.biconeCategoryStruct (L74-L87)
instance biconeCategoryStruct : CategoryStruct (Bicone J) where
  Hom
```

-- snippet 14
```lean
-- Mathlib.CategoryTheory.Limits.Bicones.biconeCategory (L88-L100)
instance biconeCategory : Category (Bicone J) where
  id_comp f
```
[/INST]


[System] You are Leanstral, a Lean 4 proof assistant. Complete the task below using the provided Lean source context. The target mathlib commit is 5e932f97dd25535344f80f9dd8da3aab83df0fe6 (module Mathlib.AlgebraicGeometry.EllipticCurve.Reduction).

[User]
Prove the following theorem. The retrieved context below may help.

```lean
lemma integralModel_b₆_eq (W : WeierstrassCurve K) [hW : IsIntegral R W] :
    algebraMap R K (integralModel R W).b₆ = W.b₆
```

## Retrieved context
-- snippet 1
```lean
-- Mathlib.AlgebraicGeometry.EllipticCurve.Reduction.baseChange_integralModel_eq (L67-L70)
lemma baseChange_integralModel_eq (W : WeierstrassCurve K) [hW : IsIntegral R W] :
    (integralModel R W).baseChange K = W
```

-- snippet 2
```lean
-- Mathlib.AlgebraicGeometry.EllipticCurve.Reduction.isIntegral_of_exists_lift (L71-L86)
lemma isIntegral_of_exists_lift {W : WeierstrassCurve K}
    (h₁ : ∃ r₁, (algebraMap R K) r₁ = W.a₁)
    (h₂ : ∃ r₂, (algebraMap R K) r₂ = W.a₂)
    (h₃ : ∃ r₃, (algebraMap R K) r₃ = W.a₃)
    (h₄ : ∃ r₄, (algebraMap R K) r₄ = W.a₄)
    (h₆ : ∃ r₆, (algebraMap R K) r₆ = W.a₆) :
    IsIntegral R W
```

-- snippet 3
```lean
-- Mathlib.AlgebraicGeometry.EllipticCurve.Reduction.Δ_integral_of_isIntegral (L87-L93)
lemma Δ_integral_of_isIntegral (W : WeierstrassCurve K) [IsIntegral R W] :
    ∃ r : R, algebraMap R K r = W.Δ
```

-- snippet 4
```lean
-- Mathlib.AlgebraicGeometry.EllipticCurve.Reduction.integralModel_a₁_eq (L94-L98)
lemma integralModel_a₁_eq (W : WeierstrassCurve K) [hW : IsIntegral R W] :
    algebraMap R K (integralModel R W).a₁ = W.a₁
```

-- snippet 5
```lean
-- Mathlib.AlgebraicGeometry.EllipticCurve.Reduction.integralModel_a₂_eq (L99-L103)
lemma integralModel_a₂_eq (W : WeierstrassCurve K) [hW : IsIntegral R W] :
    algebraMap R K (integralModel R W).a₂ = W.a₂
```

-- snippet 6
```lean
-- Mathlib.AlgebraicGeometry.EllipticCurve.Reduction.integralModel_a₃_eq (L104-L108)
lemma integralModel_a₃_eq (W : WeierstrassCurve K) [hW : IsIntegral R W] :
    algebraMap R K (integralModel R W).a₃ = W.a₃
```

-- snippet 7
```lean
-- Mathlib.AlgebraicGeometry.EllipticCurve.Reduction.integralModel_a₄_eq (L109-L113)
lemma integralModel_a₄_eq (W : WeierstrassCurve K) [hW : IsIntegral R W] :
    algebraMap R K (integralModel R W).a₄ = W.a₄
```

-- snippet 8
```lean
-- Mathlib.AlgebraicGeometry.EllipticCurve.Reduction.integralModel_a₆_eq (L114-L118)
lemma integralModel_a₆_eq (W : WeierstrassCurve K) [hW : IsIntegral R W] :
    algebraMap R K (integralModel R W).a₆ = W.a₆
```

-- snippet 9
```lean
-- Mathlib.AlgebraicGeometry.EllipticCurve.Affine.Basic.toAffine (L78-L97)
abbrev toAffine (W : WeierstrassCurve R) : Affine R
```

-- snippet 10
```lean
-- Mathlib.AlgebraicGeometry.EllipticCurve.Affine.Basic.Affine (L74-L77)
abbrev Affine : Type r
```

-- snippet 11
```lean
-- Mathlib.AlgebraicGeometry.EllipticCurve.Affine.Basic.polynomial_eq (L98-L104)
lemma polynomial_eq : W.polynomial = Cubic.toPoly
    ⟨0, 1, Cubic.toPoly ⟨0, 0, W.a₁, W.a₃⟩, Cubic.toPoly ⟨-1, -W.a₂, -W.a₄, -W.a₆⟩⟩
```

-- snippet 12
```lean
-- Mathlib.AlgebraicGeometry.EllipticCurve.Affine.Basic.natDegree_polynomial (L115-L118)
lemma natDegree_polynomial [Nontrivial R] : W.polynomial.natDegree = 2
```

-- snippet 13
```lean
-- Mathlib.AlgebraicGeometry.EllipticCurve.Affine.Basic.polynomial_ne_zero (L105-L108)
lemma polynomial_ne_zero [Nontrivial R] : W.polynomial ≠ 0
```

-- snippet 14
```lean
-- Mathlib.AlgebraicGeometry.EllipticCurve.Affine.Basic.degree_polynomial (L110-L113)
lemma degree_polynomial [Nontrivial R] : W.polynomial.degree = 2
```

<s>[SYSTEM_PROMPT]You are Leanstral, a Lean 4 proof assistant. Complete the task below using the provided Lean source context. The target mathlib commit is 5e932f97dd25535344f80f9dd8da3aab83df0fe6 (module Mathlib.AlgebraicGeometry.EllipticCurve.Reduction).[/SYSTEM_PROMPT][MODEL_SETTINGS]{"reasoning_effort": "none"}[/MODEL_SETTINGS][INST]Prove the following theorem. The retrieved context below may help.

```lean
lemma integralModel_b₆_eq (W : WeierstrassCurve K) [hW : IsIntegral R W] :
    algebraMap R K (integralModel R W).b₆ = W.b₆
```

## Retrieved context
-- snippet 1
```lean
-- Mathlib.AlgebraicGeometry.EllipticCurve.Reduction.baseChange_integralModel_eq (L67-L70)
lemma baseChange_integralModel_eq (W : WeierstrassCurve K) [hW : IsIntegral R W] :
    (integralModel R W).baseChange K = W
```

-- snippet 2
```lean
-- Mathlib.AlgebraicGeometry.EllipticCurve.Reduction.isIntegral_of_exists_lift (L71-L86)
lemma isIntegral_of_exists_lift {W : WeierstrassCurve K}
    (h₁ : ∃ r₁, (algebraMap R K) r₁ = W.a₁)
    (h₂ : ∃ r₂, (algebraMap R K) r₂ = W.a₂)
    (h₃ : ∃ r₃, (algebraMap R K) r₃ = W.a₃)
    (h₄ : ∃ r₄, (algebraMap R K) r₄ = W.a₄)
    (h₆ : ∃ r₆, (algebraMap R K) r₆ = W.a₆) :
    IsIntegral R W
```

-- snippet 3
```lean
-- Mathlib.AlgebraicGeometry.EllipticCurve.Reduction.Δ_integral_of_isIntegral (L87-L93)
lemma Δ_integral_of_isIntegral (W : WeierstrassCurve K) [IsIntegral R W] :
    ∃ r : R, algebraMap R K r = W.Δ
```

-- snippet 4
```lean
-- Mathlib.AlgebraicGeometry.EllipticCurve.Reduction.integralModel_a₁_eq (L94-L98)
lemma integralModel_a₁_eq (W : WeierstrassCurve K) [hW : IsIntegral R W] :
    algebraMap R K (integralModel R W).a₁ = W.a₁
```

-- snippet 5
```lean
-- Mathlib.AlgebraicGeometry.EllipticCurve.Reduction.integralModel_a₂_eq (L99-L103)
lemma integralModel_a₂_eq (W : WeierstrassCurve K) [hW : IsIntegral R W] :
    algebraMap R K (integralModel R W).a₂ = W.a₂
```

-- snippet 6
```lean
-- Mathlib.AlgebraicGeometry.EllipticCurve.Reduction.integralModel_a₃_eq (L104-L108)
lemma integralModel_a₃_eq (W : WeierstrassCurve K) [hW : IsIntegral R W] :
    algebraMap R K (integralModel R W).a₃ = W.a₃
```

-- snippet 7
```lean
-- Mathlib.AlgebraicGeometry.EllipticCurve.Reduction.integralModel_a₄_eq (L109-L113)
lemma integralModel_a₄_eq (W : WeierstrassCurve K) [hW : IsIntegral R W] :
    algebraMap R K (integralModel R W).a₄ = W.a₄
```

-- snippet 8
```lean
-- Mathlib.AlgebraicGeometry.EllipticCurve.Reduction.integralModel_a₆_eq (L114-L118)
lemma integralModel_a₆_eq (W : WeierstrassCurve K) [hW : IsIntegral R W] :
    algebraMap R K (integralModel R W).a₆ = W.a₆
```

-- snippet 9
```lean
-- Mathlib.AlgebraicGeometry.EllipticCurve.Affine.Basic.toAffine (L78-L97)
abbrev toAffine (W : WeierstrassCurve R) : Affine R
```

-- snippet 10
```lean
-- Mathlib.AlgebraicGeometry.EllipticCurve.Affine.Basic.Affine (L74-L77)
abbrev Affine : Type r
```

-- snippet 11
```lean
-- Mathlib.AlgebraicGeometry.EllipticCurve.Affine.Basic.polynomial_eq (L98-L104)
lemma polynomial_eq : W.polynomial = Cubic.toPoly
    ⟨0, 1, Cubic.toPoly ⟨0, 0, W.a₁, W.a₃⟩, Cubic.toPoly ⟨-1, -W.a₂, -W.a₄, -W.a₆⟩⟩
```

-- snippet 12
```lean
-- Mathlib.AlgebraicGeometry.EllipticCurve.Affine.Basic.natDegree_polynomial (L115-L118)
lemma natDegree_polynomial [Nontrivial R] : W.polynomial.natDegree = 2
```

-- snippet 13
```lean
-- Mathlib.AlgebraicGeometry.EllipticCurve.Affine.Basic.polynomial_ne_zero (L105-L108)
lemma polynomial_ne_zero [Nontrivial R] : W.polynomial ≠ 0
```

-- snippet 14
```lean
-- Mathlib.AlgebraicGeometry.EllipticCurve.Affine.Basic.degree_polynomial (L110-L113)
lemma degree_polynomial [Nontrivial R] : W.polynomial.degree = 2
```
[/INST]


[System] You are Leanstral, a Lean 4 proof assistant. Complete the task below using the provided Lean source context. The target mathlib commit is 5e932f97dd25535344f80f9dd8da3aab83df0fe6 (module Mathlib.FieldTheory.RatFunc.AsPolynomial).

[User]
Prove the following theorem. The retrieved context below may help.

```lean
def X : K⟮X⟯
```

## Retrieved context
-- snippet 1
```lean
-- Mathlib.FieldTheory.RatFunc.AsPolynomial.C (L51-L52)
def C : K →+* K⟮X⟯
```

-- snippet 2
```lean
-- Mathlib.FieldTheory.RatFunc.AsPolynomial.algebraMap_eq_C (L54-L56)
theorem algebraMap_eq_C : algebraMap K K⟮X⟯ = C
```

-- snippet 3
```lean
-- Mathlib.FieldTheory.RatFunc.AsPolynomial.algebraMap_C (L58-L60)
theorem algebraMap_C (a : K) : algebraMap K[X] K⟮X⟯ (Polynomial.C a) = C a
```

-- snippet 4
```lean
-- Mathlib.FieldTheory.RatFunc.AsPolynomial.algebraMap_comp_C (L62-L64)
theorem algebraMap_comp_C : (algebraMap K[X] K⟮X⟯).comp Polynomial.C = C
```

-- snippet 5
```lean
-- Mathlib.FieldTheory.RatFunc.AsPolynomial.smul_eq_C_mul (L65-L67)
theorem smul_eq_C_mul (r : K) (x : K⟮X⟯) : r • x = C r * x
```

-- snippet 6
```lean
-- Mathlib.FieldTheory.RatFunc.AsPolynomial.C_injective (L68-L72)
theorem C_injective : Function.Injective (RatFunc.C (K
```

-- snippet 7
```lean
-- Mathlib.FieldTheory.RatFunc.AsPolynomial.algebraMap_X (L77-L79)
theorem algebraMap_X : algebraMap K[X] K⟮X⟯ Polynomial.X = X
```

-- snippet 8
```lean
-- Mathlib.FieldTheory.RatFunc.AsPolynomial.algebraMap_monomial (L81-L84)
theorem algebraMap_monomial (n : ℕ) (a : K) :
    algebraMap K[X] K⟮X⟯ (Polynomial.monomial n a) = C a * X ^ n
```

-- snippet 9
```lean
-- Mathlib.FieldTheory.RatFunc.Basic.ofFractionRing_zero (L73-L79)
theorem ofFractionRing_zero : (ofFractionRing 0 : K⟮X⟯) = 0
```

-- snippet 10
```lean
-- Mathlib.FieldTheory.RatFunc.Basic.ofFractionRing_neg (L105-L112)
theorem ofFractionRing_neg (p : FractionRing K[X]) :
    ofFractionRing (-p) = -ofFractionRing p
```

-- snippet 11
```lean
-- Mathlib.FieldTheory.RatFunc.Basic.ofFractionRing_one (L116-L122)
theorem ofFractionRing_one : (ofFractionRing 1 : K⟮X⟯) = 1
```

-- snippet 12
```lean
-- Mathlib.FieldTheory.RatFunc.Basic.ofFractionRing_mul (L126-L137)
theorem ofFractionRing_mul (p q : FractionRing K[X]) :
    ofFractionRing (p * q) = ofFractionRing p * ofFractionRing q
```

-- snippet 13
```lean
-- Mathlib.FieldTheory.RatFunc.Basic.ofFractionRing_sub (L94-L101)
theorem ofFractionRing_sub (p q : FractionRing K[X]) :
    ofFractionRing (p - q) = ofFractionRing p - ofFractionRing q
```

-- snippet 14
```lean
-- Mathlib.FieldTheory.RatFunc.Basic.ofFractionRing_add (L83-L90)
theorem ofFractionRing_add (p q : FractionRing K[X]) :
    ofFractionRing (p + q) = ofFractionRing p + ofFractionRing q
```

<s>[SYSTEM_PROMPT]You are Leanstral, a Lean 4 proof assistant. Complete the task below using the provided Lean source context. The target mathlib commit is 5e932f97dd25535344f80f9dd8da3aab83df0fe6 (module Mathlib.FieldTheory.RatFunc.AsPolynomial).[/SYSTEM_PROMPT][MODEL_SETTINGS]{"reasoning_effort": "none"}[/MODEL_SETTINGS][INST]Prove the following theorem. The retrieved context below may help.

```lean
def X : K⟮X⟯
```

## Retrieved context
-- snippet 1
```lean
-- Mathlib.FieldTheory.RatFunc.AsPolynomial.C (L51-L52)
def C : K →+* K⟮X⟯
```

-- snippet 2
```lean
-- Mathlib.FieldTheory.RatFunc.AsPolynomial.algebraMap_eq_C (L54-L56)
theorem algebraMap_eq_C : algebraMap K K⟮X⟯ = C
```

-- snippet 3
```lean
-- Mathlib.FieldTheory.RatFunc.AsPolynomial.algebraMap_C (L58-L60)
theorem algebraMap_C (a : K) : algebraMap K[X] K⟮X⟯ (Polynomial.C a) = C a
```

-- snippet 4
```lean
-- Mathlib.FieldTheory.RatFunc.AsPolynomial.algebraMap_comp_C (L62-L64)
theorem algebraMap_comp_C : (algebraMap K[X] K⟮X⟯).comp Polynomial.C = C
```

-- snippet 5
```lean
-- Mathlib.FieldTheory.RatFunc.AsPolynomial.smul_eq_C_mul (L65-L67)
theorem smul_eq_C_mul (r : K) (x : K⟮X⟯) : r • x = C r * x
```

-- snippet 6
```lean
-- Mathlib.FieldTheory.RatFunc.AsPolynomial.C_injective (L68-L72)
theorem C_injective : Function.Injective (RatFunc.C (K
```

-- snippet 7
```lean
-- Mathlib.FieldTheory.RatFunc.AsPolynomial.algebraMap_X (L77-L79)
theorem algebraMap_X : algebraMap K[X] K⟮X⟯ Polynomial.X = X
```

-- snippet 8
```lean
-- Mathlib.FieldTheory.RatFunc.AsPolynomial.algebraMap_monomial (L81-L84)
theorem algebraMap_monomial (n : ℕ) (a : K) :
    algebraMap K[X] K⟮X⟯ (Polynomial.monomial n a) = C a * X ^ n
```

-- snippet 9
```lean
-- Mathlib.FieldTheory.RatFunc.Basic.ofFractionRing_zero (L73-L79)
theorem ofFractionRing_zero : (ofFractionRing 0 : K⟮X⟯) = 0
```

-- snippet 10
```lean
-- Mathlib.FieldTheory.RatFunc.Basic.ofFractionRing_neg (L105-L112)
theorem ofFractionRing_neg (p : FractionRing K[X]) :
    ofFractionRing (-p) = -ofFractionRing p
```

-- snippet 11
```lean
-- Mathlib.FieldTheory.RatFunc.Basic.ofFractionRing_one (L116-L122)
theorem ofFractionRing_one : (ofFractionRing 1 : K⟮X⟯) = 1
```

-- snippet 12
```lean
-- Mathlib.FieldTheory.RatFunc.Basic.ofFractionRing_mul (L126-L137)
theorem ofFractionRing_mul (p q : FractionRing K[X]) :
    ofFractionRing (p * q) = ofFractionRing p * ofFractionRing q
```

-- snippet 13
```lean
-- Mathlib.FieldTheory.RatFunc.Basic.ofFractionRing_sub (L94-L101)
theorem ofFractionRing_sub (p q : FractionRing K[X]) :
    ofFractionRing (p - q) = ofFractionRing p - ofFractionRing q
```

-- snippet 14
```lean
-- Mathlib.FieldTheory.RatFunc.Basic.ofFractionRing_add (L83-L90)
theorem ofFractionRing_add (p q : FractionRing K[X]) :
    ofFractionRing (p + q) = ofFractionRing p + ofFractionRing q
```
[/INST]


[System] You are Leanstral, a Lean 4 proof assistant. Complete the task below using the provided Lean source context. The target mathlib commit is 5e932f97dd25535344f80f9dd8da3aab83df0fe6 (module Mathlib.CategoryTheory.Bicategory.EqToHom).

[User]
Prove the following theorem. The retrieved context below may help.

```lean
def eqToHomTransIso {x y z : B} (e₁ : x = y) (e₂ : y = z) :
    eqToHom (e₁.trans e₂) ≅ eqToHom e₁ ≫ eqToHom e₂
```

## Retrieved context
-- snippet 1
```lean
-- Mathlib.CategoryTheory.Bicategory.EqToHom.eqToHomTransIso_refl_refl (L52-L55)
lemma eqToHomTransIso_refl_refl (x : B) :
    eqToHomTransIso (rfl : x = x) rfl = (λ_ (𝟙 x)).symm
```

-- snippet 2
```lean
-- Mathlib.CategoryTheory.Bicategory.EqToHom.eqToHomTransIso_refl_right (L56-L61)
lemma eqToHomTransIso_refl_right {x y : B} (e₁ : x = y) :
    eqToHomTransIso e₁ rfl = (ρ_ (eqToHom e₁)).symm
```

-- snippet 3
```lean
-- Mathlib.CategoryTheory.Bicategory.EqToHom.eqToHomTransIso_refl_left (L62-L67)
lemma eqToHomTransIso_refl_left {x y : B} (e₁ : x = y) :
    eqToHomTransIso rfl e₁ = (λ_ (eqToHom e₁)).symm
```

-- snippet 4
```lean
-- Mathlib.CategoryTheory.Bicategory.EqToHom.associator_eqToHom_hom (L69-L78)
lemma associator_eqToHom_hom {x y z t : B}
    (e₁ : x = y) (e₂ : y = z) (e₃ : z = t) :
    (α_ (eqToHom e₁) (eqToHom e₂) (eqToHom e₃)).hom =
    (eqToHomTransIso e₁ e₂).inv ▷ eqToHom e₃ ≫
      (eqToHomTransIso (e₁.trans e₂) e₃).inv ≫
      (eqToHomTransIso e₁ (e₂.trans e₃)).hom ≫
      eqToHom e₁ ◁ (eqToHomTransIso e₂ e₃).hom
```

-- snippet 5
```lean
-- Mathlib.CategoryTheory.Bicategory.EqToHom.associator_eqToHom_inv (L80-L89)
lemma associator_eqToHom_inv {x y z t : B}
    (e₁ : x = y) (e₂ : y = z) (e₃ : z = t) :
    (α_ (eqToHom e₁) (eqToHom e₂) (eqToHom e₃)).inv =
    eqToHom e₁ ◁ (eqToHomTransIso e₂ e₃).inv ≫
      (eqToHomTransIso e₁ (e₂.trans e₃)).inv ≫
      (eqToHomTransIso (e₁.trans e₂) e₃).hom ≫
      (eqToHomTransIso e₁ e₂).hom ▷ eqToHom e₃
```

-- snippet 6
```lean
-- Mathlib.CategoryTheory.Bicategory.EqToHom.associator_hom_congr (L90-L96)
lemma associator_hom_congr {x y z t : B} {f f' : x ⟶ y} {g g' : y ⟶ z}
    {h h' : z ⟶ t} (ef : f = f') (eg : g = g') (eh : h = h') :
    (α_ f g h).hom =
    eqToHom (by grind) ≫ (α_ f' g' h').hom ≫ eqToHom (by grind)
```

-- snippet 7
```lean
-- Mathlib.CategoryTheory.Bicategory.EqToHom.associator_inv_congr (L97-L103)
lemma associator_inv_congr {x y z t : B} {f f' : x ⟶ y} {g g' : y ⟶ z}
    {h h' : z ⟶ t} (ef : f = f') (eg : g = g') (eh : h = h') :
    (α_ f g h).inv =
    eqToHom (by grind) ≫ (α_ f' g' h').inv ≫ eqToHom (by grind)
```

-- snippet 8
```lean
-- Mathlib.CategoryTheory.Bicategory.EqToHom.congr_whiskerLeft (L104-L109)
lemma congr_whiskerLeft {x y : B} {f f' : x ⟶ y} (h : f = f') {z : B}
    {g g' : y ⟶ z} (η : g ⟶ g') :
      f ◁ η = eqToHom (by rw [h]) ≫ f' ◁ η ≫ eqToHom (by rw [h])
```

-- snippet 9
```lean
-- Mathlib.CategoryTheory.Bicategory.Adjunction.Adj.iso₂Mk (L118-L134)
def iso₂Mk {α β : a ⟶ b} (el : α.l ≅ β.l) (er : β.r ≅ α.r)
    (h : conjugateEquiv β.adj α.adj el.hom = er.hom
```

-- snippet 10
```lean
-- Mathlib.CategoryTheory.Bicategory.Adjunction.Adj.hom₂_ext (L111-L113)
lemma hom₂_ext {α β : a ⟶ b} {x y : α ⟶ β} (hl : x.τl = y.τl) : x = y
```

-- snippet 11
```lean
-- Mathlib.CategoryTheory.Bicategory.Adjunction.Adj.associator (L136-L139)
def associator (α : a ⟶ b) (β : b ⟶ c) (γ : c ⟶ d) : (α ≫ β) ≫ γ ≅ α ≫ β ≫ γ
```

-- snippet 12
```lean
-- Mathlib.CategoryTheory.Bicategory.Adjunction.Adj.Hom₂ (L91-L94)
lemma Hom₂.conjugateEquiv_symm_τr {α β : a ⟶ b} (p : Hom₂ α β) :
    (conjugateEquiv β.adj α.adj).symm p.τr = p.τl
```

-- snippet 13
```lean
-- Mathlib.CategoryTheory.Bicategory.Adjunction.Adj.rightUnitor (L147-L151)
def rightUnitor (α : a ⟶ b) : α ≫ 𝟙 b ≅ α
```

-- snippet 14
```lean
-- Mathlib.CategoryTheory.Bicategory.Adjunction.Adj.leftUnitor (L141-L145)
def leftUnitor (α : a ⟶ b) : 𝟙 a ≫ α ≅ α
```

<s>[SYSTEM_PROMPT]You are Leanstral, a Lean 4 proof assistant. Complete the task below using the provided Lean source context. The target mathlib commit is 5e932f97dd25535344f80f9dd8da3aab83df0fe6 (module Mathlib.CategoryTheory.Bicategory.EqToHom).[/SYSTEM_PROMPT][MODEL_SETTINGS]{"reasoning_effort": "none"}[/MODEL_SETTINGS][INST]Prove the following theorem. The retrieved context below may help.

```lean
def eqToHomTransIso {x y z : B} (e₁ : x = y) (e₂ : y = z) :
    eqToHom (e₁.trans e₂) ≅ eqToHom e₁ ≫ eqToHom e₂
```

## Retrieved context
-- snippet 1
```lean
-- Mathlib.CategoryTheory.Bicategory.EqToHom.eqToHomTransIso_refl_refl (L52-L55)
lemma eqToHomTransIso_refl_refl (x : B) :
    eqToHomTransIso (rfl : x = x) rfl = (λ_ (𝟙 x)).symm
```

-- snippet 2
```lean
-- Mathlib.CategoryTheory.Bicategory.EqToHom.eqToHomTransIso_refl_right (L56-L61)
lemma eqToHomTransIso_refl_right {x y : B} (e₁ : x = y) :
    eqToHomTransIso e₁ rfl = (ρ_ (eqToHom e₁)).symm
```

-- snippet 3
```lean
-- Mathlib.CategoryTheory.Bicategory.EqToHom.eqToHomTransIso_refl_left (L62-L67)
lemma eqToHomTransIso_refl_left {x y : B} (e₁ : x = y) :
    eqToHomTransIso rfl e₁ = (λ_ (eqToHom e₁)).symm
```

-- snippet 4
```lean
-- Mathlib.CategoryTheory.Bicategory.EqToHom.associator_eqToHom_hom (L69-L78)
lemma associator_eqToHom_hom {x y z t : B}
    (e₁ : x = y) (e₂ : y = z) (e₃ : z = t) :
    (α_ (eqToHom e₁) (eqToHom e₂) (eqToHom e₃)).hom =
    (eqToHomTransIso e₁ e₂).inv ▷ eqToHom e₃ ≫
      (eqToHomTransIso (e₁.trans e₂) e₃).inv ≫
      (eqToHomTransIso e₁ (e₂.trans e₃)).hom ≫
      eqToHom e₁ ◁ (eqToHomTransIso e₂ e₃).hom
```

-- snippet 5
```lean
-- Mathlib.CategoryTheory.Bicategory.EqToHom.associator_eqToHom_inv (L80-L89)
lemma associator_eqToHom_inv {x y z t : B}
    (e₁ : x = y) (e₂ : y = z) (e₃ : z = t) :
    (α_ (eqToHom e₁) (eqToHom e₂) (eqToHom e₃)).inv =
    eqToHom e₁ ◁ (eqToHomTransIso e₂ e₃).inv ≫
      (eqToHomTransIso e₁ (e₂.trans e₃)).inv ≫
      (eqToHomTransIso (e₁.trans e₂) e₃).hom ≫
      (eqToHomTransIso e₁ e₂).hom ▷ eqToHom e₃
```

-- snippet 6
```lean
-- Mathlib.CategoryTheory.Bicategory.EqToHom.associator_hom_congr (L90-L96)
lemma associator_hom_congr {x y z t : B} {f f' : x ⟶ y} {g g' : y ⟶ z}
    {h h' : z ⟶ t} (ef : f = f') (eg : g = g') (eh : h = h') :
    (α_ f g h).hom =
    eqToHom (by grind) ≫ (α_ f' g' h').hom ≫ eqToHom (by grind)
```

-- snippet 7
```lean
-- Mathlib.CategoryTheory.Bicategory.EqToHom.associator_inv_congr (L97-L103)
lemma associator_inv_congr {x y z t : B} {f f' : x ⟶ y} {g g' : y ⟶ z}
    {h h' : z ⟶ t} (ef : f = f') (eg : g = g') (eh : h = h') :
    (α_ f g h).inv =
    eqToHom (by grind) ≫ (α_ f' g' h').inv ≫ eqToHom (by grind)
```

-- snippet 8
```lean
-- Mathlib.CategoryTheory.Bicategory.EqToHom.congr_whiskerLeft (L104-L109)
lemma congr_whiskerLeft {x y : B} {f f' : x ⟶ y} (h : f = f') {z : B}
    {g g' : y ⟶ z} (η : g ⟶ g') :
      f ◁ η = eqToHom (by rw [h]) ≫ f' ◁ η ≫ eqToHom (by rw [h])
```

-- snippet 9
```lean
-- Mathlib.CategoryTheory.Bicategory.Adjunction.Adj.iso₂Mk (L118-L134)
def iso₂Mk {α β : a ⟶ b} (el : α.l ≅ β.l) (er : β.r ≅ α.r)
    (h : conjugateEquiv β.adj α.adj el.hom = er.hom
```

-- snippet 10
```lean
-- Mathlib.CategoryTheory.Bicategory.Adjunction.Adj.hom₂_ext (L111-L113)
lemma hom₂_ext {α β : a ⟶ b} {x y : α ⟶ β} (hl : x.τl = y.τl) : x = y
```

-- snippet 11
```lean
-- Mathlib.CategoryTheory.Bicategory.Adjunction.Adj.associator (L136-L139)
def associator (α : a ⟶ b) (β : b ⟶ c) (γ : c ⟶ d) : (α ≫ β) ≫ γ ≅ α ≫ β ≫ γ
```

-- snippet 12
```lean
-- Mathlib.CategoryTheory.Bicategory.Adjunction.Adj.Hom₂ (L91-L94)
lemma Hom₂.conjugateEquiv_symm_τr {α β : a ⟶ b} (p : Hom₂ α β) :
    (conjugateEquiv β.adj α.adj).symm p.τr = p.τl
```

-- snippet 13
```lean
-- Mathlib.CategoryTheory.Bicategory.Adjunction.Adj.rightUnitor (L147-L151)
def rightUnitor (α : a ⟶ b) : α ≫ 𝟙 b ≅ α
```

-- snippet 14
```lean
-- Mathlib.CategoryTheory.Bicategory.Adjunction.Adj.leftUnitor (L141-L145)
def leftUnitor (α : a ⟶ b) : 𝟙 a ≫ α ≅ α
```
[/INST]


[System] You are Leanstral, a Lean 4 proof assistant. Complete the task below using the provided Lean source context. The target mathlib commit is 5e932f97dd25535344f80f9dd8da3aab83df0fe6 (module Mathlib.CategoryTheory.Yoneda).

[User]
Prove the following theorem. The retrieved context below may help.

```lean
lemma uliftCoyonedaEquiv_symm_map {X Y : C} (f : X ⟶ Y) {F : C ⥤ Type max w v₁}
    (t : F.obj X) :
    uliftCoyonedaEquiv.{w}.symm (F.map f t) =
      uliftCoyoneda.map f.op ≫ uliftCoyonedaEquiv.symm t
```

## Retrieved context
-- snippet 1
```lean
-- Mathlib.CategoryTheory.Yoneda.yoneda (L44-L52)
def yoneda : C ⥤ Cᵒᵖ ⥤ Type v₁ where
  obj X :=
{ obj := fun Y => unop Y ⟶ X
      map := fun f g => f.unop ≫ g }
  map f :=
    { app := fun _ g => g ≫ f }

/-- Variant of the Yoneda embedding which allows a raise in the universe level
for the category of types. -/
```

-- snippet 2
```lean
-- Mathlib.CategoryTheory.Yoneda.uliftYoneda (L54-L56)
def uliftYoneda : C ⥤ Cᵒᵖ ⥤ Type (max w v₁) :=
yoneda ⋙ (whiskeringRight _ _ _).obj uliftFunctor.{w}
```

-- snippet 3
```lean
-- Mathlib.CategoryTheory.Yoneda.uliftYoneda_obj_map_down (L58-L61)
lemma uliftYoneda_obj_map_down (X : C) {Y Z : Cᵒᵖ} (f : Y ⟶ Z) (a : (uliftYoneda.{w}.obj X).obj Y) :
    ((uliftYoneda.{w}.obj X).map f a).down = f.unop ≫ a.down :=
rfl
```

-- snippet 4
```lean
-- Mathlib.CategoryTheory.Yoneda.uliftYoneda_map_app_down (L63-L68)
lemma uliftYoneda_map_app_down {X Y : C} (f : X ⟶ Y) (Z : Cᵒᵖ) (a : (uliftYoneda.{w}.obj X).obj Z) :
    ((uliftYoneda.{w}.map f).app Z a).down = a.down ≫ f :=
rfl

/-- If `C` is a category with `[Category.{max w v₁} C]`, this is the isomorphism
`uliftYoneda.{w} (C := C) ≅ yoneda`. -/
```

-- snippet 5
```lean
-- Mathlib.CategoryTheory.Yoneda.uliftYonedaIsoYoneda (L70-L75)
def uliftYonedaIsoYoneda {C : Type u₁} [Category.{max w v₁} C] :
    uliftYoneda.{w} (C := C) ≅ yoneda :=
NatIso.ofComponents (fun _ ↦ NatIso.ofComponents (fun _ ↦ Equiv.ulift.toIso))

/-- The co-Yoneda embedding, as a functor from `Cᵒᵖ` into co-presheaves on `C`.
-/
```

-- snippet 6
```lean
-- Mathlib.CategoryTheory.Yoneda.coyoneda (L76-L79)
abbrev coyoneda : Cᵒᵖ ⥤ C ⥤ Type v₁ := yoneda.flip
/-- Variant of the Coyoneda embedding which allows a raise in the universe level
for the category of types. -/
```

-- snippet 7
```lean
-- Mathlib.CategoryTheory.Yoneda.uliftCoyoneda (L81-L84)
abbrev uliftCoyoneda : Cᵒᵖ ⥤ C ⥤ Type (max w v₁) := uliftYoneda.{w}.flip
/-- If `C` is a category with `[Category.{max w v₁} C]`, this is the isomorphism
`uliftCoyoneda.{w} (C := C) ≅ coyoneda`. -/
```

-- snippet 8
```lean
-- Mathlib.CategoryTheory.Yoneda.uliftCoyonedaIsoCoyoneda (L86-L91)
def uliftCoyonedaIsoCoyoneda {C : Type u₁} [Category.{max w v₁} C] :
    uliftCoyoneda.{w} (C := C) ≅ coyoneda :=
NatIso.ofComponents (fun _ ↦ NatIso.ofComponents (fun _ ↦ Equiv.ulift.toIso))

namespace Yoneda
```

-- snippet 9
```lean
-- Mathlib.CategoryTheory.Yoneda.obj_map_id (L92-L95)
theorem obj_map_id {X Y : C} (f : op X ⟶ op Y) :
    (yoneda.obj X).map f (𝟙 X) = (yoneda.map f.unop).app (op Y) (𝟙 Y) := by
simp
```

-- snippet 10
```lean
-- Mathlib.CategoryTheory.Yoneda.naturality (L97-L101)
theorem naturality {X Y : C} (α : yoneda.obj X ⟶ yoneda.obj Y) {Z Z' : C} (f : Z ⟶ Z')
    (h : Z' ⟶ X) : f ≫ α.app (op Z') h = α.app (op Z) (f ≫ h) :=
(FunctorToTypes.naturality _ _ α f.op h).symm

/-- The Yoneda embedding is fully faithful. -/
```

-- snippet 11
```lean
-- Mathlib.CategoryTheory.Yoneda.fullyFaithful (L102-L104)
def fullyFaithful : (yoneda (C := C)).FullyFaithful where
preimage f := f.app _ (𝟙 _)
```

-- snippet 12
```lean
-- Mathlib.CategoryTheory.Yoneda.fullyFaithful_preimage (L105-L108)
lemma fullyFaithful_preimage {X Y : C} (f : yoneda.obj X ⟶ yoneda.obj Y) :
    fullyFaithful.preimage f = f.app (op X) (𝟙 X) := rfl
/-- The Yoneda embedding is full. -/
```

-- snippet 13
```lean
-- Mathlib.CategoryTheory.Yoneda.yoneda_full (L110-L113)
instance yoneda_full : (yoneda : C ⥤ Cᵒᵖ ⥤ Type v₁).Full :=
fullyFaithful.full

/-- The Yoneda embedding is faithful. -/
```

-- snippet 14
```lean
-- Mathlib.CategoryTheory.Yoneda.yoneda_faithful (L115-L125)
instance yoneda_faithful : (yoneda : C ⥤ Cᵒᵖ ⥤ Type v₁).Faithful :=
fullyFaithful.faithful

/-- Extensionality via Yoneda. The typical usage would be
```
-- Goal is `X ≅ Y`
apply Yoneda.ext
-- Goals are now functions `(Z ⟶ X) → (Z ⟶ Y)`, `(Z ⟶ Y) → (Z ⟶ X)`, and the fact that these
-- functions are inverses and natural in `Z`.
```
-/
```

-- snippet 15
```lean
-- Mathlib.CategoryTheory.Yoneda.ext (L126-L136)
def ext (X Y : C) (p : ∀ {Z : C}, (Z ⟶ X) → (Z ⟶ Y))
    (q : ∀ {Z : C}, (Z ⟶ Y) → (Z ⟶ X))
    (h₁ : ∀ {Z : C} (f : Z ⟶ X), q (p f) = f) (h₂ : ∀ {Z : C} (f : Z ⟶ Y), p (q f) = f)
    (n : ∀ {Z Z' : C} (f : Z' ⟶ Z) (g : Z ⟶ X), p (f ≫ g) = f ≫ p g) : X ≅ Y :=
fullyFaithful.preimageIso
    (NatIso.ofComponents fun Z =>
      { hom := p
        inv := q })

/-- If `yoneda.map f` is an isomorphism, so was `f`.
-/
```

<s>[SYSTEM_PROMPT]You are Leanstral, a Lean 4 proof assistant. Complete the task below using the provided Lean source context. The target mathlib commit is 5e932f97dd25535344f80f9dd8da3aab83df0fe6 (module Mathlib.CategoryTheory.Yoneda).[/SYSTEM_PROMPT][MODEL_SETTINGS]{"reasoning_effort": "none"}[/MODEL_SETTINGS][INST]Prove the following theorem. The retrieved context below may help.

```lean
lemma uliftCoyonedaEquiv_symm_map {X Y : C} (f : X ⟶ Y) {F : C ⥤ Type max w v₁}
    (t : F.obj X) :
    uliftCoyonedaEquiv.{w}.symm (F.map f t) =
      uliftCoyoneda.map f.op ≫ uliftCoyonedaEquiv.symm t
```

## Retrieved context
-- snippet 1
```lean
-- Mathlib.CategoryTheory.Yoneda.yoneda (L44-L52)
def yoneda : C ⥤ Cᵒᵖ ⥤ Type v₁ where
  obj X :=
{ obj := fun Y => unop Y ⟶ X
      map := fun f g => f.unop ≫ g }
  map f :=
    { app := fun _ g => g ≫ f }

/-- Variant of the Yoneda embedding which allows a raise in the universe level
for the category of types. -/
```

-- snippet 2
```lean
-- Mathlib.CategoryTheory.Yoneda.uliftYoneda (L54-L56)
def uliftYoneda : C ⥤ Cᵒᵖ ⥤ Type (max w v₁) :=
yoneda ⋙ (whiskeringRight _ _ _).obj uliftFunctor.{w}
```

-- snippet 3
```lean
-- Mathlib.CategoryTheory.Yoneda.uliftYoneda_obj_map_down (L58-L61)
lemma uliftYoneda_obj_map_down (X : C) {Y Z : Cᵒᵖ} (f : Y ⟶ Z) (a : (uliftYoneda.{w}.obj X).obj Y) :
    ((uliftYoneda.{w}.obj X).map f a).down = f.unop ≫ a.down :=
rfl
```

-- snippet 4
```lean
-- Mathlib.CategoryTheory.Yoneda.uliftYoneda_map_app_down (L63-L68)
lemma uliftYoneda_map_app_down {X Y : C} (f : X ⟶ Y) (Z : Cᵒᵖ) (a : (uliftYoneda.{w}.obj X).obj Z) :
    ((uliftYoneda.{w}.map f).app Z a).down = a.down ≫ f :=
rfl

/-- If `C` is a category with `[Category.{max w v₁} C]`, this is the isomorphism
`uliftYoneda.{w} (C := C) ≅ yoneda`. -/
```

-- snippet 5
```lean
-- Mathlib.CategoryTheory.Yoneda.uliftYonedaIsoYoneda (L70-L75)
def uliftYonedaIsoYoneda {C : Type u₁} [Category.{max w v₁} C] :
    uliftYoneda.{w} (C := C) ≅ yoneda :=
NatIso.ofComponents (fun _ ↦ NatIso.ofComponents (fun _ ↦ Equiv.ulift.toIso))

/-- The co-Yoneda embedding, as a functor from `Cᵒᵖ` into co-presheaves on `C`.
-/
```

-- snippet 6
```lean
-- Mathlib.CategoryTheory.Yoneda.coyoneda (L76-L79)
abbrev coyoneda : Cᵒᵖ ⥤ C ⥤ Type v₁ := yoneda.flip
/-- Variant of the Coyoneda embedding which allows a raise in the universe level
for the category of types. -/
```

-- snippet 7
```lean
-- Mathlib.CategoryTheory.Yoneda.uliftCoyoneda (L81-L84)
abbrev uliftCoyoneda : Cᵒᵖ ⥤ C ⥤ Type (max w v₁) := uliftYoneda.{w}.flip
/-- If `C` is a category with `[Category.{max w v₁} C]`, this is the isomorphism
`uliftCoyoneda.{w} (C := C) ≅ coyoneda`. -/
```

-- snippet 8
```lean
-- Mathlib.CategoryTheory.Yoneda.uliftCoyonedaIsoCoyoneda (L86-L91)
def uliftCoyonedaIsoCoyoneda {C : Type u₁} [Category.{max w v₁} C] :
    uliftCoyoneda.{w} (C := C) ≅ coyoneda :=
NatIso.ofComponents (fun _ ↦ NatIso.ofComponents (fun _ ↦ Equiv.ulift.toIso))

namespace Yoneda
```

-- snippet 9
```lean
-- Mathlib.CategoryTheory.Yoneda.obj_map_id (L92-L95)
theorem obj_map_id {X Y : C} (f : op X ⟶ op Y) :
    (yoneda.obj X).map f (𝟙 X) = (yoneda.map f.unop).app (op Y) (𝟙 Y) := by
simp
```

-- snippet 10
```lean
-- Mathlib.CategoryTheory.Yoneda.naturality (L97-L101)
theorem naturality {X Y : C} (α : yoneda.obj X ⟶ yoneda.obj Y) {Z Z' : C} (f : Z ⟶ Z')
    (h : Z' ⟶ X) : f ≫ α.app (op Z') h = α.app (op Z) (f ≫ h) :=
(FunctorToTypes.naturality _ _ α f.op h).symm

/-- The Yoneda embedding is fully faithful. -/
```

-- snippet 11
```lean
-- Mathlib.CategoryTheory.Yoneda.fullyFaithful (L102-L104)
def fullyFaithful : (yoneda (C := C)).FullyFaithful where
preimage f := f.app _ (𝟙 _)
```

-- snippet 12
```lean
-- Mathlib.CategoryTheory.Yoneda.fullyFaithful_preimage (L105-L108)
lemma fullyFaithful_preimage {X Y : C} (f : yoneda.obj X ⟶ yoneda.obj Y) :
    fullyFaithful.preimage f = f.app (op X) (𝟙 X) := rfl
/-- The Yoneda embedding is full. -/
```

-- snippet 13
```lean
-- Mathlib.CategoryTheory.Yoneda.yoneda_full (L110-L113)
instance yoneda_full : (yoneda : C ⥤ Cᵒᵖ ⥤ Type v₁).Full :=
fullyFaithful.full

/-- The Yoneda embedding is faithful. -/
```

-- snippet 14
```lean
-- Mathlib.CategoryTheory.Yoneda.yoneda_faithful (L115-L125)
instance yoneda_faithful : (yoneda : C ⥤ Cᵒᵖ ⥤ Type v₁).Faithful :=
fullyFaithful.faithful

/-- Extensionality via Yoneda. The typical usage would be
```
-- Goal is `X ≅ Y`
apply Yoneda.ext
-- Goals are now functions `(Z ⟶ X) → (Z ⟶ Y)`, `(Z ⟶ Y) → (Z ⟶ X)`, and the fact that these
-- functions are inverses and natural in `Z`.
```
-/
```

-- snippet 15
```lean
-- Mathlib.CategoryTheory.Yoneda.ext (L126-L136)
def ext (X Y : C) (p : ∀ {Z : C}, (Z ⟶ X) → (Z ⟶ Y))
    (q : ∀ {Z : C}, (Z ⟶ Y) → (Z ⟶ X))
    (h₁ : ∀ {Z : C} (f : Z ⟶ X), q (p f) = f) (h₂ : ∀ {Z : C} (f : Z ⟶ Y), p (q f) = f)
    (n : ∀ {Z Z' : C} (f : Z' ⟶ Z) (g : Z ⟶ X), p (f ≫ g) = f ≫ p g) : X ≅ Y :=
fullyFaithful.preimageIso
    (NatIso.ofComponents fun Z =>
      { hom := p
        inv := q })

/-- If `yoneda.map f` is an isomorphism, so was `f`.
-/
```
[/INST]