ruc-ai4math/mathlib_handler_benchmark_410 huggingface dataset:
-- .lake/packages/lean4/src/lean/Init/Data/BitVec/Lemmas.lean
@[simp] theorem truncate_append {x : BitVec w} {y : BitVec v} :
    (x ++ y).truncate k = if h : k ≤ v then y.truncate k else (x.truncate (k - v) ++ y).cast (by omega)
-- Mathlib/Order/CompleteLattice.lean
lemma iSup_prod' (f : β → γ → α) : (⨆ i, ⨆ j, f i j) = ⨆ x : β × γ, f x.1 x.2
-- Mathlib/Topology/Order.lean
theorem nhds_sInf {s : Set (TopologicalSpace α)} {a : α} :
    @nhds α (sInf s) a = ⨅ t ∈ s, @nhds α t a
-- Mathlib/SetTheory/ZFC/Basic.lean
theorem map_unique {f : ZFSet.{u} → ZFSet.{u}} [H : Definable 1 f] {x z : ZFSet.{u}}
    (zx : z ∈ x) : ∃! w, pair z w ∈ map f x
-- Mathlib/Algebra/Star/StarAlgHom.lean
theorem restrictScalars_injective :
    Function.Injective (restrictScalars R : (A →⋆ₙₐ[S] B) → A →⋆ₙₐ[R] B)
-- .lake/packages/lean4/src/lean/Init/Data/Int/DivModLemmas.lean
theorem fmod_lt_of_pos (a : Int) {b : Int} (H : 0 < b) : a.fmod b < b
-- Mathlib/Algebra/TrivSqZeroExt.lean
theorem fst_list_prod [Monoid R] [AddMonoid M] [DistribMulAction R M] [DistribMulAction Rᵐᵒᵖ M]
    [SMulCommClass R Rᵐᵒᵖ M] (l : List (tsze R M)) : l.prod.fst = (l.map fst).prod
-- Mathlib/Order/Ideal.lean
protected theorem isIdeal (s : Ideal P) : IsIdeal (s : Set P)
-- Mathlib/CategoryTheory/Limits/Shapes/ZeroMorphisms.lean
@[simp]
theorem zero_app (F G : C ⥤ D) (j : C) : (0 : F ⟶ G).app j = 0
-- Mathlib/Order/Filter/Basic.lean
theorem NeBot.mono {f g : Filter α} (hf : NeBot f) (hg : f ≤ g) : NeBot g
-- .lake/packages/lean4/src/lean/Init/Data/Int/Order.lean
protected theorem ne_of_lt {a b : Int} (h : a < b) : a ≠ b
-- Mathlib/CategoryTheory/Limits/Shapes/Types.lean
/-- A multifork `c : Multifork I` in the category of types is limit iff the
map `c.toSections : c.pt → I.sections` is a bijection. -/
lemma isLimit_types_iff : Nonempty (IsLimit c) ↔ Function.Bijective c.toSections
-- Mathlib/Order/Sublattice.lean
@[simp] lemma coe_map (f : LatticeHom α β) (L : Sublattice α) : (L.map f : Set β) = f '' L
-- Mathlib/Data/Multiset/Basic.lean
lemma filter_attach' (s : Multiset α) (p : {a // a ∈ s} → Prop) [DecidableEq α]
    [DecidablePred p] :
    s.attach.filter p =
      (s.filter fun x ↦ ∃ h, p ⟨x, h⟩).attach.map (Subtype.map id fun x ↦ mem_of_mem_filter)
-- Mathlib/Data/Complex/Basic.lean
@[simp]
theorem inv_re (z : ℂ) : z⁻¹.re = z.re / normSq z
-- Mathlib/Data/Set/Semiring.lean
@[simp]
protected theorem down_up (s : Set α) : SetSemiring.down (Set.up s) = s
-- .lake/packages/batteries/Batteries/Classes/SatisfiesM.lean
/-- If `p` is always true, then every `x` satisfies it. -/
theorem of_true [Applicative m] [LawfulApplicative m] {x : m α}
    (h : ∀ a, p a) : SatisfiesM p x
-- Mathlib/Data/Set/Card.lean
theorem encard_eq_add_one_iff {k : ℕ∞} :
    s.encard = k + 1 ↔ (∃ a t, ¬a ∈ t ∧ insert a t = s ∧ t.encard = k)
-- Mathlib/Data/Multiset/Bind.lean
@[simp]
theorem coe_product (l₁ : List α) (l₂ : List β) :
    (l₁ : Multiset α) ×ˢ (l₂ : Multiset β) = (l₁ ×ˢ l₂)
-- Mathlib/Analysis/Calculus/Deriv/Add.lean
@[simp]
theorem deriv_add (hf : DifferentiableAt 𝕜 f x) (hg : DifferentiableAt 𝕜 g x) :
    deriv (fun y => f y + g y) x = deriv f x + deriv g x
-- Mathlib/LinearAlgebra/Basis.lean
theorem repr_symm_single : b.repr.symm (Finsupp.single i c) = c • b i
-- .lake/packages/batteries/Batteries/Classes/Order.lean
theorem cmp_congr_right (yz : cmp y z = .eq) : cmp x y = cmp x z
-- Mathlib/Probability/Kernel/Disintegration/Basic.lean
lemma IsCondKernel.isMarkovKernel [MeasurableSingletonClass α] (hρ : ∀ a, ρ.fst {a} ≠ 0) :
    IsMarkovKernel ρCond
-- Mathlib/Algebra/Lie/Submodule.lean
theorem inclusion_injective {I₁ I₂ : LieIdeal R L} (h : I₁ ≤ I₂) :
    Function.Injective (inclusion h)
-- Mathlib/Topology/Order.lean
theorem isOpen_iSup_iff {s : Set α} : IsOpen[⨆ i, t i] s ↔ ∀ i, IsOpen[t i] s
-- Mathlib/NumberTheory/Dioph.lean
theorem induction {C : Poly α → Prop} (H1 : ∀ i, C (proj i)) (H2 : ∀ n, C (const n))
    (H3 : ∀ f g, C f → C g → C (f - g)) (H4 : ∀ f g, C f → C g → C (f * g)) (f : Poly α) : C f
-- .lake/packages/lean4/src/lean/Init/Data/BitVec/Lemmas.lean
/-- Moves one-sided right toNat equality to BitVec equality. -/
theorem nat_eq_toNat (x : BitVec w) (y : Nat)
  : (y = x.toNat) ↔ (y < 2^w ∧ (x = BitVec.ofNat w y))
-- Mathlib/Analysis/Analytic/IsolatedZeros.lean
/-- If `f` is analytic at `z₀`, then exactly one of the following two possibilities occurs: either
`f` vanishes identically near `z₀`, or locally around `z₀` it has the form `z ↦ (z - z₀) ^ n • g z`
for some `n` and some `g` which is analytic and non-vanishing at `z₀`. -/
theorem exists_eventuallyEq_pow_smul_nonzero_iff (hf : AnalyticAt 𝕜 f z₀) :
    (∃ (n : ℕ), ∃ (g : 𝕜 → E), AnalyticAt 𝕜 g z₀ ∧ g z₀ ≠ 0 ∧
    ∀ᶠ z in 𝓝 z₀, f z = (z - z₀) ^ n • g z) ↔ (¬∀ᶠ z in 𝓝 z₀, f z = 0)
-- Mathlib/Analysis/NormedSpace/Multilinear/Basic.lean
/-- Applying a multilinear map to a vector is continuous in both coordinates. -/
theorem ContinuousMultilinearMap.continuous_eval {𝕜 ι : Type*} {E : ι → Type*} {F : Type*}
    [NormedField 𝕜] [Finite ι] [∀ i, SeminormedAddCommGroup (E i)] [∀ i, NormedSpace 𝕜 (E i)]
    [TopologicalSpace F] [AddCommGroup F] [TopologicalAddGroup F] [Module 𝕜 F] :
    Continuous fun p : ContinuousMultilinearMap 𝕜 E F × ∀ i, E i => p.1 p.2
-- Mathlib/RingTheory/WittVector/Defs.lean
theorem mul_coeff_zero (x y : 𝕎 R) : (x * y).coeff 0 = x.coeff 0 * y.coeff 0
-- Mathlib/Topology/NoetherianSpace.lean
/-- In a Noetherian space, every closed set is a finite union of irreducible closed sets. -/
theorem NoetherianSpace.exists_finite_set_closeds_irreducible [NoetherianSpace α] (s : Closeds α) :
    ∃ S : Set (Closeds α), S.Finite ∧ (∀ t ∈ S, IsIrreducible (t : Set α)) ∧ s = sSup S
-- Mathlib/Algebra/Polynomial/Div.lean
theorem modByMonic_eq_zero_iff_dvd (hq : Monic q) : p %ₘ q = 0 ↔ q ∣ p
-- Mathlib/Data/Fintype/Basic.lean
@[simp]
theorem toFinset_empty [Fintype (∅ : Set α)] : (∅ : Set α).toFinset = ∅
-- Mathlib/Data/Nat/Lattice.lean
theorem sSup_mem {s : Set ℕ} (h₁ : s.Nonempty) (h₂ : BddAbove s) : sSup s ∈ s
-- Mathlib/Algebra/Polynomial/Taylor.lean
theorem taylor_eval {R} [CommSemiring R] (r : R) (f : R[X]) (s : R) :
    (taylor r f).eval s = f.eval (s + r)
-- Mathlib/Data/Matrix/Block.lean
theorem blockDiag_map (M : Matrix (m × o) (n × o) α) (f : α → β) :
    blockDiag (M.map f) = fun k => (blockDiag M k).map f
-- .lake/packages/lean4/src/lean/Init/Data/List/Lemmas.lean
@[simp] theorem map_id (l : List α) : map id l = l
-- Mathlib/RingTheory/NonUnitalSubsemiring/Basic.lean
@[simp]
theorem map_id : s.map (NonUnitalRingHom.id R) = s
-- Mathlib/Data/Set/MemPartition.lean
@[simp]
lemma memPartition_zero (f : ℕ → Set α) : memPartition f 0 = {univ}
-- Mathlib/Analysis/NormedSpace/Multilinear/Curry.lean
@[simp]
theorem continuousMultilinearCurryRightEquiv_apply
    (f : ContinuousMultilinearMap 𝕜 (fun i : Fin n => Ei <| castSucc i) (Ei (last n) →L[𝕜] G))
    (v : ∀ i, Ei i) : (continuousMultilinearCurryRightEquiv 𝕜 Ei G) f v = f (init v) (v (last n))
-- Mathlib/Data/Set/Basic.lean
@[simp]
theorem inter_diff_self (a b : Set α) : a ∩ (b \ a) = ∅
-- Mathlib/Data/Fin/Basic.lean
@[simp] lemma predAbove_right_zero [NeZero n] {i : Fin n} : predAbove (i : Fin n) 0 = 0
-- .lake/packages/lean4/src/lean/Init/Data/Nat/Basic.lean
theorem lt_of_le_pred (h : 0 < m) : n ≤ pred m → n < m
-- Mathlib/Analysis/RCLike/Basic.lean
@[norm_cast]
theorem ofReal_one : ((1 : ℝ) : K) = 1
-- Mathlib/Order/Filter/Pointwise.lean
@[simp]
theorem vsub_bot : f -ᵥ (⊥ : Filter β) = ⊥
-- Mathlib/FieldTheory/IsPerfectClosure.lean
@[simp]
theorem liftAux_self [PerfectRing L p] : liftAux i i p = id
-- Mathlib/RingTheory/Polynomial/Chebyshev.lean
theorem T_sub_one (n : ℤ) : T R (n - 1) = 2 * X * T R n - T R (n + 1)
-- Mathlib/Algebra/Lie/Nilpotent.lean
/-- A Lie module is nilpotent if its lower central series reaches 0 (in a finite number of
steps). -/
class IsNilpotent : Prop where
  nilpotent : ∃ k, lowerCentralSeries R L M k = ⊥
-- Mathlib/Data/Finset/Lattice.lean
theorem inf_eq_iInf [CompleteLattice β] (s : Finset α) (f : α → β) : s.inf f = ⨅ a ∈ s, f a
-- Mathlib/CategoryTheory/Limits/Shapes/ConcreteCategory.lean
theorem cokernel_funext {C : Type*} [Category C] [HasZeroMorphisms C] [ConcreteCategory C]
    {M N K : C} {f : M ⟶ N} [HasCokernel f] {g h : cokernel f ⟶ K}
    (w : ∀ n : N, g (cokernel.π f n) = h (cokernel.π f n)) : g = h
-- Mathlib/Algebra/Polynomial/Degree/Lemmas.lean
theorem natDegree_sub_le_iff_right (pn : p.natDegree ≤ n) :
    (p - q).natDegree ≤ n ↔ q.natDegree ≤ n
-- Mathlib/Data/Nat/Pairing.lean
theorem iInter_unpair {α} (f : ℕ → ℕ → Set α) :
    ⋂ n : ℕ, f n.unpair.1 n.unpair.2 = ⋂ (i : ℕ) (j : ℕ), f i j
-- Mathlib/CategoryTheory/FiberedCategory/HomLift.lean
lemma fac' : p.map φ = eqToHom (domain_eq p f φ) ≫ f ≫ eqToHom (codomain_eq p f φ).symm
-- Mathlib/SetTheory/Cardinal/Continuum.lean
@[simp]
theorem lift_le_continuum {c : Cardinal.{u}} : lift.{v} c ≤ 𝔠 ↔ c ≤ 𝔠
-- Mathlib/Logic/Equiv/Option.lean
theorem removeNone_none {x : α} (h : e (some x) = none) : some (removeNone e x) = e none
-- .lake/packages/lean4/src/lean/Init/SizeOf.lean
@[simp] theorem sizeOf_thunk [SizeOf α] (f : Unit → α) : sizeOf f = sizeOf (f ())
-- Mathlib/Order/Filter/Basic.lean
theorem disjoint_comap (h : Disjoint g₁ g₂) : Disjoint (comap m g₁) (comap m g₂)
-- Mathlib/RingTheory/Regular/RegularSequence.lean
lemma _root_.LinearEquiv.isRegular_congr (e : M ≃ₗ[R] M₂) (rs : List R) :
    IsRegular M rs ↔ IsRegular M₂ rs
-- .lake/packages/lean4/src/lean/Init/Control/StateCps.lean
@[simp] theorem runK_pure (a : α) (s : σ) (k : α → σ → m β) : (pure a : StateCpsT σ m α).runK s k = k a s
-- Mathlib/Data/Fintype/Basic.lean
/-- Many `Fintype` instances for sets are defined using an extensionally equal `Finset`.
Rewriting `s.toFinset` with `Set.toFinset_ofFinset` replaces the term with such a `Finset`. -/
theorem toFinset_ofFinset {p : Set α} (s : Finset α) (H : ∀ x, x ∈ s ↔ x ∈ p) :
    @Set.toFinset _ p (Fintype.ofFinset s H) = s
-- Mathlib/Topology/UniformSpace/Completion.lean
theorem uniformContinuous_map₂ (f : α → β → γ) : UniformContinuous₂ (Completion.map₂ f)
-- Mathlib/Combinatorics/SimpleGraph/Connectivity/Subgraph.lean
lemma toSubgraph_le_induce_support (p : G.Walk u v) :
    p.toSubgraph ≤ (⊤ : G.Subgraph).induce {v | v ∈ p.support}
-- Mathlib/Algebra/MvPolynomial/Basic.lean
theorem aeval_sum {ι : Type*} (s : Finset ι) (φ : ι → MvPolynomial σ R) :
    aeval f (∑ i ∈ s, φ i) = ∑ i ∈ s, aeval f (φ i)
-- Mathlib/Order/Bounds/Basic.lean
theorem union_lowerBounds_subset_lowerBounds_inter :
    lowerBounds s ∪ lowerBounds t ⊆ lowerBounds (s ∩ t)
-- Mathlib/Order/Filter/Extr.lean
theorem isMinFilter_const {b : β} : IsMinFilter (fun _ => b) l a
-- Mathlib/Analysis/Calculus/ContDiff/Defs.lean
theorem ftaylorSeriesWithin_univ : ftaylorSeriesWithin 𝕜 f univ = ftaylorSeries 𝕜 f
-- Mathlib/Order/Filter/Extr.lean
theorem IsMaxFilter.inf (hf : IsMaxFilter f l a) (hg : IsMaxFilter g l a) :
    IsMaxFilter (fun x => f x ⊓ g x) l a
-- Mathlib/Topology/UniformSpace/Equiv.lean
@[simp]
theorem coe_toEquiv (h : α ≃ᵤ β) : ⇑h.toEquiv = h
-- Mathlib/Topology/Algebra/InfiniteSum/Module.lean
/-- Applying a continuous linear map commutes with taking an (infinite) sum. -/
protected theorem ContinuousLinearEquiv.hasSum {f : ι → M} (e : M ≃SL[σ] M₂) {y : M₂} :
    HasSum (fun b : ι ↦ e (f b)) y ↔ HasSum f (e.symm y)
-- Mathlib/Data/Complex/Module.lean
/-- Create a `selfAdjoint` element from a `skewAdjoint` element by multiplying by the scalar
`-Complex.I`. -/
@[simps]
def skewAdjoint.negISMul : skewAdjoint A →ₗ[ℝ] selfAdjoint A
-- Mathlib/Order/SymmDiff.lean
theorem symmDiff_of_le {a b : α} (h : a ≤ b) : a ∆ b = b \ a
-- Mathlib/Analysis/Convex/Side.lean
theorem SOppSide.nonempty {s : AffineSubspace R P} {x y : P} (h : s.SOppSide x y) :
    (s : Set P).Nonempty
-- Mathlib/Algebra/Ring/CentroidHom.lean
theorem toEnd_injective : Injective (CentroidHom.toEnd : CentroidHom α → AddMonoid.End α)
-- Mathlib/Data/Seq/Computation.lean
theorem liftRel_congr {R : α → β → Prop} {ca ca' : Computation α} {cb cb' : Computation β}
    (ha : ca ~ ca') (hb : cb ~ cb') : LiftRel R ca cb ↔ LiftRel R ca' cb'
-- .lake/packages/lean4/src/lean/Init/Data/Nat/Basic.lean
protected theorem pow_add_one (n m : Nat) : n^(m + 1) = n^m * n
-- Mathlib/Geometry/Euclidean/Angle/Oriented/Basic.lean
/-- If the sign of the oriented angle between two vectors is zero, either one of the vectors is
zero or the unoriented angle is 0 or π. -/
theorem eq_zero_or_angle_eq_zero_or_pi_of_sign_oangle_eq_zero {x y : V}
    (h : (o.oangle x y).sign = 0) :
    x = 0 ∨ y = 0 ∨ InnerProductGeometry.angle x y = 0 ∨ InnerProductGeometry.angle x y = π
-- Mathlib/Algebra/Tropical/Basic.lean
@[simp]
theorem untrop_le_iff [LE R] {x y : Tropical R} : untrop x ≤ untrop y ↔ x ≤ y
-- Mathlib/Algebra/Ring/Subsemiring/Basic.lean
@[simp]
theorem eqLocusS_same (f : R →+* S) : f.eqLocusS f = ⊤
-- Mathlib/GroupTheory/Nilpotent.lean
lemma Group.IsNilpotent.nilpotent (G : Type*) [Group G] [IsNilpotent G] :
    ∃ n : ℕ, upperCentralSeries G n = ⊤
-- Mathlib/Combinatorics/SetFamily/AhlswedeZhang.lean
lemma truncatedInf_union_right (hs : a ∉ upperClosure s) (ht : a ∈ upperClosure t) :
    truncatedInf (s ∪ t) a = truncatedInf t a
-- Mathlib/Order/Interval/Set/OrdConnected.lean
theorem image_Ioo (e : α ↪o β) (he : OrdConnected (range e)) (x y : α) :
    e '' Ioo x y = Ioo (e x) (e y)
-- Mathlib/Algebra/Associated/Basic.lean
@[simp]
theorem mk_eq_one [Monoid α] {a : α} : Associates.mk a = 1 ↔ IsUnit a
-- Mathlib/Order/Filter/AtTopBot.lean
theorem tendsto_atTop_add_right_of_le (C : β) (hf : Tendsto f l atTop) (hg : ∀ x, C ≤ g x) :
    Tendsto (fun x => f x + g x) l atTop
-- Mathlib/Topology/ContinuousFunction/CocompactMap.lean
/-- `CocompactMapClass F α β` states that `F` is a type of cocompact continuous maps.

You should also extend this typeclass when you extend `CocompactMap`. -/
class CocompactMapClass (F : Type*) (α β : outParam Type*) [TopologicalSpace α]
  [TopologicalSpace β] [FunLike F α β] extends ContinuousMapClass F α β : Prop where
  /-- The cocompact filter on `α` tends to the cocompact filter on `β` under the function -/
  cocompact_tendsto (f : F) : Tendsto f (cocompact α) (cocompact β)
-- Mathlib/Data/Set/Lattice.lean
theorem iUnion_false {s : False → Set α} : iUnion s = ∅
-- Mathlib/MeasureTheory/Function/L1Space.lean
theorem norm_toL1_eq_lintegral_norm (f : α → β) (hf : Integrable f μ) :
    ‖hf.toL1 f‖ = ENNReal.toReal (∫⁻ a, ENNReal.ofReal ‖f a‖ ∂μ)
-- Mathlib/Logic/Equiv/Basic.lean
/-- A function is invariant to a swap if it is equal at both elements -/
theorem apply_swap_eq_self {v : α → β} {i j : α} (hv : v i = v j) (k : α) :
    v (swap i j k) = v k
-- Mathlib/CategoryTheory/Limits/ColimitLimit.lean
/-- The map `colimit_limit_to_limit_colimit` realized as a map of cones. -/
@[simps]
noncomputable def colimitLimitToLimitColimitCone (G : J ⥤ K ⥤ C) [HasLimit G] :
    colim.mapCone (limit.cone G) ⟶ limit.cone (G ⋙ colim)
-- Mathlib/Topology/EMetricSpace/Basic.lean
theorem nhds_eq : 𝓝 x = ⨅ ε > 0, 𝓟 (ball x ε)
-- Mathlib/Topology/Connected/PathConnected.lean
theorem Joined.mem_pathComponent (hyz : Joined y z) (hxy : y ∈ pathComponent x) :
    z ∈ pathComponent x
-- Mathlib/CategoryTheory/Yoneda.lean
@[simp]
theorem yonedaEvaluation_map_down (P Q : Cᵒᵖ × (Cᵒᵖ ⥤ Type v₁)) (α : P ⟶ Q)
    (x : (yonedaEvaluation C).obj P) :
    ((yonedaEvaluation C).map α x).down = α.2.app Q.1 (P.2.map α.1 x.down)
-- Mathlib/Algebra/MvPolynomial/Supported.lean
@[simp]
theorem supportedEquivMvPolynomial_symm_C (s : Set σ) (x : R) :
    (supportedEquivMvPolynomial s).symm (C x) = algebraMap R (supported R s) x
-- Mathlib/Data/Multiset/FinsetOps.lean
@[simp]
theorem length_ndinsert_of_mem {a : α} {s : Multiset α} (h : a ∈ s) :
    card (ndinsert a s) = card s
-- Mathlib/Algebra/Lie/IdealOperations.lean
@[simp]
theorem lie_bot : ⁅I, (⊥ : LieSubmodule R L M)⁆ = ⊥
-- Mathlib/Data/ZMod/Quotient.lean
theorem orbitZPowersEquiv_symm_apply' (k : ℤ) :
    (orbitZPowersEquiv a b).symm k =
      (⟨a, mem_zpowers a⟩ : zpowers a) ^ k • ⟨b, mem_orbit_self b⟩
-- Mathlib/Analysis/PSeries.lean
theorem sum_schlomilch_le {C : ℕ} (hf : ∀ ⦃m n⦄, 1 < m → m ≤ n → f n ≤ f m) (h_pos : ∀ n, 0 < u n)
    (h_nonneg : ∀ n, 0 ≤ f n) (hu : Monotone u) (h_succ_diff : SuccDiffBounded C u) (n : ℕ) :
    ∑ k ∈ range (n + 1), (u (k + 1) - u k) • f (u k) ≤
    (u 1 - u 0) • f (u 0) + C • ∑ k ∈ Ico (u 0 + 1) (u n + 1), f k
-- .lake/packages/lean4/src/lean/Init/Data/Bool.lean
theorem eq_iff_iff {a b : Bool} : a = b ↔ (a ↔ b)
-- Mathlib/MeasureTheory/Function/ConditionalExpectation/AEMeasurable.lean
/-- `lpTrimToLpMeasSubgroup` is a left inverse of `lpMeasSubgroupToLpTrim`. -/
theorem lpMeasSubgroupToLpTrim_left_inv (hm : m ≤ m0) :
    Function.LeftInverse (lpTrimToLpMeasSubgroup F p μ hm) (lpMeasSubgroupToLpTrim F p μ hm)
-- Mathlib/MeasureTheory/Group/AddCircle.lean
/-- Let `G` be the subgroup of `AddCircle T` generated by a point `u` of finite order `n : ℕ`. Then
any set `I` that is almost equal to a ball of radius `T / 2n` is a fundamental domain for the action
of `G` on `AddCircle T` by left addition. -/
theorem isAddFundamentalDomain_of_ae_ball (I : Set <| AddCircle T) (u x : AddCircle T)
    (hu : IsOfFinAddOrder u) (hI : I =ᵐ[volume] ball x (T / (2 * addOrderOf u))) :
    IsAddFundamentalDomain (AddSubgroup.zmultiples u) I
-- Mathlib/Algebra/MonoidAlgebra/Degree.lean
theorem le_inf_support_finset_prod (degt0 : 0 ≤ degt 0)
    (degtm : ∀ a b, degt a + degt b ≤ degt (a + b)) (s : Finset ι) (f : ι → R[A]) :
    (∑ i ∈ s, (f i).support.inf degt) ≤ (∏ i ∈ s, f i).support.inf degt
-- Mathlib/Algebra/Algebra/Subalgebra/Basic.lean
@[simp, norm_cast]
theorem coe_comap (S : Subalgebra R B) (f : A →ₐ[R] B) : (S.comap f : Set A) = f ⁻¹' (S : Set B)
-- Mathlib/Algebra/Algebra/NonUnitalSubalgebra.lean
theorem mem_sup_left {S T : NonUnitalSubalgebra R A} : ∀ {x : A}, x ∈ S → x ∈ S ⊔ T
-- Mathlib/GroupTheory/SpecificGroups/Cyclic.lean
@[to_additive (attr := simp)]
lemma monoidHomOfForallMemZpowers_apply_gen :
    monoidHomOfForallMemZpowers hg hg' g = g'
-- Mathlib/NumberTheory/ModularForms/JacobiTheta/OneVariable.lean
/-- An explicit upper bound for `‖jacobiTheta τ - 1‖`. -/
theorem norm_jacobiTheta_sub_one_le {τ : ℂ} (hτ : 0 < im τ) :
    ‖jacobiTheta τ - 1‖ ≤ 2 / (1 - rexp (-π * τ.im)) * rexp (-π * τ.im)
-- Mathlib/Data/List/AList.lean
theorem perm_replace {a : α} {b : β a} {s₁ s₂ : AList β} :
    s₁.entries ~ s₂.entries → (replace a b s₁).entries ~ (replace a b s₂).entries
-- Mathlib/Topology/Algebra/Module/Alternating/Basic.lean
/-- In the specific case of continuous alternating maps on spaces indexed by `Fin (n+1)`, where one
can build an element of `Π(i : Fin (n+1)), M i` using `cons`, one can express directly the
multiplicativity of an alternating map along the first variable. -/
theorem vecCons_smul (f : ContinuousAlternatingMap R M N (Fin (n + 1))) (m : Fin n → M) (c : R)
    (x : M) : f (vecCons (c • x) m) = c • f (vecCons x m)
-- Mathlib/Algebra/Group/Action/Defs.lean
/-- `SMul` version of `one_mul_eq_id` -/
@[to_additive "`VAdd` version of `zero_add_eq_id`"]
lemma one_smul_eq_id : (((1 : M) • ·) : α → α) = id
-- .lake/packages/batteries/Batteries/Data/LazyList.lean
@[simp]
theorem mem_nil {α} (x : α) : x ∈ @LazyList.nil α ↔ False
-- Mathlib/Algebra/Order/GroupWithZero/Canonical.lean
theorem coe_le_iff {x : WithZero α} : (a : WithZero α) ≤ x ↔ ∃ b : α, x = b ∧ a ≤ b
-- Mathlib/Logic/Basic.lean
@[simp] theorem not_imp_self : ¬a → a ↔ a
-- Mathlib/Order/Circular.lean
theorem sbtw_iff_not_btw {a b c : α} : sbtw a b c ↔ ¬btw c b a
-- Mathlib/Analysis/Convex/Integral.lean
/-- **Jensen's inequality**: if a function `g : E → ℝ` is convex and continuous on a convex closed
set `s`, `μ` is a finite non-zero measure on `α`, and `f : α → E` is a function sending
`μ`-a.e. points of a set `t` to `s`, then the value of `g` at the average value of `f` over `t` is
less than or equal to the average value of `g ∘ f` over `t` provided that both `f` and `g ∘ f` are
integrable. -/
theorem ConvexOn.set_average_mem_epigraph (hg : ConvexOn ℝ s g) (hgc : ContinuousOn g s)
    (hsc : IsClosed s) (h0 : μ t ≠ 0) (ht : μ t ≠ ∞) (hfs : ∀ᵐ x ∂μ.restrict t, f x ∈ s)
    (hfi : IntegrableOn f t μ) (hgi : IntegrableOn (g ∘ f) t μ) :
    (⨍ x in t, f x ∂μ, ⨍ x in t, g (f x) ∂μ) ∈ {p : E × ℝ | p.1 ∈ s ∧ g p.1 ≤ p.2}
-- Mathlib/FieldTheory/Finite/Basic.lean
/-- **Fermat's Little Theorem**: for all `a : ℤ` coprime to `p`, we have
`a ^ (p - 1) ≡ 1 [ZMOD p]`. -/
theorem Int.ModEq.pow_card_sub_one_eq_one {p : ℕ} (hp : Nat.Prime p) {n : ℤ} (hpn : IsCoprime n p) :
    n ^ (p - 1) ≡ 1 [ZMOD p]
-- Mathlib/Algebra/Polynomial/Eval.lean
@[simp]
theorem mul_comp {R : Type*} [CommSemiring R] (p q r : R[X]) :
    (p * q).comp r = p.comp r * q.comp r
-- Mathlib/Algebra/Order/Group/Abs.lean
/-- For an element `a` of a linear ordered ring, either `abs a = a` and `0 ≤ a`,
    or `abs a = -a` and `a < 0`.
    Use cases on this lemma to automate linarith in inequalities -/
theorem abs_cases (a : α) : |a| = a ∧ 0 ≤ a ∨ |a| = -a ∧ a < 0
-- Mathlib/MeasureTheory/Measure/Hausdorff.lean
theorem isometry_comap_mkMetric (m : ℝ≥0∞ → ℝ≥0∞) {f : X → Y} (hf : Isometry f)
    (H : Monotone m ∨ Surjective f) : comap f (mkMetric m) = mkMetric m
-- Mathlib/MeasureTheory/Integral/Bochner.lean
theorem integral_mul_left {L : Type*} [RCLike L] (r : L) (f : α → L) :
    ∫ a, r * f a ∂μ = r * ∫ a, f a ∂μ
-- Mathlib/Topology/PartitionOfUnity.lean
@[simp]
theorem coe_finsupport (x₀ : X) :
    (ρ.finsupport x₀ : Set ι) = support fun i ↦ ρ i x₀
-- Mathlib/MeasureTheory/Function/SimpleFunc.lean
theorem lintegral_restrict {m : MeasurableSpace α} (f : α →ₛ ℝ≥0∞) (s : Set α) (μ : Measure α) :
    f.lintegral (μ.restrict s) = ∑ y ∈ f.range, y * μ (f ⁻¹' {y} ∩ s)
-- Mathlib/Topology/Order/IntermediateValue.lean
/-- A preconnected set in a conditionally complete linear order is either one of the intervals
`[Inf s, Sup s]`, `[Inf s, Sup s)`, `(Inf s, Sup s]`, `(Inf s, Sup s)`, `[Inf s, +∞)`,
`(Inf s, +∞)`, `(-∞, Sup s]`, `(-∞, Sup s)`, `(-∞, +∞)`, or `∅`. The converse statement requires
`α` to be densely ordered. -/
theorem IsPreconnected.mem_intervals {s : Set α} (hs : IsPreconnected s) :
    s ∈
      ({Icc (sInf s) (sSup s), Ico (sInf s) (sSup s), Ioc (sInf s) (sSup s), Ioo (sInf s) (sSup s),
          Ici (sInf s), Ioi (sInf s), Iic (sSup s), Iio (sSup s), univ, ∅} : Set (Set α))
-- Mathlib/RingTheory/Polynomial/RationalRoot.lean
/-- Rational root theorem part 2:
if `r : f.codomain` is a root of a polynomial over the ufd `A`,
then the denominator of `r` divides the leading coefficient -/
theorem den_dvd_of_is_root {p : A[X]} {r : K} (hr : aeval r p = 0) :
    (den A r : A) ∣ p.leadingCoeff
-- Mathlib/Combinatorics/SimpleGraph/Trails.lean
theorem IsTrail.even_countP_edges_iff {u v : V} {p : G.Walk u v} (ht : p.IsTrail) (x : V) :
    Even (p.edges.countP fun e => x ∈ e) ↔ u ≠ v → x ≠ u ∧ x ≠ v
-- Mathlib/GroupTheory/OrderOfElement.lean
@[to_additive]
lemma orderOf_pow_of_dvd {x : G} {n : ℕ} (hn : n ≠ 0) (dvd : n ∣ orderOf x) :
    orderOf (x ^ n) = orderOf x / n
-- Mathlib/CategoryTheory/Limits/Shapes/Products.lean
@[reassoc (attr := simp)]
lemma Cofan.IsColimit.fac {F : β → C} {c : Cofan F} (hc : IsColimit c) {A : C}
    (f : ∀ i, F i ⟶ A) (i : β) :
    c.inj i ≫ Cofan.IsColimit.desc hc f = f i
-- Mathlib/Order/Interval/Finset/Basic.lean
@[simp]
theorem Ioc_union_Ioc_eq_Ioc {a b c : α} (h₁ : a ≤ b) (h₂ : b ≤ c) :
    Ioc a b ∪ Ioc b c = Ioc a c
-- Mathlib/Algebra/RingQuot.lean
theorem mkRingHom_surjective (r : R → R → Prop) : Function.Surjective (mkRingHom r)
-- Mathlib/AlgebraicTopology/DoldKan/Projections.lean
@[reassoc (attr := simp)]
theorem P_f_naturality (q n : ℕ) {X Y : SimplicialObject C} (f : X ⟶ Y) :
    f.app (op [n]) ≫ (P q).f n = (P q).f n ≫ f.app (op [n])
-- Mathlib/SetTheory/Cardinal/Basic.lean
theorem sum_le_sum {ι} (f g : ι → Cardinal) (H : ∀ i, f i ≤ g i) : sum f ≤ sum g
-- Mathlib/Topology/Inseparable.lean
theorem not_inseparable_iff_exists_open :
    ¬(x ~ᵢ y) ↔ ∃ s : Set X, IsOpen s ∧ Xor' (x ∈ s) (y ∈ s)
-- Mathlib/Data/Ordmap/Ordset.lean
theorem balancedSz_zero {l : ℕ} : BalancedSz l 0 ↔ l ≤ 1
-- Mathlib/NumberTheory/LSeries/HurwitzZetaOdd.lean
lemma completedSinZeta_neg (a : UnitAddCircle) (s : ℂ) :
    completedSinZeta (-a) s = -completedSinZeta a s