ruc-ai4math/mathlib_handler_benchmark_410 huggingface dataset:
-- Mathlib/NumberTheory/Zsqrtd/Basic.lean
@[simp]
theorem natCast_im (n : ℕ) : (n : ℤ√d).im = 0
-- Mathlib/Order/Interval/Finset/Fin.lean
@[simp]
theorem map_valEmbedding_Ioo : (Ioo a b).map Fin.valEmbedding = Ioo ↑a ↑b
-- Mathlib/Combinatorics/Configuration.lean
theorem HasPoints.lineCount_le_pointCount [HasPoints P L] {p : P} {l : L} (h : p ∉ l)
    [hf : Finite { p : P // p ∈ l }] : lineCount L p ≤ pointCount P l
-- Mathlib/Order/Cover.lean
theorem CovBy.trans_antisymmRel (hab : a ⋖ b) (hbc : AntisymmRel (· ≤ ·) b c) : a ⋖ c
-- Mathlib/AlgebraicGeometry/EllipticCurve/Jacobian.lean
lemma dblX_of_Z_eq_zero {P : Fin 3 → R} (hP : W'.Equation P) (hPz : P z = 0) :
    W'.dblX P = (P x ^ 2) ^ 2
-- Mathlib/Algebra/CharP/Two.lean
@[simp]
theorem add_self_eq_zero (x : R) : x + x = 0
-- Mathlib/Data/DFinsupp/Lex.lean
theorem lt_of_forall_lt_of_lt (a b : Lex (Π₀ i, α i)) (i : ι) :
    (∀ j < i, ofLex a j = ofLex b j) → ofLex a i < ofLex b i → a < b
-- Mathlib/Data/List/Lex.lean
theorem nil_left_or_eq_nil {r : α → α → Prop} (l : List α) : List.Lex r [] l ∨ l = []
-- Mathlib/MeasureTheory/Function/StronglyMeasurable/Basic.lean
@[simp]
theorem Subsingleton.aestronglyMeasurable {_ : MeasurableSpace α} [TopologicalSpace β]
    [Subsingleton β] {μ : Measure α} (f : α → β) : AEStronglyMeasurable f μ
-- Mathlib/Combinatorics/Enumerative/Composition.lean
theorem getElem_splitWrtComposition (l : List α) (c : Composition n)
    (i : Nat) (h : i < (l.splitWrtComposition c).length) :
    (l.splitWrtComposition c)[i] = (l.take (c.sizeUpTo (i + 1))).drop (c.sizeUpTo i)
-- Mathlib/Algebra/Group/Opposite.lean
/-- The function `MulOpposite.op` is an additive equivalence. -/
@[simps! (config := { fullyApplied := false, simpRhs := true }) apply symm_apply]
def opAddEquiv [Add α] : α ≃+ αᵐᵒᵖ
-- Mathlib/Topology/Algebra/Algebra.lean
theorem comp_assoc {D : Type*} [Semiring D] [Algebra R D] [TopologicalSpace D] (h : C →A[R] D)
    (g : B →A[R] C) (f : A →A[R] B) : (h.comp g).comp f = h.comp (g.comp f)
-- Mathlib/Data/Nat/ModEq.lean
lemma eq_of_lt_of_lt (h : a ≡ b [MOD m]) (ha : a < m) (hb : b < m) : a = b
-- Mathlib/Algebra/Homology/ShortComplex/Preadditive.lean
/-- Given a left homology map data for morphism `φ`, this is the induced left homology
map data for `-φ`. -/
@[simps]
def neg : LeftHomologyMapData (-φ) h₁ h₂
-- .lake/packages/lean4/src/lean/Init/Data/BitVec/Lemmas.lean
@[simp, bv_toNat] theorem toNat_neg (x : BitVec n) : (- x).toNat = (2^n - x.toNat) % 2^n
-- Mathlib/Analysis/LocallyConvex/Bounded.lean
/-- The union of two bounded sets is bounded. -/
theorem IsVonNBounded.union {s₁ s₂ : Set E} (hs₁ : IsVonNBounded 𝕜 s₁) (hs₂ : IsVonNBounded 𝕜 s₂) :
    IsVonNBounded 𝕜 (s₁ ∪ s₂)
-- Mathlib/RingTheory/Polynomial/Pochhammer.lean
theorem descPochhammer_zero_eval_zero : (descPochhammer R 0).eval 0 = 1
-- Mathlib/Analysis/Calculus/ContDiff/Defs.lean
theorem HasFTaylorSeriesUpTo.ofLe (h : HasFTaylorSeriesUpTo n f p) (hmn : m ≤ n) :
    HasFTaylorSeriesUpTo m f p
-- Mathlib/Topology/MetricSpace/Pseudo/Defs.lean
@[simp] theorem mem_closedBall : y ∈ closedBall x ε ↔ dist y x ≤ ε
-- Mathlib/Probability/Moments.lean
theorem iIndepFun.mgf_sum [IsProbabilityMeasure μ] {X : ι → Ω → ℝ}
    (h_indep : iIndepFun (fun i => inferInstance) X μ) (h_meas : ∀ i, Measurable (X i))
    (s : Finset ι) : mgf (∑ i ∈ s, X i) μ t = ∏ i ∈ s, mgf (X i) μ t
-- Mathlib/Combinatorics/Enumerative/Composition.lean
theorem lt_length' (i : Fin c.length) : (i : ℕ) < c.boundaries.card
-- Mathlib/Algebra/GroupWithZero/Invertible.lean
@[simp]
theorem mul_inv_cancel_of_invertible (a : α) [Invertible a] : a * a⁻¹ = 1
-- Mathlib/Topology/MetricSpace/PartitionOfUnity.lean
/-- Let `K : ι → Set X` be a locally finite family of closed sets in an emetric space. Let
`U : ι → Set X` be a family of open sets such that `K i ⊆ U i` for all `i`. Then for any point
`x : X`, for sufficiently small `r : ℝ≥0∞` and for `y` sufficiently close to `x`, for all `i`, if
`y ∈ K i`, then `EMetric.closedBall y r ⊆ U i`. -/
theorem eventually_nhds_zero_forall_closedBall_subset (hK : ∀ i, IsClosed (K i))
    (hU : ∀ i, IsOpen (U i)) (hKU : ∀ i, K i ⊆ U i) (hfin : LocallyFinite K) (x : X) :
    ∀ᶠ p : ℝ≥0∞ × X in 𝓝 0 ×ˢ 𝓝 x, ∀ i, p.2 ∈ K i → closedBall p.2 p.1 ⊆ U i
-- Mathlib/Topology/Algebra/InfiniteSum/Module.lean
theorem Summable.const_smul (b : γ) (hf : Summable f) : Summable fun i ↦ b • f i
-- Mathlib/ModelTheory/Satisfiability.lean
theorem Model.isSatisfiable (M : Type w) [Nonempty M] [L.Structure M] [M ⊨ T] :
    T.IsSatisfiable
-- Mathlib/MeasureTheory/OuterMeasure/Caratheodory.lean
theorem le_sum_caratheodory {ι} (m : ι → OuterMeasure α) :
    ⨅ i, (m i).caratheodory ≤ (sum m).caratheodory
-- Mathlib/Data/Nat/GCD/Basic.lean
theorem Coprime.dvd_mul_left {m n k : ℕ} (H : Coprime k m) : k ∣ m * n ↔ k ∣ n
-- Mathlib/Algebra/Order/CauSeq/Basic.lean
theorem const_equiv {x y : β} : const x ≈ const y ↔ x = y
-- Mathlib/Analysis/Calculus/Deriv/Mul.lean
theorem deriv_const_mul_field (u : 𝕜') : deriv (fun y => u * v y) x = u * deriv v x
-- .lake/packages/lean4/src/lean/Init/Data/Nat/Basic.lean
theorem le_pred_of_lt (h : n < m) : n ≤ pred m
-- Mathlib/Analysis/SpecialFunctions/CompareExp.lean
theorem of_isBigO_im_re_rpow (hre : Tendsto re l atTop) (r : ℝ) (hr : im =O[l] fun z => z.re ^ r) :
    IsExpCmpFilter l
-- Mathlib/Topology/Order/OrderClosed.lean
protected theorem Filter.Tendsto.min {b : Filter β} {a₁ a₂ : α} (hf : Tendsto f b (𝓝 a₁))
    (hg : Tendsto g b (𝓝 a₂)) : Tendsto (fun b => min (f b) (g b)) b (𝓝 (min a₁ a₂))
-- Mathlib/Algebra/Ring/Rat.lean
@[simp] lemma mkRat_pow (num den : ℕ) (n : ℕ) : mkRat num den ^ n = mkRat (num ^ n) (den ^ n)
-- Mathlib/CategoryTheory/Limits/Preserves/Ulift.lean
lemma descSet_empty : descSet hc (∅ : Set lc.pt) = ∅
-- Mathlib/RingTheory/Valuation/ValuationRing.lean
theorem _root_.Function.Surjective.valuationRing {R S : Type*} [CommRing R] [IsDomain R]
    [ValuationRing R] [CommRing S] [IsDomain S] (f : R →+* S) (hf : Function.Surjective f) :
    ValuationRing S
-- Mathlib/Dynamics/Circle/RotationNumber/TranslationNumber.lean
theorem lt_map_map_zero : f 0 + g 0 - 1 < f (g 0)
-- Mathlib/Data/Fin/Tuple/Basic.lean
theorem contractNth_apply_of_gt (j : Fin (n + 1)) (op : α → α → α) (g : Fin (n + 1) → α) (k : Fin n)
    (h : (j : ℕ) < k) : contractNth j op g k = g k.succ
-- Mathlib/NumberTheory/Padics/PadicIntegers.lean
@[simp]
theorem pow_p_dvd_int_iff (n : ℕ) (a : ℤ) : (p : ℤ_[p]) ^ n ∣ a ↔ (p ^ n : ℤ) ∣ a
-- Mathlib/AlgebraicGeometry/ProjectiveSpectrum/Topology.lean
theorem zeroLocus_iSup_ideal {γ : Sort*} (I : γ → Ideal A) :
    zeroLocus _ ((⨆ i, I i : Ideal A) : Set A) = ⋂ i, zeroLocus 𝒜 (I i)
-- Mathlib/Order/CompleteLattice.lean
theorem disjoint_sSup_left {a : Set α} {b : α} (d : Disjoint (sSup a) b) {i} (hi : i ∈ a) :
    Disjoint i b
-- Mathlib/Topology/Order/Lattice.lean
@[continuity]
theorem continuous_inf [Inf L] [ContinuousInf L] : Continuous fun p : L × L => p.1 ⊓ p.2
-- Mathlib/Algebra/BigOperators/Group/Multiset.lean
@[to_additive (attr := simp)]
theorem prod_singleton (a : α) : prod {a} = a
-- Mathlib/Probability/Martingale/BorelCantelli.lean
theorem process_zero : process s 0 = 0
-- Mathlib/Order/PiLex.lean
@[simp]
theorem lt_toLex_update_self_iff : toLex x < toLex (update x i a) ↔ x i < a
-- Mathlib/Analysis/Convex/StrictConvexBetween.lean
@[simp] lemma coe_affineIsometryOfStrictConvexSpace (hi : Isometry f) :
    ⇑hi.affineIsometryOfStrictConvexSpace = f
-- Mathlib/RingTheory/FractionalIdeal/Operations.lean
/-- `spanSingleton x` is the fractional ideal generated by `x` if `0 ∉ S` -/
irreducible_def spanSingleton (x : P) : FractionalIdeal S P
-- Mathlib/NumberTheory/MulChar/Basic.lean
/-- If `χ` is a multiplicative character on a commutative monoid `M` with finitely many units,
then `χ ^ #Mˣ = 1`. -/
protected lemma pow_card_eq_one [Fintype Mˣ] (χ : MulChar M R) : χ ^ (Fintype.card Mˣ) = 1
-- Mathlib/Algebra/MvPolynomial/Variables.lean
theorem vars_add_subset [DecidableEq σ] (p q : MvPolynomial σ R) :
    (p + q).vars ⊆ p.vars ∪ q.vars
-- Mathlib/Order/Heyting/Basic.lean
/-- `p → q → r ↔ p ∧ q → r` -/
theorem himp_himp (a b c : α) : a ⇨ b ⇨ c = a ⊓ b ⇨ c
-- Mathlib/Order/Interval/Finset/Defs.lean
@[simp] lemma toFinset_Ico (a b : α) [Fintype (Ico a b)] : (Ico a b).toFinset = Finset.Ico a b
-- Mathlib/Data/PNat/Factors.lean
theorem factorMultiset_mul (n m : ℕ+) :
    factorMultiset (n * m) = factorMultiset n + factorMultiset m
-- Mathlib/Analysis/SpecialFunctions/Gamma/Basic.lean
@[simp]
theorem Gamma_one : Gamma 1 = 1
-- Mathlib/Topology/Connected/PathConnected.lean
theorem IsOpen.isConnected_iff_isPathConnected [LocPathConnectedSpace X] {U : Set X}
    (U_op : IsOpen U) : IsPathConnected U ↔ IsConnected U
-- Mathlib/Topology/UniformSpace/Basic.lean
lemma uniformSpace_eq_bot {u : UniformSpace α} : u = ⊥ ↔ idRel ∈ 𝓤[u]
-- Mathlib/Combinatorics/SimpleGraph/Walk.lean
@[simp]
theorem support_ne_nil {u v : V} (p : G.Walk u v) : p.support ≠ []
-- Mathlib/Algebra/Module/LinearMap/Defs.lean
@[simp]
theorem restrictScalars_smul (c : R₁) (f : M →ₗ[S] N) :
    (c • f).restrictScalars R = c • f.restrictScalars R
-- Mathlib/Algebra/DualNumber.lean
/-- When applied to `inl`, `DualNumber.lift` applies the map `f : A →ₐ[R] B`. -/
@[simp] theorem lift_apply_inl (fe : {fe : (A →ₐ[R] B) × B // _}) (a : A) :
    lift fe (inl a : A[ε]) = fe.val.1 a
-- Mathlib/GroupTheory/Exponent.lean
/--
If there exists a multiplication-preserving equivalence between `G` and `H`,
then the exponent of `G` is equal to the exponent of `H`.
-/
@[to_additive "If there exists a addition-preserving equivalence between `G` and `H`,
then the exponent of `G` is equal to the exponent of `H`."]
theorem exponent_eq_of_mulEquiv (e : G ≃* H) : Monoid.exponent G = Monoid.exponent H
-- Mathlib/ModelTheory/Substructures.lean
theorem map_surjective_of_surjective : Function.Surjective (map f)
-- Mathlib/MeasureTheory/Integral/IntegrableOn.lean
theorem IntegrableAtFilter.inf_of_right (hl : IntegrableAtFilter f l μ) :
    IntegrableAtFilter f (l' ⊓ l) μ
-- .lake/packages/lean4/src/lean/Init/Data/Fin/Lemmas.lean
@[simp] theorem last_le_iff {n : Nat} {k : Fin (n + 1)} : last n ≤ k ↔ k = last n
-- Mathlib/Topology/Algebra/Module/Basic.lean
@[simp] -- @[norm_cast] -- Porting note: A theorem with this can't have a rhs starting with `↑`.
theorem _root_.Submodule.subtypeL_apply (p : Submodule R₁ M₁) (x : p) : p.subtypeL x = x
-- Mathlib/Analysis/InnerProductSpace/Basic.lean
/-- The inner product of a linear combination of a set of orthonormal vectors with one of those
vectors picks out the coefficient of that vector. -/
theorem Orthonormal.inner_right_fintype [Fintype ι] {v : ι → E} (hv : Orthonormal 𝕜 v) (l : ι → 𝕜)
    (i : ι) : ⟪v i, ∑ i : ι, l i • v i⟫ = l i
-- Mathlib/Order/RelIso/Basic.lean
@[simp]
theorem coe_fn_toFun (f : r →r s) : f.toFun = (f : α → β)
-- Mathlib/RingTheory/AdicCompletion/AsTensorProduct.lean
private lemma firstRow_exact : (firstRow I M f).Exact
-- Mathlib/GroupTheory/CosetCover.lean
/-- If `H` is a subgroup of `G` and `G` is the union of a finite family of left cosets of `H`
then `H` has finite index. -/
@[to_additive]
theorem finiteIndex_of_leftCoset_cover_const : H.FiniteIndex
-- Mathlib/Analysis/Calculus/FDeriv/Basic.lean
protected theorem HasCompactSupport.fderiv (hf : HasCompactSupport f) :
    HasCompactSupport (fderiv 𝕜 f)
-- Mathlib/RingTheory/LocalRing/ResidueField/Basic.lean
theorem map_residue (f : R →+* S) [IsLocalRingHom f] (r : R) :
    ResidueField.map f (residue R r) = residue S (f r)
-- Mathlib/Algebra/BigOperators/Group/Finset.lean
@[simp]
lemma mem_sum {s : Finset ι} {m : ι → Multiset α} : a ∈ ∑ i ∈ s, m i ↔ ∃ i ∈ s, a ∈ m i
-- Mathlib/Analysis/InnerProductSpace/Basic.lean
/-- Formula for the distance between the images of two nonzero points under an inversion with center
zero. See also `EuclideanGeometry.dist_inversion_inversion` for inversions around a general
point. -/
theorem dist_div_norm_sq_smul {x y : F} (hx : x ≠ 0) (hy : y ≠ 0) (R : ℝ) :
    dist ((R / ‖x‖) ^ 2 • x) ((R / ‖y‖) ^ 2 • y) = R ^ 2 / (‖x‖ * ‖y‖) * dist x y
-- Mathlib/Analysis/Calculus/Deriv/Add.lean
nonrec theorem HasStrictDerivAt.add (hf : HasStrictDerivAt f f' x) (hg : HasStrictDerivAt g g' x) :
    HasStrictDerivAt (fun y => f y + g y) (f' + g') x
-- Mathlib/MeasureTheory/Integral/IntegralEqImproper.lean
/-- If `f` is integrable on intervals `Ioc a (b i)`,
where `b i` tends to ∞, and
`∫ x in a .. b i, ‖f x‖ ∂μ` converges to `I : ℝ` along a filter `l`,
then `f` is integrable on the interval (a, ∞) -/
theorem integrableOn_Ioi_of_intervalIntegral_norm_tendsto (I a : ℝ)
    (hfi : ∀ i, IntegrableOn f (Ioc a (b i)) μ) (hb : Tendsto b l atTop)
    (h : Tendsto (fun i => ∫ x in a..b i, ‖f x‖ ∂μ) l (𝓝 <| I)) : IntegrableOn f (Ioi a) μ
-- Mathlib/Topology/MetricSpace/Gluing.lean
theorem glueDist_glued_points [Nonempty Z] (Φ : Z → X) (Ψ : Z → Y) (ε : ℝ) (p : Z) :
    glueDist Φ Ψ ε (.inl (Φ p)) (.inr (Ψ p)) = ε
-- Mathlib/Algebra/Category/MonCat/Basic.lean
@[to_additive (attr := ext)]
lemma ext {X Y : MonCat} {f g : X ⟶ Y} (w : ∀ x : X, f x = g x) : f = g
-- Mathlib/Algebra/Group/TypeTags.lean
@[simp]
theorem ofMul_div [Div α] (x y : α) : ofMul (x / y) = ofMul x - ofMul y
-- Mathlib/Data/List/Zip.lean
theorem get?_zip_eq_some (l₁ : List α) (l₂ : List β) (z : α × β) (i : ℕ) :
    (zip l₁ l₂).get? i = some z ↔ l₁.get? i = some z.1 ∧ l₂.get? i = some z.2
-- .lake/packages/batteries/Batteries/Data/List/Perm.lean
theorem Sublist.subperm {l₁ l₂ : List α} (s : l₁ <+ l₂) : l₁ <+~ l₂
-- .lake/packages/lean4/src/lean/Init/Core.lean
theorem ofBoolUsing_eq_true {p : Prop} {d : Decidable p} (h : toBoolUsing d = true) : p
-- Mathlib/Probability/Martingale/Basic.lean
protected theorem adapted [LE E] (hf : Supermartingale f ℱ μ) : Adapted ℱ f
-- Mathlib/Order/Interval/Set/Image.lean
lemma StrictAnti.image_Iio_subset (h : StrictAnti f) : f '' Iio b ⊆ Ioi (f b)
-- Mathlib/CategoryTheory/Shift/Basic.lean
lemma shiftFunctorZero_hom_app_shift (n : A) :
    (shiftFunctorZero C A).hom.app (X⟦n⟧) =
    (shiftFunctorComm C n 0).hom.app X ≫ ((shiftFunctorZero C A).hom.app X)⟦n⟧'
-- Mathlib/Topology/EMetricSpace/Basic.lean
/-- The diameter is monotonous with respect to inclusion -/
@[gcongr]
theorem diam_mono {s t : Set α} (h : s ⊆ t) : diam s ≤ diam t
-- Mathlib/SetTheory/Ordinal/Basic.lean
theorem enum_lt_enum {r : α → α → Prop} [IsWellOrder α r] {o₁ o₂ : Ordinal} (h₁ : o₁ < type r)
    (h₂ : o₂ < type r) : r (enum r o₁ h₁) (enum r o₂ h₂) ↔ o₁ < o₂
-- Mathlib/SetTheory/Surreal/Basic.lean
theorem not_fuzzy {x y : PGame} (ox : Numeric x) (oy : Numeric y) : ¬Fuzzy x y
-- Mathlib/Util/CompileInductive.lean
@[csimp] private theorem Float.mk_eq : @Float.mk = Float.mkImpl
-- Mathlib/Algebra/Group/Submonoid/Operations.lean
@[to_additive (attr := simp) prod_bot_sup_bot_prod]
theorem prod_bot_sup_bot_prod (s : Submonoid M) (t : Submonoid N) :
    (prod s ⊥) ⊔ (prod ⊥ t) = prod s t
-- Mathlib/Analysis/Normed/Lp/ProdLp.lean
theorem prod_norm_eq_add (hp : 0 < p.toReal) (f : WithLp p (α × β)) :
    ‖f‖ = (‖f.fst‖ ^ p.toReal + ‖f.snd‖ ^ p.toReal) ^ (1 / p.toReal)
-- Mathlib/RingTheory/Polynomial/Basic.lean
/-- The push-forward of an ideal `I` of `R` to `MvPolynomial σ R` via inclusion
 is exactly the set of polynomials whose coefficients are in `I` -/
theorem mem_map_C_iff {I : Ideal R} {f : MvPolynomial σ R} :
    f ∈ (Ideal.map (C : R →+* MvPolynomial σ R) I : Ideal (MvPolynomial σ R)) ↔
      ∀ m : σ →₀ ℕ, f.coeff m ∈ I
-- Mathlib/Data/Set/Lattice.lean
theorem biInter_singleton (a : α) (s : α → Set β) : ⋂ x ∈ ({a} : Set α), s x = s a
-- Mathlib/Algebra/Module/LinearMap/End.lean
@[simp]
theorem mul_apply (f g : Module.End R M) (x : M) : (f * g) x = f (g x)
-- .lake/packages/lean4/src/lean/Init/Data/Nat/Basic.lean
protected theorem le_total (m n : Nat) : m ≤ n ∨ n ≤ m
-- Mathlib/Combinatorics/Additive/ETransform.lean
@[to_additive]
theorem mulDysonETransform.smul_finset_snd_subset_fst :
    e • (mulDysonETransform e x).2 ⊆ (mulDysonETransform e x).1
-- Mathlib/RingTheory/PowerSeries/Inverse.lean
theorem coeff_invOfUnit (n : ℕ) (φ : R⟦X⟧) (u : Rˣ) :
    coeff R n (invOfUnit φ u) =
      if n = 0 then ↑u⁻¹
      else
        -↑u⁻¹ *
          ∑ x ∈ antidiagonal n,
            if x.2 < n then coeff R x.1 φ * coeff R x.2 (invOfUnit φ u) else 0
-- Mathlib/MeasureTheory/MeasurableSpace/Defs.lean
@[simp, measurability]
protected lemma MeasurableSet.bihimp {s₁ s₂ : Set α} (h₁ : MeasurableSet s₁)
    (h₂ : MeasurableSet s₂) : MeasurableSet (s₁ ⇔ s₂)
-- Mathlib/Combinatorics/SetFamily/LYM.lean
theorem falling_zero_subset : falling 0 𝒜 ⊆ {∅}
-- Mathlib/RingTheory/UniqueFactorizationDomain.lean
/-- unique factorization monoids.

These are defined as `CancelCommMonoidWithZero`s with well-founded strict divisibility
relations, but this is equivalent to more familiar definitions:

Each element (except zero) is uniquely represented as a multiset of irreducible factors.
Uniqueness is only up to associated elements.

Each element (except zero) is non-uniquely represented as a multiset
of prime factors.

To define a UFD using the definition in terms of multisets
of irreducible factors, use the definition `of_exists_unique_irreducible_factors`

To define a UFD using the definition in terms of multisets
of prime factors, use the definition `of_exists_prime_factors`

-/
class UniqueFactorizationMonoid (α : Type*) [CancelCommMonoidWithZero α] extends WfDvdMonoid α :
  Prop where
  protected irreducible_iff_prime : ∀ {a : α}, Irreducible a ↔ Prime a
-- Mathlib/Data/ZMod/Basic.lean
theorem valMinAbs_def_pos {n : ℕ} [NeZero n] (x : ZMod n) :
    valMinAbs x = if x.val ≤ n / 2 then (x.val : ℤ) else x.val - n
-- Mathlib/SetTheory/Cardinal/Continuum.lean
@[simp]
theorem continuum_add_self : 𝔠 + 𝔠 = 𝔠
-- Mathlib/Analysis/Convex/Function.lean
theorem StrictConcaveOn.congr (hf : StrictConcaveOn 𝕜 s f) (hfg : EqOn f g s) :
    StrictConcaveOn 𝕜 s g
-- Mathlib/MeasureTheory/Integral/Lebesgue.lean
theorem iSup₂_lintegral_le {ι : Sort*} {ι' : ι → Sort*} (f : ∀ i, ι' i → α → ℝ≥0∞) :
    ⨆ (i) (j), ∫⁻ a, f i j a ∂μ ≤ ∫⁻ a, ⨆ (i) (j), f i j a ∂μ
-- Mathlib/Analysis/Calculus/Taylor.lean
/-- **Taylor's theorem** with the Lagrange form of the remainder.

We assume that `f` is `n+1`-times continuously differentiable in the closed set `Icc x₀ x` and
`n+1`-times differentiable on the open set `Ioo x₀ x`. Then there exists an `x' ∈ Ioo x₀ x` such
that $$f(x) - (P_n f)(x₀, x) = \frac{f^{(n+1)}(x') (x - x₀)^{n+1}}{(n+1)!},$$
where $P_n f$ denotes the Taylor polynomial of degree $n$ and $f^{(n+1)}$ is the $n+1$-th iterated
derivative. -/
theorem taylor_mean_remainder_lagrange {f : ℝ → ℝ} {x x₀ : ℝ} {n : ℕ} (hx : x₀ < x)
    (hf : ContDiffOn ℝ n f (Icc x₀ x))
    (hf' : DifferentiableOn ℝ (iteratedDerivWithin n f (Icc x₀ x)) (Ioo x₀ x)) :
    ∃ x' ∈ Ioo x₀ x, f x - taylorWithinEval f n (Icc x₀ x) x₀ x =
      iteratedDerivWithin (n + 1) f (Icc x₀ x) x' * (x - x₀) ^ (n + 1) / (n + 1)!
-- Mathlib/Algebra/MonoidAlgebra/Division.lean
@[simp]
theorem divOf_apply (g : G) (x : k[G]) (g' : G) : (x /ᵒᶠ g) g' = x (g + g')
-- Mathlib/Analysis/NormedSpace/Int.lean
@[simp]
theorem toNat_add_toNat_neg_eq_nnnorm (n : ℤ) : ↑n.toNat + ↑(-n).toNat = ‖n‖₊
-- Mathlib/LinearAlgebra/LinearPMap.lean
protected theorem sSup_apply {c : Set (E →ₗ.[R] F)} (hc : DirectedOn (· ≤ ·) c) {l : E →ₗ.[R] F}
    (hl : l ∈ c) (x : l.domain) :
    (LinearPMap.sSup c hc) ⟨x, (LinearPMap.le_sSup hc hl).1 x.2⟩ = l x
-- Mathlib/Analysis/Calculus/InverseFunctionTheorem/ContDiff.lean
@[simp]
theorem toPartialHomeomorph_coe {n : ℕ∞} (hf : ContDiffAt 𝕂 n f a)
    (hf' : HasFDerivAt f (f' : E →L[𝕂] F) a) (hn : 1 ≤ n) :
    (hf.toPartialHomeomorph f hf' hn : E → F) = f
-- Mathlib/Data/Set/Finite.lean
theorem finite_isTop (α : Type*) [PartialOrder α] : { x : α | IsTop x }.Finite
-- Mathlib/Algebra/Group/Submonoid/Membership.lean
@[to_additive]
theorem mem_iSup_of_directed {ι} [hι : Nonempty ι] {S : ι → Submonoid M} (hS : Directed (· ≤ ·) S)
    {x : M} : (x ∈ ⨆ i, S i) ↔ ∃ i, x ∈ S i
-- Mathlib/Data/DFinsupp/Interval.lean
theorem card_Ico : (Ico f g).card = (∏ i ∈ f.support ∪ g.support, (Icc (f i) (g i)).card) - 1
-- Mathlib/Logic/Equiv/Defs.lean
@[simp] theorem conj_trans (e₁ : α ≃ β) (e₂ : β ≃ γ) :
    (e₁.trans e₂).conj = e₁.conj.trans e₂.conj
-- Mathlib/Combinatorics/SimpleGraph/Density.lean
theorem interedges_biUnion_left (s : Finset ι) (t : Finset α) (f : ι → Finset α) :
    G.interedges (s.biUnion f) t = s.biUnion fun a ↦ G.interedges (f a) t
-- Mathlib/Topology/Instances/ENNReal.lean
theorem tendsto_nhds_top_iff_nat {m : α → ℝ≥0∞} {f : Filter α} :
    Tendsto m f (𝓝 ∞) ↔ ∀ n : ℕ, ∀ᶠ a in f, ↑n < m a
-- .lake/packages/lean4/src/lean/Init/PropLemmas.lean
theorem exists_imp : ((∃ x, p x) → b) ↔ ∀ x, p x → b
-- Mathlib/LinearAlgebra/LinearPMap.lean
theorem eq_of_eq_graph {f g : E →ₗ.[R] F} (h : f.graph = g.graph) : f = g
-- Mathlib/Algebra/Order/Group/Unbundled/Basic.lean
@[to_additive]
theorem div_le_div_iff_left (a : α) : a / b ≤ a / c ↔ c ≤ b
-- .lake/packages/lean4/src/lean/Init/Data/Int/Order.lean
protected theorem add_pos_of_nonneg_of_pos {a b : Int} (ha : 0 ≤ a) (hb : 0 < b) : 0 < a + b
-- Mathlib/Analysis/Normed/Group/HomCompletion.lean
@[simp]
theorem NormedAddGroupHom.zero_completion : (0 : NormedAddGroupHom G H).completion = 0
-- Mathlib/Analysis/InnerProductSpace/PiL2.lean
@[simp]
theorem _root_.Basis.coe_toOrthonormalBasis (v : Basis ι 𝕜 E) (hv : Orthonormal 𝕜 v) :
    (v.toOrthonormalBasis hv : ι → E) = (v : ι → E)
-- Mathlib/Order/Filter/Basic.lean
theorem frequently_or_distrib_right {f : Filter α} [NeBot f] {p : α → Prop} {q : Prop} :
    (∃ᶠ x in f, p x ∨ q) ↔ (∃ᶠ x in f, p x) ∨ q
-- Mathlib/CategoryTheory/Limits/Final.lean
theorem initial_natIso_iff {F F' : C ⥤ D} (i : F ≅ F') : Initial F ↔ Initial F'
-- Mathlib/Analysis/Calculus/LocalExtr/Basic.lean
/-- If `f` has a local max on `s` at `a`, `f'` is the derivative of `f` at `a` within `s`, and
`y` belongs to the positive tangent cone of `s` at `a`, then `f' y ≤ 0`. -/
theorem IsLocalMaxOn.hasFDerivWithinAt_nonpos (h : IsLocalMaxOn f s a)
    (hf : HasFDerivWithinAt f f' s a) (hy : y ∈ posTangentConeAt s a) : f' y ≤ 0
-- Mathlib/Computability/Partrec.lean
theorem map_decode_iff {f : α → β → σ} :
    (Computable₂ fun a n => (decode (α := β) n).map (f a)) ↔ Computable₂ f
-- Mathlib/AlgebraicTopology/SplitSimplicialObject.lean
@[simp]
theorem id_F (S : Split C) : (𝟙 S : S ⟶ S).F = 𝟙 S.X
-- .lake/packages/lean4/src/lean/Init/Data/BitVec/Lemmas.lean
@[simp] theorem toFin_and (x y : BitVec v) :
    BitVec.toFin (x &&& y) = BitVec.toFin x &&& BitVec.toFin y
-- Mathlib/LinearAlgebra/AffineSpace/Independent.lean
/-- If all but one point of a family are affinely independent, and that point does not lie in
the affine span of that family, the family is affinely independent. -/
theorem AffineIndependent.affineIndependent_of_not_mem_span {p : ι → P} {i : ι}
    (ha : AffineIndependent k fun x : { y // y ≠ i } => p x)
    (hi : p i ∉ affineSpan k (p '' { x | x ≠ i })) : AffineIndependent k p
-- Mathlib/Topology/MetricSpace/Pseudo/Defs.lean
/-- Given a point `x` in a discrete subset `s` of a pseudometric space, there is an open ball
centered at `x` and intersecting `s` only at `x`. -/
theorem exists_ball_inter_eq_singleton_of_mem_discrete [DiscreteTopology s] {x : α} (hx : x ∈ s) :
    ∃ ε > 0, Metric.ball x ε ∩ s = {x}
-- .lake/packages/lean4/src/lean/Init/Data/Int/DivModLemmas.lean
protected theorem div_eq_iff_eq_mul_left {a b c : Int}
    (H : b ≠ 0) (H' : b ∣ a) : a.div b = c ↔ a = c * b
-- Mathlib/CategoryTheory/ConcreteCategory/Bundled.lean
theorem coe_mk (α) (str) : (@Bundled.mk c α str : Type u) = α
-- Mathlib/Data/Set/Function.lean
theorem surjective_iff_surjOn_univ : Surjective f ↔ SurjOn f univ univ
-- Mathlib/Algebra/MvPolynomial/Monad.lean
@[simp]
theorem bind₂_C_left : bind₂ (C : R →+* MvPolynomial σ R) = RingHom.id _
-- .lake/packages/lean4/src/lean/Init/Data/Array/Lemmas.lean
theorem swap_def (a : Array α) (i j : Fin a.size) :
    a.swap i j = (a.set i (a.get j)).set ⟨j.1, by simp [j.2]⟩ (a.get i)