ruc-ai4math/mathlib_handler_benchmark_410 huggingface dataset:
-- Mathlib/CategoryTheory/Abelian/Pseudoelements.lean
/-- Two morphisms in an exact sequence are exact on pseudoelements. -/
theorem pseudo_exact_of_exact {S : ShortComplex C} (hS : S.Exact) :
    ∀ b, S.g b = 0 → ∃ a, S.f a = b
-- Mathlib/SetTheory/Ordinal/FixedPoint.lean
theorem derivBFamily_fp {i hi} (H : IsNormal (f i hi)) (a : Ordinal) :
    f i hi (derivBFamily.{u, v} o f a) = derivBFamily.{u, v} o f a
-- Mathlib/CategoryTheory/Category/RelCat.lean
/-- A relation is an isomorphism in `RelCat` iff it is the image of an isomorphism in
`Type`. -/
theorem rel_iso_iff {X Y : RelCat} (r : X ⟶ Y) :
    IsIso (C := RelCat) r ↔ ∃ f : (Iso (C := Type) X Y), graphFunctor.map f.hom = r
-- Mathlib/Computability/TMToPartrec.lean
theorem code_is_ok (c) : Code.Ok c
-- Mathlib/Algebra/Polynomial/BigOperators.lean
theorem natDegree_multiset_prod (h : (0 : R[X]) ∉ t) :
    natDegree t.prod = (t.map natDegree).sum
-- Mathlib/Algebra/Order/Ring/Basic.lean
theorem pow_right_strictAnti (h₀ : 0 < a) (h₁ : a < 1) : StrictAnti (a ^ ·)
-- Mathlib/Topology/UniformSpace/Basic.lean
theorem symmetrizeRel_subset_self (V : Set (α × α)) : symmetrizeRel V ⊆ V
-- Mathlib/LinearAlgebra/TensorProduct/Basic.lean
lemma comm_comp_lTensor_comp_comm_eq (g : N →ₗ[R] P) :
    TensorProduct.comm R Q P ∘ₗ lTensor Q g ∘ₗ TensorProduct.comm R N Q =
      rTensor Q g
-- Mathlib/Data/List/Sigma.lean
theorem kinsert_nodupKeys (a) (b : β a) {l : List (Sigma β)} (nd : l.NodupKeys) :
    (kinsert a b l).NodupKeys
-- Mathlib/Data/Nat/Log.lean
theorem log_eq_iff {b m n : ℕ} (h : m ≠ 0 ∨ 1 < b ∧ n ≠ 0) :
    log b n = m ↔ b ^ m ≤ n ∧ n < b ^ (m + 1)
-- Mathlib/Geometry/RingedSpace/LocallyRingedSpace.lean
/-- The forgetful functor from `LocallyRingedSpace` to `Top`. -/
@[simps!]
def forgetToTop : LocallyRingedSpace.{u} ⥤ TopCat.{u}
-- Mathlib/Data/Nat/Cast/Defs.lean
@[simp, norm_cast]
theorem cast_one [AddMonoidWithOne R] : ((1 : ℕ) : R) = 1
-- Mathlib/MeasureTheory/Function/AEEqFun.lean
@[simp]
theorem compMeasurable_mk (g : β → γ) (hg : Measurable g) (f : α → β)
    (hf : AEStronglyMeasurable f μ) :
    compMeasurable g hg (mk f hf : α →ₘ[μ] β) =
      mk (g ∘ f) (hg.comp_aemeasurable hf.aemeasurable).aestronglyMeasurable
-- Mathlib/Algebra/GroupWithZero/Action/Defs.lean
theorem smul_mul' (a : M) (b₁ b₂ : A) : a • (b₁ * b₂) = a • b₁ * a • b₂
-- Mathlib/Data/Set/Prod.lean
@[simp, mfld_simps]
theorem univ_prod_univ : @univ α ×ˢ @univ β = univ
-- Mathlib/Analysis/CstarAlgebra/Multiplier.lean
theorem add_fst (a b : 𝓜(𝕜, A)) : (a + b).fst = a.fst + b.fst
-- Mathlib/Data/Matrix/Block.lean
/-- `Matrix.blockDiagonal'` as an `AddMonoidHom`. -/
@[simps]
def blockDiagonal'AddMonoidHom [AddZeroClass α] :
    (∀ i, Matrix (m' i) (n' i) α) →+ Matrix (Σi, m' i) (Σi, n' i) α
-- Mathlib/Topology/LocallyConstant/Basic.lean
protected theorem continuous [TopologicalSpace Y] {f : X → Y} (hf : IsLocallyConstant f) :
    Continuous f
-- Mathlib/LinearAlgebra/CliffordAlgebra/Grading.lean
theorem ι_mul_ι_mem_evenOdd_zero (m₁ m₂ : M) : ι Q m₁ * ι Q m₂ ∈ evenOdd Q 0
-- Mathlib/Topology/UniformSpace/Basic.lean
/-- See also `isOpen_iff_open_ball_subset`. -/
theorem isOpen_iff_ball_subset {s : Set α} : IsOpen s ↔ ∀ x ∈ s, ∃ V ∈ 𝓤 α, ball x V ⊆ s
-- Mathlib/SetTheory/Ordinal/FixedPoint.lean
theorem lt_nfp {a b} : a < nfp f b ↔ ∃ n, a < f^[n] b
-- Mathlib/MeasureTheory/Integral/DominatedConvergence.lean
nonrec theorem _root_.MeasureTheory.Integrable.continuous_primitive (h_int : Integrable f μ)
    (a : ℝ) : Continuous fun b => ∫ x in a..b, f x ∂μ
-- Mathlib/MeasureTheory/Decomposition/RadonNikodym.lean
lemma rnDeriv_withDensity_right (μ ν : Measure α) [SigmaFinite μ] [SigmaFinite ν]
    (hf : AEMeasurable f ν) (hf_ne_zero : ∀ᵐ x ∂ν, f x ≠ 0) (hf_ne_top : ∀ᵐ x ∂ν, f x ≠ ∞) :
    μ.rnDeriv (ν.withDensity f) =ᵐ[ν] fun x ↦ (f x)⁻¹ * μ.rnDeriv ν x
-- Mathlib/GroupTheory/Finiteness.lean
/-- An equivalent expression of `Subgroup.FG` in terms of `Set.Finite` instead of `Finset`. -/
@[to_additive "An equivalent expression of `AddSubgroup.fg` in terms of `Set.Finite` instead of
`Finset`."]
theorem Subgroup.fg_iff (P : Subgroup G) :
    Subgroup.FG P ↔ ∃ S : Set G, Subgroup.closure S = P ∧ S.Finite
-- Mathlib/Topology/Sheaves/Stalks.lean
@[reassoc (attr := simp)]
lemma germ_stalkPullbackInv (f : X ⟶ Y) (F : Y.Presheaf C) (x : X) (V : Opens X) (hV : x ∈ V) :
    ((pullback C f).obj F).germ ⟨x, hV⟩ ≫ stalkPullbackInv C f F x =
    F.germToPullbackStalk _ f V ⟨x, hV⟩
-- Mathlib/SetTheory/Surreal/Dyadic.lean
theorem powHalf_zero_rightMoves : (powHalf 0).RightMoves = PEmpty
-- Mathlib/Combinatorics/SimpleGraph/Maps.lean
@[simp]
lemma map_symm_apply (f : V ≃ W) (G : SimpleGraph V) (w : W) :
    (SimpleGraph.Iso.map f G).symm w = f.symm w
-- Mathlib/Data/Matrix/Notation.lean
@[simp]
theorem head_transpose (A : Matrix m' (Fin n.succ) α) :
    vecHead (of.symm Aᵀ) = vecHead ∘ of.symm A
-- Mathlib/Analysis/NormedSpace/Multilinear/Basic.lean
@[simp]
theorem compContinuousLinearMapL_apply (g : ContinuousMultilinearMap 𝕜 E₁ G)
    (f : ∀ i, E i →L[𝕜] E₁ i) : compContinuousLinearMapL f g = g.compContinuousLinearMap f
-- Mathlib/GroupTheory/Transfer.lean
theorem transferSylow_restrict_eq_pow : ⇑((transferSylow P hP).restrict (P : Subgroup G)) =
    (fun x : P => x ^ (P : Subgroup G).index)
-- Mathlib/Topology/Sheaves/Skyscraper.lean
/-- The cocone at `A` for the stalk functor of `skyscraperPresheaf p₀ A` when `y ∈ closure {p₀}`
-/
@[simps]
def skyscraperPresheafCoconeOfSpecializes {y : X} (h : p₀ ⤳ y) :
    Cocone ((OpenNhds.inclusion y).op ⋙ skyscraperPresheaf p₀ A)
-- Mathlib/Probability/Kernel/WithDensity.lean
protected theorem withDensity_apply (κ : Kernel α β) [IsSFiniteKernel κ]
    (hf : Measurable (Function.uncurry f)) (a : α) :
    withDensity κ f a = (κ a).withDensity (f a)
-- Mathlib/CategoryTheory/WithTerminal.lean
/-- The pseudofunctor from `Cat` to `Cat` defined with `WithTerminal`. -/
@[simps]
def pseudofunctor : Pseudofunctor Cat Cat
-- Mathlib/Combinatorics/Additive/AP/Three/Defs.lean
lemma ThreeGPFree.smul_set₀ (hs : ThreeGPFree s) (ha : a ≠ 0) : ThreeGPFree (a • s)
-- Mathlib/Geometry/Manifold/SmoothManifoldWithCorners.lean
theorem map_extChartAt_symm_nhdsWithin_range' {x y : M} (hy : y ∈ (extChartAt I x).source) :
    map (extChartAt I x).symm (𝓝[range I] extChartAt I x y) = 𝓝 y
-- Mathlib/SetTheory/Ordinal/Basic.lean
@[simp]
theorem typein_lt_typein (r : α → α → Prop) [IsWellOrder α r] {a b : α} :
    typein r a < typein r b ↔ r a b
-- .lake/packages/lean4/src/lean/Init/PropLemmas.lean
theorem Decidable.of_not_imp [Decidable a] (h : ¬(a → b)) : a
-- Mathlib/Algebra/Homology/ShortComplex/RightHomology.lean
@[reassoc (attr := simp)]
lemma p_descOpcycles : S.pOpcycles ≫ S.descOpcycles k hk = k
-- Mathlib/Algebra/DirectSum/Basic.lean
@[simp]
theorem sigmaCurry_apply (f : ⨁ i : Σ _i, _, δ i.1 i.2) (i : ι) (j : α i) :
    sigmaCurry f i j = f ⟨i, j⟩
-- Mathlib/Order/Filter/Basic.lean
@[instance]
theorem comap_eval_neBot {ι : Type*} {α : ι → Type*} [∀ j, Nonempty (α j)] (i : ι)
    (f : Filter (α i)) [NeBot f] : (comap (eval i) f).NeBot
-- Mathlib/CategoryTheory/Localization/LocalizerMorphism.lean
/-- Condition that a `LocalizerMorphism` induces an equivalence on the localized categories -/
class IsLocalizedEquivalence : Prop :=
  /-- the induced functor on the constructed localized categories is an equivalence -/
  isEquivalence : (Φ.localizedFunctor W₁.Q W₂.Q).IsEquivalence
-- Mathlib/Order/Interval/Set/Basic.lean
theorem Iio_union_Ico (h : min c d ≤ b) : Iio b ∪ Ico c d = Iio (max b d)
-- Mathlib/Algebra/Lie/Nilpotent.lean
/-- A central extension of nilpotent Lie algebras is nilpotent. -/
theorem LieAlgebra.nilpotent_of_nilpotent_quotient {I : LieIdeal R L} (h₁ : I ≤ center R L)
    (h₂ : IsNilpotent R (L ⧸ I)) : IsNilpotent R L
-- Mathlib/Algebra/QuaternionBasis.lean
/-- A quaternionic basis on `A` is equivalent to a map from the quaternion algebra to `A`. -/
@[simps]
def lift : Basis A c₁ c₂ ≃ (ℍ[R,c₁,c₂] →ₐ[R] A)
-- Mathlib/Data/Set/Card.lean
theorem encard_eq_coe_toFinset_card (s : Set α) [Fintype s] : encard s = s.toFinset.card
-- Mathlib/Logic/Equiv/Fintype.lean
theorem Equiv.Perm.viaFintypeEmbedding_apply_mem_range {b : β} (h : b ∈ Set.range f) :
    e.viaFintypeEmbedding f b = f (e (f.invOfMemRange ⟨b, h⟩))
-- Mathlib/CategoryTheory/Sigma/Basic.lean
@[simp]
lemma incl_obj {i : I} (X : C i) : (incl i).obj X = ⟨i, X⟩
-- Mathlib/Probability/Kernel/Composition.lean
theorem le_compProd_apply (κ : Kernel α β) [IsSFiniteKernel κ] (η : Kernel (α × β) γ)
    [IsSFiniteKernel η] (a : α) (s : Set (β × γ)) :
    ∫⁻ b, η (a, b) {c | (b, c) ∈ s} ∂κ a ≤ (κ ⊗ₖ η) a s
-- Mathlib/Data/Real/Basic.lean
lemma cauchy_intCast (z : ℤ) : (z : ℝ).cauchy = z
-- Mathlib/GroupTheory/Nilpotent.lean
@[simp]
theorem lowerCentralSeries_zero : lowerCentralSeries G 0 = ⊤
-- Mathlib/Topology/UniformSpace/Basic.lean
@[to_additive]
theorem uniformity_mulOpposite [UniformSpace α] :
    𝓤 αᵐᵒᵖ = comap (fun q : αᵐᵒᵖ × αᵐᵒᵖ => (q.1.unop, q.2.unop)) (𝓤 α)
-- Mathlib/Tactic/NormNum/Pow.lean
/-- This is an opaque wrapper around `Nat.pow` to prevent lean from unfolding the definition of
`Nat.pow` on numerals. The arbitrary precondition `p` is actually a formula of the form
`Nat.pow a' b' = c'` but we usually don't care to unfold this proposition so we just carry a
reference to it. -/
structure IsNatPowT (p : Prop) (a b c : Nat) : Prop where
  /-- Unfolds the assertion. -/
  run' : p → Nat.pow a b = c
-- Mathlib/Geometry/Manifold/ContMDiff/Defs.lean
/-- One can reformulate smoothness as continuity and smoothness in any extended chart in the
target. -/
theorem contMDiff_iff_target :
    ContMDiff I I' n f ↔
      Continuous f ∧ ∀ y : M',
        ContMDiffOn I 𝓘(𝕜, E') n (extChartAt I' y ∘ f) (f ⁻¹' (extChartAt I' y).source)
-- Mathlib/Algebra/Homology/HomotopyCategory/MappingCone.lean
@[reassoc]
lemma d_snd_v (i j : ℤ) (hij : i + 1 = j) :
    (mappingCone φ).d i j ≫ (snd φ).v j j (add_zero _) =
      (fst φ).1.v i j hij ≫ φ.f j + (snd φ).v i i (add_zero i) ≫ G.d i j
-- Mathlib/Data/Finset/Lattice.lean
@[simp]
theorem sup_empty : (∅ : Finset β).sup f = ⊥
-- Mathlib/Geometry/Manifold/Diffeomorph.lean
protected theorem contDiff (h : E ≃ₘ^n⟮𝓘(𝕜, E), 𝓘(𝕜, E')⟯ E') : ContDiff 𝕜 n h
-- Mathlib/Data/Set/Image.lean
theorem coe_image {p : α → Prop} {s : Set (Subtype p)} :
    (↑) '' s = { x | ∃ h : p x, (⟨x, h⟩ : Subtype p) ∈ s }
-- Mathlib/Analysis/SpecialFunctions/Trigonometric/Deriv.lean
theorem hasDerivAt_sin (x : ℝ) : HasDerivAt sin (cos x) x
-- Mathlib/Algebra/Group/Basic.lean
@[to_additive (attr := simp)]
theorem one_eq_inv : 1 = a⁻¹ ↔ a = 1
-- Mathlib/MeasureTheory/Measure/Restrict.lean
theorem restrict_le_self : μ.restrict s ≤ μ
-- Mathlib/Algebra/Order/Archimedean.lean
theorem le_iff_forall_lt_rat_imp_le : x ≤ y ↔ ∀ q : ℚ, y < q → x ≤ q
-- Mathlib/Analysis/InnerProductSpace/Calculus.lean
theorem PartialHomeomorph.contDiff_univUnitBall : ContDiff ℝ n (univUnitBall : E → E)
-- .lake/packages/lean4/src/lean/Init/Data/Bool.lean
@[simp] theorem not_eq_self : ∀(b : Bool), ((!b) = b) ↔ False
-- Mathlib/MeasureTheory/Measure/VectorMeasure.lean
theorem ennrealToMeasure {μ : VectorMeasure α ℝ≥0∞} :
    (∀ ⦃s : Set α⦄, μ.ennrealToMeasure s = 0 → v s = 0) ↔ v ≪ᵥ μ
-- Mathlib/LinearAlgebra/FiniteDimensional/Defs.lean
/-- On a finite-dimensional space, a linear map is injective if and only if it is surjective. -/
theorem injective_iff_surjective [FiniteDimensional K V] {f : V →ₗ[K] V} :
    Injective f ↔ Surjective f
-- Mathlib/Order/Interval/Finset/Basic.lean
theorem Icc_subset_Iic_self : Icc a b ⊆ Iic b
-- Mathlib/GroupTheory/Abelianization.lean
theorem image_commutatorSet_closureCommutatorRepresentatives :
    (closureCommutatorRepresentatives G).subtype ''
        commutatorSet (closureCommutatorRepresentatives G) =
      commutatorSet G
-- Mathlib/Analysis/Convex/StrictConvexSpace.lean
/-- In a strictly convex space, two vectors `x`, `y` are in the same ray if and only if the triangle
inequality for `x` and `y` becomes an equality. -/
theorem sameRay_iff_norm_add : SameRay ℝ x y ↔ ‖x + y‖ = ‖x‖ + ‖y‖
-- Mathlib/RingTheory/Flat/CategoryTheory.lean
lemma iff_lTensor_preserves_shortComplex_exact :
    Flat R M ↔
    ∀ (C : ShortComplex $ ModuleCat R) (_ : C.Exact), (C.map (tensorLeft M) |>.Exact)
-- Mathlib/Analysis/Calculus/FDeriv/Analytic.lean
theorem HasFPowerSeriesOnBall.hasFDerivAt [CompleteSpace F] (h : HasFPowerSeriesOnBall f p x r)
    {y : E} (hy : (‖y‖₊ : ℝ≥0∞) < r) :
    HasFDerivAt f (continuousMultilinearCurryFin1 𝕜 E F (p.changeOrigin y 1)) (x + y)
-- Mathlib/Algebra/MvPolynomial/Basic.lean
@[simp]
theorem map_aeval {B : Type*} [CommSemiring B] (g : σ → S₁) (φ : S₁ →+* B) (p : MvPolynomial σ R) :
    φ (aeval g p) = eval₂Hom (φ.comp (algebraMap R S₁)) (fun i => φ (g i)) p
-- Mathlib/Data/Set/Subsingleton.lean
theorem Nontrivial.pair_subset (hs : s.Nontrivial) : ∃ x y, x ≠ y ∧ {x, y} ⊆ s
-- Mathlib/GroupTheory/Perm/Basic.lean
@[to_additive existing (attr := simp)]
lemma mulRight_mul : Equiv.mulRight (a * b) = Equiv.mulRight b * Equiv.mulRight a
-- Mathlib/Analysis/Calculus/LocalExtr/LineDeriv.lean
theorem IsExtrFilter.hasLineDerivAt_eq_zero {l : Filter E} (h : IsExtrFilter f l a)
    (hd : HasLineDerivAt ℝ f f' a b) (h' : Tendsto (fun t : ℝ ↦ a + t • b) (𝓝 0) l) : f' = 0
-- Mathlib/RingTheory/Coalgebra/Basic.lean
/-- The coalgebra instance will be defined in #11975, in
`Mathlib.RingTheory.Coalgebra.TensorProduct`. -/
@[simps] instance instCoalgebraStruct :
    CoalgebraStruct R (A ⊗[R] B)
-- Mathlib/RingTheory/Ideal/Operations.lean
@[simp]
theorem annihilator_smul (N : Submodule R M) : annihilator N • N = ⊥
-- Mathlib/Analysis/InnerProductSpace/Positive.lean
theorem IsPositive.adjoint_conj {T : E →L[𝕜] E} (hT : T.IsPositive) (S : F →L[𝕜] E) :
    (S† ∘L T ∘L S).IsPositive
-- Mathlib/LinearAlgebra/Matrix/NonsingularInverse.lean
theorem det_nonsing_inv_mul_det (h : IsUnit A.det) : A⁻¹.det * A.det = 1
-- Mathlib/Analysis/Calculus/FDeriv/Mul.lean
theorem fderiv_continuousMultilinear_apply_const (hc : DifferentiableAt 𝕜 c x) (u : ∀ i, M i) :
    (fderiv 𝕜 (fun y ↦ (c y) u) x) = (fderiv 𝕜 c x).flipMultilinear u
-- Mathlib/Data/Set/Pointwise/Basic.lean
@[to_additive (attr := simp)]
theorem coe_singletonMulHom : (singletonMulHom : α → Set α) = singleton
-- Mathlib/Topology/Algebra/InfiniteSum/Constructions.lean
@[to_additive]
theorem tprod_sigma' {γ : β → Type*} {f : (Σb : β, γ b) → α}
    (h₁ : ∀ b, Multipliable fun c ↦ f ⟨b, c⟩) (h₂ : Multipliable f) :
    ∏' p, f p = ∏' (b) (c), f ⟨b, c⟩
-- Mathlib/LinearAlgebra/Matrix/Spectrum.lean
lemma mulVec_eigenvectorBasis (j : n) :
    A *ᵥ ⇑(hA.eigenvectorBasis j) = (hA.eigenvalues j) • ⇑(hA.eigenvectorBasis j)
-- Mathlib/MeasureTheory/Function/SimpleFunc.lean
@[simp, norm_cast]
theorem coe_inf [Inf β] (f g : α →ₛ β) : ⇑(f ⊓ g) = ⇑f ⊓ ⇑g
-- Mathlib/Analysis/Normed/Operator/BoundedLinearMaps.lean
theorem fst : IsBoundedLinearMap 𝕜 fun x : E × F => x.1
-- Mathlib/Analysis/BoxIntegral/Basic.lean
/-- A function that is bounded and a.e. continuous on a box `I` is integrable on `I`. -/
theorem integrable_of_bounded_and_ae_continuousWithinAt [CompleteSpace E] {I : Box ι} {f : ℝⁿ → E}
    (hb : ∃ C : ℝ, ∀ x ∈ Box.Icc I, ‖f x‖ ≤ C) (μ : Measure ℝⁿ) [IsLocallyFiniteMeasure μ]
    (hc : ∀ᵐ x ∂(μ.restrict (Box.Icc I)), ContinuousWithinAt f (Box.Icc I) x) :
    Integrable I l f μ.toBoxAdditive.toSMul
-- Mathlib/RingTheory/Polynomial/Eisenstein/Basic.lean
theorem dvd_pow_natDegree_of_aeval_eq_zero [Algebra R A] [Nontrivial A] [NoZeroSMulDivisors R A]
    {p : R[X]} (hp : p.Monic) (x y : R) (z : A) (h : Polynomial.aeval z p = 0)
    (hz : z * algebraMap R A x = algebraMap R A y) : x ∣ y ^ p.natDegree
-- Mathlib/CategoryTheory/Shift/Induced.lean
@[simp]
lemma add_hom_app_obj (a b : A) (X : C) :
    (add F s i a b).hom.app (F.obj X) =
      (i (a + b)).hom.app X ≫ F.map ((shiftFunctorAdd C a b).hom.app X) ≫
        (i b).inv.app ((shiftFunctor C a).obj X) ≫ (s b).map ((i a).inv.app X)
-- Mathlib/Topology/Algebra/InfiniteSum/Basic.lean
@[to_additive]
theorem tprod_congr {f g : β → α}
    (hfg : ∀ b, f b = g b) : ∏' b, f b = ∏' b, g b
-- Mathlib/LinearAlgebra/Orientation.lean
/-- The orientation given by a basis derived using `units_smul`, in terms of the product of those
units. -/
theorem orientation_unitsSMul (e : Basis ι R M) (w : ι → Units R) :
    (e.unitsSMul w).orientation = (∏ i, w i)⁻¹ • e.orientation
-- Mathlib/Analysis/InnerProductSpace/Orthogonal.lean
@[symm]
theorem IsOrtho.symm {U V : Submodule 𝕜 E} (h : U ⟂ V) : V ⟂ U
-- Mathlib/Logic/Relation.lean
/-- `ReflGen r`: reflexive closure of `r` -/
@[mk_iff]
inductive ReflGen (r : α → α → Prop) (a : α) : α → Prop
  | refl : ReflGen r a a
  | single {b} : r a b → ReflGen r a b
-- Mathlib/Algebra/Regular/Basic.lean
/-- Two elements `a` and `b` are regular if and only if both products `a * b` and `b * a`
are regular. -/
@[to_additive "Two elements `a` and `b` are add-regular if and only if both sums `a + b` and
`b + a` are add-regular."]
theorem isRegular_mul_and_mul_iff :
    IsRegular (a * b) ∧ IsRegular (b * a) ↔ IsRegular a ∧ IsRegular b
-- Mathlib/Tactic/Sat/FromLRAT.lean
/-- The reification of a singleton clause `¬⟦l⟧_v ≡ ¬⟦l⟧_v`. -/
theorem Clause.reify_one {l : Literal} {a : Prop}
    (h₁ : Literal.reify v l a) : Clause.reify v (Clause.nil.cons l) a
-- Mathlib/Topology/UniformSpace/Completion.lean
theorem continuous_map₂ {δ} [TopologicalSpace δ] {f : α → β → γ} {a : δ → Completion α}
    {b : δ → Completion β} (ha : Continuous a) (hb : Continuous b) :
    Continuous fun d : δ => Completion.map₂ f (a d) (b d)
-- Mathlib/LinearAlgebra/Matrix/NonsingularInverse.lean
theorem inv_inj (h : A⁻¹ = B⁻¹) (h' : IsUnit A.det) : A = B
-- Mathlib/LinearAlgebra/Multilinear/Basic.lean
lemma map_update [DecidableEq ι] (x : (i : ι) → M₁ i) (i : ι) (v : M₁ i)  :
    f (update x i v) = f x - f (update x i (x i - v))
-- Mathlib/CategoryTheory/Sites/LocallyInjective.lean
lemma isLocallyInjective_sheafToPresheaf_map_iff :
    Presheaf.IsLocallyInjective J ((sheafToPresheaf J D).map φ) ↔ IsLocallyInjective φ
-- Mathlib/Algebra/Order/Sub/Canonical.lean
@[simp]
theorem add_tsub_cancel_of_le (h : a ≤ b) : a + (b - a) = b
-- Mathlib/Algebra/BigOperators/Group/Finset.lean
/-- Moving to the opposite additive commutative monoid commutes with summing. -/
@[simp]
theorem op_sum [AddCommMonoid β] {s : Finset α} (f : α → β) :
    op (∑ x ∈ s, f x) = ∑ x ∈ s, op (f x)
-- Mathlib/Data/Real/Irrational.lean
theorem of_mul_rat (h : Irrational (x * q)) : Irrational x
-- Mathlib/Data/Sum/Order.lean
@[simp]
theorem swap_lt_swap_iff [LT α] [LT β] {a b : α ⊕ β} : a.swap < b.swap ↔ a < b
-- Mathlib/Analysis/Asymptotics/Asymptotics.lean
protected theorem IsLittleO.insert [TopologicalSpace α] {x : α} {s : Set α} {g : α → E'}
    {g' : α → F'} (h1 : g =o[𝓝[s] x] g') (h2 : g x = 0) : g =o[𝓝[insert x s] x] g'
-- Mathlib/Data/Rat/Defs.lean
theorem divInt_ne_zero_of_ne_zero {n d : ℤ} (h : n ≠ 0) (hd : d ≠ 0) : n /. d ≠ 0
-- Mathlib/Data/Set/Lattice.lean
@[simp]
theorem iUnion_empty : (⋃ _ : ι, ∅ : Set α) = ∅
-- Mathlib/NumberTheory/LegendreSymbol/AddCharacter.lean
/-- The sum over the values of `mulShift ψ b` for `ψ` primitive is zero when `b ≠ 0`
and `#R` otherwise. -/
theorem sum_mulShift {R : Type*} [CommRing R] [Fintype R] [DecidableEq R]
    {R' : Type*} [CommRing R'] [IsDomain R'] {ψ : AddChar R R'} (b : R)
    (hψ : IsPrimitive ψ) : ∑ x : R, ψ (x * b) = if b = 0 then Fintype.card R else 0
-- Mathlib/Data/Nat/Cast/Prod.lean
@[simp]
theorem snd_natCast (n : ℕ) : (n : α × β).snd = n
-- .lake/packages/lean4/src/lean/Init/Data/Int/DivModLemmas.lean
protected theorem eq_mul_of_ediv_eq_left {a b c : Int}
    (H1 : b ∣ a) (H2 : a / b = c) : a = c * b
-- Mathlib/LinearAlgebra/AffineSpace/AffineSubspace.lean
/-- Given a point `p1` in an affine subspace `s`, and a point `p2`, a point `p` is in the span of
`s` with `p2` added if and only if it is a multiple of `p2 -ᵥ p1` added to a point in `s`. -/
theorem mem_affineSpan_insert_iff {s : AffineSubspace k P} {p1 : P} (hp1 : p1 ∈ s) (p2 p : P) :
    p ∈ affineSpan k (insert p2 (s : Set P)) ↔
      ∃ r : k, ∃ p0 ∈ s, p = r • (p2 -ᵥ p1 : V) +ᵥ p0
-- Mathlib/MeasureTheory/Measure/Hausdorff.lean
@[simp]
theorem hausdorffMeasure_zero_singleton (x : X) : μH[0] ({x} : Set X) = 1
-- Mathlib/NumberTheory/ModularForms/Basic.lean
@[simp]
theorem coe_add (f g : CuspForm Γ k) : ⇑(f + g) = f + g
-- .lake/packages/lean4/src/lean/Init/PropLemmas.lean
theorem forall_comm {p : α → β → Prop} : (∀ a b, p a b) ↔ (∀ b a, p a b)
-- Mathlib/LinearAlgebra/AffineSpace/FiniteDimensional.lean
/-- If an affine independent finset is contained in the affine span of another finset, then its
cardinality is at most the cardinality of that finset. -/
lemma AffineIndependent.card_le_card_of_subset_affineSpan {s t : Finset V}
    (hs : AffineIndependent k ((↑) : s → V)) (hst : (s : Set V) ⊆ affineSpan k (t : Set V)) :
    s.card ≤ t.card
-- Mathlib/LinearAlgebra/TensorProduct/Graded/Internal.lean
theorem tmul_one_mul_one_tmul (a₁ : A) (b₂ : B) :
    (a₁ ᵍ⊗ₜ[R] (1 : B) * (1 : A) ᵍ⊗ₜ[R] b₂ : 𝒜 ᵍ⊗[R] ℬ) = (a₁ : A) ᵍ⊗ₜ (b₂ : B)
-- Mathlib/CategoryTheory/Limits/Shapes/Pullback/Cospan.lean
@[simp]
theorem span_zero {X Y Z : C} (f : X ⟶ Y) (g : X ⟶ Z) : (span f g).obj WalkingSpan.zero = X
-- Mathlib/Combinatorics/Additive/PluenneckeRuzsa.lean
/-- **Ruzsa's triangle inequality**. Div-mul-div version. -/
@[to_additive "**Ruzsa's triangle inequality**. Sub-add-sub version."]
theorem ruzsa_triangle_inequality_div_mul_div (A B C : Finset α) :
    (A / C).card * B.card ≤ (A * B).card * (B / C).card
-- Mathlib/Topology/Algebra/FilterBasis.lean
theorem mul_left (x₀ : R) {U : Set R} (hU : U ∈ B) : ∃ V ∈ B, V ⊆ (fun x ↦ x₀ * x) ⁻¹' U
-- Mathlib/Data/Fintype/Card.lean
@[simp]
theorem Fintype.card_subtype_compl [Fintype α] (p : α → Prop) [Fintype { x // p x }]
    [Fintype { x // ¬p x }] :
    Fintype.card { x // ¬p x } = Fintype.card α - Fintype.card { x // p x }
-- Mathlib/Computability/PartrecCode.lean
/-- The `Nat.Partrec.Code.evaln` function is primitive recursive. -/
theorem evaln_prim : Primrec fun a : (ℕ × Code) × ℕ => evaln a.1.1 a.1.2 a.2
-- Mathlib/NumberTheory/SmoothNumbers.lean
/-- Zero is never a smooth number -/
lemma ne_zero_of_mem_smoothNumbers {n m : ℕ} (h : m ∈ smoothNumbers n) : m ≠ 0
-- Mathlib/Topology/Homeomorph.lean
/-- Continuous equivalences from a compact space to a T2 space are homeomorphisms.

This is not true when T2 is weakened to T1
(see `Continuous.homeoOfEquivCompactToT2.t1_counterexample`). -/
@[simps toEquiv] -- Porting note: was `@[simps]`
def homeoOfEquivCompactToT2 [CompactSpace X] [T2Space Y] {f : X ≃ Y} (hf : Continuous f) : X ≃ₜ Y
-- Mathlib/Analysis/Normed/Lp/lpSpace.lean
protected theorem single_apply (p) (i : α) (a : E i) (j : α) :
    lp.single p i a j = if h : j = i then Eq.ndrec a h.symm else 0
-- Mathlib/MeasureTheory/Integral/SetIntegral.lean
theorem integral_conj {f : X → 𝕜} : ∫ x, conj (f x) ∂μ = conj (∫ x, f x ∂μ)
-- Mathlib/AlgebraicTopology/DoldKan/Projections.lean
@[reassoc (attr := simp)]
theorem P_idem (q : ℕ) : (P q : K[X] ⟶ K[X]) ≫ P q = P q
-- Mathlib/Algebra/Group/Basic.lean
@[to_additive]
theorem inv_div_inv : a⁻¹ / b⁻¹ = b / a
-- .lake/packages/batteries/Batteries/Data/List/Perm.lean
protected theorem Perm.insert (a : α) {l₁ l₂ : List α} (p : l₁ ~ l₂) :
    l₁.insert a ~ l₂.insert a
-- Mathlib/MeasureTheory/Integral/Average.lean
/-- **First moment method**. An integrable function is smaller than its mean on a set of positive
measure. -/
theorem measure_le_average_pos (hμ : μ ≠ 0) (hf : Integrable f μ) :
    0 < μ {x | f x ≤ ⨍ a, f a ∂μ}
-- Mathlib/Topology/Category/Compactum.lean
private theorem subset_cl {X : Compactum} (A : Set X) : A ⊆ cl A
-- Mathlib/LinearAlgebra/AffineSpace/AffineMap.lean
theorem coeFn_injective : @Function.Injective (P1 →ᵃ[k] P2) (P1 → P2) (⇑)
-- Mathlib/MeasureTheory/OuterMeasure/Basic.lean
theorem measure_union_le (s t : Set α) : μ (s ∪ t) ≤ μ s + μ t
-- Mathlib/Analysis/SpecialFunctions/Pow/NNReal.lean
theorem _root_.Real.nnnorm_rpow_of_nonneg {x y : ℝ} (hx : 0 ≤ x) : ‖x ^ y‖₊ = ‖x‖₊ ^ y
-- Mathlib/LinearAlgebra/Trace.lean
theorem traceAux_eq : traceAux R b = traceAux R c
-- Mathlib/Data/Finset/Pointwise.lean
@[to_additive]
lemma inf_div_right [SemilatticeInf β] [OrderTop β] (s t : Finset α) (f : α → β) :
    inf (s / t) f = inf t fun y ↦ inf s (f <| · / y)