ruc-ai4math/mathlib_handler_benchmark_410 huggingface dataset:
-- Mathlib/Topology/MetricSpace/HausdorffDistance.lean
theorem _root_.IsCompact.exists_infEdist_eq_edist (hs : IsCompact s) (hne : s.Nonempty) (x : α) :
    ∃ y ∈ s, infEdist x s = edist x y
-- Mathlib/CategoryTheory/Preadditive/AdditiveFunctor.lean
lemma additive_of_iso {G : C ⥤ D} (e : F ≅ G) : G.Additive
-- Mathlib/Data/Finset/Basic.lean
theorem union_inter_distrib_left (s t u : Finset α) : s ∪ t ∩ u = (s ∪ t) ∩ (s ∪ u)
-- Mathlib/Combinatorics/Pigeonhole.lean
/-- The pigeonhole principle for finitely many pigeons counted by heads: given a function `f`, a
finite sets `s` and `t`, and a number `b` such that `card s ≤ card t • b`, there exists `y ∈ t` such
that its preimage in `s` has no more than `b` elements.
See also `Finset.exists_card_fiber_lt_of_card_lt_nsmul` for a stronger statement. -/
theorem exists_card_fiber_le_of_card_le_nsmul (ht : t.Nonempty) (hb : ↑s.card ≤ t.card • b) :
    ∃ y ∈ t, ↑(s.filter fun x => f x = y).card ≤ b
-- Mathlib/Analysis/Normed/Group/Seminorm.lean
@[to_additive]
theorem add_comp (f : F →* E) : (p + q).comp f = p.comp f + q.comp f
-- Mathlib/Order/WithBot.lean
@[simp] lemma map₂_bot_right (f : α → β → γ) (a) : map₂ f a ⊥ = ⊥
-- Mathlib/Data/Matrix/Basic.lean
@[simp]
theorem conjTranspose_add [AddMonoid α] [StarAddMonoid α] (M N : Matrix m n α) :
    (M + N)ᴴ = Mᴴ + Nᴴ
-- Mathlib/CategoryTheory/Adjunction/Unique.lean
@[simp]
lemma natTransEquiv_comp {F F' F'' : C ⥤ D} {G G' G'' : D ⥤ C}
    (adj1 : F ⊣ G) (adj2 : F' ⊣ G') (adj3 : F'' ⊣ G'') (f : G ⟶ G') (g : G' ⟶ G'') :
    natTransEquiv adj2 adj3 g ≫ natTransEquiv adj1 adj2 f = natTransEquiv adj1 adj3 (f ≫ g)
-- Mathlib/Topology/FiberBundle/Trivialization.lean
theorem symm_apply_apply_mk (e : Trivialization F (π F E)) {b : B} (hb : b ∈ e.baseSet) (y : E b) :
    e.symm b (e ⟨b, y⟩).2 = y
-- Mathlib/LinearAlgebra/Prod.lean
@[simp, deprecated (since := "2024-06-05")]
theorem tailings_zero (f : M × N →ₗ[R] M) (i : Injective f) : tailings f i 0 = tailing f i 0
-- Mathlib/CategoryTheory/Preadditive/Generator.lean
theorem Preadditive.isSeparator_iff (G : C) :
    IsSeparator G ↔ ∀ ⦃X Y : C⦄ (f : X ⟶ Y), (∀ h : G ⟶ X, h ≫ f = 0) → f = 0
-- Mathlib/Analysis/ODE/PicardLindelof.lean
@[continuity, fun_prop]
theorem continuous_proj : Continuous v.proj
-- Mathlib/Topology/Algebra/InfiniteSum/NatInt.lean
@[to_additive]
theorem Multipliable.tendsto_atTop_one {f : ℕ → G} (hf : Multipliable f) :
    Tendsto f atTop (𝓝 1)
-- Mathlib/Topology/Sets/Order.lean
/-- Reinterpret an upper clopen as an upper set. -/
@[simps]
def toUpperSet (s : ClopenUpperSet α) : UpperSet α
-- Mathlib/Logic/Basic.lean
theorem imp_iff_right_iff {a b : Prop} : (a → b ↔ b) ↔ a ∨ b
-- Mathlib/NumberTheory/ModularForms/SlashInvariantForms.lean
@[simp]
theorem one_coe_eq_one : ((1 : SlashInvariantForm Γ 0) : ℍ → ℂ) = 1
-- Mathlib/CategoryTheory/Preadditive/Basic.lean
@[reassoc]
theorem neg_comp_neg : (-f) ≫ (-g) = f ≫ g
-- .lake/packages/lean4/src/lean/Init/Data/List/Basic.lean
@[simp] theorem foldr_cons (l : List α) : (a :: l).foldr f b = f a (l.foldr f b)
-- Mathlib/Algebra/Module/Equiv/Defs.lean
protected theorem image_symm_eq_preimage (s : Set M₂) : e.symm '' s = e ⁻¹' s
-- Mathlib/Topology/MetricSpace/Pseudo/Defs.lean
@[simp]
theorem ball_eq_empty : ball x ε = ∅ ↔ ε ≤ 0
-- Mathlib/Geometry/RingedSpace/PresheafedSpace.lean
theorem congr_app {X Y : PresheafedSpace C} {α β : X ⟶ Y} (h : α = β) (U) :
    α.c.app U = β.c.app U ≫ X.presheaf.map (eqToHom (by subst h; rfl))
-- .lake/packages/lean4/src/lean/Init/Data/List/Lemmas.lean
theorem foldr_map (f : α₁ → α₂) (g : α₂ → β → β) (l : List α₁) (init : β) :
    (l.map f).foldr g init = l.foldr (fun x y => g (f x) y) init
-- Mathlib/Topology/MetricSpace/Pseudo/Constructions.lean
protected lemma UniformContinuous.nndist [UniformSpace β] {f g : β → α} (hf : UniformContinuous f)
    (hg : UniformContinuous g) : UniformContinuous fun b => nndist (f b) (g b)
-- Mathlib/AlgebraicGeometry/Scheme.lean
@[reassoc]
lemma stalkMap_congr_point (x x' : X) (hxx' : x = x') :
    f.stalkMap x ≫ X.presheaf.stalkSpecializes (specializes_of_eq hxx'.symm) =
      Y.presheaf.stalkSpecializes (specializes_of_eq <| hxx' ▸ rfl) ≫ f.stalkMap x'
-- Mathlib/Data/Rel.lean
@[ext] theorem ext {r s : Rel α β} : (∀ a, r a = s a) → r = s
-- Mathlib/Data/DFinsupp/Basic.lean
@[simp]
theorem single_add (i : ι) (b₁ b₂ : β i) : single i (b₁ + b₂) = single i b₁ + single i b₂
-- Mathlib/GroupTheory/Perm/Cycle/Factors.lean
theorem SameCycle.cycleOf_eq (h : SameCycle f x y) : cycleOf f x = cycleOf f y
-- Mathlib/Tactic/Abel.lean
lemma subst_into_smulg {α} [AddCommGroup α]
    (l r tl tr t) (prl : l = tl) (prr : r = tr)
    (prt : @smulg α _ tl tr = t) : smulg l r = t
-- Mathlib/Algebra/Ring/Subring/Basic.lean
@[simp, norm_cast]
theorem coe_add (x y : s) : (↑(x + y) : R) = ↑x + ↑y
-- Mathlib/Data/Setoid/Basic.lean
@[trans]
theorem trans' (r : Setoid α) : ∀ {x y z}, r.Rel x y → r.Rel y z → r.Rel x z
-- Mathlib/Data/Fintype/Basic.lean
theorem choose_spec (hp : ∃! a, p a) : p (choose p hp)
-- Mathlib/MeasureTheory/Function/AEMeasurableSequence.lean
theorem aeSeq_eq_fun_ae [Countable ι] (hf : ∀ i, AEMeasurable (f i) μ)
    (hp : ∀ᵐ x ∂μ, p x fun n => f n x) : ∀ᵐ a : α ∂μ, ∀ i : ι, aeSeq hf p i a = f i a
-- Mathlib/Probability/Kernel/Composition.lean
lemma isSFiniteKernel_prodMkRight_unit {κ : Kernel α β} :
    IsSFiniteKernel (prodMkRight Unit κ) ↔ IsSFiniteKernel κ
-- Mathlib/FieldTheory/SplittingField/Construction.lean
theorem natDegree_removeFactor' {f : K[X]} {n : ℕ} (hfn : f.natDegree = n + 1) :
    f.removeFactor.natDegree = n
-- Mathlib/Logic/Equiv/Set.lean
theorem sumCompl_symm_apply_of_mem {α : Type u} {s : Set α} [DecidablePred (· ∈ s)] {x : α}
    (hx : x ∈ s) : (Equiv.Set.sumCompl s).symm x = Sum.inl ⟨x, hx⟩
-- Mathlib/CategoryTheory/Adjunction/Over.lean
/--
The functor from `C` to `Over X` which sends `Y : C` to `π₁ : X ⨯ Y ⟶ X`, sometimes denoted `X*`.
-/
@[simps! obj_left obj_hom map_left]
def star [HasBinaryProducts C] : C ⥤ Over X
-- Mathlib/Data/Finset/Basic.lean
theorem mem_of_mem_inter_left {a : α} {s₁ s₂ : Finset α} (h : a ∈ s₁ ∩ s₂) : a ∈ s₁
-- Mathlib/GroupTheory/Coset.lean
/-- The natural embedding `α ⧸ (⨅ i, f i) ↪ Π i, α ⧸ f i`. -/
@[to_additive (attr := simps) "The natural embedding `α ⧸ (⨅ i, f i) ↪ Π i, α ⧸ f i`."]
def quotientiInfEmbedding {ι : Type*} (f : ι → Subgroup α) : (α ⧸ ⨅ i, f i) ↪ ∀ i, α ⧸ f i
-- Mathlib/Probability/ProbabilityMassFunction/Basic.lean
@[simp]
theorem toMeasure_inj {p q : PMF α} : p.toMeasure = q.toMeasure ↔ p = q
-- Mathlib/Data/Int/Log.lean
@[simp]
theorem log_one_right (b : ℕ) : log b (1 : R) = 0
-- Mathlib/Data/Nat/Defs.lean
@[deprecated mod_mul_right_div_self (since := "2024-05-29")]
lemma div_mod_eq_mod_mul_div (a b c : ℕ) : a / b % c = a % (b * c) / b
-- Mathlib/NumberTheory/NumberField/Embeddings.lean
@[simp]
theorem mkComplex_coe (φ : { φ : K →+* ℂ // ¬ComplexEmbedding.IsReal φ }) :
    (mkComplex φ : InfinitePlace K) = mk (φ : K →+* ℂ)
-- Mathlib/GroupTheory/Torsion.lean
lemma isTorsionFree_iff_noZeroSMulDivisors_nat {M : Type*} [AddMonoid M] :
    AddMonoid.IsTorsionFree M ↔ NoZeroSMulDivisors ℕ M
-- Mathlib/Data/Finsupp/Defs.lean
@[ext]
theorem mulHom_ext' [MulOneClass N] {f g : Multiplicative (α →₀ M) →* N}
    (H : ∀ x, f.comp (AddMonoidHom.toMultiplicative (singleAddHom x)) =
              g.comp (AddMonoidHom.toMultiplicative (singleAddHom x))) :
    f = g
-- Mathlib/LinearAlgebra/AffineSpace/Combination.lean
/-- The value of `weightedVSub`, where the given points are equal and the sum of the weights
is 0. -/
@[simp]
theorem weightedVSub_apply_const (w : ι → k) (p : P) (h : ∑ i ∈ s, w i = 0) :
    s.weightedVSub (fun _ => p) w = 0
-- .lake/packages/batteries/Batteries/Data/Nat/Gcd.lean
theorem Coprime.mul (H1 : Coprime m k) (H2 : Coprime n k) : Coprime (m * n) k
-- Mathlib/MeasureTheory/Group/Measure.lean
/-- The image of a finite Haar measure under a continuous surjective group homomorphism is again
a Haar measure. See also `isHaarMeasure_map`. -/
@[to_additive
"The image of a finite additive Haar measure under a continuous surjective additive group
homomorphism is again an additive Haar measure. See also `isAddHaarMeasure_map`."]
theorem isHaarMeasure_map_of_isFiniteMeasure
    [BorelSpace G] [TopologicalGroup G] {H : Type*} [Group H]
    [TopologicalSpace H] [MeasurableSpace H] [BorelSpace H] [TopologicalGroup H] [IsFiniteMeasure μ]
    (f : G →* H) (hf : Continuous f) (h_surj : Surjective f) :
    IsHaarMeasure (Measure.map f μ)
-- Mathlib/Analysis/Normed/Group/Basic.lean
@[to_additive norm_add₃_le]
theorem norm_mul₃_le (a b c : E) : ‖a * b * c‖ ≤ ‖a‖ + ‖b‖ + ‖c‖
-- Mathlib/Analysis/Normed/Field/Basic.lean
@[simp]
theorem nnnorm_one [SeminormedAddCommGroup α] [One α] [NormOneClass α] : ‖(1 : α)‖₊ = 1
-- Mathlib/RingTheory/UniqueFactorizationDomain.lean
@[simp]
theorem factors_mul (a b : Associates α) : (a * b).factors = a.factors + b.factors
-- Mathlib/Order/Basic.lean
theorem lt_trans' : b < c → a < b → a < c
-- Mathlib/Analysis/Calculus/ContDiff/Defs.lean
theorem contDiffOn_all_iff_nat : (∀ n, ContDiffOn 𝕜 n f s) ↔ ∀ n : ℕ, ContDiffOn 𝕜 n f s
-- Mathlib/CategoryTheory/Abelian/Subobject.lean
/-- In an abelian category, the subobjects and quotient objects of an object `X` are
    order-isomorphic via taking kernels and cokernels.
    Implemented here using subobjects in the opposite category,
    since mathlib does not have a notion of quotient objects at the time of writing. -/
@[simps!]
def subobjectIsoSubobjectOp [Abelian C] (X : C) : Subobject X ≃o (Subobject (op X))ᵒᵈ
-- Mathlib/Data/PFunctor/Multivariate/M.lean
theorem M.bisim' {α : TypeVec n} (R : P.M α → P.M α → Prop)
    (h : ∀ x y, R x y → (id ::: Quot.mk R) <$$> M.dest _ x = (id ::: Quot.mk R) <$$> M.dest _ y)
    (x y) (r : R x y) : x = y
-- Mathlib/Topology/Algebra/InfiniteSum/Defs.lean
@[to_additive]
protected theorem Finset.hasProd (s : Finset β) (f : β → α) :
    HasProd (f ∘ (↑) : (↑s : Set β) → α) (∏ b ∈ s, f b)
-- Mathlib/Topology/Algebra/Module/Basic.lean
@[simp] -- @[norm_cast] -- Porting note: This theorem can't be a `norm_cast` theorem.
theorem coe_restrictScalars (f : M →L[A] M₂) :
    (f.restrictScalars R : M →ₗ[R] M₂) = (f : M →ₗ[A] M₂).restrictScalars R
-- Mathlib/Probability/Kernel/Disintegration/Basic.lean
lemma disintegrate : ρ.fst ⊗ₘ ρCond = ρ
-- Mathlib/Topology/Sheaves/Presheaf.lean
@[simp]
theorem id_inv_app {X : TopCat.{w}} (ℱ : X.Presheaf C) (U) :
    (id ℱ).inv.app U = 𝟙 _
-- Mathlib/Probability/Independence/Kernel.lean
/-- The measurable space structures generated by independent pi-systems are independent. -/
theorem IndepSets.indep {m1 m2 m : MeasurableSpace Ω} {κ : Kernel α Ω} {μ : Measure α}
    [IsMarkovKernel κ] {p1 p2 : Set (Set Ω)} (h1 : m1 ≤ m) (h2 : m2 ≤ m) (hp1 : IsPiSystem p1)
    (hp2 : IsPiSystem p2) (hpm1 : m1 = generateFrom p1) (hpm2 : m2 = generateFrom p2)
    (hyp : IndepSets p1 p2 κ μ) :
    Indep m1 m2 κ μ
-- Mathlib/Data/Set/NAry.lean
/-- Symmetric statement to `Set.image_image2_right_comm`. -/
theorem image_image2_distrib_right {g : γ → δ} {f' : α → β' → δ} {g' : β → β'}
    (h_distrib : ∀ a b, g (f a b) = f' a (g' b)) :
    (image2 f s t).image g = image2 f' s (t.image g')
-- Mathlib/Topology/Order/OrderClosed.lean
@[simp] lemma lowerBounds_closure (s : Set α) : lowerBounds (closure s : Set α) = lowerBounds s
-- Mathlib/Topology/MetricSpace/Bounded.lean
protected theorem _root_.Bornology.IsBounded.closure (h : IsBounded s) : IsBounded (closure s)
-- Mathlib/Analysis/Normed/Field/Basic.lean
theorem exists_one_lt_norm : ∃ x : α, 1 < ‖x‖
-- Mathlib/Algebra/Ring/Equiv.lean
theorem map_ne_zero_iff : f x ≠ 0 ↔ x ≠ 0
-- Mathlib/Probability/Independence/Kernel.lean
lemma iIndepFun.indepFun_prod_mk_prod_mk [IsMarkovKernel κ] (hf_indep : iIndepFun m f κ μ)
    (hf_meas : ∀ i, Measurable (f i))
    (i j k l : ι) (hik : i ≠ k) (hil : i ≠ l) (hjk : j ≠ k) (hjl : j ≠ l) :
    IndepFun (fun a ↦ (f i a, f j a)) (fun a ↦ (f k a, f l a)) κ μ
-- Mathlib/AlgebraicGeometry/Properties.lean
theorem isReduced_of_isOpenImmersion {X Y : Scheme} (f : X ⟶ Y) [H : IsOpenImmersion f]
    [IsReduced Y] : IsReduced X
-- Mathlib/Algebra/Vertex/HVertexOperator.lean
@[simp]
theorem compHahnSeries_smul (r : R) (u : U) :
    compHahnSeries A B (r • u) = r • compHahnSeries A B u
-- Mathlib/RingTheory/Bialgebra/Equiv.lean
@[simp]
theorem trans_toBialgHom :
    (e₁₂.trans e₂₃ : A →ₐc[R] C) = (e₂₃ : B →ₐc[R] C).comp e₁₂
-- .lake/packages/lean4/src/lean/Init/Omega/IntList.lean
theorem get_map {xs : IntList} (h : f 0 = 0) : get (xs.map f) i = f (xs.get i)
-- .lake/packages/lean4/src/lean/Init/PropLemmas.lean
@[simp] theorem exists_eq_left : (∃ a, a = a' ∧ p a) ↔ p a'
-- Mathlib/Analysis/BoxIntegral/Partition/Basic.lean
theorem inf_def (π₁ π₂ : Prepartition I) : π₁ ⊓ π₂ = π₁.biUnion fun J => π₂.restrict J
-- Mathlib/Data/Fin/VecNotation.lean
@[simp]
theorem range_cons (x : α) (u : Fin n → α) : Set.range (vecCons x u) = {x} ∪ Set.range u
-- Mathlib/LinearAlgebra/QuadraticForm/QuadraticModuleCat.lean
@[simp] theorem toIsometry_comp {M N U : QuadraticModuleCat.{v} R} (f : M ⟶ N) (g : N ⟶ U) :
    (f ≫ g).toIsometry = g.toIsometry.comp f.toIsometry
-- Mathlib/Topology/Algebra/InfiniteSum/Module.lean
/-- Automorphization of a function into an `R`-`Module` distributes, that is, commutes with the
`R`-scalar multiplication. -/
lemma QuotientAddGroup.automorphize_smul_left (f : G → M) (g : G ⧸ Γ → R) :
    QuotientAddGroup.automorphize ((g ∘ (@Quotient.mk' _ (_))) • f)
      = g • (QuotientAddGroup.automorphize f : G ⧸ Γ → M)
-- Mathlib/Analysis/Convex/Combination.lean
/-- `convexHull` is an additive monoid morphism under pointwise addition. -/
@[simps]
def convexHullAddMonoidHom : Set E →+ Set E
-- Mathlib/Data/Set/Pointwise/BigOperators.lean
/-- An n-ary version of `Set.mul_subset_mul`. -/
@[to_additive " An n-ary version of `Set.add_subset_add`. "]
theorem finset_prod_subset_finset_prod (t : Finset ι) (f₁ f₂ : ι → Set α)
    (hf : ∀ i ∈ t, f₁ i ⊆ f₂ i) : ∏ i ∈ t, f₁ i ⊆ ∏ i ∈ t, f₂ i
-- Mathlib/Order/Atoms.lean
/-- A lattice is atomic iff every element other than `⊥` has an atom below it. -/
@[mk_iff]
class IsAtomic [OrderBot α] : Prop where
  /-- Every element other than `⊥` has an atom below it. -/
  eq_bot_or_exists_atom_le : ∀ b : α, b = ⊥ ∨ ∃ a : α, IsAtom a ∧ a ≤ b
-- Mathlib/Data/Finsupp/Defs.lean
@[ext]
theorem unique_ext [Unique α] {f g : α →₀ M} (h : f default = g default) : f = g
-- Mathlib/Combinatorics/SimpleGraph/Subgraph.lean
@[simp]
theorem degree_spanningCoe {G' : G.Subgraph} (v : V) [Fintype (G'.neighborSet v)]
    [Fintype (G'.spanningCoe.neighborSet v)] : G'.spanningCoe.degree v = G'.degree v
-- Mathlib/Topology/Algebra/InfiniteSum/Constructions.lean
theorem Summable.star (hf : Summable f) : Summable fun b ↦ star (f b)
-- .lake/packages/batteries/Batteries/Data/Rat/Lemmas.lean
theorem divInt_neg' (num den) : num /. -den = -num /. den
-- .lake/packages/lean4/src/lean/Init/Data/BitVec/Lemmas.lean
theorem append_def (x : BitVec v) (y : BitVec w) :
    x ++ y = (shiftLeftZeroExtend x w ||| zeroExtend' (Nat.le_add_left w v) y)
-- Mathlib/Combinatorics/SimpleGraph/Maps.lean
/-- The map between neighbor sets induced by a homomorphism. -/
@[simps]
def mapNeighborSet (v : V) (w : G.neighborSet v) : G'.neighborSet (f v)
-- Mathlib/Data/Set/Basic.lean
@[simp]
theorem powerset_nonempty : (𝒫 s).Nonempty
-- Mathlib/Data/Real/Basic.lean
theorem mk_le_of_forall_le {f : CauSeq ℚ abs} {x : ℝ} (h : ∃ i, ∀ j ≥ i, (f j : ℝ) ≤ x) :
    mk f ≤ x
-- .lake/packages/lean4/src/lean/Init/Data/Int/Gcd.lean
theorem dvd_lcm_right {a b : Int} : b ∣ lcm a b
-- Mathlib/RingTheory/Artinian.lean
theorem IsArtinian.set_has_minimal [IsArtinian R M] (a : Set <| Submodule R M) (ha : a.Nonempty) :
    ∃ M' ∈ a, ∀ I ∈ a, ¬I < M'
-- Mathlib/Analysis/Calculus/FormalMultilinearSeries.lean
theorem apply_eq_zero_of_lt_order (hp : n < p.order) : p n = 0
-- Mathlib/Algebra/Lie/Weights/Linear.lean
/-- A typeclass encoding the fact that a given Lie module has linear weights, vanishing on the
derived ideal. -/
class LinearWeights [LieAlgebra.IsNilpotent R L] : Prop :=
  map_add : ∀ χ : L → R, weightSpace M χ ≠ ⊥ → ∀ x y, χ (x + y) = χ x + χ y
  map_smul : ∀ χ : L → R, weightSpace M χ ≠ ⊥ → ∀ (t : R) x, χ (t • x) = t • χ x
  map_lie : ∀ χ : L → R, weightSpace M χ ≠ ⊥ → ∀ x y : L, χ ⁅x, y⁆ = 0
-- Mathlib/Data/Real/EReal.lean
@[simp, norm_cast]
protected theorem coe_le_coe_iff {x y : ℝ} : (x : EReal) ≤ (y : EReal) ↔ x ≤ y
-- Mathlib/Analysis/Calculus/FDeriv/Equiv.lean
theorem comp_right_hasFDerivAt_iff {f : F → G} {x : E} {f' : F →L[𝕜] G} :
    HasFDerivAt (f ∘ iso) (f'.comp (iso : E →L[𝕜] F)) x ↔ HasFDerivAt f f' (iso x)
-- Mathlib/GroupTheory/Perm/Cycle/Basic.lean
theorem IsCycleOn.of_zpow {n : ℤ} (hf : (f ^ n).IsCycleOn s) (h : Set.BijOn f s s) :
    f.IsCycleOn s
-- Mathlib/Data/PEquiv.lean
theorem trans_assoc (f : α ≃. β) (g : β ≃. γ) (h : γ ≃. δ) :
    (f.trans g).trans h = f.trans (g.trans h)
-- Mathlib/CategoryTheory/ComposableArrows.lean
@[simp]
lemma homMk₂_app_one : (homMk₂ app₀ app₁ app₂ w₀ w₁).app 1 = app₁
-- Mathlib/MeasureTheory/SetSemiring.lean
lemma not_mem_diffFinset (hC : IsSetSemiring C) (hs : s ∈ C) (ht : t ∈ C) :
    t ∉ hC.diffFinset hs ht
-- Mathlib/Algebra/Algebra/NonUnitalSubalgebra.lean
theorem range_val : NonUnitalAlgHom.range (NonUnitalSubalgebraClass.subtype S) = S
-- Mathlib/Analysis/Convex/Segment.lean
theorem mem_openSegment_of_ne_left_right (hx : x ≠ z) (hy : y ≠ z) (hz : z ∈ [x -[𝕜] y]) :
    z ∈ openSegment 𝕜 x y
-- .lake/packages/lean4/src/lean/Init/Data/List/Lemmas.lean
@[simp 1100] theorem dropLast_concat : dropLast (l₁ ++ [b]) = l₁
-- Mathlib/Order/Hom/Bounded.lean
@[simp]
theorem coe_top : ⇑(⊤ : TopHom α β) = ⊤
-- Mathlib/CategoryTheory/Sites/Sieves.lean
/-- Given a presieve `R` on `X`, the predicate `R.hasPullbacks` means that for all arrows `f` and
    `g` in `R`, the pullback of `f` and `g` exists. -/
class hasPullbacks (R : Presieve X) : Prop where
  /-- For all arrows `f` and `g` in `R`, the pullback of `f` and `g` exists. -/
  has_pullbacks : ∀ {Y Z} {f : Y ⟶ X} (_ : R f) {g : Z ⟶ X} (_ : R g), HasPullback f g
-- .lake/packages/lean4/src/lean/Init/Data/Int/Order.lean
protected theorem le_total (a b : Int) : a ≤ b ∨ b ≤ a
-- Mathlib/Data/Int/CardIntervalMod.lean
/-- There are `⌈(b - v % r) / r⌉` numbers in `[0, b)` congruent to `v` mod `r`. -/
theorem count_modEq_card_eq_ceil (v : ℕ) :
    b.count (· ≡ v [MOD r]) = ⌈(b - (v % r : ℕ)) / (r : ℚ)⌉
-- .lake/packages/batteries/Batteries/Classes/SatisfiesM.lean
/-- `SatisfiesM` distributes over `pure`, general version / weakest precondition version. -/
protected theorem pure [Applicative m] [LawfulApplicative m]
    (h : p a) : SatisfiesM (m := m) p (pure a)
-- Mathlib/Analysis/SpecialFunctions/Trigonometric/Basic.lean
theorem cos_add_int_mul_pi (x : ℝ) (n : ℤ) : cos (x + n * π) = (-1) ^ n * cos x
-- Mathlib/CategoryTheory/Bicategory/LocallyDiscrete.lean
/-- The 1-morphism in `LocallyDiscrete C` associated to a given morphism `f : a ⟶ b` in `C` -/
@[simps]
def toLoc {a b : C} (f : a ⟶ b) : LocallyDiscrete.mk a ⟶ LocallyDiscrete.mk b
-- Mathlib/Algebra/Star/Unitary.lean
@[norm_cast]
theorem coe_neg (U : unitary R) : ↑(-U) = (-U : R)
-- Mathlib/Algebra/Algebra/NonUnitalSubalgebra.lean
@[simp]
theorem iSupLift_inclusion {i : ι} (x : K i) (h : K i ≤ T) :
    iSupLift K dir f hf T hT (inclusion h x) = f i x
-- Mathlib/CategoryTheory/Monoidal/OfChosenFiniteProducts/Basic.lean
@[simp]
theorem BinaryFan.assocInv_snd {X Y Z : C} {sXY : BinaryFan X Y} (P : IsLimit sXY)
    {sYZ : BinaryFan Y Z} (s : BinaryFan X sYZ.pt) :
    (BinaryFan.assocInv P s).snd = s.snd ≫ sYZ.snd
-- Mathlib/Topology/Semicontinuous.lean
theorem UpperSemicontinuousOn.mono (h : UpperSemicontinuousOn f s) (hst : t ⊆ s) :
    UpperSemicontinuousOn f t
-- Mathlib/Data/Finsupp/Defs.lean
theorem update_eq_erase_add_single (f : α →₀ M) (a : α) (b : M) :
    f.update a b = f.erase a + single a b
-- Mathlib/Analysis/InnerProductSpace/Basic.lean
@[simp]
theorem innerₛₗ_apply (v w : E) : innerₛₗ 𝕜 v w = ⟪v, w⟫
-- Mathlib/Algebra/Star/Pointwise.lean
@[simp]
theorem union_star [Star α] : (s ∪ t)⋆ = s⋆ ∪ t⋆
-- Mathlib/Analysis/InnerProductSpace/TwoDim.lean
/-- The bilinear map `kahler` is invariant under pullback by a positively-oriented isometric
automorphism. -/
theorem kahler_comp_linearIsometryEquiv (φ : E ≃ₗᵢ[ℝ] E)
    (hφ : 0 < LinearMap.det (φ.toLinearEquiv : E →ₗ[ℝ] E)) (x y : E) :
    o.kahler (φ x) (φ y) = o.kahler x y
-- Mathlib/MeasureTheory/Measure/Hausdorff.lean
@[simp]
theorem mkMetric_top : (mkMetric (fun _ => ∞ : ℝ≥0∞ → ℝ≥0∞) : OuterMeasure X) = ⊤
-- Mathlib/RingTheory/Coprime/Basic.lean
theorem IsCoprime.map (H : IsCoprime x y) {S : Type v} [CommSemiring S] (f : R →+* S) :
    IsCoprime (f x) (f y)
-- .lake/packages/lean4/src/lean/Init/Data/List/Lemmas.lean
theorem last_eq_of_concat_eq {a b : α} {l₁ l₂ : List α} : concat l₁ a = concat l₂ b → a = b
-- Mathlib/Algebra/Order/Monoid/Unbundled/Pow.lean
@[to_additive min_lt_of_add_lt_two_nsmul]
theorem min_lt_of_mul_lt_sq {a b c : M} (h : a * b < c ^ 2) : min a b < c
-- Mathlib/LinearAlgebra/Semisimple.lean
lemma IsSemisimple.restrict {p : Submodule R M} {hp : MapsTo f p p} (hf : f.IsSemisimple) :
    IsSemisimple (f.restrict hp)
-- Mathlib/Topology/Algebra/ContinuousAffineMap.lean
theorem to_continuousMap_injective {f g : P →ᴬ[R] Q} (h : (f : C(P, Q)) = (g : C(P, Q))) :
    f = g
-- Mathlib/CategoryTheory/Abelian/RightDerived.lean
@[reassoc]
lemma InjectiveResolution.isoRightDerivedToHomotopyCategoryObj_hom_naturality
    {X Y : C} (f : X ⟶ Y) (I : InjectiveResolution X) (J : InjectiveResolution Y)
    (φ : I.cocomplex ⟶ J.cocomplex) (comm : I.ι.f 0 ≫ φ.f 0 = f ≫ J.ι.f 0)
    (F : C ⥤ D) [F.Additive] :
    F.rightDerivedToHomotopyCategory.map f ≫ (J.isoRightDerivedToHomotopyCategoryObj F).hom =
      (I.isoRightDerivedToHomotopyCategoryObj F).hom ≫
        (F.mapHomologicalComplex _ ⋙ HomotopyCategory.quotient _ _).map φ
-- Mathlib/Analysis/Calculus/FDeriv/Mul.lean
/--
Unlike `HasFDerivAt.finset_prod`, supports non-commutative multiply and duplicate elements.
-/
@[fun_prop]
theorem HasFDerivAt.list_prod' {l : List ι} {x : E}
    (h : ∀ i ∈ l, HasFDerivAt (f i ·) (f' i) x) :
    HasFDerivAt (fun x ↦ (l.map (f · x)).prod)
      (∑ i : Fin l.length, ((l.take i).map (f · x)).prod •
        smulRight (f' (l.get i)) ((l.drop (.succ i)).map (f · x)).prod) x
-- Mathlib/RingTheory/LocalRing/Basic.lean
theorem isUnit_one_sub_self_of_mem_nonunits (a : R) (h : a ∈ nonunits R) : IsUnit (1 - a)
-- Mathlib/Order/Hom/CompleteLattice.lean
/-- Reinterpret a `⨆`-homomorphism as an `⨅`-homomorphism between the dual orders. -/
@[simps]
protected def dual : sSupHom α β ≃ sInfHom αᵒᵈ βᵒᵈ
-- Mathlib/Algebra/Polynomial/Derivative.lean
theorem pow_sub_one_dvd_derivative_of_pow_dvd {p q : R[X]} {n : ℕ}
    (dvd : q ^ n ∣ p) : q ^ (n - 1) ∣ derivative p
-- Mathlib/CategoryTheory/Idempotents/Karoubi.lean
theorem decompId_p_naturality {P Q : Karoubi C} (f : P ⟶ Q) :
    decompId_p P ≫ f = (by exact Hom.mk f.f (by simp)) ≫ decompId_p Q
-- Mathlib/Algebra/Group/Submonoid/Basic.lean
@[to_additive]
theorem disjoint_def {p₁ p₂ : Submonoid M} :
    Disjoint p₁ p₂ ↔ ∀ {x : M}, x ∈ p₁ → x ∈ p₂ → x = 1
-- Mathlib/Algebra/Order/Monoid/Unbundled/Basic.lean
@[to_additive (attr := simp)]
theorem mul_le_mul_iff_right [CovariantClass α α (swap (· * ·)) (· ≤ ·)]
    [ContravariantClass α α (swap (· * ·)) (· ≤ ·)] (a : α) {b c : α} :
    b * a ≤ c * a ↔ b ≤ c
-- Mathlib/MeasureTheory/Measure/WithDensity.lean
theorem withDensity_mul₀ {μ : Measure α} {f g : α → ℝ≥0∞}
    (hf : AEMeasurable f μ) (hg : AEMeasurable g μ) :
    μ.withDensity (f * g) = (μ.withDensity f).withDensity g
-- Mathlib/Probability/ProbabilityMassFunction/Constructions.lean
theorem mem_support_normalize_iff (a : α) : a ∈ (normalize f hf0 hf).support ↔ f a ≠ 0
-- Mathlib/Algebra/GCDMonoid/Basic.lean
theorem gcd_one_right' [GCDMonoid α] (a : α) : Associated (gcd a 1) 1
-- Mathlib/Data/Finset/Card.lean
/-- We can shrink a set to any smaller size. -/
lemma exists_subset_card_eq (hns : n ≤ s.card) : ∃ t ⊆ s, t.card = n
-- Mathlib/Data/Finsupp/NeLocus.lean
@[simp]
theorem neLocus_self_sub_right : neLocus f (f - g) = g.support
-- Mathlib/MeasureTheory/Integral/Lebesgue.lean
theorem lintegral_indicator_const₀ {s : Set α} (hs : NullMeasurableSet s μ) (c : ℝ≥0∞) :
    ∫⁻ a, s.indicator (fun _ => c) a ∂μ = c * μ s