ruc-ai4math/mathlib_handler_benchmark_410 huggingface dataset:
-- Mathlib/Geometry/Manifold/Algebra/SmoothFunctions.lean
/-- Coercion to a function as a `MonoidHom`. Similar to `MonoidHom.coeFn`. -/
@[to_additive (attr := simps) "Coercion to a function as an `AddMonoidHom`.
  Similar to `AddMonoidHom.coeFn`."]
def coeFnMonoidHom {G : Type*} [Monoid G] [TopologicalSpace G] [ChartedSpace H' G]
    [SmoothMul I' G] : C^∞⟮I, N; I', G⟯ →* N → G
-- Mathlib/Analysis/Convex/Between.lean
theorem sbtw_midpoint_of_ne {x y : P} (h : x ≠ y) : Sbtw R x (midpoint R x y) y
-- Mathlib/Logic/Equiv/Basic.lean
@[simp]
theorem sumArrowEquivProdArrow_apply_snd (f : α ⊕ β → γ) (b : β) :
    (sumArrowEquivProdArrow α β γ f).2 b = f (inr b)
-- Mathlib/CategoryTheory/Shift/Basic.lean
lemma shiftFunctorAdd'_zero_add (a : A) :
    shiftFunctorAdd' C 0 a a (zero_add a) = (Functor.leftUnitor _).symm ≪≫
    isoWhiskerRight (shiftFunctorZero C A).symm (shiftFunctor C a)
-- Mathlib/Analysis/Calculus/ContDiff/Basic.lean
/-- Postcomposing `f` with `Prod.fst` is `C^n` -/
theorem ContDiff.fst {f : E → F × G} (hf : ContDiff 𝕜 n f) : ContDiff 𝕜 n fun x => (f x).1
-- Mathlib/Data/Prod/Basic.lean
@[simp]
theorem map_bijective [Nonempty α] [Nonempty β] {f : α → γ} {g : β → δ} :
    Bijective (map f g) ↔ Bijective f ∧ Bijective g
-- Mathlib/Topology/MetricSpace/Pseudo/Lemmas.lean
lemma dist_le_of_mem_pi_Icc (hx : x ∈ Icc x' y') (hy : y ∈ Icc x' y') : dist x y ≤ dist x' y'
-- Mathlib/Topology/Algebra/Monoid.lean
@[to_additive]
theorem continuousOn_list_prod {f : ι → X → M} (l : List ι) {t : Set X}
    (h : ∀ i ∈ l, ContinuousOn (f i) t) :
    ContinuousOn (fun a => (l.map fun i => f i a).prod) t
-- Mathlib/LinearAlgebra/Lagrange.lean
theorem interpolate_one (hvs : Set.InjOn v s) (hs : s.Nonempty) : interpolate s v 1 = 1
-- Mathlib/Data/Multiset/Basic.lean
@[simp]
theorem map_union [DecidableEq β] {f : α → β} (finj : Function.Injective f) {s t : Multiset α} :
    map f (s ∪ t) = map f s ∪ map f t
-- Mathlib/Data/Set/Finite.lean
theorem Finite.iInf_biSup_of_monotone {ι ι' α : Type*} [Preorder ι'] [Nonempty ι']
    [IsDirected ι' (swap (· ≤ ·))] [Order.Coframe α] {s : Set ι} (hs : s.Finite) {f : ι → ι' → α}
    (hf : ∀ i ∈ s, Monotone (f i)) : ⨅ j, ⨆ i ∈ s, f i j = ⨆ i ∈ s, ⨅ j, f i j
-- Mathlib/Data/Num/Lemmas.lean
@[simp, norm_cast]
theorem cast_bit0 [One α] [Add α] (n : PosNum) : (n.bit0 : α) = (n : α) + n
-- Mathlib/Topology/Filter.lean
theorem nhds_nhds (x : X) :
    𝓝 (𝓝 x) = ⨅ (s : Set X) (_ : IsOpen s) (_ : x ∈ s), 𝓟 (Iic (𝓟 s))
-- Mathlib/SetTheory/Cardinal/Ordinal.lean
protected theorem ciSup_add (c : Cardinal.{v}) : (⨆ i, f i) + c = ⨆ i, f i + c
-- Mathlib/LinearAlgebra/Matrix/Charpoly/FiniteField.lean
@[simp]
theorem ZMod.charpoly_pow_card {p : ℕ} [Fact p.Prime] (M : Matrix n n (ZMod p)) :
    (M ^ p).charpoly = M.charpoly
-- Mathlib/Order/Interval/Set/Basic.lean
theorem Ici_subset_Icc_union_Ioi : Ici a ⊆ Icc a b ∪ Ioi b
-- Mathlib/Topology/Homotopy/Product.lean
@[simp]
theorem prod_projLeft_projRight (p : Path.Homotopic.Quotient (a₁, b₁) (a₂, b₂)) :
    prod (projLeft p) (projRight p) = p
-- Mathlib/LinearAlgebra/Dual.lean
@[simp]
theorem dualLift_of_subtype {φ : Module.Dual K W} (w : W) : W.dualLift φ (w : V) = φ w
-- Mathlib/CategoryTheory/Shift/Pullback.lean
lemma pullbackShiftFunctorZero_hom_app :
    (shiftFunctorZero _ A).hom.app X =
      (pullbackShiftIso C φ 0 0 (by simp)).hom.app X ≫ (shiftFunctorZero C B).hom.app X
-- Mathlib/ModelTheory/Basic.lean
@[simp]
theorem toFun_eq_coe {f : M →[L] N} : f.toFun = (f : M → N)
-- Mathlib/Geometry/Manifold/ChartedSpace.lean
@[simp, mfld_simps]
theorem achart_val (x : M) : (achart H x).1 = chartAt H x
-- Mathlib/RingTheory/MvPolynomial/WeightedHomogeneous.lean
theorem finsum_weightedHomogeneousComponent :
    (finsum fun m => weightedHomogeneousComponent w m φ) = φ
-- Mathlib/Data/Part.lean
@[simp]
theorem inter_get_eq [Inter α] (a b : Part α) (hab : Dom (a ∩ b)) :
    (a ∩ b).get hab = a.get (left_dom_of_inter_dom hab) ∩ b.get (right_dom_of_inter_dom hab)
-- Mathlib/FieldTheory/Perfect.lean
/-- For a reduced ring, surjectivity of the Frobenius map is a sufficient condition for perfection.
-/
lemma PerfectRing.ofSurjective (R : Type*) (p : ℕ) [CommRing R] [ExpChar R p]
    [IsReduced R] (h : Surjective <| frobenius R p) : PerfectRing R p
-- Mathlib/Computability/Encoding.lean
theorem decode_encodeNat : ∀ n, decodeNat (encodeNat n) = n
-- Mathlib/Algebra/Group/Basic.lean
theorem zpow_eq_zpow_emod' {x : G} (m : ℤ) {n : ℕ} (h : x ^ n = 1) :
    x ^ m = x ^ (m % (n : ℤ))
-- Mathlib/Data/Part.lean
theorem getOrElse_of_not_dom (a : Part α) (h : ¬a.Dom) [Decidable a.Dom] (d : α) :
    getOrElse a d = d
-- Mathlib/SetTheory/Cardinal/Cofinality.lean
theorem deriv_lt_ord {f : Ordinal.{u} → Ordinal} {c} (hc : IsRegular c) (hc' : c ≠ ℵ₀)
    (hf : ∀ i < c.ord, f i < c.ord) {a} : a < c.ord → deriv f a < c.ord
-- Mathlib/Probability/StrongLaw.lean
/-- The truncated and non-truncated versions of `Xᵢ` have the same asymptotic behavior, as they
almost surely coincide at all but finitely many steps. This follows from a probability computation
and Borel-Cantelli. -/
theorem strong_law_aux5 :
    ∀ᵐ ω, (fun n : ℕ => ∑ i ∈ range n, truncation (X i) i ω - ∑ i ∈ range n, X i ω) =o[atTop]
    fun n : ℕ => (n : ℝ)
-- Mathlib/Algebra/Group/Defs.lean
@[to_additive (attr := simp)]
theorem mul_left_inv : ∀ a : G, a⁻¹ * a = 1
-- Mathlib/Data/Nat/Log.lean
@[simp] lemma clog_zero_right (b : ℕ) : clog b 0 = 0
-- Mathlib/Order/ConditionallyCompleteLattice/Finset.lean
theorem Set.Finite.lt_csInf_iff (hs : s.Finite) (h : s.Nonempty) : a < sInf s ↔ ∀ x ∈ s, a < x
-- Mathlib/Algebra/Homology/Single.lean
@[simp]
lemma toSingle₀Equiv_symm_apply_f_zero {C : ChainComplex V ℕ} {X : V}
    (f : C.X 0 ⟶ X) (hf : C.d 1 0 ≫ f = 0) :
    ((toSingle₀Equiv C X).symm ⟨f, hf⟩).f 0 = f
-- .lake/packages/lean4/src/lean/Init/PropLemmas.lean
theorem or_or_distrib_right : (a ∨ b) ∨ c ↔ (a ∨ c) ∨ b ∨ c
-- Mathlib/Order/Hom/Lattice.lean
/-- The type of finitary infimum-preserving homomorphisms from `α` to `β`. -/
structure InfTopHom (α β : Type*) [Inf α] [Inf β] [Top α] [Top β] extends InfHom α β where
  /-- An `InfTopHom` preserves the top element. -/
  map_top' : toFun ⊤ = ⊤
-- Mathlib/ModelTheory/Bundled.lean
@[simp]
theorem coe_of {M : Type w} [L.Structure M] [Nonempty M] (h : M ⊨ T) : (h.bundled : Type w) = M
-- Mathlib/FieldTheory/RatFunc/Defs.lean
theorem mk_eq_localization_mk (p : K[X]) {q : K[X]} (hq : q ≠ 0) :
    RatFunc.mk p q =
      ofFractionRing (Localization.mk p ⟨q, mem_nonZeroDivisors_iff_ne_zero.mpr hq⟩)
-- Mathlib/Data/ENNReal/Real.lean
@[simp]
lemma ofReal_lt_ofNat {p : ℝ} {n : ℕ} [n.AtLeastTwo] :
    ENNReal.ofReal p < no_index (OfNat.ofNat n) ↔ p < OfNat.ofNat n
-- Mathlib/Data/Finsupp/Basic.lean
theorem mem_support_multiset_sum [AddCommMonoid M] {s : Multiset (α →₀ M)} (a : α) :
    a ∈ s.sum.support → ∃ f ∈ s, a ∈ (f : α →₀ M).support
-- Mathlib/Data/Fin/Basic.lean
theorem one_lt_last [NeZero n] : 1 < last (n + 1)
-- Mathlib/MeasureTheory/Measure/FiniteMeasureProd.lean
@[simp] lemma map_snd_prod : (μ.prod ν).map Prod.snd = μ univ • ν
-- Mathlib/Topology/Support.lean
@[to_additive]
theorem comp_left (hf : HasCompactMulSupport f) (hg : g 1 = 1) :
    HasCompactMulSupport (g ∘ f)
-- Mathlib/RingTheory/FractionalIdeal/Operations.lean
@[simp]
theorem mem_spanSingleton {x y : P} : x ∈ spanSingleton S y ↔ ∃ z : R, z • y = x
-- Mathlib/Algebra/MvPolynomial/Basic.lean
theorem support_monomial [h : Decidable (a = 0)] :
    (monomial s a).support = if a = 0 then ∅ else {s}
-- Mathlib/RingTheory/DedekindDomain/Factorization.lean
/-- Only finitely many maximal ideals of `R` divide a given nonzero ideal. -/
theorem Ideal.finite_factors {I : Ideal R} (hI : I ≠ 0) :
    {v : HeightOneSpectrum R | v.asIdeal ∣ I}.Finite
-- Mathlib/Algebra/Module/Injective.lean
theorem ExtensionOfMaxAdjoin.eqn {y : N} (x : supExtensionOfMaxSingleton i f y) :
    ↑x = ↑(ExtensionOfMaxAdjoin.fst i x) + ExtensionOfMaxAdjoin.snd i x • y
-- Mathlib/Algebra/Homology/HomotopyCategory/HomComplexShift.lean
lemma δ_leftUnshift {a n' : ℤ} (γ : Cochain (K⟦a⟧) L n') (n : ℤ) (hn : n + a = n')
    (m m' : ℤ) (hm' : m + a = m') :
    δ n m (γ.leftUnshift n hn) = a.negOnePow • (δ n' m' γ).leftUnshift m hm'
-- Mathlib/Analysis/Normed/Group/Pointwise.lean
@[to_additive]
theorem Bornology.IsBounded.mul (hs : IsBounded s) (ht : IsBounded t) : IsBounded (s * t)
-- Mathlib/Data/Seq/Seq.lean
theorem dropn_tail (s : Seq α) (n) : drop (tail s) n = drop s (n + 1)
-- Mathlib/CategoryTheory/MorphismProperty/Basic.lean
@[simp]
lemma map_isoClosure (P : MorphismProperty C) (F : C ⥤ D) :
    P.isoClosure.map F = P.map F
-- Mathlib/Analysis/PSeries.lean
/-- for a series of `NNReal` version. -/
theorem summable_schlomilch_iff {C : ℕ} {u : ℕ → ℕ} {f : ℕ → ℝ≥0}
    (hf : ∀ ⦃m n⦄, 0 < m → m ≤ n → f n ≤ f m)
    (h_pos : ∀ n, 0 < u n) (hu_strict : StrictMono u)
    (hC_nonzero : C ≠ 0) (h_succ_diff : SuccDiffBounded C u) :
    (Summable fun k : ℕ => (u (k + 1) - (u k : ℝ≥0)) * f (u k)) ↔ Summable f
-- Mathlib/LinearAlgebra/Matrix/Basis.lean
theorem toMatrix_update [DecidableEq ι'] (x : M) :
    e.toMatrix (Function.update v j x) = Matrix.updateColumn (e.toMatrix v) j (e.repr x)
-- Mathlib/Analysis/InnerProductSpace/Adjoint.lean
theorem adjointAux_inner_left (A : E →L[𝕜] F) (x : E) (y : F) : ⟪adjointAux A y, x⟫ = ⟪y, A x⟫
-- Mathlib/Data/Finset/NAry.lean
@[simp]
theorem image₂_curry (f : α × β → γ) (s : Finset α) (t : Finset β) :
    image₂ (curry f) s t = (s ×ˢ t).image f
-- Mathlib/Data/Nat/Count.lean
theorem count_eq_card_filter_range (n : ℕ) : count p n = ((range n).filter p).card
-- Mathlib/Order/UpperLower/Basic.lean
@[simp]
theorem lowerBounds_upperClosure : lowerBounds (upperClosure s : Set α) = lowerBounds s
-- Mathlib/Topology/UniformSpace/Equicontinuity.lean
/-- A family `𝓕 : ι → X → α` is equicontinuous on `S` iff the function `swap 𝓕 : X → ι → α` is
continuous on `S` *when `ι → α` is equipped with the topology of uniform convergence*. This is
very useful for developping the equicontinuity API, but it should not be used directly for other
purposes. -/
theorem equicontinuousOn_iff_continuousOn {F : ι → X → α} {S : Set X} :
    EquicontinuousOn F S ↔ ContinuousOn (ofFun ∘ Function.swap F : X → ι →ᵤ α) S
-- Mathlib/LinearAlgebra/StdBasis.lean
theorem proj_stdBasis_ne (i j : ι) (h : i ≠ j) : (proj i).comp (stdBasis R φ j) = 0
-- Mathlib/Analysis/NormedSpace/PiTensorProduct/InjectiveSeminorm.lean
@[simp]
theorem mapL_apply (x : ⨂[𝕜] i, E i) : mapL f x = map (fun i ↦ (f i).toLinearMap) x
-- Mathlib/CategoryTheory/Whiskering.lean
/-- The associator for functors, a natural isomorphism `((F ⋙ G) ⋙ H) ≅ (F ⋙ (G ⋙ H))`.

(In fact, `iso.refl _` will work here, but it tends to make Lean slow later,
and it's usually best to insert explicit associators.)
-/
@[simps]
def associator (F : A ⥤ B) (G : B ⥤ C) (H : C ⥤ D) :
    (F ⋙ G) ⋙ H ≅ F ⋙ G ⋙ H
-- Mathlib/CategoryTheory/Monoidal/Bimod.lean
theorem id_whiskerLeft_bimod {X Y : Mon_ C} {M N : Bimod X Y} (f : M ⟶ N) :
    whiskerLeft (regular X) f = (leftUnitorBimod M).hom ≫ f ≫ (leftUnitorBimod N).inv
-- Mathlib/Data/List/AList.lean
theorem mem_lookup_union {a} {b : β a} {s₁ s₂ : AList β} :
    b ∈ lookup a (s₁ ∪ s₂) ↔ b ∈ lookup a s₁ ∨ a ∉ s₁ ∧ b ∈ lookup a s₂
-- Mathlib/Data/List/Sublists.lean
@[simp]
theorem sublists_nil : sublists (@nil α) = [[]]
-- Mathlib/LinearAlgebra/Projection.lean
@[simp]
theorem mk_quotientEquivOfIsCompl_apply (h : IsCompl p q) (x : E ⧸ p) :
    (Quotient.mk (quotientEquivOfIsCompl p q h x) : E ⧸ p) = x
-- Mathlib/Analysis/BoxIntegral/Basic.lean
/-- If `f` is integrable on a box `I`, then it is integrable on any subbox of `I`. -/
theorem to_subbox (h : Integrable I l f vol) (hJ : J ≤ I) : Integrable J l f vol
-- Mathlib/Topology/PartitionOfUnity.lean
/-- If `X` is a paracompact normal topological space and `U` is an open covering of a closed set
`s`, then there exists a `PartitionOfUnity ι X s` that is subordinate to `U`. -/
theorem exists_isSubordinate [NormalSpace X] [ParacompactSpace X] (hs : IsClosed s) (U : ι → Set X)
    (ho : ∀ i, IsOpen (U i)) (hU : s ⊆ ⋃ i, U i) :
    ∃ f : PartitionOfUnity ι X s, f.IsSubordinate U
-- Mathlib/RingTheory/MvPolynomial/NewtonIdentities.lean
private theorem disjoint_filter_pairs_lt_filter_pairs_eq (k : ℕ) :
    Disjoint (filter (fun t ↦ card t.fst < k) (pairs σ k))
    (filter (fun t ↦ card t.fst = k) (pairs σ k))
-- Mathlib/MeasureTheory/Measure/NullMeasurable.lean
protected theorem iInter {ι : Sort*} [Countable ι] {f : ι → Set α}
    (h : ∀ i, NullMeasurableSet (f i) μ) : NullMeasurableSet (⋂ i, f i) μ
-- Mathlib/Topology/ContinuousOn.lean
theorem nhdsWithin_pi_univ_eq [Finite ι] (s : ∀ i, Set (π i)) (x : ∀ i, π i) :
    𝓝[pi univ s] x = ⨅ i, comap (fun x => x i) (𝓝[s i] x i)
-- Mathlib/CategoryTheory/Limits/Cones.lean
/-- Change a cocone on `F.rightOp : J ⥤ Cᵒᵖ` to a cone on `F : Jᵒᵖ ⥤ C`. -/
@[simps]
def coneOfCoconeRightOp (c : Cocone F.rightOp) : Cone F
-- Mathlib/Algebra/Ring/Hom/Defs.lean
protected lemma RingHom.map_pow (f : α →+* β) (a) : ∀ n : ℕ, f (a ^ n) = f a ^ n
-- Mathlib/Topology/Algebra/Group/Basic.lean
@[to_additive]
theorem Filter.HasBasis.nhds_of_one {ι : Sort*} {p : ι → Prop} {s : ι → Set G}
    (hb : HasBasis (𝓝 1 : Filter G) p s) (x : G) :
    HasBasis (𝓝 x) p fun i => { y | y / x ∈ s i }
-- Mathlib/Analysis/Distribution/SchwartzSpace.lean
lemma _root_.Function.HasTemperateGrowth.zero :
    Function.HasTemperateGrowth (fun _ : E ↦ (0 : F))
-- Mathlib/Analysis/Calculus/ContDiff/Basic.lean
/-- The composition of `C^n` functions at points in domains is `C^n`. -/
theorem ContDiffWithinAt.comp' {s : Set E} {t : Set F} {g : F → G} {f : E → F} (x : E)
    (hg : ContDiffWithinAt 𝕜 n g t (f x)) (hf : ContDiffWithinAt 𝕜 n f s x) :
    ContDiffWithinAt 𝕜 n (g ∘ f) (s ∩ f ⁻¹' t) x
-- Mathlib/MeasureTheory/Constructions/BorelSpace/Real.lean
lemma tendsto_measure_Icc_nhdsWithin_right (b : ℝ) :
    Tendsto (fun δ ↦ μ (Icc (b - δ) (b + δ))) (𝓝[≥] (0 : ℝ)) (𝓝 (μ {b}))
-- Mathlib/Order/Interval/Set/Pi.lean
@[to_additive]
theorem image_mulSingle_Ioc_right (i : ι) (b : α i) :
    Pi.mulSingle i '' Ioc 1 b = Ioc 1 (Pi.mulSingle i b)
-- Mathlib/Analysis/NormedSpace/Multilinear/Curry.lean
@[simp]
theorem currySum_apply (f : ContinuousMultilinearMap 𝕜 (fun _ : ι ⊕ ι' => G) G') (m : ι → G)
    (m' : ι' → G) : f.currySum m m' = f (Sum.elim m m')
-- Mathlib/Topology/PartialHomeomorph.lean
theorem source_preimage_target : e.source ⊆ e ⁻¹' e.target
-- Mathlib/Topology/Maps/Basic.lean
theorem preimage_closure_subset_closure_preimage (hf : IsOpenMap f) {s : Set Y} :
    f ⁻¹' closure s ⊆ closure (f ⁻¹' s)
-- Mathlib/Analysis/Calculus/TangentCone.lean
theorem uniqueDiffWithinAt_Ioo {a b t : ℝ} (ht : t ∈ Set.Ioo a b) :
    UniqueDiffWithinAt ℝ (Set.Ioo a b) t
-- Mathlib/Geometry/Manifold/Algebra/LeftInvariantDerivation.lean
theorem comp_L : (X f).comp (𝑳 I g) = X (f.comp (𝑳 I g))
-- Mathlib/NumberTheory/Padics/RingHoms.lean
theorem zmod_congr_of_sub_mem_max_ideal (x : ℤ_[p]) (m n : ℕ) (hm : x - m ∈ maximalIdeal ℤ_[p])
    (hn : x - n ∈ maximalIdeal ℤ_[p]) : (m : ZMod p) = n
-- Mathlib/LinearAlgebra/Projection.lean
@[simp]
theorem linearProjOfIsCompl_apply_left (h : IsCompl p q) (x : p) :
    linearProjOfIsCompl p q h x = x
-- Mathlib/LinearAlgebra/QuadraticForm/Basis.lean
theorem toQuadraticMap_toBilin (Q : QuadraticMap R M N) (bm : Basis ι R M) :
    (Q.toBilin bm).toQuadraticMap = Q
-- Mathlib/Order/Interval/Set/Pi.lean
theorem image_update_Ioc_left (f : ∀ i, α i) (i : ι) (a : α i) :
    update f i '' Ioc a (f i) = Ioc (update f i a) f
-- Mathlib/SetTheory/Ordinal/Basic.lean
@[simp]
theorem card_omega : card ω = ℵ₀
-- Mathlib/MeasureTheory/Integral/Average.lean
@[simp]
theorem measure_smul_average [IsFiniteMeasure μ] (f : α → E) :
    (μ univ).toReal • ⨍ x, f x ∂μ = ∫ x, f x ∂μ
-- Mathlib/Algebra/Module/LinearMap/End.lean
@[simp]
theorem coe_smulRight (f : M₁ →ₗ[R] S) (x : M) : (smulRight f x : M₁ → M) = fun c => f c • x
-- Mathlib/Order/Antisymmetrization.lean
theorem AntisymmRel.image {a b : α} (h : AntisymmRel (· ≤ ·) a b) {f : α → β} (hf : Monotone f) :
    AntisymmRel (· ≤ ·) (f a) (f b)
-- Mathlib/Algebra/Homology/ShortComplex/Linear.lean
@[simp]
lemma opcyclesMap_smul : opcyclesMap (a • φ) = a • opcyclesMap φ
-- .lake/packages/lean4/src/lean/Init/Data/Array/Lemmas.lean
theorem extract_loop_succ (as bs : Array α) (size start : Nat) (h : start < as.size) :
    extract.loop as (size+1) start bs = extract.loop as size (start+1) (bs.push as[start])
-- Mathlib/ModelTheory/Semantics.lean
@[simp]
theorem realize_inf : (φ ⊓ ψ).Realize v xs ↔ φ.Realize v xs ∧ ψ.Realize v xs
-- Mathlib/Probability/ProbabilityMassFunction/Constructions.lean
theorem filter_apply_eq_zero_of_not_mem {a : α} (ha : a ∉ s) : (p.filter s h) a = 0
-- Mathlib/CategoryTheory/Triangulated/Opposite.lean
lemma opShiftFunctorEquivalence_counitIso_inv_app_shift (X : Cᵒᵖ) (n : ℤ) :
    (opShiftFunctorEquivalence C n).counitIso.inv.app (X⟦n⟧) =
      ((opShiftFunctorEquivalence C n).unitIso.hom.app X)⟦n⟧'
-- Mathlib/Algebra/Quaternion.lean
@[norm_cast]
theorem normSq_ratCast (q : ℚ) : normSq (q : ℍ[R]) = (q : ℍ[R]) ^ 2
-- Mathlib/Data/Ordmap/Ordset.lean
theorem Bounded.mem_lt : ∀ {t o} {x : α}, Bounded t o x → All (· < x) t
-- Mathlib/Analysis/Normed/Lp/ProdLp.lean
/-- The distance from one point to itself is always zero.

This holds independent of `p` and does not require `[Fact (1 ≤ p)]`. We keep it separate
from `WithLp.instProdPseudoEMetricSpace` so it can be used also for `p < 1`. -/
theorem prod_edist_self (f : WithLp p (α × β)) : edist f f = 0
-- Mathlib/Computability/TuringMachine.lean
theorem Tape.exists_mk' {Γ} [Inhabited Γ] (T : Tape Γ) : ∃ L R, T = Tape.mk' L R
-- .lake/packages/lean4/src/lean/Init/Data/List/Basic.lean
@[simp] theorem isEqv_nil_nil : isEqv ([] : List α) [] eqv = true
-- Mathlib/Analysis/FunctionalSpaces/SobolevInequality.lean
/-- The **Gagliardo-Nirenberg-Sobolev inequality**.  Let `u` be a continuously differentiable
compactly-supported function `u` on `ℝⁿ`, for `n ≥ 2`.  (More literally we encode `ℝⁿ` as
`ι → ℝ` where `n := #ι` is finite and at least 2.)  Then the Lebesgue integral of the pointwise
expression `|u x| ^ (n / (n - 1))` is bounded above by the `n / (n - 1)`-th power of the Lebesgue
integral of the Fréchet derivative of `u`.

For a basis-free version, see `lintegral_pow_le_pow_lintegral_fderiv`. -/
theorem lintegral_pow_le_pow_lintegral_fderiv_aux
    {p : ℝ} (hp : Real.IsConjExponent #ι p)
    {u : (ι → ℝ) → F} (hu : ContDiff ℝ 1 u)
    (h2u : HasCompactSupport u) :
    ∫⁻ x, (‖u x‖₊ : ℝ≥0∞) ^ p ≤ (∫⁻ x, ‖fderiv ℝ u x‖₊) ^ p
-- Mathlib/Logic/Function/Basic.lean
theorem Surjective.bijective₂_of_injective {g : γ → α} (hf : Surjective f) (hg : Surjective g)
    (I : Injective (f ∘ g)) : Bijective f ∧ Bijective g
-- Mathlib/NumberTheory/NumberField/Discriminant.lean
theorem finite_of_discr_bdd_of_isComplex :
    {K : { F : IntermediateField ℚ A // FiniteDimensional ℚ F} |
      haveI :  NumberField K := @NumberField.mk _ _ inferInstance K.prop
      {w : InfinitePlace K | IsComplex w}.Nonempty ∧ |discr K| ≤ N }.Finite
-- .lake/packages/lean4/src/lean/Init/Data/Int/Order.lean
@[simp, norm_cast] theorem ofNat_lt {n m : Nat} : (↑n : Int) < ↑m ↔ n < m
-- Mathlib/Order/LiminfLimsup.lean
@[simp]
lemma blimsup_sup_not : blimsup u f p ⊔ blimsup u f (¬p ·) = limsup u f
-- Mathlib/Order/WellFounded.lean
theorem not_lt_argminOn (s : Set α) {a : α} (ha : a ∈ s)
    (hs : s.Nonempty := Set.nonempty_of_mem ha) : ¬f a < f (argminOn f h s hs)
-- Mathlib/Init/Data/Sigma/Lex.lean
theorem revLex_wf (ha : WellFounded r) (hb : WellFounded s) : WellFounded (RevLex r s)
-- Mathlib/LinearAlgebra/BilinearForm/Properties.lean
theorem isSymm_iff_flip : B.IsSymm ↔ flipHom B = B
-- Mathlib/Analysis/Normed/Operator/LinearIsometry.lean
@[simp]
theorem symm_trans_self : e.symm.trans e = refl R₂ E₂
-- Mathlib/Algebra/Ring/Units.lean
theorem isUnit_neg_one [Monoid α] [HasDistribNeg α] : IsUnit (-1 : α)
-- Mathlib/Algebra/Group/Subgroup/Basic.lean
@[to_additive]
theorem range_top_iff_surjective {N} [Group N] {f : G →* N} :
    f.range = (⊤ : Subgroup N) ↔ Function.Surjective f
-- Mathlib/RingTheory/PowerSeries/Trunc.lean
@[simp] theorem trunc_mul_trunc {n} (f g : R ⟦X⟧) :
    trunc n (f * (trunc n g) : R⟦X⟧) = trunc n (f * g)
-- Mathlib/Combinatorics/SimpleGraph/Subgraph.lean
@[simp]
theorem edgeSet_sInf (s : Set G.Subgraph) :
    (sInf s).edgeSet = (⋂ G' ∈ s, edgeSet G') ∩ G.edgeSet
-- Mathlib/Topology/PartialHomeomorph.lean
theorem restrOpen_source (s : Set X) (hs : IsOpen s) : (e.restrOpen s hs).source = e.source ∩ s
-- Mathlib/CategoryTheory/Sites/Grothendieck.lean
theorem dense_covering : S ∈ dense X ↔ ∀ {Y} (f : Y ⟶ X), ∃ (Z : _) (g : Z ⟶ Y), S (g ≫ f)
-- Mathlib/Algebra/Polynomial/Degree/Definitions.lean
theorem degree_zero_le : degree (0 : R[X]) ≤ 0
-- Mathlib/Algebra/Module/Torsion.lean
lemma isSMulRegular_iff_torsionBy_eq_bot {R} (M : Type*)
    [CommRing R] [AddCommGroup M] [Module R M] (r : R) :
    IsSMulRegular M r ↔ Submodule.torsionBy R M r = ⊥
-- Mathlib/Data/Set/Basic.lean
/-- A function between linear orders which is neither monotone nor antitone makes a dent upright or
downright. -/
theorem not_monotoneOn_not_antitoneOn_iff_exists_le_le :
    ¬MonotoneOn f s ∧ ¬AntitoneOn f s ↔
      ∃ᵉ (a ∈ s) (b ∈ s) (c ∈ s), a ≤ b ∧ b ≤ c ∧
        (f a < f b ∧ f c < f b ∨ f b < f a ∧ f b < f c)
-- Mathlib/Topology/Semicontinuous.lean
theorem Continuous.comp_upperSemicontinuous_antitone {g : γ → δ} {f : α → γ} (hg : Continuous g)
    (hf : UpperSemicontinuous f) (gmon : Antitone g) : LowerSemicontinuous (g ∘ f)
-- Mathlib/RingTheory/AdicCompletion/Basic.lean
theorem IsHausdorff.haus (_ : IsHausdorff I M) :
    ∀ x : M, (∀ n : ℕ, x ≡ 0 [SMOD (I ^ n • ⊤ : Submodule R M)]) → x = 0
-- Mathlib/LinearAlgebra/ExteriorAlgebra/Basic.lean
@[simp]
theorem map_comp_map (f : M →ₗ[R] N) (g : N →ₗ[R] N') :
    AlgHom.comp (map g) (map f) = map (LinearMap.comp g f)
-- Mathlib/LinearAlgebra/Finsupp.lean
/-- Any module is a quotient of a free module. This is stated as surjectivity of
`Finsupp.total M M R id : (M →₀ R) →ₗ[R] M`. -/
theorem total_id_surjective (M) [AddCommMonoid M] [Module R M] :
    Function.Surjective (Finsupp.total M M R _root_.id)
-- Mathlib/Geometry/Manifold/Diffeomorph.lean
@[simp]
theorem contMDiffWithinAt_transDiffeomorph_left {f : M → M'} {x s} :
    ContMDiffWithinAt (I.transDiffeomorph e) I' n f s x ↔ ContMDiffWithinAt I I' n f s x
-- Mathlib/Data/Set/Pointwise/Interval.lean
@[simp]
theorem preimage_const_mul_Iic (a : α) {c : α} (h : 0 < c) : (c * ·) ⁻¹' Iic a = Iic (a / c)
-- Mathlib/Order/Filter/Basic.lean
theorem eventually_iff {f : Filter α} {P : α → Prop} : (∀ᶠ x in f, P x) ↔ { x | P x } ∈ f
-- Mathlib/Order/Interval/Finset/Basic.lean
/-- In a locally finite preorder, `<` is the transitive closure of `⋖`. -/
lemma lt_iff_transGen_covBy [Preorder α] [LocallyFiniteOrder α] {x y : α} :
    x < y ↔ TransGen (· ⋖ ·) x y
-- Mathlib/Data/Set/MulAntidiagonal.lean
@[to_additive Set.AddAntidiagonal.finite_of_isPWO]
theorem finite_of_isPWO (hs : s.IsPWO) (ht : t.IsPWO) (a) : (mulAntidiagonal s t a).Finite
-- Mathlib/Control/ULift.lean
@[simp]
theorem rec.constant {α : Sort u} {β : Type v} (b : β) :
    (@PLift.rec α (fun _ => β) fun _ => b) = fun _ => b
-- Mathlib/AlgebraicTopology/SimplicialObject.lean
/-- The functor from augmented objects to arrows. -/
@[simps]
def toArrow : Augmented C ⥤ Arrow C
-- Mathlib/Algebra/Group/Subgroup/Basic.lean
@[to_additive (attr := simp) top_prod_top]
theorem top_prod_top : (⊤ : Subgroup G).prod (⊤ : Subgroup N) = ⊤
-- Mathlib/MeasureTheory/Function/AEEqFun.lean
theorem comp₂_eq_pair (g : β → γ → δ) (hg : Continuous (uncurry g)) (f₁ : α →ₘ[μ] β)
    (f₂ : α →ₘ[μ] γ) : comp₂ g hg f₁ f₂ = comp _ hg (f₁.pair f₂)
-- Mathlib/Data/List/DropRight.lean
@[simp]
theorem rdropWhile_eq_nil_iff : rdropWhile p l = [] ↔ ∀ x ∈ l, p x
-- Mathlib/RingTheory/AlgebraicIndependent.lean
theorem AlgebraicIndependent.repr_ker :
    RingHom.ker (hx.repr : adjoin R (range x) →+* MvPolynomial ι R) = ⊥
-- Mathlib/Data/Nat/ModEq.lean
protected theorem add_left_cancel (h₁ : a ≡ b [MOD n]) (h₂ : a + c ≡ b + d [MOD n]) :
    c ≡ d [MOD n]
-- Mathlib/Topology/Basic.lean
@[simp]
theorem frontier_empty : frontier (∅ : Set X) = ∅
-- Mathlib/Data/Set/Countable.lean
protected theorem countable_iff_exists_injective {s : Set α} :
    s.Countable ↔ ∃ f : s → ℕ, Injective f