ruc-ai4math/mathlib_handler_benchmark_410 huggingface dataset:
-- Mathlib/Algebra/Polynomial/Monic.lean
theorem monic_prod_of_monic (s : Finset ι) (f : ι → R[X]) (hs : ∀ i ∈ s, Monic (f i)) :
    Monic (∏ i ∈ s, f i)
-- Mathlib/SetTheory/ZFC/Basic.lean
@[simp]
theorem not_nonempty_empty : ¬ZFSet.Nonempty ∅
-- Mathlib/Analysis/Calculus/LocalExtr/Basic.lean
lemma one_mem_posTangentConeAt_iff_frequently :
    1 ∈ posTangentConeAt s a ↔ ∃ᶠ x in 𝓝[>] a, x ∈ s
-- Mathlib/GroupTheory/Abelianization.lean
theorem rank_closureCommutatorRepresentatives_le [Finite (commutatorSet G)] :
    Group.rank (closureCommutatorRepresentatives G) ≤ 2 * Nat.card (commutatorSet G)
-- Mathlib/RingTheory/Ideal/Operations.lean
theorem finset_inf_span_singleton {ι : Type*} (s : Finset ι) (I : ι → R)
    (hI : Set.Pairwise (↑s) (IsCoprime on I)) :
    (s.inf fun i => Ideal.span ({I i} : Set R)) = Ideal.span {∏ i ∈ s, I i}
-- Mathlib/Data/List/Count.lean
theorem length_filter_lt_length_iff_exists (l) :
    length (filter p l) < length l ↔ ∃ x ∈ l, ¬p x
-- Mathlib/Data/Real/Basic.lean
lemma ofCauchy_ratCast (q : ℚ) : (⟨q⟩ : ℝ) = q
-- Mathlib/Analysis/SpecialFunctions/Complex/Arg.lean
@[simp]
theorem arg_neg_I : arg (-I) = -(π / 2)
-- .lake/packages/lean4/src/lean/Init/Data/Nat/Basic.lean
theorem succ_ne_self (n) : succ n ≠ n
-- Mathlib/Data/Finset/Lattice.lean
theorem map_finset_sup [DecidableEq α] [DecidableEq β] (s : Finset γ) (f : γ → Multiset β)
    (g : β → α) (hg : Function.Injective g) : map g (s.sup f) = s.sup (map g ∘ f)
-- Mathlib/Data/List/Indexes.lean
@[local simp]
theorem map_enumFrom_eq_zipWith : ∀ (l : List α) (n : ℕ) (f : ℕ → α → β),
    map (uncurry f) (enumFrom n l) = zipWith (fun i ↦ f (i + n)) (range (length l)) l
-- Mathlib/Algebra/Homology/ShortComplex/Basic.lean
@[reassoc] lemma comp_τ₃ (φ₁₂ : S₁ ⟶ S₂) (φ₂₃ : S₂ ⟶ S₃) :
    (φ₁₂ ≫ φ₂₃).τ₃ = φ₁₂.τ₃ ≫ φ₂₃.τ₃
-- Mathlib/Combinatorics/SimpleGraph/Path.lean
theorem IsPath.length_lt [Fintype V] {u v : V} {p : G.Walk u v} (hp : p.IsPath) :
    p.length < Fintype.card V
-- .lake/packages/lean4/src/lean/Init/Data/Array/Lemmas.lean
theorem foldrM_push [Monad m] (f : α → β → m β) (init : β) (arr : Array α) (a : α) :
    (arr.push a).foldrM f init = f a init >>= arr.foldrM f
-- Mathlib/LinearAlgebra/AffineSpace/FiniteDimensional.lean
/-- `n + 1` points are affinely independent if and only if their
`vectorSpan` has dimension at least `n`. -/
theorem affineIndependent_iff_le_finrank_vectorSpan [Fintype ι] (p : ι → P) {n : ℕ}
    (hc : Fintype.card ι = n + 1) :
    AffineIndependent k p ↔ n ≤ finrank k (vectorSpan k (Set.range p))
-- Mathlib/ModelTheory/Semantics.lean
@[simp]
theorem realize_not : φ.not.Realize v xs ↔ ¬φ.Realize v xs
-- Mathlib/LinearAlgebra/Dimension/Finite.lean
theorem finrank_eq_zero_of_not_exists_basis_finite
    (h : ¬∃ (s : Set M) (_ : Basis.{v} (s : Set M) R M), s.Finite) : finrank R M = 0
-- Mathlib/Data/Finsupp/NeLocus.lean
@[simp]
theorem neLocus_self_add_right : neLocus f (f + g) = g.support
-- Mathlib/GroupTheory/OrderOfElement.lean
lemma IsOfFinOrder.isUnit {M} [Monoid M] {x : M} (hx : IsOfFinOrder x) : IsUnit x
-- Mathlib/CategoryTheory/Triangulated/Functor.lean
/-- If `F : C ⥤ D` is a triangulated functor from a triangulated category, then `D`
is also triangulated if tuples of composables arrows in `D` can be lifted to `C`. -/
lemma isTriangulated_of_essSurj_mapComposableArrows_two
    (F : C ⥤ D) [F.CommShift ℤ] [F.IsTriangulated]
    [(F.mapComposableArrows 2).EssSurj] [IsTriangulated C] :
    IsTriangulated D
-- Mathlib/Data/Fintype/Fin.lean
theorem card_filter_univ_succ (p : Fin (n + 1) → Prop) [DecidablePred p] :
    (univ.filter p).card =
    if p 0 then (univ.filter (p ∘ Fin.succ)).card + 1 else (univ.filter (p ∘ Fin.succ)).card
-- Mathlib/Algebra/Field/Basic.lean
protected theorem injective [DivisionRing α] [Semiring β] [Nontrivial β] (f : α →+* β) :
    Injective f
-- Mathlib/Analysis/SpecificLimits/Basic.lean
theorem summable_geometric_of_lt_one {r : ℝ} (h₁ : 0 ≤ r) (h₂ : r < 1) :
    Summable fun n : ℕ ↦ r ^ n
-- .lake/packages/lean4/src/lean/Init/Classical.lean
theorem epsilon_spec_aux {α : Sort u} (h : Nonempty α) (p : α → Prop) : (∃ y, p y) → p (@epsilon α h p)
-- .lake/packages/batteries/Batteries/Data/Nat/Gcd.lean
@[simp] theorem coprime_one_right_eq_true (n) : Coprime n 1 = True
-- Mathlib/Topology/MetricSpace/HausdorffDistance.lean
/-- The Hausdorff distance to the empty set vanishes (if you want to have the more reasonable
value `∞` instead, use `EMetric.hausdorffEdist`, which takes values in `ℝ≥0∞`). -/
@[simp]
theorem hausdorffDist_empty : hausdorffDist s ∅ = 0
-- Mathlib/Algebra/Order/Group/PosPart.lean
@[to_additive (attr := simp)] lemma leOnePart_div_oneLePart (a : α) : a⁻ᵐ / a⁺ᵐ = a⁻¹
-- Mathlib/Algebra/Homology/ShortComplex/Preadditive.lean
lemma homologyMap_congr (h : Homotopy φ₁ φ₂) [S₁.HasHomology] [S₂.HasHomology] :
    homologyMap φ₁ = homologyMap φ₂
-- Mathlib/Algebra/BigOperators/Group/Finset.lean
@[to_additive]
theorem prod_range_succ_comm (f : ℕ → β) (n : ℕ) :
    (∏ x ∈ range (n + 1), f x) = f n * ∏ x ∈ range n, f x
-- Mathlib/Data/Set/Pointwise/SMul.lean
@[to_additive]
theorem image_smul_comm [SMul α β] [SMul α γ] (f : β → γ) (a : α) (s : Set β) :
    (∀ b, f (a • b) = a • f b) → f '' (a • s) = a • f '' s
-- Mathlib/Data/Setoid/Basic.lean
/-- Given a map f from α to β, the natural map from the quotient of α by the kernel of f is
    injective. -/
theorem ker_lift_injective (f : α → β) : Injective (@Quotient.lift _ _ (ker f) f fun _ _ h => h)
-- Mathlib/Logic/Relator.lean
lemma rel_or : ((·↔·) ⇒ (·↔·) ⇒ (·↔·)) (·∨·) (·∨·)
-- Mathlib/CategoryTheory/Functor/KanExtension/Basic.lean
lemma isRightKanExtension_iff_postcomp₁ (α : L' ⋙ F' ⟶ F) :
    F'.IsRightKanExtension α ↔ (G ⋙ F').IsRightKanExtension
      ((Functor.associator _ _ _).inv ≫ whiskerRight e.hom F' ≫ α)
-- Mathlib/Order/LiminfLimsup.lean
@[simp]
theorem bliminf_or_le_inf_aux_left : (bliminf u f fun x => p x ∨ q x) ≤ bliminf u f p
-- Mathlib/Order/CompleteLattice.lean
theorem swap_iInf [InfSet α] [InfSet β] (f : ι → α × β) : (iInf f).swap = ⨅ i, (f i).swap
-- Mathlib/Algebra/Polynomial/Eval.lean
theorem eval_dvd : p ∣ q → eval x p ∣ eval x q
-- Mathlib/Algebra/Order/Interval/Basic.lean
theorem sub_mem_sub (ha : a ∈ s) (hb : b ∈ t) : a - b ∈ s - t
-- Mathlib/Algebra/Star/StarAlgHom.lean
@[simp]
theorem prod_fst_snd : prod (fst R A B) (snd R A B) = 1
-- Mathlib/MeasureTheory/Measure/MeasureSpace.lean
@[simp]
theorem smul_toOuterMeasure {_m : MeasurableSpace α} (c : R) (μ : Measure α) :
    (c • μ).toOuterMeasure = c • μ.toOuterMeasure
-- Mathlib/AlgebraicGeometry/AffineScheme.lean
theorem basicOpen_basicOpen_is_basicOpen (g : Γ(X, X.basicOpen f)) :
    ∃ f' : Γ(X, U), X.basicOpen f' = X.basicOpen g
-- Mathlib/NumberTheory/LegendreSymbol/QuadraticChar/Basic.lean
/-- The sum over the values of the quadratic character is zero when the characteristic is odd. -/
theorem quadraticChar_sum_zero (hF : ringChar F ≠ 2) : ∑ a : F, quadraticChar F a = 0
-- Mathlib/Analysis/Calculus/LineDeriv/Basic.lean
lemma HasLineDerivWithinAt.lineDifferentiableWithinAt (hf : HasLineDerivWithinAt 𝕜 f f' s x v) :
    LineDifferentiableWithinAt 𝕜 f s x v
-- Mathlib/RingTheory/Ideal/Norm.lean
/-- The choice of `d` in `Ideal.exists_mul_add_mem_pow_succ` is unique, up to `P`.
Inspired by [Neukirch], proposition 6.1 -/
theorem Ideal.mul_add_mem_pow_succ_unique [IsDedekindDomain S] {i : ℕ} (a d d' e e' : S)
    (a_not_mem : a ∉ P ^ (i + 1)) (e_mem : e ∈ P ^ (i + 1)) (e'_mem : e' ∈ P ^ (i + 1))
    (h : a * d + e - (a * d' + e') ∈ P ^ (i + 1)) : d - d' ∈ P
-- .lake/packages/lean4/src/lean/Init/Data/Int/Order.lean
protected theorem lt_add_of_neg_add_lt {a b c : Int} (h : -b + a < c) : a < b + c
-- .lake/packages/lean4/src/lean/Init/Data/Array/Basic.lean
@[simp] theorem size_pop (a : Array α) : a.pop.size = a.size - 1
-- Mathlib/GroupTheory/CoprodI.lean
@[simp]
theorem prod_empty : prod (empty : Word M) = 1
-- Mathlib/Algebra/EuclideanDomain/Defs.lean
theorem mod_add_div (a b : R) : a % b + b * (a / b) = a
-- Mathlib/Order/Filter/Ultrafilter.lean
/-- A filter equals the intersection of all the ultrafilters which contain it. -/
theorem iSup_ultrafilter_le_eq (f : Filter α) :
    ⨆ (g : Ultrafilter α) (_ : g ≤ f), (g : Filter α) = f
-- Mathlib/ModelTheory/Substructures.lean
theorem inter (hs : ClosedUnder f s) (ht : ClosedUnder f t) : ClosedUnder f (s ∩ t)
-- Mathlib/MeasureTheory/Integral/VitaliCaratheodory.lean
/-- Given an integrable function `f` with values in `ℝ≥0` in a sigma-finite space, there exists a
lower semicontinuous function `g > f` with integral arbitrarily close to that of `f`.
Formulation in terms of `integral`.
Auxiliary lemma for Vitali-Carathéodory theorem `exists_lt_lower_semicontinuous_integral_lt`. -/
theorem exists_lt_lowerSemicontinuous_integral_gt_nnreal [SigmaFinite μ] (f : α → ℝ≥0)
    (fint : Integrable (fun x => (f x : ℝ)) μ) {ε : ℝ} (εpos : 0 < ε) :
    ∃ g : α → ℝ≥0∞,
      (∀ x, (f x : ℝ≥0∞) < g x) ∧
      LowerSemicontinuous g ∧
      (∀ᵐ x ∂μ, g x < ⊤) ∧
      Integrable (fun x => (g x).toReal) μ ∧ (∫ x, (g x).toReal ∂μ) < (∫ x, ↑(f x) ∂μ) + ε
-- Mathlib/Analysis/Convex/Between.lean
theorem wbtw_swap_right_iff [NoZeroSMulDivisors R V] (x : P) {y z : P} :
    Wbtw R x y z ∧ Wbtw R x z y ↔ y = z
-- Mathlib/Algebra/Star/Basic.lean
theorem star_mul_star (x y : R) : star (x * star y) = y * star x
-- Mathlib/Data/Multiset/Fold.lean
theorem fold_cons'_right (b a : α) (s : Multiset α) : (a ::ₘ s).fold op b = s.fold op (b * a)
-- Mathlib/Data/Rat/Lemmas.lean
theorem mul_num (q₁ q₂ : ℚ) :
    (q₁ * q₂).num = q₁.num * q₂.num / Nat.gcd (q₁.num * q₂.num).natAbs (q₁.den * q₂.den)
-- Mathlib/Algebra/Homology/Augment.lean
@[simp]
theorem cochainComplex_d_succ_succ_zero (C : CochainComplex V ℕ) (i : ℕ) : C.d 0 (i + 2) = 0
-- .lake/packages/lean4/src/lean/Init/Data/Nat/Basic.lean
protected theorem lt_succ_iff : m < succ n ↔ m ≤ n
-- Mathlib/Topology/CompactOpen.lean
/-- To show continuity of a map `α → C(β, γ)`, it suffices to show that its uncurried form
    `α × β → γ` is continuous. -/
theorem continuous_of_continuous_uncurry (f : X → C(Y, Z))
    (h : Continuous (Function.uncurry fun x y => f x y)) : Continuous f
-- Mathlib/CategoryTheory/Sites/Canonical.lean
/--
Check that if each `P ∈ Ps` is a sheaf for `J`, then `J` is a subtopology of `finestTopology Ps`.
-/
theorem le_finestTopology (Ps : Set (Cᵒᵖ ⥤ Type v)) (J : GrothendieckTopology C)
    (hJ : ∀ P ∈ Ps, Presieve.IsSheaf J P) : J ≤ finestTopology Ps
-- Mathlib/Analysis/Analytic/Meromorphic.lean
lemma mul {f g : 𝕜 → 𝕜} {x : 𝕜} (hf : MeromorphicAt f x) (hg : MeromorphicAt g x) :
    MeromorphicAt (f * g) x
-- Mathlib/Analysis/NormedSpace/OperatorNorm/Basic.lean
theorem le_of_opNorm_le {c : ℝ} (h : ‖f‖ ≤ c) (x : E) : ‖f x‖ ≤ c * ‖x‖
-- Mathlib/Algebra/Ring/BooleanRing.lean
@[simp]
theorem ofBoolAlg_bot : ofBoolAlg (⊥ : AsBoolAlg α) = 0
-- Mathlib/Algebra/Lie/Basic.lean
@[simp]
theorem nsmul_lie (n : ℕ) : ⁅n • x, m⁆ = n • ⁅x, m⁆
-- Mathlib/Topology/Algebra/Algebra.lean
@[simp]
theorem fst_comp_prod (f : A →A[R] B) (g : A →A[R] C) :
    (fst R B C).comp (f.prod g) = f
-- Mathlib/Data/Sum/Order.lean
@[simp]
theorem sumLexAssoc_apply_inr :
    sumLexAssoc α β γ (toLex <| inr c) = toLex (inr <| toLex <| inr c)
-- Mathlib/Analysis/Distribution/SchwartzSpace.lean
lemma _root_.Function.HasTemperateGrowth.of_fderiv {f : E → F}
    (h'f : Function.HasTemperateGrowth (fderiv ℝ f)) (hf : Differentiable ℝ f) {k : ℕ} {C : ℝ}
    (h : ∀ x, ‖f x‖ ≤ C * (1 + ‖x‖) ^ k) :
    Function.HasTemperateGrowth f
-- Mathlib/Data/Finset/Pi.lean
@[simp]
theorem mem_pi {s : Finset α} {t : ∀ a, Finset (β a)} {f : ∀ a ∈ s, β a} :
    f ∈ s.pi t ↔ ∀ (a) (h : a ∈ s), f a h ∈ t a
-- .lake/packages/lean4/src/lean/Init/Data/Nat/Bitwise/Lemmas.lean
@[simp] theorem one_and_eq_mod_two (n : Nat) : 1 &&& n = n % 2
-- Mathlib/RingTheory/Congruence/Basic.lean
protected theorem nsmul {S : Type*} [AddGroup S] [Mul S] (t : RingCon S)
    (m : ℕ) {x y : S} (hx : t x y) : t (m • x) (m • y)
-- Mathlib/RingTheory/OreLocalization/Basic.lean
@[to_additive]
theorem oreDiv_eq_iff {r₁ r₂ : X} {s₁ s₂ : S} :
    r₁ /ₒ s₁ = r₂ /ₒ s₂ ↔ ∃ (u : S) (v : R), u • r₂ = v • r₁ ∧ u * s₂ = v * s₁
-- Mathlib/Order/WellFoundedSet.lean
@[simp]
theorem wellFoundedOn_singleton : WellFoundedOn ({a} : Set α) r
-- Mathlib/Combinatorics/Configuration.lean
/-- If a nondegenerate configuration has a unique point on any two lines, then `|L| ≤ |P|`. -/
theorem HasPoints.card_le [HasPoints P L] [Fintype P] [Fintype L] :
    Fintype.card L ≤ Fintype.card P
-- Mathlib/Topology/Algebra/InfiniteSum/Basic.lean
@[to_additive]
theorem HasProd.mul_compl {s : Set β} (ha : HasProd (f ∘ (↑) : s → α) a)
    (hb : HasProd (f ∘ (↑) : (sᶜ : Set β) → α) b) : HasProd f (a * b)
-- Mathlib/Algebra/Group/Hom/Basic.lean
@[simp]
theorem invMonoidHom_apply (a : α) : invMonoidHom a = a⁻¹
-- Mathlib/LinearAlgebra/LinearIndependent.lean
theorem linearIndependent_empty : LinearIndependent R (fun x => x : (∅ : Set M) → M)
-- Mathlib/Algebra/Ring/Int.lean
@[simp, deprecated (since := "2023-01-26")]
lemma not_even_bit1 (n : ℤ) : ¬Even (2 * n + 1)
-- Mathlib/Algebra/Polynomial/FieldDivision.lean
theorem root_gcd_iff_root_left_right [CommSemiring k] [DecidableEq R]
    {ϕ : R →+* k} {f g : R[X]} {α : k} :
    (EuclideanDomain.gcd f g).eval₂ ϕ α = 0 ↔ f.eval₂ ϕ α = 0 ∧ g.eval₂ ϕ α = 0
-- Mathlib/Analysis/SpecialFunctions/Trigonometric/Basic.lean
theorem cos_antiperiodic : Function.Antiperiodic cos π
-- Mathlib/AlgebraicGeometry/EllipticCurve/Jacobian.lean
lemma dblZ_smul (P : Fin 3 → R) (u : R) : W'.dblZ (u • P) = u ^ 4 * W'.dblZ P
-- Mathlib/Data/Nat/Log.lean
theorem clog_eq_one {b n : ℕ} (hn : 2 ≤ n) (h : n ≤ b) : clog b n = 1
-- Mathlib/Analysis/LocallyConvex/WithSeminorms.lean
/-- Convergence along filters for `WithSeminorms`. -/
theorem WithSeminorms.tendsto_nhds (hp : WithSeminorms p) (u : F → E) {f : Filter F} (y₀ : E) :
    Filter.Tendsto u f (𝓝 y₀) ↔ ∀ i ε, 0 < ε → ∀ᶠ x in f, p i (u x - y₀) < ε
-- Mathlib/CategoryTheory/Limits/Shapes/Terminal.lean
/-- We can more explicitly show that a category has an initial object by specifying the object,
and showing there is a unique morphism from it to any other object. -/
theorem hasInitial_of_unique (X : C) [h : ∀ Y : C, Unique (X ⟶ Y)] : HasInitial C
-- Mathlib/Data/Matroid/Basic.lean
theorem exists_basis_subset_basis (M : Matroid α) (hXY : X ⊆ Y) (hY : Y ⊆ M.E := by aesop_mat) :
    ∃ I J, M.Basis I X ∧ M.Basis J Y ∧ I ⊆ J
-- Mathlib/MeasureTheory/OuterMeasure/AE.lean
theorem ae_eq_set_compl {s t : Set α} : sᶜ =ᵐ[μ] t ↔ s =ᵐ[μ] tᶜ
-- Mathlib/Topology/ContinuousOn.lean
theorem insert_mem_nhdsWithin_insert {a : α} {s t : Set α} (h : t ∈ 𝓝[s] a) :
    insert a t ∈ 𝓝[insert a s] a
-- Mathlib/Data/List/Duplicate.lean
theorem exists_duplicate_iff_not_nodup : (∃ x : α, x ∈+ l) ↔ ¬Nodup l
-- Mathlib/Computability/Halting.lean
theorem tail {n f} (hf : @Partrec' n f) : @Partrec' n.succ fun v => f v.tail
-- .lake/packages/lean4/src/lean/Init/Data/AC.lean
theorem Context.evalList_sort_loop_swap
  (ctx : Context α)
  (h : Commutative ctx.op)
  (xs ys : List Nat)
  : evalList α ctx (sort.loop xs (y::ys)) = evalList α ctx (sort.loop (y::xs) ys)
-- Mathlib/Topology/Algebra/InfiniteSum/Constructions.lean
@[simp]
theorem summable_op : (Summable fun a ↦ op (f a)) ↔ Summable f
-- Mathlib/GroupTheory/MonoidLocalization/Order.lean
@[to_additive]
theorem mk_lt_mk : mk a₁ a₂ < mk b₁ b₂ ↔ ↑b₂ * a₁ < a₂ * b₁
-- Mathlib/Data/Set/Basic.lean
theorem pair_diff_left (hne : a ≠ b) : ({a, b} : Set α) \ {a} = {b}
-- .lake/packages/lean4/src/lean/Init/Data/Bool.lean
@[simp] theorem coe_false_iff_true  : ∀(a b : Bool), (a = false ↔ b) ↔ (!a) = b
-- Mathlib/CategoryTheory/Limits/Shapes/Biproducts.lean
/-- Note that as this lemma has an `if` in the statement, we include a `DecidableEq` argument.
This means you may not be able to `simp` using this lemma unless you `open scoped Classical`. -/
@[reassoc]
theorem biproduct.ι_π [DecidableEq J] (f : J → C) [HasBiproduct f] (j j' : J) :
    biproduct.ι f j ≫ biproduct.π f j' = if h : j = j' then eqToHom (congr_arg f h) else 0
-- Mathlib/SetTheory/Cardinal/Basic.lean
theorem mk_eq_nat_iff_finset {n : ℕ} :
    #α = n ↔ ∃ t : Finset α, (t : Set α) = univ ∧ t.card = n
-- Mathlib/Analysis/SpecialFunctions/Trigonometric/Bounds.lean
theorem le_tan {x : ℝ} (h1 : 0 ≤ x) (h2 : x < π / 2) : x ≤ tan x
-- Mathlib/CategoryTheory/Comma/Presheaf.lean
@[simp]
lemma map₁_val {F G : Cᵒᵖ ⥤ Type v} {η : F ⟶ A} {μ : G ⟶ A} {X : C}
    (s : yoneda.obj X ⟶ A) (u : OverArrows η s) (ε : F ⟶ G) (hε : ε ≫ μ = η) :
    (u.map₁ ε hε).val = ε.app _ u.val
-- Mathlib/NumberTheory/Harmonic/EulerMascheroni.lean
lemma eulerMascheroniSeq'_six_lt_two_thirds : eulerMascheroniSeq' 6 < 2 / 3
-- .lake/packages/batteries/Batteries/Data/Nat/Gcd.lean
theorem exists_coprime' (H : 0 < gcd m n) :
    ∃ g m' n', 0 < g ∧ Coprime m' n' ∧ m = m' * g ∧ n = n' * g
-- Mathlib/AlgebraicGeometry/Scheme.lean
@[simp]
lemma stalkMap_germ'_apply (U : Y.Opens) (x : X) (hx : f.val.base x ∈ U) (y) :
    f.stalkMap x (Y.presheaf.germ ⟨f.val.base x, hx⟩ y) =
      X.presheaf.germ (U := (Opens.map f.val.base).obj U) ⟨x, hx⟩ (f.val.c.app (op U) y)
-- Mathlib/Order/Hom/CompleteLattice.lean
/-- `CompleteLatticeHomClass F α β` states that `F` is a type of complete lattice morphisms.

You should extend this class when you extend `CompleteLatticeHom`. -/
class CompleteLatticeHomClass (F α β : Type*) [CompleteLattice α] [CompleteLattice β]
  [FunLike F α β] extends sInfHomClass F α β : Prop where
  /-- The proposition that members of `CompleteLatticeHomClass` commute with arbitrary
  suprema/joins. -/
  map_sSup (f : F) (s : Set α) : f (sSup s) = sSup (f '' s)
-- Mathlib/Algebra/Polynomial/Degree/Lemmas.lean
theorem leadingCoeff_comp (hq : natDegree q ≠ 0) :
    leadingCoeff (p.comp q) = leadingCoeff p * leadingCoeff q ^ natDegree p
-- Mathlib/NumberTheory/LSeries/RiemannZeta.lean
/-- The residue of `Λ(s)` at `s = 1` is equal to `1`. -/
lemma completedRiemannZeta_residue_one :
    Tendsto (fun s ↦ (s - 1) * completedRiemannZeta s) (𝓝[≠] 1) (𝓝 1)
-- Mathlib/Data/Sum/Interval.lean
@[simp]
lemma Icc_inr_inl : Icc (inrₗ b) (inlₗ a) = ∅
-- Mathlib/Data/Real/Hyperreal.lean
@[simp, norm_cast]
theorem coe_abs (x : ℝ) : ((|x| : ℝ) : ℝ*) = |↑x|
-- Mathlib/Analysis/SpecialFunctions/Integrals.lean
theorem integral_cos_pow_aux :
    (∫ x in a..b, cos x ^ (n + 2)) =
      (cos b ^ (n + 1) * sin b - cos a ^ (n + 1) * sin a + (n + 1) * ∫ x in a..b, cos x ^ n) -
        (n + 1) * ∫ x in a..b, cos x ^ (n + 2)
-- Mathlib/Topology/Order/OrderClosed.lean
theorem Filter.tendsto_nhds_min_right {l : Filter β} {a : α} (h : Tendsto f l (𝓝[<] a)) :
    Tendsto (fun i => min a (f i)) l (𝓝[<] a)
-- .lake/packages/lean4/src/lean/Init/Data/Nat/Bitwise/Lemmas.lean
theorem testBit_two_pow_add_eq (x i : Nat) : testBit (2^i + x) i = not (testBit x i)
-- Mathlib/Algebra/Lie/Weights/Basic.lean
lemma exists_ne_zero (χ : Weight R L M) :
    ∃ x ∈ weightSpace M χ, x ≠ 0
-- Mathlib/GroupTheory/Coxeter/Inversion.lean
theorem length_mul_left_ne (w : W) : ℓ (w * t) ≠ ℓ w
-- .lake/packages/lean4/src/lean/Init/Data/Nat/Basic.lean
protected theorem sub_lt_sub_left : ∀ {k m n : Nat}, k < m → k < n → m - n < m - k
-- .lake/packages/lean4/src/lean/Init/Data/Nat/Basic.lean
theorem add_one_le_of_lt {n m : Nat} (h : n < m) : n + 1 ≤ m
-- Mathlib/Logic/Function/Iterate.lean
theorem iterate_comm (f : α → α) (m n : ℕ) : f^[n]^[m] = f^[m]^[n]
-- Mathlib/Analysis/SpecialFunctions/Log/ENNRealLogExp.lean
@[simp] lemma EReal.log_exp (x : EReal) : log (exp x) = x
-- Mathlib/LinearAlgebra/Span.lean
theorem sup_toAddSubgroup {R M : Type*} [Ring R] [AddCommGroup M] [Module R M]
    (p p' : Submodule R M) : (p ⊔ p').toAddSubgroup = p.toAddSubgroup ⊔ p'.toAddSubgroup
-- Mathlib/Algebra/Module/Injective.lean
theorem ExtensionOfMaxAdjoin.extendIdealTo_eq (h : Module.Baer R Q) {y : N} (r : R)
    (hr : r • y ∈ (extensionOfMax i f).domain) : ExtensionOfMaxAdjoin.extendIdealTo i f h y r =
    (extensionOfMax i f).toLinearPMap ⟨r • y, hr⟩
-- Mathlib/Algebra/Associated/Basic.lean
theorem Prime.dvd_prime_iff_associated [CancelCommMonoidWithZero α] {p q : α} (pp : Prime p)
    (qp : Prime q) : p ∣ q ↔ Associated p q
-- Mathlib/ModelTheory/Substructures.lean
theorem closure_eq_of_le (h₁ : s ⊆ S) (h₂ : S ≤ closure L s) : closure L s = S
-- Mathlib/Tactic/NormNum/LegendreSymbol.lean
/-- Turn a Legendre symbol into a Jacobi symbol. -/
theorem LegendreSym.to_jacobiSym (p : ℕ) (pp : Fact p.Prime) (a r : ℤ)
    (hr : IsInt (jacobiSym a p) r) : IsInt (legendreSym p a) r
-- Mathlib/LinearAlgebra/TensorProduct/Basic.lean
@[simp] theorem lTensor_refl : (refl R N).lTensor M = refl R _
-- Mathlib/Algebra/Homology/ShortComplex/PreservesHomology.lean
lemma LeftHomologyData.mapHomologyIso_eq [S.HasHomology]
    [(S.map F).HasHomology] [F.PreservesLeftHomologyOf S] :
    S.mapHomologyIso F = (hl.map F).homologyIso ≪≫ F.mapIso hl.homologyIso.symm
-- Mathlib/RingTheory/EssentialFiniteness.lean
lemma EssFiniteType.adjoin_mem_finset [EssFiniteType R S] :
    adjoin R { x : subalgebra R S | x.1 ∈ finset R S } = ⊤
-- Mathlib/Geometry/Manifold/ContMDiff/Basic.lean
/-- The composition of `C^∞` functions is `C^∞`. -/
nonrec theorem SmoothOn.comp' {t : Set M'} {g : M' → M''} (hg : SmoothOn I' I'' g t)
    (hf : SmoothOn I I' f s) : SmoothOn I I'' (g ∘ f) (s ∩ f ⁻¹' t)
-- Mathlib/Analysis/ConstantSpeed.lean
theorem HasConstantSpeedOnWith.hasLocallyBoundedVariationOn (h : HasConstantSpeedOnWith f s l) :
    LocallyBoundedVariationOn f s
-- Mathlib/Algebra/Category/ModuleCat/Presheaf.lean
@[simp]
lemma toPresheafOfModules_obj (X : Cᵒᵖ) :
    M.toPresheafOfModules.obj X = (M.obj X).carrier
-- Mathlib/Topology/Maps/Basic.lean
theorem openEmbedding_iff_continuous_injective_open :
    OpenEmbedding f ↔ Continuous f ∧ Injective f ∧ IsOpenMap f
-- Mathlib/Algebra/Order/Interval/Set/Group.lean
theorem sub_mem_Ioc_iff_right : a - b ∈ Set.Ioc c d ↔ b ∈ Set.Ico (a - d) (a - c)
-- Mathlib/RingTheory/PowerSeries/Trunc.lean
theorem coeff_trunc (m) (n) (φ : R⟦X⟧) :
    (trunc n φ).coeff m = if m < n then coeff R m φ else 0
-- Mathlib/Algebra/Group/Subgroup/Basic.lean
@[to_additive le_prod_iff]
theorem le_prod_iff {H : Subgroup G} {K : Subgroup N} {J : Subgroup (G × N)} :
    J ≤ H.prod K ↔ map (MonoidHom.fst G N) J ≤ H ∧ map (MonoidHom.snd G N) J ≤ K
-- Mathlib/Probability/Kernel/Disintegration/CondCdf.lean
theorem IicSnd_univ (r : ℝ) : ρ.IicSnd r univ = ρ (univ ×ˢ Iic r)
-- Mathlib/Dynamics/OmegaLimit.lean
/-- The ω-limit of a nonempty set w.r.t. a nontrivial filter is nonempty. -/
theorem nonempty_omegaLimit_of_isCompact_absorbing [NeBot f] {c : Set β} (hc₁ : IsCompact c)
    (hc₂ : ∃ v ∈ f, closure (image2 ϕ v s) ⊆ c) (hs : s.Nonempty) : (ω f ϕ s).Nonempty
-- Mathlib/Algebra/Module/LinearMap/Defs.lean
@[simp, norm_cast]
lemma coe_coe {F : Type*} [FunLike F M M₃] [SemilinearMapClass F σ M M₃] {f : F} :
    ⇑(f : M →ₛₗ[σ] M₃) = f
-- Mathlib/Combinatorics/Quiver/Symmetric.lean
@[simp]
theorem reverse_inj [h : HasInvolutiveReverse V] {a b : V}
    (f g : a ⟶ b) : reverse f = reverse g ↔ f = g
-- Mathlib/SetTheory/Ordinal/FixedPoint.lean
theorem nfpBFamily_monotone (hf : ∀ i hi, Monotone (f i hi)) : Monotone (nfpBFamily.{u, v} o f)
-- Mathlib/MeasureTheory/Function/SimpleFuncDenseLp.lean
theorem memℒp_approxOn [BorelSpace E] {f : β → E} {μ : Measure β} (fmeas : Measurable f)
    (hf : Memℒp f p μ) {s : Set E} {y₀ : E} (h₀ : y₀ ∈ s) [SeparableSpace s]
    (hi₀ : Memℒp (fun _ => y₀) p μ) (n : ℕ) : Memℒp (approxOn f fmeas s y₀ h₀ n) p μ
-- Mathlib/Analysis/SpecialFunctions/Arsinh.lean
@[simp]
theorem arsinh_zero : arsinh 0 = 0
-- Mathlib/RingTheory/Polynomial/Cyclotomic/Eval.lean
/-- Cyclotomic polynomials are always positive on inputs larger than one.
Similar to `cyclotomic_pos` but with the condition on the input rather than index of the
cyclotomic polynomial. -/
theorem cyclotomic_pos' (n : ℕ) {R} [LinearOrderedCommRing R] {x : R} (hx : 1 < x) :
    0 < eval x (cyclotomic n R)
-- Mathlib/Data/Nat/Cast/Basic.lean
@[simp, norm_cast]
theorem Nat.cast_id (n : ℕ) : n.cast = n
-- Mathlib/Topology/MetricSpace/Dilation.lean
theorem copy_eq_self (f : α →ᵈ β) {f' : α → β} (h : f' = f) : f.copy f' h = f
-- .lake/packages/lean4/src/lean/Init/Data/List/Lemmas.lean
@[simp] theorem mem_reverseAux {x : α} : ∀ {as bs}, x ∈ reverseAux as bs ↔ x ∈ as ∨ x ∈ bs