ruc-ai4math/mathlib_handler_benchmark_410 huggingface dataset:
-- Mathlib/Order/JordanHolder.lean
/-- The **Jordan-Hölder** theorem, stated for any `JordanHolderLattice`.
If two composition series start and finish at the same place, they are equivalent. -/
theorem jordan_holder (s₁ s₂ : CompositionSeries X)
    (hb : s₁.head = s₂.head) (ht : s₁.last = s₂.last) :
    Equivalent s₁ s₂
-- Mathlib/Analysis/Calculus/ContDiff/Defs.lean
theorem contDiffWithinAt_iff_forall_nat_le :
    ContDiffWithinAt 𝕜 n f s x ↔ ∀ m : ℕ, ↑m ≤ n → ContDiffWithinAt 𝕜 m f s x
-- Mathlib/Logic/Relation.lean
theorem trans_left (hab : TransGen r a b) (hbc : ReflTransGen r b c) : TransGen r a c
-- Mathlib/Algebra/Order/Floor.lean
@[simp]
theorem preimage_Ico {a b : α} : ((↑) : ℤ → α) ⁻¹' Set.Ico a b = Set.Ico ⌈a⌉ ⌈b⌉
-- Mathlib/Data/Finset/Sups.lean
theorem card_sups_le : (s ⊻ t).card ≤ s.card * t.card
-- Mathlib/Geometry/Manifold/ContMDiff/Product.lean
theorem contMDiffAt_prod_iff (f : M → M' × N') {x : M} :
    ContMDiffAt I (I'.prod J') n f x ↔
      ContMDiffAt I I' n (Prod.fst ∘ f) x ∧ ContMDiffAt I J' n (Prod.snd ∘ f) x
-- Mathlib/CategoryTheory/Limits/Shapes/WideEqualizers.lean
/--
Given a limit cone for the family `f : J → (X ⟶ Y)`, for any `Z`, morphisms from `Z` to its point
are in bijection with morphisms `h : Z ⟶ X` such that `∀ j₁ j₂, h ≫ f j₁ = h ≫ f j₂`.
Further, this bijection is natural in `Z`: see `Trident.Limits.homIso_natural`.
-/
@[simps]
def Trident.IsLimit.homIso [Nonempty J] {t : Trident f} (ht : IsLimit t) (Z : C) :
    (Z ⟶ t.pt) ≃ { h : Z ⟶ X // ∀ j₁ j₂, h ≫ f j₁ = h ≫ f j₂ }
-- Mathlib/Logic/Unique.lean
/-- `Option α` is a `Subsingleton` if and only if `α` is empty. -/
theorem subsingleton_iff_isEmpty {α : Type u} : Subsingleton (Option α) ↔ IsEmpty α
-- Mathlib/Order/Basic.lean
theorem min_rec' (p : α → Prop) (hx : p x) (hy : p y) : p (min x y)
-- Mathlib/MeasureTheory/Integral/Average.lean
theorem laverage_eq (f : α → ℝ≥0∞) : ⨍⁻ x, f x ∂μ = (∫⁻ x, f x ∂μ) / μ univ
-- Mathlib/Topology/Maps/Basic.lean
theorem quotientMap_iff : QuotientMap f ↔ Surjective f ∧ ∀ s : Set Y, IsOpen s ↔ IsOpen (f ⁻¹' s)
-- Mathlib/Algebra/Group/Fin/Tuple.lean
@[simp] lemma cons_eq_zero_iff {v : Fin n → α} {x : α} : vecCons x v = 0 ↔ x = 0 ∧ v = 0
-- Mathlib/Algebra/Associated/Basic.lean
protected theorem Associated.irreducible_iff [Monoid α] {p q : α} (h : p ~ᵤ q) :
    Irreducible p ↔ Irreducible q
-- Mathlib/Algebra/Quaternion.lean
@[simp] theorem one_im : (1 : ℍ[R,c₁,c₂]).im = 0
-- Mathlib/Order/Basic.lean
lemma ltTrichotomy_not_lt (h : ¬ x < y) :
    ltTrichotomy x y p q r = if y < x then r else q
-- Mathlib/Data/W/Constructions.lean
/-- `WType.Natα` is equivalent to `PUnit ⊕ PUnit`.
This is useful when considering the associated polynomial endofunctor.
-/
@[simps]
def NatαEquivPUnitSumPUnit : Natα ≃ PUnit.{u + 1} ⊕ PUnit
-- Mathlib/Combinatorics/SimpleGraph/Path.lean
protected theorem sound {v w : V} :
    G.Reachable v w → G.connectedComponentMk v = G.connectedComponentMk w
-- Mathlib/Data/Rat/Lemmas.lean
theorem mul_den_dvd (q₁ q₂ : ℚ) : (q₁ * q₂).den ∣ q₁.den * q₂.den
-- Mathlib/Data/DFinsupp/Basic.lean
theorem single_eq_pi_single {i b} : ⇑(single i b : Π₀ i, β i) = Pi.single i b
-- Mathlib/Geometry/Manifold/VectorBundle/Tangent.lean
@[simp high, mfld_simps]
theorem continuousLinearMapAt_model_space (b b' : F) :
    (trivializationAt F (TangentSpace 𝓘(𝕜, F)) b).continuousLinearMapAt 𝕜 b' = (1 : F →L[𝕜] F)
-- Mathlib/Algebra/Algebra/Subalgebra/Pointwise.lean
theorem mul_toSubmodule_le (S T : Subalgebra R A) :
    (Subalgebra.toSubmodule S)* (Subalgebra.toSubmodule T) ≤ Subalgebra.toSubmodule (S ⊔ T)
-- Mathlib/Algebra/Algebra/Spectrum.lean
theorem inv_mem_resolventSet {r : Rˣ} {a : Aˣ} (h : (r : R) ∈ resolventSet R (a : A)) :
    (↑r⁻¹ : R) ∈ resolventSet R (↑a⁻¹ : A)
-- .lake/packages/batteries/Batteries/Data/List/Pairwise.lean
/-- given a sublist `l' <+ l`, there exists a list of indices `is` such that
  `l' = map (get l) is`. -/
theorem sublist_eq_map_get (h : l' <+ l) : ∃ is : List (Fin l.length),
    l' = map (get l) is ∧ is.Pairwise (· < ·)
-- Mathlib/Data/Option/NAry.lean
@[simp]
theorem map₂_eq_none_iff : map₂ f a b = none ↔ a = none ∨ b = none
-- Mathlib/Probability/Kernel/Composition.lean
lemma comap_map_comm (κ : Kernel β γ) {f : α → β} {g : γ → δ}
    (hf : Measurable f) (hg : Measurable g) :
    comap (map κ g hg) f hf = map (comap κ f hf) g hg
-- .lake/packages/lean4/src/lean/Init/Data/Int/Order.lean
@[simp] theorem toNat_one : (1 : Int).toNat = 1
-- Mathlib/NumberTheory/Padics/Hensel.lean
private theorem newton_seq_norm_le (n : ℕ) :
    ‖F.eval (newton_seq n)‖ ≤ ‖F.derivative.eval a‖ ^ 2 * T ^ 2 ^ n
-- Mathlib/RingTheory/Polynomial/Cyclotomic/Basic.lean
/-- `cyclotomic' n R` is monic. -/
theorem cyclotomic'.monic (n : ℕ) (R : Type*) [CommRing R] [IsDomain R] :
    (cyclotomic' n R).Monic
-- Mathlib/CategoryTheory/Functor/KanExtension/Basic.lean
/-- The functor `RightExtension L F ⥤ RightExtension (G ⋙ L) (G ⋙ F)`
obtained by precomposition. -/
@[simps!]
def RightExtension.precomp : RightExtension L F ⥤ RightExtension (G ⋙ L) (G ⋙ F)
-- Mathlib/MeasureTheory/Measure/FiniteMeasure.lean
theorem testAgainstNN_add (μ : FiniteMeasure Ω) (f₁ f₂ : Ω →ᵇ ℝ≥0) :
    μ.testAgainstNN (f₁ + f₂) = μ.testAgainstNN f₁ + μ.testAgainstNN f₂
-- Mathlib/Analysis/CstarAlgebra/ContinuousFunctionalCalculus/NonUnital.lean
lemma cfcₙHom_eq_of_continuous_of_map_id [UniqueNonUnitalContinuousFunctionalCalculus R A]
    (φ : C(σₙ R a, R)₀ →⋆ₙₐ[R] A) (hφ₁ : Continuous φ)
    (hφ₂ : φ ⟨.restrict (σₙ R a) <| .id R, rfl⟩ = a) : cfcₙHom ha = φ
-- Mathlib/RingTheory/FiniteType.lean
/-- The image of an element `m : M` in `R[M]` belongs the submodule generated by
`S : Set M` if and only if `m ∈ S`. -/
theorem of'_mem_span [Nontrivial R] {m : M} {S : Set M} :
    of' R M m ∈ span R (of' R M '' S) ↔ m ∈ S
-- Mathlib/SetTheory/Ordinal/Basic.lean
theorem succ_pos (o : Ordinal) : 0 < succ o
-- Mathlib/Data/Int/Cast/Lemmas.lean
lemma cast_commute : ∀ (n : ℤ) (a : α), Commute ↑n a
-- Mathlib/NumberTheory/Divisors.lean
@[simp]
theorem divisors_inj {a b : ℕ} : a.divisors = b.divisors ↔ a = b
-- Mathlib/Algebra/Category/BialgebraCat/Basic.lean
@[simp] theorem toBialgHom_id {M : BialgebraCat.{v} R} :
    Hom.toBialgHom (𝟙 M) = BialgHom.id _ _
-- Mathlib/GroupTheory/DoubleCoset.lean
theorem mk_out'_eq_mul (H K : Subgroup G) (g : G) :
    ∃ h k : G, h ∈ H ∧ k ∈ K ∧ (mk H K g : Quotient ↑H ↑K).out' = h * g * k
-- Mathlib/GroupTheory/Perm/Basic.lean
@[to_additive existing (attr := simp) inv_addRight]
lemma inv_mulRight : (Equiv.mulRight a)⁻¹ = Equiv.mulRight a⁻¹
-- Mathlib/Topology/Connected/PathConnected.lean
@[simp]
theorem extend_range {a b : X} (γ : Path a b) :
    range γ.extend = range γ
-- Mathlib/AlgebraicGeometry/Scheme.lean
@[reassoc (attr := simp)]
lemma appLE_map (e : V ≤ f ⁻¹ᵁ U) (i : op V ⟶ op V') :
    f.appLE U V e ≫ X.presheaf.map i = f.appLE U V' (i.unop.le.trans e)
-- Mathlib/Data/Fin/Basic.lean
lemma succAbove_zero_apply (i : Fin n) : succAbove 0 i = succ i
-- Mathlib/Algebra/Lie/OfAssociative.lean
lemma LieModule.toEnd_pow_lie (x y : L) (z : M) (n : ℕ) :
    ((φ x) ^ n) ⁅y, z⁆ =
      ∑ ij ∈ antidiagonal n, n.choose ij.1 • ⁅((ad R L x) ^ ij.1) y, ((φ x) ^ ij.2) z⁆
-- Mathlib/Algebra/Star/SelfAdjoint.lean
lemma conj_eq (ha : IsSelfAdjoint a) : conj a = a
-- Mathlib/Data/Real/Hyperreal.lean
theorem infiniteNeg_def {x : ℝ*} : InfiniteNeg x ↔ ∀ r : ℝ, x < r
-- Mathlib/Algebra/Group/Basic.lean
/-- To show a property of all powers of `g` it suffices to show it is closed under multiplication
by `g` and `g⁻¹` on the left. For subgroups generated by more than one element, see
`Subgroup.closure_induction_left`. -/
@[to_additive "To show a property of all multiples of `g` it suffices to show it is closed under
addition by `g` and `-g` on the left. For additive subgroups generated by more than one element, see
`AddSubgroup.closure_induction_left`."]
lemma zpow_induction_left {g : G} {P : G → Prop} (h_one : P (1 : G))
    (h_mul : ∀ a, P a → P (g * a)) (h_inv : ∀ a, P a → P (g⁻¹ * a)) (n : ℤ) : P (g ^ n)
-- Mathlib/Topology/Sheaves/SheafCondition/EqualizerProducts.lean
/-- Implementation of `SheafConditionPairwiseIntersections.coneEquiv`. -/
@[simps!]
def coneEquivFunctor :
    Limits.Cone ((diagram U).op ⋙ F) ⥤
      Limits.Cone (SheafConditionEqualizerProducts.diagram F U)
-- Mathlib/Algebra/Polynomial/Splits.lean
theorem exists_root_of_splits {f : K[X]} (hs : Splits i f) (hf0 : degree f ≠ 0) :
    ∃ x, eval₂ i x f = 0
-- Mathlib/Algebra/Group/Subgroup/Basic.lean
/-- Alternative phrasing of the normalizer condition: Only the full group is self-normalizing.
This may be easier to work with, as it avoids inequalities and negations.  -/
theorem _root_.normalizerCondition_iff_only_full_group_self_normalizing :
    NormalizerCondition G ↔ ∀ H : Subgroup G, H.normalizer = H → H = ⊤
-- Mathlib/FieldTheory/SplittingField/Construction.lean
theorem X_sub_C_mul_removeFactor (f : K[X]) (hf : f.natDegree ≠ 0) :
    (X - C (AdjoinRoot.root f.factor)) * f.removeFactor = map (AdjoinRoot.of f.factor) f
-- Mathlib/MeasureTheory/Integral/IntegrableOn.lean
theorem integrableOn_Ioc_iff_integrableOn_Ioo :
    IntegrableOn f (Ioc a b) μ ↔ IntegrableOn f (Ioo a b) μ
-- Mathlib/Analysis/InnerProductSpace/Adjoint.lean
theorem _root_.Submodule.adjoint_orthogonalProjection (U : Submodule 𝕜 E) [CompleteSpace U] :
    (orthogonalProjection U : E →L[𝕜] U)† = U.subtypeL
-- Mathlib/Order/Category/DistLat.lean
/-- The equivalence between `DistLat` and itself induced by `OrderDual` both ways. -/
@[simps functor inverse]
def dualEquiv : DistLat ≌ DistLat
-- Mathlib/Algebra/Ring/Subring/Basic.lean
theorem map_comap_eq_self
    {f : R →+* S} {t : Subring S} (h : t ≤ f.range) : (t.comap f).map f = t
-- Mathlib/Order/CountableDenseLinearOrder.lean
/-- Any countable linear order embeds in any nontrivial dense linear order. -/
theorem embedding_from_countable_to_dense [Countable α] [DenselyOrdered β] [Nontrivial β] :
    Nonempty (α ↪o β)
-- Mathlib/Probability/ProbabilityMassFunction/Constructions.lean
@[simp]
theorem seq_apply : (seq q p) b = ∑' (f : α → β) (a : α), if b = f a then q f * p a else 0
-- Mathlib/CategoryTheory/Shift/CommShift.lean
@[simp, reassoc]
lemma map_shiftFunctorCompIsoId_inv_app [F.CommShift A] (X : C) (a b : A) (h : a + b = 0) :
    F.map ((shiftFunctorCompIsoId C a b h).inv.app X) =
      (shiftFunctorCompIsoId D a b h).inv.app (F.obj X) ≫
        ((F.commShiftIso a).inv.app X)⟦b⟧' ≫ (F.commShiftIso b).inv.app (X⟦a⟧)
-- Mathlib/Algebra/MvPolynomial/Monad.lean
@[simp]
theorem join₂_map (f : R →+* MvPolynomial σ S) (φ : MvPolynomial σ R) :
    join₂ (map f φ) = bind₂ f φ
-- Mathlib/Algebra/Order/Group/PosPart.lean
@[to_additive negPart_nonneg] lemma one_le_leOnePart (a : α) : 1 ≤ a⁻ᵐ
-- Mathlib/Data/Nat/Fib/Basic.lean
theorem fib_two_mul_add_two (n : ℕ) :
    fib (2 * n + 2) = fib (n + 1) * (2 * fib n + fib (n + 1))
-- Mathlib/CategoryTheory/Sites/LocallyInjective.lean
lemma equalizerSieve_mem [IsLocallyInjective J φ]
    {X : Cᵒᵖ} (x y : F₁.obj X) (h : φ.app X x = φ.app X y) :
    equalizerSieve x y ∈ J X.unop
-- Mathlib/Algebra/Module/Submodule/Basic.lean
@[simp, norm_cast]
theorem coe_add (x y : p) : (↑(x + y) : M) = ↑x + ↑y
-- Mathlib/Topology/UniformSpace/UniformConvergence.lean
/-- Composing on the right by a function preserves uniform convergence on a set -/
theorem TendstoUniformlyOn.comp (h : TendstoUniformlyOn F f p s) (g : γ → α) :
    TendstoUniformlyOn (fun n => F n ∘ g) (f ∘ g) p (g ⁻¹' s)
-- Mathlib/Data/Matrix/Basis.lean
@[simp]
theorem stdBasisMatrix_zero (i : m) (j : n) : stdBasisMatrix i j (0 : α) = 0
-- Mathlib/Analysis/Calculus/ContDiff/Basic.lean
/-- A function is `C^(n + 1)` on a domain with unique derivatives if and only if it is
differentiable there, and its derivative (formulated with `derivWithin`) is `C^n`. -/
theorem contDiffOn_succ_iff_derivWithin {n : ℕ} (hs : UniqueDiffOn 𝕜 s₂) :
    ContDiffOn 𝕜 (n + 1 : ℕ) f₂ s₂ ↔
      DifferentiableOn 𝕜 f₂ s₂ ∧ ContDiffOn 𝕜 n (derivWithin f₂ s₂) s₂
-- Mathlib/RingTheory/Norm/Basic.lean
theorem _root_.IntermediateField.AdjoinSimple.norm_gen_eq_prod_roots (x : L)
    (hf : (minpoly K x).Splits (algebraMap K F)) :
    (algebraMap K F) (norm K (AdjoinSimple.gen K x)) =
      ((minpoly K x).aroots F).prod
-- Mathlib/Data/List/Zip.lean
@[congr]
theorem zipWith_congr (f g : α → β → γ) (la : List α) (lb : List β)
    (h : List.Forall₂ (fun a b => f a b = g a b) la lb) : zipWith f la lb = zipWith g la lb
-- Mathlib/Data/Part.lean
@[simp]
theorem not_none_dom : ¬(none : Part α).Dom
-- Mathlib/Topology/ContinuousOn.lean
theorem antitone_continuousOn {f : α → β} : Antitone (ContinuousOn f)
-- Mathlib/Probability/Kernel/Composition.lean
theorem compProd_restrict_left {s : Set β} (hs : MeasurableSet s) :
    Kernel.restrict κ hs ⊗ₖ η = Kernel.restrict (κ ⊗ₖ η) (hs.prod MeasurableSet.univ)
-- .lake/packages/batteries/Batteries/Data/List/Lemmas.lean
protected theorem IsSuffix.subset (hl : l₁ <:+ l₂) : l₁ ⊆ l₂
-- Mathlib/Logic/Basic.lean
theorem iff_mpr_iff_true_intro {P : Prop} (h : P) : Iff.mpr (iff_true_intro h) True.intro = h
-- Mathlib/Data/Part.lean
@[to_additive]
theorem mul_mem_mul [Mul α] (a b : Part α) (ma mb : α) (ha : ma ∈ a) (hb : mb ∈ b) :
    ma * mb ∈ a * b
-- Mathlib/Data/Real/Irrational.lean
@[simp]
theorem irrational_rat_mul_iff : Irrational (q * x) ↔ q ≠ 0 ∧ Irrational x
-- Mathlib/Data/Set/Basic.lean
theorem nonempty_diff {s t : Set α} : (s \ t).Nonempty ↔ ¬s ⊆ t
-- Mathlib/Data/NNReal/Basic.lean
@[simp]
theorem mk_natCast (n : ℕ) : @Eq ℝ≥0 (⟨(n : ℝ), n.cast_nonneg⟩ : ℝ≥0) n
-- Mathlib/Data/Complex/Exponential.lean
lemma exp_nsmul (x : ℝ) (n : ℕ) : exp (n • x) = exp x ^ n
-- Mathlib/Logic/Function/Basic.lean
theorem isPartialInv_left {α β} {f : α → β} {g} (H : IsPartialInv f g) (x) : g (f x) = some x
-- Mathlib/CategoryTheory/Localization/Predicate.lean
lemma areEqualizedByLocalization_iff [L.IsLocalization W] :
    AreEqualizedByLocalization W f g ↔ L.map f = L.map g
-- Mathlib/LinearAlgebra/Finsupp.lean
theorem total_range (h : Function.Surjective v) : LinearMap.range (Finsupp.total α M R v) = ⊤
-- Mathlib/SetTheory/Cardinal/Basic.lean
theorem eq_one_iff_unique {α : Type*} : #α = 1 ↔ Subsingleton α ∧ Nonempty α
-- Mathlib/LinearAlgebra/TensorProduct/Subalgebra.lean
theorem mulMap_range : (A.mulMap B).range = A ⊔ B
-- Mathlib/Data/Set/Pointwise/Interval.lean
@[simp]
theorem preimage_const_sub_Ico : (fun x => a - x) ⁻¹' Ico b c = Ioc (a - c) (a - b)
-- Mathlib/Combinatorics/SimpleGraph/Path.lean
theorem not_mem_edges_of_loop {v : V} {e : Sym2 V} {p : G.Path v v} :
    ¬e ∈ (p : G.Walk v v).edges
-- Mathlib/SetTheory/Ordinal/Basic.lean
@[simp]
theorem card_succ (o : Ordinal) : card (succ o) = card o + 1
-- Mathlib/Data/List/Sigma.lean
@[simp]
theorem not_mem_keys_kerase (a) {l : List (Sigma β)} (nd : l.NodupKeys) :
    a ∉ (kerase a l).keys
-- Mathlib/Data/Matrix/Basis.lean
/-- `M` is a scalar matrix if it commutes with every non-diagonal `stdBasisMatrix`. -/
theorem mem_range_scalar_of_commute_stdBasisMatrix {M : Matrix n n α}
    (hM : Pairwise fun i j => Commute (stdBasisMatrix i j 1) M) :
    M ∈ Set.range (Matrix.scalar n)
-- Mathlib/Analysis/Complex/UpperHalfPlane/Topology.lean
theorem continuous_re : Continuous re
-- .lake/packages/lean4/src/lean/Init/Data/Nat/Bitwise/Lemmas.lean
theorem testBit_bool_to_nat (b : Bool) (i : Nat) :
    testBit (Bool.toNat b) i = (decide (i = 0) && b)
-- Mathlib/Data/Set/Pointwise/SMul.lean
@[to_additive (attr := simp)]
theorem smul_set_empty : a • (∅ : Set β) = ∅
-- Mathlib/Analysis/SpecialFunctions/Pow/Real.lean
theorem exp_mul (x y : ℝ) : exp (x * y) = exp x ^ y
-- Mathlib/CategoryTheory/Localization/Prod.lean
lemma prod_fac₂ :
    W₂.Q ⋙ (curry.obj (prodLift F hF)).flip = (prodLift₁ F hF).flip
-- Mathlib/Combinatorics/SimpleGraph/Subgraph.lean
theorem deleteVerts_le : G'.deleteVerts s ≤ G'
-- Mathlib/Tactic/CancelDenoms/Core.lean
theorem cancel_factors_eq {α} [Field α] {a b ad bd a' b' gcd : α} (ha : ad * a = a')
    (hb : bd * b = b') (had : ad ≠ 0) (hbd : bd ≠ 0) (hgcd : gcd ≠ 0) :
    (a = b) = (1 / gcd * (bd * a') = 1 / gcd * (ad * b'))
-- Mathlib/Algebra/Homology/ShortComplex/Basic.lean
@[ext]
lemma hom_ext (f g : S₁ ⟶ S₂) (h₁ : f.τ₁ = g.τ₁) (h₂ : f.τ₂ = g.τ₂) (h₃ : f.τ₃ = g.τ₃) : f = g
-- Mathlib/Algebra/Order/ToIntervalMod.lean
theorem iUnion_Icc_intCast : ⋃ n : ℤ, Icc (n : α) (n + 1) = Set.univ
-- Mathlib/Topology/MetricSpace/Isometry.lean
@[simp]
theorem image_sphere (h : α ≃ᵢ β) (x : α) (r : ℝ) :
    h '' Metric.sphere x r = Metric.sphere (h x) r
-- Mathlib/Data/Seq/WSeq.lean
theorem LiftRel.equiv (R : α → α → Prop) : Equivalence R → Equivalence (LiftRel R)
-- Mathlib/Order/Filter/AtTopBot.lean
theorem exists_seq_antitone_tendsto_atTop_atBot (α : Type*) [SemilatticeInf α] [Nonempty α]
    [h2 : (atBot : Filter α).IsCountablyGenerated] :
    ∃ xs : ℕ → α, Antitone xs ∧ Tendsto xs atTop atBot
-- Mathlib/Analysis/InnerProductSpace/Calculus.lean
theorem DifferentiableWithinAt.dist (hf : DifferentiableWithinAt ℝ f s x)
    (hg : DifferentiableWithinAt ℝ g s x) (hne : f x ≠ g x) :
    DifferentiableWithinAt ℝ (fun y => dist (f y) (g y)) s x
-- Mathlib/MeasureTheory/Function/LocallyIntegrable.lean
protected theorem LocallyIntegrable.smul {𝕜 : Type*} [NormedAddCommGroup 𝕜] [SMulZeroClass 𝕜 E]
    [BoundedSMul 𝕜 E] (hf : LocallyIntegrable f μ) (c : 𝕜) :
    LocallyIntegrable (c • f) μ
-- Mathlib/Algebra/Star/Subalgebra.lean
@[elab_as_elim]
theorem adjoin_induction₂ {s : Set A} {p : A → A → Prop} {a b : A} (ha : a ∈ adjoin R s)
    (hb : b ∈ adjoin R s) (Hs : ∀ x : A, x ∈ s → ∀ y : A, y ∈ s → p x y)
    (Halg : ∀ r₁ r₂ : R, p (algebraMap R A r₁) (algebraMap R A r₂))
    (Halg_left : ∀ (r : R) (x : A), x ∈ s → p (algebraMap R A r) x)
    (Halg_right : ∀ (r : R) (x : A), x ∈ s → p x (algebraMap R A r))
    (Hadd_left : ∀ x₁ x₂ y : A, p x₁ y → p x₂ y → p (x₁ + x₂) y)
    (Hadd_right : ∀ x y₁ y₂ : A, p x y₁ → p x y₂ → p x (y₁ + y₂))
    (Hmul_left : ∀ x₁ x₂ y : A, p x₁ y → p x₂ y → p (x₁ * x₂) y)
    (Hmul_right : ∀ x y₁ y₂ : A, p x y₁ → p x y₂ → p x (y₁ * y₂))
    (Hstar : ∀ x y : A, p x y → p (star x) (star y)) (Hstar_left : ∀ x y : A, p x y → p (star x) y)
    (Hstar_right : ∀ x y : A, p x y → p x (star y)) : p a b
-- Mathlib/Topology/Clopen.lean
theorem isClopen_iff_frontier_eq_empty : IsClopen s ↔ frontier s = ∅
-- Mathlib/RingTheory/Finiteness.lean
theorem FG.map₂ (f : M →ₗ[R] N →ₗ[R] P) {p : Submodule R M} {q : Submodule R N} (hp : p.FG)
    (hq : q.FG) : (map₂ f p q).FG
-- Mathlib/Topology/Connected/Basic.lean
theorem IsPreconnected.connectedComponentIn {x : α} {F : Set α} (h : IsPreconnected F)
    (hx : x ∈ F) : connectedComponentIn F x = F
-- Mathlib/Algebra/Quaternion.lean
@[simp, norm_cast]
theorem intCast_im (z : ℤ) : (z : ℍ[R,c₁,c₂]).im = 0
-- Mathlib/Probability/Independence/Basic.lean
theorem iIndep_comap_mem_iff {f : ι → Set Ω} :
    iIndep (fun i => MeasurableSpace.comap (· ∈ f i) ⊤) μ ↔ iIndepSet f μ
-- Mathlib/Algebra/Module/Equiv/Defs.lean
theorem toEquiv_injective : Function.Injective (toEquiv : (M ≃ₛₗ[σ] M₂) → M ≃ M₂)
-- Mathlib/GroupTheory/Congruence/Basic.lean
/-- The map sending a congruence relation to its underlying binary relation is injective. -/
@[to_additive "The map sending an additive congruence relation to its underlying binary relation
is injective."]
theorem ext' {c d : Con M} (H : ⇑c = ⇑d) : c = d
-- Mathlib/Topology/PartialHomeomorph.lean
/-- Two equivalent partial homeomorphisms have the same source. -/
theorem EqOnSource.source_eq {e e' : PartialHomeomorph X Y} (h : e ≈ e') : e.source = e'.source
-- Mathlib/Topology/Separation.lean
protected theorem R1Space.sInf {X : Type*} {T : Set (TopologicalSpace X)}
    (hT : ∀ t ∈ T, @R1Space X t) : @R1Space X (sInf T)
-- Mathlib/ModelTheory/Semantics.lean
theorem realize_sentence (h : M ≅[L] N) (φ : L.Sentence) : M ⊨ φ ↔ N ⊨ φ
-- Mathlib/CategoryTheory/Preadditive/Injective.lean
lemma Limits.IsZero.injective {X : C} (h : IsZero X) : Injective X
-- Mathlib/Analysis/Normed/Lp/lpSpace.lean
theorem norm_apply_le_of_tendsto {C : ℝ} {F : ι → lp E ∞} (hCF : ∀ᶠ k in l, ‖F k‖ ≤ C)
    {f : ∀ a, E a} (hf : Tendsto (id fun i => F i : ι → ∀ a, E a) l (𝓝 f)) (a : α) : ‖f a‖ ≤ C
-- Mathlib/Analysis/NormedSpace/MatrixExponential.lean
nonrec theorem exp_nsmul (n : ℕ) (A : Matrix m m 𝔸) : exp 𝕂 (n • A) = exp 𝕂 A ^ n
-- Mathlib/MeasureTheory/Function/SimpleFunc.lean
theorem restrict_of_not_measurable {f : α →ₛ β} {s : Set α} (hs : ¬MeasurableSet s) :
    restrict f s = 0
-- Mathlib/Topology/Constructions.lean
/-- A version of `continuous_inf_dom_left` for binary functions -/
theorem continuous_inf_dom_left₂ {X Y Z} {f : X → Y → Z} {ta1 ta2 : TopologicalSpace X}
    {tb1 tb2 : TopologicalSpace Y} {tc1 : TopologicalSpace Z}
    (h : by haveI := ta1; haveI := tb1; exact Continuous fun p : X × Y => f p.1 p.2) : by
    haveI := ta1 ⊓ ta2; haveI := tb1 ⊓ tb2; exact Continuous fun p : X × Y => f p.1 p.2
-- Mathlib/RingTheory/Regular/IsSMulRegular.lean
lemma IsSMulRegular.submodule [Semiring R] [AddCommMonoid M] [Module R M]
    (N : Submodule R M) (r : R) (h : IsSMulRegular M r) : IsSMulRegular N r
-- Mathlib/Data/NNReal/Basic.lean
@[norm_cast] lemma coe_ne_one : (r : ℝ) ≠ 1 ↔ r ≠ 1
-- Mathlib/Topology/Algebra/Group/Basic.lean
@[to_additive]
theorem discreteTopology_iff_isOpen_singleton_one : DiscreteTopology G ↔ IsOpen ({1} : Set G)
-- Mathlib/Algebra/Order/Hom/Ring.lean
@[simp]
theorem coe_comp (f : β →+*o γ) (g : α →+*o β) : ⇑(f.comp g) = f ∘ g
-- Mathlib/NumberTheory/SumFourSquares.lean
/-- **Euler's four-square identity**. -/
theorem euler_four_squares {R : Type*} [CommRing R] (a b c d x y z w : R) :
    (a * x - b * y - c * z - d * w) ^ 2 + (a * y + b * x + c * w - d * z) ^ 2 +
      (a * z - b * w + c * x + d * y) ^ 2 + (a * w + b * z - c * y + d * x) ^ 2 =
      (a ^ 2 + b ^ 2 + c ^ 2 + d ^ 2) * (x ^ 2 + y ^ 2 + z ^ 2 + w ^ 2)
-- Mathlib/MeasureTheory/Constructions/Pi.lean
theorem piPremeasure_pi_eval {s : Set (∀ i, α i)} :
    piPremeasure m (pi univ fun i => eval i '' s) = piPremeasure m s
-- Mathlib/Algebra/Algebra/Hom.lean
protected theorem congr_fun {φ₁ φ₂ : A →ₐ[R] B} (H : φ₁ = φ₂) (x : A) : φ₁ x = φ₂ x
-- Mathlib/Data/Int/Bitwise.lean
theorem bit_decomp (n : ℤ) : bit (bodd n) (div2 n) = n
-- Mathlib/Topology/ContinuousFunction/Algebra.lean
/-- Coercion to a function as a `MonoidHom`. Similar to `MonoidHom.coeFn`. -/
@[to_additive (attr := simps)
  "Coercion to a function as an `AddMonoidHom`. Similar to `AddMonoidHom.coeFn`." ]
def coeFnMonoidHom [Monoid β] [ContinuousMul β] : C(α, β) →* α → β
-- Mathlib/Algebra/Polynomial/Basic.lean
@[simp]
theorem sum_zero_index {S : Type*} [AddCommMonoid S] (f : ℕ → R → S) : (0 : R[X]).sum f = 0
-- Mathlib/MeasureTheory/MeasurableSpace/Basic.lean
@[measurability]
theorem measurable_from_nat {f : ℕ → α} : Measurable f
-- Mathlib/GroupTheory/Perm/List.lean
theorem formPerm_apply_mem_ne_self_iff (hl : Nodup l) (x : α) (hx : x ∈ l) :
    formPerm l x ≠ x ↔ 2 ≤ l.length
-- Mathlib/Data/Set/Function.lean
theorem mapsTo_range (f : α → β) (s : Set α) : MapsTo f s (range f)
-- Mathlib/RingTheory/Flat/EquationalCriterion.lean
/-- **Equational criterion for flatness** [Stacks 00HK](https://stacks.math.columbia.edu/tag/00HK),
forward direction, second alternate form.

Let $M$ be a flat module over a commutative ring $R$. Let $N$ be a finite free module over $R$,
let $f \in N$, and let $x \colon N \to M$ be a homomorphism such that $x(f) = 0$. Then there exist a
finite index type $\kappa$ and module homomorphisms $a \colon N \to R^{\kappa}$ and
$y \colon R^{\kappa} \to M$ such that $x = y \circ a$ and $a(f) = 0$. -/
theorem exists_factorization_of_apply_eq_zero_of_free [Flat R M] {N : Type u}
    [AddCommGroup N] [Module R N] [Free R N] [Finite R N] {f : N} {x : N →ₗ[R] M} (h : x f = 0) :
    ∃ (κ : Type u) (_ : Fintype κ) (a : N →ₗ[R] (κ →₀ R)) (y : (κ →₀ R) →ₗ[R] M),
      x = y ∘ₗ a ∧ a f = 0
-- Mathlib/Data/Multiset/Bind.lean
@[simp]
theorem sigma_add :
    ∀ t u : ∀ a, Multiset (σ a), (s.sigma fun a => t a + u a) = s.sigma t + s.sigma u
-- Mathlib/RingTheory/Polynomial/Nilpotent.lean
@[simp] lemma isNilpotent_mul_X_iff :
    IsNilpotent (P * X) ↔ IsNilpotent P
-- Mathlib/Order/RelSeries.lean
@[simp] lemma last_snoc (p : RelSeries r) (newLast : α) (rel : r p.last newLast) :
    (p.snoc newLast rel).last = newLast