ruc-ai4math/mathlib_handler_benchmark_410 huggingface dataset:
-- .lake/packages/lean4/src/lean/Init/Data/Nat/Dvd.lean
theorem dvd_mod_iff {k m n : Nat} (h: k ∣ n) : k ∣ m % n ↔ k ∣ m
-- Mathlib/Algebra/Group/Hom/Basic.lean
@[to_additive]
theorem comp_mul [Mul M] [CommSemigroup N] [CommSemigroup P] (g : N →ₙ* P) (f₁ f₂ : M →ₙ* N) :
    g.comp (f₁ * f₂) = g.comp f₁ * g.comp f₂
-- Mathlib/Tactic/Peel.lean
private theorem frequently_imp {α : Type*} {p q : α → Prop} {f : Filter α}
    (hq : ∀ (x : α), p x → q x) (hp : ∃ᶠ (x : α) in f, p x) : ∃ᶠ (x : α) in f, q x
-- Mathlib/Data/Nat/PartENat.lean
theorem withTopEquiv_symm_coe (n : Nat) : withTopEquiv.symm n = n
-- .lake/packages/lean4/src/lean/Init/Data/Fin/Lemmas.lean
theorem castSucc_ne_zero_iff (a : Fin (n + 1)) : castSucc a ≠ 0 ↔ a ≠ 0
-- Mathlib/Topology/Homotopy/Contractible.lean
theorem id_nullhomotopic (X : Type*) [TopologicalSpace X] [ContractibleSpace X] :
    (ContinuousMap.id X).Nullhomotopic
-- Mathlib/ModelTheory/Satisfiability.lean
theorem isSatisfiable_iUnion_iff_isSatisfiable_iUnion_finset {ι : Type*} (T : ι → L.Theory) :
    IsSatisfiable (⋃ i, T i) ↔ ∀ s : Finset ι, IsSatisfiable (⋃ i ∈ s, T i)
-- Mathlib/Order/WellFoundedSet.lean
theorem partiallyWellOrderedOn_iff_exists_monotone_subseq :
    s.PartiallyWellOrderedOn r ↔
      ∀ f : ℕ → α, (∀ n, f n ∈ s) → ∃ g : ℕ ↪o ℕ, ∀ m n : ℕ, m ≤ n → r (f (g m)) (f (g n))
-- Mathlib/Combinatorics/SimpleGraph/Basic.lean
@[simp]
theorem mem_incidenceSet (v w : V) : s(v, w) ∈ G.incidenceSet v ↔ G.Adj v w
-- Mathlib/Probability/Distributions/Gaussian.lean
lemma gaussianReal_absolutelyContinuous' (μ : ℝ) {v : ℝ≥0} (hv : v ≠ 0) :
    volume ≪ gaussianReal μ v
-- Mathlib/Data/Set/Lattice.lean
theorem iUnion_ite (f g : ι → Set α) :
    ⋃ i, (if p i then f i else g i) = (⋃ (i) (_ : p i), f i) ∪ ⋃ (i) (_ : ¬p i), g i
-- Mathlib/Algebra/AddConstMap/Basic.lean
@[scoped simp]
theorem map_int_add' [AddCommGroupWithOne G] [AddGroup H] [AddConstMapClass F G H 1 b]
    (f : F) (n : ℤ) (x : G) : f (↑n + x) = f x + n • b
-- Mathlib/Data/Nat/Factorization/Basic.lean
theorem ord_proj_mul_ord_compl_eq_self (n p : ℕ) : ord_proj[p] n * ord_compl[p] n = n
-- Mathlib/MeasureTheory/Measure/Typeclasses.lean
theorem sigmaFinite_iff : SigmaFinite μ ↔ Nonempty (μ.FiniteSpanningSetsIn univ)
-- Mathlib/Combinatorics/Young/YoungDiagram.lean
theorem mk_mem_row_iff {μ : YoungDiagram} {i j : ℕ} : (i, j) ∈ μ.row i ↔ (i, j) ∈ μ
-- .lake/packages/lean4/src/lean/Init/Data/Nat/Lemmas.lean
protected theorem pow_right_comm (a m n : Nat) : (a ^ m) ^ n = (a ^ n) ^ m
-- Mathlib/CategoryTheory/Preadditive/Injective.lean
theorem enoughInjectives_of_enoughProjectives_op [EnoughProjectives Cᵒᵖ] : EnoughInjectives C
-- Mathlib/Order/Filter/Basic.lean
@[simp]
theorem principal_singleton (a : α) : 𝓟 {a} = pure a
-- Mathlib/CategoryTheory/Limits/Shapes/WideEqualizers.lean
/-- If `C` has all limits of diagrams `parallelFamily f`, then it has all wide equalizers -/
theorem hasWideEqualizers_of_hasLimit_parallelFamily
    [∀ {J : Type w} {X Y : C} {f : J → (X ⟶ Y)}, HasLimit (parallelFamily f)] :
    HasWideEqualizers.{w} C
-- Mathlib/RingTheory/Localization/Algebra.lean
/-- The canonical linear map from the kernel of `g` to the kernel of its localization
is localizing. In other words, localization commutes with taking kernels. -/
lemma RingHom.toKerIsLocalization_isLocalizedModule (hT : Submonoid.map g M = T) :
    IsLocalizedModule M (toKerIsLocalization S Q g (hT.symm ▸ Submonoid.le_comap_map M))
-- Mathlib/Analysis/InnerProductSpace/OfNorm.lean
private theorem nat_prop (r : ℕ) : innerProp' E (r : 𝕜)
-- Mathlib/Algebra/Homology/ShortComplex/Basic.lean
/-- The natural transformation `π₂ ⟶ π₃` induced by `S.g` for all `S : ShortComplex C`. -/
@[simps] def π₂Toπ₃ : (π₂ : _ ⥤ C) ⟶ π₃
-- Mathlib/Algebra/Divisibility/Basic.lean
theorem exists_dvd_and_dvd_of_dvd_mul [DecompositionMonoid α] {b c a : α} (H : a ∣ b * c) :
    ∃ a₁ a₂, a₁ ∣ b ∧ a₂ ∣ c ∧ a = a₁ * a₂
-- .lake/packages/lean4/src/lean/Init/Omega/IntList.lean
@[simp] theorem set_nil_zero : set [] 0 y = [y]
-- Mathlib/Analysis/SpecialFunctions/Trigonometric/Angle.lean
theorem zsmul_eq_iff {ψ θ : Angle} {z : ℤ} (hz : z ≠ 0) :
    z • ψ = z • θ ↔ ∃ k : Fin z.natAbs, ψ = θ + (k : ℕ) • (2 * π / z : ℝ)
-- Mathlib/Order/WithBot.lean
@[simp]
theorem ofDual_le_ofDual_iff {a b : WithBot αᵒᵈ} : WithBot.ofDual a ≤ WithBot.ofDual b ↔ b ≤ a
-- Mathlib/Analysis/Convex/Independent.lean
theorem Convex.convexIndependent_extremePoints (hs : Convex 𝕜 s) :
    ConvexIndependent 𝕜 ((↑) : s.extremePoints 𝕜 → E)
-- Mathlib/Order/Filter/Ultrafilter.lean
@[simp]
theorem map_pure (m : α → β) (a : α) : map m (pure a) = pure (m a)
-- Mathlib/Condensed/TopCatAdjunction.lean
/-- The counit of the adjunction `condensedSetToTopCat ⊣ topCatToCondensedSet` -/
@[simps]
def topCatAdjunctionCounit (X : TopCat.{u+1}) : X.toCondensedSet.toTopCat ⟶ X
-- Mathlib/Combinatorics/Quiver/Path.lean
theorem comp_inj' {p₁ p₂ : Path a b} {q₁ q₂ : Path b c} (h : p₁.length = p₂.length) :
    p₁.comp q₁ = p₂.comp q₂ ↔ p₁ = p₂ ∧ q₁ = q₂
-- Mathlib/Computability/Primrec.lean
theorem Primrec.comp₂ {f : γ → σ} {g : α → β → γ} (hf : Primrec f) (hg : Primrec₂ g) :
    Primrec₂ fun a b => f (g a b)
-- Mathlib/RingTheory/Congruence/Basic.lean
@[simp, norm_cast]
theorem coe_iInf {ι : Sort*} (f : ι → RingCon R) : ⇑(iInf f) = ⨅ i, ⇑(f i)
-- Mathlib/Data/Set/Function.lean
theorem InjOn.imageFactorization_injective (h : InjOn f s) :
    Injective (s.imageFactorization f)
-- Mathlib/RingTheory/LittleWedderburn.lean
/-- A finite domain is a field. See also `littleWedderburn` and `Fintype.divisionRingOfIsDomain`. -/
theorem Finite.isDomain_to_isField (D : Type*) [Finite D] [Ring D] [IsDomain D] : IsField D
-- Mathlib/NumberTheory/NumberField/Embeddings.lean
@[simp]
theorem conjugate_coe_eq (φ : K →+* ℂ) (x : K) : (conjugate φ) x = conj (φ x)
-- Mathlib/RingTheory/WittVector/Compare.lean
theorem commutes' {m : ℕ} (hm : n ≤ m) (x : ZMod (p ^ m)) :
    truncate hm (zmodEquivTrunc p m x) = zmodEquivTrunc p n (ZMod.castHom (pow_dvd_pow p hm) _ x)
-- Mathlib/CategoryTheory/Monoidal/Functor.lean
/-- The cartesian product of two monoidal functors is monoidal. -/
@[simps]
def prod : MonoidalFunctor (B × D) (C × E)
-- Mathlib/Analysis/SpecialFunctions/Complex/Analytic.lean
/-- `exp ∘ f` is analytic -/
theorem AnalyticAt.cexp (fa : AnalyticAt ℂ f x) : AnalyticAt ℂ (fun z ↦ exp (f z)) x
-- Mathlib/Topology/Semicontinuous.lean
theorem upperSemicontinuousOn_ciInf {f : ι → α → δ'}
    (bdd : ∀ x ∈ s, BddBelow (range fun i => f i x)) (h : ∀ i, UpperSemicontinuousOn (f i) s) :
    UpperSemicontinuousOn (fun x' => ⨅ i, f i x') s
-- Mathlib/Logic/Equiv/Basic.lean
@[simp]
theorem swap_self (a : α) : swap a a = Equiv.refl _
-- Mathlib/Algebra/Order/Field/Unbundled/Basic.lean
@[simp] lemma inv_nonpos : a⁻¹ ≤ 0 ↔ a ≤ 0
-- Mathlib/Algebra/Module/Equiv/Defs.lean
theorem ext_iff : e = e' ↔ ∀ x, e x = e' x
-- Mathlib/Data/Matroid/Closure.lean
lemma Basis'.closure_eq_closure (h : M.Basis' I X) : M.closure I = M.closure X
-- Mathlib/RingTheory/IntegralClosure/IntegralRestrict.lean
@[simp, nolint unusedHavesSuffices] -- false positive from unfolding galRestrictHom
lemma galRestrictHom_symm_algebraMap_apply (σ : B →ₐ[A] B) (x : B) :
    (galRestrictHom A K L B).symm σ (algebraMap B L x) = algebraMap B L (σ x)
-- .lake/packages/lean4/src/lean/Init/Data/Nat/Basic.lean
protected theorem add_sub_cancel_left (n m : Nat) : n + m - n = m
-- Mathlib/Analysis/SpecialFunctions/Log/Base.lean
theorem eq_one_of_pos_of_logb_eq_zero (h₁ : 0 < x) (h₂ : logb b x = 0) : x = 1
-- Mathlib/Data/Set/Card.lean
theorem encard_union_eq (h : Disjoint s t) : (s ∪ t).encard = s.encard + t.encard
-- Mathlib/Dynamics/Circle/RotationNumber/TranslationNumber.lean
theorem floor_sub_le_translationNumber (x : ℝ) : ↑⌊f x - x⌋ ≤ τ f
-- Mathlib/SetTheory/Ordinal/Arithmetic.lean
theorem sup_eq_sSup {s : Set Ordinal.{u}} (hs : Small.{u} s) :
    (sup.{u, u} fun x => (@equivShrink s hs).symm x) = sSup s
-- Mathlib/CategoryTheory/Limits/Shapes/Pullback/CommSq.lean
/-- Given a pullback square assembled from a commuting square on the left and
a pullback square on the right, the left square is a pullback square.

The objects in the statement fit into the following diagram:
```
X₁₁ - h₁₁ -> X₁₂ - h₁₂ -> X₁₃
|            |            |
v₁₁          v₁₂          v₁₃
↓            ↓            ↓
X₂₁ - h₂₁ -> X₂₂ - h₂₂ -> X₂₃
```
-/
theorem of_right {X₁₁ X₁₂ X₁₃ X₂₁ X₂₂ X₂₃ : C} {h₁₁ : X₁₁ ⟶ X₁₂} {h₁₂ : X₁₂ ⟶ X₁₃} {h₂₁ : X₂₁ ⟶ X₂₂}
    {h₂₂ : X₂₂ ⟶ X₂₃} {v₁₁ : X₁₁ ⟶ X₂₁} {v₁₂ : X₁₂ ⟶ X₂₂} {v₁₃ : X₁₃ ⟶ X₂₃}
    (s : IsPullback (h₁₁ ≫ h₁₂) v₁₁ v₁₃ (h₂₁ ≫ h₂₂)) (p : h₁₁ ≫ v₁₂ = v₁₁ ≫ h₂₁)
    (t : IsPullback h₁₂ v₁₂ v₁₃ h₂₂) : IsPullback h₁₁ v₁₁ v₁₂ h₂₁
-- Mathlib/Analysis/CstarAlgebra/ContinuousFunctionalCalculus/Unique.lean
@[simp high]
lemma realContinuousMapOfNNReal_apply_comp_toReal (φ : C(X, ℝ≥0) →⋆ₐ[ℝ≥0] A)
    (f : C(X, ℝ≥0)) :
    φ.realContinuousMapOfNNReal ((ContinuousMap.mk toReal continuous_coe).comp f) = φ f
-- Mathlib/Algebra/Polynomial/AlgebraMap.lean
@[simp]
theorem mapAlgEquiv_id : mapAlgEquiv (@AlgEquiv.refl R A _ _ _) = AlgEquiv.refl
-- Mathlib/SetTheory/ZFC/Basic.lean
@[simp]
theorem mem_powerset {x y : ZFSet.{u}} : y ∈ powerset x ↔ y ⊆ x
-- Mathlib/MeasureTheory/Measure/MeasureSpace.lean
protected lemma add (h1 : μ₁ ≪ ν) (h2 : μ₂ ≪ ν') : μ₁ + μ₂ ≪ ν + ν'
-- .lake/packages/lean4/src/lean/Init/Data/Nat/Dvd.lean
protected theorem dvd_of_mul_dvd_mul_left
    (kpos : 0 < k) (H : k * m ∣ k * n) : m ∣ n
-- Mathlib/RingTheory/FractionalIdeal/Basic.lean
@[simp]
theorem mul_eq_mul (I J : FractionalIdeal S P) : mul I J = I * J
-- Mathlib/Analysis/BoxIntegral/Box/Basic.lean
theorem nonempty_coe : Set.Nonempty (I : Set (ι → ℝ))
-- Mathlib/NumberTheory/NumberField/Embeddings.lean
/-- A field extension is unramified at infinite places if every infinite place is unramified. -/
class IsUnramifiedAtInfinitePlaces : Prop where
  isUnramified : ∀ w : InfinitePlace K, w.IsUnramified k
-- Mathlib/Data/PFunctor/Multivariate/M.lean
theorem M.map_dest {α β : TypeVec n} (g : (α ::: P.M α) ⟹ (β ::: P.M β)) (x : P.M α)
    (h : ∀ x : P.M α, lastFun g x = (dropFun g <$$> x : P.M β)) :
    g <$$> M.dest P x = M.dest P (dropFun g <$$> x)
-- Mathlib/MeasureTheory/Covering/Vitali.lean
/-- **Vitali covering theorem**: given a set `t` of subsets of a type, one may extract a disjoint
subfamily `u` such that the `τ`-enlargment of this family covers all elements of `t`, where `τ > 1`
is any fixed number.

When `t` is a family of balls, the `τ`-enlargment of `ball x r` is `ball x ((1+2τ) r)`. In general,
it is expressed in terms of a function `δ` (think "radius" or "diameter"), positive and bounded on
all elements of `t`. The condition is that every element `a` of `t` should intersect an
element `b` of `u` of size larger than that of `a` up to `τ`, i.e., `δ b ≥ δ a / τ`.

We state the lemma slightly more generally, with an indexed family of sets `B a` for `a ∈ t`, for
wider applicability.
-/
theorem exists_disjoint_subfamily_covering_enlargment (B : ι → Set α) (t : Set ι) (δ : ι → ℝ)
    (τ : ℝ) (hτ : 1 < τ) (δnonneg : ∀ a ∈ t, 0 ≤ δ a) (R : ℝ) (δle : ∀ a ∈ t, δ a ≤ R)
    (hne : ∀ a ∈ t, (B a).Nonempty) :
    ∃ u ⊆ t,
      u.PairwiseDisjoint B ∧ ∀ a ∈ t, ∃ b ∈ u, (B a ∩ B b).Nonempty ∧ δ a ≤ τ * δ b
-- .lake/packages/lean4/src/lean/Init/Core.lean
theorem not_false_iff : (¬False) ↔ True
-- Mathlib/Data/ZMod/Basic.lean
lemma isUnit_iff_coprime (m n : ℕ) : IsUnit (m : ZMod n) ↔ m.Coprime n
-- Mathlib/AlgebraicGeometry/EllipticCurve/Jacobian.lean
lemma nonsingular_iff_of_Z_ne_zero {P : Fin 3 → F} (hPz : P z ≠ 0) :
    W.Nonsingular P ↔ W.Equation P ∧ (eval P W.polynomialX ≠ 0 ∨ eval P W.polynomialY ≠ 0)
-- Mathlib/Analysis/NormedSpace/AddTorsor.lean
@[simp]
theorem dist_midpoint_right (p₁ p₂ : P) :
    dist (midpoint 𝕜 p₁ p₂) p₂ = ‖(2 : 𝕜)‖⁻¹ * dist p₁ p₂
-- Mathlib/Data/Complex/Determinant.lean
/-- The determinant of `conjAe`, as a linear map. -/
@[simp]
theorem det_conjAe : LinearMap.det conjAe.toLinearMap = -1
-- Mathlib/Data/Finset/Basic.lean
theorem mem_symmDiff : a ∈ s ∆ t ↔ a ∈ s ∧ a ∉ t ∨ a ∈ t ∧ a ∉ s
-- Mathlib/Order/Lattice.lean
theorem inf_lt_of_left_lt (h : a < c) : a ⊓ b < c
-- Mathlib/Data/Matroid/Dual.lean
theorem setOf_dual_base_eq : {B | M✶.Base B} = (fun X ↦ M.E \ X) '' {B | M.Base B}
-- Mathlib/Geometry/Euclidean/Inversion/Basic.lean
theorem inversion_of_mem_sphere (h : x ∈ Metric.sphere c R) : inversion c R x = x
-- Mathlib/RingTheory/Binomial.lean
theorem choose_succ_succ [NatPowAssoc R] (r : R) (k : ℕ) :
    choose (r + 1) (k + 1) = choose r k + choose r (k + 1)
-- Mathlib/CategoryTheory/Sites/CoversTop.lean
lemma familyOfElements_apply (hx : x.IsCompatible) {X Z : C} (f : Z ⟶ X) (i : I) (φ : Z ⟶ Y i) :
    familyOfElements x X f ⟨i, ⟨φ⟩⟩ = F.map φ.op (x i)
-- Mathlib/Algebra/Lie/Subalgebra.lean
theorem inclusion_apply (x : K) : inclusion h x = ⟨x.1, h x.2⟩
-- Mathlib/Order/OrderIsoNat.lean
theorem exists_increasing_or_nonincreasing_subseq' (r : α → α → Prop) (f : ℕ → α) :
    ∃ g : ℕ ↪o ℕ,
      (∀ n : ℕ, r (f (g n)) (f (g (n + 1)))) ∨ ∀ m n : ℕ, m < n → ¬r (f (g m)) (f (g n))
-- Mathlib/RingTheory/RootsOfUnity/Basic.lean
@[simp]
theorem rootsOfUnityEquivNthRoots_apply (x : rootsOfUnity k R) :
    (rootsOfUnityEquivNthRoots R k x : R) = ((x : Rˣ) : R)
-- Mathlib/Algebra/Order/Ring/Unbundled/Basic.lean
theorem Antitone.const_mul_of_nonpos [ExistsAddOfLE α] [PosMulMono α]
    [CovariantClass α α (swap (· + ·)) (· ≤ ·)] [ContravariantClass α α (swap (· + ·)) (· ≤ ·)]
    (hf : Antitone f) (ha : a ≤ 0) : Monotone fun x => a * f x
-- Mathlib/Logic/Relation.lean
lemma reflexive_reflGen : Reflexive (ReflGen r)
-- Mathlib/RingTheory/HahnSeries/Basic.lean
@[simp]
theorem coeff_fun_eq_zero_iff {x : HahnSeries Γ R} : x.coeff = 0 ↔ x = 0
-- Mathlib/Data/Ordmap/Ordset.lean
theorem insert'.valid [IsTotal α (· ≤ ·)] [@DecidableRel α (· ≤ ·)] (x : α) {t} (h : Valid t) :
    Valid (insert' x t)
-- Mathlib/Topology/Constructions.lean
lemma Pi.induced_precomp' {ι' : Type*} (φ : ι' → ι) :
    induced (fun (f : (∀ i, π i)) (j : ι') ↦ f (φ j)) Pi.topologicalSpace =
    ⨅ i', induced (eval (φ i')) (T (φ i'))
-- Mathlib/Topology/Order/OrderClosed.lean
protected theorem Dense.exists_ge [NoMaxOrder α] {s : Set α} (hs : Dense s) (x : α) :
    ∃ y ∈ s, x ≤ y
-- Mathlib/Algebra/Algebra/Hom.lean
/-- `AlgHomClass F R A B` asserts `F` is a type of bundled algebra homomorphisms
from `A` to `B`.  -/
class AlgHomClass (F : Type*) (R A B : outParam Type*)
  [CommSemiring R] [Semiring A] [Semiring B] [Algebra R A] [Algebra R B]
  [FunLike F A B] extends RingHomClass F A B : Prop where
  commutes : ∀ (f : F) (r : R), f (algebraMap R A r) = algebraMap R B r
-- Mathlib/Data/List/Chain.lean
theorem Chain'.append (h₁ : Chain' R l₁) (h₂ : Chain' R l₂)
    (h : ∀ x ∈ l₁.getLast?, ∀ y ∈ l₂.head?, R x y) : Chain' R (l₁ ++ l₂)
-- Mathlib/CategoryTheory/Preadditive/Basic.lean
@[simp]
theorem forkOfKernelFork_ι (c : KernelFork (f - g)) : (forkOfKernelFork c).ι = c.ι
-- Mathlib/Data/Nat/Choose/Dvd.lean
lemma dvd_choose_self (hp : Prime p) (hk : k ≠ 0) (hkp : k < p) : p ∣ choose p k
-- Mathlib/MeasureTheory/Integral/CircleIntegral.lean
/-- If `n ≠ -1` is an integer number, then the integral of `(z - w) ^ n` over the circle equals
zero. -/
theorem integral_sub_zpow_of_ne {n : ℤ} (hn : n ≠ -1) (c w : ℂ) (R : ℝ) :
    (∮ z in C(c, R), (z - w) ^ n) = 0
-- Mathlib/RingTheory/DedekindDomain/FiniteAdeleRing.lean
@[simp]
lemma ProdAdicCompletions.algebraMap_apply' (k : K) :
    algebraMap K (K_hat R K) k v = (k : v.adicCompletion K)
-- Mathlib/Algebra/GroupWithZero/WithZero.lean
lemma map'_zero (f : α →* β) : map' f 0 = 0
-- Mathlib/RingTheory/RootsOfUnity/Basic.lean
protected theorem orderOf (ζ : M) : IsPrimitiveRoot ζ (orderOf ζ)
-- Mathlib/LinearAlgebra/AffineSpace/Restrict.lean
theorem AffineMap.restrict.bijective {E : AffineSubspace k P₁} [Nonempty E] {φ : P₁ →ᵃ[k] P₂}
    (hφ : Function.Injective φ) : Function.Bijective (φ.restrict (le_refl (E.map φ)))
-- Mathlib/RingTheory/DedekindDomain/AdicValuation.lean
/-- Nonzero divisors have nonzero valuation. -/
theorem intValuation_ne_zero' (x : nonZeroDivisors R) : v.intValuationDef x ≠ 0
-- Mathlib/Algebra/Group/Hom/Defs.lean
@[to_additive]
theorem MulHom.coe_copy_eq {_ : Mul M} {_ : Mul N} (f : M →ₙ* N) (f' : M → N) (h : f' = f) :
    f.copy f' h = f
-- Mathlib/CategoryTheory/Sites/Over.lean
lemma overEquiv_iff {X : C} {Y : Over X} (S : Sieve Y) {Z : C} (f : Z ⟶ Y.left) :
    overEquiv Y S f ↔ S (Over.homMk f : Over.mk (f ≫ Y.hom) ⟶ Y)
-- Mathlib/Analysis/Convex/Deriv.lean
lemma le_slope_of_hasDerivWithinAt (hfc : ConcaveOn ℝ S f) (hx : x ∈ S) (hy : y ∈ S) (hxy : x < y)
    (hf' : HasDerivWithinAt f f' S y) :
    f' ≤ slope f x y
-- Mathlib/CategoryTheory/Subobject/FactorThru.lean
theorem factors_of_le {Y Z : C} {P Q : Subobject Y} (f : Z ⟶ Y) (h : P ≤ Q) :
    P.Factors f → Q.Factors f
-- Mathlib/Topology/Order/OrderClosed.lean
theorem Iic_mem_nhds (h : a < b) : Iic b ∈ 𝓝 a
-- Mathlib/Analysis/NormedSpace/Multilinear/Curry.lean
@[simp]
theorem ContinuousMultilinearMap.apply_zero_curry0 (f : G[×0]→L[𝕜] G') {x : Fin 0 → G} :
    ContinuousMultilinearMap.curry0 𝕜 G (f x) = f
-- Mathlib/Data/Nat/Lattice.lean
theorem biUnion_lt_succ' (u : ℕ → Set α) (n : ℕ) : ⋃ k < n + 1, u k = u 0 ∪ ⋃ k < n, u (k + 1)
-- Mathlib/Data/List/Pi.lean
@[simp] lemma cons_eta (f : ∀ j ∈ i :: l, α j) :
    cons _ _ (head f) (tail f) = f
-- Mathlib/Analysis/BoxIntegral/DivergenceTheorem.lean
/-- Auxiliary lemma for the divergence theorem. -/
theorem norm_volume_sub_integral_face_upper_sub_lower_smul_le {f : (Fin (n + 1) → ℝ) → E}
    {f' : (Fin (n + 1) → ℝ) →L[ℝ] E} (hfc : ContinuousOn f (Box.Icc I)) {x : Fin (n + 1) → ℝ}
    (hxI : x ∈ (Box.Icc I)) {a : E} {ε : ℝ} (h0 : 0 < ε)
    (hε : ∀ y ∈ (Box.Icc I), ‖f y - a - f' (y - x)‖ ≤ ε * ‖y - x‖) {c : ℝ≥0}
    (hc : I.distortion ≤ c) :
    ‖(∏ j, (I.upper j - I.lower j)) • f' (Pi.single i 1) -
      (integral (I.face i) ⊥ (f ∘ i.insertNth (α := fun _ ↦ ℝ) (I.upper i)) BoxAdditiveMap.volume -
        integral (I.face i) ⊥ (f ∘ i.insertNth (α := fun _ ↦ ℝ) (I.lower i))
          BoxAdditiveMap.volume)‖ ≤
      2 * ε * c * ∏ j, (I.upper j - I.lower j)
-- Mathlib/Data/Finset/Basic.lean
theorem disjoint_of_erase_right (ha : a ∉ s) (hst : Disjoint s (t.erase a)) : Disjoint s t
-- Mathlib/MeasureTheory/Integral/IntervalIntegral.lean
protected theorem aestronglyMeasurable (h : IntervalIntegrable f μ a b) :
    AEStronglyMeasurable f (μ.restrict (Ioc a b))
-- Mathlib/Algebra/Ring/Subring/Basic.lean
theorem coe_bot : ((⊥ : Subring R) : Set R) = Set.range ((↑) : ℤ → R)
-- Mathlib/Data/Complex/Exponential.lean
@[simp]
theorem expNear_zero (x r) : expNear 0 x r = r
-- .lake/packages/lean4/src/lean/Init/Data/Int/DivModLemmas.lean
theorem mod_nonneg : ∀ {a : Int} (b : Int), 0 ≤ a → 0 ≤ mod a b
-- Mathlib/Algebra/Ring/NegOnePow.lean
@[simp]
lemma negOnePow_neg (n : ℤ) : (-n).negOnePow = n.negOnePow
-- Mathlib/Logic/Relation.lean
lemma reflGen_eq_self (hr : Reflexive r) : ReflGen r = r
-- Mathlib/Analysis/SpecialFunctions/Complex/Circle.lean
theorem expMapCircle_eq_expMapCircle {x y : ℝ} :
    expMapCircle x = expMapCircle y ↔ ∃ m : ℤ, x = y + m * (2 * π)
-- Mathlib/LinearAlgebra/SesquilinearForm.lean
theorem domRestrict (H : B.IsRefl) (p : Submodule R₁ M₁) : (B.domRestrict₁₂ p p).IsRefl
-- Mathlib/Order/RelIso/Basic.lean
theorem map_rel_iff (f : r ≃r s) {a b} : s (f a) (f b) ↔ r a b
-- Mathlib/Data/Matrix/Basic.lean
theorem transpose_injective : Function.Injective (transpose : Matrix m n α → Matrix n m α)
-- Mathlib/AlgebraicGeometry/ProjectiveSpectrum/Topology.lean
theorem vanishingIdeal_closure (t : Set (ProjectiveSpectrum 𝒜)) :
    vanishingIdeal (closure t) = vanishingIdeal t
-- Mathlib/Data/Multiset/Basic.lean
theorem choose_property (hp : ∃! a, a ∈ l ∧ p a) : p (choose p l hp)
-- Mathlib/GroupTheory/MonoidLocalization/Basic.lean
/-- The type of AddMonoid homomorphisms satisfying the characteristic predicate: if `f : M →+ N`
satisfies this predicate, then `N` is isomorphic to the localization of `M` at `S`. -/
-- Porting note(#5171): this linter isn't ported yet.
-- @[nolint has_nonempty_instance]
structure LocalizationMap extends AddMonoidHom M N where
  map_add_units' : ∀ y : S, IsAddUnit (toFun y)
  surj' : ∀ z : N, ∃ x : M × S, z + toFun x.2 = toFun x.1
  exists_of_eq : ∀ x y, toFun x = toFun y → ∃ c : S, ↑c + x = ↑c + y
-- Mathlib/FieldTheory/Laurent.lean
@[simp]
theorem laurent_X : laurent r X = X + C r
-- Mathlib/FieldTheory/Finite/Basic.lean
/-- **Fermat's Little Theorem**: for all nonzero `a : ZMod p`, we have `a ^ (p - 1) = 1`. -/
theorem pow_card_sub_one_eq_one {p : ℕ} [Fact p.Prime] {a : ZMod p} (ha : a ≠ 0) :
    a ^ (p - 1) = 1
-- Mathlib/Topology/Homotopy/Contractible.lean
theorem hequiv [ContractibleSpace X] [ContractibleSpace Y] :
    Nonempty (X ≃ₕ Y)
-- Mathlib/Topology/UniformSpace/Compact.lean
/-- On a compact uniform space, the topology determines the uniform structure, entourages are
exactly the neighborhoods of the diagonal. -/
theorem nhdsSet_diagonal_eq_uniformity [CompactSpace α] : 𝓝ˢ (diagonal α) = 𝓤 α
-- Mathlib/Algebra/BigOperators/Group/Finset.lean
@[to_additive (attr := simp)]
theorem prod_const (b : β) : ∏ _x ∈ s, b = b ^ s.card
-- Mathlib/Topology/PartialHomeomorph.lean
@[simp, mfld_simps]
theorem transPartialHomeomorph_trans (e : X ≃ₜ Y) (f : PartialHomeomorph Y Z)
    (f' : PartialHomeomorph Z Z') :
    (e.transPartialHomeomorph f).trans f' = e.transPartialHomeomorph (f.trans f')
-- Mathlib/LinearAlgebra/Determinant.lean
theorem Basis.smul_det {G} [Group G] [DistribMulAction G M] [SMulCommClass G R M]
    (g : G) (v : ι → M) :
    (g • e).det v = e.det (g⁻¹ • v)
-- Mathlib/CategoryTheory/Adjunction/Basic.lean
/-- Transport being a right adjoint along a natural isomorphism. -/
lemma isRightAdjoint_of_iso {F G : C ⥤ D} (h : F ≅ G) [F.IsRightAdjoint] :
    IsRightAdjoint G
-- Mathlib/Algebra/Order/Ring/Int.lean
/-- Note this holds in marginally more generality than `Int.cast_mul` -/
lemma cast_mul_eq_zsmul_cast {α : Type*} [AddCommGroupWithOne α] :
    ∀ m n : ℤ, ↑(m * n) = m • (n : α)
-- Mathlib/Order/Monotone/Basic.lean
theorem StrictAnti.isMin_of_apply (hf : StrictAnti f) (ha : IsMax (f a)) : IsMin a
-- Mathlib/Algebra/Category/Grp/EpiMono.lean
theorem fromCoset_eq_of_mem_range {b : B} (hb : b ∈ f.range) :
    fromCoset ⟨b • ↑f.range, b, rfl⟩ = fromCoset ⟨f.range, 1, one_leftCoset _⟩
-- Mathlib/Order/SuccPred/CompleteLinearOrder.lean
lemma sSup_mem_of_not_isSuccLimit (hlim : ¬ IsSuccLimit (sSup s)) :
    sSup s ∈ s
-- Mathlib/Order/UpperLower/Basic.lean
@[simp]
nonrec theorem Iio_bot [OrderBot α] : Iio (⊥ : α) = ⊥
-- Mathlib/Algebra/Homology/HomotopyCategory/HomComplexShift.lean
@[simp]
lemma rightShift_zero (a n' : ℤ) (hn' : n' + a = n) :
    (0 : Cochain K L n).rightShift a n' hn' = 0
-- Mathlib/Order/WithBot.lean
@[simp]
theorem ofDual_apply_coe (a : αᵒᵈ) : WithTop.ofDual (a : WithTop αᵒᵈ) = ofDual a
-- Mathlib/Algebra/GCDMonoid/Finset.lean
theorem extract_gcd' (f g : β → α) (hs : ∃ x, x ∈ s ∧ f x ≠ 0)
    (hg : ∀ b ∈ s, f b = s.gcd f * g b) : s.gcd g = 1
-- Mathlib/Data/Real/EReal.lean
lemma le_div_iff_mul_le {a b c : EReal} (h : b > 0) (h' : b ≠ ⊤) :
    a ≤ c / b ↔ a * b ≤ c
-- Mathlib/GroupTheory/Perm/Fin.lean
theorem cycleType_finRotate_of_le {n : ℕ} (h : 2 ≤ n) : cycleType (finRotate n) = {n}
-- Mathlib/Probability/Kernel/Condexp.lean
lemma condexpKernel_ae_eq_condexp' [IsFiniteMeasure μ] {s : Set Ω} (hs : MeasurableSet s) :
    (fun ω ↦ (condexpKernel μ m ω s).toReal) =ᵐ[μ] μ⟦s | m ⊓ mΩ⟧
-- Mathlib/Data/List/GetD.lean
theorem getI_zero_eq_headI : l.getI 0 = l.headI
-- Mathlib/NumberTheory/LucasLehmer.lean
@[simp]
theorem neg_fst (x : X q) : (-x).1 = -x.1
-- Mathlib/Data/Subtype.lean
@[simp, nolint simpNF]
theorem _root_.exists_subtype_mk_eq_iff {a : Subtype p} {b : α} :
    (∃ h : p b, Subtype.mk b h = a) ↔ b = a
-- Mathlib/Algebra/Module/Equiv/Defs.lean
theorem eq_symm_comp {α : Type*} (f : α → M₁) (g : α → M₂) : f = e₁₂.symm ∘ g ↔ e₁₂ ∘ f = g
-- Mathlib/Analysis/InnerProductSpace/PiL2.lean
/-- An `n`-dimensional `InnerProductSpace` equipped with a decomposition as an internal direct
sum has an orthonormal basis indexed by `Fin n` and subordinate to that direct sum. -/
irreducible_def DirectSum.IsInternal.subordinateOrthonormalBasis
    (hV' : OrthogonalFamily 𝕜 (fun i => V i) fun i => (V i).subtypeₗᵢ) :
    OrthonormalBasis (Fin n) 𝕜 E