ruc-ai4math/mathlib_handler_benchmark_410 huggingface dataset:
-- Mathlib/Data/Multiset/Basic.lean
theorem exists_cons_of_mem {s : Multiset α} {a : α} : a ∈ s → ∃ t, s = a ::ₘ t
-- Mathlib/Combinatorics/Enumerative/Composition.lean
@[simp]
theorem one_le_blocks' {i : ℕ} (h : i < c.length) : 1 ≤ c.blocks[i]
-- Mathlib/CategoryTheory/Limits/Shapes/Pullback/CommSq.lean
theorem of_hasBinaryProduct' [HasBinaryProduct X Y] [HasTerminal C] :
    IsPullback Limits.prod.fst Limits.prod.snd (terminal.from X) (terminal.from Y)
-- Mathlib/Algebra/Free.lean
@[to_additive (attr := simp)]
theorem toFreeSemigroup_comp_of : @toFreeSemigroup α ∘ of = FreeSemigroup.of
-- Mathlib/Deprecated/Ring.lean
/-- A ring homomorphism is also a semiring homomorphism. -/
theorem to_isSemiringHom (hf : IsRingHom f) : IsSemiringHom f
-- Mathlib/Topology/Algebra/ContinuousAffineMap.lean
theorem coe_injective : @Function.Injective (P →ᴬ[R] Q) (P → Q) (⇑)
-- Mathlib/CategoryTheory/Adjunction/Reflective.lean
/-- The description of the inverse of the bijection `unitCompPartialBijectiveAux`. -/
theorem unitCompPartialBijectiveAux_symm_apply [Reflective i] {A : C} {B : D}
    (f : i.obj ((reflector i).obj A) ⟶ i.obj B) :
    (unitCompPartialBijectiveAux _ _).symm f = (reflectorAdjunction i).unit.app A ≫ f
-- Mathlib/Topology/MetricSpace/PiNat.lean
theorem min_firstDiff_le (x y z : ∀ n, E n) (h : x ≠ z) :
    min (firstDiff x y) (firstDiff y z) ≤ firstDiff x z
-- Mathlib/MeasureTheory/Measure/VectorMeasure.lean
theorem hasSum_of_disjoint_iUnion [Countable β] {f : β → Set α} (hf₁ : ∀ i, MeasurableSet (f i))
    (hf₂ : Pairwise (Disjoint on f)) : HasSum (fun i => v (f i)) (v (⋃ i, f i))
-- Mathlib/MeasureTheory/Function/SimpleFuncDenseLp.lean
/-- Any function in `ℒp` can be approximated by a simple function if `p < ∞`. -/
theorem _root_.MeasureTheory.Memℒp.exists_simpleFunc_eLpNorm_sub_lt {E : Type*}
    [NormedAddCommGroup E] {f : β → E} {μ : Measure β} (hf : Memℒp f p μ) (hp_ne_top : p ≠ ∞)
    {ε : ℝ≥0∞} (hε : ε ≠ 0) : ∃ g : β →ₛ E, eLpNorm (f - ⇑g) p μ < ε ∧ Memℒp g p μ
-- Mathlib/Algebra/Order/Module/Defs.lean
lemma smul_nonneg_of_nonpos_of_nonpos [SMulPosMono α β] (ha : a ≤ 0) (hb : b ≤ 0) : 0 ≤ a • b
-- Mathlib/Order/RelClasses.lean
theorem IsTrichotomous.swap (r) [IsTrichotomous α r] : IsTrichotomous α (swap r)
-- .lake/packages/lean4/src/lean/Init/Core.lean
theorem lt_of_eq_of_lt {a b c : α} [LT α] (h₁ : a = b) (h₂ : b < c) : a < c
-- Mathlib/Algebra/Polynomial/Degree/TrailingDegree.lean
@[simp]
theorem trailingCoeff_zero : trailingCoeff (0 : R[X]) = 0
-- Mathlib/Order/Interval/Multiset.lean
theorem Ioc_self : Ioc a a = 0
-- Mathlib/Algebra/Polynomial/Eval.lean
@[simp]
theorem eval₂_natCast (n : ℕ) : (n : R[X]).eval₂ f x = n
-- Mathlib/Data/Real/Basic.lean
theorem ofCauchy_sup (a b) : (⟨⟦a ⊔ b⟧⟩ : ℝ) = ⟨⟦a⟧⟩ ⊔ ⟨⟦b⟧⟩
-- Mathlib/Analysis/Calculus/FDeriv/Add.lean
@[fun_prop]
theorem HasStrictFDerivAt.const_sub (hf : HasStrictFDerivAt f f' x) (c : F) :
    HasStrictFDerivAt (fun x => c - f x) (-f') x
-- Mathlib/SetTheory/Surreal/Multiplication.lean
lemma mulOption_lt (hx : x.Numeric) (hy : y.Numeric) (ihxy : IH1 x y) (ihyx : IH1 y x) (i j k l) :
    (⟦mulOption x y i k⟧ : Game) < -⟦mulOption x (-y) j l⟧
-- Mathlib/Topology/MetricSpace/HausdorffDistance.lean
/-- If a point belongs to the closure of `s`, then its infimum distance to `s` equals zero.
The converse is true provided that `s` is nonempty, see `Metric.mem_closure_iff_infDist_zero`. -/
theorem infDist_zero_of_mem_closure (hx : x ∈ closure s) : infDist x s = 0
-- Mathlib/Analysis/Asymptotics/Asymptotics.lean
theorem isLittleO_abs_abs : ((fun x => |u x|) =o[l] fun x => |v x|) ↔ u =o[l] v
-- Mathlib/NumberTheory/PellMatiyasevic.lean
theorem strictMono_y : StrictMono (yn a1)
-- Mathlib/Algebra/Lie/Derivation/Basic.lean
theorem congr_fun (h : D1 = D2) (a : L) : D1 a = D2 a
-- Mathlib/Order/Hom/Lattice.lean
@[simp]
theorem cancel_left {g : SupHom β γ} {f₁ f₂ : SupHom α β} (hg : Injective g) :
    g.comp f₁ = g.comp f₂ ↔ f₁ = f₂
-- Mathlib/Topology/Homotopy/Basic.lean
theorem extend_apply_of_one_le (F : Homotopy f₀ f₁) {t : ℝ} (ht : 1 ≤ t) (x : X) :
    F.extend t x = f₁ x
-- Mathlib/Algebra/Quaternion.lean
theorem mk_quaternion_of_infinite [Infinite R] : #(ℍ[R]) = #R
-- Mathlib/Topology/Instances/EReal.lean
lemma limsup_add_le_of_le (ha : limsup u f < a) (hb : limsup v f ≤ b) :
    limsup (u + v) f ≤ a + b
-- Mathlib/Algebra/Module/Torsion.lean
/-- The `a`-torsion submodule for `a` in `R`, containing all elements `x` of `M` such that
  `a • x = 0`. -/
@[simps!]
def torsionBy (a : R) : Submodule R M
-- Mathlib/Order/Filter/Basic.lean
@[simp]
theorem frequently_or_distrib {f : Filter α} {p q : α → Prop} :
    (∃ᶠ x in f, p x ∨ q x) ↔ (∃ᶠ x in f, p x) ∨ ∃ᶠ x in f, q x
-- Mathlib/Algebra/Group/Subgroup/Pointwise.lean
@[simp]
theorem pointwise_smul_toSubmonoid (a : α) (S : Subgroup G) :
    (a • S).toSubmonoid = a • S.toSubmonoid
-- .lake/packages/lean4/src/lean/Init/Data/Nat/Basic.lean
@[simp] protected theorem zero_sub (n : Nat) : 0 - n = 0
-- Mathlib/LinearAlgebra/Matrix/NonsingularInverse.lean
theorem inv_smul (k : α) [Invertible k] (h : IsUnit A.det) : (k • A)⁻¹ = ⅟ k • A⁻¹
-- Mathlib/Algebra/Group/Equiv/Basic.lean
@[to_additive (attr := simp)]
theorem MulHom.toMulEquiv_apply [Mul M] [Mul N] (f : M →ₙ* N) (g : N →ₙ* M)
    (h₁ : g.comp f = MulHom.id _) (h₂ : f.comp g = MulHom.id _) :
    ((MulHom.toMulEquiv f g h₁ h₂) : M → N) = f
-- Mathlib/Topology/Compactness/SigmaCompact.lean
theorem IsClosed.sigmaCompactSpace {s : Set X} (hs : IsClosed s) : SigmaCompactSpace s
-- Mathlib/CategoryTheory/Localization/CalculusOfFractions/Preadditive.lean
lemma functor_additive :
    letI := preadditive L W
    L.Additive
-- Mathlib/Order/LiminfLimsup.lean
theorem limsup_finset_sup' [ConditionallyCompleteLinearOrder β] {f : Filter α}
    {F : ι → α → β} {s : Finset ι} (hs : s.Nonempty)
    (h₁ : ∀ i ∈ s, f.IsCoboundedUnder (· ≤ ·) (F i) := by exact fun _ _ ↦ by isBoundedDefault)
    (h₂ : ∀ i ∈ s, f.IsBoundedUnder (· ≤ ·) (F i) := by exact fun _ _ ↦ by isBoundedDefault) :
    limsup (fun a ↦ sup' s hs (fun i ↦ F i a)) f = sup' s hs (fun i ↦ limsup (F i) f)
-- Mathlib/Algebra/Polynomial/Basic.lean
theorem monomial_left_inj {a : R} (ha : a ≠ 0) {i j : ℕ} :
    monomial i a = monomial j a ↔ i = j
-- Mathlib/Algebra/Ring/Defs.lean
/-- A typeclass stating that multiplication is left and right distributive
over addition. -/
class Distrib (R : Type*) extends Mul R, Add R where
  /-- Multiplication is left distributive over addition -/
  protected left_distrib : ∀ a b c : R, a * (b + c) = a * b + a * c
  /-- Multiplication is right distributive over addition -/
  protected right_distrib : ∀ a b c : R, (a + b) * c = a * c + b * c
-- Mathlib/Algebra/Order/Group/Unbundled/Basic.lean
@[to_additive]
theorem Antitone.inv (hf : Antitone f) : Monotone fun x => (f x)⁻¹
-- Mathlib/Data/Set/Basic.lean
theorem insert_ne_self : insert a s ≠ s ↔ a ∉ s
-- Mathlib/Algebra/FreeMonoid/Basic.lean
@[to_additive (attr := simp)]
theorem casesOn_one {C : FreeMonoid α → Sort*} (h0 : C 1) (ih : ∀ x xs, C (of x * xs)) :
    @casesOn α C 1 h0 ih = h0
-- Mathlib/ModelTheory/Satisfiability.lean
theorem isSatisfiable_union_distinctConstantsTheory_of_infinite (T : L.Theory) (s : Set α)
    (M : Type w') [L.Structure M] [M ⊨ T] [Infinite M] :
    ((L.lhomWithConstants α).onTheory T ∪ L.distinctConstantsTheory s).IsSatisfiable
-- Mathlib/MeasureTheory/Function/LpSeminorm/Basic.lean
theorem eLpNorm_le_mul_eLpNorm_of_ae_le_mul {f : α → F} {g : α → G} {c : ℝ}
    (h : ∀ᵐ x ∂μ, ‖f x‖ ≤ c * ‖g x‖) (p : ℝ≥0∞) :
    eLpNorm f p μ ≤ ENNReal.ofReal c * eLpNorm g p μ
-- Mathlib/SetTheory/Cardinal/ENat.lean
@[simp] lemma ofENat_le_one {m : ℕ∞} : ofENat m ≤ 1 ↔ m ≤ 1
-- Mathlib/MeasureTheory/Measure/Tilted.lean
lemma absolutelyContinuous_tilted (hf : Integrable (fun x ↦ exp (f x)) μ) : μ ≪ μ.tilted f
-- Mathlib/RingTheory/GradedAlgebra/HomogeneousLocalization.lean
@[simp]
theorem num_add (c1 c2 : NumDenSameDeg 𝒜 x) :
    ((c1 + c2).num : A) = c1.den * c2.num + c2.den * c1.num
-- Mathlib/Dynamics/Ergodic/MeasurePreserving.lean
protected theorem sigmaFinite {f : α → β} (hf : MeasurePreserving f μa μb) [SigmaFinite μb] :
    SigmaFinite μa
-- Mathlib/Order/SupClosed.lean
lemma infClosed_iInter (hf : ∀ i, InfClosed (f i)) : InfClosed (⋂ i, f i)
-- Mathlib/LinearAlgebra/AffineSpace/AffineSubspace.lean
/-- The direction of the span of the result of adding a point to a nonempty affine subspace is the
sup of the direction of that subspace and of any one difference between that point and a point in
the subspace. -/
theorem direction_affineSpan_insert {s : AffineSubspace k P} {p1 p2 : P} (hp1 : p1 ∈ s) :
    (affineSpan k (insert p2 (s : Set P))).direction =
    Submodule.span k {p2 -ᵥ p1} ⊔ s.direction
-- Mathlib/Order/Filter/Basic.lean
theorem le_comap_top (f : α → β) (l : Filter α) : l ≤ comap f ⊤
-- Mathlib/MeasureTheory/Measure/Stieltjes.lean
@[simp] lemma const_apply (c x : ℝ) : (StieltjesFunction.const c) x = c
-- Mathlib/RingTheory/Ideal/Operations.lean
theorem mem_smul_top_iff (N : Submodule R M) (x : N) :
    x ∈ I • (⊤ : Submodule R N) ↔ (x : M) ∈ I • N
-- Mathlib/Data/Set/Lattice.lean
theorem sInter_eq_iInter {s : Set (Set α)} : ⋂₀ s = ⋂ i : s, i
-- Mathlib/CategoryTheory/Limits/FunctorCategory.lean
@[reassoc (attr := simp)]
theorem limit_map_limitObjIsoLimitCompEvaluation_hom [HasLimitsOfShape J C] {i j : K}
    (F : J ⥤ K ⥤ C) (f : i ⟶ j) : (limit F).map f ≫ (limitObjIsoLimitCompEvaluation _ _).hom =
    (limitObjIsoLimitCompEvaluation _ _).hom ≫ limMap (whiskerLeft _ ((evaluation _ _).map f))
-- Mathlib/CategoryTheory/Functor/KanExtension/Adjunction.lean
lemma isIso_lanAdjunction_counit_app_iff (G : D ⥤ H) :
    IsIso ((L.lanAdjunction H).counit.app G) ↔ G.IsLeftKanExtension (𝟙 (L ⋙ G))
-- Mathlib/Order/Atoms.lean
theorem IsSimpleOrder.bot_ne_top [LE α] [BoundedOrder α] [IsSimpleOrder α] : (⊥ : α) ≠ (⊤ : α)
-- Mathlib/Analysis/Asymptotics/Asymptotics.lean
theorem isBigOWith_self_const_mul' (u : Rˣ) (f : α → R) (l : Filter α) :
    IsBigOWith ‖(↑u⁻¹ : R)‖ l f fun x => ↑u * f x
-- Mathlib/Data/Set/Image.lean
@[simp]
theorem Surjective.nonempty_preimage (hf : Surjective f) {s : Set β} :
    (f ⁻¹' s).Nonempty ↔ s.Nonempty
-- Mathlib/MeasureTheory/Measure/Typeclasses.lean
theorem IsProbabilityMeasure.ne_zero (μ : Measure α) [IsProbabilityMeasure μ] : μ ≠ 0
-- Mathlib/Data/ZMod/Basic.lean
@[simp]
theorem valMinAbs_natCast_eq_self [NeZero n] : (a : ZMod n).valMinAbs = a ↔ a ≤ n / 2
-- Mathlib/Analysis/CstarAlgebra/Multiplier.lean
@[simp]
theorem mul_fst (a b : 𝓜(𝕜, A)) : (a * b).fst = a.fst * b.fst
-- Mathlib/AlgebraicGeometry/EllipticCurve/Weierstrass.lean
private lemma id_map : (id : VariableChange R).map φ = id
-- Mathlib/NumberTheory/Liouville/LiouvilleWith.lean
theorem add_int (h : LiouvilleWith p x) (m : ℤ) : LiouvilleWith p (x + m)
-- Mathlib/LinearAlgebra/Span.lean
lemma biSup_comap_eq_top_of_range_eq_biSup
    {R R₂ : Type*} [Ring R] [Ring R₂] {τ₁₂ : R →+* R₂} [RingHomSurjective τ₁₂]
    [Module R M] [Module R₂ M₂] {ι : Type*} (s : Set ι) (hs : s.Nonempty)
    (p : ι → Submodule R₂ M₂) (f : M →ₛₗ[τ₁₂] M₂) (hf : LinearMap.range f = ⨆ i ∈ s, p i) :
    ⨆ i ∈ s, (p i).comap f = ⊤
-- Mathlib/Analysis/Convex/Combination.lean
theorem centerMass_le_sup {s : Finset ι} {f : ι → α} {w : ι → R} (hw₀ : ∀ i ∈ s, 0 ≤ w i)
    (hw₁ : 0 < ∑ i ∈ s, w i) :
    s.centerMass w f ≤ s.sup' (nonempty_of_ne_empty <| by rintro rfl; simp at hw₁) f
-- Mathlib/Analysis/InnerProductSpace/Basic.lean
theorem inner_add_left (x y z : F) : ⟪x + y, z⟫ = ⟪x, z⟫ + ⟪y, z⟫
-- .lake/packages/batteries/Batteries/Data/List/Lemmas.lean
@[simp] theorem findIdx?_replicate :
    (replicate n a).findIdx? p = if 0 < n ∧ p a then some 0 else none
-- Mathlib/Algebra/Module/Submodule/LinearMap.lean
theorem submodule_pow_eq_zero_of_pow_eq_zero {N : Submodule R M} {g : Module.End R N}
    {G : Module.End R M} (h : G.comp N.subtype = N.subtype.comp g) {k : ℕ} (hG : G ^ k = 0) :
    g ^ k = 0
-- Mathlib/Data/Seq/Computation.lean
@[simp]
theorem head_think (s : Computation α) : head (think s) = none
-- .lake/packages/batteries/Batteries/Data/List/Lemmas.lean
@[simp] theorem prefix_append (l₁ l₂ : List α) : l₁ <+: l₁ ++ l₂
-- Mathlib/Algebra/Order/Monoid/Unbundled/Basic.lean
/-- Assumes right covariance.
The lemma assuming left covariance is `Left.mul_lt_one`. -/
@[to_additive "Assumes right covariance.
The lemma assuming left covariance is `Left.add_neg`."]
theorem Right.mul_lt_one [CovariantClass α α (swap (· * ·)) (· < ·)] {a b : α} (ha : a < 1)
    (hb : b < 1) :
    a * b < 1
-- Mathlib/Analysis/SpecialFunctions/Pow/Complex.lean
theorem eq_zero_cpow_iff {x : ℂ} {a : ℂ} : a = (0 : ℂ) ^ x ↔ x ≠ 0 ∧ a = 0 ∨ x = 0 ∧ a = 1
-- Mathlib/Algebra/Order/CauSeq/Basic.lean
@[simp, norm_cast]
theorem inv_apply {f : CauSeq β abv} (hf i) : inv f hf i = (f i)⁻¹
-- Mathlib/CategoryTheory/Extensive.lean
theorem finitaryExtensive_iff_of_isTerminal (C : Type u) [Category.{v} C] [HasFiniteCoproducts C]
    [HasPullbacksOfInclusions C]
    (T : C) (HT : IsTerminal T) (c₀ : BinaryCofan T T) (hc₀ : IsColimit c₀) :
    FinitaryExtensive C ↔ IsVanKampenColimit c₀
-- Mathlib/Topology/MetricSpace/Gluing.lean
theorem toGlue_commute (hΦ : Isometry Φ) (hΨ : Isometry Ψ) :
    toGlueL hΦ hΨ ∘ Φ = toGlueR hΦ hΨ ∘ Ψ
-- Mathlib/Analysis/Convex/Deriv.lean
/-- If `f : ℝ → ℝ` is convex on `S` and left-differentiable at `y ∈ S`, then the slope of any secant
line with right endpoint at `y` is bounded above by the left derivative of `f` at `y`. -/
lemma slope_le_of_hasDerivWithinAt_Iio (hfc : ConvexOn ℝ S f)
    (hx : x ∈ S) (hy : y ∈ S) (hxy : x < y) (hf' : HasDerivWithinAt f f' (Iio y) y) :
    slope f x y ≤ f'
-- Mathlib/Geometry/Euclidean/Angle/Oriented/Basic.lean
/-- The angle between two vectors, with respect to an orientation given by `Orientation.map`
with a linear isometric equivalence, equals the angle between those two vectors, transformed by
the inverse of that equivalence, with respect to the original orientation. -/
@[simp]
theorem oangle_map (x y : V') (f : V ≃ₗᵢ[ℝ] V') :
    (Orientation.map (Fin 2) f.toLinearEquiv o).oangle x y = o.oangle (f.symm x) (f.symm y)
-- Mathlib/CategoryTheory/Preadditive/FunctorCategory.lean
/-- Application of a natural transformation at a fixed object,
as group homomorphism -/
@[simps]
def appHom (X : C) : (F ⟶ G) →+ (F.obj X ⟶ G.obj X)
-- Mathlib/Analysis/Convex/Body.lean
protected theorem isCompact (K : ConvexBody V) : IsCompact (K : Set V)
-- Mathlib/Probability/Kernel/Disintegration/Integral.lean
lemma setIntegral_condKernel_univ_right (a : α) {s : Set β} (hs : MeasurableSet s)
    (hf : IntegrableOn f (s ×ˢ Set.univ) (κ a)) :
    ∫ b in s, ∫ ω, f (b, ω) ∂(Kernel.condKernel κ (a, b)) ∂(Kernel.fst κ a)
      = ∫ x in s ×ˢ Set.univ, f x ∂(κ a)
-- Mathlib/AlgebraicGeometry/PrimeSpectrum/Module.lean
lemma Module.support_subset_preimage_comap [IsScalarTower R A M] :
    Module.support A M ⊆ PrimeSpectrum.comap (algebraMap R A) ⁻¹' Module.support R M
-- Mathlib/Algebra/BigOperators/Group/Finset.lean
@[to_additive]
theorem prod_inter_mul_prod_diff [DecidableEq α] (s t : Finset α) (f : α → β) :
    (∏ x ∈ s ∩ t, f x) * ∏ x ∈ s \ t, f x = ∏ x ∈ s, f x
-- Mathlib/Order/Filter/Bases.lean
theorem HasBasis.isBasis (h : l.HasBasis p s) : IsBasis p s
-- Mathlib/Computability/Primrec.lean
theorem natPair : @Primrec' 2 fun v => v.head.pair v.tail.head
-- Mathlib/RingTheory/Discriminant.lean
/-- If `b` is a basis of a finite separable field extension `L/K`,
  then `Algebra.discr K b` is a unit. -/
theorem discr_isUnit_of_basis [Algebra.IsSeparable K L] (b : Basis ι K L) : IsUnit (discr K b)
-- Mathlib/Algebra/Polynomial/Degree/Definitions.lean
theorem natDegree_X_le : (X : R[X]).natDegree ≤ 1
-- Mathlib/Algebra/Homology/QuasiIso.lean
lemma quasiIso_of_comp_left (φ : K ⟶ L) (φ' : L ⟶ M) [∀ i, K.HasHomology i]
    [∀ i, L.HasHomology i] [∀ i, M.HasHomology i]
    [hφ : QuasiIso φ] [hφφ' : QuasiIso (φ ≫ φ')] :
    QuasiIso φ'
-- Mathlib/Algebra/Lie/Weights/Chain.lean
@[simp] lemma chainTopCoeff_neg : chainTopCoeff (-α) β = chainBotCoeff α β
-- Mathlib/LinearAlgebra/AffineSpace/ContinuousAffineEquiv.lean
@[simp]
theorem refl_symm : (refl k P₁).symm = refl k P₁
-- Mathlib/Topology/Algebra/InfiniteSum/Group.lean
/-- The **Cauchy criterion** for infinite products, also known as the **Cauchy convergence test** -/
@[to_additive "The **Cauchy criterion** for infinite sums, also known as the
**Cauchy convergence test**"]
theorem multipliable_iff_cauchySeq_finset [CompleteSpace α] {f : β → α} :
    Multipliable f ↔ CauchySeq fun s : Finset β ↦ ∏ b ∈ s, f b
-- Mathlib/Order/InitialSeg.lean
@[simp]
theorem InitialSeg.leLT_apply [IsWellOrder β s] [IsTrans γ t] (f : r ≼i s) (g : s ≺i t) (a : α) :
    (f.leLT g) a = g (f a)
-- Mathlib/Topology/Algebra/Order/LiminfLimsup.lean
theorem Filter.Tendsto.bddAbove_range [IsDirected α (· ≤ ·)] {u : ℕ → α}
    (h : Tendsto u atTop (𝓝 a)) : BddAbove (Set.range u)
-- .lake/packages/lean4/src/lean/Init/Data/Int/DivModLemmas.lean
@[simp] theorem add_bmod_bmod : Int.bmod (x + Int.bmod y n) n = Int.bmod (x + y) n
-- Mathlib/Algebra/Group/Subgroup/Order.lean
lemma isCoatom_comap_of_surjective
    {H : Type*} [Group H] {φ : G →* H} (hφ : Function.Surjective φ)
    {M : Subgroup H} (hM : IsCoatom M) : IsCoatom (M.comap φ)
-- Mathlib/Data/Set/Lattice.lean
@[simp]
theorem disjoint_sUnion_left {S : Set (Set α)} {t : Set α} :
    Disjoint (⋃₀S) t ↔ ∀ s ∈ S, Disjoint s t
-- Mathlib/MeasureTheory/Function/StronglyMeasurable/Basic.lean
@[simp]
theorem aestronglyMeasurable_zero_measure [MeasurableSpace α] [TopologicalSpace β] (f : α → β) :
    AEStronglyMeasurable f (0 : Measure α)
-- Mathlib/SetTheory/Ordinal/Arithmetic.lean
theorem bsup_eq_blsub_iff_lt_bsup {o : Ordinal.{u}} (f : ∀ a < o, Ordinal.{max u v}) :
    bsup.{_, v} o f = blsub.{_, v} o f ↔ ∀ i hi, f i hi < bsup.{_, v} o f
-- .lake/packages/lean4/src/lean/Init/SimpLemmas.lean
@[simp] theorem Bool.and_true (b : Bool) : (b && true) = b
-- Mathlib/MeasureTheory/Function/L1Space.lean
/-- Computing the norm of a difference between two L¹-functions. Note that this is not a
  special case of `norm_def` since `(f - g) x` and `f x - g x` are not equal
  (but only a.e.-equal). -/
theorem norm_sub_eq_lintegral (f g : α →₁[μ] β) :
    ‖f - g‖ = (∫⁻ x, (‖f x - g x‖₊ : ℝ≥0∞) ∂μ).toReal
-- Mathlib/SetTheory/Cardinal/Cofinality.lean
theorem blsub_eq (hf : IsFundamentalSequence a o f) : blsub.{u, u} o f = a
-- Mathlib/Probability/Distributions/Gaussian.lean
/-- If `X` is a real random variable with Gaussian law with mean `μ` and variance `v`, then `X * c`
has Gaussian law with mean `c * μ` and variance `c^2 * v`. -/
lemma gaussianReal_mul_const {X : Ω → ℝ} (hX : Measure.map X ℙ = gaussianReal μ v) (c : ℝ) :
    Measure.map (fun ω ↦ X ω * c) ℙ = gaussianReal (c * μ) (⟨c^2, sq_nonneg _⟩ * v)
-- Mathlib/Data/Fintype/Card.lean
theorem _root_.Function.RightInverse.leftInverse_of_card_le {f : α → β} {g : β → α}
    (hfg : RightInverse f g) (hcard : card β ≤ card α) : LeftInverse f g
-- Mathlib/Analysis/InnerProductSpace/Projection.lean
/-- The orthogonal complement satisfies `Kᗮᗮᗮ = Kᗮ`. -/
theorem Submodule.triorthogonal_eq_orthogonal [CompleteSpace E] : Kᗮᗮᗮ = Kᗮ
-- Mathlib/RingTheory/Idempotents.lean
lemma CompleteOrthogonalIdempotents.of_prod_one_sub
    (he : OrthogonalIdempotents e) (he' : ∏ i, (1 - e i) = 0) :
    CompleteOrthogonalIdempotents e
-- Mathlib/MeasureTheory/MeasurableSpace/Card.lean
/-- If a sigma-algebra is generated by a set of sets `s` with cardinality at most the continuum,
then the sigma algebra has the same cardinality bound. -/
theorem cardinal_measurableSet_le_continuum {s : Set (Set α)} :
    #s ≤ 𝔠 → #{ t | @MeasurableSet α (generateFrom s) t } ≤ 𝔠
-- Mathlib/Data/Int/Lemmas.lean
theorem strictMonoOn_natAbs : StrictMonoOn natAbs (Ici 0)
-- Mathlib/Data/List/NatAntidiagonal.lean
theorem map_swap_antidiagonal {n : ℕ} :
    (antidiagonal n).map Prod.swap = (antidiagonal n).reverse
-- Mathlib/Topology/MetricSpace/Pseudo/Defs.lean
@[simp]
theorem ball_union_sphere : ball x ε ∪ sphere x ε = closedBall x ε
-- .lake/packages/batteries/Batteries/Data/List/Lemmas.lean
@[simp] theorem diff_nil (l : List α) : l.diff [] = l
-- Mathlib/MeasureTheory/Function/AEEqFun.lean
theorem pair_eq_mk (f : α →ₘ[μ] β) (g : α →ₘ[μ] γ) :
    f.pair g =
      mk (fun x => (f x, g x)) (f.aestronglyMeasurable.prod_mk g.aestronglyMeasurable)
-- Mathlib/Order/Lattice.lean
theorem inf_le_ite (s s' : α) (P : Prop) [Decidable P] : s ⊓ s' ≤ ite P s s'
-- Mathlib/Combinatorics/SimpleGraph/Walk.lean
theorem eq_of_length_eq_zero {u v : V} : ∀ {p : G.Walk u v}, p.length = 0 → u = v
-- Mathlib/RingTheory/PowerSeries/Basic.lean
@[simp]
theorem coeff_succ_mul_X (n : ℕ) (φ : R⟦X⟧) : coeff R (n + 1) (φ * X) = coeff R n φ
-- Mathlib/CategoryTheory/Localization/Predicate.lean
lemma uniq_symm : (uniq L₁ L₂ W').symm = uniq L₂ L₁ W'
-- Mathlib/Algebra/TrivSqZeroExt.lean
theorem algebraMap_eq_inl : ⇑(algebraMap R' (tsze R' M)) = inl
-- Mathlib/Order/Filter/Basic.lean
protected lemma EventuallyLE.iUnion [Finite ι] {s t : ι → Set α}
    (h : ∀ i, s i ≤ᶠ[l] t i) : (⋃ i, s i) ≤ᶠ[l] ⋃ i, t i
-- Mathlib/Data/Prod/Basic.lean
theorem fst_eq_iff : ∀ {p : α × β} {x : α}, p.1 = x ↔ p = (x, p.2)
-- Mathlib/Analysis/InnerProductSpace/OfNorm.lean
private theorem add_left_aux4 (y z : E) :
    ‖y - 2 • z‖ * ‖y - 2 • z‖ = 2 * (‖y - z‖ * ‖y - z‖ + ‖z‖ * ‖z‖) - ‖y‖ * ‖y‖
-- Mathlib/Algebra/Order/Floor.lean
@[simp]
theorem fract_one_add (a : α) : fract (1 + a) = fract a
-- Mathlib/Algebra/Module/Submodule/Map.lean
theorem submoduleMap_surjective (f : M →ₗ[R] M₁) (p : Submodule R M) :
    Function.Surjective (f.submoduleMap p)
-- Mathlib/Analysis/Calculus/FDeriv/Prod.lean
@[fun_prop]
theorem differentiable_snd : Differentiable 𝕜 (Prod.snd : E × F → F)
-- Mathlib/Data/ZMod/Basic.lean
theorem valMinAbs_mem_Ioc {n : ℕ} [NeZero n] (x : ZMod n) :
    x.valMinAbs * 2 ∈ Set.Ioc (-n : ℤ) n
-- Mathlib/CategoryTheory/Abelian/NonPreadditive.lean
theorem neg_add {X Y : C} (a b : X ⟶ Y) : -(a + b) = -a - b
-- Mathlib/Algebra/Quaternion.lean
@[simp]
nonrec theorem smul_im [SMulZeroClass S R] (s : S) : (s • a).im = s • a.im
-- Mathlib/MeasureTheory/Group/Action.lean
@[to_additive]
theorem measure_smul_null {s} (h : μ s = 0) (c : G) : μ (c • s) = 0
-- Mathlib/Algebra/Homology/ComplexShapeSigns.lean
lemma prev_π₁ {i₁ i₁' : I₁} (h : c₁.Rel i₁ i₁') (i₂ : I₂) :
    c₁₂.prev (π c₁ c₂ c₁₂ ⟨i₁', i₂⟩) = π c₁ c₂ c₁₂ ⟨i₁, i₂⟩
-- Mathlib/Order/Synonym.lean
@[simp]
theorem toLex_symm_eq : (@toLex α).symm = ofLex
-- Mathlib/Topology/Order/LocalExtr.lean
theorem Filter.EventuallyEq.isLocalMaxOn_iff {f g : α → β} {a : α} (heq : f =ᶠ[𝓝[s] a] g)
    (hmem : a ∈ s) : IsLocalMaxOn f s a ↔ IsLocalMaxOn g s a
-- Mathlib/Dynamics/FixedPoints/Basic.lean
lemma image_iterate {s : Set α} (h : IsFixedPt (Set.image f) s) (n : ℕ) :
    IsFixedPt (Set.image f^[n]) s
-- Mathlib/Analysis/ODE/PicardLindelof.lean
protected theorem continuous : Continuous f
-- Mathlib/Analysis/Calculus/InverseFunctionTheorem/ApproximatesLinearOn.lean
protected theorem antilipschitz (hf : ApproximatesLinearOn f (f' : E →L[𝕜] F) s c)
    (hc : Subsingleton E ∨ c < N⁻¹) : AntilipschitzWith (N⁻¹ - c)⁻¹ (s.restrict f)
-- Mathlib/RingTheory/Ideal/Maps.lean
theorem map_le_of_le_comap : I ≤ K.comap f → I.map f ≤ K
-- Mathlib/MeasureTheory/Integral/Average.lean
theorem laverage_mem_openSegment_compl_self [IsFiniteMeasure μ] (hs : NullMeasurableSet s μ)
    (hs₀ : μ s ≠ 0) (hsc₀ : μ sᶜ ≠ 0) :
    ⨍⁻ x, f x ∂μ ∈ openSegment ℝ≥0∞ (⨍⁻ x in s, f x ∂μ) (⨍⁻ x in sᶜ, f x ∂μ)
-- Mathlib/Topology/Algebra/InfiniteSum/Group.lean
@[to_additive]
theorem Multipliable.of_inv (hf : Multipliable fun b ↦ (f b)⁻¹) : Multipliable f
-- Mathlib/Analysis/Distribution/SchwartzSpace.lean
@[simp]
theorem delta_apply (x₀ : E) (f : 𝓢(E, F)) : delta 𝕜 F x₀ f = f x₀
-- Mathlib/Analysis/Convex/Side.lean
theorem wOppSide_iff_exists_left {s : AffineSubspace R P} {x y p₁ : P} (h : p₁ ∈ s) :
    s.WOppSide x y ↔ x ∈ s ∨ ∃ p₂ ∈ s, SameRay R (x -ᵥ p₁) (p₂ -ᵥ y)
-- Mathlib/Data/Multiset/FinsetOps.lean
@[simp]
theorem ndunion_eq_union {s t : Multiset α} (d : Nodup s) : ndunion s t = s ∪ t
-- Mathlib/Combinatorics/SimpleGraph/AdjMatrix.lean
@[simp]
theorem compl_apply [Zero α] [One α] (i j : V) : A.compl i j = 0 ∨ A.compl i j = 1