ruc-ai4math/mathlib_handler_benchmark_410 huggingface dataset:
-- Mathlib/Topology/MetricSpace/Algebra.lean
/-- Class `LipschitzAdd M` says that the addition `(+) : X × X → X` is Lipschitz jointly in
the two arguments. -/
class LipschitzAdd [AddMonoid β] : Prop where
  lipschitz_add : ∃ C, LipschitzWith C fun p : β × β => p.1 + p.2
-- Mathlib/Data/Finset/Pointwise.lean
theorem vsub_subset_vsub_left : t₁ ⊆ t₂ → s -ᵥ t₁ ⊆ s -ᵥ t₂
-- Mathlib/CategoryTheory/Monoidal/Types/Basic.lean
@[simp] theorem associator_hom_apply_2_2 {X Y Z : Type u} {x} :
    (((α_ X Y Z).hom : (X ⊗ Y) ⊗ Z → X ⊗ Y ⊗ Z) x).2.2 = x.2
-- Mathlib/Algebra/Module/Submodule/Ker.lean
theorem ker_comp (f : M →ₛₗ[τ₁₂] M₂) (g : M₂ →ₛₗ[τ₂₃] M₃) :
    ker (g.comp f : M →ₛₗ[τ₁₃] M₃) = comap f (ker g)
-- Mathlib/Order/Interval/Finset/Nat.lean
@[simp]
theorem Ico_succ_singleton : Ico a (a + 1) = {a}
-- Mathlib/Analysis/InnerProductSpace/Orthogonal.lean
@[simp]
theorem isOrtho_span {s t : Set E} :
    span 𝕜 s ⟂ span 𝕜 t ↔ ∀ ⦃u⦄, u ∈ s → ∀ ⦃v⦄, v ∈ t → ⟪u, v⟫ = 0
-- Mathlib/Computability/TMToPartrec.lean
theorem contSupp_fix (f k) : contSupp (Cont'.fix f k) = codeSupp f (Cont'.fix f k)
-- Mathlib/RingTheory/Ideal/Operations.lean
theorem sup_iInf_eq_top {s : Finset ι} {J : ι → Ideal R} (h : ∀ i, i ∈ s → I ⊔ J i = ⊤) :
    (I ⊔ ⨅ i ∈ s, J i) = ⊤
-- Mathlib/Geometry/Manifold/Diffeomorph.lean
theorem coe_extChartAt_transDiffeomorph_symm (x : M) :
    ⇑(extChartAt (I.transDiffeomorph e) x).symm = (extChartAt I x).symm ∘ e.symm
-- Mathlib/Geometry/Manifold/LocalInvariantProperties.lean
theorem liftPropOn_symm_of_mem_maximalAtlas [HasGroupoid M G] (hG : G.LocalInvariantProp G Q)
    (hQ : ∀ y, Q id univ y) (he : e ∈ maximalAtlas M G) : LiftPropOn Q e.symm e.target
-- Mathlib/Algebra/LinearRecurrence.lean
/-- `E.mkSol` indeed gives solutions to `E`. -/
theorem is_sol_mkSol (init : Fin E.order → α) : E.IsSolution (E.mkSol init)
-- Mathlib/Algebra/Homology/HomotopyCategory/HomComplex.lean
@[simp]
lemma ofHom_v_comp_d (φ : F ⟶ G) (p q q' : ℤ) (hpq : p + 0 = q) :
    (ofHom φ).v p q hpq ≫ G.d q q' = φ.f p ≫ G.d p q'
-- Mathlib/Algebra/Homology/ShortComplex/Homology.lean
/-- A homology data for a short complex consists of two compatible left and
right homology data -/
structure HomologyData where
  /-- a left homology data -/
  left : S.LeftHomologyData
  /-- a right homology data -/
  right : S.RightHomologyData
  /-- the compatibility isomorphism relating the two dual notions of
    `LeftHomologyData` and `RightHomologyData`  -/
  iso : left.H ≅ right.H
  /-- the pentagon relation expressing the compatibility of the left
  and right homology data -/
  comm : left.π ≫ iso.hom ≫ right.ι = left.i ≫ right.p := by aesop_cat
-- Mathlib/Data/Int/Log.lean
theorem log_zpow {b : ℕ} (hb : 1 < b) (z : ℤ) : log b ((b : R) ^ z : R) = z
-- .lake/packages/lean4/src/lean/Init/Data/Int/DivModLemmas.lean
protected theorem dvd_mul_left (a b : Int) : b ∣ a * b
-- Mathlib/Topology/Order/PartialSups.lean
protected lemma ContinuousWithinAt.partialSups (hf : ∀ k ≤ n, ContinuousWithinAt (f k) s x) :
    ContinuousWithinAt (partialSups f n) s x
-- .lake/packages/lean4/src/lean/Init/Data/Nat/Lcm.lean
theorem dvd_lcm_right (m n : Nat) : n ∣ lcm m n
-- Mathlib/Analysis/NormedSpace/Pointwise.lean
/-- If `s` is a bounded set, then for small enough `r`, the set `{x} + r • s` is contained in any
fixed neighborhood of `x`. -/
theorem eventually_singleton_add_smul_subset {x : E} {s : Set E} (hs : Bornology.IsBounded s)
    {u : Set E} (hu : u ∈ 𝓝 x) : ∀ᶠ r in 𝓝 (0 : 𝕜), {x} + r • s ⊆ u
-- Mathlib/GroupTheory/QuotientGroup.lean
@[to_additive (attr := simp)]
theorem quotientQuotientEquivQuotientAux_mk (x : G ⧸ N) :
    quotientQuotientEquivQuotientAux N M h x = QuotientGroup.map N M (MonoidHom.id G) h x
-- Mathlib/Data/Set/Finite.lean
protected theorem Infinite.image2_right (ht : t.Infinite) (ha : a ∈ s) (hf : InjOn (f a) t) :
    (image2 f s t).Infinite
-- Mathlib/Data/List/Zip.lean
theorem unzip_zip_left :
    ∀ {l₁ : List α} {l₂ : List β}, length l₁ ≤ length l₂ → (unzip (zip l₁ l₂)).1 = l₁
-- Mathlib/Data/Matroid/Restrict.lean
theorem Basis'.encard_eq_encard (hI : M.Basis' I X) (hJ : M.Basis' J X) : I.encard = J.encard
-- Mathlib/Data/Finset/Lattice.lean
theorem inf_sdiff_left (hs : s.Nonempty) (f : ι → α) (a : α) :
    (s.inf fun b => a \ f b) = a \ s.sup f
-- Mathlib/CategoryTheory/Monoidal/Opposite.lean
@[simp] lemma unop_hom_associator (X Y Z : Cᵒᵖ) :
    (α_ X Y Z).hom.unop = (α_ (unop X) (unop Y) (unop Z)).inv
-- Mathlib/Algebra/Polynomial/Module/AEval.lean
lemma injective_comapSubmodule : Injective (comapSubmodule R M a)
-- Mathlib/LinearAlgebra/Matrix/PosDef.lean
protected lemma one [DecidableEq n] : PosSemidef (1 : Matrix n n R)
-- Mathlib/Analysis/Calculus/Deriv/Basic.lean
theorem derivWithin_zero_of_not_differentiableWithinAt (h : ¬DifferentiableWithinAt 𝕜 f s x) :
    derivWithin f s x = 0
-- Mathlib/Algebra/MonoidAlgebra/Basic.lean
theorem of_injective [Nontrivial k] [AddZeroClass G] : Function.Injective (of k G)
-- Mathlib/Topology/VectorBundle/Basic.lean
protected theorem zeroSection (e : Trivialization F (π F E)) [e.IsLinear R] {x : B}
    (hx : x ∈ e.baseSet) : e (zeroSection F E x) = (x, 0)
-- Mathlib/Analysis/Normed/Lp/lpSpace.lean
/-- The canonical finitely-supported approximations to an element `f` of `lp` converge to it, in the
`lp` topology. -/
protected theorem hasSum_single [Fact (1 ≤ p)] (hp : p ≠ ⊤) (f : lp E p) :
    HasSum (fun i : α => lp.single p i (f i : E i)) f
-- Mathlib/Data/List/Sigma.lean
theorem Perm.kunion_right {l₁ l₂ : List (Sigma β)} (p : l₁ ~ l₂) (l) :
    kunion l₁ l ~ kunion l₂ l
-- Mathlib/Data/ENNReal/Operations.lean
theorem lt_top_of_mul_ne_top_right (h : a * b ≠ ∞) (ha : a ≠ 0) : b < ∞
-- Mathlib/Analysis/RCLike/Basic.lean
lemma nonpos_iff_exists_ofReal : z ≤ 0 ↔ ∃ x ≤ (0 : ℝ), x = z
-- Mathlib/Analysis/Analytic/Composition.lean
@[simp]
theorem comp_coeff_zero' (q : FormalMultilinearSeries 𝕜 F G) (p : FormalMultilinearSeries 𝕜 E F)
    (v : Fin 0 → E) : (q.comp p) 0 v = q 0 fun _i => 0
-- Mathlib/Geometry/RingedSpace/OpenImmersion.lean
theorem image_preimage_is_empty (j : Discrete ι) (h : i ≠ j) (U : Opens (F.obj i)) :
    (Opens.map (colimit.ι (F ⋙ SheafedSpace.forgetToPresheafedSpace) j).base).obj
        ((Opens.map (preservesColimitIso SheafedSpace.forgetToPresheafedSpace F).inv.base).obj
          ((sigma_ι_openEmbedding F i).isOpenMap.functor.obj U)) =
      ⊥
-- .lake/packages/lean4/src/lean/Init/Omega/Coeffs.lean
theorem gcd_dvd_dot_left (xs ys : Coeffs) : (gcd xs : Int) ∣ dot xs ys
-- Mathlib/ModelTheory/Complexity.lean
theorem IsPrenex.relabel {m : ℕ} {φ : L.BoundedFormula α m} (h : φ.IsPrenex)
    (f : α → β ⊕ (Fin n)) : (φ.relabel f).IsPrenex
-- Mathlib/Topology/Algebra/Module/Multilinear/Basic.lean
@[simp]
theorem mkPiAlgebra_apply (m : ι → A) : ContinuousMultilinearMap.mkPiAlgebra R ι A m = ∏ i, m i
-- Mathlib/Algebra/Star/NonUnitalSubalgebra.lean
@[simp]
theorem ofLeftInverse'_apply {g : B → A} {f : F} (h : Function.LeftInverse g f) (x : A) :
    ofLeftInverse' h x = f x
-- Mathlib/Analysis/NormedSpace/AffineIsometry.lean
protected theorem continuousAt {x} : ContinuousAt e x
-- Mathlib/MeasureTheory/Measure/GiryMonad.lean
theorem measurable_lintegral {f : α → ℝ≥0∞} (hf : Measurable f) :
    Measurable fun μ : Measure α => ∫⁻ x, f x ∂μ
-- Mathlib/CategoryTheory/Limits/Filtered.lean
/-- `C` is filtered if and only if for every functor `F : J ⥤ C` from a finite category there is
    some `X : C` such that `lim Hom(F·, X)` is nonempty.

    Lemma 3.1.2 of [Kashiwara2006] -/
theorem IsFiltered.iff_nonempty_limit : IsFiltered C ↔
    ∀ {J : Type v} [SmallCategory J] [FinCategory J] (F : J ⥤ C),
      ∃ (X : C), Nonempty (limit (F.op ⋙ yoneda.obj X))
-- Mathlib/GroupTheory/Coprod/Basic.lean
@[to_additive (attr := simp)] theorem snd_apply_inr (x : N) : snd (inr x : M ∗ N) = x
-- Mathlib/InformationTheory/Hamming.lean
@[simp]
theorem ofHamming_add [∀ i, Add (β i)] {x y : Hamming β} :
    ofHamming (x + y) = ofHamming x + ofHamming y
-- Mathlib/Analysis/InnerProductSpace/PiL2.lean
theorem LinearIsometry.extend_apply (L : S →ₗᵢ[𝕜] V) (s : S) : L.extend s = L s
-- Mathlib/LinearAlgebra/TensorProduct/Basic.lean
@[simp]
theorem map_zero_right (f : M →ₗ[R] P) : map f (0 : N →ₗ[R] Q) = 0
-- Mathlib/Analysis/Quaternion.lean
@[simp, norm_cast]
theorem coeComplex_imJ (z : ℂ) : (z : ℍ).imJ = 0
-- Mathlib/Algebra/Bounds.lean
@[to_additive]
theorem ciSup_mul (hf : BddAbove (range f)) (a : G) : (⨆ i, f i) * a = ⨆ i, f i * a
-- Mathlib/Data/Int/GCD.lean
@[simp]
theorem gcd_zero_right (i : ℤ) : gcd i 0 = natAbs i
-- Mathlib/Order/Basic.lean
@[simp]
theorem Pi.compl_apply [∀ i, HasCompl (π i)] (x : ∀ i, π i) (i : ι) :
    xᶜ i = (x i)ᶜ
-- Mathlib/Algebra/Group/Units.lean
/-- Multiplication by a `u : Mˣ` on the left doesn't affect `IsUnit`. -/
@[to_additive (attr := simp)
"Addition of a `u : AddUnits M` on the left doesn't affect `IsAddUnit`."]
theorem Units.isUnit_units_mul {M : Type*} [Monoid M] (u : Mˣ) (a : M) :
    IsUnit (↑u * a) ↔ IsUnit a
-- Mathlib/Combinatorics/SimpleGraph/Maps.lean
lemma map_adj_apply {G : SimpleGraph V} {f : V ↪ W} {a b : V} :
    (G.map f).Adj (f a) (f b) ↔ G.Adj a b
-- Mathlib/Algebra/Order/Module/Defs.lean
lemma pos_of_smul_pos_right [SMulPosReflectLT α β] (h : 0 < a • b) (hb : 0 ≤ b) : 0 < a
-- Mathlib/CategoryTheory/Limits/Shapes/Biproducts.lean
@[ext 1001]
theorem biproduct.hom_ext {f : J → C} [HasBiproduct f] {Z : C} (g h : Z ⟶ ⨁ f)
    (w : ∀ j, g ≫ biproduct.π f j = h ≫ biproduct.π f j) : g = h
-- .lake/packages/batteries/Batteries/Data/HashMap/WF.lean
theorem WF.mapVal {α β γ} {f : α → β → γ} [BEq α] [Hashable α]
    {m : Imp α β} (H : WF m) : WF (mapVal f m)
-- Mathlib/Data/Finset/Basic.lean
theorem union_val_nd (s t : Finset α) : (s ∪ t).1 = ndunion s.1 t.1
-- Mathlib/Algebra/Polynomial/Eval.lean
theorem mul_X_add_natCast_comp {n : ℕ} :
    (p * (X + (n : R[X]))).comp q = p.comp q * (q + n)
-- Mathlib/Analysis/Normed/Lp/PiLp.lean
@[simp] theorem _root_.LinearIsometryEquiv.piLpCurry_symm_apply
    (f : PiLp p (fun i => PiLp p (α i))) :
    (_root_.LinearIsometryEquiv.piLpCurry 𝕜 p α).symm f =
      (WithLp.equiv _ _).symm (Sigma.uncurry fun i j => f i j)
-- .lake/packages/lean4/src/lean/Init/Data/Nat/Basic.lean
protected theorem le_of_sub_eq_zero : ∀ {n m}, n - m = 0 → n ≤ m
-- Mathlib/Data/Ordmap/Ordset.lean
theorem Bounded.dual_iff {t : Ordnode α} {o₁ o₂} :
    Bounded t o₁ o₂ ↔ @Bounded αᵒᵈ _ (.dual t) o₂ o₁
-- Mathlib/Analysis/CstarAlgebra/Multiplier.lean
@[simp]
theorem add_toProd (a b : 𝓜(𝕜, A)) : (a + b).toProd = a.toProd + b.toProd
-- Mathlib/LinearAlgebra/TensorPower.lean
theorem algebraMap₀_one : (algebraMap₀ 1 : (⨂[R]^0) M) = ₜ1
-- Mathlib/Algebra/MvPolynomial/Variables.lean
theorem mem_support_not_mem_vars_zero {f : MvPolynomial σ R} {x : σ →₀ ℕ} (H : x ∈ f.support)
    {v : σ} (h : v ∉ vars f) : x v = 0
-- Mathlib/Logic/Basic.lean
protected theorem Decidable.forall_or_left {q : Prop} {p : α → Prop} [Decidable q] :
    (∀ x, q ∨ p x) ↔ q ∨ ∀ x, p x
-- Mathlib/AlgebraicGeometry/PrimeSpectrum/Basic.lean
theorem basicOpen_mul_le_left (f g : R) : basicOpen (f * g) ≤ basicOpen f
-- Mathlib/CategoryTheory/Monoidal/Functor.lean
/-- The identity lax monoidal functor. -/
@[simps]
def id : OplaxMonoidalFunctor.{v₁, v₁} C C
-- Mathlib/SetTheory/Game/PGame.lean
@[simp]
theorem moveLeft_neg' {x : PGame} (i) : (-x).moveLeft i = -x.moveRight (toLeftMovesNeg.symm i)
-- Mathlib/NumberTheory/Padics/RingHoms.lean
theorem toZModPow_eq_iff_ext {R : Type*} [NonAssocSemiring R] {g g' : R →+* ℤ_[p]} :
    (∀ n, (toZModPow n).comp g = (toZModPow n).comp g') ↔ g = g'
-- Mathlib/Algebra/Order/Nonneg/Field.lean
lemma nnqsmul_nonneg (q : ℚ≥0) (ha : 0 ≤ a) : 0 ≤ q • a
-- Mathlib/Data/Set/Pointwise/Basic.lean
@[to_additive (attr := simp)]
theorem image_mul_right : (· * b) '' t = (· * b⁻¹) ⁻¹' t
-- Mathlib/MeasureTheory/Integral/BoundedContinuousFunction.lean
lemma apply_le_nndist_zero {X : Type*} [TopologicalSpace X] (f : X →ᵇ ℝ≥0) (x : X) :
    f x ≤ nndist 0 f
-- Mathlib/RingTheory/MvPolynomial/NewtonIdentities.lean
private theorem disjUnion_filter_pairs_eq_pairs (k : ℕ) :
    disjUnion (filter (fun t ↦ card t.fst < k) (pairs σ k))
    (filter (fun t ↦ card t.fst = k) (pairs σ k)) (disjoint_filter_pairs_lt_filter_pairs_eq σ k) =
    pairs σ k
-- Mathlib/CategoryTheory/Triangulated/Yoneda.lean
lemma preadditiveCoyoneda_homologySequenceδ_apply
    (A : Cᵒᵖ) (T : Triangle C) (n₀ n₁ : ℤ) (h : n₀ + 1 = n₁) (x : A.unop ⟶ T.obj₃⟦n₀⟧) :
    (preadditiveCoyoneda.obj A).homologySequenceδ T n₀ n₁ h x =
      x ≫ T.mor₃⟦n₀⟧' ≫ (shiftFunctorAdd' C 1 n₀ n₁ (by omega)).inv.app _
-- Mathlib/FieldTheory/Fixed.lean
theorem of_eval₂ (f : Polynomial (FixedPoints.subfield G F))
    (hf : Polynomial.eval₂ (Subfield.subtype <| FixedPoints.subfield G F) x f = 0) :
    minpoly G F x ∣ f
-- Mathlib/Topology/Sets/Opens.lean
/-- the coercion `Opens α → Set α` applied to a pair is the same as taking the first component -/
@[simp]
theorem coe_mk {U : Set α} {hU : IsOpen U} : ↑(⟨U, hU⟩ : Opens α) = U
-- Mathlib/Algebra/Group/Equiv/TypeTags.lean
/-- Multiplicative equivalence between additive endomorphisms of an `AddZeroClass` `A`
and multiplicative endomorphisms of `Multiplicative A`. -/
@[simps!] def addMonoidEndToMultiplicative (A : Type*) [AddZeroClass A] :
    AddMonoid.End A ≃* Monoid.End (Multiplicative A)
-- Mathlib/LinearAlgebra/TensorProduct/Basis.lean
@[simp]
lemma Basis.baseChange_apply (b : Basis ι R M) (i) :
    b.baseChange S i = 1 ⊗ₜ b i
-- .lake/packages/batteries/Batteries/Data/Sum/Lemmas.lean
theorem elim_map {f₁ : α → β} {f₂ : β → ε} {g₁ : γ → δ} {g₂ : δ → ε} {x} :
    Sum.elim f₂ g₂ (Sum.map f₁ g₁ x) = Sum.elim (f₂ ∘ f₁) (g₂ ∘ g₁) x
-- Mathlib/FieldTheory/IsSepClosed.lean
/-- If `k` is separably closed, `K / k` is a field extension, `L / k` is an intermediate field
which is separable, then `L` is equal to `k`. A corollary of `IsSepClosed.algebraMap_surjective`. -/
theorem IntermediateField.eq_bot_of_isSepClosed_of_isSeparable [IsSepClosed k] [Algebra k K]
    (L : IntermediateField k K) [Algebra.IsSeparable k L] : L = ⊥
-- Mathlib/Algebra/BigOperators/Group/List.lean
@[to_additive (attr := simp)]
theorem alternatingProd_cons (a : α) (l : List α) :
    alternatingProd (a :: l) = a / alternatingProd l
-- Mathlib/Data/Sym/Sym2.lean
theorem eq_of_ne_mem {x y : α} {z z' : Sym2 α} (h : x ≠ y) (h1 : x ∈ z) (h2 : y ∈ z) (h3 : x ∈ z')
    (h4 : y ∈ z') : z = z'
-- Mathlib/Algebra/Order/Sub/Canonical.lean
protected theorem tsub_lt_tsub_iff_left_of_le_of_le [ContravariantClass α α (· + ·) (· < ·)]
    (hb : AddLECancellable b) (hab : AddLECancellable (a - b)) (h₁ : b ≤ a) (h₂ : c ≤ a) :
    a - b < a - c ↔ c < b
-- Mathlib/GroupTheory/Perm/Cycle/Basic.lean
theorem isCycle_iff_sameCycle (hx : f x ≠ x) : IsCycle f ↔ ∀ {y}, SameCycle f x y ↔ f y ≠ y
-- Mathlib/Data/Real/Irrational.lean
theorem rat_sub (h : Irrational x) : Irrational (q - x)
-- Mathlib/LinearAlgebra/AffineSpace/Combination.lean
/-- A weighted sum may be split into a subtraction of such sums over two subsets. -/
theorem weightedVSub_sdiff_sub [DecidableEq ι] {s₂ : Finset ι} (h : s₂ ⊆ s) (w : ι → k)
    (p : ι → P) : (s \ s₂).weightedVSub p w - s₂.weightedVSub p (-w) = s.weightedVSub p w
-- Mathlib/MeasureTheory/Constructions/BorelSpace/Order.lean
/-- `limsup` over `ℕ` is measurable. See `measurable_limsup'` for a version with a general filter.
-/
@[measurability]
theorem measurable_limsup {f : ℕ → δ → α} (hf : ∀ i, Measurable (f i)) :
    Measurable fun x => limsup (fun i => f i x) atTop
-- Mathlib/MeasureTheory/MeasurableSpace/CountablyGenerated.lean
lemma generateFrom_countableGeneratingSet [m : MeasurableSpace α] [h : CountablyGenerated α] :
    generateFrom (countableGeneratingSet α) = m
-- Mathlib/Topology/UniformSpace/CompactConvergence.lean
theorem uniformEmbedding_comp (g : C(β, δ)) (hg : UniformEmbedding g) :
    UniformEmbedding (ContinuousMap.comp g : C(α, β) → C(α, δ))
-- Mathlib/Algebra/Order/Monoid/Unbundled/WithTop.lean
@[to_additive (attr := simp)]
protected theorem map_one {β} (f : α → β) : (1 : WithBot α).map f = (f 1 : WithBot β)
-- Mathlib/LinearAlgebra/Basis.lean
theorem repr_reindex_apply (i' : ι') : (b.reindex e).repr x i' = b.repr x (e.symm i')
-- Mathlib/CategoryTheory/Comma/Presheaf.lean
/-- Functoriality of `restrictedYonedaObj η` in `η`. -/
@[simps]
def restrictedYonedaObjMap₁ {F G : Cᵒᵖ ⥤ Type v} {η : F ⟶ A} {μ : G ⟶ A} (ε : F ⟶ G)
    (hε : ε ≫ μ = η) : restrictedYonedaObj η ⟶ restrictedYonedaObj μ
-- Mathlib/LinearAlgebra/TensorAlgebra/Basic.lean
/-- If `C` holds for the `algebraMap` of `r : R` into `TensorAlgebra R M`, the `ι` of `x : M`,
and is preserved under addition and muliplication, then it holds for all of `TensorAlgebra R M`.
-/
@[elab_as_elim]
theorem induction {C : TensorAlgebra R M → Prop}
    (algebraMap : ∀ r, C (algebraMap R (TensorAlgebra R M) r)) (ι : ∀ x, C (ι R x))
    (mul : ∀ a b, C a → C b → C (a * b)) (add : ∀ a b, C a → C b → C (a + b))
    (a : TensorAlgebra R M) : C a
-- Mathlib/Algebra/Order/GroupWithZero/Unbundled.lean
/-- Assumes right covariance. -/
theorem Right.mul_nonneg [MulPosMono α] (ha : 0 ≤ a) (hb : 0 ≤ b) : 0 ≤ a * b
-- Mathlib/Data/Finset/Sort.lean
@[simp]
theorem sort_nodup (s : Finset α) : (sort r s).Nodup
-- Mathlib/SetTheory/Ordinal/Arithmetic.lean
@[simp]
theorem limitRecOn_zero {C} (H₁ H₂ H₃) : @limitRecOn C 0 H₁ H₂ H₃ = H₁
-- Mathlib/Data/Set/Basic.lean
theorem inter_union_distrib_left (s t u : Set α) : s ∩ (t ∪ u) = s ∩ t ∪ s ∩ u
-- Mathlib/MeasureTheory/OuterMeasure/Induced.lean
/-- If `m₁ s = op (m₂ s)` for all `s`, then the same is true for `m₁.trim` and `m₂.trim`. -/
theorem trim_op {m₁ m₂ : OuterMeasure α} {op : ℝ≥0∞ → ℝ≥0∞} (h : ∀ s, m₁ s = op (m₂ s))
    (s : Set α) : m₁.trim s = op (m₂.trim s)
-- Mathlib/Topology/Algebra/InfiniteSum/Defs.lean
@[to_additive]
theorem multipliable_of_ne_finset_one (hf : ∀ b ∉ s, f b = 1) : Multipliable f
-- Mathlib/Analysis/SpecialFunctions/Complex/Arg.lean
theorem arg_eq_nhds_of_im_neg (hz : im z < 0) : arg =ᶠ[𝓝 z] fun x => -Real.arccos (x.re / abs x)
-- Mathlib/Data/Multiset/Basic.lean
theorem union_le_union_left (h : s ≤ t) (u) : u ∪ s ≤ u ∪ t
-- Mathlib/Data/Complex/Basic.lean
@[simp]
theorem I_sq : I ^ 2 = -1
-- Mathlib/Algebra/ModEq.lean
theorem modEq_sub (a b : α) : a ≡ b [PMOD b - a]
-- Mathlib/CategoryTheory/Functor/Flat.lean
theorem flat_of_preservesFiniteLimits [HasFiniteLimits C] (F : C ⥤ D) [PreservesFiniteLimits F] :
    RepresentablyFlat F
-- Mathlib/Algebra/Module/Submodule/Map.lean
theorem comap_injective_of_surjective : Function.Injective (comap f)
-- Mathlib/RingTheory/UniqueFactorizationDomain.lean
theorem MulEquiv.uniqueFactorizationMonoid_iff (e : α ≃* β) :
    UniqueFactorizationMonoid α ↔ UniqueFactorizationMonoid β
-- Mathlib/MeasureTheory/Function/ConvergenceInMeasure.lean
protected theorem congr' (h_left : ∀ᶠ i in l, f i =ᵐ[μ] f' i) (h_right : g =ᵐ[μ] g')
    (h_tendsto : TendstoInMeasure μ f l g) : TendstoInMeasure μ f' l g'
-- Mathlib/Topology/SeparatedMap.lean
lemma Function.Injective.IsLocallyInjective {f : X → Y} (inj : f.Injective) :
    IsLocallyInjective f
-- Mathlib/Topology/PartitionOfUnity.lean
theorem exists_finset_toPartitionOfUnity_eventuallyEq (i : ι) (x : X) : ∃ t : Finset ι,
    f.toPartitionOfUnity i =ᶠ[𝓝 x] f i * ∏ j ∈ t.filter fun j => WellOrderingRel j i, (1 - f j)
-- Mathlib/Algebra/Polynomial/Basic.lean
theorem sum_eq_of_subset {S : Type*} [AddCommMonoid S] {p : R[X]} (f : ℕ → R → S)
    (hf : ∀ i, f i 0 = 0) {s : Finset ℕ} (hs : p.support ⊆ s) :
    p.sum f = ∑ n ∈ s, f n (p.coeff n)
-- Mathlib/NumberTheory/Multiplicity.lean
theorem pow_sub_pow_of_prime {p : R} (hp : Prime p) {x y : R} (hxy : p ∣ x - y) (hx : ¬p ∣ x)
    {n : ℕ} (hn : ¬p ∣ n) : multiplicity p (x ^ n - y ^ n) = multiplicity p (x - y)
-- Mathlib/Analysis/InnerProductSpace/Projection.lean
/-- If `K` admits an orthogonal projection, then the orthogonal complement of its orthogonal
complement is itself. -/
@[simp]
theorem Submodule.orthogonal_orthogonal [HasOrthogonalProjection K] : Kᗮᗮ = K
-- Mathlib/Order/UpperLower/Basic.lean
@[simp]
theorem prod_self_le_prod_self : s₁ ×ˢ s₁ ≤ s₂ ×ˢ s₂ ↔ s₁ ≤ s₂
-- Mathlib/Geometry/Euclidean/Circumcenter.lean
/-- `p` is equidistant from two points in `s` if and only if its
`orthogonalProjection` is. -/
theorem dist_eq_iff_dist_orthogonalProjection_eq {s : AffineSubspace ℝ P} [Nonempty s]
    [HasOrthogonalProjection s.direction] {p1 p2 : P} (p3 : P) (hp1 : p1 ∈ s) (hp2 : p2 ∈ s) :
    dist p1 p3 = dist p2 p3 ↔
      dist p1 (orthogonalProjection s p3) = dist p2 (orthogonalProjection s p3)
-- Mathlib/Analysis/Convex/Function.lean
/-- For a function on a convex set in a linearly ordered space (where the order and the algebraic
structures aren't necessarily compatible), in order to prove that it is strictly convex, it suffices
to verify the inequality `f (a • x + b • y) < a • f x + b • f y` for `x < y` and positive `a`, `b`.
The main use case is `E = 𝕜` however one can apply it, e.g., to `𝕜^n` with lexicographic order. -/
theorem LinearOrder.strictConvexOn_of_lt (hs : Convex 𝕜 s)
    (hf : ∀ ⦃x⦄, x ∈ s → ∀ ⦃y⦄, y ∈ s → x < y → ∀ ⦃a b : 𝕜⦄, 0 < a → 0 < b → a + b = 1 →
      f (a • x + b • y) < a • f x + b • f y) :
    StrictConvexOn 𝕜 s f
-- Mathlib/Data/Multiset/Interval.lean
theorem card_Ico :
    (Finset.Ico s t).card = ∏ i ∈ s.toFinset ∪ t.toFinset, (t.count i + 1 - s.count i) - 1
-- Mathlib/SetTheory/ZFC/Basic.lean
private lemma toSet_equiv_aux {s : Set ZFSet.{u}} (hs : Small.{u} s) :
  (mk <| PSet.mk (Shrink s) fun x ↦ ((equivShrink s).symm x).1.out).toSet = s
-- Mathlib/SetTheory/Cardinal/Finite.lean
lemma card_ne_zero : Nat.card α ≠ 0 ↔ Nonempty α ∧ Finite α
-- Mathlib/Algebra/Group/Subgroup/Finite.lean
@[to_additive]
theorem card_top : Nat.card (⊤ : Subgroup G) = Nat.card G
-- Mathlib/Algebra/Algebra/Equiv.lean
protected theorem ext_iff {f g : A₁ ≃ₐ[R] A₂} : f = g ↔ ∀ x, f x = g x
-- Mathlib/Algebra/Group/Submonoid/Operations.lean
@[to_additive (attr := simp) AddEquiv.add_submonoid_map_symm_apply]
theorem submonoidMap_symm_apply (e : M ≃* N) (S : Submonoid M) (g : S.map (e : M →* N)) :
    (e.submonoidMap S).symm g = ⟨e.symm g, SetLike.mem_coe.1 <| Set.mem_image_equiv.1 g.2⟩
-- Mathlib/Algebra/Homology/HomologicalComplex.lean
@[simp]
theorem mk_X_2 : (mk X₀ X₁ X₂ d₀ d₁ s succ).X 2 = X₂
-- Mathlib/Analysis/Calculus/Deriv/ZPow.lean
theorem DifferentiableWithinAt.zpow (hf : DifferentiableWithinAt 𝕜 f t a) (h : f a ≠ 0 ∨ 0 ≤ m) :
    DifferentiableWithinAt 𝕜 (fun x => f x ^ m) t a
-- Mathlib/CategoryTheory/Sites/Types.lean
theorem isSheaf_yoneda' {α : Type u} : IsSheaf typesGrothendieckTopology (yoneda.obj α)
-- Mathlib/Order/Cover.lean
lemma WCovBy.of_le_of_le' (hac : a ⩿ c) (hab : a ≤ b) (hbc : b ≤ c) : a ⩿ b
-- Mathlib/CategoryTheory/Adjunction/Unique.lean
@[reassoc (attr := simp)]
theorem unit_rightAdjointUniq_hom_app {F : C ⥤ D} {G G' : D ⥤ C} (adj1 : F ⊣ G) (adj2 : F ⊣ G')
    (x : C) : adj1.unit.app x ≫ (rightAdjointUniq adj1 adj2).hom.app (F.obj x) =
      adj2.unit.app x
-- Mathlib/FieldTheory/IsSepClosed.lean
theorem exists_pow_nat_eq [IsSepClosed k] (x : k) (n : ℕ) [hn : NeZero (n : k)] :
    ∃ z, z ^ n = x
-- Mathlib/Topology/UniformSpace/Pi.lean
theorem Pi.uniformContinuous_postcomp {α : Type*} [UniformSpace α] {g : α → β}
    (hg : UniformContinuous g) : UniformContinuous (g ∘ · : (ι → α) → (ι → β))
-- Mathlib/Topology/MetricSpace/Pseudo/Constructions.lean
@[to_additive (attr := simp)]
lemma dist_op (x y : α) : dist (op x) (op y) = dist x y
-- Mathlib/RingTheory/Coalgebra/Equiv.lean
/-- Coalgebra equivalences are transitive. -/
@[trans, simps!]
def trans (e₁₂ : A ≃ₗc[R] B) (e₂₃ : B ≃ₗc[R] C) : A ≃ₗc[R] C
-- Mathlib/Algebra/MonoidAlgebra/Basic.lean
theorem single_mul_apply [AddGroup G] (r : k) (x : G) (f : k[G]) (y : G) :
    (single x r * f) y = r * f (-x + y)
-- Mathlib/Analysis/NormedSpace/Real.lean
theorem interior_closedBall (x : E) {r : ℝ} (hr : r ≠ 0) :
    interior (closedBall x r) = ball x r
-- Mathlib/Topology/MetricSpace/GromovHausdorffRealized.lean
private theorem HD_lipschitz_aux1 (f g : Cb X Y) :
    (⨆ x, ⨅ y, f (inl x, inr y)) ≤ (⨆ x, ⨅ y, g (inl x, inr y)) + dist f g
-- Mathlib/Analysis/InnerProductSpace/Projection.lean
/-- The characterization of the orthogonal projection.  -/
@[simp]
theorem orthogonalProjection_inner_eq_zero (v : E) :
    ∀ w ∈ K, ⟪v - orthogonalProjection K v, w⟫ = 0