ruc-ai4math/mathlib_handler_benchmark_410 huggingface dataset:
-- Mathlib/Algebra/Group/Pi/Lemmas.lean
/-- Evaluation of functions into an indexed collection of monoids at a point is a monoid
homomorphism.
This is `Function.eval i` as a `MonoidHom`. -/
@[to_additive (attr := simps) "Evaluation of functions into an indexed collection of additive
monoids at a point is an additive monoid homomorphism. This is `Function.eval i` as an
`AddMonoidHom`."]
def Pi.evalMonoidHom (i : I) : (∀ i, f i) →* f i
-- Mathlib/CategoryTheory/Localization/Predicate.lean
@[reassoc (attr := simp)]
theorem comp_liftNatTrans (F₁ F₂ F₃ : C ⥤ E) (F₁' F₂' F₃' : D ⥤ E) [h₁ : Lifting L W F₁ F₁']
    [h₂ : Lifting L W F₂ F₂'] [h₃ : Lifting L W F₃ F₃'] (τ : F₁ ⟶ F₂) (τ' : F₂ ⟶ F₃) :
    liftNatTrans L W F₁ F₂ F₁' F₂' τ ≫ liftNatTrans L W F₂ F₃ F₂' F₃' τ' =
      liftNatTrans L W F₁ F₃ F₁' F₃' (τ ≫ τ')
-- Mathlib/NumberTheory/Multiplicity.lean
theorem sq_dvd_add_pow_sub_sub (p x : R) (n : ℕ) :
    p ^ 2 ∣ (x + p) ^ n - x ^ (n - 1) * p * n - x ^ n
-- Mathlib/GroupTheory/NoncommPiCoprod.lean
@[to_additive]
theorem injective_noncommPiCoprod_of_independent
    {hcomm : Pairwise fun i j : ι => ∀ x y : G, x ∈ H i → y ∈ H j → Commute x y}
    (hind : CompleteLattice.Independent H) :
    Function.Injective (noncommPiCoprod hcomm)
-- Mathlib/Combinatorics/SimpleGraph/Clique.lean
theorem isNClique_map_iff (hn : 1 < n) {t : Finset β} {f : α ↪ β} :
    (G.map f).IsNClique n t ↔ ∃ s : Finset α, G.IsNClique n s ∧ s.map f = t
-- Mathlib/Data/Matrix/Kronecker.lean
/-- `trace` distributes over `Matrix.kroneckerMapBilinear`.

This is primarily used with `R = ℕ` to prove `Matrix.trace_kronecker`. -/
theorem trace_kroneckerMapBilinear [CommSemiring R] [Fintype m] [Fintype n] [AddCommMonoid α]
    [AddCommMonoid β] [AddCommMonoid γ] [Module R α] [Module R β] [Module R γ]
    (f : α →ₗ[R] β →ₗ[R] γ) (A : Matrix m m α) (B : Matrix n n β) :
    trace (kroneckerMapBilinear f A B) = f (trace A) (trace B)
-- Mathlib/Combinatorics/Additive/Corner/Roth.lean
/-- **Roth's theorem** for `ℕ`.

The maximum density of a 3AP-free set in `{1, ..., n}` goes to zero as `n` tends to infinity. -/
theorem roth_3ap_theorem_nat (ε : ℝ) (hε : 0 < ε) (hG : cornersTheoremBound (ε / 3) ≤ n)
    (A : Finset ℕ) (hAn : A ⊆ range n) (hAε : ε * n ≤ A.card) : ¬ ThreeAPFree (A : Set ℕ)
-- Mathlib/MeasureTheory/Function/LpSeminorm/Basic.lean
theorem Memℒp.of_nnnorm_le_mul {f : α → E} {g : α → F} {c : ℝ≥0} (hg : Memℒp g p μ)
    (hf : AEStronglyMeasurable f μ) (hfg : ∀ᵐ x ∂μ, ‖f x‖₊ ≤ c * ‖g x‖₊) : Memℒp f p μ
-- Mathlib/MeasureTheory/Integral/Lebesgue.lean
theorem lintegral_finset_sum (s : Finset β) {f : β → α → ℝ≥0∞} (hf : ∀ b ∈ s, Measurable (f b)) :
    ∫⁻ a, ∑ b ∈ s, f b a ∂μ = ∑ b ∈ s, ∫⁻ a, f b a ∂μ
-- Mathlib/Order/Filter/Basic.lean
lemma copy_eq {S} (hmem : ∀ s, s ∈ S ↔ s ∈ f) : f.copy S hmem = f
-- Mathlib/Data/Finset/Sigma.lean
theorem _root_.biInf_finsetSigma [CompleteLattice β] (s : Finset ι) (t : ∀ i, Finset (α i))
    (f : Sigma α → β) : ⨅ ij ∈ s.sigma t, f ij = ⨅ (i ∈ s) (j ∈ t i), f ⟨i, j⟩
-- Mathlib/RingTheory/Polynomial/GaussLemma.lean
theorem integralClosure.mem_lifts_of_monic_of_dvd_map {f : R[X]} (hf : f.Monic) {g : K[X]}
    (hg : g.Monic) (hd : g ∣ f.map (algebraMap R K)) :
    g ∈ lifts (algebraMap (integralClosure R K) K)
-- .lake/packages/lean4/src/lean/Init/Control/Lawful/Instances.lean
@[simp] theorem run_monadLift {α σ : Type u} [Monad m] [MonadLiftT n m] (x : n α) (s : σ) : (monadLift x : StateT σ m α).run s = (monadLift x : m α) >>= fun a => pure (a, s)
-- Mathlib/Analysis/BoundedVariation.lean
theorem LipschitzOnWith.comp_boundedVariationOn {f : E → F} {C : ℝ≥0} {t : Set E}
    (hf : LipschitzOnWith C f t) {g : α → E} {s : Set α} (hg : MapsTo g s t)
    (h : BoundedVariationOn g s) : BoundedVariationOn (f ∘ g) s
-- Mathlib/MeasureTheory/Integral/CircleTransform.lean
theorem abs_circleTransformBoundingFunction_le {R r : ℝ} (hr : r < R) (hr' : 0 ≤ r) (z : ℂ) :
    ∃ x : closedBall z r ×ˢ [[0, 2 * π]], ∀ y : closedBall z r ×ˢ [[0, 2 * π]],
    abs (circleTransformBoundingFunction R z y) ≤ abs (circleTransformBoundingFunction R z x)
-- Mathlib/Order/Interval/Set/Basic.lean
theorem Ico_union_Ici (h : c ≤ max a b) : Ico a b ∪ Ici c = Ici (min a c)
-- .lake/packages/lean4/src/lean/Init/Data/Array/Lemmas.lean
theorem any_def {p : α → Bool} (as : Array α) : as.any p = as.data.any p
-- Mathlib/LinearAlgebra/Matrix/Block.lean
theorem BlockTriangular.sub (hM : BlockTriangular M b) (hN : BlockTriangular N b) :
    BlockTriangular (M - N) b
-- Mathlib/Algebra/Module/LinearMap/Defs.lean
/-- `LinearMap.restrictScalars` as a `LinearMap`. -/
@[simps apply]
def restrictScalarsₗ : (M →ₗ[S] N) →ₗ[R₁] M →ₗ[R] N
-- Mathlib/RingTheory/Valuation/Basic.lean
@[refl]
theorem refl : v.IsEquiv v
-- .lake/packages/lean4/src/lean/Init/Data/List/TakeDrop.lean
theorem set_eq_take_append_cons_drop {l : List α} {n : Nat} {a : α} :
    l.set n a = if n < l.length then l.take n ++ a :: l.drop (n + 1) else l
-- Mathlib/Order/Iterate.lean
/-- If `f` is a strictly antitone map and `f x < x` at some point `x`, then the iterates `f^[n] x`
form a strictly antitone sequence. -/
theorem strictAnti_iterate_of_map_lt (hf : StrictMono f) (hx : f x < x) :
    StrictAnti fun n => f^[n] x
-- Mathlib/Analysis/LocallyConvex/WithSeminorms.lean
theorem WithSeminorms.withSeminorms_eq {p : SeminormFamily 𝕜 E ι} [t : TopologicalSpace E]
    (hp : WithSeminorms p) : t = p.moduleFilterBasis.topology
-- Mathlib/Logic/Equiv/Basic.lean
/-- If the outer subtype has more restrictive predicate than the inner one,
then we can drop the latter. -/
@[simps!]
def subtypeSubtypeEquivSubtype {p q : α → Prop} (h : ∀ {x}, q x → p x) :
    { x : Subtype p // q x.1 } ≃ Subtype q
-- Mathlib/Analysis/Calculus/FDeriv/Equiv.lean
theorem comp_differentiableAt_iff {f : G → E} {x : G} :
    DifferentiableAt 𝕜 (iso ∘ f) x ↔ DifferentiableAt 𝕜 f x
-- Mathlib/Algebra/MvPolynomial/Basic.lean
@[simp]
theorem eval₂Hom_C (f : R →+* S₁) (g : σ → S₁) (r : R) : eval₂Hom f g (C r) = f r
-- Mathlib/Order/CompactlyGenerated/Basic.lean
lemma CompleteLattice.independent_iff_supIndep_of_injOn {ι : Type*} {f : ι → α}
    (hf : InjOn f {i | f i ≠ ⊥}) :
    CompleteLattice.Independent f ↔ ∀ (s : Finset ι), s.SupIndep f
-- Mathlib/Order/BoundedOrder.lean
@[simp]
theorem bot_ne_top : (⊥ : α) ≠ ⊤
-- Mathlib/MeasureTheory/Integral/IntegrableOn.lean
/-- A function which is continuous on a set `s` is almost everywhere measurable with respect to
`μ.restrict s`. -/
theorem ContinuousOn.aemeasurable [TopologicalSpace α] [OpensMeasurableSpace α] [MeasurableSpace β]
    [TopologicalSpace β] [BorelSpace β] {f : α → β} {s : Set α} {μ : Measure α}
    (hf : ContinuousOn f s) (hs : MeasurableSet s) : AEMeasurable f (μ.restrict s)
-- Mathlib/Analysis/Analytic/Basic.lean
theorem Asymptotics.IsBigO.continuousMultilinearMap_apply_eq_zero {n : ℕ} {p : E[×n]→L[𝕜] F}
    (h : (fun y => p fun _ => y) =O[𝓝 0] fun y => ‖y‖ ^ (n + 1)) (y : E) : (p fun _ => y) = 0
-- Mathlib/Topology/Order/MonotoneConvergence.lean
theorem iInf_eq_of_tendsto {α} [TopologicalSpace α] [CompleteLinearOrder α] [OrderTopology α]
    [Nonempty β] [SemilatticeSup β] {f : β → α} {a : α} (hf : Antitone f) :
    Tendsto f atTop (𝓝 a) → iInf f = a
-- .lake/packages/lean4/src/lean/Init/Data/Array/Basic.lean
@[simp] theorem size_set (a : Array α) (i : Fin a.size) (v : α) : (set a i v).size = a.size
-- Mathlib/RingTheory/FractionalIdeal/Operations.lean
@[simp]
theorem canonicalEquiv_symm : (canonicalEquiv S P P').symm = canonicalEquiv S P' P
-- Mathlib/Algebra/Order/Archimedean.lean
theorem archimedean_iff_int_lt : Archimedean α ↔ ∀ x : α, ∃ n : ℤ, x < n
-- Mathlib/Topology/ContinuousFunction/Bounded.lean
@[to_additive (attr := simp)]
theorem coe_one : ((1 : α →ᵇ β) : α → β) = 1
-- Mathlib/Data/NNRat/Defs.lean
lemma divNat_mul_right {a : ℕ} (ha : a ≠ 0) (n d : ℕ) : divNat (n * a) (d * a) = divNat n d
-- Mathlib/Data/Finset/Basic.lean
@[simp]
theorem coe_cons {a s h} : (@cons α a s h : Set α) = insert a (s : Set α)
-- Mathlib/Analysis/Normed/Group/Hom.lean
protected theorem ext_iff : f = g ↔ ∀ x, f x = g x
-- Mathlib/LinearAlgebra/Trace.lean
/-- The trace of an endomorphism is invariant under conjugation -/
@[simp]
theorem trace_conj (g : M →ₗ[R] M) (f : (M →ₗ[R] M)ˣ) :
    trace R M (↑f * g * ↑f⁻¹) = trace R M g
-- Mathlib/MeasureTheory/Integral/Bochner.lean
theorem continuousAt_of_dominated {F : X → α → G} {x₀ : X} {bound : α → ℝ}
    (hF_meas : ∀ᶠ x in 𝓝 x₀, AEStronglyMeasurable (F x) μ)
    (h_bound : ∀ᶠ x in 𝓝 x₀, ∀ᵐ a ∂μ, ‖F x a‖ ≤ bound a) (bound_integrable : Integrable bound μ)
    (h_cont : ∀ᵐ a ∂μ, ContinuousAt (fun x => F x a) x₀) :
    ContinuousAt (fun x => ∫ a, F x a ∂μ) x₀
-- Mathlib/Data/Ordmap/Ordset.lean
theorem insert.valid [IsTotal α (· ≤ ·)] [@DecidableRel α (· ≤ ·)] (x : α) {t} (h : Valid t) :
    Valid (Ordnode.insert x t)
-- .lake/packages/lean4/src/lean/Init/Core.lean
theorem HEq.symm (h : HEq a b) : HEq b a
-- Mathlib/Topology/Algebra/InfiniteSum/NatInt.lean
@[to_additive]
theorem hasProd_nat_add_iff' {f : ℕ → G} (k : ℕ) :
    HasProd (fun n ↦ f (n + k)) (g / ∏ i ∈ range k, f i) ↔ HasProd f g
-- Mathlib/RingTheory/TwoSidedIdeal/Basic.lean
lemma mul_mem_left (x y) (hy : y ∈ I) : x * y ∈ I
-- Mathlib/Algebra/Homology/ComplexShape.lean
theorem prev_eq' (c : ComplexShape ι) {i j : ι} (h : c.Rel i j) : c.prev j = i
-- Mathlib/RingTheory/Ideal/Maps.lean
theorem map_top : map f ⊤ = ⊤
-- Mathlib/LinearAlgebra/TensorProduct/Basic.lean
@[simp]
theorem lid_symm_apply (m : M) : (TensorProduct.lid R M).symm m = 1 ⊗ₜ m
-- Mathlib/RingTheory/Polynomial/Nilpotent.lean
lemma isUnit_aeval_of_isUnit_aeval_of_isNilpotent_sub
    (hb : IsUnit (aeval b P)) (hab : IsNilpotent (a - b)) :
    IsUnit (aeval a P)
-- Mathlib/Algebra/Group/Equiv/Basic.lean
@[to_additive]
protected theorem congr_fun {f g : MulEquiv M N} (h : f = g) (x : M) : f x = g x
-- Mathlib/Algebra/Lie/Submodule.lean
@[simp]
theorem coe_toLieSubmodule : (K.toLieSubmodule : Submodule R L) = K
-- Mathlib/Algebra/Regular/Basic.lean
/-- The "most used" implication of `mul_and_mul_iff`, with split hypotheses, instead of `∧`. -/
@[to_additive "The \"most used\" implication of `add_and_add_iff`, with split
hypotheses, instead of `∧`."]
theorem IsRegular.and_of_mul_of_mul (ab : IsRegular (a * b)) (ba : IsRegular (b * a)) :
    IsRegular a ∧ IsRegular b
-- Mathlib/Order/BoundedOrder.lean
theorem forall_le_iff {P : α → Prop} {x₀ : α} (hP : Antitone P) :
    (∀ x ≤ x₀, P x) ↔ P x₀
-- Mathlib/SetTheory/Cardinal/ToNat.lean
@[deprecated toNat_le_toNat (since := "2024-02-15")]
theorem toNat_le_of_le_of_lt_aleph0 (hd : d < ℵ₀) (hcd : c ≤ d) :
    toNat c ≤ toNat d
-- Mathlib/Topology/EMetricSpace/Lipschitz.lean
/-- The composition of Lipschitz functions is Lipschitz. -/
protected theorem comp {Kf Kg : ℝ≥0} {f : β → γ} {g : α → β} (hf : LipschitzWith Kf f)
    (hg : LipschitzWith Kg g) : LipschitzWith (Kf * Kg) (f ∘ g)
-- Mathlib/Algebra/GroupWithZero/NonZeroDivisors.lean
theorem mem_nonZeroDivisors_iff_ne_zero [NoZeroDivisors M] [Nontrivial M] {x : M} :
    x ∈ M⁰ ↔ x ≠ 0
-- Mathlib/Algebra/Homology/ShortComplex/Homology.lean
@[reassoc (attr := simp)]
lemma asIsoHomologyπ_inv_comp_homologyπ (hf : S.f = 0) [S.HasHomology] :
    (S.asIsoHomologyπ hf).inv ≫ S.homologyπ = 𝟙 _
-- Mathlib/Data/Sigma/Basic.lean
@[simp]
theorem Sigma.curry_uncurry {γ : ∀ a, β a → Type*} (f : ∀ (x) (y : β x), γ x y) :
    Sigma.curry (Sigma.uncurry f) = f
-- Mathlib/MeasureTheory/Constructions/Polish/Basic.lean
/-- If `s` is Borel-measurable in a Polish space and `f` is continuous injective on `s`, then
the restriction of `f` to `s` is a measurable embedding. -/
theorem _root_.ContinuousOn.measurableEmbedding [BorelSpace β]
    [TopologicalSpace γ] [PolishSpace γ] [MeasurableSpace γ] [BorelSpace γ]
    (hs : MeasurableSet s) (f_cont : ContinuousOn f s)
    (f_inj : InjOn f s) : MeasurableEmbedding (s.restrict f)
-- Mathlib/Geometry/Manifold/MFDeriv/Atlas.lean
theorem symm_comp_deriv {x : M} (hx : x ∈ e.source) :
    (mfderiv I' I e.symm (e x)).comp (mfderiv I I' e x) =
      ContinuousLinearMap.id 𝕜 (TangentSpace I x)
-- Mathlib/MeasureTheory/Measure/ProbabilityMeasure.lean
theorem self_eq_mass_smul_normalize : μ = μ.mass • μ.normalize.toFiniteMeasure
-- Mathlib/Topology/Gluing.lean
theorem fromOpenSubsetsGlue_isOpenMap : IsOpenMap (fromOpenSubsetsGlue U)
-- Mathlib/Geometry/Manifold/Algebra/Monoid.lean
@[to_additive]
nonrec theorem SmoothOn.mul (hf : SmoothOn I' I f s) (hg : SmoothOn I' I g s) :
    SmoothOn I' I (f * g) s
-- Mathlib/LinearAlgebra/Matrix/SpecialLinearGroup.lean
theorem toLin'_injective :
    Function.Injective ↑(toLin' : SpecialLinearGroup n R →* (n → R) ≃ₗ[R] n → R)
-- Mathlib/NumberTheory/LegendreSymbol/QuadraticChar/GaussSum.lean
/-- The value of the quadratic character at `2` -/
theorem quadraticChar_two [DecidableEq F] (hF : ringChar F ≠ 2) :
    quadraticChar F 2 = χ₈ (Fintype.card F)
-- Mathlib/MeasureTheory/Integral/Periodic.lean
/-- If `f` is an integrable periodic function with period `T`, and `n` is an integer, then its
integral over `[t, t + n • T]` is `n` times its integral over `[t, t + T]`. -/
theorem intervalIntegral_add_zsmul_eq (hf : Periodic f T) (n : ℤ) (t : ℝ)
    (h_int : ∀ t₁ t₂, IntervalIntegrable f MeasureSpace.volume t₁ t₂) :
    ∫ x in t..t + n • T, f x = n • ∫ x in t..t + T, f x
-- Mathlib/Data/Finset/Sym.lean
theorem mk_mem_sym2_iff : s(a, b) ∈ s.sym2 ↔ a ∈ s ∧ b ∈ s
-- Mathlib/Algebra/Homology/HomologicalComplex.lean
@[simp]
theorem isoOfComponents_app (f : ∀ i, C₁.X i ≅ C₂.X i)
    (hf : ∀ i j, c.Rel i j → (f i).hom ≫ C₂.d i j = C₁.d i j ≫ (f j).hom) (i : ι) :
    isoApp (isoOfComponents f hf) i = f i
-- Mathlib/Analysis/Convex/Gauge.lean
theorem gaugeSeminorm_ball_one (hs : IsOpen s) : (gaugeSeminorm hs₀ hs₁ hs₂).ball 0 1 = s
-- Mathlib/Computability/Primrec.lean
theorem of_equiv_symm_iff {β} (e : β ≃ α) {f : σ → α} :
    haveI := Primcodable.ofEquiv α e
    (Primrec fun a => e.symm (f a)) ↔ Primrec f
-- Mathlib/Topology/UniformSpace/Completion.lean
theorem map₂_coe_coe (a : α) (b : β) (f : α → β → γ) (hf : UniformContinuous₂ f) :
    Completion.map₂ f (a : Completion α) (b : Completion β) = f a b
-- Mathlib/Topology/Sheaves/SheafCondition/Sites.lean
theorem indexOfHom_spec (f : ΣV, { f : V ⟶ iSup U // presieveOfCovering U f }) :
    f.1 = U (indexOfHom U f)
-- Mathlib/Data/Set/Basic.lean
@[gcongr]
theorem inter_subset_inter_left {s t : Set α} (u : Set α) (H : s ⊆ t) : s ∩ u ⊆ t ∩ u
-- Mathlib/SetTheory/Cardinal/Continuum.lean
@[simp]
theorem lift_lt_continuum {c : Cardinal.{u}} : lift.{v} c < 𝔠 ↔ c < 𝔠
-- Mathlib/SetTheory/Cardinal/PartENat.lean
theorem toPartENat_strictMonoOn : StrictMonoOn toPartENat (Set.Iic ℵ₀)
-- Mathlib/MeasureTheory/Measure/LevyProkhorovMetric.lean
lemma levyProkhorovEDist_comm (μ ν : Measure Ω) :
    levyProkhorovEDist μ ν = levyProkhorovEDist ν μ
-- Mathlib/Topology/UniformSpace/Separation.lean
theorem uniformContinuous_map (f : α → β) : UniformContinuous (map f)
-- Mathlib/SetTheory/Surreal/Multiplication.lean
lemma mulOption_lt_mul_iff_P3 {i j} :
    ⟦mulOption x y i j⟧ < (⟦x * y⟧ : Game) ↔ P3 (x.moveLeft i) x (y.moveLeft j) y
-- Mathlib/SetTheory/Ordinal/Arithmetic.lean
theorem IsNormal.limit_lt {f} (H : IsNormal f) {o} (h : IsLimit o) {a} :
    a < f o ↔ ∃ b < o, a < f b
-- Mathlib/Data/Seq/Computation.lean
theorem terminates_of_mem {s : Computation α} {a : α} (h : a ∈ s) : Terminates s
-- Mathlib/Topology/MetricSpace/Pseudo/Lemmas.lean
lemma closure_ball_subset_closedBall : closure (ball x ε) ⊆ closedBall x ε
-- Mathlib/Algebra/ModEq.lean
protected theorem add_left_cancel' (c : α) : c + a ≡ c + b [PMOD p] → a ≡ b [PMOD p]
-- Mathlib/Data/Finset/Grade.lean
protected lemma isAtom_iff : IsAtom s ↔ ∃ a, s = {a}
-- Mathlib/LinearAlgebra/Finsupp.lean
theorem mem_supported_support (p : α →₀ M) : p ∈ Finsupp.supported M R (p.support : Set α)
-- Mathlib/Geometry/Euclidean/Angle/Oriented/RightAngle.lean
/-- An angle in a right-angled triangle expressed using `arccos`. -/
theorem oangle_add_left_eq_arccos_of_oangle_eq_pi_div_two {x y : V} (h : o.oangle x y = ↑(π / 2)) :
    o.oangle (x + y) y = Real.arccos (‖y‖ / ‖x + y‖)
-- Mathlib/Computability/TuringMachine.lean
theorem tr_respects_aux₂ {k : K} {q : Stmt₂₁} {v : σ} {S : ∀ k, List (Γ k)}
    {L : ListBlank (∀ k, Option (Γ k))}
    (hL : ∀ k, L.map (proj k) = ListBlank.mk ((S k).map some).reverse) (o : StAct₂ k) :
    let v' := stVar v (S k) o
    let Sk' := stWrite v (S k) o
    let S' := update S k Sk'
    ∃ L' : ListBlank (∀ k, Option (Γ k)),
      (∀ k, L'.map (proj k) = ListBlank.mk ((S' k).map some).reverse) ∧
        TM1.stepAux (trStAct q o) v
            ((Tape.move Dir.right)^[(S k).length] (Tape.mk' ∅ (addBottom L))) =
          TM1.stepAux q v' ((Tape.move Dir.right)^[(S' k).length] (Tape.mk' ∅ (addBottom L')))
-- Mathlib/Topology/Order/DenselyOrdered.lean
@[simp]
theorem map_coe_Iio_atTop (a : α) : map ((↑) : Iio a → α) atTop = 𝓝[<] a
-- Mathlib/CategoryTheory/Square.lean
/-- The equivalence `Square C ≌ Arrow (Arrow C)` which sends a
commutative square `sq` to the obvious arrow from the top morphism of `sq`
to the bottom morphism of `sq`. -/
@[simps]
def arrowArrowEquivalence' : Square C ≌ Arrow (Arrow C)
-- Mathlib/Data/Fin/Basic.lean
@[simp] lemma succAbove_ne_last_last {a : Fin (n + 2)} (h : a ≠ last (n + 1)) :
    a.succAbove (last n) = last (n + 1)
-- Mathlib/Analysis/SpecialFunctions/Trigonometric/Basic.lean
@[continuity, fun_prop]
theorem continuous_sinh : Continuous sinh
-- Mathlib/Analysis/Calculus/Deriv/Add.lean
theorem derivWithin_sub_const (hxs : UniqueDiffWithinAt 𝕜 s x) (c : F) :
    derivWithin (fun y => f y - c) s x = derivWithin f s x
-- Mathlib/Data/Set/Image.lean
/-- The image of a nontrivial set under an injective map is nontrivial. -/
theorem Nontrivial.image (hs : s.Nontrivial) {f : α → β} (hf : Function.Injective f) :
    (f '' s).Nontrivial
-- Mathlib/Data/Nat/Multiplicity.lean
/-- For a prime number `p`, taking `(p - 1)` times the multiplicity of `p` in `n!` equals `n` minus
the sum of base `p` digits of `n`. -/
 theorem sub_one_mul_multiplicity_factorial {n p : ℕ} (hp : p.Prime) :
     (p - 1) * (multiplicity p n !).get (finite_nat_iff.mpr ⟨hp.ne_one, factorial_pos n⟩) =
     n - (p.digits n).sum
-- Mathlib/Data/List/TFAE.lean
theorem tfae_of_cycle {a b} {l : List Prop} (h_chain : List.Chain (· → ·) a (b :: l))
    (h_last : getLastD l b → a) : TFAE (a :: b :: l)
-- Mathlib/Data/Set/Basic.lean
theorem inter_eq_inter_iff_right : s ∩ u = t ∩ u ↔ t ∩ u ⊆ s ∧ s ∩ u ⊆ t
-- Mathlib/GroupTheory/Commensurable.lean
@[symm]
theorem symm {H K : Subgroup G} : Commensurable H K → Commensurable K H
-- Mathlib/Algebra/Polynomial/UnitTrinomial.lean
theorem irreducible_aux2 {k m m' n : ℕ} (hkm : k < m) (hmn : m < n) (hkm' : k < m') (hmn' : m' < n)
    (u v w : Units ℤ) (hp : p = trinomial k m n (u : ℤ) v w) (hq : q = trinomial k m' n (u : ℤ) v w)
    (h : p * p.mirror = q * q.mirror) : q = p ∨ q = p.mirror
-- Mathlib/AlgebraicGeometry/EllipticCurve/Jacobian.lean
lemma add_of_eq {P Q : Fin 3 → R} (h : P = Q) : W'.add P Q = W'.dblXYZ P
-- Mathlib/Data/Set/Lattice.lean
theorem surjective_iff_surjective_of_iUnion_eq_univ :
    Surjective f ↔ ∀ i, Surjective ((U i).restrictPreimage f)
-- .lake/packages/batteries/Batteries/Data/List/Perm.lean
@[simp] theorem replicate_perm {n : Nat} {a : α} {l : List α} :
    replicate n a ~ l ↔ replicate n a = l
-- Mathlib/AlgebraicTopology/DoldKan/Projections.lean
theorem Q_succ (q : ℕ) : (Q (q + 1) : K[X] ⟶ _) = Q q - P q ≫ Hσ q
-- Mathlib/Data/Prod/Basic.lean
@[simp]
theorem snd_swap {p : α × β} : (swap p).2 = p.1
-- Mathlib/Algebra/Order/Ring/Unbundled/Nonneg.lean
@[simp, norm_cast]
protected theorem coe_one : ((1 : { x : α // 0 ≤ x }) : α) = 1
-- Mathlib/CategoryTheory/Limits/Shapes/BinaryProducts.lean
@[simp]
theorem WalkingPair.swap_symm_apply_ff : WalkingPair.swap.symm right = left
-- Mathlib/NumberTheory/DiophantineApproximation.lean
/-- The main result, *Legendre's Theorem* on rational approximation:
if `ξ` is a real number and `q` is a rational number such that `|ξ - q| < 1/(2*q.den^2)`,
then `q` is a convergent of the continued fraction expansion of `ξ`.
This is the version using `GenContFract.convs`. -/
theorem exists_convs_eq_rat {q : ℚ}
    (h : |ξ - q| < 1 / (2 * (q.den : ℝ) ^ 2)) : ∃ n, (GenContFract.of ξ).convs n = q
-- Mathlib/Algebra/BigOperators/Group/Multiset.lean
@[to_additive]
theorem prod_hom_rel [CommMonoid β] (s : Multiset ι) {r : α → β → Prop} {f : ι → α} {g : ι → β}
    (h₁ : r 1 1) (h₂ : ∀ ⦃a b c⦄, r b c → r (f a * b) (g a * c)) :
    r (s.map f).prod (s.map g).prod
-- Mathlib/Algebra/Module/Hom.lean
/-- Scalar multiplication on the left as an additive monoid homomorphism. -/
@[simps! (config := .asFn)]
protected def smulLeft [Monoid M] [AddMonoid A] [DistribMulAction M A] (c : M) : A →+ A
-- Mathlib/NumberTheory/Multiplicity.lean
theorem dvd_geom_sum₂_iff_of_dvd_sub' {x y p : R} (h : p ∣ x - y) :
    (p ∣ ∑ i ∈ range n, x ^ i * y ^ (n - 1 - i)) ↔ p ∣ n * x ^ (n - 1)
-- Mathlib/Algebra/Module/Submodule/Pointwise.lean
@[simp]
theorem neg_le_neg (S T : Submodule R M) : -S ≤ -T ↔ S ≤ T
-- Mathlib/CategoryTheory/Localization/Predicate.lean
@[simps]
instance compRight {E' : Type*} [Category E'] (F : C ⥤ E) (F' : D ⥤ E) [Lifting L W F F']
    (G : E ⥤ E') : Lifting L W (F ⋙ G) (F' ⋙ G)
-- Mathlib/Analysis/InnerProductSpace/Adjoint.lean
theorem _root_.Submodule.adjoint_subtypeL (U : Submodule 𝕜 E) [CompleteSpace U] :
    U.subtypeL† = orthogonalProjection U
-- Mathlib/Data/Matrix/Block.lean
@[simp]
theorem blockDiagonal_transpose (M : o → Matrix m n α) :
    (blockDiagonal M)ᵀ = blockDiagonal fun k => (M k)ᵀ
-- Mathlib/Data/Matroid/Closure.lean
lemma Indep.base_iff_ground_subset_closure (hI : M.Indep I) : M.Base I ↔ M.E ⊆ M.closure I
-- Mathlib/Analysis/NormedSpace/PiTensorProduct/InjectiveSeminorm.lean
private theorem mapL_add_smul_aux [DecidableEq ι] (i : ι) (u : E i →L[𝕜] E' i) :
    (fun j ↦ (update f i u j).toLinearMap) =
    update (fun j ↦ (f j).toLinearMap) i u.toLinearMap
-- Mathlib/LinearAlgebra/PerfectPairing.lean
@[simp]
theorem apply_apply_toDualRight_symm (x : M) (f : Dual R M) :
    (p x) (p.toDualRight.symm f) = f x
-- Mathlib/Analysis/SpecialFunctions/Log/Deriv.lean
theorem derivWithin.log (hf : DifferentiableWithinAt ℝ f s x) (hx : f x ≠ 0)
    (hxs : UniqueDiffWithinAt ℝ s x) :
    derivWithin (fun x => log (f x)) s x = derivWithin f s x / f x
-- Mathlib/InformationTheory/Hamming.lean
@[simp]
theorem ofHamming_sub [∀ i, Sub (β i)] {x y : Hamming β} :
    ofHamming (x - y) = ofHamming x - ofHamming y
-- Mathlib/Probability/Kernel/Basic.lean
theorem ext_fun_iff {η : Kernel α β} :
    κ = η ↔ ∀ a f, Measurable f → ∫⁻ b, f b ∂κ a = ∫⁻ b, f b ∂η a
-- Mathlib/Data/W/Constructions.lean
theorem leftInverse_nat : Function.LeftInverse ofNat toNat
-- Mathlib/Combinatorics/Quiver/SingleObj.lean
theorem toPrefunctor_id : toPrefunctor id = 𝟭q (SingleObj α)
-- Mathlib/Logic/Relator.lean
protected lemma refl (hr : ∀ a : α, r₁₁ a a) : RightTotal r₁₁
-- Mathlib/Analysis/SpecialFunctions/Trigonometric/Complex.lean
theorem tan_eq_zero_iff {θ : ℝ} : tan θ = 0 ↔ ∃ k : ℤ, k * π / 2 = θ
-- Mathlib/Topology/Order/MonotoneConvergence.lean
theorem tendsto_of_antitone {ι α : Type*} [Preorder ι] [TopologicalSpace α]
    [ConditionallyCompleteLinearOrder α] [OrderTopology α] {f : ι → α} (h_mono : Antitone f) :
    Tendsto f atTop atBot ∨ ∃ l, Tendsto f atTop (𝓝 l)
-- Mathlib/Data/Finset/Lattice.lean
theorem exists_next_left {x : α} {s : Finset α} (h : ∃ y ∈ s, y < x) :
    ∃ y ∈ s, y < x ∧ ∀ z ∈ s, z < x → z ≤ y
-- Mathlib/Analysis/BoxIntegral/Partition/Basic.lean
@[mono]
theorem iUnion_mono (h : π₁ ≤ π₂) : π₁.iUnion ⊆ π₂.iUnion
-- Mathlib/GroupTheory/GroupAction/DomAct/Basic.lean
theorem smul_addMonoidHom_apply (c : Mᵈᵐᵃ) (f : A →+ B) (a : A) : (c • f) a = f (mk.symm c • a)
-- Mathlib/Logic/Function/Basic.lean
theorem injective_surjInv (h : Surjective f) : Injective (surjInv h)
-- Mathlib/Topology/PartialHomeomorph.lean
@[simp, mfld_simps]
theorem ofSet_symm : (ofSet s hs).symm = ofSet s hs
-- Mathlib/CategoryTheory/Monoidal/Comon_.lean
@[reassoc (attr := simp)]
theorem comul_counit_hom {Z : C} (f : M.X ⟶ Z) : M.comul ≫ (f ⊗ M.counit) = f ≫ (ρ_ Z).inv
-- .lake/packages/lean4/src/lean/Init/Omega/IntList.lean
@[simp] theorem get_nil : get ([] : IntList) i = 0