ruc-ai4math/mathlib_handler_benchmark_410 huggingface dataset:
-- Mathlib/Algebra/Ring/Action/Invariant.lean
/-- A typeclass for subrings invariant under a `MulSemiringAction`. -/
class IsInvariantSubring : Prop where
  smul_mem : ∀ (m : M) {x : R}, x ∈ S → m • x ∈ S
-- Mathlib/Order/Filter/AtTopBot.lean
/-- If a function `f` tends to infinity along a filter, then `f` multiplied by a positive
constant (on the right) also tends to infinity. For a version working in `ℕ` or `ℤ`, use
`Filter.Tendsto.atTop_mul_const'` instead. -/
theorem Tendsto.atTop_mul_const (hr : 0 < r) (hf : Tendsto f l atTop) :
    Tendsto (fun x => f x * r) l atTop
-- Mathlib/MeasureTheory/Constructions/BorelSpace/Order.lean
@[simp, measurability]
theorem measurableSet_Ioc : MeasurableSet (Ioc a b)
-- Mathlib/Order/UpperLower/Basic.lean
@[simp]
theorem mem_Iio_iff : b ∈ Iio a ↔ b < a
-- Mathlib/Analysis/Calculus/FDeriv/Bilinear.lean
theorem ContinuousLinearMap.fderiv_of_bilinear {f : G' → E} {g : G' → F} {x : G'}
    (hf : DifferentiableAt 𝕜 f x) (hg : DifferentiableAt 𝕜 g x) :
    fderiv 𝕜 (fun y => B (f y) (g y)) x =
      B.precompR G' (f x) (fderiv 𝕜 g x) + B.precompL G' (fderiv 𝕜 f x) (g x)
-- Mathlib/GroupTheory/Commutator.lean
@[simp]
theorem commutatorElement_self : ⁅g, g⁆ = 1
-- Mathlib/Analysis/Convex/Cone/Proper.lean
@[simp]
theorem mem_coe {x : E} {K : ProperCone 𝕜 E} : x ∈ (K : PointedCone 𝕜 E) ↔ x ∈ K
-- Mathlib/Order/Interval/Set/OrdConnected.lean
@[instance]
theorem ordConnected_Iic {a : α} : OrdConnected (Iic a)
-- Mathlib/Topology/Separation.lean
theorem lim_eq {x : X} [NeBot f] (h : f ≤ 𝓝 x) : @lim _ _ ⟨x⟩ f = x
-- .lake/packages/batteries/Batteries/Data/List/Perm.lean
theorem Perm.inter_right {l₁ l₂ : List α} (t₁ : List α) : l₁ ~ l₂ → l₁ ∩ t₁ ~ l₂ ∩ t₁
-- Mathlib/RingTheory/PrincipalIdealDomain.lean
theorem dvd_gcd (hx : z ∣ x) (hy : z ∣ y) : z ∣ gcd x y
-- Mathlib/CategoryTheory/Sites/Sieves.lean
theorem pushforward_monotone (f : Y ⟶ X) : Monotone (Sieve.pushforward f)
-- Mathlib/RingTheory/Polynomial/Nilpotent.lean
protected lemma isNilpotent_iff :
    IsNilpotent P ↔ ∀ i, IsNilpotent (coeff P i)
-- Mathlib/Analysis/Calculus/ContDiff/Defs.lean
nonrec lemma ContDiffAt.contDiffOn {m : ℕ} (h : ContDiffAt 𝕜 n f x) (hm : m ≤ n) :
    ∃ u ∈ 𝓝 x, ContDiffOn 𝕜 m f u
-- Mathlib/SetTheory/Cardinal/Basic.lean
@[simp]
theorem lift_add (a b : Cardinal.{u}) : lift.{v} (a + b) = lift.{v} a + lift.{v} b
-- Mathlib/Topology/Algebra/Module/Alternating/Basic.lean
theorem range_toContinuousMultilinearMap :
    Set.range
        (toContinuousMultilinearMap :
          M [⋀^ι]→L[R] N → ContinuousMultilinearMap R (fun _ : ι => M) N) =
      {f | ∀ (v : ι → M) (i j : ι), v i = v j → i ≠ j → f v = 0}
-- Mathlib/Topology/UniformSpace/Equicontinuity.lean
theorem equicontinuousWithinAt_iInf_rng {u : κ → UniformSpace α'} {F : ι → X → α'}
    {S : Set X} {x₀ : X} : EquicontinuousWithinAt (uα :=  ⨅ k, u k) F S x₀ ↔
      ∀ k, EquicontinuousWithinAt (uα :=  u k) F S x₀
-- Mathlib/Analysis/SpecialFunctions/Complex/Circle.lean
theorem homeomorphCircle_apply (hT : T ≠ 0) (x : AddCircle T) :
    homeomorphCircle hT x = toCircle x
-- Mathlib/Topology/Instances/Rat.lean
theorem Nat.closedEmbedding_coe_rat : ClosedEmbedding ((↑) : ℕ → ℚ)
-- Mathlib/Algebra/Order/Field/Basic.lean
theorem left_lt_add_div_two : a < (a + b) / 2 ↔ a < b
-- Mathlib/FieldTheory/KummerExtension.lean
theorem X_pow_mul_sub_C_irreducible
    {n m : ℕ} {a : K} (hm : Irreducible (X ^ m - C a))
    (hn : ∀ (E : Type u) [Field E] [Algebra K E] (x : E) (hx : minpoly K x = X ^ m - C a),
      Irreducible (X ^ n - C (AdjoinSimple.gen K x))) :
    Irreducible (X ^ (n * m) - C a)
-- Mathlib/RingTheory/AdjoinRoot.lean
theorem quotMapCMapSpanMkEquivQuotMapCQuotMapSpanMk_mk (p : R[X]) :
    quotMapCMapSpanMkEquivQuotMapCQuotMapSpanMk I f (Ideal.Quotient.mk _ (mk f p)) =
      quotQuotMk (I.map C) (span {f}) p
-- Mathlib/Data/ENNReal/Real.lean
theorem toReal_add_le : (a + b).toReal ≤ a.toReal + b.toReal
-- .lake/packages/batteries/Batteries/Classes/Order.lean
/-- Local instance for `TransOrd (oα.lex oβ)`. -/
theorem TransOrd.instOrdLex [oα : Ord α] [oβ : Ord β] [TransOrd α] [TransOrd β] :
    @TransOrd _ (oα.lex oβ)
-- Mathlib/Algebra/Order/Module/Defs.lean
lemma PosSMulStrictMono.lift [PosSMulStrictMono α γ]
    (hf : ∀ {b₁ b₂}, f b₁ ≤ f b₂ ↔ b₁ ≤ b₂)
    (smul : ∀ (a : α) b, f (a • b) = a • f b) : PosSMulStrictMono α β
-- Mathlib/Algebra/Periodic.lean
theorem Antiperiodic.sub_nat_mul_eq [Ring α] [Ring β] (h : Antiperiodic f c) (n : ℕ) :
    f (x - n * c) = (-1) ^ n * f x
-- Mathlib/SetTheory/Game/Basic.lean
@[simp]
theorem quot_mul_neg (x y : PGame) : ⟦x * -y⟧ = (-⟦x * y⟧ : Game)
-- Mathlib/GroupTheory/Nilpotent.lean
theorem is_ascending_rev_series_of_is_descending {H : ℕ → Subgroup G} {n : ℕ} (hn : H n = ⊥)
    (hdesc : IsDescendingCentralSeries H) : IsAscendingCentralSeries fun m : ℕ => H (n - m)
-- Mathlib/Algebra/Algebra/NonUnitalHom.lean
@[simp]
theorem prod_fst_snd : prod (fst R A B) (snd R A B) = 1
-- Mathlib/Algebra/Ring/Units.lean
@[field_simps]
theorem divp_add_divp [CommRing α] (a b : α) (u₁ u₂ : αˣ) :
    a /ₚ u₁ + b /ₚ u₂ = (a * u₂ + u₁ * b) /ₚ (u₁ * u₂)
-- Mathlib/Analysis/Complex/Arg.lean
theorem sameRay_of_arg_eq (h : x.arg = y.arg) : SameRay ℝ x y
-- Mathlib/Analysis/Analytic/CPolynomial.lean
theorem HasFiniteFPowerSeriesAt.add (hf : HasFiniteFPowerSeriesAt f pf x n)
    (hg : HasFiniteFPowerSeriesAt g pg x m) :
    HasFiniteFPowerSeriesAt (f + g) (pf + pg) x (max n m)
-- Mathlib/MeasureTheory/Measure/Tilted.lean
@[simp]
lemma tilted_of_not_integrable (hf : ¬ Integrable (fun x ↦ exp (f x)) μ) : μ.tilted f = 0
-- .lake/packages/lean4/src/lean/Init/Data/BitVec/Lemmas.lean
@[simp] theorem msb_and {x y : BitVec w} : (x &&& y).msb = (x.msb && y.msb)
-- Mathlib/SetTheory/Ordinal/FixedPoint.lean
theorem mul_eq_right_iff_opow_omega_dvd {a b : Ordinal} : a * b = b ↔ (a^omega) ∣ b
-- Mathlib/Data/Ordering/Lemmas.lean
@[simp]
theorem ite_eq_eq_distrib (c : Prop) [Decidable c] (a b : Ordering) :
    ((if c then a else b) = Ordering.eq) = if c then a = Ordering.eq else b = Ordering.eq
-- Mathlib/Order/Sublattice.lean
@[simp] lemma map_map (g : LatticeHom β γ) (f : LatticeHom α β) :
    (L.map f).map g = L.map (g.comp f)
-- Mathlib/Analysis/SpecificLimits/FloorPow.lean
/-- If a monotone sequence `u` is such that `u ⌊c^n⌋₊ / ⌊c^n⌋₊` converges to a limit `l` for all
`c > 1`, then `u n / n` tends to `l`. It is even enough to have the assumption for a sequence of
`c`s converging to `1`. -/
theorem tendsto_div_of_monotone_of_tendsto_div_floor_pow (u : ℕ → ℝ) (l : ℝ) (hmono : Monotone u)
    (c : ℕ → ℝ) (cone : ∀ k, 1 < c k) (clim : Tendsto c atTop (𝓝 1))
    (hc : ∀ k, Tendsto (fun n : ℕ => u ⌊c k ^ n⌋₊ / ⌊c k ^ n⌋₊) atTop (𝓝 l)) :
    Tendsto (fun n => u n / n) atTop (𝓝 l)
-- Mathlib/Data/Set/Image.lean
theorem range_some_union_none (α : Type*) : range (some : α → Option α) ∪ {none} = univ
-- Mathlib/Data/Matrix/Basic.lean
theorem map_smul [SMul R α] [SMul R β] (f : α → β) (r : R) (hf : ∀ a, f (r • a) = r • f a)
    (M : Matrix m n α) : (r • M).map f = r • M.map f
-- Mathlib/Algebra/Order/Rearrangement.lean
/-- **Strict inequality case of the Rearrangement Inequality**: Pointwise scalar multiplication of
`f` and `g`, which antivary together, is strictly decreased by a permutation if and only if
`f ∘ σ` and `g` do not antivary together. Stated by permuting the entries of `f`. -/
theorem AntivaryOn.sum_smul_lt_sum_comp_perm_smul_iff (hfg : AntivaryOn f g s)
    (hσ : {x | σ x ≠ x} ⊆ s) :
    ∑ i ∈ s, f i • g i < ∑ i ∈ s, f (σ i) • g i ↔ ¬AntivaryOn (f ∘ σ) g s
-- Mathlib/CategoryTheory/Functor/Derived/RightDerived.lean
/-- A functor `F : C ⥤ H` has a right derived functor with respect to
`W : MorphismProperty C` if it has a left Kan extension along
`W.Q : C ⥤ W.Localization` (or any localization functor `L : C ⥤ D`
for `W`, see `hasRightDerivedFunctor_iff`). -/
class HasRightDerivedFunctor : Prop where
  hasLeftKanExtension' : HasLeftKanExtension W.Q F
-- Mathlib/Data/Sum/Basic.lean
theorem Injective.sum_elim {f : α → γ} {g : β → γ} (hf : Injective f) (hg : Injective g)
    (hfg : ∀ a b, f a ≠ g b) : Injective (Sum.elim f g)
-- Mathlib/Order/WithBot.lean
theorem not_coe_le_bot (a : α) : ¬(a : WithBot α) ≤ ⊥
-- Mathlib/FieldTheory/Minpoly/Field.lean
/-- The minimal polynomial (over `K`) of `σ : Gal(L/K)` is `X ^ (orderOf σ) - 1`. -/
lemma minpoly_algHom_toLinearMap (σ : L →ₐ[K] L) (hσ : IsOfFinOrder σ) :
    minpoly K σ.toLinearMap = X ^ (orderOf σ) - C 1
-- Mathlib/Data/Finset/Card.lean
theorem eq_of_subset_of_card_le {s t : Finset α} (h : s ⊆ t) (h₂ : t.card ≤ s.card) : s = t
-- Mathlib/GroupTheory/FreeGroup/Basic.lean
@[to_additive]
theorem map_eq_lift : map f x = lift (of ∘ f) x
-- Mathlib/Algebra/Homology/HomotopyCofiber.lean
/-- If a functor inverts homotopy equivalences, it sends homotopic maps to the same map. -/
lemma _root_.Homotopy.map_eq_of_inverts_homotopyEquivalences
    {φ₀ φ₁ : F ⟶ G} (h : Homotopy φ₀ φ₁) (hc : ∀ j, ∃ i, c.Rel i j)
    [∀ i, HasBinaryBiproduct (F.X i) (F.X i)]
    [HasHomotopyCofiber (biprod.lift (𝟙 F) (-𝟙 F))]
    {D : Type*} [Category D] (H : HomologicalComplex C c ⥤ D)
    (hH : (homotopyEquivalences C c).IsInvertedBy H) :
    H.map φ₀ = H.map φ₁
-- Mathlib/NumberTheory/MulChar/Basic.lean
@[simp]
theorem coeToFun_mul (χ χ' : MulChar R R') : ⇑(χ * χ') = χ * χ'
-- Mathlib/Geometry/Euclidean/Angle/Unoriented/Basic.lean
/-- If the angle between two vectors is 0, the norm of their difference equals
the absolute value of the difference of their norms. -/
theorem norm_sub_eq_abs_sub_norm_of_angle_eq_zero {x y : V} (h : angle x y = 0) :
    ‖x - y‖ = |‖x‖ - ‖y‖|
-- Mathlib/Algebra/Polynomial/Degree/Definitions.lean
theorem natDegree_X_sub_C_le (r : R) : (X - C r).natDegree ≤ 1
-- Mathlib/Data/Seq/Computation.lean
theorem of_results_bind {s : Computation α} {f : α → Computation β} {b k} :
    Results (bind s f) b k → ∃ a m n, Results s a m ∧ Results (f a) b n ∧ k = n + m
-- Mathlib/Algebra/Ring/Defs.lean
theorem left_distrib [Mul R] [Add R] [LeftDistribClass R] (a b c : R) :
    a * (b + c) = a * b + a * c
-- Mathlib/Data/Multiset/Basic.lean
theorem count_singleton_self (a : α) : count a ({a} : Multiset α) = 1
-- Mathlib/Combinatorics/Colex.lean
private lemma max_mem_aux {s t : Colex α} (hst : s ≠ t) : (ofColex s ∆ ofColex t).Nonempty
-- Mathlib/Probability/Distributions/Gaussian.lean
@[simp]
lemma gaussianPDF_zero_var (μ : ℝ) : gaussianPDF μ 0 = 0
-- Mathlib/Analysis/Normed/Operator/LinearIsometry.lean
@[simp]
theorem edist_map (x y : E) : edist (e x) (e y) = edist x y
-- .lake/packages/batteries/Batteries/Data/String/Lemmas.lean
theorem prev_nil : ∀ {it}, ValidFor [] r it → ValidFor [] r it.prev
-- Mathlib/Algebra/ContinuedFractions/Computation/Translations.lean
theorem IntFractPair.get?_seq1_eq_succ_get?_stream :
    (IntFractPair.seq1 v).snd.get? n = (IntFractPair.stream v) (n + 1)
-- Mathlib/Algebra/Homology/QuasiIso.lean
/-- The isomorphism `K.homology i ≅ L.homology i` induced by a morphism `f : K ⟶ L` such
that `[QuasiIsoAt f i]` holds. -/
@[simps! hom]
noncomputable def isoOfQuasiIsoAt (f : K ⟶ L) (i : ι) [K.HasHomology i] [L.HasHomology i]
    [QuasiIsoAt f i] : K.homology i ≅ L.homology i
-- Mathlib/RingTheory/FractionalIdeal/Basic.lean
theorem coe_mem_one (x : R) : algebraMap R P x ∈ (1 : FractionalIdeal S P)
-- Mathlib/Probability/Process/Stopping.lean
protected theorem measurableSet_eq_of_countable_range' (hτ : IsStoppingTime f τ)
    (h_countable : (Set.range τ).Countable) (i : ι) :
    MeasurableSet[hτ.measurableSpace] {ω | τ ω = i}
-- Mathlib/Algebra/Group/Submonoid/Pointwise.lean
@[to_additive (attr := simp)]
theorem coe_inv (S : Submonoid G) : ↑S⁻¹ = (S : Set G)⁻¹
-- Mathlib/Data/Array/ExtractLemmas.lean
theorem extract_extract {s1 e2 e1 s2 : Nat} {a : Array α} (h : s1 + e2 ≤ e1) :
    (a.extract s1 e1).extract s2 e2 = a.extract (s1 + s2) (s1 + e2)
-- Mathlib/RingTheory/Coprime/Basic.lean
theorem isCoprime_group_smul_left : IsCoprime (x • y) z ↔ IsCoprime y z
-- Mathlib/Algebra/Ring/Defs.lean
lemma mul_ite_zero : a * ite P b 0 = ite P (a * b) 0
-- Mathlib/Data/Nat/Factorial/Basic.lean
@[simp]
theorem ascFactorial_zero (n : ℕ) : n.ascFactorial 0 = 1
-- Mathlib/Order/RelSeries.lean
@[simp]
lemma length_toList (x : RelSeries r) : x.toList.length = x.length + 1
-- Mathlib/Topology/Connected/Clopen.lean
theorem QuotientMap.preimage_connectedComponent [TopologicalSpace β] {f : α → β}
    (hf : QuotientMap f) (h_fibers : ∀ y : β, IsConnected (f ⁻¹' {y})) (a : α) :
    f ⁻¹' connectedComponent (f a) = connectedComponent a
-- .lake/packages/lean4/src/lean/Init/Grind/Norm.lean
@[grind_norm] theorem Int.lt_eq (a b : Int) : (a < b) = (a + 1 ≤ b)
-- Mathlib/RingTheory/PowerBasis.lean
theorem constr_pow_gen (pb : PowerBasis A S) {y : S'} (hy : aeval y (minpoly A pb.gen) = 0) :
    pb.basis.constr A (fun i => y ^ (i : ℕ)) pb.gen = y
-- Mathlib/NumberTheory/Padics/Hensel.lean
private theorem newton_seq_is_cauchy : IsCauSeq norm newton_seq
-- Mathlib/Analysis/Complex/LocallyUniformLimit.lean
theorem norm_cderiv_le (hr : 0 < r) (hf : ∀ w ∈ sphere z r, ‖f w‖ ≤ M) :
    ‖cderiv r f z‖ ≤ M / r
-- Mathlib/Topology/Order/LeftRightNhds.lean
/-- The filter of right neighborhoods has a basis of closed intervals. -/
theorem nhdsWithin_Ici_basis_Icc [NoMaxOrder α] [DenselyOrdered α] {a : α} :
    (𝓝[≥] a).HasBasis (a < ·) (Icc a)
-- Mathlib/Order/Fin/Tuple.lean
lemma Monotone.vecCons (hf : Monotone f) (ha : a ≤ f 0) : Monotone (vecCons a f)
-- Mathlib/MeasureTheory/Measure/Restrict.lean
theorem ae_eq_restrict_iUnion_iff [Countable ι] (s : ι → Set α) (f g : α → δ) :
    f =ᵐ[μ.restrict (⋃ i, s i)] g ↔ ∀ i, f =ᵐ[μ.restrict (s i)] g
-- Mathlib/MeasureTheory/Function/LpSeminorm/Basic.lean
theorem eLpNorm_smul_measure_of_ne_zero {p : ℝ≥0∞} {f : α → F} {c : ℝ≥0∞} (hc : c ≠ 0) :
    eLpNorm f p (c • μ) = c ^ (1 / p).toReal • eLpNorm f p μ
-- Mathlib/Topology/MetricSpace/Holder.lean
theorem edist_le_of_le (h : HolderWith C r f) {x y : X} {d : ℝ≥0∞} (hd : edist x y ≤ d) :
    edist (f x) (f y) ≤ (C : ℝ≥0∞) * d ^ (r : ℝ)
-- Mathlib/CategoryTheory/Monoidal/Opposite.lean
@[simp] lemma mop_rightUnitor (X : C) : (ρ_ X).mop = (λ_ (mop X))
-- Mathlib/Algebra/Star/NonUnitalSubalgebra.lean
theorem toNonUnitalSubalgebra_injective :
    Function.Injective
      (toNonUnitalSubalgebra : NonUnitalStarSubalgebra R A → NonUnitalSubalgebra R A)
-- Mathlib/RingTheory/SimpleModule.lean
/-- In general, the annihilator of a simple module is called a primitive ideal, and it is
always a two-sided prime ideal, but mathlib's `Ideal.IsPrime` is not the correct definition
for noncommutative rings. -/
theorem IsSimpleModule.annihilator_isMaximal {R} [CommRing R] [Module R M]
    [simple : IsSimpleModule R M] : (Module.annihilator R M).IsMaximal
-- .lake/packages/lean4/src/lean/Init/Data/Array/Lemmas.lean
@[simp] theorem mem_filterMap (f : α → Option β) (l : Array α) {b : β} :
    b ∈ filterMap f l ↔ ∃ a, a ∈ l ∧ f a = some b
-- Mathlib/CategoryTheory/Monad/Equalizer.lean
/-- Construct the Beck fork in the category of coalgebras. This fork is coreflexive as well as an
equalizer.
-/
@[simps!]
def beckCoalgebraFork : Fork (CofreeEqualizer.topMap X) (CofreeEqualizer.bottomMap X)
-- Mathlib/MeasureTheory/Integral/Lebesgue.lean
/-- `∫⁻ a in s, f a ∂μ` is defined as the supremum of integrals of simple functions
`φ : α →ₛ ℝ≥0∞` such that `φ ≤ f`. This lemma says that it suffices to take
functions `φ : α →ₛ ℝ≥0`. -/
theorem lintegral_eq_nnreal {m : MeasurableSpace α} (f : α → ℝ≥0∞) (μ : Measure α) :
    ∫⁻ a, f a ∂μ =
      ⨆ (φ : α →ₛ ℝ≥0) (_ : ∀ x, ↑(φ x) ≤ f x), (φ.map ((↑) : ℝ≥0 → ℝ≥0∞)).lintegral μ
-- Mathlib/AlgebraicGeometry/Spec.lean
@[elementwise]
theorem stalkMap_toStalk {R S : CommRingCat.{u}} (f : R ⟶ S) (p : PrimeSpectrum S) :
    toStalk R (PrimeSpectrum.comap f p) ≫ (Spec.sheafedSpaceMap f).stalkMap p =
      f ≫ toStalk S p
-- Mathlib/Analysis/Convex/Side.lean
theorem wSameSide_of_right_mem {s : AffineSubspace R P} (x : P) {y : P} (hy : y ∈ s) :
    s.WSameSide x y
-- Mathlib/LinearAlgebra/CliffordAlgebra/Conjugation.lean
@[simp]
theorem involute_comp_involute : involute.comp involute = AlgHom.id R (CliffordAlgebra Q)
-- Mathlib/Order/Antichain.lean
protected theorem flip [IsSymm α r] (hs : IsStrongAntichain r s) : IsStrongAntichain (flip r) s
-- Mathlib/Analysis/SpecialFunctions/Trigonometric/Basic.lean
theorem pi_ne_zero : pi ≠ 0
-- Mathlib/Algebra/AddConstMap/Equiv.lean
/-- The identity map as an `AddConstEquiv`. -/
@[simps! toEquiv apply]
def refl (a : G) : G ≃+c[a, a] G
-- Mathlib/Logic/Equiv/Defs.lean
protected theorem forall₂_congr' {α₁ α₂ β₁ β₂ : Sort*} {p : α₁ → β₁ → Prop} {q : α₂ → β₂ → Prop}
    (eα : α₁ ≃ α₂) (eβ : β₁ ≃ β₂) (h : ∀ {x y}, p (eα.symm x) (eβ.symm y) ↔ q x y) :
    (∀ x y, p x y) ↔ ∀ x y, q x y
-- Mathlib/Algebra/Group/Subgroup/Basic.lean
@[to_additive (attr := simp)]
theorem closure_closure_coe_preimage {k : Set G} : closure (((↑) : closure k → G) ⁻¹' k) = ⊤
-- Mathlib/Dynamics/PeriodicPts.lean
protected theorem gcd (hm : IsPeriodicPt f m x) (hn : IsPeriodicPt f n x) :
    IsPeriodicPt f (m.gcd n) x
-- Mathlib/RingTheory/Ideal/Basic.lean
theorem exists_not_isUnit_of_not_isField [Nontrivial R] (hf : ¬IsField R) :
    ∃ (x : R) (_hx : x ≠ (0 : R)), ¬IsUnit x
-- Mathlib/NumberTheory/Padics/PadicIntegers.lean
theorem mk_coe (k : ℤ_[p]) : (⟨k, k.2⟩ : ℤ_[p]) = k
-- Mathlib/Data/List/Join.lean
@[simp]
theorem bind_eq_nil {l : List α} {f : α → List β} : List.bind l f = [] ↔ ∀ x ∈ l, f x = []
-- Mathlib/Data/Real/EReal.lean
@[simp, norm_cast]
protected theorem coe_lt_coe_iff {x y : ℝ} : (x : EReal) < (y : EReal) ↔ x < y
-- Mathlib/Algebra/Homology/HomotopyCategory/HomComplex.lean
@[simp]
lemma map_add : (z + z').map Φ = z.map Φ + z'.map Φ
-- Mathlib/Data/Set/Card.lean
theorem exists_superset_subset_encard_eq {k : ℕ∞}
    (hst : s ⊆ t) (hsk : s.encard ≤ k) (hkt : k ≤ t.encard) :
    ∃ r, s ⊆ r ∧ r ⊆ t ∧ r.encard = k
-- .lake/packages/batteries/Batteries/Data/List/Lemmas.lean
theorem indexesOf_cons [BEq α] : (x :: xs : List α).indexesOf y =
    bif x == y then 0 :: (xs.indexesOf y).map (· + 1) else (xs.indexesOf y).map (· + 1)
-- Mathlib/MeasureTheory/Measure/MeasureSpace.lean
/-- Continuity from above: the measure of the intersection of a sequence of measurable
sets such that one has finite measure is the limit of the measures of the partial intersections. -/
theorem tendsto_measure_iInter' {α ι : Type*} [MeasurableSpace α] {μ : Measure α} [Countable ι]
    [Preorder ι] [IsDirected ι (· ≤ ·)] {f : ι → Set α} (hm : ∀ i, MeasurableSet (f i))
    (hf : ∃ i, μ (f i) ≠ ∞) :
    Tendsto (fun i ↦ μ (⋂ j ∈ {j | j ≤ i}, f j)) atTop (𝓝 (μ (⋂ i, f i)))
-- Mathlib/Algebra/Order/Sub/Canonical.lean
theorem tsub_add_eq_max : a - b + b = max a b
-- Mathlib/NumberTheory/LSeries/Basic.lean
@[simp]
lemma term_zero (f : ℕ → ℂ) (s : ℂ) : term f s 0 = 0
-- Mathlib/CategoryTheory/Limits/IsLimit.lean
@[reassoc]
theorem coconePointsIsoOfNatIso_hom_desc {F G : J ⥤ C} {s : Cocone F} {r t : Cocone G}
    (P : IsColimit s) (Q : IsColimit t) (w : F ≅ G) :
    (coconePointsIsoOfNatIso P Q w).hom ≫ Q.desc r = P.map _ w.hom
-- Mathlib/Analysis/Calculus/LocalExtr/LineDeriv.lean
theorem IsMaxOn.lineDerivWithin_eq_zero (h : IsMaxOn f s a)
    (h' : ∀ᶠ t : ℝ in 𝓝 0, a + t • b ∈ s) : lineDerivWithin ℝ f s a b = 0
-- Mathlib/CategoryTheory/Category/Preorder.lean
@[simp, reassoc]
lemma eqToHom_comp_homOfLE_op {a b c : X} (hab : op a = op b) (hbc : c ≤ b) :
    eqToHom hab ≫ (homOfLE hbc).op = (homOfLE (hbc.trans (le_of_eq (op_injective hab.symm)))).op
-- Mathlib/CategoryTheory/Sites/Sieves.lean
theorem ofArrows_pUnit : (ofArrows _ fun _ : PUnit => f) = singleton f
-- Mathlib/CategoryTheory/Limits/Shapes/Equalizers.lean
theorem equalizer.existsUnique {W : C} (k : W ⟶ X) (h : k ≫ f = k ≫ g) :
    ∃! l : W ⟶ equalizer f g, l ≫ equalizer.ι f g = k
-- Mathlib/Data/Int/Log.lean
theorem clog_of_right_le_one (b : ℕ) {r : R} (hr : r ≤ 1) : clog b r = -Nat.log b ⌊r⁻¹⌋₊
-- Mathlib/MeasureTheory/Measure/Tilted.lean
lemma tilted_const (μ : Measure α) [IsProbabilityMeasure μ] (c : ℝ) :
    μ.tilted (fun _ ↦ c) = μ
-- Mathlib/Topology/Homeomorph.lean
@[simp] lemma toHomeomorph_symm (e : X ≃ Y) (he) :
  (e.toHomeomorph he).symm = e.symm.toHomeomorph fun s ↦ by convert (he _).symm; simp
-- Mathlib/RingTheory/FractionalIdeal/Basic.lean
theorem mul_def (I J : FractionalIdeal S P) :
    I * J = ⟨I * J, I.isFractional.mul J.isFractional⟩
-- Mathlib/SetTheory/Game/Basic.lean
/-- A small family of games is bounded above. -/
lemma bddAbove_range_of_small {ι : Type*} [Small.{u} ι] (f : ι → Game.{u}) :
    BddAbove (Set.range f)
-- Mathlib/Analysis/Calculus/FDeriv/Analytic.lean
theorem HasFPowerSeriesOnBall.differentiableOn [CompleteSpace F]
    (h : HasFPowerSeriesOnBall f p x r) : DifferentiableOn 𝕜 f (EMetric.ball x r)
-- Mathlib/Analysis/CstarAlgebra/ContinuousFunctionalCalculus/Unital.lean
lemma cfc_nonneg_iff (f : R → R) (a : A) (hf : ContinuousOn f (spectrum R a) := by cfc_cont_tac)
    (ha : p a := by cfc_tac) : 0 ≤ cfc f a ↔ ∀ x ∈ spectrum R a, 0 ≤ f x
-- Mathlib/Algebra/Group/Subgroup/Pointwise.lean
theorem mem_pointwise_smul_iff_inv_smul_mem₀ {a : α} (ha : a ≠ 0) (S : AddSubgroup A) (x : A) :
    x ∈ a • S ↔ a⁻¹ • x ∈ S
-- Mathlib/Data/Nat/Defs.lean
lemma div_lt_one_iff (hb : 0 < b) : a / b < 1 ↔ a < b
-- Mathlib/Algebra/Homology/HomologicalBicomplex.lean
@[reassoc (attr := simp)]
lemma d_f_comp_d_f (K : HomologicalComplex₂ C c₁ c₂)
    (i₁ i₁' i₁'' : I₁) (i₂ : I₂) :
    (K.d i₁ i₁').f i₂ ≫ (K.d i₁' i₁'').f i₂ = 0
-- Mathlib/AlgebraicGeometry/EllipticCurve/DivisionPolynomial/Basic.lean
lemma map_Ψ (n : ℤ) : (W.map f).Ψ n = (W.Ψ n).map (mapRingHom f)
-- Mathlib/CategoryTheory/Limits/HasLimits.lean
theorem colimit.map_post {D : Type u'} [Category.{v'} D] [HasColimitsOfShape J D]
    (H : C ⥤ D) :/- H (colimit F) ⟶ H (colimit G) ⟶ colimit (G ⋙ H) vs
             H (colimit F) ⟶ colimit (F ⋙ H) ⟶ colimit (G ⋙ H) -/
          colimit.post
          F H ≫
        H.map (colim.map α) =
      colim.map (whiskerRight α H) ≫ colimit.post G H
-- Mathlib/LinearAlgebra/Span.lean
theorem prod_mono {p p' : Submodule R M} {q q' : Submodule R M'} :
    p ≤ p' → q ≤ q' → prod p q ≤ prod p' q'
-- Mathlib/Logic/Basic.lean
theorem exists_unique_prop {p q : Prop} : (∃! _ : p, q) ↔ p ∧ q
-- Mathlib/Algebra/Polynomial/Mirror.lean
theorem mirror_mirror : p.mirror.mirror = p
-- Mathlib/Analysis/MeanInequalities.lean
/-- **Hölder inequality**: the scalar product of two functions is bounded by the product of their
`L^p` and `L^q` norms when `p` and `q` are conjugate exponents. Version for sums over finite sets,
with `ℝ≥0∞`-valued functions. -/
theorem inner_le_Lp_mul_Lq (hpq : p.IsConjExponent q) :
    ∑ i ∈ s, f i * g i ≤ (∑ i ∈ s, f i ^ p) ^ (1 / p) * (∑ i ∈ s, g i ^ q) ^ (1 / q)
-- Mathlib/Order/Interval/Set/Image.lean
lemma StrictMono.image_Ioc_subset (h : StrictMono f) : f '' Ioc a b ⊆ Ioc (f a) (f b)
-- Mathlib/NumberTheory/Cyclotomic/Basic.lean
/-- If `(⊥ : SubAlgebra A B) = ⊤`, then `IsCyclotomicExtension {1} A B`. -/
theorem singleton_one_of_bot_eq_top (h : (⊥ : Subalgebra A B) = ⊤) :
    IsCyclotomicExtension {1} A B
-- Mathlib/Analysis/Normed/Lp/ProdLp.lean
@[simp]
theorem edist_equiv_symm_fst (x₁ x₂ : α) :
    edist ((WithLp.equiv p (α × β)).symm (x₁, 0)) ((WithLp.equiv p (α × β)).symm (x₂, 0)) =
      edist x₁ x₂
-- Mathlib/Topology/CompactOpen.lean
lemma continuous_compactOpen {f : X → C(Y, Z)} :
    Continuous f ↔ ∀ K, IsCompact K → ∀ U, IsOpen U → IsOpen {x | MapsTo (f x) K U}
-- Mathlib/Topology/UniformSpace/UniformConvergenceTopology.lean
@[simp] lemma UniformFun.toFun_ofFun (f : α → β) : toFun (ofFun f) = f
-- Mathlib/Logic/Function/CompTypeclasses.lean
/-- `φ`, `ψ` and `ψ ∘ φ` for` a `CompTriple` -/
theorem comp {M N P : Type*}
    {φ : M → N} {ψ : N → P} :
    CompTriple φ ψ  (ψ.comp φ)
-- Mathlib/Topology/ContinuousOn.lean
theorem closure_pi_set {ι : Type*} {α : ι → Type*} [∀ i, TopologicalSpace (α i)] (I : Set ι)
    (s : ∀ i, Set (α i)) : closure (pi I s) = pi I fun i => closure (s i)
-- Mathlib/Analysis/Calculus/FormalMultilinearSeries.lean
@[simp]
theorem compContinuousLinearMap_apply (p : FormalMultilinearSeries 𝕜 F G) (u : E →L[𝕜] F) (n : ℕ)
    (v : Fin n → E) : (p.compContinuousLinearMap u) n v = p n (u ∘ v)
-- Mathlib/Algebra/Module/Equiv/Basic.lean
@[simp]
theorem _root_.LinearEquiv.toAddEquiv_toIntLinearEquiv (e : M ≃ₗ[ℤ] M₂) :
    AddEquiv.toIntLinearEquiv (e : M ≃+ M₂) = e