ruc-ai4math/mathlib_handler_benchmark_410 huggingface dataset:
-- Mathlib/Topology/ContinuousOn.lean
@[simp]
theorem continuousWithinAt_singleton {f : α → β} {x : α} : ContinuousWithinAt f {x} x
-- Mathlib/Data/List/Zip.lean
theorem zipWith_zipWith_left (f : δ → γ → ε) (g : α → β → δ) :
    ∀ (la : List α) (lb : List β) (lc : List γ),
      zipWith f (zipWith g la lb) lc = zipWith3 (fun a b c => f (g a b) c) la lb lc
-- Mathlib/Order/LiminfLimsup.lean
lemma Antitone.frequently_le_map_of_frequently_ge {f : R → S} (f_decr : Antitone f)
    {l : R} (frbdd : ∃ᶠ x in F, l ≤ x) :
    ∃ᶠ y in F.map f, y ≤ f l
-- Mathlib/Algebra/Group/Basic.lean
@[to_additive]
theorem eq_one_div_of_mul_eq_one_right (h : a * b = 1) : b = 1 / a
-- Mathlib/Algebra/Homology/HomologySequenceLemmas.lean
lemma mono_homologyMap_τ₃ (i : ι)
    (h₁ : Epi (homologyMap φ.τ₁ i))
    (h₂ : Mono (homologyMap φ.τ₂ i))
    (h₃ : ∀ j, c.Rel i j → Mono (homologyMap φ.τ₁ j)) :
    Mono (homologyMap φ.τ₃ i)
-- Mathlib/SetTheory/Cardinal/Cofinality.lean
theorem isRegular_aleph0 : IsRegular ℵ₀
-- Mathlib/Algebra/Order/Monoid/Unbundled/WithTop.lean
/-- A version of `WithBot.map` for `AddMonoidHom`s. -/
@[simps (config := .asFn)]
protected def _root_.AddMonoidHom.withBotMap {M N : Type*} [AddZeroClass M] [AddZeroClass N]
    (f : M →+ N) : WithBot M →+ WithBot N
-- Mathlib/Order/Filter/Extr.lean
theorem IsMaxFilter.tendsto_principal_Iic (h : IsMaxFilter f l a) : Tendsto f l (𝓟 <| Iic (f a))
-- Mathlib/Order/PartialSups.lean
theorem partialSups_mono : Monotone (partialSups : (ℕ → α) → ℕ →o α)
-- Mathlib/Analysis/NormedSpace/ENorm.lean
@[norm_cast]
theorem max_map (e₁ e₂ : ENorm 𝕜 V) (x : V) : (e₁ ⊔ e₂) x = max (e₁ x) (e₂ x)
-- Mathlib/Topology/MetricSpace/Cauchy.lean
/-- A very useful criterion to show that a space is complete is to show that all sequences
which satisfy a bound of the form `dist (u n) (u m) < B N` for all `n m ≥ N` are
converging. This is often applied for `B N = 2^{-N}`, i.e., with a very fast convergence to
`0`, which makes it possible to use arguments of converging series, while this is impossible
to do in general for arbitrary Cauchy sequences. -/
theorem Metric.complete_of_convergent_controlled_sequences (B : ℕ → Real) (hB : ∀ n, 0 < B n)
    (H : ∀ u : ℕ → α, (∀ N n m : ℕ, N ≤ n → N ≤ m → dist (u n) (u m) < B N) →
      ∃ x, Tendsto u atTop (𝓝 x)) :
    CompleteSpace α
-- Mathlib/Data/Fin/VecNotation.lean
/-- `![a, b, ...] 1` is equal to `b`.

  The simplifier needs a special lemma for length `≥ 2`, in addition to
  `cons_val_succ`, because `1 : Fin 1 = 0 : Fin 1`.
-/
@[simp]
theorem cons_val_one (x : α) (u : Fin m.succ → α) : vecCons x u 1 = vecHead u
-- Mathlib/Topology/Homotopy/Basic.lean
theorem refl (f : C(X, Y)) : HomotopicRel f f S
-- Mathlib/MeasureTheory/Group/MeasurableEquiv.lean
@[to_additive (attr := simp)]
theorem symm_inv {G} [MeasurableSpace G] [InvolutiveInv G] [MeasurableInv G] :
    (inv G).symm = inv G
-- Mathlib/SetTheory/Ordinal/Basic.lean
/-- An ordinal lifted to the same universe equals itself. -/
@[simp]
theorem lift_id : ∀ a, lift.{u, u} a = a
-- Mathlib/Combinatorics/SimpleGraph/Finite.lean
theorem neighborFinset_def : G.neighborFinset v = (G.neighborSet v).toFinset
-- Mathlib/Algebra/Order/Ring/Unbundled/Basic.lean
lemma neg_one_lt_zero
    [ZeroLEOneClass α] [NeZero (R := α) 1] [CovariantClass α α (· + ·) (· < ·)] :
    -1 < (0 : α)
-- .lake/packages/batteries/Batteries/Data/UInt.lean
theorem UInt32.toNat_modn (x : UInt32) (n) : (x.modn n).toNat = x.toNat % n
-- Mathlib/Algebra/GroupWithZero/Divisibility.lean
theorem dvdNotUnit_of_dvd_of_not_dvd {a b : α} (hd : a ∣ b) (hnd : ¬b ∣ a) : DvdNotUnit a b
-- Mathlib/Tactic/Group.lean
@[to_additive]
theorem zpow_trick {G : Type*} [Group G] (a b : G) (n m : ℤ) :
    a * b ^ n * b ^ m = a * b ^ (n + m)
-- Mathlib/FieldTheory/Separable.lean
theorem separable_iff_derivative_ne_zero {f : F[X]} (hf : Irreducible f) :
    f.Separable ↔ derivative f ≠ 0
-- Mathlib/Algebra/Group/Units.lean
@[to_additive]
theorem mul_inv_of_eq {a : α} (h : ↑u = a) : a * ↑u⁻¹ = 1
-- Mathlib/RepresentationTheory/Action/Basic.lean
/-- The natural isomorphism from restriction along the identity homomorphism to
the identity functor on `Action V G`.
-/
@[simps!]
def resId {G : MonCat} : res V (𝟙 G) ≅ 𝟭 (Action V G)
-- Mathlib/Combinatorics/SimpleGraph/Basic.lean
theorem adj_comm (u v : V) : G.Adj u v ↔ G.Adj v u
-- Mathlib/LinearAlgebra/AffineSpace/AffineSubspace.lean
theorem parallel_comm {s₁ s₂ : AffineSubspace k P} : s₁ ∥ s₂ ↔ s₂ ∥ s₁
-- Mathlib/LinearAlgebra/Lagrange.lean
theorem values_eq_on_of_interpolate_eq (hvs : Set.InjOn v s)
    (hrr' : interpolate s v r = interpolate s v r') : ∀ i ∈ s, r i = r' i
-- Mathlib/Algebra/Group/Basic.lean
@[to_additive]
theorem mul_mul_inv_cancel'_right (a b : G) : a * (b * a⁻¹) = b
-- Mathlib/GroupTheory/SpecificGroups/Cyclic.lean
@[to_additive]
theorem mem_powers_of_prime_card {G : Type*} [Group G] {_ : Fintype G} {p : ℕ} [hp : Fact p.Prime]
    (h : Fintype.card G = p) {g g' : G} (hg : g ≠ 1) : g' ∈ Submonoid.powers g
-- Mathlib/Order/Defs.lean
theorem ne_of_gt {a b : α} (h : b < a) : a ≠ b
-- Mathlib/Analysis/Calculus/Gradient/Basic.lean
theorem HasGradientWithinAt.congr_of_eventuallyEq (h : HasGradientWithinAt f f' s x)
    (h₁ : f₁ =ᶠ[𝓝[s] x] f) (hx : f₁ x = f x) : HasGradientWithinAt f₁ f' s x
-- Mathlib/Data/Real/Sqrt.lean
@[simp]
theorem sqrt_lt_sqrt_iff (hx : 0 ≤ x) : √x < √y ↔ x < y
-- Mathlib/Order/BooleanAlgebra.lean
@[simp]
theorem sdiff_inf_sdiff : x \ y ⊓ y \ x = ⊥
-- Mathlib/Data/Set/Pointwise/Basic.lean
@[simp]
theorem nsmul_univ {α : Type*} [AddMonoid α] : ∀ {n : ℕ}, n ≠ 0 → n • (univ : Set α) = univ
-- Mathlib/FieldTheory/IntermediateField.lean
/-- Two intermediate fields are equal if they have the same elements. -/
@[ext]
theorem ext {S T : IntermediateField K L} (h : ∀ x, x ∈ S ↔ x ∈ T) : S = T
-- Mathlib/CategoryTheory/Triangulated/Functor.lean
/-- A functor which commutes with the shift by `ℤ` is triangulated if
it sends distinguished triangles to distinguished triangles. -/
class IsTriangulated : Prop where
  map_distinguished (T : Triangle C) : (T ∈ distTriang C) → F.mapTriangle.obj T ∈ distTriang D
-- Mathlib/Geometry/Manifold/Algebra/Monoid.lean
@[to_additive]
theorem smooth_mul_left {a : G} : Smooth I I fun b : G => a * b
-- Mathlib/Tactic/Group.lean
@[to_additive]
theorem zpow_trick_one {G : Type*} [Group G] (a b : G) (m : ℤ) :
    a * b * b ^ m = a * b ^ (m + 1)
-- Mathlib/MeasureTheory/Decomposition/SignedHahn.lean
private theorem measure_of_restrictNonposSeq (hi₂ : ¬s ≤[i] 0) (n : ℕ)
    (hn : ¬s ≤[i \ ⋃ k < n, restrictNonposSeq s i k] 0) : 0 < s (restrictNonposSeq s i n)
-- Mathlib/Data/Nat/Cast/Order/Ring.lean
/-- Specialisation of `Nat.cast_pos'`, which seems to be easier for Lean to use. -/
@[simp]
theorem cast_pos {α} [OrderedSemiring α] [Nontrivial α] {n : ℕ} : (0 : α) < n ↔ 0 < n
-- Mathlib/CategoryTheory/Functor/EpiMono.lean
/-- A functor preserves epimorphisms if it maps epimorphisms to epimorphisms. -/
class PreservesEpimorphisms (F : C ⥤ D) : Prop where
  /-- A functor preserves epimorphisms if it maps epimorphisms to epimorphisms. -/
  preserves : ∀ {X Y : C} (f : X ⟶ Y) [Epi f], Epi (F.map f)
-- Mathlib/Data/Nat/Cast/Commute.lean
theorem _root_.Commute.ofNat_left (n : ℕ) [n.AtLeastTwo] (x : α) : Commute (OfNat.ofNat n) x
-- Mathlib/AlgebraicGeometry/Morphisms/UnderlyingMap.lean
lemma Surjective.comp_iff [Surjective f] : Surjective (f ≫ g) ↔ Surjective g
-- Mathlib/Data/Set/Finite.lean
theorem card_le_card {s t : Set α} [Fintype s] [Fintype t] (hsub : s ⊆ t) :
    Fintype.card s ≤ Fintype.card t
-- Mathlib/GroupTheory/Perm/List.lean
theorem formPerm_apply_lt_getElem (xs : List α) (h : Nodup xs) (n : ℕ) (hn : n + 1 < xs.length) :
    formPerm xs (xs[n]'((Nat.lt_succ_self n).trans hn)) = xs[n + 1]
-- Mathlib/SetTheory/ZFC/Basic.lean
@[simp]
theorem mem_univ {A : Class.{u}} : A ∈ univ.{u} ↔ ∃ x : ZFSet.{u}, ↑x = A
-- Mathlib/Analysis/SpecialFunctions/ExpDeriv.lean
theorem hasStrictFDerivAt_exp_real (x : ℂ) : HasStrictFDerivAt exp (exp x • (1 : ℂ →L[ℝ] ℂ)) x
-- Mathlib/RingTheory/HahnSeries/Basic.lean
theorem leadingCoeff_eq [Zero Γ] {x : HahnSeries Γ R} : x.leadingCoeff = x.coeff x.order
-- Mathlib/GroupTheory/MonoidLocalization/Basic.lean
/-- Given a Localization map `f : M →* N` for a Submonoid `S ⊆ M`, if a `CommMonoid` map
`g : M →* P` induces a map `f.lift hg : N →* P` then for all `z : N`, we have
`g y * f.lift hg z = g x`, where `x : M, y ∈ S` are such that `z * f y = f x`. -/
@[to_additive
    "Given a Localization map `f : M →+ N` for a Submonoid `S ⊆ M`, if an `AddCommMonoid` map
`g : M →+ P` induces a map `f.lift hg : N →+ P` then for all `z : N`, we have
`g y + f.lift hg z = g x`, where `x : M, y ∈ S` are such that `z + f y = f x`."]
theorem lift_mul_left (z) : g (f.sec z).2 * f.lift hg z = g (f.sec z).1
-- Mathlib/Topology/Covering.lean
theorem constOn_of_comp (cont : ContinuousOn g s)
    (he : ∀ a ∈ s, ∀ a' ∈ s, f (g a) = f (g a'))
    {a a'} (ha : a ∈ s) (ha' : a' ∈ s) : g a = g a'
-- Mathlib/Algebra/Module/Equiv/Basic.lean
@[simp]
theorem ofLinear_symm_toLinearMap {h₁ h₂} : (ofLinear f g h₁ h₂ : M ≃ₛₗ[σ₁₂] M₂).symm = g
-- Mathlib/Data/Fin/Basic.lean
@[simp]
theorem revPerm_symm : (@revPerm n).symm = revPerm
-- Mathlib/Analysis/Convolution.lean
/-- The convolution `f * g` is continuous if `f` is locally integrable and `g` is continuous and
compactly supported. Version where `g` depends on an additional parameter in a subset `s` of
a parameter space `P` (and the compact support `k` is independent of the parameter in `s`). -/
theorem continuousOn_convolution_right_with_param {g : P → G → E'} {s : Set P} {k : Set G}
    (hk : IsCompact k) (hgs : ∀ p, ∀ x, p ∈ s → x ∉ k → g p x = 0)
    (hf : LocallyIntegrable f μ) (hg : ContinuousOn (↿g) (s ×ˢ univ)) :
    ContinuousOn (fun q : P × G => (f ⋆[L, μ] g q.1) q.2) (s ×ˢ univ)
-- Mathlib/Data/Seq/Computation.lean
theorem ret_mem (a : α) : a ∈ pure a
-- Mathlib/Topology/MetricSpace/Lipschitz.lean
/-- The maximum of locally Lipschitz functions is locally Lipschitz. -/
protected lemma max (hf : LocallyLipschitz f) (hg : LocallyLipschitz g) :
    LocallyLipschitz (fun x => max (f x) (g x))
-- Mathlib/Order/Interval/Set/Image.lean
lemma Monotone.image_Icc_subset (h : Monotone f) : f '' Icc a b ⊆ Icc (f a) (f b)
-- Mathlib/Algebra/Star/Subalgebra.lean
@[simp]
theorem coe_star (S : Subalgebra R A) : ((star S : Subalgebra R A) : Set A) = star (S : Set A)
-- Mathlib/Data/Finset/Basic.lean
@[simp]
theorem insert_eq_of_mem (h : a ∈ s) : insert a s = s
-- Mathlib/Combinatorics/SimpleGraph/Walk.lean
@[simp]
theorem concatRec_nil (u : V) :
    @concatRec _ _ motive @Hnil @Hconcat _ _ (nil : G.Walk u u) = Hnil
-- Mathlib/Geometry/Manifold/MFDeriv/SpecificFunctions.lean
theorem mdifferentiableOn_snd {s : Set (M × M')} : MDifferentiableOn (I.prod I') I' Prod.snd s
-- Mathlib/AlgebraicGeometry/AffineScheme.lean
theorem isLocalization_stalk (x : U) :
    IsLocalization.AtPrime (X.presheaf.stalk x) (hU.primeIdealOf x).asIdeal
-- Mathlib/LinearAlgebra/TensorProduct/Basic.lean
theorem sum_tmul {α : Type*} (s : Finset α) (m : α → M) (n : N) :
    (∑ a ∈ s, m a) ⊗ₜ[R] n = ∑ a ∈ s, m a ⊗ₜ[R] n
-- Mathlib/MeasureTheory/Integral/IntegralEqImproper.lean
/-- **Fundamental theorem of calculus-2**, on semi-infinite intervals `(a, +∞)`.
When a function has a limit at infinity `m`, and its derivative is integrable, then the
integral of the derivative on `(a, +∞)` is `m - f a`. Version assuming differentiability
on `(a, +∞)` and continuity at `a⁺`.

Note that such a function always has a limit at infinity,
see `tendsto_limUnder_of_hasDerivAt_of_integrableOn_Ioi`. -/
theorem integral_Ioi_of_hasDerivAt_of_tendsto (hcont : ContinuousWithinAt f (Ici a) a)
    (hderiv : ∀ x ∈ Ioi a, HasDerivAt f (f' x) x) (f'int : IntegrableOn f' (Ioi a))
    (hf : Tendsto f atTop (𝓝 m)) : ∫ x in Ioi a, f' x = m - f a
-- Mathlib/Geometry/Euclidean/Basic.lean
/-- The reflection of a point in a subspace is contained in any larger
subspace containing both the point and the subspace reflected in. -/
theorem reflection_mem_of_le_of_mem {s₁ s₂ : AffineSubspace ℝ P} [Nonempty s₁]
    [HasOrthogonalProjection s₁.direction] (hle : s₁ ≤ s₂) {p : P} (hp : p ∈ s₂) :
    reflection s₁ p ∈ s₂
-- Mathlib/Algebra/Polynomial/Eval.lean
@[simp]
theorem X_comp : X.comp p = p
-- Mathlib/Data/Nat/Defs.lean
lemma lt_div_mul_add (hb : 0 < b) : a < a / b * b + b
-- Mathlib/CategoryTheory/Sigma/Basic.lean
@[simp]
lemma map_map {j : J} {X Y : C (g j)} (f : X ⟶ Y) :
    (Sigma.map C g).map (SigmaHom.mk f) = SigmaHom.mk f
-- Mathlib/MeasureTheory/Function/LpSpace.lean
lemma Lp.coeFn_const : Lp.const p μ c =ᵐ[μ] Function.const α c
-- Mathlib/CategoryTheory/Limits/Shapes/Biproducts.lean
@[reassoc (attr := simp)]
theorem biprod.inr_desc {W X Y : C} [HasBinaryBiproduct X Y] (f : X ⟶ W) (g : Y ⟶ W) :
    biprod.inr ≫ biprod.desc f g = g
-- Mathlib/Algebra/Order/UpperLower.lean
@[to_additive (attr := simp,norm_cast)]
theorem coe_mul (s t : LowerSet α) : (↑(s * t) : Set α) = s * t
-- Mathlib/Combinatorics/SimpleGraph/Clique.lean
theorem isClique_map_finset_iff_of_nontrivial (ht : t.Nontrivial) :
    (G.map f).IsClique t ↔ ∃ (s : Finset α), G.IsClique s ∧ s.map f = t
-- Mathlib/Order/CompleteBooleanAlgebra.lean
lemma inf_iSup₂_eq {f : ∀ i, κ i → α} (a : α) : (a ⊓ ⨆ i, ⨆ j, f i j) = ⨆ i, ⨆ j, a ⊓ f i j
-- Mathlib/Algebra/BigOperators/Finsupp.lean
theorem Finsupp.sum_sum_index' : (∑ x ∈ s, f x).sum t = ∑ x ∈ s, (f x).sum t
-- Mathlib/RingTheory/FractionalIdeal/Basic.lean
@[simp]
theorem le_zero_iff {I : FractionalIdeal S P} : I ≤ 0 ↔ I = 0
-- Mathlib/Algebra/Quaternion.lean
theorem self_add_star : a + star a = 2 * a.re
-- Mathlib/Algebra/Star/Pi.lean
@[simp]
lemma conj_apply {ι : Type*} {α : ι → Type*} [∀ i, CommSemiring (α i)] [∀ i, StarRing (α i)]
    (f : ∀ i, α i) (i : ι) : conj f i = conj (f i)
-- Mathlib/Algebra/Polynomial/Eval.lean
theorem hom_eval₂ (x : S) : g (p.eval₂ f x) = p.eval₂ (g.comp f) (g x)
-- Mathlib/Tactic/Positivity/Basic.lean
private theorem mul_ne_zero_of_pos_of_ne_zero [OrderedSemiring α] [NoZeroDivisors α]
    {a b : α} (ha : 0 < a) (hb : b ≠ 0) : a * b ≠ 0
-- .lake/packages/lean4/src/lean/Init/Data/BitVec/Lemmas.lean
@[simp] theorem getLsb_not {x : BitVec v} : (~~~x).getLsb i = (decide (i < v) && ! x.getLsb i)
-- Mathlib/Computability/Language.lean
/-- `Language.reverse` as a ring isomorphism to the opposite ring. -/
@[simps]
def reverseIso : Language α ≃+* (Language α)ᵐᵒᵖ
-- .lake/packages/lean4/src/lean/Init/PropLemmas.lean
theorem exists₄_congr {p q : ∀ a b c, δ a b c → Prop} (h : ∀ a b c d, p a b c d ↔ q a b c d) :
    (∃ a b c d, p a b c d) ↔ ∃ a b c d, q a b c d
-- Mathlib/Analysis/Normed/Lp/LpEquiv.lean
theorem coe_lpPiLpₗᵢ_symm [Fact (1 ≤ p)] (f : PiLp p E) :
    ((lpPiLpₗᵢ E 𝕜).symm f : ∀ i, E i) = f
-- Mathlib/MeasureTheory/MeasurableSpace/Basic.lean
theorem measurable_inclusion {s t : Set α} (h : s ⊆ t) : Measurable (inclusion h)
-- Mathlib/CategoryTheory/Limits/HasLimits.lean
/-- A category that has larger colimits also has smaller colimits. -/
theorem hasColimitsOfSizeOfUnivLE [UnivLE.{v₂, v₁}] [UnivLE.{u₂, u₁}]
    [HasColimitsOfSize.{v₁, u₁} C] : HasColimitsOfSize.{v₂, u₂} C
-- Mathlib/Analysis/Calculus/FDeriv/Mul.lean
/-- Application of a `ContinuousMultilinearMap` to a constant commutes with `fderiv`. -/
theorem fderiv_continuousMultilinear_apply_const_apply (hc : DifferentiableAt 𝕜 c x)
    (u : ∀ i, M i) (m : E) :
    (fderiv 𝕜 (fun y ↦ (c y) u) x) m = (fderiv 𝕜 c x) m u
-- Mathlib/Topology/UniformSpace/Basic.lean
theorem Sum.uniformity : 𝓤 (α ⊕ β) = map (Prod.map inl inl) (𝓤 α) ⊔ map (Prod.map inr inr) (𝓤 β)
-- Mathlib/Data/Nat/ModEq.lean
protected theorem add_div_of_dvd_right {a b c : ℕ} (hca : c ∣ a) : (a + b) / c = a / c + b / c
-- .lake/packages/batteries/Batteries/Data/List/EraseIdx.lean
@[simp] theorem eraseIdx_zero (l : List α) : eraseIdx l 0 = tail l
-- Mathlib/RingTheory/NonUnitalSubsemiring/Basic.lean
theorem centralizer_le {R} [NonUnitalSemiring R] (s t : Set R) (h : s ⊆ t) :
    centralizer t ≤ centralizer s
-- Mathlib/CategoryTheory/Sites/MayerVietorisSquare.lean
/-- A Mayer-Vietoris square in a category `C` equipped with a Grothendieck
topology consists of a commutative square `f₁₂ ≫ f₂₄ = f₁₃ ≫ f₃₄` in `C`
such that `f₁₃` is a monomorphism and that the square becomes a
pushout square in the category of sheaves of sets. -/
structure MayerVietorisSquare extends Square C where
  mono_f₁₃ : Mono toSquare.f₁₃ := by infer_instance
  /-- the square becomes a pushout square in the category of sheaves of types -/
  isPushout : (toSquare.map (yoneda ⋙ presheafToSheaf J _)).IsPushout
-- Mathlib/GroupTheory/Perm/Cycle/Basic.lean
theorem prod_self_eq_iUnion_perm (hf : f.IsCycleOn s) :
    s ×ˢ s = ⋃ n : ℤ, (fun a => (a, (f ^ n) a)) '' s
-- Mathlib/Algebra/Group/Action/Basic.lean
/-- Given an action of a group `α` on `β`, each `g : α` defines a permutation of `β`. -/
@[to_additive (attr := simps)]
def MulAction.toPerm (a : α) : Equiv.Perm β
-- Mathlib/Analysis/LocallyConvex/AbsConvex.lean
theorem nhds_basis_abs_convex :
    (𝓝 (0 : E)).HasBasis (fun s : Set E => s ∈ 𝓝 (0 : E) ∧ Balanced 𝕜 s ∧ Convex ℝ s) id
-- Mathlib/Data/Stream/Init.lean
theorem interchange (fs : Stream' (α → β)) (a : α) :
    fs ⊛ pure a = (pure fun f : α → β => f a) ⊛ fs
-- Mathlib/Data/Matrix/Basis.lean
theorem std_basis_eq_basis_mul_basis (i : m) (j : n) :
    stdBasisMatrix i j (1 : α) =
      vecMulVec (fun i' => ite (i = i') 1 0) fun j' => ite (j = j') 1 0
-- Mathlib/Order/Interval/Set/UnorderedInterval.lean
lemma mem_uIoc : a ∈ Ι b c ↔ b < a ∧ a ≤ c ∨ c < a ∧ a ≤ b
-- Mathlib/RingTheory/Perfection.lean
theorem pthRoot_frobenius : (pthRoot R p).comp (frobenius _ p) = RingHom.id _
-- Mathlib/Computability/PartrecCode.lean
theorem evaln_sound : ∀ {k c n x}, x ∈ evaln k c n → x ∈ eval c n
-- Mathlib/Data/Set/Pointwise/Interval.lean
@[simp]
theorem preimage_neg_Iic : -Iic a = Ici (-a)
-- Mathlib/Analysis/InnerProductSpace/Projection.lean
/-- Reflecting twice in the same subspace. -/
@[simp]
theorem reflection_reflection (p : E) : reflection K (reflection K p) = p
-- Mathlib/Topology/Separation.lean
/-- Removing a non-isolated point from a dense set, one still obtains a dense set. -/
theorem Dense.diff_singleton [T1Space X] {s : Set X} (hs : Dense s) (x : X) [NeBot (𝓝[≠] x)] :
    Dense (s \ {x})
-- Mathlib/Order/Compare.lean
theorem compares_swap [LT α] {a b : α} {o : Ordering} : o.swap.Compares a b ↔ o.Compares b a
-- Mathlib/Geometry/Manifold/Algebra/Monoid.lean
/-- If the multiplication is smooth, then it is continuous. This is not an instance for technical
reasons, see note [Design choices about smooth algebraic structures]. -/
@[to_additive "If the addition is smooth, then it is continuous. This is not an instance for
technical reasons, see note [Design choices about smooth algebraic structures]."]
theorem continuousMul_of_smooth : ContinuousMul G
-- Mathlib/AlgebraicTopology/SimplicialObject.lean
/-- The fifth simplicial identity -/
@[reassoc]
theorem σ_comp_σ {n} {i j : Fin (n + 1)} (H : i ≤ j) :
    X.σ j ≫ X.σ (Fin.castSucc i) = X.σ i ≫ X.σ j.succ
-- Mathlib/Topology/UniformSpace/Equicontinuity.lean
/-- If a set of functions is equicontinuous, its closure for the product topology is also
equicontinuous. This would also be true for the coarser topology of pointwise convergence on `S`,
see `EquicontinuousOn.closure'`. -/
protected theorem Set.EquicontinuousOn.closure {A : Set <| X → α} {S : Set X}
    (hA : A.EquicontinuousOn S) : (closure A).EquicontinuousOn S
-- Mathlib/Algebra/Order/AddTorsor.lean
/-- A vector addition is cancellative if it is pointwise injective on the left and right. -/
class IsCancelVAdd (G P : Type*) [VAdd G P] : Prop where
  protected left_cancel : ∀ (a : G) (b c : P), a +ᵥ b = a +ᵥ c → b = c
  protected right_cancel : ∀ (a b : G) (c : P), a +ᵥ c = b +ᵥ c → a = b
-- Mathlib/Algebra/Quaternion.lean
@[simp]
theorem mul_re : (a * b).re = a.1 * b.1 + c₁ * a.2 * b.2 + c₂ * a.3 * b.3 - c₁ * c₂ * a.4 * b.4
-- Mathlib/Algebra/Quaternion.lean
/-- The equivalence between a quaternion algebra over `R` and `Fin 4 → R`. -/
@[simps symm_apply]
def equivTuple {R : Type*} (c₁ c₂ : R) : ℍ[R,c₁,c₂] ≃ (Fin 4 → R)
-- Mathlib/Order/Interval/Set/OrderEmbedding.lean
@[simp] theorem preimage_uIcc [Lattice β] (e : α ↪o β) (x y : α) :
    e ⁻¹' (uIcc (e x) (e y)) = uIcc x y
-- Mathlib/Data/Rat/Lemmas.lean
theorem inv_intCast_num_of_pos {a : ℤ} (ha0 : 0 < a) : (a : ℚ)⁻¹.num = 1
-- Mathlib/CategoryTheory/Idempotents/Basic.lean
theorem split_imp_of_iso {X X' : C} (φ : X ≅ X') (p : X ⟶ X) (p' : X' ⟶ X')
    (hpp' : p ≫ φ.hom = φ.hom ≫ p')
    (h : ∃ (Y : C) (i : Y ⟶ X) (e : X ⟶ Y), i ≫ e = 𝟙 Y ∧ e ≫ i = p) :
    ∃ (Y' : C) (i' : Y' ⟶ X') (e' : X' ⟶ Y'), i' ≫ e' = 𝟙 Y' ∧ e' ≫ i' = p'
-- Mathlib/LinearAlgebra/AffineSpace/Basis.lean
@[simp]
theorem coord_apply_eq (i : ι) : b.coord i (b i) = 1
-- Mathlib/Algebra/CubicDiscriminant.lean
theorem degree_of_c_eq_zero (ha : P.a = 0) (hb : P.b = 0) (hc : P.c = 0) : P.toPoly.degree ≤ 0
-- Mathlib/SetTheory/Ordinal/Arithmetic.lean
theorem bsup_id_limit {o : Ordinal} : (∀ a < o, succ a < o) → (bsup.{u, u} o fun x _ => x) = o
-- Mathlib/MeasureTheory/Decomposition/SignedHahn.lean
/-- A measurable set of negative measure has a negative subset of negative measure. -/
theorem exists_subset_restrict_nonpos (hi : s i < 0) :
    ∃ j : Set α, MeasurableSet j ∧ j ⊆ i ∧ s ≤[j] 0 ∧ s j < 0
-- Mathlib/Order/UpperLower/Basic.lean
@[simp]
theorem carrier_eq_coe (s : UpperSet α) : s.carrier = s
-- Mathlib/RingTheory/Generators.lean
lemma ker_eq_ker_aeval_val : P.ker = RingHom.ker (aeval P.val)
-- Mathlib/LinearAlgebra/Determinant.lean
theorem is_basis_iff_det {v : ι → M} :
    LinearIndependent R v ∧ span R (Set.range v) = ⊤ ↔ IsUnit (e.det v)
-- Mathlib/Topology/Order/LeftRightNhds.lean
/-- A set is a neighborhood of `a` within `(a, +∞)` if and only if it contains an interval `(a, u)`
with `a < u`. -/
theorem mem_nhdsWithin_Ioi_iff_exists_Ioo_subset [NoMaxOrder α] {a : α} {s : Set α} :
    s ∈ 𝓝[>] a ↔ ∃ u ∈ Ioi a, Ioo a u ⊆ s
-- Mathlib/Algebra/BigOperators/Group/Finset.lean
@[to_additive]
theorem prod_finset_product' (r : Finset (γ × α)) (s : Finset γ) (t : γ → Finset α)
    (h : ∀ p : γ × α, p ∈ r ↔ p.1 ∈ s ∧ p.2 ∈ t p.1) {f : γ → α → β} :
    ∏ p ∈ r, f p.1 p.2 = ∏ c ∈ s, ∏ a ∈ t c, f c a
-- Mathlib/Analysis/InnerProductSpace/Projection.lean
theorem orthogonalProjection_eq_linear_proj [HasOrthogonalProjection K] (x : E) :
    orthogonalProjection K x =
      K.linearProjOfIsCompl _ Submodule.isCompl_orthogonal_of_completeSpace x
-- Mathlib/Topology/Irreducible.lean
/-- A preirreducible space is one where there is no non-trivial pair of disjoint opens. -/
class PreirreducibleSpace (X : Type*) [TopologicalSpace X] : Prop where
  /-- In a preirreducible space, `Set.univ` is a preirreducible set. -/
  isPreirreducible_univ : IsPreirreducible (univ : Set X)
-- Mathlib/MeasureTheory/Function/SimpleFuncDenseLp.lean
theorem toLp_sub (f g : α →ₛ E) (hf : Memℒp f p μ) (hg : Memℒp g p μ) :
    toLp (f - g) (hf.sub hg) = toLp f hf - toLp g hg
-- Mathlib/MeasureTheory/Integral/Average.lean
theorem laverage_union_mem_segment (hd : AEDisjoint μ s t) (ht : NullMeasurableSet t μ)
    (hsμ : μ s ≠ ∞) (htμ : μ t ≠ ∞) :
    ⨍⁻ x in s ∪ t, f x ∂μ ∈ [⨍⁻ x in s, f x ∂μ -[ℝ≥0∞] ⨍⁻ x in t, f x ∂μ]
-- Mathlib/AlgebraicTopology/DoldKan/Normalized.lean
/-- `PInfty` factors through the normalized Moore complex -/
@[simps!]
def PInftyToNormalizedMooreComplex (X : SimplicialObject A) : K[X] ⟶ N[X]
-- Mathlib/Algebra/Order/Monoid/Unbundled/Pow.lean
@[to_additive lt_of_nsmul_lt_nsmul_right]
theorem lt_of_pow_lt_pow_left' {a b : M} (n : ℕ) : a ^ n < b ^ n → a < b
-- Mathlib/AlgebraicGeometry/EllipticCurve/Jacobian.lean
lemma X_eq_of_equiv {P Q : Fin 3 → R} (h : P ≈ Q) : P x * Q z ^ 2 = Q x * P z ^ 2
-- Mathlib/CategoryTheory/Abelian/InjectiveResolution.lean
@[simp]
theorem descFOne_zero_comm {Y Z : C} (f : Z ⟶ Y) (I : InjectiveResolution Y)
    (J : InjectiveResolution Z) :
    J.cocomplex.d 0 1 ≫ descFOne f I J = descFZero f I J ≫ I.cocomplex.d 0 1
-- Mathlib/Topology/Algebra/InfiniteSum/Constructions.lean
@[to_additive]
theorem Multipliable.sigma_factor {γ : β → Type*} {f : (Σb : β, γ b) → α}
    (ha : Multipliable f) (b : β) :
    Multipliable fun c ↦ f ⟨b, c⟩