ruc-ai4math/mathlib_handler_benchmark_410 huggingface dataset:
-- Mathlib/Algebra/GCDMonoid/Multiset.lean
@[simp]
theorem gcd_ndunion (s₁ s₂ : Multiset α) : (ndunion s₁ s₂).gcd = GCDMonoid.gcd s₁.gcd s₂.gcd
-- Mathlib/Order/Hom/Basic.lean
/-- Lift an order homomorphism `f : α →o β` to an order homomorphism `WithBot α →o WithBot β`. -/
@[simps (config := .asFn)]
protected def withBotMap (f : α →o β) : WithBot α →o WithBot β
-- Mathlib/Topology/UniformSpace/UniformEmbedding.lean
theorem Embedding.to_uniformEmbedding {α β} [TopologicalSpace α] [u : UniformSpace β] (f : α → β)
    (h : Embedding f) : @UniformEmbedding α β (h.comapUniformSpace f) u f
-- Mathlib/Algebra/Module/Submodule/Map.lean
@[simp high]
theorem mem_map_equiv {e : M ≃ₛₗ[τ₁₂] M₂} {x : M₂} :
    x ∈ p.map (e : M →ₛₗ[τ₁₂] M₂) ↔ e.symm x ∈ p
-- Mathlib/MeasureTheory/Function/LpSpace.lean
theorem mul_meas_ge_le_pow_norm (f : Lp E p μ) (hp_ne_zero : p ≠ 0) (hp_ne_top : p ≠ ∞) (ε : ℝ≥0∞) :
    ε * μ { x | ε ≤ (‖f x‖₊ : ℝ≥0∞) ^ p.toReal } ≤ ENNReal.ofReal ‖f‖ ^ p.toReal
-- Mathlib/Analysis/Convex/Star.lean
theorem StarConvex.sub' {s : Set (E × E)} (hs : StarConvex 𝕜 (x, y) s) :
    StarConvex 𝕜 (x - y) ((fun x : E × E => x.1 - x.2) '' s)
-- Mathlib/MeasureTheory/Decomposition/Lebesgue.lean
/-- Given measures `μ` and `ν`, if `s` is a measure mutually singular to `ν` and `f` is a
measurable function such that `μ = s + fν`, then `f = μ.rnDeriv ν`.

This theorem provides the uniqueness of the `rnDeriv` in the Lebesgue decomposition
theorem, while `MeasureTheory.Measure.eq_singularPart` provides the uniqueness of the
`singularPart`. Here, the uniqueness is given in terms of the functions, while the uniqueness in
terms of the functions is given in `eq_withDensity_rnDeriv`. -/
theorem eq_rnDeriv [SigmaFinite ν] {s : Measure α} {f : α → ℝ≥0∞} (hf : Measurable f) (hs : s ⟂ₘ ν)
    (hadd : μ = s + ν.withDensity f) : f =ᵐ[ν] μ.rnDeriv ν
-- Mathlib/Probability/Independence/Basic.lean
theorem indep_bot_left [IsProbabilityMeasure μ] : Indep ⊥ m' μ
-- Mathlib/Algebra/Module/Submodule/Range.lean
theorem _root_.Submodule.map_comap_eq [RingHomSurjective τ₁₂] (f : F) (q : Submodule R₂ M₂) :
    map f (comap f q) = range f ⊓ q
-- Mathlib/Algebra/Category/ModuleCat/Basic.lean
theorem coe_of (X : Type v) [AddCommGroup X] [Module R X] : (of R X : Type v) = X
-- Mathlib/Analysis/SpecialFunctions/Trigonometric/Inverse.lean
@[simp]
theorem arcsin_zero : arcsin 0 = 0
-- Mathlib/Algebra/TrivSqZeroExt.lean
@[simp]
theorem snd_pow [CommMonoid R] [AddMonoid M] [DistribMulAction R M] [DistribMulAction Rᵐᵒᵖ M]
    [IsCentralScalar R M] (x : tsze R M) (n : ℕ) : snd (x ^ n) = n • x.fst ^ n.pred • x.snd
-- Mathlib/Data/Complex/Basic.lean
lemma div_intCast (z : ℂ) (n : ℤ) : z / n = ⟨z.re / n, z.im / n⟩
-- Mathlib/Order/SupClosed.lean
/-- Every set in a join-semilattice generates a set closed under join. -/
@[simps! isClosed]
def infClosure : ClosureOperator (Set α)
-- Mathlib/MeasureTheory/Function/AEEqFun.lean
theorem liftRel_iff_coeFn {r : β → γ → Prop} {f : α →ₘ[μ] β} {g : α →ₘ[μ] γ} :
    LiftRel r f g ↔ ∀ᵐ a ∂μ, r (f a) (g a)
-- Mathlib/RingTheory/Artinian.lean
theorem Ring.isArtinian_of_zero_eq_one {R} [Ring R] (h01 : (0 : R) = 1) : IsArtinianRing R
-- Mathlib/Topology/ContinuousFunction/Bounded.lean
/-- Express the absolute value of a bounded continuous function in terms of its
positive and negative parts. -/
theorem abs_self_eq_nnrealPart_add_nnrealPart_neg (f : α →ᵇ ℝ) :
    abs ∘ ⇑f = (↑) ∘ f.nnrealPart + (↑) ∘ (-f).nnrealPart
-- Mathlib/ModelTheory/Semantics.lean
@[simp]
theorem Sentence.realize_cardGe (n) : M ⊨ Sentence.cardGe L n ↔ ↑n ≤ #M
-- Mathlib/Logic/Equiv/Basic.lean
theorem sigmaEquivProd_sigmaCongrRight :
    (sigmaEquivProd α₁ β₁).symm.trans (sigmaCongrRight e)
    = (prodCongrRight e).trans (sigmaEquivProd α₁ β₂).symm
-- Mathlib/LinearAlgebra/Prod.lean
@[deprecated (since := "2024-06-05")]
theorem tunnelAux_injective (f : M × N →ₗ[R] M) (i : Injective f)
    (Kφ : ΣK : Submodule R M, K ≃ₗ[R] M) : Injective (tunnelAux f Kφ)
-- Mathlib/Data/Finset/Union.lean
lemma biUnion_congr (hs : s₁ = s₂) (ht : ∀ a ∈ s₁, t₁ a = t₂ a) : s₁.biUnion t₁ = s₂.biUnion t₂
-- Mathlib/LinearAlgebra/Dimension/StrongRankCondition.lean
theorem LinearMap.finrank_le_finrank_of_injective [Module.Finite R M'] {f : M →ₗ[R] M'}
    (hf : Function.Injective f) : finrank R M ≤ finrank R M'
-- Mathlib/Algebra/Field/Subfield.lean
@[aesop safe apply (rule_sets := [SetLike])]
lemma nnqsmul_mem (s : S) (q : ℚ≥0) (hx : x ∈ s) : q • x ∈ s
-- Mathlib/GroupTheory/Coxeter/Length.lean
theorem exists_leftDescent_of_ne_one {w : W} (hw : w ≠ 1) : ∃ i : B, cs.IsLeftDescent w i
-- Mathlib/Topology/Order/DenselyOrdered.lean
/-- The closure of the interval `(a, +∞)` is the closed interval `[a, +∞)`, unless `a` is a top
element. -/
theorem closure_Ioi' {a : α} (h : (Ioi a).Nonempty) : closure (Ioi a) = Ici a
-- Mathlib/Data/List/Indexes.lean
theorem mapIdxM'_eq_mapIdxM {α} (f : ℕ → α → m PUnit) (as : List α) :
    mapIdxM' f as = mapIdxM as f *> pure PUnit.unit
-- Mathlib/Order/Filter/Ultrafilter.lean
theorem isAtom_pure : IsAtom (pure a : Filter α)
-- Mathlib/Topology/Basic.lean
/-- If `U` is a neighborhood of each point of a set `s` then it is a neighborhood of s:
it contains an open set containing `s`. -/
theorem exists_open_set_nhds' {U : Set X} (h : U ∈ ⨆ x ∈ s, 𝓝 x) :
    ∃ V : Set X, s ⊆ V ∧ IsOpen V ∧ V ⊆ U
-- Mathlib/GroupTheory/SpecificGroups/Cyclic.lean
@[to_additive]
private theorem card_orderOf_eq_totient_aux₁ :
    ∀ {d : ℕ},
      d ∣ Fintype.card α →
        0 < (univ.filter fun a : α => orderOf a = d).card →
          (univ.filter fun a : α => orderOf a = d).card = φ d
-- Mathlib/MeasureTheory/Integral/FundThmCalculus.lean
/-- **Fundamental theorem of calculus-2**: If `f : ℝ → E` is continuous on `[a, b]` (where `a ≤ b`)
  and has a right derivative at `f' x` for all `x` in `(a, b)`, and `f'` is integrable on `[a, b]`,
  then `∫ y in a..b, f' y` equals `f b - f a`. -/
theorem integral_eq_sub_of_hasDeriv_right_of_le (hab : a ≤ b) (hcont : ContinuousOn f (Icc a b))
    (hderiv : ∀ x ∈ Ioo a b, HasDerivWithinAt f (f' x) (Ioi x) x)
    (f'int : IntervalIntegrable f' volume a b) : ∫ y in a..b, f' y = f b - f a
-- Mathlib/SetTheory/Ordinal/FixedPoint.lean
theorem IsNormal.fp_iff_deriv {f} (H : IsNormal f) {a} : f a = a ↔ ∃ o, deriv f o = a
-- Mathlib/Combinatorics/SimpleGraph/Clique.lean
theorem IsClique.of_subsingleton {G : SimpleGraph α} (hs : s.Subsingleton) : G.IsClique s
-- Mathlib/Analysis/Complex/Arg.lean
theorem abs_sub_eq (h : x.arg = y.arg) : abs (x - y) = ‖abs x - abs y‖
-- Mathlib/Algebra/Order/Ring/Basic.lean
@[gcongr]
theorem pow_lt_pow_right (h : 1 < a) (hmn : m < n) : a ^ m < a ^ n
-- Mathlib/LinearAlgebra/AffineSpace/Combination.lean
/-- In the characteristic zero case, the weights in the centroid
indexed by a `Fintype` sum to 1 if the number of points is `n + 1`. -/
theorem sum_centroidWeightsIndicator_eq_one_of_card_eq_add_one [CharZero k] [Fintype ι] {n : ℕ}
    (h : card s = n + 1) : ∑ i, s.centroidWeightsIndicator k i = 1
-- Mathlib/Order/Filter/Prod.lean
theorem Eventually.diag_of_prod_right {f : Filter α} {g : Filter γ} {p : α × γ × γ → Prop} :
    (∀ᶠ x in f ×ˢ (g ×ˢ g), p x) → ∀ᶠ x : α × γ in f ×ˢ g, p (x.1, x.2, x.2)
-- Mathlib/MeasureTheory/Function/LpSpace.lean
theorem _root_.MeasureTheory.Memℒp.pos_part {f : α → ℝ} (hf : Memℒp f p μ) :
    Memℒp (fun x => max (f x) 0) p μ
-- Mathlib/Analysis/NormedSpace/Real.lean
@[simp]
theorem interior_sphere' (x : E) (r : ℝ) : interior (sphere x r) = ∅
-- Mathlib/Topology/LocallyConstant/Basic.lean
@[simp]
theorem map_apply (f : Y → Z) (g : LocallyConstant X Y) : ⇑(map f g) = f ∘ g
-- Mathlib/Order/Filter/Basic.lean
protected theorem EventuallyEq.symmDiff {s t s' t' : Set α} {l : Filter α}
    (h : s =ᶠ[l] t) (h' : s' =ᶠ[l] t') : (s ∆ s' : Set α) =ᶠ[l] (t ∆ t' : Set α)
-- Mathlib/Algebra/Periodic.lean
theorem Periodic.image_Ioc [LinearOrderedAddCommGroup α] [Archimedean α] (h : Periodic f c)
    (hc : 0 < c) (a : α) : f '' Ioc a (a + c) = range f
-- Mathlib/NumberTheory/Padics/PadicNumbers.lean
theorem val_eq_iff_norm_eq {f g : PadicSeq p} (hf : ¬f ≈ 0) (hg : ¬g ≈ 0) :
    f.valuation = g.valuation ↔ f.norm = g.norm
-- Mathlib/Order/Filter/Bases.lean
theorem HasBasis.coprod {ι ι' : Type*} {pa : ι → Prop} {sa : ι → Set α} {pb : ι' → Prop}
    {sb : ι' → Set β} (hla : la.HasBasis pa sa) (hlb : lb.HasBasis pb sb) :
    (la.coprod lb).HasBasis (fun i : ι × ι' => pa i.1 ∧ pb i.2) fun i =>
      Prod.fst ⁻¹' sa i.1 ∪ Prod.snd ⁻¹' sb i.2
-- Mathlib/Analysis/SpecialFunctions/Log/Base.lean
theorem logb_nonpos_iff_of_base_lt_one (hx : 0 < x) : logb b x ≤ 0 ↔ 1 ≤ x
-- Mathlib/Algebra/Quandle.lean
@[simp]
theorem invAct_apply (x y : R) : (act' x)⁻¹ y = x ◃⁻¹ y
-- Mathlib/Data/Matroid/Dual.lean
theorem coindep_iff_exists (hX : X ⊆ M.E := by aesop_mat) :
    M.Coindep X ↔ ∃ B, M.Base B ∧ B ⊆ M.E \ X
-- Mathlib/GroupTheory/GroupAction/Blocks.lean
lemma smul_orbit_eq_orbit_smul (N : Subgroup G) [nN : N.Normal] (a : X) (g : G) :
    g • orbit N a = orbit N (g • a)
-- Mathlib/GroupTheory/GroupAction/Hom.lean
@[simp]
theorem coe_one : ⇑(1 : A →+[M] A) = id
-- Mathlib/MeasureTheory/Integral/Periodic.lean
/-- The covering map from `ℝ` to the "additive circle" `ℝ ⧸ (ℤ ∙ T)` is measure-preserving,
considered with respect to the standard measure (defined to be the Haar measure of total mass `T`)
on the additive circle, and with respect to the restriction of Lebsegue measure on `ℝ` to an
interval (t, t + T]. -/
protected theorem measurePreserving_mk (t : ℝ) :
    MeasurePreserving (β := AddCircle T) ((↑) : ℝ → AddCircle T)
      (volume.restrict (Ioc t (t + T)))
-- Mathlib/FieldTheory/Adjoin.lean
@[simp]
theorem restrictScalars_top {K : Type*} [Field K] [Algebra K E] [Algebra K F]
    [IsScalarTower K F E] : (⊤ : IntermediateField F E).restrictScalars K = ⊤
-- Mathlib/Analysis/Asymptotics/Asymptotics.lean
theorem isBigOWith_snd_prod : IsBigOWith 1 l g' fun x => (f' x, g' x)
-- Mathlib/Algebra/Associated/Basic.lean
theorem not_irreducible_pow {α} [Monoid α] {x : α} {n : ℕ} (hn : n ≠ 1) :
    ¬ Irreducible (x ^ n)
-- Mathlib/Algebra/ContinuedFractions/Computation/Translations.lean
theorem IntFractPair.exists_succ_get?_stream_of_gcf_of_get?_eq_some {gp_n : Pair K}
    (s_nth_eq : (of v).s.get? n = some gp_n) :
    ∃ ifp : IntFractPair K, IntFractPair.stream v (n + 1) = some ifp ∧ (ifp.b : K) = gp_n.b
-- Mathlib/Analysis/SpecialFunctions/Complex/Arg.lean
@[simp]
theorem arg_one : arg 1 = 0
-- Mathlib/Algebra/Lie/Submodule.lean
@[simp]
lemma map_incl_lt_iff_lt_top {N' : LieSubmodule R L N} :
    N'.map (LieSubmodule.incl N) < N ↔ N' < ⊤
-- Mathlib/Algebra/Category/ModuleCat/ChangeOfRings.lean
/--
The map `S → X →ₗ[R] Y` given by `fun s x => s • (g x)`
-/
@[simps]
def HomEquiv.evalAt {X : ModuleCat R} {Y : ModuleCat S} (s : S)
    (g : X ⟶ (restrictScalars f).obj Y) : have : Module R Y := Module.compHom Y f
    X →ₗ[R] Y
-- Mathlib/MeasureTheory/Function/LpSeminorm/Basic.lean
theorem memℒp_map_measure_iff (hg : AEStronglyMeasurable g (Measure.map f μ))
    (hf : AEMeasurable f μ) : Memℒp g p (Measure.map f μ) ↔ Memℒp (g ∘ f) p μ
-- Mathlib/NumberTheory/FLT/Three.lean
private lemma lambda_not_dvd_x : ¬ λ ∣ S.x
-- Mathlib/Order/Hom/CompleteLattice.lean
@[simp] lemma coe_mk (f : InfTopHom α β) (hf) : ⇑(mk f hf) = f
-- Mathlib/Order/Bounded.lean
theorem bounded_ge_iff_bounded_gt [Preorder α] [NoMinOrder α] :
    Bounded (· ≥ ·) s ↔ Bounded (· > ·) s
-- Mathlib/NumberTheory/Padics/PadicVal.lean
protected theorem div_of_dvd (h : b ∣ a) :
    padicValNat p (a / b) = padicValNat p a - padicValNat p b
-- Mathlib/Order/Estimator.lean
/--
If `Estimator.improveUntil a p e` returns `some e'`, then `bound a e'` satisfies `p`.
Otherwise, that value `a` must not satisfy `p`.
-/
theorem Estimator.improveUntilAux_spec (a : Thunk α) (p : α → Bool)
    [Estimator a ε] [WellFoundedGT (range (bound a : ε → α))] (e : ε) (r : Bool) :
    match Estimator.improveUntilAux a p e r with
    | .error _ => ¬ p a.get
    | .ok e' => p (bound a e')
-- Mathlib/Data/Setoid/Basic.lean
/-- The equivalence closure of a binary relation r is contained in any equivalence
    relation containing r. -/
theorem eqvGen_le {r : α → α → Prop} {s : Setoid α} (h : ∀ x y, r x y → s.Rel x y) :
    EqvGen.Setoid r ≤ s
-- Mathlib/Order/BoundedOrder.lean
theorem ne_top_of_lt (h : a < b) : a ≠ ⊤
-- Mathlib/Order/CompleteLattice.lean
theorem eq_singleton_top_of_sInf_eq_top_of_nonempty : sInf s = ⊤ → s.Nonempty → s = {⊤}
-- Mathlib/Data/Set/Finite.lean
theorem Finite.of_diff {s t : Set α} (hd : (s \ t).Finite) (ht : t.Finite) : s.Finite
-- Mathlib/FieldTheory/IntermediateField.lean
theorem coe_isIntegral_iff {R : Type*} [CommRing R] [Algebra R K] [Algebra R L]
    [IsScalarTower R K L] {x : S} : IsIntegral R (x : L) ↔ IsIntegral R x
-- Mathlib/Analysis/SpecialFunctions/Pow/NNReal.lean
theorem rpow_inv_natCast_pow (x : ℝ≥0) {n : ℕ} (hn : n ≠ 0) : (x ^ (n⁻¹ : ℝ)) ^ n = x
-- Mathlib/Data/Seq/Seq.lean
@[simp]
theorem join_map_ret (s : Seq α) : Seq.join (Seq.map ret s) = s
-- Mathlib/RingTheory/Adjoin/Basic.lean
theorem adjoin_union_eq_adjoin_adjoin :
    adjoin R (s ∪ t) = (adjoin (adjoin R s) t).restrictScalars R
-- Mathlib/Order/SupIndep.lean
@[simp]
theorem supIndep_empty (f : ι → α) : (∅ : Finset ι).SupIndep f
-- Mathlib/RepresentationTheory/GroupCohomology/LowDegree.lean
@[simp] theorem oneCocycles_map_inv (f : oneCocycles A) (g : G) :
    A.ρ g (f.1 g⁻¹) = - f.1 g
-- Mathlib/Algebra/Polynomial/Basic.lean
theorem monomial_one_right_eq_X_pow (n : ℕ) : monomial n (1 : R) = X ^ n
-- Mathlib/Analysis/InnerProductSpace/EuclideanDist.lean
theorem ContDiff.euclidean_dist (hf : ContDiff ℝ n f) (hg : ContDiff ℝ n g) (h : ∀ x, f x ≠ g x) :
    ContDiff ℝ n fun x => Euclidean.dist (f x) (g x)
-- Mathlib/Probability/Independence/Basic.lean
theorem indepSets_of_indepSets_of_le_left {s₁ s₂ s₃ : Set (Set Ω)}
    (h_indep : IndepSets s₁ s₂ μ) (h31 : s₃ ⊆ s₁) :
    IndepSets s₃ s₂ μ
-- Mathlib/Algebra/Module/Submodule/Pointwise.lean
lemma set_smul_eq_iSup [SMulCommClass S R M] (s : Set S) (N : Submodule R M) :
    s • N = ⨆ (a ∈ s), a • N
-- Mathlib/Combinatorics/SimpleGraph/Triangle/Removal.lean
private lemma card_bound (hP₁ : P.IsEquipartition) (hP₃ : P.parts.card ≤ bound (ε / 8) ⌈4/ε⌉₊)
    (hX : s ∈ P.parts) : card α / (2 * bound (ε / 8) ⌈4 / ε⌉₊ : ℝ) ≤ s.card
-- Mathlib/Data/Nat/Choose/Multinomial.lean
theorem binomial_spec [DecidableEq α] (hab : a ≠ b) :
    (f a)! * (f b)! * multinomial {a, b} f = (f a + f b)!
-- Mathlib/Data/Real/Pi/Bounds.lean
theorem pi_gt_sqrtTwoAddSeries (n : ℕ) :
    (2 : ℝ) ^ (n + 1) * √(2 - sqrtTwoAddSeries 0 n) < π
-- Mathlib/Algebra/TrivSqZeroExt.lean
@[simp]
theorem snd_inl [Zero M] (r : R) : (inl r : tsze R M).snd = 0
-- Mathlib/Logic/Equiv/Basic.lean
/-- The sum of `IsEmpty` with any type is equivalent to that type. -/
@[simps! symm_apply]
def emptySum (α β) [IsEmpty α] : α ⊕ β ≃ β
-- Mathlib/Data/Real/Basic.lean
theorem ext_cauchy_iff : ∀ {x y : Real}, x = y ↔ x.cauchy = y.cauchy
-- Mathlib/RingTheory/DedekindDomain/Ideal.lean
theorem associates_irreducible : Irreducible <| Associates.mk v.asIdeal
-- Mathlib/Data/Nat/Choose/Cast.lean
theorem cast_choose {a b : ℕ} (h : a ≤ b) : (b.choose a : K) = b ! / (a ! * (b - a)!)
-- Mathlib/Topology/Order/IsLUB.lean
theorem exists_seq_tendsto_sInf {α : Type*} [ConditionallyCompleteLinearOrder α]
    [TopologicalSpace α] [OrderTopology α] [FirstCountableTopology α] {S : Set α} (hS : S.Nonempty)
    (hS' : BddBelow S) : ∃ u : ℕ → α, Antitone u ∧ Tendsto u atTop (𝓝 (sInf S)) ∧ ∀ n, u n ∈ S
-- Mathlib/Data/Matroid/Basic.lean
/-- Typeclass for a matroid having nonempty ground set. Just a wrapper for `M.E.Nonempty`-/
protected class Nonempty (M : Matroid α) : Prop where
  /-- The ground set is nonempty -/
  (ground_nonempty : M.E.Nonempty)
-- Mathlib/Combinatorics/SimpleGraph/Path.lean
theorem Iso.preconnected_iff {G : SimpleGraph V} {H : SimpleGraph V'} (e : G ≃g H) :
    G.Preconnected ↔ H.Preconnected
-- Mathlib/Dynamics/Ergodic/Ergodic.lean
theorem measure_self_or_compl_eq_zero (hf : PreErgodic f μ) (hs : MeasurableSet s)
    (hs' : f ⁻¹' s = s) : μ s = 0 ∨ μ sᶜ = 0
-- Mathlib/Algebra/Group/Action/Prod.lean
@[to_additive existing (attr := simp) (reorder := 6 7) smul_snd]
lemma pow_snd (p : α × β) (c : E) : (p ^ c).snd = p.snd ^ c
-- Mathlib/Algebra/Homology/ShortComplex/SnakeLemma.lean
@[simp] lemma id_f₂ : Hom.f₂ (𝟙 S) = 𝟙 _
-- Mathlib/CategoryTheory/Bicategory/Kan/HasKan.lean
@[simp]
theorem lanLeftExtension_extension (f : a ⟶ b) (g : a ⟶ c) [HasLeftKanExtension f g] :
    (lanLeftExtension f g).extension = f⁺ g
-- .lake/packages/lean4/src/lean/Init/Data/Array/Lemmas.lean
theorem anyM_eq_anyM_loop [Monad m] (p : α → m Bool) (as : Array α) (start stop) :
    anyM p as start stop = anyM.loop p as (min stop as.size) (Nat.min_le_right ..) start
-- Mathlib/Order/Hom/Basic.lean
@[simp]
theorem toOrderIso_toEquiv (e : α ≃ β) (h₁ : Monotone e) (h₂ : Monotone e.symm) :
    (e.toOrderIso h₁ h₂).toEquiv = e
-- Mathlib/MeasureTheory/Measure/Regular.lean
theorem smul (H : InnerRegularWRT μ p q) (c : ℝ≥0∞) : InnerRegularWRT (c • μ) p q
-- Mathlib/Topology/MetricSpace/Infsep.lean
theorem einfsep_pos : 0 < s.einfsep ↔ ∃ C > 0, ∀ x ∈ s, ∀ y ∈ s, x ≠ y → C ≤ edist x y
-- Mathlib/Analysis/SpecialFunctions/Pow/NNReal.lean
theorem rpow_eq_top_iff_of_pos {x : ℝ≥0∞} {y : ℝ} (hy : 0 < y) : x ^ y = ⊤ ↔ x = ⊤
-- Mathlib/LinearAlgebra/LinearPMap.lean
@[simp]
theorem domain_mkSpanSingleton (x : E) (y : F) (H : ∀ c : R, c • x = 0 → c • y = 0) :
    (mkSpanSingleton' x y H).domain = R ∙ x
-- Mathlib/Algebra/Lie/IdealOperations.lean
theorem lie_coe_mem_lie (x : I) (m : N) : ⁅(x : L), (m : M)⁆ ∈ ⁅I, N⁆
-- Mathlib/LinearAlgebra/Matrix/IsDiag.lean
/-- `(A ⊗ B).IsDiag` if both `A` and `B` are diagonal. -/
theorem IsDiag.kronecker [MulZeroClass α] {A : Matrix m m α} {B : Matrix n n α} (hA : A.IsDiag)
    (hB : B.IsDiag) : (A ⊗ₖ B).IsDiag
-- Mathlib/CategoryTheory/Limits/Shapes/Pullback/CommSq.lean
theorem IsPullback.of_map [ReflectsLimit (cospan h i) F] (e : f ≫ h = g ≫ i)
    (H : IsPullback (F.map f) (F.map g) (F.map h) (F.map i)) : IsPullback f g h i
-- Mathlib/MeasureTheory/Function/Jacobian.lean
/-- A differentiable function maps sets of measure zero to sets of measure zero. -/
theorem addHaar_image_eq_zero_of_differentiableOn_of_addHaar_eq_zero (hf : DifferentiableOn ℝ f s)
    (hs : μ s = 0) : μ (f '' s) = 0
-- Mathlib/MeasureTheory/Function/LpSeminorm/TriangleInequality.lean
theorem eLpNorm'_add_le_of_le_one (hf : AEStronglyMeasurable f μ) (hq0 : 0 ≤ q) (hq1 : q ≤ 1) :
    eLpNorm' (f + g) q μ ≤ (2 : ℝ≥0∞) ^ (1 / q - 1) * (eLpNorm' f q μ + eLpNorm' g q μ)
-- Mathlib/Data/Multiset/Pi.lean
theorem mem_pi (m : Multiset α) (t : ∀ a, Multiset (β a)) :
    ∀ f : ∀ a ∈ m, β a, f ∈ pi m t ↔ ∀ (a) (h : a ∈ m), f a h ∈ t a
-- Mathlib/Tactic/CategoryTheory/Monoidal.lean
theorem eval_of (η : f ⟶ g) :
    η = 𝟙 _ ≫ η ≫ 𝟙 _
-- Mathlib/Order/Max.lean
theorem NoBotOrder.to_noMinOrder (α : Type*) [LinearOrder α] [NoBotOrder α] : NoMinOrder α
-- Mathlib/NumberTheory/NumberField/Units/Basic.lean
/-- The group of roots of unity of order dividing `torsionOrder` is equal to the torsion
group. -/
theorem rootsOfUnity_eq_torsion [NumberField K] :
    rootsOfUnity (torsionOrder K) (𝓞 K) = torsion K
-- Mathlib/Algebra/Order/Field/Basic.lean
theorem lt_of_one_div_lt_one_div (ha : 0 < a) (h : 1 / a < 1 / b) : b < a
-- Mathlib/Algebra/Lie/Derivation/Basic.lean
/-- For a Lie derivation from a Lie algebra to itself, the usual Leibniz rule holds. -/
lemma apply_lie_eq_add (D : LieDerivation R L L) (a b : L) :
    D ⁅a, b⁆ = ⁅a, D b⁆ + ⁅D a, b⁆
-- Mathlib/RingTheory/Derivation/Basic.lean
@[simp]
theorem map_smul : D (r • a) = r • D a
-- Mathlib/AlgebraicGeometry/FunctionField.lean
theorem Scheme.germToFunctionField_injective [IsIntegral X] (U : X.Opens) [Nonempty U] :
    Function.Injective (X.germToFunctionField U)
-- Mathlib/Algebra/Lie/Weights/Basic.lean
@[simp] lemma IsZero.eq {χ : Weight R L M} (hχ : χ.IsZero) : (χ : L → R) = 0
-- Mathlib/Computability/AkraBazzi/GrowsPolynomially.lean
protected lemma abs (hf : GrowsPolynomially f) : GrowsPolynomially (fun x => |f x|)
-- Mathlib/Data/Sym/Sym2.lean
theorem filter_image_mk_isDiag [DecidableEq α] (s : Finset α) :
    ((s ×ˢ s).image Sym2.mk).filter IsDiag = s.diag.image Sym2.mk
-- Mathlib/Data/Nat/WithBot.lean
@[simp]
theorem lt_zero_iff {n : WithBot ℕ} : n < 0 ↔ n = ⊥
-- Mathlib/RingTheory/AlgebraicIndependent.lean
theorem AlgebraicIndependent.to_subtype_range' {ι} {f : ι → A} (hf : AlgebraicIndependent R f) {t}
    (ht : range f = t) : AlgebraicIndependent R ((↑) : t → A)
-- Mathlib/SetTheory/Ordinal/Basic.lean
theorem _root_.RelIso.ordinal_lift_type_eq {α : Type u} {β : Type v} {r : α → α → Prop}
    {s : β → β → Prop} [IsWellOrder α r] [IsWellOrder β s] (f : r ≃r s) :
    lift.{v} (type r) = lift.{u} (type s)
-- Mathlib/LinearAlgebra/Determinant.lean
theorem det_comm [DecidableEq n] (M N : Matrix n n A) : det (M * N) = det (N * M)
-- Mathlib/Data/List/AList.lean
@[simp]
theorem lookup_union_left {a} {s₁ s₂ : AList β} : a ∈ s₁ → lookup a (s₁ ∪ s₂) = lookup a s₁
-- Mathlib/RingTheory/Localization/FractionRing.lean
theorem div_surjective (z : K) :
    ∃ x y : A, y ∈ nonZeroDivisors A ∧ algebraMap _ _ x / algebraMap _ _ y = z
-- Mathlib/NumberTheory/FLT/Three.lean
private lemma formula1 : S.X^3*S.u₁*λ^(3*S.multiplicity-2)+S.Y^3*S.u₂*λ*η+S.Z^3*S.u₃*λ*η^2 = 0
-- Mathlib/SetTheory/Ordinal/Arithmetic.lean
@[simp]
theorem lsub_eq_blsub {o : Ordinal.{u}} (f : ∀ a < o, Ordinal.{max u v}) :
    lsub.{_, v} (familyOfBFamily o f) = blsub.{_, v} o f
-- Mathlib/RingTheory/Polynomial/Content.lean
theorem Monic.isPrimitive {p : R[X]} (hp : p.Monic) : p.IsPrimitive
-- .lake/packages/lean4/src/lean/Init/Data/Bool.lean
@[simp] theorem if_false_right  (p : Prop) [h : Decidable p] (t : Bool) :
    (ite p t false) = (p && t)
-- Mathlib/Analysis/Convex/Side.lean
theorem SSameSide.left_not_mem {s : AffineSubspace R P} {x y : P} (h : s.SSameSide x y) : x ∉ s
-- Mathlib/Topology/Instances/AddCircle.lean
@[simp] lemma toAddCircle_inj {j k : ZMod N} : toAddCircle j = toAddCircle k ↔ j = k
-- Mathlib/LinearAlgebra/Matrix/ToLinearEquiv.lean
/-- A matrix whose nondiagonal entries are negative with the sum of the entries of each
column positive has nonzero determinant. -/
lemma det_ne_zero_of_sum_col_pos [DecidableEq n] {S : Type*} [LinearOrderedCommRing S]
    {A : Matrix n n S} (h1 : Pairwise fun i j => A i j < 0) (h2 : ∀ j, 0 < ∑ i, A i j) :
    A.det ≠ 0
-- Mathlib/Analysis/Calculus/TangentCone.lean
theorem uniqueDiffOn_Ioi (a : ℝ) : UniqueDiffOn ℝ (Ioi a)
-- Mathlib/Order/SupClosed.lean
lemma finsetSup'_mem_supClosure {ι : Type*} {t : Finset ι} (ht : t.Nonempty) {f : ι → α}
    (hf : ∀ i ∈ t, f i ∈ s) : t.sup' ht f ∈ supClosure s
-- Mathlib/NumberTheory/Cyclotomic/Basic.lean
/-- If `∀ s ∈ S, n ∣ s` and `S` is not empty, then `IsCyclotomicExtension S A B` if and only if
`IsCyclotomicExtension (S ∪ {n}) A B`. -/
theorem iff_union_of_dvd (h : ∀ s ∈ S, n ∣ s) (hS : S.Nonempty) :
    IsCyclotomicExtension S A B ↔ IsCyclotomicExtension (S ∪ {n}) A B
-- Mathlib/SetTheory/Cardinal/Ordinal.lean
@[simp]
theorem add_nat_inj {α β : Cardinal} (n : ℕ) : α + n = β + n ↔ α = β
-- Mathlib/Topology/Algebra/StarSubalgebra.lean
/-- The coercion from an elemental algebra to the full algebra as a `ClosedEmbedding`. -/
theorem closedEmbedding_coe (x : A) : ClosedEmbedding ((↑) : elementalStarAlgebra R x → A)
-- Mathlib/Data/Prod/Basic.lean
/-- Composing a `Prod.map` with another `Prod.map` is equal to
a single `Prod.map` of composed functions, fully applied.
-/
theorem map_map {ε ζ : Type*} (f : α → β) (f' : γ → δ) (g : β → ε) (g' : δ → ζ) (x : α × γ) :
    Prod.map g g' (Prod.map f f' x) = Prod.map (g ∘ f) (g' ∘ f') x
-- Mathlib/LinearAlgebra/BilinearForm/Properties.lean
@[simp]
theorem isAlt_neg {B : BilinForm R₁ M₁} : (-B).IsAlt ↔ B.IsAlt
-- Mathlib/Data/Num/Lemmas.lean
@[norm_cast]
theorem to_nat_inj {m n : Num} : (m : ℕ) = n ↔ m = n
-- Mathlib/MeasureTheory/Constructions/BorelSpace/Basic.lean
theorem IsGδ.measurableSet (h : IsGδ s) : MeasurableSet s
-- Mathlib/Algebra/Homology/ShortComplex/Preadditive.lean
@[simp]
lemma rightHomologyMap_neg : rightHomologyMap (-φ) = -rightHomologyMap φ