ruc-ai4math/mathlib_handler_benchmark_410 huggingface dataset:
-- Mathlib/GroupTheory/FreeGroup/Basic.lean
@[to_additive (attr := simp)]
theorem inv_bind (f : α → FreeGroup β) (x : FreeGroup α) : x⁻¹ >>= f = (x >>= f)⁻¹
-- Mathlib/CategoryTheory/Limits/Shapes/Pullback/Iso.lean
@[simp]
theorem pushoutCoconeOfLeftIso_inr : (pushoutCoconeOfLeftIso f g).inr = 𝟙 _
-- Mathlib/Algebra/Star/Order.lean
theorem nonneg_iff [NonUnitalSemiring R] [PartialOrder R] [StarRing R] [StarOrderedRing R] {x : R} :
    0 ≤ x ↔ x ∈ AddSubmonoid.closure (Set.range fun s : R => star s * s)
-- Mathlib/Data/Seq/WSeq.lean
@[simp]
theorem destruct_cons (a : α) (s) : destruct (cons a s) = Computation.pure (some (a, s))
-- Mathlib/Order/Filter/Basic.lean
@[simp]
theorem comap_bot : comap m ⊥ = ⊥
-- Mathlib/GroupTheory/Coxeter/Basic.lean
/-- If `p : W → Prop` holds for all simple reflections, it holds for the identity, and it is
preserved under multiplication, then it holds for all elements of `W`. -/
theorem simple_induction {p : W → Prop} (w : W) (simple : ∀ i : B, p (s i)) (one : p 1)
    (mul : ∀ w w' : W, p w → p w' → p (w * w')) : p w
-- .lake/packages/lean4/src/lean/Init/Data/Fin/Lemmas.lean
@[simp] protected theorem lt_irrefl (a : Fin n) : ¬ a < a
-- Mathlib/LinearAlgebra/Matrix/Trace.lean
theorem _root_.AddMonoidHom.map_trace [AddCommMonoid S] (f : R →+ S) (A : Matrix n n R) :
    f (trace A)  = trace (f.mapMatrix A)
-- Mathlib/RingTheory/Ideal/QuotientOperations.lean
/-- If we take `J = I.comap f` then `QuotientMap` is injective automatically. -/
theorem quotientMap_injective {I : Ideal S} {f : R →+* S} :
    Function.Injective (quotientMap I f le_rfl)
-- Mathlib/Algebra/Homology/ComplexShape.lean
/-- A `c : ComplexShape ι` describes the shape of a chain complex,
with chain groups indexed by `ι`.
Typically `ι` will be `ℕ`, `ℤ`, or `Fin n`.

There is a relation `Rel : ι → ι → Prop`,
and we will only allow a non-zero differential from `i` to `j` when `Rel i j`.

There are axioms which imply `{ j // c.Rel i j }` and `{ i // c.Rel i j }` are subsingletons.
This means that the shape consists of some union of lines, rays, intervals, and circles.

Below we define `c.next` and `c.prev` which provide these related elements.
-/
@[ext]
structure ComplexShape (ι : Type*) where
  /-- Nonzero differentials `X i ⟶ X j` shall be allowed
    on homological complexes when `Rel i j` holds. -/
  Rel : ι → ι → Prop
  /-- There is at most one nonzero differential from `X i`. -/
  next_eq : ∀ {i j j'}, Rel i j → Rel i j' → j = j'
  /-- There is at most one nonzero differential to `X j`. -/
  prev_eq : ∀ {i i' j}, Rel i j → Rel i' j → i = i'
-- Mathlib/Topology/MetricSpace/Dilation.lean
theorem one_def : (1 : α →ᵈ α) = Dilation.id α
-- Mathlib/Algebra/Homology/ShortComplex/ShortExact.lean
lemma ShortExact.map (h : S.ShortExact) (F : C ⥤ D)
    [F.PreservesZeroMorphisms] [F.PreservesLeftHomologyOf S]
    [F.PreservesRightHomologyOf S] [Mono (F.map S.f)] [Epi (F.map S.g)] :
    (S.map F).ShortExact
-- Mathlib/Algebra/DirectSum/Ring.lean
@[simp]
theorem toSemiring_coe_addMonoidHom (f : ∀ i, A i →+ R) (hone hmul) :
    (toSemiring f hone hmul : (⨁ i, A i) →+ R) = toAddMonoid f
-- Mathlib/SetTheory/Game/PGame.lean
@[simp]
protected theorem zero_lt_one : (0 : PGame) < 1
-- Mathlib/Algebra/Order/Group/Abs.lean
theorem eq_of_abs_sub_nonpos (h : |a - b| ≤ 0) : a = b
-- Mathlib/Topology/Sheaves/Presheaf.lean
@[ext]
lemma ext {X : TopCat} {P Q : Presheaf C X} {f g : P ⟶ Q}
    (w : ∀ U : Opens X, f.app (op U) = g.app (op U)) :
    f = g
-- Mathlib/Analysis/Convex/Quasiconvex.lean
theorem Monotone.quasilinearOn (hf : Monotone f) : QuasilinearOn 𝕜 univ f
-- Mathlib/Logic/Equiv/Defs.lean
@[simp] theorem coe_fn_mk (f : α → β) (g l r) : (Equiv.mk f g l r : α → β) = f
-- Mathlib/Algebra/BigOperators/Ring.lean
protected lemma sum_div (hf : ∀ i ∈ s, n ∣ f i) : (∑ i ∈ s, f i) / n = ∑ i ∈ s, f i / n
-- Mathlib/Data/Matroid/Map.lean
@[simp] lemma mapEmbedding_ground_eq (M : Matroid α) (f : α ↪ β) :
    (M.mapEmbedding f).E = f '' M.E
-- Mathlib/Order/Interval/Finset/Fin.lean
@[simp]
theorem card_Ioo : (Ioo a b).card = b - a - 1
-- Mathlib/NumberTheory/PythagoreanTriples.lean
theorem normalize : PythagoreanTriple (x / Int.gcd x y) (y / Int.gcd x y) (z / Int.gcd x y)
-- Mathlib/Order/RelClasses.lean
/-- A well-founded relation. Not to be confused with `IsWellOrder`. -/
@[mk_iff] class IsWellFounded (α : Type u) (r : α → α → Prop) : Prop where
  /-- The relation is `WellFounded`, as a proposition. -/
  wf : WellFounded r
-- Mathlib/Data/Finsupp/Basic.lean
@[simp]
theorem filter_single_of_pos {a : α} {b : M} (h : p a) : (single a b).filter p = single a b
-- Mathlib/Order/IsWellOrderLimitElement.lean
lemma self_le_wellOrderSucc (a : α) : a ≤ wellOrderSucc a
-- Mathlib/Data/Vector3.lean
@[simp]
theorem append_nil (w : Vector3 α n) : [] +-+ w = w
-- Mathlib/GroupTheory/Index.lean
@[to_additive]
theorem relindex_dvd_index_of_le (h : H ≤ K) : H.relindex K ∣ H.index
-- Mathlib/GroupTheory/FreeAbelianGroup.lean
@[simp]
protected theorem map_neg (f : α → β) (x : FreeAbelianGroup α) : f <$> (-x) = -f <$> x
-- Mathlib/Algebra/Polynomial/AlgebraMap.lean
theorem aeval_comp {A : Type*} [Semiring A] [Algebra R A] (x : A) :
    aeval x (p.comp q) = aeval (aeval x q) p
-- Mathlib/Algebra/EuclideanDomain/Basic.lean
theorem mul_div_mul_cancel {a b c : R} (ha : a ≠ 0) (hcb : c ∣ b) : a * b / (a * c) = b / c
-- Mathlib/Data/Finset/Sort.lean
/-- The bijection `orderEmbOfFin s h` sends `0` to the minimum of `s`. -/
theorem orderEmbOfFin_zero {s : Finset α} {k : ℕ} (h : s.card = k) (hz : 0 < k) :
    orderEmbOfFin s h ⟨0, hz⟩ = s.min' (card_pos.mp (h.symm ▸ hz))
-- Mathlib/Algebra/Lie/Weights/Chain.lean
lemma weightSpace_chainTopCoeff_add_one_zsmul_add :
    weightSpace M ((chainTopCoeff α β + 1 : ℤ) • α + β : L → R) = ⊥
-- Mathlib/Order/Interval/Set/Basic.lean
@[gcongr]
theorem Ico_subset_Ico_left (h : a₁ ≤ a₂) : Ico a₂ b ⊆ Ico a₁ b
-- Mathlib/Order/UpperLower/Basic.lean
theorem mem_iInf₂_iff {f : ∀ i, κ i → UpperSet α} : (a ∈ ⨅ (i) (j), f i j) ↔ ∃ i j, a ∈ f i j
-- Mathlib/MeasureTheory/Function/StronglyMeasurable/Basic.lean
theorem congr (hf : AEStronglyMeasurable f μ) (h : f =ᵐ[μ] g) : AEStronglyMeasurable g μ
-- Mathlib/Analysis/InnerProductSpace/TwoDim.lean
/-- The rotation by 90 degrees on an oriented real inner product space of dimension 2 can be
evaluated in terms of a complex-number representation of the space. -/
theorem rightAngleRotation_map_complex (f : E ≃ₗᵢ[ℝ] ℂ)
    (hf : Orientation.map (Fin 2) f.toLinearEquiv o = Complex.orientation) (x : E) :
    f (J x) = I * f x
-- Mathlib/Analysis/Convex/Exposed.lean
@[simp]
theorem exposedPoints_empty : (∅ : Set E).exposedPoints 𝕜 = ∅
-- Mathlib/CategoryTheory/Monoidal/OfHasFiniteProducts.lean
@[reassoc] theorem associator_hom_fst (X Y Z : C) :
    (α_ X Y Z).hom ≫ prod.fst = prod.fst ≫ prod.fst
-- Mathlib/Algebra/BigOperators/Group/Multiset.lean
@[to_additive]
theorem prod_induction (p : α → Prop) (s : Multiset α) (p_mul : ∀ a b, p a → p b → p (a * b))
    (p_one : p 1) (p_s : ∀ a ∈ s, p a) : p s.prod
-- Mathlib/GroupTheory/Congruence/Basic.lean
/-- Multiplicative congruence relations preserve inversion. -/
@[to_additive "Additive congruence relations preserve negation."]
protected theorem inv {x y} (h : c x y) : c x⁻¹ y⁻¹
-- Mathlib/NumberTheory/Wilson.lean
/-- **Wilson's Lemma**: the product of `1`, ..., `p-1` is `-1` modulo `p`. -/
@[simp]
theorem wilsons_lemma : ((p - 1)! : ZMod p) = -1
-- Mathlib/SetTheory/Cardinal/Basic.lean
theorem mk_le_of_surjective {α β : Type u} {f : α → β} (hf : Surjective f) : #β ≤ #α
-- Mathlib/Topology/MetricSpace/HausdorffDimension.lean
/-- If `f : X → Y` is Hölder continuous in a neighborhood of every point `x : X` with the same
positive exponent `r` but possibly different coefficients, then the Hausdorff dimension of the range
of `f` is at most the Hausdorff dimension of `X` divided by `r`. -/
theorem dimH_range_le_of_locally_holder_on [SecondCountableTopology X] {r : ℝ≥0} {f : X → Y}
    (hr : 0 < r) (hf : ∀ x : X, ∃ C : ℝ≥0, ∃ s ∈ 𝓝 x, HolderOnWith C r f s) :
    dimH (range f) ≤ dimH (univ : Set X) / r
-- Mathlib/RingTheory/Polynomial/Hermite/Basic.lean
theorem coeff_hermite_of_even_add {n k : ℕ} (hnk : Even (n + k)) :
    coeff (hermite n) k = (-1) ^ ((n - k) / 2) * (n - k - 1)‼ * Nat.choose n k
-- Mathlib/RingTheory/Perfection.lean
theorem coeff_frobenius (f : Ring.Perfection R p) (n : ℕ) :
    coeff R p (n + 1) (frobenius _ p f) = coeff R p n f
-- Mathlib/Data/Fin/Tuple/Basic.lean
/-- Updating a tuple and adding an element at the end commute. -/
@[simp]
theorem snoc_update : snoc (update p i y) x = update (snoc p x) (castSucc i) y
-- Mathlib/AlgebraicGeometry/EllipticCurve/Jacobian.lean
lemma isUnit_addU_of_Y_ne {P Q : Fin 3 → F} (hPz : P z ≠ 0) (hQz : Q z ≠ 0)
    (hy : P y * Q z ^ 3 ≠ Q y * P z ^ 3) : IsUnit (addU P Q)
-- Mathlib/Data/Fin/Basic.lean
/-- While in many cases `Fin.cast` is better than `Equiv.cast`/`cast`, sometimes we want to apply
a generic theorem about `cast`. -/
theorem cast_eq_cast (h : n = m) : (cast h : Fin n → Fin m) = _root_.cast (h ▸ rfl)
-- Mathlib/Data/Matroid/Closure.lean
lemma subset_closure (M : Matroid α) (X : Set α) (hX : X ⊆ M.E := by aesop_mat) :
    X ⊆ M.closure X
-- Mathlib/Data/Real/Sign.lean
@[simp]
theorem inv_sign (r : ℝ) : (sign r)⁻¹ = sign r
-- Mathlib/CategoryTheory/IsConnected.lean
/-- If `J` is connected, any functor to a discrete category is constant on objects.
The converse is given in `IsConnected.of_any_functor_const_on_obj`.
-/
theorem any_functor_const_on_obj [IsPreconnected J] {α : Type u₂} (F : J ⥤ Discrete α) (j j' : J) :
    F.obj j = F.obj j'
-- Mathlib/Data/List/Dedup.lean
theorem dedup_map_of_injective [DecidableEq β] {f : α → β} (hf : Function.Injective f)
    (xs : List α) :
    (xs.map f).dedup = xs.dedup.map f
-- Mathlib/Data/Set/Function.lean
theorem mapsTo (h : RightInvOn f' f t) (hf : SurjOn f' t s) : MapsTo f s t
-- Mathlib/Topology/UniformSpace/Basic.lean
theorem lift_nhds_left {x : α} {g : Set α → Filter β} (hg : Monotone g) :
    (𝓝 x).lift g = (𝓤 α).lift fun s : Set (α × α) => g (ball x s)
-- Mathlib/Algebra/Star/NonUnitalSubalgebra.lean
theorem toNonUnitalSubring_injective {R : Type u} {A : Type v} [CommRing R] [NonUnitalRing A]
    [Module R A] [Star A] :
    Function.Injective (toNonUnitalSubring : NonUnitalStarSubalgebra R A → NonUnitalSubring A)
-- Mathlib/Order/Hom/Lattice.lean
@[simp] lemma coe_toSupHom (f : LatticeHom α β) : ⇑f.toSupHom = f
-- Mathlib/Order/Monotone/Monovary.lean
theorem AntivaryOn.dual_left : AntivaryOn f g s → MonovaryOn (toDual ∘ f) g s
-- Mathlib/Topology/EMetricSpace/Basic.lean
theorem mem_ball_comm : x ∈ ball y ε ↔ y ∈ ball x ε
-- Mathlib/Computability/TuringMachine.lean
theorem trCfg_init (k) (L : List (Γ k)) : TrCfg (TM2.init k L) (TM1.init (trInit k L) : Cfg₂₁)
-- Mathlib/Data/Matrix/Basic.lean
@[simp]
theorem mapMatrix_id : (AlgHom.id R α).mapMatrix = AlgHom.id R (Matrix m m α)
-- Mathlib/LinearAlgebra/QuadraticForm/QuadraticModuleCat.lean
@[simp] theorem toIsometryEquiv_trans (e : X ≅ Y) (f : Y ≅ Z) :
    toIsometryEquiv (e ≪≫ f) = e.toIsometryEquiv.trans f.toIsometryEquiv
-- Mathlib/CategoryTheory/Limits/VanKampen.lean
theorem isVanKampenColimit_of_evaluation [HasPullbacks D] [HasColimitsOfShape J D] (F : J ⥤ C ⥤ D)
    (c : Cocone F) (hc : ∀ x : C, IsVanKampenColimit (((evaluation C D).obj x).mapCocone c)) :
    IsVanKampenColimit c
-- Mathlib/Order/Bounds/Basic.lean
theorem isLUB_Ioc (h : a < b) : IsLUB (Ioc a b) b
-- Mathlib/Data/Finset/Basic.lean
theorem union_right_comm (s t u : Finset α) : s ∪ t ∪ u = s ∪ u ∪ t
-- Mathlib/Analysis/RCLike/Basic.lean
@[rclike_simps]
theorem normSq_one : normSq (1 : K) = 1
-- Mathlib/Topology/Compactness/Compact.lean
lemma Set.Infinite.exists_accPt_cofinite_inf_principal [CompactSpace X] (hs : s.Infinite) :
    ∃ x, AccPt x (cofinite ⊓ 𝓟 s)
-- Mathlib/Algebra/Polynomial/Eval.lean
theorem eval₂_list_sum (l : List R[X]) (x : S) : eval₂ f x l.sum = (l.map (eval₂ f x)).sum
-- Mathlib/Geometry/RingedSpace/SheafedSpace.lean
@[simp]
theorem comp_base {X Y Z : SheafedSpace C} (f : X ⟶ Y) (g : Y ⟶ Z) :
    (f ≫ g).base = f.base ≫ g.base
-- Mathlib/GroupTheory/Complement.lean
theorem transferFunction_apply (q : G ⧸ H) :
    transferFunction H g q =
      g ^ (cast (quotientEquivSigmaZMod H g q).2 : ℤ) *
        (quotientEquivSigmaZMod H g q).1.out'.out'
-- Mathlib/Algebra/QuaternionBasis.lean
/-- Since `k` is redundant, it is not necessary to show `q₁.k = q₂.k` when showing `q₁ = q₂`. -/
@[ext]
protected theorem ext ⦃q₁ q₂ : Basis A c₁ c₂⦄ (hi : q₁.i = q₂.i) (hj : q₁.j = q₂.j) : q₁ = q₂
-- Mathlib/Topology/Instances/AddCircle.lean
/-- The quotient map `𝕜 → AddCircle p` as a partial homeomorphism. -/
@[simps] def partialHomeomorphCoe [DiscreteTopology (zmultiples p)] :
    PartialHomeomorph 𝕜 (AddCircle p)
-- Mathlib/Data/Nat/PartENat.lean
theorem eq_top_iff_forall_lt (x : PartENat) : x = ⊤ ↔ ∀ n : ℕ, (n : PartENat) < x
-- Mathlib/MeasureTheory/Function/LpSeminorm/CompareExp.lean
theorem eLpNorm_smul_le_eLpNorm_top_mul_eLpNorm (p : ℝ≥0∞) (hf : AEStronglyMeasurable f μ)
    (φ : α → 𝕜) : eLpNorm (φ • f) p μ ≤ eLpNorm φ ∞ μ * eLpNorm f p μ
-- Mathlib/RingTheory/Presentation.lean
/-- If `P` is a presentation of `S` over `R` and `T` is an `R`-algebra, we
obtain a natural presentation of `T ⊗[R] S` over `T`. -/
@[simps relation, simps (config := .lemmasOnly) rels]
noncomputable
def baseChange : Presentation T (T ⊗[R] S)
-- Mathlib/Algebra/Ring/Parity.lean
@[simp] lemma odd_add_self_one' : Odd (a + (a + 1))
-- Mathlib/Data/Nat/Size.lean
theorem size_le {m n : ℕ} : size m ≤ n ↔ m < 2 ^ n
-- Mathlib/Data/Set/NAry.lean
lemma image2_inter_right (hf : Injective2 f) :
    image2 f s (t ∩ t') = image2 f s t ∩ image2 f s t'
-- Mathlib/Data/Set/Pointwise/Basic.lean
@[to_additive (attr := simp)]
theorem image2_div : image2 Div.div s t = s / t
-- Mathlib/Topology/Connected/TotallyDisconnected.lean
theorem isTotallySeparated_singleton {x} : IsTotallySeparated ({x} : Set α)
-- Mathlib/Logic/Equiv/Fin.lean
theorem finSuccEquiv'_last_apply {i : Fin (n + 1)} (h : i ≠ Fin.last n) :
    finSuccEquiv' (Fin.last n) i = Fin.castLT i (Fin.val_lt_last h)
-- Mathlib/Topology/MetricSpace/MetricSeparated.lean
theorem union_left {s'} (h : IsMetricSeparated s t) (h' : IsMetricSeparated s' t) :
    IsMetricSeparated (s ∪ s') t
-- Mathlib/Analysis/NormedSpace/AffineIsometry.lean
@[simp]
theorem map_vadd (p : P) (v : V) : f (v +ᵥ p) = f.linearIsometry v +ᵥ f p
-- Mathlib/Topology/Algebra/Module/StrongTopology.lean
protected theorem hasBasis_nhds_zero [TopologicalSpace F] [TopologicalAddGroup F] :
    (𝓝 (0 : E →SL[σ] F)).HasBasis
      (fun SV : Set E × Set F => Bornology.IsVonNBounded 𝕜₁ SV.1 ∧ SV.2 ∈ (𝓝 0 : Filter F))
      fun SV => { f : E →SL[σ] F | ∀ x ∈ SV.1, f x ∈ SV.2 }
-- Mathlib/Order/Interval/Set/Basic.lean
theorem Ioc_subset_Icc_self : Ioc a b ⊆ Icc a b
-- Mathlib/Combinatorics/Young/SemistandardTableau.lean
theorem row_weak {μ : YoungDiagram} (T : SemistandardYoungTableau μ) {i j1 j2 : ℕ} (hj : j1 < j2)
    (hcell : (i, j2) ∈ μ) : T i j1 ≤ T i j2
-- Mathlib/NumberTheory/ModularForms/SlashActions.lean
theorem mul_slash_subgroup (k1 k2 : ℤ) (Γ : Subgroup SL(2, ℤ)) (A : Γ) (f g : ℍ → ℂ) :
    (f * g) ∣[k1 + k2] A = f ∣[k1] A * g ∣[k2] A
-- Mathlib/Order/Hom/CompleteLattice.lean
@[simp]
theorem coe_bot : ⇑(⊥ : sSupHom α β) = ⊥
-- Mathlib/Topology/Algebra/InfiniteSum/Basic.lean
@[to_additive]
protected theorem Set.Finite.multipliable {s : Set β} (hs : s.Finite) (f : β → α) :
    Multipliable (f ∘ (↑) : s → α)
-- Mathlib/LinearAlgebra/Alternating/Basic.lean
@[simp]
theorem map_add [DecidableEq ι] (i : ι) (x y : M) :
    f (update v i (x + y)) = f (update v i x) + f (update v i y)
-- Mathlib/SetTheory/Cardinal/ENat.lean
lemma toENatAux_eq_zero {x : Cardinal} : toENatAux x = 0 ↔ x = 0
-- Mathlib/Data/Set/Sigma.lean
theorem preimage_image_sigmaMk_of_ne (h : i ≠ j) (s : Set (α j)) :
    Sigma.mk i ⁻¹' (Sigma.mk j '' s) = ∅
-- Mathlib/Data/Finsupp/Fin.lean
theorem cons_ne_zero_of_left (h : y ≠ 0) : cons y s ≠ 0
-- Mathlib/CategoryTheory/Localization/Predicate.lean
theorem whiskeringLeftFunctor'_eq :
    whiskeringLeftFunctor' L W E = Localization.whiskeringLeftFunctor L W E ⋙ inducedFunctor _
-- Mathlib/Data/Matroid/Map.lean
lemma comap_indep_iff_of_injOn (hf : InjOn f (f ⁻¹' N.E)) :
    (N.comap f).Indep I ↔ N.Indep (f '' I)
-- Mathlib/Tactic/Qify.lean
@[qify_simps] lemma intCast_eq (a b : ℤ) : a = b ↔ (a : ℚ) = (b : ℚ)
-- Mathlib/Algebra/Homology/HomotopyCategory/HomComplex.lean
@[simp]
lemma map_comp {n₁ n₂ n₁₂ : ℤ} (z₁ : Cochain F G n₁) (z₂ : Cochain G K n₂) (h : n₁ + n₂ = n₁₂)
    (Φ : C ⥤ D) [Φ.Additive] :
    (Cochain.comp z₁ z₂ h).map Φ = Cochain.comp (z₁.map Φ) (z₂.map Φ) h
-- Mathlib/Algebra/Ring/NegOnePow.lean
@[simp]
theorem abs_negOnePow (n : ℤ) : |(n.negOnePow : ℤ)| = 1
-- Mathlib/MeasureTheory/OuterMeasure/Caratheodory.lean
theorem isCaratheodory_sum {s : ℕ → Set α} (h : ∀ i, IsCaratheodory m (s i))
    (hd : Pairwise (Disjoint on s)) {t : Set α} :
    ∀ {n}, (∑ i ∈ Finset.range n, m (t ∩ s i)) = m (t ∩ ⋃ i < n, s i)
-- Mathlib/Analysis/Normed/Group/Lemmas.lean
theorem eventually_nnnorm_sub_lt (x₀ : E) {ε : ℝ≥0} (ε_pos : 0 < ε) :
    ∀ᶠ x in 𝓝 x₀, ‖x - x₀‖₊ < ε
-- Mathlib/Algebra/TrivSqZeroExt.lean
@[simp]
theorem inr_add [AddZeroClass R] [AddZeroClass M] (m₁ m₂ : M) :
    (inr (m₁ + m₂) : tsze R M) = inr m₁ + inr m₂
-- Mathlib/Geometry/RingedSpace/OpenImmersion.lean
@[elementwise, simp]
theorem ofRestrict_invApp {C : Type*} [Category C] (X : SheafedSpace C) {Y : TopCat}
    {f : Y ⟶ TopCat.of X.carrier} (h : OpenEmbedding f) (U : Opens (X.restrict h).carrier) :
    (SheafedSpace.IsOpenImmersion.ofRestrict X h).invApp U = 𝟙 _
-- Mathlib/Order/InitialSeg.lean
@[simp]
theorem trans_apply (f : r ≼i s) (g : s ≼i t) (a : α) : (f.trans g) a = g (f a)
-- Mathlib/Analysis/Normed/Lp/lpSpace.lean
@[simp]
theorem infty_coeFn_pow (f : lp B ∞) (n : ℕ) : ⇑(f ^ n) = (⇑f) ^ n
-- Mathlib/Data/List/Nodup.lean
protected theorem Nodup.concat (h : a ∉ l) (h' : l.Nodup) : (l.concat a).Nodup
-- Mathlib/NumberTheory/Padics/PadicIntegers.lean
@[simp]
theorem padic_norm_e_of_padicInt (z : ℤ_[p]) : ‖(z : ℚ_[p])‖ = ‖z‖
-- Mathlib/Algebra/Module/Torsion.lean
@[simp]
theorem IsTorsionBy.mk_smul (hM : IsTorsionBy R M r) (b : R) (x : M) :
    haveI := hM.hasSMul
    Ideal.Quotient.mk (Ideal.span {r}) b • x = b • x
-- Mathlib/Data/Seq/Seq.lean
@[simp]
theorem get?_cons_zero (a : α) (s : Seq α) : (cons a s).get? 0 = some a
-- Mathlib/Algebra/Category/Semigrp/Basic.lean
@[to_additive (attr := simp)]
lemma mulEquiv_coe_eq {X Y : Type _} [Semigroup X] [Semigroup Y] (e : X ≃* Y) :
    (@DFunLike.coe (Semigrp.of X ⟶ Semigrp.of Y) _ (fun _ => (forget Semigrp).obj _)
      ConcreteCategory.instFunLike (e : X →ₙ* Y) : X → Y) = ↑e
-- Mathlib/RingTheory/Unramified/Basic.lean
theorem localization_map [FormallyUnramified R S] :
    FormallyUnramified Rₘ Sₘ
-- Mathlib/Data/List/OfFn.lean
/-- The length of a list converted from a function is the size of the domain. -/
@[simp]
theorem length_ofFn {n} (f : Fin n → α) : length (ofFn f) = n
-- Mathlib/Algebra/MvPolynomial/Basic.lean
@[simp]
theorem coeff_zero_one : coeff 0 (1 : MvPolynomial σ R) = 1
-- Mathlib/Topology/Instances/NNReal.lean
@[simp]
theorem comap_coe_atTop : comap toReal atTop = atTop
-- Mathlib/Geometry/Manifold/Diffeomorph.lean
@[simp]
theorem contMDiffOn_diffeomorph_comp_iff {m} (h : M ≃ₘ^n⟮I, J⟯ N) {f : M' → M} (hm : m ≤ n) {s} :
    ContMDiffOn I' J m (h ∘ f) s ↔ ContMDiffOn I' I m f s
-- Mathlib/Analysis/SpecialFunctions/Log/Basic.lean
theorem isLittleO_const_log_atTop {c : ℝ} : (fun _ => c) =o[atTop] log
-- Mathlib/Topology/Algebra/Module/Multilinear/Basic.lean
/-- If `f` is continuous multilinear, then `f (Σ_{j₁} g₁ j₁, ..., Σ_{jₙ} gₙ jₙ)` is the sum of
`f (g₁ (r 1), ..., gₙ (r n))` where `r` ranges over all functions `r`. This follows from
multilinearity by expanding successively with respect to each coordinate. -/
theorem map_sum [DecidableEq ι] [∀ i, Fintype (α i)] :
    (f fun i => ∑ j, g i j) = ∑ r : ∀ i, α i, f fun i => g i (r i)
-- Mathlib/Dynamics/BirkhoffSum/NormedSpace.lean
/-- The Birkhoff averages of a function `g` over the orbit of a fixed point `x` of `f`
tend to `g x` as `N → ∞`. In fact, they are equal to `g x` for all `N ≠ 0`,
see `Function.IsFixedPt.birkhoffAverage_eq`.

TODO: add a version for a periodic orbit. -/
theorem Function.IsFixedPt.tendsto_birkhoffAverage
    (R : Type*) [DivisionSemiring R] [CharZero R]
    [AddCommMonoid E] [TopologicalSpace E] [Module R E]
    {f : α → α} {x : α} (h : f.IsFixedPt x) (g : α → E) :
    Tendsto (birkhoffAverage R f g · x) atTop (𝓝 (g x))
-- Mathlib/Topology/Algebra/InfiniteSum/Basic.lean
@[to_additive (attr := simp)]
theorem hasProd_subtype_mulSupport : HasProd (f ∘ (↑) : mulSupport f → α) a ↔ HasProd f a
-- Mathlib/Logic/Basic.lean
@[deprecated id (since := "2024-03-23")]
theorem ball_of_forall (h : ∀ x, p x) (x) : p x
-- Mathlib/Data/Nat/Prime/Basic.lean
/-- Euclid's theorem on the **infinitude of primes**.
Here given in the form: for every `n`, there exists a prime number `p ≥ n`. -/
theorem exists_infinite_primes (n : ℕ) : ∃ p, n ≤ p ∧ Prime p
-- Mathlib/Data/Complex/Module.lean
@[simp]
theorem conjAe_coe : ⇑conjAe = conj
-- Mathlib/Algebra/Polynomial/EraseLead.lean
/-- Let `φ : R[x] → S[x]` be an additive map, `k : ℕ` a bound, and `fu : ℕ → ℕ` a
"sufficiently monotone" map.  Assume also that
* `φ` maps to `0` all monomials of degree less than `k`,
* `φ` maps each monomial `m` in `R[x]` to a polynomial `φ m` of degree `fu (deg m)`.
Then, `φ` maps each polynomial `p` in `R[x]` to a polynomial of degree `fu (deg p)`. -/
theorem mono_map_natDegree_eq {S F : Type*} [Semiring S]
    [FunLike F R[X] S[X]] [AddMonoidHomClass F R[X] S[X]] {φ : F}
    {p : R[X]} (k : ℕ) (fu : ℕ → ℕ) (fu0 : ∀ {n}, n ≤ k → fu n = 0)
    (fc : ∀ {n m}, k ≤ n → n < m → fu n < fu m) (φ_k : ∀ {f : R[X]}, f.natDegree < k → φ f = 0)
    (φ_mon_nat : ∀ n c, c ≠ 0 → (φ (monomial n c)).natDegree = fu n) :
    (φ p).natDegree = fu p.natDegree
-- Mathlib/Algebra/Order/Ring/Unbundled/Basic.lean
theorem min_mul_of_nonneg [MulPosMono α]
    (a b : α) (hc : 0 ≤ c) : min a b * c = min (a * c) (b * c)
-- Mathlib/Algebra/MvPolynomial/Basic.lean
theorem C_pow (a : R) (n : ℕ) : (C (a ^ n) : MvPolynomial σ R) = C a ^ n
-- Mathlib/LinearAlgebra/CliffordAlgebra/Star.lean
@[simp]
theorem star_ι (m : M) : star (ι Q m) = -ι Q m
-- Mathlib/MeasureTheory/Measure/Count.lean
@[simp]
theorem count_apply_lt_top [MeasurableSingletonClass α] : count s < ∞ ↔ s.Finite
-- Mathlib/RingTheory/Ideal/Basic.lean
theorem ne_top_iff_one : I ≠ ⊤ ↔ (1 : α) ∉ I
-- Mathlib/Algebra/Order/ToIntervalMod.lean
theorem toIcoMod_eq_toIcoMod : toIcoMod hp a b = toIcoMod hp a c ↔ ∃ n : ℤ, c - b = n • p
-- Mathlib/Data/Matrix/Basic.lean
theorem map_dotProduct [NonAssocSemiring R] [NonAssocSemiring S] (f : R →+* S) (v w : n → R) :
    f (v ⬝ᵥ w) = f ∘ v ⬝ᵥ f ∘ w
-- Mathlib/MeasureTheory/Function/LpSeminorm/Basic.lean
theorem zero_memℒp : Memℒp (0 : α → E) p μ
-- Mathlib/Topology/Order/LocalExtr.lean
theorem IsMaxOn.localize (hf : IsMaxOn f s a) : IsLocalMaxOn f s a
-- Mathlib/Order/BooleanGenerators.lean
lemma eq_atoms_of_sSup_eq_top (hS : BooleanGenerators S) (h : sSup S = ⊤) :
    S = {a : α | IsAtom a}
-- Mathlib/Order/Filter/Basic.lean
@[simp] theorem eventually_all_finset {ι} (I : Finset ι) {l} {p : ι → α → Prop} :
    (∀ᶠ x in l, ∀ i ∈ I, p i x) ↔ ∀ i ∈ I, ∀ᶠ x in l, p i x
-- Mathlib/Dynamics/Ergodic/Ergodic.lean
theorem ae_empty_or_univ_of_preimage_ae_le (hf : Ergodic f μ) (hs : MeasurableSet s)
    (hs' : f ⁻¹' s ≤ᵐ[μ] s) : s =ᵐ[μ] (∅ : Set α) ∨ s =ᵐ[μ] univ
-- .lake/packages/lean4/src/lean/Init/PropLemmas.lean
theorem not_and_of_not_left (b : Prop) : ¬a → ¬(a ∧ b)
-- Mathlib/MeasureTheory/Covering/DensityTheorem.lean
/-- In the Vitali family `IsUnifLocDoublingMeasure.vitaliFamily K`, the sets based at `x`
contain all balls `closedBall y r` when `dist x y ≤ K * r`. -/
theorem closedBall_mem_vitaliFamily_of_dist_le_mul {K : ℝ} {x y : α} {r : ℝ} (h : dist x y ≤ K * r)
    (rpos : 0 < r) : closedBall y r ∈ (vitaliFamily μ K).setsAt x
-- Mathlib/Analysis/LocallyConvex/AbsConvex.lean
theorem gaugeSeminormFamily_ball (s : AbsConvexOpenSets 𝕜 E) :
    (gaugeSeminormFamily 𝕜 E s).ball 0 1 = (s : Set E)