ruc-ai4math/mathlib_handler_benchmark_410 huggingface dataset:
-- Mathlib/Tactic/IntervalCases.lean
theorem le_of_not_le_of_le {hi n lo : α} [LinearOrder α] (h1 : ¬hi ≤ n) (h2 : hi ≤ lo) :
    (n:α) ≤ lo
-- Mathlib/Algebra/MvPolynomial/Degrees.lean
theorem degrees_monomial (s : σ →₀ ℕ) (a : R) : degrees (monomial s a) ≤ toMultiset s
-- Mathlib/Algebra/MvPolynomial/Rename.lean
theorem eval_rename_prod_mk (g : σ × τ → R) (i : σ) (p : MvPolynomial τ R) :
    eval g (rename (Prod.mk i) p) = eval (fun j => g (i, j)) p
-- Mathlib/Dynamics/Circle/RotationNumber/TranslationNumber.lean
/-- If a predicate depends only on `f x - x` and holds for all `0 ≤ x ≤ 1`,
then it holds for all `x`. -/
theorem forall_map_sub_of_Icc (P : ℝ → Prop) (h : ∀ x ∈ Icc (0 : ℝ) 1, P (f x - x)) (x : ℝ) :
    P (f x - x)
-- Mathlib/GroupTheory/Perm/Cycle/Type.lean
@[simp] -- Porting note: new attr
theorem cycleType_eq_zero {σ : Perm α} : σ.cycleType = 0 ↔ σ = 1
-- Mathlib/Order/Filter/Germ/Basic.lean
theorem map_map (op₁ : γ → δ) (op₂ : β → γ) (f : Germ l β) :
    map op₁ (map op₂ f) = map (op₁ ∘ op₂) f
-- Mathlib/MeasureTheory/Group/Prod.lean
@[to_additive (attr := simp)]
theorem measure_inv_null : μ s⁻¹ = 0 ↔ μ s = 0
-- Mathlib/Order/Monotone/Monovary.lean
theorem MonovaryOn.dual_left : MonovaryOn f g s → AntivaryOn (toDual ∘ f) g s
-- Mathlib/Order/Filter/Basic.lean
lemma frequently_iff_neBot {l : Filter α} {p : α → Prop} :
    (∃ᶠ x in l, p x) ↔ NeBot (l ⊓ 𝓟 {x | p x})
-- Mathlib/Analysis/Analytic/Composition.lean
/-- The `0`-th coefficient of `q.comp p` is `q 0`. Since these maps are multilinear maps in zero
variables, but on different spaces, we can not state this directly, so we state it when applied to
arbitrary vectors (which have to be the zero vector). -/
theorem comp_coeff_zero (q : FormalMultilinearSeries 𝕜 F G) (p : FormalMultilinearSeries 𝕜 E F)
    (v : Fin 0 → E) (v' : Fin 0 → F) : (q.comp p) 0 v = q 0 v'
-- Mathlib/Analysis/Analytic/Composition.lean
/-- Rewriting equality in the dependent type
`Σ (c : composition n), Π (i : fin c.length), composition (c.blocks_fun i)` in
non-dependent terms with lists, requiring that the lists of blocks coincide. -/
theorem sigma_pi_composition_eq_iff
    (u v : Σ c : Composition n, ∀ i : Fin c.length, Composition (c.blocksFun i)) :
    u = v ↔ (ofFn fun i => (u.2 i).blocks) = ofFn fun i => (v.2 i).blocks
-- Mathlib/Analysis/NormedSpace/AddTorsor.lean
@[simp]
theorem nndist_self_homothety (p₁ p₂ : P) (c : 𝕜) :
    nndist p₂ (homothety p₁ c p₂) = ‖1 - c‖₊ * nndist p₁ p₂
-- Mathlib/CategoryTheory/Limits/Shapes/Biproducts.lean
/-- Given a pair of isomorphisms between the summands of a pair of binary biproducts,
we obtain an isomorphism between the binary biproducts. -/
@[simps]
def biprod.mapIso {W X Y Z : C} [HasBinaryBiproduct W X] [HasBinaryBiproduct Y Z] (f : W ≅ Y)
    (g : X ≅ Z) : W ⊞ X ≅ Y ⊞ Z
-- Mathlib/Data/Finset/Basic.lean
@[simp]
theorem mk_zero : (⟨0, nodup_zero⟩ : Finset α) = ∅
-- Mathlib/MeasureTheory/Function/UnifTight.lean
theorem unifTight_iff_ennreal {_ : MeasurableSpace α} (f : ι → α → β) (p : ℝ≥0∞) (μ : Measure α) :
    UnifTight f p μ ↔ ∀ ⦃ε : ℝ≥0∞⦄, 0 < ε → ∃ s : Set α,
      μ s ≠ ∞ ∧ ∀ i, eLpNorm (sᶜ.indicator (f i)) p μ ≤ ε
-- Mathlib/Analysis/SpecialFunctions/Log/Base.lean
theorem logb_neg_of_base_lt_one (h1 : 1 < x) : logb b x < 0
-- Mathlib/Algebra/Polynomial/Splits.lean
theorem splits_comp_of_splits (i : R →+* K) (j : K →+* L) {f : R[X]} (h : Splits i f) :
    Splits (j.comp i) f
-- Mathlib/Tactic/Sat/FromLRAT.lean
/-- Reification of a single clause formula. -/
theorem Fmla.reify_one {c : Clause} {a : Prop} (h : Clause.reify v c a) :
    Fmla.reify v (Fmla.one c) a
-- Mathlib/Data/Set/Image.lean
@[simp]
theorem range_eq_empty_iff {f : ι → α} : range f = ∅ ↔ IsEmpty ι
-- Mathlib/Algebra/Module/Submodule/EqLocus.lean
theorem eqOn_sup {f g : F} {S T : Submodule R M} (hS : Set.EqOn f g S) (hT : Set.EqOn f g T) :
    Set.EqOn f g ↑(S ⊔ T)
-- Mathlib/Algebra/Group/Submonoid/Pointwise.lean
@[to_additive (attr := simp)]
theorem inv_bot : (⊥ : Submonoid G)⁻¹ = ⊥
-- Mathlib/MeasureTheory/Measure/Lebesgue/VolumeOfBalls.lean
theorem MeasureTheory.volume_sum_rpow_le [Nonempty ι] {p : ℝ} (hp : 1 ≤ p) (r : ℝ) :
    volume {x : ι → ℝ | (∑ i, |x i| ^ p) ^ (1 / p) ≤ r} = (.ofReal r) ^ card ι *
      .ofReal ((2 * Gamma (1 / p + 1)) ^ card ι / Gamma (card ι / p + 1))
-- Mathlib/Analysis/Calculus/Gradient/Basic.lean
theorem hasGradientWithinAt_congr_set' {s t : Set F} (y : F) (h : s =ᶠ[𝓝[{y}ᶜ] x] t) :
    HasGradientWithinAt f f' s x ↔ HasGradientWithinAt f f' t x
-- Mathlib/Data/List/Lattice.lean
theorem sublist_suffix_of_union : ∀ l₁ l₂ : List α, ∃ t, t <+ l₁ ∧ t ++ l₂ = l₁ ∪ l₂
-- Mathlib/Geometry/RingedSpace/Basic.lean
/--
If the germ of a section `f` is a unit in the stalk at `x`, then `f` must be a unit on some small
neighborhood around `x`.
-/
theorem isUnit_res_of_isUnit_germ (U : Opens X) (f : X.presheaf.obj (op U)) (x : U)
    (h : IsUnit (X.presheaf.germ x f)) :
    ∃ (V : Opens X) (i : V ⟶ U) (_ : x.1 ∈ V), IsUnit (X.presheaf.map i.op f)
-- Mathlib/Algebra/Algebra/Subalgebra/Basic.lean
theorem coe_center : (center R A : Set A) = Set.center A
-- Mathlib/Data/Finset/Powerset.lean
@[simp]
theorem powerset_eq_singleton_empty : s.powerset = {∅} ↔ s = ∅
-- Mathlib/Algebra/Star/Subalgebra.lean
theorem map_adjoin (f : A →⋆ₐ[R] B) (s : Set A) :
    map f (adjoin R s) = adjoin R (f '' s)
-- Mathlib/CategoryTheory/Limits/Shapes/ZeroMorphisms.lean
@[simp] lemma unop_zero (X Y : Cᵒᵖ) : (0 : X ⟶ Y).unop = 0
-- Mathlib/Algebra/Divisibility/Prod.lean
theorem prod_dvd_iff {x y : G₁ × G₂} :
    x ∣ y ↔ x.1 ∣ y.1 ∧ x.2 ∣ y.2
-- Mathlib/MeasureTheory/Function/StronglyMeasurable/Basic.lean
/-- In a space with second countable topology, strongly measurable and measurable are equivalent. -/
theorem _root_.stronglyMeasurable_iff_measurable [TopologicalSpace β] [MetrizableSpace β]
    [BorelSpace β] [SecondCountableTopology β] : StronglyMeasurable f ↔ Measurable f
-- Mathlib/Order/Filter/Prod.lean
@[simp]
theorem prod_principal_principal {s : Set α} {t : Set β} : 𝓟 s ×ˢ 𝓟 t = 𝓟 (s ×ˢ t)
-- Mathlib/CategoryTheory/Yoneda.lean
/-- The co-Yoneda embedding, as a functor from `Cᵒᵖ` into co-presheaves on `C`.
-/
@[simps]
def coyoneda : Cᵒᵖ ⥤ C ⥤ Type v₁
-- Mathlib/ModelTheory/Satisfiability.lean
theorem semanticallyEquivalent_all_liftAt : T.SemanticallyEquivalent φ (φ.liftAt 1 n).all
-- Mathlib/Analysis/Complex/UpperHalfPlane/Metric.lean
theorem im_le_im_mul_exp_dist (z w : ℍ) : z.im ≤ w.im * Real.exp (dist z w)
-- Mathlib/RingTheory/Ideal/MinimalPrime.lean
theorem Ideal.exists_comap_eq_of_mem_minimalPrimes {I : Ideal S} (f : R →+* S) (p)
    (H : p ∈ (I.comap f).minimalPrimes) : ∃ p' : Ideal S, p'.IsPrime ∧ I ≤ p' ∧ p'.comap f = p
-- Mathlib/Data/Finset/Prod.lean
theorem product_image_fst [DecidableEq α] (ht : t.Nonempty) : (s ×ˢ t).image Prod.fst = s
-- Mathlib/GroupTheory/GroupAction/Basic.lean
@[to_additive mem_fixedPoints_iff_card_orbit_eq_one]
theorem mem_fixedPoints_iff_card_orbit_eq_one {a : α} [Fintype (orbit M a)] :
    a ∈ fixedPoints M α ↔ Fintype.card (orbit M a) = 1
-- Mathlib/RingTheory/Polynomial/Tower.lean
@[simp]
lemma eval_map_algebraMap (P : R[X]) (a : A) :
    (map (algebraMap R A) P).eval a = aeval a P
-- Mathlib/LinearAlgebra/Basis/VectorSpace.lean
/-- The atoms of the lattice of submodules of a module over a division ring are the
submodules equal to the span of a nonzero element of the module. -/
theorem atom_iff_nonzero_span (W : Submodule K V) :
    IsAtom W ↔ ∃ v ≠ 0, W = span K {v}
-- Mathlib/Probability/Moments.lean
theorem centralMoment_one' [IsFiniteMeasure μ] (h_int : Integrable X μ) :
    centralMoment X 1 μ = (1 - (μ Set.univ).toReal) * μ[X]
-- Mathlib/LinearAlgebra/TensorProduct/Basic.lean
theorem lift_mk : lift (mk R M N) = LinearMap.id
-- Mathlib/Data/DFinsupp/Basic.lean
@[simp]
theorem update_self : f.update i (f i) = f
-- Mathlib/AlgebraicGeometry/EllipticCurve/Weierstrass.lean
lemma ofJ_0_of_three_ne_zero [h3 : NeZero (3 : F)] :
    ofJ 0 = @ofJ0 _ _ (invertibleOfNonzero h3.out)
-- Mathlib/Data/Finite/Card.lean
/-- NB: `Nat.card` is defined to be `0` for infinite types. -/
theorem card_eq_zero_of_surjective {f : α → β} (hf : Function.Surjective f) (h : Nat.card β = 0) :
    Nat.card α = 0
-- Mathlib/Data/Complex/Abs.lean
theorem abs_apply {z : ℂ} : Complex.abs z = (normSq z).sqrt
-- Mathlib/NumberTheory/PellMatiyasevic.lean
@[simp]
theorem pell_val (n : ℕ) : pell a1 n = (xn a1 n, yn a1 n)
-- Mathlib/Topology/MetricSpace/Pseudo/Defs.lean
/-- The preimage of a separable set by an inducing map is separable. -/
protected theorem _root_.Inducing.isSeparable_preimage {f : β → α} [TopologicalSpace β]
    (hf : Inducing f) {s : Set α} (hs : IsSeparable s) : IsSeparable (f ⁻¹' s)
-- Mathlib/Order/Basic.lean
@[to_additive]
lemma dite_lt_one [LT α] (ha : ∀ h, a h < 1) (hb : ∀ h, b h < 1) : dite p a b < 1
-- Mathlib/Topology/EMetricSpace/Basic.lean
/-- If a set `s` is separable in a (pseudo extended) metric space, then it admits a countable dense
subset. This is not obvious, as the countable set whose closure covers `s` given by the definition
of separability does not need in general to be contained in `s`. -/
theorem _root_.TopologicalSpace.IsSeparable.exists_countable_dense_subset
    {s : Set α} (hs : IsSeparable s) : ∃ t, t ⊆ s ∧ t.Countable ∧ s ⊆ closure t
-- Mathlib/FieldTheory/Finite/GaloisField.lean
theorem card (h : n ≠ 0) : Fintype.card (GaloisField p n) = p ^ n
-- Mathlib/Topology/Filter.lean
protected theorem tendsto_nhds_atBot_iff [Preorder β] {l : Filter α} {f : α → Filter β} :
    Tendsto f l (𝓝 atBot) ↔ ∀ y, ∀ᶠ a in l, Iic y ∈ f a
-- Mathlib/Algebra/Algebra/Equiv.lean
@[simp]
theorem toLinearEquiv_toLinearMap : e.toLinearEquiv.toLinearMap = e.toLinearMap
-- Mathlib/Data/PNat/Factors.lean
theorem card_ofPrime (p : Nat.Primes) : Multiset.card (ofPrime p) = 1
-- Mathlib/LinearAlgebra/Matrix/PosDef.lean
/-- For `A` positive semidefinite, we have `x⋆ A x = 0` iff `A x = 0`. -/
theorem PosSemidef.dotProduct_mulVec_zero_iff
    {A : Matrix n n 𝕜} (hA : PosSemidef A) (x : n → 𝕜) :
    star x ⬝ᵥ A *ᵥ x = 0 ↔ A *ᵥ x = 0
-- Mathlib/Analysis/InnerProductSpace/l2Space.lean
protected theorem linearIsometry_apply (f : lp G 2) : hV.linearIsometry f = ∑' i, V i (f i)
-- Mathlib/RingTheory/IntegralClosure/IsIntegralClosure/Basic.lean
protected theorem isIntegral [Algebra R A] [IsScalarTower R A B] (x : A) : IsIntegral R x
-- Mathlib/Order/Disjoint.lean
theorem Codisjoint.left_le_of_le_inf_right (h : a ⊓ b ≤ c) (hd : Codisjoint b c) : a ≤ c
-- Mathlib/Algebra/AddConstMap/Basic.lean
theorem strictMono_iff_Icc [LinearOrderedAddCommGroup G] [Archimedean G] [OrderedAddCommGroup H]
    [AddConstMapClass F G H a b] {f : F} (ha : 0 < a) (l : G) :
    StrictMono f ↔ StrictMonoOn f (Icc l (l + a))
-- Mathlib/Algebra/Quaternion.lean
@[simp]
theorem coe_inj {x y : R} : (x : ℍ[R]) = y ↔ x = y
-- Mathlib/Data/Finset/Card.lean
/-- Suppose that, given objects defined on all nonempty strict subsets of any nontrivial finset `s`,
one knows how to define an object on `s`. Then one can inductively define an object on all finsets,
starting from singletons and iterating.

TODO: Currently this can only be used to prove properties.
Replace `Finset.Nonempty.exists_eq_singleton_or_nontrivial` with computational content
in order to let `p` be `Sort`-valued. -/
@[elab_as_elim]
protected lemma Nonempty.strong_induction {p : ∀ s, s.Nonempty → Prop}
    (h₀ : ∀ a, p {a} (singleton_nonempty _))
    (h₁ : ∀ ⦃s⦄ (hs : s.Nontrivial), (∀ t ht, t ⊂ s → p t ht) → p s hs.nonempty) :
    ∀ ⦃s : Finset α⦄ (hs), p s hs
-- Mathlib/CategoryTheory/Functor/KanExtension/Basic.lean
@[reassoc (attr := simp)]
lemma liftOfIsRightKanExtension_fac (G : D ⥤ H) (β : L ⋙ G ⟶ F) :
    whiskerLeft L (F'.liftOfIsRightKanExtension α G β) ≫ α = β
-- Mathlib/Topology/Algebra/Group/Basic.lean
@[to_additive]
lemma subset_mul_closure_one (s : Set G) : s ⊆ s * (closure {1} : Set G)
-- Mathlib/Topology/DiscreteQuotient.lean
theorem proj_continuous : Continuous S.proj
-- Mathlib/CategoryTheory/Sites/Types.lean
/-- The yoneda functor that sends a type to a sheaf over the category of types. -/
@[simps]
def yoneda' : Type u ⥤ SheafOfTypes typesGrothendieckTopology
-- Mathlib/MeasureTheory/Integral/IntervalIntegral.lean
theorem smul_integral_comp_mul_sub (c d) :
    (c • ∫ x in a..b, f (c * x - d)) = ∫ x in c * a - d..c * b - d, f x
-- .lake/packages/lean4/src/lean/Init/Data/Nat/Gcd.lean
theorem gcd_dvd_left (m n : Nat) : gcd m n ∣ m
-- Mathlib/MeasureTheory/Measure/MeasureSpace.lean
theorem measure_eq_left_of_subset_of_measure_add_eq {s t : Set α} (h : (μ + ν) t ≠ ∞) (h' : s ⊆ t)
    (h'' : (μ + ν) s = (μ + ν) t) : μ s = μ t
-- Mathlib/Algebra/Group/Units/Equiv.lean
@[to_additive]
theorem _root_.Group.mulLeft_bijective (a : G) : Function.Bijective (a * ·)
-- Mathlib/CategoryTheory/Endofunctor/Algebra.lean
/-- An algebra morphism with an underlying epimorphism hom in `C` is an algebra epimorphism. -/
theorem epi_of_epi {X Y : Coalgebra F} (f : X ⟶ Y) [h : Epi f.1] : Epi f
-- Mathlib/Algebra/Group/Hom/Defs.lean
@[to_additive (attr := simp)]
theorem OneHom.one_comp [One M] [One N] [One P] (f : OneHom M N) :
    (1 : OneHom N P).comp f = 1
-- Mathlib/NumberTheory/LegendreSymbol/JacobiSymbol.lean
/-- When `m` and `n` are odd, then the square of `qrSign m n` is `1`. -/
theorem sq_eq_one {m n : ℕ} (hm : Odd m) (hn : Odd n) : qrSign m n ^ 2 = 1
-- Mathlib/Algebra/Group/Subsemigroup/Operations.lean
@[to_additive]
theorem mem_map_of_mem (f : M →ₙ* N) {S : Subsemigroup M} {x : M} (hx : x ∈ S) : f x ∈ S.map f
-- Mathlib/Analysis/Fourier/FourierTransform.lean
/-- The Fourier integral is well defined iff the function is integrable. Version with a general
continuous bilinear function `L`. For the specialization to the inner product in an inner product
space, see `Real.fourierIntegral_convergent_iff`. -/
@[simp]
theorem fourierIntegral_convergent_iff' {V W : Type*} [NormedAddCommGroup V] [NormedSpace ℝ V]
    [NormedAddCommGroup W] [NormedSpace ℝ W] [MeasurableSpace V] [BorelSpace V] {μ : Measure V}
    {f : V → E} (L : V →L[ℝ] W →L[ℝ] ℝ) (w : W) :
    Integrable (fun v : V ↦ 𝐞 (- L v w) • f v) μ ↔ Integrable f μ
-- Mathlib/MeasureTheory/Integral/TorusIntegral.lean
theorem torusIntegral_const_mul (a : ℂ) (f : ℂⁿ → ℂ) (c : ℂⁿ) (R : ℝⁿ) :
    (∯ x in T(c, R), a * f x) = a * ∯ x in T(c, R), f x
-- Mathlib/Topology/Algebra/Module/Basic.lean
@[simp, norm_cast]
theorem coe_fst' [Module R₁ M₂] : ⇑(fst R₁ M₁ M₂) = Prod.fst
-- Mathlib/LinearAlgebra/Finsupp.lean
@[simp]
theorem llift_symm_apply (f : (X →₀ R) →ₗ[R] M) (x : X) :
    (llift M R S X).symm f x = f (single x 1)
-- Mathlib/NumberTheory/LegendreSymbol/Basic.lean
/-- If `a : ZMod p` is nonzero, then `a^(p/2)` is either `1` or `-1`. -/
theorem pow_div_two_eq_neg_one_or_one {a : ZMod p} (ha : a ≠ 0) :
    a ^ (p / 2) = 1 ∨ a ^ (p / 2) = -1
-- Mathlib/Algebra/BigOperators/Finsupp.lean
@[simp]
theorem prod_pow [Fintype α] (f : α →₀ ℕ) (g : α → N) :
    (f.prod fun a b => g a ^ b) = ∏ a, g a ^ f a
-- Mathlib/Data/TypeVec.lean
@[typevec]
theorem repeat_eq_append1 {β} {n} (α : TypeVec n) :
    repeatEq (α ::: β) = splitFun (α := (α ⊗ α) ::: _ )
    (α' := («repeat» n Prop) ::: _) (repeatEq α) (uncurry Eq)
-- Mathlib/Data/Multiset/Nodup.lean
theorem disjoint_of_nodup_add {s t : Multiset α} (d : Nodup (s + t)) : Disjoint s t
-- Mathlib/Topology/UniformSpace/UniformConvergence.lean
nonrec theorem IsOpen.tendstoLocallyUniformlyOn_iff_forall_tendsto (hs : IsOpen s) :
    TendstoLocallyUniformlyOn F f p s ↔
      ∀ x ∈ s, Tendsto (fun y : ι × α => (f y.2, F y.1 y.2)) (p ×ˢ 𝓝 x) (𝓤 β)
-- Mathlib/CategoryTheory/Monoidal/FunctorCategory.lean
@[simp]
theorem rightUnitor_hom_app {F : C ⥤ D} {X} :
    ((ρ_ F).hom : F ⊗ 𝟙_ _ ⟶ F).app X = (ρ_ (F.obj X)).hom
-- Mathlib/Logic/Relator.lean
lemma left_unique_of_rel_eq {eq' : β → β → Prop} (he : (R ⇒ (R ⇒ Iff)) Eq eq') : LeftUnique R
-- .lake/packages/lean4/src/lean/Init/Data/Nat/Basic.lean
protected theorem min_def {n m : Nat} : min n m = if n ≤ m then n else m
-- Mathlib/Combinatorics/SetFamily/Compression/Down.lean
@[simp]
theorem mem_nonMemberSubfamily : s ∈ 𝒜.nonMemberSubfamily a ↔ s ∈ 𝒜 ∧ a ∉ s
-- Mathlib/Analysis/SpecialFunctions/SmoothTransition.lean
/-- The function `expNegInvGlue` vanishes on `(-∞, 0]`. -/
theorem zero_of_nonpos {x : ℝ} (hx : x ≤ 0) : expNegInvGlue x = 0
-- Mathlib/Topology/Bornology/BoundedOperation.lean
lemma SeminormedAddCommGroup.lipschitzWith_sub :
    LipschitzWith 2 (fun (p : R × R) ↦ p.1 - p.2)
-- Mathlib/Data/Multiset/Basic.lean
theorem countP_eq_card_filter (s) : countP p s = card (filter p s)
-- Mathlib/Algebra/Order/ToIntervalMod.lean
theorem toIcoDiv_neg (a b : α) : toIcoDiv hp a (-b) = -(toIocDiv hp (-a) b + 1)
-- Mathlib/Order/Heyting/Basic.lean
@[simp]
theorem himp_apply [∀ i, HImp (π i)] (a b : ∀ i, π i) (i : ι) : (a ⇨ b) i = a i ⇨ b i
-- Mathlib/Topology/AlexandrovDiscrete.lean
lemma isOpen_iInter₂ {f : ∀ i, κ i → Set α} (hf : ∀ i j, IsOpen (f i j)) :
    IsOpen (⋂ i, ⋂ j, f i j)
-- Mathlib/Data/Real/EReal.lean
theorem coe_toReal_le {x : EReal} (h : x ≠ ⊥) : ↑x.toReal ≤ x
-- Mathlib/Algebra/Homology/Additive.lean
/-- A natural isomorphism between functors induces a natural isomorphism
between those functors applied to homological complexes.
-/
@[simps!]
def NatIso.mapHomologicalComplex {F G : W₁ ⥤ W₂} [F.PreservesZeroMorphisms]
    [G.PreservesZeroMorphisms] (α : F ≅ G) (c : ComplexShape ι) :
    F.mapHomologicalComplex c ≅ G.mapHomologicalComplex c
-- .lake/packages/lean4/src/lean/Init/Data/Nat/Div.lean
theorem div_eq (x y : Nat) : x / y = if 0 < y ∧ y ≤ x then (x - y) / y + 1 else 0
-- Mathlib/Order/PrimeIdeal.lean
/-- A filter `F` is prime if its complement is an ideal.
-/
@[mk_iff]
class IsPrime (F : PFilter P) : Prop where
  compl_ideal : IsIdeal (F : Set P)ᶜ
-- Mathlib/LinearAlgebra/AffineSpace/AffineSubspace.lean
@[simp] theorem comap_bot (f : P₁ →ᵃ[k] P₂) : comap f ⊥ = ⊥
-- Mathlib/RingTheory/Smooth/Basic.lean
@[simp]
theorem comp_lift [FormallySmooth R A] (I : Ideal B) (hI : IsNilpotent I)
    (g : A →ₐ[R] B ⧸ I) : (Ideal.Quotient.mkₐ R I).comp (FormallySmooth.lift I hI g) = g
-- Mathlib/CategoryTheory/Preadditive/HomOrthogonal.lean
@[simp]
theorem matrixDecomposition_id (o : HomOrthogonal s) {α : Type} [Finite α] {f : α → ι} (i : ι) :
    o.matrixDecomposition (𝟙 (⨁ fun a => s (f a))) i = 1
-- Mathlib/Order/Filter/Ultrafilter.lean
theorem coe_injective : Injective ((↑) : Ultrafilter α → Filter α)
-- Mathlib/Topology/LocallyConstant/Basic.lean
@[simp]
theorem ofIsClopen_fiber_one {X : Type*} [TopologicalSpace X] {U : Set X} [∀ x, Decidable (x ∈ U)]
    (hU : IsClopen U) : ofIsClopen hU ⁻¹' ({1} : Set (Fin 2)) = Uᶜ
-- Mathlib/Analysis/InnerProductSpace/Adjoint.lean
theorem eq_adjoint_iff_basis_right {ι : Type*} (b : Basis ι 𝕜 F) (A : E →ₗ[𝕜] F) (B : F →ₗ[𝕜] E) :
    A = LinearMap.adjoint B ↔ ∀ i x, ⟪A x, b i⟫ = ⟪x, B (b i)⟫
-- Mathlib/RingTheory/Discriminant.lean
/-- A variation of `Algebra.discr_powerBasis_eq_prod`. -/
theorem discr_powerBasis_eq_prod'' [Algebra.IsSeparable K L] (e : Fin pb.dim ≃ (L →ₐ[K] E)) :
    algebraMap K E (discr K pb.basis) =
      (-1) ^ (n * (n - 1) / 2) *
        ∏ i : Fin pb.dim, ∏ j ∈ Ioi i, (e j pb.gen - e i pb.gen) * (e i pb.gen - e j pb.gen)
-- .lake/packages/lean4/src/lean/Init/Data/List/Basic.lean
@[simp] theorem zip_nil_right : zip (l : List α) ([] : List β)  = []
-- Mathlib/Data/Nat/Choose/Basic.lean
/-- Show that for small values of the right argument, the middle value is largest. -/
private theorem choose_le_middle_of_le_half_left {n r : ℕ} (hr : r ≤ n / 2) :
    choose n r ≤ choose n (n / 2)
-- Mathlib/Order/Antisymmetrization.lean
theorem antisymmetrization_fibration :
    Relation.Fibration (· < ·) (· < ·) (@toAntisymmetrization α (· ≤ ·) _)
-- Mathlib/Analysis/BoxIntegral/Partition/Tagged.lean
@[simp]
theorem iUnion_disjUnion (h : Disjoint π₁.iUnion π₂.iUnion) :
    (π₁.disjUnion π₂ h).iUnion = π₁.iUnion ∪ π₂.iUnion
-- Mathlib/Topology/Instances/ENNReal.lean
theorem hasSum_lt {f g : α → ℝ≥0∞} {sf sg : ℝ≥0∞} {i : α} (h : ∀ a : α, f a ≤ g a) (hi : f i < g i)
    (hsf : sf ≠ ∞) (hf : HasSum f sf) (hg : HasSum g sg) : sf < sg
-- Mathlib/Algebra/Order/Hom/Basic.lean
@[to_additive]
theorem map_div_le_add : f (x / y) ≤ f x + f y
-- Mathlib/GroupTheory/GroupAction/Basic.lean
/-- If `α` is non-empty, an action is pretransitive if and only if the quotient has exactly one
element. -/
@[to_additive "If `α` is non-empty, an additive action is pretransitive if and only if the
quotient has exactly one element."]
theorem pretransitive_iff_unique_quotient_of_nonempty [Nonempty α] :
    IsPretransitive G α ↔ Nonempty (Unique <| orbitRel.Quotient G α)
-- Mathlib/Algebra/Lie/Rank.lean
lemma rank_le_natTrailingDegree_charpoly_ad :
    rank R L ≤ (ad R L x).charpoly.natTrailingDegree
-- .lake/packages/batteries/Batteries/Data/List/Lemmas.lean
theorem subset_cons_of_subset (a : α) {l₁ l₂ : List α} : l₁ ⊆ l₂ → l₁ ⊆ a :: l₂
-- Mathlib/Data/Int/SuccPred.lean
protected theorem covBy_iff_succ_eq {m n : ℤ} : m ⋖ n ↔ m + 1 = n
-- Mathlib/Data/Rel.lean
theorem image_subset_iff (s : Set α) (t : Set β) : image r s ⊆ t ↔ s ⊆ core r t
-- Mathlib/CategoryTheory/Limits/Shapes/ConcreteCategory.lean
@[simp]
theorem multiequalizerEquiv_apply (I : MulticospanIndex.{w} C) [HasMultiequalizer I]
    [PreservesLimit I.multicospan (forget C)] (x : ↑(multiequalizer I)) (i : I.L) :
    ((Concrete.multiequalizerEquiv I) x : ∀ i : I.L, I.left i) i = Multiequalizer.ι I i x
-- Mathlib/Control/Fold.lean
theorem foldMap_hom [Monoid α] [Monoid β] (f : α →* β) (g : γ → α) (x : t γ) :
    f (foldMap g x) = foldMap (f ∘ g) x
-- Mathlib/Analysis/Complex/UpperHalfPlane/Basic.lean
theorem im_pos (z : ℍ) : 0 < z.im
-- Mathlib/RingTheory/Algebraic.lean
/-- An element of `R` is algebraic, when viewed as an element of the `R`-algebra `A`. -/
theorem isAlgebraic_algebraMap [Nontrivial R] (x : R) : IsAlgebraic R (algebraMap R A x)
-- Mathlib/Algebra/Order/Module/Defs.lean
lemma neg_of_smul_neg_left' [SMulPosMono α β] (h : a • b < 0) (ha : 0 ≤ a) : b < 0
-- Mathlib/LinearAlgebra/Matrix/Transvection.lean
@[simp]
theorem transvection_mul_apply_same (b : n) (c : R) (M : Matrix n n R) :
    (transvection i j c * M) i b = M i b + c * M j b
-- Mathlib/Topology/Order/LeftRight.lean
theorem nhds_right'_le_nhds_ne (a : α) : 𝓝[>] a ≤ 𝓝[≠] a
-- Mathlib/Topology/Algebra/Module/LinearPMap.lean
/-- The closure is unique. -/
theorem IsClosable.existsUnique {f : E →ₗ.[R] F} (hf : f.IsClosable) :
    ∃! f' : E →ₗ.[R] F, f.graph.topologicalClosure = f'.graph
-- Mathlib/Data/Set/NAry.lean
theorem Nonempty.of_image2_right (h : (Set.image2 f s t).Nonempty) : t.Nonempty
-- Mathlib/Algebra/Free.lean
@[to_additive (attr := simp)]
theorem traverse_mul (x y : FreeSemigroup α) :
    traverse F (x * y) = (· * ·) <$> traverse F x <*> traverse F y
-- Mathlib/Data/Sigma/Basic.lean
theorem mk.inj_iff {a₁ a₂ : α} {b₁ : β a₁} {b₂ : β a₂} :
    @PSigma.mk α β a₁ b₁ = @PSigma.mk α β a₂ b₂ ↔ a₁ = a₂ ∧ HEq b₁ b₂
-- Mathlib/Order/SuccPred/Basic.lean
@[simp]
theorem pred_succ_of_not_isMax (h : ¬IsMax a) : pred (succ a) = a
-- Mathlib/Data/Finset/Card.lean
lemma le_card_of_inj_on_range (f : ℕ → α) (hf : ∀ i < n, f i ∈ s)
    (f_inj : ∀ i < n, ∀ j < n, f i = f j → i = j) : n ≤ s.card
-- Mathlib/MeasureTheory/Group/Arithmetic.lean
@[to_additive (attr := measurability)]
theorem Finset.aemeasurable_prod' (s : Finset ι) (hf : ∀ i ∈ s, AEMeasurable (f i) μ) :
    AEMeasurable (∏ i ∈ s, f i) μ
-- Mathlib/Analysis/Convex/Cone/Basic.lean
/-- A convex cone is a subset `s` of a `𝕜`-module such that `a • x + b • y ∈ s` whenever `a, b > 0`
and `x, y ∈ s`. -/
structure ConvexCone [AddCommMonoid E] [SMul 𝕜 E] where
  /-- The **carrier set** underlying this cone: the set of points contained in it -/
  carrier : Set E
  smul_mem' : ∀ ⦃c : 𝕜⦄, 0 < c → ∀ ⦃x : E⦄, x ∈ carrier → c • x ∈ carrier
  add_mem' : ∀ ⦃x⦄ (_ : x ∈ carrier) ⦃y⦄ (_ : y ∈ carrier), x + y ∈ carrier
-- Mathlib/RingTheory/UniqueFactorizationDomain.lean
theorem is_pow_of_dvd_count [DecidableEq (Associates α)] {a : Associates α}
    (ha : a ≠ 0) {k : ℕ} (hk : ∀ p : Associates α, Irreducible p → k ∣ count p a.factors) :
    ∃ b : Associates α, a = b ^ k
-- Mathlib/Algebra/Module/Submodule/Pointwise.lean
@[aesop safe]
lemma mem_set_smul_of_mem_mem {r : S} {m : M} (mem1 : r ∈ s) (mem2 : m ∈ N) :
    r • m ∈ s • N