ruc-ai4math/mathlib_handler_benchmark_410 huggingface dataset:
-- Mathlib/Algebra/DirectSum/Module.lean
/-- Note that this is not generally true for `[Semiring R]`; see
`CompleteLattice.Independent.dfinsupp_lsum_injective` for details. -/
theorem isInternal_submodule_of_independent_of_iSup_eq_top {A : ι → Submodule R M}
    (hi : CompleteLattice.Independent A) (hs : iSup A = ⊤) : IsInternal A
-- Mathlib/CategoryTheory/EffectiveEpi/Basic.lean
/--
This structure encodes the data required for a morphism to be an effective epimorphism.
-/
structure EffectiveEpiStruct {X Y : C} (f : Y ⟶ X) where
  /--
  For every `W` with a morphism `e : Y ⟶ W` that coequalizes every pair of morphisms
  `g₁ g₂ : Z ⟶ Y` which `f` coequalizes, `desc e h` is a morphism `X ⟶ W`... 
  -/
  desc : ∀ {W : C} (e : Y ⟶ W),
    (∀ {Z : C} (g₁ g₂ : Z ⟶ Y), g₁ ≫ f = g₂ ≫ f → g₁ ≫ e = g₂ ≫ e) → (X ⟶ W)
  /-- ...factorizing `e` through `f`... -/
  fac : ∀ {W : C} (e : Y ⟶ W)
    (h : ∀ {Z : C} (g₁ g₂ : Z ⟶ Y), g₁ ≫ f = g₂ ≫ f → g₁ ≫ e = g₂ ≫ e),
    f ≫ desc e h = e
  /-- ...and as such, unique. -/
  uniq : ∀ {W : C} (e : Y ⟶ W)
    (h : ∀ {Z : C} (g₁ g₂ : Z ⟶ Y), g₁ ≫ f = g₂ ≫ f → g₁ ≫ e = g₂ ≫ e)
    (m : X ⟶ W), f ≫ m = e → m = desc e h
-- Mathlib/Data/List/Zip.lean
theorem zipWith_distrib_reverse (h : l.length = l'.length) :
    (zipWith f l l').reverse = zipWith f l.reverse l'.reverse
-- Mathlib/Data/Finset/Basic.lean
@[simp]
theorem sdiff_union_self_eq_union : s \ t ∪ t = s ∪ t
-- Mathlib/Topology/Gluing.lean
theorem ι_eq_iff_rel (i j : D.J) (x : D.U i) (y : D.U j) :
    𝖣.ι i x = 𝖣.ι j y ↔ D.Rel ⟨i, x⟩ ⟨j, y⟩
-- Mathlib/Topology/UniformSpace/UniformConvergence.lean
/-- Uniform converence implies pointwise convergence. -/
theorem TendstoUniformly.tendsto_at (h : TendstoUniformly F f p) (x : α) :
    Tendsto (fun n => F n x) p <| 𝓝 (f x)
-- Mathlib/Algebra/Group/Hom/Defs.lean
@[to_additive]
theorem MonoidHom.comp_apply [MulOneClass M] [MulOneClass N] [MulOneClass P]
    (g : N →* P) (f : M →* N) (x : M) : g.comp f x = g (f x)
-- Mathlib/Geometry/Manifold/Algebra/LieGroup.lean
@[to_additive]
nonrec theorem SmoothAt.div {f g : M → G} {x₀ : M} (hf : SmoothAt I' I f x₀)
    (hg : SmoothAt I' I g x₀) : SmoothAt I' I (fun x => f x / g x) x₀
-- Mathlib/Algebra/Group/NatPowAssoc.lean
theorem npow_mul (x : M) (m n : ℕ) : x ^ (m * n) = (x ^ m) ^ n
-- Mathlib/Algebra/Algebra/Hom.lean
@[simp]
theorem mk_coe {f : A →ₐ[R] B} (h₁ h₂ h₃ h₄ h₅) : (⟨⟨⟨⟨f, h₁⟩, h₂⟩, h₃, h₄⟩, h₅⟩ : A →ₐ[R] B) = f
-- Mathlib/Topology/Algebra/InfiniteSum/Order.lean
@[to_additive tsum_nonneg]
theorem one_le_tprod (h : ∀ i, 1 ≤ g i) : 1 ≤ ∏' i, g i
-- .lake/packages/batteries/Batteries/Data/Nat/Gcd.lean
theorem Coprime.gcd_mul_right_cancel (m : Nat) (H : Coprime k n) : gcd (m * k) n = gcd m n
-- Mathlib/Order/Category/DistLat.lean
theorem distLat_dual_comp_forget_to_Lat :
    DistLat.dual ⋙ forget₂ DistLat Lat = forget₂ DistLat Lat ⋙ Lat.dual
-- Mathlib/Algebra/Polynomial/Reverse.lean
theorem natDegree_eq_reverse_natDegree_add_natTrailingDegree (f : R[X]) :
    f.natDegree = f.reverse.natDegree + f.natTrailingDegree
-- Mathlib/Algebra/Order/Monoid/Unbundled/Basic.lean
@[to_additive]
theorem lt_mul_of_one_lt_of_lt [CovariantClass α α (swap (· * ·)) (· < ·)] {a b c : α} (ha : 1 < a)
    (hbc : b < c) :
    b < a * c
-- Mathlib/Data/Matrix/RowCol.lean
theorem reindex_updateRow [DecidableEq l] [DecidableEq m] (A : Matrix m n α) (i : m) (r : n → α)
    (e : m ≃ l) (f : n ≃ o) :
    reindex e f (A.updateRow i r) = updateRow (reindex e f A) (e i) fun i => r (f.symm i)
-- Mathlib/MeasureTheory/Measure/Haar/Unique.lean
@[to_additive measure_isAddHaarMeasure_eq_smul_of_isEverywherePos]
theorem measure_isHaarMeasure_eq_smul_of_isEverywherePos [LocallyCompactSpace G]
    (μ' μ : Measure G) [IsHaarMeasure μ] [IsHaarMeasure μ']
    {s : Set G} (hs : MeasurableSet s) (h's : IsEverywherePos μ s) :
    μ' s = haarScalarFactor μ' μ • μ s
-- Mathlib/RingTheory/Polynomial/Dickson.lean
theorem dickson_one_one_zmod_p (p : ℕ) [Fact p.Prime] : dickson 1 (1 : ZMod p) p = X ^ p
-- Mathlib/LinearAlgebra/Matrix/BilinearForm.lean
@[simp]
theorem Matrix.toBilin'_stdBasis (M : Matrix n n R₂) (i j : n) :
    Matrix.toBilin' M
      (LinearMap.stdBasis R₂ (fun _ => R₂) i 1)
      (LinearMap.stdBasis R₂ (fun _ => R₂) j 1) = M i j
-- Mathlib/Algebra/CubicDiscriminant.lean
theorem ne_zero_of_d_ne_zero (hd : P.d ≠ 0) : P.toPoly ≠ 0
-- Mathlib/Data/Set/Image.lean
theorem subset_image_diff (f : α → β) (s t : Set α) : f '' s \ f '' t ⊆ f '' (s \ t)
-- Mathlib/Computability/TuringMachine.lean
theorem tr_respects : Respects (TM2.step M) (TM1.step (tr M)) TrCfg
-- Mathlib/Data/List/Sigma.lean
@[simp]
theorem dlookup_cons_ne (l) {a} : ∀ s : Sigma β, a ≠ s.1 → dlookup a (s :: l) = dlookup a l
-- .lake/packages/lean4/src/lean/Init/Data/Fin/Lemmas.lean
@[simp] theorem cases_succ {n} {motive : Fin (n + 1) → Sort _} {zero succ} (i : Fin n) :
    @Fin.cases n motive zero succ i.succ = succ i
-- Mathlib/GroupTheory/Congruence/Basic.lean
/-- Multiplicative congruence relations preserve division. -/
@[to_additive "Additive congruence relations preserve subtraction."]
protected theorem div : ∀ {w x y z}, c w x → c y z → c (w / y) (x / z)
-- Mathlib/Analysis/NormedSpace/Multilinear/Basic.lean
theorem mkContinuousMultilinear_norm_le (f : MultilinearMap 𝕜 E (MultilinearMap 𝕜 E' G)) {C : ℝ}
    (hC : 0 ≤ C) (H : ∀ m₁ m₂, ‖f m₁ m₂‖ ≤ (C * ∏ i, ‖m₁ i‖) * ∏ i, ‖m₂ i‖) :
    ‖mkContinuousMultilinear f C H‖ ≤ C
-- Mathlib/Data/Finset/Basic.lean
theorem eq_of_veq : ∀ {s t : Finset α}, s.1 = t.1 → s = t
-- Mathlib/Data/Complex/Basic.lean
@[simp, norm_cast] lemma natCast_im (n : ℕ) : (n : ℂ).im = 0
-- .lake/packages/lean4/src/lean/Init/Data/List/Lemmas.lean
@[simp]
theorem get?_take_of_succ {l : List α} {n : Nat} : (l.take (n + 1))[n]? = l[n]?
-- Mathlib/Topology/Semicontinuous.lean
theorem lowerSemicontinuousWithinAt_ciSup {f : ι → α → δ'}
    (bdd : ∀ᶠ y in 𝓝[s] x, BddAbove (range fun i => f i y))
    (h : ∀ i, LowerSemicontinuousWithinAt (f i) s x) :
    LowerSemicontinuousWithinAt (fun x' => ⨆ i, f i x') s x
-- Mathlib/Topology/Algebra/InfiniteSum/Defs.lean
@[to_additive]
theorem Multipliable.hasProd (ha : Multipliable f) : HasProd f (∏' b, f b)
-- Mathlib/Data/List/Basic.lean
theorem foldl1_eq_foldr1 (hassoc : Associative f) :
    ∀ a b l, foldl f a (l ++ [b]) = foldr f b (a :: l)
-- Mathlib/Analysis/Normed/Ring/SeminormFromConst.lean
lemma seminormFromConst_seq_def (x : R) :
    seminormFromConst_seq c f x = fun n ↦ f (x * c ^ n) / f c ^ n
-- .lake/packages/batteries/Batteries/Data/List/Lemmas.lean
theorem Chain.imp {R S : α → α → Prop} (H : ∀ a b, R a b → S a b) {a : α} {l : List α}
    (p : Chain R a l) : Chain S a l
-- Mathlib/Topology/UniformSpace/Basic.lean
theorem uniformContinuous₂_curry (f : α × β → γ) :
    UniformContinuous₂ (Function.curry f) ↔ UniformContinuous f
-- Mathlib/Algebra/Order/CauSeq/Completion.lean
@[simp]
theorem mk_neg (f : CauSeq β abv) : -mk f = mk (-f)
-- Mathlib/Algebra/Group/Pi/Basic.lean
/-- On non-dependent functions, `Pi.mulSingle` is symmetric in the two indices. -/
@[to_additive "On non-dependent functions, `Pi.single` is symmetric in the two indices."]
theorem mulSingle_comm [One β] (i : I) (x : β) (i' : I) :
    (mulSingle i x : I → β) i' = (mulSingle i' x : I → β) i
-- Mathlib/Data/Real/Cardinality.lean
/-- The cardinality of the reals, as a type. -/
theorem mk_real : #ℝ = 𝔠
-- Mathlib/Algebra/Polynomial/Degree/Definitions.lean
@[simp]
theorem degree_X : degree (X : R[X]) = 1
-- Mathlib/Analysis/SpecialFunctions/Pow/Complex.lean
/-- See also `Complex.cpow_int_mul'`. -/
lemma cpow_int_mul (x : ℂ) (n : ℤ) (y : ℂ) : x ^ (n * y) = (x ^ y) ^ n
-- Mathlib/Algebra/Order/Group/MinMax.lean
@[to_additive min_sub_sub_left]
theorem min_div_div_left' (a b c : α) : min (a / b) (a / c) = a / max b c
-- Mathlib/Order/Filter/AtTopBot.lean
theorem eventually_ne_atBot [Preorder α] [NoMinOrder α] (a : α) : ∀ᶠ x in atBot, x ≠ a
-- Mathlib/Analysis/Calculus/ContDiff/Basic.lean
nonrec theorem ContDiffAt.inv {f : E → 𝕜'} {n} (hf : ContDiffAt 𝕜 n f x) (hx : f x ≠ 0) :
    ContDiffAt 𝕜 n (fun x => (f x)⁻¹) x
-- Mathlib/LinearAlgebra/AffineSpace/AffineSubspace.lean
@[simp]
theorem parallel_bot_iff_eq_bot {s : AffineSubspace k P} : s ∥ ⊥ ↔ s = ⊥
-- Mathlib/RingTheory/Norm/Defs.lean
/-- If `x` is in the base field `K`, then the norm is `x ^ [L : K]`.

(If `L` is not finite-dimensional over `K`, then `norm = 1 = x ^ 0 = x ^ (finrank L K)`.)
-/
@[simp]
protected theorem norm_algebraMap {L : Type*} [Ring L] [Algebra K L] (x : K) :
    norm K (algebraMap K L x) = x ^ finrank K L
-- Mathlib/Algebra/Order/Monoid/Unbundled/WithTop.lean
theorem add_eq_coe : a + b = x ↔ ∃ a' b' : α, ↑a' = a ∧ ↑b' = b ∧ a' + b' = x
-- Mathlib/Algebra/Quaternion.lean
@[simp, norm_cast]
theorem natCast_imJ (n : ℕ) : (n : ℍ[R]).imJ = 0
-- Mathlib/Tactic/NormNum/Result.lean
theorem IsInt.to_isRat {α} [Ring α] : ∀ {a : α} {n}, IsInt a n → IsRat a n (nat_lit 1)
-- Mathlib/AlgebraicGeometry/EllipticCurve/Projective.lean
lemma fin3_def {R : Type u} (P : Fin 3 → R) : P = ![P x, P y, P z]
-- Mathlib/Algebra/Polynomial/Degree/TrailingDegree.lean
@[simp]
theorem trailingDegree_monomial (ha : a ≠ 0) : trailingDegree (monomial n a) = n
-- Mathlib/Dynamics/Ergodic/MeasurePreserving.lean
/-- If `μ univ < n * μ s` and `f` is a map preserving measure `μ`,
then for some `x ∈ s` and `0 < m < n`, `f^[m] x ∈ s`. -/
theorem exists_mem_iterate_mem_of_volume_lt_mul_volume (hf : MeasurePreserving f μ μ)
    (hs : NullMeasurableSet s μ) {n : ℕ} (hvol : μ (Set.univ : Set α) < n * μ s) :
    ∃ x ∈ s, ∃ m ∈ Set.Ioo 0 n, f^[m] x ∈ s
-- Mathlib/CategoryTheory/Bicategory/Extension.lean
@[simp]
theorem whisker_unit (t : LeftExtension f g) {x : B} (h : c ⟶ x) :
    (t.whisker h).unit = t.unit ▷ h ≫ (α_ f t.extension h).hom
-- Mathlib/Algebra/Order/Floor.lean
@[simp]
theorem round_neg_two_inv : round (-2⁻¹ : α) = 0
-- Mathlib/SetTheory/Cardinal/Basic.lean
@[simp]
theorem lift_max {a b : Cardinal} : lift.{u, v} (max a b) = max (lift.{u, v} a) (lift.{u, v} b)
-- Mathlib/Topology/Algebra/Order/Compact.lean
theorem atBot_le_cocompact [NoMinOrder α] [ClosedIicTopology α] :
    atBot ≤ cocompact α
-- Mathlib/Algebra/Lie/Submodule.lean
theorem lieSpan_mono {t : Set M} (h : s ⊆ t) : lieSpan R L s ≤ lieSpan R L t
-- Mathlib/Combinatorics/SimpleGraph/Path.lean
@[simp]
theorem map_id (C : ConnectedComponent G) : C.map Hom.id = C
-- Mathlib/Combinatorics/SimpleGraph/Finite.lean
@[norm_cast]
theorem coe_edgeFinset : (G.edgeFinset : Set (Sym2 V)) = G.edgeSet
-- Mathlib/Condensed/Light/Explicit.lean
/--
The light condensed object associated to a presheaf on `LightProfinite` which preserves finite
products and satisfies the equalizer condition.
-/
@[simps]
noncomputable def ofSheafLightProfinite (F : LightProfinite.{u}ᵒᵖ ⥤ A) [PreservesFiniteProducts F]
    (hF : EqualizerCondition F) : LightCondensed A
-- Mathlib/Data/Set/Pointwise/SMul.lean
@[to_additive]
theorem pairwiseDisjoint_smul_iff :
    s.PairwiseDisjoint (· • t) ↔ (s ×ˢ t).InjOn fun p ↦ p.1 * p.2
-- Mathlib/CategoryTheory/Limits/Shapes/Equalizers.lean
@[simp]
theorem Fork.ι_ofι {P : C} (ι : P ⟶ X) (w : ι ≫ f = ι ≫ g) : (Fork.ofι ι w).ι = ι
-- .lake/packages/batteries/Batteries/Data/AssocList.lean
@[simp] theorem find?_eq [BEq α] (a : α) (l : AssocList α β) :
    find? a l = (l.toList.find? (·.1 == a)).map (·.2)
-- Mathlib/Topology/Order/Basic.lean
/-- **Squeeze theorem** (also known as **sandwich theorem**). This version assumes that inequalities
hold everywhere. -/
theorem tendsto_of_tendsto_of_tendsto_of_le_of_le [OrderTopology α] {f g h : β → α} {b : Filter β}
    {a : α} (hg : Tendsto g b (𝓝 a)) (hh : Tendsto h b (𝓝 a)) (hgf : g ≤ f) (hfh : f ≤ h) :
    Tendsto f b (𝓝 a)
-- Mathlib/LinearAlgebra/Dimension/Constructions.lean
theorem rank_finsupp' (ι : Type v) : Module.rank R (ι →₀ M) = #ι * Module.rank R M
-- Mathlib/Analysis/Calculus/SmoothSeries.lean
theorem deriv_tsum_apply (hu : Summable u) (hg : ∀ n, Differentiable 𝕜 (g n))
    (hg' : ∀ n y, ‖deriv (g n) y‖ ≤ u n) (hg0 : Summable fun n => g n y₀) (y : 𝕜) :
    deriv (fun z => ∑' n, g n z) y = ∑' n, deriv (g n) y
-- Mathlib/Data/Set/NAry.lean
@[simp]
theorem image2_left (h : t.Nonempty) : image2 (fun x _ => x) s t = s
-- Mathlib/Topology/ContinuousFunction/Bounded.lean
@[simp]
theorem zsmul_apply (r : ℤ) (f : α →ᵇ β) (v : α) : (r • f) v = r • f v
-- .lake/packages/batteries/Batteries/Data/List/Lemmas.lean
@[deprecated getElem?_set_eq_of_lt (since := "2024-06-12")]
theorem get?_set_eq_of_lt (a : α) {n} {l : List α} (h : n < length l) :
    (set l n a).get? n = some a
-- Mathlib/CategoryTheory/Localization/Equivalence.lean
/-- If `L₁ : C₁ ⥤ D` is a localization functor for `W₁ : MorphismProperty C₁`, then it is also
the case of a functor `L₂ : C₂ ⥤ D` for a suitable `W₂ : MorphismProperty C₂` when
we have an equivalence of category `E : C₁ ≌ C₂` and an isomorphism `E.functor ⋙ L₂ ≅ L₁`. -/
lemma of_equivalence_source (L₁ : C₁ ⥤ D) (W₁ : MorphismProperty C₁)
    (L₂ : C₂ ⥤ D) (W₂ : MorphismProperty C₂)
    (E : C₁ ≌ C₂) (hW₁ : W₁ ≤ W₂.isoClosure.inverseImage E.functor) (hW₂ : W₂.IsInvertedBy L₂)
    [L₁.IsLocalization W₁] (iso : E.functor ⋙ L₂ ≅ L₁) : L₂.IsLocalization W₂
-- Mathlib/Data/List/GetD.lean
theorem getI_eq_get {n : ℕ} (hn : n < l.length) : l.getI n = l.get ⟨n, hn⟩
-- Mathlib/Data/Nat/Factorization/Basic.lean
theorem factorization_prime_le_iff_dvd {d n : ℕ} (hd : d ≠ 0) (hn : n ≠ 0) :
    (∀ p : ℕ, p.Prime → d.factorization p ≤ n.factorization p) ↔ d ∣ n
-- Mathlib/Algebra/Module/Submodule/Pointwise.lean
theorem neg_le (S T : Submodule R M) : -S ≤ T ↔ S ≤ -T
-- Mathlib/SetTheory/ZFC/Basic.lean
@[simp]
theorem mem_singleton {x y : ZFSet.{u}} : x ∈ @singleton ZFSet.{u} ZFSet.{u} _ y ↔ x = y
-- Mathlib/Algebra/Group/Submonoid/Operations.lean
@[to_additive (attr := simp)]
theorem mk_pow {M} [Monoid M] {A : Type*} [SetLike A M] [SubmonoidClass A M] {S : A} (x : M)
    (hx : x ∈ S) (n : ℕ) : (⟨x, hx⟩ : S) ^ n = ⟨x ^ n, pow_mem hx n⟩
-- Mathlib/Algebra/Group/AddChar.lean
/-- An additive character maps integer scalar multiples to integer powers. -/
lemma map_zsmul_eq_zpow (ψ : AddChar A M) (n : ℤ) (a : A) : ψ (n • a) = (ψ a) ^ n
-- Mathlib/Data/Int/Log.lean
/-- `Int.clog b` and `zpow b` (almost) form a Galois connection. -/
theorem le_zpow_iff_clog_le {b : ℕ} (hb : 1 < b) {x : ℤ} {r : R} (hr : 0 < r) :
    r ≤ (b : R) ^ x ↔ clog b r ≤ x
-- Mathlib/Data/Set/Basic.lean
theorem Nonempty.left (h : (s ∩ t).Nonempty) : s.Nonempty
-- Mathlib/Order/Filter/Pointwise.lean
@[to_additive (attr := simp)]
theorem div_pure : f / pure b = f.map (· / b)
-- Mathlib/Probability/Kernel/Disintegration/Basic.lean
/-- A kernel `κCond` is a conditional kernel for a kernel `κ` if it disintegrates it in the sense
that `κ.fst ⊗ₖ κCond = κ`. -/
class IsCondKernel : Prop where
  protected disintegrate : κ.fst ⊗ₖ κCond = κ
-- Mathlib/CategoryTheory/Limits/Shapes/Equalizers.lean
/-- Helper function for constructing morphisms between equalizer forks.
-/
@[simps]
def Fork.mkHom {s t : Fork f g} (k : s.pt ⟶ t.pt) (w : k ≫ t.ι = s.ι) : s ⟶ t
-- Mathlib/Topology/UniformSpace/Equiv.lean
/-- Identity map as a uniform isomorphism. -/
@[simps! (config := .asFn) apply]
protected def refl (α : Type*) [UniformSpace α] : α ≃ᵤ α
-- Mathlib/Algebra/Ring/Equiv.lean
@[simp]
theorem symm_toNonUnitalRingHom_apply_toNonUnitalRingHom_apply (e : R ≃+* S) :
    ∀ x : R, e.symm.toNonUnitalRingHom (e.toNonUnitalRingHom x) = x
-- .lake/packages/lean4/src/lean/Init/Data/Option/Basic.lean
@[simp] theorem max_none_none [Max α] : max (none : Option α) none = none
-- Mathlib/Data/Sym/Sym2.lean
theorem isDiag_iff_mem_range_diag (z : Sym2 α) : IsDiag z ↔ z ∈ Set.range (@diag α)
-- Mathlib/Topology/MetricSpace/CauSeqFilter.lean
theorem CauSeq.cauchySeq (f : CauSeq β norm) : CauchySeq f
-- Mathlib/CategoryTheory/Monoidal/End.lean
@[reassoc (attr := simp)]
theorem μ_inv_hom_app (i j : M) (X : C) : (F.μIso i j).inv.app X ≫ (F.μ i j).app X = 𝟙 _
-- Mathlib/Order/WithBot.lean
theorem unbot'_lt_iff {a : WithBot α} {b c : α} (h : a = ⊥ → b < c) :
    a.unbot' b < c ↔ a < c
-- Mathlib/Topology/Bornology/Absorbs.lean
lemma Absorbs.sub {s₁ s₂ t₁ t₂ : Set E} (h₁ : Absorbs M s₁ t₁) (h₂ : Absorbs M s₂ t₂) :
    Absorbs M (s₁ - s₂) (t₁ - t₂)
-- Mathlib/SetTheory/Cardinal/Ordinal.lean
theorem mk_compl_eq_mk_compl_finite {α β : Type u} [Finite α] {s : Set α} {t : Set β}
    (h1 : #α = #β) (h : #s = #t) : #(sᶜ : Set α) = #(tᶜ : Set β)
-- .lake/packages/lean4/src/lean/Init/Data/Array/BasicAux.lean
private theorem List.size_toArrayAux (as : List α) (bs : Array α) : (as.toArrayAux bs).size = as.length + bs.size
-- Mathlib/Data/Sum/Basic.lean
@[simp]
theorem update_elim_inr [DecidableEq β] [DecidableEq (α ⊕ β)] {f : α → γ} {g : β → γ} {i : β}
    {x : γ} : update (Sum.elim f g) (inr i) x = Sum.elim f (update g i x)
-- Mathlib/Topology/MetricSpace/Bounded.lean
/-- If a function is continuous within a set `s` at every point of a compact set `k`, then it is
bounded on some open neighborhood of `k` in `s`. -/
theorem exists_isOpen_isBounded_image_inter_of_isCompact_of_forall_continuousWithinAt
    [TopologicalSpace β] {k s : Set β} {f : β → α} (hk : IsCompact k)
    (hf : ∀ x ∈ k, ContinuousWithinAt f s x) :
    ∃ t, k ⊆ t ∧ IsOpen t ∧ IsBounded (f '' (t ∩ s))
-- Mathlib/Topology/Algebra/InfiniteSum/NatInt.lean
@[to_additive]
theorem Multipliable.nat_mul_neg {f : ℤ → M} (hf : Multipliable f) :
    Multipliable fun n : ℕ ↦ f n * f (-n)
-- Mathlib/Analysis/Calculus/Taylor.lean
/-- If `f` is `n` times continuous differentiable on a set `s`, then the Taylor polynomial
  `taylorWithinEval f n s x₀ x` is continuous in `x₀`. -/
theorem continuousOn_taylorWithinEval {f : ℝ → E} {x : ℝ} {n : ℕ} {s : Set ℝ}
    (hs : UniqueDiffOn ℝ s) (hf : ContDiffOn ℝ n f s) :
    ContinuousOn (fun t => taylorWithinEval f n s t x) s
-- Mathlib/Topology/Algebra/Group/Basic.lean
@[to_additive]
theorem continuousInv_inf {t₁ t₂ : TopologicalSpace G} (h₁ : @ContinuousInv G t₁ _)
    (h₂ : @ContinuousInv G t₂ _) : @ContinuousInv G (t₁ ⊓ t₂) _
-- Mathlib/Algebra/Homology/Homotopy.lean
/-- a variant of `Homotopy.compRight` useful for dealing with homotopy equivalences. -/
@[simps!]
def compRightId {f : C ⟶ C} (h : Homotopy f (𝟙 C)) (g : C ⟶ D) : Homotopy (f ≫ g) g
-- Mathlib/Data/Matrix/Basis.lean
@[simp]
theorem mul_left_apply_of_ne (a b : n) (h : a ≠ i) (M : Matrix n n α) :
    (stdBasisMatrix i j c * M) a b = 0
-- .lake/packages/lean4/src/lean/Init/PropLemmas.lean
theorem forall₃_congr {p q : ∀ a b, γ a b → Prop} (h : ∀ a b c, p a b c ↔ q a b c) :
    (∀ a b c, p a b c) ↔ ∀ a b c, q a b c
-- Mathlib/Order/Disjoint.lean
@[simp]
theorem bot_codisjoint : Codisjoint ⊥ a ↔ a = ⊤
-- Mathlib/MeasureTheory/Constructions/Polish/EmbeddingReal.lean
/-- Any standard Borel space embeds measurably into the reals. -/
theorem exists_measurableEmbedding_real : ∃ f : α → ℝ, MeasurableEmbedding f
-- Mathlib/Analysis/Complex/Circle.lean
@[simp]
theorem normSq_eq_of_mem_circle (z : circle) : normSq z = 1
-- Mathlib/CategoryTheory/Monoidal/Braided/Basic.lean
@[reassoc]
theorem leftUnitor_monoidal (X₁ X₂ : C) :
    (λ_ X₁).hom ⊗ (λ_ X₂).hom =
      tensor_μ C (𝟙_ C, X₁) (𝟙_ C, X₂) ≫ ((λ_ (𝟙_ C)).hom ▷ (X₁ ⊗ X₂)) ≫ (λ_ (X₁ ⊗ X₂)).hom
-- Mathlib/MeasureTheory/Integral/Lebesgue.lean
theorem lintegral_add_compl (f : α → ℝ≥0∞) {A : Set α} (hA : MeasurableSet A) :
    ∫⁻ x in A, f x ∂μ + ∫⁻ x in Aᶜ, f x ∂μ = ∫⁻ x, f x ∂μ
-- Mathlib/Analysis/Fourier/AddCircle.lean
theorem fourier_eval_zero (n : ℤ) : fourier n (0 : AddCircle T) = 1
-- Mathlib/Topology/Algebra/ContinuousAffineMap.lean
@[norm_cast]
theorem coe_continuousMap_mk (f : P →ᵃ[R] Q) (h) : ((⟨f, h⟩ : P →ᴬ[R] Q) : C(P, Q)) = ⟨f, h⟩
-- .lake/packages/lean4/src/lean/Init/Data/Nat/Div.lean
theorem mod_le (x y : Nat) : x % y ≤ x
-- Mathlib/GroupTheory/HNNExtension.lean
@[simp]
theorem prod_smul (g : HNNExtension G A B φ) (w : NormalWord d) :
    (g • w).prod φ = g * w.prod φ
-- Mathlib/GroupTheory/OrderOfElement.lean
@[to_additive]
theorem orderOf_dvd_of_mem_zpowers (h : y ∈ Subgroup.zpowers x) : orderOf y ∣ orderOf x
-- Mathlib/Order/UpperLower/Basic.lean
@[norm_cast]
theorem coe_upperClosure (s : Set α) : ↑(upperClosure s) = ⋃ a ∈ s, Ici a
-- Mathlib/Analysis/BoxIntegral/Partition/Tagged.lean
@[simp]
theorem mem_biUnionTagged (π : Prepartition I) {πi : ∀ J, TaggedPrepartition J} :
    J ∈ π.biUnionTagged πi ↔ ∃ J' ∈ π, J ∈ πi J'
-- Mathlib/SetTheory/Ordinal/Arithmetic.lean
theorem not_injective_of_ordinal {α : Type u} (f : Ordinal.{u} → α) : ¬Injective f
-- Mathlib/Order/Filter/EventuallyConst.lean
lemma comp (h : EventuallyConst f l) (g : β → γ) : EventuallyConst (g ∘ f) l
-- Mathlib/Analysis/Calculus/Gradient/Basic.lean
theorem HasDerivAtFilter.hasGradientAtFilter (h : HasDerivAtFilter g g' u L') :
    HasGradientAtFilter g (starRingEnd 𝕜 g') u L'
-- .lake/packages/lean4/src/lean/Init/Data/Int/DivModLemmas.lean
@[simp] theorem fmod_one (a : Int) : a.fmod 1 = 0
-- Mathlib/Order/ModularLattice.lean
theorem IsModularLattice.sup_inf_sup_assoc : (x ⊔ z) ⊓ (y ⊔ z) = (x ⊔ z) ⊓ y ⊔ z
-- Mathlib/Analysis/Convex/Strict.lean
theorem StrictConvex.is_linear_image (hs : StrictConvex 𝕜 s) {f : E → F} (h : IsLinearMap 𝕜 f)
    (hf : IsOpenMap f) : StrictConvex 𝕜 (f '' s)
-- Mathlib/Algebra/Order/Ring/Abs.lean
@[simp] lemma one_lt_sq_iff_one_lt_abs (a : α) : 1 < a ^ 2 ↔ 1 < |a|
-- Mathlib/Data/Nat/PrimeFin.lean
@[simp] protected lemma Prime.primeFactors (hp : p.Prime) : p.primeFactors = {p}
-- Mathlib/MeasureTheory/Constructions/BorelSpace/Basic.lean
theorem borel_eq_generateFrom_of_subbasis {s : Set (Set α)} [t : TopologicalSpace α]
    [SecondCountableTopology α] (hs : t = .generateFrom s) : borel α = .generateFrom s
-- Mathlib/Analysis/InnerProductSpace/PiL2.lean
@[simp]
protected theorem toBasis_map {G : Type*} [NormedAddCommGroup G] [InnerProductSpace 𝕜 G]
    (b : OrthonormalBasis ι 𝕜 E) (L : E ≃ₗᵢ[𝕜] G) :
    (b.map L).toBasis = b.toBasis.map L.toLinearEquiv
-- Mathlib/Topology/FiberBundle/Basic.lean
theorem trivialization_mem_atlas : trivializationAt F E b ∈ trivializationAtlas F E
-- Mathlib/Order/Atoms.lean
lemma IsAtomic.exists_atom [OrderBot α] [Nontrivial α] [IsAtomic α] : ∃ a : α, IsAtom a
-- Mathlib/Order/Monotone/Monovary.lean
theorem monovaryOn_const_right (f : ι → α) (b : β) (s : Set ι) : MonovaryOn f (const ι b) s
-- Mathlib/NumberTheory/LSeries/HurwitzZetaOdd.lean
lemma sinKernel_neg (a : UnitAddCircle) (x : ℝ) :
    sinKernel (-a) x = -sinKernel a x
-- Mathlib/MeasureTheory/Measure/MeasureSpaceDef.lean
theorem aemeasurable_congr (h : f =ᵐ[μ] g) : AEMeasurable f μ ↔ AEMeasurable g μ
-- Mathlib/Analysis/BoxIntegral/Partition/Tagged.lean
@[simp]
theorem mem_single {J'} (hJ : J ≤ I) (h : x ∈ Box.Icc I) : J' ∈ single I J hJ x h ↔ J' = J
-- Mathlib/Data/List/Perm.lean
theorem perm_of_mem_permutations {l₁ l₂ : List α} (h : l₁ ∈ permutations l₂) : l₁ ~ l₂
-- Mathlib/CategoryTheory/Functor/KanExtension/Adjunction.lean
@[reassoc (attr := simp)]
lemma lanUnit_app_whiskerLeft_lanAdjunction_counit_app (G : D ⥤ H) :
    L.lanUnit.app (L ⋙ G) ≫ whiskerLeft L ((L.lanAdjunction H).counit.app G) = 𝟙 (L ⋙ G)
-- Mathlib/GroupTheory/MonoidLocalization/Basic.lean
@[to_additive]
theorem symm_comp_ofMulEquivOfLocalizations_apply {k : N ≃* P} (x) :
    k.symm ((f.ofMulEquivOfLocalizations k).toMap x) = f.toMap x
-- Mathlib/Analysis/Complex/Asymptotics.lean
@[simp, norm_cast]
theorem isTheta_ofReal_left {f : α → ℝ} {g : α → E} : (f · : α → ℂ) =Θ[l] g ↔ f =Θ[l] g
-- Mathlib/Probability/Distributions/Gaussian.lean
lemma gaussianReal_apply (μ : ℝ) {v : ℝ≥0} (hv : v ≠ 0) (s : Set ℝ) :
    gaussianReal μ v s = ∫⁻ x in s, gaussianPDF μ v x
-- Mathlib/FieldTheory/Perfect.lean
@[simp]
theorem rootsExpandPowEquivRoots_apply (n : ℕ) (x) :
    (rootsExpandPowEquivRoots p f n x : R) = x ^ p ^ n
-- Mathlib/Analysis/SpecialFunctions/Pow/NNReal.lean
theorem rpow_add' (x : ℝ≥0) {y z : ℝ} (h : y + z ≠ 0) : x ^ (y + z) = x ^ y * x ^ z
-- Mathlib/LinearAlgebra/FreeProduct/Basic.lean
/--A variant of `DirectSum.induction_on` that uses `DirectSum.lof` instead of `.of`-/
theorem induction_lon {R : Type*} [Semiring R] {ι: Type*} [DecidableEq ι]
    {M : ι → Type*} [(i: ι) → AddCommMonoid <| M i] [(i : ι) → Module R (M i)]
    {C: (⨁ i, M i) → Prop} (x : ⨁ i, M i)
    (H_zero : C 0)
    (H_basic : ∀ i (x : M i), C (lof R ι M i x))
    (H_plus : ∀ (x y : ⨁ i, M i), C x → C y → C (x + y)) : C x