ruc-ai4math/mathlib_handler_benchmark_410 huggingface dataset:
-- Mathlib/Algebra/TrivSqZeroExt.lean
@[simp]
theorem fst_comp_inl [Zero M] : fst ∘ (inl : R → tsze R M) = id
-- Mathlib/Topology/EMetricSpace/Lipschitz.lean
/-- A locally Lipschitz function is continuous. (The converse is false: for example,
$x ↦ \sqrt{x}$ is continuous, but not locally Lipschitz at 0.) -/
protected theorem continuous {f : α → β} (hf : LocallyLipschitz f) : Continuous f
-- Mathlib/Order/Defs.lean
theorem compare_lt_iff_lt {a b : α} : (compare a b = .lt) ↔ a < b
-- Mathlib/Algebra/MvPolynomial/Rename.lean
theorem coeff_rename_ne_zero (f : σ → τ) (φ : MvPolynomial σ R) (d : τ →₀ ℕ)
    (h : (rename f φ).coeff d ≠ 0) : ∃ u : σ →₀ ℕ, u.mapDomain f = d ∧ φ.coeff u ≠ 0
-- Mathlib/Analysis/CstarAlgebra/Spectrum.lean
/-- Any element of the spectrum of a selfadjoint is real. -/
theorem selfAdjoint.mem_spectrum_eq_re [StarModule ℂ A] (a : selfAdjoint A) {z : ℂ}
    (hz : z ∈ spectrum ℂ (a : A)) : z = z.re
-- Mathlib/MeasureTheory/Constructions/Projective.lean
lemma congr_cylinder_of_subset (hP : IsProjectiveMeasureFamily P)
    {S : Set (∀ i : I, α i)} {T : Set (∀ i : J, α i)} (hT : MeasurableSet T)
    (h_eq : cylinder I S = cylinder J T) (hJI : J ⊆ I) :
    P I S = P J T
-- Mathlib/Analysis/Normed/Operator/Banach.lean
theorem coe_ofIsClosedGraph (hg : IsClosed (g.graph : Set <| E × F)) :
    ↑(ContinuousLinearMap.ofIsClosedGraph hg) = g
-- Mathlib/Topology/Bases.lean
theorem nonempty_of_mem_countableBasis [SecondCountableTopology α] {s : Set α}
    (hs : s ∈ countableBasis α) : s.Nonempty
-- Mathlib/FieldTheory/IsAlgClosed/Basic.lean
theorem exists_aeval_eq_zero {R : Type*} [Field R] [IsAlgClosed k] [Algebra R k] (p : R[X])
    (hp : p.degree ≠ 0) : ∃ x : k, aeval x p = 0
-- Mathlib/Algebra/TrivSqZeroExt.lean
@[simp]
theorem snd_natCast [AddMonoidWithOne R] [AddMonoid M] (n : ℕ) : (n : tsze R M).snd = 0
-- Mathlib/Data/Matrix/Block.lean
theorem fromBlocks_mulVec [Fintype l] [Fintype m] [NonUnitalNonAssocSemiring α] (A : Matrix n l α)
    (B : Matrix n m α) (C : Matrix o l α) (D : Matrix o m α) (x : l ⊕ m → α) :
    (fromBlocks A B C D) *ᵥ x =
      Sum.elim (A *ᵥ (x ∘ Sum.inl) + B *ᵥ (x ∘ Sum.inr))
        (C *ᵥ (x ∘ Sum.inl) + D *ᵥ (x ∘ Sum.inr))
-- Mathlib/Data/Real/Hyperreal.lean
theorem Infinitesimal.eq_zero {r : ℝ} : Infinitesimal r → r = 0
-- Mathlib/Topology/Category/Profinite/Nobeling.lean
theorem span_sum : Set.range (eval C) = Set.range (Sum.elim
    (fun (l : GoodProducts (π C (ord I · < o))) ↦ Products.eval C l.1)
    (fun (l : MaxProducts C ho) ↦ Products.eval C l.1))
-- Mathlib/Algebra/Algebra/Subalgebra/Basic.lean
@[simp]
theorem val_comp_codRestrict (f : A →ₐ[R] B) (S : Subalgebra R B) (hf : ∀ x, f x ∈ S) :
    S.val.comp (f.codRestrict S hf) = f
-- Mathlib/Data/Complex/Exponential.lean
theorem sinh_three_mul : sinh (3 * x) = 4 * sinh x ^ 3 + 3 * sinh x
-- Mathlib/Data/LazyList/Basic.lean
@[deprecated (since := "2024-07-22"), simp]
theorem bind_singleton {α} (x : LazyList α) : x.bind singleton = x
-- Mathlib/Topology/Separation.lean
@[simp]
theorem pure_le_nhds_iff [T1Space X] {a b : X} : pure a ≤ 𝓝 b ↔ a = b
-- Mathlib/RingTheory/Bialgebra/Hom.lean
protected theorem congr_arg (φ : A →ₐc[R] B) {x y : A} (h : x = y) : φ x = φ y
-- Mathlib/Analysis/InnerProductSpace/PiL2.lean
protected theorem orthogonalProjection_eq_sum {U : Submodule 𝕜 E} [CompleteSpace U]
    (b : OrthonormalBasis ι 𝕜 U) (x : E) :
    orthogonalProjection U x = ∑ i, ⟪(b i : E), x⟫ • b i
-- Mathlib/Algebra/Homology/ComplexShape.lean
theorem next_eq' (c : ComplexShape ι) {i j : ι} (h : c.Rel i j) : c.next i = j
-- Mathlib/NumberTheory/EulerProduct/Basic.lean
/-- We relate a finite product over primes to an infinite sum over smooth numbers. -/
lemma summable_and_hasSum_smoothNumbers_prod_primesBelow_tsum
    (hsum : ∀ {p : ℕ}, p.Prime → Summable (fun n : ℕ ↦ ‖f (p ^ n)‖)) (N : ℕ) :
    Summable (fun m : N.smoothNumbers ↦ ‖f m‖) ∧
      HasSum (fun m : N.smoothNumbers ↦ f m) (∏ p ∈ N.primesBelow, ∑' n : ℕ, f (p ^ n))
-- Mathlib/LinearAlgebra/Alternating/Basic.lean
/-- A version of `MultilinearMap.cons_add` for `AlternatingMap`. -/
theorem map_vecCons_add {n : ℕ} (f : M [⋀^Fin n.succ]→ₗ[R] N) (m : Fin n → M) (x y : M) :
    f (Matrix.vecCons (x + y) m) = f (Matrix.vecCons x m) + f (Matrix.vecCons y m)
-- Mathlib/Topology/Algebra/Module/Multilinear/Basic.lean
/-- `ContinuousMultilinearMap.pi` as an `Equiv`. -/
@[simps]
def piEquiv {ι' : Type*} {M' : ι' → Type*} [∀ i, AddCommMonoid (M' i)]
    [∀ i, TopologicalSpace (M' i)] [∀ i, Module R (M' i)] :
    (∀ i, ContinuousMultilinearMap R M₁ (M' i)) ≃ ContinuousMultilinearMap R M₁ (∀ i, M' i)
-- Mathlib/Algebra/Order/Group/Unbundled/Basic.lean
@[to_additive]
theorem lt_inv_iff_mul_lt_one : a < b⁻¹ ↔ a * b < 1
-- Mathlib/LinearAlgebra/TensorAlgebra/Basis.lean
@[simp]
lemma equivFreeAlgebra_ι_apply (b : Basis κ R M) (i : κ) :
    equivFreeAlgebra b (ι R (b i)) = FreeAlgebra.ι R i
-- Mathlib/GroupTheory/Index.lean
@[to_additive one_lt_index_of_ne_top]
theorem one_lt_index_of_ne_top [Finite (G ⧸ H)] (hH : H ≠ ⊤) : 1 < H.index
-- Mathlib/Analysis/Convex/Cone/Basic.lean
theorem Salient.anti {S T : ConvexCone 𝕜 E} (h : T ≤ S) : S.Salient → T.Salient
-- Mathlib/Analysis/Calculus/TangentCone.lean
theorem UniqueDiffWithinAt.mono_nhds (h : UniqueDiffWithinAt 𝕜 s x) (st : 𝓝[s] x ≤ 𝓝[t] x) :
    UniqueDiffWithinAt 𝕜 t x
-- Mathlib/Order/Hom/CompleteLattice.lean
theorem copy_eq (f : sInfHom α β) (f' : α → β) (h : f' = f) : f.copy f' h = f
-- Mathlib/Data/Nat/ModEq.lean
theorem coprime_of_mul_modEq_one (b : ℕ) {a n : ℕ} (h : a * b ≡ 1 [MOD n]) : a.Coprime n
-- Mathlib/Order/Interval/Set/ProjIcc.lean
@[simp]
theorem projIcc_right : projIcc a b h b = ⟨b, right_mem_Icc.2 h⟩
-- Mathlib/Data/Seq/Computation.lean
theorem results_pure (a : α) : Results (pure a) a 0
-- Mathlib/Data/Finite/Card.lean
theorem cast_card_eq_mk {α : Type*} [Finite α] : ↑(Nat.card α) = Cardinal.mk α
-- Mathlib/MeasureTheory/Integral/IntegralEqImproper.lean
/-- **Fundamental theorem of calculus-2**, on semi-infinite intervals `(-∞, a)`.
When a function has a limit `m` at `-∞`, and its derivative is integrable, then the
integral of the derivative on `(-∞, a)` is `f a - m`. Version assuming differentiability
on `(-∞, a]`.

Note that such a function always has a limit at minus infinity,
see `tendsto_limUnder_of_hasDerivAt_of_integrableOn_Iic`. -/
theorem integral_Iic_of_hasDerivAt_of_tendsto'
    (hderiv : ∀ x ∈ Iic a, HasDerivAt f (f' x) x) (f'int : IntegrableOn f' (Iic a))
    (hf : Tendsto f atBot (𝓝 m)) : ∫ x in Iic a, f' x = f a - m
-- Mathlib/CategoryTheory/Functor/Const.lean
@[simp]
theorem opObjUnop_inv_app (X : Cᵒᵖ) (j : Jᵒᵖ) : (opObjUnop.{v₁, v₂} X).inv.app j = 𝟙 _
-- Mathlib/Data/ENNReal/Operations.lean
theorem mul_lt_top : a ≠ ∞ → b ≠ ∞ → a * b < ∞
-- Mathlib/Data/Nat/Defs.lean
lemma pred_one_add (n : ℕ) : pred (1 + n) = n
-- Mathlib/Analysis/Seminorm.lean
/-- A seminorm is continuous if `p.closedBall 0 r ∈ 𝓝 0` for *all* `r > 0`.
Over a `NontriviallyNormedField` it is actually enough to check that this is true
for *some* `r`, see `Seminorm.continuous'`. -/
protected theorem continuous_of_forall' [TopologicalSpace E] [TopologicalAddGroup E]
    {p : Seminorm 𝕝 E} (hp : ∀ r > 0, p.closedBall 0 r ∈ (𝓝 0 : Filter E)) :
    Continuous p
-- Mathlib/MeasureTheory/Integral/Lebesgue.lean
@[gcongr] theorem lintegral_mono_fn ⦃f g : α → ℝ≥0∞⦄ (hfg : ∀ x, f x ≤ g x) :
    lintegral μ f ≤ lintegral μ g
-- Mathlib/Logic/Equiv/Basic.lean
@[simp]
theorem toPerm_symm {f : α → α} (h : Involutive f) : (h.toPerm f).symm = h.toPerm f
-- Mathlib/CategoryTheory/Limits/Final.lean
/-- The hypotheses also imply that `F` is initial, see `initial_of_comp_full_faithful`. -/
theorem initial_of_comp_full_faithful' [Full G] [Faithful G] [Initial (F ⋙ G)] : Initial G
-- Mathlib/Order/Interval/Finset/Nat.lean
theorem uIcc_eq_range' :
    uIcc a b = ⟨List.range' (min a b) (max a b + 1 - min a b), List.nodup_range' _ _⟩
-- Mathlib/Topology/Order/LowerUpperTopology.lean
lemma isLower_orderDual [Preorder α] [TopologicalSpace α] : IsLower αᵒᵈ ↔ IsUpper α
-- Mathlib/Algebra/Order/Kleene.lean
theorem kstar_def (a : ∀ i, π i) : a∗ = fun i ↦ (a i)∗
-- Mathlib/Data/Real/Hyperreal.lean
theorem infinitePos_iff_infinite_of_nonneg {x : ℝ*} (hp : 0 ≤ x) : InfinitePos x ↔ Infinite x
-- Mathlib/Geometry/RingedSpace/LocallyRingedSpace.lean
@[simp] theorem id_val' (X : LocallyRingedSpace.{u}) : Hom.val (𝟙 X) = 𝟙 X.toSheafedSpace
-- Mathlib/Order/Filter/Pi.lean
@[simp]
theorem coprodᵢ_eq_bot_iff [∀ i, Nonempty (α i)] : Filter.coprodᵢ f = ⊥ ↔ f = ⊥
-- Mathlib/LinearAlgebra/Matrix/NonsingularInverse.lean
/-- Coercing the result of `Units.instInv` is the same as coercing first and applying the
nonsingular inverse. -/
@[simp, norm_cast]
theorem coe_units_inv (A : (Matrix n n α)ˣ) : ↑A⁻¹ = (A⁻¹ : Matrix n n α)
-- Mathlib/LinearAlgebra/Eigenspace/Basic.lean
/-- The eigenspace is a subspace of the generalized eigenspace. -/
theorem eigenspace_le_genEigenspace {f : End R M} {μ : R} {k : ℕ} (hk : 0 < k) :
    f.eigenspace μ ≤ f.genEigenspace μ k
-- .lake/packages/lean4/src/lean/Init/Data/Int/DivModLemmas.lean
theorem lt_div_add_one_mul_self (a : Int) {b : Int} (H : 0 < b) : a < (a.div b + 1) * b
-- Mathlib/Combinatorics/SimpleGraph/Matching.lean
lemma even_card_of_isPerfectMatching [DecidableEq V]
    (c : ConnectedComponent G) (hM : M.IsPerfectMatching) :
    Even (Fintype.card c.supp)
-- Mathlib/Topology/Algebra/InfiniteSum/Basic.lean
@[to_additive]
theorem Multipliable.compl_add {s : Set β} (hs : Multipliable (f ∘ (↑) : (sᶜ : Set β) → α))
    (hsc : Multipliable (f ∘ (↑) : s → α)) : Multipliable f
-- Mathlib/Logic/Basic.lean
protected theorem Decidable.not_forall₂ [Decidable (∃ x h, ¬P x h)] [∀ x h, Decidable (P x h)] :
    (¬∀ x h, P x h) ↔ ∃ x h, ¬P x h
-- Mathlib/RingTheory/GradedAlgebra/HomogeneousIdeal.lean
@[simp]
theorem HomogeneousIdeal.homogeneousHull_toIdeal_eq_self (I : HomogeneousIdeal 𝒜) :
    I.toIdeal.homogeneousHull 𝒜 = I
-- Mathlib/CategoryTheory/Types.lean
/-- Equivalences (between types in the same universe) are the same as (isomorphic to) isomorphisms
of types. -/
@[simps]
def equivIsoIso {X Y : Type u} : X ≃ Y ≅ X ≅ Y
-- Mathlib/Algebra/MvPolynomial/Degrees.lean
theorem exists_degree_lt [Fintype σ] (f : MvPolynomial σ R) (n : ℕ)
    (h : f.totalDegree < n * Fintype.card σ) {d : σ →₀ ℕ} (hd : d ∈ f.support) : ∃ i, d i < n
-- Mathlib/MeasureTheory/SetSemiring.lean
lemma empty_not_mem_diffFinset₀ (hC : IsSetSemiring C) (hs : s ∈ C) (hI : ↑I ⊆ C) :
    ∅ ∉ hC.diffFinset₀ hs hI
-- Mathlib/SetTheory/Cardinal/Finite.lean
@[simp] lemma card_ulift (α : Type*) : card (ULift α) = card α
-- Mathlib/Probability/ProbabilityMassFunction/Monad.lean
theorem toMeasure_pure : (pure a).toMeasure = Measure.dirac a
-- Mathlib/LinearAlgebra/Matrix/LDL.lean
theorem LDL.lowerInv_eq_gramSchmidtBasis :
    LDL.lowerInv hS =
      ((Pi.basisFun 𝕜 n).toMatrix
          (@gramSchmidtBasis 𝕜 (n → 𝕜) _ (_ : _) (InnerProductSpace.ofMatrix hS.transpose) n _ _ _
            (Pi.basisFun 𝕜 n)))ᵀ
-- Mathlib/Analysis/NormedSpace/Exponential.lean
theorem exp_eq_tsum : exp 𝕂 = fun x : 𝔸 => ∑' n : ℕ, (n !⁻¹ : 𝕂) • x ^ n
-- Mathlib/SetTheory/Game/PGame.lean
theorem sub_congr_right {x y z : PGame} : (y ≈ z) → (x - y ≈ x - z)
-- Mathlib/Data/Finset/Basic.lean
protected theorem subset_of_eq {s t : Finset α} (h : s = t) : s ⊆ t
-- Mathlib/LinearAlgebra/CliffordAlgebra/Basic.lean
@[simp]
theorem ι_comp_lift (f : M →ₗ[R] A) (cond : ∀ m, f m * f m = algebraMap _ _ (Q m)) :
    (lift Q ⟨f, cond⟩).toLinearMap.comp (ι Q) = f
-- Mathlib/Topology/UniformSpace/Separation.lean
theorem t0Space_iff_ker_uniformity : T0Space α ↔ (𝓤 α).ker = diagonal α
-- Mathlib/Data/Set/Function.lean
theorem MapsTo.coe_iterate_restrict {f : α → α} (h : MapsTo f s s) (x : s) (k : ℕ) :
    h.restrict^[k] x = f^[k] x
-- Mathlib/MeasureTheory/Constructions/BorelSpace/Order.lean
/-- Two finite measures on a Borel space are equal if they agree on all left-infinite right-closed
intervals. -/
theorem ext_of_Iic {α : Type*} [TopologicalSpace α] {m : MeasurableSpace α}
    [SecondCountableTopology α] [LinearOrder α] [OrderTopology α] [BorelSpace α] (μ ν : Measure α)
    [IsFiniteMeasure μ] (h : ∀ a, μ (Iic a) = ν (Iic a)) : μ = ν
-- Mathlib/Topology/Order.lean
theorem setOf_isOpen_sSup {T : Set (TopologicalSpace α)} :
    { s | IsOpen[sSup T] s } = ⋂ t ∈ T, { s | IsOpen[t] s }
-- Mathlib/Data/Multiset/Sum.lean
theorem disjSum_lt_disjSum_of_le_of_lt (hs : s₁ ≤ s₂) (ht : t₁ < t₂) :
    s₁.disjSum t₁ < s₂.disjSum t₂
-- Mathlib/MeasureTheory/Measure/Hausdorff.lean
/-- A formula for `MeasureTheory.Measure.mkMetric`. -/
theorem mkMetric_apply (m : ℝ≥0∞ → ℝ≥0∞) (s : Set X) :
    mkMetric m s =
      ⨆ (r : ℝ≥0∞) (_ : 0 < r),
        ⨅ (t : ℕ → Set X) (_ : s ⊆ iUnion t) (_ : ∀ n, diam (t n) ≤ r),
          ∑' n, ⨆ _ : (t n).Nonempty, m (diam (t n))
-- Mathlib/CategoryTheory/EffectiveEpi/Basic.lean
/--
Reindex the indexing type of an effective epi family.
-/
lemma EffectiveEpiFamily.reindex
    {B : C} {α α' : Type*}
    (X : α → C)
    (π : (a : α) → (X a ⟶ B))
    (e : α' ≃ α)
    (h : EffectiveEpiFamily (fun a => X (e a)) (fun a => π (e a))) :
    EffectiveEpiFamily X π
-- Mathlib/CategoryTheory/Limits/Preserves/Shapes/Equalizers.lean
@[reassoc]
theorem map_π_preserves_coequalizer_inv_colimMap_desc {X' Y' : D} (f' g' : X' ⟶ Y')
    [HasCoequalizer f' g'] (p : G.obj X ⟶ X') (q : G.obj Y ⟶ Y') (wf : G.map f ≫ q = p ≫ f')
    (wg : G.map g ≫ q = p ≫ g') {Z' : D} (h : Y' ⟶ Z') (wh : f' ≫ h = g' ≫ h) :
    G.map (coequalizer.π f g) ≫
        (PreservesCoequalizer.iso G f g).inv ≫
          colimMap (parallelPairHom (G.map f) (G.map g) f' g' p q wf wg) ≫ coequalizer.desc h wh =
      q ≫ h
-- Mathlib/AlgebraicTopology/SimplexCategory.lean
theorem eq_comp_δ_of_not_surjective {n : ℕ} {Δ : SimplexCategory} (θ : Δ ⟶ mk (n + 1))
    (hθ : ¬Function.Surjective θ.toOrderHom) :
    ∃ (i : Fin (n + 2)) (θ' : Δ ⟶ mk n), θ = θ' ≫ δ i
-- Mathlib/Analysis/Convex/Segment.lean
theorem segment_symm (x y : E) : [x -[𝕜] y] = [y -[𝕜] x]
-- Mathlib/Data/List/Nodup.lean
theorem Nodup.map_on {f : α → β} (H : ∀ x ∈ l, ∀ y ∈ l, f x = f y → x = y) (d : Nodup l) :
    (map f l).Nodup
-- Mathlib/Topology/ContinuousFunction/CompactlySupported.lean
@[ext]
theorem ext {f g : C_c(α, β)} (h : ∀ x, f x = g x) : f = g
-- Mathlib/Order/Cover.lean
theorem covBy_congr_left (hab : AntisymmRel (· ≤ ·) a b) : a ⋖ c ↔ b ⋖ c
-- Mathlib/Algebra/Module/LinearMap/Polynomial.lean
lemma polyCharpolyAux_eval_eq_toMatrix_charpoly_coeff (x : L) (i : ℕ) :
    MvPolynomial.eval (b.repr x) ((polyCharpolyAux φ b bₘ).coeff i) =
      (toMatrix bₘ bₘ (φ x)).charpoly.coeff i
-- Mathlib/Algebra/Algebra/Basic.lean
theorem algebraMap_ofSubsemiring (S : Subsemiring R) :
    (algebraMap S R : S →+* R) = Subsemiring.subtype S
-- Mathlib/Analysis/Calculus/Deriv/Mul.lean
theorem hasDerivWithinAt_of_bilinear
    (hu : HasDerivWithinAt u u' s x) (hv : HasDerivWithinAt v v' s x) :
    HasDerivWithinAt (fun x ↦ B (u x) (v x)) (B (u x) v' + B u' (v x)) s x
-- Mathlib/Combinatorics/Hindman.lean
@[to_additive exists_FS_of_large]
theorem exists_FP_of_large {M} [Semigroup M] (U : Ultrafilter M) (U_idem : U * U = U) (s₀ : Set M)
    (sU : s₀ ∈ U) : ∃ a, FP a ⊆ s₀
-- Mathlib/SetTheory/Ordinal/Arithmetic.lean
theorem mul_sub (a b c : Ordinal) : a * (b - c) = a * b - a * c
-- Mathlib/Order/LiminfLimsup.lean
theorem isBoundedUnder_le_finset_sup [LinearOrder β] [OrderBot β] {f : Filter α} {F : ι → α → β}
    {s : Finset ι} (h : ∀ i ∈ s, f.IsBoundedUnder (· ≤ ·) (F i)) :
    f.IsBoundedUnder (· ≤ ·) (fun a ↦ sup s (fun i ↦ F i a))
-- Mathlib/Combinatorics/Additive/AP/Three/Defs.lean
lemma Fin.addRothNumber_eq_rothNumberNat (hkn : 2 * k ≤ n) :
    addRothNumber (Iio k : Finset (Fin n.succ)) = rothNumberNat k
-- Mathlib/Data/Setoid/Partition.lean
/-- Two equivalence relations are equal iff all their equivalence classes are equal. -/
theorem eq_iff_classes_eq {r₁ r₂ : Setoid α} :
    r₁ = r₂ ↔ ∀ x, { y | r₁.Rel x y } = { y | r₂.Rel x y }
-- .lake/packages/lean4/src/lean/Init/Data/Nat/Linear.lean
theorem ExprCnstr.eq_true_of_isValid (ctx : Context) (c : ExprCnstr) (h : c.toNormPoly.isValid) : c.denote ctx = True
-- Mathlib/Data/Nat/Choose/Central.lean
theorem two_le_centralBinom (n : ℕ) (n_pos : 0 < n) : 2 ≤ centralBinom n
-- Mathlib/Data/Sum/Order.lean
@[simp]
theorem inl_bot [LE α] [OrderBot α] [LE β] : toLex (inl ⊥ : α ⊕ β) = ⊥
-- Mathlib/Topology/Algebra/Module/Basic.lean
@[simp, norm_cast]
theorem coe_eq_id {f : M₁ →L[R₁] M₁} : (f : M₁ →ₗ[R₁] M₁) = LinearMap.id ↔ f = id _ _
-- Mathlib/RingTheory/Localization/Basic.lean
theorem ringEquivOfRingEquiv_eq_map {j : R ≃+* P} (H : M.map j.toMonoidHom = T) :
    (ringEquivOfRingEquiv S Q j H : S →+* Q) =
      map Q (j : R →+* P) (M.le_comap_of_map_le (le_of_eq H))
-- Mathlib/Algebra/Module/Equiv/Basic.lean
theorem conj_comp (e : M ≃ₗ[R] M₂) (f g : Module.End R M) :
    e.conj (g.comp f) = (e.conj g).comp (e.conj f)
-- Mathlib/ModelTheory/Substructures.lean
theorem map_injective_of_injective : Function.Injective (map f)
-- Mathlib/RingTheory/Polynomial/Dickson.lean
/-- The `(m * n)`-th Dickson polynomial of the first kind is the composition of the `m`-th and
`n`-th. -/
theorem dickson_one_one_mul (m n : ℕ) :
    dickson 1 (1 : R) (m * n) = (dickson 1 1 m).comp (dickson 1 1 n)
-- Mathlib/Topology/DiscreteQuotient.lean
theorem eq_of_forall_proj_eq [T2Space X] [CompactSpace X] [disc : TotallyDisconnectedSpace X]
    {x y : X} (h : ∀ Q : DiscreteQuotient X, Q.proj x = Q.proj y) : x = y
-- Mathlib/CategoryTheory/Sites/Sieves.lean
/-- The natural inclusion from the functor induced by a sieve to the yoneda embedding. -/
@[simps]
def functorInclusion (S : Sieve X) : S.functor ⟶ yoneda.obj X
-- Mathlib/RingTheory/FractionalIdeal/Operations.lean
theorem num_le (I : FractionalIdeal S P) :
    (I.num : FractionalIdeal S P) ≤ I
-- Mathlib/Analysis/Calculus/LocalExtr/Basic.lean
theorem sub_mem_posTangentConeAt_of_segment_subset (h : segment ℝ x y ⊆ s) :
    y - x ∈ posTangentConeAt s x
-- Mathlib/MeasureTheory/Function/ConvergenceInMeasure.lean
theorem seqTendstoAeSeq_succ (hfg : TendstoInMeasure μ f atTop g) {n : ℕ} :
    seqTendstoAeSeq hfg (n + 1) =
      max (seqTendstoAeSeqAux hfg (n + 1)) (seqTendstoAeSeq hfg n + 1)
-- Mathlib/LinearAlgebra/LinearDisjoint.lean
/-- If `M` and `N` are linearly disjoint, if `N` is flat, then for any submodule `M'` of `M`,
`M'` and `N` are also linearly disjoint. -/
theorem of_le_left_of_flat (H : M.LinearDisjoint N) {M' : Submodule R S}
    (h : M' ≤ M) [Module.Flat R N] : M'.LinearDisjoint N
-- Mathlib/Data/Set/Prod.lean
theorem pi_mono (h : ∀ i ∈ s, t₁ i ⊆ t₂ i) : pi s t₁ ⊆ pi s t₂
-- Mathlib/Data/Set/Function.lean
theorem MapsTo.mono (hf : MapsTo f s₁ t₁) (hs : s₂ ⊆ s₁) (ht : t₁ ⊆ t₂) : MapsTo f s₂ t₂
-- Mathlib/Order/Filter/Pointwise.lean
@[to_additive]
theorem NeBot.of_div_left : (f / g).NeBot → f.NeBot
-- Mathlib/Data/Set/Pointwise/Basic.lean
@[to_additive]
theorem preimage_mul_right_one' : (· * b⁻¹) ⁻¹' 1 = {b}
-- Mathlib/RingTheory/Derivation/Basic.lean
@[simp]
theorem map_natCast (n : ℕ) : D (n : A) = 0
-- Mathlib/Algebra/Order/Monoid/Unbundled/Basic.lean
@[to_additive add_const]
theorem StrictMonoOn.mul_const' (hf : StrictMonoOn f s) (c : α) :
    StrictMonoOn (fun x => f x * c) s
-- Mathlib/AlgebraicGeometry/Morphisms/QuasiCompact.lean
theorem quasiCompact_over_affine_iff {X Y : Scheme} (f : X ⟶ Y) [IsAffine Y] :
    QuasiCompact f ↔ CompactSpace X
-- Mathlib/Analysis/SpecialFunctions/Trigonometric/Angle.lean
@[simp]
theorem cos_toReal (θ : Angle) : Real.cos θ.toReal = cos θ
-- Mathlib/RingTheory/Polynomial/Basic.lean
/-- `R[X]` is never a field for any ring `R`. -/
theorem polynomial_not_isField : ¬IsField R[X]
-- Mathlib/Algebra/GroupWithZero/Defs.lean
/-- Prop-valued mixin for a monoid with zero to be equipped with a cancelling division.

The obvious use case is groups with zero, but this condition is also satisfied by `ℕ`, `ℤ` and, more
generally, any euclidean domain. -/
class MulDivCancelClass (M₀ : Type*) [MonoidWithZero M₀] [Div M₀] : Prop where
  protected mul_div_cancel (a b : M₀) : b ≠ 0 → a * b / b = a
-- Mathlib/Data/Fintype/Basic.lean
@[simp]
theorem toFinset_image [DecidableEq β] (f : α → β) (s : Set α) [Fintype s] [Fintype (f '' s)] :
    (f '' s).toFinset = s.toFinset.image f
-- .lake/packages/lean4/src/lean/Init/Core.lean
theorem Exists.elim {α : Sort u} {p : α → Prop} {b : Prop}
   (h₁ : Exists (fun x => p x)) (h₂ : ∀ (a : α), p a → b) : b
-- Mathlib/Algebra/Order/Hom/Monoid.lean
theorem antitone_iff_map_nonneg : Antitone (f : α → β) ↔ ∀ a ≤ 0, 0 ≤ f a
-- Mathlib/RingTheory/Kaehler/Basic.lean
/-- The sequence `B ⊗[A] Ω[A⁄R] → Ω[B⁄R] → Ω[B⁄A] → 0` is exact.
Also see `KaehlerDifferential.map_surjective`. -/
lemma KaehlerDifferential.exact_mapBaseChange_map :
    Function.Exact (mapBaseChange R A B) (map R A B B)
-- Mathlib/Topology/PartialHomeomorph.lean
theorem transHomeomorph_eq_trans (e : PartialHomeomorph X Y) (f' : Y ≃ₜ Z) :
    e.transHomeomorph f' = e.trans f'.toPartialHomeomorph
-- Mathlib/Topology/Order/LocalExtr.lean
nonrec theorem IsLocalMax.max (hf : IsLocalMax f a) (hg : IsLocalMax g a) :
    IsLocalMax (fun x => max (f x) (g x)) a
-- Mathlib/RingTheory/DedekindDomain/AdicValuation.lean
theorem algebraMap_adicCompletion' :
    ⇑(algebraMap R <| v.adicCompletion K) = (↑) ∘ algebraMap R K
-- Mathlib/Order/Interval/Finset/Basic.lean
/-- `Finset.cons` version of `Finset.Ioi_insert`. -/
theorem Ici_eq_cons_Ioi (a : α) : Ici a = (Ioi a).cons a not_mem_Ioi_self
-- Mathlib/Topology/GDelta.lean
/-- Subsets of meagre sets are meagre. -/
lemma IsMeagre.mono {s t : Set X} (hs : IsMeagre s) (hts : t ⊆ s) : IsMeagre t
-- Mathlib/Algebra/Algebra/Subalgebra/Basic.lean
theorem toSubsemiring_injective :
    Function.Injective (toSubsemiring : Subalgebra R A → Subsemiring A)
-- Mathlib/AlgebraicGeometry/PrimeSpectrum/Basic.lean
theorem localization_away_openEmbedding (S : Type v) [CommSemiring S] [Algebra R S] (r : R)
    [IsLocalization.Away r S] : OpenEmbedding (comap (algebraMap R S))
-- Mathlib/Data/Multiset/Nodup.lean
theorem Nodup.erase [DecidableEq α] (a : α) {l} : Nodup l → Nodup (l.erase a)
-- Mathlib/Order/Filter/Basic.lean
theorem eventuallyLE_antisymm_iff [PartialOrder β] {l : Filter α} {f g : α → β} :
    f =ᶠ[l] g ↔ f ≤ᶠ[l] g ∧ g ≤ᶠ[l] f
-- .lake/packages/batteries/Batteries/Data/List/Perm.lean
theorem perm_comm {l₁ l₂ : List α} : l₁ ~ l₂ ↔ l₂ ~ l₁
-- Mathlib/Data/Finset/Lattice.lean
theorem set_biInter_singleton (a : α) (s : α → Set β) : ⋂ x ∈ ({a} : Finset α), s x = s a
-- Mathlib/Analysis/Calculus/ContDiff/Basic.lean
theorem ContDiffOn.snd {f : E → F × G} {s : Set E} (hf : ContDiffOn 𝕜 n f s) :
    ContDiffOn 𝕜 n (fun x => (f x).2) s
-- Mathlib/RingTheory/Adjoin/FG.lean
theorem fg_trans (h1 : (adjoin R s).toSubmodule.FG) (h2 : (adjoin (adjoin R s) t).toSubmodule.FG) :
    (adjoin R (s ∪ t)).toSubmodule.FG
-- Mathlib/Algebra/BigOperators/Group/List.lean
lemma sum_int_mod (l : List ℤ) (n : ℤ) : l.sum % n = (l.map (· % n)).sum % n
-- Mathlib/LinearAlgebra/AffineSpace/FiniteDimensional.lean
/-- Given a collinear set of points, and two distinct points `p₂` and `p₃` in it, a point `p₁` is
collinear with the set if and only if it is collinear with `p₂` and `p₃`. -/
theorem Collinear.collinear_insert_iff_of_ne {s : Set P} (h : Collinear k s) {p₁ p₂ p₃ : P}
    (hp₂ : p₂ ∈ s) (hp₃ : p₃ ∈ s) (hp₂p₃ : p₂ ≠ p₃) :
    Collinear k (insert p₁ s) ↔ Collinear k ({p₁, p₂, p₃} : Set P)
-- Mathlib/RingTheory/RootsOfUnity/Lemmas.lean
/-- If `μ` is a primitive `n`th root of unity in `R`, then `∏(1≤k<n) (1-μ^k) = n`.
(Stated with `n+1` in place of `n` to avoid the condition `n ≠ 0`.) -/
lemma prod_one_sub_pow_eq_order {n : ℕ} {μ : R} (hμ : IsPrimitiveRoot μ (n + 1)) :
    ∏ k ∈ range n, (1 - μ ^ (k + 1)) = n + 1
-- Mathlib/RingTheory/GradedAlgebra/Radical.lean
theorem Ideal.IsHomogeneous.radical {I : Ideal A} (h : I.IsHomogeneous 𝒜) :
    I.radical.IsHomogeneous 𝒜
-- Mathlib/Algebra/Category/ModuleCat/Differentials/Presheaf.lean
@[simp]
lemma mk_app (X : Dᵒᵖ) : (mk d d_map).app X = d X
-- Mathlib/Algebra/MonoidAlgebra/Basic.lean
theorem lift_apply' (F : G →* A) (f : MonoidAlgebra k G) :
    lift k G A F f = f.sum fun a b => algebraMap k A b * F a
-- Mathlib/Combinatorics/SimpleGraph/Regularity/Uniform.lean
theorem nonempty_of_not_uniform (h : ¬P.IsUniform G ε) : P.parts.Nonempty