ruc-ai4math/mathlib_handler_benchmark_410 huggingface dataset:
-- Mathlib/Combinatorics/SimpleGraph/Walk.lean
@[simp]
theorem transfer_append {w : V} (q : G.Walk v w) (hpq) :
    (p.append q).transfer H hpq =
      (p.transfer H fun e he => hpq _ (by simp [he])).append
        (q.transfer H fun e he => hpq _ (by simp [he]))
-- Mathlib/MeasureTheory/Integral/TorusIntegral.lean
/-- The function given in the definition of `torusIntegral` is integrable. -/
theorem function_integrable [NormedSpace ℂ E] (hf : TorusIntegrable f c R) :
    IntegrableOn (fun θ : ℝⁿ => (∏ i, R i * exp (θ i * I) * I : ℂ) • f (torusMap c R θ))
      (Icc (0 : ℝⁿ) fun _ => 2 * π) volume
-- Mathlib/Analysis/Calculus/MeanValue.lean
/-- Let `f : ℝ → ℝ` be a differentiable function. If `f'` is nonpositive, then `f` is an antitone
function. -/
lemma antitone_of_hasDerivAt_nonpos {f f' : ℝ → ℝ} (hf : ∀ x, HasDerivAt f (f' x) x)
    (hf' : f' ≤ 0) : Antitone f
-- Mathlib/Topology/LocallyConstant/Basic.lean
theorem isOpen_fiber {f : X → Y} (hf : IsLocallyConstant f) (y : Y) : IsOpen { x | f x = y }
-- Mathlib/SetTheory/Ordinal/Arithmetic.lean
theorem mem_brange_self {o} (f : ∀ a < o, α) (i hi) : f i hi ∈ brange o f
-- Mathlib/LinearAlgebra/Multilinear/TensorProduct.lean
/-- Given two multilinear maps `(ι₁ → N) → N₁` and `(ι₂ → N) → N₂`, this produces the map
`(ι₁ ⊕ ι₂ → N) → N₁ ⊗ N₂` by taking the coproduct of the domain and the tensor product
of the codomain.

This can be thought of as combining `Equiv.sumArrowEquivProdArrow.symm` with
`TensorProduct.map`, noting that the two operations can't be separated as the intermediate result
is not a `MultilinearMap`.

While this can be generalized to work for dependent `Π i : ι₁, N'₁ i` instead of `ι₁ → N`, doing so
introduces `Sum.elim N'₁ N'₂` types in the result which are difficult to work with and not defeq
to the simple case defined here. See [this zulip thread](
https://leanprover.zulipchat.com/#narrow/stream/217875-Is-there.20code.20for.20X.3F/topic/Instances.20on.20.60sum.2Eelim.20A.20B.20i.60/near/218484619).
-/
@[simps apply]
def domCoprod (a : MultilinearMap R (fun _ : ι₁ => N) N₁)
    (b : MultilinearMap R (fun _ : ι₂ => N) N₂) :
    MultilinearMap R (fun _ : ι₁ ⊕ ι₂ => N) (N₁ ⊗[R] N₂)
-- Mathlib/Logic/Basic.lean
@[simp]
lemma exists_apply_eq_apply3 {α β γ δ} {f : α → β → γ → δ} {a : α} {b : β} {c : γ} :
    ∃ x y z, f x y z = f a b c
-- Mathlib/Analysis/Complex/Conformal.lean
theorem isConformalMap_complex_linear_conj {map : ℂ →L[ℂ] E} (nonzero : map ≠ 0) :
    IsConformalMap ((map.restrictScalars ℝ).comp (conjCLE : ℂ →L[ℝ] ℂ))
-- Mathlib/Logic/Equiv/Set.lean
/-- Equal sets are equivalent.

TODO: this is the same as `Equiv.setCongr`! -/
@[simps! apply symm_apply]
protected def ofEq {α : Type u} {s t : Set α} (h : s = t) : s ≃ t
-- Mathlib/Order/BooleanGenerators.lean
lemma sSup_inter (hS : BooleanGenerators S) {T₁ T₂ : Set α} (hT₁ : T₁ ⊆ S) (hT₂ : T₂ ⊆ S) :
    sSup (T₁ ∩ T₂) = (sSup T₁) ⊓ (sSup T₂)
-- .lake/packages/batteries/Batteries/Data/List/Perm.lean
theorem Perm.of_eq (h : l₁ = l₂) : l₁ ~ l₂
-- Mathlib/Analysis/NormedSpace/PiTensorProduct/ProjectiveSeminorm.lean
theorem norm_eval_le_projectiveSeminorm (x : ⨂[𝕜] i, E i) (G : Type*) [SeminormedAddCommGroup G]
    [NormedSpace 𝕜 G] (f : ContinuousMultilinearMap 𝕜 E G) :
    ‖lift f.toMultilinearMap x‖ ≤ projectiveSeminorm x * ‖f‖
-- Mathlib/LinearAlgebra/Matrix/Permutation.lean
/-- The trace of a permutation matrix equals the number of fixed points. -/
theorem trace_permutation [AddCommMonoidWithOne R] :
    trace (σ.permMatrix R) = (Function.fixedPoints σ).ncard
-- Mathlib/Algebra/Ring/NegOnePow.lean
@[simp]
lemma negOnePow_abs (n : ℤ) : |n|.negOnePow = n.negOnePow
-- Mathlib/Data/ZMod/Basic.lean
@[simp] protected lemma inv_one (n : ℕ) : (1⁻¹ : ZMod n) = 1
-- Mathlib/Algebra/Group/Basic.lean
@[to_additive (attr := simp)]
theorem div_one (a : G) : a / 1 = a
-- Mathlib/MeasureTheory/Integral/Layercake.lean
theorem countable_meas_le_ne_meas_lt (g : α → R) :
    {t : R | μ {a : α | t ≤ g a} ≠ μ {a : α | t < g a}}.Countable
-- Mathlib/Order/Hom/Lattice.lean
@[simp]
theorem coe_sup (f g : SupBotHom α β) : DFunLike.coe (f ⊔ g) = f ⊔ g
-- Mathlib/LinearAlgebra/AffineSpace/AffineSubspace.lean
/-- The span of `univ` is `⊤`. -/
@[simp]
theorem span_univ : affineSpan k (Set.univ : Set P) = ⊤
-- Mathlib/Analysis/Calculus/FDeriv/Basic.lean
theorem HasFDerivAt.congr_of_eventuallyEq (h : HasFDerivAt f f' x) (h₁ : f₁ =ᶠ[𝓝 x] f) :
    HasFDerivAt f₁ f' x
-- Mathlib/CategoryTheory/Localization/Adjunction.lean
lemma isLocalization [F.Full] [F.Faithful] :
    G.IsLocalization ((MorphismProperty.isomorphisms C₂).inverseImage G)
-- Mathlib/Data/Finset/Union.lean
lemma disjoint_biUnion_left (s : Finset α) (f : α → Finset β) (t : Finset β) :
    Disjoint (s.biUnion f) t ↔ ∀ i ∈ s, Disjoint (f i) t
-- Mathlib/ModelTheory/Definability.lean
/-- Shows that definability is closed under finite projections. -/
theorem Definable.image_comp_embedding {s : Set (β → M)} (h : A.Definable L s) (f : α ↪ β)
    [Finite β] : A.Definable L ((fun g : β → M => g ∘ f) '' s)
-- Mathlib/Order/Filter/Archimedean.lean
theorem Filter.Eventually.intCast_atBot [StrictOrderedRing R] [Archimedean R] {p : R → Prop}
    (h : ∀ᶠ (x : R) in atBot, p x) : ∀ᶠ (n : ℤ) in atBot, p n
-- Mathlib/Analysis/Distribution/SchwartzSpace.lean
/-- If one controls the seminorm for every `x`, then one controls the seminorm. -/
theorem seminorm_le_bound (k n : ℕ) (f : 𝓢(E, F)) {M : ℝ} (hMp : 0 ≤ M)
    (hM : ∀ x, ‖x‖ ^ k * ‖iteratedFDeriv ℝ n f x‖ ≤ M) : SchwartzMap.seminorm 𝕜 k n f ≤ M
-- Mathlib/Algebra/Group/Invertible/Defs.lean
theorem invOf_mul_self_assoc [Monoid α] (a b : α) [Invertible a] : ⅟ a * (a * b) = b
-- Mathlib/Topology/Filter.lean
protected theorem tendsto_nhds {la : Filter α} {lb : Filter β} {f : α → Filter β} :
    Tendsto f la (𝓝 lb) ↔ ∀ s ∈ lb, ∀ᶠ a in la, s ∈ f a
-- .lake/packages/lean4/src/lean/Init/Control/Lawful/Basic.lean
/--
An alternative constructor for `LawfulMonad` which has more
defaultable fields in the common case.
-/
theorem LawfulMonad.mk' (m : Type u → Type v) [Monad m]
    (id_map : ∀ {α} (x : m α), id <$> x = x)
    (pure_bind : ∀ {α β} (x : α) (f : α → m β), pure x >>= f = f x)
    (bind_assoc : ∀ {α β γ} (x : m α) (f : α → m β) (g : β → m γ),
      x >>= f >>= g = x >>= fun x => f x >>= g)
    (map_const : ∀ {α β} (x : α) (y : m β),
      Functor.mapConst x y = Function.const β x <$> y := by intros; rfl)
    (seqLeft_eq : ∀ {α β} (x : m α) (y : m β),
      x <* y = (x >>= fun a => y >>= fun _ => pure a) := by intros; rfl)
    (seqRight_eq : ∀ {α β} (x : m α) (y : m β), x *> y = (x >>= fun _ => y) := by intros; rfl)
    (bind_pure_comp : ∀ {α β} (f : α → β) (x : m α),
      x >>= (fun y => pure (f y)) = f <$> x := by intros; rfl)
    (bind_map : ∀ {α β} (f : m (α → β)) (x : m α), f >>= (. <$> x) = f <*> x := by intros; rfl)
    : LawfulMonad m
-- Mathlib/Data/Nat/Defs.lean
lemma mul_self_lt_mul_self_iff : m * m < n * n ↔ m < n
-- Mathlib/RingTheory/FractionalIdeal/Basic.lean
theorem coeIdeal_finprod [IsLocalization S P] {α : Sort*} {f : α → Ideal R}
    (hS : S ≤ nonZeroDivisors R) :
    ((∏ᶠ a : α, f a : Ideal R) : FractionalIdeal S P) = ∏ᶠ a : α, (f a : FractionalIdeal S P)
-- Mathlib/Order/Heyting/Basic.lean
/-- A generalized Heyting algebra is a lattice with an additional binary operation `⇨` called
Heyting implication such that `a ⇨` is right adjoint to `a ⊓`.

 This generalizes `HeytingAlgebra` by not requiring a bottom element. -/
class GeneralizedHeytingAlgebra (α : Type*) extends Lattice α, OrderTop α, HImp α where
  /-- `a ⇨` is right adjoint to `a ⊓` -/
  le_himp_iff (a b c : α) : a ≤ b ⇨ c ↔ a ⊓ b ≤ c
-- Mathlib/Data/Sum/Interval.lean
@[simp]
lemma Ioc_inl_inr : Ioc (inlₗ a) (inrₗ b) = ((Ioi a).disjSum (Iic b)).map toLex.toEmbedding
-- Mathlib/Init/Data/Fin/Basic.lean
theorem ne_of_vne (h : i.val ≠ j.val) : i ≠ j
-- Mathlib/Analysis/Calculus/FDeriv/Prod.lean
@[fun_prop]
theorem differentiableAt_fst : DifferentiableAt 𝕜 Prod.fst p
-- Mathlib/Algebra/GeomSum.lean
theorem op_geom_sum (x : α) (n : ℕ) : op (∑ i ∈ range n, x ^ i) = ∑ i ∈ range n, op x ^ i
-- Mathlib/Data/Set/Lattice.lean
theorem iUnion₂_mono {s t : ∀ i, κ i → Set α} (h : ∀ i j, s i j ⊆ t i j) :
    ⋃ (i) (j), s i j ⊆ ⋃ (i) (j), t i j
-- Mathlib/Data/Matroid/Restrict.lean
theorem Restriction.of_subset {R' : Set α} (M : Matroid α) (h : R ⊆ R') : (M ↾ R) ≤r (M ↾ R')
-- Mathlib/Order/Atoms.lean
/-- An order is simple iff it has exactly two elements, `⊥` and `⊤`. -/
class IsSimpleOrder (α : Type*) [LE α] [BoundedOrder α] extends Nontrivial α : Prop where
  /-- Every element is either `⊥` or `⊤` -/
  eq_bot_or_eq_top : ∀ a : α, a = ⊥ ∨ a = ⊤
-- Mathlib/CategoryTheory/Subobject/Limits.lean
@[reassoc]
theorem kernelSubobjectIso_comp_kernel_map (sq : Arrow.mk f ⟶ Arrow.mk f') :
    (kernelSubobjectIso _).hom ≫ kernel.map f f' sq.1 sq.2 sq.3.symm =
      kernelSubobjectMap sq ≫ (kernelSubobjectIso _).hom
-- Mathlib/Topology/UniformSpace/Cauchy.lean
theorem isComplete_iff_ultrafilter {s : Set α} :
    IsComplete s ↔ ∀ l : Ultrafilter α, Cauchy (l : Filter α) → ↑l ≤ 𝓟 s → ∃ x ∈ s, ↑l ≤ 𝓝 x
-- Mathlib/Logic/Function/Iterate.lean
theorem Iterate.rec_zero (p : α → Sort*) {f : α → α} (h : ∀ a, p a → p (f a)) {a : α} (ha : p a) :
    Iterate.rec p h ha 0 = ha
-- Mathlib/RingTheory/WittVector/InitTail.lean
theorem init_pow (m : ℕ) (x : 𝕎 R) (n : ℕ) : init n (x ^ m) = init n (init n x ^ m)
-- Mathlib/Analysis/BoxIntegral/Partition/Tagged.lean
/-- In a Henstock prepartition, there are at most `2 ^ Fintype.card ι` boxes with a given tag. -/
theorem IsHenstock.card_filter_tag_eq_le [Fintype ι] (h : π.IsHenstock) (x : ι → ℝ) :
    (π.boxes.filter fun J => π.tag J = x).card ≤ 2 ^ Fintype.card ι
-- Mathlib/LinearAlgebra/QuadraticForm/Basic.lean
@[simp]
theorem toQuadraticMap_zero : (0 : BilinMap R M N).toQuadraticMap = 0
-- Mathlib/LinearAlgebra/Matrix/Charpoly/Coeff.lean
/-- Any matrix polynomial `p` is equivalent under evaluation to `p %ₘ M.charpoly`; that is, `p`
is equivalent to a polynomial with degree less than the dimension of the matrix. -/
theorem aeval_eq_aeval_mod_charpoly (M : Matrix n n R) (p : R[X]) :
    aeval M p = aeval M (p %ₘ M.charpoly)
-- Mathlib/Algebra/Ring/Hom/Defs.lean
lemma mul_def (f g : α →+* α) : f * g = f.comp g
-- Mathlib/Algebra/MonoidAlgebra/Basic.lean
@[simp]
theorem liftNC_single (f : k →+ R) (g : G → R) (a : G) (b : k) :
    liftNC f g (single a b) = f b * g a
-- Mathlib/Combinatorics/SimpleGraph/Path.lean
@[simp]
theorem mapLe_isPath {G G' : SimpleGraph V} (h : G ≤ G') {u v : V} {p : G.Walk u v} :
    (p.mapLe h).IsPath ↔ p.IsPath
-- Mathlib/Analysis/Complex/Polynomial/Basic.lean
/-- If `z` is a non-real complex root of a real polynomial,
then `p` is divisible by a quadratic polynomial. -/
lemma Polynomial.quadratic_dvd_of_aeval_eq_zero_im_ne_zero (p : ℝ[X]) {z : ℂ} (h0 : aeval z p = 0)
    (hz : z.im ≠ 0) : X ^ 2 - C (2 * z.re) * X + C (‖z‖ ^ 2) ∣ p
-- Mathlib/Algebra/Algebra/Defs.lean
theorem smul_def (r : R) (x : A) : r • x = algebraMap R A r * x
-- Mathlib/LinearAlgebra/SModEq.lean
@[simp]
theorem top : x ≡ y [SMOD (⊤ : Submodule R M)]
-- Mathlib/GroupTheory/GroupAction/SubMulAction.lean
@[simp]
theorem subtype_apply (x : p) : p.subtype x = x
-- Mathlib/Order/OmegaCompletePartialOrder.lean
theorem ωSup_eq_some {c : Chain (Part α)} {a : α} (h : some a ∈ c) : Part.ωSup c = some a
-- Mathlib/Analysis/Calculus/BumpFunction/FiniteDimension.lean
theorem w_mul_φ_nonneg (D : ℝ) (x y : E) : 0 ≤ w D y * φ (x - y)
-- Mathlib/MeasureTheory/Constructions/BorelSpace/Metric.lean
@[measurability]
theorem measurable_dist : Measurable fun p : α × α => dist p.1 p.2
-- Mathlib/Analysis/Complex/ReImTopology.lean
@[simp]
theorem frontier_setOf_le_im (a : ℝ) : frontier { z : ℂ | a ≤ z.im } = { z | z.im = a }
-- Mathlib/MeasureTheory/Constructions/Polish/Basic.lean
/-- The Lusin-Souslin theorem: if `s` is Borel-measurable in a Polish space, then its image under
a continuous injective map is also Borel-measurable. -/
theorem _root_.MeasurableSet.image_of_continuousOn_injOn [OpensMeasurableSpace β]
    [tγ : TopologicalSpace γ] [PolishSpace γ] [MeasurableSpace γ] [BorelSpace γ]
    (hs : MeasurableSet s)
    (f_cont : ContinuousOn f s) (f_inj : InjOn f s) : MeasurableSet (f '' s)
-- Mathlib/Order/Heyting/Basic.lean
@[simp, nolint simpNF]
theorem sdiff_eq : a \ b = unit
-- Mathlib/CategoryTheory/Galois/Decomposition.lean
/-- There exists an automorphism `f` of `A` that maps `b` to `a`.
`f` is obtained by considering `u` and `selfProdPermIncl h b`.
Both are inclusions of `A` into `selfProd F X` mapping `b` respectively `a` to the same element
in the fiber of `selfProd F X`. Applying `connected_component_unique` yields the result. -/
private lemma subobj_selfProd_trans (b : F.obj A) : ∃ (f : A ≅ A), F.map f.hom b = a
-- Mathlib/Data/PFunctor/Univariate/M.lean
protected theorem P_mk (x : F (M F)) : AllAgree (Approx.sMk x)
-- Mathlib/Algebra/Quaternion.lean
@[simp] theorem sub_re : (a - b).re = a.re - b.re
-- Mathlib/Data/List/Chain.lean
theorem chain_of_chain_map {S : β → β → Prop} (f : α → β) (H : ∀ a b : α, S (f a) (f b) → R a b)
    {a : α} {l : List α} (p : Chain S (f a) (map f l)) : Chain R a l
-- Mathlib/Analysis/BoxIntegral/Partition/Tagged.lean
@[simp]
theorem isHenstock_biUnionTagged {π : Prepartition I} {πi : ∀ J, TaggedPrepartition J} :
    IsHenstock (π.biUnionTagged πi) ↔ ∀ J ∈ π, (πi J).IsHenstock
-- Mathlib/Topology/Maps/Proper/Basic.lean
/-- Version of `isProperMap_iff_isClosedMap_and_compact_fibers` in terms of `cofinite` and
`cocompact`. Only works when the codomain is `T1`. -/
lemma isProperMap_iff_isClosedMap_and_tendsto_cofinite [T1Space Y] :
    IsProperMap f ↔ Continuous f ∧ IsClosedMap f ∧ Tendsto f (cocompact X) cofinite
-- Mathlib/MeasureTheory/Measure/DiracProba.lean
@[simp] lemma diracProba_toMeasure_apply [MeasurableSingletonClass X] (x : X) (A : Set X) :
    (diracProba x).toMeasure A = A.indicator 1 x
-- Mathlib/Data/Nat/Bitwise.lean
lemma shiftLeft_lt {x n m : ℕ} (h : x < 2 ^ n) : x <<< m < 2 ^ (n + m)
-- Mathlib/Analysis/InnerProductSpace/Calculus.lean
theorem DifferentiableOn.norm (hf : DifferentiableOn ℝ f s) (h0 : ∀ x ∈ s, f x ≠ 0) :
    DifferentiableOn ℝ (fun y => ‖f y‖) s
-- Mathlib/RingTheory/Discriminant.lean
/-- Relation between `Algebra.discr A ι b` and
`Algebra.discr A (b ᵥ* P.map (algebraMap A B))`. -/
theorem discr_of_matrix_vecMul (b : ι → B) (P : Matrix ι ι A) :
    discr A (b ᵥ* P.map (algebraMap A B)) = P.det ^ 2 * discr A b
-- Mathlib/Order/Filter/Archimedean.lean
theorem tendsto_intCast_atBot_iff [StrictOrderedRing R] [Archimedean R] {f : α → ℤ}
    {l : Filter α} : Tendsto (fun n => (f n : R)) l atBot ↔ Tendsto f l atBot
-- Mathlib/Analysis/InnerProductSpace/Basic.lean
/-- Polarization identity: The real inner product, in terms of the norm. -/
theorem real_inner_eq_norm_add_mul_self_sub_norm_mul_self_sub_norm_mul_self_div_two (x y : F) :
    ⟪x, y⟫_ℝ = (‖x + y‖ * ‖x + y‖ - ‖x‖ * ‖x‖ - ‖y‖ * ‖y‖) / 2
-- .lake/packages/lean4/src/lean/Init/Data/Int/DivModLemmas.lean
theorem mod_add_div' (m k : Int) : mod m k + m.div k * k = m
-- Mathlib/CategoryTheory/Monoidal/Opposite.lean
@[simp] lemma mop_tensorObj (X Y : C) : mop (X ⊗ Y) = mop Y ⊗ mop X
-- Mathlib/Algebra/Algebra/Opposite.lean
theorem toRingHom_op (f : A →ₐ[R] B) : f.op.toRingHom = RingHom.op f.toRingHom
-- Mathlib/Algebra/Group/Int.lean
lemma isUnit_mul_self (hu : IsUnit u) : u * u = 1
-- .lake/packages/lean4/src/lean/Init/Data/BitVec/Lemmas.lean
@[simp] theorem getMsb_cons_zero : (cons a x).getMsb 0 = a
-- Mathlib/Combinatorics/SetFamily/Intersecting.lean
theorem Intersecting.card_le [Fintype α] {s : Finset α} (hs : (s : Set α).Intersecting) :
    2 * s.card ≤ Fintype.card α
-- Mathlib/Data/Finset/Basic.lean
@[simp, aesop safe apply (rule_sets := [finsetNonempty])]
theorem attach_nonempty_iff {s : Finset α} : s.attach.Nonempty ↔ s.Nonempty
-- Mathlib/Topology/Algebra/Order/Floor.lean
theorem tendsto_ceil_right_pure_floor_add_one (x : α) :
    Tendsto (ceil : α → ℤ) (𝓝[>] x) (pure (⌊x⌋ + 1))
-- Mathlib/Order/BoundedOrder.lean
theorem bot_lt_iff_ne_bot : ⊥ < a ↔ a ≠ ⊥
-- Mathlib/Algebra/Order/GroupWithZero/Canonical.lean
lemma pow_lt_pow_right₀ (ha : 1 < a) (hmn : m < n) : a ^ m < a ^ n
-- Mathlib/Algebra/AddConstMap/Basic.lean
theorem map_nat [AddMonoidWithOne G] [AddMonoidWithOne H] [AddConstMapClass F G H 1 1]
    (f : F) (n : ℕ) : f n = f 0 + n
-- Mathlib/Topology/MetricSpace/Basic.lean
@[simp]
theorem dist_pos {x y : γ} : 0 < dist x y ↔ x ≠ y
-- Mathlib/Combinatorics/Additive/Corner/Defs.lean
lemma IsCornerFree.mono (hAB : A ⊆ B) (hB : IsCornerFree B) : IsCornerFree A
-- Mathlib/Topology/Order/LocalExtr.lean
theorem IsMinOn.localize (hf : IsMinOn f s a) : IsLocalMinOn f s a
-- Mathlib/Combinatorics/Colex.lean
private lemma antisymm_aux (hst : toColex s ≤ toColex t) (hts : toColex t ≤ toColex s) : s ⊆ t
-- Mathlib/GroupTheory/Archimedean.lean
/-- If an additive subgroup of a linear ordered additive commutative group is disjoint with the
interval `Set.Ioo 0 a` for some positive `a`, then this is a cyclic subgroup. -/
theorem AddSubgroup.cyclic_of_isolated_zero {H : AddSubgroup G} {a : G} (h₀ : 0 < a)
    (hd : Disjoint (H : Set G) (Ioo 0 a)) : ∃ b, H = closure {b}
-- Mathlib/Analysis/Calculus/Deriv/Comp.lean
theorem HasDerivAt.comp_hasFDerivWithinAt_of_eq {f : E → 𝕜'} {f' : E →L[𝕜] 𝕜'} {s} (x)
    (hh : HasDerivAt h₂ h₂' y) (hf : HasFDerivWithinAt f f' s x) (hy : y = f x) :
    HasFDerivWithinAt (h₂ ∘ f) (h₂' • f') s x
-- Mathlib/Algebra/Ring/Int.lean
lemma even_add' : Even (m + n) ↔ (Odd m ↔ Odd n)
-- Mathlib/RingTheory/LaurentSeries.lean
@[norm_cast]
theorem coe_sub : ((f' - g' : PowerSeries R') : LaurentSeries R') = f' - g'
-- Mathlib/ModelTheory/FinitelyGenerated.lean
theorem FG.cg (h : FG L M) : CG L M
-- Mathlib/NumberTheory/Padics/RingHoms.lean
theorem norm_sub_modPart_aux (r : ℚ) (h : ‖(r : ℚ_[p])‖ ≤ 1) :
    ↑p ∣ r.num - r.num * r.den.gcdA p % p * ↑r.den
-- Mathlib/Data/Stream/Init.lean
theorem corec_eq (f : α → β) (g : α → α) (a : α) : corec f g a = f a::corec f g (g a)
-- Mathlib/Data/Finset/Basic.lean
theorem disjoint_filter_filter_neg (s t : Finset α) (p : α → Prop)
    [DecidablePred p] [∀ x, Decidable (¬p x)] :
    Disjoint (s.filter p) (t.filter fun a => ¬p a)
-- Mathlib/NumberTheory/Padics/RingHoms.lean
theorem ker_toZModPow (n : ℕ) :
    RingHom.ker (toZModPow n : ℤ_[p] →+* ZMod (p ^ n)) = Ideal.span {(p : ℤ_[p]) ^ n}
-- Mathlib/Data/Rel.lean
@[simp]
theorem image_top {s : Set α} (h : Set.Nonempty s) :
    (⊤ : Rel α β).image s = Set.univ
-- Mathlib/Combinatorics/SimpleGraph/Basic.lean
@[simp]
theorem iSup_adj {f : ι → SimpleGraph V} : (⨆ i, f i).Adj a b ↔ ∃ i, (f i).Adj a b
-- Mathlib/NumberTheory/Liouville/LiouvilleWith.lean
theorem nat_mul_iff (hn : n ≠ 0) : LiouvilleWith p (n * x) ↔ LiouvilleWith p x
-- Mathlib/Analysis/ConstantSpeed.lean
theorem HasConstantSpeedOnWith.ratio {l' : ℝ≥0} (hl' : l' ≠ 0) {φ : ℝ → ℝ} (φm : MonotoneOn φ s)
    (hfφ : HasConstantSpeedOnWith (f ∘ φ) s l) (hf : HasConstantSpeedOnWith f (φ '' s) l') ⦃x : ℝ⦄
    (xs : x ∈ s) : EqOn φ (fun y => l / l' * (y - x) + φ x) s
-- Mathlib/MeasureTheory/Measure/Restrict.lean
theorem map_comap_subtype_coe {m0 : MeasurableSpace α} {s : Set α} (hs : MeasurableSet s)
    (μ : Measure α) : (comap (↑) μ).map ((↑) : s → α) = μ.restrict s
-- Mathlib/Probability/Process/Stopping.lean
theorem stoppedValue_eq_of_mem_finset [AddCommMonoid E] {s : Finset ι} (hbdd : ∀ ω, τ ω ∈ s) :
    stoppedValue u τ = ∑ i ∈ s, Set.indicator {ω | τ ω = i} (u i)
-- Mathlib/RingTheory/Idempotents.lean
/--
A family `{ eᵢ }` of idempotent elements is complete orthogonal if
1. (orthogonal) `eᵢ * eⱼ = 0` for all `i ≠ j`.
2. (complete) `∑ eᵢ = 1`
-/
@[mk_iff]
structure CompleteOrthogonalIdempotents (e : I → R) extends OrthogonalIdempotents e : Prop where
  complete : ∑ i, e i = 1
-- Mathlib/Algebra/Category/Grp/EquivalenceGroupAddGroup.lean
/-- The functor `AddGroup ⥤ Group` by sending `X ↦ multiplicative Y` and `f ↦ f`.
-/
@[simps]
def toGrp : AddGrp ⥤ Grp
-- Mathlib/Algebra/Ring/Subsemiring/Basic.lean
theorem comap_equiv_eq_map_symm (f : R ≃+* S) (K : Subsemiring S) :
    K.comap (f : R →+* S) = K.map f.symm
-- Mathlib/Algebra/Polynomial/FieldDivision.lean
theorem mod_eq_self_iff (hq0 : q ≠ 0) : p % q = p ↔ degree p < degree q
-- Mathlib/Data/Real/Cardinality.lean
theorem cantorFunction_le (h1 : 0 ≤ c) (h2 : c < 1) (h3 : ∀ n, f n → g n) :
    cantorFunction c f ≤ cantorFunction c g
-- Mathlib/RingTheory/Valuation/Basic.lean
theorem map_one_add_of_lt (h : v x < 1) : v (1 + x) = 1
-- Mathlib/GroupTheory/QuotientGroup.lean
@[to_additive (attr := simp)]
theorem kerLift_mk' (g : G) : (kerLift φ) (mk g) = φ g
-- Mathlib/CategoryTheory/Limits/HasLimits.lean
@[reassoc (attr := simp)]
theorem HasLimit.lift_isoOfNatIso_inv {F G : J ⥤ C} [HasLimit F] [HasLimit G] (t : Cone G)
    (w : F ≅ G) :
    limit.lift G t ≫ (HasLimit.isoOfNatIso w).inv =
      limit.lift F ((Cones.postcompose w.inv).obj _)
-- Mathlib/Order/Monotone/Union.lean
/-- If `f` is strictly monotone both on `s` and `t`, with `s` to the left of `t` and the center
point belonging to both `s` and `t`, then `f` is strictly monotone on `s ∪ t` -/
protected theorem StrictMonoOn.union {s t : Set α} {c : α} (h₁ : StrictMonoOn f s)
    (h₂ : StrictMonoOn f t) (hs : IsGreatest s c) (ht : IsLeast t c) : StrictMonoOn f (s ∪ t)
-- Mathlib/Algebra/BigOperators/Finprod.lean
/-- A more general version of `finprod_mem_mul_distrib` that only requires `s ∩ mulSupport f` and
`s ∩ mulSupport g` rather than `s` to be finite. -/
@[to_additive
      "A more general version of `finsum_mem_add_distrib` that only requires `s ∩ support f`
      and `s ∩ support g` rather than `s` to be finite."]
theorem finprod_mem_mul_distrib' (hf : (s ∩ mulSupport f).Finite) (hg : (s ∩ mulSupport g).Finite) :
    ∏ᶠ i ∈ s, f i * g i = (∏ᶠ i ∈ s, f i) * ∏ᶠ i ∈ s, g i
-- Mathlib/Data/Set/Sups.lean
theorem infs_union_right : s ⊼ (t₁ ∪ t₂) = s ⊼ t₁ ∪ s ⊼ t₂
-- Mathlib/Algebra/Algebra/Operations.lean
theorem mul_sup : M * (N ⊔ P) = M * N ⊔ M * P
-- Mathlib/Analysis/BoxIntegral/Partition/Basic.lean
theorem le_biUnion_iff {πi : ∀ J, Prepartition J} {π' : Prepartition I} :
    π' ≤ π.biUnion πi ↔ π' ≤ π ∧ ∀ J ∈ π, π'.restrict J ≤ πi J
-- Mathlib/Analysis/Calculus/Deriv/Comp.lean
theorem deriv.comp (hh₂ : DifferentiableAt 𝕜' h₂ (h x)) (hh : DifferentiableAt 𝕜 h x) :
    deriv (h₂ ∘ h) x = deriv h₂ (h x) * deriv h x
-- Mathlib/Probability/StrongLaw.lean
theorem integral_truncation_le_integral_of_nonneg (hf : Integrable f μ) (h'f : 0 ≤ f) {A : ℝ} :
    ∫ x, truncation f A x ∂μ ≤ ∫ x, f x ∂μ
-- Mathlib/LinearAlgebra/CliffordAlgebra/Equivs.lean
@[simp]
theorem toComplex_comp_ofComplex : toComplex.comp ofComplex = AlgHom.id ℝ ℂ
-- Mathlib/SetTheory/ZFC/Ordinal.lean
theorem IsTransitive.sUnion' (H : ∀ y ∈ x, IsTransitive y) :
    (⋃₀ x : ZFSet).IsTransitive
-- Mathlib/AlgebraicTopology/DoldKan/SplitSimplicialObject.lean
theorem ιSummand_comp_d_comp_πSummand_eq_zero (j k : ℕ) (A : IndexSet (op [j])) (hA : ¬A.EqId) :
    (s.cofan _).inj A ≫ K[X].d j k ≫ s.πSummand (IndexSet.id (op [k])) = 0
-- Mathlib/Analysis/Normed/Operator/LinearIsometry.lean
@[simp]
theorem dist_map (x y : E) : dist (e x) (e y) = dist x y
-- Mathlib/Topology/Basic.lean
theorem mem_closure_of_frequently_of_tendsto {f : α → X} {b : Filter α}
    (h : ∃ᶠ x in b, f x ∈ s) (hf : Tendsto f b (𝓝 x)) : x ∈ closure s
-- Mathlib/LinearAlgebra/QuadraticForm/Prod.lean
theorem PosDef.prod [PartialOrder P] [CovariantClass P P (· + ·) (· ≤ ·)]
    {Q₁ : QuadraticMap R M₁ P} {Q₂ : QuadraticMap R M₂ P} (h₁ : Q₁.PosDef) (h₂ : Q₂.PosDef) :
    (Q₁.prod Q₂).PosDef
-- Mathlib/CategoryTheory/Sites/Sheafification.lean
@[simp]
theorem isoSheafify_inv {P : Cᵒᵖ ⥤ D} (hP : Presheaf.IsSheaf J P) :
    (isoSheafify J hP).inv = sheafifyLift J (𝟙 _) hP
-- Mathlib/Analysis/SpecialFunctions/Pow/NNReal.lean
lemma rpow_eq_zero_iff_of_pos {x : ℝ≥0∞} {y : ℝ} (hy : 0 < y) : x ^ y = 0 ↔ x = 0
-- Mathlib/Algebra/Quaternion.lean
nonrec theorem star_add_self : star a + a = 2 * a.re
-- Mathlib/Data/Nat/PartENat.lean
theorem ne_top_iff_dom {x : PartENat} : x ≠ ⊤ ↔ x.Dom