ruc-ai4math/mathlib_handler_benchmark_410 huggingface dataset:
-- Mathlib/SetTheory/Cardinal/Finite.lean
theorem card_eq_of_bijective (f : α → β) (hf : Function.Bijective f) : Nat.card α = Nat.card β
-- Mathlib/Algebra/CharP/ExpChar.lean
/-- The characteristic is zero if the exponential characteristic is one. -/
theorem charZero_of_expChar_one' [hq : ExpChar R 1] : CharZero R
-- Mathlib/Algebra/Homology/DerivedCategory/Ext.lean
@[simp]
lemma neg_comp (α : Ext X Y n) {m : ℕ} (β : Ext Y Z m) {p : ℕ} (h : n + m = p) :
    (-α).comp β h = -α.comp β h
-- Mathlib/Algebra/Group/Prod.lean
@[to_additive]
theorem Prod.semiconjBy_iff {x y z : M × N} :
    SemiconjBy x y z ↔ SemiconjBy x.1 y.1 z.1 ∧ SemiconjBy x.2 y.2 z.2
-- Mathlib/LinearAlgebra/Dimension/Localization.lean
lemma IsLocalizedModule.linearIndependent_lift {ι} {v : ι → N} (hf : LinearIndependent S v) :
    ∃ w : ι → M, LinearIndependent R w
-- Mathlib/Algebra/Order/Hom/Basic.lean
/-- `AddGroupNormClass F α` states that `F` is a type of `β`-valued norms on the additive group
`α`.

You should extend this class when you extend `AddGroupNorm`. -/
class AddGroupNormClass (F α β : Type*) [AddGroup α] [OrderedAddCommMonoid β] [FunLike F α β]
  extends AddGroupSeminormClass F α β : Prop where
  /-- The argument is zero if its image under the map is zero. -/
  eq_zero_of_map_eq_zero (f : F) {a : α} : f a = 0 → a = 0
-- Mathlib/Analysis/Normed/Field/Basic.lean
theorem Filter.isBoundedUnder_le_mul_tendsto_zero {f g : ι → α} {l : Filter ι}
    (hf : IsBoundedUnder (· ≤ ·) l (norm ∘ f)) (hg : Tendsto g l (𝓝 0)) :
    Tendsto (fun x => f x * g x) l (𝓝 0)
-- Mathlib/SetTheory/Ordinal/Arithmetic.lean
theorem rank_strictMono [Preorder α] [WellFoundedLT α] :
    StrictMono (rank <| @wellFounded_lt α _ _)
-- Mathlib/Analysis/Calculus/FDeriv/Basic.lean
theorem DifferentiableOn.hasFDerivAt (h : DifferentiableOn 𝕜 f s) (hs : s ∈ 𝓝 x) :
    HasFDerivAt f (fderiv 𝕜 f x) x
-- Mathlib/CategoryTheory/FiberedCategory/HomLift.lean
lemma eq_of_isHomLift {a b : 𝒳} (f : p.obj a ⟶ p.obj b) (φ : a ⟶ b) [p.IsHomLift f φ] :
    f = p.map φ
-- Mathlib/Algebra/GCDMonoid/Multiset.lean
@[simp]
theorem lcm_singleton {a : α} : ({a} : Multiset α).lcm = normalize a
-- Mathlib/Analysis/Normed/Group/Seminorm.lean
/-- A nonarchimedean seminorm on an additive group `G` is a function `f : G → ℝ` that preserves
zero, is nonarchimedean and such that `f (-x) = f x` for all `x`. -/
structure NonarchAddGroupSeminorm (G : Type*) [AddGroup G] extends ZeroHom G ℝ where
  /-- The seminorm applied to a sum is dominated by the maximum of the function applied to the
  addends. -/
  protected add_le_max' : ∀ r s, toFun (r + s) ≤ max (toFun r) (toFun s)
  /-- The seminorm is invariant under negation. -/
  protected neg' : ∀ r, toFun (-r) = toFun r
-- Mathlib/LinearAlgebra/Multilinear/Basic.lean
@[simp]
theorem MultilinearMap.uncurry_curryLeft (f : MultilinearMap R M M₂) :
    f.curryLeft.uncurryLeft = f
-- Mathlib/Data/Num/Lemmas.lean
theorem cmp_to_nat : ∀ m n, (Ordering.casesOn (cmp m n) ((m : ℕ) < n) (m = n) ((n : ℕ) < m) : Prop)
-- Mathlib/CategoryTheory/Monad/Monadicity.lean
theorem comparisonAdjunction_unit_f
    [∀ A : adj.toMonad.Algebra, HasCoequalizer (F.map A.a)
      (adj.counit.app (F.obj A.A))]
    (A : adj.toMonad.Algebra) :
    ((comparisonAdjunction adj).unit.app A).f = (beckCoequalizer A).desc (unitCofork A)
-- Mathlib/MeasureTheory/OuterMeasure/AE.lean
theorem inter_ae_eq_empty_of_ae_eq_empty_left (h : s =ᵐ[μ] (∅ : Set α)) :
    (s ∩ t : Set α) =ᵐ[μ] (∅ : Set α)
-- .lake/packages/lean4/src/lean/Init/Data/List/Lemmas.lean
@[deprecated map_reverse (since := "2024-06-20")]
theorem reverse_map (f : α → β) (l : List α) : (l.map f).reverse = l.reverse.map f
-- Mathlib/Order/SuccPred/Limit.lean
protected theorem IsPredLimit.isMax_of_noMin [NoMinOrder α] (h : IsPredLimit a) : IsMax a
-- Mathlib/MeasureTheory/Function/LpSpace.lean
/-- If a sum of continuous functions `g n` is convergent, and the same sum converges in `Lᵖ` to `h`,
then in fact `g n` converges uniformly to `h`.  -/
theorem hasSum_of_hasSum_Lp {β : Type*} [μ.IsOpenPosMeasure] [NormedField 𝕜] [NormedSpace 𝕜 E]
    {g : β → C(α, E)} {f : C(α, E)} (hg : Summable g)
    (hg2 : HasSum (toLp (E := E) p μ 𝕜 ∘ g) (toLp (E := E) p μ 𝕜 f)) : HasSum g f
-- Mathlib/Topology/PartialHomeomorph.lean
/-- A function is continuous on a set if and only if its composition with a partial homeomorphism
on the right is continuous on the corresponding set. -/
theorem continuousOn_iff_continuousOn_comp_right {f : Y → Z} {s : Set Y} (h : s ⊆ e.target) :
    ContinuousOn f s ↔ ContinuousOn (f ∘ e) (e.source ∩ e ⁻¹' s)
-- Mathlib/Data/Set/Basic.lean
@[simp]
theorem union_empty (a : Set α) : a ∪ ∅ = a
-- Mathlib/Analysis/NormedSpace/OperatorNorm/Bilinear.lean
theorem le_opNorm₂ [RingHomIsometric σ₁₃] (f : E →SL[σ₁₃] F →SL[σ₂₃] G) (x : E) (y : F) :
    ‖f x y‖ ≤ ‖f‖ * ‖x‖ * ‖y‖
-- Mathlib/MeasureTheory/Function/SimpleFuncDenseLp.lean
theorem tendsto_approxOn_range_L1_nnnorm [OpensMeasurableSpace E] {f : β → E} {μ : Measure β}
    [SeparableSpace (range f ∪ {0} : Set E)] (fmeas : Measurable f) (hf : Integrable f μ) :
    Tendsto (fun n => ∫⁻ x, ‖approxOn f fmeas (range f ∪ {0}) 0 (by simp) n x - f x‖₊ ∂μ) atTop
      (𝓝 0)
-- Mathlib/RingTheory/UniqueFactorizationDomain.lean
theorem dvd_of_mem_normalizedFactors {a p : α} (H : p ∈ normalizedFactors a) : p ∣ a
-- Mathlib/Order/Sublattice.lean
@[simp, norm_cast] lemma coe_bot : (⊥ : Sublattice α) = (∅ : Set α)
-- Mathlib/Algebra/Group/Hom/Defs.lean
@[to_additive]
protected theorem MonoidHom.map_pow [Monoid M] [Monoid N] (f : M →* N) (a : M) (n : ℕ) :
    f (a ^ n) = f a ^ n
-- Mathlib/Data/Set/SMulAntidiagonal.lean
@[to_additive VAddAntidiagonal.eq_of_fst_le_fst_of_snd_le_snd]
theorem eq_of_fst_le_fst_of_snd_le_snd (h₁ : (x : G × P).1 ≤ (y : G × P).1)
    (h₂ : (x : G × P).2 ≤ (y : G × P).2) : x = y
-- Mathlib/Topology/VectorBundle/Basic.lean
theorem linearMapAt_def_of_mem (e : Trivialization F (π F E)) [e.IsLinear R] {b : B}
    (hb : b ∈ e.baseSet) : e.linearMapAt R b = e.linearEquivAt R b hb
-- Mathlib/Algebra/Group/Opposite.lean
/-- The function `AddOpposite.op` is a multiplicative equivalence. -/
@[simps! (config := { fullyApplied := false, simpRhs := true })]
def opMulEquiv [Mul α] : α ≃* αᵃᵒᵖ
-- Mathlib/CategoryTheory/Monoidal/Center.lean
/-- A morphism in the Drinfeld center of `C`. -/
-- Porting note(#5171): linter not ported yet
@[ext] -- @[nolint has_nonempty_instance]
structure Hom (X Y : Center C) where
  f : X.1 ⟶ Y.1
  comm : ∀ U, (f ▷ U) ≫ (Y.2.β U).hom = (X.2.β U).hom ≫ (U ◁ f) := by aesop_cat
-- Mathlib/Algebra/GroupWithZero/Defs.lean
/-- Typeclass for expressing that a type `M₀` with multiplication and a zero satisfies
`0 * a = 0` and `a * 0 = 0` for all `a : M₀`. -/
class MulZeroClass (M₀ : Type u) extends Mul M₀, Zero M₀ where
  /-- Zero is a left absorbing element for multiplication -/
  zero_mul : ∀ a : M₀, 0 * a = 0
  /-- Zero is a right absorbing element for multiplication -/
  mul_zero : ∀ a : M₀, a * 0 = 0
-- Mathlib/Order/Interval/Finset/Basic.lean
theorem uIcc_self : [[a, a]] = {a}
-- Mathlib/Order/BoundedOrder.lean
theorem Antitone.ball {P : β → α → Prop} {s : Set β} (hP : ∀ x ∈ s, Antitone (P x)) :
    Antitone fun y => ∀ x ∈ s, P x y
-- Mathlib/Data/Part.lean
@[simp]
theorem mem_some_iff {a b} : b ∈ (some a : Part α) ↔ b = a
-- Mathlib/LinearAlgebra/TensorAlgebra/Basic.lean
@[simp]
theorem lift_unique {A : Type*} [Semiring A] [Algebra R A] (f : M →ₗ[R] A)
    (g : TensorAlgebra R M →ₐ[R] A) : g.toLinearMap.comp (ι R) = f ↔ g = lift R f
-- Mathlib/CategoryTheory/Limits/Constructions/Pullbacks.lean
/-- If the product `X ⨯ Y` and the equalizer of `π₁ ≫ f` and `π₂ ≫ g` exist, then the
    pullback of `f` and `g` exists: It is given by composing the equalizer with the projections. -/
theorem hasLimit_cospan_of_hasLimit_pair_of_hasLimit_parallelPair {C : Type u} [𝒞 : Category.{v} C]
    {X Y Z : C} (f : X ⟶ Z) (g : Y ⟶ Z) [HasLimit (pair X Y)]
    [HasLimit (parallelPair (prod.fst ≫ f) (prod.snd ≫ g))] : HasLimit (cospan f g)
-- Mathlib/GroupTheory/Perm/Cycle/Basic.lean
@[simp]
theorem sameCycle_pow_left {n : ℕ} : SameCycle f ((f ^ n) x) y ↔ SameCycle f x y
-- Mathlib/Analysis/SpecialFunctions/Trigonometric/Basic.lean
@[simp]
theorem tan_pi_div_three : tan (π / 3) = sqrt 3
-- Mathlib/Data/Nat/ModEq.lean
protected theorem add_div_of_dvd_left {a b c : ℕ} (hca : c ∣ b) : (a + b) / c = a / c + b / c
-- Mathlib/CategoryTheory/Sites/Types.lean
/-- Given a sheaf `S`, construct an isomorphism `S ≅ [-, S(*)]`. -/
@[simps]
noncomputable def equivYoneda' (S : SheafOfTypes typesGrothendieckTopology) :
    S ≅ yoneda'.obj (S.1.obj (op PUnit))
-- Mathlib/LinearAlgebra/AffineSpace/Slope.lean
/-- `slope f a c` is a linear combination of `slope f a b` and `slope f b c`. This version
explicitly provides coefficients. If `a ≠ c`, then the sum of the coefficients is `1`, so it is
actually an affine combination, see `lineMap_slope_slope_sub_div_sub`. -/
theorem sub_div_sub_smul_slope_add_sub_div_sub_smul_slope (f : k → PE) (a b c : k) :
    ((b - a) / (c - a)) • slope f a b + ((c - b) / (c - a)) • slope f b c = slope f a c
-- Mathlib/Order/Bounds/Basic.lean
theorem IsGLB.dual (h : IsGLB s a) : IsLUB (ofDual ⁻¹' s) (toDual a)
-- Mathlib/ModelTheory/Complexity.lean
theorem IsQF.relabel {m : ℕ} {φ : L.BoundedFormula α m} (h : φ.IsQF) (f : α → β ⊕ (Fin n)) :
    (φ.relabel f).IsQF
-- Mathlib/Topology/Order/OrderClosed.lean
theorem Ioc_mem_nhdsWithin_Ioi {a b c : α} (H : b ∈ Ico a c) : Ioc a c ∈ 𝓝[>] b
-- Mathlib/Order/RelIso/Basic.lean
protected theorem acc (f : r ↪r s) (a : α) : Acc s (f a) → Acc r a
-- Mathlib/Analysis/NormedSpace/Multilinear/Basic.lean
theorem le_mul_prod_of_le_opNorm_of_le {C : ℝ} {b : ι → ℝ} (hC : ‖f‖ ≤ C) (hm : ∀ i, ‖m i‖ ≤ b i) :
    ‖f m‖ ≤ C * ∏ i, b i
-- Mathlib/Combinatorics/SimpleGraph/Maps.lean
@[simp] lemma induceHomOfLE_apply (v : s) : (G.induceHomOfLE h) v = Set.inclusion h v
-- Mathlib/Topology/Sets/Compacts.lean
@[simp]
theorem coe_toCompacts (s : NonemptyCompacts α) : (s.toCompacts : Set α) = s
-- .lake/packages/batteries/Batteries/Data/HashMap/WF.lean
theorem insert_size [BEq α] [Hashable α] {m : Imp α β} {k v}
    (h : m.size = m.buckets.size) :
    (insert m k v).size = (insert m k v).buckets.size
-- Mathlib/Topology/ContinuousFunction/Bounded.lean
/-- Second version, with pointwise equicontinuity and range in a compact subset. -/
theorem arzela_ascoli₂ (s : Set β) (hs : IsCompact s) (A : Set (α →ᵇ β)) (closed : IsClosed A)
    (in_s : ∀ (f : α →ᵇ β) (x : α), f ∈ A → f x ∈ s) (H : Equicontinuous ((↑) : A → α → β)) :
    IsCompact A
-- Mathlib/FieldTheory/RatFunc/Basic.lean
/-- The zero rational function. -/
protected irreducible_def zero : RatFunc K
-- Mathlib/GroupTheory/OrderOfElement.lean
@[to_additive addOrderOf_add_dvd_mul_addOrderOf]
theorem orderOf_mul_dvd_mul_orderOf (h : Commute x y):
    orderOf (x * y) ∣ orderOf x * orderOf y
-- Mathlib/Algebra/Order/Group/Abs.lean
theorem abs_sub_le_iff : |a - b| ≤ c ↔ a - b ≤ c ∧ b - a ≤ c
-- Mathlib/Analysis/Asymptotics/Theta.lean
@[symm]
nonrec theorem IsTheta.symm (h : f =Θ[l] g) : g =Θ[l] f
-- Mathlib/Topology/Algebra/Module/Basic.lean
theorem ClosedComplemented.exists_isClosed_isCompl {p : Submodule R M} [T1Space p]
    (h : ClosedComplemented p) :
    ∃ q : Submodule R M, IsClosed (q : Set M) ∧ IsCompl p q
-- Mathlib/Algebra/GroupWithZero/Indicator.lean
@[simp] lemma support_pow' (f : ι → M₀) (hn : n ≠ 0) : support (f ^ n) = support f
-- Mathlib/SetTheory/Surreal/Multiplication.lean
lemma P3_of_le_left {y₁ y₂} (i) (h : IH3 x₁ (x₂.moveLeft i) x₂ y₁ y₂) (hl : x₁ ≤ x₂.moveLeft i) :
    P3 x₁ x₂ y₁ y₂
-- Mathlib/Tactic/Ring/Basic.lean
theorem natCast_nat (n) : ((Nat.rawCast n : ℕ) : R) = Nat.rawCast n
-- Mathlib/Geometry/Manifold/ContMDiff/Basic.lean
@[to_additive]
theorem smoothOn_one [One M'] : SmoothOn I I' (1 : M → M') s
-- Mathlib/Data/Set/Defs.lean
theorem mem_diagonal (x : α) : (x, x) ∈ diagonal α
-- Mathlib/LinearAlgebra/QuadraticForm/TensorProduct/Isometries.lean
theorem comp_tensorLId_eq (Q₂ : QuadraticForm R M₂) :
    Q₂.comp (TensorProduct.lid R M₂) = QuadraticForm.tmul (sq (R := R)) Q₂
-- Mathlib/Analysis/NormedSpace/Pointwise.lean
theorem smul_unitBall {c : 𝕜} (hc : c ≠ 0) : c • ball (0 : E) (1 : ℝ) = ball (0 : E) ‖c‖
-- Mathlib/Logic/Relation.lean
lemma reflTransGen_eq_transGen (hr : Reflexive r) :
    ReflTransGen r = TransGen r
-- Mathlib/Analysis/SpecialFunctions/Polynomials.lean
theorem tendsto_nhds_iff {c : 𝕜} :
    Tendsto (fun x => eval x P) atTop (𝓝 c) ↔ P.leadingCoeff = c ∧ P.degree ≤ 0
-- Mathlib/Logic/Equiv/PartialEquiv.lean
@[simp, mfld_simps]
theorem prod_target (e : PartialEquiv α β) (e' : PartialEquiv γ δ) :
    (e.prod e').target = e.target ×ˢ e'.target
-- Mathlib/RingTheory/AlgebraicIndependent.lean
theorem algebraicIndependent_subtype_range {ι} {f : ι → A} (hf : Injective f) :
    AlgebraicIndependent R ((↑) : range f → A) ↔ AlgebraicIndependent R f
-- Mathlib/AlgebraicGeometry/EllipticCurve/DivisionPolynomial/Basic.lean
@[simp]
lemma Φ_neg (n : ℤ) : W.Φ (-n) = W.Φ n
-- Mathlib/Data/NNReal/Basic.lean
/-- If `Γ₀ˣ` is nontrivial and `f : Γ₀ →*₀ ℝ≥0` is strictly monotone, then for any positive
  `r : ℝ≥0`, there exists `d : Γ₀ˣ` with `f d < r`. -/
theorem NNReal.exists_lt_of_strictMono [h : Nontrivial Γ₀ˣ] {f : Γ₀ →*₀ ℝ≥0} (hf : StrictMono f)
    {r : ℝ≥0} (hr : 0 < r) : ∃ d : Γ₀ˣ, f d < r
-- Mathlib/Algebra/Associated/Basic.lean
theorem Associated.pow_pow [CommMonoid α] {a b : α} {n : ℕ} (h : a ~ᵤ b) : a ^ n ~ᵤ b ^ n
-- Mathlib/Algebra/Polynomial/Module/Basic.lean
theorem comp_smul (p p' : R[X]) (q : PolynomialModule R M) :
    comp p (p' • q) = p'.comp p • comp p q
-- Mathlib/AlgebraicGeometry/Spec.lean
@[simp]
theorem Spec.topMap_id (R : CommRingCat.{u}) : Spec.topMap (𝟙 R) = 𝟙 (Spec.topObj R)
-- Mathlib/Data/List/Perm.lean
theorem getElem_permutations'Aux (s : List α) (x : α) (n : ℕ)
    (hn : n < length (permutations'Aux x s)) :
    (permutations'Aux x s)[n] = s.insertNth n x
-- Mathlib/Order/Partition/Finpartition.lean
@[simp]
theorem parts_inf (P Q : Finpartition a) :
    (P ⊓ Q).parts = ((P.parts ×ˢ Q.parts).image fun bc : α × α ↦ bc.1 ⊓ bc.2).erase ⊥
-- Mathlib/Algebra/BigOperators/Intervals.lean
@[to_additive]
lemma mul_prod_Ico_eq_prod_Icc (h : a ≤ b) : f b * ∏ x ∈ Ico a b, f x = ∏ x ∈ Icc a b, f x
-- Mathlib/Topology/Bornology/Constructions.lean
theorem isBounded_prod : IsBounded (s ×ˢ t) ↔ s = ∅ ∨ t = ∅ ∨ IsBounded s ∧ IsBounded t
-- Mathlib/Combinatorics/SimpleGraph/Basic.lean
theorem adj_iff_exists_edge_coe : G.Adj a b ↔ ∃ e : G.edgeSet, e.val = s(a, b)
-- Mathlib/LinearAlgebra/Matrix/Charpoly/Coeff.lean
theorem matPolyEquiv_eval_eq_map (M : Matrix n n R[X]) (r : R) :
    (matPolyEquiv M).eval (scalar n r) = M.map (eval r)
-- Mathlib/GroupTheory/OrderOfElement.lean
@[to_additive (attr := simp)]
theorem injective_zpow_iff_not_isOfFinOrder : (Injective fun n : ℤ => x ^ n) ↔ ¬IsOfFinOrder x
-- .lake/packages/batteries/Batteries/Data/Nat/Gcd.lean
theorem Coprime.gcd_mul_right_cancel_right (n : Nat)
    (H : Coprime k m) : gcd m (n * k) = gcd m n
-- Mathlib/Algebra/Lie/Semisimple/Basic.lean
theorem abelian_radical_of_hasTrivialRadical [HasTrivialRadical R L] :
    IsLieAbelian (radical R L)
-- Mathlib/Topology/UniformSpace/Basic.lean
/-- If `s ∈ 𝓤 α`, then for any natural `n`, for a subset `t` of a sufficiently small set in `𝓤 α`,
we have `t ○ t ○ ... ○ t ⊆ s` (`n` compositions). -/
theorem eventually_uniformity_iterate_comp_subset {s : Set (α × α)} (hs : s ∈ 𝓤 α) (n : ℕ) :
    ∀ᶠ t in (𝓤 α).smallSets, (t ○ ·)^[n] t ⊆ s
-- Mathlib/Order/SuccPred/Relation.lean
/-- For `n < m`, `(n, m)` is in the transitive closure of a relation `~` if `i ~ succ i`
  for all `i` between `n` and `m`. -/
theorem transGen_of_succ_of_lt (r : α → α → Prop) {n m : α} (h : ∀ i ∈ Ico n m, r i (succ i))
    (hnm : n < m) : TransGen r n m
-- Mathlib/Order/Interval/Finset/Basic.lean
theorem right_mem_Ioc : b ∈ Ioc a b ↔ a < b
-- Mathlib/Order/Monotone/Monovary.lean
protected theorem MonotoneOn.antivaryOn (hf : MonotoneOn f s) (hg : AntitoneOn g s) :
    AntivaryOn f g s
-- Mathlib/RingTheory/IsAdjoinRoot.lean
/-- `IsAdjoinRoot S f` states that the ring `S` can be constructed by adjoining a specified root
of the polynomial `f : R[X]` to `R`.

Compare `PowerBasis R S`, which does not explicitly specify which polynomial we adjoin a root of
(in particular `f` does not need to be the minimal polynomial of the root we adjoin),
and `AdjoinRoot` which constructs a new type.

This is not a typeclass because the choice of root given `S` and `f` is not unique.
-/
-- Porting note(#5171): this linter isn't ported yet.
-- @[nolint has_nonempty_instance]
structure IsAdjoinRoot {R : Type u} (S : Type v) [CommSemiring R] [Semiring S] [Algebra R S]
    (f : R[X]) : Type max u v where
  map : R[X] →+* S
  map_surjective : Function.Surjective map
  ker_map : RingHom.ker map = Ideal.span {f}
  algebraMap_eq : algebraMap R S = map.comp Polynomial.C
-- Mathlib/LinearAlgebra/QuadraticForm/TensorProduct/Isometries.lean
@[simp] lemma tensorLId_apply (Q₂ : QuadraticForm R M₂) (x : R ⊗[R] M₂) :
    tensorLId Q₂ x = TensorProduct.lid R M₂ x
-- Mathlib/Data/NNReal/Basic.lean
theorem mul_iSup (f : ι → ℝ≥0) (a : ℝ≥0) : (a * ⨆ i, f i) = ⨆ i, a * f i
-- Mathlib/Order/Circular.lean
@[simp]
theorem mem_cIcc {a b x : α} : x ∈ cIcc a b ↔ btw a x b
-- Mathlib/Algebra/Group/Basic.lean
@[to_additive (attr := simp) zsmul_sub]
lemma div_zpow (a b : α) (n : ℤ) : (a / b) ^ n = a ^ n / b ^ n
-- Mathlib/CategoryTheory/Sites/EffectiveEpimorphic.lean
theorem Sieve.effectiveEpimorphic_singleton {X Y : C} (f : Y ⟶ X) :
    (Presieve.singleton f).EffectiveEpimorphic ↔ (EffectiveEpi f)
-- Mathlib/Order/Interval/Set/Basic.lean
/-- We cannot replace `<` by `≤` in the hypotheses.
Otherwise for `b < a = d < c` the l.h.s. is `∅` and the r.h.s. is `{a}`.
-/
theorem Icc_union_Icc (h₁ : min a b < max c d) (h₂ : min c d < max a b) :
    Icc a b ∪ Icc c d = Icc (min a c) (max b d)
-- Mathlib/Analysis/CstarAlgebra/ContinuousFunctionalCalculus/Unique.lean
lemma toContinuousMapHom_toNNReal (f : C(X, ℝ)₀) :
    (toContinuousMapHom (X := X) (R := ℝ) f).toNNReal =
      toContinuousMapHom (X := X) (R := ℝ≥0) f.toNNReal
-- Mathlib/Data/Fin/Basic.lean
/-- The range of `p.succAbove` is everything except `p`. -/
@[simp] lemma range_succAbove (p : Fin (n + 1)) : Set.range p.succAbove = {p}ᶜ
-- Mathlib/CategoryTheory/Monoidal/Preadditive.lean
theorem sum_tensor {P Q R S : C} {J : Type*} (s : Finset J) (f : P ⟶ Q) (g : J → (R ⟶ S)) :
    (∑ j ∈ s, g j) ⊗ f = ∑ j ∈ s, g j ⊗ f
-- Mathlib/Order/Lattice.lean
theorem sup_inf_le : a ⊔ b ⊓ c ≤ (a ⊔ b) ⊓ (a ⊔ c)
-- Mathlib/Combinatorics/SimpleGraph/Connectivity/Subgraph.lean
lemma start_mem_verts_toSubgraph (p : G.Walk u v) : u ∈ p.toSubgraph.verts
-- Mathlib/Data/Option/Basic.lean
lemma forall_some_ne_iff_eq_none {o : Option α} : (∀ (x : α), some x ≠ o) ↔ o = none
-- Mathlib/Order/Filter/EventuallyConst.lean
@[to_additive (attr := simp)]
theorem mulIndicator_const_iff :
    EventuallyConst (s.mulIndicator fun _ ↦ c) l ↔ c = 1 ∨ EventuallyConst s l
-- .lake/packages/lean4/src/lean/Init/Data/Array/Lemmas.lean
@[simp] theorem size_ofFn_go {n} (f : Fin n → α) (i acc) :
    (ofFn.go f i acc).size = acc.size + (n - i)
-- Mathlib/GroupTheory/GroupAction/DomAct/Basic.lean
@[simp]
theorem mk_smul_monoidHom_apply (c : M) (f : A →* B) (a : A) : (mk c • f) a = f (c • a)
-- Mathlib/GroupTheory/Perm/Cycle/Factors.lean
@[simp]
theorem cycleOf_apply_self (f : Perm α) [DecidableRel f.SameCycle] (x : α) : cycleOf f x x = f x
-- Mathlib/MeasureTheory/Measure/Typeclasses.lean
theorem measure_Ioo_lt_top : μ (Ioo a b) < ∞
-- Mathlib/Data/Matrix/Kronecker.lean
theorem kroneckerMap_smul_left [SMul R α] [SMul R γ] (f : α → β → γ) (r : R)
    (hf : ∀ a b, f (r • a) b = r • f a b) (A : Matrix l m α) (B : Matrix n p β) :
    kroneckerMap f (r • A) B = r • kroneckerMap f A B
-- Mathlib/Geometry/Manifold/ContMDiff/Product.lean
theorem contMDiffOn_pi_space :
    ContMDiffOn I 𝓘(𝕜, ∀ i, Fi i) n φ s ↔ ∀ i, ContMDiffOn I 𝓘(𝕜, Fi i) n (fun x => φ x i) s
-- Mathlib/NumberTheory/Modular.lean
theorem g_eq_of_c_eq_one (hc : (↑ₘg) 1 0 = 1) : g = T ^ (↑ₘg) 0 0 * S * T ^ (↑ₘg) 1 1
-- Mathlib/RingTheory/Perfection.lean
theorem preVal_mk {x : O} (hx : (Ideal.Quotient.mk _ x : ModP K v O hv p) ≠ 0) :
    preVal K v O hv p (Ideal.Quotient.mk _ x) = v (algebraMap O K x)
-- Mathlib/NumberTheory/MulChar/Lemmas.lean
/-- The non-zero values of a multiplicative character `χ` such that `χ^n = 1`
are `n`th roots of unity. -/
lemma apply_mem_rootsOfUnity_of_pow_eq_one {χ : MulChar F R} {n : ℕ} (hn : n ≠ 0) (hχ : χ ^ n = 1)
    {a : F} (ha : a ≠ 0) :
    ∃ ζ ∈ rootsOfUnity ⟨n, Nat.pos_of_ne_zero hn⟩ R, ζ = χ a
-- Mathlib/Geometry/Euclidean/Angle/Oriented/Basic.lean
/-- A base angle of an isosceles triangle is acute, oriented vector angle form. -/
theorem abs_oangle_sub_left_toReal_lt_pi_div_two {x y : V} (h : ‖x‖ = ‖y‖) :
    |(o.oangle (y - x) y).toReal| < π / 2
-- Mathlib/Topology/Connected/Basic.lean
theorem IsPreconnected.prod [TopologicalSpace β] {s : Set α} {t : Set β} (hs : IsPreconnected s)
    (ht : IsPreconnected t) : IsPreconnected (s ×ˢ t)
-- Mathlib/Data/Multiset/Basic.lean
theorem empty_or_exists_mem (s : Multiset α) : s = 0 ∨ ∃ a, a ∈ s
-- Mathlib/Data/Nat/Factorization/Basic.lean
/-- Two positive naturals are equal if their prime padic valuations are equal -/
theorem eq_iff_prime_padicValNat_eq (a b : ℕ) (ha : a ≠ 0) (hb : b ≠ 0) :
    a = b ↔ ∀ p : ℕ, p.Prime → padicValNat p a = padicValNat p b
-- Mathlib/Data/Multiset/Powerset.lean
@[simp]
theorem powerset_coe' (l : List α) : @powerset α l = ((sublists' l).map (↑) : List (Multiset α))
-- Mathlib/RingTheory/PrimeSpectrum.lean
@[simp]
theorem zeroLocus_singleton_pow (f : R) (n : ℕ) (hn : 0 < n) :
    zeroLocus ({f ^ n} : Set R) = zeroLocus {f}
-- Mathlib/NumberTheory/NumberField/CanonicalEmbedding/ConvexBody.lean
theorem convexBodyLT'_mem {x : K} :
    mixedEmbedding K x ∈ convexBodyLT' K f w₀ ↔
      (∀ w : InfinitePlace K, w ≠ w₀ → w x < f w) ∧
      |(w₀.val.embedding x).re| < 1 ∧ |(w₀.val.embedding x).im| < (f w₀ : ℝ) ^ 2
-- Mathlib/NumberTheory/LegendreSymbol/GaussEisensteinLemmas.lean
private theorem gauss_lemma_aux₁ (p : ℕ) [Fact p.Prime] {a : ℤ}
    (hap : (a : ZMod p) ≠ 0) : (a ^ (p / 2) * (p / 2)! : ZMod p) =
    (-1 : ZMod p) ^ ((Ico 1 (p / 2).succ).filter fun x : ℕ =>
      ¬(a * x : ZMod p).val ≤ p / 2).card * (p / 2)!
-- Mathlib/NumberTheory/DiophantineApproximation.lean
/-- The zeroth convergent of `ξ` is `⌊ξ⌋`. -/
@[simp]
theorem convergent_zero (ξ : ℝ) : ξ.convergent 0 = ⌊ξ⌋
-- Mathlib/MeasureTheory/Constructions/Prod/Basic.lean
theorem quasiMeasurePreserving_snd : QuasiMeasurePreserving Prod.snd (μ.prod ν) ν
-- Mathlib/Geometry/Manifold/ContMDiffMFDeriv.lean
protected theorem mdifferentiableAt (f : C^∞⟮I, M; I', M'⟯) {x} : MDifferentiableAt I I' f x
-- Mathlib/Algebra/Category/ModuleCat/ChangeOfRings.lean
theorem smul_apply (M : ModuleCat R) (g : (coextendScalars f).obj M) (s s' : S) :
    (s • g) s' = g (s' * s)
-- Mathlib/Topology/MetricSpace/Infsep.lean
theorem Finite.relatively_discrete (hs : s.Finite) :
    ∃ C > 0, ∀ x ∈ s, ∀ y ∈ s, x ≠ y → C ≤ edist x y
-- Mathlib/Order/Fin/Basic.lean
/--  `Fin.succAbove p` as an `OrderEmbedding`. -/
@[simps! apply toEmbedding]
def succAboveOrderEmb (p : Fin (n + 1)) : Fin n ↪o Fin (n + 1)
-- Mathlib/Algebra/Order/Group/PosPart.lean
@[to_additive] lemma inv_le_leOnePart (a : α) : a⁻¹ ≤ a⁻ᵐ
-- Mathlib/Analysis/NormedSpace/Multilinear/Curry.lean
@[simp]
theorem continuousMultilinearCurryRightEquiv_apply' (f : G[×n]→L[𝕜] G →L[𝕜] G')
    (v : Fin (n + 1) → G) :
    continuousMultilinearCurryRightEquiv' 𝕜 n G G' f v = f (init v) (v (last n))
-- Mathlib/Algebra/Order/Sub/Canonical.lean
theorem tsub_inj_left (h₁ : a ≤ b) (h₂ : a ≤ c) : b - a = c - a → b = c
-- Mathlib/GroupTheory/Coset.lean
@[to_additive leftAddCoset_rightAddCoset]
theorem leftCoset_rightCoset (s : Set α) (a b : α) : op b • a • s = a • (op b • s)
-- Mathlib/Computability/AkraBazzi/AkraBazzi.lean
@[aesop safe apply]
lemma T_nonneg (n : ℕ) : 0 ≤ T n
-- Mathlib/LinearAlgebra/FreeModule/PID.lean
theorem Submodule.basisOfPid_bot {ι : Type*} [Finite ι] (b : Basis ι R M) :
    Submodule.basisOfPid b ⊥ = ⟨0, Basis.empty _⟩
-- Mathlib/Algebra/Polynomial/Laurent.lean
theorem _root_.Polynomial.toLaurent_injective :
    Function.Injective (Polynomial.toLaurent : R[X] → R[T;T⁻¹])