ruc-ai4math/mathlib_handler_benchmark_410 huggingface dataset:
-- Mathlib/LinearAlgebra/Matrix/NonsingularInverse.lean
theorem isUnit_det_of_right_inverse (h : A * B = 1) : IsUnit A.det
-- Mathlib/Probability/Kernel/Basic.lean
theorem ext_iff {η : Kernel α β} : κ = η ↔ ∀ a, κ a = η a
-- Mathlib/CategoryTheory/Monoidal/CoherenceLemmas.lean
theorem unitors_inv_equal : (λ_ (𝟙_ C)).inv = (ρ_ (𝟙_ C)).inv
-- Mathlib/Order/UpperLower/Basic.lean
@[simp]
theorem top_prod : (⊤ : UpperSet α) ×ˢ t = ⊤
-- Mathlib/Algebra/Polynomial/Laurent.lean
theorem _root_.Polynomial.toLaurent_one : (Polynomial.toLaurent : R[X] → R[T;T⁻¹]) 1 = 1
-- Mathlib/Algebra/Group/Submonoid/Membership.lean
@[to_additive (attr := norm_cast, simp)]
theorem coe_multiset_prod {M} [CommMonoid M] [SetLike B M] [SubmonoidClass B M] (m : Multiset S) :
    (m.prod : M) = (m.map (↑)).prod
-- .lake/packages/batteries/Batteries/Data/List/Perm.lean
/-- Weaker version of `Subperm.cons_left` -/
theorem cons_subperm_of_not_mem_of_mem {a : α} {l₁ l₂ : List α} (h₁ : a ∉ l₁) (h₂ : a ∈ l₂)
    (s : l₁ <+~ l₂) : a :: l₁ <+~ l₂
-- Mathlib/Algebra/Order/Group/Lattice.lean
@[to_additive]
lemma div_inf (a b c : α) : c / (a ⊓ b) = c / a ⊔ c / b
-- Mathlib/Analysis/Calculus/Deriv/Inv.lean
@[simp]
theorem Differentiable.inv (hf : Differentiable 𝕜 h) (hz : ∀ x, h x ≠ 0) :
    Differentiable 𝕜 fun x => (h x)⁻¹
-- Mathlib/Analysis/Convex/Deriv.lean
lemma le_slope_of_hasDerivAt (hfc : ConcaveOn ℝ S f) (hx : x ∈ S) (hy : y ∈ S) (hxy : x < y)
    (hf' : HasDerivAt f f' y) :
    f' ≤ slope f x y
-- Mathlib/Topology/Connected/PathConnected.lean
theorem joinedIn_iff_joined (x_in : x ∈ F) (y_in : y ∈ F) :
    JoinedIn F x y ↔ Joined (⟨x, x_in⟩ : F) (⟨y, y_in⟩ : F)
-- Mathlib/Data/Int/Defs.lean
lemma le_add_iff_lt_of_dvd_sub (ha : 0 < a) (hab : a ∣ c - b) : a + b ≤ c ↔ b < c
-- Mathlib/Topology/Algebra/Module/WeakDual.lean
/-- The canonical map from `WeakSpace 𝕜 E` to `E` is an open map. -/
theorem isOpenMap_toWeakSpace_symm : IsOpenMap (toWeakSpace 𝕜 E).symm
-- Mathlib/Algebra/Order/Ring/Unbundled/Basic.lean
theorem StrictAnti.mul_const_of_neg [ExistsAddOfLE α] [MulPosStrictMono α]
    [CovariantClass α α (swap (· + ·)) (· < ·)] [ContravariantClass α α (swap (· + ·)) (· < ·)]
    (hf : StrictAnti f) (ha : a < 0) : StrictMono fun x => f x * a
-- Mathlib/Algebra/Order/Module/Defs.lean
lemma smul_nonneg_iff_neg_imp_nonpos : 0 ≤ a • b ↔ (a < 0 → b ≤ 0) ∧ (b < 0 → a ≤ 0)
-- Mathlib/Data/Finset/Prod.lean
theorem map_swap_product (s : Finset α) (t : Finset β) :
    (t ×ˢ s).map ⟨Prod.swap, Prod.swap_injective⟩ = s ×ˢ t
-- .lake/packages/batteries/Batteries/Data/AssocList.lean
@[simp] theorem length_nil : length (nil : AssocList α β) = 0
-- Mathlib/Topology/Sheaves/Stalks.lean
@[reassoc (attr := simp)]
theorem germ_res (F : X.Presheaf C) {U V : Opens X} (i : U ⟶ V) (x : U) :
    F.map i.op ≫ germ F x = germ F (i x : V)
-- Mathlib/MeasureTheory/Constructions/Prod/Basic.lean
/-- If `ν` is an s-finite measure, and `s ⊆ α × β` is measurable, then `x ↦ ν { y | (x, y) ∈ s }`
  is a measurable function. -/
theorem measurable_measure_prod_mk_left [SFinite ν] {s : Set (α × β)} (hs : MeasurableSet s) :
    Measurable fun x => ν (Prod.mk x ⁻¹' s)
-- Mathlib/Analysis/Asymptotics/Asymptotics.lean
theorem isBigO_const_smul_right {c : 𝕜} (hc : c ≠ 0) :
    (f =O[l] fun x => c • f' x) ↔ f =O[l] f'
-- Mathlib/MeasureTheory/Function/L1Space.lean
theorem integrable_toReal_of_lintegral_ne_top {f : α → ℝ≥0∞} (hfm : AEMeasurable f μ)
    (hfi : (∫⁻ x, f x ∂μ) ≠ ∞) : Integrable (fun x => (f x).toReal) μ
-- Mathlib/Topology/Basic.lean
theorem closure_eq_iff_isClosed : closure s = s ↔ IsClosed s
-- Mathlib/MeasureTheory/Integral/Bochner.lean
theorem integral_add (f g : α →₁ₛ[μ] E) : integral (f + g) = integral f + integral g
-- Mathlib/AlgebraicGeometry/Morphisms/RingHomProperties.lean
theorem iff_of_iSup_eq_top [IsAffine Y] {ι : Type*}
    (U : ι → X.affineOpens) (hU : ⨆ i, (U i : Opens X) = ⊤) :
    P f ↔ ∀ i, Q (f.appLE ⊤ (U i).1 le_top)
-- Mathlib/Data/Seq/Computation.lean
theorem promises_congr {c₁ c₂ : Computation α} (h : c₁ ~ c₂) (a) : c₁ ~> a ↔ c₂ ~> a
-- Mathlib/GroupTheory/Perm/Sign.lean
theorem sign_prodCongrLeft (σ : α → Perm β) : sign (prodCongrLeft σ) = ∏ k, sign (σ k)
-- Mathlib/NumberTheory/Padics/PadicNumbers.lean
@[norm_cast]
theorem coe_mul : ∀ {x y : ℚ}, (↑(x * y) : ℚ_[p]) = ↑x * ↑y
-- Mathlib/LinearAlgebra/Basis.lean
/-- Two elements are equal iff their coordinates are equal. -/
theorem ext_elem_iff {x y : M} : x = y ↔ ∀ i, b.repr x i = b.repr y i
-- Mathlib/Topology/ContinuousOn.lean
theorem tendsto_nhdsWithin_iff_subtype {s : Set α} {a : α} (h : a ∈ s) (f : α → β) (l : Filter β) :
    Tendsto f (𝓝[s] a) l ↔ Tendsto (s.restrict f) (𝓝 ⟨a, h⟩) l
-- Mathlib/Analysis/SpecialFunctions/Trigonometric/Basic.lean
theorem tendsto_cos_neg_pi_div_two : Tendsto cos (𝓝[>] (-(π / 2))) (𝓝[>] 0)
-- Mathlib/Algebra/Module/LocalizedModule.lean
private theorem nsmul_succ' (n : ℕ) (x : LocalizedModule S M) : n.succ • x = n • x + x
-- Mathlib/Data/Real/EReal.lean
lemma inv_neg_of_neg_ne_bot {a : EReal} (h : a < 0) (h' : a ≠ ⊥) : a⁻¹ < 0
-- .lake/packages/lean4/src/lean/Init/Omega/IntList.lean
theorem dot_distrib_left (xs ys zs : IntList) : (xs + ys).dot zs = xs.dot zs + ys.dot zs
-- Mathlib/Order/SuccPred/Basic.lean
theorem exists_pred_iterate_iff_le : (∃ n, pred^[n] b = a) ↔ a ≤ b
-- Mathlib/SetTheory/Ordinal/Arithmetic.lean
theorem sup_eq_sup {ι ι' : Type u} (r : ι → ι → Prop) (r' : ι' → ι' → Prop) [IsWellOrder ι r]
    [IsWellOrder ι' r'] {o : Ordinal.{u}} (ho : type r = o) (ho' : type r' = o)
    (f : ∀ a < o, Ordinal.{max u v}) :
    sup.{_, v} (familyOfBFamily' r ho f) = sup.{_, v} (familyOfBFamily' r' ho' f)
-- Mathlib/Computability/Partrec.lean
protected theorem some : Partrec (@Part.some α)
-- Mathlib/LinearAlgebra/Dimension/Constructions.lean
/-- The finrank of `(ι →₀ R)` is `Fintype.card ι`. -/
@[simp]
theorem finrank_finsupp_self {ι : Type v} [Fintype ι] : finrank R (ι →₀ R) = card ι
-- Mathlib/CategoryTheory/Equivalence.lean
/-- The other triangle equality. The proof follows the following proof in Globular:
  http://globular.science/1905.001 -/
@[reassoc (attr := simp)]
theorem unit_inverse_comp (e : C ≌ D) (Y : D) :
    e.unit.app (e.inverse.obj Y) ≫ e.inverse.map (e.counit.app Y) = 𝟙 (e.inverse.obj Y)
-- .lake/packages/lean4/src/lean/Init/Data/Int/Order.lean
protected theorem nonpos_of_neg_nonneg {a : Int} (h : 0 ≤ -a) : a ≤ 0
-- Mathlib/Combinatorics/SimpleGraph/Walk.lean
@[simp]
theorem cons_nil_append {u v w : V} (h : G.Adj u v) (p : G.Walk v w) :
    (cons h nil).append p = cons h p
-- Mathlib/Order/CompleteLattice.lean
theorem Monotone.iInf_comp_eq [Preorder β] {f : β → α} (hf : Monotone f) {s : ι → β}
    (hs : ∀ x, ∃ i, s i ≤ x) : ⨅ x, f (s x) = ⨅ y, f y
-- Mathlib/Analysis/Calculus/UniformLimitsDeriv.lean
theorem hasDerivAt_of_tendstoUniformly [NeBot l] (hf' : TendstoUniformly f' g' l)
    (hf : ∀ᶠ n in l, ∀ x : 𝕜, HasDerivAt (f n) (f' n x) x)
    (hfg : ∀ x : 𝕜, Tendsto (fun n => f n x) l (𝓝 (g x))) : ∀ x : 𝕜, HasDerivAt g (g' x) x
-- Mathlib/Analysis/NormedSpace/AffineIsometry.lean
@[simp]
theorem refl_trans : (refl 𝕜 P).trans e = e
-- Mathlib/RingTheory/Polynomial/Basic.lean
theorem coeff_ofSubring (p : T[X]) (n : ℕ) : coeff (ofSubring T p) n = (coeff p n : T)
-- Mathlib/MeasureTheory/Integral/IntegralEqImproper.lean
theorem intervalIntegral_tendsto_integral (hfi : Integrable f μ) (ha : Tendsto a l atBot)
    (hb : Tendsto b l atTop) : Tendsto (fun i => ∫ x in a i..b i, f x ∂μ) l (𝓝 <| ∫ x, f x ∂μ)
-- .lake/packages/lean4/src/lean/Init/Data/List/BasicAux.lean
theorem append_cancel_left {as bs cs : List α} (h : as ++ bs = as ++ cs) : bs = cs
-- Mathlib/Data/Matrix/Basic.lean
@[simp]
theorem diag_transpose (A : Matrix n n α) : diag Aᵀ = diag A
-- Mathlib/Topology/UniformSpace/Basic.lean
theorem uniformity_hasBasis_closed :
    HasBasis (𝓤 α) (fun V : Set (α × α) => V ∈ 𝓤 α ∧ IsClosed V) id
-- Mathlib/NumberTheory/Liouville/LiouvilleWith.lean
/-- A number satisfies the Liouville condition with any exponent if and only if it is a Liouville
number. -/
theorem forall_liouvilleWith_iff {x : ℝ} : (∀ p, LiouvilleWith p x) ↔ Liouville x
-- Mathlib/SetTheory/Ordinal/NaturalOps.lean
@[simp]
theorem nadd_one : a ♯ 1 = succ a
-- Mathlib/LinearAlgebra/Alternating/Basic.lean
/-- Currying with the same element twice gives the zero map. -/
@[simp]
theorem curryLeft_same {n : ℕ} (f : M'' [⋀^Fin n.succ.succ]→ₗ[R'] N'') (m : M'') :
    (f.curryLeft m).curryLeft m = 0
-- Mathlib/Data/Complex/Exponential.lean
@[simp]
theorem sinh_ofReal_im (x : ℝ) : (sinh x).im = 0
-- Mathlib/Algebra/NeZero.lean
@[simp] lemma one_ne_zero [One α] [NeZero (1 : α)] : (1 : α) ≠ 0
-- Mathlib/Order/Filter/Ultrafilter.lean
theorem of_le (f : Filter α) [NeBot f] : ↑(of f) ≤ f
-- Mathlib/Logic/Equiv/Fin.lean
@[simp]
theorem finSuccEquivLast_symm_some (i : Fin n) :
    finSuccEquivLast.symm (some i) = Fin.castSucc i
-- Mathlib/Analysis/Calculus/FDeriv/Equiv.lean
@[fun_prop]
protected theorem differentiableAt : DifferentiableAt 𝕜 iso x
-- Mathlib/Topology/UnitInterval.lean
lemma univ_eq_Icc : (univ : Set I) = Icc (0 : I) (1 : I)
-- Mathlib/Algebra/Module/Submodule/Lattice.lean
protected theorem ne_bot_iff (p : Submodule R M) : p ≠ ⊥ ↔ ∃ x ∈ p, x ≠ (0 : M)
-- .lake/packages/batteries/Batteries/Data/List/Pairwise.lean
theorem Pairwise.imp_mem {l : List α} :
    Pairwise R l ↔ Pairwise (fun x y => x ∈ l → y ∈ l → R x y) l
-- Mathlib/MeasureTheory/Decomposition/UnsignedHahn.lean
/-- **Hahn decomposition theorem** -/
theorem hahn_decomposition [IsFiniteMeasure μ] [IsFiniteMeasure ν] :
    ∃ s,
      MeasurableSet s ∧
        (∀ t, MeasurableSet t → t ⊆ s → ν t ≤ μ t) ∧ ∀ t, MeasurableSet t → t ⊆ sᶜ → μ t ≤ ν t
-- Mathlib/CategoryTheory/Limits/FullSubcategory.lean
theorem ClosedUnderColimitsOfShape.colimit (h : ClosedUnderColimitsOfShape J P) {F : J ⥤ C}
    [HasColimit F] : (∀ j, P (F.obj j)) → P (colimit F)
-- Mathlib/Data/Nat/ModEq.lean
theorem chineseRemainder_modEq_unique (co : n.Coprime m) {a b z}
    (hzan : z ≡ a [MOD n]) (hzbm : z ≡ b [MOD m]) : z ≡ chineseRemainder co a b [MOD n*m]
-- Mathlib/Order/Lattice.lean
theorem inf_def [∀ i, Inf (α' i)] (f g : ∀ i, α' i) : f ⊓ g = fun i => f i ⊓ g i
-- Mathlib/Data/Real/Irrational.lean
/-- **Irrationality of the Square Root of 2** -/
theorem irrational_sqrt_two : Irrational (√2)
-- Mathlib/Data/Set/Pointwise/Basic.lean
@[to_additive]
theorem iUnion_mul (s : ι → Set α) (t : Set α) : (⋃ i, s i) * t = ⋃ i, s i * t
-- Mathlib/Order/SymmDiff.lean
theorem bihimp_triangle : a ⇔ b ⊓ b ⇔ c ≤ a ⇔ c
-- Mathlib/Data/Fin/Basic.lean
@[simp]
theorem coe_divNat (i : Fin (m * n)) : (i.divNat : ℕ) = i / n
-- Mathlib/Data/Stream/Init.lean
theorem tail_drop (n : ℕ) (s : Stream' α) : tail (drop n s) = drop n (tail s)
-- Mathlib/CategoryTheory/Limits/Shapes/Pullback/Pasting.lean
@[reassoc (attr := simp)]
theorem inr_pushoutLeftPushoutInrIso_inv :
    pushout.inr _ _ ≫ (pushoutLeftPushoutInrIso f g g').inv = pushout.inr _ _
-- Mathlib/Topology/Constructions.lean
theorem Sigma.nhds_eq (x : Sigma σ) : 𝓝 x = Filter.map (Sigma.mk x.1) (𝓝 x.2)
-- Mathlib/Data/Num/Lemmas.lean
@[norm_cast] -- @[simp] -- Porting note (#10618): simp can prove this
theorem of_nat_inj {m n : ℕ} : (m : Num) = n ↔ m = n
-- Mathlib/LinearAlgebra/BilinearForm/Orthogonal.lean
theorem span_singleton_inf_orthogonal_eq_bot {B : BilinForm K V} {x : V} (hx : ¬B.IsOrtho x x) :
    (K ∙ x) ⊓ B.orthogonal (K ∙ x) = ⊥
-- Mathlib/CategoryTheory/Limits/Types.lean
/--
Given surjections `⋯ ⟶ Xₙ₊₁ ⟶ Xₙ ⟶ ⋯ ⟶ X₀`, the projection map `lim Xₙ ⟶ X₀` is surjective.
-/
lemma surjective_π_app_zero_of_surjective_map
    (hc : IsLimit c)
    (hF : ∀ n, Function.Surjective (F.map (homOfLE (Nat.le_succ n)).op)) :
    Function.Surjective (c.π.app ⟨0⟩)
-- Mathlib/SetTheory/Cardinal/Cofinality.lean
theorem cof_eq (r : α → α → Prop) [IsWellOrder α r] : ∃ S, Unbounded r S ∧ #S = cof (type r)
-- Mathlib/Topology/Order/IntermediateValue.lean
theorem eq_Icc_csInf_csSup_of_connected_bdd_closed {s : Set α} (hc : IsConnected s)
    (hb : BddBelow s) (ha : BddAbove s) (hcl : IsClosed s) : s = Icc (sInf s) (sSup s)
-- Mathlib/RingTheory/LaurentSeries.lean
@[simp, norm_cast]
theorem coe_sub : ((f - g : RatFunc F) : LaurentSeries F) = f - g
-- Mathlib/CategoryTheory/Opposites.lean
/-- Whenever possible, it is advisable to use the isomorphism `rightOpLeftOpIso`
instead of this equality of functors. -/
theorem rightOp_leftOp_eq (F : Cᵒᵖ ⥤ D) : F.rightOp.leftOp = F
-- Mathlib/Order/RelClasses.lean
theorem Subrelation.isWellFounded (r : α → α → Prop) [IsWellFounded α r] {s : α → α → Prop}
    (h : Subrelation s r) : IsWellFounded α s
-- Mathlib/Algebra/Polynomial/Roots.lean
theorem rootSet_finite (p : T[X]) (S : Type*) [CommRing S] [IsDomain S] [Algebra T S] :
    (p.rootSet S).Finite
-- Mathlib/LinearAlgebra/QuadraticForm/Basic.lean
@[simp]
theorem toQuadraticMap_sum {ι : Type*} (s : Finset ι) (B : ι → (BilinMap R M N)) :
    (∑ i ∈ s, B i).toQuadraticMap = ∑ i ∈ s, (B i).toQuadraticMap
-- Mathlib/Data/Set/Card.lean
theorem Infinite.exists_subset_ncard_eq {s : Set α} (hs : s.Infinite) (k : ℕ) :
    ∃ t, t ⊆ s ∧ t.Finite ∧ t.ncard = k
-- Mathlib/SetTheory/Cardinal/Ordinal.lean
@[simp]
theorem alephIdx_aleph' (o : Ordinal) : (aleph' o).alephIdx = o
-- Mathlib/CategoryTheory/Sums/Associator.lean
@[simp]
theorem associator_obj_inr (X) : (associator C D E).obj (inr X) = inr (inr X)
-- Mathlib/Computability/PartrecCode.lean
@[simp]
theorem eval_curry (c n x) : eval (curry c n) x = eval c (Nat.pair n x)
-- Mathlib/Data/Set/Pointwise/Basic.lean
@[to_additive (attr := simp)]
theorem one_subset : 1 ⊆ s ↔ (1 : α) ∈ s
-- Mathlib/Topology/Bornology/BoundedOperation.lean
lemma add_bounded_of_bounded_of_bounded {X : Type*} [PseudoMetricSpace R] [Add R] [BoundedAdd R]
    {f g : X → R} (f_bdd : ∃ C, ∀ x y, dist (f x) (f y) ≤ C)
    (g_bdd : ∃ C, ∀ x y, dist (g x) (g y) ≤ C) :
    ∃ C, ∀ x y, dist ((f + g) x) ((f + g) y) ≤ C
-- Mathlib/MeasureTheory/Constructions/BorelSpace/Metric.lean
@[measurability]
theorem measurable_ennnorm : Measurable fun x : α => (‖x‖₊ : ℝ≥0∞)
-- Mathlib/RepresentationTheory/Action/Basic.lean
/-- Construct an isomorphism of `G` actions/representations
from an isomorphism of the underlying objects,
where the forward direction commutes with the group action. -/
@[simps]
def mkIso {M N : Action V G} (f : M.V ≅ N.V)
    (comm : ∀ g : G, M.ρ g ≫ f.hom = f.hom ≫ N.ρ g := by aesop_cat) : M ≅ N
-- Mathlib/Analysis/Normed/Module/Dual.lean
/-- The `polar` of closed ball in a normed space `E` is the closed ball of the dual with
inverse radius. -/
theorem polar_closedBall {𝕜 E : Type*} [RCLike 𝕜] [NormedAddCommGroup E] [NormedSpace 𝕜 E] {r : ℝ}
    (hr : 0 < r) : polar 𝕜 (closedBall (0 : E) r) = closedBall (0 : Dual 𝕜 E) r⁻¹
-- Mathlib/Topology/MetricSpace/Equicontinuity.lean
/-- Characterization of equicontinuity for families of functions between (pseudo) metric spaces. -/
theorem equicontinuousAt_iff {ι : Type*} [PseudoMetricSpace β] {F : ι → β → α} {x₀ : β} :
    EquicontinuousAt F x₀ ↔ ∀ ε > 0, ∃ δ > 0, ∀ x, dist x x₀ < δ → ∀ i, dist (F i x₀) (F i x) < ε
-- Mathlib/Algebra/Group/Support.lean
@[to_additive support_prod_mk']
theorem mulSupport_prod_mk' (f : α → M × N) :
    mulSupport f = (mulSupport fun x => (f x).1) ∪ mulSupport fun x => (f x).2
-- Mathlib/Topology/MetricSpace/Cauchy.lean
/-- Yet another metric characterization of Cauchy sequences on integers. This one is often the
most efficient. -/
theorem cauchySeq_iff_le_tendsto_0 {s : ℕ → α} :
    CauchySeq s ↔
      ∃ b : ℕ → ℝ,
        (∀ n, 0 ≤ b n) ∧
          (∀ n m N : ℕ, N ≤ n → N ≤ m → dist (s n) (s m) ≤ b N) ∧ Tendsto b atTop (𝓝 0)
-- Mathlib/LinearAlgebra/AffineSpace/Basis.lean
@[simp]
theorem coord_apply_combination_of_mem (hi : i ∈ s) {w : ι → k} (hw : s.sum w = 1) :
    b.coord i (s.affineCombination k b w) = w i
-- Mathlib/RingTheory/PrincipalIdealDomain.lean
theorem dvd_or_coprime (x y : R) (h : Irreducible x) : x ∣ y ∨ IsCoprime x y
-- Mathlib/RingTheory/Adjoin/PowerBasis.lean
/-- Let `B B' : PowerBasis K S` be such that `IsIntegral R B.gen`, and let `P : R[X]` be such that
`aeval B.gen P = B'.gen`. Then `IsIntegral R (B.basis.to_matrix B'.basis i j)` for all `i` and `j`
if `minpoly K B.gen = (minpoly R B.gen).map (algebraMap R L)`. This is the case
if `R` is a GCD domain and `K` is its fraction ring. -/
theorem toMatrix_isIntegral {B B' : PowerBasis K S} {P : R[X]} (h : aeval B.gen P = B'.gen)
    (hB : IsIntegral R B.gen) (hmin : minpoly K B.gen = (minpoly R B.gen).map (algebraMap R K)) :
    ∀ i j, IsIntegral R (B.basis.toMatrix B'.basis i j)
-- Mathlib/Data/Finset/Basic.lean
theorem disjoint_filter_filter {s t : Finset α}
    {p q : α → Prop} [DecidablePred p] [DecidablePred q] :
    Disjoint s t → Disjoint (s.filter p) (t.filter q)
-- Mathlib/RingTheory/Binomial.lean
theorem factorial_nsmul_multichoose_eq_ascPochhammer (r : R) (n : ℕ) :
    n.factorial • multichoose r n = (ascPochhammer ℕ n).smeval r
-- Mathlib/MeasureTheory/Constructions/Prod/Integral.lean
theorem Integrable.integral_norm_prod_right [SFinite μ] ⦃f : α × β → E⦄
    (hf : Integrable f (μ.prod ν)) : Integrable (fun y => ∫ x, ‖f (x, y)‖ ∂μ) ν
-- Mathlib/SetTheory/Cardinal/Basic.lean
/-- See also `Cardinal.aleph0_le_mul_iff`. -/
theorem aleph0_le_mul_iff {a b : Cardinal} : ℵ₀ ≤ a * b ↔ a ≠ 0 ∧ b ≠ 0 ∧ (ℵ₀ ≤ a ∨ ℵ₀ ≤ b)
-- Mathlib/Probability/Moments.lean
theorem mgf_zero [IsProbabilityMeasure μ] : mgf X μ 0 = 1
-- Mathlib/CategoryTheory/Monad/Limits.lean
/-- If `C` has colimits of shape `J` then any reflective subcategory has colimits of shape `J`. -/
theorem hasColimitsOfShape_of_reflective (R : D ⥤ C) [Reflective R] [HasColimitsOfShape J C] :
    HasColimitsOfShape J D
-- Mathlib/Analysis/Convex/Deriv.lean
/-- If a function `f` is continuous on a convex set `D ⊆ ℝ`, and `f'` is strictly monotone on the
interior, then `f` is strictly convex on `D`.
Note that we don't require differentiability, since it is guaranteed at all but at most
one point by the strict monotonicity of `f'`. -/
theorem StrictMonoOn.strictConvexOn_of_deriv {D : Set ℝ} (hD : Convex ℝ D) {f : ℝ → ℝ}
    (hf : ContinuousOn f D) (hf' : StrictMonoOn (deriv f) (interior D)) : StrictConvexOn ℝ D f
-- Mathlib/Algebra/Homology/ShortComplex/LeftHomology.lean
@[reassoc]
lemma leftHomologyMap'_comp (φ₁ : S₁ ⟶ S₂) (φ₂ : S₂ ⟶ S₃)
    (h₁ : S₁.LeftHomologyData) (h₂ : S₂.LeftHomologyData) (h₃ : S₃.LeftHomologyData) :
    leftHomologyMap' (φ₁ ≫ φ₂) h₁ h₃ = leftHomologyMap' φ₁ h₁ h₂ ≫
      leftHomologyMap' φ₂ h₂ h₃
-- Mathlib/Data/List/Basic.lean
theorem map₂Right_eq_zipWith (h : length bs ≤ length as) :
    map₂Right f as bs = zipWith (fun a b => f (some a) b) as bs
-- Mathlib/RingTheory/Artinian.lean
theorem isSemisimpleRing_of_isReduced [IsReduced R] : IsSemisimpleRing R
-- Mathlib/Algebra/Homology/ShortComplex/RightHomology.lean
/-- The natural transformation `S.rightHomology ⟶ S.opcycles` for all short complexes `S`. -/
@[simps]
noncomputable def rightHomologyιNatTrans :
    rightHomologyFunctor C ⟶ opcyclesFunctor C
-- Mathlib/FieldTheory/Separable.lean
@[simp]
theorem separable_one : (1 : R[X]).Separable
-- Mathlib/LinearAlgebra/Dual.lean
theorem LinearMap.dualMap_def (f : M₁ →ₗ[R] M₂) : f.dualMap = Module.Dual.transpose (R := R) f
-- Mathlib/Topology/Separation.lean
@[simp]
theorem subsingleton_closure [T1Space X] {s : Set X} : (closure s).Subsingleton ↔ s.Subsingleton
-- Mathlib/LinearAlgebra/Prod.lean
theorem graph_eq_range_prod : f.graph = range (LinearMap.id.prod f)
-- Mathlib/Data/FunLike/Basic.lean
theorem exists_ne {f g : F} (h : f ≠ g) : ∃ x, f x ≠ g x
-- Mathlib/Algebra/GroupWithZero/WithZero.lean
/-- The (multiplicative) universal property of `WithZero`. -/
@[simps! symm_apply_apply]
noncomputable nonrec def lift' : (α →* β) ≃ (WithZero α →*₀ β)
-- Mathlib/Geometry/Manifold/ContMDiff/Defs.lean
theorem contMDiffOn_iff_source_of_mem_maximalAtlas (he : e ∈ maximalAtlas I M) (hs : s ⊆ e.source) :
    ContMDiffOn I I' n f s ↔
      ContMDiffOn 𝓘(𝕜, E) I' n (f ∘ (e.extend I).symm) (e.extend I '' s)
-- Mathlib/Algebra/Module/Defs.lean
/-- `NoZeroSMulDivisors R M` states that a scalar multiple is `0` only if either argument is `0`.
This is a version of saying that `M` is torsion free, without assuming `R` is zero-divisor free.

The main application of `NoZeroSMulDivisors R M`, when `M` is a module,
is the result `smul_eq_zero`: a scalar multiple is `0` iff either argument is `0`.

It is a generalization of the `NoZeroDivisors` class to heterogeneous multiplication.
-/
@[mk_iff]
class NoZeroSMulDivisors (R M : Type*) [Zero R] [Zero M] [SMul R M] : Prop where
  /-- If scalar multiplication yields zero, either the scalar or the vector was zero. -/
  eq_zero_or_eq_zero_of_smul_eq_zero : ∀ {c : R} {x : M}, c • x = 0 → c = 0 ∨ x = 0
-- .lake/packages/lean4/src/lean/Init/Data/List/Lemmas.lean
theorem lt_trans' [LT α] [DecidableRel (@LT.lt α _)]
    (lt_trans : ∀ {x y z : α}, x < y → y < z → x < z)
    (le_trans : ∀ {x y z : α}, ¬x < y → ¬y < z → ¬x < z)
    {l₁ l₂ l₃ : List α} (h₁ : l₁ < l₂) (h₂ : l₂ < l₃) : l₁ < l₃
-- Mathlib/Algebra/Module/Submodule/Localization.lean
/--
The canonical map from the kernel of `g` to the kernel of `g` localized at a submonoid.

This is a localization map by `LinearMap.toKerLocalized_isLocalizedModule`.
-/
@[simps!]
noncomputable def LinearMap.toKerIsLocalized (g : M →ₗ[R] P) :
    ker g →ₗ[R] ker (IsLocalizedModule.map p f f' g)
-- Mathlib/Topology/ContinuousOn.lean
theorem eventually_mem_of_tendsto_nhdsWithin {f : β → α} {a : α} {s : Set α} {l : Filter β}
    (h : Tendsto f l (𝓝[s] a)) : ∀ᶠ i in l, f i ∈ s
-- Mathlib/LinearAlgebra/Matrix/BilinearForm.lean
theorem _root_.Matrix.nondegenerate_toBilin'_iff_nondegenerate_toBilin {M : Matrix ι ι R₂}
    (b : Basis ι R₂ M₂) : M.toBilin'.Nondegenerate ↔ (Matrix.toBilin b M).Nondegenerate
-- Mathlib/CategoryTheory/Limits/Opposites.lean
theorem hasFiniteProducts_of_opposite [HasFiniteCoproducts Cᵒᵖ] : HasFiniteProducts C
-- Mathlib/CategoryTheory/Limits/Cones.lean
/-- Change a cocone on `F : Jᵒᵖ ⥤ C` to a cone on `F.rightOp : J ⥤ Cᵒᵖ`. -/
@[simps]
def coneRightOpOfCocone (c : Cocone F) : Cone F.rightOp
-- .lake/packages/batteries/Batteries/Data/RBMap/Alter.lean
/-- The `modify` function preserves the ordering invariants. -/
protected theorem Ordered.modify {t : RBNode α}
    (H : (t.zoom cut).1.OnRoot fun x => cmpEq cmp (f x) x)
    (h : t.Ordered cmp) : (modify cut f t).Ordered cmp
-- Mathlib/Data/Sign.lean
private lemma mul_assoc : ∀ (a b c : SignType), (a * b) * c = a * (b * c)
-- Mathlib/Algebra/Group/Subsemigroup/Operations.lean
@[to_additive]
theorem comap_inf_map_of_injective (S T : Subsemigroup M) : (S.map f ⊓ T.map f).comap f = S ⊓ T
-- Mathlib/Order/CompleteLattice.lean
theorem iInf₂_le_of_le {f : ∀ i, κ i → α} (i : ι) (j : κ i) (h : f i j ≤ a) :
    ⨅ (i) (j), f i j ≤ a
-- Mathlib/Probability/Process/Stopping.lean
theorem measurableSet_le_stopping_time [TopologicalSpace ι] [SecondCountableTopology ι]
    [OrderTopology ι] [MeasurableSpace ι] [BorelSpace ι] (hτ : IsStoppingTime f τ)
    (hπ : IsStoppingTime f π) : MeasurableSet[hτ.measurableSpace] {ω | τ ω ≤ π ω}
-- Mathlib/Probability/Independence/Kernel.lean
theorem indepSet_iff_indepSets_singleton {m0 : MeasurableSpace Ω} (hs_meas : MeasurableSet s)
    (ht_meas : MeasurableSet t) (κ : Kernel α Ω) (μ : Measure α)
    [IsMarkovKernel κ] :
    IndepSet s t κ μ ↔ IndepSets {s} {t} κ μ
-- Mathlib/Data/Real/EReal.lean
@[simp]
lemma zero_div {a : EReal} : 0 / a = 0
-- Mathlib/Order/Lattice.lean
theorem le_map_sup [SemilatticeSup α] [SemilatticeSup β] {f : α → β} (h : Monotone f) (x y : α) :
    f x ⊔ f y ≤ f (x ⊔ y)
-- Mathlib/Topology/Algebra/InfiniteSum/Basic.lean
@[to_additive]
theorem hasProd_single {f : β → α} (b : β) (hf : ∀ (b') (_ : b' ≠ b), f b' = 1) : HasProd f (f b)
-- Mathlib/CategoryTheory/Limits/Shapes/FunctorToTypes.lean
@[simp]
lemma prodMk_fst {a : C} (x : F.obj a) (y : G.obj a) :
    (Limits.prod.fst (X := F)).app a (prodMk x y) = x
-- Mathlib/Combinatorics/SimpleGraph/Density.lean
theorem interedges_disjoint_left (hs : Disjoint s₁ s₂) (t : Finset α) :
    Disjoint (G.interedges s₁ t) (G.interedges s₂ t)
-- Mathlib/LinearAlgebra/Determinant.lean
@[simp]
theorem coe_det (f : M ≃ₗ[R] M) : ↑(LinearEquiv.det f) = LinearMap.det (f : M →ₗ[R] M)
-- Mathlib/LinearAlgebra/TensorProduct/Basic.lean
theorem congr_symm (f : M ≃ₗ[R] P) (g : N ≃ₗ[R] Q) : (congr f g).symm = congr f.symm g.symm