ruc-ai4math/mathlib_handler_benchmark_410 huggingface dataset:
-- Mathlib/RepresentationTheory/Action/Concrete.lean
@[simp]
theorem ofMulAction_apply {G : Type u} {H : FintypeCat.{u}} [Monoid G] [MulAction G H]
    (g : G) (x : H) : (FintypeCat.ofMulAction G H).ρ g x = (g • x : H)
-- Mathlib/Algebra/Group/Action/Sum.lean
@[to_additive]
theorem smul_def : a • x = x.map (a • ·) (a • ·)
-- Mathlib/Data/NNReal/Basic.lean
@[simp, norm_cast] lemma coe_lt_one : (r : ℝ) < 1 ↔ r < 1
-- Mathlib/Data/List/Basic.lean
theorem get_attach (L : List α) (i) :
    (L.attach.get i).1 = L.get ⟨i, length_attach L ▸ i.2⟩
-- Mathlib/Analysis/Normed/Group/Basic.lean
@[to_additive eq_of_norm_sub_le_zero]
theorem eq_of_norm_div_le_zero (h : ‖a / b‖ ≤ 0) : a = b
-- Mathlib/Analysis/Convex/Side.lean
theorem wSameSide_smul_vsub_vadd_right {s : AffineSubspace R P} {p₁ p₂ : P} (x : P) (hp₁ : p₁ ∈ s)
    (hp₂ : p₂ ∈ s) {t : R} (ht : 0 ≤ t) : s.WSameSide x (t • (x -ᵥ p₁) +ᵥ p₂)
-- Mathlib/FieldTheory/NormalClosure.lean
lemma normalClosure_le_iSup_adjoin :
    normalClosure F K L ≤ ⨆ x : K, IntermediateField.adjoin F ((minpoly F x).rootSet L)
-- Mathlib/Geometry/Manifold/ChartedSpace.lean
@[simp, mfld_simps]
lemma chart_mem_atlas (H : Type*) {M : Type*} [TopologicalSpace H] [TopologicalSpace M]
    [ChartedSpace H M] (x : M) : chartAt H x ∈ atlas H M
-- Mathlib/RingTheory/Int/Basic.lean
theorem span_natAbs (a : ℤ) : Ideal.span ({(a.natAbs : ℤ)} : Set ℤ) = Ideal.span {a}
-- Mathlib/LinearAlgebra/SesquilinearForm.lean
theorem separatingRight_iff_linear_flip_nontrivial {B : M₁ →ₛₗ[I₁] M₂ →ₛₗ[I₂] M} :
    B.SeparatingRight ↔ ∀ y : M₂, B.flip y = 0 → y = 0
-- Mathlib/Analysis/Calculus/MeanValue.lean
/-- Let `f` be a function continuous on a convex (or, equivalently, connected) subset `D`
of the real line. If `f` is differentiable on the interior of `D` and `f'` is strictly positive,
then `f` is a strictly monotone function on `D`. -/
lemma strictAntiOn_of_hasDerivWithinAt_neg {D : Set ℝ} (hD : Convex ℝ D) {f f' : ℝ → ℝ}
    (hf : ContinuousOn f D) (hf' : ∀ x ∈ interior D, HasDerivWithinAt f (f' x) (interior D) x)
    (hf'₀ : ∀ x ∈ interior D, f' x < 0) : StrictAntiOn f D
-- Mathlib/Algebra/DirectSum/Basic.lean
@[simp]
theorem zero_apply (i : ι) : (0 : ⨁ i, β i) i = 0
-- Mathlib/Algebra/Group/Subsemigroup/Operations.lean
@[to_additive]
theorem map_comap_le {S : Subsemigroup N} {f : M →ₙ* N} : (S.comap f).map f ≤ S
-- Mathlib/RingTheory/HahnSeries/Addition.lean
theorem leadingCoeff_add_eq_right {Γ} [LinearOrder Γ] {x y : HahnSeries Γ R}
    (hxy : y.orderTop < x.orderTop) : (x + y).leadingCoeff = y.leadingCoeff
-- Mathlib/Algebra/Divisibility/Basic.lean
theorem dvd_of_eq (h : a = b) : a ∣ b
-- Mathlib/Algebra/Polynomial/Degree/TrailingDegree.lean
theorem le_trailingDegree_monomial : ↑n ≤ trailingDegree (monomial n a)
-- Mathlib/RingTheory/Ideal/Maps.lean
/-- The `Ideal` version of `Set.preimage_subset_image_of_inverse`. -/
theorem comap_le_map_of_inverse (g : G) (I : Ideal S) (h : Function.LeftInverse g f) :
    I.comap f ≤ I.map g
-- Mathlib/Combinatorics/SimpleGraph/Walk.lean
@[simp]
theorem length_darts {u v : V} (p : G.Walk u v) : p.darts.length = p.length
-- Mathlib/Analysis/BoxIntegral/Partition/Measure.lean
theorem measurableSet_coe : MeasurableSet (I : Set (ι → ℝ))
-- Mathlib/Data/Sum/Interval.lean
@[simp]
theorem Icc_inr_inl : Icc (inr b₁) (inl a₂) = ∅
-- Mathlib/Order/Iterate.lean
theorem le_iterate_comp_of_le (hf : Monotone f) (H : h ∘ g ≤ f ∘ h) (n : ℕ) :
    h ∘ g^[n] ≤ f^[n] ∘ h
-- Mathlib/Data/Real/EReal.lean
@[simp]
lemma inv_zero : (0 : EReal)⁻¹ = 0
-- Mathlib/GroupTheory/SemidirectProduct.lean
@[simp]
theorem right_inl (n : N) : (inl n : N ⋊[φ] G).right = 1
-- Mathlib/Analysis/MeanInequalities.lean
theorem summable_Lp_add {f g : ι → ℝ≥0} {p : ℝ} (hp : 1 ≤ p) (hf : Summable fun i => f i ^ p)
    (hg : Summable fun i => g i ^ p) : Summable fun i => (f i + g i) ^ p
-- Mathlib/Analysis/Normed/Group/Basic.lean
@[to_additive]
theorem NormedCommGroup.tendsto_nhds_one {f : α → E} {l : Filter α} :
    Tendsto f l (𝓝 1) ↔ ∀ ε > 0, ∀ᶠ x in l, ‖f x‖ < ε
-- Mathlib/Order/Interval/Set/Monotone.lean
protected theorem Monotone.Iio (hf : Monotone f) : Monotone fun x => Iio (f x)
-- Mathlib/Order/GaloisConnection.lean
theorem l_iSup_u [CompleteLattice α] [CompleteLattice β] (gi : GaloisInsertion l u) {ι : Sort x}
    (f : ι → β) : l (⨆ i, u (f i)) = ⨆ i, f i
-- Mathlib/SetTheory/ZFC/Basic.lean
@[simp]
theorem mk_out : ∀ x : ZFSet, mk x.out = x
-- Mathlib/Topology/LocallyConstant/Basic.lean
/--
The equivalence between `LocallyConstant X Z` and `LocallyConstant Y Z` given a
homeomorphism `X ≃ₜ Y`
-/
@[simps]
def congrLeft [TopologicalSpace Y] (e : X ≃ₜ Y) : LocallyConstant X Z ≃ LocallyConstant Y Z
-- Mathlib/Order/Interval/Finset/Basic.lean
theorem right_not_mem_Ico : b ∉ Ico a b
-- Mathlib/Geometry/Manifold/Sheaf/Smooth.lean
@[simp, reassoc, elementwise] lemma smoothSheafCommRing.ι_evalHom (x : TopCat.of M) (U) :
    colimit.ι ((OpenNhds.inclusion x).op ⋙ _) U ≫ smoothSheafCommRing.evalHom IM I M R x =
    smoothSheafCommRing.evalAt _ _ _ _ _ _
-- Mathlib/Logic/Equiv/Defs.lean
protected theorem Perm.congr_arg {f : Equiv.Perm α} {x x' : α} : x = x' → f x = f x'
-- Mathlib/Dynamics/Circle/RotationNumber/TranslationNumber.lean
theorem commute_sub_int (n : ℤ) : Function.Commute f (· - n)
-- Mathlib/MeasureTheory/MeasurableSpace/Basic.lean
protected theorem MeasurableSet.univ_pi [Countable δ] {t : ∀ i : δ, Set (π i)}
    (ht : ∀ i, MeasurableSet (t i)) : MeasurableSet (pi univ t)
-- Mathlib/Computability/Halting.lean
theorem Partrec.dom_re {α β} [Primcodable α] [Primcodable β] {f : α →. β} (h : Partrec f) :
    RePred fun a => (f a).Dom
-- Mathlib/LinearAlgebra/RootSystem/RootPositive.lean
lemma two_mul_apply_root_root :
    2 * B (P.root i) (P.root j) = P.pairing i j * B (P.root j) (P.root j)
-- Mathlib/Data/Complex/Exponential.lean
theorem abs_exp_sub_one_le {x : ℂ} (hx : abs x ≤ 1) : abs (exp x - 1) ≤ 2 * abs x
-- Mathlib/NumberTheory/NumberField/Units/Basic.lean
/-- If `k` does not divide `torsionOrder` then there are no nontrivial roots of unity of
  order dividing `k`. -/
theorem rootsOfUnity_eq_one [NumberField K] {k : ℕ+} (hc : Nat.Coprime k (torsionOrder K))
    {ζ : (𝓞 K)ˣ} : ζ ∈ rootsOfUnity k (𝓞 K) ↔ ζ = 1
-- Mathlib/Geometry/Manifold/VectorBundle/Tangent.lean
theorem tangentBundleCore_coordChange_model_space (x x' z : H) :
    (tangentBundleCore I H).coordChange (achart H x) (achart H x') z =
    ContinuousLinearMap.id 𝕜 E
-- Mathlib/MeasureTheory/Integral/IntegralEqImproper.lean
/-- Slight reformulation of
    `MeasureTheory.AECover.integral_tendsto_of_countably_generated`. -/
theorem AECover.integral_eq_of_tendsto [l.NeBot] [l.IsCountablyGenerated] {φ : ι → Set α}
    (hφ : AECover μ l φ) {f : α → E} (I : E) (hfi : Integrable f μ)
    (h : Tendsto (fun n => ∫ x in φ n, f x ∂μ) l (𝓝 I)) : ∫ x, f x ∂μ = I
-- Mathlib/Topology/MetricSpace/IsometricSMul.lean
@[to_additive (attr := simp)]
theorem dist_div_right [DivInvMonoid M] [PseudoMetricSpace M] [IsometricSMul Mᵐᵒᵖ M]
    (a b c : M) : dist (a / c) (b / c) = dist a b
-- Mathlib/CategoryTheory/Monoidal/Types/Basic.lean
@[simp]
theorem leftUnitor_hom_apply {X : Type u} {x : X} {p : PUnit} :
    ((λ_ X).hom : 𝟙_ (Type u) ⊗ X → X) (p, x) = x
-- Mathlib/Data/Sigma/Basic.lean
lemma map_mk (f₁ : α₁ → α₂) (f₂ : ∀ a, β₁ a → β₂ (f₁ a)) (x : α₁) (y : β₁ x) :
    map f₁ f₂ ⟨x, y⟩ = ⟨f₁ x, f₂ x y⟩
-- Mathlib/Analysis/NormedSpace/RCLike.lean
/-- Lemma to normalize a vector in a normed space `E` over either `ℂ` or `ℝ` to length `r`. -/
theorem norm_smul_inv_norm' {r : ℝ} (r_nonneg : 0 ≤ r) {x : E} (hx : x ≠ 0) :
    ‖((r : 𝕜) * (‖x‖ : 𝕜)⁻¹) • x‖ = r
-- Mathlib/RingTheory/Finiteness.lean
/-- **Nakayama's Lemma**. Atiyah-Macdonald 2.5, Eisenbud 4.7, Matsumura 2.2,
[Stacks 00DV](https://stacks.math.columbia.edu/tag/00DV) -/
theorem exists_sub_one_mem_and_smul_eq_zero_of_fg_of_le_smul {R : Type*} [CommRing R] {M : Type*}
    [AddCommGroup M] [Module R M] (I : Ideal R) (N : Submodule R M) (hn : N.FG) (hin : N ≤ I • N) :
    ∃ r : R, r - 1 ∈ I ∧ ∀ n ∈ N, r • n = (0 : M)
-- Mathlib/Algebra/Order/CauSeq/Completion.lean
/-- `CauSeq.Completion.ofRat` as a `RingHom` -/
@[simps]
def ofRatRingHom : β →+* (Cauchy abv)
-- Mathlib/Topology/Algebra/GroupWithZero.lean
@[fun_prop]
theorem ContinuousOn.inv₀ (hf : ContinuousOn f s) (h0 : ∀ x ∈ s, f x ≠ 0) :
    ContinuousOn (fun x => (f x)⁻¹) s
-- Mathlib/Topology/Algebra/UniformConvergence.lean
@[to_additive]
protected theorem UniformOnFun.hasBasis_nhds_one (𝔖 : Set <| Set α) (h𝔖₁ : 𝔖.Nonempty)
    (h𝔖₂ : DirectedOn (· ⊆ ·) 𝔖) :
    (𝓝 1 : Filter (α →ᵤ[𝔖] G)).HasBasis
      (fun SV : Set α × Set G => SV.1 ∈ 𝔖 ∧ SV.2 ∈ (𝓝 1 : Filter G)) fun SV =>
      { f : α →ᵤ[𝔖] G | ∀ x ∈ SV.1, f x ∈ SV.2 }
-- Mathlib/CategoryTheory/Limits/HasLimits.lean
theorem HasColimits.hasColimitsOfShape {C : Type u} [Category.{v} C] [HasColimits C] (J : Type v)
    [Category.{v} J] : HasColimitsOfShape J C
-- Mathlib/RingTheory/Localization/LocalizationLocalization.lean
theorem isFractionRing_of_isDomain_of_isLocalization [IsDomain R] (S T : Type*) [CommRing S]
    [CommRing T] [Algebra R S] [Algebra R T] [Algebra S T] [IsScalarTower R S T]
    [IsLocalization M S] [IsFractionRing R T] : IsFractionRing S T
-- Mathlib/Data/Nat/Factorial/SuperFactorial.lean
theorem superFactorial_two_mul : ∀ n : ℕ,
    sf (2 * n) = (∏ i ∈ range n, (2 * i + 1) !) ^ 2 * 2 ^ n * n !
-- Mathlib/MeasureTheory/Integral/SetToL1.lean
theorem setToL1_add_left' (hT : DominatedFinMeasAdditive μ T C)
    (hT' : DominatedFinMeasAdditive μ T' C') (hT'' : DominatedFinMeasAdditive μ T'' C'')
    (h_add : ∀ s, MeasurableSet s → μ s < ∞ → T'' s = T s + T' s) (f : α →₁[μ] E) :
    setToL1 hT'' f = setToL1 hT f + setToL1 hT' f
-- .lake/packages/lean4/src/lean/Init/Data/Option/Lemmas.lean
@[simp] theorem none_orElse (x : Option α) : (none <|> x) = x
-- .lake/packages/lean4/src/lean/Init/Data/Nat/Basic.lean
theorem add_one_le_add_one_iff : a + 1 ≤ b + 1 ↔ a ≤ b
-- Mathlib/Algebra/Field/Subfield.lean
/-- Product of elements of a subfield indexed by a `Finset` is in the subfield. -/
protected theorem prod_mem {ι : Type*} {t : Finset ι} {f : ι → K} (h : ∀ c ∈ t, f c ∈ s) :
    (∏ i ∈ t, f i) ∈ s
-- Mathlib/Analysis/SpecialFunctions/Complex/Log.lean
theorem _root_.Filter.Tendsto.clog {l : Filter α} {f : α → ℂ} {x : ℂ} (h : Tendsto f l (𝓝 x))
    (hx : x ∈ slitPlane) : Tendsto (fun t => log (f t)) l (𝓝 <| log x)
-- Mathlib/Geometry/Euclidean/Sphere/SecondInter.lean
/-- The distance between `secondInter` and the center equals the distance between the original
point and the center. -/
@[simp]
theorem Sphere.secondInter_dist (s : Sphere P) (p : P) (v : V) :
    dist (s.secondInter p v) s.center = dist p s.center
-- Mathlib/Topology/Separation.lean
/-- If the codomain of a closed embedding is a T₄ space, then so is the domain. -/
protected theorem ClosedEmbedding.t4Space [TopologicalSpace Y] [T4Space Y] {f : X → Y}
    (hf : ClosedEmbedding f) : T4Space X
-- Mathlib/Analysis/Complex/Angle.lean
lemma angle_exp_exp (x y : ℝ) :
    angle (exp (x * I)) (exp (y * I)) = |toIocMod Real.two_pi_pos (-π) (x - y)|
-- Mathlib/Analysis/MeanInequalities.lean
theorem geom_mean_weighted_of_constant (w z : ι → ℝ) (x : ℝ) (hw : ∀ i ∈ s, 0 ≤ w i)
    (hw' : ∑ i ∈ s, w i = 1) (hz : ∀ i ∈ s, 0 ≤ z i) (hx : ∀ i ∈ s, w i ≠ 0 → z i = x) :
    ∏ i ∈ s, z i ^ w i = x
-- Mathlib/Order/Hom/Lattice.lean
@[simp]
theorem symm_dual_comp (g : SupHom βᵒᵈ γᵒᵈ) (f : SupHom αᵒᵈ βᵒᵈ) :
    InfHom.dual.symm (g.comp f) =
      (InfHom.dual.symm g).comp (InfHom.dual.symm f)
-- Mathlib/Topology/Support.lean
@[to_additive]
theorem _root_.isCompact_range_of_mulSupport_subset_isCompact [TopologicalSpace β]
    (hf : Continuous f) {k : Set α} (hk : IsCompact k) (h'f : mulSupport f ⊆ k) :
    IsCompact (range f)
-- Mathlib/RingTheory/OreLocalization/Basic.lean
private theorem add''_char (r₁ : X) (s₁ : S) (r₂ : X) (s₂ : S) (rb : R) (sb : R)
    (hb : sb * s₁ = rb * s₂) (h : sb * s₁ ∈ S) :
    add'' r₁ s₁ r₂ s₂ = (sb • r₁ + rb • r₂) /ₒ ⟨sb * s₁, h⟩
-- Mathlib/Algebra/Algebra/Subalgebra/Basic.lean
@[simp]
theorem mem_toSubring {R : Type u} {A : Type v} [CommRing R] [Ring A] [Algebra R A]
    {S : Subalgebra R A} {x} : x ∈ S.toSubring ↔ x ∈ S
-- Mathlib/CategoryTheory/ComposableArrows.lean
@[simp]
lemma homMkSucc_app_zero : (homMkSucc α β w).app 0 = α
-- Mathlib/Order/Monotone/Basic.lean
@[simp]
theorem strictAnti_toDual_comp_iff : StrictAnti (toDual ∘ f : α → βᵒᵈ) ↔ StrictMono f
-- Mathlib/Topology/Algebra/Module/Basic.lean
@[simp]
theorem coe_funUnique : ⇑(funUnique ι R M) = Function.eval default
-- Mathlib/RingTheory/Int/Basic.lean
theorem Int.Prime.dvd_mul' {m n : ℤ} {p : ℕ} (hp : Nat.Prime p) (h : (p : ℤ) ∣ m * n) :
    (p : ℤ) ∣ m ∨ (p : ℤ) ∣ n
-- Mathlib/LinearAlgebra/Matrix/Circulant.lean
theorem circulant_neg [Neg α] [Sub n] (v : n → α) : circulant (-v) = -circulant v
-- Mathlib/CategoryTheory/Monoidal/Braided/Basic.lean
@[reassoc, simp]
theorem braiding_inv_tensorUnit_right (X : C) : (β_ X (𝟙_ C)).inv = (λ_ X).hom ≫ (ρ_ X).inv
-- Mathlib/LinearAlgebra/TensorProduct/Basic.lean
@[simp]
theorem lTensor_sub (f g : N →ₗ[R] P) : (f - g).lTensor M = f.lTensor M - g.lTensor M
-- Mathlib/Combinatorics/SimpleGraph/Subgraph.lean
@[mono]
theorem deleteVerts_mono {G' G'' : G.Subgraph} (h : G' ≤ G'') :
    G'.deleteVerts s ≤ G''.deleteVerts s
-- Mathlib/Algebra/Homology/SingleHomology.lean
@[reassoc (attr := simp)]
lemma singleObjCyclesSelfIso_inv_iCycles :
    (singleObjCyclesSelfIso _ _ _).inv ≫ ((single C c j).obj A).iCycles j =
      (singleObjXSelf c j A).inv
-- Mathlib/Algebra/Group/Subgroup/Basic.lean
/-- If two monoid homomorphisms are equal on a set, then they are equal on its subgroup closure. -/
@[to_additive
      "If two monoid homomorphisms are equal on a set, then they are equal on its subgroup
      closure."]
theorem eqOn_closure {f g : G →* M} {s : Set G} (h : Set.EqOn f g s) : Set.EqOn f g (closure s)
-- Mathlib/Topology/Maps/Basic.lean
theorem Embedding.tendsto_nhds_iff {f : ι → Y} {l : Filter ι} {y : Y}
    (hg : Embedding g) : Tendsto f l (𝓝 y) ↔ Tendsto (g ∘ f) l (𝓝 (g y))
-- Mathlib/Data/Real/Sqrt.lean
/-- **Cauchy-Schwarz inequality** for finsets using square roots in `ℝ≥0`. -/
lemma sum_mul_le_sqrt_mul_sqrt (s : Finset ι) (f g : ι → ℝ≥0) :
    ∑ i ∈ s, f i * g i ≤ sqrt (∑ i ∈ s, f i ^ 2) * sqrt (∑ i ∈ s, g i ^ 2)
-- Mathlib/Analysis/Calculus/Deriv/Basic.lean
theorem HasDerivWithinAt.differentiableWithinAt (h : HasDerivWithinAt f f' s x) :
    DifferentiableWithinAt 𝕜 f s x
-- Mathlib/RingTheory/LaurentSeries.lean
@[norm_cast] -- Porting note (#10618): simp can prove this
theorem coe_add : ((f + g : PowerSeries R) : LaurentSeries R) = f + g
-- Mathlib/Topology/Algebra/ContinuousMonoidHom.lean
/-- Product of two continuous homomorphisms on different spaces. -/
@[to_additive (attr := simps!) "Product of two continuous homomorphisms on different spaces."]
def prod_map (f : ContinuousMonoidHom A C) (g : ContinuousMonoidHom B D) :
    ContinuousMonoidHom (A × B) (C × D)
-- Mathlib/Algebra/Group/Hom/Defs.lean
@[to_additive (attr := simp)]
theorem OneHom.coe_coe [OneHomClass F M N] (f : F) :
    ((f : OneHom M N) : M → N) = f
-- Mathlib/GroupTheory/PGroup.lean
theorem map {H : Subgroup G} (hH : IsPGroup p H) {K : Type*} [Group K] (ϕ : G →* K) :
    IsPGroup p (H.map ϕ)
-- Mathlib/MeasureTheory/Constructions/Polish/Basic.lean
/-- An analytic set is a set which is the continuous image of some Polish space. There are several
equivalent characterizations of this definition. For the definition, we pick one that avoids
universe issues: a set is analytic if and only if it is a continuous image of `ℕ → ℕ` (or if it
is empty). The above more usual characterization is given
in `analyticSet_iff_exists_polishSpace_range`.

Warning: these are analytic sets in the context of descriptive set theory (which is why they are
registered in the namespace `MeasureTheory`). They have nothing to do with analytic sets in the
context of complex analysis. -/
irreducible_def AnalyticSet (s : Set α) : Prop
-- Mathlib/SetTheory/Ordinal/Notation.lean
@[simp] theorem ofNat_zero : ofNat 0 = 0
-- Mathlib/Algebra/Homology/ExactSequence.lean
/-- The isomorphism `S₁.sc _ i ≅ S₂.sc _ i` induced by an isomorphism `S₁ ≅ S₂`
in `ComposableArrows C n`. -/
@[simps]
def scMapIso {S₁ S₂ : ComposableArrows C n} (e : S₁ ≅ S₂)
    (h₁ : S₁.IsComplex) (h₂ : S₂.IsComplex)
    (i : ℕ) (hi : i + 2 ≤ n := by omega) :
    S₁.sc h₁ i ≅ S₂.sc h₂ i
-- Mathlib/Algebra/DirectSum/LinearMap.lean
lemma trace_eq_sum_trace_restrict' (hN : {i | N i ≠ ⊥}.Finite)
    {f : M →ₗ[R] M} (hf : ∀ i, MapsTo f (N i) (N i)) :
    trace R M f = ∑ i ∈ hN.toFinset, trace R (N i) (f.restrict (hf i))
-- Mathlib/LinearAlgebra/Trace.lean
/-- The trace of the identity endomorphism is the dimension of the free module -/
@[simp]
theorem trace_id : trace R M id = (finrank R M : R)
-- Mathlib/Order/RelSeries.lean
/--
If `a₀ -r→ a₁ -r→ ... -r→ aₙ` and `b₀ -r→ b₁ -r→ ... -r→ bₘ` are two strict series
such that `r aₙ b₀`, then there is a chain of length `n + m + 1` given by
`a₀ -r→ a₁ -r→ ... -r→ aₙ -r→ b₀ -r→ b₁ -r→ ... -r→ bₘ`.
-/
@[simps length]
def append (p q : RelSeries r) (connect : r p.last q.head) : RelSeries r
-- Mathlib/GroupTheory/Perm/Cycle/Type.lean
theorem rotate_rotate : rotate (rotate v j) k = rotate v (j + k)
-- Mathlib/Data/Fintype/Basic.lean
@[simp]
theorem toFinset_diff [Fintype (s \ t : Set _)] : (s \ t).toFinset = s.toFinset \ t.toFinset
-- Mathlib/Order/SymmDiff.lean
@[simp]
theorem bihimp_bihimp_cancel_right : b ⇔ a ⇔ a = b
-- Mathlib/SetTheory/Lists.lean
theorem subset_nil {l : Lists' α true} : l ⊆ Lists'.nil → l = Lists'.nil
-- Mathlib/Topology/VectorBundle/Basic.lean
@[simp]
theorem totalSpaceMk_preimage_source (b : B) :
    .mk b ⁻¹' (a.pretrivializationAt b).source = univ
-- Mathlib/Probability/Kernel/Composition.lean
theorem ae_kernel_lt_top (a : α) (h2s : (κ ⊗ₖ η) a s ≠ ∞) :
    ∀ᵐ b ∂κ a, η (a, b) (Prod.mk b ⁻¹' s) < ∞
-- Mathlib/Tactic/Abel.lean
theorem term_neg {α} [AddCommGroup α] (n x a n' a')
    (h₁ : -n = n') (h₂ : -a = a') : -@termg α _ n x a = termg n' x a'
-- Mathlib/CategoryTheory/Filtered/Basic.lean
theorem of_hasFiniteLimits [HasFiniteLimits C] : IsCofiltered C
-- Mathlib/Combinatorics/SimpleGraph/Triangle/Tripartite.lean
lemma map_toTriangle_disjoint [ExplicitDisjoint t] :
    (t.map toTriangle : Set (Finset (α ⊕ β ⊕ γ))).Pairwise
      fun x y ↦ (x ∩ y : Set (α ⊕ β ⊕ γ)).Subsingleton
-- Mathlib/Algebra/Polynomial/Roots.lean
@[simp]
theorem roots_monomial (ha : a ≠ 0) (n : ℕ) : (monomial n a).roots = n • ({0} : Multiset R)
-- Mathlib/Algebra/GroupWithZero/NonZeroDivisors.lean
lemma nmem_nonZeroDivisors_iff {r : M} : r ∉ M⁰ ↔ {s | s * r = 0 ∧ s ≠ 0}.Nonempty
-- Mathlib/SetTheory/Ordinal/NaturalOps.lean
theorem add_le_nadd : a + b ≤ a ♯ b
-- Mathlib/Probability/Martingale/Convergence.lean
/-- An L¹-bounded submartingale converges almost everywhere. -/
theorem Submartingale.exists_ae_tendsto_of_bdd [IsFiniteMeasure μ] (hf : Submartingale f ℱ μ)
    (hbdd : ∀ n, eLpNorm (f n) 1 μ ≤ R) : ∀ᵐ ω ∂μ, ∃ c, Tendsto (fun n => f n ω) atTop (𝓝 c)
-- Mathlib/MeasureTheory/Function/EssSup.lean
theorem essSup_map_measure_of_measurable (hg : Measurable g) (hf : AEMeasurable f μ) :
    essSup g (Measure.map f μ) = essSup (g ∘ f) μ
-- Mathlib/Combinatorics/SimpleGraph/Maps.lean
@[simp]
theorem comap_apply (f : V ↪ W) (G : SimpleGraph W) (v : V) :
    SimpleGraph.Embedding.comap f G v = f v
-- Mathlib/Data/Set/Lattice.lean
theorem sUnion_iUnion (s : ι → Set (Set α)) : ⋃₀⋃ i, s i = ⋃ i, ⋃₀s i
-- Mathlib/RingTheory/PowerSeries/Order.lean
/-- If the order of a formal power series is finite,
then the coefficient indexed by the order is nonzero. -/
theorem coeff_order (h : (order φ).Dom) : coeff R (φ.order.get h) φ ≠ 0
-- Mathlib/Order/Heyting/Hom.lean
/-- `HeytingHomClass F α β` states that `F` is a type of Heyting homomorphisms.

You should extend this class when you extend `HeytingHom`. -/
class HeytingHomClass (F α β : Type*) [HeytingAlgebra α] [HeytingAlgebra β] [FunLike F α β]
  extends LatticeHomClass F α β : Prop where
  /-- The proposition that a Heyting homomorphism preserves the bottom element. -/
  map_bot (f : F) : f ⊥ = ⊥
  /-- The proposition that a Heyting homomorphism preserves the Heyting implication. -/
  map_himp (f : F) : ∀ a b, f (a ⇨ b) = f a ⇨ f b
-- Mathlib/Algebra/Order/Field/Basic.lean
theorem inv_le_one (ha : 1 ≤ a) : a⁻¹ ≤ 1
-- Mathlib/Data/DFinsupp/Multiset.lean
@[simp]
theorem toDFinsupp_lt_toDFinsupp : toDFinsupp s < toDFinsupp t ↔ s < t
-- .lake/packages/lean4/src/lean/Init/Data/BitVec/Lemmas.lean
@[simp] theorem ofInt_natCast (w n : Nat) :
  BitVec.ofInt w (n : Int) = BitVec.ofNat w n
-- Mathlib/GroupTheory/Perm/Cycle/Basic.lean
/-- Note that the identity satisfies `IsCycleOn` for any subsingleton set, but not `IsCycle`. -/
theorem IsCycleOn.isCycle_subtypePerm (hf : f.IsCycleOn s) (hs : s.Nontrivial) :
    (f.subtypePerm fun _ => hf.apply_mem_iff.symm : Perm s).IsCycle
-- Mathlib/Geometry/Manifold/BumpFunction.lean
theorem isOpen_support : IsOpen (support f)
-- Mathlib/Algebra/Group/Subsemigroup/Basic.lean
/-- A subsemigroup is closed under multiplication. -/
@[to_additive "An `AddSubsemigroup` is closed under addition."]
protected theorem mul_mem {x y : M} : x ∈ S → y ∈ S → x * y ∈ S
-- Mathlib/Algebra/Group/Submonoid/Membership.lean
@[to_additive]
theorem closure_eq_image_prod (s : Set M) :
    (closure s : Set M) = List.prod '' { l : List M | ∀ x ∈ l, x ∈ s }
-- Mathlib/Data/Int/Lemmas.lean
theorem natAbs_inj_of_nonpos_of_nonneg {a b : ℤ} (ha : a ≤ 0) (hb : 0 ≤ b) :
    natAbs a = natAbs b ↔ -a = b
-- Mathlib/NumberTheory/FLT/Three.lean
private lemma isCoprime_x_y : IsCoprime S.x S.y
-- Mathlib/Topology/UniformSpace/UniformConvergenceTopology.lean
protected theorem gen_mem_nhds (f : α →ᵤ[𝔖] β) (hs : s ∈ 𝔖) {V : Set (β × β)} (hV : V ∈ 𝓤 β) :
    {g | ∀ x ∈ s, (toFun 𝔖 f x, toFun 𝔖 g x) ∈ V} ∈ 𝓝 f
-- Mathlib/Combinatorics/Schnirelmann.lean
/--
If `k` is omitted from the set, its Schnirelmann density is upper bounded by `1 - k⁻¹`.
-/
lemma schnirelmannDensity_le_of_not_mem {k : ℕ} (hk : k ∉ A) :
    schnirelmannDensity A ≤ 1 - (k⁻¹ : ℝ)
-- .lake/packages/lean4/src/lean/Init/Data/Array/Lemmas.lean
theorem extract_empty_of_stop_le_start (as : Array α) {start stop : Nat} (h : stop ≤ start) :
    as.extract start stop = #[]
-- Mathlib/MeasureTheory/Function/LpSeminorm/Basic.lean
theorem memℒp_top_const (c : E) : Memℒp (fun _ : α => c) ∞ μ
-- Mathlib/Analysis/Calculus/FDeriv/Analytic.lean
/-- If a function is polynomial on a set `s`, so is its derivative. -/
protected theorem CPolynomialOn.deriv (h : CPolynomialOn 𝕜 f s) : CPolynomialOn 𝕜 (deriv f) s
-- Mathlib/CategoryTheory/Monoidal/Limits.lean
@[simp]
theorem limLax_ε :
    (@limLax J _ C _ _ _).ε =
      limit.lift _
        { pt := _
          π := { app := fun j => 𝟙 _ } }
-- Mathlib/Geometry/Euclidean/Angle/Oriented/RightAngle.lean
/-- A side of a right-angled triangle divided by the sine of the opposite angle equals the
hypotenuse. -/
theorem dist_div_sin_oangle_right_of_oangle_eq_pi_div_two {p₁ p₂ p₃ : P}
    (h : ∡ p₁ p₂ p₃ = ↑(π / 2)) : dist p₁ p₂ / Real.Angle.sin (∡ p₂ p₃ p₁) = dist p₁ p₃
-- Mathlib/Algebra/Squarefree/Basic.lean
theorem Squarefree.of_mul_left [CommMonoid R] {m n : R} (hmn : Squarefree (m * n)) : Squarefree m
-- Mathlib/Data/List/Basic.lean
@[simp]
theorem getElem?_scanl_zero : (scanl f b l)[0]? = some b
-- Mathlib/RingTheory/Polynomial/Cyclotomic/Eval.lean
@[simp]
theorem eval_one_cyclotomic_prime {R : Type*} [CommRing R] {p : ℕ} [hn : Fact p.Prime] :
    eval 1 (cyclotomic p R) = p
-- Mathlib/Data/Finset/Pointwise.lean
theorem Nonempty.smul_zero (hs : s.Nonempty) : s • (0 : Finset β) = 0
-- Mathlib/Geometry/Euclidean/Basic.lean
/-- The distance between two points given with `affineCombination`,
in terms of the pairwise distances between the points in that
combination. -/
theorem dist_affineCombination {ι : Type*} {s : Finset ι} {w₁ w₂ : ι → ℝ} (p : ι → P)
    (h₁ : ∑ i ∈ s, w₁ i = 1) (h₂ : ∑ i ∈ s, w₂ i = 1) : by
      have a₁ := s.affineCombination ℝ p w₁
      have a₂ := s.affineCombination ℝ p w₂
      exact dist a₁ a₂ * dist a₁ a₂ = (-∑ i₁ ∈ s, ∑ i₂ ∈ s,
        (w₁ - w₂) i₁ * (w₁ - w₂) i₂ * (dist (p i₁) (p i₂) * dist (p i₁) (p i₂))) / 2
-- Mathlib/Data/PNat/Find.lean
@[simp]
theorem find_eq_one : PNat.find h = 1 ↔ p 1