ruc-ai4math/mathlib_handler_benchmark_410 huggingface dataset:
-- Mathlib/Analysis/SpecialFunctions/Stirling.lean
/-- For any `n ≠ 0`, we have the identity
`(stirlingSeq n)^4 / (stirlingSeq (2*n))^2 * (n / (2 * n + 1)) = W n`, where `W n` is the
`n`-th partial product of Wallis' formula for `π / 2`. -/
theorem stirlingSeq_pow_four_div_stirlingSeq_pow_two_eq (n : ℕ) (hn : n ≠ 0) :
    stirlingSeq n ^ 4 / stirlingSeq (2 * n) ^ 2 * (n / (2 * n + 1)) = Wallis.W n
-- .lake/packages/lean4/src/lean/Init/Data/Nat/Bitwise/Lemmas.lean
theorem testBit_implies_ge {x : Nat} (p : testBit x i = true) : x ≥ 2^i
-- Mathlib/CategoryTheory/NatIso.lean
@[simp]
theorem inv_inv_app {F G : C ⥤ D} (e : F ≅ G) (X : C) : inv (e.inv.app X) = e.hom.app X
-- Mathlib/Algebra/Module/FinitePresentation.lean
lemma Module.finitePresentation_of_free_of_surjective [Module.Free R M] [Module.Finite R M]
    (l : M →ₗ[R] N)
    (hl : Function.Surjective l) (hl' : (LinearMap.ker l).FG) :
    Module.FinitePresentation R N
-- Mathlib/Order/Monotone/Monovary.lean
theorem AntivaryOn.comp_antitone_on_left (h : AntivaryOn f g s) (hf : Antitone f') :
    MonovaryOn (f' ∘ f) g s
-- Mathlib/RingTheory/Ideal/Maps.lean
theorem eq_liftOfRightInverse (hf : Function.RightInverse f_inv f) (g : A →+* C)
    (hg : RingHom.ker f ≤ RingHom.ker g) (h : B →+* C) (hh : h.comp f = g) :
    h = f.liftOfRightInverse f_inv hf ⟨g, hg⟩
-- Mathlib/Data/List/FinRange.lean
theorem nodup_ofFn_ofInjective {n} {f : Fin n → α} (hf : Function.Injective f) :
    Nodup (ofFn f)
-- Mathlib/Topology/MetricSpace/Pseudo/Defs.lean
theorem Metric.uniformity_edist : 𝓤 α = ⨅ ε > 0, 𝓟 { p : α × α | edist p.1 p.2 < ε }
-- Mathlib/GroupTheory/Complement.lean
@[to_additive]
theorem IsComplement.existsUnique (h : IsComplement S T) (g : G) :
    ∃! x : S × T, x.1.1 * x.2.1 = g
-- Mathlib/Algebra/Lie/TensorProduct.lean
@[simp]
theorem mapIncl_def (M' : LieSubmodule R L M) (N' : LieSubmodule R L N) :
    mapIncl M' N' = map M'.incl N'.incl
-- Mathlib/MeasureTheory/Group/Arithmetic.lean
@[to_additive (attr := measurability)]
theorem List.measurable_prod' (l : List (α → M)) (hl : ∀ f ∈ l, Measurable f) :
    Measurable l.prod
-- Mathlib/Algebra/Order/CauSeq/Completion.lean
theorem mk_eq {f g : CauSeq _ abv} : mk f = mk g ↔ f ≈ g
-- .lake/packages/lean4/src/lean/Init/Data/List/Basic.lean
@[simp] theorem dropWhile_nil : ([] : List α).dropWhile p = []
-- Mathlib/Algebra/CubicDiscriminant.lean
@[simp]
theorem natDegree_of_c_ne_zero (ha : P.a = 0) (hb : P.b = 0) (hc : P.c ≠ 0) :
    P.toPoly.natDegree = 1
-- Mathlib/RingTheory/Polynomial/Cyclotomic/Expand.lean
/-- If `p` is a prime such that `p ∣ n`, then
`expand R p (cyclotomic n R) = cyclotomic (p * n) R`. -/
@[simp]
theorem cyclotomic_expand_eq_cyclotomic {p n : ℕ} (hp : Nat.Prime p) (hdiv : p ∣ n) (R : Type*)
    [CommRing R] : expand R p (cyclotomic n R) = cyclotomic (n * p) R
-- Mathlib/RingTheory/Ideal/AssociatedPrime.lean
theorem associatedPrimes.eq_singleton_of_isPrimary [IsNoetherianRing R] (hI : I.IsPrimary) :
    associatedPrimes R (R ⧸ I) = {I.radical}
-- Mathlib/Data/Finset/Sum.lean
theorem disjSum_ssubset_disjSum_of_ssubset_of_subset (hs : s₁ ⊂ s₂) (ht : t₁ ⊆ t₂) :
    s₁.disjSum t₁ ⊂ s₂.disjSum t₂
-- Mathlib/Algebra/CharP/ExpChar.lean
theorem sub_pow_expChar [CommRing R] {q : ℕ} [hR : ExpChar R q]
    (x y : R) : (x - y) ^ q = x ^ q - y ^ q
-- Mathlib/Data/Finmap.lean
@[simp]
theorem insert_insert {a} {b b' : β a} (s : Finmap β) :
    (s.insert a b).insert a b' = s.insert a b'
-- Mathlib/Data/Nat/Defs.lean
lemma one_le_pow' (n m : ℕ) : 1 ≤ (m + 1) ^ n
-- Mathlib/Algebra/Group/Prod.lean
@[to_additive (attr := simp) coe_prodComm_symm]
theorem coe_prodComm_symm : ⇑(prodComm : M × N ≃* N × M).symm = Prod.swap
-- Mathlib/Algebra/Lie/TraceForm.lean
/-- Given a bilinear form `B` on a representation `M` of a nilpotent Lie algebra `L`, if `B` is
invariant (in the sense that the action of `L` is skew-adjoint wrt `B`) then components of the
Fitting decomposition of `M` are orthogonal wrt `B`. -/
lemma eq_zero_of_mem_weightSpace_mem_posFitting [LieAlgebra.IsNilpotent R L]
    {B : LinearMap.BilinForm R M} (hB : ∀ (x : L) (m n : M), B ⁅x, m⁆ n = - B m ⁅x, n⁆)
    {m₀ m₁ : M} (hm₀ : m₀ ∈ weightSpace M (0 : L → R)) (hm₁ : m₁ ∈ posFittingComp R L M) :
    B m₀ m₁ = 0
-- .lake/packages/lean4/src/lean/Init/Data/AC.lean
theorem Context.evalList_mergeIdem (ctx : Context α) (h : ContextInformation.isIdem ctx) (e : List Nat) : evalList α ctx (mergeIdem e) = evalList α ctx e
-- Mathlib/LinearAlgebra/Vandermonde.lean
theorem det_vandermonde_ne_zero_iff [IsDomain R] {n : ℕ} {v : Fin n → R} :
    det (vandermonde v) ≠ 0 ↔ Function.Injective v
-- Mathlib/Data/Matroid/Dual.lean
theorem base_iff_dual_base_compl (hB : B ⊆ M.E := by aesop_mat) :
    M.Base B ↔ M✶.Base (M.E \ B)
-- Mathlib/LinearAlgebra/AffineSpace/AffineMap.lean
@[simp, norm_cast]
theorem coe_sub (f g : P1 →ᵃ[k] V2) : ⇑(f - g) = f - g
-- Mathlib/LinearAlgebra/AffineSpace/AffineEquiv.lean
theorem injective_pointReflection_left_of_injective_bit0
    (h : Injective (2 • · : V₁ → V₁)) (y : P₁) :
    Injective fun x : P₁ => pointReflection k x y
-- Mathlib/Analysis/Normed/Group/Pointwise.lean
@[to_additive (attr := simp)]
theorem ball_div : ball x δ / s = x • thickening δ s⁻¹
-- Mathlib/Algebra/CubicDiscriminant.lean
theorem disc_ne_zero_iff_roots_ne (ha : P.a ≠ 0) (h3 : (map φ P).roots = {x, y, z}) :
    P.disc ≠ 0 ↔ x ≠ y ∧ x ≠ z ∧ y ≠ z
-- Mathlib/Data/Finset/Card.lean
/-- Reorder a finset.

The difference with `Finset.card_bij` is that the bijection is specified with an inverse, rather
than as a surjective injection.

The difference with `Finset.card_nbij'` is that the bijection and its inverse are allowed to use
membership of the domains, rather than being non-dependent functions. -/
lemma card_bij' (i : ∀ a ∈ s, β) (j : ∀ a ∈ t, α) (hi : ∀ a ha, i a ha ∈ t)
    (hj : ∀ a ha, j a ha ∈ s) (left_inv : ∀ a ha, j (i a ha) (hi a ha) = a)
    (right_inv : ∀ a ha, i (j a ha) (hj a ha) = a) : s.card = t.card
-- Mathlib/Combinatorics/SimpleGraph/Clique.lean
theorem isNClique_iff : G.IsNClique n s ↔ G.IsClique s ∧ s.card = n
-- Mathlib/Data/Set/Pointwise/BigOperators.lean
@[to_additive]
theorem image_list_prod (f : F) :
    ∀ l : List (Set α), (f : α → β) '' l.prod = (l.map fun s => f '' s).prod
-- Mathlib/Analysis/Fourier/FourierTransform.lean
theorem fourierIntegral_continuousLinearMap_apply'
    {f : V → (F →L[ℝ] E)} {a : F} {w : W} (hf : Integrable f μ) :
    VectorFourier.fourierIntegral 𝐞 μ L.toLinearMap₂ f w a =
      VectorFourier.fourierIntegral 𝐞 μ L.toLinearMap₂ (fun x ↦ f x a) w
-- Mathlib/SetTheory/Ordinal/NaturalOps.lean
@[simp]
theorem toNatOrdinal_min (a b : Ordinal) :
    toNatOrdinal (linearOrder.min a b) = linearOrder.min (toNatOrdinal a) (toNatOrdinal b)
-- Mathlib/Data/Nat/Bits.lean
@[simp] lemma bodd_zero : bodd 0 = false
-- Mathlib/Data/Real/EReal.lean
lemma coe_mul_bot_of_pos {x : ℝ} (h : 0 < x) : (x : EReal) * ⊥ = ⊥
-- Mathlib/Geometry/Manifold/ContMDiff/Product.lean
nonrec theorem Smooth.prod_map (hf : Smooth I I' f) (hg : Smooth J J' g) :
    Smooth (I.prod J) (I'.prod J') (Prod.map f g)
-- Mathlib/Algebra/Algebra/NonUnitalHom.lean
@[simp]
theorem coe_zero : ⇑(0 : A →ₛₙₐ[φ] B) = 0
-- Mathlib/Data/Matrix/Composition.lean
/-- I by J matrix where each entry is a K by L matrix is equivalent to
    I × K by J × L matrix -/
@[simps]
def comp : Matrix I J (Matrix K L R) ≃ Matrix (I × K) (J × L) R
-- Mathlib/Computability/PartrecCode.lean
private theorem evaln_map (k c n) :
    ((((List.range k)[n]?).map (evaln k c)).bind fun b => b) = evaln k c n
-- Mathlib/Data/Fin/Basic.lean
theorem nontrivial_iff_two_le : Nontrivial (Fin n) ↔ 2 ≤ n
-- Mathlib/Order/CompleteLattice.lean
theorem iInf_or {p q : Prop} {s : p ∨ q → α} :
    ⨅ x, s x = (⨅ i, s (Or.inl i)) ⊓ ⨅ j, s (Or.inr j)
-- Mathlib/Topology/Bornology/BoundedOperation.lean
lemma sub_bounded_of_bounded_of_bounded {X : Type*} [PseudoMetricSpace R] [Sub R] [BoundedSub R]
    {f g : X → R} (f_bdd : ∃ C, ∀ x y, dist (f x) (f y) ≤ C)
    (g_bdd : ∃ C, ∀ x y, dist (g x) (g y) ≤ C) :
    ∃ C, ∀ x y, dist ((f - g) x) ((f - g) y) ≤ C
-- Mathlib/Topology/VectorBundle/Basic.lean
theorem coordChangeL_symm_apply (e e' : Trivialization F (π F E)) [e.IsLinear R] [e'.IsLinear R]
    {b : B} (hb : b ∈ e.baseSet ∩ e'.baseSet) :
    ⇑(coordChangeL R e e' b).symm =
      (e'.linearEquivAt R b hb.2).symm.trans (e.linearEquivAt R b hb.1)
-- Mathlib/Geometry/Manifold/ContMDiff/Basic.lean
@[to_additive]
theorem smoothAt_one [One M'] : SmoothAt I I' (1 : M → M') x
-- Mathlib/RingTheory/WittVector/Identities.lean
theorem FractionRing.p_nonzero [Nontrivial R] [CharP R p] : (p : FractionRing (𝕎 R)) ≠ 0
-- Mathlib/Analysis/RCLike/Basic.lean
theorem ofReal_ne_zero {x : ℝ} : (x : K) ≠ 0 ↔ x ≠ 0
-- Mathlib/Algebra/Group/Basic.lean
@[to_additive add_one_zsmul]
lemma zpow_add_one (a : G) : ∀ n : ℤ, a ^ (n + 1) = a ^ n * a
-- Mathlib/Order/Interval/Set/Basic.lean
theorem Ioc_eq_empty_iff : Ioc a b = ∅ ↔ ¬a < b
-- Mathlib/CategoryTheory/MorphismProperty/Basic.lean
@[simp]
theorem epimorphisms.iff : (epimorphisms C) f ↔ Epi f
-- Mathlib/LinearAlgebra/Matrix/BilinearForm.lean
theorem nondegenerate_of_det_ne_zero (b : Basis ι A M₃) (h : (BilinForm.toMatrix b B₃).det ≠ 0) :
    B₃.Nondegenerate
-- .lake/packages/lean4/src/lean/Init/Data/BitVec/Lemmas.lean
@[simp] theorem cons_xor_cons (x y : BitVec w) (a b : Bool) :
    (cons a x) ^^^ (cons b y) = cons (xor a b) (x ^^^ y)
-- Mathlib/Topology/UniformSpace/Basic.lean
lemma bot_uniformity : 𝓤[(⊥ : UniformSpace α)] = 𝓟 idRel
-- Mathlib/ModelTheory/Types.lean
theorem subset (p : T.CompleteType α) : (L.lhomWithConstants α).onTheory T ⊆ (p : L[[α]].Theory)
-- Mathlib/MeasureTheory/Function/StronglyMeasurable/Basic.lean
theorem ae_mem_imp_eq_mk {s} (h : AEStronglyMeasurable f (μ.restrict s)) :
    ∀ᵐ x ∂μ, x ∈ s → f x = h.mk f x
-- Mathlib/Analysis/Calculus/Deriv/Add.lean
nonrec theorem HasDerivAt.neg (h : HasDerivAt f f' x) : HasDerivAt (fun x => -f x) (-f') x
-- Mathlib/Topology/PartialHomeomorph.lean
lemma toPartialHomeomorph_left_inv {x : X} : (h.toPartialHomeomorph f).symm (f x) = x
-- Mathlib/Topology/Instances/ENNReal.lean
theorem tendsto_iff_edist_tendsto_0 {l : Filter β} {f : β → α} {y : α} :
    Tendsto f l (𝓝 y) ↔ Tendsto (fun x => edist (f x) y) l (𝓝 0)
-- Mathlib/Analysis/Calculus/FDeriv/Add.lean
@[fun_prop]
nonrec theorem HasFDerivWithinAt.const_add (hf : HasFDerivWithinAt f f' s x) (c : F) :
    HasFDerivWithinAt (fun y => c + f y) f' s x
-- Mathlib/Logic/Equiv/Defs.lean
protected theorem coe_inj {e₁ e₂ : α ≃ β} : (e₁ : α → β) = e₂ ↔ e₁ = e₂
-- Mathlib/CategoryTheory/Limits/Shapes/Biproducts.lean
theorem π_of_isColimit {f : J → C} {t : Bicone f} (ht : IsColimit t.toCocone) (j : J) :
    t.π j = ht.desc (Cofan.mk _ fun j' => if h : j' = j then eqToHom (congr_arg f h) else 0)
-- Mathlib/Analysis/NormedSpace/MStructure.lean
@[simp]
theorem coe_bot [FaithfulSMul M X] :
    -- Porting note: Manual correction of name required here
    ↑(BoundedOrder.toOrderBot.toBot.bot : { P : M // IsLprojection X P }) = (0 : M)
-- Mathlib/AlgebraicGeometry/PrimeSpectrum/Basic.lean
@[simp]
theorem basicOpen_pow (f : R) (n : ℕ) (hn : 0 < n) : basicOpen (f ^ n) = basicOpen f
-- Mathlib/LinearAlgebra/AffineSpace/Combination.lean
/-- A weighted sum of pairwise subtractions, where the point on the right is constant and the
sum of the weights is 1. -/
theorem sum_smul_vsub_const_eq_affineCombination_vsub (w : ι → k) (p₁ : ι → P) (p₂ : P)
    (h : ∑ i ∈ s, w i = 1) : (∑ i ∈ s, w i • (p₁ i -ᵥ p₂)) = s.affineCombination k p₁ w -ᵥ p₂
-- Mathlib/Data/Nat/Factorization/Basic.lean
/-- Exactly `n / p` naturals in `[1, n]` are multiples of `p`.
See `Nat.card_multiples'` for an alternative spelling of the statement.  -/
theorem card_multiples (n p : ℕ) : card ((Finset.range n).filter fun e => p ∣ e + 1) = n / p
-- .lake/packages/lean4/src/lean/Init/Data/Fin/Lemmas.lean
theorem rev_eq {n a : Nat} (i : Fin (n + 1)) (h : n = a + i) :
    rev i = ⟨a, Nat.lt_succ_of_le (h ▸ Nat.le_add_right ..)⟩
-- Mathlib/Analysis/Calculus/ContDiff/Defs.lean
/-- `p` is a Taylor series of `f` up to `n+1` if and only if `p.shift` is a Taylor series up to `n`
for `p 1`, which is a derivative of `f`. -/
theorem hasFTaylorSeriesUpTo_succ_iff_right {n : ℕ} :
    HasFTaylorSeriesUpTo (n + 1 : ℕ) f p ↔
      (∀ x, (p x 0).uncurry0 = f x) ∧
        (∀ x, HasFDerivAt (fun y => p y 0) (p x 1).curryLeft x) ∧
          HasFTaylorSeriesUpTo n (fun x => continuousMultilinearCurryFin1 𝕜 E F (p x 1)) fun x =>
            (p x).shift
-- Mathlib/CategoryTheory/Localization/Triangulated.lean
lemma distTriang_iff (T : Triangle D) :
    (T ∈ distTriang D) ↔ T ∈ L.essImageDistTriang
-- Mathlib/Algebra/Group/Commute/Defs.lean
@[to_additive]
protected theorem symm_iff {a b : S} : Commute a b ↔ Commute b a
-- Mathlib/Algebra/GroupWithZero/Indicator.lean
lemma mulSupport_one_sub [AddGroup R] (f : ι → R) :
    mulSupport (fun x ↦ 1 - f x) = support f
-- Mathlib/Order/Irreducible.lean
theorem InfIrred.ne_top (ha : InfIrred a) : a ≠ ⊤
-- Mathlib/Topology/Algebra/Monoid.lean
@[to_additive]
theorem Submonoid.top_closure_mul_self_eq (s : Submonoid M) :
    _root_.closure (s : Set M) * _root_.closure s = _root_.closure s
-- Mathlib/Algebra/Associated/Basic.lean
@[simp]
theorem irreducible_mk {a : α} : Irreducible (Associates.mk a) ↔ Irreducible a
-- Mathlib/Probability/Independence/ZeroOne.lean
theorem measure_eq_zero_or_one_or_top_of_indepSet_self {t : Set Ω}
    (h_indep : IndepSet t t μ) : μ t = 0 ∨ μ t = 1 ∨ μ t = ∞
-- Mathlib/Data/DFinsupp/Basic.lean
@[simp]
theorem map_dfinsupp_sumAddHom [AddCommMonoid R] [AddCommMonoid S] [∀ i, AddZeroClass (β i)]
    (h : R ≃+ S) (f : Π₀ i, β i) (g : ∀ i, β i →+ R) :
    h (sumAddHom g f) = sumAddHom (fun i => h.toAddMonoidHom.comp (g i)) f
-- Mathlib/Topology/Inseparable.lean
lemma Inducing.generalizingMap (hf : Inducing f) (h : StableUnderGeneralization (range f)) :
    GeneralizingMap f
-- Mathlib/ModelTheory/Substructures.lean
@[simp]
theorem mem_map {f : M →[L] N} {S : L.Substructure M} {y : N} :
    y ∈ S.map f ↔ ∃ x ∈ S, f x = y
-- Mathlib/Algebra/Group/Units.lean
@[to_additive (attr := simp, norm_cast)]
lemma val_pow_eq_pow_val (n : ℕ) : ↑(a ^ n) = (a ^ n : α)
-- Mathlib/Algebra/Order/Monoid/Unbundled/Pow.lean
@[to_additive Right.pow_nonneg]
theorem Right.one_le_pow_of_le (hx : 1 ≤ x) : ∀ {n : ℕ}, 1 ≤ x ^ n
-- Mathlib/LinearAlgebra/Alternating/Basic.lean
@[norm_cast]
theorem coe_smul (c : S) : ↑(c • f) = c • (f : MultilinearMap R (fun _ : ι => M) N)
-- Mathlib/RingTheory/Ideal/Maps.lean
theorem mem_image_of_mem_map_of_surjective {I : Ideal R} {y} (H : y ∈ map f I) : y ∈ f '' I
-- Mathlib/Data/Fintype/Basic.lean
@[simp]
theorem Fin.image_succ_univ (n : ℕ) : (univ : Finset (Fin n)).image Fin.succ = {0}ᶜ
-- Mathlib/Algebra/Order/Ring/Unbundled/Nonneg.lean
@[simp]
theorem toNonneg_le {a : α} {b : { x : α // 0 ≤ x }} : toNonneg a ≤ b ↔ a ≤ b
-- .lake/packages/lean4/src/lean/Init/Data/Fin/Lemmas.lean
theorem rev_castAdd (k : Fin n) (m : Nat) : rev (castAdd m k) = addNat (rev k) m
-- Mathlib/Algebra/Ring/CentroidHom.lean
theorem comp_mul_comm (T S : CentroidHom α) (a b : α) : (T ∘ S) (a * b) = (S ∘ T) (a * b)
-- Mathlib/Data/Set/Function.lean
theorem mapsTo_empty (f : α → β) (t : Set β) : MapsTo f ∅ t
-- Mathlib/Data/Finset/Pointwise.lean
@[to_additive]
theorem smul_union : s • (t₁ ∪ t₂) = s • t₁ ∪ s • t₂
-- Mathlib/Topology/ContinuousFunction/Units.lean
/-- Construct a continuous map into the group of units of a normed ring from a function into the
normed ring and a proof that every element of the range is a unit. -/
@[simps]
noncomputable def unitsOfForallIsUnit {f : C(X, R)} (h : ∀ x, IsUnit (f x)) : C(X, Rˣ)
-- Mathlib/Analysis/SpecialFunctions/Log/ENNRealLog.lean
@[simp]
theorem log_eq_iff {x y : ℝ≥0∞} : log x = log y ↔ x = y
-- .lake/packages/lean4/src/lean/Init/Data/Fin/Lemmas.lean
theorem succ_ne_zero {n} : ∀ k : Fin n, Fin.succ k ≠ 0
-- Mathlib/Order/Fin/Basic.lean
/-- The inclusion map `Fin n → ℕ` is an order embedding. -/
@[simps! apply]
def valOrderEmb (n) : Fin n ↪o ℕ
-- Mathlib/Analysis/SpecialFunctions/Trigonometric/Angle.lean
@[simp]
theorem sign_zero : (0 : Angle).sign = 0
-- Mathlib/Algebra/Periodic.lean
@[to_additive]
protected theorem Periodic.smul [Add α] [SMul γ β] (h : Periodic f c) (a : γ) :
    Periodic (a • f) c
-- Mathlib/Topology/Compactness/SigmaCompact.lean
/-- In a topological space with sigma compact topology, if `f` is a function that sends each
point `x` to a neighborhood of `x`, then for some countable set `s`, the neighborhoods `f x`,
`x ∈ s`, cover the whole space. -/
theorem countable_cover_nhds_of_sigma_compact {f : X → Set X} (hf : ∀ x, f x ∈ 𝓝 x) :
    ∃ s : Set X, s.Countable ∧ ⋃ x ∈ s, f x = univ
-- Mathlib/Data/Nat/Prime/Basic.lean
@[simp] lemma coprime_two_right : n.Coprime 2 ↔ Odd n
-- Mathlib/Data/Nat/Defs.lean
@[simp] lemma lt_one_iff : n < 1 ↔ n = 0
-- Mathlib/Topology/Maps/Basic.lean
theorem isClosed_iff (hf : Inducing f) {s : Set X} :
    IsClosed s ↔ ∃ t, IsClosed t ∧ f ⁻¹' t = s
-- Mathlib/Analysis/SpecialFunctions/Trigonometric/Angle.lean
@[simp]
theorem toIocMod_toReal (θ : Angle) : toIocMod two_pi_pos (-π) θ.toReal = θ.toReal
-- Mathlib/Geometry/Euclidean/Angle/Unoriented/Basic.lean
/-- The inner product of two non-zero vectors equals the negative product of their norms
if and only if the angle between the two vectors is π. -/
theorem inner_eq_neg_mul_norm_iff_angle_eq_pi {x y : V} (hx : x ≠ 0) (hy : y ≠ 0) :
    ⟪x, y⟫ = -(‖x‖ * ‖y‖) ↔ angle x y = π
-- Mathlib/Algebra/Order/GroupWithZero/Unbundled.lean
theorem mul_lt_of_lt_one_left [MulPosStrictMono α] (hb : 0 < b) (h : a < 1) : a * b < b
-- Mathlib/Data/Int/ConditionallyCompleteOrder.lean
@[simp]
theorem csInf_empty : sInf (∅ : Set ℤ) = 0
-- Mathlib/RingTheory/NonUnitalSubsemiring/Basic.lean
theorem centralizer_toSubsemigroup {R} [NonUnitalSemiring R] (s : Set R) :
    (centralizer s).toSubsemigroup = Subsemigroup.centralizer s
-- Mathlib/Data/Set/Function.lean
@[simp]
theorem restrict_piecewise (f g : α → β) (s : Set α) [∀ x, Decidable (x ∈ s)] :
    s.restrict (piecewise s f g) = s.restrict f
-- Mathlib/Data/Setoid/Partition.lean
theorem proj_eq_iff {x y : α} : hs.proj x = hs.proj y ↔ hs.index x = hs.index y
-- Mathlib/Data/Nat/BitIndices.lean
/-- Together with `Nat.twoPowSum_bitIndices`, this implies a bijection between `ℕ` and `Finset ℕ`.
See `Finset.equivBitIndices` for this bijection. -/
theorem bitIndices_twoPowsum {L : List ℕ} (hL : List.Sorted (· < ·) L) :
    (L.map (fun i ↦ 2^i)).sum.bitIndices = L
-- Mathlib/Logic/Equiv/Basic.lean
@[simp]
theorem prodSumDistrib_apply_left (a : α) (b : β) :
    prodSumDistrib α β γ (a, Sum.inl b) = Sum.inl (a, b)
-- Mathlib/Order/WithBot.lean
lemma ne_bot_iff_exists {x : WithBot α} : x ≠ ⊥ ↔ ∃ a : α, ↑a = x
-- .lake/packages/batteries/Batteries/Data/List/Basic.lean
@[simp] theorem takeD_nil (n) (a : α) : takeD n [] a = replicate n a
-- Mathlib/Analysis/Convex/Join.lean
theorem convexJoin_assoc_aux (s t u : Set E) :
    convexJoin 𝕜 (convexJoin 𝕜 s t) u ⊆ convexJoin 𝕜 s (convexJoin 𝕜 t u)
-- Mathlib/Order/Filter/Basic.lean
theorem map_biInf_eq {ι : Type w} {f : ι → Filter α} {m : α → β} {p : ι → Prop}
    (h : DirectedOn (f ⁻¹'o (· ≥ ·)) { x | p x }) (ne : ∃ i, p i) :
    map m (⨅ (i) (_ : p i), f i) = ⨅ (i) (_ : p i), map m (f i)
-- Mathlib/Analysis/Seminorm.lean
protected theorem coe_sSup_eq {s : Set <| Seminorm 𝕜 E} (hs : BddAbove s) :
    ↑(sSup s) = ⨆ p : s, ((p : Seminorm 𝕜 E) : E → ℝ)
-- Mathlib/Analysis/SpecialFunctions/Complex/Log.lean
nonrec
theorem _root_.ContinuousWithinAt.clog {f : α → ℂ} {s : Set α} {x : α}
    (h₁ : ContinuousWithinAt f s x) (h₂ : f x ∈ slitPlane) :
    ContinuousWithinAt (fun t => log (f t)) s x
-- Mathlib/Tactic/NormNum/Inv.lean
theorem isRat_inv_neg {α} [DivisionRing α] [CharZero α] {a : α} {n d : ℕ} :
    IsRat a (.negOfNat (Nat.succ n)) d → IsRat a⁻¹ (.negOfNat d) (Nat.succ n)
-- Mathlib/Data/Set/Lattice.lean
theorem sUnion_prod_const {C : Set (Set α)} {t : Set β} :
    ⋃₀C ×ˢ t = ⋃₀((fun s : Set α => s ×ˢ t) '' C)
-- Mathlib/Order/Filter/AtTopBot.lean
theorem eventually_forall_le_atBot [Preorder α] {p : α → Prop} :
    (∀ᶠ x in atBot, ∀ y, y ≤ x → p y) ↔ ∀ᶠ x in atBot, p x
-- Mathlib/Order/Filter/Subsingleton.lean
lemma Subsingleton.isCountablyGenerated (hl : l.Subsingleton) : IsCountablyGenerated l
-- Mathlib/MeasureTheory/Measure/Restrict.lean
@[simp]
theorem volume_preimage_coe (hs : NullMeasurableSet s) (ht : MeasurableSet t) :
    volume (((↑) : s → α) ⁻¹' t) = volume (t ∩ s)
-- Mathlib/MeasureTheory/Function/SimpleFunc.lean
theorem map_iff {g : β → γ} (hg : ∀ {b}, g b = 0 ↔ b = 0) :
    (f.map g).FinMeasSupp μ ↔ f.FinMeasSupp μ
-- Mathlib/MeasureTheory/Integral/IntegrableOn.lean
theorem integrableOn_Ici_iff_integrableOn_Ioi' (hb : μ {b} ≠ ∞) :
    IntegrableOn f (Ici b) μ ↔ IntegrableOn f (Ioi b) μ
-- Mathlib/Analysis/BoxIntegral/Box/Basic.lean
theorem exists_mem : ∃ x, x ∈ I
-- Mathlib/MeasureTheory/Integral/FundThmCalculus.lean
/-- Change of variables. If `f` has continuous derivative `f'` on `[a, b]`,
and `g` is continuous on `f '' [a, b]`, then we can substitute `u = f x` to get
`∫ x in a..b, (g ∘ f) x * f' x = ∫ u in f a..f b, g u`.
Compared to `intervalIntegral.integral_comp_mul_deriv` we only require that `g` is continuous on
`f '' [a, b]`.
-/
theorem integral_comp_mul_deriv' {f f' g : ℝ → ℝ} (h : ∀ x ∈ uIcc a b, HasDerivAt f (f' x) x)
    (h' : ContinuousOn f' (uIcc a b)) (hg : ContinuousOn g (f '' [[a, b]])) :
    (∫ x in a..b, (g ∘ f) x * f' x) = ∫ x in f a..f b, g x
-- Mathlib/CategoryTheory/Limits/Fubini.lean
@[simp, reassoc]
theorem limitFlipCompLimIsoLimitCompLim_inv_π_π (k) (j) :
    (limitFlipCompLimIsoLimitCompLim F).inv ≫ limit.π _ k ≫ limit.π _ j =
      (limit.π _ j ≫ limit.π _ k : limit (_ ⋙ lim) ⟶ _)
-- Mathlib/Computability/EpsilonNFA.lean
@[simp]
theorem toεNFA_evalFrom_match (M : NFA α σ) (start : Set σ) :
    M.toεNFA.evalFrom start = M.evalFrom start
-- .lake/packages/lean4/src/lean/Init/Data/List/Lemmas.lean
@[simp 1100] theorem singleton_append : [x] ++ l = x :: l
-- Mathlib/Order/Filter/Germ/Basic.lean
@[simp]
theorem map₂_const (l : Filter α) (b : β) (c : γ) (f : β → γ → δ) :
    map₂ f (↑b : Germ l β) ↑c = ↑(f b c)
-- Mathlib/LinearAlgebra/PerfectPairing.lean
theorem bijective_toDualRight_symm_toDualLeft :
    Bijective (fun x => p.toDualRight.symm.dualMap (p.toDualLeft x))
-- Mathlib/Data/Nat/Defs.lean
lemma half_le_of_sub_le_half (h : a - b ≤ a / 2) : a / 2 ≤ b
-- Mathlib/Analysis/NormedSpace/Exponential.lean
lemma _root_.Filter.Tendsto.exp {α : Type*} {l : Filter α} {f : α → 𝔸} {a : 𝔸}
    (hf : Tendsto f l (𝓝 a)) :
    Tendsto (fun x => exp 𝕂 (f x)) l (𝓝 (exp 𝕂 a))
-- Mathlib/CategoryTheory/Abelian/RightDerived.lean
/-- A component of the natural transformation between right-derived functors can be computed
using a chosen injective resolution. -/
lemma rightDerived_app_eq
    {F G : C ⥤ D} [F.Additive] [G.Additive] (α : F ⟶ G) {X : C} (P : InjectiveResolution X)
    (n : ℕ) : (NatTrans.rightDerived α n).app X =
      (P.isoRightDerivedObj F n).hom ≫
        (HomologicalComplex.homologyFunctor D (ComplexShape.up ℕ) n).map
        ((NatTrans.mapHomologicalComplex α _).app P.cocomplex) ≫
        (P.isoRightDerivedObj G n).inv
-- Mathlib/MeasureTheory/Integral/Lebesgue.lean
theorem lintegral_iUnion₀ [Countable β] {s : β → Set α} (hm : ∀ i, NullMeasurableSet (s i) μ)
    (hd : Pairwise (AEDisjoint μ on s)) (f : α → ℝ≥0∞) :
    ∫⁻ a in ⋃ i, s i, f a ∂μ = ∑' i, ∫⁻ a in s i, f a ∂μ
-- Mathlib/Topology/MetricSpace/Infsep.lean
theorem einfsep_eq_top_iff : s.einfsep = ∞ ↔ s.Subsingleton
-- Mathlib/RingTheory/RootsOfUnity/Basic.lean
theorem mem_rootsOfUnity_iff_mem_nthRoots {ζ : Rˣ} :
    ζ ∈ rootsOfUnity k R ↔ (ζ : R) ∈ nthRoots k (1 : R)
-- Mathlib/Data/List/ReduceOption.lean
theorem reduceOption_concat (l : List (Option α)) (x : Option α) :
    (l.concat x).reduceOption = l.reduceOption ++ x.toList
-- Mathlib/Topology/Order/IntermediateValue.lean
theorem Set.OrdConnected.isPreconnected {s : Set α} (h : s.OrdConnected) : IsPreconnected s
-- Mathlib/MeasureTheory/Function/SimpleFunc.lean
@[measurability]
protected theorem aemeasurable [MeasurableSpace β] {μ : Measure α} (f : α →ₛ β) :
    AEMeasurable f μ