ruc-ai4math/mathlib_handler_benchmark_410 huggingface dataset:
-- Mathlib/Data/Set/Semiring.lean
theorem add_def (s t : SetSemiring α) : s + t = up (down s ∪ down t)
-- Mathlib/Data/Nat/Hyperoperation.lean
theorem hyperoperation_ge_two_eq_self (n m : ℕ) : hyperoperation (n + 2) m 1 = m
-- Mathlib/Logic/IsEmpty.lean
protected theorem Function.isEmpty [IsEmpty β] (f : α → β) : IsEmpty α
-- Mathlib/LinearAlgebra/Matrix/SpecialLinearGroup.lean
/-- The center of a special linear group of degree `n` is the subgroup of scalar matrices, for which
the scalars are the `n`-th roots of unity. -/
theorem mem_center_iff {A : SpecialLinearGroup n R} :
    A ∈ center (SpecialLinearGroup n R) ↔ ∃ (r : R), r ^ (Fintype.card n) = 1 ∧ scalar n r = A
-- Mathlib/Data/Ordmap/Ordset.lean
@[simp]
theorem size_dual (t : Ordnode α) : size (dual t) = size t
-- Mathlib/Analysis/CstarAlgebra/ContinuousFunctionalCalculus/NonUnital.lean
/-- The **spectral mapping theorem** for the non-unital continuous functional calculus. -/
lemma cfcₙHom_map_quasispectrum (f : C(σₙ R a, R)₀) :
    σₙ R (cfcₙHom ha f) = Set.range f
-- Mathlib/CategoryTheory/PUnit.lean
/-- Any two functors to `Discrete PUnit` are *equal*.
You probably want to use `punitExt` instead of this. -/
theorem punit_ext' (F G : C ⥤ Discrete PUnit.{w + 1}) : F = G
-- Mathlib/Order/Hom/CompleteLattice.lean
@[simp]
theorem comp_apply (f : FrameHom β γ) (g : FrameHom α β) (a : α) : (f.comp g) a = f (g a)
-- Mathlib/Algebra/Order/Interval/Set/Instances.lean
/-- like `coe_nonneg`, but with the inequality in `Ico (0:α) 1`. -/
theorem nonneg [Nontrivial α] {t : Ico (0 : α) 1} : 0 ≤ t
-- Mathlib/Order/CompleteLattice.lean
/-- When taking the infimum of `f : ι → α`, the elements of `ι` on which `f` gives `⊤` can be
dropped, without changing the result. -/
theorem iInf_ne_top_subtype (f : ι → α) : ⨅ i : { i // f i ≠ ⊤ }, f i = ⨅ i, f i
-- Mathlib/Algebra/Module/Submodule/Lattice.lean
@[simp]
theorem Submodule.toAddSubmonoid_toNatSubmodule (S : Submodule ℕ M) :
    AddSubmonoid.toNatSubmodule S.toAddSubmonoid = S
-- Mathlib/Analysis/Calculus/ContDiff/Basic.lean
theorem contDiff_prod_mk_left (f₀ : F) : ContDiff 𝕜 n fun e : E => (e, f₀)
-- Mathlib/Topology/Sheaves/SheafCondition/EqualizerProducts.lean
@[simp, elementwise]
theorem res_π (i : ι) : res F U ≫ limit.π _ ⟨i⟩ = F.map (Opens.leSupr U i).op
-- Mathlib/RingTheory/Polynomial/Cyclotomic/Basic.lean
theorem cyclotomic_prime_pow_mul_X_pow_sub_one (R : Type*) [CommRing R] (p k : ℕ)
    [hn : Fact (Nat.Prime p)] :
    cyclotomic (p ^ (k + 1)) R * (X ^ p ^ k - 1) = X ^ p ^ (k + 1) - 1
-- Mathlib/Geometry/Manifold/SmoothManifoldWithCorners.lean
theorem extChartAt_coe (x : M) : ⇑(extChartAt I x) = I ∘ chartAt H x
-- Mathlib/Algebra/Group/Prod.lean
@[to_additive]
theorem mul_def [Mul M] [Mul N] (p q : M × N) : p * q = (p.1 * q.1, p.2 * q.2)
-- Mathlib/Data/Finset/Image.lean
theorem range_sdiff_zero {n : ℕ} : range (n + 1) \ {0} = (range n).image Nat.succ
-- Mathlib/CategoryTheory/Products/Unitor.lean
/-- The right unitor functor `C × 1 ⥤ C` -/
@[simps]
def rightUnitor : C × Discrete (PUnit : Type w) ⥤ C
-- Mathlib/Algebra/Order/Ring/Unbundled/Basic.lean
theorem mul_le_mul_of_nonneg_of_nonpos' [ExistsAddOfLE α] [PosMulMono α] [MulPosMono α]
    [CovariantClass α α (swap (· + ·)) (· ≤ ·)] [ContravariantClass α α (swap (· + ·)) (· ≤ ·)]
    (hca : c ≤ a) (hbd : b ≤ d) (ha : 0 ≤ a) (hd : d ≤ 0) : a * b ≤ c * d
-- Mathlib/Analysis/Calculus/TangentCone.lean
theorem IsOpen.uniqueDiffOn (hs : IsOpen s) : UniqueDiffOn 𝕜 s
-- Mathlib/Topology/MetricSpace/Bounded.lean
theorem isBounded_closure_of_isBounded (h : IsBounded s) : IsBounded (closure s)
-- Mathlib/Data/ENNReal/Inv.lean
theorem mul_le_of_le_div' (h : a ≤ b / c) : c * a ≤ b
-- Mathlib/Data/TypeVec.lean
@[simp]
theorem lastFun_of_subtype {α} (p : α ⟹ «repeat» (n + 1) Prop) :
    lastFun (ofSubtype p) = _root_.id
-- Mathlib/Analysis/LocallyConvex/WithSeminorms.lean
theorem continuous_from_bounded {p : SeminormFamily 𝕝 E ι} {q : SeminormFamily 𝕝₂ F ι'}
    {_ : TopologicalSpace E} (hp : WithSeminorms p) {_ : TopologicalSpace F} (hq : WithSeminorms q)
    (f : E →ₛₗ[τ₁₂] F) (hf : Seminorm.IsBounded p q f) : Continuous f
-- Mathlib/Topology/LocalAtTarget.lean
theorem Set.restrictPreimage_openEmbedding (s : Set β) (h : OpenEmbedding f) :
    OpenEmbedding (s.restrictPreimage f)
-- Mathlib/Data/List/Cycle.lean
theorem subsingleton_nil : Subsingleton (@nil α)
-- Mathlib/AlgebraicGeometry/Scheme.lean
@[ext]
protected lemma ext {f g : X ⟶ Y} (h_base : f.1.base = g.1.base)
    (h_app : ∀ U, f.app U ≫ X.presheaf.map
      (eqToHom congr((Opens.map $h_base.symm).obj U)).op = g.app U) : f = g
-- Mathlib/Order/Category/BddOrd.lean
@[simp]
theorem coe_of (α : Type*) [PartialOrder α] [BoundedOrder α] : ↥(of α) = α
-- Mathlib/RingTheory/Coalgebra/Hom.lean
theorem ext_iff {φ₁ φ₂ : A →ₗc[R] B} : φ₁ = φ₂ ↔ ∀ x, φ₁ x = φ₂ x
-- Mathlib/Algebra/CubicDiscriminant.lean
theorem monic_of_d_eq_one' : (toPoly ⟨0, 0, 0, 1⟩).Monic
-- Mathlib/Order/SymmDiff.lean
@[simp]
theorem inf_sup_symmDiff : a ⊓ b ⊔ a ∆ b = a ⊔ b
-- Mathlib/LinearAlgebra/QuadraticForm/Basic.lean
/-- Auxiliary lemma to express bilinearity of `QuadraticMap.polar` without subtraction. -/
theorem polar_add_left_iff {f : M → N} {x x' y : M} :
    polar f (x + x') y = polar f x y + polar f x' y ↔
      f (x + x' + y) + (f x + f x' + f y) = f (x + x') + f (x' + y) + f (y + x)
-- Mathlib/Probability/Variance.lean
theorem evariance_eq_zero_iff (hX : AEMeasurable X μ) :
    evariance X μ = 0 ↔ X =ᵐ[μ] fun _ => μ[X]
-- Mathlib/Logic/Function/Basic.lean
theorem injective_of_subsingleton [Subsingleton α] (f : α → β) : Injective f
-- Mathlib/MeasureTheory/Integral/BoundedContinuousFunction.lean
theorem toReal_lintegral_coe_eq_integral (f : X →ᵇ ℝ≥0) (μ : Measure X) :
    (∫⁻ x, (f x : ℝ≥0∞) ∂μ).toReal = ∫ x, (f x : ℝ) ∂μ
-- Mathlib/Order/Monotone/Basic.lean
theorem const_mono : Monotone (const β : α → β → α)
-- Mathlib/MeasureTheory/Decomposition/RadonNikodym.lean
/-- Auxiliary lemma for `rnDeriv_withDensity_left`. -/
lemma rnDeriv_withDensity_withDensity_rnDeriv_left (μ ν : Measure α) [SigmaFinite μ] [SigmaFinite ν]
    (hf_ne_top : ∀ᵐ x ∂μ, f x ≠ ∞) :
    ((ν.withDensity (μ.rnDeriv ν)).withDensity f).rnDeriv ν =ᵐ[ν] (μ.withDensity f).rnDeriv ν
-- Mathlib/Computability/Primrec.lean
theorem nat_casesOn' {f : α → β} {g : α → ℕ → β} (hf : Primrec f) (hg : Primrec₂ g) :
    Primrec₂ fun a (n : ℕ) => (n.casesOn (f a) (g a) : β)
-- Mathlib/Algebra/Ring/Rat.lean
lemma natCast_eq_divInt (n : ℕ) : ↑n = n /. 1
-- Mathlib/Data/Nat/Size.lean
theorem shiftLeft'_tt_eq_mul_pow (m) : ∀ n, shiftLeft' true m n + 1 = (m + 1) * 2 ^ n
-- Mathlib/GroupTheory/GroupAction/Embedding.lean
@[to_additive]
theorem coe_smul [Group G] [MulAction G β] (g : G) (f : α ↪ β) : ⇑(g • f) = g • ⇑f
-- Mathlib/Analysis/NormedSpace/Exponential.lean
theorem continuousOn_exp : ContinuousOn (exp 𝕂 : 𝔸 → 𝔸) (EMetric.ball 0 (expSeries 𝕂 𝔸).radius)
-- Mathlib/CategoryTheory/Limits/Shapes/BinaryProducts.lean
@[simp]
theorem coprod.desc_comp_inl_comp_inr {W X Y Z : C} [HasBinaryCoproduct W Y]
    [HasBinaryCoproduct X Z] (g : W ⟶ X) (g' : Y ⟶ Z) :
    coprod.desc (g ≫ coprod.inl) (g' ≫ coprod.inr) = coprod.map g g'
-- Mathlib/Analysis/SpecialFunctions/Trigonometric/Deriv.lean
@[simp]
theorem Real.logDeriv_cosh : logDeriv (Real.cosh) = Real.tanh
-- Mathlib/Data/Nat/Factors.lean
theorem eq_prime_pow_of_unique_prime_dvd {n p : ℕ} (hpos : n ≠ 0)
    (h : ∀ {d}, Nat.Prime d → d ∣ n → d = p) : n = p ^ n.primeFactorsList.length
-- Mathlib/Geometry/Manifold/SmoothManifoldWithCorners.lean
theorem extChartAt_preimage_mem_nhds' {x x' : M} (h : x' ∈ (extChartAt I x).source)
    (ht : t ∈ 𝓝 x') : (extChartAt I x).symm ⁻¹' t ∈ 𝓝 (extChartAt I x x')
-- Mathlib/Data/PNat/Basic.lean
@[simp]
theorem coe_coeMonoidHom : (coeMonoidHom : ℕ+ → ℕ) = Coe.coe
-- Mathlib/CategoryTheory/Limits/IsConnected.lean
theorem isConnected_iff_isColimit_pUnitCocone :
    IsConnected C ↔ Nonempty (IsColimit (pUnitCocone.{w} C))
-- Mathlib/Topology/Connected/Basic.lean
theorem connectedComponent_eq {x y : α} (h : y ∈ connectedComponent x) :
    connectedComponent x = connectedComponent y
-- Mathlib/Topology/MetricSpace/Infsep.lean
theorem einfsep_anti (hst : s ⊆ t) : t.einfsep ≤ s.einfsep
-- Mathlib/LinearAlgebra/Matrix/Determinant/Basic.lean
theorem det_updateRow_add_smul_self (A : Matrix n n R) {i j : n} (hij : i ≠ j) (c : R) :
    det (updateRow A i (A i + c • A j)) = det A
-- Mathlib/CategoryTheory/Generator.lean
theorem isSeparating_unop_iff (𝒢 : Set Cᵒᵖ) : IsSeparating 𝒢.unop ↔ IsCoseparating 𝒢
-- Mathlib/LinearAlgebra/Basis.lean
theorem repr_range : LinearMap.range (b.repr : M →ₗ[R] ι →₀ R) = Finsupp.supported R R univ
-- Mathlib/Order/Interval/Finset/Defs.lean
@[simp]
theorem mem_Ioi : x ∈ Ioi a ↔ a < x
-- Mathlib/Data/Real/Hyperreal.lean
@[simp, norm_cast]
theorem coe_inv (x : ℝ) : ↑x⁻¹ = (x⁻¹ : ℝ*)
-- Mathlib/MeasureTheory/Function/SpecialFunctions/Inner.lean
@[measurability]
theorem AEMeasurable.inner_const {m : MeasurableSpace α} [MeasurableSpace E]
    [OpensMeasurableSpace E] [SecondCountableTopology E]
    {μ : MeasureTheory.Measure α} {f : α → E} {c : E} (hf : AEMeasurable f μ) :
    AEMeasurable (fun x => ⟪f x, c⟫) μ
-- Mathlib/AlgebraicGeometry/Morphisms/RingHomProperties.lean
theorem of_source_openCover [IsAffine Y]
    (𝒰 : X.OpenCover) [∀ i, IsAffine (𝒰.obj i)] (H : ∀ i, Q ((𝒰.map i ≫ f).app ⊤)) :
    P f
-- .lake/packages/lean4/src/lean/Init/Data/List/Lemmas.lean
theorem maximum?_le_iff [Max α] [LE α]
    (max_le_iff : ∀ a b c : α, max b c ≤ a ↔ b ≤ a ∧ c ≤ a) :
    {xs : List α} → xs.maximum? = some a → ∀ x, a ≤ x ↔ ∀ b ∈ xs, b ≤ x
-- Mathlib/CategoryTheory/Sites/IsSheafFor.lean
theorem isSeparatedFor_top (P : Cᵒᵖ ⥤ Type w) : IsSeparatedFor P (⊤ : Presieve X)
-- Mathlib/Topology/UniformSpace/UniformConvergence.lean
/-- A uniform limit of continuous functions is continuous. -/
protected theorem TendstoUniformly.continuous (h : TendstoUniformly F f p)
    (hc : ∀ᶠ n in p, Continuous (F n)) [NeBot p] : Continuous f
-- Mathlib/LinearAlgebra/Dimension/StrongRankCondition.lean
/-- The dimension theorem: if `v` and `v'` are two bases, their index types
have the same cardinalities. -/
theorem mk_eq_mk_of_basis (v : Basis ι R M) (v' : Basis ι' R M) :
    Cardinal.lift.{w'} #ι = Cardinal.lift.{w} #ι'
-- Mathlib/Order/CompleteLatticeIntervals.lean
@[simp] theorem coe_iSup : (↑(⨆ i, f i) : α) = ⨆ i, (f i : α)
-- Mathlib/Order/UpperLower/Basic.lean
@[simp, norm_cast]
theorem coe_iInf (f : ι → LowerSet α) : (↑(⨅ i, f i) : Set α) = ⋂ i, f i
-- Mathlib/Topology/Order/OrderClosed.lean
theorem IsClosed.epigraph [TopologicalSpace β] {f : β → α} {s : Set β} (hs : IsClosed s)
    (hf : ContinuousOn f s) : IsClosed { p : β × α | p.1 ∈ s ∧ f p.1 ≤ p.2 }
-- Mathlib/Combinatorics/Quiver/SingleObj.lean
@[simp]
theorem toPrefunctor_symm_id : toPrefunctor.symm (𝟭q (SingleObj α)) = id
-- Mathlib/Data/Set/Lattice.lean
theorem iInter_plift_down (f : ι → Set α) : ⋂ i, f (PLift.down i) = ⋂ i, f i
-- Mathlib/Order/WellFoundedSet.lean
theorem isWF_univ_iff : IsWF (univ : Set α) ↔ WellFounded ((· < ·) : α → α → Prop)
-- Mathlib/Data/Set/Function.lean
theorem MapsTo.inter_bijOn (h₁ : MapsTo f s₁ t₁) (h₂ : BijOn f s₂ t₂) (h₃ : s₂ ∩ f ⁻¹' t₁ ⊆ s₁) :
    BijOn f (s₁ ∩ s₂) (t₁ ∩ t₂)
-- Mathlib/GroupTheory/Exponent.lean
@[to_additive]
theorem orderOf_le_exponent (h : ExponentExists G) (g : G) : orderOf g ≤ exponent G
-- Mathlib/Order/Filter/Pointwise.lean
theorem vsub_le_vsub_right : f₁ ≤ f₂ → f₁ -ᵥ g ≤ f₂ -ᵥ g
-- Mathlib/Algebra/Homology/ShortComplex/RightHomology.lean
@[reassoc]
lemma opcyclesMap'_comp (φ₁ : S₁ ⟶ S₂) (φ₂ : S₂ ⟶ S₃)
    (h₁ : S₁.RightHomologyData) (h₂ : S₂.RightHomologyData) (h₃ : S₃.RightHomologyData) :
    opcyclesMap' (φ₁ ≫ φ₂) h₁ h₃ = opcyclesMap' φ₁ h₁ h₂ ≫ opcyclesMap' φ₂ h₂ h₃
-- Mathlib/CategoryTheory/Sites/LocallyFullyFaithful.lean
lemma Functor.imageSieve_eq_imageSieve {D : Type uD} [Category.{vC} D] (G : C ⥤ D) {U V : C}
    (f : G.obj U ⟶ G.obj V) :
    G.imageSieve f = Presheaf.imageSieve (yonedaMap G V) f
-- Mathlib/CategoryTheory/Triangulated/Subcategory.lean
lemma W.shift {X₁ X₂ : C} {f : X₁ ⟶ X₂} (hf : S.W f) (n : ℤ) : S.W (f⟦n⟧')
-- Mathlib/Algebra/CubicDiscriminant.lean
theorem toPoly_injective (P Q : Cubic R) : P.toPoly = Q.toPoly ↔ P = Q
-- Mathlib/Topology/UniformSpace/UniformConvergenceTopology.lean
theorem uniformContinuous_ofUniformFun :
    UniformContinuous fun f : α →ᵤ β ↦ ofFun 𝔖 (UniformFun.toFun f)
-- Mathlib/GroupTheory/Solvable.lean
theorem map_derivedSeries_eq (hf : Function.Surjective f) (n : ℕ) :
    (derivedSeries G n).map f = derivedSeries G' n
-- Mathlib/CategoryTheory/ClosedUnderIsomorphisms.lean
lemma mem_iff_of_isIso [ClosedUnderIsomorphisms P] {X Y : C} (f : X ⟶ Y) [IsIso f] : P X ↔ P Y
-- Mathlib/Order/Interval/Set/Pi.lean
@[to_additive]
theorem image_mulSingle_Ico_right (i : ι) (b : α i) :
    Pi.mulSingle i '' Ico 1 b = Ico 1 (Pi.mulSingle i b)
-- Mathlib/Analysis/Complex/UpperHalfPlane/Topology.lean
theorem embedding_coe : Embedding ((↑) : ℍ → ℂ)
-- Mathlib/MeasureTheory/Integral/Lebesgue.lean
@[simp]
theorem lintegral_eq_zero_iff {f : α → ℝ≥0∞} (hf : Measurable f) : ∫⁻ a, f a ∂μ = 0 ↔ f =ᵐ[μ] 0
-- Mathlib/NumberTheory/ArithmeticFunction.lean
@[arith_mult]
theorem IsMultiplicative.ppow [CommSemiring R] {f : ArithmeticFunction R} (hf : f.IsMultiplicative)
    {k : ℕ} : IsMultiplicative (f.ppow k)
-- Mathlib/Analysis/Asymptotics/SuperpolynomialDecay.lean
theorem superpolynomialDecay_mul_param_iff (hk : Tendsto k l atTop) :
    SuperpolynomialDecay l k (f * k) ↔ SuperpolynomialDecay l k f
-- Mathlib/Data/Fin/Tuple/Reflection.lean
/-- This can be used to prove
```lean
example [AddCommMonoid α] (a : Fin 3 → α) : ∑ i, a i = a 0 + a 1 + a 2 :=
  (sum_eq _).symm
```
-/
@[simp]
theorem sum_eq [AddCommMonoid α] : ∀ {m} (a : Fin m → α), sum a = ∑ i, a i
-- Mathlib/CategoryTheory/Idempotents/HomologicalComplex.lean
/-- The counit isomorphism of the equivalence
`Karoubi (HomologicalComplex C c) ≌ HomologicalComplex (Karoubi C) c`. -/
@[simps!]
def counitIso : inverse ⋙ functor ≅ 𝟭 (HomologicalComplex (Karoubi C) c)
-- Mathlib/Data/Nat/Count.lean
theorem count_succ (n : ℕ) : count p (n + 1) = count p n + if p n then 1 else 0
-- Mathlib/Order/Interval/Multiset.lean
@[simp]
theorem Ico_sub_Ico_left (a b c : α) : Ico a b - Ico a c = Ico (max a c) b
-- Mathlib/Order/Monotone/Monovary.lean
theorem monovaryOn_self (f : ι → α) (s : Set ι) : MonovaryOn f f s
-- Mathlib/NumberTheory/MulChar/Lemmas.lean
/-- The values of a multiplicative character on `R` are `n`th roots of unity, where `n = #Rˣ`. -/
lemma apply_mem_rootsOfUnity [Fintype Rˣ] (a : Rˣ) {χ : MulChar R R'} :
    equivToUnitHom χ a ∈ rootsOfUnity ⟨Fintype.card Rˣ, Fintype.card_pos⟩ R'
-- Mathlib/Algebra/Homology/Additive.lean
@[simp]
theorem singleMapHomologicalComplex_hom_app_self (j : ι) (X : W₁) :
    ((singleMapHomologicalComplex F c j).hom.app X).f j =
      F.map (singleObjXSelf c j X).hom ≫ (singleObjXSelf c j (F.obj X)).inv
-- Mathlib/LinearAlgebra/FiniteDimensional/Defs.lean
theorem ker_noncommProd_eq_of_supIndep_ker [FiniteDimensional K V] {ι : Type*} {f : ι → V →ₗ[K] V}
    (s : Finset ι) (comm) (h : s.SupIndep fun i ↦ ker (f i)) :
    ker (s.noncommProd f comm) = ⨆ i ∈ s, ker (f i)
-- Mathlib/Analysis/Complex/CauchyIntegral.lean
/-- **Cauchy-Goursat theorem for a rectangle**: the integral of a complex differentiable function
over the boundary of a rectangle equals zero. More precisely, if `f` is continuous on a closed
rectangle and is complex differentiable on the corresponding open rectangle, then its integral over
the boundary of the rectangle equals zero. -/
theorem integral_boundary_rect_eq_zero_of_continuousOn_of_differentiableOn (f : ℂ → E) (z w : ℂ)
    (Hc : ContinuousOn f ([[z.re, w.re]] ×ℂ [[z.im, w.im]]))
    (Hd : DifferentiableOn ℂ f
      (Ioo (min z.re w.re) (max z.re w.re) ×ℂ Ioo (min z.im w.im) (max z.im w.im))) :
    (∫ x : ℝ in z.re..w.re, f (x + z.im * I)) - (∫ x : ℝ in z.re..w.re, f (x + w.im * I)) +
      I • (∫ y : ℝ in z.im..w.im, f (re w + y * I)) -
      I • (∫ y : ℝ in z.im..w.im, f (re z + y * I)) = 0
-- .lake/packages/lean4/src/lean/Init/Data/Nat/MinMax.lean
protected theorem min_le_left (a b : Nat) : min a b ≤ a
-- Mathlib/LinearAlgebra/SModEq.lean
theorem zero : x ≡ 0 [SMOD U] ↔ x ∈ U
-- Mathlib/Order/Filter/SmallSets.lean
theorem smallSets_eq_generate {f : Filter α} : f.smallSets = generate (powerset '' f.sets)
-- Mathlib/CategoryTheory/IsConnected.lean
/-- If any two objects in a nonempty category are linked by a sequence of (potentially reversed)
morphisms, then J is connected.

The converse of `exists_zigzag'`.
-/
theorem isConnected_of_zigzag [Nonempty J] (h : ∀ j₁ j₂ : J, ∃ l,
    List.Chain Zag j₁ l ∧ List.getLast (j₁ :: l) (List.cons_ne_nil _ _) = j₂) :
    IsConnected J
-- Mathlib/MeasureTheory/Integral/Lebesgue.lean
theorem setLintegral_pos_iff {f : α → ℝ≥0∞} (hf : Measurable f) {s : Set α} :
    0 < ∫⁻ a in s, f a ∂μ ↔ 0 < μ (Function.support f ∩ s)
-- Mathlib/Algebra/EuclideanDomain/Defs.lean
@[simp]
theorem gcdB_zero_left {s : R} : gcdB 0 s = 1
-- Mathlib/RingTheory/DiscreteValuationRing/TFAE.lean
/--
The following are equivalent for a
noetherian local domain that is not a field `(R, m, k)`:
0. `R` is a discrete valuation ring
1. `R` is a valuation ring
2. `R` is a dedekind domain
3. `R` is integrally closed with a unique non-zero prime ideal
4. `m` is principal
5. `dimₖ m/m² = 1`
6. Every nonzero ideal is a power of `m`.

Also see `tfae_of_isNoetherianRing_of_localRing_of_isDomain` for a version without `¬ IsField R`.
-/
theorem DiscreteValuationRing.TFAE [IsNoetherianRing R] [LocalRing R] [IsDomain R]
    (h : ¬IsField R) :
    List.TFAE
      [DiscreteValuationRing R, ValuationRing R, IsDedekindDomain R,
        IsIntegrallyClosed R ∧ ∃! P : Ideal R, P ≠ ⊥ ∧ P.IsPrime, (maximalIdeal R).IsPrincipal,
        finrank (ResidueField R) (CotangentSpace R) = 1,
        ∀ (I) (_ : I ≠ ⊥), ∃ n : ℕ, I = maximalIdeal R ^ n]
-- .lake/packages/lean4/src/lean/Init/Data/Nat/Basic.lean
theorem pred_le_iff_le_succ : ∀ {n m}, pred n ≤ m ↔ n ≤ succ m
-- Mathlib/Order/BooleanAlgebra.lean
@[simp]
theorem compl_himp : (x ⇨ y)ᶜ = x \ y
-- Mathlib/Algebra/GroupWithZero/NonZeroDivisors.lean
theorem mul_right_mem_nonZeroDivisors_eq_zero_iff {x r : M} (hr : r ∈ M⁰) : x * r = 0 ↔ x = 0
-- Mathlib/Algebra/Star/NonUnitalSubalgebra.lean
theorem prod_mono {S T : NonUnitalStarSubalgebra R A} {S₁ T₁ : NonUnitalStarSubalgebra R B} :
    S ≤ T → S₁ ≤ T₁ → prod S S₁ ≤ prod T T₁
-- Mathlib/Data/DFinsupp/NeLocus.lean
theorem mapRange_neLocus_eq [∀ a, DecidableEq (N a)] [∀ a, DecidableEq (M a)] (f g : Π₀ a, N a)
    {F : ∀ a, N a → M a} (F0 : ∀ a, F a 0 = 0) (hF : ∀ a, Function.Injective (F a)) :
    (f.mapRange F F0).neLocus (g.mapRange F F0) = f.neLocus g
-- Mathlib/Analysis/Normed/Lp/PiLp.lean
@[simp] theorem _root_.LinearIsometryEquiv.piLpCurry_apply
    (f : PiLp p (fun i : Sigma κ => α i.1 i.2)) :
    _root_.LinearIsometryEquiv.piLpCurry 𝕜 p α f =
      (WithLp.equiv _ _).symm (fun i => (WithLp.equiv _ _).symm <|
        Sigma.curry (WithLp.equiv _ _ f) i)
-- Mathlib/Geometry/Manifold/SmoothManifoldWithCorners.lean
/-- If `I` is a `ModelWithCorners.Boundaryless` model, then it is a homeomorphism. -/
@[simps (config := {simpRhs := true})]
def ModelWithCorners.toHomeomorph {𝕜 : Type*} [NontriviallyNormedField 𝕜] {E : Type*}
    [NormedAddCommGroup E] [NormedSpace 𝕜 E] {H : Type*} [TopologicalSpace H]
    (I : ModelWithCorners 𝕜 E H) [I.Boundaryless] : H ≃ₜ E
-- Mathlib/Algebra/Order/Hom/Basic.lean
/-- `GroupSeminormClass F α` states that `F` is a type of `β`-valued seminorms on the group `α`.

You should extend this class when you extend `GroupSeminorm`. -/
@[to_additive]
class GroupSeminormClass (F α β : Type*) [Group α] [OrderedAddCommMonoid β] [FunLike F α β]
  extends MulLEAddHomClass F α β : Prop where
  /-- The image of one is zero. -/
  map_one_eq_zero (f : F) : f 1 = 0
  /-- The map is invariant under inversion of its argument. -/
  map_inv_eq_map (f : F) (a : α) : f a⁻¹ = f a
-- Mathlib/Logic/Equiv/PartialEquiv.lean
theorem trans_apply {x : α} : (e.trans e') x = e' (e x)
-- Mathlib/Algebra/Group/Nat.lean
@[parity_simps] lemma even_sub (h : n ≤ m) : Even (m - n) ↔ (Even m ↔ Even n)
-- Mathlib/Probability/Martingale/Convergence.lean
theorem Submartingale.ae_tendsto_limitProcess_of_uniformIntegrable (hf : Submartingale f ℱ μ)
    (hunif : UniformIntegrable f 1 μ) :
    ∀ᵐ ω ∂μ, Tendsto (fun n => f n ω) atTop (𝓝 (ℱ.limitProcess f μ ω))
-- Mathlib/CategoryTheory/Sites/CoversTop.lean
lemma familyOfElements_isCompatible (hx : x.IsCompatible) (X : C) :
    (familyOfElements x X).Compatible
-- Mathlib/Order/OmegaCompletePartialOrder.lean
@[mono]
theorem apply_mono {f g : α →𝒄 β} {x y : α} (h₁ : f ≤ g) (h₂ : x ≤ y) : f x ≤ g y
-- Mathlib/Algebra/Group/Prod.lean
@[to_additive (attr := simp) coe_prodComm]
theorem coe_prodComm : ⇑(prodComm : M × N ≃* N × M) = Prod.swap
-- Mathlib/Algebra/Algebra/Quasispectrum.lean
/-- Given an element `a : A` of an `S`-algebra, where `S` is itself an `R`-algebra, we say that
the spectrum of `a` restricts via a function `f : S → R` if `f` is a left inverse of
`algebraMap R S`, and `f` is a right inverse of `algebraMap R S` on `spectrum S a`.

For example, when `f = Complex.re` (so `S := ℂ` and `R := ℝ`), `SpectrumRestricts a f` means that
the `ℂ`-spectrum of `a` is contained within `ℝ`. This arises naturally when `a` is selfadjoint
and `A` is a C⋆-algebra.

This is the property allows us to restrict a continuous functional calculus over `S` to a
continuous functional calculus over `R`. -/
structure QuasispectrumRestricts
    {R S A : Type*} [CommSemiring R] [CommSemiring S] [NonUnitalRing A]
    [Module R A] [Module S A] [Algebra R S] (a : A) (f : S → R) : Prop where
  /-- `f` is a right inverse of `algebraMap R S` when restricted to `quasispectrum S a`. -/
  rightInvOn : (quasispectrum S a).RightInvOn f (algebraMap R S)
  /-- `f` is a left inverse of `algebraMap R S`. -/
  left_inv : Function.LeftInverse f (algebraMap R S)
-- Mathlib/Algebra/Group/Subsemigroup/Basic.lean
@[to_additive (attr := simp)]
theorem coe_top : ((⊤ : Subsemigroup M) : Set M) = Set.univ
-- Mathlib/Data/Set/Pointwise/SMul.lean
@[to_additive]
theorem subset_set_smul_iff : A ⊆ a • B ↔ a⁻¹ • A ⊆ B
-- Mathlib/Algebra/FreeMonoid/Count.lean
theorem countP_of (x : α) : countP p (of x) = if p x = true then 1 else 0
-- .lake/packages/lean4/src/lean/Init/Data/Fin/Lemmas.lean
@[simp] theorem val_rev (i : Fin n) : rev i = n - (i + 1)
-- Mathlib/Algebra/Lie/Basic.lean
@[simp]
theorem map_sub (f : M →ₗ⁅R,L⁆ N) (x y : M) : f (x - y) = f x - f y
-- Mathlib/Algebra/Group/Equiv/Basic.lean
@[to_additive (attr := simp)]
theorem piCongrRight_refl {η : Type*} {Ms : η → Type*} [∀ j, Mul (Ms j)] :
    (piCongrRight fun j => MulEquiv.refl (Ms j)) = MulEquiv.refl _
-- Mathlib/Analysis/Calculus/ContDiff/Defs.lean
/-- A function is `C^(n + 1)` if and only if it is differentiable,
and its derivative (formulated in terms of `fderiv`) is `C^n`. -/
theorem contDiff_succ_iff_fderiv {n : ℕ} :
    ContDiff 𝕜 (n + 1 : ℕ) f ↔ Differentiable 𝕜 f ∧ ContDiff 𝕜 n fun y => fderiv 𝕜 f y
-- Mathlib/MeasureTheory/Measure/NullMeasurable.lean
protected theorem _root_.Measurable.nullMeasurable (h : Measurable f) : NullMeasurable f μ
-- Mathlib/Data/Set/Pointwise/Basic.lean
@[to_additive]
theorem univ_mul_of_one_mem (ht : (1 : α) ∈ t) : univ * t = univ
-- Mathlib/Data/ENNReal/Real.lean
theorem ofReal_mul' {p q : ℝ} (hq : 0 ≤ q) :
    ENNReal.ofReal (p * q) = ENNReal.ofReal p * ENNReal.ofReal q
-- Mathlib/Topology/Algebra/Order/Field.lean
/-- The function `x^(-n)` tends to `0` at `+∞` for any positive natural `n`.
A version for positive real powers exists as `tendsto_rpow_neg_atTop`. -/
theorem tendsto_pow_neg_atTop {n : ℕ} (hn : n ≠ 0) :
    Tendsto (fun x : 𝕜 => x ^ (-(n : ℤ))) atTop (𝓝 0)
-- Mathlib/Analysis/SpecialFunctions/Pow/NNReal.lean
theorem rpow_left_surjective {x : ℝ} (hx : x ≠ 0) : Function.Surjective fun y : ℝ≥0∞ => y ^ x
-- Mathlib/Topology/UrysohnsLemma.lean
theorem approx_le_succ (c : CU P) (n : ℕ) (x : X) : c.approx n x ≤ c.approx (n + 1) x
-- Mathlib/MeasureTheory/Function/StronglyMeasurable/Basic.lean
@[to_additive (attr := measurability)]
theorem _root_.List.stronglyMeasurable_prod (l : List (α → M))
    (hl : ∀ f ∈ l, StronglyMeasurable f) :
    StronglyMeasurable fun x => (l.map fun f : α → M => f x).prod