ruc-ai4math/mathlib_handler_benchmark_410 huggingface dataset:
-- Mathlib/Order/LiminfLimsup.lean
@[simp]
theorem isBoundedUnder_ge_inf [SemilatticeInf α] {f : Filter β} {u v : β → α} :
    (f.IsBoundedUnder (· ≥ ·) fun a => u a ⊓ v a) ↔
      f.IsBoundedUnder (· ≥ ·) u ∧ f.IsBoundedUnder (· ≥ ·) v
-- Mathlib/MeasureTheory/Measure/Haar/OfBasis.lean
theorem convex_parallelepiped (v : ι → E) : Convex ℝ (parallelepiped v)
-- Mathlib/Topology/Algebra/Module/Alternating/Basic.lean
theorem coe_toAlternatingMap : ⇑f.toAlternatingMap = f
-- Mathlib/Data/Nat/Defs.lean
@[simp]
lemma leRec_self {n} {motive : (m : ℕ) → n ≤ m → Sort*}
    (refl : motive n le_rfl)
    (le_succ_of_le : ∀ ⦃k⦄ (h : n ≤ k), motive k h → motive (k + 1) (le_succ_of_le h)) :
    (leRec (motive := motive) refl le_succ_of_le le_rfl : motive n le_rfl) = refl
-- Mathlib/LinearAlgebra/Orientation.lean
@[simp]
theorem Orientation.map_symm (e : M ≃ₗ[R] N) :
    (Orientation.map ι e).symm = Orientation.map ι e.symm
-- Mathlib/Logic/Relation.lean
lemma TransGen.closed' {P : α → Prop} (dc : ∀ {a b}, r a b → P b → P a)
    {a b : α} (h : TransGen r a b) : P b → P a
-- Mathlib/CategoryTheory/Limits/Constructions/Over/Products.lean
/-- Given a wide pullback in `C`, construct a product in `C/B`. -/
theorem over_product_of_widePullback [HasLimitsOfShape (WidePullbackShape J) C] {B : C} :
    HasLimitsOfShape (Discrete J) (Over B)
-- Mathlib/Algebra/Algebra/Subalgebra/Tower.lean
theorem restrictScalars_injective :
    Function.Injective (restrictScalars R : Subalgebra S A → Subalgebra R A)
-- Mathlib/Data/Fintype/Card.lean
theorem Finite.of_injective {α β : Sort*} [Finite β] (f : α → β) (H : Injective f) : Finite α
-- Mathlib/Combinatorics/Enumerative/Composition.lean
theorem sizeUpTo_index_le (j : Fin n) : c.sizeUpTo (c.index j) ≤ j
-- Mathlib/RingTheory/PowerSeries/Inverse.lean
theorem inv_eq_inv_aux (φ : k⟦X⟧) : φ⁻¹ = inv.aux (constantCoeff k φ)⁻¹ φ
-- Mathlib/GroupTheory/FreeGroup/Basic.lean
@[to_additive (attr := simp)]
theorem prod.of {x : α} : prod (of x) = x
-- Mathlib/Data/Finset/Preimage.lean
@[simp]
theorem preimage_inter [DecidableEq α] [DecidableEq β] {f : α → β} {s t : Finset β}
    (hs : Set.InjOn f (f ⁻¹' ↑s)) (ht : Set.InjOn f (f ⁻¹' ↑t)) :
    (preimage (s ∩ t) f fun x₁ hx₁ x₂ hx₂ =>
        hs (mem_of_mem_inter_left hx₁) (mem_of_mem_inter_left hx₂)) =
      preimage s f hs ∩ preimage t f ht
-- Mathlib/Geometry/Manifold/MFDeriv/UniqueDifferential.lean
/-- If `s` has the unique differential property, `f` is differentiable on `s` and its derivative
at every point of `s` has dense range, then `f '' s` has the unique differential property.
This version uses the `HasMFDerivWithinAt` predicate. -/
theorem UniqueMDiffOn.image_denseRange' (hs : UniqueMDiffOn I s) {f : M → M'}
    {f' : M → E →L[𝕜] E'} (hf : ∀ x ∈ s, HasMFDerivWithinAt I I' f s x (f' x))
    (hd : ∀ x ∈ s, DenseRange (f' x)) :
    UniqueMDiffOn I' (f '' s)
-- Mathlib/Data/Complex/Exponential.lean
theorem inv_one_add_tan_sq {x : ℝ} (hx : cos x ≠ 0) : (1 + tan x ^ 2)⁻¹ = cos x ^ 2
-- Mathlib/Data/TypeVec.lean
@[simp]
theorem dropFun_toSubtype {α} (p : α ⟹ «repeat» (n + 1) Prop) :
    dropFun (toSubtype p) = toSubtype _
-- Mathlib/MeasureTheory/Function/SimpleFunc.lean
@[simp]
theorem extend_apply' [MeasurableSpace β] (f₁ : α →ₛ γ) {g : α → β} (hg : MeasurableEmbedding g)
    (f₂ : β →ₛ γ) {y : β} (h : ¬∃ x, g x = y) : (f₁.extend g hg f₂) y = f₂ y
-- Mathlib/LinearAlgebra/BilinearForm/Properties.lean
theorem isAdjointPair_zero : IsAdjointPair B B' 0 0
-- Mathlib/Algebra/Polynomial/Roots.lean
theorem ne_zero_of_mem_nthRootsFinset {η : R} (hη : η ∈ nthRootsFinset n R) : η ≠ 0
-- Mathlib/Data/Set/Semiring.lean
theorem zero_def : (0 : SetSemiring α) = Set.up ∅
-- Mathlib/MeasureTheory/Function/SimpleFuncDenseLp.lean
protected theorem aestronglyMeasurable (f : Lp.simpleFunc E p μ) :
    AEStronglyMeasurable (toSimpleFunc f) μ
-- Mathlib/NumberTheory/ModularForms/Basic.lean
@[simp, norm_cast]
lemma coe_natCast (Γ : Subgroup SL(2, ℤ)) (n : ℕ) :
    ⇑(n : ModularForm Γ 0) = n
-- Mathlib/Data/List/Rotate.lean
theorem rotate'_cons_succ (l : List α) (a : α) (n : ℕ) :
    (a :: l : List α).rotate' n.succ = (l ++ [a]).rotate' n
-- Mathlib/SetTheory/Cardinal/Finite.lean
protected theorem bijective_iff_surjective_and_card [Finite α] (f : α → β) :
    Bijective f ↔ Surjective f ∧ Nat.card α = Nat.card β
-- Mathlib/Topology/PartialHomeomorph.lean
theorem leftInvOn_piecewise {e' : PartialHomeomorph X Y} [∀ i, Decidable (i ∈ s)]
    [∀ i, Decidable (i ∈ t)] (h : e.IsImage s t) (h' : e'.IsImage s t) :
    LeftInvOn (t.piecewise e.symm e'.symm) (s.piecewise e e') (s.ite e.source e'.source)
-- Mathlib/Topology/DiscreteQuotient.lean
theorem proj_bot_bijective [DiscreteTopology X] : Bijective (⊥ : DiscreteQuotient X).proj
-- Mathlib/NumberTheory/LegendreSymbol/GaussEisensteinLemmas.lean
theorem eisenstein_lemma_aux (p : ℕ) [Fact p.Prime] [Fact (p % 2 = 1)] {a : ℕ} (ha2 : a % 2 = 1)
    (hap : (a : ZMod p) ≠ 0) :
    ((Ico 1 (p / 2).succ).filter fun x : ℕ => p / 2 < (a * x : ZMod p).val).card ≡
      ∑ x ∈ Ico 1 (p / 2).succ, x * a / p [MOD 2]
-- Mathlib/Algebra/Lie/Subalgebra.lean
theorem gc_map_comap : GaloisConnection (map f) (comap f)
-- Mathlib/Analysis/Calculus/FDeriv/Bilinear.lean
@[fun_prop]
theorem IsBoundedBilinearMap.hasFDerivWithinAt (h : IsBoundedBilinearMap 𝕜 b) (p : E × F) :
    HasFDerivWithinAt b (h.deriv p) u p
-- Mathlib/Order/Compare.lean
theorem Compares.ne_gt [Preorder α] {o} {a b : α} (h : Compares o a b) : o ≠ gt ↔ a ≤ b
-- Mathlib/Data/Set/Finite.lean
theorem infinite_image_iff {s : Set α} {f : α → β} (hi : InjOn f s) :
    (f '' s).Infinite ↔ s.Infinite
-- Mathlib/Algebra/FreeAlgebra.lean
@[simp]
theorem lift_ι_apply (f : X → A) (x) : lift R f (ι R x) = f x
-- Mathlib/CategoryTheory/Limits/FunctorCategory.lean
@[reassoc (attr := simp)]
theorem limitObjIsoLimitCompEvaluation_inv_π_app [HasLimitsOfShape J C] (F : J ⥤ K ⥤ C) (j : J)
    (k : K) :
    (limitObjIsoLimitCompEvaluation F k).inv ≫ (limit.π F j).app k =
      limit.π (F ⋙ (evaluation K C).obj k) j
-- Mathlib/Data/Set/Lattice.lean
theorem iUnion_inter_subset {ι α} {s t : ι → Set α} : ⋃ i, s i ∩ t i ⊆ (⋃ i, s i) ∩ ⋃ i, t i
-- Mathlib/Analysis/InnerProductSpace/PiL2.lean
@[simp]
protected theorem orthonormal (b : OrthonormalBasis ι 𝕜 E) : Orthonormal 𝕜 b
-- Mathlib/Data/Multiset/Bind.lean
protected theorem Nodup.product : Nodup s → Nodup t → Nodup (s ×ˢ t)
-- Mathlib/ModelTheory/Semantics.lean
@[simp]
theorem realize_total : M ⊨ r.total ↔ Total fun x y : M => RelMap r ![x, y]
-- Mathlib/Analysis/MeanInequalities.lean
/-- **HM-GM inequality**: The **harmonic mean is less than or equal to the geometric mean. --/
theorem harm_mean_le_geom_mean {ι : Type*} (s : Finset ι) (hs : s.Nonempty) (w : ι → ℝ)
    (z : ι → ℝ) (hw : ∀ i ∈ s, 0 < w i) (hw' : 0 < ∑ i in s, w i) (hz : ∀ i ∈ s, 0 < z i) :
    (∑ i in s, w i) / (∑ i in s, w i / z i) ≤ (∏ i in s, z i ^ w i) ^ (∑ i in s, w i)⁻¹
-- Mathlib/Topology/MetricSpace/HausdorffDistance.lean
theorem not_mem_of_dist_lt_infDist (h : dist x y < infDist x s) : y ∉ s
-- Mathlib/Data/Set/Pointwise/Basic.lean
@[to_additive]
theorem mem_div : a ∈ s / t ↔ ∃ x ∈ s, ∃ y ∈ t, x / y = a
-- Mathlib/Analysis/Complex/TaylorSeries.lean
/-- A function that is complex differentiable on the open ball of radius `r` around `c`
is given by evaluating its Taylor series at `c` on this open ball. -/
lemma taylorSeries_eq_on_ball' {f : ℂ → ℂ} (hf : DifferentiableOn ℂ f (Metric.ball c r)) :
    ∑' n : ℕ, (n ! : ℂ)⁻¹ * iteratedDeriv n f c * (z - c) ^ n = f z
-- Mathlib/NumberTheory/Padics/Hensel.lean
private theorem newton_seq_dist {n k : ℕ} (hnk : n ≤ k) :
    ‖newton_seq k - newton_seq n‖ ≤ ‖F.derivative.eval a‖ * T ^ 2 ^ n
-- Mathlib/AlgebraicTopology/SimplexCategory.lean
/-- `SimplexCategory` is a skeleton of `NonemptyFinLinOrd`.
-/
lemma isSkeletonOf :
    IsSkeletonOf NonemptyFinLinOrd SimplexCategory skeletalFunctor
-- Mathlib/RingTheory/Localization/FractionRing.lean
protected theorem mul_inv_cancel (x : K) (hx : x ≠ 0) : x * IsFractionRing.inv A x = 1
-- Mathlib/Topology/Clopen.lean
protected theorem IsClopen.isClosed (hs : IsClopen s) : IsClosed s
-- Mathlib/CategoryTheory/Subobject/Lattice.lean
theorem finset_sup_factors {I : Type*} {A B : C} {s : Finset I} {P : I → Subobject B} {f : A ⟶ B}
    (h : ∃ i ∈ s, (P i).Factors f) : (s.sup P).Factors f
-- Mathlib/Algebra/Polynomial/Degree/Lemmas.lean
theorem natDegree_sub : (p - q).natDegree = (q - p).natDegree
-- Mathlib/SetTheory/Ordinal/Arithmetic.lean
theorem lt_div {a b c : Ordinal} (h : c ≠ 0) : a < b / c ↔ c * succ a ≤ b
-- Mathlib/Data/Finset/Basic.lean
@[simp]
theorem union_empty (s : Finset α) : s ∪ ∅ = s
-- Mathlib/Logic/Equiv/PartialEquiv.lean
theorem exists_mem_target {p : β → Prop} : (∃ y ∈ e.target, p y) ↔ ∃ x ∈ e.source, p (e x)
-- Mathlib/Analysis/Normed/Group/Hom.lean
/-- If one controls the norm of every `f x`, then one controls the norm of `f`. -/
theorem opNorm_le_bound {M : ℝ} (hMp : 0 ≤ M) (hM : ∀ x, ‖f x‖ ≤ M * ‖x‖) : ‖f‖ ≤ M
-- Mathlib/AlgebraicGeometry/PrimeSpectrum/Basic.lean
theorem isClosed_singleton_iff_isMaximal (x : PrimeSpectrum R) :
    IsClosed ({x} : Set (PrimeSpectrum R)) ↔ x.asIdeal.IsMaximal
-- Mathlib/RepresentationTheory/Basic.lean
theorem trivial_def (g : G) (v : V) : trivial k (V := V) g v = v
-- Mathlib/Analysis/Normed/Group/AddTorsor.lean
theorem nndist_eq_nnnorm_vsub (x y : P) : nndist x y = ‖x -ᵥ y‖₊
-- Mathlib/LinearAlgebra/AffineSpace/AffineSubspace.lean
theorem Parallel.vectorSpan_eq {s₁ s₂ : Set P} (h : affineSpan k s₁ ∥ affineSpan k s₂) :
    vectorSpan k s₁ = vectorSpan k s₂
-- Mathlib/CategoryTheory/Sites/LocallyFullyFaithful.lean
/--
A functor `G : C ⥤ D` is locally faithful wrt a topology on `D` if for every `f₁ f₂ : U ⟶ V` whose
image in `D` are equal, the set of `G.map gᵢ : G.obj Wᵢ ⟶ G.obj U` such that `gᵢ ≫ f₁ = gᵢ ≫ f₂`
is a coverage of the topology on `D`.
-/
class IsLocallyFaithful : Prop where
  functorPushforward_equalizer_mem : ∀ {U V : C} (f₁ f₂ : U ⟶ V), G.map f₁ = G.map f₂ →
    (Sieve.equalizer f₁ f₂).functorPushforward G ∈ K _
-- Mathlib/Data/List/Intervals.lean
theorem map_sub (n m k : ℕ) (h₁ : k ≤ n) :
    ((Ico n m).map fun x => x - k) = Ico (n - k) (m - k)
-- Mathlib/Data/Finset/Pointwise.lean
@[to_additive (attr := simp)]
lemma sup'_one [SemilatticeSup β] (f : α → β) : sup' 1 one_nonempty f = f 1
-- Mathlib/CategoryTheory/Pi/Basic.lean
/-- Two functors to a product category are equal iff they agree on every coordinate. -/
theorem pi_ext (f f' : A ⥤ ∀ i, C i) (h : ∀ i, f ⋙ (Pi.eval C i) = f' ⋙ (Pi.eval C i)) :
    f = f'
-- Mathlib/Data/Finsupp/Order.lean
@[simp, norm_cast] lemma coe_le_coe : ⇑f ≤ g ↔ f ≤ g
-- Mathlib/Algebra/BigOperators/Intervals.lean
@[to_additive]
lemma prod_Ioc_mul_eq_prod_Icc (h : a ≤ b) : (∏ x ∈ Ioc a b, f x) * f a = ∏ x ∈ Icc a b, f x
-- Mathlib/Algebra/Exact.lean
lemma of_comp_eq_zero_of_ker_in_range [Zero P] (hc : g.comp f = 0)
    (hr : ∀ y, g y = 0 → y ∈ Set.range f) :
    Exact f g
-- Mathlib/Analysis/SpecialFunctions/Log/Basic.lean
@[continuity]
theorem continuous_log : Continuous fun x : { x : ℝ // x ≠ 0 } => log x
-- Mathlib/Topology/Bases.lean
protected theorem IsTopologicalBasis.iInf {β : Type*} {ι : Type*} {t : ι → TopologicalSpace β}
    {T : ι → Set (Set β)} (h_basis : ∀ i, IsTopologicalBasis (t := t i) (T i)) :
    IsTopologicalBasis (t := ⨅ i, t i)
      { S | ∃ (U : ι → Set β) (F : Finset ι), (∀ i, i ∈ F → U i ∈ T i) ∧ S = ⋂ i ∈ F, U i }
-- Mathlib/Combinatorics/SetFamily/Shatter.lean
@[simp] lemma shatterer_eq : 𝒜.shatterer = 𝒜 ↔ IsLowerSet (𝒜 : Set (Finset α))
-- Mathlib/Analysis/Convex/Star.lean
theorem StarConvex.sub (hs : StarConvex 𝕜 x s) (ht : StarConvex 𝕜 y t) :
    StarConvex 𝕜 (x - y) (s - t)
-- Mathlib/Analysis/Calculus/FDeriv/Add.lean
@[fun_prop]
theorem DifferentiableOn.const_smul (h : DifferentiableOn 𝕜 f s) (c : R) :
    DifferentiableOn 𝕜 (fun y => c • f y) s
-- Mathlib/CategoryTheory/Adhesive.lean
theorem IsPushout.isVanKampen_inl {W E X Z : C} (c : BinaryCofan W E) [FinitaryExtensive C]
    [HasPullbacks C] (hc : IsColimit c) (f : W ⟶ X) (h : X ⟶ Z) (i : c.pt ⟶ Z)
    (H : IsPushout f c.inl h i) : H.IsVanKampen
-- Mathlib/Analysis/Normed/Operator/LinearIsometry.lean
theorem map_add (x y : E) : e (x + y) = e x + e y
-- Mathlib/SetTheory/Ordinal/Exponential.lean
theorem opow_dvd_opow (a : Ordinal) {b c : Ordinal} (h : b ≤ c) : a ^ b ∣ a ^ c
-- Mathlib/Logic/Equiv/Basic.lean
@[simp]
theorem Perm.subtypeCongr.trans :
    (ep.subtypeCongr en).trans (ep'.subtypeCongr en')
    = Perm.subtypeCongr (ep.trans ep') (en.trans en')
-- Mathlib/Data/Set/Function.lean
lemma bijOn_symm_image : BijOn e.symm (e '' s) s
-- .lake/packages/lean4/src/lean/Init/Data/Nat/Lemmas.lean
protected theorem eq_zero_of_add_eq_zero_right (h : n + m = 0) : n = 0
-- Mathlib/Algebra/Order/Group/Unbundled/Abs.lean
@[to_additive] lemma le_mabs : a ≤ |b|ₘ ↔ a ≤ b ∨ a ≤ b⁻¹
-- Mathlib/Algebra/Field/Basic.lean
theorem one_add_div (h : b ≠ 0) : 1 + a / b = (b + a) / b
-- Mathlib/Data/Finset/NoncommProd.lean
@[to_additive]
lemma noncommProd_induction (s : Multiset α) (comm)
    (p : α → Prop) (hom : ∀ a b, p a → p b → p (a * b)) (unit : p 1) (base : ∀ x ∈ s, p x) :
    p (s.noncommProd comm)
-- Mathlib/SetTheory/ZFC/Basic.lean
@[simp]
theorem sUnion_empty : ⋃₀ (∅ : ZFSet.{u}) = ∅
-- Mathlib/Combinatorics/SimpleGraph/Clique.lean
@[simp]
theorem cliqueFinset_map_of_equiv (e : α ≃ β) (n : ℕ) :
    (G.map e.toEmbedding).cliqueFinset n =
      (G.cliqueFinset n).map ⟨map e.toEmbedding, Finset.map_injective _⟩
-- Mathlib/Probability/Martingale/Convergence.lean
/-- If a martingale `f` adapted to `ℱ` converges in L¹ to `g`, then for all `n`, `f n` is almost
everywhere equal to `𝔼[g | ℱ n]`. -/
theorem Martingale.eq_condexp_of_tendsto_eLpNorm {μ : Measure Ω} (hf : Martingale f ℱ μ)
    (hg : Integrable g μ) (hgtends : Tendsto (fun n => eLpNorm (f n - g) 1 μ) atTop (𝓝 0)) (n : ℕ) :
    f n =ᵐ[μ] μ[g|ℱ n]
-- Mathlib/Algebra/Group/Subgroup/Pointwise.lean
@[to_additive (attr := simp)]
lemma op_smul_coe_set [Group G] [SetLike S G] [SubgroupClass S G] {s : S} {a : G} (ha : a ∈ s) :
    MulOpposite.op a • (s : Set G) = s
-- Mathlib/Algebra/Order/Interval/Basic.lean
@[to_additive existing (attr := simp)]
theorem coe_div_interval : (↑(s / t) : Interval α) = s / t
-- Mathlib/Order/Lattice.lean
@[gcongr]
theorem sup_le_sup_left (h₁ : a ≤ b) (c) : c ⊔ a ≤ c ⊔ b
-- Mathlib/Order/ConditionallyCompleteLattice/Basic.lean
theorem csInf_le_csInf (ht : BddBelow t) (hs : s.Nonempty) (h : s ⊆ t) : sInf t ≤ sInf s
-- Mathlib/AlgebraicTopology/DoldKan/NCompGamma.lean
@[reassoc]
theorem Γ₀_obj_termwise_mapMono_comp_PInfty (X : SimplicialObject C) {Δ Δ' : SimplexCategory}
    (i : Δ ⟶ Δ') [Mono i] :
    Γ₀.Obj.Termwise.mapMono (AlternatingFaceMapComplex.obj X) i ≫ PInfty.f Δ.len =
      PInfty.f Δ'.len ≫ X.map i.op
-- Mathlib/Data/Nat/GCD/Basic.lean
@[simp]
theorem gcd_mul_left_add_left (m n k : ℕ) : gcd (n * k + m) n = gcd m n
-- Mathlib/Algebra/Group/Subgroup/MulOpposite.lean
@[to_additive (attr := simp)] lemma unop_toSubmonoid (H : Subgroup Gᵐᵒᵖ) :
    H.unop.toSubmonoid = H.toSubmonoid.unop
-- Mathlib/MeasureTheory/Measure/Typeclasses.lean
theorem ae_mem_iff_measure_eq [IsFiniteMeasure μ] {s : Set α} (hs : NullMeasurableSet s μ) :
    (∀ᵐ a ∂μ, a ∈ s) ↔ μ s = μ univ
-- Mathlib/Algebra/Quaternion.lean
@[simps (config := .lemmasOnly)]
instance instInv : Inv ℍ[R]
-- Mathlib/Analysis/CstarAlgebra/ContinuousFunctionalCalculus/Restrict.lean
/-- If the spectrum of an element restricts to a smaller scalar ring, then a continuous functional
calculus over the larger scalar ring descends to the smaller one. -/
@[simps!]
def starAlgHom {R : Type u} {S : Type v} {A : Type w} [Semifield R]
    [StarRing R] [TopologicalSpace R] [TopologicalSemiring R] [ContinuousStar R] [Semifield S]
    [StarRing S] [TopologicalSpace S] [TopologicalSemiring S] [ContinuousStar S] [Ring A]
    [StarRing A] [Algebra R S] [Algebra R A] [Algebra S A]
    [IsScalarTower R S A] [StarModule R S] [ContinuousSMul R S] {a : A}
    (φ : C(spectrum S a, S) →⋆ₐ[S] A) {f : C(S, R)} (h : SpectrumRestricts a f) :
    C(spectrum R a, R) →⋆ₐ[R] A
-- Mathlib/Data/Finset/Basic.lean
theorem ssubset_iff_exists_subset_erase {s t : Finset α} : s ⊂ t ↔ ∃ a ∈ t, s ⊆ t.erase a
-- Mathlib/Data/Matrix/ColumnRowPartitioned.lean
@[simp]
lemma fromRows_apply_inl (A₁ : Matrix m₁ n R) (A₂ : Matrix m₂ n R) (i : m₁) (j : n) :
    (fromRows A₁ A₂) (Sum.inl i) j = A₁ i j
-- Mathlib/GroupTheory/FreeGroup/Basic.lean
@[to_additive]
theorem Step.append_left_iff : ∀ L, Step (L ++ L₁) (L ++ L₂) ↔ Step L₁ L₂
-- Mathlib/MeasureTheory/PiSystem.lean
theorem generateFrom_measurableSet_of_generatePiSystem {α} {g : Set (Set α)} (t : Set α)
    (ht : t ∈ generatePiSystem g) : MeasurableSet[generateFrom g] t
-- Mathlib/Data/Nat/Prime/Defs.lean
theorem Prime.eq_one_or_self_of_dvd {p : ℕ} (pp : p.Prime) (m : ℕ) (hm : m ∣ p) :
    m = 1 ∨ m = p
-- Mathlib/Data/Multiset/Nodup.lean
theorem mem_sub_of_nodup [DecidableEq α] {a : α} {s t : Multiset α} (d : Nodup s) :
    a ∈ s - t ↔ a ∈ s ∧ a ∉ t
-- Mathlib/NumberTheory/SumFourSquares.lean
/-- **Four squares theorem** -/
theorem sum_four_squares (n : ℕ) : ∃ a b c d : ℕ, a ^ 2 + b ^ 2 + c ^ 2 + d ^ 2 = n
-- Mathlib/Algebra/Lie/Basic.lean
@[simp]
theorem smul_lie : ⁅t • x, m⁆ = t • ⁅x, m⁆
-- Mathlib/Data/Fintype/Basic.lean
lemma univ_val_map_subtype_restrict [Fintype α] (f : α → β)
    (p : α → Prop) [DecidablePred p] [Fintype {a // p a}] :
    univ.val.map (Subtype.restrict p f) = (univ.filter p).val.map f
-- Mathlib/Algebra/BigOperators/Group/List.lean
@[to_additive sum_eq_card_nsmul]
theorem prod_eq_pow_card (l : List M) (m : M) (h : ∀ x ∈ l, x = m) : l.prod = m ^ l.length
-- Mathlib/Topology/Compactness/Compact.lean
@[simp]
theorem isCompact_singleton {x : X} : IsCompact ({x} : Set X)
-- Mathlib/MeasureTheory/Integral/SetIntegral.lean
/-- If a function vanishes on `sᶜ`, then its integral on `s` coincides with its integral on the
whole space. -/
theorem setIntegral_eq_integral_of_forall_compl_eq_zero (h : ∀ x, x ∉ s → f x = 0) :
    ∫ x in s, f x ∂μ = ∫ x, f x ∂μ
-- Mathlib/Analysis/SpecialFunctions/Trigonometric/Deriv.lean
theorem HasFDerivWithinAt.ccos (hf : HasFDerivWithinAt f f' s x) :
    HasFDerivWithinAt (fun x => Complex.cos (f x)) (-Complex.sin (f x) • f') s x
-- Mathlib/Data/Finset/Pointwise.lean
@[to_additive]
theorem card_mul_iff :
    (s * t).card = s.card * t.card ↔ (s ×ˢ t : Set (α × α)).InjOn fun p => p.1 * p.2
-- Mathlib/Order/Partition/Finpartition.lean
theorem parts_top_subset (a : α) [Decidable (a = ⊥)] : (⊤ : Finpartition a).parts ⊆ {a}
-- Mathlib/Algebra/MvPolynomial/Degrees.lean
@[simp]
theorem totalDegree_one : (1 : MvPolynomial σ R).totalDegree = 0
-- Mathlib/LinearAlgebra/Orientation.lean
/-- Composing a basis with a linear equiv gives the same orientation if and only if the
determinant is positive. -/
theorem orientation_comp_linearEquiv_eq_iff_det_pos (e : Basis ι R M) (f : M ≃ₗ[R] M) :
    (e.map f).orientation = e.orientation ↔ 0 < LinearMap.det (f : M →ₗ[R] M)
-- Mathlib/Data/Prod/Basic.lean
@[simp] lemma map_id' : Prod.map (fun a : α ↦ a) (fun b : β ↦ b) = fun x ↦ x
-- Mathlib/Control/LawfulFix.lean
theorem exists_fix_le_approx (x : α) : ∃ i, Part.fix f x ≤ approx f i x
-- Mathlib/Analysis/Calculus/IteratedDeriv/Defs.lean
/-- The property of being `C^n`, initially defined in terms of the Fréchet derivative, can be
reformulated in terms of the one-dimensional derivative on sets with unique derivatives. -/
theorem contDiffOn_iff_continuousOn_differentiableOn_deriv {n : ℕ∞} (hs : UniqueDiffOn 𝕜 s) :
    ContDiffOn 𝕜 n f s ↔ (∀ m : ℕ, (m : ℕ∞) ≤ n → ContinuousOn (iteratedDerivWithin m f s) s) ∧
      ∀ m : ℕ, (m : ℕ∞) < n → DifferentiableOn 𝕜 (iteratedDerivWithin m f s) s
-- Mathlib/GroupTheory/MonoidLocalization/Basic.lean
@[to_additive]
theorem mk'_eq_of_eq {a₁ b₁ : M} {a₂ b₂ : S} (H : ↑a₂ * b₁ = ↑b₂ * a₁) :
    f.mk' a₁ a₂ = f.mk' b₁ b₂
-- Mathlib/Analysis/LocallyConvex/WithSeminorms.lean
theorem basisSets_neg (U) (hU' : U ∈ p.basisSets) :
    ∃ V ∈ p.basisSets, V ⊆ (fun x : E => -x) ⁻¹' U
-- Mathlib/Init/Order/LinearOrder.lean
theorem max_comm (a b : α) : max a b = max b a
-- Mathlib/RingTheory/PrincipalIdealDomain.lean
theorem IsField.isPrincipalIdealRing {R : Type*} [CommRing R] (h : IsField R) :
    IsPrincipalIdealRing R
-- Mathlib/Data/Set/Basic.lean
@[simp]
lemma disjoint_union_right : Disjoint s (t ∪ u) ↔ Disjoint s t ∧ Disjoint s u
-- Mathlib/LinearAlgebra/Matrix/HermitianFunctionalCalculus.lean
/-- The `ℝ`-spectrum of a Hermitian matrix over `RCLike` field is the range of the eigenvalue
function -/
theorem eigenvalues_eq_spectrum_real {a : Matrix n n 𝕜} (ha : IsHermitian a) :
    spectrum ℝ a = Set.range (ha.eigenvalues)
-- Mathlib/Algebra/Opposites.lean
@[to_additive (attr := simp)] lemma op_one [One α] : op (1 : α) = 1
-- Mathlib/Probability/Kernel/Composition.lean
@[simp] lemma swapLeft_prodMkRight (κ : Kernel α β) (γ : Type*) [MeasurableSpace γ] :
    swapLeft (prodMkRight γ κ) = prodMkLeft γ κ
-- Mathlib/Geometry/Manifold/Algebra/LeftInvariantDerivation.lean
@[simp]
theorem coe_neg : ⇑(-X) = -X
-- Mathlib/Algebra/Group/Action/Defs.lean
lemma smul_pow (r : M) (x : N) : ∀ n, (r • x) ^ n = r ^ n • x ^ n
-- Mathlib/Algebra/Group/AddChar.lean
lemma _root_.MonoidHom.compAddChar_injective_left (ψ : AddChar A M) (hψ : Surjective ψ) :
    Injective fun f : M →* N ↦ f.compAddChar ψ
-- Mathlib/Data/Finsupp/Lex.lean
theorem lt_of_forall_lt_of_lt (a b : Lex (α →₀ N)) (i : α) :
    (∀ j < i, ofLex a j = ofLex b j) → ofLex a i < ofLex b i → a < b
-- Mathlib/Algebra/Order/Field/Basic.lean
theorem inv_antitoneOn_Ioi :
    AntitoneOn (fun x : α ↦ x⁻¹) (Set.Ioi 0)
-- Mathlib/Probability/Kernel/RadonNikodym.lean
lemma measurable_rnDerivAux_right (κ η : Kernel α γ) (a : α) :
    Measurable (fun x : γ ↦ rnDerivAux κ η a x)
-- Mathlib/LinearAlgebra/Projectivization/Basic.lean
/-- An induction principle for `Projectivization`. Use as `induction v`. -/
@[elab_as_elim, cases_eliminator, induction_eliminator]
theorem ind {P : ℙ K V → Prop} (h : ∀ (v : V) (h : v ≠ 0), P (mk K v h)) : ∀ p, P p
-- Mathlib/CategoryTheory/Limits/Shapes/Pullback/Cospan.lean
/-- Every diagram indexing a pullback is naturally isomorphic (actually, equal) to a `cospan` -/
-- @[simps (config := { rhsMd := semireducible })]  Porting note: no semireducible
@[simps!]
def diagramIsoCospan (F : WalkingCospan ⥤ C) : F ≅ cospan (F.map inl) (F.map inr)
-- Mathlib/Algebra/Group/Basic.lean
@[to_additive]
theorem eq_one_div_of_mul_eq_one_left (h : b * a = 1) : b = 1 / a
-- Mathlib/Probability/Distributions/Uniform.lean
@[simp]
theorem support_uniformOfFinset : (uniformOfFinset s hs).support = s
-- Mathlib/Data/Multiset/Basic.lean
@[simp]
theorem map_singleton (f : α → β) (a : α) : ({a} : Multiset α).map f = {f a}
-- .lake/packages/lean4/src/lean/Init/Omega/Int.lean
theorem ofNat_val_sub {x y : Fin n} :
    (((x - y : Fin n)) : Int) = (((n - y : Nat) + (x : Int) : Int)) % n
-- Mathlib/Analysis/SpecialFunctions/Trigonometric/Basic.lean
theorem sin_sub_two_pi (x : ℂ) : sin (x - 2 * π) = sin x
-- Mathlib/Topology/Order/Basic.lean
/-- A set is a neighborhood of `a` if and only if it contains an interval `(l, u)` containing `a`,
provided `a` is neither a bottom element nor a top element. -/
theorem mem_nhds_iff_exists_Ioo_subset' [OrderTopology α] {a : α} {s : Set α} (hl : ∃ l, l < a)
    (hu : ∃ u, a < u) : s ∈ 𝓝 a ↔ ∃ l u, a ∈ Ioo l u ∧ Ioo l u ⊆ s
-- Mathlib/LinearAlgebra/Finsupp.lean
theorem snd_sumFinsuppLEquivProdFinsupp {α β : Type*} (f : α ⊕ β →₀ M) (y : β) :
    (sumFinsuppLEquivProdFinsupp R f).2 y = f (Sum.inr y)
-- Mathlib/Data/Nat/ModEq.lean
@[refl]
protected theorem refl (a : ℕ) : a ≡ a [MOD n]
-- Mathlib/ModelTheory/LanguageMap.lean
@[simp]
theorem funMap_sumInl [(L.sum L').Structure M] [(LHom.sumInl : L →ᴸ L.sum L').IsExpansionOn M] {n}
    {f : L.Functions n} {x : Fin n → M} : @funMap (L.sum L') M _ n (Sum.inl f) x = funMap f x
-- Mathlib/Algebra/Star/NonUnitalSubalgebra.lean
/-- The `NonUnitalStarSubalgebra` obtained from `S : NonUnitalSubalgebra R A` by taking the
smallest non-unital subalgebra containing both `S` and `star S`. -/
@[simps!]
def starClosure (S : NonUnitalSubalgebra R A) : NonUnitalStarSubalgebra R A
-- Mathlib/Algebra/Order/Interval/Set/Group.lean
theorem pairwise_disjoint_Ioo_add_intCast :
    Pairwise (Disjoint on fun n : ℤ => Ioo (a + n) (a + n + 1))