ruc-ai4math/mathlib_handler_benchmark_410 huggingface dataset:
-- Mathlib/Order/LiminfLimsup.lean
theorem OrderIso.limsup_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 (limsup u f) = limsup (fun x => g (u x)) f
-- Mathlib/MeasureTheory/Function/LpSeminorm/Basic.lean
theorem memℒp_congr_ae {f g : α → E} (hfg : f =ᵐ[μ] g) : Memℒp f p μ ↔ Memℒp g p μ
-- Mathlib/MeasureTheory/Integral/Lebesgue.lean
theorem setLIntegral_univ (f : α → ℝ≥0∞) : ∫⁻ x in univ, f x ∂μ = ∫⁻ x, f x ∂μ
-- Mathlib/MeasureTheory/Integral/DominatedConvergence.lean
/-- Lebesgue dominated convergence theorem for filters with a countable basis -/
nonrec theorem tendsto_integral_filter_of_dominated_convergence {ι} {l : Filter ι}
    [l.IsCountablyGenerated] {F : ι → ℝ → E} (bound : ℝ → ℝ)
    (hF_meas : ∀ᶠ n in l, AEStronglyMeasurable (F n) (μ.restrict (Ι a b)))
    (h_bound : ∀ᶠ n in l, ∀ᵐ x ∂μ, x ∈ Ι a b → ‖F n x‖ ≤ bound x)
    (bound_integrable : IntervalIntegrable bound μ a b)
    (h_lim : ∀ᵐ x ∂μ, x ∈ Ι a b → Tendsto (fun n => F n x) l (𝓝 (f x))) :
    Tendsto (fun n => ∫ x in a..b, F n x ∂μ) l (𝓝 <| ∫ x in a..b, f x ∂μ)
-- Mathlib/Combinatorics/Enumerative/Partition.lean
@[simp] lemma ofSym_map (e : σ ≃ τ) (s : Sym σ n) :
    ofSym (s.map e) = ofSym s
-- Mathlib/Geometry/Manifold/MFDeriv/Basic.lean
theorem uniqueMDiffWithinAt_iff {s : Set M} {x : M} :
    UniqueMDiffWithinAt I s x ↔
      UniqueDiffWithinAt 𝕜 ((extChartAt I x).symm ⁻¹' s ∩ (extChartAt I x).target)
        ((extChartAt I x) x)
-- Mathlib/CategoryTheory/Comma/StructuredArrow.lean
theorem ext {A B : CostructuredArrow S T} (f g : A ⟶ B) (h : f.left = g.left) : f = g
-- Mathlib/Algebra/Group/Defs.lean
@[to_additive]
theorem inv_mul_self (a : G) : a⁻¹ * a = 1
-- Mathlib/SetTheory/Ordinal/Arithmetic.lean
theorem has_succ_of_type_succ_lt {α} {r : α → α → Prop} [wo : IsWellOrder α r]
    (h : ∀ a < type r, succ a < type r) (x : α) : ∃ y, r x y
-- Mathlib/Computability/Ackermann.lean
@[simp]
theorem ack_one (n : ℕ) : ack 1 n = n + 2
-- Mathlib/RingTheory/UniqueFactorizationDomain.lean
theorem _root_.Irreducible.normalizedFactors_pow {p : α} (hp : Irreducible p) (k : ℕ) :
    normalizedFactors (p ^ k) = Multiset.replicate k (normalize p)
-- Mathlib/Algebra/Order/CauSeq/BigOperators.lean
lemma of_mono_bounded (f : ℕ → α) {a : α} {m : ℕ} (ham : ∀ n ≥ m, |f n| ≤ a)
    (hnm : ∀ n ≥ m, f n ≤ f n.succ) : IsCauSeq abs f
-- Mathlib/LinearAlgebra/AffineSpace/AffineEquiv.lean
@[simp]
theorem range_eq (e : P₁ ≃ᵃ[k] P₂) : range e = univ
-- Mathlib/Data/Stream/Init.lean
theorem coinduction {s₁ s₂ : Stream' α} :
    head s₁ = head s₂ →
      (∀ (β : Type u) (fr : Stream' α → β),
      fr s₁ = fr s₂ → fr (tail s₁) = fr (tail s₂)) → s₁ = s₂
-- Mathlib/Algebra/Homology/HomotopyCategory/HomComplex.lean
@[simp]
lemma units_smul_v {n : ℤ} (k : Rˣ) (z : Cochain F G n) (p q : ℤ) (hpq : p + n = q) :
    (k • z).v p q hpq = k • (z.v p q hpq)
-- Mathlib/Topology/Algebra/Module/Basic.lean
@[simp]
theorem one_apply (x : M₁) : (1 : M₁ →L[R₁] M₁) x = x
-- Mathlib/CategoryTheory/Abelian/Pseudoelements.lean
/-- A morphism that only maps the zero pseudoelement to zero is a monomorphism. -/
theorem mono_of_zero_of_map_zero {P Q : C} (f : P ⟶ Q) : (∀ a, f a = 0 → a = 0) → Mono f
-- Mathlib/Topology/ContinuousFunction/Basic.lean
@[simp]
theorem const_apply (b : β) (a : α) : const α b a = b
-- Mathlib/Data/Nat/Choose/Lucas.lean
/-- For primes `p`, `choose n k` is congruent to `choose (n % p) (k % p) * choose (n / p) (k / p)`
modulo `p`. Also see `choose_modEq_choose_mod_mul_choose_div_nat` for the version with `MOD`. -/
theorem choose_modEq_choose_mod_mul_choose_div :
    choose n k ≡ choose (n % p) (k % p) * choose (n / p) (k / p) [ZMOD p]
-- Mathlib/Logic/Hydra.lean
lemma cutExpand_add_right {s' s} (t) : CutExpand r (s' + t) (s + t) ↔ CutExpand r s' s
-- Mathlib/Order/Filter/AtTopBot.lean
theorem Tendsto.subseq_mem {F : Filter α} {V : ℕ → Set α} (h : ∀ n, V n ∈ F) {u : ℕ → α}
    (hu : Tendsto u atTop F) : ∃ φ : ℕ → ℕ, StrictMono φ ∧ ∀ n, u (φ n) ∈ V n
-- Mathlib/Analysis/Complex/Hadamard.lean
/-- Rewrite for `InterpStrip` when `0 = sSupNormIm f 0` or `0 = sSupNormIm f 1`. -/
lemma interpStrip_eq_of_zero (z : ℂ) (h : sSupNormIm f 0 = 0 ∨ sSupNormIm f 1 = 0) :
    interpStrip f z = 0
-- Mathlib/Topology/UniformSpace/UniformConvergence.lean
/--
A sequence of functions `Fₙ` converges uniformly on a filter `p'` to a limiting function `f` w.r.t.
filter `p` iff the function `(n, x) ↦ (f x, Fₙ x)` converges along `p ×ˢ p'` to the uniformity.
In other words: one knows nothing about the behavior of `x` in this limit besides it being in `p'`.
-/
theorem tendstoUniformlyOnFilter_iff_tendsto :
    TendstoUniformlyOnFilter F f p p' ↔
      Tendsto (fun q : ι × α => (f q.2, F q.1 q.2)) (p ×ˢ p') (𝓤 β)
-- Mathlib/GroupTheory/Sylow.lean
theorem Sylow.smul_subtype {P : Sylow p G} {H : Subgroup G} (hP : ↑P ≤ H) (h : H) :
    h • P.subtype hP = (h • P).subtype (Sylow.smul_le hP h)
-- Mathlib/LinearAlgebra/AffineSpace/AffineSubspace.lean
/-- A combination of two points expressed with `lineMap` (with the two points reversed) lies in
their affine span. -/
theorem AffineMap.lineMap_rev_mem_affineSpan_pair (r : k) (p₁ p₂ : P) :
    AffineMap.lineMap p₂ p₁ r ∈ line[k, p₁, p₂]
-- Mathlib/Combinatorics/SimpleGraph/Coloring.lean
@[deprecated Colorable.chromaticNumber_le (since := "2024-03-21")]
theorem chromaticNumber_le_card [Fintype α] (C : G.Coloring α) :
    G.chromaticNumber ≤ Fintype.card α
-- Mathlib/Data/Set/Pairwise/Basic.lean
/-- The partial images of a binary function `f` whose partial evaluations are injective are pairwise
disjoint iff `f` is injective . -/
theorem pairwiseDisjoint_image_left_iff {f : α → β → γ} {s : Set α} {t : Set β}
    (hf : ∀ b ∈ t, Injective fun a => f a b) :
    (t.PairwiseDisjoint fun b => (fun a => f a b) '' s) ↔ (s ×ˢ t).InjOn fun p => f p.1 p.2
-- .lake/packages/lean4/src/lean/Init/Data/Range.lean
theorem Membership.get_elem_helper {i n : Nat} {r : Std.Range} (h₁ : i ∈ r) (h₂ : r.stop = n) :
    i < n
-- Mathlib/Topology/MetricSpace/Pseudo/Defs.lean
/-- A version of `Filter.eventually_prod_iff` where the second filter consists of neighborhoods
in a pseudo-metric space. -/
theorem eventually_prod_nhds_iff {f : Filter ι} {x₀ : α} {p : ι × α → Prop} :
    (∀ᶠ x in f ×ˢ 𝓝 x₀, p x) ↔ ∃ pa : ι → Prop, (∀ᶠ i in f, pa i) ∧
      ∃ ε > 0, ∀ {i}, pa i → ∀ {x}, dist x x₀ < ε → p (i, x)
-- Mathlib/Order/Heyting/Regular.lean
protected theorem IsRegular.disjoint_compl_right_iff (hb : IsRegular b) :
    Disjoint a bᶜ ↔ a ≤ b
-- Mathlib/Order/Heyting/Basic.lean
@[simp]
theorem inf_sdiff_sup_right : a \ c ⊓ (b ⊔ a) = a \ c
-- Mathlib/Logic/Equiv/Defs.lean
theorem eq_comp_symm {α β γ} (e : α ≃ β) (f : β → γ) (g : α → γ) : f = g ∘ e.symm ↔ f ∘ e = g
-- Mathlib/RingTheory/Kaehler/Basic.lean
theorem KaehlerDifferential.kerTotal_eq :
    LinearMap.ker (Finsupp.total S (Ω[S⁄R]) S (KaehlerDifferential.D R S)) =
      KaehlerDifferential.kerTotal R S
-- Mathlib/Tactic/CategoryTheory/MonoidalComp.lean
/--
A typeclass carrying a choice of monoidal structural isomorphism between two objects.
Used by the `⊗≫` monoidal composition operator, and the `coherence` tactic.
-/
-- We could likely turn this into a `Prop` valued existential if that proves useful.
class MonoidalCoherence (X Y : C) where
  /-- A monoidal structural isomorphism between two objects. -/
  hom : X ⟶ Y
  [isIso : IsIso hom]
-- .lake/packages/lean4/src/lean/Init/Data/List/Lemmas.lean
theorem getElem?_zipWithAll {f : Option α → Option β → γ} {i : Nat} :
    (zipWithAll f as bs)[i]? = match as[i]?, bs[i]? with
      | none, none => .none | a?, b? => some (f a? b?)
-- Mathlib/NumberTheory/FermatPsp.lean
theorem frequently_atTop_fermatPsp {b : ℕ} (h : 1 ≤ b) : ∃ᶠ n in Filter.atTop, FermatPsp n b
-- Mathlib/LinearAlgebra/Span.lean
@[simp]
theorem span_singleton_le_iff_mem (m : M) (p : Submodule R M) : (R ∙ m) ≤ p ↔ m ∈ p
-- Mathlib/Algebra/Homology/Localization.lean
lemma isIso_Q_map_iff_mem_quasiIso {K L : HomologicalComplex C c} (f : K ⟶ L) :
    IsIso (Q.map f) ↔ HomologicalComplex.quasiIso C c f
-- .lake/packages/lean4/src/lean/Init/Data/BitVec/Basic.lean
@[simp] theorem xor_eq (x y : BitVec w)                   : BitVec.xor x y = x ^^^ y
-- Mathlib/Analysis/SpecialFunctions/ContinuousFunctionalCalculus/ExpLog.lean
lemma NormedSpace.exp_continuousMap_eq (f : C(α, 𝕜)) :
    exp 𝕜 f = (⟨exp 𝕜 ∘ f, exp_continuous.comp f.continuous⟩ : C(α, 𝕜))
-- Mathlib/Geometry/Manifold/ContMDiff/NormedSpace.lean
nonrec theorem Smooth.smul {f : M → 𝕜} {g : M → V} (hf : Smooth I 𝓘(𝕜) f)
    (hg : Smooth I 𝓘(𝕜, V) g) : Smooth I 𝓘(𝕜, V) fun p => f p • g p
-- Mathlib/LinearAlgebra/Basis.lean
theorem repr_injective : Injective (repr : Basis ι R M → M ≃ₗ[R] ι →₀ R)
-- Mathlib/Algebra/Order/Monoid/Unbundled/Defs.lean
theorem act_rel_of_act_rel_of_rel_act_rel (ab : r (μ m a) b) (rl : r (μ m b) (μ m c)) :
    r (μ m a) c
-- Mathlib/Algebra/Polynomial/Derivative.lean
@[simp]
theorem iterate_derivative_smul {S : Type*} [Monoid S] [DistribMulAction S R] [IsScalarTower S R R]
    (s : S) (p : R[X]) (k : ℕ) : derivative^[k] (s • p) = s • derivative^[k] p
-- Mathlib/Algebra/Homology/HomologySequenceLemmas.lean
lemma composableArrows₅_exact (i j : ι) (hij : c.Rel i j) :
    (composableArrows₅ hS₁ i j hij).Exact
-- Mathlib/AlgebraicGeometry/Restrict.lean
@[simp] lemma Scheme.restrictFunctor_obj_left (U : X.Opens) :
  (X.restrictFunctor.obj U).left = U
-- Mathlib/Data/Int/Log.lean
@[simp, norm_cast]
theorem clog_natCast (b : ℕ) (n : ℕ) : clog b (n : R) = Nat.clog b n
-- Mathlib/Data/Matroid/Basic.lean
theorem Indep.basis_of_maximal_subset (hI : M.Indep I) (hIX : I ⊆ X)
    (hmax : ∀ ⦃J⦄, M.Indep J → I ⊆ J → J ⊆ X → J ⊆ I) (hX : X ⊆ M.E := by aesop_mat) :
    M.Basis I X
-- Mathlib/Algebra/Group/Indicator.lean
@[to_additive (attr := simp)]
theorem mulIndicator_apply_eq_self : s.mulIndicator f a = f a ↔ a ∉ s → f a = 1
-- Mathlib/Order/Interval/Set/WithBotTop.lean
theorem image_coe_Iio : (some : α → WithTop α) '' Iio a = Iio (a : WithTop α)
-- Mathlib/Topology/Algebra/Order/Compact.lean
/-- The **extreme value theorem**: if a function `f` is continuous on a closed set `s` and it is
smaller than a value in its image away from compact sets, then it has a maximum on this set. -/
theorem ContinuousOn.exists_isMaxOn' [ClosedIciTopology α] {s : Set β} {f : β → α}
    (hf : ContinuousOn f s) (hsc : IsClosed s) {x₀ : β} (h₀ : x₀ ∈ s)
    (hc : ∀ᶠ x in cocompact β ⊓ 𝓟 s, f x ≤ f x₀) : ∃ x ∈ s, IsMaxOn f s x
-- Mathlib/Analysis/SpecialFunctions/Trigonometric/Cotangent.lean
theorem pi_mul_cot_pi_q_exp (z : ℍ) :
    π * cot (π * z) = π * I - 2 * π * I * ∑' n : ℕ, Complex.exp (2 * π * I * z) ^ n
-- Mathlib/Data/Nat/Count.lean
theorem count_injective {m n : ℕ} (hm : p m) (hn : p n) (heq : count p m = count p n) : m = n
-- Mathlib/Data/Set/Lattice.lean
theorem iUnion_prod {ι ι' α β} (s : ι → Set α) (t : ι' → Set β) :
    ⋃ x : ι × ι', s x.1 ×ˢ t x.2 = (⋃ i : ι, s i) ×ˢ ⋃ i : ι', t i
-- Mathlib/Analysis/NormedSpace/OperatorNorm/Bilinear.lean
@[simp]
theorem flip_flip (f : E →SL[σ₁₃] F →SL[σ₂₃] G) : f.flip.flip = f
-- Mathlib/LinearAlgebra/Matrix/Trace.lean
@[simp]
theorem trace_add (A B : Matrix n n R) : trace (A + B) = trace A + trace B
-- Mathlib/Order/Filter/Bases.lean
theorem hasBasis_iInf_principal {s : ι → Set α} (h : Directed (· ≥ ·) s) [Nonempty ι] :
    (⨅ i, 𝓟 (s i)).HasBasis (fun _ => True) s
-- Mathlib/AlgebraicGeometry/AffineScheme.lean
/-- The canonical isomorphism `X ≅ Spec Γ(X)` for an affine scheme. -/
@[simps! (config := .lemmasOnly) hom]
def Scheme.isoSpec (X : Scheme) [IsAffine X] : X ≅ Spec Γ(X, ⊤)
-- Mathlib/Algebra/Ring/Defs.lean
/-- Typeclass for a negation operator that distributes across multiplication.

This is useful for dealing with submonoids of a ring that contain `-1` without having to duplicate
lemmas. -/
class HasDistribNeg (α : Type*) [Mul α] extends InvolutiveNeg α where
  /-- Negation is left distributive over multiplication -/
  neg_mul : ∀ x y : α, -x * y = -(x * y)
  /-- Negation is right distributive over multiplication -/
  mul_neg : ∀ x y : α, x * -y = -(x * y)
-- Mathlib/Data/List/Palindrome.lean
protected theorem map (f : α → β) (p : Palindrome l) : Palindrome (map f l)
-- Mathlib/Topology/Category/Profinite/Nobeling.lean
/-- The `ℤ`-linear map induced by precomposition of the projection
    `π C (ord I · < o₂) → π C (ord I · < o₁)` for `o₁ ≤ o₂`. -/
@[simps!]
noncomputable
def πs' {o₁ o₂ : Ordinal} (h : o₁ ≤ o₂) :
    LocallyConstant (π C (ord I · < o₁)) ℤ →ₗ[ℤ] LocallyConstant (π C (ord I · < o₂)) ℤ
-- Mathlib/Topology/Algebra/Monoid.lean
@[to_additive]
theorem MonoidHom.isClosed_range_coe : IsClosed (Set.range ((↑) : (M₁ →* M₂) → M₁ → M₂))
-- Mathlib/Topology/UniformSpace/UniformConvergenceTopology.lean
/-- Post-composition by a uniformly continuous function is uniformly continuous on `α →ᵤ β`.

More precisely, if `f : γ → β` is uniformly continuous, then `(fun g ↦ f ∘ g) : (α →ᵤ γ) → (α →ᵤ β)`
is uniformly continuous. -/
protected theorem postcomp_uniformContinuous [UniformSpace γ] {f : γ → β}
    (hf : UniformContinuous f) :
    UniformContinuous (ofFun ∘ (f ∘ ·) ∘ toFun : (α →ᵤ γ) → α →ᵤ β)
-- Mathlib/RingTheory/Ideal/Over.lean
/-- `comap (algebraMap R S)` is a surjection from the prime spec of `R` to prime spec of `S`.
`hP : (algebraMap R S).ker ≤ P` is a slight generalization of the extension being injective -/
theorem exists_ideal_over_prime_of_isIntegral_of_isDomain [Algebra.IsIntegral R S] (P : Ideal R)
    [IsPrime P] (hP : RingHom.ker (algebraMap R S) ≤ P) :
    ∃ Q : Ideal S, IsPrime Q ∧ Q.comap (algebraMap R S) = P
-- Mathlib/Analysis/Convex/Star.lean
/-- Alternative definition of star-convexity, in terms of pointwise set operations. -/
theorem starConvex_iff_pointwise_add_subset :
    StarConvex 𝕜 x s ↔ ∀ ⦃a b : 𝕜⦄, 0 ≤ a → 0 ≤ b → a + b = 1 → a • {x} + b • s ⊆ s
-- Mathlib/Algebra/Lie/Rank.lean
lemma isRegular_def :
    IsRegular R x ↔ (Polynomial.coeff (ad R L x).charpoly (rank R L) ≠ 0)
-- Mathlib/Algebra/Polynomial/Basic.lean
theorem monomial_mul_monomial (n m : ℕ) (r s : R) :
    monomial n r * monomial m s = monomial (n + m) (r * s)
-- Mathlib/Algebra/Star/Subalgebra.lean
theorem mem_bot {x : A} : x ∈ (⊥ : StarSubalgebra R A) ↔ x ∈ Set.range (algebraMap R A)
-- Mathlib/Analysis/SpecialFunctions/Complex/LogBounds.lean
lemma hasDerivAt_logTaylor (n : ℕ) (z : ℂ) :
    HasDerivAt (logTaylor (n + 1)) (∑ j ∈ Finset.range n, (-1) ^ j * z ^ j) z
-- Mathlib/ModelTheory/Syntax.lean
@[simp]
theorem relabel_ex (g : α → β ⊕ (Fin n)) {k} (φ : L.BoundedFormula α (k + 1)) :
    φ.ex.relabel g = (φ.relabel g).ex
-- Mathlib/Order/Chain.lean
protected theorem maxChain (s : Flag α) : IsMaxChain (· ≤ ·) (s : Set α)
-- Mathlib/Topology/Connected/PathConnected.lean
@[simp]
theorem pathComponent.nonempty (x : X) : (pathComponent x).Nonempty
-- Mathlib/Probability/Distributions/Exponential.lean
lemma exponentialCDFReal_eq_lintegral {r : ℝ} (hr : 0 < r) (x : ℝ) :
    exponentialCDFReal r x = ENNReal.toReal (∫⁻ x in Iic x, exponentialPDF r x)
-- Mathlib/MeasureTheory/Measure/FiniteMeasure.lean
theorem tendsto_iff_forall_testAgainstNN_tendsto {γ : Type*} {F : Filter γ}
    {μs : γ → FiniteMeasure Ω} {μ : FiniteMeasure Ω} :
    Tendsto μs F (𝓝 μ) ↔
      ∀ f : Ω →ᵇ ℝ≥0, Tendsto (fun i => (μs i).testAgainstNN f) F (𝓝 (μ.testAgainstNN f))
-- Mathlib/Combinatorics/SimpleGraph/IncMatrix.lean
theorem incMatrix_of_mem_incidenceSet (h : e ∈ G.incidenceSet a) : G.incMatrix R a e = 1
-- Mathlib/Algebra/Polynomial/Basic.lean
@[simp]
theorem coeff_X_one : coeff (X : R[X]) 1 = 1
-- Mathlib/Algebra/Order/Group/PosPart.lean
@[to_additive (attr := simp)] lemma oneLePart_inv (a : α) : a⁻¹⁺ᵐ = a⁻ᵐ
-- Mathlib/Data/Nat/ModEq.lean
/-- A common factor that's coprime with the modulus can be cancelled from a `ModEq` -/
lemma cancel_left_of_coprime (hmc : gcd m c = 1) (h : c * a ≡ c * b [MOD m]) : a ≡ b [MOD m]
-- Mathlib/MeasureTheory/Measure/VectorMeasure.lean
theorem measurable_of_not_restrict_le_zero (hi : ¬v ≤[i] 0) : MeasurableSet i
-- Mathlib/Topology/Compactification/OnePoint.lean
@[simp]
theorem compl_range_coe : (range ((↑) : X → OnePoint X))ᶜ = {∞}
-- Mathlib/CategoryTheory/Sites/IsSheafFor.lean
theorem FamilyOfElements.Compatible.functorPullback (h : x.Compatible) :
    (x.functorPullback F).Compatible
-- Mathlib/Order/Interval/Finset/Defs.lean
theorem Ioo_bot_coe : Ioo (⊥ : WithBot α) b = (Iio b).map Embedding.some
-- Mathlib/Data/Finsupp/Basic.lean
/-- When `G` is a group, `Finsupp.comapSMul` acts by precomposition with the action of `g⁻¹`.
-/
@[simp]
theorem comapSMul_apply (g : G) (f : α →₀ M) (a : α) : (g • f) a = f (g⁻¹ • a)
-- Mathlib/LinearAlgebra/QuadraticForm/Basic.lean
/-- In a ring the companion bilinear form is unique and equal to `QuadraticMap.polar`. -/
theorem choose_exists_companion : Q.exists_companion.choose = polarBilin Q
-- Mathlib/Data/ZMod/Basic.lean
theorem cast_add_eq_ite {n : ℕ} (a b : ZMod n) :
    (cast (a + b) : ℤ) =
      if (n : ℤ) ≤ cast a + cast b then (cast a + cast b - n : ℤ) else cast a + cast b
-- Mathlib/Tactic/Abel.lean
theorem zero_term {α} [AddCommMonoid α] (x a) : @term α _ 0 x a = a
-- Mathlib/Topology/Connected/TotallyDisconnected.lean
/-- Refinement of `IsPreconnected.constant` only assuming the map factors through a
discrete subset of the target. -/
theorem IsPreconnected.constant_of_mapsTo {S : Set α} (hS : IsPreconnected S)
    {T : Set β} [DiscreteTopology T] {f : α → β} (hc : ContinuousOn f S) (hTm : MapsTo f S T)
    {x y : α} (hx : x ∈ S) (hy : y ∈ S) : f x = f y
-- Mathlib/Analysis/BoxIntegral/Partition/Basic.lean
theorem ofWithBot_le {boxes : Finset (WithBot (Box ι))}
    {le_of_mem : ∀ J ∈ boxes, (J : WithBot (Box ι)) ≤ I}
    {pairwise_disjoint : Set.Pairwise (boxes : Set (WithBot (Box ι))) Disjoint}
    (H : ∀ J ∈ boxes, J ≠ ⊥ → ∃ J' ∈ π, J ≤ ↑J') :
    ofWithBot boxes le_of_mem pairwise_disjoint ≤ π
-- Mathlib/CategoryTheory/Limits/Shapes/Kernels.lean
@[reassoc (attr := simp)]
theorem π_comp_cokernelComparison [HasCokernel f] [HasCokernel (G.map f)] :
    cokernel.π (G.map f) ≫ cokernelComparison f G = G.map (cokernel.π _)
-- Mathlib/Computability/Primrec.lean
theorem nat_min : Primrec₂ (@min ℕ _)
-- Mathlib/AlgebraicGeometry/OpenImmersion.lean
theorem opensRange_pullback_fst_of_right :
    (pullback.fst g f).opensRange = g ⁻¹ᵁ f.opensRange
-- Mathlib/Data/Fintype/Card.lean
theorem card_eq_one_iff_nonempty_unique : card α = 1 ↔ Nonempty (Unique α)
-- Mathlib/Analysis/InnerProductSpace/Adjoint.lean
theorem conj_orthogonalProjection {T : E →L[𝕜] E} (hT : IsSelfAdjoint T) (U : Submodule 𝕜 E)
    [CompleteSpace U] :
    IsSelfAdjoint
      (U.subtypeL ∘L orthogonalProjection U ∘L T ∘L U.subtypeL ∘L orthogonalProjection U)
-- .lake/packages/lean4/src/lean/Init/Data/Nat/Bitwise/Lemmas.lean
theorem ne_zero_implies_bit_true {x : Nat} (xnz : x ≠ 0) : ∃ i, testBit x i
-- Mathlib/Order/CompleteLattice.lean
theorem le_iInf₂ {f : ∀ i, κ i → α} (h : ∀ i j, a ≤ f i j) : a ≤ ⨅ (i) (j), f i j
-- Mathlib/CategoryTheory/Limits/FullSubcategory.lean
theorem hasColimitsOfShape_of_closedUnderColimits (h : ClosedUnderColimitsOfShape J P)
    [HasColimitsOfShape J C] : HasColimitsOfShape J (FullSubcategory P)
-- Mathlib/RingTheory/DedekindDomain/Ideal.lean
theorem prime : Prime v.asIdeal
-- Mathlib/Algebra/Order/Monoid/Unbundled/WithTop.lean
@[to_additive (attr := simp, norm_cast)]
lemma one_eq_coe : 1 = (a : WithTop α) ↔ a = 1
-- Mathlib/Data/Real/Hyperreal.lean
theorem omega_ne_zero : ω ≠ 0
-- Mathlib/SetTheory/Cardinal/Ordinal.lean
@[simp]
theorem aleph'.relIso_coe : (Aleph'.relIso : Ordinal → Cardinal) = aleph'
-- Mathlib/Data/Set/Basic.lean
@[simp]
theorem sep_and : { x ∈ s | p x ∧ q x } = { x ∈ s | p x } ∩ { x ∈ s | q x }
-- Mathlib/Algebra/Algebra/Quasispectrum.lean
@[simp]
lemma mem_unitsFstOne {x : (Unitization R A)ˣ} : x ∈ unitsFstOne R A ↔ x.val.fst = 1
-- Mathlib/RingTheory/AdicCompletion/Exactness.lean
private noncomputable def mapExactAux :
    (n : ℕ) → { a : M | f a - x (k + n) ∈ (I ^ (k + n) • ⊤ : Submodule R N) }
-- Mathlib/Data/Set/Finite.lean
theorem Finite.toFinset_singleton {a : α} (ha : ({a} : Set α).Finite := finite_singleton _) :
    ha.toFinset = {a}
-- .lake/packages/lean4/src/lean/Init/Data/Bool.lean
@[simp] theorem toNat_false : false.toNat = 0
-- Mathlib/Algebra/Algebra/Tower.lean
@[simp]
theorem lsmul_coe (a : A) : (lsmul R B M a : M → M) = (a • ·)
-- Mathlib/AlgebraicGeometry/EllipticCurve/DivisionPolynomial/Basic.lean
lemma baseChange_Φ (n : ℤ) : (W.baseChange B).Φ n = ((W.baseChange A).Φ n).map f
-- Mathlib/Combinatorics/SimpleGraph/Path.lean
@[simp]
theorem IsCycle.not_of_nil {u : V} : ¬(nil : G.Walk u u).IsCycle
-- Mathlib/Algebra/Order/Monovary.lean
lemma monovaryOn_iff_forall_smul_nonneg :
    MonovaryOn f g s ↔ ∀ ⦃i⦄, i ∈ s → ∀ ⦃j⦄, j ∈ s → 0 ≤ (f j - f i) • (g j - g i)
-- Mathlib/Topology/Basic.lean
theorem isClosed_iff_nhds :
    IsClosed s ↔ ∀ x, (∀ U ∈ 𝓝 x, (U ∩ s).Nonempty) → x ∈ s
-- Mathlib/Data/Real/Basic.lean
theorem cauchy_inv : ∀ f, (f⁻¹ : ℝ).cauchy = f.cauchy⁻¹
-- Mathlib/Logic/Function/Basic.lean
theorem leftInverse_invFun (hf : Injective f) : LeftInverse (invFun f) f
-- Mathlib/Order/SuccPred/LinearLocallyFinite.lean
theorem toZ_neg (hi : i < i0) : toZ i0 i < 0
-- Mathlib/MeasureTheory/Measure/Typeclasses.lean
theorem measure_lt_top (μ : Measure α) [IsFiniteMeasure μ] (s : Set α) : μ s < ∞
-- Mathlib/GroupTheory/FreeGroup/Basic.lean
@[to_additive]
theorem Red.Step.lift {f : α → β} (H : Red.Step L₁ L₂) : Lift.aux f L₁ = Lift.aux f L₂
-- Mathlib/RingTheory/NonUnitalSubsemiring/Basic.lean
@[mono]
theorem toAddSubmonoid_mono : Monotone (toAddSubmonoid : NonUnitalSubsemiring R → AddSubmonoid R)
-- Mathlib/Algebra/Polynomial/Eval.lean
theorem list_prod_comp (l : List R[X]) (q : R[X]) :
    l.prod.comp q = (l.map fun p : R[X] => p.comp q).prod
-- .lake/packages/lean4/src/lean/Init/Data/List/Lemmas.lean
@[simp] theorem getLast?_concat (l : List α) : getLast? (l ++ [a]) = some a
-- .lake/packages/batteries/Batteries/Data/RBMap/WF.lean
@[simp] theorem reverse_balRight (l : RBNode α) (v : α) (r : RBNode α) :
    (balRight l v r).reverse = balLeft r.reverse v l.reverse
-- Mathlib/GroupTheory/DoubleCoset.lean
theorem doset_union_rightCoset (H K : Subgroup G) (a : G) :
    ⋃ k : K, op (a * k) • ↑H = doset a H K
-- .lake/packages/batteries/Batteries/Data/String/Lemmas.lean
theorem lt_antisymm {s₁ s₂ : String} (h₁ : ¬s₁ < s₂) (h₂ : ¬s₂ < s₁) : s₁ = s₂
-- Mathlib/Topology/Sets/Order.lean
theorem isClopen (s : ClopenUpperSet α) : IsClopen (s : Set α)
-- Mathlib/MeasureTheory/Function/L1Space.lean
@[simp]
theorem toL1_zero (h : Integrable (0 : α → β) μ) : h.toL1 0 = 0
-- Mathlib/RingTheory/Valuation/Basic.lean
@[simp]
theorem of_apply : (of f h0 h1 hadd hmul) r = f r
-- Mathlib/RingTheory/LocalRing/Basic.lean
theorem isUnit_of_mem_nonunits_one_sub_self (a : R) (h : 1 - a ∈ nonunits R) : IsUnit a
-- Mathlib/Algebra/Group/UniqueProds.lean
@[to_additive]
theorem iff_mulOpposite :
    UniqueMul (B.map ⟨_, op_injective⟩) (A.map ⟨_, op_injective⟩) (op b0) (op a0) ↔
      UniqueMul A B a0 b0
-- Mathlib/Analysis/Normed/Algebra/Spectrum.lean
/-- In a Banach algebra `A` over `𝕜`, for `a : A` the function `fun z ↦ (1 - z • a)⁻¹` is
differentiable on any closed ball centered at zero of radius `r < (spectralRadius 𝕜 a)⁻¹`. -/
theorem differentiableOn_inverse_one_sub_smul [CompleteSpace A] {a : A} {r : ℝ≥0}
    (hr : (r : ℝ≥0∞) < (spectralRadius 𝕜 a)⁻¹) :
    DifferentiableOn 𝕜 (fun z : 𝕜 => Ring.inverse (1 - z • a)) (Metric.closedBall 0 r)
-- Mathlib/Data/Set/Image.lean
lemma image_iterate_eq {f : α → α} {n : ℕ} : image (f^[n]) = (image f)^[n]
-- Mathlib/Order/Basic.lean
theorem subrelation_iff_le {r s : α → α → Prop} : Subrelation r s ↔ r ≤ s
-- Mathlib/Analysis/Calculus/FDeriv/Analytic.lean
protected theorem HasFPowerSeriesAt.hasStrictDerivAt (h : HasFPowerSeriesAt f p x) :
    HasStrictDerivAt f (p 1 fun _ => 1) x
-- Mathlib/Data/ENNReal/Inv.lean
theorem div_lt_top {x y : ℝ≥0∞} (h1 : x ≠ ∞) (h2 : y ≠ 0) : x / y < ∞