ruc-ai4math/mathlib_handler_benchmark_410 huggingface dataset:
-- Mathlib/NumberTheory/DiophantineApproximation.lean
/-- A rational number has only finitely many good rational approximations. -/
theorem finite_rat_abs_sub_lt_one_div_den_sq (ξ : ℚ) :
    {q : ℚ | |ξ - q| < 1 / (q.den : ℚ) ^ 2}.Finite
-- Mathlib/RingTheory/Generators.lean
@[simp] lemma of_val : of x.val = x
-- Mathlib/Data/Set/Subset.lean
@[simp]
lemma image_val_inter : (↑(D ∩ E) : Set α) = ↑D ∩ ↑E
-- .lake/packages/lean4/src/lean/Init/Data/Array/Lemmas.lean
theorem get?_set_eq (a : Array α) (i : Fin a.size) (v : α) :
    (a.set i v)[i.1]? = v
-- Mathlib/Topology/MetricSpace/HausdorffDimension.lean
@[simp]
theorem dimH_coe_finset (s : Finset X) : dimH (s : Set X) = 0
-- Mathlib/RingTheory/Algebraic.lean
lemma Algebra.transcendental_def : Algebra.Transcendental R A ↔ ∃ x : A, Transcendental R x
-- Mathlib/Topology/Order/LawsonTopology.lean
@[simp] lemma ofLawson_toLawson (a : α) : ofLawson (toLawson a) = a
-- Mathlib/Topology/Basic.lean
/-- Deprecated, please use `not_mem_tsupport_iff_eventuallyEq` instead. -/
@[deprecated (since := "2024-01-15")]
theorem eventuallyEq_zero_nhds {M₀} [Zero M₀] {f : X → M₀} :
    f =ᶠ[𝓝 x] 0 ↔ x ∉ closure (Function.support f)
-- Mathlib/CategoryTheory/Monoidal/Rigid/Basic.lean
@[reassoc]
theorem rightAdjointMate_comp_evaluation {X Y : C} [HasRightDual X] [HasRightDual Y] (f : X ⟶ Y) :
    (fᘁ ▷ X) ≫ ε_ X (Xᘁ) = ((Yᘁ) ◁ f) ≫ ε_ Y (Yᘁ)
-- Mathlib/NumberTheory/ModularForms/SlashInvariantForms.lean
/-- The `SlashInvariantForm` corresponding to `Function.const _ x`. -/
@[simps (config := .asFn)]
def const (x : ℂ) : SlashInvariantForm Γ 0
-- Mathlib/Analysis/Convex/Star.lean
theorem starConvex_univ (x : E) : StarConvex 𝕜 x univ
-- Mathlib/Data/Set/Basic.lean
theorem mem_insert (x : α) (s : Set α) : x ∈ insert x s
-- Mathlib/Algebra/GroupWithZero/NonZeroDivisors.lean
@[simp, norm_cast] lemma nonZeroDivisors.associated_coe : Associated (a : M₀) b ↔ Associated a b
-- Mathlib/Geometry/Euclidean/PerpBisector.lean
theorem midpoint_mem_perpBisector (p₁ p₂ : P) :
    midpoint ℝ p₁ p₂ ∈ perpBisector p₁ p₂
-- Mathlib/RingTheory/Coalgebra/Hom.lean
@[simp]
theorem mk_coe {f : A →ₗc[R] B} (h₁ h₂ h₃ h₄) : (⟨⟨⟨f, h₁⟩, h₂⟩, h₃, h₄⟩ : A →ₗc[R] B) = f
-- Mathlib/Combinatorics/SimpleGraph/Basic.lean
theorem edgeSet_deleteEdges (s : Set (Sym2 V)) : (G.deleteEdges s).edgeSet = G.edgeSet \ s
-- Mathlib/Probability/IdentDistrib.lean
/-- If `f` and `g` are identically distributed and `f` is a.e. strongly measurable, so is `g`. -/
theorem aestronglyMeasurable_snd [TopologicalSpace γ] [MetrizableSpace γ] [BorelSpace γ]
    (h : IdentDistrib f g μ ν) (hf : AEStronglyMeasurable f μ) : AEStronglyMeasurable g ν
-- Mathlib/Topology/LocallyFinite.lean
theorem closure_iUnion (h : LocallyFinite f) : closure (⋃ i, f i) = ⋃ i, closure (f i)
-- Mathlib/GroupTheory/Perm/Cycle/Factors.lean
/-- If c is a cycle, a ∈ c.support and c is a cycle of f, then `c = f.cycleOf a` -/
theorem cycle_is_cycleOf {f c : Equiv.Perm α} {a : α} (ha : a ∈ c.support)
    (hc : c ∈ f.cycleFactorsFinset) : c = f.cycleOf a
-- Mathlib/RingTheory/UniqueFactorizationDomain.lean
theorem normalizedFactors_prod_of_prime [Nontrivial α] [Unique αˣ] {m : Multiset α}
    (h : ∀ p ∈ m, Prime p) : normalizedFactors m.prod = m
-- Mathlib/Order/Monotone/Monovary.lean
@[symm]
protected theorem Antivary.symm (h : Antivary f g) : Antivary g f
-- Mathlib/RingTheory/Artinian.lean
theorem localization_artinian : IsArtinianRing L
-- Mathlib/Geometry/Euclidean/Circumcenter.lean
/-- The circumcenter of a 1-simplex equals its centroid. -/
theorem circumcenter_eq_centroid (s : Simplex ℝ P 1) :
    s.circumcenter = Finset.univ.centroid ℝ s.points
-- Mathlib/Probability/Martingale/Basic.lean
protected theorem integrable [LE E] (hf : Submartingale f ℱ μ) (i : ι) : Integrable (f i) μ
-- Mathlib/Algebra/GradedMonoid.lean
/-- A version of `GradedMonoid.ghas_one` for internally graded objects. -/
class SetLike.GradedMul {S : Type*} [SetLike S R] [Mul R] [Add ι] (A : ι → S) : Prop where
  /-- Multiplication is homogeneous -/
  mul_mem : ∀ ⦃i j⦄ {gi gj}, gi ∈ A i → gj ∈ A j → gi * gj ∈ A (i + j)
-- Mathlib/CategoryTheory/Limits/Shapes/Biproducts.lean
@[reassoc (attr := simp)]
theorem biproduct.lift_map {f g : J → C} [HasBiproduct f] [HasBiproduct g] {P : C}
    (k : ∀ j, P ⟶ f j) (p : ∀ j, f j ⟶ g j) :
    biproduct.lift k ≫ biproduct.map p = biproduct.lift fun j => k j ≫ p j
-- Mathlib/Algebra/Polynomial/Roots.lean
/-- A Galois connection. -/
theorem _root_.Multiset.prod_X_sub_C_dvd_iff_le_roots {p : R[X]} (hp : p ≠ 0) (s : Multiset R) :
    (s.map fun a => X - C a).prod ∣ p ↔ s ≤ p.roots
-- Mathlib/RingTheory/Ideal/Maps.lean
theorem map_radical_le : map f (radical I) ≤ radical (map f I)
-- .lake/packages/lean4/src/lean/Init/Data/List/Lemmas.lean
theorem minimum?_replicate [Min α] {n : Nat} {a : α} (w : min a a = a) :
    (replicate n a).minimum? = if n = 0 then none else some a
-- Mathlib/Analysis/Seminorm.lean
protected theorem uniformContinuous' [UniformSpace E] [UniformAddGroup E] [ContinuousConstSMul 𝕜 E]
    {p : Seminorm 𝕜 E} {r : ℝ} (hp : p.closedBall 0 r ∈ (𝓝 0 : Filter E)) :
    UniformContinuous p
-- Mathlib/MeasureTheory/Measure/Lebesgue/Basic.lean
@[simp]
theorem volume_Ioi {a : ℝ} : volume (Ioi a) = ∞
-- Mathlib/Algebra/Homology/ShortComplex/SnakeLemma.lean
/-- The functor which sends `S : SnakeInput C` to the auxiliary object `S.P`,
which is `pullback S.L₁.g S.v₀₁.τ₃`. -/
@[simps]
noncomputable def functorP : SnakeInput C ⥤ C
-- Mathlib/Order/Interval/Set/ProjIcc.lean
theorem IccExtend_apply (h : a ≤ b) (f : Icc a b → β) (x : α) :
    IccExtend h f x = f ⟨max a (min b x), le_max_left _ _, max_le h (min_le_left _ _)⟩
-- Mathlib/Algebra/Ring/Parity.lean
lemma iterate_eq_self (hf : Involutive f) (hne : f ≠ id) : f^[n] = f ↔ Odd n
-- Mathlib/Topology/Homotopy/Basic.lean
@[trans]
theorem trans ⦃f g h : C(X, Y)⦄ (h₀ : HomotopicRel f g S) (h₁ : HomotopicRel g h S) :
    HomotopicRel f h S
-- Mathlib/Order/Ideal.lean
@[simp]
theorem principal_top : principal (⊤ : P) = ⊤
-- Mathlib/Order/Filter/Basic.lean
@[simp]
theorem inf_principal {s t : Set α} : 𝓟 s ⊓ 𝓟 t = 𝓟 (s ∩ t)
-- Mathlib/Topology/EMetricSpace/Basic.lean
/-- Extended (pseudo) metric spaces, with an extended distance `edist` possibly taking the
value ∞

Each pseudo_emetric space induces a canonical `UniformSpace` and hence a canonical
`TopologicalSpace`.
This is enforced in the type class definition, by extending the `UniformSpace` structure. When
instantiating a `PseudoEMetricSpace` structure, the uniformity fields are not necessary, they
will be filled in by default. There is a default value for the uniformity, that can be substituted
in cases of interest, for instance when instantiating a `PseudoEMetricSpace` structure
on a product.

Continuity of `edist` is proved in `Topology.Instances.ENNReal`
-/
class PseudoEMetricSpace (α : Type u) extends EDist α : Type u where
  edist_self : ∀ x : α, edist x x = 0
  edist_comm : ∀ x y : α, edist x y = edist y x
  edist_triangle : ∀ x y z : α, edist x z ≤ edist x y + edist y z
  toUniformSpace : UniformSpace α := uniformSpaceOfEDist edist edist_self edist_comm edist_triangle
  uniformity_edist : 𝓤 α = ⨅ ε > 0, 𝓟 { p : α × α | edist p.1 p.2 < ε } := by rfl
-- Mathlib/Data/Seq/Seq.lean
@[simp]
theorem tail_nil : tail (nil : Seq α) = nil
-- .lake/packages/lean4/src/lean/Init/Data/List/Lemmas.lean
theorem eq_of_mem_replicate {a b : α} {n} (h : b ∈ replicate n a) : b = a
-- Mathlib/Data/Set/Function.lean
lemma InjOn.image_subset_image_iff (h : s.InjOn f) (h₁ : s₁ ⊆ s) (h₂ : s₂ ⊆ s) :
    f '' s₁ ⊆ f '' s₂ ↔ s₁ ⊆ s₂
-- Mathlib/Data/Multiset/Basic.lean
theorem le_iff_exists_add {s t : Multiset α} : s ≤ t ↔ ∃ u, t = s + u
-- Mathlib/FieldTheory/PrimitiveElement.lean
theorem primitive_element_iff_algHom_eq_of_eval' (α : E) :
    F⟮α⟯ = ⊤ ↔ Function.Injective fun φ : E →ₐ[F] A ↦ φ α
-- Mathlib/Analysis/BoxIntegral/Partition/Basic.lean
theorem disjoint_boxes_of_disjoint_iUnion (h : Disjoint π₁.iUnion π₂.iUnion) :
    Disjoint π₁.boxes π₂.boxes
-- Mathlib/CategoryTheory/Limits/Shapes/Pullback/PullbackCone.lean
@[simp]
theorem π_app_left (c : PullbackCone f g) : c.π.app WalkingCospan.left = c.fst
-- Mathlib/MeasureTheory/Covering/VitaliFamily.lean
theorem exists_disjoint_covering_ae :
    ∃ t : Set (α × Set α),
      (∀ p : α × Set α, p ∈ t → p.1 ∈ s) ∧
      (t.PairwiseDisjoint fun p => p.2) ∧
      (∀ p : α × Set α, p ∈ t → p.2 ∈ v.setsAt p.1 ∩ f p.1) ∧
      μ (s \ ⋃ (p : α × Set α) (_ : p ∈ t), p.2) = 0
-- Mathlib/FieldTheory/RatFunc/AsPolynomial.lean
@[simp]
theorem valuation_X_eq_neg_one :
    (idealX K).valuation (RatFunc.X : RatFunc K) = Multiplicative.ofAdd (-1 : ℤ)
-- Mathlib/Topology/Bases.lean
/-- A topological basis is one that satisfies the necessary conditions so that
  it suffices to take unions of the basis sets to get a topology (without taking
  finite intersections as well). -/
structure IsTopologicalBasis (s : Set (Set α)) : Prop where
  /-- For every point `x`, the set of `t ∈ s` such that `x ∈ t` is directed downwards.  -/
  exists_subset_inter : ∀ t₁ ∈ s, ∀ t₂ ∈ s, ∀ x ∈ t₁ ∩ t₂, ∃ t₃ ∈ s, x ∈ t₃ ∧ t₃ ⊆ t₁ ∩ t₂
  /-- The sets from `s` cover the whole space. -/
  sUnion_eq : ⋃₀ s = univ
  /-- The topology is generated by sets from `s`. -/
  eq_generateFrom : t = generateFrom s
-- Mathlib/CategoryTheory/Limits/EssentiallySmall.lean
theorem hasColimitsOfShape_of_essentiallySmall [EssentiallySmall.{w₁} J]
    [HasColimitsOfSize.{w₁, w₁} C] : HasColimitsOfShape J C
-- Mathlib/Geometry/RingedSpace/OpenImmersion.lean
/-- Suppose `X Y : SheafedSpace C`, where `C` is a concrete category,
whose forgetful functor reflects isomorphisms, preserves limits and filtered colimits.
Then a morphism `X ⟶ Y` that is a topological open embedding
is an open immersion iff every stalk map is an iso.
-/
theorem of_stalk_iso {X Y : LocallyRingedSpace} (f : X ⟶ Y) (hf : OpenEmbedding f.1.base)
    [stalk_iso : ∀ x : X.1, IsIso (f.stalkMap x)] :
    LocallyRingedSpace.IsOpenImmersion f
-- .lake/packages/batteries/Batteries/Data/UInt.lean
theorem UInt16.toNat_modn (x : UInt16) (n) : (x.modn n).toNat = x.toNat % n
-- Mathlib/Order/Filter/AtTopBot.lean
theorem tendsto_atBot_of_add_bdd_below_right' (C) (hC : ∀ᶠ x in l, C ≤ g x)
    (h : Tendsto (fun x => f x + g x) l atBot) : Tendsto f l atBot
-- Mathlib/Order/CompleteLattice.lean
theorem snd_iInf [InfSet α] [InfSet β] (f : ι → α × β) : (iInf f).snd = ⨅ i, (f i).snd
-- Mathlib/Analysis/RCLike/Basic.lean
theorem conj_eq_re_sub_im (z : K) : conj z = re z - im z * I
-- Mathlib/Algebra/Group/Prod.lean
@[to_additive (attr := simp)]
theorem snd_mul [Mul M] [Mul N] (p q : M × N) : (p * q).2 = p.2 * q.2
-- Mathlib/Data/Set/Basic.lean
theorem compl_inter (s t : Set α) : (s ∩ t)ᶜ = sᶜ ∪ tᶜ
-- Mathlib/Data/Set/Pairwise/Basic.lean
theorem PairwiseDisjoint.eq_of_le (hs : s.PairwiseDisjoint f) {i j : ι} (hi : i ∈ s) (hj : j ∈ s)
    (hf : f i ≠ ⊥) (hij : f i ≤ f j) : i = j
-- Mathlib/Computability/TuringMachine.lean
@[simp]
theorem ListBlank.nth_mk {Γ} [Inhabited Γ] (l : List Γ) (n : ℕ) :
    (ListBlank.mk l).nth n = l.getI n
-- Mathlib/Topology/DenseEmbedding.lean
theorem extend_unique [T2Space γ] {f : α → γ} {g : β → γ} (di : DenseInducing i)
    (hf : ∀ x, g (i x) = f x) (hg : Continuous g) : di.extend f = g
-- Mathlib/Analysis/SpecialFunctions/CompareExp.lean
theorem isLittleO_log_re_re (hl : IsExpCmpFilter l) : (fun z => Real.log z.re) =o[l] re
-- Mathlib/Combinatorics/SimpleGraph/Regularity/Bound.lean
theorem seven_le_initialBound : 7 ≤ initialBound ε l
-- Mathlib/Computability/Partrec.lean
@[simp]
theorem mem_rfind {p : ℕ →. Bool} {n : ℕ} :
    n ∈ rfind p ↔ true ∈ p n ∧ ∀ {m : ℕ}, m < n → false ∈ p m
-- Mathlib/Probability/Kernel/Basic.lean
lemma isFiniteKernel_of_le {κ ν : Kernel α β} [hν : IsFiniteKernel ν] (hκν : κ ≤ ν) :
    IsFiniteKernel κ
-- Mathlib/Order/Filter/ENNReal.lean
theorem eventually_le_limsup [CountableInterFilter f] (u : α → ℝ≥0∞) :
    ∀ᶠ y in f, u y ≤ f.limsup u
-- Mathlib/Data/List/Rotate.lean
@[simp]
protected theorem IsRotated.forall (l : List α) (n : ℕ) : l.rotate n ~r l
-- Mathlib/Order/ConditionallyCompleteLattice/Basic.lean
lemma sSup_iUnion_Iic (f : ι → α) : sSup (⋃ (i : ι), Iic (f i)) = ⨆ i, f i
-- Mathlib/SetTheory/ZFC/Basic.lean
theorem mem_pair {x y z : ZFSet.{u}} : x ∈ ({y, z} : ZFSet) ↔ x = y ∨ x = z
-- Mathlib/Order/Bounds/Basic.lean
theorem IsLeast.lt_iff (h : IsLeast s a) : b < a ↔ ∀ x ∈ s, b < x
-- Mathlib/LinearAlgebra/TensorProduct/Basic.lean
@[simp]
theorem rid_tmul (m : M) (r : R) : (TensorProduct.rid R M) (m ⊗ₜ r) = r • m
-- Mathlib/Algebra/Group/Commute/Basic.lean
@[to_additive (attr := simp)]
protected theorem conj_iff (h : G) : Commute (h * a * h⁻¹) (h * b * h⁻¹) ↔ Commute a b
-- Mathlib/Topology/Separation.lean
theorem Ne.nhdsWithin_compl_singleton [T1Space X] {x y : X} (h : x ≠ y) : 𝓝[{y}ᶜ] x = 𝓝 x
-- Mathlib/Algebra/GeomSum.lean
theorem geom_sum₂_succ_eq {α : Type u} [CommRing α] (x y : α) {n : ℕ} :
    ∑ i ∈ range (n + 1), x ^ i * y ^ (n - i) =
      x ^ n + y * ∑ i ∈ range n, x ^ i * y ^ (n - 1 - i)
-- Mathlib/Data/Finset/Basic.lean
theorem sdiff_insert_of_not_mem {x : α} (h : x ∉ s) (t : Finset α) : s \ insert x t = s \ t
-- Mathlib/MeasureTheory/Measure/Restrict.lean
theorem Subtype.volume_univ (hu : NullMeasurableSet u) : volume (univ : Set u) = volume u
-- .lake/packages/lean4/src/lean/Init/Data/Nat/Lemmas.lean
protected theorem exists_eq_add_of_lt (h : m < n) : ∃ k : Nat, n = m + k + 1
-- Mathlib/Order/Filter/Germ/Basic.lean
theorem isConstant_coe {l : Filter α} {b} (h : ∀ x', f x' = b) : (↑f : Germ l β).IsConstant
-- Mathlib/Geometry/Euclidean/Angle/Oriented/Basic.lean
/-- Subtracting the first vector passed to `oangle` from a multiple of the second vector negates
the sign of the angle. -/
@[simp]
theorem oangle_sign_smul_sub_left (x y : V) (r : ℝ) :
    (o.oangle (r • y - x) y).sign = -(o.oangle x y).sign
-- Mathlib/CategoryTheory/Abelian/Basic.lean
/-- Factoring through the image is a strong epi-mono factorisation. -/
@[simps]
def imageStrongEpiMonoFactorisation : StrongEpiMonoFactorisation f
-- .lake/packages/lean4/src/lean/Init/Data/Bool.lean
theorem cond_eq_if : (bif b then x else y) = (if b then x else y)
-- Mathlib/Data/Set/Card.lean
theorem encard_tsub_one_le_encard_diff_singleton (s : Set α) (x : α) :
    s.encard - 1 ≤ (s \ {x}).encard
-- Mathlib/Analysis/SpecialFunctions/Exponential.lean
theorem hasDerivAt_exp_smul_const' (x : 𝔸) (t : 𝕂) :
    HasDerivAt (fun u : 𝕂 => exp 𝕂 (u • x)) (x * exp 𝕂 (t • x)) t
-- Mathlib/Algebra/Group/Prod.lean
@[to_additive (attr := simp) snd_comp_prod]
theorem snd_comp_prod (f : M →* N) (g : M →* P) : (snd N P).comp (f.prod g) = g
-- Mathlib/Algebra/Algebra/Defs.lean
theorem algebraMap_eq_smul_one' : ⇑(algebraMap R A) = fun r => r • (1 : A)
-- Mathlib/SetTheory/Cardinal/Cofinality.lean
theorem cof_sup_le_lift {ι} {f : ι → Ordinal} (H : ∀ i, f i < sup.{u, v} f) :
    cof (sup.{u, v} f) ≤ Cardinal.lift.{v, u} #ι
-- Mathlib/LinearAlgebra/LinearIndependent.lean
@[simp]
theorem LinearIndependent.total_repr (x) : Finsupp.total ι M R v (hv.repr x) = x
-- Mathlib/RingTheory/Localization/Basic.lean
theorem isLocalization_of_base_ringEquiv [IsLocalization M S] (h : R ≃+* P) :
    haveI := ((algebraMap R S).comp h.symm.toRingHom).toAlgebra
    IsLocalization (M.map h.toMonoidHom) S
-- Mathlib/LinearAlgebra/UnitaryGroup.lean
@[simp]
theorem toLin'_one : toLin' (1 : unitaryGroup n α) = LinearMap.id
-- Mathlib/Algebra/Order/Floor.lean
@[simp]
theorem ceil_add_nat (a : α) (n : ℕ) : ⌈a + n⌉ = ⌈a⌉ + n
-- Mathlib/GroupTheory/GroupAction/Quotient.lean
@[to_additive]
theorem injective_ofQuotientStabilizer : Function.Injective (ofQuotientStabilizer α x)
-- Mathlib/Algebra/Ring/Subring/Basic.lean
theorem eq_of_eqOn_set_dense {s : Set R} (hs : closure s = ⊤) {f g : R →+* S} (h : s.EqOn f g) :
    f = g
-- Mathlib/Topology/Algebra/Order/Field.lean
/-- In a linearly ordered field with the order topology, if `f` tends to `Filter.atTop` and `g`
tends to a positive constant `C` then `f * g` tends to `Filter.atTop`. -/
theorem Filter.Tendsto.atTop_mul {C : 𝕜} (hC : 0 < C) (hf : Tendsto f l atTop)
    (hg : Tendsto g l (𝓝 C)) : Tendsto (fun x => f x * g x) l atTop
-- Mathlib/MeasureTheory/Function/ConditionalExpectation/CondexpL1.lean
theorem setIntegral_condexpInd (hs : MeasurableSet[m] s) (ht : MeasurableSet t) (hμs : μ s ≠ ∞)
    (hμt : μ t ≠ ∞) (x : G') : ∫ a in s, condexpInd G' hm μ t x a ∂μ = (μ (t ∩ s)).toReal • x
-- Mathlib/Algebra/Module/Submodule/Bilinear.lean
theorem map₂_le_map₂_left {f : M →ₗ[R] N →ₗ[R] P} {p₁ p₂ : Submodule R M} {q : Submodule R N}
    (h : p₁ ≤ p₂) : map₂ f p₁ q ≤ map₂ f p₂ q
-- Mathlib/MeasureTheory/Measure/GiryMonad.lean
theorem join_dirac (μ : Measure α) : join (dirac μ) = μ
-- Mathlib/Order/UpperLower/Basic.lean
@[simp] lemma lt_sdiff_left : s < s.sdiff t ↔ ¬ Disjoint ↑s t
-- Mathlib/Algebra/Order/AbsoluteValue.lean
@[simp]
theorem coe_toMonoidHom : ⇑abv.toMonoidHom = abv
-- Mathlib/Data/Set/Pointwise/Basic.lean
@[to_additive]
theorem isUnit_singleton (a : α) : IsUnit ({a} : Set α)
-- Mathlib/Data/PNat/Prime.lean
theorem exists_prime_and_dvd {n : ℕ+} (hn : n ≠ 1) : ∃ p : ℕ+, p.Prime ∧ p ∣ n
-- .lake/packages/batteries/Batteries/Data/List/Count.lean
@[deprecated filter_eq (since := "2023-12-14")]
theorem filter_eq' (l : List α) (a : α) : l.filter (a = ·) = replicate (count a l) a
-- Mathlib/LinearAlgebra/TensorProduct/Graded/Internal.lean
lemma algebraMap_def (r : R) : algebraMap R (𝒜 ᵍ⊗[R] ℬ) r = algebraMap R A r ᵍ⊗ₜ[R] 1
-- Mathlib/MeasureTheory/Measure/MeasureSpace.lean
@[simp]
theorem sum_apply_eq_zero [Countable ι] {μ : ι → Measure α} {s : Set α} :
    sum μ s = 0 ↔ ∀ i, μ i s = 0
-- Mathlib/LinearAlgebra/Basis/Flag.lean
theorem isChain_range_flag (b : Basis (Fin n) R M) : IsChain (· ≤ ·) (range b.flag)
-- Mathlib/Topology/Order/Basic.lean
theorem pi_Iio_mem_nhds (ha : ∀ i, x i < a i) : Iio a ∈ 𝓝 x
-- .lake/packages/batteries/Batteries/Data/List/Lemmas.lean
@[simp] theorem disjoint_append_left : Disjoint (l₁ ++ l₂) l ↔ Disjoint l₁ l ∧ Disjoint l₂ l
-- Mathlib/Order/ConditionallyCompleteLattice/Group.lean
@[to_additive]
theorem le_ciInf_mul [CovariantClass α α (Function.swap (· * ·)) (· ≤ ·)] {a : α} {g : ι → α}
    {h : α} (H : ∀ i, a ≤ g i * h) : a ≤ iInf g * h
-- Mathlib/Logic/Equiv/Defs.lean
theorem nonempty_congr (e : α ≃ β) : Nonempty α ↔ Nonempty β
-- Mathlib/Analysis/SpecialFunctions/Log/Basic.lean
theorem log_nonneg_iff (hx : 0 < x) : 0 ≤ log x ↔ 1 ≤ x
-- Mathlib/SetTheory/Cardinal/Basic.lean
theorem aleph0_le {c : Cardinal} : ℵ₀ ≤ c ↔ ∀ n : ℕ, ↑n ≤ c
-- Mathlib/Order/Disjoint.lean
/-- Two elements `x` and `y` are complements of each other if `x ⊔ y = ⊤` and `x ⊓ y = ⊥`. -/
structure IsCompl [PartialOrder α] [BoundedOrder α] (x y : α) : Prop where
  /-- If `x` and `y` are to be complementary in an order, they should be disjoint. -/
  protected disjoint : Disjoint x y
  /-- If `x` and `y` are to be complementary in an order, they should be codisjoint. -/
  protected codisjoint : Codisjoint x y
-- Mathlib/Logic/Function/Basic.lean
theorem partialInv_of_injective {α β} {f : α → β} (I : Injective f) : IsPartialInv f (partialInv f)
-- Mathlib/Analysis/NormedSpace/Extr.lean
/-- If `f : α → E` is a function such that `norm ∘ f` has a local maximum on a set `s` at a point
`c` and `y` is a vector on the same ray as `f c`, then the function `fun x => ‖f x + y‖` has a local
maximum on `s` at `c`. -/
theorem IsLocalMaxOn.norm_add_sameRay (h : IsLocalMaxOn (norm ∘ f) s c) (hy : SameRay ℝ (f c) y) :
    IsLocalMaxOn (fun x => ‖f x + y‖) s c
-- Mathlib/AlgebraicTopology/DoldKan/Compatibility.lean
theorem equivalence_functor : (equivalence hF hG).functor = F ⋙ eB.inverse
-- .lake/packages/lean4/src/lean/Init/Data/List/Basic.lean
@[simp] theorem isEmpty_cons : (x :: xs : List α).isEmpty = false
-- Mathlib/Algebra/GroupWithZero/Indicator.lean
lemma indicator_one_inj (h : indicator s (1 : ι → M₀) = indicator t 1) : s = t
-- Mathlib/Algebra/Homology/ShortComplex/Preadditive.lean
/-- Homotopy between morphisms of short complexes is compatible with precomposition. -/
@[simps]
def compLeft (h : Homotopy φ₁ φ₂) (ψ : S₃ ⟶ S₁) : Homotopy (ψ ≫ φ₁) (ψ ≫ φ₂)
-- Mathlib/Algebra/Algebra/Tower.lean
/-- A variant of `Submodule.span_image` for `algebraMap`. -/
theorem span_algebraMap_image (a : Set R) :
    Submodule.span R (algebraMap R S '' a) = (Submodule.span R a).map (Algebra.linearMap R S)
-- Mathlib/AlgebraicGeometry/OpenImmersion.lean
theorem app_eq_invApp_app_of_comp_eq_aux {X Y U : Scheme.{u}} (f : Y ⟶ U) (g : U ⟶ X) (fg : Y ⟶ X)
    (H : fg = f ≫ g) [h : IsOpenImmersion g] (V : U.Opens) :
    f ⁻¹ᵁ V = fg ⁻¹ᵁ (g ''ᵁ V)
-- Mathlib/Data/Matrix/ColumnRowPartitioned.lean
/-- A column partioned matrix in a Star ring when conjugate transposed gives a row partitioned
matrix with the columns of the initial matrix conjugate transposed to become rows. -/
lemma conjTranspose_fromColumns_eq_fromRows_conjTranspose (A₁ : Matrix m n₁ R)
    (A₂ : Matrix m n₂ R) :
    conjTranspose (fromColumns A₁ A₂) = fromRows (conjTranspose A₁) (conjTranspose A₂)
-- Mathlib/Topology/Order/IsLUB.lean
theorem isGLB_of_mem_closure {s : Set α} {a : α} (hsa : a ∈ lowerBounds s) (hsf : a ∈ closure s) :
    IsGLB s a
-- Mathlib/CategoryTheory/Limits/Shapes/Biproducts.lean
/-- A functor `G : C ⥤ D` sends bicones over `F` to bicones over `G.obj ∘ F` functorially. -/
@[simps]
def functoriality (G : C ⥤ D) [Functor.PreservesZeroMorphisms G] :
    Bicone F ⥤ Bicone (G.obj ∘ F)
-- Mathlib/MeasureTheory/Function/L1Space.lean
@[simp]
theorem integrable_neg_iff {f : α → β} : Integrable (-f) μ ↔ Integrable f μ
-- .lake/packages/lean4/src/lean/Init/Data/Array/Lemmas.lean
@[simp] theorem appendList_eq_append
    (arr : Array α) (l : List α) : arr.appendList l = arr ++ l
-- Mathlib/Topology/Algebra/Order/LiminfLimsup.lean
/-- Ad hoc typeclass stating that neighborhoods are eventually bounded above. -/
class BoundedLENhdsClass (α : Type*) [Preorder α] [TopologicalSpace α] : Prop where
  isBounded_le_nhds (a : α) : (𝓝 a).IsBounded (· ≤ ·)
-- Mathlib/Algebra/Order/Ring/Unbundled/Basic.lean
theorem cmp_mul_neg_left [ExistsAddOfLE α] [PosMulStrictMono α]
    [ContravariantClass α α (swap (· + ·)) (· < ·)] [CovariantClass α α (swap (· + ·)) (· < ·)]
    {a : α} (ha : a < 0) (b c : α) : cmp (a * b) (a * c) = cmp c b
-- Mathlib/Algebra/Category/ModuleCat/Sheaf.lean
@[simp]
lemma id_val (X : SheafOfModules.{v} R) : Hom.val (𝟙 X) = 𝟙 X.val
-- Mathlib/Algebra/Category/Ring/Instances.lean
theorem isLocalRingHom_of_iso {R S : CommRingCat} (f : R ≅ S) : IsLocalRingHom f.hom
-- Mathlib/Data/ZMod/Basic.lean
lemma val_inv_mul (hmn : m.Coprime n) : ((m⁻¹ : ZMod n).val * m : ZMod n) = 1
-- Mathlib/SetTheory/Cardinal/Basic.lean
theorem mk_insert_le {α : Type u} {s : Set α} {a : α} : #(insert a s : Set α) ≤ #s + 1
-- Mathlib/Analysis/InnerProductSpace/Projection.lean
/-- In a complete space `E`, the projection maps onto a complete subspace `K` and its orthogonal
complement sum to the identity. -/
theorem id_eq_sum_orthogonalProjection_self_orthogonalComplement [HasOrthogonalProjection K] :
    ContinuousLinearMap.id 𝕜 E =
      K.subtypeL.comp (orthogonalProjection K) + Kᗮ.subtypeL.comp (orthogonalProjection Kᗮ)
-- Mathlib/LinearAlgebra/Span.lean
@[simp]
theorem span_singleton_eq_bot : (R ∙ x) = ⊥ ↔ x = 0
-- Mathlib/Algebra/Lie/Weights/Basic.lean
@[simp] lemma posFittingCompOf_eq_bot_of_isNilpotent
    [IsNilpotent R L M] (x : L) :
    posFittingCompOf R M x = ⊥
-- Mathlib/GroupTheory/Congruence/Basic.lean
@[to_additive (attr := elab_as_elim)]
theorem induction_on_units {p : Units c.Quotient → Prop} (u : Units c.Quotient)
    (H : ∀ (x y : M) (hxy : c (x * y) 1) (hyx : c (y * x) 1), p ⟨x, y, c.eq.2 hxy, c.eq.2 hyx⟩) :
    p u
-- Mathlib/Geometry/Manifold/IntegralCurve.lean
/-- Local integral curves are unique.

If a $C^1$ vector field `v` admits two local integral curves `γ γ' : ℝ → M` at `t₀` with
`γ t₀ = γ' t₀`, then `γ` and `γ'` agree on some open interval containing `t₀`. -/
theorem isIntegralCurveAt_eventuallyEq_of_contMDiffAt (hγt₀ : I.IsInteriorPoint (γ t₀))
    (hv : ContMDiffAt I I.tangent 1 (fun x ↦ (⟨x, v x⟩ : TangentBundle I M)) (γ t₀))
    (hγ : IsIntegralCurveAt γ v t₀) (hγ' : IsIntegralCurveAt γ' v t₀) (h : γ t₀ = γ' t₀) :
    γ =ᶠ[𝓝 t₀] γ'