ruc-ai4math/mathlib_handler_benchmark_410 huggingface dataset:
-- Mathlib/ModelTheory/Substructures.lean
/-- If `s` is a dense set in a structure `M`, `Substructure.closure L s = ⊤`, then in order to prove
that some predicate `p` holds for all `x : M` it suffices to verify `p x` for `x ∈ s`, and verify
that `p` is preserved under function symbols. -/
@[elab_as_elim]
theorem dense_induction {p : M → Prop} (x : M) {s : Set M} (hs : closure L s = ⊤)
    (Hs : ∀ x ∈ s, p x) (Hfun : ∀ {n : ℕ} (f : L.Functions n), ClosedUnder f (setOf p)) : p x
-- Mathlib/Algebra/Order/CauSeq/Basic.lean
@[simp]
theorem const_zero : const 0 = 0
-- Mathlib/MeasureTheory/Measure/MeasureSpace.lean
lemma _root_.AEMeasurable.nullMeasurableSet_preimage {f : α → β} {s : Set β}
    (hf : AEMeasurable f μ) (hs : MeasurableSet s) : NullMeasurableSet (f ⁻¹' s) μ
-- Mathlib/GroupTheory/GroupAction/Blocks.lean
/-- An invariant block is a block -/
theorem IsInvariantBlock.isBlock {B : Set X} (hfB : IsInvariantBlock G B) :
    IsBlock G B
-- Mathlib/Algebra/Algebra/Defs.lean
@[norm_cast]
theorem coe_pow (a : R) (n : ℕ) : (↑(a ^ n : R) : A) = (a : A) ^ n
-- Mathlib/Order/Heyting/Basic.lean
/-- `p → q → p` -/
theorem le_himp : a ≤ b ⇨ a
-- Mathlib/RingTheory/IsTensorProduct.lean
theorem IsBaseChange.lift_comp (g : M →ₗ[R] Q) : ((h.lift g).restrictScalars R).comp f = g
-- Mathlib/Algebra/Polynomial/Degree/Lemmas.lean
theorem natDegree_sum_eq_of_disjoint (f : S → R[X]) (s : Finset S)
    (h : Set.Pairwise { i | i ∈ s ∧ f i ≠ 0 } (Ne on natDegree ∘ f)) :
    natDegree (s.sum f) = s.sup fun i => natDegree (f i)
-- Mathlib/NumberTheory/NumberField/Embeddings.lean
lemma even_card_aut_of_not_isUnramified [IsGalois k K] [FiniteDimensional k K]
    (hw : ¬ IsUnramified k w) :
    Even (Fintype.card <| K ≃ₐ[k] K)
-- Mathlib/Analysis/RCLike/Basic.lean
@[simp, rclike_simps]
theorem ofRealLI_apply : (ofRealLI : ℝ → K) = ofReal
-- Mathlib/FieldTheory/Finiteness.lean
/-- A module over a division ring is noetherian if and only if
its dimension (as a cardinal) is strictly less than the first infinite cardinal `ℵ₀`.
-/
theorem iff_rank_lt_aleph0 : IsNoetherian K V ↔ Module.rank K V < ℵ₀
-- Mathlib/Data/Real/EReal.lean
theorem coe_toReal {x : EReal} (hx : x ≠ ⊤) (h'x : x ≠ ⊥) : (x.toReal : EReal) = x
-- .lake/packages/lean4/src/lean/Init/Data/List/BasicAux.lean
theorem get!_cons_succ [Inhabited α] (l : List α) (a : α) (n : Nat) :
    (a::l).get! (n+1) = get! l n
-- Mathlib/Order/Filter/Cofinite.lean
theorem _root_.Set.infinite_iff_frequently_cofinite {s : Set α} :
    Set.Infinite s ↔ ∃ᶠ x in cofinite, x ∈ s
-- Mathlib/Algebra/Group/TypeTags.lean
@[simp]
protected lemma «forall» {p : Additive α → Prop} : (∀ a, p a) ↔ ∀ a, p (ofMul a)
-- Mathlib/CategoryTheory/Localization/SmallHom.lean
lemma hasSmallLocalizedHom_iff_of_isos {X' Y' : C} (e : X ≅ X') (e' : Y ≅ Y') :
    HasSmallLocalizedHom.{w} W X Y ↔ HasSmallLocalizedHom.{w} W X' Y'
-- Mathlib/Topology/Filter.lean
@[simp]
theorem nhds_mono {l₁ l₂ : Filter α} : 𝓝 l₁ ≤ 𝓝 l₂ ↔ l₁ ≤ l₂
-- Mathlib/Algebra/Module/Submodule/Basic.lean
@[norm_cast]
theorem coe_smul (r : R) (x : p) : ((r • x : p) : M) = r • (x : M)
-- Mathlib/Data/Matrix/Basic.lean
@[simp]
theorem diagonal_sub [SubNegZeroMonoid α] (d₁ d₂ : n → α) :
    diagonal d₁ - diagonal d₂ = diagonal fun i => d₁ i - d₂ i
-- Mathlib/FieldTheory/KrullTopology.lean
/-- For a field extension `L/K`, the intermediate field `K` is finite-dimensional over `K` -/
theorem IntermediateField.finiteDimensional_bot (K L : Type*) [Field K] [Field L] [Algebra K L] :
    FiniteDimensional K (⊥ : IntermediateField K L)
-- Mathlib/Data/ENNReal/Inv.lean
protected theorem div_le_iff_le_mul (hb0 : b ≠ 0 ∨ c ≠ ∞) (hbt : b ≠ ∞ ∨ c ≠ 0) :
    a / b ≤ c ↔ a ≤ c * b
-- Mathlib/Algebra/Module/LinearMap/Defs.lean
theorem isLinearMap_neg : IsLinearMap R fun z : M ↦ -z
-- Mathlib/MeasureTheory/Measure/FiniteMeasureProd.lean
lemma prod_swap : (μ.prod ν).map Prod.swap = ν.prod μ
-- Mathlib/LinearAlgebra/TensorProduct/Graded/External.lean
theorem one_gradedMul (x : (⨁ i, 𝒜 i) ⊗[R] (⨁ i, ℬ i)) :
    gradedMul R 𝒜 ℬ 1 x = x
-- .lake/packages/lean4/src/lean/Init/Data/List/Lemmas.lean
theorem not_all_eq_any_not (l : List α) (p : α → Bool) : (!l.all p) = l.any fun a => !p a
-- Mathlib/Analysis/Seminorm.lean
theorem ball_add_ball_subset (p : Seminorm 𝕜 E) (r₁ r₂ : ℝ) (x₁ x₂ : E) :
    p.ball (x₁ : E) r₁ + p.ball (x₂ : E) r₂ ⊆ p.ball (x₁ + x₂) (r₁ + r₂)
-- Mathlib/Analysis/InnerProductSpace/Calculus.lean
theorem ContDiffAt.norm (hf : ContDiffAt ℝ n f x) (h0 : f x ≠ 0) :
    ContDiffAt ℝ n (fun y => ‖f y‖) x
-- Mathlib/NumberTheory/LucasLehmer.lean
/-- The cardinality of `X` is `q^2`. -/
theorem card_eq : Fintype.card (X q) = q ^ 2
-- .lake/packages/lean4/src/lean/Init/Data/List/Basic.lean
@[simp] theorem range_zero : range 0 = []
-- Mathlib/Data/Nat/Prime/Defs.lean
@[simp]
theorem minFac_eq_one_iff {n : ℕ} : minFac n = 1 ↔ n = 1
-- Mathlib/Analysis/Analytic/Basic.lean
/-- In a complete space, the sum of a converging power series `p` admits `p` as a power series.
This is not totally obvious as we need to check the convergence of the series. -/
protected theorem FormalMultilinearSeries.hasFPowerSeriesOnBall [CompleteSpace F]
    (p : FormalMultilinearSeries 𝕜 E F) (h : 0 < p.radius) :
    HasFPowerSeriesOnBall p.sum p 0 p.radius
-- Mathlib/LinearAlgebra/TensorProduct/Subalgebra.lean
@[simp]
theorem rTensorBot_tmul (x : R) (a : A) : A.rTensorBot (a ⊗ₜ[R] algebraMap R _ x) = x • a
-- Mathlib/Algebra/Polynomial/Coeff.lean
theorem coeff_monomial_zero_mul (p : R[X]) (d : ℕ) (r : R) :
    coeff (monomial 0 r * p) d = r * coeff p d
-- Mathlib/Data/Finset/Lattice.lean
@[simp]
theorem ofDual_sup [SemilatticeInf α] [OrderTop α] (s : Finset β) (f : β → αᵒᵈ) :
    ofDual (s.sup f) = s.inf (ofDual ∘ f)
-- Mathlib/Tactic/IntervalCases.lean
theorem of_not_le_right [LE α] (h : ¬(a:α) ≤ b) (eq : b = b') : ¬a ≤ b'
-- Mathlib/Algebra/Module/BigOperators.lean
theorem Multiset.sum_smul {l : Multiset R} {x : M} : l.sum • x = (l.map fun r ↦ r • x).sum
-- Mathlib/Combinatorics/SimpleGraph/Walk.lean
theorem concat_inj {u v v' w : V} {p : G.Walk u v} {h : G.Adj v w} {p' : G.Walk u v'}
    {h' : G.Adj v' w} (he : p.concat h = p'.concat h') : ∃ hv : v = v', p.copy rfl hv = p'
-- Mathlib/Topology/Order.lean
@[simp]
theorem coinduced_sup : (t₁ ⊔ t₂).coinduced f = t₁.coinduced f ⊔ t₂.coinduced f
-- Mathlib/NumberTheory/LSeries/Basic.lean
/-- If `f` and `g` agree on large `n : ℕ`, then the `LSeries` of `f` converges at `s`
if and only if that of `g` does. -/
lemma LSeriesSummable_congr' {f g : ℕ → ℂ} (s : ℂ) (h : f =ᶠ[atTop] g) :
    LSeriesSummable f s ↔ LSeriesSummable g s
-- .lake/packages/lean4/src/lean/Init/Data/Int/Order.lean
theorem eq_negSucc_of_lt_zero : ∀ {a : Int}, a < 0 → ∃ n : Nat, a = -[n+1]
-- Mathlib/ModelTheory/Semantics.lean
theorem card_le_of_model_distinctConstantsTheory (s : Set α) (M : Type w) [L[[α]].Structure M]
    [h : M ⊨ L.distinctConstantsTheory s] : Cardinal.lift.{w} #s ≤ Cardinal.lift.{u'} #M
-- Mathlib/Order/Filter/Extr.lean
theorem IsMaxOn.comp_antitone (hf : IsMaxOn f s a) {g : β → γ} (hg : Antitone g) :
    IsMinOn (g ∘ f) s a
-- Mathlib/RingTheory/RootsOfUnity/Basic.lean
theorem card_nthRoots {n : ℕ} {ζ : R} (hζ : IsPrimitiveRoot ζ n) (a : R) :
    Multiset.card (nthRoots n a) = if ∃ α, α ^ n = a then n else 0
-- Mathlib/Data/NNRat/Defs.lean
@[simp, norm_cast] lemma coe_one : ((1 : ℚ≥0) : ℚ) = 1
-- Mathlib/Data/Matrix/Basis.lean
@[simp]
theorem apply_of_row_ne {i i' : m} (hi : i ≠ i') (j j' : n) (a : α) :
    stdBasisMatrix i j a i' j' = 0
-- Mathlib/MeasureTheory/Integral/IntervalIntegral.lean
theorem integral_comp_sub_div (hc : c ≠ 0) (d) :
    (∫ x in a..b, f (d - x / c)) = c • ∫ x in d - b / c..d - a / c, f x
-- Mathlib/Topology/Order/ExtendFrom.lean
theorem continuousOn_Ioc_extendFrom_Ioo [TopologicalSpace α] [LinearOrder α] [DenselyOrdered α]
    [OrderTopology α] [TopologicalSpace β] [RegularSpace β] {f : α → β} {a b : α} {lb : β}
    (hab : a < b) (hf : ContinuousOn f (Ioo a b)) (hb : Tendsto f (𝓝[<] b) (𝓝 lb)) :
    ContinuousOn (extendFrom (Ioo a b) f) (Ioc a b)
-- Mathlib/Algebra/Group/AddChar.lean
@[simp, norm_cast]
lemma _root_.MonoidHom.coe_compAddChar {N : Type*} [Monoid N] (f : M →* N) (φ : AddChar A M) :
    f.compAddChar φ = f ∘ φ
-- Mathlib/Algebra/Ring/Int.lean
lemma even_mul_succ_self (n : ℤ) : Even (n * (n + 1))
-- Mathlib/Data/Set/Basic.lean
@[simp]
theorem diff_empty {s : Set α} : s \ ∅ = s
-- Mathlib/SetTheory/Cardinal/Finite.lean
theorem _root_.Function.Surjective.bijective_of_nat_card_le [Finite α] {f : α → β}
    (surj : Surjective f) (hc : Nat.card α ≤ Nat.card β) : Bijective f
-- Mathlib/Geometry/Manifold/MFDeriv/Basic.lean
theorem MDifferentiableWithinAt.comp (hg : MDifferentiableWithinAt I' I'' g u (f x))
    (hf : MDifferentiableWithinAt I I' f s x) (h : s ⊆ f ⁻¹' u) :
    MDifferentiableWithinAt I I'' (g ∘ f) s x
-- Mathlib/CategoryTheory/Simple.lean
theorem id_nonzero (X : C) [Simple.{v} X] : 𝟙 X ≠ 0
-- .lake/packages/lean4/src/lean/Init/SimpLemmas.lean
theorem forall_prop_domain_congr {p₁ p₂ : Prop} {q₁ : p₁ → Prop} {q₂ : p₂ → Prop}
    (h₁ : p₁ = p₂)
    (h₂ : ∀ a : p₂, q₁ (h₁.substr a) = q₂ a)
    : (∀ a : p₁, q₁ a) = (∀ a : p₂, q₂ a)
-- Mathlib/ModelTheory/Basic.lean
@[simp]
theorem funMap_apply₂ (f : f₂) (x y : M) :
    @Structure.funMap _ M (Structure.mk₂ c' f₁' f₂' r₁' r₂') 2 f ![x, y] = f₂' f x y
-- Mathlib/Topology/MetricSpace/HausdorffDistance.lean
/-- If the Hausdorff distance is `< r`, any point in one of the sets is at distance
`< r` of a point in the other set. -/
theorem exists_dist_lt_of_hausdorffDist_lt' {r : ℝ} (h : y ∈ t) (H : hausdorffDist s t < r)
    (fin : hausdorffEdist s t ≠ ⊤) : ∃ x ∈ s, dist x y < r
-- Mathlib/AlgebraicGeometry/PrimeSpectrum/Basic.lean
lemma zeroLocus_minimalPrimes :
    zeroLocus ∘ (↑) '' minimalPrimes R =
    irreducibleComponents (PrimeSpectrum R)
-- Mathlib/Data/Multiset/Basic.lean
@[simp]
theorem cons_inter_of_pos {a} (s : Multiset α) {t} : a ∈ t → (a ::ₘ s) ∩ t = a ::ₘ s ∩ t.erase a
-- Mathlib/Topology/Algebra/Order/Compact.lean
theorem IsCompact.exists_sSup_image_eq_and_ge [ClosedIciTopology α] {s : Set β}
    (hs : IsCompact s) (ne_s : s.Nonempty) {f : β → α} (hf : ContinuousOn f s) :
    ∃ x ∈ s, sSup (f '' s) = f x ∧ ∀ y ∈ s, f y ≤ f x
-- Mathlib/NumberTheory/PythagoreanTriples.lean
/-- The zeroth Pythagorean triple is all zeros. -/
theorem PythagoreanTriple.zero : PythagoreanTriple 0 0 0
-- .lake/packages/batteries/Batteries/Data/List/Lemmas.lean
theorem mem_of_mem_drop {n} {l : List α} (h : a ∈ l.drop n) : a ∈ l
-- Mathlib/MeasureTheory/Measure/LogLikelihoodRatio.lean
lemma exp_neg_llr' [SigmaFinite μ] [SigmaFinite ν] (hμν : ν ≪ μ) :
    (fun x ↦ exp (- llr μ ν x)) =ᵐ[ν] fun x ↦ (ν.rnDeriv μ x).toReal
-- Mathlib/Topology/Basic.lean
theorem isOpen_singleton_iff_punctured_nhds (x : X) : IsOpen ({x} : Set X) ↔ 𝓝[≠] x = ⊥
-- Mathlib/RingTheory/Polynomial/Basic.lean
theorem isNoetherianRing_fin [IsNoetherianRing R] :
    ∀ {n : ℕ}, IsNoetherianRing (MvPolynomial (Fin n) R)
-- Mathlib/GroupTheory/Perm/DomMulAct.lean
lemma comp_stabilizerEquiv_invFun (g : ∀ i, Perm {a // f a = i}) (a : α) :
    f (stabilizerEquiv_invFun g a) = f a
-- Mathlib/Data/Matroid/IndepAxioms.lean
/-- A matroid defined purely in terms of its bases. -/
@[simps E] protected def ofBase (E : Set α) (Base : Set α → Prop) (exists_base : ∃ B, Base B)
    (base_exchange : ExchangeProperty Base)
    (maximality : ∀ X, X ⊆ E → Matroid.ExistsMaximalSubsetProperty (∃ B, Base B ∧ · ⊆ B) X)
    (subset_ground : ∀ B, Base B → B ⊆ E) : Matroid α
-- Mathlib/RepresentationTheory/GroupCohomology/LowDegree.lean
theorem oneCoboundariesOfEq_apply {f : G → A} {x : A} (hf : ∀ g, A.ρ g x - x = f g) :
    (oneCoboundariesOfEq hf).1.1 = f
-- Mathlib/Order/Filter/Basic.lean
theorem monotone_mem {f : Filter α} : Monotone fun s => s ∈ f
-- Mathlib/CategoryTheory/Functor/Basic.lean
@[simp]
theorem toPrefunctor_comp (F : C ⥤ D) (G : D ⥤ E) :
    F.toPrefunctor.comp G.toPrefunctor = (F ⋙ G).toPrefunctor
-- Mathlib/CategoryTheory/Limits/IsLimit.lean
@[reassoc]
theorem lift_comp_conePointsIsoOfNatIso_inv {F G : J ⥤ C} {r s : Cone G} {t : Cone F}
    (P : IsLimit t) (Q : IsLimit s) (w : F ≅ G) :
    Q.lift r ≫ (conePointsIsoOfNatIso P Q w).inv = P.map r w.inv
-- Mathlib/Algebra/MvPolynomial/Variables.lean
theorem vars_sum_of_disjoint [DecidableEq σ] (h : Pairwise <| (Disjoint on fun i => (φ i).vars)) :
    (∑ i ∈ t, φ i).vars = Finset.biUnion t fun i => (φ i).vars
-- Mathlib/Order/Heyting/Regular.lean
theorem IsRegular.inf (ha : IsRegular a) (hb : IsRegular b) : IsRegular (a ⊓ b)
-- .lake/packages/lean4/src/lean/Init/Control/StateCps.lean
@[simp] theorem runK_bind_set (f : PUnit → StateCpsT σ m β) (s s' : σ) (k : β → σ → m γ) : (set s' >>= f).runK s k = (f ⟨⟩).runK s' k
-- Mathlib/Algebra/CharP/ExpChar.lean
/-- If `R →+* A` is injective, then `R` is of exponential characteristic `p` if and only if `A` is
also of exponential characteristic `p`. Similar to `RingHom.charZero_iff`. -/
theorem RingHom.expChar_iff {R A : Type*} [Semiring R] [Semiring A] (f : R →+* A)
    (H : Function.Injective f) (p : ℕ) : ExpChar R p ↔ ExpChar A p
-- Mathlib/Data/Set/Sigma.lean
theorem sigma_preimage_eq {f : ι' → ι} {g : ∀ i, β i → α i} :
    (f ⁻¹' s).sigma (fun i ↦ g (f i) ⁻¹' t (f i)) =
      (fun p : Σ i, β (f i) ↦ Sigma.mk _ (g _ p.2)) ⁻¹' s.sigma t
-- Mathlib/Combinatorics/SimpleGraph/Maps.lean
theorem comap_surjective (f : V ↪ W) : Function.Surjective (SimpleGraph.comap f)
-- Mathlib/CategoryTheory/EqToHom.lean
/-- This is not always a good idea as a `@[simp]` lemma,
as we lose the ability to use results that interact with `F`,
e.g. the naturality of a natural transformation.

In some files it may be appropriate to use `attribute [local simp] eqToHom_map`, however.
-/
theorem eqToHom_map (F : C ⥤ D) {X Y : C} (p : X = Y) :
    F.map (eqToHom p) = eqToHom (congr_arg F.obj p)
-- Mathlib/Algebra/Homology/HomotopyCategory/HomComplexShift.lean
@[simp]
lemma shift_neg (a : ℤ) :
    (-γ).shift a = -γ.shift a
-- Mathlib/Analysis/Asymptotics/Asymptotics.lean
theorem IsBigO.prod_left (hf : f' =O[l] k') (hg : g' =O[l] k') : (fun x => (f' x, g' x)) =O[l] k'
-- .lake/packages/lean4/src/lean/Init/Data/List/Basic.lean
@[simp] theorem lookup_nil [BEq α] : ([] : List (α × β)).lookup a = none
-- Mathlib/MeasureTheory/Function/L1Space.lean
theorem integrable_norm_iff {f : α → β} (hf : AEStronglyMeasurable f μ) :
    Integrable (fun a => ‖f a‖) μ ↔ Integrable f μ
-- Mathlib/Algebra/Order/Floor.lean
theorem ceil_congr (h : ∀ n : ℤ, a ≤ n ↔ b ≤ n) : ⌈a⌉ = ⌈b⌉
-- Mathlib/AlgebraicGeometry/AffineScheme.lean
theorem isBasis_basicOpen (X : Scheme) [IsAffine X] :
    Opens.IsBasis (Set.range (X.basicOpen : Γ(X, ⊤) → X.Opens))
-- Mathlib/MeasureTheory/Function/AEEqFun.lean
theorem coeFn_compMeasurePreserving (g : β →ₘ[ν] γ) (hf : MeasurePreserving f μ ν) :
    g.compMeasurePreserving f hf =ᵐ[μ] g ∘ f
-- Mathlib/Topology/Homeomorph.lean
@[simp] theorem homeomorph_mk_coe (a : X ≃ Y) (b c) : (Homeomorph.mk a b c : X → Y) = a
-- Mathlib/CategoryTheory/Abelian/RightDerived.lean
/-- We can compute a right derived functor on a morphism using a descent of that morphism
to a cochain map between chosen injective resolutions.
-/
theorem Functor.rightDerived_map_eq (F : C ⥤ D) [F.Additive] (n : ℕ) {X Y : C} (f : X ⟶ Y)
    {P : InjectiveResolution X} {Q : InjectiveResolution Y} (g : P.cocomplex ⟶ Q.cocomplex)
    (w : P.ι ≫ g = (CochainComplex.single₀ C).map f ≫ Q.ι) :
    (F.rightDerived n).map f =
      (P.isoRightDerivedObj F n).hom ≫
        (F.mapHomologicalComplex _ ⋙ HomologicalComplex.homologyFunctor _ _ n).map g ≫
          (Q.isoRightDerivedObj F n).inv
-- Mathlib/Data/NNReal/Basic.lean
@[simp]
theorem le_inv_iff_mul_le {r p : ℝ≥0} (h : p ≠ 0) : r ≤ p⁻¹ ↔ r * p ≤ 1
-- Mathlib/MeasureTheory/Measure/WithDensityFinite.lean
lemma restrict_compl_sigmaFiniteSet [SFinite μ] :
    μ.restrict μ.sigmaFiniteSetᶜ = ∞ • μ.toFinite.restrict μ.sigmaFiniteSetᶜ
-- Mathlib/LinearAlgebra/Multilinear/Basic.lean
theorem mkPiRing_eq_iff [Fintype ι] {z₁ z₂ : M₂} :
    MultilinearMap.mkPiRing R ι z₁ = MultilinearMap.mkPiRing R ι z₂ ↔ z₁ = z₂
-- Mathlib/Algebra/Homology/TotalComplex.lean
lemma d₂_eq_zero (h : ¬ c₂.Rel i₂ (c₂.next i₂)) :
    K.d₂ c₁₂ i₁ i₂ i₁₂ = 0
-- .lake/packages/batteries/Batteries/Data/Sum/Lemmas.lean
@[simp] theorem inl_getLeft : ∀ (x : α ⊕ β) (h : x.isLeft), inl (x.getLeft h) = x
-- Mathlib/Order/Basic.lean
theorem mk_lt_mk_iff_right : (a, b₁) < (a, b₂) ↔ b₁ < b₂
-- Mathlib/Order/ConditionallyCompleteLattice/Basic.lean
lemma iInf_coe_eq_top : ⨅ x, (f x : WithTop α) = ⊤ ↔ IsEmpty ι
-- Mathlib/Analysis/Analytic/Basic.lean
/-- If `f` has formal power series `∑ n, pₙ` on a ball of radius `r`, then for `y, z` in any smaller
ball, the norm of the difference `f y - f z - p 1 (fun _ ↦ y - z)` is bounded above by
`C * (max ‖y - x‖ ‖z - x‖) * ‖y - z‖`. This lemma formulates this property using `IsBigO` and
`Filter.principal` on `E × E`. -/
theorem HasFPowerSeriesOnBall.isBigO_image_sub_image_sub_deriv_principal
    (hf : HasFPowerSeriesOnBall f p x r) (hr : r' < r) :
    (fun y : E × E => f y.1 - f y.2 - p 1 fun _ => y.1 - y.2) =O[𝓟 (EMetric.ball (x, x) r')]
      fun y => ‖y - (x, x)‖ * ‖y.1 - y.2‖
-- Mathlib/Order/Bounds/Basic.lean
theorem bddAbove_Ioc : BddAbove (Ioc a b)
-- .lake/packages/lean4/src/lean/Init/Data/List/Lemmas.lean
theorem findSome?_replicate : findSome? f (replicate n a) = if n = 0 then none else f a
-- Mathlib/SetTheory/Cardinal/Basic.lean
theorem bddAbove_of_small (s : Set Cardinal.{u}) [h : Small.{u} s] : BddAbove s
-- Mathlib/RingTheory/FractionalIdeal/Basic.lean
theorem one_mem_one : (1 : P) ∈ (1 : FractionalIdeal S P)
-- Mathlib/Data/ENNReal/Real.lean
theorem toReal_smul (r : ℝ≥0) (s : ℝ≥0∞) : (r • s).toReal = r • s.toReal
-- Mathlib/MeasureTheory/Measure/DiracProba.lean
@[simp] lemma diracProba_diracProbaInverse (μ : range (diracProba (X := X))) :
    diracProba (diracProbaInverse μ) = μ
-- .lake/packages/lean4/src/lean/Init/Data/Int/Bitwise/Lemmas.lean
theorem shiftRight_add (i : Int) (m n : Nat) :
    i >>> (m + n) = i >>> m >>> n
-- Mathlib/Order/Filter/AtTopBot.lean
theorem tendsto_atTop_add (hf : Tendsto f l atTop) (hg : Tendsto g l atTop) :
    Tendsto (fun x => f x + g x) l atTop
-- Mathlib/NumberTheory/Dioph.lean
theorem IsPoly.add {f g : (α → ℕ) → ℤ} (hf : IsPoly f) (hg : IsPoly g) : IsPoly (f + g)
-- Mathlib/Combinatorics/SetFamily/Shadow.lean
/-- The upper shadow is monotone. -/
@[mono]
theorem upShadow_monotone : Monotone (upShadow : Finset (Finset α) → Finset (Finset α))
-- Mathlib/Control/Traversable/Instances.lean
@[simp]
theorem traverse_cons (a : α') (l : List α') :
    traverse f (a :: l) = (· :: ·) <$> f a <*> traverse f l
-- Mathlib/Algebra/Order/CauSeq/Basic.lean
protected theorem sup_eq_left {a b : CauSeq α abs} (h : b ≤ a) : a ⊔ b ≈ a
-- Mathlib/Algebra/Module/Equiv/Defs.lean
@[simp, norm_cast]
theorem toLinearMap_inj {e₁ e₂ : M ≃ₛₗ[σ] M₂} : (↑e₁ : M →ₛₗ[σ] M₂) = e₂ ↔ e₁ = e₂
-- Mathlib/CategoryTheory/Opposites.lean
theorem isIso_op_iff {X Y : C} (f : X ⟶ Y) : IsIso f.op ↔ IsIso f
-- Mathlib/CategoryTheory/Idempotents/Karoubi.lean
@[simp]
theorem comp_f {P Q R : Karoubi C} (f : P ⟶ Q) (g : Q ⟶ R) : (f ≫ g).f = f.f ≫ g.f
-- Mathlib/Data/Set/Basic.lean
theorem union_union_distrib_right (s t u : Set α) : s ∪ t ∪ u = s ∪ u ∪ (t ∪ u)
-- Mathlib/ModelTheory/Semantics.lean
@[simp]
theorem realize_bot : (⊥ : L.Formula α).Realize v ↔ False
-- Mathlib/Data/List/Basic.lean
theorem Sublist.map (f : α → β) {l₁ l₂ : List α} (s : l₁ <+ l₂) : map f l₁ <+ map f l₂
-- Mathlib/Order/Interval/Set/Basic.lean
@[simp]
theorem Icc_diff_Ioo_same (h : a ≤ b) : Icc a b \ Ioo a b = {a, b}
-- Mathlib/Data/DFinsupp/Basic.lean
/-- See `DFinsupp.infinite_of_right` for this in instance form, with the drawback that
it needs all `π i` to be infinite. -/
theorem DFinsupp.infinite_of_exists_right {ι : Sort _} {π : ι → Sort _} (i : ι) [Infinite (π i)]
    [∀ i, Zero (π i)] : Infinite (Π₀ i, π i)
-- Mathlib/Combinatorics/SimpleGraph/Path.lean
/-- Given an injective graph homomorphism, map paths to paths. -/
@[simps]
protected def map (f : G →g G') (hinj : Function.Injective f) {u v : V} (p : G.Path u v) :
    G'.Path (f u) (f v)
-- .lake/packages/lean4/src/lean/Init/Data/Nat/Dvd.lean
protected theorem dvd_refl (a : Nat) : a ∣ a
-- Mathlib/Analysis/Asymptotics/Asymptotics.lean
theorem IsBigO.exists_pos (h : f =O[l] g') : ∃ c > 0, IsBigOWith c l f g'
-- Mathlib/Topology/Order/IntermediateValue.lean
/-- If a preconnected set contains endpoints of an interval, then it includes the whole interval. -/
theorem IsPreconnected.Icc_subset {s : Set α} (hs : IsPreconnected s) {a b : α} (ha : a ∈ s)
    (hb : b ∈ s) : Icc a b ⊆ s
-- Mathlib/Geometry/Manifold/LocalDiffeomorph.lean
lemma isLocalDiffeomorphOn_iff {f : M → N} (s : Set M) :
    IsLocalDiffeomorphOn I J n f s ↔ ∀ x : s, IsLocalDiffeomorphAt I J n f x
-- Mathlib/Order/Interval/Set/ProjIcc.lean
theorem IicExtend_apply (f : Iic b → β) (x : α) : IicExtend f x = f ⟨min b x, min_le_left _ _⟩
-- Mathlib/NumberTheory/NumberField/EquivReindex.lean
theorem det_of_basisMatrix_non_zero : (basisMatrix K).det ≠ 0
-- Mathlib/Probability/StrongLaw.lean
theorem sum_prob_mem_Ioc_le {X : Ω → ℝ} (hint : Integrable X) (hnonneg : 0 ≤ X) {K : ℕ} {N : ℕ}
    (hKN : K ≤ N) :
    ∑ j ∈ range K, ℙ {ω | X ω ∈ Set.Ioc (j : ℝ) N} ≤ ENNReal.ofReal (𝔼[X] + 1)
-- Mathlib/Order/Filter/AtTopBot.lean
theorem tendsto_atBot (e : α ≃o β) : Tendsto e atBot atBot
-- Mathlib/Topology/Bases.lean
theorem isOpen_biUnion_countable [SecondCountableTopology α] {ι : Type*} (I : Set ι) (s : ι → Set α)
    (H : ∀ i ∈ I, IsOpen (s i)) : ∃ T ⊆ I, T.Countable ∧ ⋃ i ∈ T, s i = ⋃ i ∈ I, s i
-- Mathlib/Order/Interval/Set/SurjOn.lean
theorem surjOn_Ici_of_monotone_surjective (h_mono : Monotone f) (h_surj : Function.Surjective f)
    (a : α) : SurjOn f (Ici a) (Ici (f a))
-- Mathlib/SetTheory/Game/PGame.lean
theorem equiv_of_eq {x y : PGame} (h : x = y) : x ≈ y
-- Mathlib/Analysis/Matrix.lean
@[simp]
theorem norm_row (v : n → α) : ‖row ι v‖ = ‖v‖
-- Mathlib/Topology/Connected/Basic.lean
/-- The iUnion of connected sets indexed by a type with an archimedean successor (like `ℕ` or `ℤ`)
  such that any two neighboring sets meet is preconnected. -/
theorem IsPreconnected.iUnion_of_chain {s : β → Set α} (H : ∀ n, IsPreconnected (s n))
    (K : ∀ n, (s n ∩ s (succ n)).Nonempty) : IsPreconnected (⋃ n, s n)
-- Mathlib/RingTheory/Ideal/Maps.lean
@[simp]
theorem comap_top : (⊤ : Ideal S).comap f = ⊤
-- .lake/packages/lean4/src/lean/Init/Prelude.lean
protected theorem Nat.eq_or_lt_of_le : {n m: Nat} → LE.le n m → Or (Eq n m) (LT.lt n m)
-- Mathlib/CategoryTheory/Limits/Cones.lean
/-- Change a cone on `F : Jᵒᵖ ⥤ C` to a cocone on `F.rightOp : Jᵒᵖ ⥤ C`. -/
@[simps]
def coconeRightOpOfCone (c : Cone F) : Cocone F.rightOp
-- Mathlib/LinearAlgebra/Span.lean
@[simp]
theorem coe_iSup_of_directed {ι} [Nonempty ι] (S : ι → Submodule R M)
    (H : Directed (· ≤ ·) S) : ((iSup S : Submodule R M) : Set M) = ⋃ i, S i
-- Mathlib/Order/Interval/Finset/Defs.lean
theorem Ioo_coe_coe : Ioo (a : WithBot α) b = (Ioo a b).map Embedding.some
-- Mathlib/Analysis/BoxIntegral/Partition/Basic.lean
theorem le_def : π₁ ≤ π₂ ↔ ∀ J ∈ π₁, ∃ J' ∈ π₂, J ≤ J'
-- Mathlib/CategoryTheory/Subobject/Limits.lean
@[reassoc (attr := simp)]
theorem imageSubobject_arrow' :
    (imageSubobjectIso f).inv ≫ (imageSubobject f).arrow = image.ι f
-- Mathlib/Combinatorics/SimpleGraph/Girth.lean
@[simp] lemma egirth_bot : egirth (⊥ : SimpleGraph α) = ⊤
-- Mathlib/Geometry/RingedSpace/PresheafedSpace/Gluing.lean
/-- `ιInvApp` is the left inverse of `D.ι i` on `U`. -/
theorem ιInvApp_π {i : D.J} (U : Opens (D.U i).carrier) :
    ∃ eq, D.ιInvApp U ≫ D.diagramOverOpenπ U i = (D.U i).presheaf.map (eqToHom eq)
-- Mathlib/Data/Finsupp/WellFounded.lean
theorem Lex.wellFounded' (hbot : ∀ ⦃n⦄, ¬s n 0) (hs : WellFounded s)
    [IsTrichotomous α r] (hr : WellFounded (Function.swap r)) : WellFounded (Finsupp.Lex r s)
-- Mathlib/MeasureTheory/Function/SimpleFunc.lean
protected theorem map {g : β → γ} (hf : f.FinMeasSupp μ) (hg : g 0 = 0) : (f.map g).FinMeasSupp μ
-- Mathlib/Order/WithBot.lean
/-- A version of `lt_top_iff_ne_top` for `WithTop` that only requires `LT α`, not
`PartialOrder α`. -/
protected theorem lt_top_iff_ne_top {x : WithTop α} : x < ⊤ ↔ x ≠ ⊤