ruc-ai4math/mathlib_handler_benchmark_410 huggingface dataset:
-- .lake/packages/lean4/src/lean/Init/Data/BitVec/Lemmas.lean
@[simp] theorem toNat_xor (x y : BitVec v) :
    BitVec.toNat (x ^^^ y) = BitVec.toNat x ^^^ BitVec.toNat y
-- Mathlib/Algebra/Polynomial/Smeval.lean
theorem smeval_commute_left (hc : Commute x y) : Commute (p.smeval x) y
-- Mathlib/MeasureTheory/Function/StronglyMeasurable/Basic.lean
theorem _root_.stronglyMeasurable_of_restrict_of_restrict_compl {_ : MeasurableSpace α}
    [TopologicalSpace β] {f : α → β} {s : Set α} (hs : MeasurableSet s)
    (h₁ : StronglyMeasurable (s.restrict f)) (h₂ : StronglyMeasurable (sᶜ.restrict f)) :
    StronglyMeasurable f
-- Mathlib/Probability/CondCount.lean
theorem condCount_inter (hs : s.Finite) :
    condCount s (t ∩ u) = condCount (s ∩ t) u * condCount s t
-- Mathlib/Topology/Order/IntermediateValue.lean
theorem isPreconnected_Ioc : IsPreconnected (Ioc a b)
-- Mathlib/RingTheory/Regular/RegularSequence.lean
@[simp] lemma nil : IsWeaklyRegular M ([] : List R)
-- Mathlib/Algebra/Module/LinearMap/Defs.lean
@[simp]
theorem comp_zero (g : M₂ →ₛₗ[σ₂₃] M₃) : (g.comp (0 : M →ₛₗ[σ₁₂] M₂) : M →ₛₗ[σ₁₃] M₃) = 0
-- Mathlib/LinearAlgebra/Matrix/PosDef.lean
theorem transpose {M : Matrix n n R} (hM : M.PosSemidef) : Mᵀ.PosSemidef
-- Mathlib/Algebra/Order/GroupWithZero/Unbundled.lean
theorem le_mul_of_one_le_left [MulPosMono α] (hb : 0 ≤ b) (h : 1 ≤ a) : b ≤ a * b
-- Mathlib/MeasureTheory/Measure/EverywherePos.lean
/-- If a compact closed set is everywhere positive with respect to a left-invariant measure on a
topological group, then it is a Gδ set. This is nontrivial, as there is no second-countability or
metrizability assumption in the statement, so a general compact closed set has no reason to be
a countable intersection of open sets. -/
@[to_additive]
lemma IsEverywherePos.IsGdelta_of_isMulLeftInvariant
    {k : Set G} (h : μ.IsEverywherePos k) (hk : IsCompact k) (h'k : IsClosed k) :
    IsGδ k
-- .lake/packages/lean4/src/lean/Init/Data/Nat/Bitwise/Lemmas.lean
private theorem testBit_succ_zero : testBit (x + 1) 0 = not (testBit x 0)
-- Mathlib/CategoryTheory/Sites/Plus.lean
/-- A natural transformation `P ⟶ Q` induces a natural transformation
between diagrams whose colimits define the values of `plus`. -/
@[simps]
def diagramNatTrans {P Q : Cᵒᵖ ⥤ D} (η : P ⟶ Q) (X : C) : J.diagram P X ⟶ J.diagram Q X
-- Mathlib/Topology/Instances/ENNReal.lean
theorem biSup_add {ι} {s : Set ι} (hs : s.Nonempty) {f : ι → ℝ≥0∞} :
    (⨆ i ∈ s, f i) + a = ⨆ i ∈ s, f i + a
-- Mathlib/Topology/Algebra/Algebra.lean
@[simp]
theorem toAlgHom_eq_coe (f : A →A[R] B) : f.toAlgHom = f
-- Mathlib/GroupTheory/GroupAction/Hom.lean
protected theorem map_smul (f : X →[M'] Y) (m : M') (x : X) : f (m • x) = m • f x
-- Mathlib/LinearAlgebra/Matrix/Charpoly/Basic.lean
lemma charmatrix_fromBlocks :
    charmatrix (fromBlocks M₁₁ M₁₂ M₂₁ M₂₂) =
      fromBlocks (charmatrix M₁₁) (- M₁₂.map C) (- M₂₁.map C) (charmatrix M₂₂)
-- Mathlib/MeasureTheory/Integral/CircleIntegral.lean
theorem hasDerivAt_circleMap (c : ℂ) (R : ℝ) (θ : ℝ) :
    HasDerivAt (circleMap c R) (circleMap 0 R θ * I) θ
-- Mathlib/Analysis/Normed/Group/Quotient.lean
theorem Ideal.Quotient.norm_mk_le (r : R) : ‖Ideal.Quotient.mk I r‖ ≤ ‖r‖
-- Mathlib/Algebra/Star/StarAlgHom.lean
@[simp]
theorem coe_refl : ⇑(refl : A ≃⋆ₐ[R] A) = id
-- Mathlib/Data/Finsupp/Antidiagonal.lean
@[simp]
theorem antidiagonal_single (a : α) (n : ℕ) :
    antidiagonal (single a n) = (antidiagonal n).map
      (Function.Embedding.prodMap ⟨_, single_injective a⟩ ⟨_, single_injective a⟩)
-- Mathlib/Geometry/Manifold/ContMDiff/NormedSpace.lean
theorem contMDiffAt_iff_contDiffAt {f : E → E'} {x : E} :
    ContMDiffAt 𝓘(𝕜, E) 𝓘(𝕜, E') n f x ↔ ContDiffAt 𝕜 n f x
-- Mathlib/Topology/UniformSpace/Basic.lean
theorem nhds_eq_comap_uniformity' {x : α} : 𝓝 x = (𝓤 α).comap fun y => (y, x)
-- Mathlib/Topology/Separation/NotNormal.lean
/-- Let `s` be a closed set in a separable space. If the induced topology on `s` is discrete and `s`
has cardinality at least continuum, then the ambient space is not a normal space. -/
theorem IsClosed.not_normal_of_continuum_le_mk {s : Set X} (hs : IsClosed s) [DiscreteTopology s]
    (hmk : 𝔠 ≤ #s) : ¬NormalSpace X
-- Mathlib/Data/Multiset/Nodup.lean
@[simp]
theorem nodup_union [DecidableEq α] {s t : Multiset α} : Nodup (s ∪ t) ↔ Nodup s ∧ Nodup t
-- Mathlib/ModelTheory/Fraisse.lean
theorem age.nonempty : (L.age M).Nonempty
-- Mathlib/CategoryTheory/Sites/EqualizerSheafCondition.lean
theorem w : forkMap P (S : Presieve X) ≫ firstMap P S = forkMap P S ≫ secondMap P S
-- Mathlib/Data/Finsupp/Multiset.lean
theorem toMultiset_sum {f : ι → α →₀ ℕ} (s : Finset ι) :
    Finsupp.toMultiset (∑ i ∈ s, f i) = ∑ i ∈ s, Finsupp.toMultiset (f i)
-- Mathlib/Logic/Function/Basic.lean
protected theorem Surjective.right_cancellable (hf : Surjective f) {g₁ g₂ : β → γ} :
    g₁ ∘ f = g₂ ∘ f ↔ g₁ = g₂
-- Mathlib/Algebra/Homology/HomotopyCategory/HomComplexShift.lean
@[simp]
lemma leftUnshift_add {n' a : ℤ} (γ₁ γ₂ : Cochain (K⟦a⟧) L n') (n : ℤ) (hn : n + a = n') :
    (γ₁ + γ₂).leftUnshift n hn = γ₁.leftUnshift n hn + γ₂.leftUnshift n hn
-- Mathlib/Data/PNat/Xgcd.lean
theorem flip_isReduced : (flip u).IsReduced ↔ u.IsReduced
-- Mathlib/Data/Matrix/Block.lean
theorem blockDiagonal_apply (M : o → Matrix m n α) (ik jk) :
    blockDiagonal M ik jk = if ik.2 = jk.2 then M ik.2 ik.1 jk.1 else 0
-- Mathlib/Algebra/Homology/ShortComplex/Preadditive.lean
@[simp]
lemma leftHomologyMap_sub : leftHomologyMap (φ - φ') = leftHomologyMap φ - leftHomologyMap φ'
-- Mathlib/Topology/OmegaCompletePartialOrder.lean
theorem isωSup_iff_isLUB {α : Type u} [Preorder α] {c : Chain α} {x : α} :
    IsωSup c x ↔ IsLUB (range c) x
-- Mathlib/RingTheory/Polynomial/Bernstein.lean
theorem derivative_zero (n : ℕ) :
    Polynomial.derivative (bernsteinPolynomial R n 0) = -n * bernsteinPolynomial R (n - 1) 0
-- Mathlib/Topology/Instances/Rat.lean
@[norm_cast, simp]
theorem dist_cast (x y : ℚ) : dist (x : ℝ) y = dist x y
-- Mathlib/Init/Order/LinearOrder.lean
theorem max_assoc (a b c : α) : max (max a b) c = max a (max b c)
-- Mathlib/Analysis/Calculus/Deriv/Polynomial.lean
protected theorem hasFDerivWithinAt_aeval (x : 𝕜) :
    HasFDerivWithinAt (fun x => aeval x q) (smulRight (1 : 𝕜 →L[𝕜] 𝕜)
      (aeval x (derivative q))) s x
-- Mathlib/Algebra/DirectSum/Module.lean
@[simp]
theorem IsInternal.ofBijective_coeLinearMap_of_ne (h : IsInternal A)
    {i j : ι} (hij : i ≠ j) (x : A i) :
    (LinearEquiv.ofBijective (coeLinearMap A) h).symm x j = 0
-- Mathlib/Data/Finsupp/Defs.lean
lemma _root_.AddEquiv.finsuppUnique_symm {M : Type*} [AddZeroClass M] (d : M) :
    AddEquiv.finsuppUnique.symm d = single () d
-- Mathlib/Topology/ContinuousFunction/Bounded.lean
@[simp, norm_cast]
theorem coe_natCast (n : ℕ) : ((n : α →ᵇ R) : α → R) = n
-- Mathlib/Topology/Instances/ENNReal.lean
theorem isOpen_ne_top : IsOpen { a : ℝ≥0∞ | a ≠ ∞ }
-- Mathlib/Topology/Algebra/ContinuousMonoidHom.lean
@[to_additive]
theorem continuous_comp_left (f : ContinuousMonoidHom A B) :
    Continuous fun g : ContinuousMonoidHom B C => g.comp f
-- Mathlib/Order/Filter/Pointwise.lean
@[to_additive (attr := simp)]
theorem one_prod_one [One β] : (1 : Filter α) ×ˢ (1 : Filter β) = 1
-- Mathlib/Algebra/MvPolynomial/Degrees.lean
theorem degrees_monomial_eq (s : σ →₀ ℕ) (a : R) (ha : a ≠ 0) :
    degrees (monomial s a) = toMultiset s
-- Mathlib/MeasureTheory/Constructions/Prod/Basic.lean
theorem prod_apply {s : Set (α × β)} (hs : MeasurableSet s) :
    μ.prod ν s = ∫⁻ x, ν (Prod.mk x ⁻¹' s) ∂μ
-- .lake/packages/lean4/src/lean/Init/Data/Fin/Lemmas.lean
theorem pos_iff_nonempty {n : Nat} : 0 < n ↔ Nonempty (Fin n)
-- Mathlib/MeasureTheory/Measure/MeasureSpace.lean
theorem NullMeasurableSet.image {β} [MeasurableSpace α] {mβ : MeasurableSpace β} (f : α → β)
    (μ : Measure β) (hfi : Injective f) (hf : ∀ s, MeasurableSet s → NullMeasurableSet (f '' s) μ)
    {s : Set α} (hs : NullMeasurableSet s (μ.comap f)) : NullMeasurableSet (f '' s) μ
-- Mathlib/Logic/Relation.lean
@[simp] lemma transGen_reflGen : TransGen (ReflGen r) = ReflTransGen r
-- Mathlib/Analysis/Normed/Group/Pointwise.lean
@[to_additive]
theorem ball_div_one : ball 1 δ / s = thickening δ s⁻¹
-- Mathlib/Algebra/Order/Field/Basic.lean
theorem inv_pos_lt_iff_one_lt_mul (ha : 0 < a) : a⁻¹ < b ↔ 1 < b * a
-- Mathlib/CategoryTheory/Limits/Shapes/Images.lean
theorem epi_of_epi_image {X Y : C} (f : X ⟶ Y) [HasImage f] [Epi (image.ι f)]
    [Epi (factorThruImage f)] : Epi f
-- Mathlib/LinearAlgebra/DFinsupp.lean
/-- The bounded supremum of a family of commutative additive submonoids is equal to the range of
`DFinsupp.sumAddHom` composed with `DFinsupp.filter_add_monoid_hom`; that is, every element in the
bounded `iSup` can be produced from taking a finite number of non-zero elements from the `S i` that
satisfy `p i`, coercing them to `γ`, and summing them. -/
theorem biSup_eq_range_dfinsupp_lsum (p : ι → Prop) [DecidablePred p] (S : ι → Submodule R N) :
    ⨆ (i) (_ : p i), S i =
      LinearMap.range
        (LinearMap.comp
          (DFinsupp.lsum ℕ (M := fun i ↦ ↥(S i)) (fun i => (S i).subtype))
            (DFinsupp.filterLinearMap R _ p))
-- Mathlib/AlgebraicGeometry/EllipticCurve/Affine.lean
lemma polynomial_ne_zero [Nontrivial R] : W.polynomial ≠ 0
-- Mathlib/GroupTheory/Index.lean
@[to_additive (attr := simp)]
theorem relindex_self : H.relindex H = 1
-- Mathlib/GroupTheory/HNNExtension.lean
/-- The `NormalWord` representing an element `g` of the group `G`, which is just the element `g`
itself. -/
@[simps]
def ofGroup (g : G) : NormalWord d
-- Mathlib/Order/Compare.lean
theorem orElse_eq_lt (o₁ o₂) : orElse o₁ o₂ = lt ↔ o₁ = lt ∨ o₁ = eq ∧ o₂ = lt
-- Mathlib/CategoryTheory/Closed/Monoidal.lean
@[reassoc (attr := simp)]
theorem coev_app_comp_pre_app (f : B ⟶ A) :
    (ihom.coev A).app X ≫ (pre f).app (A ⊗ X) = (ihom.coev B).app X ≫ (ihom B).map (f ▷ _)
-- Mathlib/Geometry/Manifold/Sheaf/LocallyRingedSpace.lean
/-- The non-units of the stalk at `x` of the sheaf of smooth functions from `M` to `𝕜`, considered
as a sheaf of commutative rings, are the functions whose values at `x` are zero. -/
theorem smoothSheafCommRing.nonunits_stalk (x : M) :
    nonunits ((smoothSheafCommRing IM 𝓘(𝕜) M 𝕜).presheaf.stalk x)
    = RingHom.ker (smoothSheafCommRing.eval IM 𝓘(𝕜) M 𝕜 x)
-- Mathlib/MeasureTheory/Measure/MeasureSpaceDef.lean
theorem nonempty_of_measure_ne_zero (h : μ s ≠ 0) : s.Nonempty
-- Mathlib/Analysis/Normed/Group/Pointwise.lean
@[to_additive (attr := simp 1100)]
theorem smul_closedBall_one : x • closedBall (1 : E) δ = closedBall x δ
-- Mathlib/Algebra/CharP/Reduced.lean
/-- If `ringChar R = 2`, where `R` is a finite reduced commutative ring,
then every `a : R` is a square. -/
theorem isSquare_of_charTwo' {R : Type*} [Finite R] [CommRing R] [IsReduced R] [CharP R 2]
    (a : R) : IsSquare a
-- Mathlib/Data/Set/Pointwise/SMul.lean
@[to_additive]
theorem mem_inv_smul_set_iff : x ∈ a⁻¹ • A ↔ a • x ∈ A
-- Mathlib/Data/Fintype/Card.lean
theorem card_of_bijective {f : α → β} (hf : Bijective f) : card α = card β
-- Mathlib/Data/Matrix/Basic.lean
theorem mulVec_transpose [Fintype m] (A : Matrix m n α) (x : m → α) : Aᵀ *ᵥ x = x ᵥ* A
-- Mathlib/RingTheory/Polynomial/Chebyshev.lean
theorem U_two : U R 2 = 4 * X ^ 2 - 1
-- Mathlib/Order/Monotone/Basic.lean
theorem StrictMono.isMax_of_apply (hf : StrictMono f) (ha : IsMax (f a)) : IsMax a
-- Mathlib/Analysis/Fourier/FourierTransform.lean
/-- The Fourier integral converts right-translation into scalar multiplication by a phase factor. -/
theorem fourierIntegral_comp_add_right [MeasurableAdd V] (e : AddChar 𝕜 𝕊) (μ : Measure V)
    [μ.IsAddRightInvariant] (L : V →ₗ[𝕜] W →ₗ[𝕜] 𝕜) (f : V → E) (v₀ : V) :
    fourierIntegral e μ L (f ∘ fun v ↦ v + v₀) =
      fun w ↦ e (L v₀ w) • fourierIntegral e μ L f w
-- Mathlib/FieldTheory/IntermediateField.lean
@[norm_cast] --Porting note (#10618): `simp` can prove it
theorem coe_prod {ι : Type*} [Fintype ι] (f : ι → S) : (↑(∏ i, f i) : L) = ∏ i, (f i : L)
-- Mathlib/Data/Option/Basic.lean
theorem exists_ne_none {p : Option α → Prop} : (∃ x ≠ none, p x) ↔ (∃ x : α, p x)
-- Mathlib/Combinatorics/SimpleGraph/Basic.lean
@[simp]
theorem fromEdgeSet_univ : fromEdgeSet (Set.univ : Set (Sym2 V)) = ⊤
-- Mathlib/Topology/Compactness/Lindelof.lean
protected theorem ClosedEmbedding.nonLindelofSpace [NonLindelofSpace X] {f : X → Y}
    (hf : ClosedEmbedding f) : NonLindelofSpace Y
-- Mathlib/Topology/Order/Hom/Esakia.lean
@[simp]
theorem coe_copy (f : PseudoEpimorphism α β) (f' : α → β) (h : f' = f) : ⇑(f.copy f' h) = f'
-- Mathlib/Data/Rat/Lemmas.lean
@[simp]
theorem pnatDen_one : (1 : ℚ).pnatDen = 1
-- .lake/packages/lean4/src/lean/Init/Data/BitVec/Lemmas.lean
@[simp] theorem lt_ofFin (x : BitVec n) (y : Fin (2^n)) :
  x < BitVec.ofFin y ↔ x.toFin < y
-- Mathlib/Algebra/Category/ModuleCat/Monoidal/Basic.lean
theorem leftUnitor_naturality {M N : ModuleCat R} (f : M ⟶ N) :
    tensorHom (𝟙 (ModuleCat.of R R)) f ≫ (leftUnitor N).hom = (leftUnitor M).hom ≫ f
-- Mathlib/Data/Multiset/Basic.lean
theorem map_erase [DecidableEq α] [DecidableEq β] (f : α → β) (hf : Function.Injective f) (x : α)
    (s : Multiset α) : (s.erase x).map f = (s.map f).erase (f x)
-- Mathlib/MeasureTheory/Integral/IntegrableOn.lean
theorem integrableOn_Icc_iff_integrableOn_Ioc :
    IntegrableOn f (Icc a b) μ ↔ IntegrableOn f (Ioc a b) μ
-- Mathlib/FieldTheory/Minpoly/MinpolyDiv.lean
lemma natDegree_minpolyDiv :
    natDegree (minpolyDiv R x) = natDegree (minpoly R x) - 1
-- Mathlib/LinearAlgebra/AffineSpace/ContinuousAffineEquiv.lean
protected theorem image_eq_preimage (e : P₁ ≃ᵃL[k] P₂) (s : Set P₁) : e '' s = e.symm ⁻¹' s
-- Mathlib/GroupTheory/FreeAbelianGroupFinsupp.lean
theorem not_mem_support_iff (x : X) (a : FreeAbelianGroup X) : x ∉ a.support ↔ coeff x a = 0
-- Mathlib/Algebra/Group/Hom/Defs.lean
@[to_additive (attr := simp)]
theorem MulHom.coe_copy {_ : Mul M} {_ : Mul N} (f : M →ₙ* N) (f' : M → N) (h : f' = f) :
    (f.copy f' h) = f'
-- Mathlib/Data/Nat/Prime/Basic.lean
theorem exists_mul_pow_lt_factorial (a : ℕ) (c : ℕ) : ∃ n0, ∀ n ≥ n0, a * c ^ n < (n - 1)!
-- Mathlib/NumberTheory/ClassNumber/AdmissibleCardPowDegree.lean
/-- If `A` is a family of enough low-degree polynomials over a finite semiring, there is a
pair of equal elements in `A`. -/
theorem exists_eq_polynomial [Semiring Fq] {d : ℕ} {m : ℕ} (hm : Fintype.card Fq ^ d ≤ m)
    (b : Fq[X]) (hb : natDegree b ≤ d) (A : Fin m.succ → Fq[X])
    (hA : ∀ i, degree (A i) < degree b) : ∃ i₀ i₁, i₀ ≠ i₁ ∧ A i₁ = A i₀
-- Mathlib/Analysis/Normed/Algebra/TrivSqZeroExt.lean
theorem snd_expSeries_of_smul_comm
    (x : tsze R M) (hx : MulOpposite.op x.fst • x.snd = x.fst • x.snd) (n : ℕ) :
    snd (expSeries 𝕜 (tsze R M) (n + 1) fun _ => x) = (expSeries 𝕜 R n fun _ => x.fst) • x.snd
-- Mathlib/GroupTheory/Perm/Fin.lean
theorem support_finRotate_of_le {n : ℕ} (h : 2 ≤ n) : support (finRotate n) = Finset.univ
-- Mathlib/Probability/Distributions/Exponential.lean
/-- The pdf of the exponential distribution integrates to 1 -/
@[simp]
lemma lintegral_exponentialPDF_eq_one {r : ℝ} (hr : 0 < r) : ∫⁻ x, exponentialPDF r x = 1
-- Mathlib/CategoryTheory/Localization/CalculusOfFractions.lean
lemma homMk_comp_homMk {X Y Z : C} (z₁ : W.LeftFraction X Y) (z₂ : W.LeftFraction Y Z)
    (z₃ : W.LeftFraction z₁.Y' z₂.Y') (h₃ : z₂.f ≫ z₃.s = z₁.s ≫ z₃.f) :
    homMk z₁ ≫ homMk z₂ = homMk (z₁.comp₀ z₂ z₃)
-- Mathlib/Algebra/Order/Interval/Set/Instances.lean
@[simp, norm_cast]
theorem coe_pow (x : Ioc (0 : α) 1) (n : ℕ) : ↑(x ^ n) = ((x : α) ^ n)
-- Mathlib/Algebra/FreeMonoid/Basic.lean
@[to_additive (attr := simp)]
theorem ofList_toList (xs : FreeMonoid α) : ofList (toList xs) = xs
-- Mathlib/Algebra/GroupWithZero/Action/Pi.lean
/-- A version of `Pi.single_smul` for non-dependent functions. It is useful in cases where Lean
fails to apply `Pi.single_smul`. -/
theorem single_smul' {α β} [Monoid α] [AddMonoid β] [DistribMulAction α β] [DecidableEq I] (i : I)
    (r : α) (x : β) : single (f := fun _ => β) i (r • x) = r • single (f := fun _ => β) i x
-- Mathlib/Topology/Separation.lean
theorem TopologicalSpace.IsTopologicalBasis.nhds_basis_closure {B : Set (Set X)}
    (hB : IsTopologicalBasis B) (x : X) :
    (𝓝 x).HasBasis (fun s : Set X => x ∈ s ∧ s ∈ B) closure
-- Mathlib/RingTheory/AlgebraTower.lean
/-- If `R` and `A` have a bijective `algebraMap R A` and act identically on `M`,
then a basis for `M` as `R`-module is also a basis for `M` as `R'`-module. -/
@[simps! repr_apply_support_val repr_apply_toFun]
noncomputable def Basis.algebraMapCoeffs : Basis ι A M
-- Mathlib/RingTheory/SimpleModule.lean
theorem congr [IsSemisimpleModule R N] (e : M ≃ₗ[R] N) : IsSemisimpleModule R M
-- Mathlib/Algebra/DirectSum/Internal.lean
theorem SetLike.Homogeneous.smul [CommSemiring S] [Semiring R] [Algebra S R] {A : ι → Submodule S R}
    {s : S} {r : R} (hr : SetLike.Homogeneous A r) : SetLike.Homogeneous A (s • r)
-- Mathlib/CategoryTheory/Action.lean
lemma cases' ⦃a' b' : ActionCategory G X⦄ (f : a' ⟶ b') :
    ∃ (a b : X) (g : G) (ha : a' = a) (hb : b' = b) (hg : a = g⁻¹ • b),
      f = eqToHom (by rw [ha, hg]) ≫ homOfPair b g ≫ eqToHom (by rw [hb])
-- Mathlib/MeasureTheory/Integral/SetIntegral.lean
theorem setIntegral_congr_ae₀ (hs : NullMeasurableSet s μ) (h : ∀ᵐ x ∂μ, x ∈ s → f x = g x) :
    ∫ x in s, f x ∂μ = ∫ x in s, g x ∂μ
-- Mathlib/LinearAlgebra/SesquilinearForm.lean
/-- An orthogonal basis with respect to a right-separating bilinear map has no self-orthogonal
elements. -/
theorem IsOrthoᵢ.not_isOrtho_basis_self_of_separatingRight [Nontrivial R]
    {B : M →ₛₗ[I] M →ₛₗ[I'] M₁} {v : Basis n R M} (h : B.IsOrthoᵢ v) (hB : B.SeparatingRight)
    (i : n) : ¬B.IsOrtho (v i) (v i)
-- Mathlib/Algebra/Order/Interval/Set/Instances.lean
@[simp, norm_cast]
theorem coe_one : ↑(1 : Ioc (0 : α) 1) = (1 : α)
-- Mathlib/MeasureTheory/Measure/Count.lean
theorem count_ne_zero [MeasurableSingletonClass α] (hs' : s.Nonempty) : count s ≠ 0
-- Mathlib/Order/SuccPred/Basic.lean
theorem pred_lt_pred_iff_of_not_isMin (ha : ¬IsMin a) (hb : ¬IsMin b) :
    pred a < pred b ↔ a < b
-- Mathlib/FieldTheory/IntermediateField.lean
protected theorem neg_mem {x : L} (hx : x ∈ S) : -x ∈ S
-- Mathlib/Analysis/InnerProductSpace/Calculus.lean
theorem DifferentiableWithinAt.norm_sq (hf : DifferentiableWithinAt ℝ f s x) :
    DifferentiableWithinAt ℝ (fun y => ‖f y‖ ^ 2) s x
-- Mathlib/Analysis/NormedSpace/AffineIsometry.lean
@[simp]
theorem coe_trans (e₁ : P ≃ᵃⁱ[𝕜] P₂) (e₂ : P₂ ≃ᵃⁱ[𝕜] P₃) : ⇑(e₁.trans e₂) = e₂ ∘ e₁
-- Mathlib/MeasureTheory/Function/LpSpace.lean
@[simp] theorem norm_exponent_zero (f : Lp E 0 μ) : ‖f‖ = 0
-- Mathlib/Data/Setoid/Basic.lean
/-- A special case of the equivalence closure of an equivalence relation r equalling r. -/
theorem mapOfSurjective_eq_map (h : ker f ≤ r) (hf : Surjective f) :
    map r f = mapOfSurjective r f h hf
-- Mathlib/RingTheory/Polynomial/Cyclotomic/Basic.lean
@[simp]
theorem cyclotomic_three (R : Type*) [Ring R] : cyclotomic 3 R = X ^ 2 + X + 1
-- .lake/packages/lean4/src/lean/Init/Data/Int/Order.lean
protected theorem le_of_add_le_add_right {a b c : Int} (h : a + b ≤ c + b) : a ≤ c
-- Mathlib/CategoryTheory/Monoidal/Internal/Limits.lean
/-- We construct the (candidate) limit of a functor `F : J ⥤ Mon_ C`
by interpreting it as a functor `Mon_ (J ⥤ C)`,
and noting that taking limits is a lax monoidal functor,
and hence sends monoid objects to monoid objects.
-/
@[simps!]
def limit (F : J ⥤ Mon_ C) : Mon_ C
-- Mathlib/Algebra/Group/AddChar.lean
/-- If `n` is a natural number, then `ψ ^ n = mulShift ψ n`. -/
theorem pow_mulShift (ψ : AddChar R M) (n : ℕ) : ψ ^ n = mulShift ψ n
-- Mathlib/Algebra/Algebra/Subalgebra/Unitization.lean
theorem unitization_range : (unitization s).range = Algebra.adjoin R (s : Set A)
-- Mathlib/Topology/Order/IntermediateValue.lean
theorem isConnected_Ioo (h : a < b) : IsConnected (Ioo a b)
-- Mathlib/Order/Filter/Cofinite.lean
/-- If `l ≥ Filter.cofinite` is a countably generated filter, then `l.ker` is cocountable. -/
theorem countable_compl_ker [l.IsCountablyGenerated] (h : cofinite ≤ l) : Set.Countable l.kerᶜ
-- Mathlib/Algebra/Ring/Parity.lean
@[simp] lemma odd_neg : Odd (-a) ↔ Odd a
-- Mathlib/CategoryTheory/Pi/Basic.lean
@[simp]
theorem isoApp_refl (X : ∀ i, C i) (i : I) : isoApp (Iso.refl X) i = Iso.refl (X i)
-- Mathlib/Algebra/Group/Equiv/Basic.lean
/-- A multiplicative isomorphism preserves multiplication. -/
@[to_additive "An additive isomorphism preserves addition."]
protected theorem map_mul (f : M ≃* N) : ∀ x y, f (x * y) = f x * f y
-- Mathlib/Data/Finset/Basic.lean
theorem inter_inter_inter_comm (s t u v : Finset α) : s ∩ t ∩ (u ∩ v) = s ∩ u ∩ (t ∩ v)
-- Mathlib/Algebra/Group/Nat.lean
lemma units_eq_one (u : ℕˣ) : u = 1
-- Mathlib/Algebra/Group/Equiv/Basic.lean
/-- `e.symm` is a left inverse of `e`, written as `e.symm (e y) = y`. -/
@[to_additive (attr := simp) "`e.symm` is a left inverse of `e`, written as `e.symm (e y) = y`."]
theorem symm_apply_apply (e : M ≃* N) (x : M) : e.symm (e x) = x
-- Mathlib/Analysis/InnerProductSpace/TwoDim.lean
@[simp]
theorem rightAngleRotation_symm :
    LinearIsometryEquiv.symm J = LinearIsometryEquiv.trans J (LinearIsometryEquiv.neg ℝ)
-- Mathlib/Analysis/Normed/Group/Seminorm.lean
@[to_additive (attr := simp, norm_cast)]
theorem coe_lt_coe : (p : E → ℝ) < q ↔ p < q
-- Mathlib/GroupTheory/MonoidLocalization/Basic.lean
@[to_additive]
theorem epic_of_localizationMap {j k : N →* P} (h : ∀ a, j.comp f.toMap a = k.comp f.toMap a) :
    j = k
-- Mathlib/Algebra/Group/Subsemigroup/Operations.lean
/-- Restriction of a semigroup hom to a subsemigroup of the codomain. -/
@[to_additive (attr := simps)
  "Restriction of an `AddSemigroup` hom to an `AddSubsemigroup` of the codomain."]
def codRestrict [SetLike σ N] [MulMemClass σ N] (f : M →ₙ* N) (S : σ) (h : ∀ x, f x ∈ S) :
    M →ₙ* S
-- Mathlib/Data/Num/Bitwise.lean
theorem bit_zero (b : Bool) : (b :: zero b) = zero b
-- Mathlib/Topology/Category/Profinite/Nobeling.lean
theorem evalFacProp {l : Products I} (J : I → Prop)
    (h : ∀ a, a ∈ l.val → J a) [∀ j, Decidable (J j)] :
    l.eval (π C J) ∘ ProjRestrict C J = l.eval C
-- Mathlib/RingTheory/Polynomial/Basic.lean
theorem exists_irreducible_of_natDegree_ne_zero {R : Type u} [CommRing R] [IsDomain R]
    [WfDvdMonoid R] {f : R[X]} (hf : f.natDegree ≠ 0) : ∃ g, Irreducible g ∧ g ∣ f
-- Mathlib/Order/Filter/Pointwise.lean
@[to_additive (attr := simp)]
theorem smul_filter_neBot_iff : (a • f).NeBot ↔ f.NeBot
-- Mathlib/Topology/Category/TopCat/Opens.lean
theorem openEmbedding {X : TopCat.{u}} (U : Opens X) : OpenEmbedding (inclusion U)
-- Mathlib/Analysis/Analytic/Composition.lean
theorem comp_assoc (r : FormalMultilinearSeries 𝕜 G H) (q : FormalMultilinearSeries 𝕜 F G)
    (p : FormalMultilinearSeries 𝕜 E F) : (r.comp q).comp p = r.comp (q.comp p)
-- Mathlib/LinearAlgebra/Multilinear/Basic.lean
/-- Restrict the codomain of a multilinear map to a submodule.

This is the multilinear version of `LinearMap.codRestrict`. -/
@[simps]
def codRestrict (f : MultilinearMap R M₁ M₂) (p : Submodule R M₂) (h : ∀ v, f v ∈ p) :
    MultilinearMap R M₁ p
-- Mathlib/Data/Set/Lattice.lean
theorem iInter_mono {s t : ι → Set α} (h : ∀ i, s i ⊆ t i) : ⋂ i, s i ⊆ ⋂ i, t i
-- Mathlib/CategoryTheory/Enriched/Basic.lean
/-- Composition in the "underlying" category of an enriched category. -/
@[simp]
theorem forgetEnrichment_comp {X Y Z : ForgetEnrichment W C} (f : X ⟶ Y) (g : Y ⟶ Z) :
    ForgetEnrichment.homTo W (f ≫ g) =
      ((λ_ (𝟙_ W)).inv ≫ (ForgetEnrichment.homTo W f ⊗ ForgetEnrichment.homTo W g)) ≫
        eComp W _ _ _
-- Mathlib/Computability/Primrec.lean
theorem idv {n} : @Vec n n id
-- Mathlib/Order/Chain.lean
theorem bot_mem [OrderBot α] (s : Flag α) : (⊥ : α) ∈ s
-- Mathlib/GroupTheory/Exponent.lean
/--
If there exists an injective, multiplication-preserving map from `G` to `H`,
then the exponent of `G` divides the exponent of `H`.
-/
@[to_additive "If there exists an injective, addition-preserving map from `G` to `H`,
then the exponent of `G` divides the exponent of `H`."]
theorem exponent_dvd_of_monoidHom (e : G →* H) (e_inj : Function.Injective e) :
    Monoid.exponent G ∣ Monoid.exponent H