ruc-ai4math/mathlib_handler_benchmark_410 huggingface dataset:
-- Mathlib/LinearAlgebra/TensorProduct/Finiteness.lean
/-- Variation of `TensorProduct.exists_finite_submodule_of_finite` where `M` and `N` are
already submodules. -/
theorem exists_finite_submodule_of_finite' (s : Set (M₁ ⊗[R] N₁)) (hs : s.Finite) :
    ∃ (M' : Submodule R M) (N' : Submodule R N) (hM : M' ≤ M₁) (hN : N' ≤ N₁),
      Module.Finite R M' ∧ Module.Finite R N' ∧
        s ⊆ LinearMap.range (TensorProduct.map (inclusion hM) (inclusion hN))
-- Mathlib/Data/Finset/Card.lean
lemma card_sdiff_comm (h : s.card = t.card) : (s \ t).card = (t \ s).card
-- Mathlib/Order/Filter/Germ/Basic.lean
@[simp]
theorem map_coe (op : β → γ) (f : α → β) : map op (f : Germ l β) = op ∘ f
-- Mathlib/Analysis/SpecialFunctions/Gamma/Deligne.lean
/-- Formulation of reflection formula tailored to functional equations of L-functions of even
Dirichlet characters (including Riemann zeta). -/
lemma inv_Gammaℝ_one_sub {s : ℂ} (hs : ∀ (n : ℕ), s ≠ -n) :
    (Gammaℝ (1 - s))⁻¹ = Gammaℂ s * cos (π * s / 2) * (Gammaℝ s)⁻¹
-- Mathlib/Algebra/Regular/SMul.lean
/-- Any power of an `M`-regular element is `M`-regular. -/
theorem pow (n : ℕ) (ra : IsSMulRegular M a) : IsSMulRegular M (a ^ n)
-- Mathlib/Analysis/Calculus/LocalExtr/Basic.lean
/-- **Fermat's Theorem**: the derivative of a function at a local minimum equals zero. -/
theorem IsLocalMin.fderiv_eq_zero (h : IsLocalMin f a) : fderiv ℝ f a = 0
-- Mathlib/Analysis/Calculus/ContDiff/Basic.lean
theorem contDiff_pi : ContDiff 𝕜 n Φ ↔ ∀ i, ContDiff 𝕜 n fun x => Φ x i
-- Mathlib/Topology/Semicontinuous.lean
theorem IsOpen.lowerSemicontinuousOn_indicator (hs : IsOpen s) (hy : 0 ≤ y) :
    LowerSemicontinuousOn (indicator s fun _x => y) t
-- Mathlib/Geometry/Euclidean/Angle/Unoriented/RightAngle.lean
/-- An angle in a non-degenerate right-angled triangle is positive, version subtracting
vectors. -/
theorem angle_sub_pos_of_inner_eq_zero {x y : V} (h : ⟪x, y⟫ = 0) (h0 : x = 0 ∨ y ≠ 0) :
    0 < angle x (x - y)
-- Mathlib/RingTheory/Ideal/Quotient.lean
theorem isDomain_iff_prime (I : Ideal R) : IsDomain (R ⧸ I) ↔ I.IsPrime
-- Mathlib/Control/Traversable/Lemmas.lean
theorem traverse_eq_map_id' (f : β → γ) :
    traverse (m := Id) (pure ∘ f) = pure ∘ (map f : t β → t γ)
-- Mathlib/Algebra/Order/Group/PosPart.lean
/-- See also `leOnePart_eq_inv`. -/
@[to_additive "See also `negPart_eq_neg`."]
lemma leOnePart_eq_inv' : a⁻ᵐ = a⁻¹ ↔ 1 ≤ a⁻¹
-- Mathlib/Geometry/Euclidean/Basic.lean
/-- The distance between a point and its orthogonal projection is
nonzero if it does not lie in the subspace. -/
theorem dist_orthogonalProjection_ne_zero_of_not_mem {s : AffineSubspace ℝ P} [Nonempty s]
    [HasOrthogonalProjection s.direction] {p : P} (hp : p ∉ s) :
    dist p (orthogonalProjection s p) ≠ 0
-- Mathlib/Probability/Kernel/MeasureCompProd.lean
lemma integral_compProd [SFinite μ] [IsSFiniteKernel κ] {E : Type*}
    [NormedAddCommGroup E] [NormedSpace ℝ E]
    {f : α × β → E} (hf : Integrable f (μ ⊗ₘ κ)) :
    ∫ x, f x ∂(μ ⊗ₘ κ) = ∫ a, ∫ b, f (a, b) ∂(κ a) ∂μ
-- Mathlib/AlgebraicGeometry/Restrict.lean
@[simp]
lemma opensRange_ι : U.ι.opensRange = U
-- Mathlib/SetTheory/Cardinal/Basic.lean
/-- A variant of `Cardinal.mk_set` expressed in terms of a `Set` instead of a `Type`. -/
@[simp]
theorem mk_powerset {α : Type u} (s : Set α) : #(↥(𝒫 s)) = 2 ^ #(↥s)
-- Mathlib/Analysis/Convex/Between.lean
theorem Wbtw.trans_left_right {w x y z : P} (h₁ : Wbtw R w y z) (h₂ : Wbtw R w x y) :
    Wbtw R x y z
-- Mathlib/Topology/MetricSpace/Gluing.lean
private theorem glueDist_self (Φ : Z → X) (Ψ : Z → Y) (ε : ℝ) : ∀ x, glueDist Φ Ψ ε x x = 0
-- Mathlib/Topology/MetricSpace/GromovHausdorff.lean
/-- The Gromov-Hausdorff distance between two spaces is bounded by the Hausdorff distance
of isometric copies of the spaces, in any metric space. -/
theorem ghDist_le_hausdorffDist {X : Type u} [MetricSpace X] [CompactSpace X] [Nonempty X]
    {Y : Type v} [MetricSpace Y] [CompactSpace Y] [Nonempty Y] {γ : Type w} [MetricSpace γ]
    {Φ : X → γ} {Ψ : Y → γ} (ha : Isometry Φ) (hb : Isometry Ψ) :
    ghDist X Y ≤ hausdorffDist (range Φ) (range Ψ)
-- Mathlib/Geometry/Euclidean/PerpBisector.lean
theorem Isometry.mapsTo_perpBisector {f : P → P'} (h : Isometry f) (p₁ p₂ : P) :
    MapsTo f (perpBisector p₁ p₂) (perpBisector (f p₁) (f p₂))
-- Mathlib/CategoryTheory/Bicategory/Functor/Pseudofunctor.lean
@[reassoc]
lemma mapComp_id_left_inv (f : a ⟶ b) : (F.mapComp (𝟙 a) f).inv =
    (F.mapId a).hom ▷ F.map f ≫ (λ_ (F.map f)).hom ≫ F.map₂ (λ_ f).inv
-- Mathlib/Algebra/Homology/ShortComplex/RightHomology.lean
/-- When `S₁.g` and `S₂.g` are zero and we have chosen colimit cokernel coforks `c₁` and `c₂`
for `S₁.f` and `S₂.f` respectively, the action on right homology of a morphism `φ : S₁ ⟶ S₂` of
short complexes is given by the unique morphism `f : c₁.pt ⟶ c₂.pt` such that
`φ.τ₂ ≫ c₂.π = c₁.π ≫ f`. -/
@[simps]
def ofIsColimitCokernelCofork (φ : S₁ ⟶ S₂)
    (hg₁ : S₁.g = 0) (c₁ : CokernelCofork S₁.f) (hc₁ : IsColimit c₁)
    (hg₂ : S₂.g = 0) (c₂ : CokernelCofork S₂.f) (hc₂ : IsColimit c₂) (f : c₁.pt ⟶ c₂.pt)
    (comm : φ.τ₂ ≫ c₂.π = c₁.π ≫ f) :
    RightHomologyMapData φ (RightHomologyData.ofIsColimitCokernelCofork S₁ hg₁ c₁ hc₁)
      (RightHomologyData.ofIsColimitCokernelCofork S₂ hg₂ c₂ hc₂)
-- Mathlib/Data/List/Enum.lean
theorem enum_cons' (x : α) (xs : List α) :
    enum (x :: xs) = (0, x) :: (enum xs).map (Prod.map Nat.succ id)
-- Mathlib/Probability/Kernel/Basic.lean
theorem deterministic_apply' {f : α → β} (hf : Measurable f) (a : α) {s : Set β}
    (hs : MeasurableSet s) : deterministic f hf a s = s.indicator (fun _ => 1) (f a)
-- Mathlib/SetTheory/Cardinal/Basic.lean
theorem mk_iUnion_le_lift {α : Type u} {ι : Type v} (f : ι → Set α) :
    lift.{v} #(⋃ i, f i) ≤ lift.{u} #ι * ⨆ i, lift.{v} #(f i)
-- Mathlib/Data/Set/Lattice.lean
@[simp]
theorem iInter_true {s : True → Set α} : iInter s = s trivial
-- Mathlib/AlgebraicGeometry/EllipticCurve/Jacobian.lean
lemma negY_smul (P : Fin 3 → R) {u : R} : W'.negY (u • P) = u ^ 3 * W'.negY P
-- Mathlib/Data/DFinsupp/Basic.lean
@[simp]
theorem sigmaUncurry_zero [∀ i j, Zero (δ i j)] [DecidableEq ι] :
    sigmaUncurry (0 : Π₀ (i) (j), δ i j) = 0
-- Mathlib/Algebra/Order/Floor.lean
@[simp]
theorem preimage_floor_singleton (m : ℤ) : (floor : α → ℤ) ⁻¹' {m} = Ico (m : α) (m + 1)
-- Mathlib/Algebra/Algebra/Subalgebra/Basic.lean
@[simp]
theorem map_top (f : A →ₐ[R] B) : (⊤ : Subalgebra R A).map f = f.range
-- Mathlib/RingTheory/DedekindDomain/PID.lean
/-- Let `P` be a prime ideal, `x ∈ P \ P²` and `x ∉ Q` for all prime ideals `Q ≠ P`.
Then `P` is generated by `x`. -/
theorem Ideal.eq_span_singleton_of_mem_of_not_mem_sq_of_not_mem_prime_ne {P : Ideal R}
    (hP : P.IsPrime) [IsDedekindDomain R] {x : R} (x_mem : x ∈ P) (hxP2 : x ∉ P ^ 2)
    (hxQ : ∀ Q : Ideal R, IsPrime Q → Q ≠ P → x ∉ Q) : P = Ideal.span {x}
-- Mathlib/Algebra/MonoidAlgebra/Basic.lean
theorem single_one_mul_apply [MulOneClass G] (f : MonoidAlgebra k G) (r : k) (x : G) :
    (single (1 : G) r * f) x = r * f x
-- Mathlib/Algebra/Group/TypeTags.lean
@[simp]
theorem toAdd_symm_eq : (@toAdd α).symm = ofAdd
-- Mathlib/Topology/Category/LightProfinite/Limits.lean
lemma finiteCoproduct.ι_jointly_surjective (R : finiteCoproduct X) :
    ∃ (a : α) (r : X a), R = finiteCoproduct.ι X a r
-- Mathlib/Geometry/RingedSpace/PresheafedSpace.lean
@[simp]
theorem id_base (X : PresheafedSpace C) : (𝟙 X : X ⟶ X).base = 𝟙 (X : TopCat)
-- Mathlib/Data/Real/Hyperreal.lean
theorem not_infiniteNeg_add_infinitePos {x y : ℝ*} :
    ¬InfiniteNeg x → InfinitePos y → InfinitePos (x + y)
-- Mathlib/Data/Matrix/Basic.lean
@[simp]
theorem diag_list_sum [AddMonoid α] (l : List (Matrix n n α)) : diag l.sum = (l.map diag).sum
-- Mathlib/Topology/FiberBundle/Trivialization.lean
theorem coe_mem_source : ↑y ∈ e'.source ↔ b ∈ e'.baseSet
-- Mathlib/Probability/IdentDistrib.lean
theorem integrable_iff [NormedAddCommGroup γ] [BorelSpace γ] (h : IdentDistrib f g μ ν) :
    Integrable f μ ↔ Integrable g ν
-- Mathlib/Data/Fin/Basic.lean
lemma predAbove_pred_of_lt (p i : Fin (n + 1)) (h : i < p) (hp := Fin.ne_zero_of_lt h)
    (hi := Fin.ne_last_of_lt h) : (pred p hp).predAbove i = castPred i hi
-- Mathlib/Order/BoundedOrder.lean
theorem forall_ge_iff {P : α → Prop} {x₀ : α} (hP : Monotone P) :
    (∀ x ≥ x₀, P x) ↔ P x₀
-- Mathlib/Probability/Independence/Conditional.lean
theorem condIndepSets_singleton_iff {μ : Measure Ω} [IsFiniteMeasure μ]
    {s t : Set Ω} (hs : MeasurableSet s) (ht : MeasurableSet t) :
    CondIndepSets m' hm' {s} {t} μ ↔ (μ⟦s ∩ t | m'⟧) =ᵐ[μ] (μ⟦s | m'⟧) * (μ⟦t | m'⟧)
-- Mathlib/NumberTheory/Zsqrtd/Basic.lean
theorem divides_sq_eq_zero {x y} (h : x * x = d * y * y) : x = 0 ∧ y = 0
-- Mathlib/Analysis/Calculus/FDeriv/Mul.lean
@[fun_prop]
theorem differentiableAt_inverse {x : R} (hx : IsUnit x) :
    DifferentiableAt 𝕜 (@Ring.inverse R _) x
-- Mathlib/Data/List/Basic.lean
@[simp] lemma length_injective_iff : Injective (List.length : List α → ℕ) ↔ Subsingleton α
-- Mathlib/Order/PFilter.lean
theorem isPFilter : IsPFilter (F : Set P)
-- Mathlib/Algebra/Group/Center.lean
@[to_additive]
theorem _root_.Semigroup.mem_center_iff {z : M} :
    z ∈ Set.center M ↔ ∀ g, g * z = z * g
-- Mathlib/Analysis/SpecialFunctions/Trigonometric/Deriv.lean
theorem HasStrictFDerivAt.sinh (hf : HasStrictFDerivAt f f' x) :
    HasStrictFDerivAt (fun x => Real.sinh (f x)) (Real.cosh (f x) • f') x
-- Mathlib/Data/Nat/Nth.lean
theorem le_nth_count (hp : (setOf p).Infinite) (n : ℕ) : n ≤ nth p (count p n)
-- Mathlib/Data/Matrix/RowCol.lean
@[simp]
theorem updateRow_subsingleton [Subsingleton m] (A : Matrix m n R) (i : m) (b : n → R) :
    A.updateRow i b = (row (Fin 1) b).submatrix (Function.const m 0) id
-- Mathlib/Order/Antisymmetrization.lean
@[simp]
theorem toAntisymmetrization_lt_toAntisymmetrization_iff :
    @toAntisymmetrization α (· ≤ ·) _ a < @toAntisymmetrization α (· ≤ ·) _ b ↔ a < b
-- Mathlib/RingTheory/FreeCommRing.lean
lemma of_cons (a : α) (m : Multiset α) : (FreeAbelianGroup.of (Multiplicative.ofAdd (a ::ₘ m))) =
    @HMul.hMul _ (FreeCommRing α) (FreeCommRing α) _ (of a)
    (FreeAbelianGroup.of (Multiplicative.ofAdd m))
-- Mathlib/Algebra/Order/Group/Indicator.lean
@[to_additive]
lemma mulSupport_max [LinearOrder M] (f g : α → M) :
    mulSupport (fun x ↦ max (f x) (g x)) ⊆ mulSupport f ∪ mulSupport g
-- Mathlib/Topology/Algebra/ConstMulAction.lean
@[to_additive]
theorem closure_smul (c : G) (s : Set α) : closure (c • s) = c • closure s
-- Mathlib/Analysis/SpecialFunctions/Log/Basic.lean
@[simp]
theorem log_one : log 1 = 0
-- Mathlib/MeasureTheory/Constructions/Cylinders.lean
theorem inter_cylinder (s₁ s₂ : Finset ι) (S₁ : Set (∀ i : s₁, α i)) (S₂ : Set (∀ i : s₂, α i))
    [DecidableEq ι] :
    cylinder s₁ S₁ ∩ cylinder s₂ S₂ =
      cylinder (s₁ ∪ s₂)
        ((fun f ↦ fun j : s₁ ↦ f ⟨j, Finset.mem_union_left s₂ j.prop⟩) ⁻¹' S₁ ∩
          (fun f ↦ fun j : s₂ ↦ f ⟨j, Finset.mem_union_right s₁ j.prop⟩) ⁻¹' S₂)
-- Mathlib/Order/Disjoint.lean
theorem disjoint_comm : Disjoint a b ↔ Disjoint b a
-- Mathlib/MeasureTheory/MeasurableSpace/Basic.lean
/-- The function `update f a : π a → Π a, π a` is always measurable.
  This doesn't require `f` to be measurable.
  This should not be confused with the statement that `update f a x` is measurable. -/
@[measurability]
theorem measurable_update (f : ∀ a : δ, π a) {a : δ} [DecidableEq δ] : Measurable (update f a)
-- Mathlib/Combinatorics/Enumerative/Composition.lean
theorem mem_boundaries_iff_exists_blocks_sum_take_eq {j : Fin (n + 1)} :
    j ∈ c.boundaries ↔ ∃ i < c.boundaries.card, (c.blocks.take i).sum = j
-- Mathlib/Topology/Maps/Basic.lean
theorem isClosed_preimage (h : Inducing f) (s : Set Y) (hs : IsClosed s) :
    IsClosed (f ⁻¹' s)
-- Mathlib/Topology/Algebra/OpenSubgroup.lean
@[to_additive (attr := simp, norm_cast)]
theorem toOpens_top : ((⊤ : OpenSubgroup G) : Opens G) = ⊤
-- .lake/packages/lean4/src/lean/Init/Data/Int/Order.lean
theorem eq_natAbs_iff_mul_eq_zero : natAbs a = n ↔ (a - n) * (a + n) = 0
-- Mathlib/Data/Set/Basic.lean
theorem Monotone.inter [Preorder β] {f g : β → Set α} (hf : Monotone f) (hg : Monotone g) :
    Monotone fun x => f x ∩ g x
-- Mathlib/Data/Set/Basic.lean
theorem eq_univ_iff_forall {s : Set α} : s = univ ↔ ∀ x, x ∈ s
-- Mathlib/AlgebraicGeometry/EllipticCurve/DivisionPolynomial/Basic.lean
lemma baseChange_ΨSq (n : ℤ) : (W.baseChange B).ΨSq n = ((W.baseChange A).ΨSq n).map f
-- Mathlib/Algebra/GroupWithZero/NonZeroDivisors.lean
@[simp] lemma coe_nonZeroDivisorsRight_eq [NoZeroDivisors M₀] [Nontrivial M₀] :
    nonZeroDivisorsRight M₀ = {x : M₀ | x ≠ 0}
-- Mathlib/Algebra/Algebra/Basic.lean
@[simp]
theorem _root_.ULift.down_algebraMap (r : R) : (algebraMap R (ULift A) r).down = algebraMap R A r
-- Mathlib/Algebra/Lie/Rank.lean
lemma exists_isRegular [Infinite R] : ∃ x : L, IsRegular R x
-- Mathlib/Data/Finset/Image.lean
theorem _root_.Function.Semiconj.finset_image [DecidableEq α] {f : α → β} {ga : α → α} {gb : β → β}
    (h : Function.Semiconj f ga gb) : Function.Semiconj (image f) (image ga) (image gb)
-- Mathlib/Topology/Category/TopCat/Limits/Pullbacks.lean
theorem fst_embedding_of_right_embedding {X Y S : TopCat} (f : X ⟶ S) {g : Y ⟶ S}
    (H : Embedding g) : Embedding <| ⇑(pullback.fst f g)
-- Mathlib/Data/Int/Defs.lean
@[simp] lemma div_dvd_iff_dvd_mul (h : b ∣ a) (hb : b ≠ 0) : a / b ∣ c ↔ a ∣ b * c
-- Mathlib/LinearAlgebra/AffineSpace/AffineSubspace.lean
/-- Adding a vector in the direction to a point in the subspace produces a point in the
subspace. -/
theorem vadd_mem_of_mem_direction {s : AffineSubspace k P} {v : V} (hv : v ∈ s.direction) {p : P}
    (hp : p ∈ s) : v +ᵥ p ∈ s
-- Mathlib/LinearAlgebra/AffineSpace/Independent.lean
lemma AffineIndependent.eq_of_sum_eq_sum (hp : AffineIndependent k p)
    (hw : ∑ i ∈ s, w₁ i = ∑ i ∈ s, w₂ i) (hwp : ∑ i ∈ s, w₁ i • p i = ∑ i ∈ s, w₂ i • p i) :
    ∀ i ∈ s, w₁ i = w₂ i
-- Mathlib/Algebra/Module/LocalizedModule.lean
@[simp]
theorem mk'_cancel (m : M) (s : S) : mk' f (s • m) s = f m
-- Mathlib/Data/PFun.lean
theorem preimage_univ : f.preimage Set.univ = f.Dom
-- Mathlib/MeasureTheory/Function/AEEqFun.lean
@[simp]
theorem comp₂Measurable_mk_mk (g : β → γ → δ) (hg : Measurable (uncurry g)) (f₁ : α → β)
    (f₂ : α → γ) (hf₁ hf₂) :
    comp₂Measurable g hg (mk f₁ hf₁ : α →ₘ[μ] β) (mk f₂ hf₂) =
      mk (fun a => g (f₁ a) (f₂ a))
        (hg.comp_aemeasurable (hf₁.aemeasurable.prod_mk hf₂.aemeasurable)).aestronglyMeasurable
-- Mathlib/Analysis/Analytic/Basic.lean
theorem not_summable_norm_of_radius_lt_nnnorm (p : FormalMultilinearSeries 𝕜 E F) {x : E}
    (h : p.radius < ‖x‖₊) : ¬Summable fun n => ‖p n‖ * ‖x‖ ^ n
-- Mathlib/SetTheory/ZFC/Basic.lean
@[simp]
theorem mem_image :
    ∀ {f : ZFSet.{u} → ZFSet.{u}} [H : Definable 1 f] {x y : ZFSet.{u}},
      y ∈ @image f H x ↔ ∃ z ∈ x, f z = y
-- Mathlib/CategoryTheory/Elements.lean
@[simp]
theorem fromStructuredArrow_obj (X) : (fromStructuredArrow F).obj X = ⟨X.right, X.hom PUnit.unit⟩
-- Mathlib/CategoryTheory/Limits/ExactFunctor.lean
@[simp]
theorem RightExactFunctor.forget_map {F G : C ⥤ᵣ D} (α : F ⟶ G) :
    (RightExactFunctor.forget C D).map α = α
-- Mathlib/Algebra/Lie/Solvable.lean
theorem derivedSeriesOfIdeal_add (k l : ℕ) : D (k + l) I = D k (D l I)
-- Mathlib/Algebra/Homology/ShortComplex/Linear.lean
@[simp]
lemma opcyclesMap'_smul :
    opcyclesMap' (a • φ) h₁ h₂ = a • opcyclesMap' φ h₁ h₂
-- Mathlib/Topology/Basic.lean
theorem isClosed_const {p : Prop} : IsClosed { _x : X | p }
-- Mathlib/Logic/IsEmpty.lean
@[simp]
theorem isEmpty_subtype (p : α → Prop) : IsEmpty (Subtype p) ↔ ∀ x, ¬p x
-- Mathlib/Algebra/CharP/Algebra.lean
/-- If `R` has characteristic `p`, then so does Frac(R). -/
theorem charP_of_isFractionRing [CharP R p] : CharP K p
-- Mathlib/RingTheory/UniqueFactorizationDomain.lean
theorem UniqueFactorizationMonoid.of_exists_prime_factors : UniqueFactorizationMonoid α
-- Mathlib/RingTheory/Ideal/Basic.lean
@[simp 1001] -- Porting note: increased priority to appease `simpNF`
theorem mem_bot {x : R} : x ∈ (⊥ : Ideal R) ↔ x = 0
-- Mathlib/LinearAlgebra/Matrix/Hermitian.lean
/-- The diagonal elements of a complex hermitian matrix are real. -/
theorem IsHermitian.coe_re_diag {A : Matrix n n α} (h : A.IsHermitian) :
    (fun i => (re (A.diag i) : α)) = A.diag
-- Mathlib/LinearAlgebra/Matrix/SesquilinearForm.lean
theorem Matrix.toLinearMapₛₗ₂'_aux_eq (M : Matrix n m N₂) :
    Matrix.toLinearMap₂'Aux σ₁ σ₂ M = Matrix.toLinearMapₛₗ₂' R σ₁ σ₂ M
-- Mathlib/Algebra/MvPolynomial/Degrees.lean
theorem degreeOf_X [DecidableEq σ] (i j : σ) [Nontrivial R] :
    degreeOf i (X j : MvPolynomial σ R) = if i = j then 1 else 0
-- Mathlib/Algebra/BigOperators/Finprod.lean
@[to_additive]
theorem MulEquiv.map_finprod_mem (g : M ≃* N) (f : α → M) {s : Set α} (hs : s.Finite) :
    g (∏ᶠ i ∈ s, f i) = ∏ᶠ i ∈ s, g (f i)
-- Mathlib/Data/Rat/Cast/Order.lean
@[simp]
theorem preimage_cast_Ioo (p q : ℚ≥0) : (↑) ⁻¹' Ioo (p : K) q = Ioo p q
-- Mathlib/Algebra/Category/ModuleCat/ChangeOfRings.lean
/-- Given `R`-module X and `S`-module Y, `S`-linear linear maps `(extendScalars f).obj X ⟶ Y`
bijectively correspond to `R`-linear maps `X ⟶ (restrictScalars f).obj Y`.
-/
@[simps symm_apply]
def homEquiv {X Y} :
    ((extendScalars f).obj X ⟶ Y) ≃ (X ⟶ (restrictScalars.{max v u₂,u₁,u₂} f).obj Y)
-- Mathlib/Algebra/Ring/Subring/Basic.lean
theorem map_map (g : S →+* T) (f : R →+* S) : (s.map f).map g = s.map (g.comp f)
-- Mathlib/Analysis/SpecialFunctions/Trigonometric/Angle.lean
theorem toReal_coe_eq_self_sub_two_pi_iff {θ : ℝ} :
    (θ : Angle).toReal = θ - 2 * π ↔ θ ∈ Set.Ioc π (3 * π)
-- Mathlib/Topology/Maps/Basic.lean
theorem isClosedMap_iff_closure_image :
    IsClosedMap f ↔ ∀ s, closure (f '' s) ⊆ f '' closure s
-- Mathlib/RingTheory/Smooth/Basic.lean
theorem localization_base [FormallySmooth R Sₘ] : FormallySmooth Rₘ Sₘ
-- Mathlib/Data/List/Zip.lean
theorem unzip_left (l : List (α × β)) : (unzip l).1 = l.map Prod.fst
-- Mathlib/GroupTheory/GroupAction/Pointwise.lean
/-- Translation of preimage is contained in preimage of translation -/
theorem smul_preimage_set_leₛₗ :
    c • h ⁻¹' t ⊆ h ⁻¹' (σ c • t)
-- Mathlib/Data/Finset/Basic.lean
/-- After filtering out everything that does not equal a given value, at most that value remains.

  This is equivalent to `filter_eq` with the equality the other way.
-/
theorem filter_eq' [DecidableEq β] (s : Finset β) (b : β) :
    (s.filter fun a => a = b) = ite (b ∈ s) {b} ∅
-- Mathlib/Order/CompleteLattice.lean
theorem iInf_of_empty [IsEmpty ι] (f : ι → α) : iInf f = ⊤
-- Mathlib/NumberTheory/Divisors.lean
@[simp]
theorem divisorsAntidiagonal_one : divisorsAntidiagonal 1 = {(1, 1)}
-- Mathlib/Order/RelIso/Basic.lean
protected theorem isAsymm (f : r ↪r s) [IsAsymm β s] : IsAsymm α r
-- Mathlib/RingTheory/AlgebraicIndependent.lean
theorem algebraicIndependent_equiv (e : ι ≃ ι') {f : ι' → A} :
    AlgebraicIndependent R (f ∘ e) ↔ AlgebraicIndependent R f
-- Mathlib/Algebra/Group/Aut.lean
@[simp]
theorem coe_one : ⇑(1 : AddAut A) = id
-- Mathlib/RingTheory/Norm/Basic.lean
lemma norm_eq_of_algEquiv [Ring T] [Algebra R T] (e : S ≃ₐ[R] T) (x) :
    Algebra.norm R (e x) = Algebra.norm R x
-- Mathlib/Data/Real/EReal.lean
@[simp]
theorem add_bot (x : EReal) : x + ⊥ = ⊥
-- Mathlib/Topology/PartialHomeomorph.lean
@[simp, mfld_simps]
theorem mk_coe (e : PartialEquiv X Y) (a b c d) : (PartialHomeomorph.mk e a b c d : X → Y) = e
-- Mathlib/Analysis/FunctionalSpaces/SobolevInequality.lean
@[simp] lemma T_univ (f : (∀ i, A i) → ℝ≥0∞) (x : ∀ i, A i) :
    T μ p f univ x =
    ∫⁻ (x : ∀ i, A i), (f x ^ (1 - (#ι - 1 : ℝ) * p)
    * ∏ i : ι, (∫⁻ t : A i, f (update x i t) ∂(μ i)) ^ p) ∂(.pi μ)
-- Mathlib/Data/Nat/Nth.lean
theorem range_nth_of_finite (hf : (setOf p).Finite) : Set.range (nth p) = insert 0 (setOf p)
-- Mathlib/Topology/Constructions.lean
/-- `Prod.snd` maps neighborhood of `x : X × Y` within the section `Prod.fst ⁻¹' {x.1}`
to `𝓝 x.2`. -/
theorem map_snd_nhdsWithin (x : X × Y) : map Prod.snd (𝓝[Prod.fst ⁻¹' {x.1}] x) = 𝓝 x.2
-- Mathlib/Analysis/Normed/Lp/ProdLp.lean
@[simp] theorem prod_nnnorm_equiv (f : WithLp ∞ (α × β)) : ‖WithLp.equiv ⊤ _ f‖₊ = ‖f‖₊
-- Mathlib/MeasureTheory/Constructions/Prod/Integral.lean
theorem integral_prod_smul {𝕜 : Type*} [RCLike 𝕜] [NormedSpace 𝕜 E] (f : α → 𝕜) (g : β → E) :
    ∫ z, f z.1 • g z.2 ∂μ.prod ν = (∫ x, f x ∂μ) • ∫ y, g y ∂ν
-- Mathlib/Order/Closure.lean
theorem closure_top [PartialOrder α] [OrderTop α] [Preorder β] {u : β → α} (l : LowerAdjoint u) :
    u (l ⊤) = ⊤
-- Mathlib/Analysis/NormedSpace/Multilinear/Basic.lean
@[simp]
theorem norm_restrictScalars : ‖f.restrictScalars 𝕜'‖ = ‖f‖
-- .lake/packages/lean4/src/lean/Init/Data/Nat/Bitwise/Lemmas.lean
@[simp] theorem testBit_two_pow_sub_one (n i : Nat) : testBit (2^n-1) i = decide (i < n)
-- Mathlib/Combinatorics/SimpleGraph/LapMatrix.lean
/-- The Laplacian matrix is positive semidefinite -/
theorem posSemidef_lapMatrix [LinearOrderedField R] [StarRing R]
    [TrivialStar R] : PosSemidef (G.lapMatrix R)
-- Mathlib/Logic/Equiv/PartialEquiv.lean
@[simp, mfld_simps]
theorem symm_target : e.symm.target = e.source
-- Mathlib/Algebra/Ring/Hom/Defs.lean
@[simp]
theorem comp_zero (g : β →ₙ+* γ) : g.comp (0 : α →ₙ+* β) = 0
-- Mathlib/Algebra/Algebra/Subalgebra/Basic.lean
@[simp]
theorem coe_map (S : Subalgebra R A) (f : A →ₐ[R] B) : (S.map f : Set B) = f '' S
-- Mathlib/Analysis/Calculus/Deriv/Mul.lean
theorem derivWithin_smul_const (hxs : UniqueDiffWithinAt 𝕜 s x)
    (hc : DifferentiableWithinAt 𝕜 c s x) (f : F) :
    derivWithin (fun y => c y • f) s x = derivWithin c s x • f
-- Mathlib/AlgebraicGeometry/PrimeSpectrum/Basic.lean
@[simp]
theorem basicOpen_zero : basicOpen (0 : R) = ⊥
-- Mathlib/Data/TwoPointing.lean
@[simp]
theorem bool_snd : TwoPointing.bool.snd = true
-- Mathlib/Topology/Algebra/Module/Multilinear/Topology.lean
theorem hasBasis_nhds_zero :
    (𝓝 (0 : ContinuousMultilinearMap 𝕜 E F)).HasBasis
      (fun SV : Set (Π i, E i) × Set F => IsVonNBounded 𝕜 SV.1 ∧ SV.2 ∈ 𝓝 0) fun SV =>
      { f | MapsTo f SV.1 SV.2 }
-- Mathlib/LinearAlgebra/AffineSpace/Slope.lean
@[simp]
theorem slope_same (f : k → PE) (a : k) : (slope f a a : E) = 0
-- Mathlib/CategoryTheory/Monoidal/OfHasFiniteProducts.lean
@[ext] theorem tensor_ext {X Y Z : C} (f g : X ⟶ Y ⊗ Z)
    (w₁ : f ≫ prod.fst = g ≫ prod.fst) (w₂ : f ≫ prod.snd = g ≫ prod.snd) : f = g
-- Mathlib/Algebra/Order/Module/Defs.lean
lemma smul_nonpos_of_nonneg_of_nonpos [PosSMulMono α β] (ha : 0 ≤ a) (hb : b ≤ 0) : a • b ≤ 0
-- Mathlib/InformationTheory/Hamming.lean
/-- Corresponds to `norm_ne_zero_iff`. -/
theorem hammingNorm_ne_zero_iff {x : ∀ i, β i} : hammingNorm x ≠ 0 ↔ x ≠ 0
-- Mathlib/Analysis/Calculus/FDeriv/Comp.lean
@[fun_prop]
theorem DifferentiableAt.comp {g : F → G} (hg : DifferentiableAt 𝕜 g (f x))
    (hf : DifferentiableAt 𝕜 f x) : DifferentiableAt 𝕜 (g ∘ f) x
-- Mathlib/Algebra/Algebra/NonUnitalSubalgebra.lean
theorem mem_toSubmodule (S : NonUnitalSubalgebra R A) {x} : x ∈ S.toSubmodule ↔ x ∈ S
-- Mathlib/Data/Nat/Cast/Order/Field.lean
theorem one_div_pos_of_nat {n : ℕ} : 0 < 1 / ((n : α) + 1)
-- Mathlib/Analysis/Convex/Between.lean
@[simp]
theorem sbtw_const_vadd_iff {x y z : P} (v : V) :
    Sbtw R (v +ᵥ x) (v +ᵥ y) (v +ᵥ z) ↔ Sbtw R x y z
-- Mathlib/Topology/Compactification/OnePoint.lean
theorem inseparable_iff {x y : OnePoint X} :
    Inseparable x y ↔ x = ∞ ∧ y = ∞ ∨ ∃ x' : X, x = x' ∧ ∃ y' : X, y = y' ∧ Inseparable x' y'
-- Mathlib/Topology/Order/DenselyOrdered.lean
theorem frontier_Ioi [NoMaxOrder α] {a : α} : frontier (Ioi a) = {a}
-- Mathlib/MeasureTheory/Function/LpSpace.lean
theorem coeFn_add (f g : Lp E p μ) : ⇑(f + g) =ᵐ[μ] f + g
-- Mathlib/Analysis/Seminorm.lean
/-- Let `p i` be a family of seminorms on `E`. Let `s` be an absorbent set in `𝕜`.
If all seminorms are uniformly bounded at every point of `s`,
then they are bounded in the space of seminorms. -/
lemma bddAbove_of_absorbent {ι : Sort*} {p : ι → Seminorm 𝕜 E} {s : Set E} (hs : Absorbent 𝕜 s)
    (h : ∀ x ∈ s, BddAbove (range (p · x))) : BddAbove (range p)
-- Mathlib/Order/Basic.lean
theorem eq_of_ge_of_not_gt [PartialOrder α] {a b : α} (hab : a ≤ b) (hba : ¬a < b) : b = a
-- Mathlib/Order/Max.lean
@[simp]
theorem isMax_toDual_iff : IsMax (toDual a) ↔ IsMin a
-- Mathlib/Analysis/SpecialFunctions/Pow/Real.lean
theorem rpow_zero_pos (x : ℝ) : 0 < x ^ (0 : ℝ)