ruc-ai4math/mathlib_handler_benchmark_410 huggingface dataset:
-- Mathlib/RingTheory/Polynomial/Content.lean
theorem dvd_iff_content_dvd_content_and_primPart_dvd_primPart {p q : R[X]} (hq : q ≠ 0) :
    p ∣ q ↔ p.content ∣ q.content ∧ p.primPart ∣ q.primPart
-- Mathlib/Analysis/CstarAlgebra/ContinuousFunctionalCalculus/Unique.lean
@[simp]
lemma toNNReal_smul (r : ℝ≥0) (f : C(X, ℝ)₀) : (r • f).toNNReal = r • f.toNNReal
-- Mathlib/LinearAlgebra/BilinearForm/Orthogonal.lean
theorem isOrtho_zero_right (x : M) : IsOrtho B x (0 : M)
-- Mathlib/Logic/Basic.lean
theorem Exists₃.imp {p q : ∀ a b, γ a b → Prop} (h : ∀ a b c, p a b c → q a b c) :
    (∃ a b c, p a b c) → ∃ a b c, q a b c
-- Mathlib/Topology/Compactness/Compact.lean
theorem mem_cocompact' : s ∈ cocompact X ↔ ∃ t, IsCompact t ∧ sᶜ ⊆ t
-- Mathlib/Data/Set/Functor.lean
theorem mem_image_val_of_mem (ha : a ∈ β) (ha' : ⟨a, ha⟩ ∈ γ) : a ∈ (γ : Set α)
-- Mathlib/Order/Closure.lean
theorem gc : GaloisConnection l u
-- Mathlib/Algebra/Order/CauSeq/Completion.lean
/-- A class stating that a ring with an absolute value is complete, i.e. every Cauchy
sequence has a limit. -/
class IsComplete : Prop where
  /-- Every Cauchy sequence has a limit. -/
  isComplete : ∀ s : CauSeq β abv, ∃ b : β, s ≈ const abv b
-- Mathlib/Order/Max.lean
theorem IsBot.fst (hx : IsBot x) : IsBot x.1
-- Mathlib/Order/Filter/AtTopBot.lean
theorem Iio_mem_atBot [Preorder α] [NoMinOrder α] (x : α) : Iio x ∈ (atBot : Filter α)
-- Mathlib/CategoryTheory/Filtered/Basic.lean
/-- A category `IsCofilteredOrEmpty` if
1. for every pair of objects there exists another object "to the left", and
2. for every pair of parallel morphisms there exists a morphism to the left so the compositions
   are equal.
-/
class IsCofilteredOrEmpty : Prop where
  /-- for every pair of objects there exists another object "to the left" -/
  cone_objs : ∀ X Y : C, ∃ (W : _) (_ : W ⟶ X) (_ : W ⟶ Y), True
  /-- for every pair of parallel morphisms there exists a morphism to the left
    so the compositions are equal -/
  cone_maps : ∀ ⦃X Y : C⦄ (f g : X ⟶ Y), ∃ (W : _) (h : W ⟶ X), h ≫ f = h ≫ g
-- Mathlib/Data/Set/Card.lean
theorem ncard_eq_toFinset_card' (s : Set α) [Fintype s] :
    s.ncard = s.toFinset.card
-- Mathlib/Algebra/Order/Ring/Unbundled/Basic.lean
theorem add_one_le_two_mul [LE α] [Semiring α] [CovariantClass α α (· + ·) (· ≤ ·)] {a : α}
    (a1 : 1 ≤ a) : a + 1 ≤ 2 * a
-- Mathlib/RingTheory/OreLocalization/Basic.lean
protected theorem add_assoc (x y z : X[S⁻¹]) : x + y + z = x + (y + z)
-- Mathlib/LinearAlgebra/Prod.lean
@[simp]
theorem skewProd_apply (f : M →ₗ[R] M₄) (x) : e₁.skewProd e₂ f x = (e₁ x.1, e₂ x.2 + f x.1)
-- Mathlib/LinearAlgebra/Dimension/Finite.lean
theorem rank_pos [Nontrivial M] : 0 < Module.rank R M
-- Mathlib/Order/Filter/Archimedean.lean
theorem atTop_hasAntitoneBasis_of_archimedean [OrderedSemiring R] [Archimedean R] :
    (atTop : Filter R).HasAntitoneBasis fun n : ℕ => Ici n
-- Mathlib/Data/ENNReal/Basic.lean
theorem toReal_le_coe_of_le_coe {a : ℝ≥0∞} {b : ℝ≥0} (h : a ≤ b) : a.toReal ≤ b
-- Mathlib/RingTheory/Valuation/ValuationSubring.lean
theorem le_top : A ≤ ⊤
-- Mathlib/NumberTheory/ModularForms/SlashInvariantForms.lean
@[simp]
theorem SlashInvariantForm.coe_mk (f : ℍ → ℂ) (hf : ∀ γ : Γ, f ∣[k] γ = f) : ⇑(mk f hf) = f
-- Mathlib/RingTheory/Polynomial/IntegralNormalization.lean
theorem integralNormalization_coeff_ne_degree {f : R[X]} {i : ℕ} (hi : f.degree ≠ i) :
    coeff (integralNormalization f) i = coeff f i * f.leadingCoeff ^ (f.natDegree - 1 - i)
-- .lake/packages/lean4/src/lean/lake/Lake/Util/Compare.lean
theorem eq_of_compareOfLessAndEq [LT α] [DecidableEq α] {a a' : α}
[Decidable (a < a')] (h : compareOfLessAndEq a a' = .eq) : a = a'
-- Mathlib/Analysis/Analytic/Basic.lean
theorem analyticOn_congr' {s : Set E} (h : f =ᶠ[𝓝ˢ s] g) : AnalyticOn 𝕜 f s ↔ AnalyticOn 𝕜 g s
-- Mathlib/Probability/Kernel/Composition.lean
theorem ae_ae_of_ae_compProd {p : β × γ → Prop} (h : ∀ᵐ bc ∂(κ ⊗ₖ η) a, p bc) :
    ∀ᵐ b ∂κ a, ∀ᵐ c ∂η (a, b), p (b, c)
-- Mathlib/Algebra/Star/NonUnitalSubalgebra.lean
@[simp]
lemma span_eq_toSubmodule (s : NonUnitalStarSubalgebra R A) :
    Submodule.span R (s : Set A) = s.toSubmodule
-- Mathlib/FieldTheory/SeparableClosure.lean
@[simp]
theorem sepDegree_bot' : sepDegree F (⊥ : IntermediateField E K) = sepDegree F E
-- Mathlib/RingTheory/Bialgebra/Hom.lean
@[simp]
theorem comp_id : φ.comp (BialgHom.id R A) = φ
-- Mathlib/LinearAlgebra/DirectSum/Finsupp.lean
theorem finsuppTensorFinsupp'_symm_single_mul (i : ι × κ) (r₁ r₂ : R) :
    (finsuppTensorFinsupp' R ι κ).symm (Finsupp.single i (r₁ * r₂)) =
      Finsupp.single i.1 r₁ ⊗ₜ Finsupp.single i.2 r₂
-- Mathlib/Algebra/Category/ModuleCat/Basic.lean
@[simp]
lemma mkOfSMul'_smul (r : R) (x : mkOfSMul' φ) :
    r • x = (show A ⟶ A from φ r) x
-- Mathlib/CategoryTheory/NatIso.lean
/-- Horizontal composition of natural isomorphisms. -/
@[simps]
def hcomp {F G : C ⥤ D} {H I : D ⥤ E} (α : F ≅ G) (β : H ≅ I) : F ⋙ H ≅ G ⋙ I
-- Mathlib/Init/Logic.lean
theorem imp_of_if_neg {c t e : Prop} [Decidable c] (h : ite c t e) (hnc : ¬c) : e
-- Mathlib/SetTheory/Cardinal/Basic.lean
theorem power_mul {a b c : Cardinal} : a ^ (b * c) = (a ^ b) ^ c
-- Mathlib/Topology/Basic.lean
@[simp] theorem isClosed_univ : IsClosed (univ : Set X)
-- Mathlib/Data/ENNReal/Real.lean
theorem toReal_pos {a : ℝ≥0∞} (ha₀ : a ≠ 0) (ha_top : a ≠ ∞) : 0 < a.toReal
-- Mathlib/Analysis/Calculus/ContDiff/Basic.lean
/-- If `f` is a local homeomorphism and the point `a` is in its target,
and if `f` is `n` times continuously differentiable at `f.symm a`,
and if the derivative at `f.symm a` is a continuous linear equivalence,
then `f.symm` is `n` times continuously differentiable at the point `a`.

This is one of the easy parts of the inverse function theorem: it assumes that we already have
an inverse function. -/
theorem PartialHomeomorph.contDiffAt_symm [CompleteSpace E] (f : PartialHomeomorph E F)
    {f₀' : E ≃L[𝕜] F} {a : F} (ha : a ∈ f.target)
    (hf₀' : HasFDerivAt f (f₀' : E →L[𝕜] F) (f.symm a)) (hf : ContDiffAt 𝕜 n f (f.symm a)) :
    ContDiffAt 𝕜 n f.symm a
-- Mathlib/Order/CompleteLattice.lean
theorem down_iSup [SupSet α] (f : ι → ULift.{v} α) : (⨆ i, f i).down = ⨆ i, (f i).down
-- Mathlib/Algebra/Polynomial/Expand.lean
@[simp]
theorem expand_C (r : R) : expand R p (C r) = C r
-- Mathlib/Topology/Order/IntermediateValue.lean
theorem isPreconnected_Iic : IsPreconnected (Iic a)
-- Mathlib/Analysis/Convex/Basic.lean
theorem Convex.affinity (hs : Convex 𝕜 s) (z : E) (c : 𝕜) :
    Convex 𝕜 ((fun x => z + c • x) '' s)
-- Mathlib/Analysis/NormedSpace/AddTorsor.lean
@[simp]
theorem dist_self_homothety (p₁ p₂ : P) (c : 𝕜) :
    dist p₂ (homothety p₁ c p₂) = ‖1 - c‖ * dist p₁ p₂
-- Mathlib/Data/List/Sublists.lean
@[simp]
theorem mem_sublistsLen {n} {l l' : List α} :
    l' ∈ sublistsLen n l ↔ l' <+ l ∧ length l' = n
-- .lake/packages/batteries/Batteries/Data/List/Count.lean
theorem Sublist.countP_le (s : l₁ <+ l₂) : countP p l₁ ≤ countP p l₂
-- Mathlib/RingTheory/Localization/Module.lean
theorem span_eq_top_of_isLocalizedModule {v : Set M} (hv : span R v = ⊤) :
    span Rₛ (f '' v) = ⊤
-- .lake/packages/lean4/src/lean/Init/Core.lean
theorem iff_of_eq : a = b → (a ↔ b)
-- Mathlib/CategoryTheory/Monoidal/Center.lean
@[simp]
theorem tensor_β (X Y : Center C) (U : C) :
    (X ⊗ Y).2.β U =
      α_ _ _ _ ≪≫
        (whiskerLeftIso X.1 (Y.2.β U)) ≪≫ (α_ _ _ _).symm ≪≫
          (whiskerRightIso (X.2.β U) Y.1) ≪≫ α_ _ _ _
-- Mathlib/Data/Set/Pointwise/SMul.lean
theorem union_vsub_inter_subset_union : s₁ ∪ s₂ -ᵥ t₁ ∩ t₂ ⊆ s₁ -ᵥ t₁ ∪ (s₂ -ᵥ t₂)
-- Mathlib/NumberTheory/MulChar/Basic.lean
lemma ringHomComp_inv {R : Type*} [CommRing R] (χ : MulChar R R') (f : R' →+* R'') :
    (χ.ringHomComp f)⁻¹ = χ⁻¹.ringHomComp f
-- Mathlib/Analysis/CstarAlgebra/ContinuousFunctionalCalculus/Unital.lean
lemma CFC.spectrum_one_eq [Nontrivial A] :
    spectrum R (1 : A) = {1}
-- .lake/packages/lean4/src/lean/Init/Data/BitVec/Lemmas.lean
private theorem lt_two_pow_of_le {x m n : Nat} (lt : x < 2 ^ m) (le : m ≤ n) : x < 2 ^ n
-- Mathlib/Combinatorics/SimpleGraph/Subgraph.lean
@[simp]
theorem verts_top : (⊤ : G.Subgraph).verts = Set.univ
-- Mathlib/CategoryTheory/Limits/Shapes/WideEqualizers.lean
@[simp]
theorem Trident.ι_eq_app_zero (t : Trident f) : t.ι = t.π.app zero
-- Mathlib/Analysis/BoxIntegral/Basic.lean
theorem HasIntegral.integral_eq (h : HasIntegral I l f vol y) : integral I l f vol = y
-- Mathlib/Topology/Instances/Matrix.lean
@[continuity]
theorem Continuous.matrix_submatrix {A : X → Matrix l n R} (hA : Continuous A) (e₁ : m → l)
    (e₂ : p → n) : Continuous fun x => (A x).submatrix e₁ e₂
-- Mathlib/Data/Nat/Factorial/Basic.lean
theorem add_descFactorial_eq_ascFactorial' (n : ℕ) :
    ∀ k : ℕ, (n + k - 1).descFactorial k = n.ascFactorial k
-- Mathlib/Algebra/Order/Monoid/Unbundled/Basic.lean
@[to_additive eq_zero_of_add_nonneg_left]
theorem eq_one_of_one_le_mul_left (ha : a ≤ 1) (hb : b ≤ 1) (hab : 1 ≤ a * b) : a = 1
-- Mathlib/Data/List/EditDistance/Bounds.lean
theorem le_levenshtein_append (xs : List α) (ys₁ ys₂) :
    ∃ xs', xs' <:+ xs ∧ levenshtein C xs' ys₂ ≤ levenshtein C xs (ys₁ ++ ys₂)
-- Mathlib/Data/Real/GoldenRatio.lean
@[simp]
theorem goldConj_mul_gold : ψ * φ = -1
-- Mathlib/CategoryTheory/Sites/Continuous.lean
lemma isContinuous_comp (F₁ : C ⥤ D) (F₂ : D ⥤ E) (J : GrothendieckTopology C)
    (K : GrothendieckTopology D) (L : GrothendieckTopology E)
    [Functor.IsContinuous.{t} F₁ J K] [Functor.IsContinuous.{t} F₂ K L] :
    Functor.IsContinuous.{t} (F₁ ⋙ F₂) J L
-- Mathlib/Algebra/Order/Ring/Unbundled/Basic.lean
/-- Variant of `mul_le_of_le_one_right` for `a` non-positive instead of non-negative. -/
theorem le_mul_of_le_one_right [ExistsAddOfLE α] [PosMulMono α]
    [CovariantClass α α (swap (· + ·)) (· ≤ ·)] [ContravariantClass α α (swap (· + ·)) (· ≤ ·)]
    (ha : a ≤ 0) (h : b ≤ 1) : a ≤ a * b
-- Mathlib/FieldTheory/IntermediateField.lean
@[simp]
theorem inclusion_self {E : IntermediateField K L} : inclusion (le_refl E) = AlgHom.id K E
-- Mathlib/Topology/Order/OrderClosed.lean
theorem eventually_lt_nhds (hab : a < b) : ∀ᶠ x in 𝓝 a, x < b
-- Mathlib/RingTheory/Coalgebra/Basic.lean
@[simp]
theorem counit_apply (r : R) : counit r = r
-- Mathlib/Order/LiminfLimsup.lean
theorem OrderIso.liminf_apply {γ} [ConditionallyCompleteLattice β] [ConditionallyCompleteLattice γ]
    {f : Filter α} {u : α → β} (g : β ≃o γ)
    (hu : f.IsBoundedUnder (· ≥ ·) u := by isBoundedDefault)
    (hu_co : f.IsCoboundedUnder (· ≥ ·) u := by isBoundedDefault)
    (hgu : f.IsBoundedUnder (· ≥ ·) fun x => g (u x) := by isBoundedDefault)
    (hgu_co : f.IsCoboundedUnder (· ≥ ·) fun x => g (u x) := by isBoundedDefault) :
    g (liminf u f) = liminf (fun x => g (u x)) f
-- Mathlib/RingTheory/TensorProduct/Basic.lean
@[simp]
theorem congr_refl : congr (.refl : A ≃ₐ[S] A) (.refl : C ≃ₐ[R] C) = .refl
-- Mathlib/Algebra/Group/Action/Defs.lean
@[to_additive]
lemma Commute.smul_left [Mul α] [SMulCommClass M α α] [IsScalarTower M α α] {a b : α}
    (h : Commute a b) (r : M) : Commute (r • a) b
-- Mathlib/Analysis/Normed/Lp/ProdLp.lean
@[simp]
theorem smul_snd : (c • x).snd = c • x.snd
-- .lake/packages/lean4/src/lean/Init/Data/Option/Lemmas.lean
@[simp] theorem elim_some (x : β) (f : α → β) (a : α) : (some a).elim x f = f a
-- Mathlib/Combinatorics/SimpleGraph/Regularity/Increment.lean
lemma le_sum_distinctPairs_edgeDensity_sq (x : {i // i ∈ P.parts.offDiag}) (hε₁ : ε ≤ 1)
    (hPα : P.parts.card * 16 ^ P.parts.card ≤ card α) (hPε : ↑100 ≤ ↑4 ^ P.parts.card * ε ^ 5) :
    (G.edgeDensity x.1.1 x.1.2 : ℝ) ^ 2 +
      ((if G.IsUniform ε x.1.1 x.1.2 then 0 else ε ^ 4 / 3) - ε ^ 5 / 25) ≤
    (∑ i ∈ distinctPairs hP G ε x, G.edgeDensity i.1 i.2 ^ 2 : ℝ) / 16 ^ P.parts.card
-- Mathlib/Analysis/Calculus/ContDiff/Basic.lean
theorem iteratedFDeriv_const_of_ne {n : ℕ} (hn : n ≠ 0) (c : F) :
    (iteratedFDeriv 𝕜 n fun _ : E ↦ c) = 0
-- Mathlib/LinearAlgebra/Matrix/Transvection.lean
theorem prod_mul_reverse_inv_prod (L : List (TransvectionStruct n R)) :
    (L.map toMatrix).prod * (L.reverse.map (toMatrix ∘ TransvectionStruct.inv)).prod = 1
-- Mathlib/RingTheory/Coprime/Basic.lean
theorem IsCoprime.isUnit_of_dvd' {a b x : R} (h : IsCoprime a b) (ha : x ∣ a) (hb : x ∣ b) :
    IsUnit x
-- Mathlib/SetTheory/Ordinal/Arithmetic.lean
@[simp]
theorem zero_sub (a : Ordinal) : 0 - a = 0
-- Mathlib/RingTheory/Regular/RegularSequence.lean
lemma smul_top_le_comap_smul_top [CommSemiring R] [AddCommMonoid M]
    [AddCommMonoid M₂] [Module R M] [Module R M₂] (I : Ideal R)
    (f : M →ₗ[R] M₂) : I • ⊤ ≤ comap f (I • ⊤)
-- Mathlib/Algebra/Homology/HomotopyCategory/HomComplex.lean
@[reassoc]
lemma v_comp_XIsoOfEq_inv
    (γ : Cochain F G n) (p q q' : ℤ) (hpq : p + n = q) (hq' : q' = q) :
    γ.v p q hpq ≫ (HomologicalComplex.XIsoOfEq G hq').inv = γ.v p q' (by rw [hq', hpq])
-- Mathlib/Topology/Sequences.lean
theorem IsCompact.tendsto_subseq {s : Set X} {x : ℕ → X} (hs : IsCompact s) (hx : ∀ n, x n ∈ s) :
    ∃ a ∈ s, ∃ φ : ℕ → ℕ, StrictMono φ ∧ Tendsto (x ∘ φ) atTop (𝓝 a)
-- Mathlib/Analysis/Convex/Deriv.lean
lemma slope_lt_of_hasDerivWithinAt (hfc : StrictConcaveOn ℝ S f)
    (hx : x ∈ S) (hy : y ∈ S) (hxy : x < y) (hfd : HasDerivWithinAt f f' S x) :
    slope f x y < f'
-- Mathlib/Combinatorics/Colex.lean
/-- If `s ≤ t` in colex and `s.card ≤ t.card`, then `s \ {a} ≤ t \ {min t}` for any `a ∈ s`. -/
lemma erase_le_erase_min' (hst : toColex s ≤ toColex t) (hcard : s.card ≤ t.card) (ha : a ∈ s) :
    toColex (s.erase a) ≤
      toColex (t.erase <| min' t <| card_pos.1 <| (card_pos.2 ⟨a, ha⟩).trans_le hcard)
-- Mathlib/Topology/Maps/Basic.lean
theorem openEmbedding_of_embedding_open (h₁ : Embedding f) (h₂ : IsOpenMap f) :
    OpenEmbedding f
-- Mathlib/Geometry/Manifold/SmoothManifoldWithCorners.lean
theorem extend_preimage_mem_nhds {x : M} (h : x ∈ f.source) (ht : t ∈ 𝓝 x) :
    (f.extend I).symm ⁻¹' t ∈ 𝓝 (f.extend I x)
-- Mathlib/Algebra/Ring/Subsemiring/Basic.lean
@[simp]
theorem closure_empty : closure (∅ : Set R) = ⊥
-- Mathlib/Data/NNReal/Basic.lean
@[simp, norm_cast]
protected theorem coe_div (r₁ r₂ : ℝ≥0) : ((r₁ / r₂ : ℝ≥0) : ℝ) = (r₁ : ℝ) / r₂
-- Mathlib/Topology/Homeomorph.lean
@[simp] theorem coe_punitProd : ⇑(punitProd X) = Prod.snd
-- Mathlib/Data/Nat/Pairing.lean
@[simp]
theorem unpair_zero : unpair 0 = 0
-- Mathlib/Algebra/Group/Subgroup/Basic.lean
@[to_additive (attr := simp, norm_cast)]
theorem coe_div (x y : H) : (x / y).1 = x.1 / y.1
-- Mathlib/Topology/FiberBundle/Basic.lean
theorem totalSpaceMk_closedEmbedding [T1Space B] (x : B) :
    ClosedEmbedding (@TotalSpace.mk B F E x)
-- Mathlib/Algebra/Order/Sub/Canonical.lean
theorem tsub_le_tsub_iff_right (h : c ≤ b) : a - c ≤ b - c ↔ a ≤ b
-- Mathlib/Data/Nat/Bitwise.lean
protected lemma xor_assoc (n m k : ℕ) : (n ^^^ m) ^^^ k = n ^^^ (m ^^^ k)
-- Mathlib/Combinatorics/SimpleGraph/Finite.lean
theorem edgeFinset_deleteEdges [DecidableEq V] [Fintype G.edgeSet] (s : Finset (Sym2 V))
    [Fintype (G.deleteEdges s).edgeSet] :
    (G.deleteEdges s).edgeFinset = G.edgeFinset \ s
-- Mathlib/Algebra/Star/SelfAdjoint.lean
@[simp, norm_cast]
theorem val_one : ↑(1 : selfAdjoint R) = (1 : R)
-- Mathlib/Analysis/BoxIntegral/Box/Basic.lean
@[simp, norm_cast]
theorem withBotCoe_inj {I J : WithBot (Box ι)} : (I : Set (ι → ℝ)) = J ↔ I = J
-- Mathlib/Analysis/BoundedVariation.lean
protected theorem add {f : α → E} {s : Set α} (hf : LocallyBoundedVariationOn f s) {a b c : α}
    (ha : a ∈ s) (hb : b ∈ s) (hc : c ∈ s) :
    variationOnFromTo f s a b + variationOnFromTo f s b c = variationOnFromTo f s a c
-- Mathlib/MeasureTheory/Constructions/Pi.lean
/-- A measure on a finite product space equals the product measure if they are equal on
  rectangles. -/
theorem pi_eq {μ' : Measure (∀ i, α i)}
    (h : ∀ s : ∀ i, Set (α i), (∀ i, MeasurableSet (s i)) → μ' (pi univ s) = ∏ i, μ i (s i)) :
    Measure.pi μ = μ'
-- Mathlib/Data/Set/Card.lean
theorem encard_insert_of_not_mem {a : α} (has : a ∉ s) : (insert a s).encard = s.encard + 1
-- Mathlib/NumberTheory/BernoulliPolynomials.lean
@[simp]
nonrec theorem sum_bernoulli (n : ℕ) :
    (∑ k ∈ range (n + 1), ((n + 1).choose k : ℚ) • bernoulli k) = monomial n (n + 1 : ℚ)
-- Mathlib/LinearAlgebra/BilinearForm/Properties.lean
/-- A bilinear form is nondegenerate if and only if it has a trivial kernel. -/
theorem nondegenerate_iff_ker_eq_bot {B : BilinForm R M} :
    B.Nondegenerate ↔ LinearMap.ker B = ⊥
-- Mathlib/Data/Nat/Cast/Order/Basic.lean
theorem NeZero.nat_of_injective {n : ℕ} [h : NeZero (n : R)] [RingHomClass F R S] {f : F}
    (hf : Function.Injective f) : NeZero (n : S)
-- Mathlib/Analysis/Normed/Field/Basic.lean
protected lemma IsOfFinOrder.norm_eq_one (ha : IsOfFinOrder a) : ‖a‖ = 1
-- .lake/packages/batteries/Batteries/Data/String/Lemmas.lean
theorem Valid_default : Valid default
-- Mathlib/Algebra/Polynomial/FieldDivision.lean
theorem degree_add_div (hq0 : q ≠ 0) (hpq : degree q ≤ degree p) :
    degree q + degree (p / q) = degree p
-- Mathlib/Data/Real/Pointwise.lean
theorem Real.sInf_smul_of_nonpos (ha : a ≤ 0) (s : Set ℝ) : sInf (a • s) = a • sSup s
-- .lake/packages/lean4/src/lean/Init/Data/Bool.lean
@[simp] theorem bne_self_left  : ∀(a b : Bool), (a != (a != b)) = b
-- Mathlib/Order/Interval/Finset/Fin.lean
theorem card_fintypeIco : Fintype.card (Set.Ico a b) = b - a
-- Mathlib/MeasureTheory/Function/ContinuousMapDense.lean
/-- A function in `Lp` can be approximated in `Lp` by continuous functions. -/
theorem boundedContinuousFunction_dense [SecondCountableTopologyEither α E] [Fact (1 ≤ p)]
    (hp : p ≠ ∞) [μ.WeaklyRegular] :
    Dense (boundedContinuousFunction E p μ : Set (Lp E p μ))
-- Mathlib/CategoryTheory/Equivalence.lean
@[simp]
theorem inv_fun_map (F : C ⥤ D) [IsEquivalence F] (X Y : C) (f : X ⟶ Y) :
    F.inv.map (F.map f) = F.asEquivalence.unitInv.app X ≫ f ≫ F.asEquivalence.unit.app Y
-- Mathlib/SetTheory/Ordinal/Arithmetic.lean
theorem blsub_le_of_brange_subset {o o'} {f : ∀ a < o, Ordinal} {g : ∀ a < o', Ordinal}
    (h : brange o f ⊆ brange o' g) : blsub.{u, max v w} o f ≤ blsub.{v, max u w} o' g
-- Mathlib/Algebra/Ring/Parity.lean
@[parity_simps] lemma odd_sub (h : n ≤ m) : Odd (m - n) ↔ (Odd m ↔ Even n)
-- Mathlib/AlgebraicTopology/DoldKan/Projections.lean
lemma P_zero : (P 0 : K[X] ⟶ K[X]) = 𝟙 _
-- Mathlib/SetTheory/Ordinal/Notation.lean
theorem lt_wf : @WellFounded NONote (· < ·)
-- Mathlib/Algebra/Lie/Matrix.lean
@[simp]
theorem Matrix.reindexLieEquiv_apply (M : Matrix n n R) :
    Matrix.reindexLieEquiv e M = Matrix.reindex e e M
-- Mathlib/Order/Atoms.lean
@[simp]
theorem isAtom_dual_iff_isCoatom [OrderTop α] {a : α} :
    IsAtom (OrderDual.toDual a) ↔ IsCoatom a
-- Mathlib/Algebra/Star/CHSH.lean
theorem sqrt_two_inv_mul_self : (√2)⁻¹ * (√2)⁻¹ = (2⁻¹ : ℝ)
-- Mathlib/CategoryTheory/Sites/IsSheafOneHypercover.lean
lemma exists_oneHypercover {X : C} (S : Sieve X) (hS : S ∈ J X) :
    ∃ (E : J.OneHypercover X) (_ : H E), E.sieve₀ ≤ S
-- Mathlib/CategoryTheory/Limits/Shapes/Images.lean
@[reassoc (attr := simp)]
theorem image.fac_lift (F' : MonoFactorisation f) : factorThruImage f ≫ image.lift F' = F'.e
-- Mathlib/Algebra/BigOperators/Associated.lean
theorem Prime.not_dvd_finset_prod {S : Finset α} {p : M} (pp : Prime p) {g : α → M}
    (hS : ∀ a ∈ S, ¬p ∣ g a) : ¬p ∣ S.prod g
-- Mathlib/Algebra/GroupWithZero/Units/Basic.lean
theorem inverse_mul_cancel_left (x y : M₀) (h : IsUnit x) : inverse x * (x * y) = y
-- Mathlib/CategoryTheory/Limits/HasLimits.lean
theorem limit.pre_post {D : Type u'} [Category.{v'} D] (E : K ⥤ J) (F : J ⥤ C) (G : C ⥤ D)
    [HasLimit F] [HasLimit (E ⋙ F)] [HasLimit (F ⋙ G)]
    [h : HasLimit ((E ⋙ F) ⋙ G)] :-- G (limit F) ⟶ G (limit (E ⋙ F)) ⟶ limit ((E ⋙ F) ⋙ G) vs
            -- G (limit F) ⟶ limit F ⋙ G ⟶ limit (E ⋙ (F ⋙ G)) or
    haveI : HasLimit (E ⋙ F ⋙ G) := h
    G.map (limit.pre F E) ≫ limit.post (E ⋙ F) G = limit.post F G ≫ limit.pre (F ⋙ G) E
-- Mathlib/Algebra/Polynomial/Eval.lean
theorem eval₂_eq_sum {f : R →+* S} {x : S} : p.eval₂ f x = p.sum fun e a => f a * x ^ e
-- Mathlib/RingTheory/Localization/InvSubmonoid.lean
theorem submonoid_map_le_is_unit : M.map (algebraMap R S) ≤ IsUnit.submonoid S
-- Mathlib/Data/Seq/WSeq.lean
@[simp]
theorem toList_cons (a : α) (s) : toList (cons a s) = (List.cons a <$> toList s).think
-- Mathlib/Topology/Semicontinuous.lean
theorem upperSemicontinuous_iff_limsup_le {f : α → γ} :
    UpperSemicontinuous f ↔ ∀ x, limsup f (𝓝 x) ≤ f x
-- Mathlib/Data/Set/Card.lean
theorem Nat.encard_range (k : ℕ) : {i | i < k}.encard = k
-- Mathlib/Analysis/VonNeumannAlgebra/Basic.lean
@[simp]
theorem coe_toStarSubalgebra (S : VonNeumannAlgebra H) :
    (S.toStarSubalgebra : Set (H →L[ℂ] H)) = S
-- Mathlib/Data/Nat/Nth.lean
theorem nth_eq_zero {n} :
    nth p n = 0 ↔ p 0 ∧ n = 0 ∨ ∃ hf : (setOf p).Finite, hf.toFinset.card ≤ n
-- Mathlib/Analysis/Convex/Hull.lean
theorem segment_subset_convexHull (hx : x ∈ s) (hy : y ∈ s) : segment 𝕜 x y ⊆ convexHull 𝕜 s
-- Mathlib/Algebra/Polynomial/Expand.lean
theorem of_irreducible_expand {p : ℕ} (hp : p ≠ 0) {f : R[X]} (hf : Irreducible (expand R p f)) :
    Irreducible f
-- Mathlib/Data/Complex/Basic.lean
@[simp]
theorem sub_re (z w : ℂ) : (z - w).re = z.re - w.re
-- Mathlib/Algebra/Order/Group/PosPart.lean
@[to_additive] lemma inf_eq_div_oneLePart_div (a b : α) : a ⊓ b = a / (a / b)⁺ᵐ
-- Mathlib/Probability/Kernel/CondDistrib.lean
/-- The conditional expectation of a function `f` of the product `(X, Y)` is almost everywhere equal
to the integral of `y ↦ f(X, y)` against the `condDistrib` kernel. -/
theorem condexp_prod_ae_eq_integral_condDistrib [NormedSpace ℝ F] [CompleteSpace F]
    (hX : Measurable X) (hY : AEMeasurable Y μ) (hf : StronglyMeasurable f)
    (hf_int : Integrable (fun a => f (X a, Y a)) μ) :
    μ[fun a => f (X a, Y a)|mβ.comap X] =ᵐ[μ] fun a => ∫ y, f (X a, y) ∂condDistrib Y X μ (X a)
-- Mathlib/MeasureTheory/Function/LocallyIntegrable.lean
theorem integrable_iff_integrableAtFilter_cocompact :
    Integrable f μ ↔ (IntegrableAtFilter f (cocompact X) μ ∧ LocallyIntegrable f μ)
-- Mathlib/SetTheory/Ordinal/Arithmetic.lean
theorem pred_eq_iff_not_succ {o} : pred o = o ↔ ¬∃ a, o = succ a
-- Mathlib/FieldTheory/Separable.lean
theorem card_rootSet_eq_natDegree_iff_of_splits [Algebra F K] {f : F[X]} (hf : f ≠ 0)
    (h : f.Splits (algebraMap F K)) : Fintype.card (f.rootSet K) = f.natDegree ↔ f.Separable
-- Mathlib/CategoryTheory/Functor/FullyFaithful.lean
theorem Faithful.div_faithful (F : C ⥤ E) [F.Faithful] (G : D ⥤ E) [G.Faithful] (obj : C → D)
    (h_obj : ∀ X, G.obj (obj X) = F.obj X) (map : ∀ {X Y}, (X ⟶ Y) → (obj X ⟶ obj Y))
    (h_map : ∀ {X Y} {f : X ⟶ Y}, HEq (G.map (map f)) (F.map f)) :
    Functor.Faithful (Faithful.div F G obj @h_obj @map @h_map)
-- Mathlib/Algebra/Lie/Submodule.lean
@[simp]
theorem sInf_coe_toSubmodule (S : Set (LieSubmodule R L M)) :
    (↑(sInf S) : Submodule R M) = sInf {(s : Submodule R M) | s ∈ S}
-- Mathlib/LinearAlgebra/PerfectPairing.lean
theorem reflexive_left : IsReflexive R M
-- Mathlib/Analysis/Fourier/FourierTransformDeriv.lean
/-- If `‖v‖^n * ‖f v‖` is integrable, then the `n`-th derivative of the Fourier transform of `f` is
  the Fourier transform of `fun v ↦ (-2 * π * I) ^ n ⟪v, ⬝⟫^n f v`. -/
theorem iteratedFDeriv_fourierIntegral {N : ℕ∞}
    (hf : ∀ (n : ℕ), n ≤ N → Integrable (fun v ↦ ‖v‖^n * ‖f v‖))
    (h'f : AEStronglyMeasurable f) {n : ℕ} (hn : n ≤ N) :
    iteratedFDeriv ℝ n (𝓕 f) = 𝓕 (fun v ↦ fourierPowSMulRight (innerSL ℝ) f v n)
-- Mathlib/Analysis/SpecialFunctions/Trigonometric/Arctan.lean
theorem arctan_inv_of_neg {x : ℝ} (h : x < 0) : arctan x⁻¹ = -(π / 2) - arctan x
-- .lake/packages/batteries/Batteries/Data/BinomialHeap/Basic.lean
theorem Heap.realSize_deleteMin {s : Heap α} (eq : s.deleteMin le = some (a, s')) :
    s.realSize = s'.realSize + 1
-- Mathlib/RingTheory/Unramified/Finite.lean
lemma one_tmul_sub_tmul_one_mul_elem
    (s : S) : (1 ⊗ₜ s - s ⊗ₜ 1) * elem R S = 0
-- Mathlib/Probability/Process/PartitionFiltration.lean
lemma iSup_partitionFiltration (ht : ∀ n, MeasurableSet (t n))
    (ht_range : generateFrom (Set.range t) = m) :
    ⨆ n, partitionFiltration ht n = m