ruc-ai4math/mathlib_handler_benchmark_410 huggingface dataset:
-- Mathlib/Algebra/Order/Rearrangement.lean
/-- **Equality case of the Rearrangement Inequality**: Pointwise multiplication of `f` and `g`,
which antivary together, is unchanged by a permutation if and only if `f` and `g ∘ σ` antivary
together. Stated by permuting the entries of `g`. -/
theorem Antivary.sum_mul_eq_sum_mul_comp_perm_iff (hfg : Antivary f g) :
    ∑ i, f i * g (σ i) = ∑ i, f i * g i ↔ Antivary f (g ∘ σ)
-- Mathlib/Data/Multiset/Dedup.lean
theorem dedup_ext {s t : Multiset α} : dedup s = dedup t ↔ ∀ a, a ∈ s ↔ a ∈ t
-- Mathlib/NumberTheory/LegendreSymbol/JacobiSymbol.lean
/-- `qrSign` is multiplicative in the second argument. -/
theorem mul_right (m n₁ n₂ : ℕ) [NeZero n₁] [NeZero n₂] :
    qrSign m (n₁ * n₂) = qrSign m n₁ * qrSign m n₂
-- Mathlib/Data/Set/Pointwise/SMul.lean
@[to_additive (attr := mono)]
theorem smul_subset_smul : s₁ ⊆ s₂ → t₁ ⊆ t₂ → s₁ • t₁ ⊆ s₂ • t₂
-- Mathlib/Data/Sign.lean
private lemma mul_comm : ∀ (a b : SignType), a * b = b * a
-- Mathlib/Geometry/Manifold/ContMDiff/Defs.lean
theorem contMDiffWithinAt_iff_of_mem_maximalAtlas {x : M} (he : e ∈ maximalAtlas I M)
    (he' : e' ∈ maximalAtlas I' M') (hx : x ∈ e.source) (hy : f x ∈ e'.source) :
    ContMDiffWithinAt I I' n f s x ↔
      ContinuousWithinAt f s x ∧
        ContDiffWithinAt 𝕜 n (e'.extend I' ∘ f ∘ (e.extend I).symm)
          ((e.extend I).symm ⁻¹' s ∩ range I) (e.extend I x)
-- Mathlib/Computability/TMToPartrec.lean
theorem tr_ret_cons₂ (k) : tr (Λ'.ret (Cont'.cons₂ k)) =
    goto fun _ => head stack <| Λ'.ret k
-- Mathlib/NumberTheory/Padics/PadicNumbers.lean
theorem norm_nonarchimedean (f g : PadicSeq p) : (f + g).norm ≤ max f.norm g.norm
-- Mathlib/Analysis/InnerProductSpace/PiL2.lean
/-- Exhibit a bijection between `Fin n` and the index set of a certain basis of an `n`-dimensional
inner product space `E`.  This should not be accessed directly, but only via the subsequent API. -/
irreducible_def DirectSum.IsInternal.sigmaOrthonormalBasisIndexEquiv
    (hV' : OrthogonalFamily 𝕜 (fun i => V i) fun i => (V i).subtypeₗᵢ) :
    (Σi, Fin (finrank 𝕜 (V i))) ≃ Fin n
-- Mathlib/Geometry/Manifold/LocalDiffeomorph.lean
/-- A `C^n` diffeomorphism is a local diffeomorphism. -/
lemma Diffeomorph.isLocalDiffeomorph (Φ : M ≃ₘ^n⟮I, J⟯ N) : IsLocalDiffeomorph I J n Φ
-- Mathlib/Data/Fin/Basic.lean
theorem succ_le_or_le_castSucc (p : Fin (n + 1)) (i : Fin n) : succ i ≤ p ∨ p ≤ i.castSucc
-- Mathlib/RingTheory/FractionalIdeal/Operations.lean
theorem map_injective (f : P →ₐ[R] P') (h : Function.Injective f) :
    Function.Injective (map f : FractionalIdeal S P → FractionalIdeal S P')
-- Mathlib/Topology/Connected/PathConnected.lean
@[simp]
theorem pi_coe (γ : ∀ i, Path (as i) (bs i)) : ⇑(Path.pi γ) = fun t i => γ i t
-- Mathlib/Algebra/BigOperators/Fin.lean
@[to_additive]
theorem prod_univ_eight [CommMonoid β] (f : Fin 8 → β) :
    ∏ i, f i = f 0 * f 1 * f 2 * f 3 * f 4 * f 5 * f 6 * f 7
-- Mathlib/AlgebraicGeometry/PrimeSpectrum/TensorProduct.lean
lemma PrimeSpectrum.embedding_tensorProductTo_of_surjectiveOnStalks_aux
    (p₁ p₂ : PrimeSpectrum (S ⊗[R] T))
    (h : tensorProductTo R S T p₁ = tensorProductTo R S T p₂) :
    p₁ ≤ p₂
-- Mathlib/RingTheory/MvPowerSeries/Basic.lean
/-- Two multivariate formal power series are equal if all their coefficients are equal. -/
@[ext]
theorem ext {φ ψ} (h : ∀ n : σ →₀ ℕ, coeff R n φ = coeff R n ψ) : φ = ψ
-- Mathlib/Order/LiminfLimsup.lean
theorem mono_blimsup (h : ∀ x, p x → u x ≤ v x) : blimsup u f p ≤ blimsup v f p
-- Mathlib/RingTheory/Ideal/Maps.lean
protected theorem map_pow (n : ℕ) : map f (I ^ n) = map f I ^ n
-- Mathlib/Topology/AlexandrovDiscrete.lean
lemma AlexandrovDiscrete.sup {t₁ t₂ : TopologicalSpace α} (_ : @AlexandrovDiscrete α t₁)
    (_ : @AlexandrovDiscrete α t₂) :
    @AlexandrovDiscrete α (t₁ ⊔ t₂)
-- Mathlib/MeasureTheory/Measure/Typeclasses.lean
theorem _root_.Set.Finite.measure_zero (h : s.Finite) (μ : Measure α) [NoAtoms μ] : μ s = 0
-- Mathlib/NumberTheory/Cyclotomic/Rat.lean
lemma coe_toInteger {k : ℕ+} (hζ : IsPrimitiveRoot ζ k) : hζ.toInteger.1 = ζ
-- Mathlib/Data/Matroid/Basic.lean
theorem Basis.insert_basis_insert (hI : M.Basis I X) (h : M.Indep (insert e I)) :
    M.Basis (insert e I) (insert e X)
-- Mathlib/CategoryTheory/Sites/Sheaf.lean
/-- Given a sieve `S` on `X : C`, a presheaf `P : Cᵒᵖ ⥤ A`, and an object `E` of `A`,
    the cones over the natural diagram `S.arrows.diagram.op ⋙ P` associated to `S` and `P`
    with cone point `E` are in 1-1 correspondence with sieve_compatible family of elements
    for the sieve `S` and the presheaf of types `Hom (E, P -)`. -/
@[simps]
def conesEquivSieveCompatibleFamily :
    (S.arrows.diagram.op ⋙ P).cones.obj E ≃
      { x : FamilyOfElements (P ⋙ coyoneda.obj E) (S : Presieve X) // x.SieveCompatible }
-- Mathlib/Order/Filter/EventuallyConst.lean
nonrec lemma anti {l'} (h : EventuallyConst f l) (hl' : l' ≤ l) : EventuallyConst f l'
-- Mathlib/Deprecated/Ring.lean
/-- A semiring homomorphism is an additive monoid homomorphism. -/
theorem to_isAddMonoidHom (hf : IsSemiringHom f) : IsAddMonoidHom f
-- Mathlib/Data/Finset/Union.lean
lemma bind_toFinset [DecidableEq α] (s : Multiset α) (t : α → Multiset β) :
    (s.bind t).toFinset = s.toFinset.biUnion fun a ↦ (t a).toFinset
-- Mathlib/MeasureTheory/Function/StronglyMeasurable/Basic.lean
@[to_additive (attr := measurability)]
theorem _root_.Multiset.aestronglyMeasurable_prod (s : Multiset (α → M))
    (hs : ∀ f ∈ s, AEStronglyMeasurable f μ) :
    AEStronglyMeasurable (fun x => (s.map fun f : α → M => f x).prod) μ
-- Mathlib/Topology/Basic.lean
theorem tendsto_atTop_of_eventually_const {ι : Type*} [SemilatticeSup ι] [Nonempty ι]
    {u : ι → X} {i₀ : ι} (h : ∀ i ≥ i₀, u i = x) : Tendsto u atTop (𝓝 x)
-- Mathlib/Algebra/Lie/Normalizer.lean
@[simp]
theorem le_normalizer : N ≤ N.normalizer
-- Mathlib/RingTheory/Regular/IsSMulRegular.lean
lemma IsSMulRegular.rTensor : IsSMulRegular (M' ⊗[R] M) r
-- Mathlib/Analysis/InnerProductSpace/l2Space.lean
theorem inner_single_left (i : ι) (a : G i) (f : lp G 2) : ⟪lp.single 2 i a, f⟫ = ⟪a, f i⟫
-- Mathlib/Data/List/ProdSigma.lean
theorem length_product (l₁ : List α) (l₂ : List β) :
    length (l₁ ×ˢ l₂) = length l₁ * length l₂
-- Mathlib/GroupTheory/Complement.lean
@[to_additive]
theorem isComplement_singleton_left {g : G} : IsComplement {g} S ↔ S = univ
-- Mathlib/Topology/MetricSpace/Bounded.lean
theorem mem_cocompact_of_closedBall_compl_subset [ProperSpace α] (c : α)
    (h : ∃ r, (closedBall c r)ᶜ ⊆ s) : s ∈ cocompact α
-- Mathlib/Data/Part.lean
theorem some_injective : Injective (@Part.some α)
-- Mathlib/Order/SuccPred/Basic.lean
lemma StrictAnti.not_bddBelow_range [NoMaxOrder α] [PredOrder β] [IsPredArchimedean β]
    (hf : StrictAnti f) : ¬ BddBelow (Set.range f)
-- Mathlib/Data/Matrix/Basic.lean
theorem transpose_list_sum [AddMonoid α] (l : List (Matrix m n α)) :
    l.sumᵀ = (l.map transpose).sum
-- Mathlib/Order/Filter/Bases.lean
theorem HasBasis.filter_eq (h : l.HasBasis p s) : h.isBasis.filter = l
-- Mathlib/Order/Filter/Extr.lean
theorem isMinOn_univ_iff : IsMinOn f univ a ↔ ∀ x, f a ≤ f x
-- Mathlib/Topology/UniformSpace/Basic.lean
theorem ball_inter (x : β) (V W : Set (β × β)) : ball x (V ∩ W) = ball x V ∩ ball x W
-- Mathlib/RingTheory/GradedAlgebra/HomogeneousLocalization.lean
lemma mk_eq_zero_of_num (f : NumDenSameDeg 𝒜 x) (h : f.num = 0) : mk f = 0
-- Mathlib/LinearAlgebra/AffineSpace/Midpoint.lean
@[simp]
theorem midpoint_sub_left (v₁ v₂ : V) : midpoint R v₁ v₂ - v₁ = (⅟ 2 : R) • (v₂ - v₁)
-- Mathlib/GroupTheory/SpecificGroups/Cyclic.lean
@[to_additive]
lemma IsCyclic.ext {G : Type*} [Group G] [Fintype G] [IsCyclic G] {d : ℕ} {a b : ZMod d}
    (hGcard : Fintype.card G = d) (h : ∀ t : G, t ^ a.val = t ^ b.val) : a = b
-- Mathlib/Algebra/Module/Submodule/Equiv.lean
theorem ofTop_symm_apply {h} (x : M) : (ofTop p h).symm x = ⟨x, h.symm ▸ trivial⟩
-- Mathlib/Algebra/Group/Defs.lean
@[to_additive (attr := simp, norm_cast) natCast_zsmul]
theorem zpow_natCast (a : G) : ∀ n : ℕ, a ^ (n : ℤ) = a ^ n
-- Mathlib/MeasureTheory/MeasurableSpace/Basic.lean
theorem Measurable.of_uncurry_right {f : α → β → γ} (hf : Measurable (uncurry f)) {y : β} :
    Measurable fun x => f x y
-- Mathlib/Algebra/Homology/ShortComplex/RightHomology.lean
lemma hasRightHomology_of_epi_of_isIso_of_mono' (φ : S₁ ⟶ S₂) [HasRightHomology S₂]
    [Epi φ.τ₁] [IsIso φ.τ₂] [Mono φ.τ₃] : HasRightHomology S₁
-- Mathlib/AlgebraicGeometry/Scheme.lean
theorem appLE_comp_appLE {X Y Z : Scheme} (f : X ⟶ Y) (g : Y ⟶ Z) (U V W e₁ e₂) :
    g.appLE U V e₁ ≫ f.appLE V W e₂ =
      (f ≫ g).appLE U W (e₂.trans ((Opens.map f.1.base).map (homOfLE e₁)).le)
-- Mathlib/CategoryTheory/Sites/NonabelianCohomology/H1.lean
/-- A 1-cochain of a presheaf of groups `G : Cᵒᵖ ⥤ Grp` on a family `U : I → C` of objects
consists of the data of an element in `G.obj (Opposite.op T)` whenever we have elements
`i` and `j` in `I` and maps `a : T ⟶ U i` and `b : T ⟶ U j`, and it must satisfy a compatibility
with respect to precomposition. (When the binary product of `U i` and `U j` exists, this
data for all `T`, `a` and `b` corresponds to the data of a section of `G` on this product.) -/
@[ext]
structure OneCochain where
  /-- the data involved in a 1-cochain -/
  ev (i j : I) ⦃T : C⦄ (a : T ⟶ U i) (b : T ⟶ U j) : G.obj (Opposite.op T)
  ev_precomp (i j : I) ⦃T T' : C⦄ (φ : T ⟶ T') (a : T' ⟶ U i) (b : T' ⟶ U j) :
    G.map φ.op (ev i j a b) = ev i j (φ ≫ a) (φ ≫ b) := by aesop
-- Mathlib/Data/Set/Subsingleton.lean
protected theorem Nontrivial.nonempty (hs : s.Nontrivial) : s.Nonempty
-- Mathlib/Data/Nat/Factorization/Root.lean
@[simp] lemma factorization_floorRoot (n a : ℕ) :
    (floorRoot n a).factorization = a.factorization ⌊/⌋ n
-- Mathlib/Order/Bounds/Basic.lean
theorem image_lowerBounds_subset_lowerBounds_image (Hf : MonotoneOn f t) (Hst : s ⊆ t) :
    f '' (lowerBounds s ∩ t) ⊆ lowerBounds (f '' s)
-- Mathlib/Algebra/Homology/HomologicalComplex.lean
@[reassoc (attr := simp)]
lemma d_comp_XIsoOfEq_inv (K : HomologicalComplex V c) {p₂ p₃ : ι} (h : p₃ = p₂) (p₁ : ι) :
    K.d p₁ p₂ ≫ (K.XIsoOfEq h).inv = K.d p₁ p₃
-- Mathlib/Algebra/Star/Module.lean
/-- The skew-adjoint part of an element of a star module, as a linear map. -/
@[simps]
def skewAdjointPart : A →ₗ[R] skewAdjoint A
-- Mathlib/Analysis/BoundedVariation.lean
theorem LipschitzOnWith.locallyBoundedVariationOn {f : ℝ → E} {C : ℝ≥0} {s : Set ℝ}
    (hf : LipschitzOnWith C f s) : LocallyBoundedVariationOn f s
-- Mathlib/Analysis/NormedSpace/Pointwise.lean
theorem smul_closedBall (c : 𝕜) (x : E) {r : ℝ} (hr : 0 ≤ r) :
    c • closedBall x r = closedBall (c • x) (‖c‖ * r)
-- Mathlib/Topology/Connected/Basic.lean
/-- The iUnion of connected sets indexed by a subset of a type with an archimedean successor
  (like `ℕ` or `ℤ`) such that any two neighboring sets meet is preconnected. -/
theorem IsConnected.biUnion_of_chain {s : β → Set α} {t : Set β} (hnt : t.Nonempty)
    (ht : OrdConnected t) (H : ∀ n ∈ t, IsConnected (s n))
    (K : ∀ n : β, n ∈ t → succ n ∈ t → (s n ∩ s (succ n)).Nonempty) : IsConnected (⋃ n ∈ t, s n)
-- Mathlib/Data/Set/Prod.lean
@[simp]
theorem mk_preimage_prod_right_eq_empty (ha : a ∉ s) : Prod.mk a ⁻¹' s ×ˢ t = ∅
-- Mathlib/NumberTheory/GaussSum.lean
/-- For a quadratic character `χ` and when the characteristic `p` of the target ring
is a unit in the source ring, the `p`th power of the Gauss sum of`χ` and `ψ` is
`χ p` times the original Gauss sum. -/
theorem MulChar.IsQuadratic.gaussSum_frob (hp : IsUnit (p : R)) {χ : MulChar R R'}
    (hχ : IsQuadratic χ) (ψ : AddChar R R') :
    gaussSum χ ψ ^ p = χ p * gaussSum χ ψ
-- Mathlib/MeasureTheory/Integral/IntegrableOn.lean
/-- If a function is integrable on a set `s` and nonzero there, then the measurable hull of `s` is
well behaved: the restriction of the measure to `toMeasurable μ s` coincides with its restriction
to `s`. -/
theorem IntegrableOn.restrict_toMeasurable (hf : IntegrableOn f s μ) (h's : ∀ x ∈ s, f x ≠ 0) :
    μ.restrict (toMeasurable μ s) = μ.restrict s
-- Mathlib/Analysis/SpecialFunctions/Trigonometric/Deriv.lean
@[simp]
theorem sinh_neg_iff : sinh x < 0 ↔ x < 0
-- Mathlib/Geometry/RingedSpace/LocallyRingedSpace.lean
lemma stalkSpecializes_stalkMap_apply (x x' : X) (h : x ⤳ x') (y) :
    f.stalkMap x (Y.presheaf.stalkSpecializes (f.val.base.map_specializes h) y) =
      (X.presheaf.stalkSpecializes h (f.stalkMap x' y))
-- Mathlib/Geometry/Manifold/ContMDiff/Defs.lean
theorem ContMDiffWithinAt.contMDiffAt (h : ContMDiffWithinAt I I' n f s x) (ht : s ∈ 𝓝 x) :
    ContMDiffAt I I' n f x
-- Mathlib/Geometry/Euclidean/Basic.lean
theorem eq_reflection_of_eq_subspace {s s' : AffineSubspace ℝ P} [Nonempty s] [Nonempty s']
    [HasOrthogonalProjection s.direction] [HasOrthogonalProjection s'.direction] (h : s = s')
    (p : P) : (reflection s p : P) = (reflection s' p : P)
-- Mathlib/Combinatorics/SimpleGraph/Path.lean
theorem IsTrail.count_edges_le_one [DecidableEq V] {u v : V} {p : G.Walk u v} (h : p.IsTrail)
    (e : Sym2 V) : p.edges.count e ≤ 1
-- Mathlib/MeasureTheory/Integral/IntervalIntegral.lean
theorem sum_integral_adjacent_intervals {a : ℕ → ℝ} {n : ℕ}
    (hint : ∀ k < n, IntervalIntegrable f μ (a k) (a <| k + 1)) :
    ∑ k ∈ Finset.range n, ∫ x in a k..a <| k + 1, f x ∂μ = ∫ x in (a 0)..(a n), f x ∂μ
-- Mathlib/Order/Filter/Bases.lean
@[instance]
theorem isCountablyGenerated_principal (s : Set α) : IsCountablyGenerated (𝓟 s)
-- Mathlib/Algebra/FreeMonoid/Basic.lean
@[to_additive (attr := simp)]
theorem ofList_nil : ofList ([] : List α) = 1
-- Mathlib/Dynamics/Circle/RotationNumber/TranslationNumber.lean
theorem lt_translationNumber_of_forall_add_lt (hf : Continuous f) {z : ℝ} (hz : ∀ x, x + z < f x) :
    z < τ f
-- Mathlib/RingTheory/Regular/IsSMulRegular.lean
lemma smul_top_inf_eq_smul_of_isSMulRegular_on_quot :
    IsSMulRegular (M ⧸ N) r → r • ⊤ ⊓ N ≤ r • N
-- Mathlib/Analysis/NormedSpace/OperatorNorm/Completeness.lean
/-- If a set `s` of semilinear functions is bounded and is closed in the weak-* topology, then its
image under coercion to functions `E → F` is a compact set. We don't have a name for `E →SL[σ] F`
with weak-* topology in `mathlib`, so we use an equivalent condition (see `isClosed_induced_iff'`).
-/
theorem isCompact_image_coe_of_bounded_of_weak_closed [ProperSpace F] {s : Set (E' →SL[σ₁₂] F)}
    (hb : IsBounded s) (hc : ∀ f : E' →SL[σ₁₂] F,
      (⇑f : E' → F) ∈ closure (((↑) : (E' →SL[σ₁₂] F) → E' → F) '' s) → f ∈ s) :
    IsCompact (((↑) : (E' →SL[σ₁₂] F) → E' → F) '' s)
-- Mathlib/Algebra/Group/Indicator.lean
@[to_additive]
theorem mulIndicator_div (s : Set α) (f g : α → G) :
    (mulIndicator s fun a => f a / g a) = fun a => mulIndicator s f a / mulIndicator s g a
-- Mathlib/CategoryTheory/Sites/PreservesSheafification.lean
lemma sheafToPresheaf_map_sheafComposeNatTrans_eq_sheafifyCompIso_inv (P : Cᵒᵖ ⥤ D) :
    (sheafToPresheaf J E).map
      ((sheafComposeNatTrans J F (plusPlusAdjunction J D) (plusPlusAdjunction J E)).app P) =
      (sheafifyCompIso J F P).inv
-- Mathlib/Algebra/BigOperators/Finsupp.lean
@[to_additive]
theorem prod_eq_single {f : α →₀ M} (a : α) {g : α → M → N}
    (h₀ : ∀ b, f b ≠ 0 → b ≠ a → g b (f b) = 1) (h₁ : f a = 0 → g a 0 = 1) :
    f.prod g = g a (f a)
-- Mathlib/MeasureTheory/Integral/IntervalIntegral.lean
theorem norm_integral_le_of_norm_le_const_ae {a b C : ℝ} {f : ℝ → E}
    (h : ∀ᵐ x, x ∈ Ι a b → ‖f x‖ ≤ C) : ‖∫ x in a..b, f x‖ ≤ C * |b - a|
-- Mathlib/Data/QPF/Multivariate/Constructions/Cofix.lean
theorem Cofix.dest_corec' {α : TypeVec.{u} n} {β : Type u}
    (g : β → F (α.append1 (Cofix F α ⊕ β))) (x : β) :
    Cofix.dest (Cofix.corec' g x) =
      appendFun id (Sum.elim _root_.id (Cofix.corec' g)) <$$> g x
-- Mathlib/Analysis/SpecialFunctions/Trigonometric/Complex.lean
theorem sin_eq_zero_iff {θ : ℂ} : sin θ = 0 ↔ ∃ k : ℤ, θ = k * π
-- Mathlib/Topology/UniformSpace/UniformConvergence.lean
/-- A sequence that converges uniformly is also uniformly Cauchy -/
theorem TendstoUniformlyOn.uniformCauchySeqOn (hF : TendstoUniformlyOn F f p s) :
    UniformCauchySeqOn F p s
-- Mathlib/CategoryTheory/Limits/Shapes/Pullback/PullbackCone.lean
@[reassoc]
theorem condition (t : PullbackCone f g) : fst t ≫ f = snd t ≫ g
-- Mathlib/GroupTheory/FiniteAbelian.lean
theorem finite_of_fg_torsion [AddCommGroup M] [Module ℤ M] [Module.Finite ℤ M]
    (hM : Module.IsTorsion ℤ M) : _root_.Finite M
-- Mathlib/Order/WithBot.lean
@[simp]
theorem ofDual_le_ofDual_iff {a b : WithTop αᵒᵈ} : WithTop.ofDual a ≤ WithTop.ofDual b ↔ b ≤ a
-- Mathlib/Algebra/Order/Kleene.lean
@[simp]
theorem fst_kstar (a : α × β) : a∗.1 = a.1∗
-- Mathlib/Order/Interval/Set/Image.lean
lemma StrictMonoOn.image_Ioo_subset (h : StrictMonoOn f (Icc a b)) :
    f '' Ioo a b ⊆ Ioo (f a) (f b)
-- Mathlib/Topology/Algebra/Group/Basic.lean
@[to_additive]
theorem nhds_one_symm' : map Inv.inv (𝓝 (1 : G)) = 𝓝 (1 : G)
-- Mathlib/SetTheory/Ordinal/NaturalOps.lean
@[simp]
theorem toNatOrdinal_toOrdinal (a : Ordinal) :  NatOrdinal.toOrdinal (toNatOrdinal a) = a
-- Mathlib/Data/Sign.lean
private theorem exists_signed_sum_aux {α : Type u_1} [DecidableEq α] (s : Finset α) (f : α → ℤ) :
    ∃ (β : Type u_1) (t : Finset β) (sgn : β → SignType) (g : β → α),
      (∀ b, g b ∈ s) ∧
        (t.card = ∑ a ∈ s, (f a).natAbs) ∧
          ∀ a ∈ s, (∑ b ∈ t, if g b = a then (sgn b : ℤ) else 0) = f a
-- Mathlib/ModelTheory/Substructures.lean
theorem copy_eq {s : Set M} (hs : s = S) : S.copy s hs = S
-- Mathlib/Data/Complex/Exponential.lean
@[simp]
theorem exp_sub_cosh : exp x - cosh x = sinh x
-- Mathlib/Data/Num/Lemmas.lean
@[simp, norm_cast]
theorem mod_to_int : ∀ n d, ((n % d : ZNum) : ℤ) = n % d
-- Mathlib/NumberTheory/LSeries/AbstractFuncEq.lean
lemma symm_Λ_eq : P.symm.Λ = mellin P.g
-- Mathlib/Topology/ContinuousFunction/Polynomial.lean
lemma toContinuousMap_X_eq_id : X.toContinuousMap = .id R
-- Mathlib/Algebra/Opposites.lean
@[to_additive]
theorem op_surjective : Surjective (op : α → αᵐᵒᵖ)
-- Mathlib/Algebra/Order/GroupWithZero/Unbundled.lean
theorem mul_lt_of_le_of_lt_one_of_pos [PosMulStrictMono α] (bc : b ≤ c) (ha : a < 1) (b0 : 0 < b) :
    b * a < c
-- Mathlib/ModelTheory/Syntax.lean
@[simp]
theorem mapTermRel_id_id_id {n} (φ : L.BoundedFormula α n) :
    (φ.mapTermRel (fun _ => id) (fun _ => id) fun _ => id) = φ
-- Mathlib/Data/Set/Finite.lean
theorem eq_of_subset_of_card_le {s t : Set α} [Fintype s] [Fintype t] (hsub : s ⊆ t)
    (hcard : Fintype.card t ≤ Fintype.card s) : s = t
-- Mathlib/Order/LiminfLimsup.lean
/-- If `f : α → α` is a morphism of complete lattices, then the limsup of its iterates of any
`a : α` is a fixed point. -/
@[simp]
theorem _root_.CompleteLatticeHom.apply_limsup_iterate (f : CompleteLatticeHom α α) (a : α) :
    f (limsup (fun n => f^[n] a) atTop) = limsup (fun n => f^[n] a) atTop
-- Mathlib/GroupTheory/Congruence/Basic.lean
/-- The coercion to the quotient of a congruence relation commutes with multiplication (by
    definition). -/
@[to_additive (attr := simp) "The coercion to the quotient of an additive congruence relation
commutes with addition (by definition)."]
theorem coe_mul (x y : M) : (↑(x * y) : c.Quotient) = ↑x * ↑y
-- Mathlib/Combinatorics/SimpleGraph/Prod.lean
protected theorem Preconnected.boxProd (hG : G.Preconnected) (hH : H.Preconnected) :
    (G □ H).Preconnected
-- Mathlib/Algebra/Polynomial/Expand.lean
theorem expand_ne_zero {p : ℕ} (hp : 0 < p) {f : R[X]} : expand R p f ≠ 0 ↔ f ≠ 0
-- Mathlib/MeasureTheory/Function/StronglyMeasurable/Basic.lean
@[aesop safe 20 (rule_sets := [Measurable])]
protected theorem inf [Inf β] [ContinuousInf β] (hf : StronglyMeasurable f)
    (hg : StronglyMeasurable g) : StronglyMeasurable (f ⊓ g)
-- Mathlib/NumberTheory/ZetaValues.lean
theorem hasDerivAt_bernoulliFun (k : ℕ) (x : ℝ) :
    HasDerivAt (bernoulliFun k) (k * bernoulliFun (k - 1) x) x
-- Mathlib/Topology/Category/Profinite/Nobeling.lean
theorem injective_sum_to : Function.Injective (sum_to C ho)
-- Mathlib/AlgebraicTopology/SimplicialObject.lean
/-- The first part of the third simplicial identity -/
@[reassoc]
theorem δ_comp_σ_self {n} {i : Fin (n + 1)} : X.σ i ≫ X.δ (Fin.castSucc i) = 𝟙 _
-- Mathlib/Topology/Connected/TotallyDisconnected.lean
@[simp] theorem connectedComponent_eq_singleton [TotallyDisconnectedSpace α] (x : α) :
    connectedComponent x = {x}
-- Mathlib/Order/BoundedOrder.lean
@[simp]
theorem top_le_iff : ⊤ ≤ a ↔ a = ⊤
-- Mathlib/Order/Interval/Set/Basic.lean
theorem Iio_ssubset_Iic_self : Iio a ⊂ Iic a
-- Mathlib/GroupTheory/PGroup.lean
theorem index (H : Subgroup G) [H.FiniteIndex] : ∃ n : ℕ, H.index = p ^ n
-- Mathlib/Topology/Category/Profinite/Nobeling.lean
/--
If `l` is good w.r.t. `π C (ord I · < o₁)` and `o₁ ≤ o₂`, then it is good w.r.t.
`π C (ord I · < o₂)`
-/
theorem isGood_mono {l : Products I} {o₁ o₂ : Ordinal} (h : o₁ ≤ o₂)
    (hl : l.isGood (π C (ord I · < o₁))) : l.isGood (π C (ord I · < o₂))
-- Mathlib/Analysis/Convex/Normed.lean
theorem convexOn_univ_dist (z : E) : ConvexOn ℝ univ fun z' => dist z' z
-- Mathlib/CategoryTheory/ChosenFiniteProducts/FunctorCategory.lean
/-- The second projection `chosenProd F₁ F₂ ⟶ F₂`. -/
@[simps]
def snd : chosenProd F₁ F₂ ⟶ F₂
-- Mathlib/Order/Cover.lean
theorem WCovBy.sup_eq (hac : a ⩿ c) (hbc : b ⩿ c) (hab : a ≠ b) : a ⊔ b = c
-- Mathlib/Logic/Equiv/Fin.lean
theorem finSuccAboveEquiv_apply (p : Fin (n + 1)) (i : Fin n) :
    finSuccAboveEquiv p i = ⟨p.succAbove i, p.succAbove_ne i⟩
-- Mathlib/Algebra/Divisibility/Units.lean
/-- In a monoid, an element a divides an element b iff all associates of `a` divide `b`. -/
@[simp]
theorem mul_right_dvd (hu : IsUnit u) : a * u ∣ b ↔ a ∣ b
-- .lake/packages/batteries/Batteries/Data/Rat/Lemmas.lean
theorem intCast_zero : ((0 : Int) : Rat) = (0 : Rat)
-- Mathlib/Algebra/Star/Unitary.lean
/-- Unitary conjugation preserves the spectrum, star on right. -/
@[simp]
lemma spectrum.unitary_conjugate' {a : A} {u : unitary A} :
    spectrum R ((star u : A) * a * u) = spectrum R a
-- Mathlib/AlgebraicGeometry/Morphisms/Basic.lean
lemma comp {UX : Scheme.{u}} (H : P f) (i : UX ⟶ X) [IsOpenImmersion i] :
    P (i ≫ f)
-- Mathlib/Algebra/MvPolynomial/Expand.lean
@[simp]
theorem expand_X (p : ℕ) (i : σ) : expand p (X i : MvPolynomial σ R) = X i ^ p
-- Mathlib/MeasureTheory/Measure/Stieltjes.lean
@[ext] lemma ext {f g : StieltjesFunction} (h : ∀ x, f x = g x) : f = g
-- Mathlib/CategoryTheory/Pi/Basic.lean
/-- The equivalences given by `Pi.eqToEquivalence` are compatible with reindexing. -/
@[simps!]
def Pi.eqToEquivalenceFunctorIso (f : J → I) {i' j' : J} (h : i' = j') :
    (Pi.eqToEquivalence C (congr_arg f h)).functor ≅
      (Pi.eqToEquivalence (fun i' => C (f i')) h).functor
-- Mathlib/Order/RelClasses.lean
lemma subset_antisymm [IsAntisymm α (· ⊆ ·)] : a ⊆ b → b ⊆ a → a = b
-- Mathlib/Algebra/BigOperators/Finprod.lean
@[to_additive]
theorem finprod_pow (hf : (mulSupport f).Finite) (n : ℕ) : (∏ᶠ i, f i) ^ n = ∏ᶠ i, f i ^ n
-- Mathlib/LinearAlgebra/CliffordAlgebra/Contraction.lean
/-- This is [bourbaki2007][] $9 Lemma 3. -/
theorem changeForm_changeForm (x : CliffordAlgebra Q) :
    changeForm h' (changeForm h x) = changeForm (changeForm.add_proof h h') x
-- Mathlib/Algebra/Star/Subalgebra.lean
theorem StarAlgHom.restrictScalars_injective :
    Function.Injective (StarAlgHom.restrictScalars R : (A →⋆ₐ[S] B) → A →⋆ₐ[R] B)
-- Mathlib/Topology/Compactness/Compact.lean
theorem mem_cocompact : s ∈ cocompact X ↔ ∃ t, IsCompact t ∧ tᶜ ⊆ s
-- Mathlib/Algebra/Order/Group/Unbundled/Abs.lean
@[simp] lemma abs_apply (f : ∀ i, α i) (i : ι) : |f| i = |f i|
-- Mathlib/Algebra/Homology/ShortComplex/Ab.lean
lemma abCyclesIso_inv_apply_iCycles (x : AddMonoidHom.ker S.g) :
    S.iCycles (S.abCyclesIso.inv x) = x
-- Mathlib/Algebra/DualNumber.lean
/-- Scaling on the right is sent by `DualNumber.lift` to multiplication on the right -/
@[simp] theorem lift_op_smul (fe : {fe : (A →ₐ[R] B) × B // _}) (a : A) (ad : A[ε]) :
    lift fe (MulOpposite.op a • ad) = lift fe ad * fe.val.1 a
-- Mathlib/Order/Monotone/Basic.lean
theorem Nat.rel_of_forall_rel_succ_of_lt (r : β → β → Prop) [IsTrans β r] {f : ℕ → β}
    (h : ∀ n, r (f n) (f (n + 1))) ⦃a b : ℕ⦄ (hab : a < b) : r (f a) (f b)
-- Mathlib/NumberTheory/NumberField/Embeddings.lean
lemma isComplex_mk_iff {φ : K →+* ℂ} :
    IsComplex (mk φ) ↔ ¬ ComplexEmbedding.IsReal φ
-- Mathlib/Algebra/Order/Interval/Basic.lean
@[to_additive]
theorem snd_mul : (s * t).snd = s.snd * t.snd