ruc-ai4math/mathlib_handler_benchmark_410 huggingface dataset:
-- Mathlib/Algebra/Polynomial/Splits.lean
theorem natDegree_eq_card_roots' {p : K[X]} {i : K →+* L} (hsplit : Splits i p) :
    (p.map i).natDegree = Multiset.card (p.map i).roots
-- Mathlib/Geometry/Euclidean/Angle/Unoriented/RightAngle.lean
/-- The cosine of an angle in a right-angled triangle as a ratio of sides, version subtracting
vectors. -/
theorem cos_angle_sub_of_inner_eq_zero {x y : V} (h : ⟪x, y⟫ = 0) :
    Real.cos (angle x (x - y)) = ‖x‖ / ‖x - y‖
-- Mathlib/LinearAlgebra/AffineSpace/AffineMap.lean
theorem linear_eq_zero_iff_exists_const (f : P1 →ᵃ[k] P2) :
    f.linear = 0 ↔ ∃ q, f = const k P1 q
-- Mathlib/Data/Nat/PartENat.lean
theorem withTopEquiv_symm_lt {x y : ℕ∞} : withTopEquiv.symm x < withTopEquiv.symm y ↔ x < y
-- Mathlib/GroupTheory/Perm/Sign.lean
@[simp]
theorem sign_subtypeCongr {p : α → Prop} [DecidablePred p] (ep : Perm { a // p a })
    (en : Perm { a // ¬p a }) : sign (ep.subtypeCongr en) = sign ep * sign en
-- Mathlib/Algebra/Order/AbsoluteValue.lean
theorem abv_sub (a b : R) : abv (a - b) = abv (b - a)
-- Mathlib/Algebra/Homology/ShortComplex/HomologicalComplex.lean
lemma isIso_descOpcycles_iff (K : ChainComplex C ℕ) {X : C} (φ : K.X 0 ⟶ X)
    [K.HasHomology 0] (hφ : K.d 1 0 ≫ φ = 0) :
    IsIso (K.descOpcycles φ 1 (by simp) hφ) ↔
      (ShortComplex.mk _ _ hφ).Exact ∧ Epi φ
-- Mathlib/Data/Rat/Defs.lean
theorem divInt_eq_div (n d : ℤ) : n /. d = (n : ℚ) / d
-- Mathlib/Topology/MetricSpace/Holder.lean
theorem Set.Subsingleton.holderOnWith {s : Set X} (hs : s.Subsingleton) (C r : ℝ≥0) (f : X → Y) :
    HolderOnWith C r f s
-- Mathlib/Analysis/InnerProductSpace/Basic.lean
theorem Filter.Tendsto.inner {f g : α → E} {l : Filter α} {x y : E} (hf : Tendsto f l (𝓝 x))
    (hg : Tendsto g l (𝓝 y)) : Tendsto (fun t => ⟪f t, g t⟫) l (𝓝 ⟪x, y⟫)
-- Mathlib/Topology/Instances/TrivSqZeroExt.lean
theorem uniformContinuous_inl [Zero M] : UniformContinuous (inl : R → tsze R M)
-- Mathlib/Algebra/Homology/Bifunctor.lean
@[simp]
lemma mapBifunctorHomologicalComplex_obj_obj_toGradedObject
    (K₁ : HomologicalComplex C₁ c₁) (K₂ : HomologicalComplex C₂ c₂) :
    (((mapBifunctorHomologicalComplex F c₁ c₂).obj K₁).obj K₂).toGradedObject =
      ((GradedObject.mapBifunctor F I₁ I₂).obj K₁.X).obj K₂.X
-- Mathlib/Algebra/Algebra/NonUnitalSubalgebra.lean
theorem coe_iSup_of_directed [Nonempty ι] {S : ι → NonUnitalSubalgebra R A}
    (dir : Directed (· ≤ ·) S) : ↑(iSup S) = ⋃ i, (S i : Set A)
-- Mathlib/Topology/Homeomorph.lean
protected theorem t4Space [T4Space X] (h : X ≃ₜ Y) : T4Space Y
-- Mathlib/RingTheory/UniqueFactorizationDomain.lean
theorem multiplicity.finite_of_not_isUnit [CancelCommMonoidWithZero α] [WfDvdMonoid α]
    {a b : α} (ha : ¬IsUnit a) (hb : b ≠ 0) : multiplicity.Finite a b
-- Mathlib/CategoryTheory/SmallObject/Iteration.lean
/-- The identity morphism in the category `Φ.Iteration ε j`. -/
@[simps]
def id : Hom iter₁ iter₁
-- Mathlib/CategoryTheory/Preadditive/Biproducts.lean
/-- In a preadditive category, if all binary coproducts exist, then all binary biproducts exist. -/
theorem HasBinaryBiproducts.of_hasBinaryCoproducts [HasBinaryCoproducts C] :
    HasBinaryBiproducts C
-- Mathlib/Dynamics/Circle/RotationNumber/TranslationNumber.lean
@[simp]
theorem map_add_nat (x : ℝ) (n : ℕ) : f (x + n) = f x + n
-- Mathlib/SetTheory/Cardinal/Finite.lean
lemma card_eq_finsetCard (s : Finset α) : Nat.card s = s.card
-- Mathlib/Algebra/Order/Group/Defs.lean
/-- A choice-free shortcut instance. -/
@[to_additive "A choice-free shortcut instance."]
theorem OrderedCommGroup.to_contravariantClass_right_le (α : Type u) [OrderedCommGroup α] :
    ContravariantClass α α (swap (· * ·)) (· ≤ ·)
-- Mathlib/CategoryTheory/Subobject/WellPowered.lean
/--
A category (with morphisms in `Type v`) is well-powered if `Subobject X` is `v`-small for every `X`.

We show in `wellPowered_of_essentiallySmall_monoOver` and `essentiallySmall_monoOver`
that this is the case if and only if `MonoOver X` is `v`-essentially small for every `X`.
-/
class WellPowered : Prop where
  subobject_small : ∀ X : C, Small.{v} (Subobject X) := by infer_instance
-- Mathlib/Analysis/Calculus/TangentCone.lean
theorem uniqueDiffOn_univ : UniqueDiffOn 𝕜 (univ : Set E)
-- Mathlib/Topology/Sheaves/LocalPredicate.lean
theorem PrelocalPredicate.sheafifyOf {T : X → Type v} {P : PrelocalPredicate T} {U : Opens X}
    {f : ∀ x : U, T x} (h : P.pred f) : P.sheafify.pred f
-- Mathlib/Combinatorics/SimpleGraph/Finsubgraph.lean
@[simp, norm_cast]
lemma coe_sInf (s : Set G.Finsubgraph) : sInf s = (⨅ G ∈ s, G : G.Subgraph)
-- Mathlib/SetTheory/Game/PGame.lean
@[simp]
theorem neg_star : -star = star
-- Mathlib/Geometry/Manifold/Algebra/Monoid.lean
@[to_additive]
nonrec theorem SmoothOn.div_const (hf : SmoothOn I' I f s) :
    SmoothOn I' I (fun x ↦ f x / c) s
-- Mathlib/AlgebraicTopology/DoldKan/EquivalenceAdditive.lean
/-- The Dold-Kan equivalence `Karoubi (SimplicialObject C) ≌ Karoubi (ChainComplex C ℕ)`
for additive categories. -/
@[simps]
def equivalence : Karoubi (SimplicialObject C) ≌ Karoubi (ChainComplex C ℕ)
-- Mathlib/Analysis/NormedSpace/HahnBanach/Separation.lean
/-- A version of the **Hahn-Banach theorem**: given disjoint convex sets `s`, `t` where `s` is
compact and `t` is closed, there is a continuous linear functional which strongly separates them. -/
theorem geometric_hahn_banach_compact_closed (hs₁ : Convex ℝ s) (hs₂ : IsCompact s)
    (ht₁ : Convex ℝ t) (ht₂ : IsClosed t) (disj : Disjoint s t) :
    ∃ (f : E →L[ℝ] ℝ) (u v : ℝ), (∀ a ∈ s, f a < u) ∧ u < v ∧ ∀ b ∈ t, v < f b
-- Mathlib/RingTheory/Perfection.lean
theorem map_eq_zero {f : PreTilt K v O hv p} : val K v O hv p f = 0 ↔ f = 0
-- Mathlib/Order/Chain.lean
/-- This can be used to turn `IsChain (≥)` into `IsChain (≤)` and vice-versa. -/
theorem IsChain.symm (h : IsChain r s) : IsChain (flip r) s
-- Mathlib/Topology/Order/IntermediateValue.lean
/-- A bounded connected subset of a conditionally complete linear order includes the open interval
`(Inf s, Sup s)`. -/
theorem IsConnected.Ioo_csInf_csSup_subset {s : Set α} (hs : IsConnected s) (hb : BddBelow s)
    (ha : BddAbove s) : Ioo (sInf s) (sSup s) ⊆ s
-- Mathlib/Algebra/MvPolynomial/Rename.lean
/-- `MvPolynomial.rename e` is an equivalence when `e` is. -/
@[simps apply]
def renameEquiv (f : σ ≃ τ) : MvPolynomial σ R ≃ₐ[R] MvPolynomial τ R
-- Mathlib/Geometry/Euclidean/Angle/Unoriented/Basic.lean
/-- The angle between two vectors is nonnegative. -/
theorem angle_nonneg (x y : V) : 0 ≤ angle x y
-- Mathlib/CategoryTheory/Monoidal/Functor.lean
@[reassoc]
theorem map_leftUnitor (X : C) :
    F.map (λ_ X).hom = inv (F.μ (𝟙_ C) X) ≫ inv F.ε ▷ F.obj X ≫ (λ_ (F.obj X)).hom
-- Mathlib/Algebra/MonoidAlgebra/Degree.lean
theorem supDegree_sub_le {f g : R'[A]} :
    (f - g).supDegree D ≤ f.supDegree D ⊔ g.supDegree D
-- Mathlib/Data/Nat/Defs.lean
lemma forall_lt_succ : (∀ m < n + 1, p m) ↔ (∀ m < n, p m) ∧ p n
-- Mathlib/Topology/Semicontinuous.lean
theorem upperSemicontinuous_iff_isClosed_preimage {f : α → γ} :
    UpperSemicontinuous f ↔ ∀ y, IsClosed (f ⁻¹' Ici y)
-- Mathlib/Data/DFinsupp/Basic.lean
theorem support_add [∀ i, AddZeroClass (β i)] [∀ (i) (x : β i), Decidable (x ≠ 0)]
    {g₁ g₂ : Π₀ i, β i} : (g₁ + g₂).support ⊆ g₁.support ∪ g₂.support
-- Mathlib/SetTheory/Lists.lean
@[simp]
theorem mem_cons {a y l} : a ∈ @cons α y l ↔ a ~ y ∨ a ∈ l
-- Mathlib/MeasureTheory/Function/SimpleFunc.lean
theorem eapprox_lt_top (f : α → ℝ≥0∞) (n : ℕ) (a : α) : eapprox f n a < ∞
-- Mathlib/Algebra/Pointwise/Stabilizer.lean
@[to_additive (attr := simp)]
lemma stabilizer_finset_univ [Fintype α] : stabilizer G (Finset.univ : Finset α) = ⊤
-- Mathlib/NumberTheory/ClassNumber/AdmissibleAbs.lean
/-- We can partition a finite family into `partition_card ε` sets, such that the remainders
in each set are close together. -/
theorem exists_partition_int (n : ℕ) {ε : ℝ} (hε : 0 < ε) {b : ℤ} (hb : b ≠ 0) (A : Fin n → ℤ) :
    ∃ t : Fin n → Fin ⌈1 / ε⌉₊,
    ∀ i₀ i₁, t i₀ = t i₁ → ↑(abs (A i₁ % b - A i₀ % b)) < abs b • ε
-- Mathlib/GroupTheory/Perm/Cycle/Type.lean
theorem card_cycleType_eq_one {σ : Perm α} : Multiset.card σ.cycleType = 1 ↔ σ.IsCycle
-- Mathlib/MeasureTheory/Measure/MeasureSpace.lean
theorem ae_sum_iff' {μ : ι → Measure α} {p : α → Prop} (h : MeasurableSet { x | p x }) :
    (∀ᵐ x ∂sum μ, p x) ↔ ∀ i, ∀ᵐ x ∂μ i, p x
-- Mathlib/Order/Interval/Set/OrdConnectedComponent.lean
theorem ordConnectedComponent_subset : ordConnectedComponent s x ⊆ s
-- Mathlib/SetTheory/Cardinal/Ordinal.lean
theorem mk_surjective_eq_zero_iff_lift :
    #{f : α → β' | Surjective f} = 0 ↔ lift.{v} #α < lift.{u} #β' ∨ (#α ≠ 0 ∧ #β' = 0)
-- Mathlib/Logic/Equiv/Defs.lean
protected lemma exists_congr_right : (∃ a, q (e a)) ↔ ∃ b, q b
-- Mathlib/Data/Fintype/Prod.lean
@[simp] lemma univ_product_univ : univ ×ˢ univ = (univ : Finset (α × β))
-- Mathlib/GroupTheory/CoprodI.lean
theorem lift_word_prod_nontrivial_of_head_eq_last {i} (w : NeWord H i i) : lift f w.prod ≠ 1
-- Mathlib/Computability/TMToPartrec.lean
theorem tr_ret_halt : tr (Λ'.ret Cont'.halt) = (load fun _ => none) halt
-- Mathlib/CategoryTheory/Localization/CalculusOfFractions.lean
lemma Q_map {X Y : C} (f : X ⟶ Y) : (Q W).map f = homMk (ofHom W f)
-- Mathlib/LinearAlgebra/BilinearForm/Properties.lean
theorem apply_dualBasis_left (B : BilinForm K V) (hB : B.Nondegenerate) (b : Basis ι K V) (i j) :
    B (B.dualBasis hB b i) (b j) = if j = i then 1 else 0
-- Mathlib/CategoryTheory/Limits/Shapes/Equalizers.lean
/-- Two morphisms are equal if there is a cofork whose projection is mono. -/
theorem eq_of_mono_cofork_π (t : Cofork f g) [Mono (Cofork.π t)] : f = g
-- Mathlib/Algebra/Module/Torsion.lean
@[simp]
theorem IsTorsionBySet.mk_smul (hM : IsTorsionBySet R M I) (b : R) (x : M) :
    haveI := hM.hasSMul
    Ideal.Quotient.mk I b • x = b • x
-- Mathlib/Data/Set/Function.lean
theorem invFunOn_apply_eq (h : a ∈ s) : f (invFunOn f s (f a)) = f a
-- Mathlib/Algebra/Order/Group/Defs.lean
@[to_additive eq_zero_of_neg_eq]
theorem eq_one_of_inv_eq' (h : a⁻¹ = a) : a = 1
-- Mathlib/Order/Filter/Basic.lean
theorem generate_eq_biInf (S : Set (Set α)) : generate S = ⨅ s ∈ S, 𝓟 s
-- Mathlib/Analysis/Normed/Group/Basic.lean
@[to_additive mem_ball_iff_norm]
theorem mem_ball_iff_norm'' : b ∈ ball a r ↔ ‖b / a‖ < r
-- Mathlib/Topology/Sheaves/SheafCondition/EqualizerProducts.lean
/-- Implementation of `SheafConditionPairwiseIntersections.coneEquiv`. -/
@[simps]
def coneEquivUnitIsoApp (c : Cone ((diagram U).op ⋙ F)) :
    (𝟭 (Cone ((diagram U).op ⋙ F))).obj c ≅
      (coneEquivFunctor F U ⋙ coneEquivInverse F U).obj c
-- Mathlib/Algebra/Order/UpperLower.lean
@[to_additive]
theorem IsLowerSet.div_right (hs : IsLowerSet s) : IsLowerSet (s / t)
-- Mathlib/Order/Bounds/Basic.lean
theorem le_glb_Ioi (a : α) (hb : IsGLB (Ioi a) b) : a ≤ b
-- Mathlib/MeasureTheory/Constructions/Pi.lean
theorem volume_preserving_piFinsetUnion (α : ι → Type*) [DecidableEq ι] {s t : Finset ι}
    (h : Disjoint s t) [∀ i, MeasureSpace (α i)] [∀ i, SigmaFinite (volume : Measure (α i))] :
    MeasurePreserving (MeasurableEquiv.piFinsetUnion α h) volume volume
-- Mathlib/Order/Hom/Order.lean
@[simp, norm_cast]
theorem coe_iInf {ι : Sort*} [CompleteLattice β] (f : ι → α →o β) :
    ((⨅ i, f i : α →o β) : α → β) = ⨅ i, (f i : α → β)
-- Mathlib/Data/Multiset/FinsetOps.lean
@[simp]
theorem mem_ndinter {s t : Multiset α} {a : α} : a ∈ ndinter s t ↔ a ∈ s ∧ a ∈ t
-- Mathlib/LinearAlgebra/Matrix/SesquilinearForm.lean
@[simp]
theorem LinearMap.toMatrix₂_mul_basis_toMatrix (c₁ : Basis n' R M₁) (c₂ : Basis m' R M₂)
    (B : M₁ →ₗ[R] M₂ →ₗ[R] R) :
    (b₁.toMatrix c₁)ᵀ * LinearMap.toMatrix₂ b₁ b₂ B * b₂.toMatrix c₂ =
      LinearMap.toMatrix₂ c₁ c₂ B
-- Mathlib/GroupTheory/FreeGroup/IsFreeGroup.lean
@[simp] lemma ofFreeGroup_apply {X : Type*} (x : X) :
    FreeGroupBasis.ofFreeGroup X x = FreeGroup.of x
-- Mathlib/Geometry/Manifold/ChartedSpace.lean
theorem idRestrGroupoid_mem {s : Set H} (hs : IsOpen s) : ofSet s hs ∈ @idRestrGroupoid H _
-- Mathlib/Data/PFun.lean
/-- Partial function extensionality -/
theorem ext' {f g : α →. β} (H1 : ∀ a, a ∈ Dom f ↔ a ∈ Dom g) (H2 : ∀ a p q, f.fn a p = g.fn a q) :
    f = g
-- Mathlib/Data/Seq/WSeq.lean
@[simp]
theorem tail_nil : tail (nil : WSeq α) = nil
-- Mathlib/Topology/Algebra/InfiniteSum/Group.lean
@[to_additive]
theorem tprod_subtype_mul_tprod_subtype_compl [T2Space α] {f : β → α} (hf : Multipliable f)
    (s : Set β) : (∏' x : s, f x) * ∏' x : ↑sᶜ, f x = ∏' x, f x
-- Mathlib/RingTheory/Multiplicity.lean
theorem multiplicity_add_of_gt {p a b : α} (h : multiplicity p b < multiplicity p a) :
    multiplicity p (a + b) = multiplicity p b
-- Mathlib/Algebra/Bounds.lean
@[to_additive]
theorem IsGLB.inv (h : IsGLB s a) : IsLUB s⁻¹ a⁻¹
-- Mathlib/Data/Multiset/Powerset.lean
theorem powersetCardAux_eq_map_coe {n} {l : List α} :
    powersetCardAux n l = (sublistsLen n l).map (↑)
-- Mathlib/Algebra/Homology/ExactSequence.lean
lemma exact_iff_δ₀ (S : ComposableArrows C (n + 2)) :
    S.Exact ↔ (mk₂ (S.map' 0 1) (S.map' 1 2)).Exact ∧ S.δ₀.Exact
-- Mathlib/Algebra/Algebra/Operations.lean
@[mono]
theorem mul_le_mul (hmp : M ≤ P) (hnq : N ≤ Q) : M * N ≤ P * Q
-- Mathlib/Topology/Category/LightProfinite/Basic.lean
/-- The fully faithful embedding `LightDiagram ⥤ Profinite` -/
@[simps!]
def lightDiagramToProfinite : LightDiagram ⥤ Profinite
-- Mathlib/Algebra/BigOperators/Finprod.lean
@[to_additive]
theorem finprod_mem_univ (f : α → M) : ∏ᶠ i ∈ @Set.univ α, f i = ∏ᶠ i : α, f i
-- Mathlib/Analysis/SpecialFunctions/Log/Base.lean
theorem div_logb {a b c : ℝ} (h₁ : c ≠ 0) (h₂ : c ≠ 1) (h₃ : c ≠ -1) :
    logb a c / logb b c = logb a b
-- Mathlib/SetTheory/Ordinal/Arithmetic.lean
@[simp]
theorem blsub_one (f : ∀ a < (1 : Ordinal), Ordinal) : blsub 1 f = succ (f 0 zero_lt_one)
-- Mathlib/Tactic/NormNum/LegendreSymbol.lean
theorem jacobiSymNat.one_right (a : ℕ) : jacobiSymNat a 1 = 1
-- Mathlib/SetTheory/Cardinal/Finite.lean
lemma card_preimage_of_injective {f : α → β} {s : Set β} (hf : Injective f) (hsf : s ⊆ range f) :
    Nat.card (f ⁻¹' s) = Nat.card s
-- Mathlib/Order/Height.lean
theorem le_chainHeight_add_nat_iff {n m : ℕ} :
    ↑n ≤ s.chainHeight + m ↔ ∃ l ∈ s.subchain, n ≤ length l + m
-- Mathlib/CategoryTheory/Limits/Shapes/ZeroObjects.lean
theorem of_iso (hY : IsZero Y) (e : X ≅ Y) : IsZero X
-- Mathlib/Data/NNReal/Basic.lean
@[simp, norm_cast]
lemma algebraMap_eq_coe : (algebraMap ℝ≥0 ℝ : ℝ≥0 → ℝ) = (↑)
-- Mathlib/Order/CompleteSublattice.lean
/-- To check that a subset is a complete sublattice, one does not need to check that it is closed
under binary `Sup` since this follows from the stronger `sSup` condition. Likewise for infima. -/
@[simps] def mk' (carrier : Set α)
    (sSupClosed' : ∀ ⦃s : Set α⦄, s ⊆ carrier → sSup s ∈ carrier)
    (sInfClosed' : ∀ ⦃s : Set α⦄, s ⊆ carrier → sInf s ∈ carrier) :
  CompleteSublattice α
-- .lake/packages/lean4/src/lean/Init/Data/BitVec/Bitblast.lean
theorem add_eq_adc (w : Nat) (x y : BitVec w) : x + y = (adc x y false).snd
-- Mathlib/Analysis/Calculus/LineDeriv/Basic.lean
theorem lineDeriv_zero : lineDeriv 𝕜 f x 0 = 0
-- Mathlib/Data/Finset/Basic.lean
@[simp]
theorem filter_val (s : Finset α) : (filter p s).1 = s.1.filter p
-- Mathlib/Computability/DFA.lean
theorem evalFrom_of_append (start : σ) (x y : List α) :
    M.evalFrom start (x ++ y) = M.evalFrom (M.evalFrom start x) y
-- Mathlib/CategoryTheory/Bicategory/FunctorBicategory.lean
/-- Associator for the vertical composition of oplax natural transformations. -/
-- Porting note: verified that projections are correct and changed @[simps] to @[simps!]
@[simps!]
def associator (η : F ⟶ G) (θ : G ⟶ H) (ι : H ⟶ I) : (η ≫ θ) ≫ ι ≅ η ≫ θ ≫ ι
-- Mathlib/Topology/MetricSpace/Bounded.lean
theorem _root_.Bornology.IsBounded.subset_closedBall_lt (h : IsBounded s) (a : ℝ) (c : α) :
    ∃ r, a < r ∧ s ⊆ closedBall c r
-- Mathlib/Computability/Primrec.lean
private theorem list_cons' : (haveI := prim H; Primrec₂ (@List.cons β))
-- Mathlib/Data/Int/Defs.lean
protected lemma one_ne_zero : (1 : ℤ) ≠ 0
-- Mathlib/Data/Set/Prod.lean
@[simp]
theorem empty_prod : (∅ : Set α) ×ˢ t = ∅
-- Mathlib/Topology/MetricSpace/Basic.lean
@[simp] theorem sphere_zero : sphere x 0 = {x}
-- Mathlib/Data/Finset/Lattice.lean
theorem inf_union [DecidableEq β] : (s₁ ∪ s₂).inf f = s₁.inf f ⊓ s₂.inf f
-- Mathlib/Algebra/Group/Basic.lean
@[to_additive sub_eq_of_eq_add]
theorem div_eq_of_eq_mul'' (h : a = c * b) : a / b = c
-- Mathlib/Data/Real/Hyperreal.lean
theorem lt_of_st_lt {x y : ℝ*} (hix : ¬Infinite x) (hiy : ¬Infinite y) : st x < st y → x < y
-- Mathlib/Order/Circular.lean
theorem btw_rfl {a : α} : btw a a a
-- Mathlib/AlgebraicGeometry/Scheme.lean
theorem congr_app {X Y : Scheme} {f g : X ⟶ Y} (e : f = g) (U) :
    f.app U = g.app U ≫ X.presheaf.map (eqToHom (by subst e; rfl)).op
-- Mathlib/SetTheory/Ordinal/Arithmetic.lean
@[simp, norm_cast]
theorem natCast_sub (m n : ℕ) : ((m - n : ℕ) : Ordinal) = m - n
-- Mathlib/Analysis/RCLike/Basic.lean
protected lemma inv_pos_of_pos (hz : 0 < z) : 0 < z⁻¹
-- Mathlib/Algebra/Order/Group/Basic.lean
@[to_additive (attr := gcongr)]
lemma zpow_le_zpow' (hn : 0 ≤ n) (h : a ≤ b) : a ^ n ≤ b ^ n
-- Mathlib/Data/Seq/WSeq.lean
@[simp]
theorem map_ret (f : α → β) (a) : map f (ret a) = ret (f a)
-- Mathlib/Topology/Order/MonotoneConvergence.lean
theorem isLUB_of_tendsto_atTop [TopologicalSpace α] [Preorder α] [OrderClosedTopology α]
    [Nonempty β] [SemilatticeSup β] {f : β → α} {a : α} (hf : Monotone f)
    (ha : Tendsto f atTop (𝓝 a)) : IsLUB (Set.range f) a
-- Mathlib/Data/Set/Prod.lean
lemma Function.pullback_comm_sq (f : X → Y) (g : Z → Y) :
    f ∘ @fst X Y Z f g = g ∘ @snd X Y Z f g
-- Mathlib/Order/RelSeries.lean
@[simp] lemma length_withLength [r.InfiniteDimensional] (n : ℕ) :
    (RelSeries.withLength r n).length = n
-- Mathlib/GroupTheory/GroupAction/FixedPoints.lean
@[to_additive]
theorem fixedBy_subset_fixedBy_zpow (g : G) (j : ℤ) :
    fixedBy α g ⊆ fixedBy α (g ^ j)
-- Mathlib/RingTheory/WittVector/Basic.lean
private theorem ghostFun_add : ghostFun (x + y) = ghostFun x + ghostFun y
-- Mathlib/Analysis/SpecialFunctions/Trigonometric/ArctanDeriv.lean
theorem HasStrictDerivAt.arctan (hf : HasStrictDerivAt f f' x) :
    HasStrictDerivAt (fun x => arctan (f x)) (1 / (1 + f x ^ 2) * f') x
-- Mathlib/CategoryTheory/Adjunction/Reflective.lean
lemma mem_essImage_of_counit_isSplitEpi [Coreflective j] {A : D}
    [IsSplitEpi ((coreflectorAdjunction j).counit.app A)] : A ∈ j.essImage
-- Mathlib/Analysis/Calculus/FDeriv/Basic.lean
@[fun_prop]
theorem differentiableOn_empty : DifferentiableOn 𝕜 f ∅
-- Mathlib/Algebra/Star/StarRingHom.lean
@[simp]
theorem coe_id : ⇑(NonUnitalStarRingHom.id A) = id
-- Mathlib/Algebra/Group/Units.lean
@[to_additive (attr := simp)]
protected lemma div_mul_cancel (h : IsUnit b) (a : α) : a / b * b = a
-- Mathlib/Order/Minimal.lean
theorem mem_minimals_iff_forall_lt_not_mem [Preorder α] {x : α} {s : Set α} :
    x ∈ minimals (· ≤ ·) s ↔ x ∈ s ∧ ∀ ⦃y⦄, y < x → y ∉ s
-- Mathlib/Algebra/Group/Submonoid/Operations.lean
/-- The top submonoid is isomorphic to the monoid. -/
@[to_additive (attr := simps) "The top additive submonoid is isomorphic to the additive monoid."]
def topEquiv : (⊤ : Submonoid M) ≃* M
-- Mathlib/Data/Finsupp/Basic.lean
@[to_additive (attr := simp)]
theorem prod_equivMapDomain [CommMonoid N] (f : α ≃ β) (l : α →₀ M) (g : β → M → N) :
    prod (equivMapDomain f l) g = prod l (fun a m => g (f a) m)
-- Mathlib/Combinatorics/SetFamily/HarrisKleitman.lean
/-- **Harris-Kleitman inequality**: Any two upper sets of finsets correlate. -/
theorem IsUpperSet.le_card_inter_finset (h𝒜 : IsUpperSet (𝒜 : Set (Finset α)))
    (hℬ : IsUpperSet (ℬ : Set (Finset α))) :
    𝒜.card * ℬ.card ≤ 2 ^ Fintype.card α * (𝒜 ∩ ℬ).card
-- Mathlib/CategoryTheory/Localization/SmallShiftedHom.lean
@[simp]
lemma equiv_mk₀ [HasSmallLocalizedShiftedHom.{w} W M X Y]
    (m₀ : M) (hm₀ : m₀ = 0) (f : X ⟶ Y) :
    equiv W L (SmallShiftedHom.mk₀ W m₀ hm₀ f) =
      ShiftedHom.mk₀ m₀ hm₀ (L.map f)
-- Mathlib/Algebra/Order/BigOperators/Group/List.lean
lemma sum_le_foldr_max [AddMonoid M] [AddMonoid N] [LinearOrder N] (f : M → N) (h0 : f 0 ≤ 0)
    (hadd : ∀ x y, f (x + y) ≤ max (f x) (f y)) (l : List M) : f l.sum ≤ (l.map f).foldr max 0
-- Mathlib/Geometry/Euclidean/Angle/Oriented/RightAngle.lean
/-- An angle in a right-angled triangle expressed using `arctan`, where one side is a multiple
of a rotation of another by `π / 2`. -/
theorem oangle_add_left_smul_rotation_pi_div_two {x : V} (h : x ≠ 0) (r : ℝ) :
    o.oangle (x + r • o.rotation (π / 2 : ℝ) x) (r • o.rotation (π / 2 : ℝ) x)
      = Real.arctan r⁻¹
-- Mathlib/Algebra/Polynomial/Taylor.lean
theorem taylor_eval_sub {R} [CommRing R] (r : R) (f : R[X]) (s : R) :
    (taylor r f).eval (s - r) = f.eval s
-- Mathlib/Data/NNRat/Defs.lean
@[simp]
theorem abs_coe (q : ℚ≥0) : |(q : ℚ)| = q
-- Mathlib/MeasureTheory/Integral/Gamma.lean
theorem Complex.integral_rpow_mul_exp_neg_rpow {p q : ℝ} (hp : 1 ≤ p) (hq : - 2 < q) :
    ∫ x : ℂ, ‖x‖ ^ q * rexp (- ‖x‖ ^ p) = (2 * π / p) * Real.Gamma ((q + 2) / p)
-- Mathlib/MeasureTheory/Integral/DominatedConvergence.lean
theorem continuousOn_primitive_interval (h_int : IntegrableOn f (uIcc a b) μ) :
    ContinuousOn (fun x => ∫ t in a..x, f t ∂μ) (uIcc a b)
-- Mathlib/Analysis/Normed/Lp/ProdLp.lean
theorem prod_nndist_eq_of_L2 (x y : WithLp 2 (α × β)) :
    nndist x y = NNReal.sqrt (nndist x.fst y.fst ^ 2 + nndist x.snd y.snd ^ 2)
-- Mathlib/SetTheory/Cardinal/ENat.lean
/-- The coercion `Cardinal.ofENat` and the projection `Cardinal.toENat` form a Galois connection.
See also `Cardinal.gciENat`. -/
lemma enat_gc : GaloisConnection (↑) toENat
-- Mathlib/FieldTheory/Perfect.lean
/-- If `L / K` is an algebraic extension, `K` is a perfect field, then so is `L`. -/
theorem Algebra.IsAlgebraic.perfectField {K L : Type*} [Field K] [Field L] [Algebra K L]
    [Algebra.IsAlgebraic K L] [PerfectField K] : PerfectField L
-- Mathlib/RingTheory/IsTensorProduct.lean
@[simp]
theorem Algebra.pushoutDesc_left [H : Algebra.IsPushout R S R' S'] {A : Type*} [Semiring A]
    [Algebra R A] (f : S →ₐ[R] A) (g : R' →ₐ[R] A) (H) (x : S) :
    Algebra.pushoutDesc S' f g H (algebraMap S S' x) = f x
-- Mathlib/MeasureTheory/PiSystem.lean
theorem generatePiSystem_measurableSet {α} [M : MeasurableSpace α] {S : Set (Set α)}
    (h_meas_S : ∀ s ∈ S, MeasurableSet s) (t : Set α) (h_in_pi : t ∈ generatePiSystem S) :
    MeasurableSet t
-- Mathlib/GroupTheory/Complement.lean
theorem equiv_fst_eq_self_iff_mem {g : G} (h1 : 1 ∈ T) :
    ((hST.equiv g).fst : G) = g ↔ g ∈ S
-- Mathlib/Topology/Order/NhdsSet.lean
theorem nhdsSet_Icc (h : a ≤ b) : 𝓝ˢ (Icc a b) = 𝓝 a ⊔ 𝓝 b ⊔ 𝓟 (Ioo a b)
-- Mathlib/CategoryTheory/GradedObject.lean
lemma congr_mapMap (φ₁ φ₂ : X ⟶ Y) (h : φ₁ = φ₂) : mapMap φ₁ p = mapMap φ₂ p
-- Mathlib/GroupTheory/Perm/ClosureSwap.lean
theorem SubmonoidClass.swap_mem_trans {a b c : α} {C} [SetLike C (Perm α)]
    [SubmonoidClass C (Perm α)] (M : C) (hab : swap a b ∈ M) (hbc : swap b c ∈ M) :
    swap a c ∈ M
-- Mathlib/RingTheory/FiniteType.lean
theorem comp {g : B →ₐ[R] C} {f : A →ₐ[R] B} (hg : g.FiniteType) (hf : f.FiniteType) :
    (g.comp f).FiniteType
-- Mathlib/Analysis/BoxIntegral/Box/Basic.lean
theorem mem_def : x ∈ I ↔ ∀ i, x i ∈ Ioc (I.lower i) (I.upper i)
-- Mathlib/Algebra/BigOperators/Associated.lean
theorem exists_mem_multiset_le_of_prime {s : Multiset (Associates α)} {p : Associates α}
    (hp : Prime p) : p ≤ s.prod → ∃ a ∈ s, p ≤ a
-- Mathlib/Algebra/Order/Group/Abs.lean
@[to_additive] lemma mabs_pow (n : ℕ) (a : α) : |a ^ n|ₘ = |a|ₘ ^ n
-- Mathlib/Order/Monotone/Basic.lean
@[simp] theorem strictMonoOn_univ : StrictMonoOn f Set.univ ↔ StrictMono f
-- Mathlib/Algebra/Lie/Quotient.lean
lemma toEnd_comp_mk' (x : L) :
    LieModule.toEnd R L (M ⧸ N) x ∘ₗ mk' N = mk' N ∘ₗ LieModule.toEnd R L M x
-- Mathlib/Algebra/Module/Torsion.lean
/-- See also `CompleteLattice.Independent.linearIndependent` which provides the same conclusion
but requires the stronger hypothesis `NoZeroSMulDivisors R M`. -/
theorem CompleteLattice.Independent.linear_independent' {ι R M : Type*} {v : ι → M} [Ring R]
    [AddCommGroup M] [Module R M] (hv : CompleteLattice.Independent fun i => R ∙ v i)
    (h_ne_zero : ∀ i, Ideal.torsionOf R M (v i) = ⊥) : LinearIndependent R v
-- .lake/packages/batteries/Batteries/Data/Rat/Lemmas.lean
theorem mk_eq_mkRat (num den nz c) : ⟨num, den, nz, c⟩ = mkRat num den