ruc-ai4math/mathlib_handler_benchmark_410 huggingface dataset:
-- Mathlib/Algebra/Module/Submodule/Pointwise.lean
@[simp]
theorem neg_inf (S T : Submodule R M) : -(S ⊓ T) = -S ⊓ -T
-- Mathlib/Analysis/Normed/Group/Hom.lean
@[simp]
theorem coe_mkNormedAddGroupHom (f : V₁ →+ V₂) (C) (hC) : ⇑(f.mkNormedAddGroupHom C hC) = f
-- Mathlib/MeasureTheory/Group/FundamentalDomain.lean
@[to_additive]
theorem setLIntegral_eq_tsum (h : IsFundamentalDomain G s μ) (f : α → ℝ≥0∞) (t : Set α) :
    ∫⁻ x in t, f x ∂μ = ∑' g : G, ∫⁻ x in t ∩ g • s, f x ∂μ
-- Mathlib/GroupTheory/SpecificGroups/Cyclic.lean
/-- Two group homomorphisms `G →* G'` are equal if and only if they agree on a generator of `G`. -/
@[to_additive
   "Two homomorphisms `G →+ G'` of additive groups are equal if and only if they agree
   on a generator of `G`."]
lemma MonoidHom.eq_iff_eq_on_generator (f₁ f₂ : G →* G') : f₁ = f₂ ↔ f₁ g = f₂ g
-- Mathlib/InformationTheory/Hamming.lean
theorem ofHamming_inj {x y : Hamming β} : ofHamming x = ofHamming y ↔ x = y
-- Mathlib/CategoryTheory/Bicategory/FunctorBicategory.lean
/-- Left unitor for the vertical composition of oplax natural transformations. -/
-- Porting note: verified that projections are correct and changed @[simps] to @[simps!]
@[simps!]
def leftUnitor (η : F ⟶ G) : 𝟙 F ≫ η ≅ η
-- Mathlib/Order/Filter/Basic.lean
theorem _root_.Function.Semiconj.filter_map {f : α → β} {ga : α → α} {gb : β → β}
    (h : Function.Semiconj f ga gb) : Function.Semiconj (map f) (map ga) (map gb)
-- Mathlib/GroupTheory/OrderOfElement.lean
/-- 1 is of finite order in any monoid. -/
@[to_additive "0 is of finite order in any additive monoid."]
theorem isOfFinOrder_one : IsOfFinOrder (1 : G)
-- Mathlib/MeasureTheory/Function/ConvergenceInMeasure.lean
/-- This lemma is superceded by `MeasureTheory.tendstoInMeasure_of_tendsto_eLpNorm` where we
allow `p = ∞` and only require `AEStronglyMeasurable`. -/
theorem tendstoInMeasure_of_tendsto_eLpNorm_of_stronglyMeasurable (hp_ne_zero : p ≠ 0)
    (hp_ne_top : p ≠ ∞) (hf : ∀ n, StronglyMeasurable (f n)) (hg : StronglyMeasurable g)
    {l : Filter ι} (hfg : Tendsto (fun n => eLpNorm (f n - g) p μ) l (𝓝 0)) :
    TendstoInMeasure μ f l g
-- Mathlib/Logic/Basic.lean
@[simp]
lemma exists_apply_eq_apply2 {α β γ} {f : α → β → γ} {a : α} {b : β} : ∃ x y, f x y = f a b
-- Mathlib/MeasureTheory/Integral/SetToL1.lean
theorem setToFun_add_left (hT : DominatedFinMeasAdditive μ T C)
    (hT' : DominatedFinMeasAdditive μ T' C') (f : α → E) :
    setToFun μ (T + T') (hT.add hT') f = setToFun μ T hT f + setToFun μ T' hT' f
-- Mathlib/Analysis/SpecialFunctions/Pow/NNReal.lean
@[simp]
theorem rpow_one (x : ℝ≥0) : x ^ (1 : ℝ) = x
-- Mathlib/CategoryTheory/ComposableArrows.lean
/-- The functor `Fin n ⥤ Fin (n + 1)` which sends `i` to `i.succ`. -/
@[simps]
def _root_.Fin.succFunctor (n : ℕ) : Fin n ⥤ Fin (n + 1)
-- Mathlib/SetTheory/Surreal/Basic.lean
theorem numeric_def {x : PGame} :
    Numeric x ↔
      (∀ i j, x.moveLeft i < x.moveRight j) ∧
        (∀ i, Numeric (x.moveLeft i)) ∧ ∀ j, Numeric (x.moveRight j)
-- Mathlib/MeasureTheory/Function/StronglyMeasurable/Basic.lean
@[aesop safe 20 (rule_sets := [Measurable])]
protected theorem add [AddMonoid β] [ContinuousAdd β] (hf : AEFinStronglyMeasurable f μ)
    (hg : AEFinStronglyMeasurable g μ) : AEFinStronglyMeasurable (f + g) μ
-- Mathlib/Geometry/Euclidean/Basic.lean
/-- The distance to a point's orthogonal projection is 0 iff it lies in the subspace. -/
theorem dist_orthogonalProjection_eq_zero_iff {s : AffineSubspace ℝ P} [Nonempty s]
    [HasOrthogonalProjection s.direction] {p : P} :
    dist p (orthogonalProjection s p) = 0 ↔ p ∈ s
-- Mathlib/CategoryTheory/Triangulated/Rotate.lean
/-- Rotating triangles gives an auto-equivalence on the category of triangles in `C`.
-/
@[simps]
def triangleRotation : Equivalence (Triangle C) (Triangle C)
-- Mathlib/Algebra/Homology/DerivedCategory/SingleTriangle.lean
/-- The (distinguished) triangle in the derived category of `C` given by a
short exact short complex in `C`. -/
@[simps!]
noncomputable def singleTriangle : Triangle (DerivedCategory C)
-- Mathlib/Data/Vector/Defs.lean
/-- A nil vector maps to a nil list. -/
@[simp]
theorem toList_nil : toList nil = @List.nil α
-- Mathlib/Topology/MetricSpace/PiNat.lean
theorem disjoint_cylinder_of_longestPrefix_lt {s : Set (∀ n, E n)} (hs : IsClosed s) {x : ∀ n, E n}
    (hx : x ∉ s) {n : ℕ} (hn : longestPrefix x s < n) : Disjoint s (cylinder x n)
-- Mathlib/Data/Real/EReal.lean
lemma top_mul_of_neg {x : EReal} (h : x < 0) : ⊤ * x = ⊥
-- Mathlib/Topology/Bornology/Basic.lean
theorem isBounded_ofBounded_iff (B : Set (Set α)) {empty_mem subset_mem union_mem sUnion_univ} :
    @IsBounded _ (ofBounded B empty_mem subset_mem union_mem sUnion_univ) s ↔ s ∈ B
-- Mathlib/Data/Seq/Seq.lean
@[simp]
theorem join_nil : join nil = (nil : Seq α)
-- Mathlib/Topology/ContinuousOn.lean
theorem ContinuousWithinAt.congr_of_eventuallyEq {f f₁ : α → β} {s : Set α} {x : α}
    (h : ContinuousWithinAt f s x) (h₁ : f₁ =ᶠ[𝓝[s] x] f) (hx : f₁ x = f x) :
    ContinuousWithinAt f₁ s x
-- Mathlib/RingTheory/PrimeSpectrum.lean
theorem zeroLocus_union (s s' : Set R) : zeroLocus (s ∪ s') = zeroLocus s ∩ zeroLocus s'
-- Mathlib/Algebra/Order/AbsoluteValue.lean
lemma abv_mul (x y) : abv (x * y) = abv x * abv y
-- Mathlib/Algebra/FreeMonoid/Count.lean
theorem countP_of (x : α) : countP p (of x) = if p x then Multiplicative.ofAdd 1 else 1
-- Mathlib/Algebra/Homology/ComplexShapeSigns.lean
@[simps]
instance : TotalComplexShape c c c
-- Mathlib/Analysis/SumOverResidueClass.lean
/-- A decreasing sequence of real numbers is summable on a residue class
if and only if it is summable. -/
lemma summable_indicator_mod_iff {m : ℕ} [NeZero m] {f : ℕ → ℝ} (hf : Antitone f) (k : ZMod m) :
    Summable ({n : ℕ | (n : ZMod m) = k}.indicator f) ↔ Summable f
-- Mathlib/Logic/Equiv/Defs.lean
@[simp] theorem coe_refl : (Equiv.refl α : α → α) = id
-- Mathlib/CategoryTheory/Category/Basic.lean
theorem comp_dite {P : Prop} [Decidable P]
    {X Y Z : C} (f : X ⟶ Y) (g : P → (Y ⟶ Z)) (g' : ¬P → (Y ⟶ Z)) :
    (f ≫ if h : P then g h else g' h) = if h : P then f ≫ g h else f ≫ g' h
-- Mathlib/Order/Cover.lean
theorem CovBy.le (h : a ⋖ b) : a ≤ b
-- Mathlib/Data/Real/Hyperreal.lean
theorem infinite_iff_infinitesimal_inv {x : ℝ*} (h0 : x ≠ 0) : Infinite x ↔ Infinitesimal x⁻¹
-- Mathlib/Analysis/Convex/Basic.lean
theorem Directed.convex_iUnion {ι : Sort*} {s : ι → Set E} (hdir : Directed (· ⊆ ·) s)
    (hc : ∀ ⦃i : ι⦄, Convex 𝕜 (s i)) : Convex 𝕜 (⋃ i, s i)
-- Mathlib/LinearAlgebra/CliffordAlgebra/Even.lean
@[simp]
private theorem fst_fFold_fFold (m₁ m₂ : M) (x : A × S f) :
    (fFold f m₁ (fFold f m₂ x)).fst = f.bilin m₁ m₂ * x.fst
-- Mathlib/Topology/MetricSpace/IsometricSMul.lean
@[to_additive (attr := simp)]
theorem dist_div_left [Group G] [PseudoMetricSpace G] [IsometricSMul G G]
    [IsometricSMul Gᵐᵒᵖ G] (a b c : G) : dist (a / b) (a / c) = dist b c
-- Mathlib/Algebra/Homology/DerivedCategory/SingleTriangle.lean
/-- Given a short exact complex `S` in `C` that is short exact (`hS`), this is the
canonical isomorphism between the triangle `hS.singleTriangle` in the derived category
and the triangle attached to the corresponding short exact sequence of cochain complexes
after the application of the single functor. -/
@[simps!]
noncomputable def singleTriangleIso :
    hS.singleTriangle ≅
      triangleOfSES (hS.map_of_exact (HomologicalComplex.single C (ComplexShape.up ℤ) 0))
-- Mathlib/CategoryTheory/Monoidal/Category.lean
/-- The right unitor as a natural isomorphism. -/
@[simps!]
def rightUnitorNatIso : tensorUnitRight C ≅ 𝟭 C
-- Mathlib/LinearAlgebra/Matrix/NonsingularInverse.lean
@[simp]
theorem mul_inv_cancel_right_of_invertible (B : Matrix m n α) [Invertible A] : B * A * A⁻¹ = B
-- Mathlib/Topology/Instances/EReal.lean
lemma add_liminf_le_liminf_add : (liminf u f) + (liminf v f) ≤ liminf (u + v) f
-- Mathlib/RingTheory/GradedAlgebra/HomogeneousIdeal.lean
@[simp]
theorem HomogeneousIdeal.mem_iff {I : HomogeneousIdeal 𝒜} {x : A} : x ∈ I.toIdeal ↔ x ∈ I
-- Mathlib/Algebra/Homology/ShortComplex/ModuleCat.lean
/-- Constructor for short complexes in `ModuleCat.{v} R` taking as inputs
linear maps `f` and `g` and the vanishing of their composition. -/
@[simps]
def moduleCatMk {X₁ X₂ X₃ : Type v} [AddCommGroup X₁] [AddCommGroup X₂] [AddCommGroup X₃]
    [Module R X₁] [Module R X₂] [Module R X₃] (f : X₁ →ₗ[R] X₂) (g : X₂ →ₗ[R] X₃)
    (hfg : g.comp f = 0) : ShortComplex (ModuleCat.{v} R)
-- .lake/packages/lean4/src/lean/Init/SimpLemmas.lean
theorem Bool.and_assoc (a b c : Bool) : (a && b && c) = (a && (b && c))
-- Mathlib/Computability/Reduce.lean
private theorem le_trans {d₁ d₂ d₃ : ManyOneDegree} : d₁ ≤ d₂ → d₂ ≤ d₃ → d₁ ≤ d₃
-- Mathlib/Analysis/Convex/Function.lean
theorem ConcaveOn.left_le_of_le_right' (hf : ConcaveOn 𝕜 s f) {x y : E} (hx : x ∈ s) (hy : y ∈ s)
    {a b : 𝕜} (ha : 0 < a) (hb : 0 ≤ b) (hab : a + b = 1) (hfy : f (a • x + b • y) ≤ f y) :
    f x ≤ f (a • x + b • y)
-- Mathlib/Order/Category/HeytAlg.lean
@[simp]
theorem coe_of (α : Type*) [HeytingAlgebra α] : ↥(of α) = α
-- Mathlib/Algebra/Homology/QuasiIso.lean
lemma quasiIsoAt_iff_comp_right (φ : K ⟶ L) (φ' : L ⟶ M) (i : ι) [K.HasHomology i]
    [L.HasHomology i] [M.HasHomology i]
    [hφ' : QuasiIsoAt φ' i] :
    QuasiIsoAt (φ ≫ φ') i ↔ QuasiIsoAt φ i
-- .lake/packages/lean4/src/lean/Init/Omega/Int.lean
theorem ofNat_congr {a b : Nat} (h : a = b) : (a : Int) = (b : Int)
-- Mathlib/CategoryTheory/Functor/Derived/RightDerived.lean
lemma rightDerived_ext (G : D ⥤ H) (γ₁ γ₂ : RF ⟶ G)
    (hγ : α ≫ whiskerLeft L γ₁ = α ≫ whiskerLeft L γ₂) : γ₁ = γ₂
-- Mathlib/Algebra/Group/Subgroup/MulOpposite.lean
@[to_additive (attr := simp)]
theorem op_top : (⊤ : Subgroup G).op = ⊤
-- Mathlib/Order/BoundedOrder.lean
theorem monotone_and {p q : α → Prop} (m_p : Monotone p) (m_q : Monotone q) :
    Monotone fun x => p x ∧ q x
-- Mathlib/Topology/Algebra/Group/OpenMapping.lean
/-- Consider a sigma-compact group acting continuously and transitively on a Baire space. Then
the orbit map is open. This is a version of the open mapping theorem, valid notably for the
action of a sigma-compact locally compact group on a locally compact space. -/
@[to_additive "Consider a sigma-compact additive group acting continuously and transitively on a
Baire space. Then the orbit map is open. This is a version of the open mapping theorem, valid
notably for the action of a sigma-compact locally compact group on a locally compact space."]
theorem isOpenMap_smul_of_sigmaCompact (x : X) : IsOpenMap (fun (g : G) ↦ g • x)
-- Mathlib/Data/List/Destutter.lean
@[simp]
theorem destutter'_nil : destutter' R a [] = [a]
-- Mathlib/Computability/AkraBazzi/AkraBazzi.lean
lemma strictAntiOn_one_add_smoothingFn : StrictAntiOn (fun (x : ℝ) => (1 : ℝ) + ε x) (Set.Ioi 1)
-- Mathlib/LinearAlgebra/TensorProduct/Tower.lean
/-- Heterobasic version of `TensorProduct.curry`:

Given a linear map `M ⊗[R] N →[A] P`, compose it with the canonical
bilinear map `M →[A] N →[R] M ⊗[R] N` to form a bilinear map `M →[A] N →[R] P`. -/
@[simps]
nonrec def curry (f : M ⊗[R] N →ₗ[A] P) : M →ₗ[A] N →ₗ[R] P
-- Mathlib/Dynamics/Circle/RotationNumber/TranslationNumber.lean
@[simp]
theorem translate_inv_apply (x y : ℝ) : (translate <| Multiplicative.ofAdd x)⁻¹ y = -x + y
-- Mathlib/Topology/MetricSpace/GromovHausdorffRealized.lean
/-- The injection of `X` in the optimal coupling between `X` and `Y` is an isometry. -/
theorem isometry_optimalGHInjl : Isometry (optimalGHInjl X Y)
-- Mathlib/RingTheory/Norm/Basic.lean
theorem norm_eq_zero_iff_of_basis [IsDomain R] [IsDomain S] (b : Basis ι R S) {x : S} :
    Algebra.norm R x = 0 ↔ x = 0
-- Mathlib/CategoryTheory/Comma/Presheaf.lean
@[simp]
lemma map₂_id : YonedaCollection.map₂ F (𝟙 X) = id
-- Mathlib/Algebra/BigOperators/Intervals.lean
@[to_additive]
theorem prod_Ico_consecutive (f : ℕ → M) {m n k : ℕ} (hmn : m ≤ n) (hnk : n ≤ k) :
    ((∏ i ∈ Ico m n, f i) * ∏ i ∈ Ico n k, f i) = ∏ i ∈ Ico m k, f i
-- Mathlib/CategoryTheory/Monoidal/Types/Basic.lean
@[simp]
theorem associator_inv_apply {X Y Z : Type u} {x : X} {y : Y} {z : Z} :
    ((α_ X Y Z).inv : X ⊗ Y ⊗ Z → (X ⊗ Y) ⊗ Z) (x, (y, z)) = ((x, y), z)
-- Mathlib/Computability/TuringMachine.lean
theorem addBottom_nth_snd (L : ListBlank (∀ k, Option (Γ k))) (n : ℕ) :
    ((addBottom L).nth n).2 = L.nth n
-- Mathlib/Analysis/Calculus/TangentCone.lean
theorem uniqueDiffWithinAt_inter (ht : t ∈ 𝓝 x) :
    UniqueDiffWithinAt 𝕜 (s ∩ t) x ↔ UniqueDiffWithinAt 𝕜 s x
-- Mathlib/GroupTheory/GroupAction/BigOperators.lean
theorem List.smul_sum {r : α} {l : List β} : r • l.sum = (l.map (r • ·)).sum
-- Mathlib/Combinatorics/SimpleGraph/Subgraph.lean
@[simp]
lemma support_subgraphOfAdj {u v : V} (h : G.Adj u v) :
    (G.subgraphOfAdj h).support = {u , v}
-- Mathlib/Order/GaloisConnection.lean
theorem u_le_u_iff [Preorder α] [Preorder β] (gi : GaloisInsertion l u) {a b} : u a ≤ u b ↔ a ≤ b
-- Mathlib/RingTheory/Ideal/Maps.lean
/-- If `f : R ≃+* S` is a ring isomorphism and `I : Ideal R`,
  then `comap f (comap f.symm I) = I`. -/
@[simp]
theorem comap_of_equiv (I : Ideal R) (f : R ≃+* S) :
    (I.comap (f.symm : S →+* R)).comap (f : R →+* S) = I
-- Mathlib/SetTheory/Game/PGame.lean
@[simp]
theorem zero_leftMoves : LeftMoves 0 = PEmpty
-- Mathlib/Algebra/MvPolynomial/Rename.lean
theorem eval_rename (g : τ → R) (p : MvPolynomial σ R) : eval g (rename k p) = eval (g ∘ k) p
-- Mathlib/Algebra/MonoidAlgebra/Basic.lean
theorem mul_single_apply [AddGroup G] (f : k[G]) (r : k) (x y : G) :
    (f * single x r) y = f (y - x) * r
-- Mathlib/Probability/Kernel/Basic.lean
theorem setLIntegral_piecewise (a : α) (g : β → ℝ≥0∞) (t : Set β) :
    ∫⁻ b in t, g b ∂piecewise hs κ η a =
      if a ∈ s then ∫⁻ b in t, g b ∂κ a else ∫⁻ b in t, g b ∂η a
-- Mathlib/CategoryTheory/Types.lean
/-- A morphism in `Type u` is an isomorphism if and only if it is bijective. -/
theorem isIso_iff_bijective {X Y : Type u} (f : X ⟶ Y) : IsIso f ↔ Function.Bijective f
-- Mathlib/Data/ENNReal/Operations.lean
theorem mul_pos_iff : 0 < a * b ↔ 0 < a ∧ 0 < b
-- Mathlib/Data/Nat/Cast/Order/Basic.lean
@[simp, norm_cast, mono]
theorem cast_lt : (m : α) < n ↔ m < n
-- .lake/packages/lean4/src/lean/Init/Data/List/Basic.lean
@[simp] theorem take_zero (l : List α) : l.take 0 = []
-- Mathlib/Data/Matroid/Basic.lean
theorem Base.mem_of_insert_indep (hB : M.Base B) (heB : M.Indep (insert e B)) : e ∈ B
-- Mathlib/Topology/Constructions.lean
theorem discreteTopology_subtype_iff {S : Set X} :
    DiscreteTopology S ↔ ∀ x ∈ S, 𝓝[≠] x ⊓ 𝓟 S = ⊥
-- Mathlib/Data/Set/Subsingleton.lean
protected theorem Nontrivial.choose_snd_mem (hs : s.Nontrivial) : hs.choose.snd ∈ s
-- Mathlib/Algebra/Order/Field/Unbundled/Basic.lean
@[simp] lemma inv_nonneg : 0 ≤ a⁻¹ ↔ 0 ≤ a
-- Mathlib/Algebra/Homology/ShortComplex/Homology.lean
/-- The homology functor `ShortComplex C ⥤ C` for a category `C` with homology. -/
@[simps]
noncomputable def homologyFunctor [CategoryWithHomology C] :
    ShortComplex C ⥤ C
-- Mathlib/Analysis/Analytic/CPolynomial.lean
/-- The sum of a finite power series `p` admits `p` as a power series. -/
protected theorem FormalMultilinearSeries.hasFiniteFPowerSeriesOnBall_of_finite
    (p : FormalMultilinearSeries 𝕜 E F) {n : ℕ} (hn : ∀ m, n ≤ m → p m = 0) :
    HasFiniteFPowerSeriesOnBall p.sum p 0 n ⊤
-- Mathlib/Data/Stream/Init.lean
theorem mem_map {a : α} {s : Stream' α} : a ∈ s → f a ∈ map f s
-- Mathlib/MeasureTheory/Measure/Typeclasses.lean
/-- If two finite measures give the same mass to the whole space and coincide on a π-system made
of measurable sets, then they coincide on all sets in the σ-algebra generated by the π-system. -/
theorem ext_on_measurableSpace_of_generate_finite {α} (m₀ : MeasurableSpace α) {μ ν : Measure α}
    [IsFiniteMeasure μ] (C : Set (Set α)) (hμν : ∀ s ∈ C, μ s = ν s) {m : MeasurableSpace α}
    (h : m ≤ m₀) (hA : m = MeasurableSpace.generateFrom C) (hC : IsPiSystem C)
    (h_univ : μ Set.univ = ν Set.univ) {s : Set α} (hs : MeasurableSet[m] s) : μ s = ν s
-- Mathlib/Geometry/Manifold/Algebra/Monoid.lean
@[to_additive]
theorem ContMDiffAt.prod (h : ∀ i ∈ t, ContMDiffAt I' I n (f i) x₀) :
    ContMDiffAt I' I n (fun x ↦ ∏ i ∈ t, f i x) x₀
-- Mathlib/CategoryTheory/EssentiallySmall.lean
/-- The categorical equivalence between `C` and `ShrinkHoms C`, when `C` is locally small.
-/
@[simps!]
noncomputable def equivalence : C ≌ ShrinkHoms C
-- Mathlib/Analysis/Normed/Group/Basic.lean
@[to_additive]
theorem nnnorm_le_mul_nnnorm_add (a b : E) : ‖a‖₊ ≤ ‖a * b‖₊ + ‖b‖₊
-- Mathlib/Algebra/Algebra/Operations.lean
/-- `Submonoid.map` as a `MonoidWithZeroHom`, when applied to `AlgHom`s. -/
@[simps]
def mapHom {A'} [Semiring A'] [Algebra R A'] (f : A →ₐ[R] A') :
    Submodule R A →*₀ Submodule R A'
-- Mathlib/MeasureTheory/Measure/Typeclasses.lean
theorem exists_pos_ball [PseudoMetricSpace α] (x : α) (hμ : μ ≠ 0) :
    ∃ n : ℕ, 0 < μ (Metric.ball x n)
-- Mathlib/Algebra/Group/Equiv/Basic.lean
@[to_additive]
lemma comp_right_injective (e : M ≃* N) : Injective fun f : P →* M ↦ (e : M →* N).comp f
-- Mathlib/RingTheory/Localization/Module.lean
theorem LinearIndependent.localization {ι : Type*} {b : ι → M} (hli : LinearIndependent R b) :
    LinearIndependent Rₛ b
-- .lake/packages/batteries/Batteries/Data/AssocList.lean
@[simp] theorem isEmpty_eq (l : AssocList α β) : isEmpty l = l.toList.isEmpty
-- Mathlib/RingTheory/NonUnitalSubring/Basic.lean
theorem copy_eq (S : NonUnitalSubring R) (s : Set R) (hs : s = ↑S) : S.copy s hs = S
-- Mathlib/Topology/Algebra/Module/Basic.lean
protected theorem map_zero (f : M₁ →SL[σ₁₂] M₂) : f (0 : M₁) = 0
-- Mathlib/ModelTheory/Basic.lean
theorem comp_injective (h : N ↪[L] P) :
    Function.Injective (h.comp : (M ↪[L] N) →  (M ↪[L] P))
-- Mathlib/RingTheory/Polynomial/Basic.lean
/-- The span of every finite set of polynomials is contained in a `degreeLT n` for some `n`. -/
theorem span_of_finite_le_degreeLT {s : Set R[X]} (s_fin : s.Finite) :
    ∃ n : ℕ, Submodule.span R s ≤ degreeLT R n
-- Mathlib/Order/ConditionallyCompleteLattice/Basic.lean
@[simp]
theorem csSup_Iio [NoMinOrder α] [DenselyOrdered α] : sSup (Iio a) = a
-- Mathlib/CategoryTheory/Monoidal/End.lean
@[simp] theorem endofunctorMonoidalCategory_whiskerLeft_app
    {F H K : C ⥤ C} {β : H ⟶ K} (X : C) :
    (F ◁ β).app X = β.app (F.obj X)
-- Mathlib/Topology/PartialHomeomorph.lean
/-- Variant of `map_source`, stated for images of subsets of `source`. -/
lemma map_source'' : e '' e.source ⊆ e.target
-- Mathlib/Data/Rel.lean
theorem graph_comp {f : β → γ} {g : α → β} : graph (f ∘ g) = Rel.comp (graph g) (graph f)
-- Mathlib/Analysis/Complex/Basic.lean
@[simp]
lemma natCast_mem_slitPlane {n : ℕ} : ↑n ∈ slitPlane ↔ n ≠ 0
-- Mathlib/Analysis/SpecialFunctions/Trigonometric/Basic.lean
@[simp]
theorem cos_int_mul_two_pi (n : ℤ) : cos (n * (2 * π)) = 1
-- Mathlib/Algebra/Group/Subsemigroup/Membership.lean
@[to_additive]
theorem mem_sSup_of_mem {S : Set (Subsemigroup M)} {s : Subsemigroup M} (hs : s ∈ S) :
    ∀ {x : M}, x ∈ s → x ∈ sSup S
-- Mathlib/Algebra/Algebra/NonUnitalHom.lean
/-- Taking the product of two maps with the same domain is equivalent to taking the product of
their codomains. -/
@[simps]
def prodEquiv : (A →ₙₐ[R] B) × (A →ₙₐ[R] C) ≃ (A →ₙₐ[R] B × C)
-- Mathlib/LinearAlgebra/AffineSpace/Independent.lean
/-- A finite family is affinely independent if and only if any affine
combinations (with sum of weights 1) that evaluate to the same point are equal. -/
theorem affineIndependent_iff_eq_of_fintype_affineCombination_eq [Fintype ι] (p : ι → P) :
    AffineIndependent k p ↔ ∀ w1 w2 : ι → k, ∑ i, w1 i = 1 → ∑ i, w2 i = 1 →
    Finset.univ.affineCombination k p w1 = Finset.univ.affineCombination k p w2 → w1 = w2
-- Mathlib/Tactic/NormNum/LegendreSymbol.lean
theorem jacobiSymNat.one_left (b : ℕ) : jacobiSymNat 1 b = 1
-- Mathlib/Order/Lattice.lean
@[simp]
theorem fst_sup [Sup α] [Sup β] (p q : α × β) : (p ⊔ q).fst = p.fst ⊔ q.fst
-- Mathlib/RingTheory/NonUnitalSubsemiring/Basic.lean
@[simp]
theorem closure_subsemigroup_closure (s : Set R) : closure ↑(Subsemigroup.closure s) = closure s
-- Mathlib/CategoryTheory/Preadditive/Biproducts.lean
@[simp]
theorem Biprod.ofComponents_comp {X₁ X₂ Y₁ Y₂ Z₁ Z₂ : C} (f₁₁ : X₁ ⟶ Y₁) (f₁₂ : X₁ ⟶ Y₂)
    (f₂₁ : X₂ ⟶ Y₁) (f₂₂ : X₂ ⟶ Y₂) (g₁₁ : Y₁ ⟶ Z₁) (g₁₂ : Y₁ ⟶ Z₂) (g₂₁ : Y₂ ⟶ Z₁)
    (g₂₂ : Y₂ ⟶ Z₂) :
    Biprod.ofComponents f₁₁ f₁₂ f₂₁ f₂₂ ≫ Biprod.ofComponents g₁₁ g₁₂ g₂₁ g₂₂ =
      Biprod.ofComponents (f₁₁ ≫ g₁₁ + f₁₂ ≫ g₂₁) (f₁₁ ≫ g₁₂ + f₁₂ ≫ g₂₂) (f₂₁ ≫ g₁₁ + f₂₂ ≫ g₂₁)
        (f₂₁ ≫ g₁₂ + f₂₂ ≫ g₂₂)
-- Mathlib/Algebra/BigOperators/Group/Finset.lean
@[to_additive (attr := simp)]
theorem prod_inv_distrib : (∏ x ∈ s, (f x)⁻¹) = (∏ x ∈ s, f x)⁻¹
-- Mathlib/MeasureTheory/Function/ConditionalExpectation/Basic.lean
theorem condexp_smul (c : 𝕜) (f : α → F') : μ[c • f|m] =ᵐ[μ] c • μ[f|m]
-- Mathlib/Data/Finset/Piecewise.lean
lemma piecewise_piecewise_of_subset_right {s t : Finset ι} [∀ i, Decidable (i ∈ s)]
    [∀ i, Decidable (i ∈ t)] (h : t ⊆ s) (f g₁ g₂ : ∀ a, π a) :
    s.piecewise f (t.piecewise g₁ g₂) = s.piecewise f g₂
-- Mathlib/MeasureTheory/Measure/LogLikelihoodRatio.lean
lemma llr_def (μ ν : Measure α) : llr μ ν = fun x ↦ log (μ.rnDeriv ν x).toReal
-- Mathlib/SetTheory/Ordinal/Notation.lean
theorem fundamentalSequenceProp_inl_none (o) :
    FundamentalSequenceProp o (Sum.inl none) ↔ o = 0
-- Mathlib/Algebra/BigOperators/Group/Finset.lean
@[to_additive]
lemma _root_.Function.Bijective.prod_comp {e : ι → κ} (he : e.Bijective) (g : κ → α) :
    ∏ i, g (e i) = ∏ i, g i
-- Mathlib/Topology/Algebra/Module/Basic.lean
theorem range_prod_eq {f : M →L[R] M₂} {g : M →L[R] M₃} (h : ker f ⊔ ker g = ⊤) :
    range (f.prod g) = (range f).prod (range g)
-- Mathlib/Algebra/Homology/HomotopyCategory/HomComplexShift.lean
@[simp]
lemma shift_units_smul (a : ℤ) (x : Rˣ) :
    (x • γ).shift a = x • (γ.shift a)
-- .lake/packages/lean4/src/lean/Init/Data/List/Lemmas.lean
@[simp] theorem map_eq_nil {f : α → β} {l : List α} : map f l = [] ↔ l = []
-- Mathlib/Computability/TMToPartrec.lean
theorem tr_ret_respects (k v s) : ∃ b₂,
    TrCfg (stepRet k v) b₂ ∧
      Reaches₁ (TM2.step tr)
        ⟨some (Λ'.ret (trCont k)), s, K'.elim (trList v) [] [] (trContStack k)⟩ b₂
-- Mathlib/CategoryTheory/Limits/Shapes/Biproducts.lean
@[simp]
theorem biprod.fstKernelFork_ι : Fork.ι (biprod.fstKernelFork X Y) = (biprod.inr : Y ⟶ X ⊞ Y)
-- Mathlib/Combinatorics/Configuration.lean
/-- A nondegenerate configuration in which every pair of points has a line through them. -/
class HasLines extends Nondegenerate P L where
  mkLine : ∀ {p₁ p₂ : P}, p₁ ≠ p₂ → L
  mkLine_ax : ∀ {p₁ p₂ : P} (h : p₁ ≠ p₂), p₁ ∈ mkLine h ∧ p₂ ∈ mkLine h
-- Mathlib/Deprecated/Subgroup.lean
@[to_additive]
theorem IsSubgroup.iInter {ι : Sort*} {s : ι → Set G} (hs : ∀ y : ι, IsSubgroup (s y)) :
    IsSubgroup (Set.iInter s)
-- Mathlib/Algebra/Order/Monoid/Unbundled/Basic.lean
@[to_additive] theorem mul_eq_mul_iff_eq_and_eq [CovariantClass α α (· * ·) (· < ·)]
    [CovariantClass α α (swap (· * ·)) (· < ·)] {a b c d : α} (hac : a ≤ c) (hbd : b ≤ d) :
    a * b = c * d ↔ a = c ∧ b = d
-- Mathlib/Topology/Sheaves/Stalks.lean
@[reassoc (attr := simp), elementwise (attr := simp)]
theorem stalkSpecializes_comp {C : Type*} [Category C] [Limits.HasColimits C] {X : TopCat}
    (F : X.Presheaf C) {x y z : X} (h : x ⤳ y) (h' : y ⤳ z) :
    F.stalkSpecializes h' ≫ F.stalkSpecializes h = F.stalkSpecializes (h.trans h')
-- Mathlib/Data/Real/Hyperreal.lean
theorem epsilon_pos : 0 < ε
-- Mathlib/GroupTheory/Complement.lean
@[to_additive]
theorem mem_rightTransversals_iff_existsUnique_mul_inv_mem :
    S ∈ rightTransversals T ↔ ∀ g : G, ∃! s : S, g * (s : G)⁻¹ ∈ T
-- Mathlib/Algebra/GroupWithZero/Indicator.lean
@[simp] lemma support_mul (f g : ι → M₀) : support (fun x ↦ f x * g x) = support f ∩ support g
-- Mathlib/AlgebraicTopology/SimplicialSet.lean
@[ext]
lemma Truncated.hom_ext {n : ℕ} {X Y : Truncated n} {f g : X ⟶ Y} (w : ∀ n, f.app n = g.app n) :
    f = g
-- Mathlib/Algebra/Order/Ring/Unbundled/Nonneg.lean
@[simp]
theorem mk_eq_one {x : α} (hx : 0 ≤ x) :
    (⟨x, hx⟩ : { x : α // 0 ≤ x }) = 1 ↔ x = 1
-- Mathlib/Analysis/Normed/Algebra/Unitization.lean
/-- This is often the more useful lemma to rewrite the norm as opposed to
`Unitization.nnnorm_def`. -/
theorem nnnorm_eq_sup (x : Unitization 𝕜 A) :
    ‖x‖₊ = ‖x.fst‖₊ ⊔ ‖algebraMap 𝕜 (A →L[𝕜] A) x.fst + mul 𝕜 A x.snd‖₊