ruc-ai4math/mathlib_handler_benchmark_410 huggingface dataset:
-- Mathlib/Order/CountableDenseLinearOrder.lean
/-- Any two countable dense, nonempty linear orders without endpoints are order isomorphic. -/
theorem iso_of_countable_dense [Countable α] [DenselyOrdered α] [NoMinOrder α] [NoMaxOrder α]
    [Nonempty α] [Countable β] [DenselyOrdered β] [NoMinOrder β] [NoMaxOrder β] [Nonempty β] :
    Nonempty (α ≃o β)
-- Mathlib/GroupTheory/Coxeter/Basic.lean
theorem wordProd_surjective : Surjective cs.wordProd
-- Mathlib/Analysis/Normed/Group/Basic.lean
@[to_additive] -- Porting note (#10618): `simp` can prove it
theorem mem_ball_one_iff : a ∈ ball (1 : E) r ↔ ‖a‖ < r
-- Mathlib/Order/Heyting/Hom.lean
@[simp]
theorem comp_id (f : HeytingHom α β) : f.comp (HeytingHom.id α) = f
-- Mathlib/Algebra/Order/Field/Power.lean
@[simp]
theorem zpow_le_iff_le (hx : 1 < a) : a ^ m ≤ a ^ n ↔ m ≤ n
-- Mathlib/Topology/ContinuousFunction/Basic.lean
/-- The forward direction of a homeomorphism, as a bundled continuous map. -/
@[simps]
def toContinuousMap (e : α ≃ₜ β) : C(α, β)
-- Mathlib/Data/Pi/Interval.lean
theorem card_Ioi : (Ioi a).card = (∏ i, (Ici (a i)).card) - 1
-- Mathlib/Topology/DiscreteQuotient.lean
@[simp]
theorem ofLE_comp_map (cond : LEComap f A B) (h : B ≤ B') :
    ofLE h ∘ map f cond = map f (cond.mono le_rfl h)
-- Mathlib/Data/Finsupp/Fin.lean
@[simp]
theorem cons_zero_zero : cons 0 (0 : Fin n →₀ M) = 0
-- Mathlib/Data/Finsupp/Defs.lean
@[simp]
theorem erase_single {a : α} {b : M} : erase a (single a b) = 0
-- Mathlib/Data/Int/Defs.lean
protected lemma le_of_eq (hab : a = b) : a ≤ b
-- Mathlib/Algebra/Lie/Weights/RootSystem.lean
lemma chainLength_of_isZero (hα : α.IsZero) : chainLength α β = 0
-- Mathlib/AlgebraicGeometry/Pullbacks.lean
@[simp, reassoc]
theorem t'_snd_snd (i j k : 𝒰.J) :
    t' 𝒰 f g i j k ≫ pullback.snd _ _ ≫ pullback.snd _ _ =
      pullback.fst _ _ ≫ pullback.fst _ _ ≫ pullback.fst _ _
-- Mathlib/Data/List/Duplicate.lean
theorem Duplicate.mem (h : x ∈+ l) : x ∈ l
-- Mathlib/Order/Filter/Basic.lean
nonrec theorem _root_.Set.RightInvOn.filter_map_Iic {f : α → β} {g : β → α}
    (hfg : RightInvOn g f t) : RightInvOn (map g) (map f) (Iic <| 𝓟 t)
-- Mathlib/NumberTheory/Pell.lean
/-- A solution with `x > 1` must have `y ≠ 0`. -/
theorem y_ne_zero_of_one_lt_x {a : Solution₁ d} (ha : 1 < a.x) : a.y ≠ 0
-- Mathlib/Logic/Equiv/Defs.lean
/-- Conjugate a map `f : α → α` by an equivalence `α ≃ β`. -/
@[simps! apply] def conj (e : α ≃ β) : (α → α) ≃ (β → β)
-- Mathlib/Analysis/InnerProductSpace/Basic.lean
/-- `if ... then ... else` characterization of an indexed set of vectors being orthonormal.  (Inner
product equals Kronecker delta.) -/
theorem orthonormal_iff_ite [DecidableEq ι] {v : ι → E} :
    Orthonormal 𝕜 v ↔ ∀ i j, ⟪v i, v j⟫ = if i = j then (1 : 𝕜) else (0 : 𝕜)
-- Mathlib/Data/Set/Lattice.lean
lemma iInter₂_congr {s t : ∀ i, κ i → Set α} (h : ∀ i j, s i j = t i j) :
    ⋂ (i) (j), s i j = ⋂ (i) (j), t i j
-- Mathlib/Analysis/InnerProductSpace/PiL2.lean
theorem basisFun_toBasis : (basisFun ι 𝕜).toBasis = PiLp.basisFun _ 𝕜 ι
-- Mathlib/Topology/Algebra/Module/Basic.lean
@[simp]
theorem default_def : (default : M₁ →SL[σ₁₂] M₂) = 0
-- Mathlib/Topology/Algebra/Module/Basic.lean
@[simp, norm_cast]
theorem coe_sub' (f g : M →SL[σ₁₂] M₂) : ⇑(f - g) = f - g
-- Mathlib/AlgebraicGeometry/EllipticCurve/Weierstrass.lean
@[simp]
lemma variableChange_j : (E.variableChange C).j = E.j
-- Mathlib/Order/Bounds/Basic.lean
theorem IsGreatest.unique (Ha : IsGreatest s a) (Hb : IsGreatest s b) : a = b
-- Mathlib/GroupTheory/Schreier.lean
theorem rank_le_index_mul_rank [hG : Group.FG G] [FiniteIndex H] :
    Group.rank H ≤ H.index * Group.rank G
-- Mathlib/MeasureTheory/Function/StronglyMeasurable/Basic.lean
@[to_additive (attr := measurability)]
theorem _root_.Multiset.aestronglyMeasurable_prod' (l : Multiset (α → M))
    (hl : ∀ f ∈ l, AEStronglyMeasurable f μ) : AEStronglyMeasurable l.prod μ
-- Mathlib/Analysis/Convex/Radon.lean
/-- **Helly's theorem** for finite families of convex sets in its classical form.

If `F` is a family of `n` convex sets in a vector space of finite dimension `d`, with `n ≥ d + 1`,
and any `d + 1` sets of `F` intersect nontrivially, then all sets of `F` intersect nontrivially. -/
theorem helly_theorem {F : ι → Set E} {s : Finset ι}
    (h_card : finrank 𝕜 E + 1 ≤ s.card)
    (h_convex : ∀ i ∈ s, Convex 𝕜 (F i))
    (h_inter : ∀ I ⊆ s, I.card = finrank 𝕜 E + 1 → (⋂ i ∈ I, F i).Nonempty) :
    (⋂ i ∈ s, F i).Nonempty
-- Mathlib/CategoryTheory/Limits/Shapes/Multiequalizer.lean
theorem ofSigmaCofork_ι_app_right (c : Cofork I.fstSigmaMap I.sndSigmaMap) (b) :
    (ofSigmaCofork I c).ι.app (WalkingMultispan.right b) = (Sigma.ι I.right b : _) ≫ c.π
-- Mathlib/Algebra/Group/Submonoid/Membership.lean
@[to_additive (attr := elab_as_elim)]
theorem closure_induction_left {s : Set M} {p : (m : M) → m ∈ closure s → Prop}
    (one : p 1 (one_mem _))
    (mul_left : ∀ x (hx : x ∈ s), ∀ (y) hy, p y hy → p (x * y) (mul_mem (subset_closure hx) hy))
    {x : M} (h : x ∈ closure s) :
    p x h
-- .lake/packages/batteries/Batteries/Data/String/Lemmas.lean
theorem contains (c) : ∀ {s}, Valid s → (s.contains c ↔ c ∈ s.toString.1)
-- Mathlib/Algebra/Group/Defs.lean
/-- An `AddLeftCancelSemigroup` is an additive semigroup such that
`a + b = a + c` implies `b = c`. -/
@[ext]
class AddLeftCancelSemigroup (G : Type u) extends AddSemigroup G where
  protected add_left_cancel : ∀ a b c : G, a + b = a + c → b = c
-- Mathlib/MeasureTheory/Measure/WithDensity.lean
theorem withDensity_tsum {ι : Type*} [Countable ι] {f : ι → α → ℝ≥0∞} (h : ∀ i, Measurable (f i)) :
    μ.withDensity (∑' n, f n) = sum fun n => μ.withDensity (f n)
-- Mathlib/Algebra/Module/Torsion.lean
/-- If the `q i` are pairwise coprime, a `∏ i, q i`-torsion module is the internal direct sum of
its `q i`-torsion submodules. -/
theorem torsionBy_isInternal {q : ι → R} (hq : (S : Set ι).Pairwise <| (IsCoprime on q))
    (hM : Module.IsTorsionBy R M <| ∏ i ∈ S, q i) :
    DirectSum.IsInternal fun i : S => torsionBy R M <| q i
-- Mathlib/Order/Filter/Cocardinal.lean
theorem eventually_cocardinal_ne (x : α) : ∀ᶠ a in cocardinal α hreg, a ≠ x
-- Mathlib/Probability/Kernel/Disintegration/Density.lean
lemma setIntegral_density (hκν : fst κ ≤ ν) [IsFiniteKernel ν]
    (a : α) {s : Set β} (hs : MeasurableSet s) {A : Set γ} (hA : MeasurableSet A) :
    ∫ x in A, density κ ν a x s ∂(ν a) = (κ a (A ×ˢ s)).toReal
-- Mathlib/Algebra/Star/Subsemiring.lean
@[simp]
theorem coe_toSubsemiring (S : StarSubsemiring R) : (S.toSubsemiring : Set R) = S
-- Mathlib/LinearAlgebra/Matrix/BilinearForm.lean
@[simp]
theorem BilinForm.toMatrix'_toBilin' (M : Matrix n n R₂) :
    BilinForm.toMatrix' (Matrix.toBilin' M) = M
-- Mathlib/Algebra/MvPolynomial/Basic.lean
@[simp]
theorem eval₂_mul : ∀ {p}, (p * q).eval₂ f g = p.eval₂ f g * q.eval₂ f g
-- Mathlib/Data/Finset/Basic.lean
theorem filter_inter (s t : Finset α) : filter p s ∩ t = filter p (s ∩ t)
-- Mathlib/CategoryTheory/Monoidal/Transport.lean
/-- We can upgrade `e.functor` to a monoidal functor from `C` to `D` with the transported structure.
-/
@[simps!]
def toTransported (e : C ≌ D) : MonoidalFunctor C (Transported e)
-- Mathlib/Analysis/SpecialFunctions/Trigonometric/Series.lean
/-- The power series expansion of `Real.sinh`. -/
lemma hasSum_sinh (r : ℝ) : HasSum (fun n ↦ r ^ (2 * n + 1) / ↑(2 * n + 1)!) (sinh r)
-- .lake/packages/lean4/src/lean/Init/Data/Array/Lemmas.lean
theorem getElem?_lt
    (a : Array α) {i : Nat} (h : i < a.size) : a[i]? = some (a[i])
-- Mathlib/Order/UpperLower/Basic.lean
@[simp] lemma lowerClosure_eq :
    ↑(lowerClosure s) = s ↔ IsLowerSet s
-- Mathlib/LinearAlgebra/UnitaryGroup.lean
@[simp]
theorem toLin'_mul : toLin' (A * B) = (toLin' A).comp (toLin' B)
-- Mathlib/RingTheory/UniqueFactorizationDomain.lean
/-- The number of times an irreducible factor `p` appears in `normalizedFactors x` is defined by
the number of times it divides `x`. This is a slightly more general version of
`UniqueFactorizationMonoid.count_normalizedFactors_eq` that allows `p = 0`.

See also `multiplicity_eq_count_normalizedFactors` if `n` is given by `multiplicity p x`.
-/
theorem count_normalizedFactors_eq' [DecidableEq R] {p x : R} (hp : p = 0 ∨ Irreducible p)
    (hnorm : normalize p = p) {n : ℕ} (hle : p ^ n ∣ x) (hlt : ¬p ^ (n + 1) ∣ x) :
    (normalizedFactors x).count p = n
-- Mathlib/Init/Data/Nat/Lemmas.lean
theorem cond_decide_mod_two (x : ℕ) [d : Decidable (x % 2 = 1)] :
    cond (@decide (x % 2 = 1) d) 1 0 = x % 2
-- Mathlib/Logic/Hydra.lean
theorem not_cutExpand_zero [IsIrrefl α r] (s) : ¬CutExpand r s 0
-- Mathlib/AlgebraicGeometry/Pullbacks.lean
/-- Given an open cover `{ Zᵢ }` of `Z`, then `X ×[Z] Y` is covered by `Xᵢ ×[Zᵢ] Yᵢ`, where
  `Xᵢ = X ×[Z] Zᵢ` and `Yᵢ = Y ×[Z] Zᵢ` is the preimage of `Zᵢ` in `X` and `Y`. -/
@[simps! J obj map]
def openCoverOfBase (𝒰 : OpenCover Z) (f : X ⟶ Z) (g : Y ⟶ Z) : OpenCover (pullback f g)
-- Mathlib/AlgebraicTopology/SimplexCategory.lean
/-- The special case of the first simplicial identity -/
@[reassoc]
theorem δ_comp_δ_self {n} {i : Fin (n + 2)} : δ i ≫ δ (Fin.castSucc i) = δ i ≫ δ i.succ
-- Mathlib/Analysis/SpecificLimits/Normed.lean
theorem geom_series_succ (x : R) (h : ‖x‖ < 1) : ∑' i : ℕ, x ^ (i + 1) = ∑' i : ℕ, x ^ i - 1
-- Mathlib/Geometry/Euclidean/Angle/Oriented/Affine.lean
/-- Given three points not equal to `p`, the angle between the first and the third at `p` minus
the angle between the second and the third equals the angle between the first and the second. -/
@[simp]
theorem oangle_sub_right {p p₁ p₂ p₃ : P} (hp₁ : p₁ ≠ p) (hp₂ : p₂ ≠ p) (hp₃ : p₃ ≠ p) :
    ∡ p₁ p p₃ - ∡ p₂ p p₃ = ∡ p₁ p p₂
-- Mathlib/Order/Filter/CardinalInter.lean
theorem cardinal_iInter_mem {s : ι → Set α} (hic : #ι < c) :
    (⋂ i, s i) ∈ l ↔ ∀ i, s i ∈ l
-- Mathlib/Algebra/Algebra/Subalgebra/MulOpposite.lean
theorem unop_inf (S₁ S₂ : Subalgebra R Aᵐᵒᵖ) : (S₁ ⊓ S₂).unop = S₁.unop ⊓ S₂.unop
-- Mathlib/CategoryTheory/Limits/Shapes/Equalizers.lean
@[simp]
theorem Fork.app_zero_eq_ι (t : Fork f g) : t.π.app zero = t.ι
-- Mathlib/Order/Fin/Basic.lean
lemma predAbove_left_monotone (i : Fin (n + 1)) : Monotone fun p ↦ predAbove p i
-- Mathlib/Data/Finset/Basic.lean
theorem Subset.trans {s₁ s₂ s₃ : Finset α} : s₁ ⊆ s₂ → s₂ ⊆ s₃ → s₁ ⊆ s₃
-- Mathlib/Data/Bool/Basic.lean
theorem not_ne_id : not ≠ id
-- Mathlib/Algebra/Group/Ext.lean
@[to_additive (attr := ext)]
theorem CancelMonoid.ext {M : Type*} ⦃m₁ m₂ : CancelMonoid M⦄
    (h_mul : (letI := m₁; HMul.hMul : M → M → M) = (letI := m₂; HMul.hMul : M → M → M)) :
    m₁ = m₂
-- Mathlib/Topology/MetricSpace/Pseudo/Defs.lean
theorem dense_iff {s : Set α} : Dense s ↔ ∀ x, ∀ r > 0, (ball x r ∩ s).Nonempty
-- Mathlib/Analysis/Convex/Extreme.lean
@[simp]
theorem extremePoints_empty : (∅ : Set E).extremePoints 𝕜 = ∅
-- Mathlib/GroupTheory/Nilpotent.lean
theorem lowerCentralSeries_antitone : Antitone (lowerCentralSeries G)
-- Mathlib/Analysis/Fourier/AddCircle.lean
theorem fourierCoeffOn_eq_integral {a b : ℝ} (f : ℝ → E) (n : ℤ) (hab : a < b) :
    fourierCoeffOn hab f n =
      (1 / (b - a)) • ∫ x in a..b, fourier (-n) (x : AddCircle (b - a)) • f x
-- Mathlib/RingTheory/Jacobson.lean
private lemma aux_IH {R : Type u} {S : Type v} {T : Type w}
  [CommRing R] [CommRing S] [CommRing T] [IsJacobson S] [Algebra R S] [Algebra R T]
  (IH : ∀ (Q : Ideal S), (IsMaximal Q) → RingHom.IsIntegral (algebraMap R (S ⧸ Q)))
  (v : S[X] ≃ₐ[R] T) (P : Ideal T) (hP : P.IsMaximal) :
  RingHom.IsIntegral (algebraMap R (T ⧸ P))
-- Mathlib/MeasureTheory/Function/L1Space.lean
theorem integrable_withDensity_iff_integrable_coe_smul {f : α → ℝ≥0} (hf : Measurable f)
    {g : α → E} :
    Integrable g (μ.withDensity fun x => f x) ↔ Integrable (fun x => (f x : ℝ) • g x) μ
-- Mathlib/Analysis/SpecialFunctions/Trigonometric/Basic.lean
theorem tan_lt_tan_of_nonneg_of_lt_pi_div_two {x y : ℝ} (hx₁ : 0 ≤ x) (hy₂ : y < π / 2)
    (hxy : x < y) : tan x < tan y
-- Mathlib/Order/Filter/Basic.lean
theorem range_mem_map : range m ∈ map m f
-- Mathlib/Order/Max.lean
protected theorem IsTop.isMax (h : IsTop a) : IsMax a
-- Mathlib/NumberTheory/Padics/PadicIntegers.lean
theorem norm_p_pow (n : ℕ) : ‖(p : ℤ_[p]) ^ n‖ = (p : ℝ) ^ (-n : ℤ)
-- Mathlib/FieldTheory/SeparableDegree.lean
/-- A polynomial has zero separable degree if and only if it is constant. -/
theorem natSepDegree_eq_zero_iff : f.natSepDegree = 0 ↔ f.natDegree = 0
-- Mathlib/Data/Finset/Lattice.lean
@[simp]
theorem inf'_lt_iff : s.inf' H f < a ↔ ∃ i ∈ s, f i < a
-- Mathlib/Topology/Homeomorph.lean
lemma image_compl (h : X ≃ₜ Y) (s : Set X) : h '' (sᶜ) = (h '' s)ᶜ
-- Mathlib/Geometry/Manifold/IntegralCurve.lean
/-- If the vector field `v` vanishes at `x₀`, then the constant curve at `x₀`
is a global integral curve of `v`. -/
lemma isIntegralCurve_const {x : M} (h : v x = 0) : IsIntegralCurve (fun _ ↦ x) v
-- Mathlib/CategoryTheory/Adjunction/Mates.lean
/-- The mates equivalence commutes with this composition, essentially by `mateEquiv_vcomp`. -/
theorem mateEquiv_conjugateEquiv_vcomp
    (α : G ⋙ L₂ ⟶ L₁ ⋙ H) (β : L₃ ⟶ L₂) :
    (mateEquiv adj₁ adj₃) (leftAdjointSquareConjugate.vcomp α β) =
      rightAdjointSquareConjugate.vcomp (mateEquiv adj₁ adj₂ α) (conjugateEquiv adj₂ adj₃ β)
-- Mathlib/Algebra/BigOperators/Group/Finset.lean
@[to_additive]
theorem prod_comm {s : Finset γ} {t : Finset α} {f : γ → α → β} :
    (∏ x ∈ s, ∏ y ∈ t, f x y) = ∏ y ∈ t, ∏ x ∈ s, f x y
-- Mathlib/LinearAlgebra/Dimension/Basic.lean
theorem LinearMap.rank_le_of_surjective (f : M →ₗ[R] M₁) (h : Surjective f) :
    Module.rank R M₁ ≤ Module.rank R M
-- Mathlib/RingTheory/Valuation/ValuationRing.lean
/-- If `𝒪` satisfies `v.integers 𝒪` where `v` is a valuation on a field, then `𝒪`
is a valuation ring. -/
theorem of_integers : ValuationRing 𝒪
-- Mathlib/Topology/Category/CompHausLike/Limits.lean
/--
A typeclass describing the property that explicit pullbacks along inclusion maps into disjoint
unions is stable under the property `P`.
-/
class HasExplicitPullbacksOfInclusions [HasExplicitFiniteCoproducts.{0} P] : Prop where
  hasProp : ∀ {X Y Z : CompHausLike P} (f : Z ⟶ X ⨿ Y), HasExplicitPullback coprod.inl f
-- Mathlib/Analysis/MeanInequalities.lean
theorem inner_le_Lp_mul_Lq_tsum' {f g : ι → ℝ≥0} {p q : ℝ} (hpq : p.IsConjExponent q)
    (hf : Summable fun i => f i ^ p) (hg : Summable fun i => g i ^ q) :
    ∑' i, f i * g i ≤ (∑' i, f i ^ p) ^ (1 / p) * (∑' i, g i ^ q) ^ (1 / q)
-- Mathlib/Order/Filter/Pointwise.lean
@[to_additive]
theorem smul_le_smul_right : f₁ ≤ f₂ → f₁ • g ≤ f₂ • g
-- Mathlib/NumberTheory/ModularForms/CongruenceSubgroups.lean
@[simp]
theorem Gamma_mem (N : ℕ) (γ : SL(2, ℤ)) : γ ∈ Gamma N ↔ ((↑ₘγ 0 0 : ℤ) : ZMod N) = 1 ∧
    ((↑ₘγ 0 1 : ℤ) : ZMod N) = 0 ∧ ((↑ₘγ 1 0 : ℤ) : ZMod N) = 0 ∧ ((↑ₘγ 1 1 : ℤ) : ZMod N) = 1
-- Mathlib/Tactic/Sat/FromLRAT.lean
theorem Fmla.subsumes_self (f : Fmla) : f.subsumes f
-- Mathlib/RingTheory/AdicCompletion/Functoriality.lean
/-- Equality of linear maps out of an adic completion can be checked on Cauchy sequences. -/
@[ext]
theorem map_ext'' {f g : AdicCompletion I M →ₗ[R] N}
    (h : f.comp (AdicCompletion.mk I M) = g.comp (AdicCompletion.mk I M)) :
    f = g
-- Mathlib/Algebra/MvPolynomial/Derivation.lean
@[simp]
theorem mkDerivation_X (f : σ → A) (i : σ) : mkDerivation R f (X i) = f i
-- Mathlib/RingTheory/PrincipalIdealDomain.lean
/-- See also `Irreducible.isRelPrime_iff_not_dvd`. -/
theorem Irreducible.coprime_iff_not_dvd {p n : R} (hp : Irreducible p) :
    IsCoprime p n ↔ ¬p ∣ n
-- .lake/packages/lean4/src/lean/Init/Data/List/Lemmas.lean
theorem append_eq_append : List.append l₁ l₂ = l₁ ++ l₂
-- Mathlib/Algebra/BigOperators/Group/Multiset.lean
theorem sum_nat_mod (s : Multiset ℕ) (n : ℕ) : s.sum % n = (s.map (· % n)).sum % n
-- Mathlib/RingTheory/Polynomial/ScaleRoots.lean
theorem scaleRoots_aeval_eq_zero [Algebra R A] {p : R[X]} {a : A} {r : R} (ha : aeval a p = 0) :
    aeval (algebraMap R A r * a) (scaleRoots p r) = 0
-- Mathlib/Algebra/Lie/Submodule.lean
@[simp]
theorem comap_coeSubmodule :
    (LieSubmodule.toSubmodule (comap f J)) = (LieSubmodule.toSubmodule J).comap (f : L →ₗ[R] L')
-- Mathlib/Computability/Partrec.lean
theorem vector_head {n} : Computable (@Vector.head α n)
-- Mathlib/CategoryTheory/Subobject/Basic.lean
theorem le_mk_of_comm {B A : C} {X : Subobject B} {f : A ⟶ B} [Mono f] (g : (X : C) ⟶ A)
    (w : g ≫ f = X.arrow) : X ≤ mk f
-- Mathlib/NumberTheory/Padics/PadicNumbers.lean
theorem norm_one : norm (1 : PadicSeq p) = 1
-- Mathlib/CategoryTheory/Sites/PreservesLocallyBijective.lean
lemma isLocallySurjective_of_whisker (hH : CoverPreserving J K H)
    [H.IsCoverDense K] [IsLocallySurjective J (whiskerLeft H.op f)] : IsLocallySurjective K f
-- Mathlib/Data/Finset/Basic.lean
theorem union_sdiff_right (s t : Finset α) : (s ∪ t) \ t = s \ t
-- .lake/packages/lean4/src/lean/Init/Control/Lawful/Basic.lean
theorem map_congr [Functor m] {x : m α} {f g : α → β} (h : ∀ a, f a = g a) : (f <$> x : m β) = g <$> x
-- Mathlib/CategoryTheory/Generator.lean
/-- A category with pullbacks and a small detecting set is well-powered. -/
theorem wellPowered_of_isDetecting [HasPullbacks C] {𝒢 : Set C} [Small.{v₁} 𝒢]
    (h𝒢 : IsDetecting 𝒢) : WellPowered C
-- Mathlib/Data/Fintype/BigOperators.lean
lemma card_filter_piFinset_const_eq_of_mem (s : Finset κ) (i : ι) {x : κ} (hx : x ∈ s) :
    ((piFinset fun _ ↦ s).filter fun f ↦ f i = x).card = s.card ^ (card ι - 1)
-- Mathlib/Data/Finset/Pointwise.lean
@[to_additive (attr := simp)]
lemma inv_univ [Fintype α] : (univ : Finset α)⁻¹ = univ
-- Mathlib/CategoryTheory/Limits/FunctorCategory.lean
/-- The limit of a diagram `F : J ⥤ K ⥤ C` is isomorphic to the functor given by
the individual limits on objects. -/
@[simps!]
def limitIsoFlipCompLim [HasLimitsOfShape J C] (F : J ⥤ K ⥤ C) : limit F ≅ F.flip ⋙ lim
-- Mathlib/Algebra/Ring/Ext.lean
theorem toNonAssocSemiring_injective :
    Function.Injective (@toNonAssocSemiring R)
-- Mathlib/Logic/Function/Basic.lean
theorem Injective.of_comp_right {g : γ → α} (I : Injective (f ∘ g)) (hg : Surjective g) :
    Injective f
-- Mathlib/GroupTheory/GroupAction/Basic.lean
@[to_additive]
lemma orbitRel.quotient_eq_of_quotient_subgroup_eq' {H : Subgroup G} {a b : α}
    (h : (Quotient.mk'' a : orbitRel.Quotient H α) = Quotient.mk'' b) :
    (Quotient.mk'' a : orbitRel.Quotient G α) = Quotient.mk'' b
-- Mathlib/GroupTheory/SpecificGroups/Cyclic.lean
@[to_additive]
theorem IsCyclic.of_exponent_eq_card [CommGroup α] [Fintype α] (h : exponent α = Fintype.card α) :
    IsCyclic α
-- Mathlib/Probability/Distributions/Gaussian.lean
/-- The map of a Gaussian distribution by addition of a constant is a Gaussian. -/
lemma gaussianReal_map_add_const (y : ℝ) :
    (gaussianReal μ v).map (· + y) = gaussianReal (μ + y) v
-- Mathlib/Topology/Connected/Basic.lean
theorem IsConnected.isPreconnected {s : Set α} (h : IsConnected s) : IsPreconnected s
-- Mathlib/CategoryTheory/Sigma/Basic.lean
/-- The functor `Sigma.map` applied to a composition is a composition of functors. -/
@[simps!]
def mapComp (f : K → J) (g : J → I) : map (fun x ↦ C (g x)) f ⋙ (map C g : _) ≅ map C (g ∘ f)
-- Mathlib/Algebra/GroupWithZero/Indicator.lean
lemma inter_indicator_one : (s ∩ t).indicator (1 : ι → M₀) = s.indicator 1 * t.indicator 1
-- Mathlib/Data/Set/Pointwise/Interval.lean
@[simp]
theorem preimage_const_add_Ici : (fun x => a + x) ⁻¹' Ici b = Ici (b - a)
-- Mathlib/RingTheory/Localization/Basic.lean
@[simp]
theorem lift_comp : (lift hg).comp (algebraMap R S) = g
-- Mathlib/LinearAlgebra/BilinearForm/Properties.lean
protected theorem sub {B₁ B₂ : BilinForm R₁ M₁} (hB₁ : B₁.IsAlt) (hB₂ : B₂.IsAlt) :
    (B₁ - B₂).IsAlt
-- Mathlib/Algebra/BigOperators/Finprod.lean
@[to_additive]
theorem finprod_eq_finset_prod_of_mulSupport_subset (f : α → M) {s : Finset α}
    (h : mulSupport f ⊆ (s : Set α)) : ∏ᶠ i, f i = ∏ i ∈ s, f i
-- Mathlib/Combinatorics/SimpleGraph/Metric.lean
lemma exists_walk_of_edist_eq_coe {k : ℕ} (h : G.edist u v = k) :
    ∃ p : G.Walk u v, p.length = k
-- Mathlib/RingTheory/Binomial.lean
@[simp]
theorem multichoose_one_right' (r : R) : multichoose r 1 = r ^ 1
-- Mathlib/Algebra/Order/Module/Pointwise.lean
lemma BddBelow.smul_of_nonpos (ha : a ≤ 0) (hs : BddBelow s) : BddAbove (a • s)
-- Mathlib/Analysis/Normed/Lp/ProdLp.lean
theorem prod_lipschitzWith_equiv [PseudoEMetricSpace α] [PseudoEMetricSpace β] :
    LipschitzWith 1 (WithLp.equiv p (α × β))
-- Mathlib/LinearAlgebra/TensorPower.lean
@[ext]
theorem gradedMonoid_eq_of_cast {a b : GradedMonoid fun n => ⨂[R] _ : Fin n, M} (h : a.fst = b.fst)
    (h2 : cast R M h a.snd = b.snd) : a = b
-- Mathlib/MeasureTheory/Measure/MeasureSpace.lean
@[to_additive]
theorem pairwise_aedisjoint_of_aedisjoint_forall_ne_one {G α : Type*} [Group G] [MulAction G α]
    [MeasurableSpace α] {μ : Measure α} {s : Set α}
    (h_ae_disjoint : ∀ g ≠ (1 : G), AEDisjoint μ (g • s) s)
    (h_qmp : ∀ g : G, QuasiMeasurePreserving (g • ·) μ μ) :
    Pairwise (AEDisjoint μ on fun g : G => g • s)
-- Mathlib/Data/List/Sort.lean
theorem orderedInsert_count [DecidableEq α] (L : List α) (a b : α) :
    count a (L.orderedInsert r b) = count a L + if a = b then 1 else 0
-- Mathlib/Order/UpperLower/Basic.lean
@[simp]
theorem map_Ioi (f : α ≃o β) (a : α) : map f (Ioi a) = Ioi (f a)
-- Mathlib/Algebra/Group/Subsemigroup/Operations.lean
@[to_additive le_prod_iff]
theorem le_prod_iff {s : Subsemigroup M} {t : Subsemigroup N} {u : Subsemigroup (M × N)} :
    u ≤ s.prod t ↔ u.map (fst M N) ≤ s ∧ u.map (snd M N) ≤ t
-- Mathlib/Algebra/Group/Subgroup/Basic.lean
/-- The image of the normalizer is equal to the normalizer of the image of a bijective
  function. -/
@[to_additive
      "The image of the normalizer is equal to the normalizer of the image of a bijective
        function."]
theorem map_normalizer_eq_of_bijective (H : Subgroup G) {f : G →* N} (hf : Function.Bijective f) :
    H.normalizer.map f = (H.map f).normalizer
-- Mathlib/Tactic/NormNum/IsCoprime.lean
theorem int_not_isCoprime_helper (x y : ℤ) (d : ℕ) (hd : Int.gcd x y = d)
    (h : Nat.beq d 1 = false) : ¬ IsCoprime x y
-- Mathlib/Algebra/Order/Monoid/Unbundled/Defs.lean
theorem rel_act_of_rel_of_rel_act (ab : r a b) (rr : r c (μ m a)) : r c (μ m b)
-- Mathlib/Algebra/Algebra/Unitization.lean
/-- Non-unital algebra homomorphisms from `A` into a unital `R`-algebra `C` lift uniquely to
`Unitization R A →ₐ[R] C`. This is the universal property of the unitization. -/
@[simps! apply symm_apply apply_apply]
def lift : (A →ₙₐ[R] C) ≃ (Unitization R A →ₐ[R] C)
-- Mathlib/Order/Interval/Finset/Basic.lean
lemma sup'_Iic (a : α) : (Iic a).sup' nonempty_Iic id = a
-- Mathlib/Data/Num/Lemmas.lean
@[simp, norm_cast]
theorem cast_bit0 [AddGroupWithOne α] : ∀ n : ZNum, (n.bit0 : α) = (n : α) + n
-- Mathlib/Order/Hom/Lattice.lean
@[simp]
theorem withBot_id : (SupHom.id α).withBot = SupBotHom.id _
-- Mathlib/MeasureTheory/Integral/Bochner.lean
@[norm_cast]
theorem SimpleFunc.integral_L1_eq_integral (f : α →₁ₛ[μ] E) :
    L1.integral (f : α →₁[μ] E) = SimpleFunc.integral f
-- Mathlib/LinearAlgebra/SModEq.lean
@[refl]
protected theorem refl (x : M) : x ≡ x [SMOD U]
-- Mathlib/Algebra/Polynomial/Module/Basic.lean
@[simp]
theorem monomial_smul_single (i : ℕ) (r : R) (j : ℕ) (m : M) :
    monomial i r • single R j m = single R (i + j) (r • m)
-- Mathlib/CategoryTheory/Sites/ConcreteSheafification.lean
/-- The sheafification functor is left adjoint to the forgetful functor. -/
@[simps! unit_app counit_app_val]
noncomputable def plusPlusAdjunction : plusPlusSheaf J D ⊣ sheafToPresheaf J D
-- Mathlib/Algebra/Ring/Subsemiring/Basic.lean
@[simp, norm_cast]
theorem coe_one : ((1 : s) : R) = (1 : R)
-- Mathlib/Data/Complex/Basic.lean
@[simp]
theorem zero_im : (0 : ℂ).im = 0
-- Mathlib/Data/Set/Finite.lean
theorem Finite.image {s : Set α} (f : α → β) (hs : s.Finite) : (f '' s).Finite
-- Mathlib/Analysis/Calculus/FDeriv/Measurable.lean
@[measurability, fun_prop]
theorem measurable_fderiv : Measurable (fderiv 𝕜 f)
-- Mathlib/Geometry/Manifold/ContMDiff/Basic.lean
theorem contMDiffOn_const : ContMDiffOn I I' n (fun _ : M => c) s
-- Mathlib/Algebra/Lie/Weights/Cartan.lean
@[simp]
theorem rootSpace_zero_eq (H : LieSubalgebra R L) [H.IsCartanSubalgebra] [IsNoetherian R L] :
    rootSpace H 0 = H.toLieSubmodule
-- Mathlib/Algebra/Group/Hom/Defs.lean
@[to_additive (attr := simp)]
theorem MonoidHom.toMulHom_coe [MulOneClass M] [MulOneClass N] (f : M →* N) :
    f.toMulHom.toFun = f