ruc-ai4math/mathlib_handler_benchmark_410 huggingface dataset:
-- Mathlib/Algebra/Module/LinearMap/Polynomial.lean
lemma polyCharpolyAux_map_aeval
    (A : Type*) [CommRing A] [Algebra R A] [Module.Finite A (A ⊗[R] M)] [Module.Free A (A ⊗[R] M)]
    (x : ι → A) :
    (polyCharpolyAux φ b bₘ).map (MvPolynomial.aeval x).toRingHom =
      LinearMap.charpoly ((tensorProduct R A M M).comp (baseChange A φ)
        ((basis A b).repr.symm (Finsupp.equivFunOnFinite.symm x)))
-- Mathlib/Analysis/Convex/SimplicialComplex/Basic.lean
/-- A simplicial complex in a `𝕜`-module is a collection of simplices which glue nicely together.
Note that the textbook meaning of "glue nicely" is given in
`Geometry.SimplicialComplex.disjoint_or_exists_inter_eq_convexHull`. It is mostly useless, as
`Geometry.SimplicialComplex.convexHull_inter_convexHull` is enough for all purposes. -/
@[ext]
structure SimplicialComplex where
  /-- the faces of this simplicial complex: currently, given by their spanning vertices -/
  faces : Set (Finset E)
  /-- the empty set is not a face: hence, all faces are non-empty -/
  not_empty_mem : ∅ ∉ faces
  /-- the vertices in each face are affine independent: this is an implementation detail -/
  indep : ∀ {s}, s ∈ faces → AffineIndependent 𝕜 ((↑) : s → E)
  /-- faces are downward closed: a non-empty subset of its spanning vertices spans another face -/
  down_closed : ∀ {s t}, s ∈ faces → t ⊆ s → t ≠ ∅ → t ∈ faces
  inter_subset_convexHull : ∀ {s t}, s ∈ faces → t ∈ faces →
    convexHull 𝕜 ↑s ∩ convexHull 𝕜 ↑t ⊆ convexHull 𝕜 (s ∩ t : Set E)
-- Mathlib/Algebra/Order/Module/Defs.lean
lemma smul_nonpos_iff_pos_imp_nonpos : a • b ≤ 0 ↔ (0 < a → b ≤ 0) ∧ (b < 0 → 0 ≤ a)
-- Mathlib/Geometry/RingedSpace/LocallyRingedSpace.lean
@[simp]
lemma iso_inv_val_base_hom_val_base {X Y : LocallyRingedSpace.{u}} (e : X ≅ Y) :
    e.inv.val.base ≫ e.hom.val.base = 𝟙 _
-- .lake/packages/lean4/src/lean/Init/Data/Array/Lemmas.lean
theorem set_set (a : Array α) (i : Fin a.size) (v v' : α) :
    (a.set i v).set ⟨i, by simp [i.2]⟩ v' = a.set i v'
-- Mathlib/Algebra/Polynomial/Laurent.lean
theorem single_eq_C (r : R) : Finsupp.single 0 r = C r
-- Mathlib/Algebra/Module/Submodule/Basic.lean
theorem ne_zero_of_ortho {x : M} {N : Submodule R M}
    (ortho : ∀ (c : R), ∀ y ∈ N, c • x + y = (0 : M) → c = 0) : x ≠ 0
-- .lake/packages/lean4/src/lean/Init/Data/Nat/Basic.lean
protected theorem lt_asymm {a b : Nat} (h : a < b) : ¬ b < a
-- Mathlib/Data/Finset/Pointwise.lean
@[to_additive]
theorem image_mul : (s * t).image (f : α → β) = s.image f * t.image f
-- Mathlib/Data/Vector/Basic.lean
@[simp]
theorem get_map {β : Type*} (v : Vector α n) (f : α → β) (i : Fin n) :
    (v.map f).get i = f (v.get i)
-- Mathlib/Data/Fintype/Card.lean
theorem finite_iff_nonempty_fintype (α : Type*) : Finite α ↔ Nonempty (Fintype α)
-- Mathlib/Algebra/Ring/Subsemiring/Basic.lean
@[simp]
theorem coe_rangeS : (f.rangeS : Set S) = Set.range f
-- Mathlib/RingTheory/TensorProduct/MvPolynomial.lean
lemma rTensor_apply_tmul (p : MvPolynomial σ S) (n : N) :
    rTensor (p ⊗ₜ[R] n) = p.sum (fun i m ↦ Finsupp.single i (m ⊗ₜ[R] n))
-- Mathlib/Geometry/Manifold/BumpFunction.lean
theorem nonempty_support : (support f).Nonempty
-- Mathlib/LinearAlgebra/AffineSpace/Combination.lean
/-- `affineCombination` gives the sum with any base point, when the
sum of the weights is 1. -/
theorem affineCombination_eq_weightedVSubOfPoint_vadd_of_sum_eq_one (w : ι → k) (p : ι → P)
    (h : ∑ i ∈ s, w i = 1) (b : P) :
    s.affineCombination k p w = s.weightedVSubOfPoint p b w +ᵥ b
-- Mathlib/CategoryTheory/Limits/Shapes/WidePullbacks.lean
/-- The obvious functor `WidePushoutShape J ⥤ (WidePullbackShape J)ᵒᵖ` -/
@[simps]
def widePushoutShapeOp : WidePushoutShape J ⥤ (WidePullbackShape J)ᵒᵖ
-- .lake/packages/batteries/Batteries/Data/Sum/Basic.lean
@[simp] theorem not_liftRel_inl_inr : ¬LiftRel r s (inl a) (inr d)
-- Mathlib/MeasureTheory/Integral/Pi.lean
/-- On a finite product space, a product of integrable functions depending on each coordinate is
integrable. -/
theorem Integrable.fintype_prod {ι : Type*} [Fintype ι] {E : Type*}
    {f : ι → E → 𝕜} [MeasureSpace E] [SigmaFinite (volume : Measure E)]
    (hf : ∀ i, Integrable (f i)) :
    Integrable (fun (x : ι → E) ↦ ∏ i, f i (x i))
-- Mathlib/RingTheory/Coprime/Basic.lean
theorem mul_add_left_left {x y : R} (h : IsCoprime x y) (z : R) : IsCoprime (y * z + x) y
-- Mathlib/LinearAlgebra/Matrix/SesquilinearForm.lean
@[simp]
theorem LinearMap.toMatrixₛₗ₂'_apply (B : (n → R₁) →ₛₗ[σ₁] (m → R₂) →ₛₗ[σ₂] N₂) (i : n) (j : m) :
    LinearMap.toMatrixₛₗ₂' R B i j =
      B (stdBasis R₁ (fun _ => R₁) i 1) (stdBasis R₂ (fun _ => R₂) j 1)
-- Mathlib/CategoryTheory/Comma/StructuredArrow.lean
@[reassoc]
theorem w {A B : CostructuredArrow S T} (f : A ⟶ B) : S.map f.left ≫ B.hom = A.hom
-- Mathlib/Data/Set/Opposite.lean
@[simp]
theorem mem_unop {s : Set αᵒᵖ} {a : α} : a ∈ s.unop ↔ op a ∈ s
-- Mathlib/Data/Seq/WSeq.lean
theorem exists_of_mem_join {a : α} : ∀ {S : WSeq (WSeq α)}, a ∈ join S → ∃ s, s ∈ S ∧ a ∈ s
-- Mathlib/Analysis/Calculus/Darboux.lean
/-- **Darboux's theorem**: if `a ≤ b` and `f' a < m < f' b`, then `f' c = m` for some
`c ∈ (a, b)`. -/
theorem exists_hasDerivWithinAt_eq_of_gt_of_lt (hab : a ≤ b)
    (hf : ∀ x ∈ Icc a b, HasDerivWithinAt f (f' x) (Icc a b) x) {m : ℝ} (hma : f' a < m)
    (hmb : m < f' b) : m ∈ f' '' Ioo a b
-- Mathlib/Logic/Relation.lean
@[elab_as_elim]
theorem trans_induction_on {P : ∀ {a b : α}, TransGen r a b → Prop} {a b : α} (h : TransGen r a b)
    (base : ∀ {a b} (h : r a b), P (single h))
    (ih : ∀ {a b c} (h₁ : TransGen r a b) (h₂ : TransGen r b c), P h₁ → P h₂ → P (h₁.trans h₂)) :
    P h
-- Mathlib/Analysis/Asymptotics/Asymptotics.lean
theorem IsBigO.sup (h : f =O[l] g') (h' : f =O[l'] g') : f =O[l ⊔ l'] g'
-- Mathlib/Analysis/Calculus/LocalExtr/Basic.lean
/-- If `f` has a local min on `s` at `a` and both `y` and `-y` belong to the positive tangent cone
of `s` at `a`, then `f' y = 0`. -/
theorem IsLocalMinOn.fderivWithin_eq_zero (h : IsLocalMinOn f s a)
    (hy : y ∈ posTangentConeAt s a) (hy' : -y ∈ posTangentConeAt s a) :
    (fderivWithin ℝ f s a : E → ℝ) y = 0
-- Mathlib/GroupTheory/Perm/Option.lean
/-- Permutations of `Option α` are equivalent to fixing an
`Option α` and permuting the remaining with a `Perm α`.
The fixed `Option α` is swapped with `none`. -/
@[simps]
def Equiv.Perm.decomposeOption {α : Type*} [DecidableEq α] :
    Perm (Option α) ≃ Option α × Perm α
-- Mathlib/SetTheory/Game/PGame.lean
theorem fuzzy_irrefl (x : PGame) : ¬x ‖ x
-- Mathlib/Analysis/InnerProductSpace/GramSchmidtOrtho.lean
/-- **Gram-Schmidt Orthogonalisation**:
`gramSchmidt` produces an orthogonal system of vectors. -/
theorem gramSchmidt_orthogonal (f : ι → E) {a b : ι} (h₀ : a ≠ b) :
    ⟪gramSchmidt 𝕜 f a, gramSchmidt 𝕜 f b⟫ = 0
-- Mathlib/Topology/UniformSpace/Basic.lean
theorem tendsto_prod_uniformity_fst [UniformSpace α] [UniformSpace β] :
    Tendsto (fun p : (α × β) × α × β => (p.1.1, p.2.1)) (𝓤 (α × β)) (𝓤 α)
-- Mathlib/Data/Fin/Basic.lean
/-- `rev` commutes with `predAbove`. -/
lemma rev_predAbove {n : ℕ} (p : Fin n) (i : Fin (n + 1)) :
    (predAbove p i).rev = predAbove p.rev i.rev
-- Mathlib/LinearAlgebra/Matrix/Charpoly/Coeff.lean
@[simp] theorem charpoly_natDegree_eq_dim [Nontrivial R] (M : Matrix n n R) :
    M.charpoly.natDegree = Fintype.card n
-- Mathlib/GroupTheory/Perm/Basic.lean
lemma BijOn.perm_pow : BijOn f s s → ∀ n : ℕ, BijOn (f ^ n) s s
-- Mathlib/Analysis/InnerProductSpace/LinearPMap.lean
/-- The fundamental property of the adjoint. -/
theorem adjoint_isFormalAdjoint : T†.IsFormalAdjoint T
-- Mathlib/Analysis/ConstantSpeed.lean
theorem HasUnitSpeedOn.Icc_Icc {x y z : ℝ} (hfs : HasUnitSpeedOn f (Icc x y))
    (hft : HasUnitSpeedOn f (Icc y z)) : HasUnitSpeedOn f (Icc x z)
-- Mathlib/Algebra/Homology/ShortComplex/Homology.lean
@[reassoc (attr := simp)]
lemma homologyι_comp_fromOpcycles :
    S.homologyι ≫ S.fromOpcycles = 0
-- Mathlib/Analysis/SpecialFunctions/Integrals.lean
@[simp]
theorem inv_mul_integral_comp_div_sub :
    (c⁻¹ * ∫ x in a..b, f (x / c - d)) = ∫ x in a / c - d..b / c - d, f x
-- Mathlib/Analysis/SpecialFunctions/Trigonometric/Deriv.lean
/-- The complex sine function is everywhere strictly differentiable, with the derivative `cos x`. -/
theorem hasStrictDerivAt_sin (x : ℂ) : HasStrictDerivAt sin (cos x) x
-- Mathlib/Algebra/Order/Antidiag/Prod.lean
@[simp] theorem map_prodComm_antidiagonal [AddCommMonoid A] [HasAntidiagonal A] {n : A} :
    (antidiagonal n).map (Equiv.prodComm A A) = antidiagonal n
-- Mathlib/RingTheory/Int/Basic.lean
theorem sq_of_gcd_eq_one {a b c : ℤ} (h : Int.gcd a b = 1) (heq : a * b = c ^ 2) :
    ∃ a0 : ℤ, a = a0 ^ 2 ∨ a = -a0 ^ 2
-- Mathlib/Data/Set/Basic.lean
theorem ite_eq_of_subset_right (t : Set α) {s₁ s₂ : Set α} (h : s₂ ⊆ s₁) :
    t.ite s₁ s₂ = (s₁ ∩ t) ∪ s₂
-- Mathlib/Analysis/NormedSpace/OperatorNorm/Bilinear.lean
lemma norm_mkContinuous₂_aux (f : E →ₛₗ[σ₁₃] F →ₛₗ[σ₂₃] G) (C : ℝ)
    (h : ∀ x y, ‖f x y‖ ≤ C * ‖x‖ * ‖y‖) (x : E) :
    ‖(f x).mkContinuous (C * ‖x‖) (h x)‖ ≤ max C 0 * ‖x‖
-- .lake/packages/batteries/Batteries/Data/BinomialHeap/Basic.lean
theorem Heap.WF.nil : Heap.nil.WF le n
-- Mathlib/Topology/Sheaves/SheafCondition/Sites.lean
/-- The sieve generated by `presieveOfCovering U` is a member of the grothendieck topology.
-/
theorem mem_grothendieckTopology :
    Sieve.generate (presieveOfCovering U) ∈ Opens.grothendieckTopology X (iSup U)
-- Mathlib/CategoryTheory/Quotient/Linear.lean
@[simp]
lemma smul_eq (hr : ∀ (a : R) ⦃X Y : C⦄ (f₁ f₂ : X ⟶ Y) (_ : r f₁ f₂), r (a • f₁) (a • f₂))
    (a : R) {X Y : C} (f : X ⟶ Y) :
    letI := smul r hr
    a • (functor r).map f = (functor r).map (a • f)
-- Mathlib/Data/QPF/Multivariate/Constructions/Fix.lean
theorem recF_eq_of_wEquiv (α : TypeVec n) {β : Type u} (u : F (α.append1 β) → β) (x y : q.P.W α) :
    WEquiv x y → recF u x = recF u y
-- Mathlib/Topology/FiberBundle/Trivialization.lean
lemma ext {e e' : Pretrivialization F proj} (h₁ : ∀ x, e x = e' x)
    (h₂ : ∀ x, e.toPartialEquiv.symm x = e'.toPartialEquiv.symm x) (h₃ : e.baseSet = e'.baseSet) :
    e = e'
-- Mathlib/Data/Set/Finite.lean
theorem finite_of_finite_preimage (h : (f ⁻¹' s).Finite) (hs : s ⊆ range f) : s.Finite
-- Mathlib/Data/Finset/Lattice.lean
theorem map_ofDual_min (s : Finset αᵒᵈ) : s.min.map ofDual = (s.image ofDual).max
-- Mathlib/Data/Nat/Defs.lean
lemma lt_pow_self (ha : 1 < a) : ∀ n : ℕ, n < a ^ n
-- Mathlib/Algebra/Group/Submonoid/Basic.lean
@[to_additive (attr := simp)]
theorem eqLocusM_same (f : M →* N) : f.eqLocusM f = ⊤
-- Mathlib/Computability/EpsilonNFA.lean
@[simp]
theorem subset_εClosure (S : Set σ) : S ⊆ M.εClosure S
-- Mathlib/Logic/Function/CompTypeclasses.lean
lemma comp_apply {M N P : Type*}
    {φ : M → N} {ψ : N → P} {χ : M → P} (h : CompTriple φ ψ χ) (x : M) :
    ψ (φ x) = χ x
-- Mathlib/Algebra/Group/Subgroup/Basic.lean
@[to_additive]
theorem mem_normalizer_iff'' {g : G} : g ∈ H.normalizer ↔ ∀ h : G, h ∈ H ↔ g⁻¹ * h * g ∈ H
-- Mathlib/Analysis/InnerProductSpace/Adjoint.lean
/-- The linear map associated to the conjugate transpose of a matrix corresponding to two
orthonormal bases is the adjoint of the linear map associated to the matrix. -/
lemma Matrix.toLin_conjTranspose (A : Matrix m n 𝕜) :
    toLin v₂.toBasis v₁.toBasis Aᴴ = adjoint (toLin v₁.toBasis v₂.toBasis A)
-- Mathlib/Probability/Kernel/Composition.lean
theorem fst_apply (κ : Kernel α (β × γ)) (a : α) : fst κ a = (κ a).map Prod.fst
-- Mathlib/Data/Complex/Exponential.lean
theorem cos_eq (z : ℂ) : cos z = cos z.re * cosh z.im - sin z.re * sinh z.im * I
-- Mathlib/Data/PNat/Prime.lean
@[simp, norm_cast]
theorem lcm_coe (n m : ℕ+) : (lcm n m : ℕ) = Nat.lcm n m
-- Mathlib/ModelTheory/LanguageMap.lean
/-- The inverse of an equivalence of first-order languages. -/
@[simps]
protected def symm : L' ≃ᴸ L
-- Mathlib/Logic/Function/Basic.lean
theorem Surjective.hasRightInverse (hf : Surjective f) : HasRightInverse f
-- Mathlib/Order/LiminfLimsup.lean
theorem blimsup_and_le_inf : (blimsup u f fun x => p x ∧ q x) ≤ blimsup u f p ⊓ blimsup u f q
-- Mathlib/Order/Bounds/Basic.lean
@[simp]
theorem lowerBounds_union : lowerBounds (s ∪ t) = lowerBounds s ∩ lowerBounds t
-- Mathlib/Analysis/Seminorm.lean
/-- Auxiliary lemma to show that the infimum of seminorms is well-defined. -/
theorem bddBelow_range_add : BddBelow (range fun u => p u + q (x - u))
-- Mathlib/Combinatorics/Quiver/Covering.lean
@[simp]
theorem Prefunctor.star_apply {u v : U} (e : u ⟶ v) :
    φ.star u (Quiver.Star.mk e) = Quiver.Star.mk (φ.map e)
-- Mathlib/Algebra/Homology/ShortComplex/Exact.lean
lemma exact_iff_mono_cokernel_desc [S.HasHomology] [HasCokernel S.f] :
    S.Exact ↔ Mono (cokernel.desc S.f S.g S.zero)
-- Mathlib/Data/ENNReal/Inv.lean
theorem inv_two_add_inv_two : (2 : ℝ≥0∞)⁻¹ + 2⁻¹ = 1
-- Mathlib/RingTheory/IsAdjoinRoot.lean
@[simp]
theorem liftHom_aequiv {U : Type*} [CommRing U] [Algebra R U] (h : IsAdjoinRoot S f)
    (h' : IsAdjoinRoot T f) (x : U) (hx z) : h'.liftHom x hx (h.aequiv h' z) = h.liftHom x hx z
-- Mathlib/Order/Interval/Set/Basic.lean
@[simp]
theorem Iic_diff_Iio_same : Iic a \ Iio a = {a}
-- Mathlib/Analysis/InnerProductSpace/Basic.lean
theorem real_inner_smul_right (x y : F) (r : ℝ) : ⟪x, r • y⟫_ℝ = r * ⟪x, y⟫_ℝ
-- Mathlib/SetTheory/Ordinal/Arithmetic.lean
theorem mod_lt (a) {b : Ordinal} (h : b ≠ 0) : a % b < b
-- Mathlib/Topology/Category/Profinite/Nobeling.lean
/--
Removing the leading `o` from a term of `MaxProducts C` yields a list which `isGood` with respect to
`C'`.
-/
theorem maxTail_isGood (l : MaxProducts C ho)
    (h₁ : ⊤ ≤ Submodule.span ℤ (Set.range (eval (π C (ord I · < o))))) :
    l.val.Tail.isGood (C' C ho)
-- Mathlib/Data/Nat/Choose/Factorization.lean
/-- A binomial coefficient is the product of its prime factors, which are at most `n`. -/
theorem prod_pow_factorization_choose (n k : ℕ) (hkn : k ≤ n) :
    (∏ p ∈ Finset.range (n + 1), p ^ (Nat.choose n k).factorization p) = choose n k
-- Mathlib/Analysis/Asymptotics/Asymptotics.lean
theorem isBigO_atTop_iff_eventually_exists_pos {α : Type*}
    [SemilatticeSup α] [Nonempty α] {f : α → G} {g : α → G'} :
    f =O[atTop] g ↔ ∀ᶠ n₀ in atTop, ∃ c > 0, ∀ n ≥ n₀, c * ‖f n‖ ≤ ‖g n‖
-- Mathlib/Algebra/Periodic.lean
theorem Periodic.sub_period [AddGroup α] (h1 : Periodic f c₁) (h2 : Periodic f c₂) :
    Periodic f (c₁ - c₂)
-- Mathlib/Logic/Function/Basic.lean
@[nontriviality]
theorem update_eq_const_of_subsingleton [Subsingleton α] (a : α) (v : α') (f : α → α') :
    update f a v = const α v
-- Mathlib/RingTheory/Ideal/QuotientOperations.lean
@[simp]
theorem quotQuotMkₐ_toRingHom :
    (quotQuotMkₐ R I J : _ →+* _ ⧸ J.map (Quotient.mkₐ R I)) = quotQuotMk I J
-- .lake/packages/lean4/src/lean/Init/Data/Array/Lemmas.lean
@[simp] theorem pop_empty : (#[] : Array α).pop = #[]
-- Mathlib/Algebra/DirectSum/Internal.lean
theorem coe_mul_of_apply_of_not_le (r : ⨁ i, A i) {i : ι} (r' : A i) (n : ι) (h : ¬i ≤ n) :
    ((r * of (fun i => A i) i r') n : R) = 0
-- Mathlib/Data/Set/Semiring.lean
@[simp]
theorem down_subset_down {s t : SetSemiring α} : SetSemiring.down s ⊆ SetSemiring.down t ↔ s ≤ t
-- Mathlib/NumberTheory/ArithmeticFunction.lean
@[simp]
theorem mul_apply [Semiring R] {f g : ArithmeticFunction R} {n : ℕ} :
    (f * g) n = ∑ x ∈ divisorsAntidiagonal n, f x.fst * g x.snd
-- Mathlib/Computability/TMToPartrec.lean
theorem head_main_ok {q s L} {c d : List Γ'} :
    Reaches₁ (TM2.step tr) ⟨some (head main q), s, K'.elim (trList L) [] c d⟩
      ⟨some q, none, K'.elim (trList [L.headI]) [] c d⟩
-- Mathlib/RingTheory/Valuation/Basic.lean
theorem map_sum_le {ι : Type*} {s : Finset ι} {f : ι → R} {g : Γ₀} (hf : ∀ i ∈ s, v (f i) ≤ g) :
    v (∑ i ∈ s, f i) ≤ g
-- Mathlib/Order/Interval/Finset/Fin.lean
@[simp]
theorem card_Ici : (Ici a).card = n - a
-- Mathlib/Analysis/CstarAlgebra/Basic.lean
/-- A C*-ring is a normed star ring that satisfies the stronger condition `‖x‖ ^ 2 ≤ ‖x⋆ * x‖`
for every `x`. Note that this condition actually implies equality, as is shown in
`norm_star_mul_self` below. -/
class CstarRing (E : Type*) [NonUnitalNormedRing E] [StarRing E] : Prop where
  norm_mul_self_le : ∀ x : E, ‖x‖ * ‖x‖ ≤ ‖x⋆ * x‖
-- Mathlib/Analysis/Convex/SpecificFunctions/Pow.lean
lemma concaveOn_rpow {p : ℝ} (hp₀ : 0 ≤ p) (hp₁ : p ≤ 1) :
    ConcaveOn ℝ (Set.Ici 0) fun x : ℝ ↦ x ^ p
-- .lake/packages/lean4/src/lean/Init/Control/Lawful/Instances.lean
@[simp] theorem run_lift {α σ : Type u} [Monad m] (x : m α) (s : σ) : (StateT.lift x : StateT σ m α).run s = x >>= fun a => pure (a, s)
-- Mathlib/Probability/Process/Adapted.lean
@[to_additive]
protected theorem div [Group β] [TopologicalGroup β] (hu : ProgMeasurable f u)
    (hv : ProgMeasurable f v) : ProgMeasurable f fun i ω => u i ω / v i ω
-- Mathlib/Data/Set/Basic.lean
theorem mem_compl {s : Set α} {x : α} (h : x ∉ s) : x ∈ sᶜ
-- Mathlib/MeasureTheory/Integral/Lebesgue.lean
theorem lintegral_union {f : α → ℝ≥0∞} {A B : Set α} (hB : MeasurableSet B) (hAB : Disjoint A B) :
    ∫⁻ a in A ∪ B, f a ∂μ = ∫⁻ a in A, f a ∂μ + ∫⁻ a in B, f a ∂μ
-- Mathlib/Data/Pi/Interval.lean
theorem Icc_eq : Icc a b = piFinset fun i => Icc (a i) (b i)
-- Mathlib/Data/Set/Countable.lean
/-- If `s : Set α` is a nonempty countable set, then there exists a map
`f : ℕ → α` such that `s = range f`. -/
theorem Countable.exists_eq_range {s : Set α} (hc : s.Countable) (hs : s.Nonempty) :
    ∃ f : ℕ → α, s = range f
-- Mathlib/Topology/Algebra/Algebra.lean
theorem copy_eq (f : A →A[R] B) (f' : A → B) (h : f' = ⇑f) : f.copy f' h = f
-- Mathlib/Logic/Nonempty.lean
@[simp]
theorem Nonempty.forall {α} {p : Nonempty α → Prop} : (∀ h : Nonempty α, p h) ↔ ∀ a, p ⟨a⟩
-- Mathlib/Algebra/Category/ModuleCat/Biproducts.lean
@[simp]
theorem binaryProductLimitCone_cone_π_app_left (M N : ModuleCat.{v} R) :
    (binaryProductLimitCone M N).cone.π.app ⟨WalkingPair.left⟩ = LinearMap.fst R M N
-- Mathlib/Data/Nat/Dist.lean
theorem dist_succ_succ {i j : Nat} : dist (succ i) (succ j) = dist i j
-- Mathlib/Data/Set/Card.lean
@[simp] theorem ncard_eq_one : s.ncard = 1 ↔ ∃ a, s = {a}
-- Mathlib/Data/PNat/Prime.lean
theorem prime_two : (2 : ℕ+).Prime
-- Mathlib/Algebra/Order/Hom/Monoid.lean
@[simp]
theorem toOrderMonoidHom_eq_coe (f : α →*₀o β) : f.toOrderMonoidHom = f
-- Mathlib/Topology/Category/Profinite/Nobeling.lean
theorem Products.lt_nil_empty : { m : Products I | m < Products.nil } = ∅
-- Mathlib/Data/QPF/Multivariate/Constructions/Cofix.lean
theorem liftR_map_last' [LawfulMvFunctor F] {α : TypeVec n} {ι} (R : ι → ι → Prop) (x : F (α ::: ι))
    (f : ι → ι) (hh : ∀ x : ι, R (f x) x) : LiftR' (RelLast' _ R) ((id ::: f) <$$> x) x
-- Mathlib/MeasureTheory/Integral/Layercake.lean
/-- An auxiliary version of the layer cake formula (Cavalieri's principle, tail probability
formula), with a measurability assumption that would also essentially follow from the
integrability assumptions, and a sigma-finiteness assumption.

See `MeasureTheory.lintegral_comp_eq_lintegral_meas_le_mul` and
`MeasureTheory.lintegral_comp_eq_lintegral_meas_lt_mul` for the main formulations of the layer
cake formula. -/
theorem lintegral_comp_eq_lintegral_meas_le_mul_of_measurable_of_sigmaFinite
    (μ : Measure α) [SFinite μ]
    (f_nn : 0 ≤ f) (f_mble : Measurable f)
    (g_intble : ∀ t > 0, IntervalIntegrable g volume 0 t) (g_mble : Measurable g)
    (g_nn : ∀ t > 0, 0 ≤ g t) :
    ∫⁻ ω, ENNReal.ofReal (∫ t in (0)..f ω, g t) ∂μ =
      ∫⁻ t in Ioi 0, μ {a : α | t ≤ f a} * ENNReal.ofReal (g t)
-- Mathlib/Order/Filter/Germ/Basic.lean
@[simp]
theorem liftPred_const_iff [NeBot l] {p : β → Prop} {x : β} : LiftPred p (↑x : Germ l β) ↔ p x
-- Mathlib/FieldTheory/Galois.lean
/-- A field extension E/F is Galois if it is both separable and normal. Note that in mathlib
a separable extension of fields is by definition algebraic. -/
class IsGalois : Prop where
  [to_isSeparable : Algebra.IsSeparable F E]
  [to_normal : Normal F E]
-- Mathlib/CategoryTheory/Monoidal/Braided/Basic.lean
theorem braiding_rightUnitor_aux₂ (X : C) :
    (𝟙_ C ◁ (β_ (𝟙_ C) X).hom) ≫ (𝟙_ C ◁ (ρ_ X).hom) = 𝟙_ C ◁ (λ_ X).hom
-- Mathlib/SetTheory/Cardinal/Basic.lean
protected theorem IsLimit.isSuccLimit {c} (h : IsLimit c) : IsSuccLimit c
-- Mathlib/Analysis/SpecialFunctions/Trigonometric/Deriv.lean
theorem HasStrictDerivAt.sin (hf : HasStrictDerivAt f f' x) :
    HasStrictDerivAt (fun x => Real.sin (f x)) (Real.cos (f x) * f') x
-- Mathlib/Geometry/Euclidean/Angle/Oriented/Basic.lean
/-- Adding the angles between two vectors in each order, with the first vector in each angle
negated, results in 0. -/
@[simp]
theorem oangle_add_oangle_rev_neg_left (x y : V) : o.oangle (-x) y + o.oangle (-y) x = 0
-- Mathlib/Algebra/Homology/ShortComplex/ModuleCat.lean
lemma exact_iff_surjective_moduleCatToCycles :
    S.Exact ↔ Function.Surjective S.moduleCatToCycles
-- .lake/packages/lean4/src/lean/Init/Data/BitVec/Lemmas.lean
theorem truncate_add (x y : BitVec w) (h : i ≤ w) :
    (x + y).truncate i = x.truncate i + y.truncate i
-- Mathlib/Order/Hom/Lattice.lean
@[ext]
theorem ext {f g : SupHom α β} (h : ∀ a, f a = g a) : f = g
-- Mathlib/MeasureTheory/MeasurableSpace/Basic.lean
@[simp]
protected theorem inf_eq_inter (s t : {s : Set α // MeasurableSet s}) : s ⊓ t = s ∩ t
-- Mathlib/Combinatorics/SimpleGraph/Subgraph.lean
@[simp]
theorem mem_edgeSet {G' : Subgraph G} {v w : V} : s(v, w) ∈ G'.edgeSet ↔ G'.Adj v w
-- Mathlib/Topology/MetricSpace/Gluing.lean
theorem Sum.dist_eq {x y : X ⊕ Y} : dist x y = Sum.dist x y
-- Mathlib/RingTheory/Ideal/Over.lean
theorem eq_bot_of_comap_eq_bot [Nontrivial R] [IsDomain S] [Algebra.IsIntegral R S]
    (hI : I.comap (algebraMap R S) = ⊥) : I = ⊥
-- .lake/packages/batteries/Batteries/Data/Nat/Lemmas.lean
theorem recDiagOn_succ_succ {motive : Nat → Nat → Sort _} (zero_zero : motive 0 0)
    (zero_succ : ∀ n, motive 0 n → motive 0 (n+1)) (succ_zero : ∀ m, motive m 0 → motive (m+1) 0)
    (succ_succ : ∀ m n, motive m n → motive (m+1) (n+1)) (m n) :
    Nat.recDiagOn (m+1) (n+1) zero_zero zero_succ succ_zero succ_succ
      = succ_succ m n (Nat.recDiagOn m n zero_zero zero_succ succ_zero succ_succ)
-- Mathlib/Computability/Ackermann.lean
theorem one_lt_ack_succ_right : ∀ m n, 1 < ack m (n + 1)
-- Mathlib/Order/LiminfLimsup.lean
theorem le_liminf_iff {α β} [ConditionallyCompleteLinearOrder β] {f : Filter α} {u : α → β} {x : β}
    (h₁ : f.IsCoboundedUnder (· ≥ ·) u := by isBoundedDefault)
    (h₂ : f.IsBoundedUnder (· ≥ ·) u := by isBoundedDefault) :
    x ≤ liminf u f ↔ ∀ y < x, ∀ᶠ a in f, y < u a
-- Mathlib/Logic/Function/Conjugate.lean
/-- If `fbc : β → γ` semiconjugates `gb` to `gc` and `fab : α → β` semiconjugates `ga` to `gb`,
then `fbc ∘ fab` semiconjugates `ga` to `gc`.

See also `Function.Semiconj.trans` for a version with reversed arguments.

**Backward compatibility note:** before 2024-01-13,
this lemma used to have the same order of arguments that `Function.Semiconj.trans` has now. -/
theorem comp_left (hbc : Semiconj fbc gb gc) (hab : Semiconj fab ga gb) :
    Semiconj (fbc ∘ fab) ga gc
-- Mathlib/Data/List/Cycle.lean
/-- `nextOr` does not depend on the default value, if the next value appears. -/
theorem nextOr_eq_nextOr_of_mem_of_ne (xs : List α) (x d d' : α) (x_mem : x ∈ xs)
    (x_ne : x ≠ xs.getLast (ne_nil_of_mem x_mem)) : nextOr xs x d = nextOr xs x d'
-- Mathlib/Data/Nat/Defs.lean
lemma dvd_div_of_mul_dvd (h : a * b ∣ c) : b ∣ c / a
-- Mathlib/Topology/FiberBundle/Basic.lean
/-- The projection from a fiber bundle to its base is continuous. -/
@[continuity]
theorem continuous_proj : Continuous (π F E)
-- Mathlib/Geometry/Euclidean/Inversion/Calculus.lean
protected theorem DifferentiableWithinAt.inversion (hc : DifferentiableWithinAt ℝ c s a)
    (hR : DifferentiableWithinAt ℝ R s a) (hx : DifferentiableWithinAt ℝ x s a) (hne : x a ≠ c a) :
    DifferentiableWithinAt ℝ (fun a ↦ inversion (c a) (R a) (x a)) s a
-- Mathlib/Data/Nat/Bitwise.lean
theorem exists_most_significant_bit {n : ℕ} (h : n ≠ 0) :
    ∃ i, testBit n i = true ∧ ∀ j, i < j → testBit n j = false
-- Mathlib/Algebra/Homology/TotalComplex.lean
lemma D₂_shape (i₁₂ i₁₂' : I₁₂) (h₁₂ : ¬ c₁₂.Rel i₁₂ i₁₂') : K.D₂ c₁₂ i₁₂ i₁₂' = 0
-- Mathlib/Algebra/GeomSum.lean
theorem Commute.mul_geom_sum₂ [Ring α] {x y : α} (h : Commute x y) (n : ℕ) :
    ((x - y) * ∑ i ∈ range n, x ^ i * y ^ (n - 1 - i)) = x ^ n - y ^ n
-- Mathlib/Algebra/Order/ToIntervalMod.lean
theorem toIcoMod_eq_self : toIcoMod hp a b = b ↔ b ∈ Set.Ico a (a + p)