ruc-ai4math/mathlib_handler_benchmark_410 huggingface dataset:
-- Mathlib/RingTheory/HahnSeries/Multiplication.lean
theorem smul_coeff_right [SMulZeroClass R V] {x : HahnSeries Γ R} {y : HahnModule Γ' R V} {a : Γ'}
    {s : Set Γ'} (hs : s.IsPWO) (hys : ((of R).symm y).support ⊆ s) :
    ((of R).symm <| x • y).coeff a =
      ∑ ij ∈ VAddAntidiagonal x.isPWO_support hs a,
        x.coeff ij.fst • ((of R).symm y).coeff ij.snd
-- Mathlib/AlgebraicGeometry/ProjectiveSpectrum/Topology.lean
theorem zeroLocus_iUnion {γ : Sort*} (s : γ → Set A) :
    zeroLocus 𝒜 (⋃ i, s i) = ⋂ i, zeroLocus 𝒜 (s i)
-- Mathlib/Data/Int/Cast/Prod.lean
@[simp]
theorem snd_intCast (n : ℤ) : (n : α × β).snd = n
-- Mathlib/MeasureTheory/MeasurableSpace/Basic.lean
@[nontriviality, measurability]
theorem measurable_of_subsingleton_codomain [Subsingleton β] (f : α → β) : Measurable f
-- Mathlib/AlgebraicGeometry/Morphisms/Basic.lean
theorem restrict (hf : P f) (U : Y.affineOpens) :
    Q (f ∣_ U)
-- Mathlib/Data/List/Sublists.lean
theorem sublistsAux_eq_bind :
    sublistsAux = fun (a : α) (r : List (List α)) => r.bind fun l => [l, a :: l]
-- Mathlib/LinearAlgebra/Finsupp.lean
@[simp 1500]
theorem mapRange.linearEquiv_toAddEquiv (f : M ≃ₗ[R] N) :
    (mapRange.linearEquiv f).toAddEquiv = (mapRange.addEquiv f.toAddEquiv : (α →₀ M) ≃+ _)
-- Mathlib/Data/Analysis/Filter.lean
@[simp]
theorem principal_σ (s : Set α) : (Realizer.principal s).σ = Unit
-- Mathlib/Analysis/Calculus/Dslope.lean
theorem differentiableAt_dslope_of_ne (h : b ≠ a) :
    DifferentiableAt 𝕜 (dslope f a) b ↔ DifferentiableAt 𝕜 f b
-- Mathlib/Geometry/Manifold/MFDeriv/SpecificFunctions.lean
theorem hasMFDerivAt_fst (x : M × M') :
    HasMFDerivAt (I.prod I') I Prod.fst x
      (ContinuousLinearMap.fst 𝕜 (TangentSpace I x.1) (TangentSpace I' x.2))
-- Mathlib/Deprecated/Subgroup.lean
@[to_additive]
theorem inv_mem_iff : a⁻¹ ∈ s ↔ a ∈ s
-- Mathlib/Algebra/Order/Monoid/Unbundled/WithTop.lean
/-- A version of `WithTop.map` for `AddHom`s. -/
@[simps (config := .asFn)]
protected def _root_.AddHom.withTopMap {M N : Type*} [Add M] [Add N] (f : AddHom M N) :
    AddHom (WithTop M) (WithTop N)
-- Mathlib/Topology/ContinuousFunction/Bounded.lean
theorem add_apply : (f + g) x = f x + g x
-- Mathlib/Computability/Primrec.lean
protected theorem and : Primrec₂ and
-- Mathlib/Topology/Order/IntermediateValue.lean
theorem IsPreconnected.ordConnected {s : Set α} (h : IsPreconnected s) : OrdConnected s
-- Mathlib/CategoryTheory/Functor/KanExtension/Basic.lean
lemma isRightKanExtension_iff_isIso {F' : D ⥤ H} {F'' : D ⥤ H} (φ : F'' ⟶ F')
    {L : C ⥤ D} {F : C ⥤ H} (α : L ⋙ F' ⟶ F) (α' : L ⋙ F'' ⟶ F)
    (comm : whiskerLeft L φ ≫ α = α') [F'.IsRightKanExtension α] :
    F''.IsRightKanExtension α' ↔ IsIso φ
-- Mathlib/Algebra/Order/Sub/Canonical.lean
theorem tsub_self_add (a b : α) : a - (a + b) = 0
-- Mathlib/Data/Multiset/Fintype.lean
@[simp]
theorem Multiset.map_univ {β : Type*} (m : Multiset α) (f : α → β) :
    ((Finset.univ : Finset m).val.map fun (x : m) ↦ f (x : α)) = m.map f
-- Mathlib/Algebra/Order/Ring/Unbundled/Basic.lean
@[simp]
theorem mul_nonneg_iff_of_pos_left [PosMulStrictMono α]
    (h : 0 < c) : 0 ≤ c * b ↔ 0 ≤ b
-- Mathlib/Topology/UniformSpace/Ascoli.lean
/-- Let `X` be a compact topological space, `α` a uniform space, and `F : ι → (X → α)` an
equicontinuous family. Then, the topologies of uniform convergence and pointwise convergence induce
the same topology on `ι`.

In other words, pointwise convergence and uniform convergence coincide on an equicontinuous
subset of `X → α`.

This is a consequence of `Equicontinuous.comap_uniformFun_eq`, stated in terms of `Inducing`
for convenuence. -/
lemma Equicontinuous.inducing_uniformFun_iff_pi [TopologicalSpace ι] [CompactSpace X]
    (F_eqcont : Equicontinuous F) :
    Inducing (UniformFun.ofFun ∘ F) ↔ Inducing F
-- Mathlib/Data/Set/Pointwise/SMul.lean
theorem zero_mem_smul_set (h : (0 : β) ∈ t) : (0 : β) ∈ a • t
-- Mathlib/RingTheory/Polynomial/Content.lean
@[simp]
theorem normUnit_content {p : R[X]} : normUnit (content p) = 1
-- Mathlib/CategoryTheory/Comma/Over.lean
@[simp]
theorem eqToHom_right {X : T} {U V : Under X} (e : U = V) :
    (eqToHom e).right = eqToHom (e ▸ rfl : U.right = V.right)
-- Mathlib/MeasureTheory/Function/LpSeminorm/Basic.lean
theorem Memℒp.const_mul {R} [NormedRing R] {f : α → R} (hf : Memℒp f p μ) (c : R) :
    Memℒp (fun x => c * f x) p μ
-- Mathlib/CategoryTheory/Functor/Derived/RightDerived.lean
lemma HasRightDerivedFunctor.mk' [RF.IsRightDerivedFunctor α W] :
    HasRightDerivedFunctor F W
-- Mathlib/Order/Filter/Basic.lean
theorem eventuallyEq_set {s t : Set α} {l : Filter α} : s =ᶠ[l] t ↔ ∀ᶠ x in l, x ∈ s ↔ x ∈ t
-- Mathlib/Algebra/Order/BigOperators/Group/Finset.lean
@[to_additive (attr := simp) sum_eq_zero_iff]
theorem prod_eq_one_iff' : ∏ x ∈ s, f x = 1 ↔ ∀ x ∈ s, f x = 1
-- .lake/packages/lean4/src/lean/Init/Data/Fin/Lemmas.lean
theorem sub_def (a b : Fin n) : a - b = Fin.mk (((n - b) + a) % n) (Nat.mod_lt _ a.size_pos)
-- Mathlib/Order/RelSeries.lean
lemma head_mem (x : RelSeries r) : x.head ∈ x
-- Mathlib/Analysis/Calculus/InverseFunctionTheorem/ApproximatesLinearOn.lean
@[simp]
theorem toPartialHomeomorph_coe (hf : ApproximatesLinearOn f (f' : E →L[𝕜] F) s c)
    (hc : Subsingleton E ∨ c < N⁻¹) (hs : IsOpen s) :
    (hf.toPartialHomeomorph f s hc hs : E → F) = f
-- Mathlib/CategoryTheory/Functor/KanExtension/Basic.lean
lemma isLeftKanExtension_iff_of_iso₂ {F₁' F₂' : D ⥤ H} (α₁ : F₁ ⟶ L ⋙ F₁') (α₂ : F₂ ⟶ L ⋙ F₂')
    (e : F₁ ≅ F₂) (e' : F₁' ≅ F₂') (h : α₁ ≫ whiskerLeft L e'.hom = e.hom ≫ α₂) :
    F₁'.IsLeftKanExtension α₁ ↔ F₂'.IsLeftKanExtension α₂
-- Mathlib/Algebra/Order/GroupWithZero/Unbundled.lean
theorem lt_mul_of_le_of_one_lt' [PosMulStrictMono α] [MulPosMono α] (bc : b ≤ c) (ha : 1 < a)
    (a0 : 0 ≤ a) (b0 : 0 < b) : b < c * a
-- Mathlib/Geometry/Manifold/SmoothManifoldWithCorners.lean
/-- The groupoid of `0`-times continuously differentiable maps is just the groupoid of all
partial homeomorphisms -/
theorem contDiffGroupoid_zero_eq : contDiffGroupoid 0 I = continuousGroupoid H
-- Mathlib/Algebra/Polynomial/Eval.lean
@[simp]
theorem eval₂_at_ofNat {S : Type*} [Semiring S] (f : R →+* S) (n : ℕ) [n.AtLeastTwo] :
    p.eval₂ f (no_index (OfNat.ofNat n)) = f (p.eval (OfNat.ofNat n))
-- Mathlib/Topology/LocallyConstant/Algebra.lean
/-- The constant-function embedding, as a multiplicative monoid hom. -/
@[to_additive (attr := simps) "The constant-function embedding, as an additive monoid hom."]
def constMonoidHom [MulOneClass Y] : Y →* LocallyConstant X Y
-- Mathlib/Topology/Homotopy/HomotopyGroup.lean
theorem symmAt_indep {i} (j) (f : Ω^ N X x) :
    (⟦symmAt i f⟧ : HomotopyGroup N X x) = ⟦symmAt j f⟧
-- Mathlib/Order/Disjoint.lean
/-- A complemented bounded lattice is one where every element has a (not necessarily unique)
complement. -/
class ComplementedLattice (α) [Lattice α] [BoundedOrder α] : Prop where
  /-- In a `ComplementedLattice`, every element admits a complement. -/
  exists_isCompl : ∀ a : α, ∃ b : α, IsCompl a b
-- Mathlib/MeasureTheory/Constructions/Prod/Basic.lean
theorem AbsolutelyContinuous.prod [SFinite ν'] (h1 : μ ≪ μ') (h2 : ν ≪ ν') :
    μ.prod ν ≪ μ'.prod ν'
-- Mathlib/Probability/Kernel/Disintegration/CdfToKernel.lean
lemma lintegral_toKernel_mem [IsFiniteKernel κ] (hf : IsCondKernelCDF f κ ν)
    (a : α) {s : Set (β × ℝ)} (hs : MeasurableSet s) :
    ∫⁻ b, hf.toKernel f (a, b) {y | (b, y) ∈ s} ∂(ν a) = κ a s
-- Mathlib/Algebra/Category/Ring/Basic.lean
@[ext] theorem ext_of {X Y : Type u} [Semiring X] [Semiring Y] (f g : X →+* Y)
    (h : ∀ x, f x = g x) :
    @Eq (SemiRingCat.of X ⟶ SemiRingCat.of Y) f g
-- Mathlib/Algebra/Homology/ShortComplex/RightHomology.lean
@[reassoc (attr := simp)] lemma p_g' : h.p ≫ h.g' = S.g
-- Mathlib/Algebra/Module/Equiv/Defs.lean
theorem symm_comp_eq {α : Type*} (f : α → M₁) (g : α → M₂) : e₁₂.symm ∘ g = f ↔ g = e₁₂ ∘ f
-- Mathlib/Data/Set/Basic.lean
theorem le_iff_subset : s ≤ t ↔ s ⊆ t
-- Mathlib/Order/Concept.lean
@[simp]
theorem extentClosure_union (t₁ t₂ : Set β) :
    extentClosure r (t₁ ∪ t₂) = extentClosure r t₁ ∩ extentClosure r t₂
-- Mathlib/Data/Bool/Basic.lean
theorem eq_false_of_not_eq_true {b : Bool} : ¬b = true → b = false
-- Mathlib/Data/List/Basic.lean
theorem modifyLast.go_append_one (f : α → α) (a : α) (tl : List α) (r : Array α) :
    modifyLast.go f (tl ++ [a]) r = (r.toListAppend <| modifyLast.go f (tl ++ [a]) #[])
-- Mathlib/Init/Logic.lean
theorem ExistsUnique.elim {α : Sort u} {p : α → Prop} {b : Prop}
    (h₂ : ∃! x, p x) (h₁ : ∀ x, p x → (∀ y, p y → y = x) → b) : b
-- Mathlib/Computability/RegularExpressions.lean
@[simp]
theorem deriv_char_self (a : α) : deriv (char a) a = 1
-- Mathlib/Algebra/CharP/ExpChar.lean
theorem frobenius_add : frobenius R p (x + y) = frobenius R p x + frobenius R p y
-- .lake/packages/lean4/src/lean/Init/Data/Nat/Basic.lean
theorem ge_of_not_lt {n m : Nat} (h : ¬ n < m) : n ≥ m
-- Mathlib/Data/Finsupp/Fin.lean
@[simp]
theorem tail_cons : tail (cons y s) = s
-- Mathlib/Algebra/GradedMonoid.lean
/-- If all grades are the same type and themselves form a monoid, then there is a trivial grading
structure. -/
@[simps gnpow]
instance Monoid.gMonoid [AddMonoid ι] [Monoid R] : GradedMonoid.GMonoid fun _ : ι => R
-- Mathlib/Topology/Order.lean
theorem nhds_iInf {ι : Sort*} {t : ι → TopologicalSpace α} {a : α} :
    @nhds α (iInf t) a = ⨅ i, @nhds α (t i) a
-- Mathlib/Order/Filter/Bases.lean
theorem hasBasis_iInf {ι : Type*} {ι' : ι → Type*} {l : ι → Filter α} {p : ∀ i, ι' i → Prop}
    {s : ∀ i, ι' i → Set α} (hl : ∀ i, (l i).HasBasis (p i) (s i)) :
    (⨅ i, l i).HasBasis
      (fun If : Σ I : Set ι, ∀ i : I, ι' i => If.1.Finite ∧ ∀ i : If.1, p i (If.2 i)) fun If =>
      ⋂ i : If.1, s i (If.2 i)
-- Mathlib/Topology/LocallyFinite.lean
theorem exists_mem_basis {ι' : Sort*} (hf : LocallyFinite f) {p : ι' → Prop} {s : ι' → Set X}
    {x : X} (hb : (𝓝 x).HasBasis p s) : ∃ i, p i ∧ { j | (f j ∩ s i).Nonempty }.Finite
-- Mathlib/RingTheory/Int/Basic.lean
theorem natAbs_euclideanDomain_gcd (a b : ℤ) :
    Int.natAbs (EuclideanDomain.gcd a b) = Int.gcd a b
-- Mathlib/Logic/Equiv/Basic.lean
/-- For a fixed function `x₀ : {a // p a} → β` defined on a subtype of `α`,
the subtype of functions `x : α → β` that agree with `x₀` on the subtype `{a // p a}`
is naturally equivalent to the type of functions `{a // ¬ p a} → β`. -/
@[simps]
def subtypePreimage : { x : α → β // x ∘ Subtype.val = x₀ } ≃ ({ a // ¬p a } → β)
-- Mathlib/Analysis/Complex/Basic.lean
lemma mul_conj' (z : ℂ) : z * conj z = ‖z‖ ^ 2
-- Mathlib/Topology/Algebra/FilterBasis.lean
theorem smul {U : Set M} (hU : U ∈ B) : ∃ V ∈ 𝓝 (0 : R), ∃ W ∈ B, V • W ⊆ U
-- Mathlib/CategoryTheory/Limits/Shapes/Products.lean
@[reassoc (attr := simp)]
theorem ι_comp_sigmaComparison [HasCoproduct f] [HasCoproduct fun b => G.obj (f b)] (b : β) :
    Sigma.ι _ b ≫ sigmaComparison G f = G.map (Sigma.ι f b)
-- Mathlib/Algebra/Order/AbsoluteValue.lean
protected theorem nonneg (x : R) : 0 ≤ abv x
-- Mathlib/Algebra/Star/Order.lean
@[simp]
lemma star_neg_iff {x : R} : star x < 0 ↔ x < 0
-- Mathlib/Algebra/Algebra/Operations.lean
theorem mul_le : M * N ≤ P ↔ ∀ m ∈ M, ∀ n ∈ N, m * n ∈ P
-- Mathlib/Algebra/Order/CauSeq/Basic.lean
protected theorem sup_comm (a b : CauSeq α abs) : a ⊔ b = b ⊔ a
-- Mathlib/MeasureTheory/Measure/Regular.lean
/-- If `μ` is a weakly regular measure, then any open set can be approximated by a closed subset. -/
theorem _root_.IsOpen.exists_lt_isClosed [WeaklyRegular μ] ⦃U : Set α⦄ (hU : IsOpen U) {r : ℝ≥0∞}
    (hr : r < μ U) : ∃ F, F ⊆ U ∧ IsClosed F ∧ r < μ F
-- Mathlib/Algebra/Ring/Divisibility/Lemmas.lean
lemma dvd_smul_of_dvd {M : Type*} [SMul M R] [Semigroup R] [SMulCommClass M R R] {x y : R}
    (m : M) (h : x ∣ y) : x ∣ m • y
-- Mathlib/FieldTheory/NormalClosure.lean
/-- A normal closure is always normal. -/
lemma IsNormalClosure.normal [h : IsNormalClosure F K L] : Normal F L
-- Mathlib/Data/Int/Cast/Lemmas.lean
@[simp]
theorem Int.castRingHom_int : Int.castRingHom ℤ = RingHom.id ℤ
-- Mathlib/Topology/MetricSpace/Bounded.lean
/-- The distance between two points in a set is controlled by the diameter of the set. -/
theorem dist_le_diam_of_mem (h : IsBounded s) (hx : x ∈ s) (hy : y ∈ s) : dist x y ≤ diam s
-- Mathlib/Probability/BorelCantelli.lean
theorem iIndepFun.indep_comap_natural_of_lt (hf : ∀ i, StronglyMeasurable (f i))
    (hfi : iIndepFun (fun _ => mβ) f μ) (hij : i < j) :
    Indep (MeasurableSpace.comap (f j) mβ) (Filtration.natural f hf i) μ
-- Mathlib/Algebra/GroupWithZero/Action/Defs.lean
/-- Typeclass for multiplicative actions on additive structures. This generalizes group modules. -/
@[ext]
class DistribMulAction (M A : Type*) [Monoid M] [AddMonoid A] extends MulAction M A where
  /-- Multiplying `0` by a scalar gives `0` -/
  smul_zero : ∀ a : M, a • (0 : A) = 0
  /-- Scalar multiplication distributes across addition -/
  smul_add : ∀ (a : M) (x y : A), a • (x + y) = a • x + a • y
-- Mathlib/Probability/Kernel/Basic.lean
theorem IsFiniteKernel.bound_ne_top (κ : Kernel α β) [IsFiniteKernel κ] :
    IsFiniteKernel.bound κ ≠ ∞
-- Mathlib/Algebra/Algebra/Hom.lean
@[simp]
theorem id_toRingHom : (AlgHom.id R A : A →+* A) = RingHom.id _
-- Mathlib/Geometry/RingedSpace/OpenImmersion.lean
@[simp]
theorem locallyRingedSpace_toLocallyRingedSpace {X Y : LocallyRingedSpace} (f : X ⟶ Y)
    [LocallyRingedSpace.IsOpenImmersion f] : toLocallyRingedSpace Y f.1 = X
-- .lake/packages/lean4/src/lean/Init/Data/BitVec/Lemmas.lean
@[simp] theorem getLsb_xor {x y : BitVec v} :
    (x ^^^ y).getLsb i = (xor (x.getLsb i) (y.getLsb i))
-- Mathlib/Analysis/InnerProductSpace/Calculus.lean
theorem contDiffWithinAt_euclidean {n : ℕ∞} :
    ContDiffWithinAt 𝕜 n f t y ↔ ∀ i, ContDiffWithinAt 𝕜 n (fun x => f x i) t y
-- Mathlib/Order/Heyting/Hom.lean
@[simp]
theorem coe_id : ⇑(HeytingHom.id α) = id
-- Mathlib/LinearAlgebra/Matrix/Block.lean
theorem BlockTriangular.toBlock_inverse_mul_toBlock_eq_one [LinearOrder α] [Invertible M]
    (hM : BlockTriangular M b) (k : α) :
    ((M⁻¹.toBlock (fun i => b i < k) fun i => b i < k) *
        M.toBlock (fun i => b i < k) fun i => b i < k) =
      1
-- Mathlib/CategoryTheory/Yoneda.lean
lemma fullyFaithful_preimage {X Y : C} (f : yoneda.obj X ⟶ yoneda.obj Y) :
    fullyFaithful.preimage f = f.app (op X) (𝟙 X)
-- Mathlib/Order/Interval/Set/Infinite.lean
theorem Ioo.infinite : Infinite (Ioo a b)
-- Mathlib/Order/UpperLower/Basic.lean
@[simp]
nonrec theorem Ioi_top [OrderTop α] : Ioi (⊤ : α) = ⊤
-- Mathlib/Logic/Embedding/Basic.lean
@[simp]
theorem embeddingCongr_refl {α β : Sort*} :
    embeddingCongr (Equiv.refl α) (Equiv.refl β) = Equiv.refl (α ↪ β)
-- Mathlib/CategoryTheory/Limits/Preserves/Shapes/Biproducts.lean
@[reassoc (attr := simp)]
theorem ι_biproductComparison' (j : J) :
    biproduct.ι _ j ≫ biproductComparison' F f = F.map (biproduct.ι f j)
-- Mathlib/Data/Nat/PartENat.lean
@[simp]
theorem get_zero (h : (0 : PartENat).Dom) : (0 : PartENat).get h = 0
-- Mathlib/Algebra/Group/Subgroup/Pointwise.lean
/-- An induction principle for elements of `⨆ i, S i`.
If `C` holds for `1` and all elements of `S i` for all `i`, and is preserved under multiplication,
then it holds for all elements of the supremum of `S`. -/
@[to_additive (attr := elab_as_elim) " An induction principle for elements of `⨆ i, S i`.
If `C` holds for `0` and all elements of `S i` for all `i`, and is preserved under addition,
then it holds for all elements of the supremum of `S`. "]
theorem iSup_induction {ι : Sort*} (S : ι → Subgroup G) {C : G → Prop} {x : G} (hx : x ∈ ⨆ i, S i)
    (mem : ∀ (i), ∀ x ∈ S i, C x) (one : C 1) (mul : ∀ x y, C x → C y → C (x * y)) : C x
-- Mathlib/LinearAlgebra/BilinearForm/Hom.lean
@[deprecated (since := "2024-04-26")]
theorem LinearMap.toBilin_symm :
    (LinearMap.toBilin.symm : BilinForm R M ≃ₗ[R] _) = BilinForm.toLin
-- Mathlib/CategoryTheory/Limits/Shapes/Diagonal.lean
@[reassoc (attr := simp)]
theorem pullback_diagonal_map_snd_snd_fst :
    (pullback.snd (diagonal f)
      (map (i₁ ≫ snd f i) (i₂ ≫ snd f i) f f (i₁ ≫ fst f i) (i₂ ≫ fst f i) i
        (by simp [condition]) (by simp [condition]))) ≫
      snd _ _ ≫ i₂ ≫ fst _ _ =
      pullback.fst _ _
-- Mathlib/LinearAlgebra/Matrix/ToLin.lean
@[simp]
theorem Matrix.toLinAlgEquiv'_toMatrixAlgEquiv' (f : (n → R) →ₗ[R] n → R) :
    Matrix.toLinAlgEquiv' (LinearMap.toMatrixAlgEquiv' f) = f
-- Mathlib/Topology/ContinuousOn.lean
theorem continuousOn_congr {f g : α → β} {s : Set α} (h' : EqOn g f s) :
    ContinuousOn g s ↔ ContinuousOn f s
-- Mathlib/Probability/Distributions/Uniform.lean
theorem isProbabilityMeasure {X : Ω → E} {s : Set E} (hns : μ s ≠ 0) (hnt : μ s ≠ ∞)
    (hu : IsUniform X s ℙ μ) : IsProbabilityMeasure ℙ
-- Mathlib/Analysis/SpecialFunctions/Trigonometric/Basic.lean
theorem cos_nat_mul_two_pi_sub (x : ℂ) (n : ℕ) : cos (n * (2 * π) - x) = cos x
-- Mathlib/Computability/Halting.lean
theorem of_eq {n} {f g : Vector ℕ n →. ℕ} (hf : Partrec' f) (H : ∀ i, f i = g i) : Partrec' g
-- Mathlib/Analysis/Calculus/ContDiff/Basic.lean
/-- The composition of `C^n` functions at points in domains is `C^n`,
  with a weaker condition on `s` and `t`. -/
theorem ContDiffWithinAt.comp_of_mem {s : Set E} {t : Set F} {g : F → G} {f : E → F} (x : E)
    (hg : ContDiffWithinAt 𝕜 n g t (f x)) (hf : ContDiffWithinAt 𝕜 n f s x)
    (hs : t ∈ 𝓝[f '' s] f x) : ContDiffWithinAt 𝕜 n (g ∘ f) s x
-- Mathlib/Analysis/CstarAlgebra/ContinuousFunctionalCalculus/Unital.lean
lemma cfc_nonpos_iff (f : R → R) (a : A) (hf : ContinuousOn f (spectrum R a) := by cfc_cont_tac)
    (ha : p a := by cfc_tac) : cfc f a ≤ 0 ↔ ∀ x ∈ spectrum R a, f x ≤ 0
-- Mathlib/Topology/MetricSpace/Antilipschitz.lean
theorem isBounded_preimage (hf : AntilipschitzWith K f) {s : Set β} (hs : IsBounded s) :
    IsBounded (f ⁻¹' s)
-- Mathlib/CategoryTheory/Subobject/Comma.lean
/-- If `A : S → T.obj B` is a structured arrow for `S : D` and `T : C ⥤ D`, then we can explicitly
    describe the subobjects of `A` as the subobjects `P` of `B` in `C` for which `A.hom` factors
    through the image of `P` under `T`. -/
@[simps!]
def subobjectEquiv [HasLimits C] [PreservesLimits T] (A : StructuredArrow S T) :
    Subobject A ≃o { P : Subobject A.right // ∃ q, q ≫ T.map P.arrow = A.hom }
-- Mathlib/Algebra/Homology/TotalComplex.lean
lemma d₂_eq (i₁ : I₁) {i₂ i₂' : I₂} (h : c₂.Rel i₂ i₂') (i₁₂ : I₁₂)
    (h' : ComplexShape.π c₁ c₂ c₁₂ ⟨i₁, i₂'⟩ = i₁₂) :
    K.d₂ c₁₂ i₁ i₂ i₁₂ = ComplexShape.ε₂ c₁ c₂ c₁₂ ⟨i₁, i₂⟩ • ((K.X i₁).d i₂ i₂' ≫
    K.ιTotal c₁₂ i₁ i₂' i₁₂ h')
-- .lake/packages/lean4/src/lean/Init/Data/List/TakeDrop.lean
@[simp]
theorem getElem?_drop (L : List α) (i j : Nat) : (L.drop i)[j]? = L[i + j]?
-- Mathlib/CategoryTheory/MorphismProperty/Limits.lean
theorem StableUnderCobaseChange.inl {P : MorphismProperty C} (hP : StableUnderCobaseChange P)
    {A B A' : C} (f : A ⟶ A') (g : A ⟶ B) [HasPushout f g] (H : P g) :
    P (pushout.inl f g)
-- Mathlib/Analysis/Convex/Basic.lean
theorem convex_Ioc (r s : β) : Convex 𝕜 (Ioc r s)
-- Mathlib/Algebra/Homology/ShortComplex/SnakeLemma.lean
@[reassoc]
lemma naturality_φ₁ (f : S₁ ⟶ S₂) : S₁.φ₁ ≫ f.f₂.τ₁ = functorP.map f ≫ S₂.φ₁
-- Mathlib/Algebra/Order/Hom/Basic.lean
@[to_additive]
theorem abs_sub_map_le_div [Group α] [LinearOrderedAddCommGroup β] [GroupSeminormClass F α β]
    (f : F) (x y : α) : |f x - f y| ≤ f (x / y)
-- Mathlib/Data/Set/Card.lean
theorem encard_le_encard_iff_encard_diff_le_encard_diff (h : (s ∩ t).Finite) :
    s.encard ≤ t.encard ↔ (s \ t).encard ≤ (t \ s).encard
-- Mathlib/Analysis/SpecialFunctions/Pow/NNReal.lean
theorem rpow_pos {p : ℝ} {x : ℝ≥0} (hx_pos : 0 < x) : 0 < x ^ p
-- Mathlib/Topology/Sequences.lean
/-- In a Fréchet-Urysohn space, a point belongs to the closure of a set iff it is a limit
of a sequence taking values in this set. -/
theorem mem_closure_iff_seq_limit [FrechetUrysohnSpace X] {s : Set X} {a : X} :
    a ∈ closure s ↔ ∃ x : ℕ → X, (∀ n : ℕ, x n ∈ s) ∧ Tendsto x atTop (𝓝 a)
-- Mathlib/Geometry/Manifold/ContMDiff/Product.lean
nonrec theorem SmoothOn.prod_mk_space {f : M → E'} {g : M → F'} (hf : SmoothOn I 𝓘(𝕜, E') f s)
    (hg : SmoothOn I 𝓘(𝕜, F') g s) : SmoothOn I 𝓘(𝕜, E' × F') (fun x => (f x, g x)) s
-- Mathlib/MeasureTheory/OuterMeasure/OfFunction.lean
theorem le_ofFunction {μ : OuterMeasure α} :
    μ ≤ OuterMeasure.ofFunction m m_empty ↔ ∀ s, μ s ≤ m s
-- Mathlib/Analysis/Normed/Operator/Banach.lean
theorem exists_nonlinearRightInverse_of_surjective (f : E →SL[σ] F)
    (hsurj : LinearMap.range f = ⊤) :
    ∃ fsymm : NonlinearRightInverse f, 0 < fsymm.nnnorm
-- Mathlib/Topology/Algebra/Module/Alternating/Basic.lean
@[simp] theorem coe_sub : ⇑(f - g) = ⇑f - ⇑g
-- Mathlib/Algebra/Category/Grp/Adjunctions.lean
@[simp]
theorem free_obj_coe {α : Type u} : (free.obj α : Type u) = FreeAbelianGroup α
-- Mathlib/Algebra/Order/Ring/Basic.lean
theorem sq_le_one_iff {a : R} (ha : 0 ≤ a) : a ^ 2 ≤ 1 ↔ a ≤ 1
-- Mathlib/Data/PFunctor/Multivariate/Basic.lean
@[simp]
theorem comp.get_mk (x : P (fun i => Q i α)) : comp.get (comp.mk x) = x
-- Mathlib/Data/Finset/Lattice.lean
@[simp]
theorem toDual_inf' [SemilatticeInf α] {s : Finset ι} (hs : s.Nonempty) (f : ι → α) :
    toDual (s.inf' hs f) = s.sup' hs (toDual ∘ f)
-- Mathlib/Analysis/InnerProductSpace/Calculus.lean
nonrec theorem ContDiffAt.norm_sq (hf : ContDiffAt ℝ n f x) : ContDiffAt ℝ n (‖f ·‖ ^ 2) x
-- Mathlib/CategoryTheory/Shift/ShiftSequence.lean
@[reassoc]
lemma isoShift_hom_naturality (n : M) {X Y : C} (f : X ⟶ Y) :
    F.map (f⟦n⟧') ≫ (F.isoShift n).hom.app Y =
      (F.isoShift n).hom.app X ≫ (F.shift n).map f
-- Mathlib/Data/Set/Function.lean
@[simp]
lemma graphOn_union (f : α → β) (s t : Set α) : graphOn f (s ∪ t) = graphOn f s ∪ graphOn f t
-- Mathlib/NumberTheory/SumTwoSquares.lean
/-- If the natural number `n` is a sum of two squares of coprime natural numbers, then
`-1` is a square modulo `n`. -/
theorem ZMod.isSquare_neg_one_of_eq_sq_add_sq_of_coprime {n x y : ℕ} (h : n = x ^ 2 + y ^ 2)
    (hc : x.Coprime y) : IsSquare (-1 : ZMod n)
-- Mathlib/Analysis/Normed/Group/SemiNormedGrp.lean
theorem iso_isometry_of_normNoninc {V W : SemiNormedGrp} (i : V ≅ W) (h1 : i.hom.NormNoninc)
    (h2 : i.inv.NormNoninc) : Isometry i.hom
-- Mathlib/Order/Atoms.lean
@[simp]
theorem isCoatom_dual_iff_isAtom [OrderBot α] {a : α} :
    IsCoatom (OrderDual.toDual a) ↔ IsAtom a
-- Mathlib/CategoryTheory/Limits/Shapes/Pullback/CommSq.lean
@[reassoc (attr := simp)]
theorem inr_isoPushout_hom (h : IsPushout f g inl inr) [HasPushout f g] :
    inr ≫ h.isoPushout.hom = pushout.inr _ _
-- Mathlib/Algebra/Category/Grp/EpiMono.lean
theorem h_apply_fromCoset' (x : B) (b : B) (hb : b ∈ f.range) :
    h x (fromCoset ⟨b • f.range, b, rfl⟩) = fromCoset ⟨b • ↑f.range, b, rfl⟩
-- Mathlib/LinearAlgebra/StdBasis.lean
@[simp]
theorem basis_repr (s : ∀ j, Basis (ιs j) R (Ms j)) (x) (ji) :
    (Pi.basis s).repr x ji = (s ji.1).repr (x ji.1) ji.2
-- Mathlib/Topology/Compactness/Compact.lean
theorem isCompact_iff_finite [DiscreteTopology X] : IsCompact s ↔ s.Finite
-- Mathlib/Geometry/Manifold/PartitionOfUnity.lean
protected theorem locallyFinite : LocallyFinite fun i => support (f i)
-- .lake/packages/lean4/src/lean/Init/Data/Nat/Log2.lean
theorem log2_terminates : ∀ n, n ≥ 2 → n / 2 < n
-- Mathlib/Algebra/Group/WithOne/Defs.lean
@[to_additive (attr := simp)]
theorem coe_ne_one {a : α} : (a : WithOne α) ≠ (1 : WithOne α)
-- .lake/packages/lean4/src/lean/Init/Omega/Int.lean
protected theorem le_of_not_lt {i j : Fin n} (h : ¬ i < j) : j ≤ i
-- Mathlib/Dynamics/BirkhoffSum/NormedSpace.lean
/-- If `f` is a non-strictly contracting map (i.e., it is Lipschitz with constant `1`)
and `g` is a uniformly continuous, then the Birkhoff averages of `g` along orbits of `f`
is a uniformly equicontinuous family of functions. -/
theorem uniformEquicontinuous_birkhoffAverage (hf : LipschitzWith 1 f) (hg : UniformContinuous g) :
    UniformEquicontinuous (birkhoffAverage 𝕜 f g)
-- Mathlib/Data/Set/Basic.lean
theorem diff_diff_right {s t u : Set α} : s \ (t \ u) = s \ t ∪ s ∩ u
-- Mathlib/CategoryTheory/Sites/DenseSubsite.lean
/--
Given a natural isomorphism `G ⋙ ℱ ≅ G ⋙ ℱ'` between presheaves of types,
where `G` is locally-full and cover-dense, and `ℱ, ℱ'` are sheaves,
we may obtain a natural isomorphism between presheaves.
-/
@[simps!]
noncomputable def presheafIso {ℱ ℱ' : SheafOfTypes.{v} K} (i : G.op ⋙ ℱ.val ≅ G.op ⋙ ℱ'.val) :
    ℱ.val ≅ ℱ'.val