ruc-ai4math/mathlib_handler_benchmark_410 huggingface dataset:
-- Mathlib/Data/Finset/Update.lean
theorem update_eq_updateFinset {i y} :
    Function.update x i y = updateFinset x {i} (uniqueElim y)
-- Mathlib/Probability/Kernel/Basic.lean
theorem IsSFiniteKernel.finset_sum {κs : ι → Kernel α β} (I : Finset ι)
    (h : ∀ i ∈ I, IsSFiniteKernel (κs i)) : IsSFiniteKernel (∑ i ∈ I, κs i)
-- Mathlib/Algebra/Order/Monovary.lean
/-- Two functions antivary iff the rearrangement inequality holds. -/
lemma antivary_iff_mul_rearrangement :
    Antivary f g ↔ ∀ i j, f i * g i + f j * g j ≤ f i * g j + f j * g i
-- Mathlib/GroupTheory/Coprod/Basic.lean
/-- Extensionality lemma for monoid homomorphisms `M ∗ N →* P`.
If two homomorphisms agree on the ranges of `Monoid.Coprod.inl` and `Monoid.Coprod.inr`,
then they are equal. -/
@[to_additive (attr := ext 1100)
  "Extensionality lemma for additive monoid homomorphisms `AddMonoid.Coprod M N →+ P`.
  If two homomorphisms agree on the ranges of `AddMonoid.Coprod.inl` and `AddMonoid.Coprod.inr`,
  then they are equal."]
theorem hom_ext {f g : M ∗ N →* P} (h₁ : f.comp inl = g.comp inl) (h₂ : f.comp inr = g.comp inr) :
    f = g
-- Mathlib/MeasureTheory/Measure/OpenPos.lean
theorem _root_.IsClosed.measure_eq_one_iff_eq_univ [OpensMeasurableSpace X] [IsProbabilityMeasure μ]
    (hF : IsClosed F) :
    μ F = 1 ↔ F = univ
-- .lake/packages/lean4/src/lean/Init/Data/Bool.lean
/--
These two rules follow trivially by simp, but are needed to avoid non-termination
in false_eq and true_eq.
-/
@[simp] theorem false_eq_true : (false = true) = False
-- Mathlib/SetTheory/Game/Basic.lean
@[simp]
theorem quot_left_distrib_sub (x y z : PGame) : (⟦x * (y - z)⟧ : Game) = ⟦x * y⟧ - ⟦x * z⟧
-- Mathlib/Topology/MetricSpace/Cauchy.lean
/-- In a pseudometric space, uniform Cauchy sequences are characterized by the fact that,
eventually, the distance between all its elements is uniformly, arbitrarily small. -/
-- Porting note: no attr @[nolint ge_or_gt]
theorem Metric.uniformCauchySeqOn_iff {γ : Type*} {F : β → γ → α} {s : Set γ} :
    UniformCauchySeqOn F atTop s ↔ ∀ ε > (0 : ℝ),
      ∃ N : β, ∀ m ≥ N, ∀ n ≥ N, ∀ x ∈ s, dist (F m x) (F n x) < ε
-- Mathlib/Order/Hom/Lattice.lean
/-- Reinterpret a bounded lattice homomorphism as a bounded lattice homomorphism between the dual
bounded lattices. -/
@[simps]
protected def dual : BoundedLatticeHom α β ≃ BoundedLatticeHom αᵒᵈ βᵒᵈ
-- Mathlib/Analysis/SpecialFunctions/Complex/Log.lean
theorem log_neg_I : log (-I) = -(π / 2) * I
-- Mathlib/Geometry/RingedSpace/SheafedSpace.lean
@[simp]
theorem id_c_app (X : SheafedSpace C) (U) :
    (𝟙 X : X ⟶ X).c.app U = 𝟙 _
-- Mathlib/Algebra/Order/Sub/Defs.lean
protected theorem eq_tsub_of_add_eq (hc : AddLECancellable c) (h : a + c = b) : a = b - c
-- Mathlib/CategoryTheory/Galois/Decomposition.lean
private lemma has_decomp_connected_components_aux (F : C ⥤ FintypeCat.{w}) [FiberFunctor F]
    (n : ℕ) : ∀ (X : C), n = Nat.card (F.obj X) → ∃ (ι : Type) (f : ι → C)
    (g : (i : ι) → (f i) ⟶ X) (_ : IsColimit (Cofan.mk X g)),
    (∀ i, IsConnected (f i)) ∧ Finite ι
-- Mathlib/GroupTheory/SpecificGroups/Dihedral.lean
theorem one_def : (1 : DihedralGroup n) = r 0
-- Mathlib/Algebra/Polynomial/EraseLead.lean
theorem eraseLead_add_of_natDegree_lt_left {p q : R[X]} (pq : q.natDegree < p.natDegree) :
    (p + q).eraseLead = p.eraseLead + q
-- Mathlib/Logic/Equiv/Set.lean
@[simp 1001]
theorem _root_.Set.mem_image_equiv {α β} {S : Set α} {f : α ≃ β} {x : β} :
    x ∈ f '' S ↔ f.symm x ∈ S
-- Mathlib/Data/Nat/Choose/Central.lean
/-- A crucial lemma to ensure that Catalan numbers can be defined via their explicit formula
  `catalan n = n.centralBinom / (n + 1)`. -/
theorem succ_dvd_centralBinom (n : ℕ) : n + 1 ∣ n.centralBinom
-- Mathlib/LinearAlgebra/Dual.lean
lemma bijective_dual_eval [IsReflexive R M] : Bijective (Dual.eval R M)
-- Mathlib/Order/Interval/Finset/Defs.lean
theorem Ici_ofDual (a : αᵒᵈ) : Ici (ofDual a) = (Iic a).map ofDual.toEmbedding
-- Mathlib/Algebra/Homology/Embedding/Boundary.lean
lemma not_boundaryLE_prev [e.IsRelIff] {i j : ι} (hi : c.Rel i j) :
    ¬ e.BoundaryLE i
-- Mathlib/LinearAlgebra/Determinant.lean
/-- In a finite-dimensional vector space, the zero map has determinant `1` in dimension `0`,
and `0` otherwise. We give a formula that also works in infinite dimension, where we define
the determinant to be `1`. -/
@[simp]
theorem det_zero {𝕜 : Type*} [Field 𝕜] {M : Type*} [AddCommGroup M] [Module 𝕜 M] :
    LinearMap.det (0 : M →ₗ[𝕜] M) = (0 : 𝕜) ^ FiniteDimensional.finrank 𝕜 M
-- Mathlib/Order/Interval/Set/Basic.lean
@[simp]
theorem mem_Iio : x ∈ Iio b ↔ x < b
-- Mathlib/LinearAlgebra/AffineSpace/Ordered.lean
/-- Given `c = lineMap a b r`, `a < c`, the point `(c, f c)` is non-strictly below the
segment `[(a, f a), (b, f b)]` if and only if `slope f a c ≤ slope f a b`. -/
theorem map_le_lineMap_iff_slope_le_slope_left (h : 0 < r * (b - a)) :
    f c ≤ lineMap (f a) (f b) r ↔ slope f a c ≤ slope f a b
-- Mathlib/RingTheory/LocalRing/ResidueField/Basic.lean
@[simp]
theorem residue_smul (g : G) (r : R) : residue R (g • r) = g • residue R r
-- Mathlib/Algebra/Homology/HomotopyCofiber.lean
@[reassoc]
lemma inlX_d' (i j : ι) (hij : c.Rel i j) (hj : ¬ c.Rel j (c.next j)) :
    inlX φ j i hij ≫ d φ i j = φ.f j ≫ inrX φ j
-- Mathlib/AlgebraicGeometry/EllipticCurve/Group.lean
lemma XYIdeal_add_eq (x₁ x₂ y₁ L : R) : XYIdeal W (W.addX x₁ x₂ L) (C <| W.addY x₁ x₂ y₁ L) =
    span {mk W <| W.negPolynomial - C (linePolynomial x₁ y₁ L)} ⊔ XIdeal W (W.addX x₁ x₂ L)
-- Mathlib/Analysis/Convex/Combination.lean
lemma mem_convexHull_pi (h : ∀ i ∈ s, x i ∈ convexHull 𝕜 (t i)) : x ∈ convexHull 𝕜 (s.pi t)
-- Mathlib/Data/Quot.lean
/-- `Quotient.mk'` is a surjective function. -/
theorem surjective_quotient_mk' (α : Sort*) [s : Setoid α] :
    Function.Surjective (Quotient.mk' : α → Quotient s)
-- Mathlib/Topology/PartialHomeomorph.lean
/-- The identity partial equivalence on a set `s` -/
@[simps! (config := mfld_cfg) apply, simps! (config := .lemmasOnly) source target]
def ofSet (s : Set X) (hs : IsOpen s) : PartialHomeomorph X X
-- Mathlib/Data/Matrix/Basic.lean
theorem submatrix_mul_transpose_submatrix [Fintype m] [Fintype n] [AddCommMonoid α] [Mul α]
    (e : m ≃ n) (M : Matrix m n α) : M.submatrix id e * Mᵀ.submatrix e id = M * Mᵀ
-- Mathlib/MeasureTheory/Function/StronglyMeasurable/Basic.lean
theorem tendsto_approxBounded_of_norm_le {β} {f : α → β} [NormedAddCommGroup β] [NormedSpace ℝ β]
    {m : MeasurableSpace α} (hf : StronglyMeasurable[m] f) {c : ℝ} {x : α} (hfx : ‖f x‖ ≤ c) :
    Tendsto (fun n => hf.approxBounded c n x) atTop (𝓝 (f x))
-- Mathlib/Analysis/RCLike/Basic.lean
@[simp, rclike_simps]
theorem normSq_neg (z : K) : normSq (-z) = normSq z
-- Mathlib/Order/Booleanisation.lean
lemma liftLatticeHom_injective : Injective (liftLatticeHom (α := α))
-- Mathlib/Order/WellFoundedSet.lean
protected theorem IsPWO.isWF (h : s.IsPWO) : s.IsWF
-- Mathlib/AlgebraicGeometry/Pullbacks.lean
/--
The composition of the inverse of the isomorphism `pullbackSepcIso R S T` (from the pullback of
`Spec S ⟶ Spec R` and `Spec T ⟶ Spec R` to `Spec (S ⊗[R] T)`) with the second projection is
the morphism `Spec (S ⊗[R] T) ⟶ Spec T` obtained by applying `Spec.map` to the ring morphism
`t ↦ 1 ⊗ₜ[R] t`.
-/
@[reassoc (attr := simp)]
lemma pullbackSpecIso_inv_snd :
    (pullbackSpecIso R S T).inv ≫ pullback.snd _ _ = Spec.map (ofHom (toRingHom includeRight))
-- Mathlib/Algebra/Periodic.lean
theorem Antiperiodic.nat_mul_eq_of_eq_zero [Semiring α] [NegZeroClass β] (h : Antiperiodic f c)
    (hi : f 0 = 0) : ∀ n : ℕ, f (n * c) = 0
-- Mathlib/GroupTheory/FreeGroup/Basic.lean
@[to_additive]
theorem Red.invRev {L₁ L₂ : List (α × Bool)} (h : Red L₁ L₂) : Red (invRev L₁) (invRev L₂)
-- Mathlib/Analysis/NormedSpace/AddTorsor.lean
@[simp]
theorem nndist_left_midpoint (p₁ p₂ : P) :
    nndist p₁ (midpoint 𝕜 p₁ p₂) = ‖(2 : 𝕜)‖₊⁻¹ * nndist p₁ p₂
-- Mathlib/LinearAlgebra/AffineSpace/ContinuousAffineEquiv.lean
@[simp]
theorem refl_trans (e : P₁ ≃ᵃL[k] P₂) : (refl k P₁).trans e = e
-- Mathlib/Data/Matroid/Restrict.lean
theorem Restriction.finiteRk {M : Matroid α} [FiniteRk M] (h : N ≤r M) : N.FiniteRk
-- Mathlib/MeasureTheory/Measure/OpenPos.lean
theorem _root_.IsOpen.ae_eq_empty_iff_eq (hU : IsOpen U) :
    U =ᵐ[μ] (∅ : Set X) ↔ U = ∅
-- Mathlib/RingTheory/Ideal/QuotientOperations.lean
@[simp]
theorem quotientEquiv_symm_mk (I : Ideal R) (J : Ideal S) (f : R ≃+* S)
    (hIJ : J = I.map (f : R →+* S)) (x : S) :
    (quotientEquiv I J f hIJ).symm (Ideal.Quotient.mk J x) = Ideal.Quotient.mk I (f.symm x)
-- Mathlib/Algebra/Group/UniqueProds.lean
@[to_additive]
theorem exists_iff_exists_existsUnique :
    (∃ a0 b0 : G, a0 ∈ A ∧ b0 ∈ B ∧ UniqueMul A B a0 b0) ↔
      ∃ g : G, ∃! ab, ab ∈ A ×ˢ B ∧ ab.1 * ab.2 = g
-- Mathlib/CategoryTheory/Square.lean
@[simps!]
instance category : Category (Square C)
-- Mathlib/Algebra/Tropical/Basic.lean
theorem surjective_trop : Function.Surjective (trop : R → Tropical R)
-- Mathlib/GroupTheory/GroupAction/SubMulAction.lean
@[to_additive (attr := simp, norm_cast)]
protected theorem val_smul (r : R) (x : s) : (↑(r • x) : M) = r • (x : M)
-- Mathlib/LinearAlgebra/Matrix/Determinant/Basic.lean
/-- Laplacian expansion of the determinant of an `n+1 × n+1` matrix along column 0. -/
theorem det_succ_column_zero {n : ℕ} (A : Matrix (Fin n.succ) (Fin n.succ) R) :
    det A = ∑ i : Fin n.succ, (-1) ^ (i : ℕ) * A i 0 * det (A.submatrix i.succAbove Fin.succ)
-- Mathlib/Order/WithBot.lean
@[simp] theorem untop'_eq_self_iff {d : α} {x : WithTop α} : untop' d x = d ↔ x = d ∨ x = ⊤
-- Mathlib/CategoryTheory/MorphismProperty/Limits.lean
theorem StableUnderBaseChange.baseChange_obj [HasPullbacks C] {P : MorphismProperty C}
    (hP : StableUnderBaseChange P) {S S' : C} (f : S' ⟶ S) (X : Over S) (H : P X.hom) :
    P ((Over.pullback f).obj X).hom
-- Mathlib/Dynamics/OmegaLimit.lean
theorem isClosed_omegaLimit : IsClosed (ω f ϕ s)
-- Mathlib/GroupTheory/MonoidLocalization/Basic.lean
@[simp]
theorem AwayMap.lift_comp (hg : IsAddUnit (g x)) : (F.lift x hg).comp F.toMap = g
-- Mathlib/AlgebraicGeometry/EllipticCurve/Jacobian.lean
lemma addX_eq {P Q : Fin 3 → F} (hP : W.Equation P) (hQ : W.Equation Q) (hPz : P z ≠ 0)
    (hQz : Q z ≠ 0) : W.addX P Q =
      ((P y * Q z ^ 3 - Q y * P z ^ 3) ^ 2
        + W.a₁ * (P y * Q z ^ 3 - Q y * P z ^ 3) * P z * Q z * addZ P Q
        - W.a₂ * P z ^ 2 * Q z ^ 2 * addZ P Q ^ 2 - P x * Q z ^ 2 * addZ P Q ^ 2
        - Q x * P z ^ 2 * addZ P Q ^ 2) / (P z * Q z) ^ 2
-- Mathlib/Algebra/Ring/Equiv.lean
@[simp]
theorem coe_toEquiv_symm (e : R ≃+* S) : (e.symm : S ≃ R) = (e : R ≃ S).symm
-- Mathlib/GroupTheory/Perm/Support.lean
theorem card_support_extend_domain (f : α ≃ Subtype p) {g : Perm α} :
    (g.extendDomain f).support.card = g.support.card
-- Mathlib/Algebra/Group/Subgroup/Basic.lean
@[to_additive]
theorem comap_map_eq (H : Subgroup G) : comap f (map f H) = H ⊔ f.ker
-- Mathlib/Analysis/InnerProductSpace/PiL2.lean
@[simp]
theorem WithLp.equiv_symm_single (i : ι) (a : 𝕜) :
    (WithLp.equiv _ _).symm (Pi.single i a) = EuclideanSpace.single i a
-- Mathlib/Analysis/Normed/Group/Basic.lean
@[to_additive (attr := fun_prop) ContinuousAt.nnnorm]
theorem ContinuousAt.nnnorm' {a : α} (h : ContinuousAt f a) : ContinuousAt (fun x => ‖f x‖₊) a
-- Mathlib/AlgebraicGeometry/EllipticCurve/DivisionPolynomial/Basic.lean
@[simp]
lemma φ_zero : W.φ 0 = 1
-- Mathlib/Data/Matroid/Basic.lean
theorem Basis.basis' (hI : M.Basis I X) : M.Basis' I X
-- Mathlib/Data/Set/Function.lean
theorem mapsTo_prod_map_diagonal : MapsTo (Prod.map f f) (diagonal α) (diagonal β)
-- Mathlib/Data/Finset/Sigma.lean
theorem _root_.Set.biInter_finsetSigma (s : Finset ι) (t : ∀ i, Finset (α i))
    (f : Sigma α → Set β) : ⋂ ij ∈ s.sigma t, f ij = ⋂ i ∈ s, ⋂ j ∈ t i, f ⟨i, j⟩
-- Mathlib/RepresentationTheory/Action/Basic.lean
/-- The category of actions of `G` in the category `V`
is equivalent to the functor category `singleObj G ⥤ V`.
-/
@[simps]
def functorCategoryEquivalence : Action V G ≌ SingleObj G ⥤ V
-- Mathlib/Topology/Order/LocalExtr.lean
theorem IsLocalMinOn.isLocalMin (hf : IsLocalMinOn f s a) (hs : s ∈ 𝓝 a) : IsLocalMin f a
-- Mathlib/Geometry/Manifold/MFDeriv/Basic.lean
theorem MDifferentiable.mdifferentiableOn (h : MDifferentiable I I' f) :
    MDifferentiableOn I I' f s
-- Mathlib/Combinatorics/SimpleGraph/Subgraph.lean
theorem _root_.SimpleGraph.toSubgraph.isSpanning (H : SimpleGraph V) (h : H ≤ G) :
    (toSubgraph H h).IsSpanning
-- Mathlib/Data/Set/Countable.lean
/-- Prove `Set.Countable` from a `Countable` instance on the subtype. -/
theorem to_countable (s : Set α) [Countable s] : s.Countable
-- Mathlib/Combinatorics/SimpleGraph/Clique.lean
theorem CliqueFreeOn.anti (hGH : G ≤ H) (hH : H.CliqueFreeOn s n) : G.CliqueFreeOn s n
-- Mathlib/Logic/Equiv/Set.lean
@[simp]
theorem sumCompl_apply_inl {α : Type u} (s : Set α) [DecidablePred (· ∈ s)] (x : s) :
    Equiv.Set.sumCompl s (Sum.inl x) = x
-- Mathlib/Data/PEquiv.lean
theorem symm_injective : Function.Injective (@PEquiv.symm α β)
-- Mathlib/Order/PFilter.lean
@[simp]
theorem principal_le_iff {F : PFilter P} : principal x ≤ F ↔ x ∈ F
-- Mathlib/AlgebraicGeometry/EllipticCurve/Affine.lean
lemma map_slope {F : Type u} [Field F] (W : Affine F) {K : Type v} [Field K] (f : F →+* K)
    (x₁ x₂ y₁ y₂ : F) : (W.map f).toAffine.slope (f x₁) (f x₂) (f y₁) (f y₂) =
      f (W.slope x₁ x₂ y₁ y₂)
-- Mathlib/Data/Finset/Basic.lean
@[simp]
theorem not_nontrivial_singleton : ¬ ({a} : Finset α).Nontrivial
-- Mathlib/CategoryTheory/Limits/Shapes/Multiequalizer.lean
@[reassoc (attr := simp)]
theorem condition (a) : I.fst a ≫ K.π (I.fstFrom a) = I.snd a ≫ K.π (I.sndFrom a)
-- Mathlib/SetTheory/Ordinal/Basic.lean
theorem lift.principalSeg_top' : lift.principalSeg.{u, u + 1}.top = @type Ordinal (· < ·) _
-- Mathlib/Topology/Order/Hom/Basic.lean
@[ext]
theorem ext {f g : α →Co β} (h : ∀ a, f a = g a) : f = g
-- Mathlib/Data/List/Nodup.lean
theorem Nodup.map_update [DecidableEq α] {l : List α} (hl : l.Nodup) (f : α → β) (x : α) (y : β) :
    l.map (Function.update f x y) =
      if x ∈ l then (l.map f).set (l.indexOf x) y else l.map f
-- Mathlib/Data/Multiset/Sum.lean
@[simp]
theorem disjSum_zero : s.disjSum (0 : Multiset β) = s.map inl
-- Mathlib/LinearAlgebra/Prod.lean
@[simp]
theorem coe_inr : (inr R M M₂ : M₂ → M × M₂) = Prod.mk 0
-- Mathlib/Data/Set/Lattice.lean
theorem pi_diff_pi_subset (i : Set α) (s t : ∀ a, Set (π a)) :
    pi i s \ pi i t ⊆ ⋃ a ∈ i, eval a ⁻¹' (s a \ t a)
-- Mathlib/Analysis/Normed/Group/Uniform.lean
@[to_additive (attr := simp)]
theorem dist_div_eq_dist_mul_left (a b c : E) : dist (a / b) c = dist a (c * b)
-- Mathlib/Order/Atoms.lean
theorem covBy_iff_atom_Ici (h : a ≤ b) : a ⋖ b ↔ IsAtom (⟨b, h⟩ : Set.Ici a)
-- Mathlib/MeasureTheory/Integral/IntervalIntegral.lean
/-- A continuous function on `ℝ` is `IntervalIntegrable` with respect to any locally finite measure
`ν` on ℝ. -/
theorem Continuous.intervalIntegrable {u : ℝ → E} (hu : Continuous u) (a b : ℝ) :
    IntervalIntegrable u μ a b
-- Mathlib/RingTheory/NonUnitalSubsemiring/Basic.lean
theorem mem_map_equiv {f : R ≃+* S} {K : NonUnitalSubsemiring R} {x : S} :
    x ∈ K.map (f : R →ₙ+* S) ↔ f.symm x ∈ K
-- Mathlib/LinearAlgebra/QuadraticForm/QuadraticModuleCat/Monoidal.lean
theorem forget₂_map_associator_inv (X Y Z : QuadraticModuleCat.{u} R) :
    (forget₂ (QuadraticModuleCat R) (ModuleCat R)).map (α_ X Y Z).inv =
      (α_ X.toModuleCat Y.toModuleCat Z.toModuleCat).inv
-- Mathlib/Analysis/Convex/Combination.lean
theorem Finset.centerMass_ite_eq (hi : i ∈ t) :
    t.centerMass (fun j => if i = j then (1 : R) else 0) z = z i
-- Mathlib/LinearAlgebra/Multilinear/Basic.lean
/-- Additivity of a multilinear map along all coordinates at the same time,
writing `f (m + m')` as the sum of `f (s.piecewise m m')` over all sets `s`. -/
theorem map_add_univ [DecidableEq ι] [Fintype ι] (m m' : ∀ i, M₁ i) :
    f (m + m') = ∑ s : Finset ι, f (s.piecewise m m')
-- Mathlib/Topology/Connected/Basic.lean
theorem isConnected_univ [ConnectedSpace α] : IsConnected (univ : Set α)
-- Mathlib/Algebra/Group/Basic.lean
@[to_additive]
theorem div_mul_eq_div_div : a / (b * c) = a / b / c
-- Mathlib/Combinatorics/SimpleGraph/Turan.lean
/-- For `0 < r`, `turanGraph n r` is Turán-maximal. -/
theorem isTuranMaximal_turanGraph (hr : 0 < r) : (turanGraph n r).IsTuranMaximal r
-- Mathlib/RingTheory/Nilpotent/Basic.lean
theorem add_pow_eq_zero_of_add_le_succ_of_pow_eq_zero (h_comm : Commute x y) {m n k : ℕ}
    (hx : x ^ m = 0) (hy : y ^ n = 0) (h : m + n ≤ k + 1) :
    (x + y) ^ k = 0
-- Mathlib/Data/Set/Subset.lean
@[simp]
lemma image_val_union_self_left_eq : ↑D ∪ A = A
-- Mathlib/Algebra/Group/Subsemigroup/Operations.lean
/-- The `MulHom` from the preimage of a subsemigroup to itself. -/
@[to_additive (attr := simps)
  "The `AddHom` from the preimage of an additive subsemigroup to itself."]
def subsemigroupComap (f : M →ₙ* N) (N' : Subsemigroup N) :
    N'.comap f →ₙ* N'
-- .lake/packages/batteries/Batteries/Data/RBMap/Alter.lean
theorem zoom_fill (H : zoom cut t path = (t', path')) : path.fill t = path'.fill t'
-- .lake/packages/batteries/Batteries/Data/String/Lemmas.lean
theorem utf8GetAux_addChar_right_cancel (s : List Char) (i p : Pos) (c : Char) :
    utf8GetAux s (i + c) (p + c) = utf8GetAux s i p
-- Mathlib/AlgebraicTopology/SplitSimplicialObject.lean
/-- A simplicial object that is isomorphic to a split simplicial object is split. -/
@[simps]
def ofIso (e : X ≅ Y) : Splitting Y
-- Mathlib/SetTheory/Ordinal/Arithmetic.lean
@[simp]
theorem zero_mod (b : Ordinal) : 0 % b = 0
-- Mathlib/Probability/Integration.lean
/-- The (Bochner) integral of the product of two independent, nonnegative random
  variables is the product of their integrals. The proof is just plumbing around
  `lintegral_mul_eq_lintegral_mul_lintegral_of_indepFun'`. -/
theorem IndepFun.integral_mul_of_nonneg (hXY : IndepFun X Y μ) (hXp : 0 ≤ X) (hYp : 0 ≤ Y)
    (hXm : AEMeasurable X μ) (hYm : AEMeasurable Y μ) :
    integral μ (X * Y) = integral μ X * integral μ Y
-- Mathlib/Algebra/Order/Monoid/Unbundled/Basic.lean
@[to_additive]
theorem mul_lt_mul_of_le_of_lt [CovariantClass α α (· * ·) (· < ·)]
    [CovariantClass α α (swap (· * ·)) (· ≤ ·)] {a b c d : α} (h₁ : a ≤ b) (h₂ : c < d) :
    a * c < b * d
-- Mathlib/MeasureTheory/Constructions/BorelSpace/Basic.lean
/-- Given a measurable embedding to a Borel space which is also a topological embedding, then the
source space is also a Borel space. -/
lemma MeasurableEmbedding.borelSpace {α β : Type*} [MeasurableSpace α] [TopologicalSpace α]
    [MeasurableSpace β] [TopologicalSpace β] [hβ : BorelSpace β] {e : α → β}
    (h'e : MeasurableEmbedding e) (h''e : Inducing e) :
    BorelSpace α
-- Mathlib/Algebra/Group/Opposite.lean
/-- A monoid is isomorphic to the opposite of its opposite. -/
@[to_additive (attr := simps!)
      "A additive monoid is isomorphic to the opposite of its opposite."]
def MulEquiv.opOp (M : Type*) [Mul M] : M ≃* Mᵐᵒᵖᵐᵒᵖ
-- Mathlib/Probability/Moments.lean
/-- **Chernoff bound** on the upper tail of a real random variable. -/
theorem measure_ge_le_exp_cgf [IsFiniteMeasure μ] (ε : ℝ) (ht : 0 ≤ t)
    (h_int : Integrable (fun ω => exp (t * X ω)) μ) :
    (μ {ω | ε ≤ X ω}).toReal ≤ exp (-t * ε + cgf X μ t)
-- Mathlib/Analysis/SpecialFunctions/Trigonometric/Inverse.lean
theorem arcsin_eq_pi_div_two_sub_arccos (x : ℝ) : arcsin x = π / 2 - arccos x
-- Mathlib/FieldTheory/Finite/Basic.lean
theorem card_cast_subgroup_card_ne_zero [Ring K] [NoZeroDivisors K] [Nontrivial K]
    (G : Subgroup Kˣ) [Fintype G] : (Fintype.card G : K) ≠ 0
-- Mathlib/Computability/ContextFreeGrammar.lean
/-- Rule `r` rewrites string `u` is to string `v` iff they share both a prefix `p` and postfix `q`
such that the remaining middle part of `u` is the input of `r` and the remaining middle part
of `u` is the output of `r`. -/
theorem rewrites_iff {r : ContextFreeRule T N} (u v : List (Symbol T N)) :
    r.Rewrites u v ↔ ∃ p q : List (Symbol T N),
      u = p ++ [Symbol.nonterminal r.input] ++ q ∧ v = p ++ r.output ++ q
-- .lake/packages/lean4/src/lean/Init/Data/String/Basic.lean
@[simp] theorem data_singleton (c : Char) : (singleton c).data = [c]
-- Mathlib/RingTheory/LocalProperties.lean
theorem localizationPreserves_surjective :
    RingHom.LocalizationPreserves fun {R S} _ _ f => Function.Surjective f
-- Mathlib/CategoryTheory/Monoidal/Free/Basic.lean
@[simp]
theorem mk_ρ_inv {X : F C} : ⟦Hom.ρ_inv X⟧ = (ρ_ X).inv
-- Mathlib/CategoryTheory/Monoidal/Mon_.lean
@[simp] theorem forgetMonoidal_toFunctor : (forgetMonoidal C).toFunctor = forget C
-- Mathlib/Algebra/Order/Module/Defs.lean
lemma smul_nonpos_of_nonpos_of_nonneg [SMulPosMono α β] (ha : a ≤ 0) (hb : 0 ≤ b) : a • b ≤ 0
-- Mathlib/Data/Sym/Basic.lean
theorem count_coe_fill_of_ne [DecidableEq α] {a x : α} {i : Fin (n + 1)} {s : Sym α (n - i)}
    (hx : x ≠ a) :
    count x (fill a i s : Multiset α) = count x s
-- Mathlib/AlgebraicGeometry/GammaSpecAdjunction.lean
/-- The canonical morphism from `X` to the spectrum of its global sections. -/
@[simps! val_base]
def toΓSpec : X ⟶ Spec.locallyRingedSpaceObj (Γ.obj (op X))
-- Mathlib/Data/List/Cycle.lean
@[simp]
theorem mem_map {β : Type*} {f : α → β} {b : β} {s : Cycle α} :
    b ∈ s.map f ↔ ∃ a, a ∈ s ∧ f a = b
-- Mathlib/Data/Nat/Dist.lean
theorem dist_tri_right (n m : ℕ) : m ≤ n + dist n m
-- Mathlib/Data/Finset/Basic.lean
theorem insert_idem (a : α) (s : Finset α) : insert a (insert a s) = insert a s
-- Mathlib/MeasureTheory/Function/LpSpace.lean
theorem toLp_add {f g : α → E} (hf : Memℒp f p μ) (hg : Memℒp g p μ) :
    (hf.add hg).toLp (f + g) = hf.toLp f + hg.toLp g
-- Mathlib/Order/Max.lean
theorem isMin_iff_forall_not_lt : IsMin a ↔ ∀ b, ¬b < a
-- Mathlib/Topology/FiberBundle/Trivialization.lean
@[simp, mfld_simps]
theorem coe_coe : ⇑e.toPartialHomeomorph = e
-- Mathlib/Algebra/Group/Basic.lean
@[to_additive]
theorem eq_mul_of_div_eq (h : a / c = b) : a = b * c
-- Mathlib/Data/Matroid/Constructions.lean
@[simp] theorem uniqueBaseOn_dual_eq (I E : Set α) :
    (uniqueBaseOn I E)✶ = uniqueBaseOn (E \ I) E
-- Mathlib/MeasureTheory/Function/L1Space.lean
theorem hasFiniteIntegral_smul_iff [NormedRing 𝕜] [MulActionWithZero 𝕜 β] [BoundedSMul 𝕜 β] {c : 𝕜}
    (hc : IsUnit c) (f : α → β) : HasFiniteIntegral (c • f) μ ↔ HasFiniteIntegral f μ
-- Mathlib/MeasureTheory/Integral/IntegrableOn.lean
/-- A function which is continuous on a compact set `s` is almost everywhere strongly measurable
with respect to `μ.restrict s`. -/
theorem ContinuousOn.aestronglyMeasurable_of_isCompact [TopologicalSpace α] [OpensMeasurableSpace α]
    [TopologicalSpace β] [PseudoMetrizableSpace β] {f : α → β} {s : Set α} {μ : Measure α}
    (hf : ContinuousOn f s) (hs : IsCompact s) (h's : MeasurableSet s) :
    AEStronglyMeasurable f (μ.restrict s)
-- Mathlib/MeasureTheory/Group/Measure.lean
@[to_additive (attr := simp)]
theorem measure_preimage_mul_right (μ : Measure G) [IsMulRightInvariant μ] (g : G) (A : Set G) :
    μ ((fun h => h * g) ⁻¹' A) = μ A
-- Mathlib/Computability/ContextFreeGrammar.lean
lemma Derives.eq_or_head {u w : List (Symbol T g.NT)} (huw : g.Derives u w) :
    u = w ∨ ∃ v : List (Symbol T g.NT), g.Produces u v ∧ g.Derives v w
-- Mathlib/Algebra/Order/Rearrangement.lean
/-- **Equality case of the Rearrangement Inequality**: Pointwise multiplication of `f` and `g`,
which antivary together, is unchanged by a permutation if and only if `f` and `g ∘ σ` antivary
together. Stated by permuting the entries of `g`. -/
theorem AntivaryOn.sum_mul_eq_sum_mul_comp_perm_iff (hfg : AntivaryOn f g s)
    (hσ : {x | σ x ≠ x} ⊆ s) :
    ∑ i ∈ s, f i * g (σ i) = ∑ i ∈ s, f i * g i ↔ AntivaryOn f (g ∘ σ) s
-- Mathlib/Topology/Category/Profinite/Nobeling.lean
theorem range_equiv_smaller_toFun_bijective (o : Ordinal) :
    Function.Bijective (range_equiv_smaller_toFun C o)
-- Mathlib/Data/Set/Pointwise/Basic.lean
@[to_additive (attr := simp)]
theorem coe_singletonMonoidHom : (singletonMonoidHom : α → Set α) = singleton
-- Mathlib/Algebra/Homology/SingleHomology.lean
@[reassoc]
lemma singleObjOpcyclesSelfIso_hom :
    (singleObjOpcyclesSelfIso c j A).hom =
      (singleObjXSelf c j A).inv ≫ ((single C c j).obj A).pOpcycles j
-- Mathlib/Data/Set/Image.lean
@[simp]
theorem preimage_range (f : α → β) : f ⁻¹' range f = univ
-- Mathlib/MeasureTheory/Measure/VectorMeasure.lean
@[simp]
theorem restrict_univ : v.restrict Set.univ = v