ruc-ai4math/mathlib_handler_benchmark_410 huggingface dataset:
-- Mathlib/Data/QPF/Multivariate/Constructions/Cofix.lean
theorem Cofix.dest_corec {α : TypeVec n} {β : Type u} (g : β → F (α.append1 β)) (x : β) :
    Cofix.dest (Cofix.corec g x) = appendFun id (Cofix.corec g) <$$> g x
-- Mathlib/Analysis/NormedSpace/AffineIsometry.lean
@[simp]
theorem comp_continuous_iff {α : Type*} [TopologicalSpace α] {g : α → P} :
    Continuous (f ∘ g) ↔ Continuous g
-- Mathlib/Order/Lattice.lean
@[simp]
theorem le_sup_left : a ≤ a ⊔ b
-- Mathlib/MeasureTheory/Covering/VitaliFamily.lean
theorem measure_le_tsum [SecondCountableTopology α] : μ s ≤ ∑' x : h.index, μ (h.covering x)
-- Mathlib/Algebra/Order/ToIntervalMod.lean
@[simp]
theorem toIocMod_sub (a b : α) : toIocMod hp a (b - p) = toIocMod hp a b
-- Mathlib/Data/Part.lean
@[simp]
theorem coe_none : (@Option.none α : Part α) = none
-- Mathlib/MeasureTheory/Group/Measure.lean
@[to_additive]
lemma _root_.MeasurableSet.mul_closure_one_eq {s : Set G} (hs : MeasurableSet s) :
    s * (closure {1} : Set G) = s
-- Mathlib/Analysis/Analytic/Basic.lean
/-- If `‖pₙ‖ rⁿ` is bounded in `n`, then the radius of `p` is at least `r`. -/
theorem le_radius_of_bound (C : ℝ) {r : ℝ≥0} (h : ∀ n : ℕ, ‖p n‖ * (r : ℝ) ^ n ≤ C) :
    (r : ℝ≥0∞) ≤ p.radius
-- Mathlib/Topology/MetricSpace/Polish.lean
/-- Pulling back a Polish topology under an equiv gives again a Polish topology. -/
theorem _root_.Equiv.polishSpace_induced [t : TopologicalSpace β] [PolishSpace β] (f : α ≃ β) :
    @PolishSpace α (t.induced f)
-- Mathlib/Algebra/Polynomial/Degree/TrailingDegree.lean
@[simp] lemma natTrailingDegree_eq_zero : natTrailingDegree p = 0 ↔ p = 0 ∨ coeff p 0 ≠ 0
-- Mathlib/Algebra/Group/Indicator.lean
@[to_additive (attr := simp)]
theorem mulIndicator_eq_one : (mulIndicator s f = fun x => 1) ↔ Disjoint (mulSupport f) s
-- Mathlib/Order/Basic.lean
theorem forall_lt_iff_le [LinearOrder α] {a b : α} : (∀ ⦃c⦄, c < a → c < b) ↔ a ≤ b
-- Mathlib/Combinatorics/SetFamily/HarrisKleitman.lean
/-- **Harris-Kleitman inequality**: Any two lower sets of finsets correlate. -/
theorem IsLowerSet.le_card_inter_finset (h𝒜 : IsLowerSet (𝒜 : Set (Finset α)))
    (hℬ : IsLowerSet (ℬ : Set (Finset α))) : 𝒜.card * ℬ.card ≤ 2 ^ Fintype.card α * (𝒜 ∩ ℬ).card
-- Mathlib/Combinatorics/SimpleGraph/Path.lean
theorem connectedComponentMk_mem {v : V} : v ∈ G.connectedComponentMk v
-- .lake/packages/lean4/src/lean/Init/Data/Int/Lemmas.lean
protected theorem neg_ne_zero : -a ≠ 0 ↔ a ≠ 0
-- Mathlib/Topology/Order/LawsonTopology.lean
lemma lawson_le_scott : lawson α ≤ scott α
-- .lake/packages/lean4/src/lean/Init/Data/List/Lemmas.lean
theorem mem_or_eq_of_mem_set : ∀ {l : List α} {n : Nat} {a b : α}, a ∈ l.set n b → a ∈ l ∨ a = b
-- Mathlib/MeasureTheory/Measure/Portmanteau.lean
/-- One implication of the portmanteau theorem:
Weak convergence of probability measures implies that the limsup of the measures of any closed
set is at most the measure of the closed set under the limit probability measure.
-/
theorem ProbabilityMeasure.limsup_measure_closed_le_of_tendsto {Ω ι : Type*} {L : Filter ι}
    [MeasurableSpace Ω] [TopologicalSpace Ω] [OpensMeasurableSpace Ω] [HasOuterApproxClosed Ω]
    {μ : ProbabilityMeasure Ω} {μs : ι → ProbabilityMeasure Ω} (μs_lim : Tendsto μs L (𝓝 μ))
    {F : Set Ω} (F_closed : IsClosed F) :
    (L.limsup fun i => (μs i : Measure Ω) F) ≤ (μ : Measure Ω) F
-- Mathlib/Order/Monotone/Basic.lean
@[simp]
theorem strictMonoOn_toDual_comp_iff : StrictMonoOn (toDual ∘ f : α → βᵒᵈ) s ↔ StrictAntiOn f s
-- Mathlib/Order/SupClosed.lean
lemma IsSublattice.inter (hs : IsSublattice s) (ht : IsSublattice t) : IsSublattice (s ∩ t)
-- Mathlib/MeasureTheory/Constructions/Prod/Basic.lean
theorem prodAssoc_prod [SFinite τ] :
    map MeasurableEquiv.prodAssoc ((μ.prod ν).prod τ) = μ.prod (ν.prod τ)
-- Mathlib/MeasureTheory/Function/LpSpace.lean
theorem cauchySeq_Lp_iff_cauchySeq_ℒp {ι} [Nonempty ι] [SemilatticeSup ι] [hp : Fact (1 ≤ p)]
    (f : ι → Lp E p μ) :
    CauchySeq f ↔ Tendsto (fun n : ι × ι => eLpNorm (⇑(f n.fst) - ⇑(f n.snd)) p μ) atTop (𝓝 0)
-- Mathlib/Computability/Halting.lean
/-- The Halting problem is recursively enumerable -/
theorem halting_problem_re (n) : RePred fun c => (eval c n).Dom
-- Mathlib/AlgebraicGeometry/Sites/BigZariski.lean
lemma zariskiPretopology_openCover {Y : Scheme.{u}} (U : OpenCover.{u} Y) :
    zariskiPretopology Y (Presieve.ofArrows U.obj U.map)
-- Mathlib/NumberTheory/LegendreSymbol/GaussEisensteinLemmas.lean
/-- **Eisenstein's lemma** -/
theorem eisenstein_lemma {p : ℕ} [Fact p.Prime] (hp : p ≠ 2) {a : ℕ} (ha1 : a % 2 = 1)
    (ha0 : (a : ZMod p) ≠ 0) : legendreSym p a = (-1) ^ ∑ x ∈ Ico 1 (p / 2).succ, x * a / p
-- Mathlib/Order/Monotone/Monovary.lean
theorem Antivary.dual : Antivary f g → Antivary (toDual ∘ f) (toDual ∘ g)
-- Mathlib/Combinatorics/Additive/AP/Three/Defs.lean
@[to_additive]
theorem mulRothNumber_union_le (s t : Finset α) :
    mulRothNumber (s ∪ t) ≤ mulRothNumber s + mulRothNumber t
-- Mathlib/Geometry/RingedSpace/LocallyRingedSpace.lean
theorem comp_val_c_app {X Y Z : LocallyRingedSpace.{u}} (f : X ⟶ Y) (g : Y ⟶ Z) (U : (Opens Z)ᵒᵖ) :
    (f ≫ g).val.c.app U = g.val.c.app U ≫ f.val.c.app (op <| (Opens.map g.val.base).obj U.unop)
-- Mathlib/Topology/Algebra/InfiniteSum/Order.lean
@[to_additive]
theorem tprod_le_of_prod_le' (ha₂ : 1 ≤ a₂) (h : ∀ s, ∏ i ∈ s, f i ≤ a₂) : ∏' i, f i ≤ a₂
-- .lake/packages/lean4/src/lean/Init/Data/Nat/Basic.lean
theorem pow_le_pow_of_le_right {n : Nat} (hx : n > 0) {i : Nat} : ∀ {j}, i ≤ j → n^i ≤ n^j
-- Mathlib/CategoryTheory/Subobject/Lattice.lean
theorem inf_le_right {A : C} (f g : Subobject A) : (inf.obj f).obj g ≤ g
-- Mathlib/Order/Filter/EventuallyConst.lean
@[simp] theorem eventuallyConst_id : EventuallyConst id l ↔ l.Subsingleton
-- Mathlib/Geometry/Manifold/MFDeriv/SpecificFunctions.lean
theorem HasMFDerivAt.sub (hf : HasMFDerivAt I 𝓘(𝕜, E') f z f')
    (hg : HasMFDerivAt I 𝓘(𝕜, E') g z g') : HasMFDerivAt I 𝓘(𝕜, E') (f - g) z (f' - g')
-- Mathlib/Data/Multiset/FinsetOps.lean
@[simp]
theorem length_ndinsert_of_not_mem {a : α} {s : Multiset α} (h : a ∉ s) :
    card (ndinsert a s) = card s + 1
-- Mathlib/RingTheory/AdjoinRoot.lean
@[simp]
theorem aeval_algHom_eq_zero (ϕ : AdjoinRoot f →ₐ[R] S) : aeval (ϕ (root f)) f = 0
-- Mathlib/RingTheory/AdjoinRoot.lean
theorem isDomain_of_prime (hf : Prime f) : IsDomain (AdjoinRoot f)
-- Mathlib/Algebra/Module/LinearMap/Defs.lean
@[ext]
theorem ext {f g : M →ₛₗ[σ] M₃} (h : ∀ x, f x = g x) : f = g
-- Mathlib/MeasureTheory/Measure/MutuallySingular.lean
@[simp]
lemma measure_nullSet (h : μ ⟂ₘ ν) : μ h.nullSet = 0
-- Mathlib/RingTheory/WittVector/Basic.lean
theorem surjective (f : α → β) (hf : Surjective f) : Surjective (mapFun f : 𝕎 α → 𝕎 β)
-- Mathlib/Algebra/CharP/CharAndCard.lean
/-- A prime `p` is a unit in a commutative ring `R` of nonzero characteristic iff it does not divide
the characteristic. -/
theorem isUnit_iff_not_dvd_char_of_ringChar_ne_zero (R : Type*) [CommRing R] (p : ℕ) [Fact p.Prime]
    (hR : ringChar R ≠ 0) : IsUnit (p : R) ↔ ¬p ∣ ringChar R
-- Mathlib/Data/Multiset/Lattice.lean
@[simp]
theorem inf_add (s₁ s₂ : Multiset α) : (s₁ + s₂).inf = s₁.inf ⊓ s₂.inf
-- Mathlib/Topology/MetricSpace/Isometry.lean
theorem preimage_emetric_ball (h : Isometry f) (x : α) (r : ℝ≥0∞) :
    f ⁻¹' EMetric.ball (f x) r = EMetric.ball x r
-- Mathlib/LinearAlgebra/Matrix/ZPow.lean
theorem zpow_one_add {A : M} (h : IsUnit A.det) (i : ℤ) : A ^ (1 + i) = A * A ^ i
-- Mathlib/RingTheory/Localization/Finiteness.lean
lemma of_isLocalizedModule [Module.Finite R M] : Module.Finite Rₚ Mₚ
-- Mathlib/FieldTheory/IsAlgClosed/AlgebraicClosure.lean
theorem exists_ofStep (z : AlgebraicClosureAux k) : ∃ n x, ofStep k n x = z
-- Mathlib/Analysis/Calculus/ContDiff/Basic.lean
/-- If `f` admits a Taylor series `p` in a set `s`, and `g` is linear, then `f ∘ g` admits a Taylor
series in `g ⁻¹' s`, whose `k`-th term is given by `p k (g v₁, ..., g vₖ)` . -/
theorem HasFTaylorSeriesUpToOn.compContinuousLinearMap (hf : HasFTaylorSeriesUpToOn n f p s)
    (g : G →L[𝕜] E) :
    HasFTaylorSeriesUpToOn n (f ∘ g) (fun x k => (p (g x) k).compContinuousLinearMap fun _ => g)
      (g ⁻¹' s)
-- Mathlib/Algebra/CharP/ExpChar.lean
theorem LinearMap.iterateFrobenius_def [Algebra R S] (n : ℕ) (x : S) :
    iterateFrobenius R S p n x = x ^ p ^ n
-- Mathlib/CategoryTheory/Limits/Shapes/Kernels.lean
@[reassoc (attr := simp)]
theorem KernelFork.condition (s : KernelFork f) : Fork.ι s ≫ f = 0
-- Mathlib/MeasureTheory/OuterMeasure/Basic.lean
@[deprecated measure_mono (since := "2024-05-14")]
theorem mono' (m : OuterMeasure α) {s₁ s₂} (h : s₁ ⊆ s₂) : m s₁ ≤ m s₂
-- Mathlib/Algebra/MvPolynomial/Supported.lean
theorem supported_eq_range_rename (s : Set σ) : supported R s = (rename ((↑) : s → σ)).range
-- Mathlib/CategoryTheory/Monoidal/Mod_.lean
@[simp]
theorem id_hom' (M : Mod_ A) : (𝟙 M : M ⟶ M).hom = 𝟙 M.X
-- Mathlib/Algebra/Ring/Defs.lean
theorem ite_sub_ite {α} [Sub α] (P : Prop) [Decidable P] (a b c d : α) :
    ((if P then a else b) - if P then c else d) = if P then a - c else b - d
-- Mathlib/Data/Finset/Basic.lean
@[simp]
theorem lt_eq_subset : ((· < ·) : Finset α → Finset α → Prop) = (· ⊂ ·)
-- Mathlib/Analysis/Convex/Side.lean
theorem wOppSide_iff_exists_right {s : AffineSubspace R P} {x y p₂ : P} (h : p₂ ∈ s) :
    s.WOppSide x y ↔ y ∈ s ∨ ∃ p₁ ∈ s, SameRay R (x -ᵥ p₁) (p₂ -ᵥ y)
-- Mathlib/Analysis/Analytic/Basic.lean
/-- Analogue of `HasFPowerSeriesOnBall` where convergence is required only on a set `s`. -/
structure HasFPowerSeriesWithinOnBall (f : E → F) (p : FormalMultilinearSeries 𝕜 E F) (s : Set E)
    (x : E) (r : ℝ≥0∞) : Prop where
  /-- `p` converges on `ball 0 r` -/
  r_le : r ≤ p.radius
  /-- The radius of convergence is positive -/
  r_pos : 0 < r
  /-- `p converges to f` within `s` -/
  hasSum : ∀ {y}, x + y ∈ s → y ∈ EMetric.ball (0 : E) r →
    HasSum (fun n : ℕ => p n fun _ : Fin n => y) (f (x + y))
  /-- We require `ContinuousWithinAt f s x` to ensure `f x` is nice -/
  continuousWithinAt : ContinuousWithinAt f s x
-- Mathlib/SetTheory/Cardinal/Cofinality.lean
/-- The set in the `lsub` characterization of `cof` is nonempty. -/
theorem cof_lsub_def_nonempty (o) :
    { a : Cardinal | ∃ (ι : _) (f : ι → Ordinal), lsub.{u, u} f = o ∧ #ι = a }.Nonempty
-- Mathlib/Analysis/BoxIntegral/Box/Basic.lean
theorem distortion_eq_of_sub_eq_div {I J : Box ι} {r : ℝ}
    (h : ∀ i, I.upper i - I.lower i = (J.upper i - J.lower i) / r) :
    distortion I = distortion J
-- Mathlib/Data/Nat/Choose/Factorization.lean
/-- A `pow` form of `Nat.factorization_choose_le` -/
theorem pow_factorization_choose_le (hn : 0 < n) : p ^ (choose n k).factorization p ≤ n
-- Mathlib/GroupTheory/Perm/Cycle/Factors.lean
theorem pow_mod_orderOf_cycleOf_apply (f : Perm α) [DecidableRel f.SameCycle] (n : ℕ) (x : α) :
    (f ^ (n % orderOf (cycleOf f x))) x = (f ^ n) x
-- Mathlib/Data/Set/Lattice.lean
theorem disjoint_iUnion₂_left {s : ∀ i, κ i → Set α} {t : Set α} :
    Disjoint (⋃ (i) (j), s i j) t ↔ ∀ i j, Disjoint (s i j) t
-- Mathlib/ModelTheory/Substructures.lean
@[simp]
theorem closure_empty : closure L (∅ : Set M) = ⊥
-- Mathlib/Analysis/Calculus/Deriv/Slope.lean
theorem HasDerivWithinAt.liminf_right_slope_le (hf : HasDerivWithinAt f f' (Ici x) x)
    (hr : f' < r) : ∃ᶠ z in 𝓝[>] x, slope f x z < r
-- Mathlib/Topology/Algebra/Monoid.lean
/-- Basic hypothesis to talk about a topological monoid or a topological semigroup.
A topological monoid over `M`, for example, is obtained by requiring both the instances `Monoid M`
and `ContinuousMul M`.

Continuity in only the left/right argument can be stated using
`ContinuousConstSMul α α`/`ContinuousConstSMul αᵐᵒᵖ α`. -/
@[to_additive]
class ContinuousMul (M : Type u) [TopologicalSpace M] [Mul M] : Prop where
  continuous_mul : Continuous fun p : M × M => p.1 * p.2
-- Mathlib/Algebra/Order/Monovary.lean
@[to_additive] lemma AntivaryOn.div_left (h₁ : AntivaryOn f₁ g s) (h₂ : MonovaryOn f₂ g s) :
    AntivaryOn (f₁ / f₂) g s
-- Mathlib/Data/Finset/Grade.lean
lemma _root_.CovBy.card_finset (h : s ⋖ t) : s.card ⋖ t.card
-- Mathlib/Geometry/Manifold/InteriorBoundary.lean
/-- The interior of `M × N` is the product of the interiors of `M` and `N`. -/
lemma ModelWithCorners.interior_prod :
    (I.prod J).interior (M × N) = (I.interior M) ×ˢ (J.interior N)
-- Mathlib/Topology/IndicatorConstPointwise.lean
lemma tendsto_ite {β : Type*} {p : ι → Prop} [DecidablePred p] {q : Prop} [Decidable q]
    {a b : β} {F G : Filter β}
    (haG : {a}ᶜ ∈ G) (hbF : {b}ᶜ ∈ F) (haF : principal {a} ≤ F) (hbG : principal {b} ≤ G) :
    Tendsto (fun i ↦ if p i then a else b) L (if q then F else G) ↔ ∀ᶠ i in L, p i ↔ q
-- Mathlib/Data/Nat/Totient.lean
theorem totient_lt (n : ℕ) (hn : 1 < n) : φ n < n
-- .lake/packages/lean4/src/lean/Init/Data/Int/DivModLemmas.lean
@[simp] theorem zero_mod (b : Int) : mod 0 b = 0
-- Mathlib/CategoryTheory/Idempotents/Karoubi.lean
@[simp]
theorem coe_p (X : C) : (X : Karoubi C).p = 𝟙 X
-- Mathlib/Analysis/InnerProductSpace/Adjoint.lean
/-- The adjoint of the composition of two operators is the composition of the two adjoints
in reverse order. -/
@[simp]
theorem adjoint_comp (A : F →ₗ[𝕜] G) (B : E →ₗ[𝕜] F) :
    LinearMap.adjoint (A ∘ₗ B) = LinearMap.adjoint B ∘ₗ LinearMap.adjoint A
-- Mathlib/Algebra/Polynomial/Smeval.lean
theorem smeval_X_pow_mul : ∀ (n : ℕ), (X^n * p).smeval x = x^n * p.smeval x
-- Mathlib/Algebra/Category/AlgebraCat/Symmetric.lean
/-- `forget₂ (AlgebraCat R) (ModuleCat R)` as a braided functor. -/
@[simps toMonoidalFunctor]
def toModuleCatBraidedFunctor : BraidedFunctor (AlgebraCat.{u} R) (ModuleCat.{u} R)
-- Mathlib/Order/Atoms.lean
@[simp]
theorem isAtom_top : IsAtom (⊤ : α)
-- Mathlib/Analysis/Complex/Liouville.lean
/-- **Liouville's theorem**: a complex differentiable bounded function is a constant. -/
theorem exists_eq_const_of_bounded {f : E → F} (hf : Differentiable ℂ f)
    (hb : IsBounded (range f)) : ∃ c, f = const E c
-- Mathlib/CategoryTheory/Whiskering.lean
@[simp, reassoc]
theorem whiskerLeft_comp (F : C ⥤ D) {G H K : D ⥤ E} (α : G ⟶ H) (β : H ⟶ K) :
    whiskerLeft F (α ≫ β) = whiskerLeft F α ≫ whiskerLeft F β
-- Mathlib/Data/Finset/Lattice.lean
theorem inf_sup_distrib_left (s : Finset ι) (f : ι → α) (a : α) :
    a ⊔ s.inf f = s.inf fun i => a ⊔ f i
-- Mathlib/RingTheory/Polynomial/Vieta.lean
/-- Vieta's formula for split polynomials over a field. -/
theorem _root_.Polynomial.coeff_eq_esymm_roots_of_splits {F} [Field F] {p : F[X]}
    (hsplit : p.Splits (RingHom.id F)) {k : ℕ} (h : k ≤ p.natDegree) :
    p.coeff k = p.leadingCoeff * (-1) ^ (p.natDegree - k) * p.roots.esymm (p.natDegree - k)
-- Mathlib/Data/Nat/Prime/Defs.lean
theorem Prime.dvd_iff_eq {p a : ℕ} (hp : p.Prime) (a1 : a ≠ 1) : a ∣ p ↔ p = a
-- Mathlib/Algebra/CharP/Invertible.lean
theorem not_ringChar_dvd_of_invertible {t : ℕ} [Invertible (t : K)] : ¬ringChar K ∣ t
-- Mathlib/Algebra/Lie/Rank.lean
lemma isRegular_def :
    IsRegular R M x ↔ (toEnd R L M x).charpoly.coeff (rank R L M) ≠ 0
-- Mathlib/GroupTheory/Coprod/Basic.lean
@[to_additive (attr := simp)] theorem fst_apply_inr (x : N) : fst (inr x : M ∗ N) = 1
-- Mathlib/Analysis/Complex/AbsMax.lean
/-- If two complex differentiable functions `f g : E → F` are equal on the boundary of a bounded set
`U`, then they are equal on `closure U`. -/
theorem eqOn_closure_of_eqOn_frontier {f g : E → F} {U : Set E} (hU : IsBounded U)
    (hf : DiffContOnCl ℂ f U) (hg : DiffContOnCl ℂ g U) (hfg : EqOn f g (frontier U)) :
    EqOn f g (closure U)
-- Mathlib/Computability/Partrec.lean
theorem bind_decode₂_iff {f : α →. σ} :
    Partrec f ↔ Nat.Partrec fun n => Part.bind (decode₂ α n) fun a => (f a).map encode
-- Mathlib/AlgebraicGeometry/StructureSheaf.lean
theorem const_self (f : R) (U hu) : const R f f U hu = 1
-- Mathlib/Analysis/Calculus/LineDeriv/Basic.lean
theorem HasLineDerivWithinAt.smul (h : HasLineDerivWithinAt 𝕜 f f' s x v) (c : 𝕜) :
    HasLineDerivWithinAt 𝕜 f (c • f') s x (c • v)
-- Mathlib/Data/Set/Function.lean
protected theorem rangeFactorization (h : Monotone f) : Monotone (Set.rangeFactorization f)
-- Mathlib/GroupTheory/SpecificGroups/Alternating.lean
@[simp]
theorem closure_three_cycles_eq_alternating :
    closure { σ : Perm α | IsThreeCycle σ } = alternatingGroup α
-- Mathlib/SetTheory/Cardinal/Basic.lean
theorem le_one_iff_subsingleton {α : Type u} : #α ≤ 1 ↔ Subsingleton α
-- Mathlib/Data/Fintype/Units.lean
@[simp]
theorem UnitsInt.univ : (Finset.univ : Finset ℤˣ) = {1, -1}
-- Mathlib/Data/List/NatAntidiagonal.lean
theorem antidiagonal_succ' {n : ℕ} :
    antidiagonal (n + 1) = (antidiagonal n).map (Prod.map id Nat.succ) ++ [(n + 1, 0)]
-- Mathlib/Data/Set/Finite.lean
/-- A finite union of sets which are all bounded above is still bounded above. -/
theorem Finite.bddAbove_biUnion {I : Set β} {S : β → Set α} (H : I.Finite) :
    BddAbove (⋃ i ∈ I, S i) ↔ ∀ i ∈ I, BddAbove (S i)
-- Mathlib/Algebra/Group/UniqueProds.lean
@[to_additive]
theorem of_card_le_one (hA : A.Nonempty) (hB : B.Nonempty) (hA1 : A.card ≤ 1) (hB1 : B.card ≤ 1) :
    ∃ a ∈ A, ∃ b ∈ B, UniqueMul A B a b
-- Mathlib/Analysis/SpecialFunctions/Trigonometric/Deriv.lean
theorem HasDerivWithinAt.sin (hf : HasDerivWithinAt f f' s x) :
    HasDerivWithinAt (fun x => Real.sin (f x)) (Real.cos (f x) * f') s x
-- Mathlib/Data/Matrix/Basic.lean
theorem diagonal_ofNat' [Zero α] [NatCast α] (m : ℕ) [m.AtLeastTwo] :
    diagonal (no_index (OfNat.ofNat m : n → α)) = OfNat.ofNat m
-- Mathlib/Analysis/Matrix.lean
/-- This applies to the sup norm of sup norm. -/
protected theorem boundedSMul [SeminormedRing R] [SeminormedAddCommGroup α] [Module R α]
    [BoundedSMul R α] : BoundedSMul R (Matrix m n α)
-- Mathlib/Data/Nat/Dist.lean
theorem dist_pos_of_ne {i j : Nat} : i ≠ j → 0 < dist i j
-- Mathlib/Order/BoundedOrder.lean
@[simp]
theorem isBot_bot : IsBot (⊥ : α)
-- Mathlib/Analysis/SpecialFunctions/ContinuousFunctionalCalculus/ExpLog.lean
@[simp] lemma log_zero : log (0 : A) = 0
-- Mathlib/Order/CompleteLattice.lean
@[simp]
theorem iSup_pos {p : Prop} {f : p → α} (hp : p) : ⨆ h : p, f h = f hp
-- Mathlib/Data/Fin/Basic.lean
@[simp, norm_cast] lemma coe_castLEEmb {m n} (hmn : m ≤ n) : castLEEmb hmn = castLE hmn
-- Mathlib/Geometry/Manifold/ContMDiff/Basic.lean
/-- The composition of `C^n` functions at points is `C^n`. -/
nonrec theorem ContMDiffAt.comp {g : M' → M''} (x : M) (hg : ContMDiffAt I' I'' n g (f x))
    (hf : ContMDiffAt I I' n f x) : ContMDiffAt I I'' n (g ∘ f) x
-- Mathlib/Logic/Basic.lean
theorem xor_iff_not_iff' : Xor' a b ↔ (¬a ↔ b)
-- Mathlib/SetTheory/Cardinal/Basic.lean
lemma lift_mk_le_lift_mk_of_injective {α : Type u} {β : Type v} {f : α → β} (hf : Injective f) :
    Cardinal.lift.{v} (#α) ≤ Cardinal.lift.{u} (#β)
-- Mathlib/Order/CompleteBooleanAlgebra.lean
theorem inf_iSup₂_eq {f : ∀ i, κ i → α} (a : α) :
    (a ⊓ ⨆ (i) (j), f i j) = ⨆ (i) (j), a ⊓ f i j
-- Mathlib/Algebra/Lie/Rank.lean
lemma exists_isRegular [Infinite R] : ∃ x : L, IsRegular R M x
-- Mathlib/Algebra/Homology/ShortComplex/LeftHomology.lean
@[reassoc (attr := simp)]
lemma leftHomologyπ_comp_leftHomologyIso_hom :
    S.leftHomologyπ ≫ h.leftHomologyIso.hom = h.cyclesIso.hom ≫ h.π
-- Mathlib/Data/List/Basic.lean
@[simp]
theorem bidirectionalRec_cons_append {motive : List α → Sort*}
    (nil : motive []) (singleton : ∀ a : α, motive [a])
    (cons_append : ∀ (a : α) (l : List α) (b : α), motive l → motive (a :: (l ++ [b])))
    (a : α) (l : List α) (b : α) :
    bidirectionalRec nil singleton cons_append (a :: (l ++ [b])) =
      cons_append a l b (bidirectionalRec nil singleton cons_append l)
-- Mathlib/RepresentationTheory/GroupCohomology/LowDegree.lean
lemma isoOneCocycles_hom_comp_subtype :
    (isoOneCocycles A).hom ≫ ModuleCat.ofHom (oneCocycles A).subtype =
      iCocycles A 1 ≫ (oneCochainsLequiv A).toModuleIso.hom
-- Mathlib/Analysis/CstarAlgebra/Spectrum.lean
theorem spectrum.subset_circle_of_unitary {u : E} (h : u ∈ unitary E) :
    spectrum 𝕜 u ⊆ Metric.sphere 0 1
-- Mathlib/Topology/Algebra/Monoid.lean
@[to_additive (attr := continuity)]
theorem continuous_multiset_prod {f : ι → X → M} (s : Multiset ι) :
    (∀ i ∈ s, Continuous (f i)) → Continuous fun a => (s.map fun i => f i a).prod
-- Mathlib/RingTheory/WittVector/MulCoeff.lean
theorem mul_polyOfInterest_aux2 (n : ℕ) :
    (p : 𝕄) ^ n * wittMul p n + wittPolyProdRemainder p n = wittPolyProd p n
-- Mathlib/Data/Finmap.lean
@[simp]
theorem keys_val (s : AList β) : (keys ⟦s⟧).val = s.keys
-- Mathlib/CategoryTheory/Monoidal/Functor.lean
@[reassoc (attr := simp)]
theorem OplaxMonoidalFunctor.left_unitality_hom (F : OplaxMonoidalFunctor C D) (X : C) :
    F.δ (𝟙_ C) X ≫ F.η ▷ F.obj X ≫ (λ_ (F.obj X)).hom = F.map (λ_ X).hom
-- .lake/packages/lean4/src/lean/Init/Data/Nat/Gcd.lean
theorem gcd_eq_left {m n : Nat} (H : m ∣ n) : gcd m n = m
-- Mathlib/Data/Finset/NoncommProd.lean
@[to_additive noncommSum_eq_card_nsmul]
theorem noncommProd_eq_pow_card (s : Finset α) (f : α → β) (comm) (m : β) (h : ∀ x ∈ s, f x = m) :
    s.noncommProd f comm = m ^ s.card
-- Mathlib/Data/Matroid/Map.lean
@[simp] lemma comapOn_indep_iff :
    (N.comapOn E f).Indep I ↔ (N.Indep (f '' I) ∧ InjOn f I ∧ I ⊆ E)
-- Mathlib/Geometry/Manifold/LocalInvariantProperties.lean
theorem liftProp_id (hG : G.LocalInvariantProp G Q) (hQ : ∀ y, Q id univ y) :
    LiftProp Q (id : M → M)
-- Mathlib/Analysis/SpecialFunctions/Gamma/Basic.lean
theorem GammaAux_recurrence2 (s : ℂ) (n : ℕ) (h1 : -s.re < ↑n) :
    GammaAux n s = GammaAux (n + 1) s
-- Mathlib/SetTheory/Game/PGame.lean
theorem zero_le_add_right_neg (x : PGame) : 0 ≤ x + -x
-- Mathlib/Topology/Inseparable.lean
/-- A collection of equivalent definitions of `x ⤳ y`. The public API is given by `iff` lemmas
below. -/
theorem specializes_TFAE (x y : X) :
    TFAE [x ⤳ y,
      pure x ≤ 𝓝 y,
      ∀ s : Set X , IsOpen s → y ∈ s → x ∈ s,
      ∀ s : Set X , IsClosed s → x ∈ s → y ∈ s,
      y ∈ closure ({ x } : Set X),
      closure ({ y } : Set X) ⊆ closure { x },
      ClusterPt y (pure x)]
-- .lake/packages/batteries/Batteries/Data/List/Lemmas.lean
@[simp]
theorem prefix_cons_inj (a) : a :: l₁ <+: a :: l₂ ↔ l₁ <+: l₂
-- Mathlib/Algebra/Free.lean
@[to_additive (attr := simp)]
theorem toFreeSemigroup_of (x : α) : toFreeSemigroup (of x) = FreeSemigroup.of x
-- Mathlib/Algebra/Polynomial/Monic.lean
theorem monic_of_injective (hf : Injective f) {p : R[X]} (hp : (p.map f).Monic) : p.Monic
-- Mathlib/Geometry/Manifold/Instances/Sphere.lean
theorem stereographic'_symm_apply {n : ℕ} [Fact (finrank ℝ E = n + 1)] (v : sphere (0 : E) 1)
    (x : EuclideanSpace ℝ (Fin n)) :
    ((stereographic' n v).symm x : E) =
      let U : (ℝ ∙ (v : E))ᗮ ≃ₗᵢ[ℝ] EuclideanSpace ℝ (Fin n) :=
        (OrthonormalBasis.fromOrthogonalSpanSingleton n (ne_zero_of_mem_unit_sphere v)).repr
      (‖(U.symm x : E)‖ ^ 2 + 4)⁻¹ • (4 : ℝ) • (U.symm x : E) +
        (‖(U.symm x : E)‖ ^ 2 + 4)⁻¹ • (‖(U.symm x : E)‖ ^ 2 - 4) • v.val
-- Mathlib/Analysis/NormedSpace/AddTorsor.lean
theorem eventually_homothety_image_subset_of_finite_subset_interior (x : Q) {s : Set Q} {t : Set Q}
    (ht : t.Finite) (h : t ⊆ interior s) : ∀ᶠ δ in 𝓝 (1 : 𝕜), homothety x δ '' t ⊆ s
-- Mathlib/GroupTheory/Commutator.lean
@[simp]
theorem commutatorElement_inv : ⁅g₁, g₂⁆⁻¹ = ⁅g₂, g₁⁆
-- Mathlib/Topology/UniformSpace/Equicontinuity.lean
/-- If `𝓕 : ι → β → α` tends to `f : β → α` *pointwise on `S : Set β`* along some nontrivial
filter, and if the family `𝓕` is uniformly equicontinuous on `S`, then the limit is uniformly
continuous on `S`. -/
theorem Filter.Tendsto.uniformContinuousOn_of_uniformEquicontinuousOn {l : Filter ι} [l.NeBot]
    {F : ι → β → α} {f : β → α} {S : Set β} (h₁ : ∀ x ∈ S, Tendsto (F · x) l (𝓝 (f x)))
    (h₂ : UniformEquicontinuousOn F S) :
    UniformContinuousOn f S
-- .lake/packages/lean4/src/lean/Init/Data/Int/Lemmas.lean
protected theorem neg_mul_eq_neg_mul (a b : Int) : -(a * b) = -a * b
-- Mathlib/Algebra/Opposites.lean
@[to_additive]
theorem unop_injective : Injective (unop : αᵐᵒᵖ → α)
-- Mathlib/Algebra/Group/TypeTags.lean
@[simp]
theorem toAdd_one [Zero α] : toAdd (1 : Multiplicative α) = 0
-- Mathlib/Data/List/Rotate.lean
@[simp]
theorem getElem_cyclicPermutations (l : List α) (n : Nat) (h : n < length (cyclicPermutations l)) :
    (cyclicPermutations l)[n] = l.rotate n