ruc-ai4math/mathlib_handler_benchmark_410 huggingface dataset:
-- Mathlib/CategoryTheory/Monoidal/Category.lean
/-- The left unitor as a natural isomorphism. -/
@[simps!]
def leftUnitorNatIso : tensorUnitLeft C ≅ 𝟭 C
-- Mathlib/Algebra/Lie/Normalizer.lean
theorem normalizer_bot_eq_maxTrivSubmodule :
    (⊥ : LieSubmodule R L M).normalizer = LieModule.maxTrivSubmodule R L M
-- Mathlib/Data/Real/ENatENNReal.lean
/-- Coercion `ℕ∞ → ℝ≥0∞` as an `OrderEmbedding`. -/
@[simps! (config := .asFn)]
def toENNRealOrderEmbedding : ℕ∞ ↪o ℝ≥0∞
-- Mathlib/LinearAlgebra/Determinant.lean
@[simp]
theorem det_toMatrix' {ι : Type*} [Fintype ι] [DecidableEq ι] (f : (ι → A) →ₗ[A] ι → A) :
    Matrix.det (LinearMap.toMatrix' f) = LinearMap.det f
-- Mathlib/Algebra/Homology/HomotopyCategory/Shift.lean
lemma shiftFunctorComm_hom_app_f (K : CochainComplex C ℤ) (a b p : ℤ) :
    ((shiftFunctorComm (CochainComplex C ℤ) a b).hom.app K).f p =
      (K.XIsoOfEq (show p + b + a = p + a + b
        by rw [add_assoc, add_comm b, add_assoc])).hom
-- Mathlib/LinearAlgebra/Matrix/Hermitian.lean
/-- A matrix is hermitian iff the corresponding linear map is self adjoint. -/
theorem isHermitian_iff_isSymmetric [Fintype n] [DecidableEq n] {A : Matrix n n α} :
    IsHermitian A ↔ A.toEuclideanLin.IsSymmetric
-- Mathlib/Data/Nat/Dist.lean
theorem dist_tri_left' (n m : ℕ) : n ≤ dist n m + m
-- Mathlib/Data/Bool/Basic.lean
theorem forall_bool' {p : Bool → Prop} (b : Bool) : (∀ x, p x) ↔ p b ∧ p !b
-- Mathlib/Computability/PartrecCode.lean
/-- Proof that `Nat.Partrec.Code.ofNatCode` is the inverse of `Nat.Partrec.Code.encodeCode`-/
private theorem encode_ofNatCode : ∀ n, encodeCode (ofNatCode n) = n
-- Mathlib/Data/Set/NAry.lean
theorem image2_subset_right (hs : s ⊆ s') : image2 f s t ⊆ image2 f s' t
-- Mathlib/Algebra/Group/Units.lean
/-- The element of the group of units, corresponding to an element of a monoid which is a unit. As
opposed to `IsUnit.unit`, the inverse is computable and comes from the inversion on `α`. This is
useful to transfer properties of inversion in `Units α` to `α`. See also `toUnits`. -/
@[to_additive (attr := simps val )
"The element of the additive group of additive units, corresponding to an element of
an additive monoid which is an additive unit. As opposed to `IsAddUnit.addUnit`, the negation is
computable and comes from the negation on `α`. This is useful to transfer properties of negation
in `AddUnits α` to `α`. See also `toAddUnits`."]
def unit' (h : IsUnit a) : αˣ
-- .lake/packages/lean4/src/lean/Init/Data/Int/Order.lean
theorem ofNat_nonneg (n : Nat) : 0 ≤ (n : Int)
-- Mathlib/Order/Hom/Bounded.lean
@[simp]
theorem symm_dual_id : TopHom.dual.symm (BotHom.id _) = TopHom.id α
-- Mathlib/Data/PFun.lean
theorem core_def (s : Set β) : f.core s = { x | ∀ y, y ∈ f x → y ∈ s }
-- Mathlib/Data/Nat/Choose/Basic.lean
theorem choose_succ_succ (n k : ℕ) : choose (succ n) (succ k) = choose n k + choose n (succ k)
-- Mathlib/Topology/Algebra/Monoid.lean
/-- Construct a bundled monoid homomorphism `M₁ →* M₂` from a function `f` and a proof that it
belongs to the closure of the range of the coercion from `M₁ →* M₂` (or another type of bundled
homomorphisms that has a `MonoidHomClass` instance) to `M₁ → M₂`. -/
@[to_additive (attr := simps (config := .asFn))
  "Construct a bundled additive monoid homomorphism `M₁ →+ M₂` from a function `f`
and a proof that it belongs to the closure of the range of the coercion from `M₁ →+ M₂` (or another
type of bundled homomorphisms that has an `AddMonoidHomClass` instance) to `M₁ → M₂`."]
def monoidHomOfMemClosureRangeCoe (f : M₁ → M₂)
    (hf : f ∈ closure (range fun (f : F) (x : M₁) => f x)) : M₁ →* M₂
-- Mathlib/Algebra/Module/Submodule/RestrictScalars.lean
theorem restrictScalars_injective :
    Function.Injective (restrictScalars S : Submodule R M → Submodule S M)
-- Mathlib/RingTheory/WittVector/MulCoeff.lean
theorem mul_polyOfInterest_aux1 (n : ℕ) :
    ∑ i ∈ range (n + 1), (p : 𝕄) ^ i * wittMul p i ^ p ^ (n - i) = wittPolyProd p n
-- Mathlib/Order/Atoms.lean
theorem isAtom_iff {s : Set α} : IsAtom s ↔ ∃ x, s = {x}
-- Mathlib/Data/Quot.lean
@[simp]
theorem out_eq' (q : Quotient s₁) : Quotient.mk'' q.out' = q
-- Mathlib/SetTheory/Cardinal/Basic.lean
@[simp]
theorem lt_aleph0_iff_subtype_finite {p : α → Prop} : #{ x // p x } < ℵ₀ ↔ { x | p x }.Finite
-- Mathlib/Algebra/BigOperators/Intervals.lean
@[to_additive]
theorem prod_Ioc_consecutive (f : ℕ → M) {m n k : ℕ} (hmn : m ≤ n) (hnk : n ≤ k) :
    ((∏ i ∈ Ioc m n, f i) * ∏ i ∈ Ioc n k, f i) = ∏ i ∈ Ioc m k, f i
-- .lake/packages/lean4/src/lean/Init/Core.lean
theorem Ne.elim (h : a ≠ b) : a = b → False
-- Mathlib/MeasureTheory/Constructions/Prod/Integral.lean
/-- Change the order of Bochner integration. -/
theorem integral_integral_swap ⦃f : α → β → E⦄ (hf : Integrable (uncurry f) (μ.prod ν)) :
    ∫ x, ∫ y, f x y ∂ν ∂μ = ∫ y, ∫ x, f x y ∂μ ∂ν
-- Mathlib/MeasureTheory/Function/UnifTight.lean
/-- **Vitali's convergence theorem** (non-finite measure version).

A sequence of functions `f` converges to `g` in Lp
if and only if it is uniformly integrable, uniformly tight and converges to `g` in measure. -/
theorem tendstoInMeasure_iff_tendsto_Lp (hp : 1 ≤ p) (hp' : p ≠ ∞)
    (hf : ∀ n, Memℒp (f n) p μ) (hg : Memℒp g p μ) :
    TendstoInMeasure μ f atTop g ∧ UnifIntegrable f p μ ∧ UnifTight f p μ
      ↔ Tendsto (fun n => eLpNorm (f n - g) p μ) atTop (𝓝 0)
-- Mathlib/Analysis/SpecialFunctions/Log/NegMulLog.lean
lemma negMulLog_eq_neg : negMulLog = fun x ↦ - (x * log x)
-- Mathlib/LinearAlgebra/Dual.lean
/-- `e` and `ε` have characteristic properties of a basis and its dual -/
-- @[nolint has_nonempty_instance] Porting note (#5171): removed
structure Module.DualBases (e : ι → M) (ε : ι → Dual R M) : Prop where
  eval : ∀ i j : ι, ε i (e j) = if i = j then 1 else 0
  protected total : ∀ {m : M}, (∀ i, ε i m = 0) → m = 0
  protected finite : ∀ m : M, { i | ε i m ≠ 0 }.Finite := by
      use_finite_instance
-- Mathlib/Algebra/Group/Basic.lean
@[to_additive]
theorem mul_eq_of_eq_div (h : a = c / b) : a * b = c
-- Mathlib/Control/ULift.lean
@[simp]
theorem bind_up (a : α) (f : α → ULift β) : (ULift.up a).bind f = f a
-- Mathlib/Order/Interval/Finset/Basic.lean
@[simp]
theorem Ico_filter_lt (a b c : α) : ((Ico a b).filter fun x => x < c) = Ico a (min b c)
-- Mathlib/GroupTheory/GroupAction/Hom.lean
/-- If `DistribMulAction` of `M` and `N` on `A` commute,
  then for each `c : M`, `(c • ·)` is an `N`-action additive homomorphism. -/
@[simps]
def _root_.SMulCommClass.toDistribMulActionHom {M} (N A : Type*) [Monoid N] [AddMonoid A]
    [DistribSMul M A] [DistribMulAction N A] [SMulCommClass M N A] (c : M) : A →+[N] A
-- Mathlib/Tactic/CategoryTheory/Monoidal.lean
theorem mk_eq {α : Type _} (a b a' b' : α) (ha : a = a') (hb : b = b') (h : a' = b') : a = b
-- Mathlib/Topology/Inseparable.lean
lemma Inducing.specializingMap (hf : Inducing f) (h : StableUnderSpecialization (range f)) :
    SpecializingMap f
-- Mathlib/Geometry/Euclidean/Angle/Unoriented/Affine.lean
/-- If the second of three points is strictly between the other two, the angle at that point
(reversed) is π. -/
theorem _root_.Sbtw.angle₃₂₁_eq_pi {p₁ p₂ p₃ : P} (h : Sbtw ℝ p₁ p₂ p₃) : ∠ p₃ p₂ p₁ = π
-- Mathlib/Order/UpperLower/Basic.lean
protected theorem compl_iSup (f : ι → LowerSet α) : (⨆ i, f i).compl = ⨆ i, (f i).compl
-- Mathlib/Analysis/SpecialFunctions/Complex/Circle.lean
/-- `Complex.arg` and `expMapCircle` define an equivalence between `circle` and `(-π, π]`. -/
@[simps (config := .asFn)]
noncomputable def argEquiv : circle ≃ Ioc (-π) π
-- Mathlib/Order/Filter/AtTopBot.lean
/-- If `u` is a sequence which is unbounded above,
then after any point, it reaches a value strictly greater than all previous values.
-/
theorem high_scores [LinearOrder β] [NoMaxOrder β] {u : ℕ → β} (hu : Tendsto u atTop atTop) :
    ∀ N, ∃ n ≥ N, ∀ k < n, u k < u n
-- Mathlib/ModelTheory/Satisfiability.lean
theorem isMaximal [Nonempty M] : (L.completeTheory M).IsMaximal
-- Mathlib/Topology/Spectral/Hom.lean
theorem IsCompact.preimage_of_isOpen (hf : IsSpectralMap f) (h₀ : IsCompact s) (h₁ : IsOpen s) :
    IsCompact (f ⁻¹' s)
-- Mathlib/RingTheory/Adjoin/PowerBasis.lean
/-- The power basis `1, x, ..., x ^ (d - 1)` for `K[x]`,
where `d` is the degree of the minimal polynomial of `x`. See `Algebra.adjoin.powerBasis'` for
a version over a more general base ring. -/
@[simps gen dim]
noncomputable def adjoin.powerBasis {x : S} (hx : IsIntegral K x) :
    PowerBasis K (adjoin K ({x} : Set S))
-- Mathlib/Algebra/Group/Commute/Defs.lean
@[to_additive]
protected theorem left_comm (h : Commute a b) (c) : a * (b * c) = b * (a * c)
-- Mathlib/Data/Nat/Defs.lean
protected lemma mul_left_inj (ha : a ≠ 0) : b * a = c * a ↔ b = c
-- Mathlib/Data/Set/Finite.lean
theorem infinite_univ [h : Infinite α] : (@univ α).Infinite
-- Mathlib/Algebra/Order/Field/Basic.lean
theorem div_self_le_one (a : α) : a / a ≤ 1
-- Mathlib/Analysis/BoxIntegral/Partition/Tagged.lean
theorem forall_biUnionTagged (p : (ι → ℝ) → Box ι → Prop) (π : Prepartition I)
    (πi : ∀ J, TaggedPrepartition J) :
    (∀ J ∈ π.biUnionTagged πi, p ((π.biUnionTagged πi).tag J) J) ↔
      ∀ J ∈ π, ∀ J' ∈ πi J, p ((πi J).tag J') J'
-- Mathlib/Algebra/Quaternion.lean
theorem algebraMap_injective : (algebraMap R ℍ[R,c₁,c₂] : _ → _).Injective
-- Mathlib/CategoryTheory/Comma/Basic.lean
/-- The functor `(F ⋙ L, R) ⥤ (L, R)` -/
@[simps]
def preLeft (F : C ⥤ A) (L : A ⥤ T) (R : B ⥤ T) : Comma (F ⋙ L) R ⥤ Comma L R
-- Mathlib/Data/Set/Finite.lean
theorem Finite.exists_finset {s : Set α} (h : s.Finite) :
    ∃ s' : Finset α, ∀ a : α, a ∈ s' ↔ a ∈ s
-- Mathlib/CategoryTheory/Comma/Arrow.lean
/-- A functor `C ⥤ D` induces a functor between the corresponding arrow categories. -/
@[simps]
def mapArrow (F : C ⥤ D) : Arrow C ⥤ Arrow D
-- Mathlib/Combinatorics/Additive/AP/Three/Defs.lean
@[to_additive]
theorem threeGPFree_pi {ι : Type*} {α : ι → Type*} [∀ i, Monoid (α i)] {s : ∀ i, Set (α i)}
    (hs : ∀ i, ThreeGPFree (s i)) : ThreeGPFree ((univ : Set ι).pi s)
-- Mathlib/Topology/UniformSpace/Ascoli.lean
/-- Let `X` be a topological space, `𝔖` a covering of `X` by compact subsets, and
`α` a uniform space. An equicontinuous subset of `X → α` is closed in the topology of uniform
convergence on all `K ∈ 𝔖` iff it is closed in the topology of pointwise convergence.

This is a specialization of `EquicontinuousOn.isClosed_range_pi_of_uniformOnFun'` to the case where
`𝔖` covers `X`. -/
theorem EquicontinuousOn.isClosed_range_uniformOnFun_iff_pi
    {𝔖 : Set (Set X)} (𝔖_compact : ∀ K ∈ 𝔖, IsCompact K) (𝔖_covers : ⋃₀ 𝔖 = univ)
    (F_eqcont : ∀ K ∈ 𝔖, EquicontinuousOn F K) :
    IsClosed (range <| UniformOnFun.ofFun 𝔖 ∘ F) ↔
    IsClosed (range F)
-- Mathlib/Geometry/Manifold/Algebra/Monoid.lean
@[to_additive]
theorem smoothAt_finset_prod (h : ∀ i ∈ t, SmoothAt I' I (f i) x) :
    SmoothAt I' I (fun x => ∏ i ∈ t, f i x) x
-- Mathlib/Data/List/Chain.lean
theorem Chain'.iff {S : α → α → Prop} (H : ∀ a b, R a b ↔ S a b) {l : List α} :
    Chain' R l ↔ Chain' S l
-- Mathlib/Analysis/RCLike/Basic.lean
@[simp, rclike_simps]
theorem conjCLE_coe : (@conjCLE K _).toLinearEquiv = conjAe.toLinearEquiv
-- Mathlib/Topology/Algebra/Nonarchimedean/Basic.lean
/-- A topological group is nonarchimedean if every neighborhood of 1 contains an open subgroup. -/
@[to_additive]
class NonarchimedeanGroup (G : Type*) [Group G] [TopologicalSpace G] extends TopologicalGroup G :
  Prop where
  is_nonarchimedean : ∀ U ∈ 𝓝 (1 : G), ∃ V : OpenSubgroup G, (V : Set G) ⊆ U
-- Mathlib/FieldTheory/Adjoin.lean
/-- `F[S][T] = F[S ∪ T]` -/
theorem adjoin_adjoin_left (T : Set E) :
    (adjoin (adjoin F S) T).restrictScalars _ = adjoin F (S ∪ T)
-- Mathlib/Algebra/Quandle.lean
@[simp]
theorem envelAction_prop {R : Type*} [Rack R] (x y : R) :
    envelAction (toEnvelGroup R x) y = x ◃ y
-- .lake/packages/lean4/src/lean/Init/Data/Nat/Compare.lean
protected theorem compare_swap (a b : Nat) : (compare a b).swap = compare b a
-- Mathlib/Order/Monotone/Union.lean
/-- If `f` is strictly monotone both on `(-∞, a]` and `[a, ∞)`, then it is strictly monotone on the
whole line. -/
protected theorem StrictMonoOn.Iic_union_Ici (h₁ : StrictMonoOn f (Iic a))
    (h₂ : StrictMonoOn f (Ici a)) : StrictMono f
-- Mathlib/CategoryTheory/CatCommSq.lean
/-- Horizontal inverse of a 2-commutative square -/
@[simps! iso'_hom_app iso'_inv_app]
def hInv (_ : CatCommSq T.functor L R B.functor) : CatCommSq T.inverse R L B.inverse
-- Mathlib/Algebra/Polynomial/Induction.lean
theorem mem_span_C_coeff : f ∈ Ideal.span { g : R[X] | ∃ i : ℕ, g = C (coeff f i) }
-- Mathlib/Algebra/Category/ModuleCat/Monoidal/Basic.lean
@[simp]
theorem rightUnitor_hom_apply {M : ModuleCat.{u} R} (m : M) (r : R) :
    ((ρ_ M).hom : M ⊗ 𝟙_ (ModuleCat R) ⟶ M) (m ⊗ₜ r) = r • m
-- Mathlib/Data/Fintype/Prod.lean
theorem toFinset_off_diag {s : Set α} [DecidableEq α] [Fintype s] [Fintype s.offDiag] :
    s.offDiag.toFinset = s.toFinset.offDiag
-- Mathlib/Data/Real/Sqrt.lean
theorem sqrt_div_self' : √x / x = 1 / √x
-- Mathlib/Geometry/Manifold/PartitionOfUnity.lean
theorem smooth_sum : Smooth I 𝓘(ℝ) fun x => ∑ᶠ i, f i x
-- Mathlib/Algebra/Group/Submonoid/Units.lean
@[to_additive]
lemma mk_mul_mk_inv_eq_one (S : Submonoid M) {x : Mˣ} (h : x ∈ S.units) :
    (⟨_, h.1⟩ : S) * ⟨_, h.2⟩ = 1
-- Mathlib/MeasureTheory/Integral/FundThmCalculus.lean
/-- An auxiliary typeclass for the Fundamental theorem of calculus, part 1. It is used to formulate
theorems that work simultaneously for left and right one-sided derivatives of `∫ x in u..v, f x`. -/
class FTCFilter (a : outParam ℝ) (outer : Filter ℝ) (inner : outParam <| Filter ℝ) extends
    TendstoIxxClass Ioc outer inner : Prop where
  pure_le : pure a ≤ outer
  le_nhds : inner ≤ 𝓝 a
  [meas_gen : IsMeasurablyGenerated inner]
-- Mathlib/CategoryTheory/Limits/Shapes/Equalizers.lean
/-- A fork on `f g : X ⟶ Y` is determined by the morphism `ι : P ⟶ X` satisfying `ι ≫ f = ι ≫ g`.
-/
@[simps]
def Fork.ofι {P : C} (ι : P ⟶ X) (w : ι ≫ f = ι ≫ g) : Fork f g
-- Mathlib/Algebra/Polynomial/Degree/TrailingDegree.lean
theorem coeff_eq_zero_of_lt_natTrailingDegree {p : R[X]} {n : ℕ} (h : n < p.natTrailingDegree) :
    p.coeff n = 0
-- Mathlib/RingTheory/DedekindDomain/Ideal.lean
theorem coe_ideal_le_self_mul_inv (I : Ideal R₁) :
    (I : FractionalIdeal R₁⁰ K) ≤ I * (I : FractionalIdeal R₁⁰ K)⁻¹
-- Mathlib/CategoryTheory/Triangulated/Rotate.lean
/-- Given a triangle of the form:
```
      f       g       h
  X  ───> Y  ───> Z  ───> X⟦1⟧
```
applying `invRotate` gives a triangle that can be thought of as:
```
        -h⟦-1⟧'     f       g
  Z⟦-1⟧  ───>  X  ───> Y  ───> Z
```
(note that this diagram doesn't technically fit the definition of triangle, as `Z⟦-1⟧⟦1⟧` is
not necessarily equal to `Z`, but it is isomorphic, by the `counitIso` of `shiftEquiv C 1`)
-/
@[simps!]
def Triangle.invRotate (T : Triangle C) : Triangle C
-- Mathlib/SetTheory/Ordinal/Arithmetic.lean
theorem enumOrd_le_of_subset {S T : Set Ordinal} (hS : Unbounded (· < ·) S) (hST : S ⊆ T) (a) :
    enumOrd T a ≤ enumOrd S a
-- Mathlib/Data/DFinsupp/Multiset.lean
theorem toMultiset_injective : Injective (toMultiset : (Π₀ _a, ℕ) → Multiset α)
-- Mathlib/Algebra/Group/Support.lean
@[to_additive]
theorem mulSupport_comp_subset {g : M → N} (hg : g 1 = 1) (f : α → M) :
    mulSupport (g ∘ f) ⊆ mulSupport f
-- Mathlib/Analysis/Complex/TaylorSeries.lean
/-- A function that is complex differentiable on the open ball of radius `r` around `c`
is given by evaluating its Taylor series at `c` on this open ball. -/
lemma hasSum_taylorSeries_on_ball :
    HasSum (fun n : ℕ ↦ (n ! : ℂ)⁻¹ • (z - c) ^ n • iteratedDeriv n f c) (f z)
-- Mathlib/Order/Filter/CountableInter.lean
/-- `countableGenerate g` is the greatest `countableInterFilter` containing `g`. -/
theorem countableGenerate_isGreatest :
    IsGreatest { f : Filter α | CountableInterFilter f ∧ g ⊆ f.sets } (countableGenerate g)
-- Mathlib/Algebra/Group/AddChar.lean
@[simp, norm_cast] lemma coe_toAddMonoidHomEquiv_symm (ψ : A →+ Additive M) :
    ⇑(toAddMonoidHomEquiv.symm ψ) = Additive.toMul ∘ ψ
-- Mathlib/GroupTheory/Torsion.lean
/-- If a group exponent exists, the group is torsion. -/
@[to_additive ExponentExists.is_add_torsion
      "If a group exponent exists, the group is additively torsion."]
theorem ExponentExists.isTorsion (h : ExponentExists G) : IsTorsion G
-- Mathlib/Order/Filter/EventuallyConst.lean
protected lemma congr {g} (h : EventuallyConst f l) (hg : f =ᶠ[l] g) : EventuallyConst g l
-- Mathlib/RingTheory/Generators.lean
/-- Construct `Generators` from an assignment `I → S` such that `R[X] → S` is surjective. -/
@[simps val, simps (config := .lemmasOnly) vars]
noncomputable
def ofSurjective {vars} (val : vars → S) (h : Function.Surjective (aeval (R := R) val)) :
    Generators R S
-- Mathlib/SetTheory/ZFC/Basic.lean
theorem sUnion_lem {α β : Type u} (A : α → PSet) (B : β → PSet) (αβ : ∀ a, ∃ b, Equiv (A a) (B b)) :
    ∀ a, ∃ b, Equiv ((sUnion ⟨α, A⟩).Func a) ((sUnion ⟨β, B⟩).Func b)
-- Mathlib/Algebra/Algebra/Pi.lean
/-- A family of algebra equivalences `∀ i, (A₁ i ≃ₐ A₂ i)` generates a
multiplicative equivalence between `∀ i, A₁ i` and `∀ i, A₂ i`.

This is the `AlgEquiv` version of `Equiv.piCongrRight`, and the dependent version of
`AlgEquiv.arrowCongr`.
-/
@[simps apply]
def piCongrRight {R ι : Type*} {A₁ A₂ : ι → Type*} [CommSemiring R] [∀ i, Semiring (A₁ i)]
    [∀ i, Semiring (A₂ i)] [∀ i, Algebra R (A₁ i)] [∀ i, Algebra R (A₂ i)]
    (e : ∀ i, A₁ i ≃ₐ[R] A₂ i) : (∀ i, A₁ i) ≃ₐ[R] ∀ i, A₂ i
-- Mathlib/Topology/MetricSpace/PiNat.lean
theorem dist_le_dist_pi_of_dist_lt {x y : ∀ i, F i} {i : ι} (h : dist x y < (1 / 2) ^ encode i) :
    dist (x i) (y i) ≤ dist x y
-- .lake/packages/lean4/src/lean/Init/Data/Array/Lemmas.lean
theorem get_append_right {as bs : Array α} {h : i < (as ++ bs).size} (hle : as.size ≤ i)
    (hlt : i - as.size < bs.size := Nat.sub_lt_left_of_lt_add hle (size_append .. ▸ h)) :
    (as ++ bs)[i] = bs[i - as.size]
-- Mathlib/Order/Bounds/Basic.lean
theorem lowerBounds_Ici : lowerBounds (Ici a) = Iic a
-- Mathlib/LinearAlgebra/RootSystem/Defs.lean
lemma coreflection_eq_flip_reflection :
    P.coreflection i = P.flip.reflection i
-- Mathlib/RingTheory/UniqueFactorizationDomain.lean
theorem WfDvdMonoid.max_power_factor [CommMonoidWithZero α] [WfDvdMonoid α] {a₀ x : α}
    (h : a₀ ≠ 0) (hx : Irreducible x) : ∃ (n : ℕ) (a : α), ¬x ∣ a ∧ a₀ = x ^ n * a
-- Mathlib/CategoryTheory/Limits/Shapes/Biproducts.lean
/-- An iterated biproduct is a biproduct over a sigma type. -/
@[simps]
def biproductBiproductIso {ι} (f : ι → Type*) (g : (i : ι) → (f i) → C)
    [∀ i, HasBiproduct (g i)] [HasBiproduct fun i => ⨁ g i] :
    (⨁ fun i => ⨁ g i) ≅ (⨁ fun p : Σ i, f i => g p.1 p.2)
-- Mathlib/Computability/PartrecCode.lean
theorem evaln_complete {c n x} : x ∈ eval c n ↔ ∃ k, x ∈ evaln k c n
-- Mathlib/CategoryTheory/Shift/Induced.lean
@[simp]
lemma shiftFunctorZero_inv_app_obj_of_induced (X : C) :
    letI := HasShift.induced F A s i
    (shiftFunctorZero D A).inv.app (F.obj X) =
      F.map ((shiftFunctorZero C A).inv.app X) ≫ (i 0).inv.app X
-- Mathlib/MeasureTheory/Integral/IntegrableOn.lean
theorem IntegrableOn.integrable (h : IntegrableOn f s μ) : Integrable f (μ.restrict s)
-- Mathlib/Algebra/GCDMonoid/Basic.lean
theorem lcm_comm [NormalizedGCDMonoid α] (a b : α) : lcm a b = lcm b a
-- Mathlib/Analysis/Seminorm.lean
/-- Closed seminorm-balls are convex. -/
theorem convex_closedBall : Convex ℝ (closedBall p x r)
-- Mathlib/Algebra/Polynomial/Inductions.lean
theorem divX_X_pow : divX (X ^ n : R[X]) = if (n = 0) then 0 else X ^ (n - 1)
-- Mathlib/Data/Finset/Pointwise.lean
@[simp, norm_cast]
theorem coe_vsub (s t : Finset β) : (↑(s -ᵥ t) : Set α) = (s : Set β) -ᵥ t
-- Mathlib/Data/List/Nodup.lean
theorem nodup_append {l₁ l₂ : List α} :
    Nodup (l₁ ++ l₂) ↔ Nodup l₁ ∧ Nodup l₂ ∧ Disjoint l₁ l₂
-- Mathlib/Data/List/Sort.lean
/-- The list `List.ofFn f` is sorted with respect to `(· ≤ ·)` if and only if `f` is monotone. -/
@[simp] theorem sorted_le_ofFn_iff : (ofFn f).Sorted (· ≤ ·) ↔ Monotone f
-- Mathlib/MeasureTheory/Group/Integral.lean
@[to_additive] -- Porting note: was `@[simp]`
theorem integral_div_right_eq_self [IsMulRightInvariant μ] (f : G → E) (g : G) :
    (∫ x, f (x / g) ∂μ) = ∫ x, f x ∂μ
-- Mathlib/MeasureTheory/Measure/MeasureSpace.lean
@[nontriviality]
lemma apply_eq_zero_of_isEmpty [IsEmpty α] {_ : MeasurableSpace α} (μ : Measure α) (s : Set α) :
    μ s = 0
-- Mathlib/Combinatorics/SimpleGraph/Triangle/Basic.lean
theorem FarFromTriangleFree.not_cliqueFree (hG : G.FarFromTriangleFree ε) (hε : 0 < ε) :
    ¬G.CliqueFree 3
-- Mathlib/Tactic/Sat/FromLRAT.lean
/-- Formula `f` subsumes `f'` if all the clauses in `f'` are in `f`.
We use this to prove that all clauses in the formula are subsumed by it. -/
structure Fmla.subsumes (f f' : Fmla) : Prop where
  prop : ∀ x, x ∈ f' → x ∈ f
-- Mathlib/LinearAlgebra/AffineSpace/AffineSubspace.lean
/-- Two affine subspaces with the same direction and nonempty intersection are equal. -/
theorem ext_of_direction_eq {s1 s2 : AffineSubspace k P} (hd : s1.direction = s2.direction)
    (hn : ((s1 : Set P) ∩ s2).Nonempty) : s1 = s2
-- Mathlib/MeasureTheory/Measure/Doubling.lean
theorem scalingScaleOf_pos (K : ℝ) : 0 < scalingScaleOf μ K
-- Mathlib/Data/Set/Image.lean
lemma sigma_mk_preimage_image' (h : i ≠ j) : Sigma.mk j ⁻¹' (Sigma.mk i '' s) = ∅
-- Mathlib/Analysis/Convex/Jensen.lean
theorem le_sup_of_mem_convexHull {s : Finset E} (hf : ConvexOn 𝕜 (convexHull 𝕜 (s : Set E)) f)
    (hx : x ∈ convexHull 𝕜 (s : Set E)) :
    f x ≤ s.sup' (coe_nonempty.1 <| convexHull_nonempty_iff.1 ⟨x, hx⟩) f
-- Mathlib/Data/Nat/Squarefree.lean
theorem squarefree_iff_nodup_primeFactorsList {n : ℕ} (h0 : n ≠ 0) :
    Squarefree n ↔ n.primeFactorsList.Nodup
-- Mathlib/Algebra/Order/Sub/Canonical.lean
theorem tsub_lt_self : 0 < a → 0 < b → a - b < a
-- Mathlib/Analysis/NormedSpace/OperatorNorm/Basic.lean
/-- The operator norm is submultiplicative. -/
theorem opNorm_comp_le (f : E →SL[σ₁₂] F) : ‖h.comp f‖ ≤ ‖h‖ * ‖f‖
-- Mathlib/LinearAlgebra/Alternating/Basic.lean
@[ext]
theorem ext {f f' : M [⋀^ι]→ₗ[R] N} (H : ∀ x, f x = f' x) : f = f'
-- Mathlib/Data/Holor.lean
theorem cprankMax_nil [Monoid α] [AddMonoid α] (x : Holor α nil) : CPRankMax 1 x
-- Mathlib/Data/Seq/WSeq.lean
@[simp]
theorem join_nil : join nil = (nil : WSeq α)
-- Mathlib/Data/Seq/WSeq.lean
@[simp]
theorem liftRel_think_right (R : α → β → Prop) (s t) : LiftRel R s (think t) ↔ LiftRel R s t
-- Mathlib/Analysis/Calculus/FDeriv/Prod.lean
@[fun_prop]
theorem differentiableWithinAt_fst {s : Set (E × F)} : DifferentiableWithinAt 𝕜 Prod.fst s p
-- Mathlib/Geometry/Manifold/ChartedSpace.lean
theorem mem_maximalAtlas_iff {e : PartialHomeomorph M H} :
    e ∈ G.maximalAtlas M ↔ ∀ e' ∈ atlas H M, e.symm ≫ₕ e' ∈ G ∧ e'.symm ≫ₕ e ∈ G
-- Mathlib/CategoryTheory/Limits/ExactFunctor.lean
@[simp]
theorem LeftExactFunctor.of_fst (F : C ⥤ D) [PreservesFiniteLimits F] :
    (LeftExactFunctor.of F).obj = F
-- Mathlib/Data/Finsupp/Multiset.lean
theorem toFinsupp_inter (s t : Multiset α) : toFinsupp (s ∩ t) = toFinsupp s ⊓ toFinsupp t
-- Mathlib/Analysis/Calculus/InverseFunctionTheorem/ApproximatesLinearOn.lean
theorem closedBall_subset_target (hf : ApproximatesLinearOn f (f' : E →L[𝕜] F) s c)
    (hc : Subsingleton E ∨ c < N⁻¹) (hs : IsOpen s) {b : E} (ε0 : 0 ≤ ε) (hε : closedBall b ε ⊆ s) :
    closedBall (f b) ((N⁻¹ - c) * ε) ⊆ (hf.toPartialHomeomorph f s hc hs).target
-- Mathlib/Control/Bifunctor.lean
@[higher_order fst_comp_snd]
theorem fst_snd {α₀ α₁ β₀ β₁} (f : α₀ → α₁) (f' : β₀ → β₁) (x : F α₀ β₀) :
    fst f (snd f' x) = bimap f f' x
-- Mathlib/Data/Finset/Basic.lean
theorem inter_congr_left (ht : s ∩ u ⊆ t) (hu : s ∩ t ⊆ u) : s ∩ t = s ∩ u
-- Mathlib/Order/Filter/SmallSets.lean
@[simp]
theorem smallSets_top : (⊤ : Filter α).smallSets = ⊤
-- Mathlib/Analysis/InnerProductSpace/PiL2.lean
theorem EuclideanSpace.inner_single_left (i : ι) (a : 𝕜) (v : EuclideanSpace 𝕜 ι) :
    ⟪EuclideanSpace.single i (a : 𝕜), v⟫ = conj a * v i
-- Mathlib/AlgebraicTopology/DoldKan/HomotopyEquivalence.lean
/-- Construction of the homotopy from `PInfty` to the identity using eventually
(termwise) constant homotopies from `P q` to the identity for all `q` -/
@[simps]
def homotopyPInftyToId : Homotopy (PInfty : K[X] ⟶ _) (𝟙 _)