ruc-ai4math/mathlib_handler_benchmark_410 huggingface dataset:
File: Mathlib/Topology/UniformSpace/Matrix.lean

full_name: Matrix.instUniformSpace
code: instance instUniformSpace : UniformSpace (Matrix m n 𝕜) 
goal: UniformSpace (Matrix m n 𝕜)

full_name: Matrix.instUniformAddGroup
code: instance instUniformAddGroup [AddGroup 𝕜] [UniformAddGroup 𝕜] :
    UniformAddGroup (Matrix m n 𝕜) 
goal: UniformAddGroup (Matrix m n 𝕜)

full_name: Matrix.uniformity
code: theorem uniformity :
    𝓤 (Matrix m n 𝕜) = ⨅ (i : m) (j : n), (𝓤 𝕜).comap fun a => (a.1 i j, a.2 i j) 
goal: 𝓤 (Matrix m n 𝕜) = ⨅ i, ⨅ j, Filter.comap (fun a => (a.1 i j, a.2 i j)) (𝓤 𝕜)

full_name: Matrix.uniformContinuous
code: theorem uniformContinuous {β : Type*} [UniformSpace β] {f : β → Matrix m n 𝕜} :
    UniformContinuous f ↔ ∀ i j, UniformContinuous fun x => f x i j 
goal: UniformContinuous f ↔ ∀ (i : m) (j : n), UniformContinuous fun x => f x i j

full_name: Matrix.instCompleteSpace
code: instance [CompleteSpace 𝕜] : CompleteSpace (Matrix m n 𝕜) 
goal: CompleteSpace (Matrix m n 𝕜)

full_name: Matrix.instT0Space
code: instance [T0Space 𝕜] : T0Space (Matrix m n 𝕜) 
goal: T0Space (Matrix m n 𝕜)
File: Mathlib/Topology/UniformSpace/CompleteSeparated.lean

full_name: IsComplete.isClosed
code: /-- In a separated space, a complete set is closed. -/
theorem IsComplete.isClosed [UniformSpace α] [T0Space α] {s : Set α} (h : IsComplete s) :
    IsClosed s 
goal: IsClosed s

full_name: UniformEmbedding.toClosedEmbedding
code: theorem UniformEmbedding.toClosedEmbedding [UniformSpace α] [UniformSpace β] [CompleteSpace α]
    [T0Space β] {f : α → β} (hf : UniformEmbedding f) :
    ClosedEmbedding f 
goal: ClosedEmbedding f

full_name: DenseInducing.continuous_extend_of_cauchy
code: theorem continuous_extend_of_cauchy {e : α → β} {f : α → γ} (de : DenseInducing e)
    (h : ∀ b : β, Cauchy (map f (comap e <| 𝓝 b))) : Continuous (de.extend f) 
goal: Continuous (de.extend f)
File: Mathlib/Topology/UniformSpace/CompareReals.lean

full_name: Rat.uniformSpace_eq
code: /-- The metric space uniform structure on ℚ (which presupposes the existence
of real numbers) agrees with the one coming directly from (abs : ℚ → ℚ). -/
theorem Rat.uniformSpace_eq :
    (AbsoluteValue.abs : AbsoluteValue ℚ ℚ).uniformSpace = PseudoMetricSpace.toUniformSpace 
goal: AbsoluteValue.abs.uniformSpace = PseudoMetricSpace.toUniformSpace

full_name: rationalCauSeqPkg
code: /-- Cauchy reals packaged as a completion of ℚ using the absolute value route. -/
def rationalCauSeqPkg : @AbstractCompletion ℚ <| (@AbsoluteValue.abs ℚ _).uniformSpace 
goal: AbstractCompletion ℚ

full_name: CompareReals.Q
code: /-- Type wrapper around ℚ to make sure the absolute value uniform space instance is picked up
instead of the metric space one. We proved in `Rat.uniformSpace_eq` that they are equal,
but they are not definitionaly equal, so it would confuse the type class system (and probably
also human readers). -/
def Q 
goal: Type

full_name: CompareReals.uniformSpace
code: instance uniformSpace : UniformSpace Q 
goal: UniformSpace CompareReals.Q

full_name: CompareReals.Bourbakiℝ
code: /-- Real numbers constructed as in Bourbaki. -/
def Bourbakiℝ : Type 
goal: Type

full_name: CompareReals.Bourbaki.uniformSpace
code: instance Bourbaki.uniformSpace : UniformSpace Bourbakiℝ 
goal: UniformSpace CompareReals.Bourbakiℝ

full_name: CompareReals.bourbakiPkg
code: /-- Bourbaki reals packaged as a completion of Q using the general theory. -/
def bourbakiPkg : AbstractCompletion Q 
goal: AbstractCompletion CompareReals.Q

full_name: CompareReals.compareEquiv
code: /-- The uniform bijection between Bourbaki and Cauchy reals. -/
noncomputable def compareEquiv : Bourbakiℝ ≃ᵤ ℝ 
goal: CompareReals.Bourbakiℝ ≃ᵤ ℝ

full_name: CompareReals.compare_uc
code: theorem compare_uc : UniformContinuous compareEquiv 
goal: UniformContinuous ⇑CompareReals.compareEquiv

full_name: CompareReals.compare_uc_symm
code: theorem compare_uc_symm : UniformContinuous compareEquiv.symm 
goal: UniformContinuous ⇑CompareReals.compareEquiv.symm
File: Mathlib/Topology/UniformSpace/AbsoluteValue.lean

full_name: AbsoluteValue.uniformSpace
code: /-- The uniform structure coming from an absolute value. -/
def uniformSpace : UniformSpace R 
goal: UniformSpace R

full_name: AbsoluteValue.hasBasis_uniformity
code: theorem hasBasis_uniformity :
    𝓤[abv.uniformSpace].HasBasis ((0 : 𝕜) < ·) fun ε => { p : R × R | abv (p.2 - p.1) < ε } 
goal: (𝓤 R).HasBasis (fun x => 0 < x) fun ε => {p | abv (p.2 - p.1) < ε}
File: Mathlib/Topology/Category/Profinite/CofilteredLimit.lean

full_name: Profinite.exists_isClopen_of_cofiltered
code: /-- If `X` is a cofiltered limit of profinite sets, then any clopen subset of `X` arises from
a clopen set in one of the terms in the limit.
-/
theorem exists_isClopen_of_cofiltered {U : Set C.pt} (hC : IsLimit C) (hU : IsClopen U) :
    ∃ (j : J) (V : Set (F.obj j)), IsClopen V ∧ U = C.π.app j ⁻¹' V 
goal: ∃ j V, IsClopen V ∧ U = ⇑(C.π.app j) ⁻¹' V

full_name: Profinite.exists_locallyConstant_fin_two
code: theorem exists_locallyConstant_fin_two (hC : IsLimit C) (f : LocallyConstant C.pt (Fin 2)) :
    ∃ (j : J) (g : LocallyConstant (F.obj j) (Fin 2)), f = g.comap (C.π.app _) 
goal: ∃ j g, f = LocallyConstant.comap (C.π.app j) g

full_name: Profinite.exists_locallyConstant_finite_aux
code: theorem exists_locallyConstant_finite_aux {α : Type*} [Finite α] (hC : IsLimit C)
    (f : LocallyConstant C.pt α) : ∃ (j : J) (g : LocallyConstant (F.obj j) (α → Fin 2)),
      (f.map fun a b => if a = b then (0 : Fin 2) else 1) = g.comap (C.π.app _) 
goal: ∃ j g, LocallyConstant.map (fun a b => if a = b then 0 else 1) f = LocallyConstant.comap (C.π.app j) g

full_name: Profinite.exists_locallyConstant_finite_nonempty
code: theorem exists_locallyConstant_finite_nonempty {α : Type*} [Finite α] [Nonempty α]
    (hC : IsLimit C) (f : LocallyConstant C.pt α) :
    ∃ (j : J) (g : LocallyConstant (F.obj j) α), f = g.comap (C.π.app _) 
goal: ∃ j g, f = LocallyConstant.comap (C.π.app j) g

full_name: Profinite.exists_locallyConstant
code: /-- Any locally constant function from a cofiltered limit of profinite sets factors through
one of the components. -/
theorem exists_locallyConstant {α : Type*} (hC : IsLimit C) (f : LocallyConstant C.pt α) :
    ∃ (j : J) (g : LocallyConstant (F.obj j) α), f = g.comap (C.π.app _) 
goal: ∃ j g, f = LocallyConstant.comap (C.π.app j) g
File: Mathlib/Topology/MetricSpace/Sequences.lean

full_name: SeqCompact.lebesgue_number_lemma_of_metric
code: @[deprecated lebesgue_number_lemma_of_metric (since := "2024-02-24")]
nonrec theorem SeqCompact.lebesgue_number_lemma_of_metric {ι : Sort*} {c : ι → Set X} {s : Set X}
    (hs : IsSeqCompact s) (hc₁ : ∀ i, IsOpen (c i)) (hc₂ : s ⊆ ⋃ i, c i) :
    ∃ δ > 0, ∀ a ∈ s, ∃ i, ball a δ ⊆ c i 
goal: ∃ δ > 0, ∀ a ∈ s, ∃ i, Metric.ball a δ ⊆ c i

full_name: tendsto_subseq_of_frequently_bounded
code: /-- A version of **Bolzano-Weierstrass**: in a proper metric space (eg. $ℝ^n$),
every bounded sequence has a converging subsequence. This version assumes only
that the sequence is frequently in some bounded set. -/
theorem tendsto_subseq_of_frequently_bounded (hs : IsBounded s) {x : ℕ → X}
    (hx : ∃ᶠ n in atTop, x n ∈ s) :
    ∃ a ∈ closure s, ∃ φ : ℕ → ℕ, StrictMono φ ∧ Tendsto (x ∘ φ) atTop (𝓝 a) 
goal: ∃ a ∈ closure s, ∃ φ, StrictMono φ ∧ Filter.Tendsto (x ∘ φ) Filter.atTop (𝓝 a)

full_name: tendsto_subseq_of_bounded
code: /-- A version of **Bolzano-Weierstrass**: in a proper metric space (eg. $ℝ^n$),
every bounded sequence has a converging subsequence. -/
theorem tendsto_subseq_of_bounded (hs : IsBounded s) {x : ℕ → X} (hx : ∀ n, x n ∈ s) :
    ∃ a ∈ closure s, ∃ φ : ℕ → ℕ, StrictMono φ ∧ Tendsto (x ∘ φ) atTop (𝓝 a) 
goal: ∃ a ∈ closure s, ∃ φ, StrictMono φ ∧ Filter.Tendsto (x ∘ φ) Filter.atTop (𝓝 a)
File: Mathlib/Topology/MetricSpace/ProperSpace/Lemmas.lean

full_name: exists_pos_lt_subset_ball
code: /-- If a nonempty ball in a proper space includes a closed set `s`, then there exists a nonempty
ball with the same center and a strictly smaller radius that includes `s`. -/
theorem exists_pos_lt_subset_ball (hr : 0 < r) (hs : IsClosed s) (h : s ⊆ ball x r) :
    ∃ r' ∈ Ioo 0 r, s ⊆ ball x r' 
goal: ∃ r' ∈ Set.Ioo 0 r, s ⊆ Metric.ball x r'

full_name: exists_lt_subset_ball
code: /-- If a ball in a proper space includes a closed set `s`, then there exists a ball with the same
center and a strictly smaller radius that includes `s`. -/
theorem exists_lt_subset_ball (hs : IsClosed s) (h : s ⊆ ball x r) : ∃ r' < r, s ⊆ ball x r' 
goal: ∃ r' < r, s ⊆ Metric.ball x r'

full_name: Metric.exists_isLocalMin_mem_ball
code: theorem Metric.exists_isLocalMin_mem_ball [TopologicalSpace β]
    [ConditionallyCompleteLinearOrder β] [OrderTopology β] {f : α → β} {a z : α} {r : ℝ}
    (hf : ContinuousOn f (closedBall a r)) (hz : z ∈ closedBall a r)
    (hf1 : ∀ z' ∈ sphere a r, f z < f z') : ∃ z ∈ ball a r, IsLocalMin f z 
goal: ∃ z ∈ Metric.ball a r, IsLocalMin f z
File: Mathlib/Topology/MetricSpace/CauSeqFilter.lean

full_name: CauSeq.tendsto_limit
code: theorem CauSeq.tendsto_limit [NormedRing β] [hn : IsAbsoluteValue (norm : β → ℝ)]
    (f : CauSeq β norm) [CauSeq.IsComplete β norm] : Tendsto f atTop (𝓝 f.lim) 
goal: Filter.Tendsto (↑f) Filter.atTop (𝓝 f.lim)

full_name: CauchySeq.isCauSeq
code: theorem CauchySeq.isCauSeq {f : ℕ → β} (hf : CauchySeq f) : IsCauSeq norm f 
goal: IsCauSeq norm f

full_name: CauSeq.cauchySeq
code: theorem CauSeq.cauchySeq (f : CauSeq β norm) : CauchySeq f 
goal: CauchySeq ↑f

full_name: isCauSeq_iff_cauchySeq
code: /-- In a normed field, `CauSeq` coincides with the usual notion of Cauchy sequences. -/
theorem isCauSeq_iff_cauchySeq {α : Type u} [NormedField α] {u : ℕ → α} :
    IsCauSeq norm u ↔ CauchySeq u 
goal: IsCauSeq norm u ↔ CauchySeq u

full_name: completeSpace_of_cauSeq_isComplete
code: /-- A complete normed field is complete as a metric space, as Cauchy sequences converge by
assumption and this suffices to characterize completeness. -/
instance (priority := 100) completeSpace_of_cauSeq_isComplete [CauSeq.IsComplete β norm] :
    CompleteSpace β 
goal: CompleteSpace β
File: Mathlib/Topology/MetricSpace/Kuratowski.lean

full_name: KuratowskiEmbedding.embeddingOfSubset
code: /-- A metric space can be embedded in `l^∞(ℝ)` via the distances to points in
a fixed countable set, if this set is dense. This map is given in `kuratowskiEmbedding`,
without density assumptions. -/
def embeddingOfSubset : ℓ^∞(ℕ) 
goal: ↥(lp (fun i => ℝ) ⊤)

full_name: KuratowskiEmbedding.embeddingOfSubset_coe
code: theorem embeddingOfSubset_coe : embeddingOfSubset x a n = dist a (x n) - dist (x 0) (x n) 
goal: ↑(KuratowskiEmbedding.embeddingOfSubset x a) n = dist a (x n) - dist (x 0) (x n)

full_name: KuratowskiEmbedding.embeddingOfSubset_dist_le
code: /-- The embedding map is always a semi-contraction. -/
theorem embeddingOfSubset_dist_le (a b : α) :
    dist (embeddingOfSubset x a) (embeddingOfSubset x b) ≤ dist a b 
goal: dist (KuratowskiEmbedding.embeddingOfSubset x a) (KuratowskiEmbedding.embeddingOfSubset x b) ≤ dist a b

full_name: KuratowskiEmbedding.embeddingOfSubset_isometry
code: /-- When the reference set is dense, the embedding map is an isometry on its image. -/
theorem embeddingOfSubset_isometry (H : DenseRange x) : Isometry (embeddingOfSubset x) 
goal: Isometry (KuratowskiEmbedding.embeddingOfSubset x)

full_name: KuratowskiEmbedding.exists_isometric_embedding
code: /-- Every separable metric space embeds isometrically in `ℓ^∞(ℕ)`. -/
theorem exists_isometric_embedding (α : Type u) [MetricSpace α] [SeparableSpace α] :
    ∃ f : α → ℓ^∞(ℕ), Isometry f 
goal: ∃ f, Isometry f

full_name: kuratowskiEmbedding
code: /-- The Kuratowski embedding is an isometric embedding of a separable metric space in `ℓ^∞(ℕ, ℝ)`.
-/
def kuratowskiEmbedding (α : Type u) [MetricSpace α] [SeparableSpace α] : α → ℓ^∞(ℕ) 
goal: α → ↥(lp (fun i => ℝ) ⊤)

full_name: kuratowskiEmbedding.isometry
code: /--
The Kuratowski embedding is an isometry.
Theorem 2.1 of [Assaf Naor, *Metric Embeddings and Lipschitz Extensions*][Naor-2015]. -/
protected theorem kuratowskiEmbedding.isometry (α : Type u) [MetricSpace α] [SeparableSpace α] :
    Isometry (kuratowskiEmbedding α) 
goal: Isometry (kuratowskiEmbedding α)

full_name: NonemptyCompacts.kuratowskiEmbedding
code: /-- Version of the Kuratowski embedding for nonempty compacts -/
nonrec def NonemptyCompacts.kuratowskiEmbedding (α : Type u) [MetricSpace α] [CompactSpace α]
    [Nonempty α] : NonemptyCompacts ℓ^∞(ℕ) 
goal: TopologicalSpace.NonemptyCompacts ↥(lp (fun i => ℝ) ⊤)

full_name: LipschitzOnWith.extend_lp_infty
code: /--
A function `f : α → ℓ^∞(ι, ℝ)` which is `K`-Lipschitz on a subset `s` admits a `K`-Lipschitz
extension to the whole space.

Theorem 2.2 of [Assaf Naor, *Metric Embeddings and Lipschitz Extensions*][Naor-2015]

The same result for the case of a finite type `ι` is implemented in
`LipschitzOnWith.extend_pi`.
-/
theorem LipschitzOnWith.extend_lp_infty [PseudoMetricSpace α] {s : Set α} {ι : Type*}
    {f : α → ℓ^∞(ι)} {K : ℝ≥0} (hfl : LipschitzOnWith K f s) :
    ∃ g : α → ℓ^∞(ι), LipschitzWith K g ∧ EqOn f g s 
goal: ∃ g, LipschitzWith K g ∧ Set.EqOn f g s
File: Mathlib/Topology/MetricSpace/Perfect.lean

full_name: _private.Mathlib.Topology.MetricSpace.Perfect.0.Perfect.small_diam_aux
code: private theorem Perfect.small_diam_aux (ε_pos : 0 < ε) {x : α} (xC : x ∈ C) :
    let D := closure (EMetric.ball x (ε / 2) ∩ C)
    Perfect D ∧ D.Nonempty ∧ D ⊆ C ∧ EMetric.diam D ≤ ε 
goal: let D := closure (EMetric.ball x (ε / 2) ∩ C);
Perfect D ∧ D.Nonempty ∧ D ⊆ C ∧ EMetric.diam D ≤ ε

full_name: Perfect.small_diam_splitting
code: /-- A refinement of `Perfect.splitting` for metric spaces, where we also control
the diameter of the new perfect sets. -/
theorem Perfect.small_diam_splitting (ε_pos : 0 < ε) :
    ∃ C₀ C₁ : Set α, (Perfect C₀ ∧ C₀.Nonempty ∧ C₀ ⊆ C ∧ EMetric.diam C₀ ≤ ε) ∧
    (Perfect C₁ ∧ C₁.Nonempty ∧ C₁ ⊆ C ∧ EMetric.diam C₁ ≤ ε) ∧ Disjoint C₀ C₁ 
goal: ∃ C₀ C₁,
  (Perfect C₀ ∧ C₀.Nonempty ∧ C₀ ⊆ C ∧ EMetric.diam C₀ ≤ ε) ∧
    (Perfect C₁ ∧ C₁.Nonempty ∧ C₁ ⊆ C ∧ EMetric.diam C₁ ≤ ε) ∧ Disjoint C₀ C₁

full_name: Perfect.exists_nat_bool_injection
code: /-- Any nonempty perfect set in a complete metric space admits a continuous injection
from the Cantor space, `ℕ → Bool`. -/
theorem Perfect.exists_nat_bool_injection [CompleteSpace α] :
    ∃ f : (ℕ → Bool) → α, range f ⊆ C ∧ Continuous f ∧ Injective f 
goal: ∃ f, Set.range f ⊆ C ∧ Continuous f ∧ Function.Injective f

full_name: IsClosed.exists_nat_bool_injection_of_not_countable
code: /-- Any closed uncountable subset of a Polish space admits a continuous injection
from the Cantor space `ℕ → Bool`. -/
theorem IsClosed.exists_nat_bool_injection_of_not_countable {α : Type*} [TopologicalSpace α]
    [PolishSpace α] {C : Set α} (hC : IsClosed C) (hunc : ¬C.Countable) :
    ∃ f : (ℕ → Bool) → α, range f ⊆ C ∧ Continuous f ∧ Function.Injective f 
goal: ∃ f, Set.range f ⊆ C ∧ Continuous f ∧ Function.Injective f
File: Mathlib/Topology/Sheaves/Init.lean

full_name: initFn._@.Mathlib.Topology.Sheaves.Init._hyg.5
code: declare_aesop_rule_sets [Restrict]
goal: IO Unit
File: Mathlib/Topology/Sheaves/Limits.lean

full_name: TopCat.instHasLimitsPresheaf
code: instance [HasLimits C] (X : TopCat.{v}) : HasLimits.{v} (Presheaf C X) 
goal: CategoryTheory.Limits.HasLimits (TopCat.Presheaf C X)

full_name: TopCat.instHasColimitsOfSizePresheafOfHasColimits
code: instance [HasColimits.{v, u} C] (X : TopCat.{w}) : HasColimitsOfSize.{v, v} (Presheaf C X) 
goal: CategoryTheory.Limits.HasColimitsOfSize.{v, v, max v w, max (max u v) w} (TopCat.Presheaf C X)

full_name: TopCat.instCreatesLimitsSheafPresheafForgetOfHasLimits
code: instance [HasLimits C] (X : TopCat) : CreatesLimits.{v, v} (Sheaf.forget C X) 
goal: CategoryTheory.CreatesLimits (TopCat.Sheaf.forget C X)

full_name: TopCat.instHasLimitsOfSizeSheafOfHasLimits
code: instance [HasLimits C] (X : TopCat.{v}) : HasLimitsOfSize.{v, v} (Sheaf.{v} C X) 
goal: CategoryTheory.Limits.HasLimitsOfSize.{v, v, v, max v u} (TopCat.Sheaf C X)

full_name: TopCat.isSheaf_of_isLimit
code: theorem isSheaf_of_isLimit [HasLimits C] {X : TopCat} (F : J ⥤ Presheaf.{v} C X)
    (H : ∀ j, (F.obj j).IsSheaf) {c : Cone F} (hc : IsLimit c) : c.pt.IsSheaf 
goal: c.pt.IsSheaf

full_name: TopCat.limit_isSheaf
code: theorem limit_isSheaf [HasLimits C] {X : TopCat} (F : J ⥤ Presheaf.{v} C X)
    (H : ∀ j, (F.obj j).IsSheaf) : (limit F).IsSheaf 
goal: (CategoryTheory.Limits.limit F).IsSheaf
File: Mathlib/Topology/Sheaves/Forget.lean

full_name: TopCat.Presheaf.isSheaf_iff_isSheaf_comp'
code: /-- If `G : C ⥤ D` is a functor which reflects isomorphisms and preserves limits
(we assume all limits exist in `C`),
then checking the sheaf condition for a presheaf `F : Presheaf C X`
is equivalent to checking the sheaf condition for `F ⋙ G`.

The important special case is when
`C` is a concrete category with a forgetful functor
that preserves limits and reflects isomorphisms.
Then to check the sheaf condition it suffices to check it on the underlying sheaf of types.

Another useful example is the forgetful functor `TopCommRing ⥤ Top`.

See <https://stacks.math.columbia.edu/tag/0073>.
In fact we prove a stronger version with arbitrary target category.
-/
theorem isSheaf_iff_isSheaf_comp' {C : Type u₁} [Category.{v₁} C] {D : Type u₂} [Category.{v₂} D]
    (G : C ⥤ D) [G.ReflectsIsomorphisms] [HasLimitsOfSize.{v, v} C] [PreservesLimitsOfSize.{v, v} G]
    {X : TopCat.{v}} (F : Presheaf C X) : Presheaf.IsSheaf F ↔ Presheaf.IsSheaf (F ⋙ G) 
goal: F.IsSheaf ↔ TopCat.Presheaf.IsSheaf (F ⋙ G)

full_name: TopCat.Presheaf.isSheaf_iff_isSheaf_comp
code: theorem isSheaf_iff_isSheaf_comp {C : Type u₁} [Category.{v} C] {D : Type u₂} [Category.{v} D]
    (G : C ⥤ D) [G.ReflectsIsomorphisms] [HasLimits C] [PreservesLimits G]
    {X : TopCat.{v}} (F : Presheaf C X) : Presheaf.IsSheaf F ↔ Presheaf.IsSheaf (F ⋙ G) 
goal: F.IsSheaf ↔ TopCat.Presheaf.IsSheaf (F ⋙ G)
File: Mathlib/Topology/Sheaves/SheafOfFunctions.lean

full_name: TopCat.Presheaf.toTypes_isSheaf
code: /-- We show that the presheaf of functions to a type `T`
(no continuity assumptions, just plain functions)
form a sheaf.

In fact, the proof is identical when we do this for dependent functions to a type family `T`,
so we do the more general case.
-/
theorem toTypes_isSheaf (T : X → Type u) : (presheafToTypes X T).IsSheaf 
goal: (X.presheafToTypes T).IsSheaf

full_name: TopCat.Presheaf.toType_isSheaf
code: /-- The presheaf of not-necessarily-continuous functions to
a target type `T` satsifies the sheaf condition.
-/
theorem toType_isSheaf (T : Type u) : (presheafToType X T).IsSheaf 
goal: (X.presheafToType T).IsSheaf

full_name: TopCat.sheafToTypes
code: /-- The sheaf of not-necessarily-continuous functions on `X` with values in type family
`T : X → Type u`.
-/
def sheafToTypes (T : X → Type u) : Sheaf (Type u) X 
goal: TopCat.Sheaf (Type u) X

full_name: TopCat.sheafToType
code: /-- The sheaf of not-necessarily-continuous functions on `X` with values in a type `T`.
-/
def sheafToType (T : Type u) : Sheaf (Type u) X 
goal: TopCat.Sheaf (Type u) X
File: Mathlib/Topology/Sheaves/Sheafify.lean

full_name: TopCat.Presheaf.Sheafify.isGerm
code: /--
The prelocal predicate on functions into the stalks, asserting that the function is equal to a germ.
-/
def isGerm : PrelocalPredicate fun x => F.stalk x 
goal: TopCat.PrelocalPredicate fun x => F.stalk x

full_name: TopCat.Presheaf.Sheafify.isLocallyGerm
code: /-- The local predicate on functions into the stalks,
asserting that the function is locally equal to a germ.
-/
def isLocallyGerm : LocalPredicate fun x => F.stalk x 
goal: TopCat.LocalPredicate fun x => F.stalk x

full_name: TopCat.Presheaf.sheafify
code: /-- The sheafification of a `Type` valued presheaf, defined as the functions into the stalks which
are locally equal to germs.
-/
def sheafify : Sheaf (Type v) X 
goal: TopCat.Sheaf (Type v) X

full_name: TopCat.Presheaf.toSheafify
code: /-- The morphism from a presheaf to its sheafification,
sending each section to its germs.
(This forms the unit of the adjunction.)
-/
def toSheafify : F ⟶ F.sheafify.1 
goal: F ⟶ F.sheafify.val

full_name: TopCat.Presheaf.stalkToFiber
code: /-- The natural morphism from the stalk of the sheafification to the original stalk.
In `sheafifyStalkIso` we show this is an isomorphism.
-/
def stalkToFiber (x : X) : F.sheafify.presheaf.stalk x ⟶ F.stalk x 
goal: F.sheafify.presheaf.stalk x ⟶ F.stalk x

full_name: TopCat.Presheaf.stalkToFiber_surjective
code: theorem stalkToFiber_surjective (x : X) : Function.Surjective (F.stalkToFiber x) 
goal: Function.Surjective (F.stalkToFiber x)

full_name: TopCat.Presheaf.stalkToFiber_injective
code: theorem stalkToFiber_injective (x : X) : Function.Injective (F.stalkToFiber x) 
goal: Function.Injective (F.stalkToFiber x)

full_name: TopCat.Presheaf.sheafifyStalkIso
code: /-- The isomorphism between a stalk of the sheafification and the original stalk.
-/
def sheafifyStalkIso (x : X) : F.sheafify.presheaf.stalk x ≅ F.stalk x 
goal: F.sheafify.presheaf.stalk x ≅ F.stalk x
File: Mathlib/Topology/Sheaves/PUnit.lean

full_name: TopCat.Presheaf.isSheaf_of_isTerminal_of_indiscrete
code: theorem isSheaf_of_isTerminal_of_indiscrete {X : TopCat.{w}} (hind : X.str = ⊤) (F : Presheaf C X)
    (it : IsTerminal <| F.obj <| op ⊥) : F.IsSheaf 
goal: F.IsSheaf

full_name: TopCat.Presheaf.isSheaf_iff_isTerminal_of_indiscrete
code: theorem isSheaf_iff_isTerminal_of_indiscrete {X : TopCat.{w}} (hind : X.str = ⊤)
    (F : Presheaf C X) : F.IsSheaf ↔ Nonempty (IsTerminal <| F.obj <| op ⊥) 
goal: F.IsSheaf ↔ Nonempty (CategoryTheory.Limits.IsTerminal (F.obj (Opposite.op ⊥)))

full_name: TopCat.Presheaf.isSheaf_on_punit_of_isTerminal
code: theorem isSheaf_on_punit_of_isTerminal (F : Presheaf C (TopCat.of PUnit))
    (it : IsTerminal <| F.obj <| op ⊥) : F.IsSheaf 
goal: F.IsSheaf

full_name: TopCat.Presheaf.isSheaf_on_punit_iff_isTerminal
code: theorem isSheaf_on_punit_iff_isTerminal (F : Presheaf C (TopCat.of PUnit)) :
    F.IsSheaf ↔ Nonempty (IsTerminal <| F.obj <| op ⊥) 
goal: F.IsSheaf ↔ Nonempty (CategoryTheory.Limits.IsTerminal (F.obj (Opposite.op ⊥)))
File: Mathlib/Topology/Sheaves/LocallySurjective.lean

full_name: TopCat.Presheaf.IsLocallySurjective
code: /-- A map of presheaves `T : ℱ ⟶ 𝒢` is **locally surjective** if for any open set `U`,
section `t` over `U`, and `x ∈ U`, there exists an open set `x ∈ V ⊆ U` and a section `s` over `V`
such that `$T_*(s_V) = t|_V$`.

See `TopCat.Presheaf.isLocallySurjective_iff` below.
-/
def IsLocallySurjective (T : ℱ ⟶ 𝒢) 
goal: Prop

full_name: TopCat.Presheaf.isLocallySurjective_iff
code: theorem isLocallySurjective_iff (T : ℱ ⟶ 𝒢) :
    IsLocallySurjective T ↔
      ∀ (U t), ∀ x ∈ U, ∃ (V : _) (ι : V ⟶ U), (∃ s, T.app _ s = t |_ₕ ι) ∧ x ∈ V 
goal: TopCat.Presheaf.IsLocallySurjective T ↔
  ∀ (U : TopologicalSpace.Opens ↑X) (t : (CategoryTheory.forget C).obj (𝒢.obj (Opposite.op U))),
    ∀ x ∈ U, ∃ V ι, (∃ s, (T.app (Opposite.op V)) s = TopCat.Presheaf.restrict t ι) ∧ x ∈ V

full_name: TopCat.Presheaf.locally_surjective_iff_surjective_on_stalks
code: /-- An equivalent condition for a map of presheaves to be locally surjective
is for all the induced maps on stalks to be surjective. -/
theorem locally_surjective_iff_surjective_on_stalks (T : ℱ ⟶ 𝒢) :
    IsLocallySurjective T ↔ ∀ x : X, Function.Surjective ((stalkFunctor C x).map T) 
goal: TopCat.Presheaf.IsLocallySurjective T ↔ ∀ (x : ↑X), Function.Surjective ⇑((TopCat.Presheaf.stalkFunctor C x).map T)