ruc-ai4math/mathlib_handler_benchmark_410 huggingface dataset:
-- Mathlib/CategoryTheory/Sites/Sieves.lean
lemma mem_ofArrows_iff {I : Type*} {X : C} (Y : I → C) (f : ∀ i, Y i ⟶ X)
    {W : C} (g : W ⟶ X) :
    ofArrows Y f g ↔ ∃ (i : I) (a : W ⟶ Y i), g = a ≫ f i
-- Mathlib/Order/Filter/Partial.lean
theorem ptendsto_def (f : α →. β) (l₁ : Filter α) (l₂ : Filter β) :
    PTendsto f l₁ l₂ ↔ ∀ s ∈ l₂, f.core s ∈ l₁
-- Mathlib/CategoryTheory/Yoneda.lean
/-- Taking the `unop` of morphisms is a natural isomorphism. -/
@[simps!]
def objOpOp (X : C) : coyoneda.obj (op (op X)) ≅ yoneda.obj X
-- Mathlib/CategoryTheory/Sites/Equivalence.lean
/-- Transport `HasSheafify` along an equivalence of sites. -/
theorem hasSheafify : HasSheafify J A
-- Mathlib/Algebra/Lie/Basic.lean
/-- A Lie algebra is a module with compatible product, known as the bracket, satisfying the Jacobi
identity. Forgetting the scalar multiplication, every Lie algebra is a Lie ring. -/
class LieAlgebra (R : Type u) (L : Type v) [CommRing R] [LieRing L] extends Module R L where
  /-- A Lie algebra bracket is compatible with scalar multiplication in its second argument.

  The compatibility in the first argument is not a class property, but follows since every
  Lie algebra has a natural Lie module action on itself, see `LieModule`. -/
  protected lie_smul : ∀ (t : R) (x y : L), ⁅x, t • y⁆ = t • ⁅x, y⁆
-- Mathlib/Geometry/Manifold/SmoothManifoldWithCorners.lean
theorem extend_left_inv {x : M} (hxf : x ∈ f.source) : (f.extend I).symm (f.extend I x) = x
-- Mathlib/Analysis/Normed/Lp/PiLp.lean
@[continuity]
theorem continuous_equiv [∀ i, UniformSpace (β i)] : Continuous (WithLp.equiv p (∀ i, β i))
-- Mathlib/Order/PropInstances.lean
@[simp]
theorem Prop.bot_eq_false : (⊥ : Prop) = False
-- Mathlib/Analysis/Calculus/InverseFunctionTheorem/ApproximatesLinearOn.lean
@[simp]
theorem approximatesLinearOn_empty (f : E → F) (f' : E →L[𝕜] F) (c : ℝ≥0) :
    ApproximatesLinearOn f f' ∅ c
-- Mathlib/Topology/Algebra/Order/Compact.lean
theorem IsCompact.continuous_sInf {f : γ → β → α} {K : Set β} (hK : IsCompact K)
    (hf : Continuous ↿f) : Continuous fun x => sInf (f x '' K)
-- Mathlib/Algebra/Homology/ShortComplex/LeftHomology.lean
@[reassoc (attr := simp)]
lemma cyclesIsoLeftHomology_hom_inv_id (hf : S.f = 0) :
    S.leftHomologyπ ≫ (S.cyclesIsoLeftHomology hf).inv = 𝟙 _
-- Mathlib/Data/Finmap.lean
@[simp]
theorem toFinmap_nil [DecidableEq α] : ([].toFinmap : Finmap β) = ∅
-- Mathlib/AlgebraicTopology/DoldKan/NCompGamma.lean
theorem PInfty_comp_map_mono_eq_zero (X : SimplicialObject C) {n : ℕ} {Δ' : SimplexCategory}
    (i : Δ' ⟶ [n]) [hi : Mono i] (h₁ : Δ'.len ≠ n) (h₂ : ¬Isδ₀ i) :
    PInfty.f n ≫ X.map i.op = 0
-- Mathlib/RingTheory/Polynomial/Cyclotomic/Basic.lean
/-- If there is a primitive `n`-th root of unity in `K`, then
`cyclotomic' n K = (X ^ k - 1) /ₘ (∏ i ∈ Nat.properDivisors k, cyclotomic' i K)`. -/
theorem cyclotomic'_eq_X_pow_sub_one_div {K : Type*} [CommRing K] [IsDomain K] {ζ : K} {n : ℕ}
    (hpos : 0 < n) (h : IsPrimitiveRoot ζ n) :
    cyclotomic' n K = (X ^ n - 1) /ₘ ∏ i ∈ Nat.properDivisors n, cyclotomic' i K
-- Mathlib/Topology/Instances/ENNReal.lean
protected theorem tsum_prod' {f : α × β → ℝ≥0∞} : ∑' p : α × β, f p = ∑' (a) (b), f (a, b)
-- Mathlib/Combinatorics/SimpleGraph/Regularity/Uniform.lean
lemma isUniform_one : G.IsUniform (1 : 𝕜) s t
-- Mathlib/Analysis/Normed/Group/Basic.lean
@[to_additive edist_eq_coe_nnnorm]
theorem edist_eq_coe_nnnorm' (x : E) : edist x 1 = (‖x‖₊ : ℝ≥0∞)
-- Mathlib/Analysis/SpecificLimits/Basic.lean
theorem exists_pos_sum_of_countable {ε : ℝ≥0∞} (hε : ε ≠ 0) (ι) [Countable ι] :
    ∃ ε' : ι → ℝ≥0, (∀ i, 0 < ε' i) ∧ (∑' i, (ε' i : ℝ≥0∞)) < ε
-- Mathlib/RingTheory/DedekindDomain/FiniteAdeleRing.lean
lemma exists_finiteIntegralAdele_iff (a : FiniteAdeleRing R K) : (∃ c : R_hat R K,
    a = c) ↔ ∀ (v : HeightOneSpectrum R), a v ∈ adicCompletionIntegers K v
-- Mathlib/LinearAlgebra/AffineSpace/Combination.lean
/-- A weighted sum of pairwise subtractions, expressed as a subtraction of two
`weightedVSubOfPoint` expressions. -/
theorem sum_smul_vsub_eq_weightedVSubOfPoint_sub (w : ι → k) (p₁ p₂ : ι → P) (b : P) :
    (∑ i ∈ s, w i • (p₁ i -ᵥ p₂ i)) =
      s.weightedVSubOfPoint p₁ b w - s.weightedVSubOfPoint p₂ b w
-- Mathlib/Algebra/DirectSum/Module.lean
theorem IsInternal.collectedBasis_mem (h : IsInternal A) {α : ι → Type*}
    (v : ∀ i, Basis (α i) R (A i)) (a : Σi, α i) : h.collectedBasis v a ∈ A a.1
-- Mathlib/Data/ENNReal/Operations.lean
protected theorem add_lt_add_iff_right : a ≠ ∞ → (b + a < c + a ↔ b < c)
-- Mathlib/RingTheory/GradedAlgebra/HomogeneousIdeal.lean
theorem HomogeneousIdeal.isHomogeneous (I : HomogeneousIdeal 𝒜) : I.toIdeal.IsHomogeneous 𝒜
-- Mathlib/Analysis/Normed/Group/Constructions.lean
@[to_additive Pi.norm_def]
lemma Pi.norm_def' : ‖f‖ = ↑(Finset.univ.sup fun b => ‖f b‖₊)
-- Mathlib/MeasureTheory/Measure/VectorMeasure.lean
theorem sub_apply (v w : VectorMeasure α M) (i : Set α) : (v - w) i = v i - w i
-- Mathlib/Data/List/Basic.lean
theorem forall_mem_of_forall_mem_cons {p : α → Prop} {a : α} {l : List α} (h : ∀ x ∈ a :: l, p x) :
    ∀ x ∈ l, p x
-- Mathlib/Algebra/MonoidAlgebra/Degree.lean
theorem infDegree_withTop_some_comp {s : AddMonoidAlgebra R A} (hs : s.support.Nonempty) :
    infDegree (WithTop.some ∘ D) s = infDegree D s
-- Mathlib/Order/Disjoint.lean
theorem Codisjoint.sup_left (h : Codisjoint a b) : Codisjoint (a ⊔ c) b
-- Mathlib/NumberTheory/FLT/Three.lean
/-- Given `S' : Solution'`, the key factorization of `S'.a ^ 3 + S'.b ^ 3`. -/
lemma a_cube_add_b_cube_eq_mul :
    S'.a ^ 3 + S'.b ^ 3 = (S'.a + S'.b) * (S'.a + η * S'.b) * (S'.a + η ^ 2 * S'.b)
-- Mathlib/Analysis/Complex/Schwarz.lean
/-- The **Schwarz Lemma**: if `f : ℂ → ℂ` sends an open disk with center `c` and a positive radius
`R₁` to an open disk with center `f c` and radius `R₂`, then the absolute value of the derivative of
`f` at `c` is at most the ratio `R₂ / R₁`. -/
theorem abs_deriv_le_div_of_mapsTo_ball (hd : DifferentiableOn ℂ f (ball c R₁))
    (h_maps : MapsTo f (ball c R₁) (ball (f c) R₂)) (h₀ : 0 < R₁) : abs (deriv f c) ≤ R₂ / R₁
-- Mathlib/Order/Atoms.lean
theorem le_iff_atom_le_imp {α} [BooleanAlgebra α] [IsAtomic α] {x y : α} :
    x ≤ y ↔ ∀ a, IsAtom a → a ≤ x → a ≤ y
-- Mathlib/Order/Hom/CompleteLattice.lean
@[simp] theorem map_iSup [SupSet α] [SupSet β] [sSupHomClass F α β] (f : F) (g : ι → α) :
    f (⨆ i, g i) = ⨆ i, f (g i)
-- Mathlib/Analysis/Normed/Group/Hom.lean
theorem coe_inj_iff : f = g ↔ (f : V₁ → V₂) = g
-- Mathlib/Analysis/Calculus/Deriv/Inv.lean
theorem differentiableAt_inv : DifferentiableAt 𝕜 (fun x => x⁻¹) x ↔ x ≠ 0
-- Mathlib/Combinatorics/Enumerative/DoubleCounting.lean
theorem card_mul_le_card_mul' [∀ a b, Decidable (r a b)]
    (hn : ∀ b ∈ t, n ≤ (s.bipartiteBelow r b).card)
    (hm : ∀ a ∈ s, (t.bipartiteAbove r a).card ≤ m) : t.card * n ≤ s.card * m
-- Mathlib/Topology/VectorBundle/Basic.lean
theorem coe_linearMapAt (e : Pretrivialization F (π F E)) [e.IsLinear R] (b : B) :
    ⇑(e.linearMapAt R b) = fun y => if b ∈ e.baseSet then (e ⟨b, y⟩).2 else 0
-- Mathlib/Topology/Homeomorph.lean
@[simp]
lemma subtype_toEquiv {p : X → Prop} {q : Y → Prop} (h : X ≃ₜ Y) (h_iff : ∀ x, p x ↔ q (h x)) :
    (h.subtype h_iff).toEquiv = h.toEquiv.subtypeEquiv h_iff
-- Mathlib/GroupTheory/Coprod/Basic.lean
@[to_additive (attr := simp)] theorem swap_inr (x : N) : swap M N (inr x) = inl x
-- Mathlib/Algebra/Group/Subgroup/Basic.lean
@[to_additive (attr := simp)]
theorem subtype_comp_inclusion {H K : Subgroup G} (hH : H ≤ K) :
    K.subtype.comp (inclusion hH) = H.subtype
-- Mathlib/Probability/Kernel/Disintegration/CdfToKernel.lean
lemma IsRatCondKernelCDFAux.isRatStieltjesPoint_ae (hf : IsRatCondKernelCDFAux f κ ν)
    [IsFiniteKernel κ] [IsFiniteKernel ν] (a : α) :
    ∀ᵐ t ∂(ν a), IsRatStieltjesPoint f (a, t)
-- Mathlib/Analysis/VonNeumannAlgebra/Basic.lean
@[simp]
theorem commutant_commutant (S : VonNeumannAlgebra H) : S.commutant.commutant = S
-- Mathlib/Data/Nat/Lattice.lean
theorem iInf_le_succ (u : ℕ → α) (n : ℕ) : ⨅ k ≤ n + 1, u k = (⨅ k ≤ n, u k) ⊓ u (n + 1)
-- Mathlib/MeasureTheory/Constructions/BorelSpace/Order.lean
theorem measurable_of_Iio {f : δ → α} (hf : ∀ x, MeasurableSet (f ⁻¹' Iio x)) : Measurable f
-- Mathlib/AlgebraicGeometry/EllipticCurve/Group.lean
/-- The group homomorphism mapping an affine point $(x, y)$ of `W` to the class of the non-zero
fractional ideal $\langle X - x, Y - y \rangle$ of $F(W)$ in the class group of $F[W]$. -/
@[simps]
noncomputable def toClass : W.Point →+ Additive (ClassGroup W.CoordinateRing)
-- Mathlib/Data/Complex/Module.lean
theorem liftAux_apply_I (I' : A) (hI') : liftAux I' hI' I = I'
-- Mathlib/Data/Complex/Exponential.lean
@[simp]
theorem cosh_sub_sinh : cosh x - sinh x = exp (-x)
-- Mathlib/MeasureTheory/MeasurableSpace/Defs.lean
theorem MeasurableSet.biInter {f : β → Set α} {s : Set β} (hs : s.Countable)
    (h : ∀ b ∈ s, MeasurableSet (f b)) : MeasurableSet (⋂ b ∈ s, f b)
-- Mathlib/Analysis/Calculus/Rademacher.lean
theorem ae_lineDifferentiableAt (hf : LipschitzWith C f) (v : E) :
    ∀ᵐ p ∂μ, LineDifferentiableAt ℝ f p v
-- Mathlib/Algebra/Order/Ring/Rat.lean
protected lemma le_def : p ≤ q ↔ p.num * q.den ≤ q.num * p.den
-- Mathlib/Data/Nat/Choose/Sum.lean
/-- A version of the **binomial theorem** for commuting elements in noncommutative semirings. -/
theorem add_pow (h : Commute x y) (n : ℕ) :
    (x + y) ^ n = ∑ m ∈ range (n + 1), x ^ m * y ^ (n - m) * choose n m
-- Mathlib/Algebra/Ring/Parity.lean
lemma Odd.add_even (ha : Odd a) (hb : Even b) : Odd (a + b)
-- Mathlib/Algebra/Star/NonUnitalSubalgebra.lean
theorem gc_map_comap (f : F) : GaloisConnection (map f) (comap f)
-- Mathlib/Analysis/Normed/Group/AddTorsor.lean
theorem LipschitzWith.vadd [PseudoEMetricSpace α] {f : α → V} {g : α → P} {Kf Kg : ℝ≥0}
    (hf : LipschitzWith Kf f) (hg : LipschitzWith Kg g) : LipschitzWith (Kf + Kg) (f +ᵥ g)
-- Mathlib/Data/List/OfFn.lean
@[simp]
theorem ofFnRec_ofFn {C : List α → Sort*} (h : ∀ (n) (f : Fin n → α), C (List.ofFn f)) {n : ℕ}
    (f : Fin n → α) : @ofFnRec _ C h (List.ofFn f) = h _ f
-- Mathlib/Order/SuccPred/CompleteLinearOrder.lean
lemma IsLUB.exists_of_nonempty_of_not_isSuccLimit
    (hf : IsLUB (Set.range f) x) (hx : ¬ IsSuccLimit x) :
    ∃ i, f i = x
-- Mathlib/Data/Finsupp/Defs.lean
theorem support_mapRange {f : M → N} {hf : f 0 = 0} {g : α →₀ M} :
    (mapRange f hf g).support ⊆ g.support
-- Mathlib/Algebra/Lie/Subalgebra.lean
@[simp]
theorem top_coe : ((⊤ : LieSubalgebra R L) : Set L) = univ
-- Mathlib/GroupTheory/Coset.lean
@[to_additive]
theorem eq_class_eq_leftCoset (s : Subgroup α) (g : α) :
    { x : α | (x : α ⧸ s) = g } = g • s
-- Mathlib/Tactic/Positivity/Basic.lean
private lemma le_min_of_lt_of_le (ha : a < b) (hb : a ≤ c) : a ≤ min b c
-- Mathlib/Topology/ContinuousFunction/Basic.lean
@[continuity]
theorem continuous_set_coe (s : Set C(α, β)) (f : s) : Continuous (f : α → β)
-- Mathlib/Algebra/Algebra/NonUnitalSubalgebra.lean
theorem eq_top_iff {S : NonUnitalSubalgebra R A} : S = ⊤ ↔ ∀ x : A, x ∈ S
-- Mathlib/Order/ULift.lean
@[simp] theorem up_compl [HasCompl α] (a : α) : up (aᶜ) = (up a)ᶜ
-- Mathlib/Topology/Category/TopCat/Limits/Pullbacks.lean
theorem pullback_fst_image_snd_preimage (f : X ⟶ Z) (g : Y ⟶ Z) (U : Set Y) :
    (pullback.fst f g) '' ((pullback.snd f g) ⁻¹' U) =
      f ⁻¹' (g '' U)
-- Mathlib/Topology/Connected/Basic.lean
theorem IsPreconnected.subset_connectedComponentIn {x : α} {F : Set α} (hs : IsPreconnected s)
    (hxs : x ∈ s) (hsF : s ⊆ F) : s ⊆ connectedComponentIn F x
-- Mathlib/Data/Subtype.lean
theorem coe_eq_of_eq_mk {a : { a // p a }} {b : α} (h : ↑a = b) : a = ⟨b, h ▸ a.2⟩
-- Mathlib/Deprecated/Group.lean
theorem to_isAddGroupHom (f : R →+* S) : IsAddGroupHom f
-- Mathlib/AlgebraicGeometry/Cover/Open.lean
theorem affineBasisCover_obj (X : Scheme.{u}) (i : X.affineBasisCover.J) :
    X.affineBasisCover.obj i = Spec (X.affineBasisCoverRing i)
-- Mathlib/Data/ENNReal/Basic.lean
theorem coe_iSup {ι : Sort*} {f : ι → ℝ≥0} (hf : BddAbove (range f)) :
    (↑(iSup f) : ℝ≥0∞) = ⨆ a, ↑(f a)
-- Mathlib/Order/Interval/Finset/Fin.lean
theorem card_fintypeIoo : Fintype.card (Set.Ioo a b) = b - a - 1
-- Mathlib/Probability/Martingale/BorelCantelli.lean
theorem leastGE_eq_min (π : Ω → ℕ) (r : ℝ) (ω : Ω) {n : ℕ} (hπn : ∀ ω, π ω ≤ n) :
    leastGE f r (π ω) ω = min (π ω) (leastGE f r n ω)
-- .lake/packages/batteries/Batteries/Data/List/Perm.lean
theorem Perm.nil_eq {l : List α} (p : [] ~ l) : [] = l
-- .lake/packages/lean4/src/lean/Init/Data/Int/DivModLemmas.lean
theorem ediv_add_emod (a b : Int) : b * (a / b) + a % b = a
-- Mathlib/MeasureTheory/Integral/Average.lean
@[simp]
theorem laverage_zero : ⨍⁻ _x, (0 : ℝ≥0∞) ∂μ = 0
-- Mathlib/Topology/Bornology/Constructions.lean
theorem isBounded_image_fst_and_snd {s : Set (α × β)} :
    IsBounded (Prod.fst '' s) ∧ IsBounded (Prod.snd '' s) ↔ IsBounded s
-- Mathlib/Topology/Algebra/UniformGroup.lean
/-- A homomorphism from a uniform group to a discrete uniform group is continuous if and only if
its kernel is open. -/
@[to_additive "A homomorphism from a uniform additive group to a discrete uniform additive group is
continuous if and only if its kernel is open."]
theorem UniformGroup.uniformContinuous_iff_open_ker {hom : Type*} [UniformSpace β]
    [DiscreteTopology β] [Group β] [UniformGroup β] [FunLike hom α β] [MonoidHomClass hom α β]
    {f : hom} :
    UniformContinuous f ↔ IsOpen ((f : α →* β).ker : Set α)
-- Mathlib/Logic/Basic.lean
@[simp] theorem not_xor (P Q : Prop) : ¬Xor' P Q ↔ (P ↔ Q)
-- Mathlib/RingTheory/Ideal/Operations.lean
@[simp]
theorem mul_eq_bot {R : Type*} [CommSemiring R] [NoZeroDivisors R] {I J : Ideal R} :
    I * J = ⊥ ↔ I = ⊥ ∨ J = ⊥
-- Mathlib/LinearAlgebra/Multilinear/Basic.lean
lemma domDomRestrict_aux [DecidableEq ι] (P : ι → Prop) [DecidablePred P]
    [DecidableEq {a // P a}]
    (x : (i : {a // P a}) → M₁ i) (z : (i : {a // ¬ P a}) → M₁ i) (i : {a : ι // P a})
    (c : M₁ i) : (fun j ↦ if h : P j then Function.update x i c ⟨j, h⟩ else z ⟨j, h⟩) =
    Function.update (fun j => if h : P j then x ⟨j, h⟩ else z ⟨j, h⟩) i c
-- Mathlib/CategoryTheory/Generator.lean
/-- An ingredient of the proof of the Special Adjoint Functor Theorem: a cocomplete well-copowered
    category with a small separating set has a terminal object.

    In fact, it follows from the Special Adjoint Functor Theorem that `C` is already complete, see
    `hasLimits_of_hasColimits_of_isSeparating`. -/
theorem hasTerminal_of_isSeparating [WellPowered Cᵒᵖ] [HasColimits C] {𝒢 : Set C} [Small.{v₁} 𝒢]
    (h𝒢 : IsSeparating 𝒢) : HasTerminal C
-- Mathlib/Algebra/Group/Action/Units.lean
@[to_additive (attr := simp)]
lemma val_smul [Group G] [Monoid M] [MulAction G M] [SMulCommClass G M M] [IsScalarTower G M M]
    (g : G) (m : Mˣ) : ↑(g • m) = g • (m : M)
-- Mathlib/RingTheory/LaurentSeries.lean
theorem coe_def : (f : LaurentSeries F) = coeAlgHom F f
-- Mathlib/Algebra/Group/Action/Opposite.lean
@[to_additive]
lemma op_smul_op_smul (b : β) (a₁ a₂ : α) : b <• a₁ <• a₂ = b <• (a₁ * a₂)
-- Mathlib/Algebra/BigOperators/Pi.lean
@[to_additive]
theorem Finset.univ_prod_mulSingle [Fintype I] (f : ∀ i, Z i) :
    (∏ i, Pi.mulSingle i (f i)) = f
-- Mathlib/Data/Sym/Basic.lean
theorem cons_of_coe_eq (a : α) (v : Vector α n) : a ::ₛ (↑v : Sym α n) = ↑(a ::ᵥ v)
-- Mathlib/Data/Fin/Tuple/NatAntidiagonal.lean
/-- The disjoint union of antidiagonal tuples `Σ n, antidiagonalTuple k n` is equivalent to the
`k`-tuple `Fin k → ℕ`. This is such an equivalence, obtained by mapping `(n, x)` to `x`.

This is the tuple version of `Finset.sigmaAntidiagonalEquivProd`. -/
@[simps]
def sigmaAntidiagonalTupleEquivTuple (k : ℕ) : (Σ n, antidiagonalTuple k n) ≃ (Fin k → ℕ)
-- Mathlib/Analysis/Convex/SimplicialComplex/Basic.lean
/-- Construct a simplicial complex as a subset of a given simplicial complex. -/
@[simps]
def ofSubcomplex (K : SimplicialComplex 𝕜 E) (faces : Set (Finset E)) (subset : faces ⊆ K.faces)
    (down_closed : ∀ {s t}, s ∈ faces → t ⊆ s → t ∈ faces) : SimplicialComplex 𝕜 E
-- Mathlib/Geometry/Manifold/MFDeriv/Basic.lean
theorem HasMFDerivWithinAt.comp (hg : HasMFDerivWithinAt I' I'' g u (f x) g')
    (hf : HasMFDerivWithinAt I I' f s x f') (hst : s ⊆ f ⁻¹' u) :
    HasMFDerivWithinAt I I'' (g ∘ f) s x (g'.comp f')
-- Mathlib/GroupTheory/SpecificGroups/Cyclic.lean
/-- A group is called *cyclic* if it is generated by a single element. -/
@[to_additive]
class IsCyclic (α : Type u) [Group α] : Prop where
  exists_generator : ∃ g : α, ∀ x, x ∈ zpowers g
-- Mathlib/Analysis/InnerProductSpace/Basic.lean
theorem DFinsupp.sum_inner {ι : Type*} [DecidableEq ι] {α : ι → Type*}
    [∀ i, AddZeroClass (α i)] [∀ (i) (x : α i), Decidable (x ≠ 0)] (f : ∀ i, α i → E)
    (l : Π₀ i, α i) (x : E) : ⟪l.sum f, x⟫ = l.sum fun i a => ⟪f i a, x⟫
-- Mathlib/Data/Finset/Basic.lean
@[simp]
theorem range_zero : range 0 = ∅
-- Mathlib/MeasureTheory/Integral/Lebesgue.lean
theorem lintegral_mono_set {_ : MeasurableSpace α} ⦃μ : Measure α⦄ {s t : Set α} {f : α → ℝ≥0∞}
    (hst : s ⊆ t) : ∫⁻ x in s, f x ∂μ ≤ ∫⁻ x in t, f x ∂μ
-- Mathlib/Data/List/Basic.lean
theorem nthLe_reverse' (l : List α) (n : ℕ) (hn : n < l.reverse.length) (hn') :
    l.reverse.nthLe n hn = l.nthLe (l.length - 1 - n) hn'
-- Mathlib/Algebra/Module/LinearMap/Defs.lean
theorem coe_injective : Injective (DFunLike.coe : (M →ₛₗ[σ] M₃) → _)
-- Mathlib/Order/Defs.lean
theorem compare_le_iff_le {a b : α} : (compare a b ≠ .gt) ↔ a ≤ b
-- Mathlib/Data/Fintype/Basic.lean
/-- Note this is a special case of `(Finset.image_preimage f univ _).symm`. -/
theorem univ_filter_mem_range (f : α → β) [Fintype β] [DecidablePred fun y => y ∈ Set.range f]
    [DecidableEq β] : (Finset.univ.filter fun y => y ∈ Set.range f) = Finset.univ.image f
-- Mathlib/Order/BooleanAlgebra.lean
@[simp] lemma sdiff_eq_right : x \ y = y ↔ x = ⊥ ∧ y = ⊥
-- Mathlib/SetTheory/Ordinal/Basic.lean
theorem natCast_succ (n : ℕ) : ↑n.succ = succ (n : Ordinal)
-- Mathlib/Topology/FiberBundle/Trivialization.lean
theorem proj_symm_apply' {b : B} {x : F} (hx : b ∈ e.baseSet) :
    proj (e.toPartialHomeomorph.symm (b, x)) = b
-- Mathlib/GroupTheory/Complement.lean
@[to_additive]
theorem toEquiv_apply {f : G ⧸ H → G} (hf : ∀ q, (f q : G ⧸ H) = q) (q : G ⧸ H) :
    (toEquiv (range_mem_leftTransversals hf) q : G) = f q
-- Mathlib/Data/Set/Basic.lean
theorem inter_right_comm (s₁ s₂ s₃ : Set α) : s₁ ∩ s₂ ∩ s₃ = s₁ ∩ s₃ ∩ s₂
-- Mathlib/Data/Nat/Defs.lean
protected lemma lt_sub_iff_add_lt' : a < c - b ↔ b + a < c
-- Mathlib/Algebra/Homology/ShortComplex/PreservesHomology.lean
@[simp]
lemma map_g' : (h.map F).g' = F.map h.g'
-- Mathlib/CategoryTheory/Limits/Preserves/Shapes/Zero.lean
theorem preservesZeroMorphisms_of_map_zero_object (i : F.obj 0 ≅ 0) : PreservesZeroMorphisms F
-- Mathlib/Algebra/Polynomial/Roots.lean
theorem card_roots_sub_C {p : R[X]} {a : R} (hp0 : 0 < degree p) :
    (Multiset.card (p - C a).roots : WithBot ℕ) ≤ degree p
-- Mathlib/Data/ENNReal/Basic.lean
@[simp] theorem one_toReal : (1 : ℝ≥0∞).toReal = 1
-- Mathlib/Data/Rat/Defs.lean
lemma mk'_num_den (q : ℚ) : mk' q.num q.den q.den_nz q.reduced = q
-- Mathlib/Analysis/Calculus/LineDeriv/IntegrationByParts.lean
/-- **Integration by parts for Fréchet derivatives**
Version with a general bilinear form `B`.
If `B f g` is integrable, as well as `B f' g` and `B f g'` where `f'` and `g'` are the derivatives
of `f` and `g` in a given direction `v`, then `∫ B f g' = - ∫ B f' g`. -/
theorem integral_bilinear_fderiv_right_eq_neg_left_of_integrable
    {f : E → F} {g : E → G} {v : E} {B : F →L[ℝ] G →L[ℝ] W}
    (hf'g : Integrable (fun x ↦ B (fderiv ℝ f x v) (g x)) μ)
    (hfg' : Integrable (fun x ↦ B (f x) (fderiv ℝ g x v)) μ)
    (hfg : Integrable (fun x ↦ B (f x) (g x)) μ)
    (hf : Differentiable ℝ f) (hg : Differentiable ℝ g) :
    ∫ x, B (f x) (fderiv ℝ g x v) ∂μ = - ∫ x, B (fderiv ℝ f x v) (g x) ∂μ
-- Mathlib/LinearAlgebra/Matrix/Determinant/Basic.lean
theorem det_mul_aux {M N : Matrix n n R} {p : n → n} (H : ¬Bijective p) :
    (∑ σ : Perm n, ε σ * ∏ x, M (σ x) (p x) * N (p x) x) = 0
-- Mathlib/Algebra/Order/BigOperators/Group/List.lean
@[to_additive exists_lt_of_sum_lt]
lemma exists_lt_of_prod_lt' [LinearOrder M] [CovariantClass M M (Function.swap (· * ·)) (· ≤ ·)]
    [CovariantClass M M (· * ·) (· ≤ ·)] {l : List ι} (f g : ι → M)
    (h : (l.map f).prod < (l.map g).prod) : ∃ i ∈ l, f i < g i
-- Mathlib/CategoryTheory/Triangulated/HomologicalFunctor.lean
lemma IsHomological.mk' [F.PreservesZeroMorphisms]
    (hF : ∀ (T : Pretriangulated.Triangle C) (hT : T ∈ distTriang C),
      ∃ (T' : Pretriangulated.Triangle C) (e : T ≅ T'),
      ((shortComplexOfDistTriangle T' (isomorphic_distinguished _ hT _ e.symm)).map F).Exact) :
    F.IsHomological
-- Mathlib/Data/List/Sort.lean
/-- The list `List.insertionSort r l` is `List.Sorted` with respect to `r`. -/
theorem sorted_insertionSort : ∀ l, Sorted r (insertionSort r l)
-- Mathlib/Data/Set/Finite.lean
@[simp]
protected theorem toFinset_nonempty : hs.toFinset.Nonempty ↔ s.Nonempty
-- Mathlib/Geometry/Manifold/LocalInvariantProperties.lean
/-- A version of `liftPropWithinAt_indep_chart`, only for the target. -/
theorem liftPropWithinAt_indep_chart_target [HasGroupoid M' G'] (hf : f ∈ G'.maximalAtlas M')
    (xf : g x ∈ f.source) :
    LiftPropWithinAt P g s x ↔ ContinuousWithinAt g s x ∧ LiftPropWithinAt P (f ∘ g) s x
-- Mathlib/MeasureTheory/Integral/SetIntegral.lean
@[simp]
theorem integral_indicator_one ⦃s : Set X⦄ (hs : MeasurableSet s) :
    ∫ x, s.indicator 1 x ∂μ = (μ s).toReal
-- Mathlib/Analysis/SpecialFunctions/Complex/Arg.lean
theorem arg_cos_add_sin_mul_I_coe_angle (θ : Real.Angle) :
    (arg (Real.Angle.cos θ + Real.Angle.sin θ * I) : Real.Angle) = θ
-- Mathlib/Topology/ContinuousFunction/Ideals.lean
@[simp]
theorem idealOfEmpty_eq_bot : idealOfSet R (∅ : Set X) = ⊥
-- Mathlib/Topology/ContinuousFunction/Bounded.lean
/-- Constant as a continuous bounded function. -/
@[simps! (config := .asFn)] -- Porting note: Changed `simps` to `simps!`
def const (b : β) : α →ᵇ β
-- Mathlib/Algebra/BigOperators/NatAntidiagonal.lean
/-- This lemma matches more generally than `Finset.Nat.prod_antidiagonal_eq_prod_range_succ_mk` when
using `rw ← `. -/
@[to_additive "This lemma matches more generally than
`Finset.Nat.sum_antidiagonal_eq_sum_range_succ_mk` when using `rw ← `."]
theorem prod_antidiagonal_eq_prod_range_succ {M : Type*} [CommMonoid M] (f : ℕ → ℕ → M) (n : ℕ) :
    ∏ ij ∈ antidiagonal n, f ij.1 ij.2 = ∏ k ∈ range n.succ, f k (n - k)
-- .lake/packages/lean4/src/lean/Init/Data/Nat/Basic.lean
protected theorem zero_lt_two : 0 < 2
-- Mathlib/CategoryTheory/Iso.lean
@[aesop apply safe (rule_sets := [CategoryTheory])]
theorem inv_ext' {f : X ≅ Y} {g : Y ⟶ X} (hom_inv_id : f.hom ≫ g = 𝟙 X) : g = f.inv
-- Mathlib/Algebra/Lie/Weights/Basic.lean
@[simp]
lemma iSup_weightSpaceOf_eq_top [IsTriangularizable R L M] (x : L) :
    ⨆ (φ : R), weightSpaceOf M φ x = ⊤
-- Mathlib/Probability/ProbabilityMassFunction/Monad.lean
theorem pure_apply_self : pure a a = 1
-- Mathlib/FieldTheory/SeparableClosure.lean
/-- If `i` is an `F`-algebra homomorphism from `E` to `K`, then the preimage of
`separableClosure F K` under the map `i` is equal to `separableClosure F E`. -/
theorem separableClosure.comap_eq_of_algHom (i : E →ₐ[F] K) :
    (separableClosure F K).comap i = separableClosure F E
-- Mathlib/Algebra/BigOperators/Group/Multiset.lean
@[simp]
theorem coe_sumAddMonoidHom : (sumAddMonoidHom : Multiset α → α) = sum
-- Mathlib/Data/Setoid/Basic.lean
theorem eq_top_iff {s : Setoid α} : s = (⊤ : Setoid α) ↔ ∀ x y : α, s.Rel x y
-- Mathlib/Algebra/Group/Action/Defs.lean
/-- A typeclass indicating that the right (aka `AddOpposite`) and left actions by `M` on `α` are
equal, that is that `M` acts centrally on `α`. This can be thought of as a version of commutativity
for `+ᵥ`. -/
class IsCentralVAdd (M α : Type*) [VAdd M α] [VAdd Mᵃᵒᵖ α] : Prop where
  /-- The right and left actions of `M` on `α` are equal. -/
  op_vadd_eq_vadd : ∀ (m : M) (a : α), AddOpposite.op m +ᵥ a = m +ᵥ a
-- Mathlib/Data/Fin/Basic.lean
lemma predAbove_castPred_of_le (p i : Fin (n + 1)) (h : i ≤ p) (hp : p ≠ last n)
    (hi := Fin.ne_of_lt $ Fin.lt_of_le_of_lt h $ Fin.lt_last_iff_ne_last.2 hp) :
    (castPred p hp).predAbove i = castPred i hi
-- Mathlib/GroupTheory/Perm/List.lean
@[simp]
theorem formPerm_nil : formPerm ([] : List α) = 1