ruc-ai4math/mathlib_handler_benchmark_410 huggingface dataset:
-- Mathlib/MeasureTheory/Measure/Dirac.lean
/-- Dirac delta measures at two points are equal if every measurable set contains either both or
neither of the points. -/
lemma dirac_eq_dirac_iff_forall_mem_iff_mem {x y : α} :
    Measure.dirac x = Measure.dirac y ↔ ∀ A, MeasurableSet A → (x ∈ A ↔ y ∈ A)
-- Mathlib/Probability/ConditionalProbability.lean
/-- The **law of total probability** for a random variable taking finitely many values: a measure
`μ` can be expressed as a linear combination of its conditional measures `μ[|X ← x]` on fibers of a
random variable `X` valued in a fintype. -/
lemma sum_meas_smul_cond_fiber {X : Ω → α} (hX : Measurable X) (μ : Measure Ω) [IsFiniteMeasure μ] :
    ∑ x, μ (X ⁻¹' {x}) • μ[|X ← x] = μ
-- Mathlib/Algebra/Associated/Basic.lean
@[simp]
theorem not_irreducible_zero [MonoidWithZero α] : ¬Irreducible (0 : α)
-- Mathlib/Topology/PartialHomeomorph.lean
protected theorem ext_iff {e e' : PartialHomeomorph X Y} :
    e = e' ↔ (∀ x, e x = e' x) ∧ (∀ x, e.symm x = e'.symm x) ∧ e.source = e'.source
-- Mathlib/FieldTheory/Perfect.lean
@[simp]
theorem injective_frobenius : Injective (frobenius R p)
-- Mathlib/RingTheory/Ideal/Norm.lean
theorem absNorm_eq_zero_iff {I : Ideal S} : Ideal.absNorm I = 0 ↔ I = ⊥
-- Mathlib/Analysis/InnerProductSpace/Orthogonal.lean
/-- `orthogonal` reverses the `≤` ordering of two
subspaces. -/
theorem orthogonal_le {K₁ K₂ : Submodule 𝕜 E} (h : K₁ ≤ K₂) : K₂ᗮ ≤ K₁ᗮ
-- Mathlib/LinearAlgebra/StdBasis.lean
@[simp]
theorem stdBasis_same (i : ι) (b : φ i) : stdBasis R φ i b i = b
-- Mathlib/Algebra/Category/Grp/Basic.lean
@[to_additive (attr := simp)] theorem MonoidHom.id_grp_comp
    {G : Type u} [Group G] {H : Grp.{u}} (f : G →* H) : MonoidHom.comp (𝟙 H) f = f
-- Mathlib/Algebra/Ring/Prod.lean
/-- A ring `R` is isomorphic to `S × R` when `S` is the zero ring -/
@[simps]
def zeroRingProd : R ≃+* S × R
-- .lake/packages/lean4/src/lean/Init/Data/Nat/Compare.lean
protected theorem compare_eq_eq {a b : Nat} : compare a b = .eq ↔ a = b
-- Mathlib/Order/UpperLower/Basic.lean
@[simp]
theorem upperBounds_lowerClosure : upperBounds (lowerClosure s : Set α) = upperBounds s
-- Mathlib/CategoryTheory/Monoidal/Opposite.lean
theorem unmop_injective : Function.Injective (unmop : Cᴹᵒᵖ → C)
-- .lake/packages/lean4/src/lean/Init/Data/Nat/Lemmas.lean
protected theorem add_lt_add_of_le_of_lt {a b c d : Nat} (hle : a ≤ b) (hlt : c < d) :
    a + c < b + d
-- Mathlib/NumberTheory/Zsqrtd/GaussianInt.lean
theorem natAbs_norm_eq (x : ℤ[i]) :
    x.norm.natAbs = x.re.natAbs * x.re.natAbs + x.im.natAbs * x.im.natAbs
-- Mathlib/Logic/Relation.lean
theorem cases_tail : ReflTransGen r a b → b = a ∨ ∃ c, ReflTransGen r a c ∧ r c b
-- Mathlib/Analysis/Convex/Deriv.lean
lemma slope_lt_deriv (hfc : StrictConcaveOn ℝ S f) (hx : x ∈ S) (hy : y ∈ S) (hxy : x < y)
    (hfd : DifferentiableAt ℝ f x) :
    slope f x y < deriv f x
-- Mathlib/RingTheory/Ideal/QuotientOperations.lean
@[simp]
theorem snd_comp_quotientMulEquivQuotientProd (I J : Ideal R) (coprime : IsCoprime I J) :
    (RingHom.snd _ _).comp
        (quotientMulEquivQuotientProd I J coprime : R ⧸ I * J →+* (R ⧸ I) × R ⧸ J) =
      Ideal.Quotient.factor (I * J) J mul_le_left
-- Mathlib/RingTheory/IntegralClosure/IsIntegralClosure/Basic.lean
theorem RingHom.IsIntegral.to_finite (h : f.IsIntegral) (h' : f.FiniteType) : f.Finite
-- Mathlib/CategoryTheory/Bicategory/Functor/Lax.lean
@[reassoc]
lemma map₂_leftUnitor_hom {a b : B} (f : a ⟶ b) :
    (λ_ (F.map f)).hom = F.mapId a ▷ F.map f ≫ F.mapComp (𝟙 a) f ≫ F.map₂ (λ_ f).hom
-- Mathlib/Algebra/Polynomial/UnitTrinomial.lean
theorem trinomial_trailing_coeff' (hkm : k < m) (hmn : m < n) :
    (trinomial k m n u v w).coeff k = u
-- Mathlib/Order/Monotone/Monovary.lean
theorem MonovaryOn.comp_antitone_on_left (h : MonovaryOn f g s) (hf : Antitone f') :
    AntivaryOn (f' ∘ f) g s
-- Mathlib/Algebra/Order/Ring/Basic.lean
theorem pow_lt_one_iff_of_nonneg (ha : 0 ≤ a) (hn : n ≠ 0) : a ^ n < 1 ↔ a < 1
-- Mathlib/LinearAlgebra/Matrix/Circulant.lean
theorem conjTranspose_circulant [Star α] [AddGroup n] (v : n → α) :
    (circulant v)ᴴ = circulant (star fun i => v (-i))
-- Mathlib/Algebra/Group/Submonoid/Operations.lean
@[to_additive]
theorem mrange_inr' : mrange (inr M N) = comap (fst M N) ⊥
-- Mathlib/Algebra/Group/AddChar.lean
@[simp, norm_cast] lemma coe_mul (ψ χ : AddChar A M) : ⇑(ψ * χ) = ψ * χ
-- .lake/packages/lean4/src/lean/Init/Data/Array/Lemmas.lean
theorem get_extract_loop_lt (as bs : Array α) (size start : Nat) (hlt : i < bs.size)
    (h := get_extract_loop_lt_aux as bs size start hlt) :
    (extract.loop as size start bs)[i] = bs[i]
-- Mathlib/Order/Ideal.lean
theorem IsMaximal.isCoatom (_ : IsMaximal I) : IsCoatom I
-- Mathlib/MeasureTheory/Measure/ProbabilityMeasure.lean
theorem nonempty (μ : ProbabilityMeasure Ω) : Nonempty Ω
-- Mathlib/Topology/PartialHomeomorph.lean
protected theorem continuousOn : ContinuousOn e e.source
-- Mathlib/Order/Iterate.lean
/-- If `f ≤ g` and `g` is monotone, then `f^[n] ≤ g^[n]`. -/
theorem le_iterate_of_le {g : α → α} (hg : Monotone g) (h : f ≤ g) (n : ℕ) : f^[n] ≤ g^[n]
-- Mathlib/MeasureTheory/Function/LpSpace.lean
theorem eLpNorm_indicator_const_le (c : G) (p : ℝ≥0∞) :
    eLpNorm (s.indicator fun _ => c) p μ ≤ ‖c‖₊ * μ s ^ (1 / p.toReal)
-- Mathlib/Analysis/LocallyConvex/WithSeminorms.lean
theorem withSeminorms_iInf {κ : ι → Type*} [Nonempty ((i : ι) × κ i)] [∀ i, Nonempty (κ i)]
    {p : (i : ι) → SeminormFamily 𝕜 E (κ i)} {t : ι → TopologicalSpace E}
    [∀ i, @TopologicalAddGroup E (t i) _] (hp : ∀ i, WithSeminorms (topology := t i) (p i)) :
    WithSeminorms (topology := ⨅ i, t i) (SeminormFamily.sigma p)
-- Mathlib/FieldTheory/NormalClosure.lean
theorem normalClosure_eq_iSup_adjoin' [ne : Nonempty (K →ₐ[F] L)] [h : Normal F L] :
    normalClosure F K L = ⨆ x : K, adjoin F ((minpoly F x).rootSet L)
-- Mathlib/Topology/Algebra/Group/Basic.lean
@[to_additive]
theorem subset_interior_mul_right : s * interior t ⊆ interior (s * t)
-- Mathlib/Algebra/EuclideanDomain/Defs.lean
theorem mod_eq_sub_mul_div {R : Type*} [EuclideanDomain R] (a b : R) : a % b = a - b * (a / b)
-- Mathlib/CategoryTheory/Limits/Shapes/FunctorToTypes.lean
@[simp]
lemma inr_comp_binaryCoproductIso_hom :
    Limits.coprod.inr ≫ (binaryCoproductIso F G).hom = coprod.inr
-- Mathlib/Data/List/InsertNth.lean
theorem get_insertNth_add_succ (l : List α) (x : α) (n k : ℕ) (hk' : n + k < l.length)
    (hk : n + k + 1 < (insertNth n x l).length := (by
      rwa [length_insertNth _ _ (by omega), Nat.succ_lt_succ_iff])) :
    (insertNth n x l).get ⟨n + k + 1, hk⟩ = get l ⟨n + k, hk'⟩
-- Mathlib/Data/Finset/Grade.lean
lemma _root_.CovBy.exists_finset_insert (h : s ⋖ t) : ∃ a ∉ s, insert a s = t
-- Mathlib/SetTheory/Game/Nim.lean
@[simp]
theorem toRightMovesNim_one_symm (i) :
    (@toRightMovesNim 1).symm i = ⟨0, Set.mem_Iio.mpr zero_lt_one⟩
-- Mathlib/Analysis/SpecialFunctions/Trigonometric/Angle.lean
theorem cos_eq_iff_coe_eq_or_eq_neg {θ ψ : ℝ} :
    cos θ = cos ψ ↔ (θ : Angle) = ψ ∨ (θ : Angle) = -ψ
-- Mathlib/Data/Nat/ModEq.lean
protected theorem add_right_cancel' (c : ℕ) (h : a + c ≡ b + c [MOD n]) : a ≡ b [MOD n]
-- Mathlib/Algebra/Category/ModuleCat/Differentials/Basic.lean
@[simp]
lemma d_map (a : A) : D.d (f a) = 0
-- Mathlib/Algebra/Group/Defs.lean
@[to_additive (attr := simp)]
theorem mul_inv_cancel_left (a b : G) : a * (a⁻¹ * b) = b
-- Mathlib/Computability/Ackermann.lean
theorem ack_ack_lt_ack_max_add_two (m n k : ℕ) : ack m (ack n k) < ack (max m n + 2) k
-- Mathlib/MeasureTheory/Constructions/BorelSpace/Basic.lean
@[fun_prop]
theorem measurable_of_continuousOn_compl_singleton [T1Space α] {f : α → γ} (a : α)
    (hf : ContinuousOn f {a}ᶜ) : Measurable f
-- Mathlib/Data/Matroid/Basic.lean
theorem Indep.subset (hJ : M.Indep J) (hIJ : I ⊆ J) : M.Indep I
-- Mathlib/Data/Real/Irrational.lean
theorem of_nat_add (m : ℕ) (h : Irrational (m + x)) : Irrational x
-- Mathlib/NumberTheory/Padics/Hensel.lean
private theorem norm_deriv_eq : ‖F.derivative.eval ncs.lim‖ = ‖F.derivative.eval a‖
-- Mathlib/Order/SuccPred/Basic.lean
theorem Iic_succ (a : α) : Iic (succ a) = insert (succ a) (Iic a)
-- .lake/packages/lean4/src/lean/Init/Data/Array/Subarray.lean
@[deprecated Subarray.start_le_stop (since := "2024-04-13")]
theorem Subarray.h₁ (s : Subarray α) : s.start ≤ s.stop
-- Mathlib/MeasureTheory/Integral/SetIntegral.lean
@[simp]
theorem integral_indicator_const [CompleteSpace E] (e : E) ⦃s : Set X⦄ (s_meas : MeasurableSet s) :
    ∫ x : X, s.indicator (fun _ : X => e) x ∂μ = (μ s).toReal • e
-- Mathlib/Topology/Order/NhdsSet.lean
@[simp] theorem nhdsSet_Ioi : 𝓝ˢ (Ioi a) = 𝓟 (Ioi a)
-- Mathlib/Data/PEquiv.lean
theorem trans_single_of_mem {a : α} {b : β} (c : γ) {f : α ≃. β} (h : b ∈ f a) :
    f.trans (single b c) = single a c
-- Mathlib/Geometry/Euclidean/MongePoint.lean
/-- The position of the Monge point in relation to the circumcenter
and centroid. -/
theorem mongePoint_eq_smul_vsub_vadd_circumcenter {n : ℕ} (s : Simplex ℝ P n) :
    s.mongePoint =
      (((n + 1 : ℕ) : ℝ) / ((n - 1 : ℕ) : ℝ)) •
          ((univ : Finset (Fin (n + 1))).centroid ℝ s.points -ᵥ s.circumcenter) +ᵥ
        s.circumcenter
-- Mathlib/GroupTheory/Perm/Support.lean
theorem set_support_mul_subset : { x | (p * q) x ≠ x } ⊆ { x | p x ≠ x } ∪ { x | q x ≠ x }
-- Mathlib/RingTheory/DedekindDomain/Factorization.lean
/-- `val_v(I) = 0` for all but finitely many maximal ideals of `R`. -/
theorem finite_factors (I : FractionalIdeal R⁰ K) :
    ∀ᶠ v : HeightOneSpectrum R in Filter.cofinite, count K v I = 0
-- Mathlib/Dynamics/OmegaLimit.lean
theorem omegaLimit_inter : ω f ϕ (s₁ ∩ s₂) ⊆ ω f ϕ s₁ ∩ ω f ϕ s₂
-- Mathlib/Order/Filter/Basic.lean
@[simp]
theorem eventuallyEq_univ {s : Set α} {l : Filter α} : s =ᶠ[l] univ ↔ s ∈ l
-- Mathlib/Algebra/CubicDiscriminant.lean
theorem ne_zero_of_b_ne_zero (hb : P.b ≠ 0) : P.toPoly ≠ 0
-- Mathlib/Topology/UniformSpace/UniformConvergence.lean
theorem tendstoLocallyUniformlyOn_iff_tendstoLocallyUniformly_comp_coe :
    TendstoLocallyUniformlyOn F f p s ↔
      TendstoLocallyUniformly (fun i (x : s) => F i x) (f ∘ (↑)) p
-- Mathlib/Algebra/Algebra/Subalgebra/Basic.lean
theorem range_val : S.val.range = S
-- Mathlib/Analysis/Asymptotics/AsymptoticEquivalent.lean
theorem isEquivalent_of_tendsto_one (hz : ∀ᶠ x in l, v x = 0 → u x = 0)
    (huv : Tendsto (u / v) l (𝓝 1)) : u ~[l] v
-- Mathlib/Order/Hom/Basic.lean
@[simp]
theorem coe_copy (f : α →o β) (f' : α → β) (h : f' = f) : (f.copy f' h) = f'
-- Mathlib/MeasureTheory/Integral/SetIntegral.lean
theorem integral_Icc_eq_integral_Ioc' (hx : μ {x} = 0) :
    ∫ t in Icc x y, f t ∂μ = ∫ t in Ioc x y, f t ∂μ
-- Mathlib/Order/Hom/CompleteLattice.lean
@[simp]
theorem coe_copy (f : CompleteLatticeHom α β) (f' : α → β) (h : f' = f) : ⇑(f.copy f' h) = f'
-- Mathlib/Topology/Instances/Matrix.lean
theorem summable_matrix_blockDiagonal' [DecidableEq l] {f : X → ∀ i, Matrix (m' i) (n' i) R} :
    (Summable fun x => blockDiagonal' (f x)) ↔ Summable f
-- Mathlib/Algebra/Star/StarRingHom.lean
theorem leftInverse_symm (e : A ≃⋆+* B) : Function.LeftInverse e.symm e
-- Mathlib/AlgebraicGeometry/EllipticCurve/Group.lean
protected lemma map_smul (x : R[X]) (y : W.CoordinateRing) :
    map W f (x • y) = x.map f • map W f y
-- Mathlib/Data/ENNReal/Inv.lean
protected theorem mul_div_cancel' (h0 : a ≠ 0) (hI : a ≠ ∞) : a * (b / a) = b
-- Mathlib/Algebra/Group/Submonoid/Operations.lean
@[to_additive prod_mono]
theorem prod_mono {s₁ s₂ : Submonoid M} {t₁ t₂ : Submonoid N} (hs : s₁ ≤ s₂) (ht : t₁ ≤ t₂) :
    s₁.prod t₁ ≤ s₂.prod t₂
-- Mathlib/Analysis/Calculus/FDeriv/Comp.lean
@[fun_prop]
theorem DifferentiableAt.comp_differentiableWithinAt {g : F → G} (hg : DifferentiableAt 𝕜 g (f x))
    (hf : DifferentiableWithinAt 𝕜 f s x) : DifferentiableWithinAt 𝕜 (g ∘ f) s x
-- Mathlib/Algebra/Polynomial/Derivative.lean
theorem iterate_derivative_X_add_pow (n k : ℕ) (c : R) :
    derivative^[k] ((X + C c) ^ n) = Nat.descFactorial n k • (X + C c) ^ (n - k)
-- Mathlib/Topology/LocalAtTarget.lean
theorem Set.restrictPreimage_embedding (s : Set β) (h : Embedding f) :
    Embedding (s.restrictPreimage f)
-- Mathlib/Algebra/Homology/ShortComplex/RightHomology.lean
@[simp] lemma ofIsLimitKernelFork_g' (hf : S.f = 0) (c : KernelFork S.g)
    (hc : IsLimit c) : (ofIsLimitKernelFork S hf c hc).g' = S.g
-- Mathlib/Condensed/Light/Explicit.lean
/--
The light condensed object associated to a presheaf on `LightProfinite` whose postcomposition with
the forgetful functor preserves finite products and satisfies the equalizer condition.
-/
@[simps]
noncomputable def ofSheafForgetLightProfinite
    [ConcreteCategory A] [ReflectsFiniteLimits (CategoryTheory.forget A)]
    (F : LightProfinite.{u}ᵒᵖ ⥤ A) [PreservesFiniteProducts (F ⋙ CategoryTheory.forget A)]
    (hF : EqualizerCondition (F ⋙ CategoryTheory.forget A)) : LightCondensed A
-- Mathlib/Topology/Algebra/OpenSubgroup.lean
@[to_additive (attr := simp, norm_cast)]
theorem coe_top : ((⊤ : OpenSubgroup G) : Set G) = Set.univ
-- Mathlib/Analysis/ODE/PicardLindelof.lean
protected theorem lipschitz : LipschitzWith v.C f
-- Mathlib/Data/Finset/Lattice.lean
theorem set_biUnion_insert (a : α) (s : Finset α) (t : α → Set β) :
    ⋃ x ∈ insert a s, t x = t a ∪ ⋃ x ∈ s, t x
-- Mathlib/CategoryTheory/Preadditive/Biproducts.lean
theorem biproduct.map_eq [HasFiniteBiproducts C] {f g : J → C} {h : ∀ j, f j ⟶ g j} :
    biproduct.map h = ∑ j : J, biproduct.π f j ≫ h j ≫ biproduct.ι g j
-- Mathlib/Analysis/SpecialFunctions/Trigonometric/Angle.lean
theorem cos_add (θ₁ θ₂ : Real.Angle) : cos (θ₁ + θ₂) = cos θ₁ * cos θ₂ - sin θ₁ * sin θ₂
-- Mathlib/Analysis/LocallyConvex/Basic.lean
theorem balanced_iUnion {f : ι → Set E} (h : ∀ i, Balanced 𝕜 (f i)) : Balanced 𝕜 (⋃ i, f i)
-- Mathlib/NumberTheory/Cyclotomic/Basic.lean
/-- If `S` is finite and `IsCyclotomicExtension S A B`, then `B` is a finite `A`-algebra. -/
protected theorem finite [IsDomain B] [h₁ : Finite S] [h₂ : IsCyclotomicExtension S A B] :
    Module.Finite A B
-- Mathlib/Order/Defs.lean
@[trans]
theorem lt_of_le_of_lt : ∀ {a b c : α}, a ≤ b → b < c → a < c
-- Mathlib/SetTheory/Ordinal/Basic.lean
@[simp]
theorem type_out (o : Ordinal) : Ordinal.type o.out.r = o
-- Mathlib/RingTheory/Valuation/Basic.lean
theorem map_sub_le {x y g} (hx : v x ≤ g) (hy : v y ≤ g) : v (x - y) ≤ g
-- Mathlib/LinearAlgebra/Matrix/SesquilinearForm.lean
@[simp]
theorem nondegenerate_toMatrix₂'_iff {B : (ι → R₁) →ₗ[R₁] (ι → R₁) →ₗ[R₁] R₁} :
    (LinearMap.toMatrix₂' R₁ B).Nondegenerate ↔ B.SeparatingLeft
-- Mathlib/Algebra/Order/Floor/Div.lean
lemma gc_floorDiv_mul (ha : 0 < a) : GaloisConnection (a * ·) (· ⌊/⌋ a)
-- Mathlib/Algebra/DirectSum/Ring.lean
@[simp]
theorem of_natCast (n : ℕ) : of A 0 n = n
-- Mathlib/CategoryTheory/Preadditive/Projective.lean
@[reassoc (attr := simp)]
theorem factorThru_comp {P X E : C} [Projective P] (f : P ⟶ X) (e : E ⟶ X) [Epi e] :
    factorThru f e ≫ e = f
-- Mathlib/Data/Seq/WSeq.lean
theorem get?_add (s : WSeq α) (m n) : get? s (m + n) = get? (drop s m) n
-- Mathlib/GroupTheory/MonoidLocalization/Basic.lean
/-- If `CommMonoid` homs `g : M →* P, l : P →* A` induce maps of localizations, the composition
of the induced maps equals the map of localizations induced by `l ∘ g`. -/
@[to_additive
    "If `AddCommMonoid` homs `g : M →+ P, l : P →+ A` induce maps of localizations, the composition
of the induced maps equals the map of localizations induced by `l ∘ g`."]
theorem map_comp_map {A : Type*} [CommMonoid A] {U : Submonoid A} {R} [CommMonoid R]
    (j : LocalizationMap U R) {l : P →* A} (hl : ∀ w : T, l w ∈ U) :
    (k.map hl j).comp (f.map hy k) =
    f.map (fun x ↦ show l.comp g x ∈ U from hl ⟨g x, hy x⟩) j
-- Mathlib/Data/Matrix/Block.lean
@[simp]
theorem blockDiagonal'_transpose (M : ∀ i, Matrix (m' i) (n' i) α) :
    (blockDiagonal' M)ᵀ = blockDiagonal' fun k => (M k)ᵀ
-- Mathlib/GroupTheory/GroupAction/DomAct/Basic.lean
@[simp]
theorem mk_smul_addMonoidHom_apply (c : M) (f : A →+ B) (a : A) : (mk c • f) a = f (c • a)
-- Mathlib/Algebra/Ring/Subsemiring/Basic.lean
/-- The `Subsemiring` generated by a multiplicative submonoid coincides with the
`Subsemiring.closure` of the submonoid itself . -/
theorem subsemiringClosure_eq_closure : M.subsemiringClosure = Subsemiring.closure (M : Set R)
-- .lake/packages/lean4/src/lean/Init/Data/List/BasicAux.lean
@[simp] theorem tail!_cons : @tail! α (a::l) = l
-- Mathlib/Data/Finset/Prod.lean
theorem offDiag_union (h : Disjoint s t) :
    (s ∪ t).offDiag = s.offDiag ∪ t.offDiag ∪ s ×ˢ t ∪ t ×ˢ s
-- Mathlib/CategoryTheory/Sites/Sheaf.lean
/-- The category of sheaves taking values in `A` on a grothendieck topology. -/
structure Sheaf where
  /-- the underlying presheaf -/
  val : Cᵒᵖ ⥤ A
  /-- the condition that the presheaf is a sheaf -/
  cond : Presheaf.IsSheaf J val
-- Mathlib/Algebra/Star/SelfAdjoint.lean
@[simp]
protected theorem ofNat (n : ℕ) [n.AtLeastTwo] :
    IsSelfAdjoint (no_index (OfNat.ofNat n : R))
-- Mathlib/CategoryTheory/FiberedCategory/BasedCategory.lean
/-- The identity natural transformation is a based natural isomorphism. -/
@[simps]
def id (F : 𝒳 ⥤ᵇ 𝒴) : F ≅ F
-- Mathlib/Algebra/Order/Nonneg/Field.lean
@[simp] lemma mk_nnratCast (q : ℚ≥0) : (⟨q, q.cast_nonneg⟩ : {x : α // 0 ≤ x}) = q
-- Mathlib/Algebra/Module/Injective.lean
protected theorem of_injective [Small.{v} R] (inj : Module.Injective R Q) : Module.Baer R Q
-- Mathlib/Data/Int/Log.lean
@[simp]
theorem clog_zero_right (b : ℕ) : clog b (0 : R) = 0
-- Mathlib/MeasureTheory/Integral/IntegralEqImproper.lean
/-- When a function has a limit at infinity `l`, and its derivative is nonnegative, then the
integral of the derivative on `(a, +∞)` is `l - g a` (and the derivative is integrable, see
`integrable_on_Ioi_deriv_of_nonneg'`). Version assuming differentiability on `[a, +∞)`. -/
theorem integral_Ioi_of_hasDerivAt_of_nonneg' (hderiv : ∀ x ∈ Ici a, HasDerivAt g (g' x) x)
    (g'pos : ∀ x ∈ Ioi a, 0 ≤ g' x) (hg : Tendsto g atTop (𝓝 l)) : ∫ x in Ioi a, g' x = l - g a
-- Mathlib/ModelTheory/Types.lean
/-- A complete type over a given theory in a certain type of variables is a maximally
  consistent (with the theory) set of formulas in that type. -/
structure CompleteType where
  toTheory : L[[α]].Theory
  subset' : (L.lhomWithConstants α).onTheory T ⊆ toTheory
  isMaximal' : toTheory.IsMaximal
-- Mathlib/LinearAlgebra/Matrix/BilinearForm.lean
@[simp]
theorem Matrix.toBilin_apply (M : Matrix n n R₂) (x y : M₂) :
    Matrix.toBilin b M x y = ∑ i, ∑ j, b.repr x i * M i j * b.repr y j
-- Mathlib/LinearAlgebra/FiniteDimensional/Defs.lean
/-- If a vector space has a basis indexed by elements of a finite set, then it is
finite-dimensional. -/
theorem of_finite_basis {ι : Type w} {s : Set ι} (h : Basis s K V) (hs : Set.Finite s) :
    FiniteDimensional K V
-- Mathlib/CategoryTheory/Products/Basic.lean
@[simp]
theorem diag_map {X Y : C} (f : X ⟶ Y) : (diag C).map f = (f, f)
-- Mathlib/Probability/Independence/ZeroOne.lean
theorem Kernel.measure_zero_or_one_of_measurableSet_limsup_atTop (h_le : ∀ n, s n ≤ m0)
    (h_indep : iIndep s κ μα) {t : Set Ω} (ht_tail : MeasurableSet[limsup s atTop] t) :
    ∀ᵐ a ∂μα, κ a t = 0 ∨ κ a t = 1
-- Mathlib/Algebra/Order/Monoid/Submonoid.lean
@[to_additive (attr := simp) mem_nonneg] lemma mem_oneLE : a ∈ oneLE M ↔ 1 ≤ a
-- Mathlib/SetTheory/Cardinal/Basic.lean
@[simp]
theorem mk_eq_aleph0 (α : Type*) [Countable α] [Infinite α] : #α = ℵ₀
-- Mathlib/Order/Filter/Pi.lean
theorem Eventually.eval_pi {i : ι} (hf : ∀ᶠ x : α i in f i, p i x) :
    ∀ᶠ x : ∀ i : ι, α i in pi f, p i (x i)
-- Mathlib/Topology/ContinuousFunction/StoneWeierstrass.lean
/-- An alternative statement of the Stone-Weierstrass theorem,
for those who like their epsilons and don't like bundled continuous functions.

If `A` is a subalgebra of `C(X, ℝ)` which separates points (and `X` is compact),
every real-valued continuous function on `X` is within any `ε > 0` of some element of `A`.
-/
theorem exists_mem_subalgebra_near_continuous_of_separatesPoints (A : Subalgebra ℝ C(X, ℝ))
    (w : A.SeparatesPoints) (f : X → ℝ) (c : Continuous f) (ε : ℝ) (pos : 0 < ε) :
    ∃ g : A, ∀ x, ‖(g : X → ℝ) x - f x‖ < ε
-- .lake/packages/lean4/src/lean/Init/Data/List/Lemmas.lean
theorem length_pos_iff_exists_cons :
    ∀ {l : List α}, 0 < l.length ↔ ∃ h t, l = h :: t
-- Mathlib/CategoryTheory/NatIso.lean
/-- The application of a natural isomorphism to an object. We put this definition in a different
namespace, so that we can use `α.app` -/
@[simps]
def app {F G : C ⥤ D} (α : F ≅ G) (X : C) :
    F.obj X ≅ G.obj X
-- Mathlib/Algebra/Order/GroupWithZero/Unbundled.lean
theorem le_of_mul_le_of_one_le_of_nonneg_left [PosMulMono α] (h : a * b ≤ c) (hb : 1 ≤ b)
    (ha : 0 ≤ a) : a ≤ c
-- Mathlib/LinearAlgebra/Matrix/Transvection.lean
theorem listTransvecRow_get (i : Fin (listTransvecRow M).length) :
    (listTransvecRow M).get i =
      letI i' := Fin.cast (length_listTransvecRow M) i
      transvection (inr unit) (inl i') <| -M (inr unit) (inl i') / M (inr unit) (inr unit)
-- Mathlib/LinearAlgebra/Matrix/SpecialLinearGroup.lean
theorem coe_T_inv : ↑ₘT⁻¹ = !![1, -1; 0, 1]
-- Mathlib/CategoryTheory/Subterminal.lean
/-- If the unique morphism from `A` to a terminal object is a monomorphism, `A` is subterminal.
The converse of `IsSubterminal.mono_isTerminal_from`.
-/
theorem isSubterminal_of_mono_isTerminal_from {T : C} (hT : IsTerminal T) [Mono (hT.from A)] :
    IsSubterminal A
-- Mathlib/Algebra/Group/Submonoid/Pointwise.lean
theorem mem_smul_pointwise_iff_exists (m : A) (a : α) (S : AddSubmonoid A) :
    m ∈ a • S ↔ ∃ s : A, s ∈ S ∧ a • s = m
-- Mathlib/Data/PFun.lean
@[simp]
theorem dom_coe (f : α → β) : (f : α →. β).Dom = Set.univ
-- Mathlib/Logic/Embedding/Basic.lean
/-- `α ↪ β` is a bundled injective function. -/
structure Embedding (α : Sort*) (β : Sort*) where
  /-- An embedding as a function. Use coercion instead. -/
  toFun : α → β
  /-- An embedding is an injective function. Use `Function.Embedding.injective` instead. -/
  inj' : Injective toFun
-- Mathlib/Dynamics/Circle/RotationNumber/TranslationNumber.lean
theorem le_floor_map_map_zero : ⌊f 0⌋ + ⌊g 0⌋ ≤ ⌊f (g 0)⌋
-- Mathlib/CategoryTheory/Monoidal/Free/Coherence.lean
@[simp]
theorem inclusion_obj (X : N C) :
    inclusion.obj X = inclusionObj X.as
-- Mathlib/AlgebraicGeometry/Pullbacks.lean
/-- Given an open cover `{ Yᵢ }` of `Y`, then `X ×[Z] Y` is covered by `X ×[Z] Yᵢ`. -/
@[simps! J obj map]
def openCoverOfRight (𝒰 : OpenCover Y) (f : X ⟶ Z) (g : Y ⟶ Z) : OpenCover (pullback f g)
-- Mathlib/Data/QPF/Univariate/Basic.lean
theorem Fix.rec_eq {α : Type _} (g : F α → α) (x : F (Fix F)) :
    Fix.rec g (Fix.mk x) = g (Fix.rec g <$> x)
-- Mathlib/Algebra/ModEq.lean
@[simp]
theorem neg_modEq_neg : -a ≡ -b [PMOD p] ↔ a ≡ b [PMOD p]
-- Mathlib/Topology/Support.lean
@[to_additive]
theorem isClosed_mulTSupport (f : X → α) : IsClosed (mulTSupport f)
-- Mathlib/Combinatorics/Enumerative/Composition.lean
theorem blocksFun_mem_blocks (i : Fin c.length) : c.blocksFun i ∈ c.blocks
-- Mathlib/GroupTheory/Finiteness.lean
@[to_additive]
theorem Submonoid.FG.map_injective {M' : Type*} [Monoid M'] {P : Submonoid M} (e : M →* M')
    (he : Function.Injective e) (h : (P.map e).FG) : P.FG
-- Mathlib/LinearAlgebra/Dimension/StrongRankCondition.lean
theorem finrank_eq_nat_card_basis (h : Basis ι R M) :
    finrank R M = Nat.card ι
-- Mathlib/Topology/MetricSpace/HausdorffDistance.lean
theorem _root_.IsCompact.exists_infDist_eq_dist (h : IsCompact s) (hne : s.Nonempty) (x : α) :
    ∃ y ∈ s, infDist x s = dist x y
-- Mathlib/Data/Finset/Image.lean
@[simp]
theorem image_id' [DecidableEq α] : (s.image fun x => x) = s
-- Mathlib/Probability/ConditionalProbability.lean
/-- Conditioning first on `s` and then on `t` results in the same measure as conditioning
on `s ∩ t`. -/
theorem cond_cond_eq_cond_inter [IsFiniteMeasure μ] (hms : MeasurableSet s)
    (hmt : MeasurableSet t) : μ[|s][|t] = μ[|s ∩ t]
-- Mathlib/Data/List/Intervals.lean
@[simp]
theorem mem {n m l : ℕ} : l ∈ Ico n m ↔ n ≤ l ∧ l < m
-- Mathlib/Data/DFinsupp/Basic.lean
@[simp]
lemma prod_eq_zero_iff : f.prod g = 0 ↔ ∃ i ∈ f.support, g i (f i) = 0
-- Mathlib/MeasureTheory/Decomposition/SignedLebesgue.lean
theorem rnDeriv_add (s t : SignedMeasure α) (μ : Measure α) [s.HaveLebesgueDecomposition μ]
    [t.HaveLebesgueDecomposition μ] [(s + t).HaveLebesgueDecomposition μ] :
    (s + t).rnDeriv μ =ᵐ[μ] s.rnDeriv μ + t.rnDeriv μ