ruc-ai4math/mathlib_handler_benchmark_410 huggingface dataset:
-- Mathlib/Analysis/Calculus/FDeriv/Prod.lean
@[fun_prop]
protected theorem DifferentiableWithinAt.fst (h : DifferentiableWithinAt 𝕜 f₂ s x) :
    DifferentiableWithinAt 𝕜 (fun x => (f₂ x).1) s x
-- Mathlib/MeasureTheory/PiSystem.lean
theorem isPiSystem_image_Iic (s : Set α) : IsPiSystem (Iic '' s)
-- Mathlib/Algebra/Algebra/Unitization.lean
@[simp]
theorem snd_smul [SMul S R] [SMul S A] (s : S) (x : Unitization R A) : (s • x).snd = s • x.snd
-- Mathlib/Data/Nat/Factors.lean
@[simp]
theorem primeFactorsList_zero : primeFactorsList 0 = []
-- Mathlib/Order/Height.lean
theorem chainHeight_add_le_chainHeight_add (s : Set α) (t : Set β) (n m : ℕ) :
    s.chainHeight + n ≤ t.chainHeight + m ↔
      ∀ l ∈ s.subchain, ∃ l' ∈ t.subchain, length l + n ≤ length l' + m
-- Mathlib/Analysis/Calculus/LocalExtr/Basic.lean
/-- **Fermat's Theorem**: the derivative of a function at a local maximum equals zero. -/
theorem IsLocalMax.hasFDerivAt_eq_zero (h : IsLocalMax f a) (hf : HasFDerivAt f f' a) : f' = 0
-- Mathlib/Algebra/Algebra/Bilinear.lean
@[simp]
theorem mul'_apply {a b : A} : mul' R A (a ⊗ₜ b) = a * b
-- Mathlib/LinearAlgebra/TensorAlgebra/Basic.lean
@[simp]
theorem toTrivSqZeroExt_ι (x : M) [Module Rᵐᵒᵖ M] [IsCentralScalar R M] :
    toTrivSqZeroExt (ι R x) = TrivSqZeroExt.inr x
-- Mathlib/Geometry/RingedSpace/Basic.lean
@[simp]
lemma zeroLocus_empty_eq_univ {U : Opens X} :
    X.zeroLocus (∅ : Set (X.presheaf.obj (op U))) = Set.univ
-- Mathlib/RingTheory/Valuation/Basic.lean
/-- The type of `Γ₀`-valued valuations on `R`.

When you extend this structure, make sure to extend `ValuationClass`. -/
structure Valuation extends R →*₀ Γ₀ where
  /-- The valuation of a a sum is less that the sum of the valuations -/
  map_add_le_max' : ∀ x y, toFun (x + y) ≤ max (toFun x) (toFun y)
-- Mathlib/Order/WithBot.lean
@[simp]
theorem coe_ne_top : (a : WithTop α) ≠ ⊤
-- Mathlib/Analysis/Complex/UnitDisc/Basic.lean
@[simp]
theorem coe_eq_zero {z : 𝔻} : (z : ℂ) = 0 ↔ z = 0
-- Mathlib/Analysis/Complex/UpperHalfPlane/Basic.lean
@[simp high]
theorem SL_neg_smul (g : SL(2, ℤ)) (z : ℍ) : -g • z = g • z
-- Mathlib/Computability/Ackermann.lean
@[simp]
theorem ack_le_iff_right {m n₁ n₂ : ℕ} : ack m n₁ ≤ ack m n₂ ↔ n₁ ≤ n₂
-- Mathlib/CategoryTheory/Limits/Shapes/Products.lean
@[ext 1050]
lemma Pi.hom_ext {f : β → C} [HasProduct f] {X : C} (g₁ g₂ : X ⟶ ∏ᶜ f)
    (h : ∀ (b : β), g₁ ≫ Pi.π f b = g₂ ≫ Pi.π f b) : g₁ = g₂
-- Mathlib/Algebra/Category/ModuleCat/Presheaf.lean
@[simp]
lemma sectionsMap_comp {M N P : PresheafOfModules.{v} R} (f : M ⟶ N) (g : N ⟶ P) (s : M.sections) :
    sectionsMap (f ≫ g) s = sectionsMap g (sectionsMap f s)
-- Mathlib/Analysis/NormedSpace/AddTorsor.lean
theorem eventually_homothety_mem_of_mem_interior (x : Q) {s : Set Q} {y : Q} (hy : y ∈ interior s) :
    ∀ᶠ δ in 𝓝 (1 : 𝕜), homothety x δ y ∈ s
-- Mathlib/Algebra/Algebra/NonUnitalHom.lean
theorem comp_apply (f : B →ₛₙₐ[ψ] C) (g : A →ₛₙₐ[φ] B) [MonoidHom.CompTriple φ ψ χ] (x : A) :
    f.comp g x = f (g x)
-- Mathlib/RingTheory/PowerSeries/Derivative.lean
theorem coeff_derivativeFun (f : R⟦X⟧) (n : ℕ) :
    coeff R n f.derivativeFun = coeff R (n + 1) f * (n + 1)
-- Mathlib/Condensed/Explicit.lean
/-- A condensed object regarded as a sheaf on `Profinite` satisfies the equalizer condition. -/
theorem equalizerCondition_profinite (X : Sheaf (coherentTopology Profinite.{u}) A) :
    EqualizerCondition X.val
-- Mathlib/Data/Matroid/Basic.lean
theorem Dep.nonempty (hD : M.Dep D) : D.Nonempty
-- Mathlib/LinearAlgebra/Matrix/Trace.lean
@[simp]
theorem trace_transpose (A : Matrix n n R) : trace Aᵀ = trace A
-- Mathlib/Data/Num/Lemmas.lean
@[simp, norm_cast]
theorem mod_to_nat : ∀ n d, ((n % d : Num) : ℕ) = n % d
-- Mathlib/Topology/Order.lean
theorem le_induced_generateFrom {α β} [t : TopologicalSpace α] {b : Set (Set β)} {f : α → β}
    (h : ∀ a : Set β, a ∈ b → IsOpen (f ⁻¹' a)) : t ≤ induced f (generateFrom b)
-- Mathlib/Analysis/Asymptotics/Asymptotics.lean
@[simp]
theorem isBigO_norm_right : (f =O[l] fun x => ‖g' x‖) ↔ f =O[l] g'
-- Mathlib/Algebra/Polynomial/FieldDivision.lean
theorem X_sub_C_dvd_derivative_of_X_sub_C_dvd_divByMonic {K : Type*} [Field K] (f : K[X]) {a : K}
    (hf : (X - C a) ∣ f /ₘ (X - C a)) : X - C a ∣ derivative f
-- Mathlib/LinearAlgebra/Alternating/Basic.lean
theorem alternatization_apply (m : MultilinearMap R (fun _ : ι => M) N') (v : ι → M) :
    alternatization m v = ∑ σ : Perm ι, Equiv.Perm.sign σ • m.domDomCongr σ v
-- Mathlib/Data/Fin/Tuple/Basic.lean
theorem contractNth_apply_of_ne (j : Fin (n + 1)) (op : α → α → α) (g : Fin (n + 1) → α) (k : Fin n)
    (hjk : (j : ℕ) ≠ k) : contractNth j op g k = g (j.succAbove k)
-- Mathlib/Algebra/Lie/Nilpotent.lean
/-- If a Lie module `M` contains a self-normalizing Lie submodule `N`, then all terms of the upper
central series of `M` are contained in `N`.

An important instance of this situation arises from a Cartan subalgebra `H ⊆ L` with the roles of
`L`, `M`, `N` played by `H`, `L`, `H`, respectively. -/
theorem ucs_le_of_normalizer_eq_self (h : N₁.normalizer = N₁) (k : ℕ) :
    (⊥ : LieSubmodule R L M).ucs k ≤ N₁
-- Mathlib/Order/WithBot.lean
theorem lt_iff_exists_coe_btwn [Preorder α] [DenselyOrdered α] [NoMinOrder α] {a b : WithBot α} :
    a < b ↔ ∃ x : α, a < ↑x ∧ ↑x < b
-- Mathlib/Data/Int/Bitwise.lean
@[simp]
theorem testBit_lnot : ∀ n k, testBit (lnot n) k = not (testBit n k)
-- .lake/packages/batteries/Batteries/Data/Sum/Lemmas.lean
theorem LiftRel.mono_left (hr : ∀ a b, r₁ a b → r₂ a b) (h : LiftRel r₁ s x y) :
    LiftRel r₂ s x y
-- Mathlib/Analysis/Normed/Ring/SeminormFromConst.lean
/-- `seminormFromConst' hf1 hc hpm c = f c`. -/
theorem seminormFromConst_apply_c : seminormFromConst' hf1 hc hpm c = f c
-- Mathlib/LinearAlgebra/Matrix/Determinant/Basic.lean
/-- Laplacian expansion of the determinant of an `n+1 × n+1` matrix along column `j`. -/
theorem det_succ_column {n : ℕ} (A : Matrix (Fin n.succ) (Fin n.succ) R) (j : Fin n.succ) :
    det A =
      ∑ i : Fin n.succ, (-1) ^ (i + j : ℕ) * A i j * det (A.submatrix i.succAbove j.succAbove)
-- Mathlib/Combinatorics/SimpleGraph/Clique.lean
theorem not_cliqueFree_iff (n : ℕ) : ¬G.CliqueFree n ↔ Nonempty ((⊤ : SimpleGraph (Fin n)) ↪g G)
-- Mathlib/Combinatorics/Additive/PluenneckeRuzsa.lean
/-- **Ruzsa's triangle inequality**. Multiplication version. -/
@[to_additive "**Ruzsa's triangle inequality**. Addition version."]
theorem ruzsa_triangle_inequality_mul_mul_mul (A B C : Finset α) :
    (A * C).card * B.card ≤ (A * B).card * (B * C).card
-- Mathlib/Topology/Order/Monotone.lean
theorem csSup_mem_closure {s : Set α} (hs : s.Nonempty) (B : BddAbove s) : sSup s ∈ closure s
-- Mathlib/GroupTheory/GroupAction/Basic.lean
/-- If the stabilizer of `a` is `S`, then the stabilizer of `g • a` is `gSg⁻¹`. -/
theorem stabilizer_smul_eq_stabilizer_map_conj (g : G) (a : α) :
    stabilizer G (g • a) = (stabilizer G a).map (MulAut.conj g).toMonoidHom
-- Mathlib/Order/Monotone/Basic.lean
protected theorem StrictMono.iterate {f : α → α} (hf : StrictMono f) (n : ℕ) : StrictMono f^[n]
-- Mathlib/AlgebraicTopology/SimplicialCategory/Basic.lean
@[simp]
lemma sHomWhiskerLeft_id (K L : C) : sHomWhiskerLeft K (𝟙 L) = 𝟙 _
-- Mathlib/Algebra/MonoidAlgebra/Basic.lean
theorem single_commute_single [Mul G] {a₁ a₂ : G} {b₁ b₂ : k}
    (ha : Commute a₁ a₂) (hb : Commute b₁ b₂) :
    Commute (single a₁ b₁) (single a₂ b₂)
-- Mathlib/Topology/Basic.lean
/-- The frontier of a set is closed. -/
theorem isClosed_frontier : IsClosed (frontier s)
-- Mathlib/GroupTheory/OrderOfElement.lean
@[to_additive add_inf_eq_bot_of_coprime]
theorem inf_eq_bot_of_coprime {G : Type*} [Group G] {H K : Subgroup G}
    (h : Nat.Coprime (Nat.card H) (Nat.card K)) : H ⊓ K = ⊥
-- Mathlib/MeasureTheory/Function/LpSeminorm/CompareExp.lean
theorem eLpNorm_le_eLpNorm_top_mul_eLpNorm (p : ℝ≥0∞) (f : α → E) {g : α → F}
    (hg : AEStronglyMeasurable g μ) (b : E → F → G)
    (h : ∀ᵐ x ∂μ, ‖b (f x) (g x)‖₊ ≤ ‖f x‖₊ * ‖g x‖₊) :
    eLpNorm (fun x => b (f x) (g x)) p μ ≤ eLpNorm f ∞ μ * eLpNorm g p μ
-- Mathlib/FieldTheory/IntermediateField.lean
@[simp]
theorem coe_map (f : L →ₐ[K] L') : (S.map f : Set L') = f '' S
-- Mathlib/Analysis/Asymptotics/Theta.lean
lemma _root_.Filter.EventuallyEq.isTheta {f g : α → E} (h : f =ᶠ[l] g) : f =Θ[l] g
-- Mathlib/RingTheory/Nilpotent/Defs.lean
@[simp] lemma nilpotencyClass_eq_zero_of_subsingleton [Subsingleton R] :
    nilpotencyClass x = 0
-- Mathlib/RingTheory/PrincipalIdealDomain.lean
/-- Any chain in the set of non-principal ideals has an upper bound which is non-principal.
(Namely, the union of the chain is such an upper bound.)
-/
theorem nonPrincipals_zorn (c : Set (Ideal R)) (hs : c ⊆ nonPrincipals R)
    (hchain : IsChain (· ≤ ·) c) {K : Ideal R} (hKmem : K ∈ c) :
    ∃ I ∈ nonPrincipals R, ∀ J ∈ c, J ≤ I
-- Mathlib/CategoryTheory/Grothendieck.lean
/-- Auxiliary definition for `grothendieckTypeToCat`, to speed up elaboration. -/
-- Porting note:
-- `simps` is incorrectly producing Prop-valued projections here,
-- so we manually specify which ones to produce.
-- See https://leanprover.zulipchat.com/#narrow/stream/144837-PR-reviews/topic/!4.233204.20simps.20bug.20.28Grothendieck.20construction.29
@[simps! obj_base obj_fiber_as map_base]
def grothendieckTypeToCatInverse : G.Elements ⥤ Grothendieck (G ⋙ typeToCat)
-- Mathlib/CategoryTheory/LiftingProperties/Adjunction.lean
theorem hasLiftingProperty_iff (adj : G ⊣ F) {A B : C} {X Y : D} (i : A ⟶ B) (p : X ⟶ Y) :
    HasLiftingProperty (G.map i) p ↔ HasLiftingProperty i (F.map p)
-- Mathlib/Analysis/SpecialFunctions/Log/ENNRealLog.lean
theorem log_monotone : Monotone log
-- Mathlib/Order/GaloisConnection.lean
@[simp]
theorem bddBelow_image (e : α ≃o β) {s : Set α} : BddBelow (e '' s) ↔ BddBelow s
-- Mathlib/Algebra/Order/AddGroupWithTop.lean
@[simp]
theorem neg_top : -(⊤ : WithTop α) = ⊤
-- Mathlib/Deprecated/Ring.lean
/-- Predicate for semiring homomorphisms (deprecated -- use the bundled `RingHom` version). -/
structure IsSemiringHom {α : Type u} {β : Type v} [Semiring α] [Semiring β] (f : α → β) : Prop where
  /-- The proposition that `f` preserves the additive identity. -/
  map_zero : f 0 = 0
  /-- The proposition that `f` preserves the multiplicative identity. -/
  map_one : f 1 = 1
  /-- The proposition that `f` preserves addition. -/
  map_add : ∀ x y, f (x + y) = f x + f y
  /-- The proposition that `f` preserves multiplication. -/
  map_mul : ∀ x y, f (x * y) = f x * f y
-- Mathlib/Data/Sigma/Interval.lean
@[simp]
theorem Ico_mk_mk : Ico (⟨i, a⟩ : Sigma α) ⟨i, b⟩ = (Ico a b).map (Embedding.sigmaMk i)
-- Mathlib/MeasureTheory/Function/SimpleFunc.lean
theorem monotone_approx (i : ℕ → β) (f : α → β) : Monotone (approx i f)
-- Mathlib/Algebra/Algebra/Subalgebra/Unitization.lean
@[simp]
theorem unitization_apply (x : Unitization R s) :
    unitization s x = algebraMap R A x.fst + x.snd
-- Mathlib/CategoryTheory/Limits/Shapes/Pullback/PullbackCone.lean
@[simp] lemma flip_inl : t.flip.inl = t.inr
-- Mathlib/LinearAlgebra/AffineSpace/Pointwise.lean
theorem vadd_mem_pointwise_vadd_iff {v : V} {s : AffineSubspace k P} {p : P} :
    v +ᵥ p ∈ v +ᵥ s ↔ p ∈ s
-- Mathlib/Algebra/Category/Grp/Basic.lean
@[to_additive (attr := simp)]
theorem coe_comp' {G H K : Type _} [CommGroup G] [CommGroup H] [CommGroup K]
    (f : G →* H) (g : H →* K) :
    @DFunLike.coe (G →* K) G (fun _ ↦ K) MonoidHom.instFunLike (CategoryStruct.comp
      (X := CommGrp.of G) (Y := CommGrp.of H) (Z := CommGrp.of K) f g) = g ∘ f
-- Mathlib/Data/Complex/Exponential.lean
@[simp]
theorem sinh_sub_cosh : sinh x - cosh x = -exp (-x)
-- Mathlib/Algebra/MonoidAlgebra/Basic.lean
/-- The embedding of an additive magma into its additive magma algebra. -/
@[simps]
def ofMagma [Add G] : Multiplicative G →ₙ* k[G]
-- Mathlib/Algebra/FreeAlgebra.lean
@[simp]
theorem ι_ne_one [Nontrivial R] (x : X) : ι R x ≠ 1
-- Mathlib/Data/Nat/Upto.lean
/-- The "greater than" relation on `Upto p` is well founded if (and only if) there exists a value
satisfying `p`. -/
protected theorem wf : (∃ x, p x) → WellFounded (Upto.GT p)
-- Mathlib/Analysis/SpecialFunctions/Trigonometric/Inverse.lean
theorem sin_arcsin' {x : ℝ} (hx : x ∈ Icc (-1 : ℝ) 1) : sin (arcsin x) = x
-- Mathlib/Topology/UniformSpace/Basic.lean
theorem UniformSpace.mem_closure_iff_ball {s : Set α} {x} :
    x ∈ closure s ↔ ∀ {V}, V ∈ 𝓤 α → (ball x V ∩ s).Nonempty
-- Mathlib/Dynamics/Newton.lean
theorem isFixedPt_newtonMap_of_isUnit_iff (h : IsUnit <| aeval x (derivative P)) :
    IsFixedPt P.newtonMap x ↔ aeval x P = 0
-- Mathlib/Data/Set/Lattice.lean
@[simp]
theorem sInter_image (f : α → Set β) (s : Set α) : ⋂₀ (f '' s) = ⋂ x ∈ s, f x
-- Mathlib/Data/Fintype/Card.lean
theorem univ_eq_singleton_of_card_one {α} [Fintype α] (x : α) (h : Fintype.card α = 1) :
    (univ : Finset α) = {x}
-- .lake/packages/batteries/Batteries/Data/Sum/Lemmas.lean
@[simp] theorem elim_comp_inl (f : α → γ) (g : β → γ) : Sum.elim f g ∘ inl = f
-- Mathlib/Algebra/Order/ToIntervalMod.lean
theorem toIocMod_apply_right (a : α) : toIocMod hp a (a + p) = a + p
-- Mathlib/Algebra/Homology/Localization.lean
lemma HomologicalComplexUpToQuasiIso.Q_inverts_homotopyEquivalences :
    (HomologicalComplex.homotopyEquivalences C c).IsInvertedBy
      HomologicalComplexUpToQuasiIso.Q
-- Mathlib/CategoryTheory/GuitartExact/VerticalComposition.lean
/-- The vertical composition of 2-squares. (Variant where we allow the replacement of
the vertical compositions by isomorphic functors.) -/
@[simps!]
def vComp' {L₁₂ : C₁ ⥤ C₃} {R₁₂ : D₁ ⥤ D₃} (eL : L₁ ⋙ L₂ ≅ L₁₂)
    (eR : R₁ ⋙ R₂ ≅ R₁₂) : TwoSquare H₁ L₁₂ R₁₂ H₃
-- Mathlib/Order/Interval/Set/Basic.lean
theorem not_mem_Ioo_of_ge (hb : b ≤ c) : c ∉ Ioo a b
-- .lake/packages/batteries/Batteries/Data/Fin/Lemmas.lean
@[simp] theorem length_list (n) : (list n).length = n
-- Mathlib/RingTheory/WittVector/Verschiebung.lean
theorem aeval_verschiebung_poly' (x : 𝕎 R) (n : ℕ) :
    aeval x.coeff (verschiebungPoly n) = (verschiebungFun x).coeff n
-- Mathlib/Data/Set/Pairwise/Basic.lean
theorem pairwise_iff_of_refl [IsRefl α r] : s.Pairwise r ↔ ∀ ⦃a⦄, a ∈ s → ∀ ⦃b⦄, b ∈ s → r a b
-- Mathlib/AlgebraicGeometry/EllipticCurve/Jacobian.lean
lemma dblY_of_Y_eq [NoZeroDivisors R] {P Q : Fin 3 → R} (hQz : Q z ≠ 0)
    (hx : P x * Q z ^ 2 = Q x * P z ^ 2) (hy : P y * Q z ^ 3 = Q y * P z ^ 3)
    (hy' : P y * Q z ^ 3 = W'.negY Q * P z ^ 3) : W'.dblY P = W'.dblU P ^ 3
-- Mathlib/Topology/Algebra/Module/Basic.lean
@[simp]
theorem coe_smulRightₗ (c : M →L[R] S) : ⇑(smulRightₗ c : M₂ →ₗ[T] M →L[R] M₂) = c.smulRight
-- Mathlib/Topology/Order/IntermediateValue.lean
/-- If preconnected set in a linear order space is unbounded below and above, then it is the whole
space. -/
theorem IsPreconnected.eq_univ_of_unbounded {s : Set α} (hs : IsPreconnected s) (hb : ¬BddBelow s)
    (ha : ¬BddAbove s) : s = univ
-- Mathlib/Order/Lattice.lean
theorem le_of_inf_le_sup_le (h₁ : x ⊓ z ≤ y ⊓ z) (h₂ : x ⊔ z ≤ y ⊔ z) : x ≤ y
-- Mathlib/Analysis/NormedSpace/AddTorsor.lean
@[simp]
lemma DilationEquiv.smulTorsor_ratio {c : P} {k : 𝕜} (hk : k ≠ 0) {x y : E}
    (h : dist x y ≠ 0) : ratio (smulTorsor c hk) = ‖k‖₊
-- Mathlib/Data/List/Basic.lean
theorem takeI_left' {l₁ l₂ : List α} {n} (h : length l₁ = n) : takeI n (l₁ ++ l₂) = l₁
-- Mathlib/Data/Real/Irrational.lean
theorem ne_nat (h : Irrational x) (m : ℕ) : x ≠ m
-- Mathlib/Algebra/Polynomial/FieldDivision.lean
theorem irreducible_of_degree_eq_one (hp1 : degree p = 1) : Irreducible p
-- Mathlib/Data/Holor.lean
theorem cast_type (eq : ds₁ = ds₂) (a : Holor α ds₁) :
    cast (congr_arg (Holor α) eq) a = fun t => a (cast (congr_arg HolorIndex eq.symm) t)
-- Mathlib/Topology/UniformSpace/Equicontinuity.lean
lemma Equicontinuous.equicontinuousOn {F : ι → X → α} (H : Equicontinuous F)
    (S : Set X) : EquicontinuousOn F S
-- Mathlib/Algebra/Order/Group/Defs.lean
@[to_additive (attr := gcongr) neg_lt_neg]
theorem inv_lt_inv' : a < b → b⁻¹ < a⁻¹
-- Mathlib/Topology/UniformSpace/UniformEmbedding.lean
theorem UniformEmbedding.of_comp_iff {g : β → γ} (hg : UniformEmbedding g) {f : α → β} :
    UniformEmbedding (g ∘ f) ↔ UniformEmbedding f
-- Mathlib/Geometry/Euclidean/Sphere/SecondInter.lean
/-- If the vector passed to `secondInter` is given by a subtraction involving the point in
`secondInter`, the three points are collinear. -/
theorem Sphere.secondInter_collinear (s : Sphere P) (p p' : P) :
    Collinear ℝ ({p, p', s.secondInter p (p' -ᵥ p)} : Set P)
-- Mathlib/Algebra/Algebra/Defs.lean
@[norm_cast]
theorem coe_one : (↑(1 : R) : A) = 1
-- Mathlib/Algebra/Group/Commute/Units.lean
@[to_additive (attr := simp)]
theorem isUnit_mul_self_iff : IsUnit (a * a) ↔ IsUnit a
-- Mathlib/Algebra/Homology/Embedding/Restriction.lean
/-- Given `e : ComplexShape.Embedding c c'`, this is the restriction
functor `HomologicalComplex C c' ⥤ HomologicalComplex C c`. -/
@[simps]
noncomputable def restrictionFunctor [HasZeroMorphisms C] :
    HomologicalComplex C c' ⥤ HomologicalComplex C c
-- Mathlib/Dynamics/Ergodic/Conservative.lean
/-- If `f` is a conservative self-map and `s` is a measurable set of positive measure, then
`ae μ`-frequently we have `x ∈ s` and `s` returns to `s` under infinitely many iterations of `f`. -/
theorem frequently_ae_mem_and_frequently_image_mem (hf : Conservative f μ)
    (hs : NullMeasurableSet s μ) (h0 : μ s ≠ 0) : ∃ᵐ x ∂μ, x ∈ s ∧ ∃ᶠ n in atTop, f^[n] x ∈ s
-- Mathlib/Algebra/Order/Monovary.lean
lemma MonovaryOn.mul_right₀ (hg₁ : ∀ i ∈ s, 0 ≤ g₁ i) (hg₂ : ∀ i ∈ s, 0 ≤ g₂ i)
    (h₁ : MonovaryOn f g₁ s) (h₂ : MonovaryOn f g₂ s) : MonovaryOn f (g₁ * g₂) s
-- Mathlib/MeasureTheory/Constructions/Pi.lean
theorem univ_pi_Ico_ae_eq_Icc {f g : ∀ i, α i} :
    (pi univ fun i => Ico (f i) (g i)) =ᵐ[Measure.pi μ] Icc f g
-- Mathlib/Topology/AlexandrovDiscrete.lean
@[simp] lemma exterior_union (s t : Set α) : exterior (s ∪ t) = exterior s ∪ exterior t
-- Mathlib/Data/List/OfFn.lean
/-- The `n`th element of a list -/
theorem get?_ofFn {n} (f : Fin n → α) (i) : get? (ofFn f) i = ofFnNthVal f i
-- Mathlib/LinearAlgebra/AffineSpace/Basis.lean
theorem coord_apply [DecidableEq ι] (i j : ι) : b.coord i (b j) = if i = j then 1 else 0
-- Mathlib/LinearAlgebra/StdBasis.lean
@[simp]
theorem stdBasis_apply' (i i' : ι) : (stdBasis R (fun _x : ι => R) i) 1 i' = ite (i = i') 1 0
-- Mathlib/Data/Nat/Nth.lean
theorem nth_eq_zero_mono (h₀ : ¬p 0) {a b : ℕ} (hab : a ≤ b) (ha : nth p a = 0) : nth p b = 0
-- Mathlib/NumberTheory/ArithmeticFunction.lean
theorem ext_iff {f g : ArithmeticFunction R} : f = g ↔ ∀ x, f x = g x
-- Mathlib/Analysis/SpecialFunctions/Trigonometric/Deriv.lean
theorem HasFDerivWithinAt.cos (hf : HasFDerivWithinAt f f' s x) :
    HasFDerivWithinAt (fun x => Real.cos (f x)) (-Real.sin (f x) • f') s x
-- .lake/packages/batteries/Batteries/Data/Nat/Gcd.lean
theorem Coprime.gcd_left (k : Nat) (hmn : Coprime m n) : Coprime (gcd k m) n
-- Mathlib/GroupTheory/PushoutI.lean
theorem cons_eq_smul {i : ι} (g : G i)
    (w : NormalWord d) (hmw : w.fstIdx ≠ some i)
    (hgr : g ∉ (φ i).range) : cons g w hmw hgr = of (φ := φ) i g  • w
-- Mathlib/Order/Hom/Bounded.lean
@[simp]
theorem bot_apply (a : α) : (⊥ : BotHom α β) a = ⊥
-- Mathlib/RingTheory/WittVector/InitTail.lean
theorem init_nsmul (m : ℕ) (x : 𝕎 R) (n : ℕ) : init n (m • x) = init n (m • init n x)
-- Mathlib/Algebra/Algebra/Subalgebra/Basic.lean
protected theorem sub_mem {R : Type u} {A : Type v} [CommRing R] [Ring A] [Algebra R A]
    (S : Subalgebra R A) {x y : A} (hx : x ∈ S) (hy : y ∈ S) : x - y ∈ S
-- Mathlib/RingTheory/NonUnitalSubring/Basic.lean
theorem prod_mono_right (s : NonUnitalSubring R) :
    Monotone fun t : NonUnitalSubring S => s.prod t
-- Mathlib/Data/Matroid/Restrict.lean
theorem Restriction.antisymm {M' : Matroid α} (h : M ≤r M') (h' : M' ≤r M) : M = M'
-- Mathlib/Deprecated/Group.lean
/-- The composition of two group homomorphisms is a group homomorphism. -/
@[to_additive
      "The composition of two additive group homomorphisms is an additive
      group homomorphism."]
theorem comp (hf : IsGroupHom f) {γ} [Group γ] {g : β → γ} (hg : IsGroupHom g) :
    IsGroupHom (g ∘ f)
-- Mathlib/Algebra/Group/Subgroup/MulOpposite.lean
@[to_additive]
theorem op_sSup (S : Set (Subgroup G)) : (sSup S).op = sSup (.unop ⁻¹' S)
-- Mathlib/Algebra/Star/Subalgebra.lean
/-- The minimal star subalgebra that contains `s`. -/
@[simps!]
def adjoin (s : Set A) : StarSubalgebra R A
-- Mathlib/MeasureTheory/Function/L2Space.lean
theorem Memℒp.integrable_sq {f : α → ℝ} (h : Memℒp f 2 μ) : Integrable (fun x => f x ^ 2) μ
-- Mathlib/FieldTheory/IntermediateField.lean
@[simp]
theorem coe_toSubfield : (S.toSubfield : Set L) = S
-- Mathlib/MeasureTheory/Group/FundamentalDomain.lean
@[to_additive]
protected theorem aEStronglyMeasurable_on_iff {β : Type*} [TopologicalSpace β]
    [PseudoMetrizableSpace β] (hs : IsFundamentalDomain G s μ) (ht : IsFundamentalDomain G t μ)
    {f : α → β} (hf : ∀ (g : G) (x), f (g • x) = f x) :
    AEStronglyMeasurable f (μ.restrict s) ↔ AEStronglyMeasurable f (μ.restrict t)
-- Mathlib/Analysis/SpecialFunctions/Sqrt.lean
theorem HasStrictDerivAt.sqrt (hf : HasStrictDerivAt f f' x) (hx : f x ≠ 0) :
    HasStrictDerivAt (fun t => √(f t)) (f' / (2 * √(f x))) x
-- Mathlib/Data/TypeVec.lean
theorem appendFun_aux {α α' : TypeVec n} {β β' : Type*} (f : (α ::: β) ⟹ (α' ::: β')) :
    (dropFun f ::: lastFun f) = f
-- Mathlib/MeasureTheory/Function/LpSpace.lean
theorem _root_.MeasureTheory.memℒp_re_im_iff {f : α → K} :
    Memℒp (fun x ↦ RCLike.re (f x)) p μ ∧ Memℒp (fun x ↦ RCLike.im (f x)) p μ ↔
      Memℒp f p μ
-- Mathlib/SetTheory/Lists.lean
theorem cons_subset {a} {l₁ l₂ : Lists' α true} : Lists'.cons a l₁ ⊆ l₂ ↔ a ∈ l₂ ∧ l₁ ⊆ l₂
-- Mathlib/CategoryTheory/Limits/Shapes/WidePullbacks.lean
@[reassoc]
theorem ι_desc (j : J) : ι arrows j ≫ desc f fs w = fs _
-- Mathlib/Order/LiminfLimsup.lean
theorem limsup_le_iff {α β} [ConditionallyCompleteLinearOrder β] {f : Filter α} {u : α → β} {x : β}
    (h₁ : f.IsCoboundedUnder (· ≤ ·) u := by isBoundedDefault)
    (h₂ : f.IsBoundedUnder (· ≤ ·) u := by isBoundedDefault) :
    limsup u f ≤ x ↔ ∀ y > x, ∀ᶠ a in f, u a < y
-- Mathlib/CategoryTheory/Monoidal/Free/Basic.lean
@[simp]
theorem mk_whiskerRight {X₁ X₂ : F C} (f : X₁ ⟶ᵐ X₂) (Y : F C) :
    ⟦f.whiskerRight Y⟧ = MonoidalCategory.whiskerRight (C := F C) (f := ⟦f⟧) (Y := Y)
-- Mathlib/Algebra/Order/Monoid/Unbundled/Basic.lean
@[to_additive]
protected theorem mul_le_iff_le_one_right [MulOneClass α] [CovariantClass α α (· * ·) (· ≤ ·)]
    {a b : α} (ha : MulLECancellable a) :
    a * b ≤ a ↔ b ≤ 1
-- Mathlib/Topology/DiscreteQuotient.lean
@[simp]
theorem proj_bot_eq [LocallyConnectedSpace X] {x y : X} :
    proj ⊥ x = proj ⊥ y ↔ connectedComponent x = connectedComponent y
-- Mathlib/Algebra/Jordan/Basic.lean
theorem two_nsmul_lie_lmul_lmul_add_eq_lie_lmul_lmul_add (a b : A) :
    2 • (⁅L a, L (a * b)⁆ + ⁅L b, L (b * a)⁆) = ⁅L (a * a), L b⁆ + ⁅L (b * b), L a⁆
-- Mathlib/Probability/Martingale/Basic.lean
theorem martingale_of_condexp_sub_eq_zero_nat [IsFiniteMeasure μ] {f : ℕ → Ω → ℝ}
    (hadp : Adapted 𝒢 f) (hint : ∀ i, Integrable (f i) μ)
    (hf : ∀ i, μ[f (i + 1) - f i|𝒢 i] =ᵐ[μ] 0) : Martingale f 𝒢 μ
-- Mathlib/Data/Multiset/Basic.lean
@[simp]
theorem coe_subset {l₁ l₂ : List α} : (l₁ : Multiset α) ⊆ l₂ ↔ l₁ ⊆ l₂
-- Mathlib/Algebra/Order/Monoid/Canonical/Defs.lean
@[to_additive (attr := simp)]
theorem self_le_mul_right (a b : α) : a ≤ a * b
-- Mathlib/Topology/UniformSpace/Basic.lean
/-- A version of `UniformContinuous.inf_dom_right` for binary functions -/
theorem uniformContinuous_inf_dom_right₂ {α β γ} {f : α → β → γ} {ua1 ua2 : UniformSpace α}
    {ub1 ub2 : UniformSpace β} {uc1 : UniformSpace γ}
    (h : by haveI := ua2; haveI := ub2; exact UniformContinuous fun p : α × β => f p.1 p.2) : by
      haveI := ua1 ⊓ ua2; haveI := ub1 ⊓ ub2
      exact UniformContinuous fun p : α × β => f p.1 p.2
-- Mathlib/AlgebraicGeometry/ProjectiveSpectrum/Topology.lean
theorem isTopologicalBasis_basic_opens :
    TopologicalSpace.IsTopologicalBasis
      (Set.range fun r : A => (basicOpen 𝒜 r : Set (ProjectiveSpectrum 𝒜)))
-- Mathlib/Order/WellFounded.lean
theorem min_mem {r : α → α → Prop} (H : WellFounded r) (s : Set α) (h : s.Nonempty) :
    H.min s h ∈ s