ruc-ai4math/mathlib_handler_benchmark_410 huggingface dataset:
-- Mathlib/Data/Int/AbsoluteValue.lean
@[simp]
theorem AbsoluteValue.map_units_int (abv : AbsoluteValue ℤ S) (x : ℤˣ) : abv x = 1
-- Mathlib/NumberTheory/NumberField/Units/DirichletTheorem.lean
/-- **Dirichlet Unit Theorem**. Any unit `x` of `𝓞 K` can be written uniquely as the product of
a root of unity and powers of the units of the fundamental system `fundSystem`. -/
theorem exist_unique_eq_mul_prod (x : (𝓞 K)ˣ) : ∃! ζe : torsion K × (Fin (rank K) → ℤ),
    x = ζe.1 * ∏ i, (fundSystem K i) ^ (ζe.2 i)
-- Mathlib/NumberTheory/NumberField/Embeddings.lean
lemma isReal_mk_iff {φ : K →+* ℂ} :
    IsReal (mk φ) ↔ ComplexEmbedding.IsReal φ
-- Mathlib/Algebra/CubicDiscriminant.lean
theorem of_b_eq_zero (ha : P.a = 0) (hb : P.b = 0) : P.toPoly = C P.c * X + C P.d
-- Mathlib/Data/Multiset/Basic.lean
theorem replicate_left_injective (a : α) : Injective (replicate · a)
-- Mathlib/Data/Matrix/Notation.lean
theorem mul_val_succ [Fintype n'] (A : Matrix (Fin m.succ) n' α) (B : Matrix n' o' α) (i : Fin m)
    (j : o') : (A * B) i.succ j = (of (vecTail (of.symm A)) * B) i j
-- Mathlib/Topology/Sets/Compacts.lean
@[simp]
theorem coe_prod (K : NonemptyCompacts α) (L : NonemptyCompacts β) :
    (K.prod L : Set (α × β)) = (K : Set α) ×ˢ (L : Set β)
-- Mathlib/Algebra/Polynomial/Mirror.lean
theorem mirror_C (a : R) : (C a).mirror = C a
-- Mathlib/Data/Fintype/Card.lean
@[simp]
theorem Fintype.card_punit : Fintype.card PUnit = 1
-- Mathlib/MeasureTheory/Covering/Differentiation.lean
theorem limRatioMeas_measurable : Measurable (v.limRatioMeas hρ)
-- Mathlib/Algebra/Category/CoalgebraCat/ComonEquivalence.lean
/-- A comonoid object in the category of `R`-modules has a natural comultiplication
and counit. -/
@[simps]
instance ofComonObjCoalgebraStruct (X : Comon_ (ModuleCat R)) :
    CoalgebraStruct R X.X
-- Mathlib/Logic/Equiv/PartialEquiv.lean
@[simp, mfld_simps]
theorem transEquiv_transEquiv (e : PartialEquiv α β) (f' : β ≃ γ) (f'' : γ ≃ δ) :
    (e.transEquiv f').transEquiv f'' = e.transEquiv (f'.trans f'')
-- Mathlib/CategoryTheory/Yoneda.lean
lemma yonedaEquiv_yoneda_map {X Y : C} (f : X ⟶ Y) : yonedaEquiv (yoneda.map f) = f
-- Mathlib/Algebra/Associated/Basic.lean
theorem exists_rep [Monoid α] (a : Associates α) : ∃ a0 : α, Associates.mk a0 = a
-- Mathlib/CategoryTheory/FintypeCat.lean
@[simp]
lemma inv_hom_id_apply {X Y : FintypeCat} (f : X ≅ Y) (y : Y) : f.hom (f.inv y) = y
-- Mathlib/RingTheory/Polynomial/Cyclotomic/Basic.lean
/-- `cyclotomic n` is monic. -/
theorem cyclotomic.monic (n : ℕ) (R : Type*) [Ring R] : (cyclotomic n R).Monic
-- Mathlib/LinearAlgebra/AffineSpace/AffineMap.lean
@[simp]
theorem left_vsub_lineMap (p₀ p₁ : P1) (c : k) : p₀ -ᵥ lineMap p₀ p₁ c = c • (p₀ -ᵥ p₁)
-- Mathlib/Order/BooleanAlgebra.lean
theorem sdiff_lt_sdiff_right (h : x < y) (hz : z ≤ x) : x \ z < y \ z
-- Mathlib/Geometry/Euclidean/Inversion/Basic.lean
protected nonrec theorem ContinuousWithinAt.inversion (hc : ContinuousWithinAt c s a₀)
    (hR : ContinuousWithinAt R s a₀) (hx : ContinuousWithinAt x s a₀) (hne : x a₀ ≠ c a₀) :
    ContinuousWithinAt (fun a ↦ inversion (c a) (R a) (x a)) s a₀
-- Mathlib/RingTheory/PowerSeries/Trunc.lean
lemma trunc_X_of {n : ℕ} (hn : 2 ≤ n) : trunc n X = (Polynomial.X : R[X])
-- Mathlib/CategoryTheory/Monoidal/Opposite.lean
@[simp] lemma op_inv_leftUnitor (X : C) : (λ_ X).inv.op = (λ_ (op X)).hom
-- Mathlib/Algebra/Polynomial/Degree/Definitions.lean
theorem natDegree_lt_natDegree_iff (hp : p ≠ 0) : natDegree p < natDegree q ↔ degree p < degree q
-- Mathlib/Combinatorics/Additive/AP/Three/Defs.lean
theorem rothNumberNat_def (n : ℕ) : rothNumberNat n = addRothNumber (range n)
-- Mathlib/Analysis/BoxIntegral/Partition/Basic.lean
@[simp]
theorem mem_single {J'} (h : J ≤ I) : J' ∈ single I J h ↔ J' = J
-- Mathlib/Data/List/Lex.lean
theorem ne_iff {l₁ l₂ : List α} (H : length l₁ ≤ length l₂) : Lex (· ≠ ·) l₁ l₂ ↔ l₁ ≠ l₂
-- Mathlib/Data/Finset/Lattice.lean
@[simp]
theorem min_insert {a : α} {s : Finset α} : (insert a s).min = min (↑a) s.min
-- Mathlib/Data/Seq/Computation.lean
@[simp] lemma liftRelAux_inl_inl {a : α} {b : β} :
  LiftRelAux R C (Sum.inl a) (Sum.inl b) = R a b
-- Mathlib/Algebra/MvPolynomial/Rename.lean
@[simp]
theorem renameEquiv_trans (e : σ ≃ τ) (f : τ ≃ α) :
    (renameEquiv R e).trans (renameEquiv R f) = renameEquiv R (e.trans f)
-- Mathlib/Analysis/Normed/Field/Basic.lean
/-- A normed commutative ring is a commutative ring endowed with a norm which satisfies
the inequality `‖x y‖ ≤ ‖x‖ ‖y‖`. -/
class NormedCommRing (α : Type*) extends NormedRing α where
  /-- Multiplication is commutative. -/
  mul_comm : ∀ x y : α, x * y = y * x
-- Mathlib/Order/BoundedOrder.lean
theorem StrictMono.minimal_preimage_bot [LinearOrder α] [PartialOrder β] [OrderBot β] {f : α → β}
    (H : StrictMono f) {a} (h_bot : f a = ⊥) (x : α) : a ≤ x
-- .lake/packages/lean4/src/lean/Init/Data/Nat/Gcd.lean
theorem dvd_gcd_iff : k ∣ gcd m n ↔ k ∣ m ∧ k ∣ n
-- Mathlib/Analysis/Calculus/FDeriv/Measurable.lean
/-- Harder inclusion: at a point in `D f K`, the function `f` has a derivative, in `K`. -/
theorem D_subset_differentiable_set {K : Set (E →L[𝕜] F)} (hK : IsComplete K) :
    D f K ⊆ { x | DifferentiableAt 𝕜 f x ∧ fderiv 𝕜 f x ∈ K }
-- Mathlib/Topology/Support.lean
theorem HasCompactSupport.mul_left (hf : HasCompactSupport f') : HasCompactSupport (f * f')
-- Mathlib/Data/List/ProdSigma.lean
@[simp]
theorem sigma_cons (a : α) (l₁ : List α) (l₂ : ∀ a, List (σ a)) :
    (a :: l₁).sigma l₂ = map (Sigma.mk a) (l₂ a) ++ l₁.sigma l₂
-- Mathlib/Order/CompleteLattice.lean
theorem isLUB_sSup (s : Set α) : IsLUB s (sSup s)
-- Mathlib/Data/Int/Defs.lean
protected lemma le_antisymm_iff : a = b ↔ a ≤ b ∧ b ≤ a
-- Mathlib/Algebra/Order/Interval/Set/Group.lean
theorem add_mem_Ico_iff_left : a + b ∈ Set.Ico c d ↔ a ∈ Set.Ico (c - b) (d - b)
-- Mathlib/Computability/Language.lean
theorem one_def : (1 : Language α) = ({[]} : Set (List α))
-- Mathlib/Algebra/AddConstMap/Basic.lean
theorem map_add_int [AddGroupWithOne G] [AddGroupWithOne H] [AddConstMapClass F G H 1 1]
    (f : F) (x : G) (n : ℤ) : f (x + n) = f x + n
-- Mathlib/MeasureTheory/Measure/Typeclasses.lean
theorem inf_of_right (h : μ.FiniteAtFilter g) : μ.FiniteAtFilter (f ⊓ g)
-- Mathlib/Analysis/Calculus/FormalMultilinearSeries.lean
protected theorem ne_iff {p q : FormalMultilinearSeries 𝕜 E F} : p ≠ q ↔ ∃ n, p n ≠ q n
-- Mathlib/RingTheory/Kaehler/CotangentComplex.lean
lemma Cotangent.map_sub_map (f g : Hom P P') :
    map f - map g = (f.sub g) ∘ₗ P.cotangentComplex
-- Mathlib/Topology/MetricSpace/Bounded.lean
@[simp]
theorem tendsto_dist_left_atTop_iff (c : α) {f : β → α} {l : Filter β} :
    Tendsto (fun x ↦ dist c (f x)) l atTop ↔ Tendsto f l (cobounded α)
-- Mathlib/MeasureTheory/Integral/VitaliCaratheodory.lean
/-- Given a measurable function `f` with values in `ℝ≥0`, there exists a lower semicontinuous
function `g ≥ f` with integral arbitrarily close to that of `f`. Formulation in terms of
`lintegral`.
Auxiliary lemma for Vitali-Carathéodory theorem `exists_lt_lower_semicontinuous_integral_lt`. -/
theorem exists_le_lowerSemicontinuous_lintegral_ge (f : α → ℝ≥0∞) (hf : Measurable f) {ε : ℝ≥0∞}
    (εpos : ε ≠ 0) :
    ∃ g : α → ℝ≥0∞,
      (∀ x, f x ≤ g x) ∧ LowerSemicontinuous g ∧ (∫⁻ x, g x ∂μ) ≤ (∫⁻ x, f x ∂μ) + ε
-- Mathlib/Topology/Algebra/Order/LiminfLimsup.lean
theorem Filter.Tendsto.isBoundedUnder_ge (h : Tendsto u f (𝓝 a)) : f.IsBoundedUnder (· ≥ ·) u
-- Mathlib/Algebra/Lie/Quotient.lean
@[simp]
theorem range_mk' : LieModuleHom.range (mk' N) = ⊤
-- Mathlib/ModelTheory/Basic.lean
@[simp]
theorem id_apply (x : M) : id L M x = x
-- Mathlib/RingTheory/Ideal/Basic.lean
protected theorem add_mem : a ∈ I → b ∈ I → a + b ∈ I
-- Mathlib/Logic/Equiv/Basic.lean
theorem update_apply_equiv_apply [DecidableEq α'] [DecidableEq α] (f : α → β)
    (g : α' ≃ α) (a : α) (v : β) (a' : α') : update f a v (g a') = update (f ∘ g) (g.symm a) v a'
-- Mathlib/RingTheory/MvPowerSeries/Inverse.lean
theorem coeff_inv [DecidableEq σ] (n : σ →₀ ℕ) (φ : MvPowerSeries σ k) :
    coeff k n φ⁻¹ =
      if n = 0 then (constantCoeff σ k φ)⁻¹
      else
        -(constantCoeff σ k φ)⁻¹ *
          ∑ x ∈ antidiagonal n, if x.2 < n then coeff k x.1 φ * coeff k x.2 φ⁻¹ else 0
-- Mathlib/Order/Filter/Basic.lean
theorem _root_.Function.Semiconj.filter_comap {f : α → β} {ga : α → α} {gb : β → β}
    (h : Function.Semiconj f ga gb) : Function.Semiconj (comap f) (comap gb) (comap ga)
-- Mathlib/Algebra/Ring/Prod.lean
/-- A ring `R` is isomorphic to `R × S` when `S` is the zero ring -/
@[simps]
def prodZeroRing : R ≃+* R × S
-- Mathlib/Analysis/RCLike/Basic.lean
@[rclike_simps]
theorem smul_im (r : ℝ) (z : K) : im (r • z) = r * im z
-- Mathlib/Analysis/Calculus/MeanValue.lean
/-- General fencing theorem for continuous functions with an estimate on the derivative.
Let `f` and `B` be continuous functions on `[a, b]` such that

* `f a ≤ B a`;
* `B` has right derivative `B'` at every point of `[a, b)`;
* for each `x ∈ [a, b)` the right-side limit inferior of `(f z - f x) / (z - x)`
  is bounded above by a function `f'`;
* we have `f' x < B' x` whenever `f x = B x`.

Then `f x ≤ B x` everywhere on `[a, b]`. -/
theorem image_le_of_liminf_slope_right_lt_deriv_boundary' {f f' : ℝ → ℝ} {a b : ℝ}
    (hf : ContinuousOn f (Icc a b))
    -- `hf'` actually says `liminf (f z - f x) / (z - x) ≤ f' x`
    (hf' : ∀ x ∈ Ico a b, ∀ r, f' x < r → ∃ᶠ z in 𝓝[>] x, slope f x z < r)
    {B B' : ℝ → ℝ} (ha : f a ≤ B a) (hB : ContinuousOn B (Icc a b))
    (hB' : ∀ x ∈ Ico a b, HasDerivWithinAt B (B' x) (Ici x) x)
    (bound : ∀ x ∈ Ico a b, f x = B x → f' x < B' x) : ∀ ⦃x⦄, x ∈ Icc a b → f x ≤ B x
-- Mathlib/Geometry/Manifold/PartitionOfUnity.lean
theorem sum_eq_one {x} (hx : x ∈ s) : ∑ᶠ i, f i x = 1
-- Mathlib/Analysis/Calculus/ContDiff/Basic.lean
nonrec theorem ContDiffAt.div [CompleteSpace 𝕜] {f g : E → 𝕜} {n} (hf : ContDiffAt 𝕜 n f x)
    (hg : ContDiffAt 𝕜 n g x) (hx : g x ≠ 0) : ContDiffAt 𝕜 n (fun x => f x / g x) x
-- Mathlib/CategoryTheory/Monad/Algebra.lean
/-- The free functor from the Eilenberg-Moore category, constructing an algebra for any object. -/
@[simps]
def free : C ⥤ Algebra T
-- Mathlib/Order/Zorn.lean
theorem zorn_partialOrder (h : ∀ c : Set α, IsChain (· ≤ ·) c → BddAbove c) :
    ∃ m : α, ∀ a, m ≤ a → a = m
-- Mathlib/SetTheory/Game/PGame.lean
theorem Equiv.le {x y : PGame} (h : x ≈ y) : x ≤ y
-- Mathlib/Geometry/Manifold/Sheaf/Smooth.lean
@[simp] lemma smoothSheafCommRing.eval_germ (U : Opens M) (x : U)
    (f : (smoothSheafCommRing IM I M R).presheaf.obj (op U)) :
    smoothSheafCommRing.eval IM I M R x ((smoothSheafCommRing IM I M R).presheaf.germ x f)
    = f x
-- Mathlib/Order/Bounded.lean
theorem bounded_gt_inter_not_gt [SemilatticeInf α] (a : α) :
    Bounded (· > ·) (s ∩ { b | ¬a < b }) ↔ Bounded (· > ·) s
-- Mathlib/Data/Nat/Factorial/DoubleFactorial.lean
theorem doubleFactorial_add_two (n : ℕ) : (n + 2)‼ = (n + 2) * n‼
-- Mathlib/FieldTheory/Galois.lean
theorem IsGalois.of_algEquiv [IsGalois F E] (f : E ≃ₐ[F] E') : IsGalois F E'
-- Mathlib/SetTheory/Ordinal/Arithmetic.lean
theorem lsub_le {ι} {f : ι → Ordinal} {a} : (∀ i, f i < a) → lsub f ≤ a
-- Mathlib/RingTheory/FinitePresentation.lean
/-- If `f : A →ₐ[R] B` is a surjection between finitely-presented `R`-algebras, then the kernel of
`f` is finitely generated. -/
theorem ker_fG_of_surjective (f : A →ₐ[R] B) (hf : Function.Surjective f)
    [FinitePresentation R A] [FinitePresentation R B] : f.toRingHom.ker.FG
-- Mathlib/Order/UpperLower/Basic.lean
@[simp]
theorem upperClosure_sUnion (S : Set (Set α)) : upperClosure (⋃₀ S) = ⨅ s ∈ S, upperClosure s
-- Mathlib/Logic/Function/Iterate.lean
theorem iterate_fixed {x} (h : f x = x) (n : ℕ) : f^[n] x = x
-- Mathlib/Data/ENNReal/Inv.lean
protected theorem half_le_self : a / 2 ≤ a
-- Mathlib/Data/Nat/Digits.lean
theorem ofDigits_neg_one :
    ∀ L : List ℕ, ofDigits (-1 : ℤ) L = (L.map fun n : ℕ => (n : ℤ)).alternatingSum
-- Mathlib/Topology/Algebra/Module/Multilinear/Basic.lean
theorem map_piecewise_smul [DecidableEq ι] (c : ι → R) (m : ∀ i, M₁ i) (s : Finset ι) :
    f (s.piecewise (fun i => c i • m i) m) = (∏ i ∈ s, c i) • f m
-- Mathlib/AlgebraicTopology/DoldKan/GammaCompN.lean
@[simp]
theorem N₁Γ₀_hom_app_f_f (K : ChainComplex C ℕ) (n : ℕ) :
    (N₁Γ₀.hom.app K).f.f n = (Γ₀.splitting K).toKaroubiNondegComplexIsoN₁.inv.f.f n
-- Mathlib/Topology/Algebra/Module/Multilinear/Basic.lean
@[simp]
theorem coe_coe : (f.toMultilinearMap : (∀ i, M₁ i) → M₂) = f
-- Mathlib/Data/Finsupp/NeLocus.lean
theorem subset_mapRange_neLocus [DecidableEq N] [Zero N] [DecidableEq M] [Zero M] (f g : α →₀ N)
    {F : N → M} (F0 : F 0 = 0) : (f.mapRange F F0).neLocus (g.mapRange F F0) ⊆ f.neLocus g
-- Mathlib/RingTheory/Localization/FractionRing.lean
/-- A `CommRing` `K` which is the localization of an integral domain `R` at `R - {0}` is an
integral domain. -/
protected theorem isDomain : IsDomain K
-- Mathlib/CategoryTheory/Limits/HasLimits.lean
@[reassoc (attr := simp)]
theorem colimit.ι_post (j : J) :
    colimit.ι (F ⋙ G) j ≫ colimit.post F G = G.map (colimit.ι F j)
-- Mathlib/Topology/Instances/EReal.lean
theorem continuousOn_toReal : ContinuousOn EReal.toReal ({⊥, ⊤}ᶜ : Set EReal)
-- Mathlib/Analysis/Analytic/IsolatedZeros.lean
theorem locally_zero_iff (hp : HasFPowerSeriesAt f p z₀) : (∀ᶠ z in 𝓝 z₀, f z = 0) ↔ p = 0
-- Mathlib/Topology/Sheaves/Skyscraper.lean
theorem to_skyscraper_fromStalk {𝓕 : Presheaf C X} {c : C} (f : 𝓕 ⟶ skyscraperPresheaf p₀ c) :
    toSkyscraperPresheaf p₀ (fromStalk _ f) = f
-- Mathlib/Topology/Algebra/Valued/ValuedField.lean
@[simp]
theorem valuedCompletion_apply (x : K) : Valued.v (x : hat K) = v x
-- Mathlib/Algebra/Ring/Parity.lean
lemma _root_.Odd.not_two_dvd_nat (h : Odd n) : ¬(2 ∣ n)
-- Mathlib/Data/Nat/Periodic.lean
theorem periodic_coprime (a : ℕ) : Periodic (Coprime a) a
-- Mathlib/Data/Nat/Multiplicity.lean
theorem multiplicity_two_factorial_lt : ∀ {n : ℕ} (_ : n ≠ 0), multiplicity 2 n ! < n
-- Mathlib/Data/Set/Basic.lean
@[simp]
theorem union_subset_iff {s t u : Set α} : s ∪ t ⊆ u ↔ s ⊆ u ∧ t ⊆ u
-- Mathlib/MeasureTheory/Function/L1Space.lean
@[simp]
theorem hasFiniteIntegral_neg_iff {f : α → β} : HasFiniteIntegral (-f) μ ↔ HasFiniteIntegral f μ
-- Mathlib/Analysis/Calculus/FDeriv/Add.lean
@[fun_prop]
theorem DifferentiableWithinAt.sub (hf : DifferentiableWithinAt 𝕜 f s x)
    (hg : DifferentiableWithinAt 𝕜 g s x) : DifferentiableWithinAt 𝕜 (fun y => f y - g y) s x
-- Mathlib/MeasureTheory/Function/Jacobian.lean
theorem lintegral_abs_det_fderiv_le_addHaar_image_aux1 (hs : MeasurableSet s)
    (hf' : ∀ x ∈ s, HasFDerivWithinAt f (f' x) s x) (hf : InjOn f s) {ε : ℝ≥0} (εpos : 0 < ε) :
    (∫⁻ x in s, ENNReal.ofReal |(f' x).det| ∂μ) ≤ μ (f '' s) + 2 * ε * μ s
-- Mathlib/Order/BoundedOrder.lean
@[simp]
theorem bot_le : ⊥ ≤ a
-- Mathlib/Algebra/Group/Submonoid/Membership.lean
/-- The `AddSubmonoid` generated by an element of an `AddMonoid` equals the set of
natural number multiples of the element. -/
theorem mem_closure_singleton {x y : A} : y ∈ closure ({x} : Set A) ↔ ∃ n : ℕ, n • x = y
-- Mathlib/AlgebraicGeometry/Restrict.lean
@[reassoc]
theorem Scheme.restrictFunctor_map_ofRestrict {U V : X.Opens} (i : U ⟶ V) :
    (X.restrictFunctor.map i).1 ≫ V.ι = U.ι
-- Mathlib/Data/ENNReal/Basic.lean
theorem toNNReal_eq_toNNReal_iff (x y : ℝ≥0∞) :
    x.toNNReal = y.toNNReal ↔ x = y ∨ x = 0 ∧ y = ⊤ ∨ x = ⊤ ∧ y = 0
-- Mathlib/Order/Interval/Set/Basic.lean
@[simp]
theorem Ioc_union_Ioc_symm : Ioc a b ∪ Ioc b a = Ioc (min a b) (max a b)
-- Mathlib/MeasureTheory/PiSystem.lean
theorem isPiSystem_Ioi : IsPiSystem (range Ioi : Set (Set α))
-- Mathlib/Topology/UniformSpace/AbstractCompletion.lean
@[elab_as_elim]
theorem induction_on {p : hatα → Prop} (a : hatα) (hp : IsClosed { a | p a }) (ih : ∀ a, p (ι a)) :
    p a
-- Mathlib/CategoryTheory/EpiMono.lean
/-- A constructor for `IsSplitEpi f` taking a `SplitEpi f` as an argument -/
theorem IsSplitEpi.mk' {X Y : C} {f : X ⟶ Y} (se : SplitEpi f) : IsSplitEpi f
-- .lake/packages/lean4/src/lean/Init/Data/BitVec/Bitblast.lean
theorem getLsb_add_add_bool {i : Nat} (i_lt : i < w) (x y : BitVec w) (c : Bool) :
    getLsb (x + y + zeroExtend w (ofBool c)) i =
      Bool.xor (getLsb x i) (Bool.xor (getLsb y i) (carry i x y c))
-- Mathlib/Order/UpperLower/Basic.lean
@[simp] lemma erase_lt : s.erase a < s ↔ a ∈ s
-- Mathlib/Order/Bounds/Basic.lean
lemma bddBelow_pi {s : Set (∀ a, π a)} :
    BddBelow s ↔ ∀ a, BddBelow (Function.eval a '' s)
-- Mathlib/Algebra/Polynomial/Div.lean
@[simp]
theorem divByMonic_zero (p : R[X]) : p /ₘ 0 = 0
-- Mathlib/CategoryTheory/Limits/Shapes/Equalizers.lean
@[simp]
theorem Cofork.app_zero_eq_comp_π_left (s : Cofork f g) : s.ι.app zero = f ≫ s.π
-- .lake/packages/lean4/src/lean/Init/Data/BitVec/Folds.lean
/--
Correctness theorem for `iunfoldr`.
-/
theorem iunfoldr_replace
    {f : Fin w → α → α × Bool} (state : Nat → α) (value : BitVec w) (a : α)
    (init : state 0 = a)
    (step : ∀(i : Fin w), f i (state i.val) = (state (i.val+1), value.getLsb i.val)) :
    iunfoldr f a = (state w, value)
-- Mathlib/Data/PEquiv.lean
@[simp]
theorem bot_apply (a : α) : (⊥ : α ≃. β) a = none
-- Mathlib/Order/UpperLower/Basic.lean
lemma IsLowerSet.erase (hs : IsLowerSet s) (has : ∀ b ∈ s, a ≤ b → b = a) : IsLowerSet (s \ {a})
-- Mathlib/Data/Finsupp/Defs.lean
theorem support_single_disjoint {b' : M} (hb : b ≠ 0) (hb' : b' ≠ 0) {i j : α} :
    Disjoint (single i b).support (single j b').support ↔ i ≠ j
-- Mathlib/CategoryTheory/Monoidal/FunctorCategory.lean
/-- (An auxiliary definition for `functorCategoryMonoidal`.) -/
@[simps]
def whiskerLeft (F) (β : F' ⟶ G') : tensorObj F F' ⟶ tensorObj F G'
-- Mathlib/Analysis/Convex/Join.lean
protected theorem Convex.convexHull_union (hs : Convex 𝕜 s) (ht : Convex 𝕜 t) (hs₀ : s.Nonempty)
    (ht₀ : t.Nonempty) : convexHull 𝕜 (s ∪ t) = convexJoin 𝕜 s t
-- Mathlib/Algebra/Quaternion.lean
@[simp] theorem one_imI : (1 : ℍ[R]).imI = 0
-- Mathlib/Order/Hom/Lattice.lean
@[simp]
theorem withTop_id : (InfHom.id α).withTop = InfTopHom.id _
-- Mathlib/MeasureTheory/OuterMeasure/Operations.lean
theorem map_top (f : α → β) : map f ⊤ = restrict (range f) ⊤
-- Mathlib/CategoryTheory/Grothendieck.lean
theorem map_map {α : F ⟶ G} {X Y : Grothendieck F} {f : X ⟶ Y} :
    (Grothendieck.map α).map f =
    ⟨f.base, (eqToHom (α.naturality f.base).symm).app X.fiber ≫ (α.app Y.base).map f.fiber⟩
-- Mathlib/Analysis/Normed/Group/Hom.lean
theorem incl_range (s : AddSubgroup V₁) : (incl s).range = s
-- Mathlib/SetTheory/Ordinal/Arithmetic.lean
theorem le_add_sub (a b : Ordinal) : a ≤ b + (a - b)
-- Mathlib/Analysis/Asymptotics/Asymptotics.lean
theorem IsBigOWith.congr' (h : IsBigOWith c₁ l f₁ g₁) (hc : c₁ = c₂) (hf : f₁ =ᶠ[l] f₂)
    (hg : g₁ =ᶠ[l] g₂) : IsBigOWith c₂ l f₂ g₂
-- Mathlib/MeasureTheory/Measure/MeasureSpace.lean
theorem measure_if {x : β} {t : Set β} {s : Set α} :
    μ (if x ∈ t then s else ∅) = indicator t (fun _ => μ s) x
-- Mathlib/Analysis/Calculus/ContDiff/Defs.lean
/-- The iterated differential within a set `s` at a point `x` is not modified if one intersects
`s` with a neighborhood of `x`. -/
theorem iteratedFDerivWithin_inter {n : ℕ} (hu : u ∈ 𝓝 x) :
    iteratedFDerivWithin 𝕜 n f (s ∩ u) x = iteratedFDerivWithin 𝕜 n f s x
-- Mathlib/CategoryTheory/Limits/Shapes/Kernels.lean
/-- Given a commutative diagram
    X --f--> Y --g--> Z
    |        |        |
    |        |        |
    v        v        v
    X' -f'-> Y' -g'-> Z'
with horizontal arrows composing to zero,
then we obtain a commutative square
   cokernel f ---> Z
   |               |
   | cokernel.map  |
   |               |
   v               v
   cokernel f' --> Z'
-/
theorem cokernel.map_desc {X Y Z X' Y' Z' : C} (f : X ⟶ Y) [HasCokernel f] (g : Y ⟶ Z)
    (w : f ≫ g = 0) (f' : X' ⟶ Y') [HasCokernel f'] (g' : Y' ⟶ Z') (w' : f' ≫ g' = 0) (p : X ⟶ X')
    (q : Y ⟶ Y') (r : Z ⟶ Z') (h₁ : f ≫ q = p ≫ f') (h₂ : g ≫ r = q ≫ g') :
    cokernel.map f f' p q h₁ ≫ cokernel.desc f' g' w' = cokernel.desc f g w ≫ r
-- Mathlib/Data/Multiset/Basic.lean
theorem map_nsmul (f : α → β) (n : ℕ) (s) : map f (n • s) = n • map f s
-- Mathlib/Algebra/Polynomial/Roots.lean
theorem mem_aroots' [CommRing S] [IsDomain S] [Algebra T S] {p : T[X]} {a : S} :
    a ∈ p.aroots S ↔ p.map (algebraMap T S) ≠ 0 ∧ aeval a p = 0
-- Mathlib/Combinatorics/HalesJewett.lean
lemma coe_apply (l : Line α ι) (x : α) (i : ι) : l x i = (l.idxFun i).getD x
-- Mathlib/Order/SymmDiff.lean
theorem Disjoint.le_symmDiff_sup_symmDiff_left (h : Disjoint a b) : c ≤ a ∆ c ⊔ b ∆ c
-- Mathlib/AlgebraicTopology/SimplicialObject.lean
@[reassoc (attr := simp)]
theorem σ_naturality {X' X : CosimplicialObject C} (f : X ⟶ X') {n : ℕ} (i : Fin (n + 1)) :
    X.σ i ≫ f.app (SimplexCategory.mk n) = f.app (SimplexCategory.mk (n + 1)) ≫ X'.σ i
-- Mathlib/Algebra/Category/ModuleCat/Sheaf.lean
lemma unitHomEquiv_symm_comp {M N : SheafOfModules.{u} R} (s : M.sections) (p : M ⟶ N) :
    M.unitHomEquiv.symm s ≫ p = N.unitHomEquiv.symm (sectionsMap p s)
-- Mathlib/Algebra/Order/Ring/Unbundled/Basic.lean
theorem StrictAnti.const_mul [PosMulStrictMono α]
    (hf : StrictAnti f) (ha : 0 < a) : StrictAnti fun x => a * f x
-- Mathlib/Data/Real/EReal.lean
lemma mul_bot_of_neg : ∀ {x : EReal}, x < 0 → x * ⊥ = ⊤
-- Mathlib/Topology/FiberBundle/Trivialization.lean
theorem preimage_subset_source {s : Set B} (hb : s ⊆ e.baseSet) : proj ⁻¹' s ⊆ e.source
-- Mathlib/Order/Extension/Well.lean
theorem toWellOrderExtension_strictMono [Preorder α] [WellFoundedLT α] :
    StrictMono (toWellOrderExtension : α → WellOrderExtension α)
-- Mathlib/CategoryTheory/Monoidal/End.lean
@[reassoc (attr := simp)]
theorem μ_naturality {m n : M} {X Y : C} (f : X ⟶ Y) :
    (F.obj n).map ((F.obj m).map f) ≫ (F.μ m n).app Y = (F.μ m n).app X ≫ (F.obj _).map f
-- Mathlib/CategoryTheory/Shift/ShiftSequence.lean
/--
If `f : X ⟶ Y⟦m⟧`, `n + m = 0` and `ha' : m + a = a'`, this lemma relates the two
morphisms `F.shiftMap f a a' ha'` and `(F.shift a').map (f⟦n⟧')`. Indeed,
via canonical isomorphisms, they both identify to morphisms
`(F.shift a).obj X ⟶ (F.shift a').obj Y`.
-/
lemma shiftIso_hom_app_comp_shiftMap_of_add_eq_zero [F.ShiftSequence G]
    {X Y : C} {m : G} (f : X ⟶ Y⟦m⟧)
    (n : G) (hnm : n + m = 0) (a a' : G) (ha' : m + a = a') :
    (F.shiftIso n a' a (by rw [← ha', ← add_assoc, hnm, zero_add])).hom.app X ≫
      F.shiftMap f a a' ha' =
    (F.shift a').map (f⟦n⟧' ≫ (shiftFunctorCompIsoId C m n
      (by rw [← add_left_inj m, add_assoc, hnm, zero_add, add_zero])).hom.app Y)
-- Mathlib/Data/Matrix/Basic.lean
@[simp]
theorem mapMatrix_refl : (RingEquiv.refl α).mapMatrix = RingEquiv.refl (Matrix m m α)
-- .lake/packages/lean4/src/lean/Init/Data/Nat/Basic.lean
theorem zero_lt_sub_of_lt (h : i < a) : 0 < a - i
-- Mathlib/Topology/Algebra/GroupWithZero.lean
/-- Continuity at a point of the result of dividing two functions continuous at that point, where
the denominator is nonzero. -/
nonrec theorem ContinuousAt.div (hf : ContinuousAt f a) (hg : ContinuousAt g a) (h₀ : g a ≠ 0) :
    ContinuousAt (f / g) a
-- Mathlib/RingTheory/LaurentSeries.lean
theorem coe_X : ((X : PowerSeries R) : LaurentSeries R) = single 1 1
-- Mathlib/Algebra/Group/Subgroup/Basic.lean
/-- Commutativity of a subgroup -/
structure IsCommutative : Prop where
  /-- `*` is commutative on `H` -/
  is_comm : Std.Commutative (α := H) (· * ·)
-- Mathlib/Control/LawfulFix.lean
theorem approx_le_fix (i : ℕ) : approx f i ≤ Part.fix f
-- Mathlib/NumberTheory/MulChar/Basic.lean
@[simp]
theorem toUnitHom_eq (χ : MulChar R R') : toUnitHom χ = equivToUnitHom χ
-- Mathlib/Analysis/SpecialFunctions/Trigonometric/Deriv.lean
@[simp]
theorem deriv_sin : deriv sin = cos
-- Mathlib/Analysis/InnerProductSpace/Adjoint.lean
theorem _root_.LinearMap.IsSymmetric.isSelfAdjoint {A : E →L[𝕜] E}
    (hA : (A : E →ₗ[𝕜] E).IsSymmetric) : IsSelfAdjoint A
-- Mathlib/Algebra/Homology/Augment.lean
@[simp]
theorem augment_d_one_zero (C : ChainComplex V ℕ) {X : V} (f : C.X 0 ⟶ X) (w : C.d 1 0 ≫ f = 0) :
    (augment C f w).d 1 0 = f
-- Mathlib/AlgebraicGeometry/ProjectiveSpectrum/Scheme.lean
@[reassoc]
lemma toStalk_stalkMap_toSpec (f) (x) :
    StructureSheaf.toStalk _ _ ≫ (toSpec 𝒜 f).stalkMap x =
      awayToΓ 𝒜 f ≫ (Proj| pbo f).presheaf.Γgerm x
-- Mathlib/Data/Real/Sign.lean
/-- This lemma is useful for working with `ℝˣ` -/
theorem sign_apply_eq_of_ne_zero (r : ℝ) (h : r ≠ 0) : sign r = -1 ∨ sign r = 1