ruc-ai4math/mathlib_handler_benchmark_410 huggingface dataset:
-- Mathlib/MeasureTheory/Group/Action.lean
@[to_additive (attr := simp)]
theorem eventuallyConst_smul_set_ae (c : G) {s : Set α} :
    EventuallyConst (c • s : Set α) (ae μ) ↔ EventuallyConst s (ae μ)
-- Mathlib/Algebra/Algebra/Operations.lean
theorem one_le : (1 : Submodule R A) ≤ P ↔ (1 : A) ∈ P
-- Mathlib/Order/Interval/Set/Basic.lean
theorem Iic_union_Icc' (h₁ : c ≤ b) : Iic b ∪ Icc c d = Iic (max b d)
-- Mathlib/LinearAlgebra/AffineSpace/Pointwise.lean
theorem pointwise_vadd_eq_map (v : V) (s : AffineSubspace k P) :
    v +ᵥ s = s.map (AffineEquiv.constVAdd k P v)
-- Mathlib/Analysis/Normed/Group/InfiniteSum.lean
theorem cauchySeq_finset_of_norm_bounded {f : ι → E} (g : ι → ℝ) (hg : Summable g)
    (h : ∀ i, ‖f i‖ ≤ g i) : CauchySeq fun s : Finset ι => ∑ i ∈ s, f i
-- Mathlib/Topology/Basic.lean
@[simp]
theorem eventually_eventuallyLE_nhds [LE α] {f g : X → α} :
    (∀ᶠ y in 𝓝 x, f ≤ᶠ[𝓝 y] g) ↔ f ≤ᶠ[𝓝 x] g
-- Mathlib/Data/DFinsupp/Basic.lean
@[simp]
theorem equivFunOnFintype_single [Fintype ι] (i : ι) (m : β i) :
    (@DFinsupp.equivFunOnFintype ι β _ _) (DFinsupp.single i m) = Pi.single i m
-- Mathlib/Topology/Constructions.lean
theorem Sigma.nhds_mk (i : ι) (x : σ i) : 𝓝 (⟨i, x⟩ : Sigma σ) = Filter.map (Sigma.mk i) (𝓝 x)
-- Mathlib/Data/ULift.lean
theorem up_injective : Injective (@up α)
-- Mathlib/Analysis/SpecialFunctions/Trigonometric/Basic.lean
lemma abs_sin_half (x : ℝ) : |sin (x / 2)| = sqrt ((1 - cos x) / 2)
-- Mathlib/CategoryTheory/Subobject/FactorThru.lean
@[simp]
theorem factorThru_add_sub_factorThru_right {X Y : C} {P : Subobject Y} (f g : X ⟶ Y)
    (w : P.Factors (f + g)) (wg : P.Factors g) :
    P.factorThru (f + g) w - P.factorThru g wg =
      P.factorThru f (factors_left_of_factors_add f g w wg)
-- Mathlib/Init/Order/LinearOrder.lean
theorem le_max_left (a b : α) : a ≤ max a b
-- Mathlib/MeasureTheory/Function/LpSpace.lean
theorem coeFn_toLp [NormedField 𝕜] [NormedSpace 𝕜 E] (f : α →ᵇ E) :
    toLp (E := E) p μ 𝕜 f =ᵐ[μ] f
-- Mathlib/Data/Matroid/Basic.lean
theorem Indep.inter_left (hI : M.Indep I) (X : Set α) : M.Indep (X ∩ I)
-- Mathlib/Logic/Basic.lean
theorem of_not_not {a : Prop} : ¬¬a → a
-- Mathlib/GroupTheory/SpecificGroups/Alternating.lean
@[simp]
theorem mem_alternatingGroup {f : Perm α} : f ∈ alternatingGroup α ↔ sign f = 1
-- Mathlib/Algebra/Quaternion.lean
theorem rank_eq_four [StrongRankCondition R] : Module.rank R ℍ[R,c₁,c₂] = 4
-- Mathlib/MeasureTheory/MeasurableSpace/Defs.lean
theorem le_def {α} {a b : MeasurableSpace α} : a ≤ b ↔ a.MeasurableSet' ≤ b.MeasurableSet'
-- .lake/packages/lean4/src/lean/Init/Data/Nat/Div.lean
@[simp] theorem add_div_right (x : Nat) {z : Nat} (H : 0 < z) : (x + z) / z = (x / z) + 1
-- Mathlib/MeasureTheory/Integral/Bochner.lean
theorem eLpNorm_one_le_of_le {r : ℝ≥0} (hfint : Integrable f μ) (hfint' : 0 ≤ ∫ x, f x ∂μ)
    (hf : ∀ᵐ ω ∂μ, f ω ≤ r) : eLpNorm f 1 μ ≤ 2 * μ Set.univ * r
-- Mathlib/Analysis/SpecialFunctions/Pow/Real.lean
theorem abs_cpow_eq_rpow_re_of_pos {x : ℝ} (hx : 0 < x) (y : ℂ) : abs (x ^ y) = x ^ y.re
-- Mathlib/Order/UpperLower/Basic.lean
@[simp] lemma le_Ici : s ≤ Ici a ↔ a ∈ s
-- Mathlib/Data/Stream/Init.lean
@[simp] theorem drop_zero {s : Stream' α} : s.drop 0 = s
-- Mathlib/Algebra/Polynomial/Eval.lean
theorem not_isRoot_C (r a : R) (hr : r ≠ 0) : ¬IsRoot (C r) a
-- Mathlib/NumberTheory/PrimeCounting.lean
/-- The `n`th prime is greater or equal to `n + 2`. -/
lemma add_two_le_nth_prime (n : ℕ) : n + 2 ≤ nth Prime n
-- Mathlib/Data/Nat/GCD/Basic.lean
@[simp]
theorem gcd_add_mul_right_left (m n k : ℕ) : gcd (m + k * n) n = gcd m n
-- Mathlib/RingTheory/Finiteness.lean
theorem fg_span_singleton (x : M) : FG (R ∙ x)
-- Mathlib/Analysis/CstarAlgebra/Multiplier.lean
@[simp]
theorem star_fst (a : 𝓜(𝕜, A)) (b : A) : (star a).fst b = star (a.snd (star b))
-- Mathlib/Topology/VectorBundle/Basic.lean
@[simp, mfld_simps]
theorem zeroSection_proj [∀ x, Zero (E x)] (x : B) : (zeroSection F E x).proj = x
-- Mathlib/Algebra/Order/Monoid/Unbundled/Pow.lean
@[to_additive nsmul_left_strictMono]
theorem pow_right_strictMono' [CovariantClass M M (· * ·) (· < ·)] {a : M} (ha : 1 < a) :
    StrictMono ((a ^ ·) : ℕ → M)
-- Mathlib/Analysis/LocallyConvex/WithSeminorms.lean
theorem basisSets_nonempty [Nonempty ι] : p.basisSets.Nonempty
-- Mathlib/Analysis/SpecialFunctions/Pow/NNReal.lean
theorem rpow_left_bijective {x : ℝ} (hx : x ≠ 0) : Function.Bijective fun y : ℝ≥0∞ => y ^ x
-- Mathlib/Algebra/Order/GroupWithZero/Canonical.lean
@[simp, norm_cast] lemma one_lt_coe [One α] : 1 < (a : WithZero α) ↔ 1 < a
-- Mathlib/Data/Prod/TProd.lean
@[simp]
theorem snd_mk (i : ι) (l : List ι) (f : ∀ i, α i) :
    (TProd.mk.{u,v} (i :: l) f).2 = TProd.mk.{u,v} l f
-- Mathlib/Logic/Equiv/Set.lean
@[simp]
theorem insert_apply_left {α} {s : Set.{u} α} [DecidablePred (· ∈ s)] {a : α} (H : a ∉ s) :
    Equiv.Set.insert H ⟨a, Or.inl rfl⟩ = Sum.inr PUnit.unit
-- Mathlib/AlgebraicTopology/SimplicialSet.lean
lemma coe_triangle_down_toOrderHom {n : ℕ} (a b c : Fin (n+1)) (hab : a ≤ b) (hbc : b ≤ c) :
    ↑(triangle a b c hab hbc).down.toOrderHom = ![a, b, c]
-- Mathlib/GroupTheory/Coset.lean
@[to_additive rightAddCosetEquivalence_rel]
theorem rightCosetEquivalence_rel (s : Set α) : Equivalence (RightCosetEquivalence s)
-- Mathlib/Analysis/Normed/Group/Pointwise.lean
@[to_additive (attr := simp 1100)]
theorem singleton_mul_closedBall : {x} * closedBall y δ = closedBall (x * y) δ
-- Mathlib/Order/Filter/Bases.lean
theorem hasBasis_iInf_of_directed' {ι : Type*} {ι' : ι → Sort _} [Nonempty ι] {l : ι → Filter α}
    (s : ∀ i, ι' i → Set α) (p : ∀ i, ι' i → Prop) (hl : ∀ i, (l i).HasBasis (p i) (s i))
    (h : Directed (· ≥ ·) l) :
    (⨅ i, l i).HasBasis (fun ii' : Σi, ι' i => p ii'.1 ii'.2) fun ii' => s ii'.1 ii'.2
-- Mathlib/Data/ZMod/IntUnitsPower.lean
lemma mul_uzpow (s₁ s₂ : ℤˣ) (x : R) : (s₁ * s₂) ^ x = s₁ ^ x * s₂ ^ x
-- Mathlib/Probability/Kernel/WithDensity.lean
protected theorem withDensity_apply' (κ : Kernel α β) [IsSFiniteKernel κ]
    (hf : Measurable (Function.uncurry f)) (a : α) (s : Set β) :
    withDensity κ f a s = ∫⁻ b in s, f a b ∂κ a
-- Mathlib/LinearAlgebra/LinearDisjoint.lean
/-- The zero module is linearly disjoint with any other submodules. -/
theorem bot_left : (⊥ : Submodule R S).LinearDisjoint N
-- Mathlib/Algebra/Order/ToIntervalMod.lean
@[simp]
theorem toIcoDiv_apply_left (a : α) : toIcoDiv hp a a = 0
-- Mathlib/Data/Finset/Image.lean
lemma filter_attach (p : α → Prop) [DecidablePred p] (s : Finset α) :
    s.attach.filter (fun a : s ↦ p a) =
      (s.filter p).attach.map ((Embedding.refl _).subtypeMap mem_of_mem_filter)
-- Mathlib/ModelTheory/FinitelyGenerated.lean
/-- A structure is finitely generated if it is the closure of a finite subset. -/
class FG : Prop where
  out : (⊤ : L.Substructure M).FG
-- Mathlib/Data/NNRat/Defs.lean
@[norm_cast]
theorem nsmul_coe (q : ℚ≥0) (n : ℕ) : ↑(n • q) = n • (q : ℚ)
-- .lake/packages/lean4/src/lean/Init/Data/List/Lemmas.lean
@[simp] theorem enum_length : (enum l).length = l.length
-- Mathlib/AlgebraicTopology/SimplexCategory.lean
theorem eq_id_of_isIso {x : SimplexCategory} (f : x ⟶ x) [IsIso f] : f = 𝟙 _
-- Mathlib/Topology/Order/LocalExtr.lean
theorem IsLocalExtrOn.comp_continuousOn [TopologicalSpace δ] {t : Set α} {s : Set δ} (g : δ → α)
    {b : δ} (hf : IsLocalExtrOn f t (g b)) (hst : s ⊆ g ⁻¹' t) (hg : ContinuousOn g s)
    (hb : b ∈ s) : IsLocalExtrOn (f ∘ g) s b
-- Mathlib/Logic/Denumerable.lean
theorem succ_le_of_lt {x y : s} (h : y < x) : succ y ≤ x
-- Mathlib/Data/PFunctor/Multivariate/W.lean
theorem wp_ind {α : TypeVec n} {C : ∀ x : P.last.W, P.WPath x ⟹ α → Prop}
    (ih : ∀ (a : P.A) (f : P.last.B a → P.last.W) (f' : P.WPath ⟨a, f⟩ ⟹ α),
        (∀ i : P.last.B a, C (f i) (P.wPathDestRight f' i)) → C ⟨a, f⟩ f') :
    ∀ (x : P.last.W) (f' : P.WPath x ⟹ α), C x f'
-- Mathlib/Data/Fintype/BigOperators.lean
theorem card_eq_sum_ones {α} [Fintype α] : Fintype.card α = ∑ _a : α, 1
-- Mathlib/Algebra/Category/Grp/Limits.lean
/-- A functor `F : J ⥤ CommGrp.{u}` has a limit iff `(F ⋙ forget CommGrp).sections` is
`u`-small.  -/
@[to_additive "A functor `F : J ⥤ AddCommGrp.{u}` has a limit iff
`(F ⋙ forget AddCommGrp).sections` is `u`-small."]
lemma hasLimit_iff_small_sections :
    HasLimit F ↔ Small.{u} (F ⋙ forget CommGrp).sections
-- Mathlib/Algebra/Order/ToIntervalMod.lean
theorem toIcoMod_neg' (a b : α) : toIcoMod hp (-a) b = p - toIocMod hp a (-b)
-- Mathlib/MeasureTheory/Integral/IntegrableOn.lean
theorem IntegrableOn.congr_fun (h : IntegrableOn f s μ) (hst : EqOn f g s) (hs : MeasurableSet s) :
    IntegrableOn g s μ
-- Mathlib/MeasureTheory/Function/ConditionalExpectation/AEMeasurable.lean
theorem mem_lpMeasSubgroup_iff_aeStronglyMeasurable' {m m0 : MeasurableSpace α} {μ : Measure α}
    {f : Lp F p μ} : f ∈ lpMeasSubgroup F m p μ ↔ AEStronglyMeasurable' m f μ
-- Mathlib/Algebra/Quaternion.lean
/-- `QuaternionAlgebra.re` as a `LinearMap`-/
@[simps]
def reₗ : ℍ[R,c₁,c₂] →ₗ[R] R
-- Mathlib/Analysis/Convex/Cone/Basic.lean
@[simp]
theorem coe_strictlyPositive : ↑(strictlyPositive 𝕜 E) = Set.Ioi (0 : E)
-- Mathlib/Topology/MetricSpace/Pseudo/Constructions.lean
lemma Subtype.dist_eq {p : α → Prop} (x y : Subtype p) : dist x y = dist (x : α) y
-- Mathlib/MeasureTheory/Measure/Haar/Unique.lean
/-- Two left invariant measures give the same mass to level sets of continuous compactly supported
functions, up to the scalar `haarScalarFactor μ' μ`.

Auxiliary lemma in the proof of the more general
`measure_isMulInvariant_eq_smul_of_isCompact_closure`, which works for any set with
compact closure. -/
@[to_additive measure_preimage_isAddLeftInvariant_eq_smul_of_hasCompactSupport
"Two left invariant measures give the same mass to level sets of continuous compactly supported
functions, up to the scalar `addHaarScalarFactor μ' μ`.

Auxiliary lemma in the proof of the more general
`measure_isAddInvariant_eq_smul_of_isCompact_closure`, which works for any set with
compact closure."]
lemma measure_preimage_isMulLeftInvariant_eq_smul_of_hasCompactSupport
    (μ' μ : Measure G) [IsHaarMeasure μ] [IsFiniteMeasureOnCompacts μ'] [IsMulLeftInvariant μ']
    {f : G → ℝ} (hf : Continuous f) (h'f : HasCompactSupport f) :
    μ' (f ⁻¹' {1}) = haarScalarFactor μ' μ • μ (f ⁻¹' {1})
-- Mathlib/RingTheory/Polynomial/Selmer.lean
theorem X_pow_sub_X_sub_one_irreducible (hn1 : n ≠ 1) : Irreducible (X ^ n - X - 1 : ℤ[X])
-- Mathlib/Analysis/Normed/Module/Basic.lean
theorem nnnorm_algebraMap (x : 𝕜) : ‖algebraMap 𝕜 𝕜' x‖₊ = ‖x‖₊ * ‖(1 : 𝕜')‖₊
-- Mathlib/Algebra/Module/Submodule/Lattice.lean
theorem disjoint_def {p p' : Submodule R M} : Disjoint p p' ↔ ∀ x ∈ p, x ∈ p' → x = (0 : M)
-- Mathlib/Algebra/Category/ModuleCat/ChangeOfRings.lean
@[reassoc]
lemma restrictScalarsId'App_hom_naturality {M N : ModuleCat R} (φ : M ⟶ N) :
    (restrictScalars f).map φ ≫ (restrictScalarsId'App f hf N).hom =
      (restrictScalarsId'App f hf M).hom ≫ φ
-- Mathlib/GroupTheory/Perm/Support.lean
theorem IsSwap.of_subtype_isSwap {p : α → Prop} [DecidablePred p] {f : Perm (Subtype p)}
    (h : f.IsSwap) : (ofSubtype f).IsSwap
-- Mathlib/Algebra/Lie/Weights/Killing.lean
lemma coe_corootSpace_eq_span_singleton' (α : Weight K H L) :
    (corootSpace α).toSubmodule = K ∙ (cartanEquivDual H).symm α
-- Mathlib/Analysis/LocallyConvex/BalancedCoreHull.lean
theorem balancedCore_mem_nhds_zero (hU : U ∈ 𝓝 (0 : E)) : balancedCore 𝕜 U ∈ 𝓝 (0 : E)
-- Mathlib/MeasureTheory/Measure/Portmanteau.lean
theorem limsup_measure_compl_le_of_le_liminf_measure {ι : Type*} {L : Filter ι} {μ : Measure Ω}
    {μs : ι → Measure Ω} [IsProbabilityMeasure μ] [∀ i, IsProbabilityMeasure (μs i)] {E : Set Ω}
    (E_mble : MeasurableSet E) (h : μ E ≤ L.liminf fun i => μs i E) :
    (L.limsup fun i => μs i Eᶜ) ≤ μ Eᶜ
-- Mathlib/RingTheory/Idempotents.lean
theorem existsUnique_isIdempotentElem_eq_of_ker_isNilpotent (h : ∀ x ∈ RingHom.ker f, IsNilpotent x)
    (e : S) (he : e ∈ f.range) (he' : IsIdempotentElem e) :
    ∃! e' : R, IsIdempotentElem e' ∧ f e' = e
-- Mathlib/RingTheory/LocalProperties.lean
/-- An ideal is trivial if its localization at every maximal ideal is trivial. -/
theorem ideal_eq_bot_of_localization (I : Ideal R)
    (h : ∀ (J : Ideal R) (hJ : J.IsMaximal),
      IsLocalization.coeSubmodule (Localization.AtPrime J) I = ⊥) :
    I = ⊥
-- Mathlib/Topology/Basic.lean
/-- Suppose that `f` sends the complement to `s` to a single point `x`, and `l` is some filter.
Then `f` tends to `x` along `l` restricted to `s` if and only if it tends to `x` along `l`. -/
theorem tendsto_inf_principal_nhds_iff_of_forall_eq {f : α → X} {l : Filter α} {s : Set α}
    (h : ∀ a ∉ s, f a = x) : Tendsto f (l ⊓ 𝓟 s) (𝓝 x) ↔ Tendsto f l (𝓝 x)
-- Mathlib/Algebra/Order/Floor.lean
@[simp]
theorem floor_natCast (n : ℕ) : ⌊(n : α)⌋₊ = n
-- Mathlib/RingTheory/Coprime/Basic.lean
theorem IsCoprime.mul_right (H1 : IsCoprime x y) (H2 : IsCoprime x z) : IsCoprime x (y * z)
-- Mathlib/Combinatorics/SetFamily/Shadow.lean
/-- `t` is in the upper shadow of `𝒜` iff `t` is exactly `k` elements less than something from `𝒜`.

See also `Finset.mem_upShadow_iff_exists_mem_card_add`. -/
lemma mem_upShadow_iterate_iff_exists_sdiff :
    t ∈ ∂⁺^[k] 𝒜 ↔ ∃ s ∈ 𝒜, s ⊆ t ∧ (t \ s).card = k
-- Mathlib/CategoryTheory/Sites/LocallyBijective.lean
lemma isLocallyInjective_presheafToSheaf_map_iff :
    Sheaf.IsLocallyInjective ((presheafToSheaf J A).map φ) ↔ IsLocallyInjective J φ
-- Mathlib/Data/Finset/Sups.lean
lemma biUnion_image_sdiff_right : t.biUnion (fun b ↦ s.image (· \ b)) = s \\ t
-- Mathlib/Analysis/Normed/Lp/ProdLp.lean
@[simp]
theorem neg_fst : (-x).fst = -x.fst
-- Mathlib/MeasureTheory/MeasurableSpace/Embedding.lean
lemma piCongrLeft_apply_apply {ι ι' : Type*} (e : ι ≃ ι') {β : ι' → Type*}
    [∀ i', MeasurableSpace (β i')] (x : (i : ι) → β (e i)) (i : ι) :
    piCongrLeft (fun i' ↦ β i') e x (e i) = x i
-- Mathlib/GroupTheory/Finiteness.lean
@[to_additive]
theorem Group.fg_iff' :
    Group.FG G ↔ ∃ (n : _) (S : Finset G), S.card = n ∧ Subgroup.closure (S : Set G) = ⊤
-- Mathlib/RingTheory/Ideal/QuotientOperations.lean
@[simp]
theorem quotientMulEquivQuotientProd_snd (I J : Ideal R) (coprime : IsCoprime I J) (x : R ⧸ I * J) :
    (quotientMulEquivQuotientProd I J coprime x).snd =
      Ideal.Quotient.factor (I * J) J mul_le_left x
-- Mathlib/Analysis/NormedSpace/ContinuousAffineMap.lean
theorem norm_image_zero_le : ‖f 0‖ ≤ ‖f‖
-- Mathlib/Algebra/Order/Ring/Unbundled/Basic.lean
/-- Variant of `mul_lt_of_lt_one_right` for `a` negative instead of positive. -/
theorem lt_mul_of_lt_one_right [ExistsAddOfLE α] [PosMulStrictMono α]
    [CovariantClass α α (swap (· + ·)) (· < ·)] [ContravariantClass α α (swap (· + ·)) (· < ·)]
    (ha : a < 0) (h : b < 1) : a < a * b
-- Mathlib/Geometry/Manifold/VectorBundle/Tangent.lean
@[simp, mfld_simps]
theorem trivializationAt_fst (x : M) (z : TM) : (trivializationAt E (TangentSpace I) x z).1 = z.1
-- Mathlib/RingTheory/Polynomial/Bernstein.lean
theorem sum_smul (n : ℕ) :
    (∑ ν ∈ Finset.range (n + 1), ν • bernsteinPolynomial R n ν) = n • X
-- Mathlib/Data/List/Zip.lean
theorem revzip_swap (l : List α) : (revzip l).map Prod.swap = revzip l.reverse
-- Mathlib/Algebra/Algebra/NonUnitalHom.lean
@[simp]
theorem coe_id : ⇑(NonUnitalAlgHom.id R A) = id
-- Mathlib/LinearAlgebra/Matrix/SchurComplement.lean
/-- Determinant of a 2×2 block matrix, expanded around an invertible top left element in terms of
the Schur complement. -/
theorem det_fromBlocks₁₁ (A : Matrix m m α) (B : Matrix m n α) (C : Matrix n m α)
    (D : Matrix n n α) [Invertible A] :
    (Matrix.fromBlocks A B C D).det = det A * det (D - C * ⅟ A * B)
-- Mathlib/Order/Monotone/Basic.lean
protected theorem StrictMono.ite' (hf : StrictMono f) (hg : StrictMono g) {p : α → Prop}
    [DecidablePred p]
    (hp : ∀ ⦃x y⦄, x < y → p y → p x) (hfg : ∀ ⦃x y⦄, p x → ¬p y → x < y → f x < g y) :
    StrictMono fun x ↦ if p x then f x else g x
-- Mathlib/Topology/Basic.lean
theorem mem_closure_of_tendsto {f : α → X} {b : Filter α} [NeBot b]
    (hf : Tendsto f b (𝓝 x)) (h : ∀ᶠ x in b, f x ∈ s) : x ∈ closure s
-- Mathlib/Algebra/Group/Subgroup/Basic.lean
@[to_additive]
theorem eq_top_iff' : H = ⊤ ↔ ∀ x : G, x ∈ H
-- Mathlib/Topology/Instances/AddCircle.lean
theorem coe_add_period (x : 𝕜) : ((x + p : 𝕜) : AddCircle p) = x
-- Mathlib/FieldTheory/Adjoin.lean
theorem map_sup (s t : IntermediateField F E) (f : E →ₐ[F] K) : (s ⊔ t).map f = s.map f ⊔ t.map f
-- Mathlib/Order/Hom/Lattice.lean
@[simp]
theorem comp_id (f : LatticeHom α β) : f.comp (LatticeHom.id α) = f
-- Mathlib/MeasureTheory/Measure/VectorMeasure.lean
theorem le_restrict_univ_iff_le : v ≤[Set.univ] w ↔ v ≤ w
-- Mathlib/RingTheory/DedekindDomain/Different.lean
lemma differentialIdeal_le_iff {I : Ideal B} (hI : I ≠ ⊥) [NoZeroSMulDivisors A B] :
    differentIdeal A B ≤ I ↔ (((I⁻¹ : FractionalIdeal B⁰ L) : Submodule B L).restrictScalars A).map
      ((Algebra.trace K L).restrictScalars A) ≤ 1
-- Mathlib/CategoryTheory/Limits/Shapes/Pullback/CommSq.lean
/-- If `c` is a limiting pullback cone, then we have an `IsPullback c.fst c.snd f g`. -/
theorem of_isLimit {c : PullbackCone f g} (h : Limits.IsLimit c) : IsPullback c.fst c.snd f g
-- Mathlib/MeasureTheory/SetSemiring.lean
/-- In a semiring of sets `C`, for all set `s ∈ C` and finite set of sets `I ⊆ C`, there is a
finite set of sets in `C` whose union is `s \ ⋃₀ I`.
See `IsSetSemiring.diffFinset₀` for a definition that gives such a set. -/
lemma exists_disjoint_finset_diff_eq (hC : IsSetSemiring C) (hs : s ∈ C) (hI : ↑I ⊆ C) :
    ∃ J : Finset (Set α), ↑J ⊆ C ∧ PairwiseDisjoint (J : Set (Set α)) id ∧
      s \ ⋃₀ I = ⋃₀ J
-- Mathlib/Logic/Equiv/Defs.lean
protected theorem forall₃_congr'
    {α₁ α₂ β₁ β₂ γ₁ γ₂ : Sort*} {p : α₁ → β₁ → γ₁ → Prop} {q : α₂ → β₂ → γ₂ → Prop}
    (eα : α₁ ≃ α₂) (eβ : β₁ ≃ β₂) (eγ : γ₁ ≃ γ₂)
    (h : ∀ {x y z}, p (eα.symm x) (eβ.symm y) (eγ.symm z) ↔ q x y z) :
    (∀ x y z, p x y z) ↔ ∀ x y z, q x y z
-- Mathlib/Analysis/Analytic/Basic.lean
theorem HasFPowerSeriesAt.eventually_hasSum (hf : HasFPowerSeriesAt f p x) :
    ∀ᶠ y in 𝓝 0, HasSum (fun n : ℕ => p n fun _ : Fin n => y) (f (x + y))
-- Mathlib/Analysis/CstarAlgebra/ContinuousFunctionalCalculus/Unital.lean
lemma cfc_le_one (f : R → R) (a : A) (h : ∀ x ∈ spectrum R a, f x ≤ 1) : cfc f a ≤ 1
-- Mathlib/Topology/ContinuousFunction/Basic.lean
/--
To give a continuous map out of a disjoint union, it suffices to give a continuous map out of
each term. This is `Sigma.uncurry` for continuous maps.
-/
@[simps]
def sigma (f : ∀ i, C(X i, A)) : C((Σ i, X i), A)
-- Mathlib/RingTheory/DedekindDomain/Factorization.lean
/-- If `v ≠ w` are two maximal ideals of `R`, then `val_v(w) = 0`. -/
theorem count_maximal_coprime {w : HeightOneSpectrum R} (hw : w ≠ v) :
    count K v (w.asIdeal : FractionalIdeal R⁰ K) = 0
-- Mathlib/Order/Interval/Set/OrdConnected.lean
theorem OrdConnected.uIoc_subset (hs : OrdConnected s) ⦃x⦄ (hx : x ∈ s) ⦃y⦄ (hy : y ∈ s) :
    Ι x y ⊆ s
-- Mathlib/RingTheory/Ideal/Operations.lean
@[simp, nolint simpNF]
theorem zero_eq_bot : (0 : Ideal R) = ⊥
-- Mathlib/LinearAlgebra/AffineSpace/Matrix.lean
/-- If we fix a background affine basis `b`, then for any other basis `b₂`, we can characterise
the barycentric coordinates provided by `b₂` in terms of determinants relative to `b`. -/
theorem det_smul_coords_eq_cramer_coords (x : P) :
    (b.toMatrix b₂).det • b₂.coords x = (b.toMatrix b₂)ᵀ.cramer (b.coords x)
-- Mathlib/Combinatorics/Schnirelmann.lean
/-- The Schnirelmann density of `A` containing `0` is `1` if and only if `A` is the naturals. -/
lemma schnirelmannDensity_eq_one_iff_of_zero_mem (hA : 0 ∈ A) :
    schnirelmannDensity A = 1 ↔ A = Set.univ
-- Mathlib/MeasureTheory/Constructions/Prod/Integral.lean
theorem measurableSet_integrable [SFinite ν] ⦃f : α → β → E⦄
    (hf : StronglyMeasurable (uncurry f)) : MeasurableSet {x | Integrable (f x) ν}
-- Mathlib/Algebra/Group/WithOne/Basic.lean
@[to_additive (attr := simp)]
theorem map_id : map (MulHom.id α) = MonoidHom.id (WithOne α)
-- Mathlib/Data/List/Range.lean
theorem enumFrom_eq_zip_range' (l : List α) {n : ℕ} : l.enumFrom n = (range' n l.length).zip l
-- Mathlib/Algebra/Homology/ShortComplex/RightHomology.lean
@[ext]
lemma opcycles_ext {A : C} (f₁ f₂ : S.opcycles ⟶ A)
    (h : S.pOpcycles ≫ f₁ = S.pOpcycles ≫ f₂) : f₁ = f₂
-- Mathlib/Data/Set/Prod.lean
@[simp]
theorem offDiag_empty : (∅ : Set α).offDiag = ∅
-- Mathlib/CategoryTheory/Monoidal/Category.lean
@[reassoc (attr := simp)]
theorem inv_hom_whiskerRight' {X Y : C} (f : X ⟶ Y) [IsIso f] (Z : C) :
    inv f ▷ Z ≫ f ▷ Z = 𝟙 (Y ⊗ Z)
-- Mathlib/MeasureTheory/Integral/Lebesgue.lean
theorem setLIntegral_strict_mono {f g : α → ℝ≥0∞} {s : Set α} (hsm : MeasurableSet s)
    (hs : μ s ≠ 0) (hg : Measurable g) (hfi : ∫⁻ x in s, f x ∂μ ≠ ∞)
    (h : ∀ᵐ x ∂μ, x ∈ s → f x < g x) : ∫⁻ x in s, f x ∂μ < ∫⁻ x in s, g x ∂μ
-- Mathlib/Combinatorics/Quiver/Cast.lean
theorem Hom.eq_cast_iff_heq {u v u' v' : U} (hu : u = u') (hv : v = v') (e : u ⟶ v) (e' : u' ⟶ v') :
    e' = e.cast hu hv ↔ HEq e' e
-- Mathlib/LinearAlgebra/TensorProduct/Finiteness.lean
/-- For any element `x` of `M ⊗[R] N`, there exists a finite subset `{ (m_i, n_i) }`
of `M × N` such that each `n_i` is distinct (we represent it as an element of `N →₀ M`),
such that `x` is equal to the sum of `m_i ⊗ₜ[R] n_i`. -/
theorem exists_finsupp_right (x : M ⊗[R] N) :
    ∃ S : N →₀ M, x = S.sum fun n m ↦ m ⊗ₜ[R] n
-- .lake/packages/lean4/src/lean/Init/Control/Lawful/Instances.lean
protected theorem bind_pure_comp [Monad m] (f : α → β) (x : ExceptT ε m α) : x >>= pure ∘ f = f <$> x
-- Mathlib/Topology/Order/IsLUB.lean
theorem IsLUB.exists_seq_strictMono_tendsto_of_not_mem {t : Set α} {x : α}
    [IsCountablyGenerated (𝓝 x)] (htx : IsLUB t x) (not_mem : x ∉ t) (ht : t.Nonempty) :
    ∃ u : ℕ → α, StrictMono u ∧ (∀ n, u n < x) ∧ Tendsto u atTop (𝓝 x) ∧ ∀ n, u n ∈ t
-- Mathlib/Topology/MetricSpace/PiNat.lean
theorem res_injective : Injective (@res α)
-- Mathlib/Data/Fintype/Powerset.lean
@[simp]
theorem Fintype.card_finset [Fintype α] : Fintype.card (Finset α) = 2 ^ Fintype.card α
-- Mathlib/Order/Interval/Set/OrderEmbedding.lean
@[simp] theorem preimage_Ioi : e ⁻¹' Ioi (e x) = Ioi x
-- Mathlib/MeasureTheory/Measure/AEMeasurable.lean
@[simp]
theorem aemeasurable_smul_measure_iff {c : ℝ≥0∞} (hc : c ≠ 0) :
    AEMeasurable f (c • μ) ↔ AEMeasurable f μ
-- Mathlib/Analysis/Normed/Group/Seminorm.lean
@[to_additive (attr := simp, norm_cast) existing AddGroupSeminorm.coe_smul]
theorem coe_smul (r : R) (p : GroupSeminorm E) : ⇑(r • p) = r • ⇑p
-- Mathlib/Combinatorics/Derangements/Basic.lean
/-- For any `a : α`, the fiber over `some a` is the set of permutations
    where `a` is the only possible fixed point. -/
theorem RemoveNone.fiber_some (a : α) :
    RemoveNone.fiber (some a) = { f : Perm α | fixedPoints f ⊆ {a} }
-- Mathlib/Algebra/Homology/ShortComplex/Exact.lean
lemma ext_r (s s' : S.Splitting) (h : s.r = s'.r) : s = s'
-- Mathlib/Algebra/Homology/TotalComplexSymmetry.lean
@[reassoc]
lemma totalFlipIsoX_hom_D₂ (j j' : J) :
    (K.totalFlipIsoX c j).hom ≫ K.D₂ c j j' =
      K.flip.D₁ c j j' ≫ (K.totalFlipIsoX c j').hom
-- Mathlib/RingTheory/MvPowerSeries/Basic.lean
@[simp, norm_cast]
theorem coeff_coe (n : σ →₀ ℕ) : MvPowerSeries.coeff R n ↑φ = coeff n φ
-- Mathlib/SetTheory/Cardinal/Cofinality.lean
@[simp]
theorem cof_succ (o) : cof (succ o) = 1
-- Mathlib/Algebra/Ring/Commute.lean
lemma sub_sq (a b : R) : (a - b) ^ 2 = a ^ 2 - 2 * a * b + b ^ 2
-- Mathlib/Combinatorics/SimpleGraph/Matching.lean
theorem IsMatching.toEdge_eq_of_adj (h : M.IsMatching) (hv : v ∈ M.verts) (hvw : M.Adj v w) :
    h.toEdge ⟨v, hv⟩ = ⟨s(v, w), hvw⟩
-- Mathlib/GroupTheory/MonoidLocalization/Basic.lean
@[to_additive (attr := simp)]
theorem ndrec_mk {p : Localization S → Sort u} (f : ∀ (a : M) (b : S), p (mk a b)) (H) (a : M)
    (b : S) : (rec f H (mk a b) : p (mk a b)) = f a b
-- Mathlib/Analysis/Asymptotics/SuperpolynomialDecay.lean
theorem superpolynomialDecay_param_pow_mul_iff (hk : Tendsto k l atTop) (n : ℕ) :
    SuperpolynomialDecay l k (k ^ n * f) ↔ SuperpolynomialDecay l k f
-- Mathlib/Geometry/RingedSpace/LocallyRingedSpace.lean
theorem Γ_obj_op (X : LocallyRingedSpace.{u}) : Γ.obj (op X) = X.presheaf.obj (op ⊤)
-- Mathlib/Analysis/Calculus/Gradient/Basic.lean
@[simp]
theorem gradient_const' : (∇ fun _ : 𝕜 => c) = fun _ => 0