ruc-ai4math/mathlib_handler_benchmark_410 huggingface dataset:
-- Mathlib/MeasureTheory/Constructions/BorelSpace/Real.lean
theorem borel_eq_generateFrom_Ioi_rat : borel ℝ = .generateFrom (⋃ a : ℚ, {Ioi (a : ℝ)})
-- Mathlib/MeasureTheory/Constructions/BorelSpace/Order.lean
/-- Two finite measures on a Borel space are equal if they agree on all open-closed intervals.  If
`α` is a conditionally complete linear order with no top element,
`MeasureTheory.Measure.ext_of_Ioc` is an extensionality lemma with weaker assumptions on `μ` and
`ν`. -/
theorem ext_of_Ioc_finite {α : Type*} [TopologicalSpace α] {m : MeasurableSpace α}
    [SecondCountableTopology α] [LinearOrder α] [OrderTopology α] [BorelSpace α] (μ ν : Measure α)
    [IsFiniteMeasure μ] (hμν : μ univ = ν univ) (h : ∀ ⦃a b⦄, a < b → μ (Ioc a b) = ν (Ioc a b)) :
    μ = ν
-- Mathlib/LinearAlgebra/Matrix/NonsingularInverse.lean
/-- Together `Matrix.diagonalInvertible` and `Matrix.invertibleOfDiagonalInvertible` form an
equivalence, although both sides of the equiv are subsingleton anyway. -/
@[simps]
def diagonalInvertibleEquivInvertible (v : n → α) : Invertible (diagonal v) ≃ Invertible v
-- Mathlib/CategoryTheory/Bicategory/Kan/HasKan.lean
/-- We say that there exists an absolute left Kan lift of `g` along `f` if any 1-morphism `h`
commutes with the left Kan lift `f₊ g`. -/
class HasAbsLeftKanLift (f : b ⟶ a) (g : c ⟶ a) extends HasLeftKanLift f g : Prop where
  commute : ∀ {x : B} (h : x ⟶ c), LanLift.CommuteWith f g h
-- Mathlib/Analysis/InnerProductSpace/Adjoint.lean
theorem isAdjointPair_inner (A : E →L[𝕜] F) :
    LinearMap.IsAdjointPair (sesqFormOfInner : E →ₗ[𝕜] E →ₗ⋆[𝕜] 𝕜)
      (sesqFormOfInner : F →ₗ[𝕜] F →ₗ⋆[𝕜] 𝕜) A (A†)
-- Mathlib/CategoryTheory/Triangulated/Functor.lean
/-- The functor `Triangle C ⥤ Triangle D` that is induced by a functor `F : C ⥤ D`
which commutes with shift by `ℤ`. -/
@[simps]
def mapTriangle : Triangle C ⥤ Triangle D
-- Mathlib/GroupTheory/Coxeter/Inversion.lean
theorem pow_two : t ^ 2 = 1
-- Mathlib/CategoryTheory/Limits/EssentiallySmall.lean
theorem hasLimitsOfShape_of_essentiallySmall [EssentiallySmall.{w₁} J]
    [HasLimitsOfSize.{w₁, w₁} C] : HasLimitsOfShape J C
-- Mathlib/MeasureTheory/Integral/SetToL1.lean
theorem setToL1S_indicatorConst {T : Set α → E →L[ℝ] F} {s : Set α}
    (h_zero : ∀ s, MeasurableSet s → μ s = 0 → T s = 0) (h_add : FinMeasAdditive μ T)
    (hs : MeasurableSet s) (hμs : μ s < ∞) (x : E) :
    setToL1S T (simpleFunc.indicatorConst 1 hs hμs.ne x) = T s x
-- Mathlib/Init/Data/Sigma/Basic.lean
protected theorem PSigma.eq {α : Sort u} {β : α → Sort v} : ∀ {p₁ p₂ : Σ' a, β a} (h₁ : p₁.1 = p₂.1),
    (Eq.recOn h₁ p₁.2 : β p₂.1) = p₂.2 → p₁ = p₂
-- Mathlib/Topology/MetricSpace/Pseudo/Defs.lean
theorem ball_eq_ball' (ε : ℝ) (x : α) :
    UniformSpace.ball x { p | dist p.1 p.2 < ε } = Metric.ball x ε
-- Mathlib/Order/Atoms.lean
theorem isAtom_single {i : ι} [DecidableEq ι] [∀ i, PartialOrder (π i)] [∀ i, OrderBot (π i)]
    {a : π i} (h : IsAtom a) : IsAtom (Function.update (⊥ : ∀ i, π i) i a)
-- Mathlib/Topology/Order/OrderClosed.lean
protected theorem Filter.Tendsto.max {b : Filter β} {a₁ a₂ : α} (hf : Tendsto f b (𝓝 a₁))
    (hg : Tendsto g b (𝓝 a₂)) : Tendsto (fun b => max (f b) (g b)) b (𝓝 (max a₁ a₂))
-- Mathlib/FieldTheory/Adjoin.lean
theorem subset_adjoin_of_subset_left {F : Subfield E} {T : Set E} (HT : T ⊆ F) : T ⊆ adjoin F S
-- Mathlib/AlgebraicGeometry/EllipticCurve/Affine.lean
lemma nonsingular_neg_iff (x y : R) : W.Nonsingular x (W.negY x y) ↔ W.Nonsingular x y
-- Mathlib/Data/Set/BoolIndicator.lean
theorem mem_iff_boolIndicator (x : α) : x ∈ s ↔ s.boolIndicator x = true
-- Mathlib/Condensed/Light/TopCatAdjunction.lean
/-- The unit of the adjunction `lightCondSetToTopCat ⊣ topCatToLightCondSet` -/
@[simps val_app val_app_apply]
def topCatAdjunctionUnit (X : LightCondSet.{u}) : X ⟶ X.toTopCat.toLightCondSet
-- Mathlib/RingTheory/HahnSeries/Basic.lean
theorem BddBelow_zero [Nonempty Γ] : BddBelow (Function.support (0 : Γ → R))
-- Mathlib/Analysis/Normed/Operator/LinearIsometry.lean
theorem map_smulₛₗ (c : R) (x : E) : e (c • x) = σ₁₂ c • e x
-- Mathlib/Geometry/Euclidean/Basic.lean
/-- A point equals its orthogonal projection if and only if it lies in
the subspace. -/
theorem orthogonalProjection_eq_self_iff {s : AffineSubspace ℝ P} [Nonempty s]
    [HasOrthogonalProjection s.direction] {p : P} : ↑(orthogonalProjection s p) = p ↔ p ∈ s
-- Mathlib/Algebra/Field/Subfield.lean
/-- Product of a list of elements in a subfield is in the subfield. -/
protected theorem list_prod_mem {l : List K} : (∀ x ∈ l, x ∈ s) → l.prod ∈ s
-- Mathlib/AlgebraicGeometry/EllipticCurve/Weierstrass.lean
lemma ofJ_c₄ : (ofJ j).c₄ = j * (j - 1728) ^ 3
-- Mathlib/Analysis/Matrix.lean
theorem nnnorm_def (A : Matrix m n α) : ‖A‖₊ = ‖fun i j => A i j‖₊
-- Mathlib/Order/Fin/Basic.lean
lemma top_eq_last (n : ℕ) : ⊤ = Fin.last n
-- Mathlib/Algebra/LinearRecurrence.lean
/-- The geometric sequence `q^n` is a solution of `E` iff
  `q` is a root of `E`'s characteristic polynomial. -/
theorem geom_sol_iff_root_charPoly (q : α) :
    (E.IsSolution fun n ↦ q ^ n) ↔ E.charPoly.IsRoot q
-- Mathlib/Probability/Kernel/Disintegration/CdfToKernel.lean
lemma setLIntegral_toKernel_prod [IsFiniteKernel κ] (hf : IsCondKernelCDF f κ ν)
    (a : α) {s : Set β} (hs : MeasurableSet s) {t : Set ℝ} (ht : MeasurableSet t) :
    ∫⁻ b in s, hf.toKernel f (a, b) t ∂(ν a) = κ a (s ×ˢ t)
-- Mathlib/Algebra/CubicDiscriminant.lean
theorem monic_of_a_eq_one' : (toPoly ⟨1, b, c, d⟩).Monic
-- Mathlib/LinearAlgebra/Matrix/Symmetric.lean
theorem isSymm_transpose_add_self [AddCommSemigroup α] (A : Matrix n n α) : (Aᵀ + A).IsSymm
-- Mathlib/Data/Sum/Interval.lean
lemma sumLexLift_eq_empty :
    sumLexLift f₁ f₂ g₁ g₂ a b = ∅ ↔
      (∀ a₁ b₁, a = inl a₁ → b = inl b₁ → f₁ a₁ b₁ = ∅) ∧
        (∀ a₁ b₂, a = inl a₁ → b = inr b₂ → g₁ a₁ b₂ = ∅ ∧ g₂ a₁ b₂ = ∅) ∧
          ∀ a₂ b₂, a = inr a₂ → b = inr b₂ → f₂ a₂ b₂ = ∅
-- Mathlib/Order/SuccPred/LinearLocallyFinite.lean
theorem isMax_of_succFn_le [LocallyFiniteOrder ι] (i : ι) (hi : succFn i ≤ i) : IsMax i
-- Mathlib/RingTheory/ClassGroup.lean
@[simp]
theorem ClassGroup.mk_canonicalEquiv (K' : Type*) [Field K'] [Algebra R K'] [IsFractionRing R K']
    (I : (FractionalIdeal R⁰ K)ˣ) :
    ClassGroup.mk (Units.map (↑(canonicalEquiv R⁰ K K')) I : (FractionalIdeal R⁰ K')ˣ) =
      ClassGroup.mk I
-- Mathlib/Data/Vector3.lean
theorem vectorAll_iff_forall : ∀ {n} (f : Vector3 α n → Prop), VectorAll n f ↔ ∀ v, f v
-- Mathlib/Data/Matroid/Map.lean
@[simp] lemma mapSetEmbedding_indep_iff {f : M.E ↪ β} {I : Set β} :
    (M.mapSetEmbedding f).Indep I ↔ M.Indep ↑(f ⁻¹' I) ∧ I ⊆ range f
-- Mathlib/Data/PNat/Find.lean
theorem find_eq_iff : PNat.find h = m ↔ p m ∧ ∀ n < m, ¬p n
-- Mathlib/Data/Real/Cardinality.lean
theorem cantorFunctionAux_succ (f : ℕ → Bool) :
    (fun n => cantorFunctionAux c f (n + 1)) = fun n =>
      c * cantorFunctionAux c (fun n => f (n + 1)) n
-- Mathlib/MeasureTheory/Function/LpSeminorm/Basic.lean
@[simp]
theorem eLpNormEssSup_eq_zero_iff {f : α → F} : eLpNormEssSup f μ = 0 ↔ f =ᵐ[μ] 0
-- Mathlib/Analysis/Convex/Strict.lean
theorem Directed.strictConvex_iUnion {ι : Sort*} {s : ι → Set E} (hdir : Directed (· ⊆ ·) s)
    (hs : ∀ ⦃i : ι⦄, StrictConvex 𝕜 (s i)) : StrictConvex 𝕜 (⋃ i, s i)
-- Mathlib/Topology/UniformSpace/Equicontinuity.lean
protected theorem Set.Equicontinuous.continuous_of_mem {H : Set <| X → α} (h : H.Equicontinuous)
    {f : X → α} (hf : f ∈ H) : Continuous f
-- Mathlib/Order/Filter/AtTopBot.lean
theorem atTop_basis_Ioi [Nonempty α] [SemilatticeSup α] [NoMaxOrder α] :
    (@atTop α _).HasBasis (fun _ => True) Ioi
-- Mathlib/GroupTheory/GroupAction/IterateAct.lean
@[to_additive (attr := simp)]
theorem mk_smul (n : ℕ) (x : α) : mk (f := f) n • x = f^[n] x
-- Mathlib/CategoryTheory/Limits/Shapes/BinaryProducts.lean
/-- If `C` has all colimits of diagrams `pair X Y`, then it has all binary coproducts -/
theorem hasBinaryCoproducts_of_hasColimit_pair [∀ {X Y : C}, HasColimit (pair X Y)] :
    HasBinaryCoproducts C
-- Mathlib/MeasureTheory/Measure/Haar/Disintegration.lean
/-- The image of an additive Haar measure under a surjective linear map is proportional to a given
additive Haar measure, with a positive (but maybe infinite) factor. -/
theorem LinearMap.exists_map_addHaar_eq_smul_addHaar (h : Function.Surjective L) :
    ∃ (c : ℝ≥0∞), 0 < c ∧ μ.map L = c • ν
-- Mathlib/Data/Finset/Basic.lean
theorem filter_ne' [DecidableEq β] (s : Finset β) (b : β) : (s.filter fun a => a ≠ b) = s.erase b
-- Mathlib/NumberTheory/LegendreSymbol/AddCharacter.lean
/-- If `e` is not primitive, then `e.mulShift d = 1` for some proper divisor `d` of `N`. -/
lemma exists_divisor_of_not_isPrimitive (he : ¬e.IsPrimitive) :
    ∃ d : ℕ, d ∣ N ∧ d < N ∧ e.mulShift d = 1
-- Mathlib/RingTheory/NonUnitalSubring/Basic.lean
/-- Sum of a list of elements in a non-unital subring is in the non-unital subring. -/
protected theorem list_sum_mem {l : List R} : (∀ x ∈ l, x ∈ s) → l.sum ∈ s
-- Mathlib/Combinatorics/Young/YoungDiagram.lean
@[simp]
theorem colLen_transpose (μ : YoungDiagram) (j : ℕ) : μ.transpose.colLen j = μ.rowLen j
-- Mathlib/RingTheory/NonUnitalSubring/Basic.lean
@[simp]
theorem sInf_toSubsemigroup (s : Set (NonUnitalSubring R)) :
    (sInf s).toSubsemigroup = ⨅ t ∈ s, NonUnitalSubring.toSubsemigroup t
-- Mathlib/Topology/Instances/Matrix.lean
@[continuity]
theorem Continuous.matrix_mulVec [NonUnitalNonAssocSemiring R] [ContinuousAdd R] [ContinuousMul R]
    [Fintype n] {A : X → Matrix m n R} {B : X → n → R} (hA : Continuous A) (hB : Continuous B) :
    Continuous fun x => A x *ᵥ B x
-- Mathlib/Analysis/Calculus/FDeriv/Linear.lean
@[fun_prop]
theorem IsBoundedLinearMap.hasFDerivWithinAt (h : IsBoundedLinearMap 𝕜 f) :
    HasFDerivWithinAt f h.toContinuousLinearMap s x
-- Mathlib/Data/Fin/Basic.lean
lemma succAbove_of_lt_succ (p : Fin (n + 1)) (i : Fin n) (h : p < succ i) :
    p.succAbove i = succ i
-- Mathlib/Order/Filter/Basic.lean
@[simp]
theorem eventually_comap : (∀ᶠ a in comap f l, p a) ↔ ∀ᶠ b in l, ∀ a, f a = b → p a
-- Mathlib/CategoryTheory/Category/Cat.lean
lemma leftUnitor_hom_app {B C : Cat} (F : B ⟶ C) (X : B) : (λ_ F).hom.app X = eqToHom (by simp)
-- Mathlib/RingTheory/Localization/NumDen.lean
theorem num_mul_den_eq_num_mul_den_iff_eq {x y : K} :
    num A y * den A x = num A x * den A y ↔ x = y
-- Mathlib/NumberTheory/PellMatiyasevic.lean
@[simp]
theorem yn_zero : yn a1 0 = 0
-- Mathlib/Order/Filter/NAry.lean
@[simp]
theorem map₂_eq_bot_iff : map₂ m f g = ⊥ ↔ f = ⊥ ∨ g = ⊥
-- Mathlib/NumberTheory/LSeries/HurwitzZetaEven.lean
lemma evenKernel_neg (a : UnitAddCircle) (x : ℝ) : evenKernel (-a) x = evenKernel a x
-- Mathlib/Topology/EMetricSpace/Lipschitz.lean
protected theorem prod_mk_right (b : β) : LocallyLipschitz (fun a : α => (a, b))
-- Mathlib/CategoryTheory/Sites/SheafOfTypes.lean
theorem IsSheaf.isSheafFor {P : Cᵒᵖ ⥤ Type w} (hp : IsSheaf J P) (R : Presieve X)
    (hr : generate R ∈ J X) : IsSheafFor P R
-- Mathlib/Data/Finset/Fin.lean
@[simp]
theorem mem_attachFin {n : ℕ} {s : Finset ℕ} (h : ∀ m ∈ s, m < n) {a : Fin n} :
    a ∈ s.attachFin h ↔ (a : ℕ) ∈ s
-- Mathlib/Data/Set/Sups.lean
lemma sep_sups_le (s t : Set α) (a : α) :
    {b ∈ s ⊻ t | b ≤ a} = {b ∈ s | b ≤ a} ⊻ {b ∈ t | b ≤ a}
-- Mathlib/Topology/Constructions.lean
/-- Postcomposing `f` with `Prod.snd` is continuous at `x` -/
@[fun_prop]
theorem ContinuousAt.snd {f : X → Y × Z} {x : X} (hf : ContinuousAt f x) :
    ContinuousAt (fun x : X => (f x).2) x
-- Mathlib/RingTheory/WittVector/Defs.lean
theorem wittPow_vars (m : ℕ) (n : ℕ) : (wittPow p m n).vars ⊆ Finset.univ ×ˢ Finset.range (n + 1)
-- Mathlib/GroupTheory/MonoidLocalization/Basic.lean
theorem smul_mk [SMul R M] [IsScalarTower R M M] (c : R) (a b) :
    c • (mk a b : Localization S) = mk (c • a) b
-- Mathlib/RingTheory/MvPolynomial/Homogeneous.lean
theorem homogeneousComponent_eq_zero (h : φ.totalDegree < n) : homogeneousComponent n φ = 0
-- Mathlib/AlgebraicGeometry/EllipticCurve/Jacobian.lean
@[simp] lemma map_negDblY : negDblY (W'.map f) (f ∘ P) = f (W'.negDblY P)
-- .lake/packages/lean4/src/lean/Init/Core.lean
theorem iff_of_true (ha : a) (hb : b) : a ↔ b
-- Mathlib/MeasureTheory/Constructions/Prod/Basic.lean
theorem lintegral_prod_mul {f : α → ℝ≥0∞} {g : β → ℝ≥0∞} (hf : AEMeasurable f μ)
    (hg : AEMeasurable g ν) : ∫⁻ z, f z.1 * g z.2 ∂μ.prod ν = (∫⁻ x, f x ∂μ) * ∫⁻ y, g y ∂ν
-- Mathlib/LinearAlgebra/AffineSpace/Restrict.lean
theorem AffineMap.restrict.surjective (φ : P₁ →ᵃ[k] P₂) {E : AffineSubspace k P₁}
    {F : AffineSubspace k P₂} [Nonempty E] [Nonempty F] (h : E.map φ = F) :
    Function.Surjective (AffineMap.restrict φ (le_of_eq h))
-- Mathlib/Algebra/Order/Module/Defs.lean
lemma smul_lt_smul_of_le_of_lt' [PosSMulStrictMono α β] [SMulPosMono α β] (ha : a₁ ≤ a₂)
    (hb : b₁ < b₂) (h₂ : 0 < a₂) (h₁ : 0 ≤ b₁) : a₁ • b₁ < a₂ • b₂
-- .lake/packages/lean4/src/lean/Init/Data/Int/DivModLemmas.lean
protected theorem dvd_sub : ∀ {a b c : Int}, a ∣ b → a ∣ c → a ∣ b - c
-- Mathlib/Algebra/Quaternion.lean
@[simp, norm_cast] lemma ratCast_re (q : ℚ) : (q : ℍ[R]).re = q
-- Mathlib/MeasureTheory/Group/FundamentalDomain.lean
@[to_additive MeasureTheory.NullMeasurableSet.addFundamentalInterior]
protected theorem NullMeasurableSet.fundamentalInterior (hs : NullMeasurableSet s μ) :
    NullMeasurableSet (fundamentalInterior G s) μ
-- Mathlib/Data/Finset/Sups.lean
lemma biUnion_image_sup_right : t.biUnion (fun b ↦ s.image (· ⊔ b)) = s ⊻ t
-- Mathlib/Data/Set/Finite.lean
protected theorem toFinset_univ [Fintype α] (h : (Set.univ : Set α).Finite) :
    h.toFinset = Finset.univ
-- Mathlib/Algebra/Polynomial/BigOperators.lean
theorem multiset_prod_X_sub_C_coeff_card_pred (t : Multiset R) (ht : 0 < Multiset.card t) :
    (t.map fun x => X - C x).prod.coeff ((Multiset.card t) - 1) = -t.sum
-- Mathlib/LinearAlgebra/ExteriorAlgebra/Basic.lean
/-- An injective morphism of vector spaces induces an injective morphism of exterior algebras. -/
lemma map_injective_field {f : E →ₗ[K] F} (hf : LinearMap.ker f = ⊥) :
    Function.Injective (map f)
-- Mathlib/NumberTheory/Padics/PadicVal.lean
/-- **Kummer's Theorem**

The `p`-adic valuation of `n.choose k` is the number of carries when `k` and `n - k` are added
in base `p`. This sum is expressed over the finset `Ico 1 b` where `b` is any bound greater than
`log p n`. -/
theorem padicValNat_choose {n k b : ℕ} [hp : Fact p.Prime] (hkn : k ≤ n) (hnb : log p n < b) :
    padicValNat p (choose n k) =
    ((Finset.Ico 1 b).filter fun i => p ^ i ≤ k % p ^ i + (n - k) % p ^ i).card
-- Mathlib/Algebra/Group/Conj.lean
@[simp]
theorem isConj_iff_eq {α : Type*} [CommMonoid α] {a b : α} : IsConj a b ↔ a = b
-- Mathlib/Data/ENNReal/Operations.lean
protected theorem le_of_add_le_add_left : a ≠ ∞ → a + b ≤ a + c → b ≤ c
-- Mathlib/RingTheory/GradedAlgebra/HomogeneousLocalization.lean
@[simp]
theorem val_neg : ∀ y : HomogeneousLocalization 𝒜 x, (-y).val = -y.val
-- Mathlib/Algebra/AddConstMap/Equiv.lean
lemma toEquiv_injective : Injective (toEquiv : (G ≃+c[a, b] H) → G ≃ H)
-- Mathlib/Analysis/Complex/Basic.lean
theorem hasSum_conj' {f : α → ℂ} {x : ℂ} : HasSum (fun x => conj (f x)) (conj x) ↔ HasSum f x
-- Mathlib/Data/Finset/Card.lean
/-- If `a ∈ s` is known, see also `Finset.card_erase_of_mem` and `Finset.erase_eq_of_not_mem`. -/
theorem card_erase_eq_ite : (s.erase a).card = if a ∈ s then s.card - 1 else s.card
-- Mathlib/AlgebraicTopology/FundamentalGroupoid/InducedMaps.lean
/-- Proof that `H.evalAt x = H(0 ⟶ 1, x ⟶ x)`, with the appropriate casts -/
theorem evalAt_eq (x : X) : ⟦H.evalAt x⟧ = hcast (H.apply_zero x).symm ≫
    (πₘ H.uliftMap).map (prodToProdTopI uhpath01 (𝟙 (fromTop x))) ≫
      hcast (H.apply_one x).symm.symm
-- Mathlib/MeasureTheory/Function/SpecialFunctions/RCLike.lean
@[measurability]
theorem measurable_im : Measurable (im : 𝕜 → ℝ)
-- Mathlib/Data/Real/Irrational.lean
@[simp] theorem not_irrational_ofNat (n : ℕ) [n.AtLeastTwo] :
    ¬Irrational (no_index (OfNat.ofNat n))
-- Mathlib/SetTheory/Ordinal/Arithmetic.lean
@[simp]
theorem sup_natCast : sup Nat.cast = ω
-- Mathlib/ModelTheory/Basic.lean
theorem surjective (f : M ≃[L] N) : Function.Surjective f
-- Mathlib/Analysis/InnerProductSpace/Projection.lean
/-- If the orthogonal projection to `K` is well-defined, then a vector splits as the sum of its
orthogonal projections onto a complete submodule `K` and onto the orthogonal complement of `K`. -/
theorem orthogonalProjection_add_orthogonalProjection_orthogonal [HasOrthogonalProjection K]
    (w : E) : (orthogonalProjection K w : E) + (orthogonalProjection Kᗮ w : E) = w
-- Mathlib/Data/Finset/PImage.lean
theorem pimage_inter [DecidableEq α] : (s ∩ t).pimage f ⊆ s.pimage f ∩ t.pimage f
-- Mathlib/MeasureTheory/Function/L1Space.lean
theorem edist_def (f g : α →₁[μ] β) : edist f g = ∫⁻ a, edist (f a) (g a) ∂μ
-- Mathlib/Analysis/SpecialFunctions/Trigonometric/Deriv.lean
theorem HasDerivAt.ccos (hf : HasDerivAt f f' x) :
    HasDerivAt (fun x => Complex.cos (f x)) (-Complex.sin (f x) * f') x
-- Mathlib/LinearAlgebra/TensorProduct/Basic.lean
/-- Given linear maps `f : M → Q`, `g : N → S`, and `h : P → T`, if we identify `(M ⊗ N) ⊗ P`
with `M ⊗ (N ⊗ P)` and `(Q ⊗ S) ⊗ T` with `Q ⊗ (S ⊗ T)`, then this lemma states that
`f ⊗ (g ⊗ h) = (f ⊗ g) ⊗ h`. -/
lemma map_map_comp_assoc_eq (f : M →ₗ[R] Q) (g : N →ₗ[R] S) (h : P →ₗ[R] T) :
    map f (map g h) ∘ₗ TensorProduct.assoc R M N P =
      TensorProduct.assoc R Q S T ∘ₗ map (map f g) h
-- Mathlib/Data/Set/Pointwise/Interval.lean
@[to_additive Iic_add_Iio_subset]
theorem Iic_mul_Iio_subset' (a b : α) : Iic a * Iio b ⊆ Iio (a * b)
-- Mathlib/Algebra/GroupWithZero/Units/Basic.lean
@[simp] lemma div_mul_cancel₀ (a : G₀) (h : b ≠ 0) : a / b * b = a
-- Mathlib/Data/Finsupp/Defs.lean
theorem support_eq_singleton {f : α →₀ M} {a : α} :
    f.support = {a} ↔ f a ≠ 0 ∧ f = single a (f a)
-- Mathlib/Analysis/InnerProductSpace/Calculus.lean
theorem Differentiable.norm (hf : Differentiable ℝ f) (h0 : ∀ x, f x ≠ 0) :
    Differentiable ℝ fun y => ‖f y‖
-- Mathlib/Algebra/Ring/Commute.lean
@[simp]
theorem add_left [Distrib R] {a b c : R} : Commute a c → Commute b c → Commute (a + b) c
-- Mathlib/MeasureTheory/Function/ConditionalExpectation/CondexpL1.lean
theorem condexpL1_undef (hf : ¬Integrable f μ) : condexpL1 hm μ f = 0
-- Mathlib/Data/Nat/Defs.lean
lemma mul_self_le_mul_self (h : m ≤ n) : m * m ≤ n * n
-- Mathlib/Order/Interval/Set/OrdConnected.lean
theorem OrdConnected.preimage_anti {f : β → α} (hs : OrdConnected s) (hf : Antitone f) :
    OrdConnected (f ⁻¹' s)
-- Mathlib/Probability/Distributions/Geometric.lean
/-- The geometric pmf is measurable. -/
@[measurability]
lemma measurable_geometricPMFReal : Measurable (geometricPMFReal p)
-- Mathlib/Analysis/Calculus/ContDiff/Defs.lean
theorem ContDiffWithinAt.congr_nhds (h : ContDiffWithinAt 𝕜 n f s x) {t : Set E}
    (hst : 𝓝[s] x = 𝓝[t] x) : ContDiffWithinAt 𝕜 n f t x
-- Mathlib/Order/WithBot.lean
theorem ofDual_le_iff {a : WithBot αᵒᵈ} {b : WithTop α} :
    WithBot.ofDual a ≤ b ↔ WithTop.toDual b ≤ a
-- Mathlib/Topology/Sheaves/Stalks.lean
theorem stalkPushforward_iso_of_openEmbedding {f : X ⟶ Y} (hf : OpenEmbedding f) (F : X.Presheaf C)
    (x : X) : IsIso (F.stalkPushforward _ f x)
-- Mathlib/Order/Category/LinOrd.lean
/-- `OrderDual` as a functor. -/
@[simps]
def dual : LinOrd ⥤ LinOrd
-- Mathlib/Order/Filter/Prod.lean
@[simp] theorem bot_prod : (⊥ : Filter α) ×ˢ g = ⊥
-- Mathlib/Topology/Semicontinuous.lean
/-- The sum of two upper semicontinuous functions is upper semicontinuous. Formulated with
`[ContinuousAdd]`. The primed version of the lemma uses an explicit continuity assumption on
addition, for application to `EReal`. -/
theorem UpperSemicontinuousAt.add {f g : α → γ} (hf : UpperSemicontinuousAt f x)
    (hg : UpperSemicontinuousAt g x) : UpperSemicontinuousAt (fun z => f z + g z) x
-- Mathlib/Algebra/Polynomial/Splits.lean
theorem degree_eq_card_roots {p : K[X]} {i : K →+* L} (p_ne_zero : p ≠ 0) (hsplit : Splits i p) :
    p.degree = Multiset.card (p.map i).roots
-- Mathlib/GroupTheory/MonoidLocalization/Basic.lean
/-- Given a Localization map `f : M →* N` for a Submonoid `S ⊆ M`, if a `CommMonoid` map
`g : M →* P` induces a map `f.lift hg : N →* P` then for all `z : N, v : P`, we have
`f.lift hg z = v ↔ g x = g y * v`, where `x : M, y ∈ S` are such that `z * f y = f x`. -/
@[to_additive
    "Given a Localization map `f : M →+ N` for a Submonoid `S ⊆ M`, if an
`AddCommMonoid` map `g : M →+ P` induces a map `f.lift hg : N →+ P` then for all
`z : N, v : P`, we have `f.lift hg z = v ↔ g x = g y + v`, where `x : M, y ∈ S` are such that
`z + f y = f x`."]
theorem lift_spec (z v) : f.lift hg z = v ↔ g (f.sec z).1 = g (f.sec z).2 * v
-- Mathlib/Order/Defs.lean
theorem lt_asymm {a b : α} (h : a < b) : ¬b < a
-- Mathlib/Topology/Order.lean
theorem continuous_iInf_dom {t₁ : ι → TopologicalSpace α} {t₂ : TopologicalSpace β} {i : ι} :
    Continuous[t₁ i, t₂] f → Continuous[iInf t₁, t₂] f
-- Mathlib/Topology/MetricSpace/Bounded.lean
theorem isBounded_range_of_cauchy_map_cofinite {f : β → α} (hf : Cauchy (map f cofinite)) :
    IsBounded (range f)
-- Mathlib/Topology/Order/LeftRightLim.lean
theorem rightLim_le (h : x ≤ y) : rightLim f y ≤ f x
-- Mathlib/Topology/Algebra/Module/Basic.lean
theorem comp_continuous_iff {α : Type*} [TopologicalSpace α] (e : M₁ ≃SL[σ₁₂] M₂) {f : α → M₁} :
    Continuous (e ∘ f) ↔ Continuous f
-- Mathlib/Computability/ContextFreeGrammar.lean
lemma Rewrites.exists_parts {r : ContextFreeRule T N} {u v : List (Symbol T N)}
    (hyp : r.Rewrites u v) :
    ∃ p q : List (Symbol T N),
      u = p ++ [Symbol.nonterminal r.input] ++ q ∧ v = p ++ r.output ++ q
-- Mathlib/Algebra/Category/Grp/Basic.lean
@[to_additive (attr := simp)]
lemma coe_id {X : CommGrp} : (𝟙 X : X → X) = id
-- Mathlib/CategoryTheory/Skeletal.lean
/-- Use `Quotient.out` to create a functor out of the thin skeleton. -/
@[simps]
noncomputable def fromThinSkeleton : ThinSkeleton C ⥤ C
-- Mathlib/SetTheory/Cardinal/Basic.lean
/-- To prove that the lift of a supremum is bounded by some cardinal `t`,
it suffices to show that the lift of each cardinal is bounded by `t`. -/
theorem lift_iSup_le {ι : Type v} {f : ι → Cardinal.{w}} {t : Cardinal} (hf : BddAbove (range f))
    (w : ∀ i, lift.{u} (f i) ≤ t) : lift.{u} (iSup f) ≤ t
-- Mathlib/Algebra/Order/Floor.lean
@[simp]
theorem ceil_nat : (Nat.ceil : ℕ → ℕ) = id
-- Mathlib/CategoryTheory/Limits/MonoCoprod.lean
lemma mono_of_injective [HasCoproduct (fun (k : ((Set.range ι)ᶜ : Set I)) => X k.1)] :
    Mono (Cofan.IsColimit.desc hc₁ (fun i => c.inj (ι i)))
-- Mathlib/SetTheory/Cardinal/ENat.lean
@[simp]
lemma ofNat_le_ofENat {m : ℕ} [m.AtLeastTwo] {n : ℕ∞} :
    no_index (OfNat.ofNat m : Cardinal) ≤ n ↔ OfNat.ofNat m ≤ n
-- Mathlib/RingTheory/PowerSeries/Basic.lean
@[simp]
theorem coeff_X_pow_mul (p : R⟦X⟧) (n d : ℕ) :
    coeff R (d + n) (X ^ n * p) = coeff R d p
-- Mathlib/MeasureTheory/Constructions/BorelSpace/Metric.lean
@[measurability]
theorem measurable_infNndist {s : Set α} : Measurable fun x => infNndist x s
-- Mathlib/LinearAlgebra/QuadraticForm/Prod.lean
@[simp] theorem isOrtho_inl_inl_iff {Q₁ : QuadraticMap R M₁ P} {Q₂ : QuadraticMap R M₂ P}
    (m₁ m₁' : M₁) :
    (Q₁.prod Q₂).IsOrtho (m₁, 0) (m₁', 0) ↔ Q₁.IsOrtho m₁ m₁'
-- Mathlib/Probability/Martingale/Convergence.lean
/-- A stochastic process that frequently visits below `a` and above `b` has infinite upcrossings. -/
theorem upcrossings_eq_top_of_frequently_lt (hab : a < b) (h₁ : ∃ᶠ n in atTop, f n ω < a)
    (h₂ : ∃ᶠ n in atTop, b < f n ω) : upcrossings a b f ω = ∞
-- Mathlib/Algebra/Order/Ring/Unbundled/Basic.lean
lemma sub_one_lt [ZeroLEOneClass α] [NeZero (R := α) 1]
    [CovariantClass α α (· + ·) (· < ·)]
    (a : α) : a - 1 < a
-- Mathlib/MeasureTheory/Function/AEEqOfIntegral.lean
theorem AEFinStronglyMeasurable.ae_eq_of_forall_setIntegral_eq {f g : α → E}
    (hf_int_finite : ∀ s, MeasurableSet s → μ s < ∞ → IntegrableOn f s μ)
    (hg_int_finite : ∀ s, MeasurableSet s → μ s < ∞ → IntegrableOn g s μ)
    (hfg_eq : ∀ s : Set α, MeasurableSet s → μ s < ∞ → ∫ x in s, f x ∂μ = ∫ x in s, g x ∂μ)
    (hf : AEFinStronglyMeasurable f μ) (hg : AEFinStronglyMeasurable g μ) : f =ᵐ[μ] g
-- Mathlib/Algebra/Group/Units.lean
@[to_additive]
protected theorem eq_inv_of_mul_eq_one_right {a : α} (h : a * u = 1) : a = ↑u⁻¹