ruc-ai4math/mathlib_handler_benchmark_410 huggingface dataset:
-- Mathlib/Combinatorics/SetFamily/Shadow.lean
/-- The `k`-th shadow of a family of `r`-sets is a family of `r - k`-sets. -/
lemma _root_.Set.Sized.shadow_iterate (h𝒜 : (𝒜 : Set (Finset α)).Sized r) :
    (∂^[k] 𝒜 : Set (Finset α)).Sized (r - k)
-- Mathlib/Data/Multiset/Basic.lean
theorem lt_replicate_succ {m : Multiset α} {x : α} {n : ℕ} :
    m < replicate (n + 1) x ↔ m ≤ replicate n x
-- Mathlib/Analysis/SpecialFunctions/Trigonometric/Deriv.lean
theorem fderivWithin_sin (hf : DifferentiableWithinAt ℝ f s x) (hxs : UniqueDiffWithinAt ℝ s x) :
    fderivWithin ℝ (fun x => Real.sin (f x)) s x = Real.cos (f x) • fderivWithin ℝ f s x
-- Mathlib/Data/Rat/Defs.lean
protected theorem add_assoc : a + b + c = a + (b + c)
-- Mathlib/Data/Nat/Cast/SetInterval.lean
@[simp]
theorem range_cast_int : range ((↑) : ℕ → ℤ) = Ici 0
-- Mathlib/Algebra/GroupWithZero/Units/Basic.lean
theorem IsUnit.ring_inverse {a : M₀} : IsUnit a → IsUnit (Ring.inverse a)
-- .lake/packages/lean4/src/lean/Init/Data/List/Lemmas.lean
theorem filter_congr {p q : α → Bool} :
    ∀ {l : List α}, (∀ x ∈ l, p x = q x) → filter p l = filter q l
-- Mathlib/Algebra/Order/Pointwise.lean
@[to_additive]
theorem csSup_div (hs₀ : s.Nonempty) (hs₁ : BddAbove s) (ht₀ : t.Nonempty) (ht₁ : BddBelow t) :
    sSup (s / t) = sSup s / sInf t
-- Mathlib/NumberTheory/Padics/PadicVal.lean
theorem le_padicValNat_iff_replicate_subperm_primeFactorsList {a b : ℕ} {n : ℕ} (ha : a.Prime)
    (hb : b ≠ 0) :
    n ≤ padicValNat a b ↔ replicate n a <+~ b.primeFactorsList
-- Mathlib/Algebra/Squarefree/Basic.lean
theorem IsRadical.squarefree (h0 : x ≠ 0) (h : IsRadical x) : Squarefree x
-- Mathlib/Algebra/Polynomial/Inductions.lean
@[simp]
theorem divX_C_mul : divX (C a * p) = C a * divX p
-- Mathlib/Data/Nat/Choose/Factorization.lean
/-- If a prime `p` has positive multiplicity in the `n`th central binomial coefficient,
`p` is no more than `2 * n` -/
theorem factorization_centralBinom_eq_zero_of_two_mul_lt (h : 2 * n < p) :
    (centralBinom n).factorization p = 0
-- Mathlib/Topology/Algebra/Order/Floor.lean
theorem tendsto_fract_right [OrderClosedTopology α] [TopologicalAddGroup α] (n : ℤ) :
    Tendsto (fract : α → α) (𝓝[≥] n) (𝓝[≥] 0)
-- Mathlib/LinearAlgebra/BilinearForm/Properties.lean
theorem isAdjointPairLeftAdjointOfNondegenerate (B : BilinForm K V) (b : B.Nondegenerate)
    (φ : V →ₗ[K] V) : IsAdjointPair B B (B.leftAdjointOfNondegenerate b φ) φ
-- Mathlib/Data/Nat/Prime/Defs.lean
@[simp]
theorem minFac_two : minFac 2 = 2
-- Mathlib/Data/ENNReal/Basic.lean
@[simp]
theorem iUnion_Iio_coe_nat : ⋃ n : ℕ, Iio (n : ℝ≥0∞) = {∞}ᶜ
-- Mathlib/Analysis/Convex/Cone/Basic.lean
theorem mem_iInf {ι : Sort*} {x : E} {f : ι → ConvexCone 𝕜 E} : x ∈ iInf f ↔ ∀ i, x ∈ f i
-- Mathlib/RingTheory/Derivation/Basic.lean
theorem eqOn_adjoin {s : Set A} (h : Set.EqOn D1 D2 s) : Set.EqOn D1 D2 (adjoin R s)
-- .lake/packages/batteries/Batteries/Data/RBMap/WF.lean
/-- The `balance2` function does nothing if the second argument is already balanced. -/
theorem balance2_eq {l : RBNode α} {v : α} {r : RBNode α}
    (hr : r.Balanced c n) : balance2 l v r = node black l v r
-- Mathlib/Algebra/Module/LocalizedModule.lean
lemma isLocalizedModule_id (R') [CommSemiring R'] [Algebra R R'] [IsLocalization S R'] [Module R' M]
    [IsScalarTower R R' M] : IsLocalizedModule S (.id : M →ₗ[R] M)
-- Mathlib/Data/Ordmap/Ordset.lean
theorem foldr_cons_eq_toList : ∀ (t : Ordnode α) (r : List α), t.foldr List.cons r = toList t ++ r
-- Mathlib/CategoryTheory/Groupoid/FreeGroupoid.lean
theorem lift_spec (φ : V ⥤q V') : of V ⋙q (lift φ).toPrefunctor = φ
-- Mathlib/LinearAlgebra/Ray.lean
/-- A nonzero vector is in the same ray as a multiple of itself if and only if that multiple
is positive. -/
theorem sameRay_smul_right_iff_of_ne {v : M} (hv : v ≠ 0) {r : R} (hr : r ≠ 0) :
    SameRay R v (r • v) ↔ 0 < r
-- Mathlib/NumberTheory/Padics/PadicIntegers.lean
theorem ideal_eq_span_pow_p {s : Ideal ℤ_[p]} (hs : s ≠ ⊥) :
    ∃ n : ℕ, s = Ideal.span {(p : ℤ_[p]) ^ n}
-- Mathlib/Topology/Category/Profinite/Limits.lean
lemma pullback.hom_ext {Z : Profinite.{u}} (a b : Z ⟶ pullback f g)
    (hfst : a ≫ pullback.fst f g = b ≫ pullback.fst f g)
    (hsnd : a ≫ pullback.snd f g = b ≫ pullback.snd f g) : a = b
-- Mathlib/RingTheory/WittVector/Defs.lean
@[simp]
theorem wittOne_pos_eq_zero (n : ℕ) (hn : 0 < n) : wittOne p n = 0
-- Mathlib/Analysis/SpecialFunctions/Trigonometric/Deriv.lean
theorem ContDiffWithinAt.ccos {n} (hf : ContDiffWithinAt ℂ n f s x) :
    ContDiffWithinAt ℂ n (fun x => Complex.cos (f x)) s x
-- Mathlib/CategoryTheory/Limits/Shapes/Diagonal.lean
@[reassoc (attr := simp)]
theorem pullbackDiagonalMapIso_inv_fst :
    (pullbackDiagonalMapIso f i i₁ i₂).inv ≫ pullback.fst _ _ =
      pullback.fst _ _ ≫ i₁ ≫ pullback.fst _ _
-- Mathlib/RingTheory/FiniteType.lean
theorem of_finite {f : A →+* B} (hf : f.Finite) : f.FiniteType
-- Mathlib/NumberTheory/ModularForms/CongruenceSubgroups.lean
@[simp]
theorem Gamma0_mem (N : ℕ) (A : SL(2, ℤ)) : A ∈ Gamma0 N ↔ ((↑ₘA 1 0 : ℤ) : ZMod N) = 0
-- Mathlib/CategoryTheory/Limits/Shapes/Products.lean
@[reassoc (attr := simp)]
lemma Sigma.ι_comp_map' {f : α → C} {g : β → C} [HasCoproduct f] [HasCoproduct g]
    (p : α → β) (q : ∀ (a : α), f a ⟶ g (p a)) (a : α) :
    Sigma.ι f a ≫ Sigma.map' p q = q a ≫ Sigma.ι g (p a)
-- Mathlib/Algebra/Order/Floor.lean
@[simp]
theorem floor_sub_one [Sub α] [OrderedSub α] [ExistsAddOfLE α] (a : α) : ⌊a - 1⌋₊ = ⌊a⌋₊ - 1
-- Mathlib/Topology/ContinuousFunction/Bounded.lean
theorem nnnorm_coe_le_nnnorm (x : α) : ‖f x‖₊ ≤ ‖f‖₊
-- Mathlib/Data/String/Basic.lean
@[simp]
theorem lt_iff_toList_lt : ∀ {s₁ s₂ : String}, s₁ < s₂ ↔ s₁.toList < s₂.toList
-- Mathlib/Data/Set/Image.lean
theorem preimage_eq_empty {s : Set β} (h : Disjoint s (range f)) :
    f ⁻¹' s = ∅
-- Mathlib/Logic/Encodable/Lattice.lean
theorem iUnion_decode₂ (f : β → Set α) : ⋃ (i : ℕ) (b ∈ decode₂ β i), f b = ⋃ b, f b
-- Mathlib/Data/Finset/Lattice.lean
theorem iSup_insert (a : α) (s : Finset α) (t : α → β) :
    ⨆ x ∈ insert a s, t x = t a ⊔ ⨆ x ∈ s, t x
-- Mathlib/Logic/Function/Iterate.lean
theorem iterate_mul (m : ℕ) : ∀ n, f^[m * n] = f^[m]^[n]
-- .lake/packages/batteries/Batteries/Data/UInt.lean
@[simp] theorem UInt64.toNat_ofNat (n) :
    (no_index (OfNat.ofNat n) : UInt64).toNat = n % UInt64.size
-- Mathlib/GroupTheory/Perm/Basic.lean
@[simp]
theorem apply_inv_self (f : Perm α) (x) : f (f⁻¹ x) = x
-- Mathlib/Topology/Compactification/OnePoint.lean
theorem isOpen_range_coe : IsOpen (range ((↑) : X → OnePoint X))
-- Mathlib/RingTheory/GradedAlgebra/Basic.lean
theorem coe_decompose_mul_add_of_right_mem [AddRightCancelMonoid ι] [GradedRing 𝒜] {a b : A}
    (b_mem : b ∈ 𝒜 j) : (decompose 𝒜 (a * b) (i + j) : A) = decompose 𝒜 a i * b
-- Mathlib/LinearAlgebra/Orientation.lean
theorem det_adjustToOrientation [Nonempty ι] (e : Basis ι R M)
    (x : Orientation R M ι) :
    (e.adjustToOrientation x).det = e.det ∨ (e.adjustToOrientation x).det = -e.det
-- Mathlib/Analysis/Calculus/ContDiff/Defs.lean
theorem ContDiffOn.continuousOn_iteratedFDerivWithin {m : ℕ} (h : ContDiffOn 𝕜 n f s)
    (hmn : (m : ℕ∞) ≤ n) (hs : UniqueDiffOn 𝕜 s) : ContinuousOn (iteratedFDerivWithin 𝕜 m f s) s
-- Mathlib/Algebra/Quaternion.lean
/-- `QuaternionAlgebra.imJ` as a `LinearMap`-/
@[simps]
def imJₗ : ℍ[R,c₁,c₂] →ₗ[R] R
-- Mathlib/NumberTheory/FLT/Four.lean
/-- We can assume that a minimal solution to `a ^ 4 + b ^ 4 = c ^ 2` has
`a` odd and `c` positive. -/
theorem exists_pos_odd_minimal {a b c : ℤ} (h : Fermat42 a b c) :
    ∃ a0 b0 c0, Minimal a0 b0 c0 ∧ a0 % 2 = 1 ∧ 0 < c0
-- Mathlib/LinearAlgebra/Multilinear/Basic.lean
/-- The cartesian product of two multilinear maps, as a multilinear map. -/
@[simps]
def prod (f : MultilinearMap R M₁ M₂) (g : MultilinearMap R M₁ M₃) :
    MultilinearMap R M₁ (M₂ × M₃)
-- Mathlib/Algebra/Lie/Subalgebra.lean
@[simp]
theorem span_empty : lieSpan R L (∅ : Set L) = ⊥
-- Mathlib/MeasureTheory/Group/FundamentalDomain.lean
@[to_additive]
theorem iUnion_smul_ae_eq (h : IsFundamentalDomain G s μ) : ⋃ g : G, g • s =ᵐ[μ] univ
-- Mathlib/Topology/PartitionOfUnity.lean
theorem ind_apply (x : X) (hx : x ∈ s) : f (f.ind x hx) x = 1
-- Mathlib/CategoryTheory/Limits/Shapes/Types.lean
lemma pushoutCocone_inl_eq_inr_imp_of_iso {c c' : PushoutCocone f g} (e : c ≅ c')
    (x₁ : X₁) (x₂ : X₂) (h : c.inl x₁ = c.inr x₂) :
    c'.inl x₁ = c'.inr x₂
-- Mathlib/Algebra/Homology/TotalComplexShift.lean
/-- The compatibility isomorphisms of the total complex with the shifts
in both variables "commute" only up to a sign `(x * y).negOnePow`. -/
lemma totalShift₁Iso_trans_totalShift₂Iso :
    ((shiftFunctor₂ C y).obj K).totalShift₁Iso x ≪≫
      (shiftFunctor (CochainComplex C ℤ) x).mapIso (K.totalShift₂Iso y) =
    (x * y).negOnePow • (total.mapIso ((shiftFunctor₁₂CommIso C x y).app K) (up ℤ)) ≪≫
      ((shiftFunctor₁ C x).obj K).totalShift₂Iso y ≪≫
      (shiftFunctor _ y).mapIso (K.totalShift₁Iso x) ≪≫
      (shiftFunctorComm (CochainComplex C ℤ) x y).app _
-- Mathlib/Algebra/MonoidAlgebra/Support.lean
theorem support_single_mul [Mul G] [IsLeftCancelMul G] (f : MonoidAlgebra k G) (r : k)
    (hr : ∀ y, r * y = 0 ↔ y = 0) (x : G) :
    (single x r * f : MonoidAlgebra k G).support = f.support.map (mulLeftEmbedding x)
-- Mathlib/Algebra/Polynomial/Smeval.lean
theorem smeval_assoc_X_pow (m n : ℕ) :
    p.smeval x * x ^ m * x ^ n = p.smeval x * (x ^ m * x ^ n)
-- Mathlib/Algebra/Order/Interval/Set/Instances.lean
@[simp]
theorem mk_zero [Nontrivial α] (h : (0 : α) ∈ Ico (0 : α) 1) : (⟨0, h⟩ : Ico (0 : α) 1) = 0
-- Mathlib/Data/Real/Irrational.lean
theorem nat_mul (h : Irrational x) {m : ℕ} (hm : m ≠ 0) : Irrational (m * x)
-- .lake/packages/lean4/src/lean/Init/Data/Int/DivModLemmas.lean
theorem mod_def (a b : Int) : mod a b = a - b * a.div b
-- Mathlib/Order/SuccPred/Basic.lean
theorem isMin_iterate_pred_of_eq_of_ne {n m : ℕ} (h_eq : pred^[n] a = pred^[m] a)
    (h_ne : n ≠ m) : IsMin (pred^[n] a)
-- Mathlib/Topology/UniformSpace/Equicontinuity.lean
theorem uniformEquicontinuousOn_iInf_rng {u : κ → UniformSpace α'} {F : ι → β → α'}
    {S : Set β} : UniformEquicontinuousOn (uα := ⨅ k, u k) F S ↔
      ∀ k, UniformEquicontinuousOn (uα := u k) F S
-- Mathlib/LinearAlgebra/QuadraticForm/TensorProduct.lean
@[simp]
theorem tensorDistrib_tmul (Q₁ : QuadraticForm A M₁) (Q₂ : QuadraticForm R M₂) (m₁ : M₁) (m₂ : M₂) :
    tensorDistrib R A (Q₁ ⊗ₜ Q₂) (m₁ ⊗ₜ m₂) = Q₂ m₂ • Q₁ m₁
-- .lake/packages/lean4/src/lean/Init/Data/List/Lemmas.lean
theorem concat_eq_concat {l l' : List α} {a b : α} : concat l a = concat l' b ↔ l = l' ∧ a = b
-- Mathlib/Order/Monotone/Monovary.lean
theorem Monovary.dual_left : Monovary f g → Antivary (toDual ∘ f) g
-- Mathlib/Analysis/Normed/Field/Basic.lean
theorem Finset.norm_prod_le {α : Type*} [NormedCommRing α] [NormOneClass α] (s : Finset ι)
    (f : ι → α) : ‖∏ i ∈ s, f i‖ ≤ ∏ i ∈ s, ‖f i‖
-- Mathlib/MeasureTheory/Function/Floor.lean
@[measurability]
theorem Measurable.nat_floor (hf : Measurable f) : Measurable fun x => ⌊f x⌋₊
-- Mathlib/LinearAlgebra/TensorProduct/Tower.lean
@[simp]
theorem leftComm_symm_tmul (m : M) (p : P) (q : Q) :
    (leftComm R A M P Q).symm (p ⊗ₜ (m ⊗ₜ q)) = m ⊗ₜ (p ⊗ₜ q)
-- Mathlib/LinearAlgebra/Span.lean
theorem map_injective {f : F} (hf : ker f = ⊥) : Injective (map f)
-- Mathlib/Algebra/BigOperators/Fin.lean
@[to_additive]
theorem prod_univ_three [CommMonoid β] (f : Fin 3 → β) : ∏ i, f i = f 0 * f 1 * f 2
-- Mathlib/Algebra/Module/Torsion.lean
/-- Torsion by a set is torsion by the ideal generated by it. -/
theorem torsionBySet_eq_torsionBySet_span :
    torsionBySet R M s = torsionBySet R M (Ideal.span s)
-- Mathlib/Combinatorics/Colex.lean
@[simp] theorem twoPowSum_toFinset_bitIndices (n : ℕ) :
    ∑ i in n.bitIndices.toFinset, 2 ^ i = n
-- Mathlib/Logic/Function/Basic.lean
theorem Injective.surjective_comp_right [Nonempty γ] (hf : Injective f) :
    Surjective fun g : β → γ ↦ g ∘ f
-- Mathlib/Data/Set/Image.lean
@[simp]
theorem preimage_union {s t : Set β} : f ⁻¹' (s ∪ t) = f ⁻¹' s ∪ f ⁻¹' t
-- Mathlib/GroupTheory/QuotientGroup.lean
@[to_additive (attr := simp)]
theorem quotientMulEquivOfEq_mk {M N : Subgroup G} [M.Normal] [N.Normal] (h : M = N) (x : G) :
    QuotientGroup.quotientMulEquivOfEq h (QuotientGroup.mk x) = QuotientGroup.mk x
-- .lake/packages/batteries/Batteries/Data/Rat/Lemmas.lean
theorem mkRat_def (n d) : mkRat n d = if d0 : d = 0 then 0 else normalize n d d0
-- Mathlib/RingTheory/HahnSeries/Addition.lean
theorem orderTop_add_eq_right {Γ} [LinearOrder Γ] {x y : HahnSeries Γ R}
    (hxy : y.orderTop < x.orderTop) : (x + y).orderTop = y.orderTop
-- Mathlib/MeasureTheory/Function/AEEqFun.lean
theorem smul_toGerm (c : 𝕜) (f : α →ₘ[μ] γ) : (c • f).toGerm = c • f.toGerm
-- .lake/packages/lean4/src/lean/Init/Core.lean
/--
`IdempotentOp op` indicates `op` is an idempotent binary operation.
i.e. `a ∘ a = a`.
-/
class IdempotentOp (op : α → α → α) : Prop where
  /-- An idempotent operation satisfies `a ∘ a = a`. -/
  idempotent : (x : α) → op x x = x
-- Mathlib/Analysis/Complex/Liouville.lean
/-- A corollary of Liouville's theorem where the function tends to a finite value at infinity
(i.e., along `Filter.cocompact`, which in proper spaces coincides with `Bornology.cobounded`). -/
theorem eq_const_of_tendsto_cocompact [Nontrivial E] {f : E → F} (hf : Differentiable ℂ f) {c : F}
    (hb : Tendsto f (cocompact E) (𝓝 c)) : f = Function.const E c
-- Mathlib/Topology/Algebra/Algebra.lean
theorem comp_apply (g : B →A[R] C) (f : A →A[R] B) (x : A) : (g.comp f) x = g (f x)
-- Mathlib/Algebra/Ring/Prod.lean
@[simp]
theorem prod_apply (x) : f.prod g x = (f x, g x)
-- Mathlib/Geometry/Euclidean/Angle/Oriented/RightAngle.lean
/-- An angle in a right-angled triangle expressed using `arctan`, version subtracting vectors. -/
theorem oangle_sub_right_eq_arctan_of_oangle_eq_pi_div_two {x y : V} (h : o.oangle x y = ↑(π / 2)) :
    o.oangle y (y - x) = Real.arctan (‖x‖ / ‖y‖)
-- Mathlib/Analysis/Fourier/FourierTransformDeriv.lean
theorem differentiable_fourierIntegral
    (hf_int : Integrable f) (hvf_int : Integrable (fun v ↦ ‖v‖ * ‖f v‖)) :
    Differentiable ℝ (𝓕 f)
-- Mathlib/Computability/RegularExpressions.lean
theorem char_rmatch_iff (a : α) (x : List α) : rmatch (char a) x ↔ x = [a]
-- Mathlib/Algebra/Polynomial/Degree/Definitions.lean
theorem natDegree_monomial_eq (i : ℕ) {r : R} (r0 : r ≠ 0) : (monomial i r).natDegree = i
-- Mathlib/Algebra/Order/ToIntervalMod.lean
@[simp]
theorem toIcoDiv_zsmul_add (a b : α) (m : ℤ) : toIcoDiv hp a (m • p + b) = m + toIcoDiv hp a b
-- Mathlib/MeasureTheory/Function/LpSpace.lean
@[simp]
theorem coe_toLp [NormedField 𝕜] [NormedSpace 𝕜 E] (f : C(α, E)) :
    (toLp (E := E) p μ 𝕜 f : α →ₘ[μ] E) = f.toAEEqFun μ
-- Mathlib/Algebra/Order/Field/Power.lean
theorem zpow_injective (h₀ : 0 < a) (h₁ : a ≠ 1) : Injective (a ^ · : ℤ → α)
-- Mathlib/Algebra/Module/Torsion.lean
@[simp]
theorem torsionBySet_univ : torsionBySet R M Set.univ = ⊥
-- Mathlib/Algebra/Group/Subsemigroup/Operations.lean
@[to_additive]
theorem map_le_iff_le_comap {f : M →ₙ* N} {S : Subsemigroup M} {T : Subsemigroup N} :
    S.map f ≤ T ↔ S ≤ T.comap f
-- Mathlib/Analysis/InnerProductSpace/Calculus.lean
theorem DifferentiableAt.dist (hf : DifferentiableAt ℝ f x) (hg : DifferentiableAt ℝ g x)
    (hne : f x ≠ g x) : DifferentiableAt ℝ (fun y => dist (f y) (g y)) x
-- Mathlib/Data/Set/Function.lean
theorem SurjOn.congr (h : SurjOn f₁ s t) (H : EqOn f₁ f₂ s) : SurjOn f₂ s t
-- Mathlib/Analysis/SpecialFunctions/Trigonometric/Deriv.lean
theorem DifferentiableOn.cosh (hc : DifferentiableOn ℝ f s) :
    DifferentiableOn ℝ (fun x => Real.cosh (f x)) s
-- Mathlib/MeasureTheory/Integral/IntegralEqImproper.lean
/-- **Integration by parts on (-∞, ∞).**
For finite intervals, see: `intervalIntegral.integral_mul_deriv_eq_deriv_mul`. -/
theorem integral_mul_deriv_eq_deriv_mul [CompleteSpace A]
    (hu : ∀ x, HasDerivAt u (u' x) x) (hv : ∀ x, HasDerivAt v (v' x) x)
    (huv' : Integrable (u * v')) (hu'v : Integrable (u' * v))
    (h_bot : Tendsto (u * v) atBot (𝓝 a')) (h_top : Tendsto (u * v) atTop (𝓝 b')) :
    ∫ (x : ℝ), u x * v' x = b' - a' - ∫ (x : ℝ), u' x * v x
-- Mathlib/Topology/Basic.lean
theorem DenseRange.nonempty [h : Nonempty X] (hf : DenseRange f) : Nonempty α
-- Mathlib/RingTheory/Kaehler/Basic.lean
lemma KaehlerDifferential.mapBaseChange_surjective
    (h : Function.Surjective (algebraMap A B)) :
    Function.Surjective (KaehlerDifferential.mapBaseChange R A B)
-- Mathlib/LinearAlgebra/AffineSpace/FiniteDimensional.lean
/-- The `vectorSpan` of a finite affinely independent family has dimension one less than its
cardinality. -/
lemma AffineIndependent.finrank_vectorSpan_add_one [Fintype ι] [Nonempty ι] {p : ι → P}
    (hi : AffineIndependent k p) : finrank k (vectorSpan k (Set.range p)) + 1 = Fintype.card ι
-- Mathlib/CategoryTheory/Limits/Shapes/WidePullbacks.lean
/-- The obvious functor `(WidePullbackShape J)ᵒᵖ ⥤ WidePushoutShape J`-/
@[simps!]
def widePullbackShapeUnop : (WidePullbackShape J)ᵒᵖ ⥤ WidePushoutShape J
-- Mathlib/CategoryTheory/Functor/KanExtension/Basic.lean
lemma HasLeftKanExtension.mk (F' : D ⥤ H) {L : C ⥤ D} {F : C ⥤ H} (α : F ⟶ L ⋙ F')
    [F'.IsLeftKanExtension α] : HasLeftKanExtension L F
-- Mathlib/Analysis/Convex/Gauge.lean
theorem mem_closure_of_gauge_le_one (hc : Convex ℝ s) (hs₀ : 0 ∈ s) (ha : Absorbent ℝ s)
    (h : gauge s x ≤ 1) : x ∈ closure s
-- Mathlib/Algebra/Star/Order.lean
/-- An ordered `*`-ring is a `*`ring with a partial order such that the nonnegative elements
constitute precisely the `AddSubmonoid` generated by elements of the form `star s * s`.

If you are working with a `NonUnitalRing` and not a `NonUnitalSemiring`, it may be more
convenient to declare instances using `StarOrderedRing.of_nonneg_iff`.

Porting note: dropped an unneeded assumption
`add_le_add_left : ∀ {x y}, x ≤ y → ∀ z, z + x ≤ z + y` -/
class StarOrderedRing (R : Type u) [NonUnitalSemiring R] [PartialOrder R]
    [StarRing R] : Prop where
  /-- characterization of the order in terms of the `StarRing` structure. -/
  le_iff :
    ∀ x y : R, x ≤ y ↔ ∃ p, p ∈ AddSubmonoid.closure (Set.range fun s => star s * s) ∧ y = x + p
-- Mathlib/SetTheory/Cardinal/Basic.lean
@[simp]
theorem mk_le_one_iff_set_subsingleton {s : Set α} : #s ≤ 1 ↔ s.Subsingleton
-- Mathlib/Topology/UniformSpace/Cauchy.lean
theorem TotallyBounded.exists_subset {s : Set α} (hs : TotallyBounded s) {U : Set (α × α)}
    (hU : U ∈ 𝓤 α) : ∃ t, t ⊆ s ∧ Set.Finite t ∧ s ⊆ ⋃ y ∈ t, { x | (x, y) ∈ U }
-- Mathlib/MeasureTheory/Measure/Haar/Unique.lean
@[to_additive (attr := simp) addHaarScalarFactor_smul]
lemma haarScalarFactor_smul [LocallyCompactSpace G] (μ' μ : Measure G) [IsHaarMeasure μ]
    [IsFiniteMeasureOnCompacts μ'] [IsMulLeftInvariant μ'] {c : ℝ≥0} :
    haarScalarFactor (c • μ') μ = c • haarScalarFactor μ' μ
-- Mathlib/CategoryTheory/Sites/Sieves.lean
/-- If a sieve S is contained in a sieve T, then we have a morphism of presheaves on their induced
presheaves.
-/
@[simps]
def natTransOfLe {S T : Sieve X} (h : S ≤ T) : S.functor ⟶ T.functor
-- .lake/packages/lean4/src/lean/Init/Data/List/Lemmas.lean
@[simp] theorem getElem!_nil [Inhabited α] {n : Nat} : ([] : List α)[n]! = default
-- .lake/packages/lean4/src/lean/Init/Data/List/Lemmas.lean
theorem any_map (f : α → β) (l : List α) (p : β → Bool) : (l.map f).any p = l.any (p ∘ f)
-- Mathlib/Algebra/Module/Zlattice/Basic.lean
theorem Zlattice.FG [hs : IsZlattice K L] : AddSubgroup.FG L
-- Mathlib/Geometry/Manifold/ContMDiff/Defs.lean
theorem ContMDiffWithinAt.congr (h : ContMDiffWithinAt I I' n f s x) (h₁ : ∀ y ∈ s, f₁ y = f y)
    (hx : f₁ x = f x) : ContMDiffWithinAt I I' n f₁ s x
-- Mathlib/Data/ENNReal/Basic.lean
@[simp]
theorem iUnion_Ioo_coe_nat : ⋃ n : ℕ, Ioo a n = Ioi a \ {∞}
-- Mathlib/MeasureTheory/Function/ConditionalExpectation/AEMeasurable.lean
theorem lpMeasSubgroupToLpTrim_ae_eq (hm : m ≤ m0) (f : lpMeasSubgroup F m p μ) :
    lpMeasSubgroupToLpTrim F p μ hm f =ᵐ[μ] f
-- Mathlib/Probability/ProbabilityMassFunction/Constructions.lean
@[simp]
theorem support_filter : (p.filter s h).support = s ∩ p.support
-- Mathlib/CategoryTheory/Triangulated/Pretriangulated.lean
lemma isZero₃_of_isZero₁₂ (h₁ : IsZero T.obj₁) (h₂ : IsZero T.obj₂) : IsZero T.obj₃
-- Mathlib/MeasureTheory/Group/Measure.lean
@[to_additive]
theorem eventually_div_right_iff (μ : Measure G) [IsMulRightInvariant μ] (t : G) {p : G → Prop} :
    (∀ᵐ x ∂μ, p (x / t)) ↔ ∀ᵐ x ∂μ, p x
-- Mathlib/LinearAlgebra/Multilinear/Basic.lean
theorem mkPiRing_zero [Fintype ι] : MultilinearMap.mkPiRing R ι (0 : M₂) = 0
-- Mathlib/Topology/Algebra/Module/Basic.lean
@[simp]
theorem symm_image_image (e : M₁ ≃SL[σ₁₂] M₂) (s : Set M₁) : e.symm '' (e '' s) = s
-- Mathlib/Algebra/Category/MonCat/Basic.lean
@[to_additive]
theorem coe_of (R : Type u) [Monoid R] : (MonCat.of R : Type u) = R
-- Mathlib/Algebra/Group/Prod.lean
@[to_additive (attr := simp)]
theorem fst_div [Div G] [Div H] (a b : G × H) : (a / b).1 = a.1 / b.1
-- Mathlib/RepresentationTheory/Maschke.lean
theorem equivariantProjection_condition (v : V) : (π.equivariantProjection G) (i v) = v
-- Mathlib/Analysis/Convex/Cone/Basic.lean
@[simp]
theorem pointed_toConvexCone (S : Submodule 𝕜 E) : S.toConvexCone.Pointed
-- Mathlib/RingTheory/Valuation/Integers.lean
theorem dvd_of_le (hv : Integers v O) {x y : O}
    (h : v (algebraMap O F x) ≤ v (algebraMap O F y)) : y ∣ x
-- Mathlib/CategoryTheory/GradedObject/Monoidal.lean
@[reassoc (attr := simp)]
lemma rightUnitor_naturality (φ : X ⟶ X') :
    tensorHom φ (𝟙 (tensorUnit)) ≫ (rightUnitor X').hom =
      (rightUnitor X).hom ≫ φ
-- Mathlib/Algebra/Group/Subgroup/Basic.lean
@[to_additive (attr := simp, norm_cast)]
theorem coe_div (x y : H) : (↑(x / y) : G) = ↑x / ↑y
-- Mathlib/Algebra/Ring/Subring/Basic.lean
theorem comap_map_eq_self {f : R →+* S} {s : Subring R}
    (h : f ⁻¹' {0} ⊆ s) : (s.map f).comap f = s
-- Mathlib/Analysis/Asymptotics/Asymptotics.lean
theorem isLittleO_zero : (fun _x => (0 : E')) =o[l] g'
-- Mathlib/Algebra/Order/Group/Nat.lean
lemma _root_.StrictMono.nat_pow [Preorder α] (hn : n ≠ 0) (hf : StrictMono f) :
    StrictMono (f · ^ n)
-- Mathlib/Order/SupClosed.lean
lemma infClosed_range [FunLike F α β] [InfHomClass F α β] (f : F) : InfClosed (Set.range f)
-- Mathlib/CategoryTheory/Localization/Resolution.lean
/-- The functor `(Φ.op.RightResolution X₂)ᵒᵖ ⥤ Φ.LeftResolution X₂.unop`. -/
@[simps]
def RightResolution.unopFunctor (X₂ : C₂ᵒᵖ) [W₁.IsMultiplicative] :
    (Φ.op.RightResolution X₂)ᵒᵖ ⥤ Φ.LeftResolution X₂.unop
-- Mathlib/Order/Height.lean
theorem chainHeight_eq_iSup_subtype : s.chainHeight = ⨆ l : s.subchain, ↑l.1.length
-- Mathlib/MeasureTheory/Measure/Lebesgue/VolumeOfBalls.lean
theorem InnerProductSpace.volume_ball (x : E) (r : ℝ) :
    volume (Metric.ball x r) = (.ofReal r) ^ finrank ℝ E *
      .ofReal (sqrt π ^ finrank ℝ E / Gamma (finrank ℝ E / 2 + 1))
-- Mathlib/MeasureTheory/Integral/Indicator.lean
/-- If the indicators of measurable sets `Aᵢ` tend pointwise to the indicator of a set `A`
and we eventually have `Aᵢ ⊆ B` for some set `B` of finite measure, then the measures of `Aᵢ`
tend to the measure of `A`. -/
lemma tendsto_measure_of_tendsto_indicator [NeBot L] {μ : Measure α}
    (As_mble : ∀ i, MeasurableSet (As i)) {B : Set α} (B_mble : MeasurableSet B)
    (B_finmeas : μ B ≠ ∞) (As_le_B : ∀ᶠ i in L, As i ⊆ B)
    (h_lim : ∀ x, ∀ᶠ i in L, x ∈ As i ↔ x ∈ A) :
    Tendsto (fun i ↦ μ (As i)) L (𝓝 (μ A))
-- Mathlib/Algebra/Quaternion.lean
@[simp, norm_cast] lemma re_nnratCast (q : ℚ≥0) : (q : ℍ[R]).re = q
-- Mathlib/SetTheory/Ordinal/Basic.lean
theorem ord_le_type (r : α → α → Prop) [h : IsWellOrder α r] : ord #α ≤ type r
-- Mathlib/MeasureTheory/OuterMeasure/Basic.lean
/-- Let `μ` be an (outer) measure; let `s : ι → Set α` be a sequence of sets, `S = ⋃ n, s n`.
If `μ (S \ s n)` tends to zero along some nontrivial filter (usually `Filter.atTop` on `ι = ℕ`),
then `μ S = ⨆ n, μ (s n)`. -/
theorem measure_iUnion_of_tendsto_zero {ι} (μ : F) {s : ι → Set α} (l : Filter ι) [NeBot l]
    (h0 : Tendsto (fun k => μ ((⋃ n, s n) \ s k)) l (𝓝 0)) : μ (⋃ n, s n) = ⨆ n, μ (s n)
-- Mathlib/CategoryTheory/Triangulated/HomologicalFunctor.lean
@[reassoc]
lemma homologySequenceδ_comp :
    F.homologySequenceδ T n₀ n₁ h ≫ (F.shift n₁).map T.mor₁ = 0