ruc-ai4math/mathlib_handler_benchmark_410 huggingface dataset:
-- Mathlib/LinearAlgebra/Multilinear/Basic.lean
/-- This calculates the differences between the values of a multilinear map at
two arguments that differ on a finset `s` of `ι`. It requires a
linear order on `ι` in order to express the result. -/
lemma map_piecewise_sub_map_piecewise [LinearOrder ι] (a b v : (i : ι) → M₁ i) (s : Finset ι) :
    f (s.piecewise a v) - f (s.piecewise b v) = ∑ i ∈ s, f
      fun j ↦ if j ∈ s then if j < i then a j else if j = i then a j - b j else b j else v j
-- Mathlib/Algebra/Lie/Nilpotent.lean
/-- Given an ideal `I` of a Lie algebra `L`, the lower central series of `L ⧸ I` is the same
whether we regard `L ⧸ I` as an `L` module or an `L ⧸ I` module.

TODO: This result obviously generalises but the generalisation requires the missing definition of
morphisms between Lie modules over different Lie algebras. -/
-- Porting note: added `LieSubmodule.toSubmodule` in the statement
theorem coe_lowerCentralSeries_ideal_quot_eq {I : LieIdeal R L} (k : ℕ) :
    LieSubmodule.toSubmodule (lowerCentralSeries R L (L ⧸ I) k) =
      LieSubmodule.toSubmodule (lowerCentralSeries R (L ⧸ I) (L ⧸ I) k)
-- Mathlib/Algebra/Homology/HomotopyCategory/HomComplex.lean
@[simp]
lemma ofHomotopy_refl (φ : F ⟶ G) :
    ofHomotopy (Homotopy.refl φ) = 0
-- Mathlib/Algebra/Algebra/Spectrum.lean
theorem zero_not_mem_iff {a : A} : (0 : R) ∉ σ a ↔ IsUnit a
-- Mathlib/Combinatorics/SimpleGraph/Regularity/Uniform.lean
theorem le_card_nonuniformWitness (h : ¬G.IsUniform ε s t) :
    (s.card : 𝕜) * ε ≤ (G.nonuniformWitness ε s t).card
-- Mathlib/Algebra/Homology/HomologicalBicomplex.lean
/-- Constructor for a morphism `K ⟶ L` in the category `HomologicalComplex₂ C c₁ c₂` which
takes as inputs a morphism `f : K.toGradedObject ⟶ L.toGradedObject` and
the compatibilites with both horizontal and vertical differentials. -/
@[simps!]
def homMk {K L : HomologicalComplex₂ C c₁ c₂}
    (f : K.toGradedObject ⟶ L.toGradedObject)
    (comm₁ : ∀ i₁ i₁' i₂, c₁.Rel i₁ i₁' →
      f ⟨i₁, i₂⟩ ≫ (L.d i₁ i₁').f i₂ = (K.d i₁ i₁').f i₂ ≫ f ⟨i₁', i₂⟩)
    (comm₂ : ∀ i₁ i₂ i₂', c₂.Rel i₂ i₂' →
      f ⟨i₁, i₂⟩ ≫ (L.X i₁).d i₂ i₂' = (K.X i₁).d i₂ i₂' ≫ f ⟨i₁, i₂'⟩) : K ⟶ L
-- Mathlib/Algebra/Homology/HomotopyCategory/HomComplexShift.lean
@[simp]
lemma rightShift_smul (a n' : ℤ) (hn' : n' + a = n) (x : R) :
    (x • γ).rightShift a n' hn' = x • γ.rightShift a n' hn'
-- Mathlib/Data/Set/Lattice.lean
theorem sInter_union_sInter {S T : Set (Set α)} :
    ⋂₀ S ∪ ⋂₀ T = ⋂ p ∈ S ×ˢ T, (p : Set α × Set α).1 ∪ p.2
-- Mathlib/FieldTheory/Finite/Polynomial.lean
theorem ker_evalₗ [Finite σ] : ker (evalᵢ σ K) = ⊥
-- Mathlib/LinearAlgebra/ExteriorAlgebra/Basic.lean
/-- Given a linear map `f : M →ₗ[R] A` into an `R`-algebra `A`, which satisfies the condition:
`cond : ∀ m : M, f m * f m = 0`, this is the canonical lift of `f` to a morphism of `R`-algebras
from `ExteriorAlgebra R M` to `A`.
-/
@[simps! symm_apply]
def lift : { f : M →ₗ[R] A // ∀ m, f m * f m = 0 } ≃ (ExteriorAlgebra R M →ₐ[R] A)
-- Mathlib/Topology/Algebra/Algebra.lean
theorem Subalgebra.le_topologicalClosure (s : Subalgebra R A) : s ≤ s.topologicalClosure
-- Mathlib/CategoryTheory/Abelian/Basic.lean
/-- The factorisation of a morphism through its abelian image. -/
@[simps]
def imageMonoFactorisation {X Y : C} (f : X ⟶ Y) : MonoFactorisation f
-- Mathlib/SetTheory/Cardinal/ToNat.lean
/-- A version of `toNat_eq_iff` for literals -/
theorem toNat_eq_ofNat {n : ℕ} [Nat.AtLeastTwo n] :
    toNat c = OfNat.ofNat n ↔ c = OfNat.ofNat n
-- Mathlib/Data/FunLike/Basic.lean
/-- The class `DFunLike F α β` expresses that terms of type `F` have an
injective coercion to (dependent) functions from `α` to `β`.

For non-dependent functions you can also use the abbreviation `FunLike`.

This typeclass is used in the definition of the homomorphism typeclasses,
such as `ZeroHomClass`, `MulHomClass`, `MonoidHomClass`, ....
-/
@[notation_class * toFun Simps.findCoercionArgs]
class DFunLike (F : Sort*) (α : outParam (Sort*)) (β : outParam <| α → Sort*) where
  /-- The coercion from `F` to a function. -/
  coe : F → ∀ a : α, β a
  /-- The coercion to functions must be injective. -/
  coe_injective' : Function.Injective coe
-- Mathlib/Data/Part.lean
theorem elim_toOption {α β : Type*} (a : Part α) [Decidable a.Dom] (b : β) (f : α → β) :
    a.toOption.elim b f = if h : a.Dom then f (a.get h) else b
-- Mathlib/Data/DFinsupp/Basic.lean
@[simp]
theorem filter_add [∀ i, AddZeroClass (β i)] (p : ι → Prop) [DecidablePred p] (f g : Π₀ i, β i) :
    (f + g).filter p = f.filter p + g.filter p
-- Mathlib/Analysis/SpecialFunctions/Gamma/Beta.lean
theorem GammaSeq_mul (z : ℂ) {n : ℕ} (hn : n ≠ 0) :
    GammaSeq z n * GammaSeq (1 - z) n =
      n / (n + ↑1 - z) * (↑1 / (z * ∏ j ∈ Finset.range n, (↑1 - z ^ 2 / ((j : ℂ) + 1) ^ 2)))
-- Mathlib/Order/OmegaCompletePartialOrder.lean
@[mono]
theorem map_le_map {g : α →o β} (h : f ≤ g) : c.map f ≤ c.map g
-- Mathlib/RingTheory/Multiplicity.lean
theorem le_multiplicity_of_pow_dvd {a b : α} {k : ℕ} (hk : a ^ k ∣ b) :
    (k : PartENat) ≤ multiplicity a b
-- Mathlib/Order/RelSeries.lean
@[simp] lemma map_apply (p : RelSeries r) (f : r →r s) (i : Fin (p.length + 1)) :
    p.map f i = f (p i)
-- Mathlib/Data/Finmap.lean
@[simp]
theorem coe_keys {l : List (Sigma β)} : keys (l : Multiset (Sigma β)) = (l.keys : Multiset α)
-- Mathlib/Data/PFun.lean
theorem mem_fix_iff {f : α →. β ⊕ α} {a : α} {b : β} :
    b ∈ f.fix a ↔ Sum.inl b ∈ f a ∨ ∃ a', Sum.inr a' ∈ f a ∧ b ∈ f.fix a'
-- Mathlib/Topology/LocallyClosed.lean
lemma IsLocallyClosed.isOpen_preimage_val_closure (hs : IsLocallyClosed s) :
    IsOpen (closure s ↓∩ s)
-- Mathlib/Analysis/Normed/Lp/lpSpace.lean
theorem _root_.Memℓp.infty_pow {f : ∀ i, B i} (hf : Memℓp f ∞) (n : ℕ) : Memℓp (f ^ n) ∞
-- Mathlib/Analysis/MeanInequalities.lean
/-- **AM-GM inequality**: The geometric mean is less than or equal to the arithmetic mean, weighted
version for `NNReal`-valued functions. -/
theorem geom_mean_le_arith_mean_weighted (w z : ι → ℝ≥0) (hw' : ∑ i ∈ s, w i = 1) :
    (∏ i ∈ s, z i ^ (w i : ℝ)) ≤ ∑ i ∈ s, w i * z i
-- Mathlib/Algebra/Homology/ShortComplex/LeftHomology.lean
lemma isIso_π (hf : S.f = 0) : IsIso h.π
-- Mathlib/Algebra/Module/Submodule/Ker.lean
@[simp]
theorem comap_bot (f : F) : comap f ⊥ = ker f
-- Mathlib/Order/Compare.lean
theorem swap_eq_iff_eq_swap {o o' : Ordering} : o.swap = o' ↔ o = o'.swap
-- Mathlib/Geometry/Manifold/ChartedSpace.lean
/-- The maximal atlas of a structure groupoid is stable under equivalence. -/
lemma StructureGroupoid.mem_maximalAtlas_of_eqOnSource {e e' : PartialHomeomorph M H} (h : e' ≈ e)
    (he : e ∈ G.maximalAtlas M) : e' ∈ G.maximalAtlas M
-- Mathlib/Data/Real/Pi/Bounds.lean
theorem pi_lt_sqrtTwoAddSeries (n : ℕ) :
    π < (2 : ℝ) ^ (n + 1) * √(2 - sqrtTwoAddSeries 0 n) + 1 / (4 : ℝ) ^ n
-- Mathlib/Data/Set/Subsingleton.lean
theorem subsingleton_isTop (α : Type*) [PartialOrder α] : Set.Subsingleton { x : α | IsTop x }
-- Mathlib/RingTheory/Localization/AsSubring.lean
@[simp]
theorem mapToFractionRing_apply {B : Type*} [CommRing B] [Algebra A B] [IsLocalization S B]
    (hS : S ≤ A⁰) (b : B) :
    mapToFractionRing K S B hS b = IsLocalization.lift (map_isUnit_of_le K S hS) b
-- Mathlib/Geometry/Manifold/Sheaf/Smooth.lean
@[simp] lemma smoothSheafCommRing.evalHom_germ (U : Opens (TopCat.of M)) (x : U)
    (f : (smoothSheafCommRing IM I M R).presheaf.obj (op U)) :
    smoothSheafCommRing.evalHom IM I M R (x : TopCat.of M)
      ((smoothSheafCommRing IM I M R).presheaf.germ x f)
    = f x
-- Mathlib/Data/Set/Lattice.lean
lemma biUnion_compl_eq_of_pairwise_disjoint_of_iUnion_eq_univ {ι : Type*} {Es : ι → Set α}
    (Es_union : ⋃ i, Es i = univ) (Es_disj : Pairwise fun i j ↦ Disjoint (Es i) (Es j))
    (I : Set ι) :
    (⋃ i ∈ I, Es i)ᶜ = ⋃ i ∈ Iᶜ, Es i
-- Mathlib/Algebra/Group/Submonoid/Operations.lean
@[to_additive]
theorem map_surjective_of_surjective : Function.Surjective (map f)
-- Mathlib/Analysis/ODE/Gronwall.lean
/-- A Grönwall-like inequality: if `f : ℝ → E` is continuous on `[a, b]`, has right derivative
`f' x` at every point `x ∈ [a, b)`, and satisfies the inequalities `‖f a‖ ≤ δ`,
`∀ x ∈ [a, b), ‖f' x‖ ≤ K * ‖f x‖ + ε`, then `‖f x‖` is bounded by `gronwallBound δ K ε (x - a)`
on `[a, b]`. -/
theorem norm_le_gronwallBound_of_norm_deriv_right_le {f f' : ℝ → E} {δ K ε : ℝ} {a b : ℝ}
    (hf : ContinuousOn f (Icc a b)) (hf' : ∀ x ∈ Ico a b, HasDerivWithinAt f (f' x) (Ici x) x)
    (ha : ‖f a‖ ≤ δ) (bound : ∀ x ∈ Ico a b, ‖f' x‖ ≤ K * ‖f x‖ + ε) :
    ∀ x ∈ Icc a b, ‖f x‖ ≤ gronwallBound δ K ε (x - a)
-- Mathlib/Algebra/Group/Defs.lean
@[to_additive (attr := simp)] lemma inv_mul_cancel_comm (a b : G) : a⁻¹ * b * a = b
-- Mathlib/Algebra/Lie/Classical.lean
theorem indefiniteDiagonal_transform {i : R} (hi : i * i = -1) :
    (Pso p q R i)ᵀ * indefiniteDiagonal p q R * Pso p q R i = 1
-- Mathlib/Topology/Algebra/FilterBasis.lean
@[to_additive]
theorem one {U : Set G} : U ∈ B → (1 : G) ∈ U
-- Mathlib/NumberTheory/FLT/Four.lean
/-- if we have a solution to `a ^ 4 + b ^ 4 = c ^ 2` then there must be a minimal one. -/
theorem exists_minimal {a b c : ℤ} (h : Fermat42 a b c) : ∃ a0 b0 c0, Minimal a0 b0 c0
-- Mathlib/Order/OmegaCompletePartialOrder.lean
lemma directed : Directed (· ≤ ·) c
-- Mathlib/Algebra/Order/Field/Basic.lean
/-- For the single implications with fewer assumptions, see `one_div_le_one_div_of_le` and
  `le_of_one_div_le_one_div` -/
theorem one_div_le_one_div (ha : 0 < a) (hb : 0 < b) : 1 / a ≤ 1 / b ↔ b ≤ a
-- Mathlib/Algebra/Order/BigOperators/Ring/Finset.lean
/-- If `g, h ≤ f` and `g i + h i ≤ f i`, then the product of `f` over `s` is at least the
  sum of the products of `g` and `h`. This is the version for `OrderedCommSemiring`. -/
lemma prod_add_prod_le {i : ι} {f g h : ι → R} (hi : i ∈ s) (h2i : g i + h i ≤ f i)
    (hgf : ∀ j ∈ s, j ≠ i → g j ≤ f j) (hhf : ∀ j ∈ s, j ≠ i → h j ≤ f j) (hg : ∀ i ∈ s, 0 ≤ g i)
    (hh : ∀ i ∈ s, 0 ≤ h i) : ((∏ i ∈ s, g i) + ∏ i ∈ s, h i) ≤ ∏ i ∈ s, f i
-- Mathlib/GroupTheory/NoncommPiCoprod.lean
@[to_additive]
theorem injective_noncommPiCoprod_of_independent
    {hcomm : Pairwise fun i j : ι => ∀ (x : H i) (y : H j), Commute (ϕ i x) (ϕ j y)}
    (hind : CompleteLattice.Independent fun i => (ϕ i).range)
    (hinj : ∀ i, Function.Injective (ϕ i)) : Function.Injective (noncommPiCoprod ϕ hcomm)
-- Mathlib/Data/Matrix/Basic.lean
theorem vecMul_sub [Fintype m] (A B : Matrix m n α) (x : m → α) :
    x ᵥ* (A - B) = x ᵥ* A - x ᵥ* B
-- Mathlib/Analysis/NormedSpace/OperatorNorm/Basic.lean
theorem bound [RingHomIsometric σ₁₂] (f : E →SL[σ₁₂] F) : ∃ C, 0 < C ∧ ∀ x : E, ‖f x‖ ≤ C * ‖x‖
-- Mathlib/Order/MinMax.lean
theorem le_max_of_le_left : a ≤ b → a ≤ max b c
-- Mathlib/Topology/Separation.lean
theorem regularSpace_iInf {ι X} {t : ι → TopologicalSpace X} (h : ∀ i, @RegularSpace X (t i)) :
    @RegularSpace X (iInf t)
-- Mathlib/Data/Complex/Exponential.lean
theorem two_sinh : 2 * sinh x = exp x - exp (-x)
-- Mathlib/Control/LawfulFix.lean
theorem continuous_uncurry : Continuous <| monotoneUncurry α β γ
-- Mathlib/Data/Set/Basic.lean
theorem eq_univ_of_nonempty {s : Set α} : s.Nonempty → s = univ
-- Mathlib/Data/Complex/Exponential.lean
theorem exp_list_sum (l : List ℝ) : exp l.sum = (l.map exp).prod
-- Mathlib/Data/Set/Pointwise/Basic.lean
@[to_additive]
theorem Nonempty.inv (h : s.Nonempty) : s⁻¹.Nonempty
-- Mathlib/Algebra/Group/Subsemigroup/Operations.lean
@[to_additive (attr := simp)]
theorem range_subtype (s : Subsemigroup M) : (MulMemClass.subtype s).srange = s
-- Mathlib/AlgebraicGeometry/ProjectiveSpectrum/Scheme.lean
theorem carrier.relevant : ¬HomogeneousIdeal.irrelevant 𝒜 ≤ carrier.asHomogeneousIdeal f_deg hm q
-- .lake/packages/lean4/src/lean/Init/Data/Int/Order.lean
protected theorem le_antisymm {a b : Int} (h₁ : a ≤ b) (h₂ : b ≤ a) : a = b
-- Mathlib/Algebra/BigOperators/Ring/List.lean
lemma sum_map_mul_left : (l.map fun b ↦ r * f b).sum = r * (l.map f).sum
-- .lake/packages/lean4/src/lean/Init/Omega/Logic.lean
theorem Decidable.and_not_or_not_and_of_not_iff [Decidable a] [Decidable b]
    (h : ¬ (a ↔ b)) : a ∧ ¬b ∨ ¬a ∧ b
-- Mathlib/Tactic/Abel.lean
theorem term_add_term {α} [AddCommMonoid α] (n₁ x a₁ n₂ a₂ n' a') (h₁ : n₁ + n₂ = n')
    (h₂ : a₁ + a₂ = a') : @term α _ n₁ x a₁ + @term α _ n₂ x a₂ = term n' x a'
-- Mathlib/Algebra/MvPolynomial/Counit.lean
theorem ACounit_C (a : A) : ACounit A B (C a) = algebraMap A B a
-- .lake/packages/batteries/Batteries/Data/List/Basic.lean
@[csimp] theorem ofFn_eq_ofFnTR : @ofFn = @ofFnTR
-- Mathlib/Analysis/SpecialFunctions/Trigonometric/Deriv.lean
@[simp]
theorem fderiv_csinh (hc : DifferentiableAt ℂ f x) :
    fderiv ℂ (fun x => Complex.sinh (f x)) x = Complex.cosh (f x) • fderiv ℂ f x
-- Mathlib/Data/Rel.lean
@[simp]
theorem comp_right_top (r : Rel α β) : r • (⊤ : Rel β γ) = fun x _ ↦ x ∈ r.dom
-- Mathlib/Geometry/Manifold/LocalInvariantProperties.lean
theorem liftPropOn_chart [HasGroupoid M G] (hG : G.LocalInvariantProp G Q) (hQ : ∀ y, Q id univ y) :
    LiftPropOn Q (chartAt (H := H) x) (chartAt (H := H) x).source
-- Mathlib/Topology/MetricSpace/Holder.lean
theorem nndist_le (hf : HolderWith C r f) (x y : X) :
    nndist (f x) (f y) ≤ C * nndist x y ^ (r : ℝ)
-- Mathlib/Analysis/Convex/Independent.lean
/-- A family with at most one point is convex independent. -/
theorem Subsingleton.convexIndependent [Subsingleton ι] (p : ι → E) : ConvexIndependent 𝕜 p
-- Mathlib/Order/Filter/Bases.lean
@[instance]
theorem isCountablyGenerated_pure (a : α) : IsCountablyGenerated (pure a)
-- Mathlib/MeasureTheory/Function/ConditionalExpectation/Indicator.lean
theorem condexp_ae_eq_restrict_zero (hs : MeasurableSet[m] s) (hf : f =ᵐ[μ.restrict s] 0) :
    μ[f|m] =ᵐ[μ.restrict s] 0
-- Mathlib/SetTheory/Ordinal/Arithmetic.lean
theorem add_sub_cancel (a b : Ordinal) : a + b - a = b
-- Mathlib/Algebra/BigOperators/WithTop.lean
/-- A product of finite terms is finite. -/
lemma prod_lt_bot [CommMonoidWithZero α] [NoZeroDivisors α] [Nontrivial α] [DecidableEq α] [LT α]
    {s : Finset ι} {f : ι → WithBot α} (h : ∀ i ∈ s, f i ≠ ⊥) : ⊥ < ∏ i ∈ s, f i
-- Mathlib/Data/Matrix/Block.lean
theorem blockDiagonal'_apply (M : ∀ i, Matrix (m' i) (n' i) α) (ik jk) :
    blockDiagonal' M ik jk =
      if h : ik.1 = jk.1 then M ik.1 ik.2 (cast (congr_arg n' h.symm) jk.2) else 0
-- Mathlib/Data/Ordmap/Ordset.lean
theorem Valid'.balance' {l} {x : α} {r o₁ o₂} (hl : Valid' o₁ l x) (hr : Valid' x r o₂)
    (H : ∃ l' r', BalancedSz l' r' ∧
          (Nat.dist (size l) l' ≤ 1 ∧ size r = r' ∨ Nat.dist (size r) r' ≤ 1 ∧ size l = l')) :
    Valid' o₁ (@balance' α l x r) o₂
-- Mathlib/RingTheory/UniqueFactorizationDomain.lean
theorem normalizedFactors_irreducible {a : α} (ha : Irreducible a) :
    normalizedFactors a = {normalize a}
-- Mathlib/Topology/MetricSpace/Pseudo/Defs.lean
theorem Real.Icc_eq_closedBall (x y : ℝ) : Icc x y = closedBall ((x + y) / 2) ((y - x) / 2)
-- Mathlib/AlgebraicGeometry/StructureSheaf.lean
@[simp]
theorem localization_toBasicOpen (f : R) :
    RingHom.comp (toBasicOpen R f) (algebraMap R (Localization.Away f)) =
    toOpen R (PrimeSpectrum.basicOpen f)
-- .lake/packages/lean4/src/lean/Init/Data/BitVec/Basic.lean
@[simp] theorem ofBool_true  : ofBool true  = 1
-- Mathlib/Algebra/Order/Sub/Canonical.lean
theorem tsub_le_tsub_iff_left (h : c ≤ a) : a - b ≤ a - c ↔ c ≤ b
-- Mathlib/Data/Finset/Basic.lean
theorem mem_cons_self (a : α) (s : Finset α) {h} : a ∈ cons a s h
-- Mathlib/Order/ConditionallyCompleteLattice/Basic.lean
/-- A least element of a set is the infimum of this set. -/
theorem IsLeast.csInf_eq (H : IsLeast s a) : sInf s = a
-- Mathlib/Probability/Moments.lean
theorem cgf_undef (hX : ¬Integrable (fun ω => exp (t * X ω)) μ) : cgf X μ t = 0
-- Mathlib/CategoryTheory/DifferentialObject.lean
@[simp]
theorem id_f (X : DifferentialObject S C) : (𝟙 X : X ⟶ X).f = 𝟙 X.obj
-- Mathlib/Data/Matrix/ColumnRowPartitioned.lean
@[simp]
lemma mul_fromColumns (A : Matrix m n R) (B₁ : Matrix n n₁ R) (B₂ : Matrix n n₂ R) :
    A * fromColumns B₁ B₂ = fromColumns (A * B₁) (A * B₂)
-- Mathlib/Algebra/Exact.lean
lemma exact_iff :
    Exact f g ↔ ker g = range f
-- Mathlib/Data/Real/EReal.lean
lemma div_div (a b c : EReal) : a / b / c = a / (b * c)
-- Mathlib/Data/Finset/Pointwise.lean
@[simp]
theorem empty_vsub (t : Finset β) : (∅ : Finset β) -ᵥ t = ∅
-- Mathlib/MeasureTheory/Covering/BesicovitchVectorSpace.lean
theorem centerAndRescale_radius {N : ℕ} {τ : ℝ} (a : SatelliteConfig E N τ) :
    a.centerAndRescale.r (last N) = 1
-- Mathlib/Probability/Process/Stopping.lean
protected theorem measurableSet_le' (hτ : IsStoppingTime f τ) (i : ι) :
    MeasurableSet[hτ.measurableSpace] {ω | τ ω ≤ i}
-- Mathlib/Order/Filter/Bases.lean
theorem HasBasis.prod_same_index_anti {ι : Type*} [LinearOrder ι] {p : ι → Prop} {sa : ι → Set α}
    {sb : ι → Set β} (hla : la.HasBasis p sa) (hlb : lb.HasBasis p sb)
    (hsa : AntitoneOn sa { i | p i }) (hsb : AntitoneOn sb { i | p i }) :
    (la ×ˢ lb).HasBasis p fun i => sa i ×ˢ sb i
-- Mathlib/Algebra/Polynomial/EraseLead.lean
theorem card_support_eq' {n : ℕ} (k : Fin n → ℕ) (x : Fin n → R) (hk : Function.Injective k)
    (hx : ∀ i, x i ≠ 0) : (∑ i, C (x i) * X ^ k i).support.card = n
-- Mathlib/LinearAlgebra/AffineSpace/AffineSubspace.lean
/-- Given a point in an affine subspace, a result of subtracting that point on the left is in the
direction if and only if the other point is in the subspace. -/
theorem vsub_left_mem_direction_iff_mem {s : AffineSubspace k P} {p : P} (hp : p ∈ s) (p2 : P) :
    p -ᵥ p2 ∈ s.direction ↔ p2 ∈ s
-- Mathlib/Order/Max.lean
theorem Prod.isBot_iff : IsBot x ↔ IsBot x.1 ∧ IsBot x.2
-- Mathlib/Algebra/Order/Module/Defs.lean
lemma le_of_smul_le_smul_right [SMulPosReflectLE α β] (h : a₁ • b ≤ a₂ • b) (hb : 0 < b) :
    a₁ ≤ a₂
-- Mathlib/Algebra/Order/BigOperators/Group/Finset.lean
@[to_additive] lemma prod_sdiff_lt_prod_sdiff :
    ∏ i ∈ s \ t, f i < ∏ i ∈ t \ s, f i ↔ ∏ i ∈ s, f i < ∏ i ∈ t, f i
-- Mathlib/Data/Finset/Prod.lean
theorem filter_product_card (s : Finset α) (t : Finset β) (p : α → Prop) (q : β → Prop)
    [DecidablePred p] [DecidablePred q] :
    ((s ×ˢ t).filter fun x : α × β => (p x.1) = (q x.2)).card =
      (s.filter p).card * (t.filter q).card +
        (s.filter (¬ p ·)).card * (t.filter (¬ q ·)).card
-- Mathlib/Data/Nat/Multiplicity.lean
theorem multiplicity_pow {p m n : ℕ} (hp : p.Prime) :
    multiplicity p (m ^ n) = n • multiplicity p m
-- Mathlib/Data/Matroid/Closure.lean
lemma Basis.subset_closure (h : M.Basis I X) : X ⊆ M.closure I
-- Mathlib/Order/Antichain.lean
protected theorem subset (hs : IsAntichain r s) (h : t ⊆ s) : IsAntichain r t
-- .lake/packages/lean4/src/lean/Init/Data/List/Impl.lean
@[csimp] theorem replicate_eq_replicateTR : @List.replicate = @List.replicateTR
-- Mathlib/Order/SymmDiff.lean
protected theorem Disjoint.symmDiff_right (ha : Disjoint a b) (hb : Disjoint a c) :
    Disjoint a (b ∆ c)
-- Mathlib/Analysis/SpecialFunctions/Trigonometric/Basic.lean
theorem sin_periodic : Function.Periodic sin (2 * π)
-- Mathlib/Tactic/CategoryTheory/Elementwise.lean
theorem hom_elementwise {C : Type*} [Category C] [ConcreteCategory C]
    {X Y : C} {f g : X ⟶ Y} (h : f = g) (x : X) : f x = g x
-- Mathlib/Analysis/Calculus/FDeriv/Basic.lean
theorem fderivWithin_subset (st : s ⊆ t) (ht : UniqueDiffWithinAt 𝕜 s x)
    (h : DifferentiableWithinAt 𝕜 f t x) : fderivWithin 𝕜 f s x = fderivWithin 𝕜 f t x
-- Mathlib/Topology/MetricSpace/IsometricSMul.lean
@[to_additive (attr := simp)]
theorem smul_ball (c : G) (x : X) (r : ℝ) : c • ball x r = ball (c • x) r
-- Mathlib/Algebra/Ring/Rat.lean
lemma divInt_div_divInt_cancel_left {x : ℤ} (hx : x ≠ 0) (n d : ℤ) :
    n /. x / (d /. x) = n /. d
-- Mathlib/Data/Nat/Factorization/Basic.lean
theorem factorization_ord_compl (n p : ℕ) :
    (ord_compl[p] n).factorization = n.factorization.erase p
-- Mathlib/Order/Booleanisation.lean
@[simp] lemma lift_sdiff_lift (a b : α) : lift a \ lift b = lift (a \ b)
-- Mathlib/Topology/Algebra/InfiniteSum/Basic.lean
@[to_additive]
theorem Equiv.hasProd_iff (e : γ ≃ β) : HasProd (f ∘ e) a ↔ HasProd f a
-- Mathlib/RingTheory/Ideal/Operations.lean
theorem IsRadical.inf (hI : IsRadical I) (hJ : IsRadical J) : IsRadical (I ⊓ J)
-- Mathlib/Algebra/Module/Torsion.lean
/-- A module over a domain has `NoZeroSMulDivisors` iff its torsion submodule is trivial. -/
theorem noZeroSMulDivisors_iff_torsion_eq_bot : NoZeroSMulDivisors R M ↔ torsion R M = ⊥
-- Mathlib/MeasureTheory/MeasurableSpace/Defs.lean
theorem Set.Countable.measurableSet {s : Set α} (hs : s.Countable) : MeasurableSet s
-- Mathlib/Data/Finite/Basic.lean
theorem sum_left (β) [Finite (α ⊕ β)] : Finite α
-- Mathlib/GroupTheory/GroupAction/FixingSubgroup.lean
/-- Fixed points of iSup of subgroups is intersection -/
theorem fixedPoints_subgroup_iSup {ι : Sort*} {P : ι → Subgroup M} :
    fixedPoints (↥(iSup P)) α = ⋂ i, fixedPoints (P i) α
-- .lake/packages/lean4/src/lean/Init/PropLemmas.lean
theorem Decidable.or_iff_not_and_not [Decidable a] [Decidable b] : a ∨ b ↔ ¬(¬a ∧ ¬b)
-- Mathlib/Algebra/Homology/Embedding/Basic.lean
/-- The condition that the image of the map `e.f` of an embedding of
complex shapes `e : Embedding c c'` is stable by `c'.next`. -/
class IsTruncGE extends e.IsRelIff : Prop where
  mem_next {j : ι} {k' : ι'} (h : c'.Rel (e.f j) k') :
    ∃ k, e.f k = k'
-- Mathlib/AlgebraicTopology/FundamentalGroupoid/Product.lean
/-- The map taking the pi product of a family of fundamental groupoids to the fundamental
groupoid of the pi product. This is actually an isomorphism (see `piIso`)
-/
@[simps]
def piToPiTop : (∀ i, πₓ (X i)) ⥤ πₓ (TopCat.of (∀ i, X i))
-- Mathlib/Geometry/Euclidean/Angle/Unoriented/RightAngle.lean
/-- An angle in a non-degenerate right-angled triangle is positive. -/
theorem angle_add_pos_of_inner_eq_zero {x y : V} (h : ⟪x, y⟫ = 0) (h0 : x = 0 ∨ y ≠ 0) :
    0 < angle x (x + y)
-- Mathlib/Deprecated/Subgroup.lean
@[to_additive]
theorem trivial_normal : IsNormalSubgroup (trivial G)
-- Mathlib/Topology/EMetricSpace/Basic.lean
theorem diam_closedBall {r : ℝ≥0∞} : diam (closedBall x r) ≤ 2 * r
-- Mathlib/Topology/Basic.lean
theorem Filter.HasBasis.lift'_interior {l : Filter X} {p : ι → Prop} {s : ι → Set X}
    (h : l.HasBasis p s) : (l.lift' interior).HasBasis p fun i => interior (s i)
-- Mathlib/Topology/ContinuousFunction/CompactlySupported.lean
/-- `C_c(α, β)` is the type of continuous functions `α → β` with compact support from a topological
space to a topological space with a zero element.

When possible, instead of parametrizing results over `f : C_c(α, β)`,
you should parametrize over `{F : Type*} [CompactlySupportedContinuousMapClass F α β] (f : F)`.

When you extend this structure, make sure to extend `CompactlySupportedContinuousMapClass`. -/
structure CompactlySupportedContinuousMap (α β : Type*) [TopologicalSpace α] [Zero β]
    [TopologicalSpace β] extends ContinuousMap α β where
  /-- The function has compact support . -/
  hasCompactSupport' : HasCompactSupport toFun
-- Mathlib/MeasureTheory/MeasurableSpace/Basic.lean
@[measurability]
theorem Measurable.iterate {f : α → α} (hf : Measurable f) : ∀ n, Measurable f^[n]
-- Mathlib/Data/Rat/Defs.lean
theorem mk_num_ne_zero_of_ne_zero {q : ℚ} {n d : ℤ} (hq : q ≠ 0) (hqnd : q = n /. d) : n ≠ 0
-- Mathlib/Data/Set/Function.lean
/-- Restricting the domain and then the codomain is the same as `MapsTo.restrict`. -/
@[simp]
theorem codRestrict_restrict (h : ∀ x : s, f x ∈ t) :
    codRestrict (s.restrict f) t h = MapsTo.restrict f s t fun x hx => h ⟨x, hx⟩
-- .lake/packages/batteries/Batteries/Data/UInt.lean
theorem UInt32.toNat_zero : (0 : UInt32).toNat = 0
-- Mathlib/Topology/Algebra/ConstMulAction.lean
@[to_additive]
theorem interior_smul (c : G) (s : Set α) : interior (c • s) = c • interior s
-- Mathlib/Probability/Kernel/Composition.lean
@[simp]
theorem prodMkLeft_apply (κ : Kernel α β) (ca : γ × α) : prodMkLeft γ κ ca = κ ca.snd
-- Mathlib/GroupTheory/Perm/Sign.lean
theorem sign_prodCongrRight (σ : α → Perm β) : sign (prodCongrRight σ) = ∏ k, sign (σ k)
-- Mathlib/AlgebraicGeometry/ProjectiveSpectrum/Scheme.lean
lemma stalkMap_toSpec (f) (x : pbo f) {m} (f_deg : f ∈ 𝒜 m) (hm : 0 < m) :
    (toSpec 𝒜 f).stalkMap x =
      (specStalkEquiv 𝒜 f x f_deg hm).hom ≫ (Proj.stalkIso' 𝒜 x.1).toCommRingCatIso.inv ≫
      ((Proj.toLocallyRingedSpace 𝒜).restrictStalkIso (Opens.openEmbedding _) x).inv