ruc-ai4math/mathlib_handler_benchmark_410 huggingface dataset:
-- Mathlib/Dynamics/PeriodicPts.lean
@[to_additive (attr := simp)]
theorem zpow_add_period_smul (i : ℤ) (g : G) (a : α) :
    g ^ (i + period g a) • a = g ^ i • a
-- Mathlib/Data/Finset/Card.lean
/-- A `Finset` of a subsingleton type has cardinality at most one. -/
theorem card_le_one_of_subsingleton [Subsingleton α] (s : Finset α) : s.card ≤ 1
-- Mathlib/Data/Set/Function.lean
theorem MapsTo.restrict_commutes (f : α → β) (s : Set α) (t : Set β) (h : MapsTo f s t) :
    Subtype.val ∘ h.restrict f s t = f ∘ Subtype.val
-- Mathlib/CategoryTheory/Elements.lean
/-- Constructor for morphisms in the category of elements of a functor to types. -/
@[simps]
def homMk {F : C ⥤ Type w} (x y : F.Elements) (f : x.1 ⟶ y.1) (hf : F.map f x.snd = y.snd) :
    x ⟶ y
-- Mathlib/Topology/Sets/Opens.lean
theorem not_nonempty_iff_eq_bot (U : Opens α) : ¬Set.Nonempty (U : Set α) ↔ U = ⊥
-- Mathlib/Analysis/Convex/Basic.lean
theorem Convex.starConvex_iff (hs : Convex 𝕜 s) (h : s.Nonempty) : StarConvex 𝕜 x s ↔ x ∈ s
-- Mathlib/Topology/MetricSpace/HausdorffDimension.lean
@[mono]
theorem dimH_mono {s t : Set X} (h : s ⊆ t) : dimH s ≤ dimH t
-- Mathlib/Data/Complex/Exponential.lean
@[simp]
theorem cos_neg : cos (-x) = cos x
-- Mathlib/Data/List/Sym.lean
protected theorem Nodup.sym2 {xs : List α} (h : xs.Nodup) : xs.sym2.Nodup
-- Mathlib/CategoryTheory/Skeletal.lean
/-- A functor `C ⥤ D ⥤ E` computably lowers to a functor
`ThinSkeleton C ⥤ ThinSkeleton D ⥤ ThinSkeleton E` -/
@[simps]
def map₂ (F : C ⥤ D ⥤ E) : ThinSkeleton C ⥤ ThinSkeleton D ⥤ ThinSkeleton E
-- Mathlib/Order/BoundedOrder.lean
theorem Antitone.exists {P : β → α → Prop} (hP : ∀ x, Antitone (P x)) :
    Antitone fun y => ∃ x, P x y
-- Mathlib/MeasureTheory/Order/UpperLower.lean
/-- If we can fit a small ball inside a set `sᶜ` intersected with any neighborhood of `x`, then the
density of `s` near `x` is not `1`.

Along with `aux₀`, this proves that `x` is a Lebesgue point of `s`. This will be used to prove that
the frontier of an order-connected set is null. -/
private lemma aux₁
    (h : ∀ δ, 0 < δ →
      ∃ y, closedBall y (δ / 4) ⊆ closedBall x δ ∧ closedBall y (δ / 4) ⊆ interior sᶜ) :
    ¬Tendsto (fun r ↦ volume (closure s ∩ closedBall x r) / volume (closedBall x r)) (𝓝[>] 0)
        (𝓝 1)
-- Mathlib/LinearAlgebra/Ray.lean
/-- `SameRay.neg` as an `iff`. -/
@[simp]
theorem sameRay_neg_iff : SameRay R (-x) (-y) ↔ SameRay R x y
-- Mathlib/Data/List/Chain.lean
theorem chain'_isInfix : ∀ l : List α, Chain' (fun x y => [x, y] <:+: l) l
-- Mathlib/Data/Part.lean
@[simp]
theorem ret_eq_some (a : α) : (return a : Part α) = some a
-- Mathlib/Data/Seq/WSeq.lean
theorem exists_of_liftRel_right {R : α → β → Prop} {s t} (H : LiftRel R s t) {b} (h : b ∈ t) :
    ∃ a, a ∈ s ∧ R a b
-- Mathlib/Data/Multiset/Basic.lean
theorem eq_union_left : t ≤ s → s ∪ t = s
-- Mathlib/GroupTheory/FreeGroup/Basic.lean
@[to_additive]
theorem invRev_injective : Function.Injective (@invRev α)
-- Mathlib/NumberTheory/Cyclotomic/Basic.lean
/-- If `IsCyclotomicExtension {n} K L`, then `L` is the splitting field of `cyclotomic n K`. -/
theorem splitting_field_cyclotomic : IsSplittingField K L (cyclotomic n K)
-- Mathlib/Analysis/Convex/Strict.lean
theorem strictConvex_Ioc (r s : β) : StrictConvex 𝕜 (Ioc r s)
-- .lake/packages/batteries/Batteries/Data/UInt.lean
theorem USize.toNat_modn (x : USize) (n) : (x.modn n).toNat = x.toNat % n
-- Mathlib/GroupTheory/SpecificGroups/Cyclic.lean
/-- A finite group of prime order is cyclic. -/
@[to_additive "A finite group of prime order is cyclic."]
theorem isCyclic_of_prime_card {α : Type u} [Group α] [Fintype α] {p : ℕ} [hp : Fact p.Prime]
    (h : Fintype.card α = p) : IsCyclic α
-- Mathlib/Order/LiminfLimsup.lean
theorem IsBoundedUnder.inf [SemilatticeInf α] {f : Filter β} {u v : β → α} :
    f.IsBoundedUnder (· ≥ ·) u →
      f.IsBoundedUnder (· ≥ ·) v → f.IsBoundedUnder (· ≥ ·) fun a => u a ⊓ v a
-- Mathlib/NumberTheory/Padics/PadicNumbers.lean
theorem norm_eq_pow_val {x : ℚ_[p]} : x ≠ 0 → ‖x‖ = (p : ℝ) ^ (-x.valuation)
-- Mathlib/NumberTheory/Zsqrtd/Basic.lean
theorem norm_eq_mul_conj (n : ℤ√d) : (norm n : ℤ√d) = n * star n
-- Mathlib/CategoryTheory/Monoidal/Category.lean
/-- The associator as a natural isomorphism between trifunctors `C ⥤ C ⥤ C ⥤ C`. -/
@[simps!]
def curriedAssociatorNatIso :
    bifunctorComp₁₂ (curriedTensor C) (curriedTensor C) ≅
      bifunctorComp₂₃ (curriedTensor C) (curriedTensor C)
-- Mathlib/Data/Complex/Exponential.lean
@[simp]
theorem exp_le_exp {x y : ℝ} : exp x ≤ exp y ↔ x ≤ y
-- Mathlib/MeasureTheory/MeasurableSpace/Basic.lean
theorem le_map_comap : m ≤ (m.comap g).map g
-- Mathlib/Data/Set/Basic.lean
theorem union_right (ht : Disjoint s t) (hu : Disjoint s u) : Disjoint s (t ∪ u)
-- Mathlib/SetTheory/Ordinal/FixedPoint.lean
theorem IsNormal.nfp_fp {f} (H : IsNormal f) : ∀ a, f (nfp f a) = nfp f a
-- Mathlib/RepresentationTheory/Rep.lean
/-- The linearization of a type `X` on which `G` acts trivially is the trivial `G`-representation
on `k[X]`. -/
@[simps!]
noncomputable def linearizationTrivialIso (X : Type u) :
    (linearization k G).obj (Action.mk X 1) ≅ trivial k G (X →₀ k)
-- Mathlib/CategoryTheory/Localization/CalculusOfFractions.lean
lemma comp_eq {X Y Z : C} (z₁ : W.LeftFraction X Y) (z₂ : W.LeftFraction Y Z)
    (z₃ : W.LeftFraction z₁.Y' z₂.Y') (h₃ : z₂.f ≫ z₃.s = z₁.s ≫ z₃.f) :
    z₁.comp z₂ = Localization.Hom.mk (z₁.comp₀ z₂ z₃)
-- Mathlib/Data/Real/EReal.lean
theorem coe_strictMono : StrictMono Real.toEReal
-- Mathlib/Data/ZMod/Coprime.lean
/-- If an integer `a` and a prime `p` satisfy `gcd a p ≠ 1`, then `a : ZMod p` is zero. -/
theorem eq_zero_of_gcd_ne_one {a : ℤ} {p : ℕ} (pp : p.Prime) (h : a.gcd p ≠ 1) : (a : ZMod p) = 0
-- Mathlib/LinearAlgebra/Determinant.lean
@[simp]
theorem det_id : LinearMap.det (LinearMap.id : M →ₗ[A] M) = 1
-- Mathlib/Topology/Instances/ENNReal.lean
lemma liminf_sub_const (F : Filter ι) [NeBot F] (f : ι → ℝ≥0∞) (c : ℝ≥0∞) :
    Filter.liminf (fun i ↦ f i - c) F = Filter.liminf f F - c
-- Mathlib/Order/Filter/Ker.lean
@[simp] lemma subset_ker : s ⊆ f.ker ↔ ∀ t ∈ f, s ⊆ t
-- Mathlib/Order/Interval/Finset/Defs.lean
@[simp]
theorem mem_Icc : x ∈ Icc a b ↔ a ≤ x ∧ x ≤ b
-- Mathlib/Topology/PartialHomeomorph.lean
theorem map_nhdsWithin_preimage_eq {x} (hx : x ∈ e.source) (s : Set Y) :
    map e (𝓝[e ⁻¹' s] x) = 𝓝[s] e x
-- Mathlib/Analysis/Analytic/Basic.lean
theorem hasFPowerSeriesOnBall_const {c : F} {e : E} :
    HasFPowerSeriesOnBall (fun _ => c) (constFormalMultilinearSeries 𝕜 E c) e ⊤
-- Mathlib/SetTheory/Cardinal/Ordinal.lean
theorem mk_embedding_eq_arrow_of_lift_le (lle : lift.{u} #β' ≤ lift.{v} #α) :
    #(β' ↪ α) = #(β' → α)
-- Mathlib/LinearAlgebra/Matrix/PosDef.lean
lemma sqrt_sq : (hA.pow 2 : PosSemidef (A ^ 2)).sqrt = A
-- .lake/packages/batteries/Batteries/Data/UInt.lean
@[simp] theorem UInt64.toUInt8_toNat (x : UInt64) : x.toUInt8.toNat = x.toNat % 2 ^ 8
-- Mathlib/LinearAlgebra/Eigenspace/Basic.lean
lemma mapsTo_genEigenspace_of_comm {f g : End R M} (h : Commute f g) (μ : R) (k : ℕ) :
    MapsTo g (f.genEigenspace μ k) (f.genEigenspace μ k)
-- Mathlib/Algebra/Algebra/Subalgebra/Basic.lean
theorem eq_top_iff {S : Subalgebra R A} : S = ⊤ ↔ ∀ x : A, x ∈ S
-- Mathlib/LinearAlgebra/Dimension/Basic.lean
theorem lift_rank_range_of_injective (f : M →ₗ[R] M') (h : Injective f) :
    lift.{v} (Module.rank R (LinearMap.range f)) = lift.{v'} (Module.rank R M)
-- .lake/packages/lean4/src/lean/Init/Data/Int/DivModLemmas.lean
theorem div_mul_cancel_of_mod_eq_zero {a b : Int} (H : a.mod b = 0) : a.div b * b = a
-- Mathlib/Data/Rat/Cast/Defs.lean
/-- If `f` and `g` agree on the integers then they are equal `φ`. -/
theorem ext_rat' (h : ∀ m : ℤ, f m = g m) : f = g
-- Mathlib/Algebra/MvPolynomial/Basic.lean
theorem finsupp_support_eq_support (p : MvPolynomial σ R) : Finsupp.support p = p.support
-- Mathlib/LinearAlgebra/Matrix/ToLin.lean
theorem LinearMap.toMatrix_mul (f g : M₁ →ₗ[R] M₁) :
    LinearMap.toMatrix v₁ v₁ (f * g) = LinearMap.toMatrix v₁ v₁ f * LinearMap.toMatrix v₁ v₁ g
-- Mathlib/Algebra/Homology/Augment.lean
@[simp]
theorem truncateAugment_inv_f (C : ChainComplex V ℕ) {X : V} (f : C.X 0 ⟶ X) (w : C.d 1 0 ≫ f = 0)
    (i : ℕ) : (truncateAugment C f w).inv.f i = 𝟙 ((truncate.obj (augment C f w)).X i)
-- .lake/packages/batteries/Batteries/Data/BinomialHeap/Basic.lean
theorem Heap.realSize_tail? {s : Heap α} : s.tail? le = some s' →
    s.realSize = s'.realSize + 1
-- Mathlib/Data/Finsupp/Multiset.lean
@[simp] lemma coe_equivNatSum_symm_apply (P : {P : α →₀ ℕ // P.sum (fun _ ↦ id) = n}) :
    ((equivNatSum α n).symm P : Multiset α) = Finsupp.toMultiset P
-- .lake/packages/lean4/src/lean/Init/Data/Bool.lean
/-- De Morgan's law for boolean or -/
@[simp] theorem not_or : ∀ (x y : Bool), (!(x || y)) = (!x && !y)
-- Mathlib/CategoryTheory/Comma/StructuredArrow.lean
/-- Eta rule for structured arrows. -/
@[simps!]
def eta (f : StructuredArrow S T) : f ≅ mk f.hom
-- Mathlib/LinearAlgebra/AffineSpace/Midpoint.lean
@[simp]
theorem left_vsub_midpoint (p₁ p₂ : P) : p₁ -ᵥ midpoint R p₁ p₂ = (⅟ 2 : R) • (p₁ -ᵥ p₂)
-- Mathlib/Data/Set/MemPartition.lean
lemma memPartitionSet_of_mem {f : ℕ → Set α} {n : ℕ} {a : α} {s : Set α}
    (hs : s ∈ memPartition f n) (ha : a ∈ s) :
    memPartitionSet f n a = s
-- Mathlib/ModelTheory/FinitelyGenerated.lean
theorem fg_iff_exists_fin_generating_family {N : L.Substructure M} :
    N.FG ↔ ∃ (n : ℕ) (s : Fin n → M), closure L (range s) = N
-- Mathlib/Topology/Constructions.lean
theorem ContinuousAt.comp₂ {f : Y × Z → W} {g : X → Y} {h : X → Z} {x : X}
    (hf : ContinuousAt f (g x, h x)) (hg : ContinuousAt g x) (hh : ContinuousAt h x) :
    ContinuousAt (fun x ↦ f (g x, h x)) x
-- Mathlib/Topology/Bornology/Basic.lean
theorem isCobounded_sInter {S : Set (Set α)} (hs : S.Finite) :
    IsCobounded (⋂₀ S) ↔ ∀ s ∈ S, IsCobounded s
-- Mathlib/CategoryTheory/GlueData.lean
@[simp]
theorem t'_iij (i j : D.J) : D.t' i i j = (pullbackSymmetry _ _).hom
-- Mathlib/Algebra/Algebra/Subalgebra/Directed.lean
@[simp]
theorem iSupLift_mk {dir : Directed (· ≤ ·) K} {f : ∀ i, K i →ₐ[R] B}
    {hf : ∀ (i j : ι) (h : K i ≤ K j), f i = (f j).comp (inclusion h)}
    {T : Subalgebra R A} {hT : T = iSup K} {i : ι} (x : K i) (hx : (x : A) ∈ T) :
    iSupLift K dir f hf T hT ⟨x, hx⟩ = f i x
-- Mathlib/Order/Filter/Pi.lean
@[simp]
theorem pi_eq_bot : pi f = ⊥ ↔ ∃ i, f i = ⊥
-- Mathlib/Data/Finset/Basic.lean
theorem exists_of_ssubset {s₁ s₂ : Finset α} (h : s₁ ⊂ s₂) : ∃ x ∈ s₂, x ∉ s₁
-- Mathlib/Topology/Order/DenselyOrdered.lean
@[simp]
theorem map_coe_Ioi_atBot (a : α) : map ((↑) : Ioi a → α) atBot = 𝓝[>] a
-- Mathlib/Data/DFinsupp/Basic.lean
@[to_additive]
theorem dfinsupp_prod_apply [Monoid R] [CommMonoid S] (f : Π₀ i, β i) (g : ∀ i, β i → R →* S)
    (r : R) : (f.prod g) r = f.prod fun a b => (g a b) r
-- .lake/packages/lean4/src/lean/Init/Data/Option/Lemmas.lean
theorem get_of_mem : ∀ {o : Option α} (h : isSome o), a ∈ o → o.get h = a
-- Mathlib/Algebra/Group/Subsemigroup/Basic.lean
@[to_additive]
theorem mem_iInf {ι : Sort*} {S : ι → Subsemigroup M} {x : M} : (x ∈ ⨅ i, S i) ↔ ∀ i, x ∈ S i
-- Mathlib/LinearAlgebra/LinearIndependent.lean
theorem LinearIndependent.image_of_comp {ι ι'} (s : Set ι) (f : ι → ι') (g : ι' → M)
    (hs : LinearIndependent R fun x : s => g (f x)) :
    LinearIndependent R fun x : f '' s => g x
-- Mathlib/Algebra/Homology/ComplexShapeSigns.lean
lemma π_symm (i₁ : I₁) (i₂ : I₂) :
    π c₂ c₁ c₁₂ ⟨i₂, i₁⟩ = π c₁ c₂ c₁₂ ⟨i₁, i₂⟩
-- Mathlib/Algebra/Star/SelfAdjoint.lean
theorem _root_.isSelfAdjoint_starHom_apply {F R S : Type*} [Star R] [Star S] [FunLike F R S]
    [StarHomClass F R S] [TrivialStar R] (f : F) (x : R) : IsSelfAdjoint (f x)
-- Mathlib/Topology/Instances/ENNReal.lean
theorem exists_upcrossings_of_not_bounded_under {ι : Type*} {l : Filter ι} {x : ι → ℝ}
    (hf : liminf (fun i => (Real.nnabs (x i) : ℝ≥0∞)) l ≠ ∞)
    (hbdd : ¬IsBoundedUnder (· ≤ ·) l fun i => |x i|) :
    ∃ a b : ℚ, a < b ∧ (∃ᶠ i in l, x i < a) ∧ ∃ᶠ i in l, ↑b < x i
-- Mathlib/NumberTheory/NumberField/Embeddings.lean
theorem card_filter_mk_eq [NumberField K] (w : InfinitePlace K) :
    (Finset.univ.filter fun φ => mk φ = w).card = mult w
-- Mathlib/Analysis/Analytic/Basic.lean
/-- If a function admits a power series expansion `p` on a ball `B (x, r)`, then it also admits a
power series on any subball of this ball (even with a different center), given by `p.changeOrigin`.
-/
theorem HasFPowerSeriesOnBall.changeOrigin (hf : HasFPowerSeriesOnBall f p x r)
    (h : (‖y‖₊ : ℝ≥0∞) < r) : HasFPowerSeriesOnBall f (p.changeOrigin y) (x + y) (r - ‖y‖₊)
-- Mathlib/Analysis/Analytic/Basic.lean
theorem le_radius_of_eventually_le (C) (h : ∀ᶠ n in atTop, ‖p n‖ * (r : ℝ) ^ n ≤ C) :
    ↑r ≤ p.radius
-- Mathlib/Data/Fintype/Card.lean
theorem card_le_one_iff : card α ≤ 1 ↔ ∀ a b : α, a = b
-- Mathlib/CategoryTheory/DiscreteCategory.lean
@[simp]
theorem functor_obj_eq_as {I : Type u₁} (F : I → C) (X : Discrete I) :
    (Discrete.functor F).obj X = F X.as
-- Mathlib/Topology/UniformSpace/Basic.lean
protected lemma _root_.Filter.HasBasis.uniformSpace_eq_bot {ι p} {s : ι → Set (α × α)}
    {u : UniformSpace α} (h : 𝓤[u].HasBasis p s) :
    u = ⊥ ↔ ∃ i, p i ∧ Pairwise fun x y : α ↦ (x, y) ∉ s i
-- Mathlib/Data/Finset/Basic.lean
theorem insert_union_distrib (a : α) (s t : Finset α) :
    insert a (s ∪ t) = insert a s ∪ insert a t
-- Mathlib/Order/Interval/Finset/Basic.lean
/-- In a locally finite partial order, `≤` is the reflexive transitive closure of `⋖`. -/
lemma le_iff_reflTransGen_covBy [PartialOrder α] [LocallyFiniteOrder α] {x y : α} :
    x ≤ y ↔ ReflTransGen (· ⋖ ·) x y
-- Mathlib/MeasureTheory/Measure/FiniteMeasure.lean
theorem restrict_eq_zero_iff (μ : FiniteMeasure Ω) (A : Set Ω) : μ.restrict A = 0 ↔ μ A = 0
-- Mathlib/Topology/Sets/Closeds.lean
@[simp, norm_cast] lemma coe_inf (s t : Clopens α) : ↑(s ⊓ t) = (s ∩ t : Set α)
-- Mathlib/Topology/MetricSpace/IsometricSMul.lean
@[to_additive (attr := simp)]
theorem ediam_smul [SMul M X] [IsometricSMul M X] (c : M) (s : Set X) :
    EMetric.diam (c • s) = EMetric.diam s
-- Mathlib/Analysis/RCLike/Basic.lean
theorem ofReal_alg (x : ℝ) : (x : K) = x • (1 : K)
-- Mathlib/Algebra/Homology/ShortComplex/HomologicalComplex.lean
@[reassoc (attr := simp)]
lemma isoHomologyπ_inv_hom_id :
    (K.isoHomologyπ i j hi h).inv ≫ K.homologyπ j = 𝟙 _
-- Mathlib/Combinatorics/SimpleGraph/Finite.lean
theorem card_commonNeighbors_le_degree_right [DecidableRel G.Adj] (v w : V) :
    Fintype.card (G.commonNeighbors v w) ≤ G.degree w
-- Mathlib/Algebra/Group/Basic.lean
@[to_additive]
theorem mul_right_surjective (a : G) : Function.Surjective fun x ↦ x * a
-- Mathlib/RingTheory/PiTensorProduct.lean
@[simp] lemma tprod_prod {κ : Type*} (s : Finset κ) (x : κ → Π i, A i) :
    tprod R (∏ k ∈ s, x k) = ∏ k ∈ s, tprod R (x k)
-- Mathlib/Data/List/Range.lean
theorem pairwise_le_finRange (n : ℕ) : Pairwise (· ≤ ·) (finRange n)
-- Mathlib/Data/Finset/Basic.lean
@[simp]
theorem toFinset_ssubset : s.toFinset ⊂ t.toFinset ↔ s ⊂ t
-- Mathlib/Topology/ContinuousFunction/Basic.lean
/-- `Prod.swap` bundled as a `ContinuousMap`. -/
@[simps!]
def prodSwap : C(α × β, β × α)
-- Mathlib/NumberTheory/Zsqrtd/Basic.lean
theorem mul_star {x y : ℤ} : (⟨x, y⟩ * star ⟨x, y⟩ : ℤ√d) = x * x - d * y * y
-- Mathlib/RingTheory/PowerSeries/Basic.lean
@[simp]
theorem coeff_zero_eq_constantCoeff : ⇑(coeff R 0) = constantCoeff R
-- Mathlib/LinearAlgebra/Basis.lean
theorem Basis.sum_repr [Fintype ι] (b : Basis ι R M) (u : M) : ∑ i, b.repr u i • b i = u
-- Mathlib/CategoryTheory/Abelian/Basic.lean
theorem imageIsoImage_hom_comp_image_ι : (imageIsoImage f).hom ≫ Limits.image.ι _ = kernel.ι _
-- Mathlib/Analysis/SpecialFunctions/Trigonometric/Basic.lean
theorem cos_add_pi_div_two (x : ℝ) : cos (x + π / 2) = -sin x
-- Mathlib/AlgebraicTopology/SimplexCategory.lean
@[reassoc]
theorem δ_comp_σ_self' {n} {j : Fin (n + 2)} {i : Fin (n + 1)} (H : j = Fin.castSucc i) :
    δ j ≫ σ i = 𝟙 ([n] : SimplexCategory)
-- Mathlib/GroupTheory/PushoutI.lean
/-- All maps into the `PushoutI`, or amalgamated product of groups are injective,
provided all maps in the diagram are injective.

See also `base_injective` -/
theorem of_injective (hφ : ∀ i, Function.Injective (φ i)) (i : ι) :
    Function.Injective (of (φ := φ) i)
-- Mathlib/Topology/Algebra/Group/Basic.lean
/-- A version of the global `continuous_mul` suitable for dot notation. -/
@[to_additive "A version of the global `continuous_add` suitable for dot notation."]
theorem continuous_mul' (g : GroupTopology α) :
    haveI := g.toTopologicalSpace
    Continuous fun p : α × α => p.1 * p.2
-- Mathlib/CategoryTheory/Limits/Types.lean
/-- Sections of `F.op ⋙ yoneda.obj X` identify to natural
transformations `F ⟶ (const J).obj X`. -/
@[simps]
def opCompYonedaSectionsEquiv (F : J ⥤ C) (X : C) :
    (F.op ⋙ yoneda.obj X).sections ≃ (F ⟶ (const J).obj X)
-- Mathlib/Analysis/SpecialFunctions/Trigonometric/Deriv.lean
theorem HasFDerivAt.csin (hf : HasFDerivAt f f' x) :
    HasFDerivAt (fun x => Complex.sin (f x)) (Complex.cos (f x) • f') x
-- Mathlib/Algebra/Group/Opposite.lean
@[to_additive (attr := simp)]
theorem commute_op [Mul α] {x y : α} : Commute (op x) (op y) ↔ Commute x y
-- Mathlib/Algebra/Ring/Int.lean
@[parity_simps] lemma odd_add : Odd (m + n) ↔ (Odd m ↔ Even n)
-- Mathlib/Combinatorics/SimpleGraph/Walk.lean
/-- The `takeUntil` and `dropUntil` functions split a walk into two pieces.
The lemma `SimpleGraph.Walk.count_support_takeUntil_eq_one` specifies where this split occurs. -/
@[simp]
theorem take_spec {u v w : V} (p : G.Walk v w) (h : u ∈ p.support) :
    (p.takeUntil u h).append (p.dropUntil u h) = p
-- Mathlib/Algebra/BigOperators/Ring/Multiset.lean
lemma dvd_sum : (∀ x ∈ s, a ∣ x) → a ∣ s.sum
-- Mathlib/Probability/ProbabilityMassFunction/Constructions.lean
@[simp]
theorem toOuterMeasure_map_apply : (p.map f).toOuterMeasure s = p.toOuterMeasure (f ⁻¹' s)
-- Mathlib/Data/List/Rotate.lean
theorem getElem_rotate (l : List α) (n : ℕ) (k : Nat) (h : k < (l.rotate n).length) :
    (l.rotate n)[k] =
      l[(k + n) % l.length]'(mod_lt _ (length_rotate l n ▸ k.zero_le.trans_lt h))
-- Mathlib/Analysis/Normed/Group/Basic.lean
@[to_additive]
theorem smul_ball'' : a • ball b r = ball (a • b) r
-- Mathlib/Data/Finset/Sups.lean
lemma diffs_inter_subset_left : (s₁ ∩ s₂) \\ t ⊆ s₁ \\ t ∩ s₂ \\ t
-- Mathlib/InformationTheory/Hamming.lean
theorem hammingDist_comp (f : ∀ i, γ i → β i) {x y : ∀ i, γ i} (hf : ∀ i, Injective (f i)) :
    (hammingDist (fun i => f i (x i)) fun i => f i (y i)) = hammingDist x y
-- Mathlib/MeasureTheory/Integral/IntervalIntegral.lean
theorem integral_symm (a b) : ∫ x in b..a, f x ∂μ = -∫ x in a..b, f x ∂μ
-- Mathlib/Topology/Category/TopCat/Basic.lean
/--
Replace a function coercion for a morphism `TopCat.of X ⟶ TopCat.of Y` with the definitionally
equal function coercion for a continuous map `C(X, Y)`.
-/
@[simp] theorem coe_of_of {X Y : Type u} [TopologicalSpace X] [TopologicalSpace Y]
    {f : C(X, Y)} {x} :
    @DFunLike.coe (TopCat.of X ⟶ TopCat.of Y) ((CategoryTheory.forget TopCat).obj (TopCat.of X))
      (fun _ ↦ (CategoryTheory.forget TopCat).obj (TopCat.of Y)) ConcreteCategory.instFunLike
      f x =
    @DFunLike.coe C(X, Y) X
      (fun _ ↦ Y) _
      f x
-- Mathlib/LinearAlgebra/LinearIndependent.lean
/-- Dedekind's linear independence of characters -/
theorem linearIndependent_monoidHom (G : Type*) [Monoid G] (L : Type*) [CommRing L]
    [NoZeroDivisors L] : LinearIndependent L (M := G → L) (fun f => f : (G →* L) → G → L)
-- Mathlib/Analysis/NormedSpace/MazurUlam.lean
/-- A bijective isometry sends midpoints to midpoints. -/
theorem map_midpoint (f : PE ≃ᵢ PF) (x y : PE) : f (midpoint ℝ x y) = midpoint ℝ (f x) (f y)
-- Mathlib/Topology/QuasiSeparated.lean
/-- A topological space is quasi-separated if the intersections of any pairs of compact open
subsets are still compact. -/
@[mk_iff]
class QuasiSeparatedSpace (α : Type*) [TopologicalSpace α] : Prop where
  /-- The intersection of two open compact subsets of a quasi-separated space is compact. -/
  inter_isCompact :
    ∀ U V : Set α, IsOpen U → IsCompact U → IsOpen V → IsCompact V → IsCompact (U ∩ V)
-- Mathlib/RingTheory/Localization/Submodule.lean
theorem coeSubmodule_isPrincipal {I : Ideal R} (h : M ≤ nonZeroDivisors R) :
    (coeSubmodule S I).IsPrincipal ↔ I.IsPrincipal
-- Mathlib/Data/Finset/Basic.lean
theorem ssubset_insert (h : a ∉ s) : s ⊂ insert a s
-- Mathlib/Analysis/Convex/Caratheodory.lean
theorem mem_minCardFinsetOfMemConvexHull :
    x ∈ convexHull 𝕜 (minCardFinsetOfMemConvexHull hx : Set E)
-- Mathlib/Logic/Basic.lean
theorem xor_iff_iff_not : Xor' a b ↔ (a ↔ ¬b)
-- Mathlib/Data/Nat/Prime/Defs.lean
theorem prime_def_lt'' {p : ℕ} : Prime p ↔ 2 ≤ p ∧ ∀ m, m ∣ p → m = 1 ∨ m = p
-- .lake/packages/lean4/src/lean/Init/Data/Nat/Bitwise/Lemmas.lean
@[simp] theorem or_zero (x : Nat) : x ||| 0 = x
-- Mathlib/Analysis/BoxIntegral/Partition/Basic.lean
@[simp]
theorem iUnion_filter_not (π : Prepartition I) (p : Box ι → Prop) :
    (π.filter fun J => ¬p J).iUnion = π.iUnion \ (π.filter p).iUnion
-- Mathlib/LinearAlgebra/Basis.lean
/-- Two linear equivs are equal if they are equal on basis vectors. -/
theorem ext' {f₁ f₂ : M ≃ₛₗ[σ] M₁} (h : ∀ i, f₁ (b i) = f₂ (b i)) : f₁ = f₂
-- Mathlib/Algebra/BigOperators/Ring/List.lean
lemma sum_map_mul_right : (l.map fun b ↦ f b * r).sum = (l.map f).sum * r
-- Mathlib/Deprecated/Group.lean
/-- Construct `IsGroupHom` from its only hypothesis. -/
@[to_additive "Construct `IsAddGroupHom` from its only hypothesis."]
theorem IsGroupHom.mk' [Group α] [Group β] {f : α → β} (hf : ∀ x y, f (x * y) = f x * f y) :
    IsGroupHom f
-- Mathlib/Data/Int/Bitwise.lean
@[simp]
theorem land_bit (a m b n) : land (bit a m) (bit b n) = bit (a && b) (land m n)
-- Mathlib/Data/Matrix/Basic.lean
theorem diagonal_apply_ne' [Zero α] (d : n → α) {i j : n} (h : j ≠ i) : (diagonal d) i j = 0
-- Mathlib/NumberTheory/Zsqrtd/GaussianInt.lean
theorem norm_pos {x : ℤ[i]} : 0 < norm x ↔ x ≠ 0
-- Mathlib/Data/Finset/Prod.lean
@[simp]
theorem offDiag_singleton : ({a} : Finset α).offDiag = ∅
-- Mathlib/Algebra/Polynomial/Basic.lean
@[simp]
theorem X_pow_mul_monomial (k n : ℕ) (r : R) : X ^ k * monomial n r = monomial (n + k) r
-- Mathlib/Order/Lattice.lean
@[gcongr]
theorem sup_le_sup_right (h₁ : a ≤ b) (c) : a ⊔ c ≤ b ⊔ c
-- Mathlib/LinearAlgebra/AffineSpace/Ordered.lean
theorem lineMap_le_lineMap_iff_of_lt (h : r < r') : lineMap a b r ≤ lineMap a b r' ↔ a ≤ b
-- Mathlib/Algebra/Module/Submodule/Basic.lean
theorem toAddSubgroup_le : p.toAddSubgroup ≤ p'.toAddSubgroup ↔ p ≤ p'
-- Mathlib/Topology/Separation.lean
theorem t1Space_iff_specializes_imp_eq : T1Space X ↔ ∀ ⦃x y : X⦄, x ⤳ y → x = y
-- Mathlib/GroupTheory/GroupAction/DomAct/Basic.lean
@[to_additive (attr := simp)]
lemma mk_inv [Inv M] (a : M) : mk (a⁻¹) = (mk a)⁻¹
-- Mathlib/Analysis/SpecialFunctions/Trigonometric/Basic.lean
theorem cos_pi_div_two_sub (x : ℂ) : cos (π / 2 - x) = sin x
-- Mathlib/NumberTheory/LSeries/HurwitzZetaOdd.lean
/-- Formula for `completedHurwitzZetaOdd` as a Dirichlet series in the convergence range. -/
lemma hasSum_int_completedHurwitzZetaOdd (a : ℝ) {s : ℂ} (hs : 1 < re s) :
    HasSum (fun n : ℤ ↦ Gammaℝ (s + 1) * SignType.sign (n + a) / (↑|n + a| : ℂ) ^ s / 2)
    (completedHurwitzZetaOdd a s)
-- Mathlib/Analysis/SpecificLimits/Normed.lean
/-- Partial sums of an alternating antitone series with an odd number of terms provide
upper bounds on the limit. -/
theorem Antitone.tendsto_le_alternating_series
    (hfl : Tendsto (fun n ↦ ∑ i ∈ range n, (-1) ^ i * f i) atTop (𝓝 l))
    (hfa : Antitone f) (k : ℕ) : l ≤ ∑ i ∈ range (2 * k + 1), (-1) ^ i * f i
-- Mathlib/Analysis/Seminorm.lean
/-- A seminorm on a module over a normed ring is a function to the reals that is positive
semidefinite, positive homogeneous, and subadditive. -/
structure Seminorm (𝕜 : Type*) (E : Type*) [SeminormedRing 𝕜] [AddGroup E] [SMul 𝕜 E] extends
  AddGroupSeminorm E where
  /-- The seminorm of a scalar multiplication is the product of the absolute value of the scalar
  and the original seminorm. -/
  smul' : ∀ (a : 𝕜) (x : E), toFun (a • x) = ‖a‖ * toFun x