ruc-ai4math/mathlib_handler_benchmark_410 huggingface dataset:
-- Mathlib/RingTheory/Flat/Basic.lean
/--
M is flat if and only if `f ⊗ 𝟙 M` is injective whenever `f` is an injective linear map.
-/
lemma iff_rTensor_preserves_injective_linearMap [Small.{v} R] :
    Flat R M ↔
    ∀ ⦃N N' : Type v⦄ [AddCommGroup N] [AddCommGroup N'] [Module R N] [Module R N']
      (L : N →ₗ[R] N'), Function.Injective L → Function.Injective (L.rTensor M)
-- Mathlib/Algebra/Algebra/Subalgebra/MulOpposite.lean
theorem unop_sInf (S : Set (Subalgebra R Aᵐᵒᵖ)) : (sInf S).unop = sInf (.op ⁻¹' S)
-- Mathlib/RingTheory/MvPolynomial/WeightedHomogeneous.lean
/-- The weighted homogeneous submodules form a graded monoid. -/
lemma WeightedHomogeneousSubmodule.gradedMonoid {w : σ → M} :
    SetLike.GradedMonoid (weightedHomogeneousSubmodule R w)
-- Mathlib/Algebra/Group/Hom/Basic.lean
@[to_additive (attr := simp)] lemma mul_apply (f g : M →* N) (x : M) : (f * g) x = f x * g x
-- Mathlib/Data/Set/Pairwise/Basic.lean
lemma _root_.Pairwise.range_pairwise (hr : Pairwise (r on f)) : (Set.range f).Pairwise r
-- Mathlib/GroupTheory/GroupAction/Basic.lean
@[to_additive (attr := simp)]
lemma stabilizer_mul_eq_left [Group α] [IsScalarTower G α α] (a b : α)  :
    stabilizer G (a * b) = stabilizer G a
-- Mathlib/Analysis/InnerProductSpace/l2Space.lean
protected theorem hasSum_repr (b : HilbertBasis ι 𝕜 E) (x : E) :
    HasSum (fun i => b.repr x i • b i) x
-- Mathlib/Analysis/SpecialFunctions/Trigonometric/Deriv.lean
theorem HasStrictFDerivAt.csinh (hf : HasStrictFDerivAt f f' x) :
    HasStrictFDerivAt (fun x => Complex.sinh (f x)) (Complex.cosh (f x) • f') x
-- Mathlib/Topology/Semicontinuous.lean
theorem ContinuousAt.comp_lowerSemicontinuousWithinAt {g : γ → δ} {f : α → γ}
    (hg : ContinuousAt g (f x)) (hf : LowerSemicontinuousWithinAt f s x) (gmon : Monotone g) :
    LowerSemicontinuousWithinAt (g ∘ f) s x
-- Mathlib/Data/Set/Function.lean
@[simp]
theorem mapsTo_image_iff {f : α → β} {g : γ → α} {s : Set γ} {t : Set β} :
    MapsTo f (g '' s) t ↔ MapsTo (f ∘ g) s t
-- Mathlib/Analysis/SpecialFunctions/Exp.lean
theorem tendsto_comp_exp_atTop {f : ℝ → α} :
    Tendsto (fun x => f (exp x)) atTop l ↔ Tendsto f atTop l
-- Mathlib/Data/Multiset/Nodup.lean
theorem Nodup.inter_right [DecidableEq α] (s) : Nodup t → Nodup (s ∩ t)
-- Mathlib/Algebra/Lie/Basic.lean
@[simp]
theorem id_comp (f : L₁ →ₗ⁅R⁆ L₂) : (id : L₂ →ₗ⁅R⁆ L₂).comp f = f
-- Mathlib/Analysis/SpecialFunctions/Pow/NNReal.lean
@[deprecated rpow_inv_le_iff (since := "2024-07-10")]
theorem rpow_one_div_le_iff {x y : ℝ≥0} {z : ℝ} (hz : 0 < z) : x ^ (1 / z) ≤ y ↔ x ≤ y ^ z
-- Mathlib/Topology/EMetricSpace/Lipschitz.lean
/-- The product of a list of Lipschitz continuous endomorphisms is a Lipschitz continuous
endomorphism. -/
protected theorem list_prod (f : ι → Function.End α) (K : ι → ℝ≥0)
    (h : ∀ i, LipschitzWith (K i) (f i)) : ∀ l : List ι, LipschitzWith (l.map K).prod (l.map f).prod
-- Mathlib/Data/PNat/Prime.lean
theorem gcd_comm {m n : ℕ+} : m.gcd n = n.gcd m
-- Mathlib/Data/Nat/Defs.lean
lemma sqrt_add_eq (n : ℕ) (h : a ≤ n + n) : sqrt (n * n + a) = n
-- Mathlib/Order/CompactlyGenerated/Basic.lean
@[simp]
theorem sSup_compact_le_eq (b) :
    sSup { c : α | CompleteLattice.IsCompactElement c ∧ c ≤ b } = b
-- Mathlib/Data/Set/Pointwise/Interval.lean
/-- The (pre)image under `inv` of `Ioo 0 a` is `Ioi a⁻¹`. -/
theorem inv_Ioo_0_left {a : α} (ha : 0 < a) : (Ioo 0 a)⁻¹ = Ioi a⁻¹
-- Mathlib/Topology/UnitInterval.lean
@[simp]
theorem projIcc_eq_zero {x : ℝ} : projIcc (0 : ℝ) 1 zero_le_one x = 0 ↔ x ≤ 0
-- Mathlib/LinearAlgebra/AffineSpace/AffineSubspace.lean
@[simp]
theorem coeSubtype (s : AffineSubspace k P) [Nonempty s] : (s.subtype : s → P) = ((↑) : s → P)
-- Mathlib/Data/Finset/NAry.lean
@[simp (default + 1)] -- otherwise `simp` doesn't use `forall_image₂_iff`
lemma le_inf_image₂ {g : γ → δ} {a : δ} :
    a ≤ inf (image₂ f s t) g ↔ ∀ x ∈ s, ∀ y ∈ t, a ≤ g (f x y)
-- Mathlib/Computability/TuringMachine.lean
theorem ListBlank.nth_modifyNth {Γ} [Inhabited Γ] (f : Γ → Γ) (n i) (L : ListBlank Γ) :
    (L.modifyNth f n).nth i = if i = n then f (L.nth i) else L.nth i
-- Mathlib/Data/Fintype/Basic.lean
@[simp]
theorem count_univ [DecidableEq α] (a : α) : count a Finset.univ.val = 1
-- Mathlib/Order/Heyting/Basic.lean
theorem compl_sup_le_himp : aᶜ ⊔ b ≤ a ⇨ b
-- Mathlib/Probability/Independence/Basic.lean
theorem iIndepSets_singleton_iff {s : ι → Set Ω} :
    iIndepSets (fun i ↦ {s i}) μ ↔ ∀ t, μ (⋂ i ∈ t, s i) = ∏ i ∈ t, μ (s i)
-- Mathlib/Topology/MetricSpace/Basic.lean
@[simp] theorem nndist_toMul (a b : Additive X) : nndist (toMul a) (toMul b) = nndist a b
-- Mathlib/Analysis/Calculus/Deriv/Basic.lean
theorem HasDerivAt.hasDerivWithinAt (h : HasDerivAt f f' x) : HasDerivWithinAt f f' s x
-- Mathlib/Data/Option/Basic.lean
theorem map_pmap (g : β → γ) (f : ∀ a, p a → β) (x H) :
    Option.map g (pmap f x H) = pmap (fun a h ↦ g (f a h)) x H
-- Mathlib/MeasureTheory/Constructions/Pi.lean
theorem measurePreserving_pi_empty {ι : Type u} {α : ι → Type v} [Fintype ι] [IsEmpty ι]
    {m : ∀ i, MeasurableSpace (α i)} (μ : ∀ i, Measure (α i)) :
    MeasurePreserving (MeasurableEquiv.ofUniqueOfUnique (∀ i, α i) Unit) (Measure.pi μ)
      (Measure.dirac ())
-- Mathlib/Order/Ideal.lean
@[simp]
theorem coe_inf : (↑(s ⊓ t) : Set P) = ↑s ∩ ↑t
-- Mathlib/Order/Filter/Basic.lean
theorem eq_biInf_of_mem_iff_exists_mem {f : ι → Filter α} {p : ι → Prop} {l : Filter α}
    (h : ∀ {s}, s ∈ l ↔ ∃ i, p i ∧ s ∈ f i) : l = ⨅ (i) (_ : p i), f i
-- Mathlib/LinearAlgebra/Matrix/NonsingularInverse.lean
theorem conjTranspose_nonsing_inv [StarRing α] : A⁻¹ᴴ = Aᴴ⁻¹
-- Mathlib/Control/Fold.lean
@[simps]
def foldrM.ofFreeMonoid [LawfulMonad m] (f : α → β → m β) : FreeMonoid α →* Monoid.foldrM m β
-- Mathlib/Combinatorics/SimpleGraph/Regularity/Bound.lean
theorem m_pos [Nonempty α] (hPα : P.parts.card * 16 ^ P.parts.card ≤ card α) : 0 < m
-- Mathlib/CategoryTheory/Comma/Presheaf.lean
lemma unitForward_unitBackward {F : Cᵒᵖ ⥤ Type v} (η : F ⟶ A) (X : C) :
    unitForward η X ∘ unitBackward η X = id
-- Mathlib/RingTheory/UniqueFactorizationDomain.lean
theorem of_wfDvdMonoid_associates (_ : WfDvdMonoid (Associates α)) : WfDvdMonoid α
-- Mathlib/Order/WellFoundedSet.lean
@[simp] theorem isWF_union : IsWF (s ∪ t) ↔ IsWF s ∧ IsWF t
-- Mathlib/Data/Multiset/Lattice.lean
theorem sup_mono {s₁ s₂ : Multiset α} (h : s₁ ⊆ s₂) : s₁.sup ≤ s₂.sup
-- Mathlib/Geometry/Manifold/Algebra/LeftInvariantDerivation.lean
theorem coe_injective :
    @Function.Injective (LeftInvariantDerivation I G) (_ → C^∞⟮I, G; 𝕜⟯) DFunLike.coe
-- Mathlib/Topology/MetricSpace/PiNat.lean
theorem apply_eq_of_lt_firstDiff {x y : ∀ n, E n} {n : ℕ} (hn : n < firstDiff x y) : x n = y n
-- Mathlib/Data/Set/Basic.lean
@[simp]
theorem mem_ite_empty_right (p : Prop) [Decidable p] (t : Set α) (x : α) :
    x ∈ ite p t ∅ ↔ p ∧ x ∈ t
-- Mathlib/Combinatorics/SetFamily/Compression/Down.lean
theorem erase_mem_compression (hs : s ∈ 𝒜) : s.erase a ∈ 𝓓 a 𝒜
-- Mathlib/RingTheory/RootsOfUnity/Basic.lean
theorem inv (h : IsPrimitiveRoot ζ k) : IsPrimitiveRoot ζ⁻¹ k
-- Mathlib/NumberTheory/Zsqrtd/GaussianInt.lean
theorem toComplex_div_re (x y : ℤ[i]) : ((x / y : ℤ[i]) : ℂ).re = round (x / y : ℂ).re
-- Mathlib/Data/Set/Countable.lean
@[simp]
theorem countable_union {s t : Set α} : (s ∪ t).Countable ↔ s.Countable ∧ t.Countable
-- Mathlib/RingTheory/UniqueFactorizationDomain.lean
@[simp]
theorem prod_top : (⊤ : FactorSet α).prod = 0
-- Mathlib/Data/Set/Subset.lean
@[simp]
lemma image_val_inter_self_left_eq_coe : ↑D ∩ A = ↑D
-- Mathlib/Data/Ordmap/Ordset.lean
theorem insert'_eq_insertWith [@DecidableRel α (· ≤ ·)] (x : α) :
    ∀ t, insert' x t = insertWith id x t
-- Mathlib/Analysis/LocallyConvex/BalancedCoreHull.lean
/-- The balanced core of `t` is maximal in the sense that it contains any balanced subset
`s` of `t`. -/
theorem Balanced.subset_balancedCore_of_subset (hs : Balanced 𝕜 s) (h : s ⊆ t) :
    s ⊆ balancedCore 𝕜 t
-- Mathlib/LinearAlgebra/AffineSpace/FiniteDimensional.lean
/-- A set of points in a two-dimensional space is coplanar. -/
theorem coplanar_of_fact_finrank_eq_two (s : Set P) [h : Fact (finrank k V = 2)] : Coplanar k s
-- Mathlib/Algebra/Group/Subgroup/Basic.lean
@[to_additive (attr := simp)]
theorem ker_toHomUnits {M} [Monoid M] (f : G →* M) : f.toHomUnits.ker = f.ker
-- Mathlib/Algebra/Lie/Basic.lean
lemma map_lie (e : L₁ ≃ₗ⁅R⁆ L₂) (x y : L₁) : e ⁅x, y⁆ = ⁅e x, e y⁆
-- Mathlib/GroupTheory/OrderOfElement.lean
@[to_additive]
lemma IsOfFinOrder.powers_eq_zpowers (hx : IsOfFinOrder x) : (powers x : Set G) = zpowers x
-- Mathlib/MeasureTheory/Integral/Average.lean
theorem integral_average_sub [IsFiniteMeasure μ] (hf : Integrable f μ) :
    ∫ x, ⨍ a, f a ∂μ - f x ∂μ = 0
-- Mathlib/LinearAlgebra/AffineSpace/AffineEquiv.lean
@[simp]
theorem constVAdd_symm (v : V₁) : (constVAdd k P₁ v).symm = constVAdd k P₁ (-v)
-- Mathlib/Logic/Relation.lean
theorem flip_comp : flip (r ∘r p) = flip p ∘r flip r
-- Mathlib/LinearAlgebra/Prod.lean
@[simp]
theorem map_inl : p.map (inl R M M₂) = prod p ⊥
-- Mathlib/Analysis/InnerProductSpace/Orthogonal.lean
/-- The orthogonal complement of any submodule `K` is closed. -/
theorem isClosed_orthogonal : IsClosed (Kᗮ : Set E)
-- Mathlib/Data/Real/EReal.lean
lemma coe_mul_top_of_pos {x : ℝ} (h : 0 < x) : (x : EReal) * ⊤ = ⊤
-- Mathlib/RingTheory/PrimeSpectrum.lean
@[simp]
theorem primeSpectrumProd_symm_inl_asIdeal (x : PrimeSpectrum R) :
    ((primeSpectrumProd R S).symm <| Sum.inl x).asIdeal = Ideal.prod x.asIdeal ⊤
-- Mathlib/Topology/Algebra/Algebra.lean
@[simp, norm_cast]
theorem prod_apply (f₁ : A →A[R] B) (f₂ : A →A[R] C) (x : A) :
    f₁.prod f₂ x = (f₁ x, f₂ x)
-- Mathlib/Data/Nat/GCD/Basic.lean
@[simp]
theorem coprime_add_mul_left_right (m n k : ℕ) : Coprime m (n + m * k) ↔ Coprime m n
-- Mathlib/RingTheory/Ideal/Norm.lean
theorem absNorm_dvd_absNorm_of_le {I J : Ideal S} (h : J ≤ I) : Ideal.absNorm I ∣ Ideal.absNorm J
-- .lake/packages/lean4/src/lean/Init/Data/List/Lemmas.lean
theorem append_right_inj {t₁ t₂ : List α} (s) : s ++ t₁ = s ++ t₂ ↔ t₁ = t₂
-- Mathlib/RingTheory/Congruence/Basic.lean
@[simp, norm_cast]
theorem coe_smul (a : α) (x : R) : (↑(a • x) : c.Quotient) = a • (x : c.Quotient)
-- Mathlib/Order/Filter/Ultrafilter.lean
theorem compl_mem_iff_not_mem : sᶜ ∈ f ↔ s ∉ f
-- Mathlib/ModelTheory/LanguageMap.lean
theorem mk₂_funext {c f₁ f₂ : Type u} {r₁ r₂ : Type v} {F G : Language.mk₂ c f₁ f₂ r₁ r₂ →ᴸ L'}
    (h0 : ∀ c : (Language.mk₂ c f₁ f₂ r₁ r₂).Constants, F.onFunction c = G.onFunction c)
    (h1 : ∀ f : (Language.mk₂ c f₁ f₂ r₁ r₂).Functions 1, F.onFunction f = G.onFunction f)
    (h2 : ∀ f : (Language.mk₂ c f₁ f₂ r₁ r₂).Functions 2, F.onFunction f = G.onFunction f)
    (h1' : ∀ r : (Language.mk₂ c f₁ f₂ r₁ r₂).Relations 1, F.onRelation r = G.onRelation r)
    (h2' : ∀ r : (Language.mk₂ c f₁ f₂ r₁ r₂).Relations 2, F.onRelation r = G.onRelation r) :
    F = G
-- Mathlib/LinearAlgebra/Alternating/DomCoprod.lean
theorem domCoprod_coe (a : Mᵢ [⋀^ιa]→ₗ[R'] N₁) (b : Mᵢ [⋀^ιb]→ₗ[R'] N₂) :
    (↑(a.domCoprod b) : MultilinearMap R' (fun _ => Mᵢ) _) =
      ∑ σ : Perm.ModSumCongr ιa ιb, domCoprod.summand a b σ
-- Mathlib/Algebra/Homology/Augment.lean
@[simp]
theorem augmentTruncate_hom_f_succ (C : CochainComplex V ℕ) (i : ℕ) :
    (augmentTruncate C).hom.f (i + 1) = 𝟙 (C.X (i + 1))
-- Mathlib/MeasureTheory/Measure/Restrict.lean
theorem piecewise_ae_eq_restrict [DecidablePred (· ∈ s)] (hs : MeasurableSet s) :
    piecewise s f g =ᵐ[μ.restrict s] f
-- Mathlib/NumberTheory/FunctionField.lean
theorem InftyValuation.map_mul' (x y : RatFunc Fq) :
    inftyValuationDef Fq (x * y) = inftyValuationDef Fq x * inftyValuationDef Fq y
-- Mathlib/CategoryTheory/Sites/Canonical.lean
/-- `yoneda.obj X` is a sheaf for the canonical topology. -/
theorem isSheaf_yoneda_obj (X : C) : Presieve.IsSheaf (canonicalTopology C) (yoneda.obj X)
-- Mathlib/Algebra/Module/Equiv/Basic.lean
theorem _root_.Module.End_isUnit_iff [Module R M] (f : Module.End R M) :
    IsUnit f ↔ Function.Bijective f
-- Mathlib/Data/Vector/Defs.lean
/-- Appending of vectors corresponds under `toList` to appending of lists. -/
@[simp]
theorem toList_append {n m : ℕ} (v : Vector α n) (w : Vector α m) :
    toList (append v w) = toList v ++ toList w
-- Mathlib/Data/Set/Card.lean
theorem sep_of_ncard_eq {a : α} {P : α → Prop} (h : { x ∈ s | P x }.ncard = s.ncard) (ha : a ∈ s)
    (hs : s.Finite := by toFinite_tac) : P a
-- Mathlib/NumberTheory/NumberField/Basic.lean
theorem RingOfIntegers.rank : FiniteDimensional.finrank ℤ (𝓞 K) = FiniteDimensional.finrank ℚ K
-- Mathlib/Algebra/Group/Subgroup/Order.lean
@[simp] theorem abs_mem_iff {S G} [AddGroup G] [LinearOrder G] {_ : SetLike S G}
    [NegMemClass S G] {H : S} {x : G} : |x| ∈ H ↔ x ∈ H
-- Mathlib/Data/Finset/Basic.lean
@[simp] lemma erase_nonempty (ha : a ∈ s) : (s.erase a).Nonempty ↔ s.Nontrivial
-- Mathlib/MeasureTheory/Measure/Haar/OfBasis.lean
@[simp]
theorem Basis.parallelepiped_reindex (b : Basis ι ℝ E) (e : ι ≃ ι') :
    (b.reindex e).parallelepiped = b.parallelepiped
-- Mathlib/Computability/TuringMachine.lean
theorem reaches₀_eq {σ} {f : σ → Option σ} {a b} (e : f a = f b) : Reaches₀ f a b
-- Mathlib/Order/Interval/Set/Basic.lean
@[simp]
theorem Ici_bot : Ici (⊥ : α) = univ
-- Mathlib/Logic/Equiv/Basic.lean
@[simp]
theorem sumProdDistrib_apply_right (b : β) (c : γ) :
    sumProdDistrib α β γ (Sum.inr b, c) = Sum.inr (b, c)
-- .lake/packages/lean4/src/lean/Init/Data/Fin/Lemmas.lean
@[simp] theorem last_add_one : ∀ n, last n + 1 = 0
-- Mathlib/MeasureTheory/Measure/MutuallySingular.lean
theorem mono_ac (h : μ₁ ⟂ₘ ν₁) (hμ : μ₂ ≪ μ₁) (hν : ν₂ ≪ ν₁) : μ₂ ⟂ₘ ν₂
-- Mathlib/Analysis/Calculus/MeanValue.lean
/-- Cauchy's Mean Value Theorem, extended `deriv` version. -/
theorem exists_ratio_deriv_eq_ratio_slope' {lfa lga lfb lgb : ℝ}
    (hdf : DifferentiableOn ℝ f <| Ioo a b) (hdg : DifferentiableOn ℝ g <| Ioo a b)
    (hfa : Tendsto f (𝓝[>] a) (𝓝 lfa)) (hga : Tendsto g (𝓝[>] a) (𝓝 lga))
    (hfb : Tendsto f (𝓝[<] b) (𝓝 lfb)) (hgb : Tendsto g (𝓝[<] b) (𝓝 lgb)) :
    ∃ c ∈ Ioo a b, (lgb - lga) * deriv f c = (lfb - lfa) * deriv g c
-- Mathlib/Algebra/Polynomial/BigOperators.lean
theorem natDegree_multiset_prod_le : t.prod.natDegree ≤ (t.map natDegree).sum
-- Mathlib/InformationTheory/Hamming.lean
/-- Corresponds to `dist_eq_zero`. -/
@[simp]
theorem hammingDist_eq_zero {x y : ∀ i, β i} : hammingDist x y = 0 ↔ x = y
-- Mathlib/Topology/EMetricSpace/Lipschitz.lean
theorem edist_le_mul (h : LipschitzWith K f) (x y : α) : edist (f x) (f y) ≤ K * edist x y
-- Mathlib/Analysis/Normed/Group/Basic.lean
theorem norm_of_nonpos (hr : r ≤ 0) : ‖r‖ = -r
-- Mathlib/Analysis/Asymptotics/Asymptotics.lean
@[simp]
theorem isBigOWith_principal {s : Set α} : IsBigOWith c (𝓟 s) f g ↔ ∀ x ∈ s, ‖f x‖ ≤ c * ‖g x‖
-- Mathlib/Data/PFunctor/Multivariate/Basic.lean
theorem liftP_iff {α : TypeVec n} (p : ∀ ⦃i⦄, α i → Prop) (x : P α) :
    LiftP p x ↔ ∃ a f, x = ⟨a, f⟩ ∧ ∀ i j, p (f i j)
-- Mathlib/Algebra/Module/Projective.lean
/-- A quotient of a projective module is projective iff it is a direct summand. -/
theorem Projective.iff_split_of_projective [Module.Projective R M] (s : M →ₗ[R] P)
    (hs : Function.Surjective s) :
    Module.Projective R P ↔ ∃ i, s ∘ₗ i = LinearMap.id
-- Mathlib/CategoryTheory/Localization/LocalizerMorphism.lean
/-- The identity functor as a morphism of localizers. -/
@[simps]
def id : LocalizerMorphism W₁ W₁
-- Mathlib/Data/NNReal/Basic.lean
theorem coe_image {s : Set ℝ≥0} :
    (↑) '' s = { x : ℝ | ∃ h : 0 ≤ x, @Membership.mem ℝ≥0 _ _ ⟨x, h⟩ s }
-- Mathlib/GroupTheory/SemidirectProduct.lean
@[simp]
theorem inv_right (a : N ⋊[φ] G) : a⁻¹.right = a.right⁻¹
-- .lake/packages/batteries/Batteries/Data/UInt.lean
theorem USize.toNat_zero : (0 : USize).toNat = 0
-- Mathlib/Analysis/Analytic/Linear.lean
@[simp]
theorem fpowerSeries_radius (f : E →L[𝕜] F) (x : E) : (f.fpowerSeries x).radius = ∞
-- Mathlib/RingTheory/IntegralClosure/IsIntegralClosure/Basic.lean
/-- finite = integral + finite type -/
theorem RingHom.finite_iff_isIntegral_and_finiteType : f.Finite ↔ f.IsIntegral ∧ f.FiniteType
-- Mathlib/Algebra/Order/Floor.lean
theorem natCast_floor_eq_intCast_floor (ha : 0 ≤ a) : (⌊a⌋₊ : α) = ⌊a⌋
-- Mathlib/LinearAlgebra/Span.lean
/-- If two linear maps are equal on a set `s`, then they are equal on `Submodule.span s`.

See also `LinearMap.eqOn_span'` for a version using `Set.EqOn`. -/
theorem eqOn_span {s : Set M} {f g : F} (H : Set.EqOn f g s) ⦃x⦄ (h : x ∈ span R s) :
    f x = g x
-- Mathlib/Data/Matrix/Basic.lean
/-- Right multiplication by a matrix, as an `AddMonoidHom` from matrices to matrices. -/
@[simps]
def addMonoidHomMulRight [Fintype m] (M : Matrix m n α) : Matrix l m α →+ Matrix l n α
-- Mathlib/Algebra/Group/Defs.lean
@[to_additive]
theorem inv_eq_of_mul_eq_one_left (h : a * b = 1) : b⁻¹ = a
-- Mathlib/Topology/DiscreteQuotient.lean
lemma toSetoid_injective : Function.Injective (@toSetoid X _)
-- Mathlib/Algebra/MvPolynomial/Basic.lean
@[simp]
theorem aevalTower_ofId :
    aevalTower (Algebra.ofId S A) = (aeval : (σ → A) → MvPolynomial σ S →ₐ[S] A)
-- Mathlib/Analysis/Normed/Order/Lattice.lean
lemma isClosed_nonneg : IsClosed {x : α | 0 ≤ x}
-- Mathlib/LinearAlgebra/Eigenspace/Matrix.lean
/-- Eigenvalues of a diagonal linear operator with respect to standard basis
    are the diagonal entries. -/
lemma hasEigenvalue_toLin'_diagonal_iff [NoZeroDivisors R] (d : n → R) {μ : R} :
    HasEigenvalue (toLin' (diagonal d)) μ ↔ (∃ i, d i = μ)
-- Mathlib/CategoryTheory/Products/Basic.lean
/-- `sectr Z D` is the functor `D ⥤ C × D` given by `Y ↦ (Z, Y)` . -/
@[simps]
def sectr {C : Type u₁} [Category.{v₁} C] (Z : C) (D : Type u₂) [Category.{v₂} D] : D ⥤ C × D
-- Mathlib/Algebra/Polynomial/Basic.lean
@[simp]
lemma coeff_C_succ {r : R} {n : ℕ} : coeff (C r) (n + 1) = 0
-- Mathlib/LinearAlgebra/Matrix/Hermitian.lean
/-- A diagonal matrix is hermitian if each diagonal entry is self-adjoint -/
lemma isHermitian_diagonal_iff [DecidableEq n] {d : n → α} :
    IsHermitian (diagonal d) ↔ (∀ i : n, IsSelfAdjoint (d i))
-- Mathlib/Algebra/Module/Opposites.lean
@[simp]
theorem coe_opLinearEquiv_symm_addEquiv :
    ((opLinearEquiv R : M ≃ₗ[R] Mᵐᵒᵖ).symm : Mᵐᵒᵖ ≃+ M) = opAddEquiv.symm
-- Mathlib/Order/Partition/Equipartition.lean
/-- An equipartition of a finset with `n` elements into `k` parts has
`n - n % k` parts of size `n / k`. -/
theorem IsEquipartition.card_small_parts_eq_mod (hP : P.IsEquipartition) :
    (P.parts.filter fun p ↦ p.card = s.card / P.parts.card).card =
    P.parts.card - s.card % P.parts.card
-- Mathlib/Order/Filter/AtTopBot.lean
/-- If `u` is a monotone function with linear ordered codomain and the range of `u` is not bounded
above, then `Tendsto u atTop atTop`. -/
theorem tendsto_atTop_atTop_of_monotone' [Preorder ι] [LinearOrder α] {u : ι → α} (h : Monotone u)
    (H : ¬BddAbove (range u)) : Tendsto u atTop atTop
-- Mathlib/Topology/Algebra/Monoid.lean
@[to_additive]
theorem Filter.Tendsto.mul {f g : α → M} {x : Filter α} {a b : M} (hf : Tendsto f x (𝓝 a))
    (hg : Tendsto g x (𝓝 b)) : Tendsto (fun x => f x * g x) x (𝓝 (a * b))
-- Mathlib/LinearAlgebra/Eigenspace/Basic.lean
theorem hasEigenvalue_of_hasEigenvector {f : End R M} {μ : R} {x : M} (h : HasEigenvector f μ x) :
    HasEigenvalue f μ
-- Mathlib/Algebra/Group/Semiconj/Defs.lean
/-- One semiconjugates any element to itself. -/
@[to_additive (attr := simp) "Zero semiconjugates any element to itself."]
theorem one_left (x : M) : SemiconjBy 1 x x
-- .lake/packages/lean4/src/lean/Init/Data/BitVec/Lemmas.lean
theorem ofNat_one (n : Nat) : BitVec.ofNat 1 n = BitVec.ofBool (n % 2 = 1)
-- Mathlib/Data/Finset/Union.lean
lemma erase_biUnion (f : α → Finset β) (s : Finset α) (b : β) :
    (s.biUnion f).erase b = s.biUnion fun x ↦ (f x).erase b
-- Mathlib/RingTheory/Valuation/Integral.lean
theorem mem_of_integral {x : R} (hx : IsIntegral O x) : x ∈ v.integer
-- Mathlib/Analysis/SpecialFunctions/Log/NegMulLog.lean
lemma negMulLog_def : negMulLog = fun x ↦ - x * log x
-- Mathlib/Data/List/Cycle.lean
@[simp]
theorem lists_coe (l : List α) : lists (l : Cycle α) = ↑l.cyclicPermutations
-- Mathlib/ModelTheory/ElementaryMaps.lean
@[simp]
theorem injective (φ : M ↪ₑ[L] N) : Function.Injective φ
-- Mathlib/Data/Finsupp/AList.lean
@[simp]
theorem singleton_lookupFinsupp (a : α) (m : M) :
    (singleton a m).lookupFinsupp = Finsupp.single a m
-- Mathlib/Topology/Sheaves/Skyscraper.lean
/-- The unit in `Presheaf.stalkFunctor ⊣ skyscraperPresheafFunctor`
-/
@[simps]
protected def unit :
    𝟭 (Presheaf C X) ⟶ Presheaf.stalkFunctor C p₀ ⋙ skyscraperPresheafFunctor p₀
-- .lake/packages/lean4/src/lean/Init/Data/Nat/Lemmas.lean
protected theorem mul_right_cancel_iff {m : Nat} (p : 0 < m) (n k : Nat) : n * m = k * m ↔ n = k
-- Mathlib/Order/Bounds/Basic.lean
theorem union_upperBounds_subset_upperBounds_inter :
    upperBounds s ∪ upperBounds t ⊆ upperBounds (s ∩ t)
-- Mathlib/Algebra/Module/Equiv/Basic.lean
@[simp]
lemma coe_one : ↑(1 : M ≃ₗ[R] M) = id
-- .lake/packages/lean4/src/lean/Init/Data/List/Lemmas.lean
@[simp] theorem tail?_map (f : α → β) (l : List α) : tail? (map f l) = (tail? l).map (map f)
-- Mathlib/GroupTheory/PushoutI.lean
/--
A `Pair d i` is a word in the coproduct, `Coprod G`, the `tail`, and an element of the group `G i`,
the `head`. The first letter of the `tail` must not be an element of `G i`.
Note that the `head` may be `1` Every letter in the `tail` must be in the transversal given by `d`.
Similar to `Monoid.CoprodI.Pair` except every letter must be in the transversal
(not including the head letter). -/
structure Pair (d : Transversal φ) (i : ι) extends CoprodI.Word.Pair G i where
  /-- All letters in the word are in the transversal. -/
  normalized : ∀ i g, ⟨i, g⟩ ∈ tail.toList → g ∈ d.set i
-- Mathlib/Probability/Kernel/IntegralCompProd.lean
theorem Kernel.lintegral_fn_integral_sub ⦃f g : β × γ → E⦄ (F : E → ℝ≥0∞)
    (hf : Integrable f ((κ ⊗ₖ η) a)) (hg : Integrable g ((κ ⊗ₖ η) a)) :
    ∫⁻ x, F (∫ y, f (x, y) - g (x, y) ∂η (a, x)) ∂κ a =
      ∫⁻ x, F (∫ y, f (x, y) ∂η (a, x) - ∫ y, g (x, y) ∂η (a, x)) ∂κ a
-- Mathlib/Algebra/GroupPower/IterateHom.lean
@[to_additive]
theorem mul_right_iterate_apply_one : (· * a)^[n] 1 = a ^ n
-- Mathlib/Algebra/BigOperators/Group/Finset.lean
@[to_additive]
lemma prod_ite_of_false {p : α → Prop} {_ : DecidablePred p} (h : ∀ x ∈ s, ¬p x) (f g : α → β) :
    ∏ x ∈ s, (if p x then f x else g x) = ∏ x ∈ s, g x
-- Mathlib/RepresentationTheory/Character.lean
/-- The character is multiplicative under the tensor product. -/
theorem char_tensor (V W : FDRep k G) : (V ⊗ W).character = V.character * W.character
-- Mathlib/Combinatorics/SimpleGraph/Subgraph.lean
@[simp]
theorem edgeSet_sSup (s : Set G.Subgraph) : (sSup s).edgeSet = ⋃ G' ∈ s, edgeSet G'
-- Mathlib/Analysis/InnerProductSpace/Positive.lean
theorem isPositive_one : IsPositive (1 : E →L[𝕜] E)
-- Mathlib/Geometry/RingedSpace/PresheafedSpace/HasColimits.lean
@[simp]
theorem colimit_presheaf (F : J ⥤ PresheafedSpace.{_, _, v} C) :
    (colimit F).presheaf = limit (pushforwardDiagramToColimit F).leftOp
-- Mathlib/Algebra/Module/LinearMap/Defs.lean
protected theorem map_smul (c : R) (x : M) : fₗ (c • x) = c • fₗ x
-- Mathlib/Data/List/AList.lean
theorem toAList_cons (a : α) (b : β a) (xs : List (Sigma β)) :
    List.toAList (⟨a, b⟩ :: xs) = insert a b xs.toAList
-- Mathlib/Data/Multiset/Bind.lean
@[simp]
theorem card_bind : card (s.bind f) = (s.map (card ∘ f)).sum
-- Mathlib/Order/Interval/Set/OrderIso.lean
@[simp]
theorem preimage_Ioc (e : α ≃o β) (a b : β) : e ⁻¹' Ioc a b = Ioc (e.symm a) (e.symm b)
-- Mathlib/Data/Multiset/Basic.lean
theorem rel_map_right {s : Multiset α} {t : Multiset γ} {f : γ → β} :
    Rel r s (t.map f) ↔ Rel (fun a b => r a (f b)) s t
-- Mathlib/Data/Finset/Sups.lean
@[simp] lemma image_compl : s.image compl = sᶜˢ
-- Mathlib/Topology/Instances/NNReal.lean
protected theorem _root_.HasSum.toNNReal {f : α → ℝ} {y : ℝ} (hf₀ : ∀ n, 0 ≤ f n)
    (hy : HasSum f y) : HasSum (fun x => Real.toNNReal (f x)) y.toNNReal
-- Mathlib/Logic/Equiv/List.lean
@[simp]
theorem sortedUniv_nodup (α) [Fintype α] [Encodable α] : (sortedUniv α).Nodup
-- Mathlib/Data/Matrix/Notation.lean
@[simp]
theorem vec2_dotProduct (v w : Fin 2 → α) : v ⬝ᵥ w = v 0 * w 0 + v 1 * w 1
-- Mathlib/Order/Hom/Lattice.lean
@[simp] theorem id_comp (f : BoundedLatticeHom α β) : (BoundedLatticeHom.id β).comp f = f