ruc-ai4math/mathlib_handler_benchmark_410 huggingface dataset:
-- Mathlib/Algebra/DirectLimit.lean
theorem totalize_of_not_le {i j} (h : ¬i ≤ j) : totalize G f i j = 0
-- .lake/packages/batteries/Batteries/Data/String/Lemmas.lean
@[simp] theorem utf8Len_nil : utf8Len [] = 0
-- Mathlib/Order/Bounds/Basic.lean
theorem mem_lowerBounds_image2_of_mem_lowerBounds_of_mem_upperBounds (ha : a ∈ lowerBounds s)
    (hb : b ∈ upperBounds t) : f a b ∈ lowerBounds (image2 f s t)
-- Mathlib/MeasureTheory/MeasurableSpace/Embedding.lean
protected theorem measurable_comp_iff {f : β → γ} (e : α ≃ᵐ β) :
    Measurable (f ∘ e) ↔ Measurable f
-- Mathlib/MeasureTheory/OuterMeasure/Operations.lean
@[simp]
theorem sup_apply (m₁ m₂ : OuterMeasure α) (s : Set α) : (m₁ ⊔ m₂) s = m₁ s ⊔ m₂ s
-- Mathlib/Analysis/Normed/Operator/BoundedLinearMaps.lean
/-- Useful to use together with `Continuous.comp₂`. -/
theorem IsBoundedBilinearMap.continuous (h : IsBoundedBilinearMap 𝕜 f) : Continuous f
-- Mathlib/CategoryTheory/Endofunctor/Algebra.lean
/-- A composition of natural transformations gives the composition of corresponding functors. -/
-- Porting note: removed @[simps (config := { rhsMd := semireducible })] and replaced with
@[simps!]
def functorOfNatTransComp {F₀ F₁ F₂ : C ⥤ C} (α : F₀ ⟶ F₁) (β : F₁ ⟶ F₂) :
    functorOfNatTrans (α ≫ β) ≅ functorOfNatTrans β ⋙ functorOfNatTrans α
-- Mathlib/Probability/Process/Stopping.lean
theorem condexp_stopping_time_ae_eq_restrict_eq [FirstCountableTopology ι]
    [SigmaFiniteFiltration μ ℱ] (hτ : IsStoppingTime ℱ τ)
    [SigmaFinite (μ.trim hτ.measurableSpace_le)] (i : ι) :
    μ[f|hτ.measurableSpace] =ᵐ[μ.restrict {x | τ x = i}] μ[f|ℱ i]
-- Mathlib/CategoryTheory/Sites/Subsheaf.lean
theorem imagePresheaf_comp_le (f₁ : F ⟶ F') (f₂ : F' ⟶ F'') :
    imagePresheaf (f₁ ≫ f₂) ≤ imagePresheaf f₂
-- Mathlib/RingTheory/AdicCompletion/Algebra.lean
/-- The canonical algebra map from adic cauchy sequences to the adic completion. -/
@[simps!]
def mkₐ : AdicCauchySequence I R →ₐ[R] AdicCompletion I R
-- Mathlib/RingTheory/Ideal/Maps.lean
/-- The kernel of a homomorphism to a field is a maximal ideal. -/
theorem ker_isMaximal_of_surjective {R K F : Type*} [Ring R] [Field K]
    [FunLike F R K] [RingHomClass F R K] (f : F)
    (hf : Function.Surjective f) : (ker f).IsMaximal
-- Mathlib/CategoryTheory/Limits/Shapes/Images.lean
theorem HasImage.uniq (F' : MonoFactorisation f) (l : image f ⟶ F'.I) (w : l ≫ F'.m = image.ι f) :
    l = image.lift F'
-- Mathlib/Algebra/Group/Subgroup/Basic.lean
@[to_additive (attr := simp)]
theorem coe_map (f : G →* N) (K : Subgroup G) : (K.map f : Set N) = f '' K
-- Mathlib/Data/Multiset/FinsetOps.lean
theorem mem_ndinsert_of_mem {a b : α} {s : Multiset α} (h : a ∈ s) : a ∈ ndinsert b s
-- Mathlib/Topology/Order.lean
theorem continuous_id_iff_le {t t' : TopologicalSpace α} : Continuous[t, t'] id ↔ t ≤ t'
-- Mathlib/Geometry/Manifold/Complex.lean
/-- A holomorphic function on a compact complex manifold is locally constant. -/
protected theorem isLocallyConstant {f : M → F} (hf : MDifferentiable I 𝓘(ℂ, F) f) :
    IsLocallyConstant f
-- Mathlib/LinearAlgebra/Pi.lean
theorem pi_ext'_iff : f = g ↔ ∀ i, f.comp (single i) = g.comp (single i)
-- Mathlib/Combinatorics/SimpleGraph/Path.lean
/-- A *trail* is a walk with no repeating edges. -/
@[mk_iff isTrail_def]
structure IsTrail {u v : V} (p : G.Walk u v) : Prop where
  edges_nodup : p.edges.Nodup
-- Mathlib/CategoryTheory/EssentiallySmall.lean
/-- A category is `EssentiallySmall.{w}` if there exists
an equivalence to some `S : Type w` with `[SmallCategory S]`. -/
@[pp_with_univ]
class EssentiallySmall (C : Type u) [Category.{v} C] : Prop where
  /-- An essentially small category is equivalent to some small category. -/
  equiv_smallCategory : ∃ (S : Type w) (_ : SmallCategory S), Nonempty (C ≌ S)
-- Mathlib/Order/Hom/Set.lean
theorem orderIsoOfSurjective_self_symm_apply (b : β) :
    f ((orderIsoOfSurjective f h_mono h_surj).symm b) = b
-- Mathlib/Algebra/Group/Subgroup/Basic.lean
@[to_additive]
theorem subgroupOf_bot_eq_bot : H.subgroupOf ⊥ = ⊥
-- Mathlib/Algebra/Ring/Subring/Basic.lean
theorem map_comap_eq (f : R →+* S) (t : Subring S) : (t.comap f).map f = t ⊓ f.range
-- Mathlib/Algebra/Group/Subsemigroup/Membership.lean
@[to_additive]
theorem coe_iSup_of_directed {S : ι → Subsemigroup M} (hS : Directed (· ≤ ·) S) :
    ((⨆ i, S i : Subsemigroup M) : Set M) = ⋃ i, S i
-- Mathlib/Analysis/BoxIntegral/Partition/Filter.lean
theorem toFilterDistortioniUnion_neBot (l : IntegrationParams) (I : Box ι) (π₀ : Prepartition I)
    (hc₁ : π₀.distortion ≤ c) (hc₂ : π₀.compl.distortion ≤ c) :
    (l.toFilterDistortioniUnion I c π₀).NeBot
-- Mathlib/Topology/UniformSpace/UniformConvergenceTopology.lean
/-- A version of `UniformOnFun.hasBasis_uniformity_of_basis`
with weaker conclusion and weaker assumptions.

We make no assumptions about the set `𝔖`
but conclude only that the uniformity is equal to some indexed infimum. -/
protected theorem uniformity_eq_of_basis {ι : Sort*} {p : ι → Prop} {V : ι → Set (β × β)}
    (h : (𝓤 β).HasBasis p V) :
    𝓤 (α →ᵤ[𝔖] β) = ⨅ s ∈ 𝔖, ⨅ (i) (_ : p i), 𝓟 (UniformOnFun.gen 𝔖 s (V i))
-- Mathlib/AlgebraicGeometry/OpenImmersion.lean
theorem range_pullback_to_base_of_right :
    Set.range (pullback.fst g f ≫ g).1.base =
      Set.range g.1.base ∩ Set.range f.1.base
-- Mathlib/Analysis/SpecialFunctions/Trigonometric/ArctanDeriv.lean
theorem ContDiffAt.arctan (h : ContDiffAt ℝ n f x) : ContDiffAt ℝ n (fun x => arctan (f x)) x
-- Mathlib/Data/List/Lattice.lean
theorem bagInter_sublist_left : ∀ l₁ l₂ : List α, l₁.bagInter l₂ <+ l₁
-- Mathlib/Topology/Algebra/FilterBasis.lean
@[to_additive]
theorem mul {U : Set G} : U ∈ B → ∃ V ∈ B, V * V ⊆ U
-- Mathlib/Algebra/Associated/Basic.lean
theorem irreducible_or_factor {α} [Monoid α] (x : α) (h : ¬IsUnit x) :
    Irreducible x ∨ ∃ a b, ¬IsUnit a ∧ ¬IsUnit b ∧ a * b = x
-- Mathlib/Order/Interval/Finset/Basic.lean
theorem not_mem_Ioi_self {b : α} : b ∉ Ioi b
-- Mathlib/Probability/ProbabilityMassFunction/Constructions.lean
theorem map_comp (g : β → γ) : (p.map f).map g = p.map (g ∘ f)
-- Mathlib/Geometry/Manifold/ContMDiff/Product.lean
nonrec theorem SmoothAt.prod_map (hf : SmoothAt I I' f x) (hg : SmoothAt J J' g y) :
    SmoothAt (I.prod J) (I'.prod J') (Prod.map f g) (x, y)
-- Mathlib/LinearAlgebra/Dimension/FreeAndStrongRankCondition.lean
theorem bot_eq_top_iff_rank_eq_one [Nontrivial E] [Module.Free F E] :
    (⊥ : Subalgebra F E) = ⊤ ↔ Module.rank F E = 1
-- Mathlib/Order/Interval/Finset/Defs.lean
@[simp]
theorem Icc_mk_mk [LocallyFiniteOrder α] [LocallyFiniteOrder β]
    [DecidableRel ((· ≤ ·) : α × β → α × β → Prop)] (a₁ a₂ : α) (b₁ b₂ : β) :
    Finset.Icc (a₁, b₁) (a₂, b₂) = Finset.Icc a₁ a₂ ×ˢ Finset.Icc b₁ b₂
-- Mathlib/SetTheory/Ordinal/Basic.lean
@[simp]
theorem lift_one : lift 1 = 1
-- Mathlib/Order/Interval/Set/Disjoint.lean
theorem iInter_Iio_of_not_bddBelow_range (hf : ¬ BddBelow (range f)) : ⋂ i, Iio (f i) = ∅
-- Mathlib/Data/Set/Pointwise/Interval.lean
theorem image_mul_left_Ioo {a : α} (h : 0 < a) (b c : α) :
    (a * ·) '' Ioo b c = Ioo (a * b) (a * c)
-- Mathlib/Data/PNat/Factors.lean
theorem prod_dvd_iff' {u : PrimeMultiset} {n : ℕ+} : u.prod ∣ n ↔ u ≤ n.factorMultiset
-- Mathlib/LinearAlgebra/Matrix/ZPow.lean
theorem pow_sub' (A : M) {m n : ℕ} (ha : IsUnit A.det) (h : n ≤ m) :
    A ^ (m - n) = A ^ m * (A ^ n)⁻¹
-- Mathlib/NumberTheory/ClassNumber/Finite.lean
/-- Each class in the class group contains an ideal `J`
such that `M := Π m ∈ finsetApprox` is in `J`. -/
theorem exists_mk0_eq_mk0 [IsDedekindDomain S] [Algebra.IsAlgebraic R L] (I : (Ideal S)⁰) :
    ∃ J : (Ideal S)⁰,
      ClassGroup.mk0 I = ClassGroup.mk0 J ∧
        algebraMap _ _ (∏ m ∈ finsetApprox bS adm, m) ∈ (J : Ideal S)
-- Mathlib/Analysis/Seminorm.lean
theorem smul_comp (p : Seminorm 𝕜₂ E₂) (f : E →ₛₗ[σ₁₂] E₂) (c : R) :
    (c • p).comp f = c • p.comp f
-- Mathlib/LinearAlgebra/Span.lean
theorem span_mono (h : s ⊆ t) : span R s ≤ span R t
-- Mathlib/Order/SymmDiff.lean
@[simp]
theorem bihimp_iff_iff {p q : Prop} : p ⇔ q ↔ (p ↔ q)
-- Mathlib/Topology/Category/Profinite/Nobeling.lean
theorem factors_prod_eq_basis_of_eq {x y : (π C fun x ↦ x ∈ s)} (h : y = x) :
    (factors C s x).prod y = 1
-- Mathlib/Analysis/Normed/Ring/Units.lean
/-- The function `fun t ↦ Ring.inverse (x + t) - x⁻¹` is `O(t)` as `t → 0`. -/
theorem inverse_add_norm_diff_first_order (x : Rˣ) :
    (fun t : R => inverse (↑x + t) - ↑x⁻¹) =O[𝓝 0] fun t => ‖t‖
-- Mathlib/FieldTheory/Minpoly/Basic.lean
theorem mem_range_of_degree_eq_one (hx : (minpoly A x).degree = 1) :
    x ∈ (algebraMap A B).range
-- Mathlib/AlgebraicGeometry/EllipticCurve/Affine.lean
/-- The negation of an affine point in `W` lies in `W`. -/
lemma equation_neg {x y : R} (h : W.Equation x y) : W.Equation x <| W.negY x y
-- .lake/packages/batteries/Batteries/Data/List/Pairwise.lean
theorem pairwise_singleton (R) (a : α) : Pairwise R [a]
-- Mathlib/SetTheory/ZFC/Basic.lean
theorem Equiv.exists_left {x y : PSet} (h : Equiv x y) : ∀ i, ∃ j, Equiv (x.Func i) (y.Func j)
-- Mathlib/Topology/Order.lean
theorem tendsto_nhds_true {l : Filter α} {p : α → Prop} :
    Tendsto p l (𝓝 True) ↔ ∀ᶠ x in l, p x
-- Mathlib/MeasureTheory/Function/ConditionalExpectation/CondexpL1.lean
theorem aestronglyMeasurable'_condexpL1 {f : α → F'} :
    AEStronglyMeasurable' m (condexpL1 hm μ f) μ
-- Mathlib/Analysis/Normed/Operator/BoundedLinearMaps.lean
theorem ContinuousOn.clm_apply {X} [TopologicalSpace X] {f : X → (E →L[𝕜] F)} {g : X → E}
    {s : Set X} (hf : ContinuousOn f s) (hg : ContinuousOn g s) :
    ContinuousOn (fun x ↦ f x (g x)) s
-- Mathlib/CategoryTheory/Limits/Shapes/Pullback/CommSq.lean
theorem paste_horiz_iff {X₁₁ X₁₂ X₁₃ X₂₁ X₂₂ X₂₃ : C} {h₁₁ : X₁₁ ⟶ X₁₂} {h₁₂ : X₁₂ ⟶ X₁₃}
    {h₂₁ : X₂₁ ⟶ X₂₂} {h₂₂ : X₂₂ ⟶ X₂₃} {v₁₁ : X₁₁ ⟶ X₂₁} {v₁₂ : X₁₂ ⟶ X₂₂} {v₁₃ : X₁₃ ⟶ X₂₃}
    (s : IsPushout h₁₁ v₁₁ v₁₂ h₂₁) (e : h₁₂ ≫ v₁₃ = v₁₂ ≫ h₂₂) :
    IsPushout (h₁₁ ≫ h₁₂) v₁₁ v₁₃ (h₂₁ ≫ h₂₂) ↔ IsPushout h₁₂ v₁₂ v₁₃ h₂₂
-- Mathlib/ModelTheory/Substructures.lean
@[simp]
theorem comap_top (f : M →[L] N) : (⊤ : L.Substructure N).comap f = ⊤
-- Mathlib/LinearAlgebra/CliffordAlgebra/Contraction.lean
@[simp]
theorem changeForm_self :
    changeForm changeForm.zero_proof = (LinearMap.id : CliffordAlgebra Q →ₗ[R] _)
-- Mathlib/CategoryTheory/Endofunctor/Algebra.lean
/-- The identity transformation induces the identity endofunctor on the category of algebras. -/
-- Porting note: removed @[simps (config := { rhsMd := semireducible })] and replaced with
@[simps!]
def functorOfNatTransId : functorOfNatTrans (𝟙 F) ≅ 𝟭 _
-- Mathlib/MeasureTheory/Measure/Dirac.lean
@[simp]
theorem dirac_apply' (a : α) (hs : MeasurableSet s) : dirac a s = s.indicator 1 a
-- Mathlib/Algebra/BigOperators/Group/List.lean
@[to_additive]
theorem prod_singleton : [a].prod = a
-- Mathlib/Topology/MetricSpace/Lipschitz.lean
lemma cauchySeq_comp (hf : LipschitzWith K f) {u : ℕ → α} (hu : CauchySeq u) :
    CauchySeq (f ∘ u)
-- Mathlib/Algebra/Order/Module/Defs.lean
lemma smul_lt_smul_iff_of_neg_left (ha : a < 0) : a • b₁ < a • b₂ ↔ b₂ < b₁
-- Mathlib/Order/SymmDiff.lean
@[simp]
theorem bihimp_himp_left : a ⇔ b ⇨ a = a ⊔ b
-- Mathlib/Analysis/SpecialFunctions/Trigonometric/Angle.lean
theorem angle_eq_iff_two_pi_dvd_sub {ψ θ : ℝ} : (θ : Angle) = ψ ↔ ∃ k : ℤ, θ - ψ = 2 * π * k
-- Mathlib/Algebra/ContinuedFractions/Computation/Translations.lean
/-- The recurrence relation for the `convs'` of the continued fraction expansion
of an element `v` of `K` in terms of the convergents of the inverse of its fractional part.
-/
theorem convs'_succ :
    (of v).convs' (n + 1) = ⌊v⌋ + 1 / (of (fract v)⁻¹).convs' n
-- Mathlib/Algebra/Lie/Weights/Killing.lean
lemma lie_eq_killingForm_smul_of_mem_rootSpace_of_mem_rootSpace_neg
    {α : Weight K H L} {e f : L} (heα : e ∈ rootSpace H α) (hfα : f ∈ rootSpace H (-α)) :
    ⁅e, f⁆ = killingForm K L e f • (cartanEquivDual H).symm α
-- Mathlib/Data/Sigma/Lex.lean
theorem Lex.mono_right {r : ι → ι → Prop} {s₁ s₂ : ∀ i, α i → α i → Prop}
    (hs : ∀ i a b, s₁ i a b → s₂ i a b) {a b : Σ' i, α i} (h : Lex r s₁ a b) : Lex r s₂ a b
-- Mathlib/Order/Interval/Set/OrderIso.lean
@[simp]
theorem image_Ioo (e : α ≃o β) (a b : α) : e '' Ioo a b = Ioo (e a) (e b)
-- Mathlib/MeasureTheory/Measure/WithDensity.lean
theorem withDensity_ofReal_mutuallySingular {f : α → ℝ} (hf : Measurable f) :
    (μ.withDensity fun x => ENNReal.ofReal <| f x) ⟂ₘ
      μ.withDensity fun x => ENNReal.ofReal <| -f x
-- Mathlib/RingTheory/TwoSidedIdeal/Basic.lean
/--
For any `RingCon R`, when we view it as an ideal in `Rᵒᵖ`, `subtype` is the injective `Rᵐᵒᵖ`-linear
map `I → Rᵐᵒᵖ`.
-/
@[simps]
def subtypeMop : I →ₗ[Rᵐᵒᵖ] Rᵐᵒᵖ
-- .lake/packages/batteries/Batteries/Data/List/Perm.lean
theorem subperm_cons_erase (a : α) (l : List α) : l <+~ a :: l.erase a
-- Mathlib/LinearAlgebra/Matrix/Symmetric.lean
@[simp]
theorem isSymm_zero [Zero α] : (0 : Matrix n n α).IsSymm
-- Mathlib/Algebra/CubicDiscriminant.lean
@[simp]
theorem degree_of_a_ne_zero (ha : P.a ≠ 0) : P.toPoly.degree = 3
-- Mathlib/AlgebraicGeometry/StructureSheaf.lean
@[simp]
theorem stalkToFiberRingHom_toStalk (x : PrimeSpectrum.Top R) (f : R) :
    -- Porting note: now `algebraMap _ _` needs to be explicitly typed
    stalkToFiberRingHom R x (toStalk R x f) = algebraMap R (Localization.AtPrime x.asIdeal) f
-- Mathlib/Analysis/RCLike/Basic.lean
@[rclike_simps, norm_cast]
theorem ofReal_intCast (n : ℤ) : ((n : ℝ) : K) = n
-- Mathlib/Data/Set/Sups.lean
theorem infs_union_left : (s₁ ∪ s₂) ⊼ t = s₁ ⊼ t ∪ s₂ ⊼ t
-- Mathlib/Analysis/Calculus/LocalExtr/LineDeriv.lean
theorem IsMinOn.lineDeriv_eq_zero (h : IsMinOn f s a) (h' : ∀ᶠ t : ℝ in 𝓝 0, a + t • b ∈ s) :
    lineDeriv ℝ f a b = 0
-- Mathlib/LinearAlgebra/Dimension/Constructions.lean
/-- If `m` and `n` are `Fintype` that lie in the same universe, the rank of `m × n` matrices is
  `(#n * #m).lift`. -/
@[simp high]
theorem rank_matrix' (m n : Type v) [Finite m] [Finite n] :
    Module.rank R (Matrix m n R) = Cardinal.lift.{u} (#m * #n)
-- Mathlib/Probability/Distributions/Geometric.lean
/-- The geometric pmf is positive for all natural numbers -/
lemma geometricPMFReal_pos {n : ℕ} (hp_pos : 0 < p) (hp_lt_one : p < 1) :
    0 < geometricPMFReal p n
-- Mathlib/CategoryTheory/EqToHom.lean
@[simp]
theorem eqToIso_trans {X Y Z : C} (p : X = Y) (q : Y = Z) :
    eqToIso p ≪≫ eqToIso q = eqToIso (p.trans q)
-- Mathlib/CategoryTheory/Elements.lean
@[simp]
theorem map_π {F₁ F₂ : C ⥤ Type w} (α : F₁ ⟶ F₂) : map α ⋙ π F₂ = π F₁
-- Mathlib/Topology/MetricSpace/Pseudo/Constructions.lean
@[simp]
lemma dist_prod_same_right {x₁ x₂ : α} {y : β} : dist (x₁, y) (x₂, y) = dist x₁ x₂
-- Mathlib/MeasureTheory/MeasurableSpace/Basic.lean
@[measurability]
theorem Measurable.sumElim {_ : MeasurableSpace γ} {f : α → γ} {g : β → γ} (hf : Measurable f)
    (hg : Measurable g) : Measurable (Sum.elim f g)
-- Mathlib/LinearAlgebra/DFinsupp.lean
/-- A family of additive subgroups over an additive group are independent if and only if
`DFinsupp.sumAddHom` applied with `AddSubgroup.subtype` is injective. -/
theorem independent_iff_dfinsupp_sumAddHom_injective (p : ι → AddSubgroup N) :
    Independent p ↔ Function.Injective (sumAddHom fun i => (p i).subtype)
-- Mathlib/Data/Set/Basic.lean
theorem Subset.rfl {s : Set α} : s ⊆ s
-- .lake/packages/lean4/src/lean/Init/Data/Array/Lemmas.lean
theorem append_assoc (as bs cs : Array α) : as ++ bs ++ cs = as ++ (bs ++ cs)
-- Mathlib/Data/Nat/PartENat.lean
@[simp, norm_cast]
theorem ofENat_zero : ofENat 0 = 0
-- Mathlib/CategoryTheory/IsConnected.lean
theorem Zigzag.of_inv {j₁ j₂ : J} (f : j₂ ⟶ j₁) : Zigzag j₁ j₂
-- Mathlib/ModelTheory/Syntax.lean
theorem monotone_distinctConstantsTheory :
    Monotone (L.distinctConstantsTheory : Set α → L[[α]].Theory)
-- Mathlib/Order/Disjoint.lean
theorem Disjoint.inf_left' (h : Disjoint a b) : Disjoint (c ⊓ a) b
-- Mathlib/Init/Logic.lean
theorem true_or_iff : True ∨ p ↔ True
-- Mathlib/MeasureTheory/Measure/Lebesgue/Basic.lean
@[simp]
theorem volume_preimage_mul_left {a : ℝ} (h : a ≠ 0) (s : Set ℝ) :
    volume ((a * ·) ⁻¹' s) = ENNReal.ofReal (abs a⁻¹) * volume s
-- Mathlib/Data/Real/EReal.lean
lemma ge_iff_le_forall_real_lt (x y : EReal) : (∀ z : ℝ, z < y → z ≤ x) ↔ y ≤ x
-- Mathlib/LinearAlgebra/LinearIndependent.lean
theorem linearIndependent_comp_subtype_disjoint {s : Set ι} :
    LinearIndependent R (v ∘ (↑) : s → M) ↔
      Disjoint (Finsupp.supported R R s) (LinearMap.ker <| Finsupp.total ι M R v)
-- Mathlib/GroupTheory/Perm/List.lean
theorem formPerm_apply_lt_get (xs : List α) (h : Nodup xs) (n : ℕ) (hn : n + 1 < xs.length) :
    formPerm xs (xs.get (Fin.mk n ((Nat.lt_succ_self n).trans hn))) =
      xs.get (Fin.mk (n + 1) hn)
-- Mathlib/Algebra/Ring/Subring/Pointwise.lean
@[simp]
theorem pointwise_smul_le_pointwise_smul_iff {a : M} {S T : Subring R} : a • S ≤ a • T ↔ S ≤ T
-- Mathlib/Algebra/Order/Ring/Basic.lean
lemma Odd.pow_nonpos_iff (hn : Odd n) : a ^ n ≤ 0 ↔ a ≤ 0
-- Mathlib/Topology/Separation.lean
theorem nhds_basis_clopen (x : X) : (𝓝 x).HasBasis (fun s : Set X => x ∈ s ∧ IsClopen s) id
-- Mathlib/Algebra/Polynomial/Degree/Definitions.lean
theorem natDegree_cubic (ha : a ≠ 0) : natDegree (C a * X ^ 3 + C b * X ^ 2 + C c * X + C d) = 3
-- Mathlib/RingTheory/Multiplicity.lean
theorem multiplicity_sub_of_gt {p a b : α} (h : multiplicity p b < multiplicity p a) :
    multiplicity p (a - b) = multiplicity p b
-- Mathlib/CategoryTheory/Sites/DenseSubsite.lean
/-- A locally-fully-faithful and cover-dense functor preserves compatible families. -/
lemma compatiblePreserving [G.IsLocallyFaithful K] : CompatiblePreserving K G
-- Mathlib/Analysis/SpecialFunctions/Exp.lean
/-- `Real.exp (f x)` is bounded away from zero along a filter if and only if this filter is bounded
from below under `f`. -/
theorem isBigO_exp_comp_one {f : α → ℝ} :
    (fun x => exp (f x)) =O[l] (fun _ => 1 : α → ℝ) ↔ IsBoundedUnder (· ≤ ·) l f
-- Mathlib/RingTheory/Localization/AsSubring.lean
theorem mem_range_mapToFractionRing_iff (B : Type*) [CommRing B] [Algebra A B] [IsLocalization S B]
    (hS : S ≤ A⁰) (x : K) :
    x ∈ (mapToFractionRing K S B hS).range ↔
      ∃ (a s : A) (hs : s ∈ S), x = IsLocalization.mk' K a ⟨s, hS hs⟩
-- Mathlib/Order/WellFounded.lean
theorem argminOn_le (s : Set α) {a : α} (ha : a ∈ s) (hs : s.Nonempty := Set.nonempty_of_mem ha) :
    f (argminOn f h s hs) ≤ f a
-- Mathlib/FieldTheory/RatFunc/Defs.lean
theorem mk_zero (p : K[X]) : RatFunc.mk p 0 = ofFractionRing (0 : FractionRing K[X])
-- Mathlib/CategoryTheory/Limits/HasLimits.lean
@[reassoc (attr := simp)]
theorem HasColimit.isoOfNatIso_inv_desc {F G : J ⥤ C} [HasColimit F] [HasColimit G] (t : Cocone F)
    (w : F ≅ G) :
    (HasColimit.isoOfNatIso w).inv ≫ colimit.desc F t =
      colimit.desc G ((Cocones.precompose w.inv).obj _)
-- Mathlib/LinearAlgebra/QuadraticForm/Prod.lean
@[simp] theorem polarBilin_pi (Q : ∀ i, QuadraticMap R (Mᵢ i) P) :
    (pi Q).polarBilin = ∑ i, (Q i).polarBilin.compl₁₂ (.proj i) (.proj i)
-- Mathlib/Data/Finset/Image.lean
@[simp]
theorem filterMap_some : s.filterMap some (by simp) = s
-- Mathlib/Data/Setoid/Basic.lean
/-- The supremum of a set of equivalence relations is the equivalence closure of the
    supremum of the set's image under the map to the underlying binary operation. -/
theorem sSup_def {s : Set (Setoid α)} : sSup s = EqvGen.Setoid (sSup (Rel '' s))
-- Mathlib/Order/UpperLower/Basic.lean
@[simp]
theorem upperClosure_univ : upperClosure (univ : Set α) = ⊥
-- Mathlib/Order/Interval/Finset/Basic.lean
theorem left_not_mem_Ioo : a ∉ Ioo a b
-- Mathlib/Order/Interval/Set/Basic.lean
theorem Icc_union_Ici (h : c ≤ max a b) : Icc a b ∪ Ici c = Ici (min a c)
-- Mathlib/Topology/Inseparable.lean
/-- A set is stable under specialization iff it is a union of closed sets. -/
lemma stableUnderSpecialization_iff_exists_sUnion_eq {s : Set X} :
    StableUnderSpecialization s ↔ ∃ (S : Set (Set X)), (∀ s ∈ S, IsClosed s) ∧ ⋃₀ S = s
-- Mathlib/LinearAlgebra/Eigenspace/Semisimple.lean
lemma apply_eq_of_mem_genEigenspace_of_comm_of_isSemisimple_of_isNilpotent_sub
    {μ : R} {k : ℕ} {m : M} (hm : m ∈ f.genEigenspace μ k)
    (hfg : Commute f g) (hss : g.IsSemisimple) (hnil : IsNilpotent (f - g)) :
    g m = μ • m
-- Mathlib/GroupTheory/CoprodI.lean
@[simp]
theorem toList_getLast? {i j} (w : NeWord M i j) : w.toList.getLast? = Option.some ⟨j, w.last⟩
-- Mathlib/FieldTheory/Minpoly/IsIntegrallyClosed.lean
/-- For integrally closed rings, the minimal polynomial divides any polynomial that has the
  integral element as root. See also `minpoly.dvd` which relaxes the assumptions on `S`
  in exchange for stronger assumptions on `R`. -/
theorem isIntegrallyClosed_dvd {s : S} (hs : IsIntegral R s) {p : R[X]}
    (hp : Polynomial.aeval s p = 0) : minpoly R s ∣ p
-- Mathlib/Dynamics/BirkhoffSum/Average.lean
/-- Birkhoff average is "almost invariant" under `f`:
the difference between `birkhoffAverage R f g n (f x)` and `birkhoffAverage R f g n x`
is equal to `(n : R)⁻¹ • (g (f^[n] x) - g x)`. -/
theorem birkhoffAverage_apply_sub_birkhoffAverage {α M : Type*} (R : Type*) [DivisionRing R]
    [AddCommGroup M] [Module R M] (f : α → α) (g : α → M) (n : ℕ) (x : α) :
    birkhoffAverage R f g n (f x) - birkhoffAverage R f g n x =
      (n : R)⁻¹ • (g (f^[n] x) - g x)
-- Mathlib/Data/Set/Basic.lean
theorem insert_union : insert a s ∪ t = insert a (s ∪ t)
-- Mathlib/Data/Nat/Multiplicity.lean
theorem multiplicity_choose_prime_pow_add_multiplicity (hp : p.Prime) (hkn : k ≤ p ^ n)
    (hk0 : k ≠ 0) : multiplicity p (choose (p ^ n) k) + multiplicity p k = n
-- Mathlib/Algebra/Order/CauSeq/Basic.lean
@[simp, norm_cast]
theorem coe_zero : ⇑(0 : CauSeq β abv) = 0
-- Mathlib/CategoryTheory/Shift/CommShift.lean
lemma commShiftIso_comp_inv_app [F.CommShift A] [G.CommShift A] (a : A) (X : C) :
    (commShiftIso (F ⋙ G) a).inv.app X =
      (commShiftIso G a).inv.app (F.obj X) ≫ G.map ((commShiftIso F a).inv.app X)
-- Mathlib/Analysis/SpecialFunctions/Gaussian/GaussianIntegral.lean
theorem integrable_mul_exp_neg_mul_sq {b : ℝ} (hb : 0 < b) :
    Integrable fun x : ℝ => x * exp (-b * x ^ 2)
-- .lake/packages/batteries/Batteries/Data/List/Lemmas.lean
theorem range'_subset_right {s m n : Nat} (step0 : 0 < step) :
    range' s m step ⊆ range' s n step ↔ m ≤ n
-- Mathlib/Analysis/Normed/Group/SemiNormedGrp/Completion.lean
theorem completion.lift_comp_incl {V W : SemiNormedGrp} [CompleteSpace W] [T0Space W]
    (f : V ⟶ W) : completion.incl ≫ completion.lift f = f
-- Mathlib/Data/Finset/NatAntidiagonal.lean
/-- The cardinality of the antidiagonal of `n` is `n + 1`. -/
@[simp]
theorem card_antidiagonal (n : ℕ) : (antidiagonal n).card = n + 1
-- Mathlib/NumberTheory/SiegelsLemma.lean
private lemma card_T_eq : (T).card = (B + 1) ^ n
-- Mathlib/Algebra/Homology/Homotopy.lean
/-- the scalar multiplication of an homotopy -/
@[simps!]
def smul {R : Type*} [Semiring R] [Linear R V] (h : Homotopy f g) (a : R) :
    Homotopy (a • f) (a • g)
-- Mathlib/Order/ConditionallyCompleteLattice/Basic.lean
theorem csInf_image2_eq_csSup_csInf (h₁ : ∀ b, GaloisConnection (toDual ∘ l₁ b) (swap u b ∘ ofDual))
    (h₂ : ∀ a, GaloisConnection (l₂ a) (u a)) :
    s.Nonempty → BddAbove s → t.Nonempty → BddBelow t → sInf (image2 u s t) = u (sSup s) (sInf t)
-- Mathlib/Topology/UniformSpace/Equiv.lean
protected theorem surjective (h : α ≃ᵤ β) : Function.Surjective h
-- Mathlib/LinearAlgebra/Dual.lean
@[simp]
theorem coe_basis : ⇑h.basis = e
-- Mathlib/MeasureTheory/Group/MeasurableEquiv.lean
@[to_additive]
theorem _root_.measurableEmbedding_const_smul (c : G) : MeasurableEmbedding (c • · : α → α)
-- Mathlib/CategoryTheory/Triangulated/Opposite.lean
lemma shiftFunctorAdd'_op_hom_app (X : Cᵒᵖ) (a₁ a₂ a₃ : ℤ) (h : a₁ + a₂ = a₃)
    (b₁ b₂ b₃ : ℤ) (h₁ : a₁ + b₁ = 0) (h₂ : a₂ + b₂ = 0) (h₃ : a₃ + b₃ = 0) :
    (shiftFunctorAdd' Cᵒᵖ a₁ a₂ a₃ h).hom.app X =
      (shiftFunctorOpIso C _ _ h₃).hom.app X ≫
        ((shiftFunctorAdd' C b₁ b₂ b₃ (by omega)).inv.app X.unop).op ≫
        (shiftFunctorOpIso C _ _ h₂).inv.app _ ≫
        (shiftFunctor Cᵒᵖ a₂).map ((shiftFunctorOpIso C _ _ h₁).inv.app X)
-- Mathlib/Order/Zorn.lean
theorem zorn_nonempty_preorder₀ (s : Set α)
    (ih : ∀ c ⊆ s, IsChain (· ≤ ·) c → ∀ y ∈ c, ∃ ub ∈ s, ∀ z ∈ c, z ≤ ub) (x : α)
    (hxs : x ∈ s) : ∃ m ∈ s, x ≤ m ∧ ∀ z ∈ s, m ≤ z → z ≤ m