ruc-ai4math/mathlib_handler_benchmark_410 huggingface dataset:
-- Mathlib/Dynamics/FixedPoints/Basic.lean
theorem fixedPoints_subset_range : fixedPoints f ⊆ Set.range f
-- Mathlib/Data/List/Infix.lean
theorem eq_of_prefix_of_length_eq (h : l₁ <+: l₂) : l₁.length = l₂.length → l₁ = l₂
-- Mathlib/Algebra/Order/Sub/Canonical.lean
protected theorem le_tsub_iff_right (ha : AddLECancellable a) (h : a ≤ c) :
    b ≤ c - a ↔ b + a ≤ c
-- Mathlib/Algebra/Homology/ShortComplex/Exact.lean
lemma exact_iff_iCycles_pOpcycles_zero [S.HasHomology] :
    S.Exact ↔ S.iCycles ≫ S.pOpcycles = 0
-- Mathlib/Data/Sym/Basic.lean
@[simp]
theorem coe_cast (h : n = m) : (Sym.cast h s : Multiset α) = s
-- Mathlib/Order/Interval/Finset/Basic.lean
theorem Ioo_subset_Iio_self : Ioo a b ⊆ Iio b
-- Mathlib/Data/Analysis/Topology.lean
protected theorem mem_nhds [T : TopologicalSpace α] (F : Realizer α) {s : Set α} {a : α} :
    s ∈ 𝓝 a ↔ ∃ b, a ∈ F.F b ∧ F.F b ⊆ s
-- Mathlib/Data/Finset/Option.lean
@[simp]
theorem eraseNone_insertNone (s : Finset α) : eraseNone (insertNone s) = s
-- .lake/packages/lean4/src/lean/Init/Data/Array/Mem.lean
@[simp] theorem sizeOf_get [SizeOf α] (as : Array α) (i : Fin as.size) : sizeOf (as.get i) < sizeOf as
-- Mathlib/Topology/Order/Monotone.lean
theorem IsClosed.csInf_mem {s : Set α} (hc : IsClosed s) (hs : s.Nonempty) (B : BddBelow s) :
    sInf s ∈ s
-- Mathlib/Topology/Separation.lean
lemma isClosed_singleton_inter [T1Space X] {A : Set X} {a : X} : IsClosed ({a} ∩ A)
-- Mathlib/Data/Nat/Choose/Basic.lean
theorem choose_symm_add {a b : ℕ} : choose (a + b) a = choose (a + b) b
-- Mathlib/Data/Complex/Basic.lean
@[simp]
lemma re_ofNat (n : ℕ) [n.AtLeastTwo] : (no_index (OfNat.ofNat n) : ℂ).re = OfNat.ofNat n
-- Mathlib/Algebra/Group/ULift.lean
@[simp, norm_cast]
theorem down_intCast [IntCast α] (n : ℤ) : down (n : ULift α) = n
-- Mathlib/Algebra/Order/Ring/Unbundled/Basic.lean
lemma mul_neg_iff [PosMulStrictMono α] [MulPosStrictMono α]
    [ContravariantClass α α (· + ·) (· < ·)] [CovariantClass α α (· + ·) (· < ·)] :
    a * b < 0 ↔ 0 < a ∧ b < 0 ∨ a < 0 ∧ 0 < b
-- Mathlib/GroupTheory/FreeGroup/Basic.lean
/-- `reduce` is idempotent, i.e. the maximal reduction of the maximal reduction of a word is the
  maximal reduction of the word. -/
@[to_additive (attr := simp) "`reduce` is idempotent, i.e. the maximal reduction of the maximal
  reduction of a word is the maximal reduction of the word."]
theorem reduce.idem : reduce (reduce L) = reduce L
-- Mathlib/Combinatorics/SimpleGraph/Subgraph.lean
/-- The induced subgraph of a subgraph. The expectation is that `s ⊆ G'.verts` for the usual
notion of an induced subgraph, but, in general, `s` is taken to be the new vertex set and edges
are induced from the subgraph `G'`. -/
@[simps]
def induce (G' : G.Subgraph) (s : Set V) : G.Subgraph
-- Mathlib/RingTheory/IntegralClosure/IntegralRestrict.lean
lemma Algebra.algebraMap_intTrace (x : B) :
    algebraMap A K (Algebra.intTrace A B x) = Algebra.trace K L (algebraMap B L x)
-- Mathlib/Algebra/TrivSqZeroExt.lean
/-- This cannot be marked `@[ext]` as it ends up being used instead of `LinearMap.prod_ext` when
working with `R × M`. -/
theorem linearMap_ext {N} [Semiring S] [AddCommMonoid R] [AddCommMonoid M] [AddCommMonoid N]
    [Module S R] [Module S M] [Module S N] ⦃f g : tsze R M →ₗ[S] N⦄
    (hl : ∀ r, f (inl r) = g (inl r)) (hr : ∀ m, f (inr m) = g (inr m)) : f = g
-- Mathlib/AlgebraicTopology/DoldKan/Homotopies.lean
/-- This lemma is meant to be used with `nullHomotopicMap'_f_of_not_rel_left` -/
theorem cs_down_0_not_rel_left (j : ℕ) : ¬c.Rel 0 j
-- Mathlib/RingTheory/Polynomial/Eisenstein/IsIntegral.lean
/-- Let `K` be the field of fraction of an integrally closed domain `R` and let `L` be a separable
extension of `K`, generated by an integral power basis `B` such that the minimal polynomial of
`B.gen` is Eisenstein at `p`. Given `z : L` integral over `R`, if `p ^ n • z ∈ adjoin R {B.gen}`,
then `z ∈ adjoin R {B.gen}`. Together with `Algebra.discr_mul_isIntegral_mem_adjoin` this result
often allows to compute the ring of integers of `L`. -/
theorem mem_adjoin_of_smul_prime_pow_smul_of_minpoly_isEisensteinAt {B : PowerBasis K L}
    (hp : Prime p) (hBint : IsIntegral R B.gen) {n : ℕ} {z : L} (hzint : IsIntegral R z)
    (hz : p ^ n • z ∈ adjoin R ({B.gen} : Set L)) (hei : (minpoly R B.gen).IsEisensteinAt 𝓟) :
    z ∈ adjoin R ({B.gen} : Set L)
-- Mathlib/Topology/Connected/PathConnected.lean
theorem refl_reparam {f : I → I} (hfcont : Continuous f) (hf₀ : f 0 = 0) (hf₁ : f 1 = 1) :
    (refl x).reparam f hfcont hf₀ hf₁ = refl x
-- Mathlib/Order/Interval/Set/Basic.lean
@[simp]
theorem Iic_bot [PartialOrder α] [OrderBot α] : Iic (⊥ : α) = {⊥}
-- Mathlib/Control/Functor/Multivariate.lean
@[simp]
theorem id_map (x : F α) : TypeVec.id <$$> x = x
-- Mathlib/CategoryTheory/GradedObject/Monoidal.lean
lemma tensorHom_def {X₁ X₂ Y₁ Y₂ : GradedObject I C} (f : X₁ ⟶ X₂) (g : Y₁ ⟶ Y₂)
    [HasTensor X₁ Y₁] [HasTensor X₂ Y₂] [HasTensor X₂ Y₁] :
    tensorHom f g = whiskerRight f Y₁ ≫ whiskerLeft X₂ g
-- Mathlib/LinearAlgebra/Matrix/PosDef.lean
theorem transpose {M : Matrix n n R} (hM : M.PosDef) : Mᵀ.PosDef
-- Mathlib/ModelTheory/Substructures.lean
/-- A first-order hom `f : M → N` whose values lie in a substructure `p ⊆ N` can be restricted to a
hom `M → p`. -/
@[simps]
def codRestrict (p : L.Substructure N) (f : M →[L] N) (h : ∀ c, f c ∈ p) : M →[L] p
-- Mathlib/Topology/Constructions.lean
theorem nhds_pi {a : ∀ i, π i} : 𝓝 a = pi fun i => 𝓝 (a i)
-- Mathlib/Algebra/BigOperators/Group/Finset.lean
@[deprecated sum_count_eq_card (since := "2024-07-21")]
theorem sum_count_eq [Fintype α] (s : Multiset α) : ∑ a, s.count a = Multiset.card s
-- Mathlib/GroupTheory/CoprodI.lean
@[simp]
theorem singleton_head {i} (x : M i) (hne_one : x ≠ 1) : (singleton x hne_one).head = x
-- Mathlib/Algebra/Order/Module/Defs.lean
@[simp]
lemma smul_le_smul_iff_of_pos_right [SMulPosMono α β] [SMulPosReflectLE α β] (hb : 0 < b) :
    a₁ • b ≤ a₂ • b ↔ a₁ ≤ a₂
-- Mathlib/RingTheory/Polynomial/Cyclotomic/Basic.lean
/-- The natural degree of `cyclotomic n` is `totient n`. -/
theorem natDegree_cyclotomic (n : ℕ) (R : Type*) [Ring R] [Nontrivial R] :
    (cyclotomic n R).natDegree = Nat.totient n
-- Mathlib/LinearAlgebra/LinearIndependent.lean
/-- A subfamily of a linearly independent family (i.e., a composition with an injective map) is a
linearly independent family. -/
theorem LinearIndependent.comp (h : LinearIndependent R v) (f : ι' → ι) (hf : Injective f) :
    LinearIndependent R (v ∘ f)
-- Mathlib/Algebra/GroupWithZero/Units/Basic.lean
theorem ne_zero [Nontrivial M₀] {a : M₀} (ha : IsUnit a) : a ≠ 0
-- Mathlib/Topology/ContinuousFunction/Bounded.lean
@[simp]
theorem coe_zsmul (r : ℤ) (f : α →ᵇ β) : ⇑(r • f) = r • ⇑f
-- Mathlib/Order/Heyting/Basic.lean
theorem Disjoint.disjoint_sdiff_right (h : Disjoint a b) : Disjoint a (b \ c)
-- Mathlib/Topology/Category/Stonean/Limits.lean
/-- The inclusion maps into the explicit finite coproduct are open embeddings. -/
lemma finiteCoproduct.openEmbedding_ι {α : Type} [Finite α] (Z : α → Stonean.{u}) (a : α) :
    OpenEmbedding (finiteCoproduct.ι Z a)
-- Mathlib/RingTheory/GradedAlgebra/HomogeneousIdeal.lean
theorem Ideal.homogeneous_span (s : Set A) (h : ∀ x ∈ s, Homogeneous 𝒜 x) :
    (Ideal.span s).IsHomogeneous 𝒜
-- Mathlib/Data/Seq/Computation.lean
theorem think_mem {s : Computation α} {a} : a ∈ s → a ∈ think s
-- Mathlib/MeasureTheory/Measure/WithDensity.lean
lemma SigmaFinite.withDensity_of_ne_top [SigmaFinite μ] {f : α → ℝ≥0∞}
    (hf_ne_top : ∀ᵐ x ∂μ, f x ≠ ∞) : SigmaFinite (μ.withDensity f)
-- Mathlib/Analysis/Analytic/Basic.lean
/-- For `r` strictly smaller than the radius of `p`, then `‖pₙ‖ rⁿ = o(1)`. -/
theorem isLittleO_one_of_lt_radius (h : ↑r < p.radius) :
    (fun n => ‖p n‖ * (r : ℝ) ^ n) =o[atTop] (fun _ => 1 : ℕ → ℝ)
-- Mathlib/Data/Nat/Prime/Basic.lean
/-- Two prime powers with positive exponents are equal only when the primes and the
exponents are equal. -/
lemma Prime.pow_inj {p q m n : ℕ} (hp : p.Prime) (hq : q.Prime)
    (h : p ^ (m + 1) = q ^ (n + 1)) : p = q ∧ m = n
-- Mathlib/CategoryTheory/Comma/Over.lean
@[simp]
theorem map_map_left : ((map f).map g).left = g.left
-- Mathlib/Computability/PartrecCode.lean
theorem encodeCode_eq : encode = encodeCode
-- Mathlib/Order/Filter/Bases.lean
theorem Tendsto.basis_left (H : Tendsto f la lb) (hla : la.HasBasis pa sa) :
    ∀ t ∈ lb, ∃ i, pa i ∧ MapsTo f (sa i) t
-- Mathlib/Data/Nat/SuccPred.lean
lemma le_succ_iff_eq_or_le : m ≤ n.succ ↔ m = n.succ ∨ m ≤ n
-- .lake/packages/batteries/Batteries/Data/RBMap/WF.lean
/-- The `append` function preserves the ordering invariants. -/
protected theorem Ordered.append {l : RBNode α} {v : α} {r : RBNode α}
    (lv : l.All (cmpLT cmp · v)) (vr : r.All (cmpLT cmp v ·))
    (hl : l.Ordered cmp) (hr : r.Ordered cmp) : (append l r).Ordered cmp
-- Mathlib/Order/UpperLower/Basic.lean
theorem IsUpperSet.compl (hs : IsUpperSet s) : IsLowerSet sᶜ
-- Mathlib/Order/SymmDiff.lean
@[simp]
theorem sup_himp_bihimp : a ⊔ b ⇨ a ⇔ b = a ⇔ b
-- Mathlib/LinearAlgebra/BilinearForm/Properties.lean
theorem IsAdjointPair.eq (h : IsAdjointPair B B' f g) : ∀ {x y}, B' (f x) y = B x (g y)
-- Mathlib/Topology/Algebra/Group/Basic.lean
@[to_additive]
theorem group_inseparable_iff {x y : G} : Inseparable x y ↔ x / y ∈ closure (1 : Set G)
-- Mathlib/Dynamics/PeriodicPts.lean
protected theorem mod (hm : IsPeriodicPt f m x) (hn : IsPeriodicPt f n x) :
    IsPeriodicPt f (m % n) x
-- Mathlib/Analysis/Calculus/FormalMultilinearSeries.lean
@[simp]
theorem neg_apply (f : FormalMultilinearSeries 𝕜 E F) (n : ℕ) : (-f) n = - f n
-- Mathlib/Algebra/Quandle.lean
/-- The type of homomorphisms between shelves.
This is also the notion of rack and quandle homomorphisms.
-/
@[ext]
structure ShelfHom (S₁ : Type*) (S₂ : Type*) [Shelf S₁] [Shelf S₂] where
  /-- The function under the Shelf Homomorphism -/
  toFun : S₁ → S₂
  /-- The homomorphism property of a Shelf Homomorphism-/
  map_act' : ∀ {x y : S₁}, toFun (Shelf.act x y) = Shelf.act (toFun x) (toFun y)
-- Mathlib/Data/W/Cardinal.lean
/-- If, for any `a : α`, `β a` is finite, then the cardinality of `WType β`
  is at most the maximum of the cardinality of `α` and `ℵ₀`  -/
theorem cardinal_mk_le_max_aleph0_of_finite' [∀ a, Finite (β a)] :
    #(WType β) ≤ max (lift.{v} #α) ℵ₀
-- Mathlib/MeasureTheory/Integral/FundThmCalculus.lean
theorem finiteAt_inner {a : ℝ} (l : Filter ℝ) {l'} [h : FTCFilter a l l'] {μ : Measure ℝ}
    [IsLocallyFiniteMeasure μ] : μ.FiniteAtFilter l'
-- Mathlib/Order/Filter/Cofinite.lean
theorem hasBasis_cofinite : HasBasis cofinite (fun s : Set α => s.Finite) compl
-- Mathlib/Order/Interval/Set/UnorderedInterval.lean
theorem uIcc_prod_eq (a b : α × β) : [[a, b]] = [[a.1, b.1]] ×ˢ [[a.2, b.2]]
-- Mathlib/CategoryTheory/Shift/Basic.lean
lemma shiftFunctorComm_eq (i j k : A) (h : i + j = k) :
    shiftFunctorComm C i j = (shiftFunctorAdd' C i j k h).symm ≪≫
      shiftFunctorAdd' C j i k (by rw [add_comm j i, h])
-- Mathlib/Order/Filter/Curry.lean
theorem mem_curry_iff {f : Filter α} {g : Filter β} {s : Set (α × β)} :
    s ∈ f.curry g ↔ ∀ᶠ x : α in f, ∀ᶠ y : β in g, (x, y) ∈ s
-- Mathlib/SetTheory/Ordinal/Basic.lean
theorem lt_ord {c o} : o < ord c ↔ o.card < c
-- .lake/packages/lean4/src/lean/Init/Core.lean
theorem false_iff_true : (False ↔ True) ↔ False
-- Mathlib/MeasureTheory/Constructions/Cylinders.lean
theorem union_mem_measurableCylinders (hs : s ∈ measurableCylinders α)
    (ht : t ∈ measurableCylinders α) :
    s ∪ t ∈ measurableCylinders α
-- Mathlib/SetTheory/Ordinal/Principal.lean
/-- The main characterization theorem for additive principal ordinals. -/
theorem principal_add_iff_zero_or_omega_opow {o : Ordinal} :
    Principal (· + ·) o ↔ o = 0 ∨ ∃ a : Ordinal, o = (omega^a)
-- Mathlib/Topology/PartialHomeomorph.lean
theorem restr_trans (s : Set X) : (e.restr s).trans e' = (e.trans e').restr s
-- Mathlib/Data/Ordmap/Ordset.lean
theorem size_balance' {l x r} (hl : @Sized α l) (hr : Sized r) :
    size (@balance' α l x r) = size l + size r + 1
-- Mathlib/LinearAlgebra/TensorProduct/RightExactness.lean
theorem TensorProduct.map_surjective : Function.Surjective (TensorProduct.map g g')
-- Mathlib/Data/Finsupp/Defs.lean
theorem single_apply [Decidable (a = a')] : single a b a' = if a = a' then b else 0
-- Mathlib/Computability/Primrec.lean
theorem casesOn' {f g} (hf : Nat.Primrec f) (hg : Nat.Primrec g) :
    Nat.Primrec (unpaired fun z n => n.casesOn (f z) fun y => g <| Nat.pair z y)
-- Mathlib/CategoryTheory/Limits/Shapes/Equalizers.lean
@[simp]
theorem Fork.app_one_eq_ι_comp_left (s : Fork f g) : s.π.app one = s.ι ≫ f
-- Mathlib/Analysis/Complex/UpperHalfPlane/Basic.lean
theorem normSq_denom_ne_zero (g : GL(2, ℝ)⁺) (z : ℍ) : Complex.normSq (denom g z) ≠ 0
-- Mathlib/Data/Finset/Sym.lean
@[simp]
theorem sym2_empty : (∅ : Finset α).sym2 = ∅
-- Mathlib/Algebra/DirectSum/Internal.lean
theorem coe_of_mul_apply_aux [AddMonoid ι] [SetLike.GradedMonoid A] {i : ι} (r : A i)
    (r' : ⨁ i, A i) {j n : ι} (H : ∀ x : ι, i + x = n ↔ x = j) :
    ((of (fun i => A i) i r * r') n : R) = r * r' j
-- Mathlib/RingTheory/Localization/Basic.lean
theorem mk'_eq_iff_eq' {x₁ x₂} {y₁ y₂ : M} :
    mk' S x₁ y₁ = mk' S x₂ y₂ ↔ algebraMap R S (x₁ * y₂) = algebraMap R S (x₂ * y₁)
-- Mathlib/Topology/Constructions.lean
theorem Continuous.comp₄ {g : X × Y × Z × ζ → ε} (hg : Continuous g) {e : W → X} (he : Continuous e)
    {f : W → Y} (hf : Continuous f) {k : W → Z} (hk : Continuous k) {l : W → ζ}
    (hl : Continuous l) : Continuous fun w => g (e w, f w, k w, l w)
-- Mathlib/MeasureTheory/Integral/Lebesgue.lean
/-- Lebesgue integral of a bounded function over a set of finite measure is finite.
Note that this lemma assumes no regularity of either `f` or `s`. -/
theorem setLIntegral_lt_top_of_bddAbove {s : Set α} (hs : μ s ≠ ∞) {f : α → ℝ≥0}
    (hbdd : BddAbove (f '' s)) : ∫⁻ x in s, f x ∂μ < ∞
-- Mathlib/NumberTheory/Padics/PadicNumbers.lean
@[simp]
theorem AddValuation.map_zero : addValuationDef (0 : ℚ_[p]) = ⊤
-- Mathlib/Data/PNat/Basic.lean
@[simp]
theorem succPNat_lt_succPNat {m n : ℕ} : m.succPNat < n.succPNat ↔ m < n
-- Mathlib/Probability/ProbabilityMassFunction/Basic.lean
@[simp]
theorem toOuterMeasure_apply_finset (s : Finset α) : p.toOuterMeasure s = ∑ x ∈ s, p x
-- Mathlib/SetTheory/Ordinal/Exponential.lean
theorem log_of_not_one_lt_left {b : Ordinal} (h : ¬1 < b) (x : Ordinal) : log b x = 0
-- Mathlib/MeasureTheory/MeasurableSpace/CountablyGenerated.lean
lemma measurableSet_generateFrom_memPartition_iff (t : ℕ → Set α) (n : ℕ) (s : Set α) :
    MeasurableSet[generateFrom (memPartition t n)] s
      ↔ ∃ S : Finset (Set α), ↑S ⊆ memPartition t n ∧ s = ⋃₀ S
-- .lake/packages/batteries/Batteries/Data/List/Lemmas.lean
@[simp 1100] theorem disjoint_singleton : Disjoint l [a] ↔ a ∉ l
-- Mathlib/Analysis/CstarAlgebra/ContinuousFunctionalCalculus/Unital.lean
lemma cfcUnits_zpow (hf' : ∀ x ∈ spectrum R a, f x ≠ 0) (n : ℤ)
    (hf : ContinuousOn f (spectrum R a) := by cfc_cont_tac) (ha : p a := by cfc_tac) :
    (cfcUnits f a hf') ^ n =
      cfcUnits (f ^ n) a (forall₂_imp (fun _ _ ↦ zpow_ne_zero n) hf')
        (hf.zpow₀ n (forall₂_imp (fun _ _ ↦ Or.inl) hf'))
-- Mathlib/Control/Functor/Multivariate.lean
theorem LiftR_RelLast_iff (x y : F (α ::: β)) :
    LiftR' (RelLast' _ rr) x y ↔ LiftR (RelLast (i := _) _ rr) x y
-- Mathlib/AlgebraicGeometry/EllipticCurve/Weierstrass.lean
lemma ofJ_j : (ofJ j).j = j
-- Mathlib/CategoryTheory/Limits/Shapes/Pullback/Assoc.lean
@[reassoc (attr := simp)]
theorem pullbackAssoc_hom_snd_fst [HasPullback ((pullback.snd _ _ : Z₁ ⟶ X₂) ≫ f₃) f₄]
    [HasPullback f₁ ((pullback.fst _ _ : Z₂ ⟶ X₂) ≫ f₂)] : (pullbackAssoc f₁ f₂ f₃ f₄).hom ≫
    pullback.snd _ _ ≫ pullback.fst _ _ = pullback.fst _ _ ≫ pullback.snd _ _
-- Mathlib/Data/Finset/Sups.lean
@[simp]
theorem disjSups_subset_iff : s ○ t ⊆ u ↔ ∀ a ∈ s, ∀ b ∈ t, Disjoint a b → a ⊔ b ∈ u
-- Mathlib/LinearAlgebra/Matrix/Charpoly/LinearMap.lean
theorem Matrix.isRepresentation.eq_toEnd_of_represents (A : Matrix.isRepresentation R b)
    {f : Module.End R M} (h : (A : Matrix ι ι R).Represents b f) :
    Matrix.isRepresentation.toEnd R b hb A = f
-- Mathlib/Topology/Connected/PathConnected.lean
theorem IsPathConnected.union {U V : Set X} (hU : IsPathConnected U) (hV : IsPathConnected V)
    (hUV : (U ∩ V).Nonempty) : IsPathConnected (U ∪ V)
-- Mathlib/Data/Finset/Lattice.lean
theorem lt_max'_of_mem_erase_max' [DecidableEq α] {a : α} (ha : a ∈ s.erase (s.max' H)) :
    a < s.max' H
-- Mathlib/AlgebraicGeometry/Pullbacks.lean
theorem cocycle_fst_fst_snd (i j k : 𝒰.J) :
    t' 𝒰 f g i j k ≫ t' 𝒰 f g j k i ≫ t' 𝒰 f g k i j ≫ pullback.fst _ _ ≫ pullback.fst _ _ ≫
      pullback.snd _ _ = pullback.fst _ _ ≫ pullback.fst _ _ ≫ pullback.snd _ _
-- Mathlib/Order/Filter/Extr.lean
theorem IsMinFilter.sub (hf : IsMinFilter f l a) (hg : IsMaxFilter g l a) :
    IsMinFilter (fun x => f x - g x) l a
-- Mathlib/Combinatorics/SimpleGraph/Density.lean
theorem interedges_def (s t : Finset α) :
    G.interedges s t = (s ×ˢ t).filter fun e ↦ G.Adj e.1 e.2
-- Mathlib/Topology/UniformSpace/Ascoli.lean
/-- Let `X` be a compact topological space, `α` a uniform space, and `F : ι → (X → α)` an
equicontinuous family. Then, the uniform structures of uniform convergence and pointwise
convergence induce the same uniform structure on `ι`.

In other words, pointwise convergence and uniform convergence coincide on an equicontinuous
subset of `X → α`.

Consider using `Equicontinuous.uniformInducing_uniformFun_iff_pi` and
`Equicontinuous.inducing_uniformFun_iff_pi` instead, to avoid rewriting instances. -/
theorem Equicontinuous.comap_uniformFun_eq [CompactSpace X] (F_eqcont : Equicontinuous F) :
    (UniformFun.uniformSpace X α).comap F =
    (Pi.uniformSpace _).comap F
-- .lake/packages/lean4/src/lean/Init/Data/String/Basic.lean
theorem ext_iff {i₁ i₂ : Pos} : i₁ = i₂ ↔ i₁.byteIdx = i₂.byteIdx
-- Mathlib/RingTheory/Generators.lean
lemma algebraMap_eq : algebraMap P.Ring S = ↑(aeval (R := R) P.val)
-- Mathlib/Topology/GDelta.lean
/-- The intersection of an encodable family of Gδ sets is a Gδ set. -/
protected theorem IsGδ.iInter [Countable ι'] {s : ι' → Set X} (hs : ∀ i, IsGδ (s i)) :
    IsGδ (⋂ i, s i)
-- Mathlib/CategoryTheory/Category/TwoP.lean
@[simp]
theorem pointedToTwoPFst_comp_swap : pointedToTwoPFst ⋙ TwoP.swap = pointedToTwoPSnd
-- Mathlib/Analysis/CstarAlgebra/ContinuousFunctionalCalculus/Unital.lean
lemma cfc_mul (f g : R → R) (a : A) (hf : ContinuousOn f (spectrum R a) := by cfc_cont_tac)
    (hg : ContinuousOn g (spectrum R a) := by cfc_cont_tac) :
    cfc (fun x ↦ f x * g x) a = cfc f a * cfc g a
-- Mathlib/Computability/TuringMachine.lean
theorem mem_eval {σ} {f : σ → Option σ} {a b} : b ∈ eval f a ↔ Reaches f a b ∧ f b = none
-- Mathlib/CategoryTheory/Category/Pointed.lean
@[simp]
theorem coe_of {X : Type*} (point : X) : ↥(of point) = X
-- Mathlib/Algebra/DualQuaternion.lean
@[simp]
theorem fst_imI_dualNumberEquiv_symm (d : DualNumber (Quaternion R)) :
    (dualNumberEquiv.symm d).imI.fst = d.fst.imI
-- Mathlib/Algebra/Polynomial/Eval.lean
@[simp]
theorem add_comp : (p + q).comp r = p.comp r + q.comp r
-- Mathlib/Order/SuccPred/Basic.lean
@[simp]
theorem pred_untop :
    ∀ (a : WithTop α) (ha : a ≠ ⊤),
      pred (a.untop ha) = (pred a).untop (by induction a <;> simp)
-- Mathlib/NumberTheory/Zsqrtd/Basic.lean
@[simp]
theorem muld_val (x y : ℤ) : sqrtd (d := d) * ⟨x, y⟩ = ⟨d * y, x⟩
-- Mathlib/Analysis/Convex/Strict.lean
theorem strictConvex_uIoc (r s : β) : StrictConvex 𝕜 (uIoc r s)
-- Mathlib/Data/Set/Pointwise/Interval.lean
@[simp]
theorem preimage_div_const_uIcc (ha : a ≠ 0) (b c : α) :
    (fun x => x / a) ⁻¹' [[b, c]] = [[b * a, c * a]]
-- Mathlib/MeasureTheory/Function/ConditionalExpectation/CondexpL2.lean
/-- `condexpL2` verifies the equality of integrals defining the conditional expectation. -/
theorem integral_condexpL2_eq (hm : m ≤ m0) (f : Lp E' 2 μ) (hs : MeasurableSet[m] s)
    (hμs : μ s ≠ ∞) : ∫ x in s, (condexpL2 E' 𝕜 hm f : α → E') x ∂μ = ∫ x in s, f x ∂μ
-- Mathlib/Analysis/Normed/Algebra/UnitizationL1.lean
lemma unitization_isometry_inr :
    Isometry (fun x : A ↦ (WithLp.equiv 1 (Unitization 𝕜 A)).symm x)
-- Mathlib/NumberTheory/NumberField/Embeddings.lean
/-- Let `A` be an algebraically closed field and let `x ∈ K`, with `K` a number field.
The images of `x` by the embeddings of `K` in `A` are exactly the roots in `A` of
the minimal polynomial of `x` over `ℚ`. -/
theorem range_eval_eq_rootSet_minpoly :
    (range fun φ : K →+* A => φ x) = (minpoly ℚ x).rootSet A
-- Mathlib/Algebra/Polynomial/Derivative.lean
theorem eval_multiset_prod_X_sub_C_derivative [DecidableEq R]
    {S : Multiset R} {r : R} (hr : r ∈ S) :
    eval r (derivative (Multiset.map (fun a => X - C a) S).prod) =
      (Multiset.map (fun a => r - a) (S.erase r)).prod
-- Mathlib/AlgebraicGeometry/StructureSheaf.lean
@[simp]
theorem globalSectionsIso_hom (R : CommRingCat) : (globalSectionsIso R).hom = toOpen R ⊤
-- Mathlib/GroupTheory/Perm/Cycle/Basic.lean
theorem SameCycle.exists_pow_eq' [Finite α] : SameCycle f x y → ∃ i < orderOf f, (f ^ i) x = y
-- Mathlib/MeasureTheory/Measure/Content.lean
theorem le_outerMeasure_compacts (K : Compacts G) : μ K ≤ μ.outerMeasure K
-- Mathlib/Analysis/Asymptotics/Asymptotics.lean
theorem IsBigO.of_const_mul_right {g : α → R} {c : R} (h : f =O[l] fun x => c * g x) : f =O[l] g
-- Mathlib/Algebra/Order/Ring/Cone.lean
theorem PositiveCone.one_pos (C : PositiveCone α) : C.pos 1
-- Mathlib/ModelTheory/Order.lean
@[simp]
theorem orderLHom_leSymb [L.IsOrdered] :
    (orderLHom L).onRelation leSymb = (leSymb : L.Relations 2)
-- Mathlib/Topology/Algebra/Order/Rolle.lean
/-- If a function `f` is continuous on an open interval
and tends to the same value at its endpoints, then it has an extremum on this open interval. -/
lemma exists_isExtrOn_Ioo_of_tendsto (hab : a < b) (hfc : ContinuousOn f (Ioo a b))
    (ha : Tendsto f (𝓝[>] a) (𝓝 l)) (hb : Tendsto f (𝓝[<] b) (𝓝 l)) :
    ∃ c ∈ Ioo a b, IsExtrOn f (Ioo a b) c
-- Mathlib/Order/Closure.lean
/-- Every element is less than its closure. This property is sometimes referred to as extensivity or
inflationarity. -/
theorem le_closure (x : α) : x ≤ c x
-- Mathlib/Topology/Bornology/Basic.lean
theorem IsCobounded.inter (hs : IsCobounded s) (ht : IsCobounded t) : IsCobounded (s ∩ t)
-- Mathlib/Data/Finset/Pointwise.lean
@[to_additive]
theorem div_subset_iff : s / t ⊆ u ↔ ∀ x ∈ s, ∀ y ∈ t, x / y ∈ u
-- Mathlib/Analysis/SpecialFunctions/Trigonometric/Deriv.lean
theorem HasFDerivAt.sinh (hf : HasFDerivAt f f' x) :
    HasFDerivAt (fun x => Real.sinh (f x)) (Real.cosh (f x) • f') x
-- Mathlib/Topology/Constructions.lean
theorem Filter.Tendsto.apply_nhds {l : Filter Y} {f : Y → ∀ i, π i} {x : ∀ i, π i}
    (h : Tendsto f l (𝓝 x)) (i : ι) : Tendsto (fun a => f a i) l (𝓝 <| x i)
-- Mathlib/Topology/Instances/AddCircle.lean
@[continuity, nolint unusedArguments]
protected theorem continuous_mk' :
    Continuous (QuotientAddGroup.mk' (zmultiples p) : 𝕜 → AddCircle p)
-- Mathlib/Geometry/Manifold/ChartedSpace.lean
/-- The elements of the atlas belong to the maximal atlas for any structure groupoid. -/
theorem StructureGroupoid.subset_maximalAtlas [HasGroupoid M G] : atlas H M ⊆ G.maximalAtlas M
-- Mathlib/CategoryTheory/Limits/Shapes/ZeroMorphisms.lean
theorem zero_of_source_iso_zero {X Y : C} (f : X ⟶ Y) (i : X ≅ 0) : f = 0
-- Mathlib/CategoryTheory/Monoidal/Category.lean
@[simp]
theorem id_tensorHom (X : C) {Y₁ Y₂ : C} (f : Y₁ ⟶ Y₂) :
    𝟙 X ⊗ f = X ◁ f
-- Mathlib/Data/Nat/Choose/Factorization.lean
theorem factorization_choose_of_lt_three_mul (hp' : p ≠ 2) (hk : p ≤ k) (hk' : p ≤ n - k)
    (hn : n < 3 * p) : (choose n k).factorization p = 0
-- Mathlib/Analysis/Asymptotics/Asymptotics.lean
theorem IsLittleO.add (h₁ : f₁ =o[l] g) (h₂ : f₂ =o[l] g) : (fun x => f₁ x + f₂ x) =o[l] g
-- Mathlib/Order/Filter/AtTopBot.lean
theorem exists_le_of_tendsto_atBot [SemilatticeSup α] [Preorder β] {u : α → β}
    (h : Tendsto u atTop atBot) : ∀ a b, ∃ a' ≥ a, u a' ≤ b
-- Mathlib/LinearAlgebra/AffineSpace/AffineSubspace.lean
/-- Given a point in an affine subspace, the set of vectors in its direction equals the set of
vectors subtracting that point on the right. -/
theorem coe_direction_eq_vsub_set_right {s : AffineSubspace k P} {p : P} (hp : p ∈ s) :
    (s.direction : Set V) = (· -ᵥ p) '' s