/-- Every simple lattice is isomorphic to `Bool`, regardless of order. -/
@[simps]
def equivBool {α} [DecidableEq α] [LE α] [BoundedOrder α] [IsSimpleOrder α] : α ≃ Bool

{α : Type u_4}
[DecidableEq α]
[LE α]
[BoundedOrder α]
[IsSimpleOrder α]
(x : α)

IsSimpleOrder.equivBool x = decide (x = ⊤)


/-- **Fundamental theorem of calculus-1**, local version for any measure.

Let filters `l` and `l'` be related by `[intervalIntegral.FTCFilter a l l']`; let `μ` be a locally
finite measure.  If `f` has a finite limit `c` at `l' ⊓ ae μ`, then
`∫ x in u..v, f x ∂μ = μ (Ioc u v) • c + o(μ(Ioc u v))` as both `u` and `v` tend to `l`.

See also `measure_integral_sub_linear_isLittleO_of_tendsto_ae_of_le'` for a version that also works,
e.g., for `l = l' = Filter.atTop`. -/
theorem measure_integral_sub_linear_isLittleO_of_tendsto_ae_of_le
    (hfm : StronglyMeasurableAtFilter f l' μ) (hf : Tendsto f (l' ⊓ ae μ) (𝓝 c))
    (hu : Tendsto u lt l) (hv : Tendsto v lt l) (huv : u ≤ᶠ[lt] v) :
    (fun t => (∫ x in u t..v t, f x ∂μ) - (μ (Ioc (u t) (v t))).toReal • c) =o[lt] fun t =>
      (μ <| Ioc (u t) (v t)).toReal

(hf : Filter.Tendsto f (l' ⊓ MeasureTheory.ae μ) (𝓝 c))

(fun t => ∫ (x : ℝ) in u t..v t, f x ∂μ - (μ (Set.Ioc (u t) (v t))).toReal • c) =o[lt] fun t =>
  (μ (Set.Ioc (u t) (v t))).toReal


@[simp] theorem coe_toOrderHom (f : α →Co β) : ⇑f.toOrderHom = f

{α : Type u_2}
{β : Type u_3}
[TopologicalSpace α]
[Preorder α]
[TopologicalSpace β]
[Preorder β]
(f : α →Co β)


/-- So-named because the outer coercion is `Int.cast` into `ZMod`. For `Int.cast` into an arbitrary
ring, see `ZMod.intCast_cast`. -/
@[norm_cast]
theorem intCast_zmod_cast (a : ZMod n) : ((cast a : ℤ) : ZMod n) = a


theorem FiniteField.trace_pow_card {K : Type*} [Field K] [Fintype K] (M : Matrix n n K) :
    trace (M ^ Fintype.card K) = trace M ^ Fintype.card K

{n : Type u_1}
[DecidableEq n]
[Fintype n]
{K : Type u_2}
[Field K]
[Fintype K]
(M : Matrix n n K)

(M ^ Fintype.card K).trace = M.trace ^ Fintype.card K


theorem repr_sub (a b) : repr (a - b) = repr a - repr b


theorem IsGreatest.lt_iff (h : IsGreatest s a) : a < b ↔ ∀ x ∈ s, x < b

{α : Type u}
[Preorder α]
{s : Set α}
{a b : α}
(h : IsGreatest s a)


lemma levyProkhorovEDist_triangle [OpensMeasurableSpace Ω] (μ ν κ : Measure Ω) :
    levyProkhorovEDist μ κ ≤ levyProkhorovEDist μ ν + levyProkhorovEDist ν κ

{Ω : Type u_2}
[MeasurableSpace Ω]
[PseudoEMetricSpace Ω]
[OpensMeasurableSpace Ω]
(μ ν κ : MeasureTheory.Measure Ω)

MeasureTheory.levyProkhorovEDist μ κ ≤ MeasureTheory.levyProkhorovEDist μ ν + MeasureTheory.levyProkhorovEDist ν κ


theorem le_of_tendsto_of_frequently {x : Filter β} (lim : Tendsto f x (𝓝 a))
    (h : ∃ᶠ c in x, f c ≤ b) : a ≤ b

{α : Type u}
{β : Type v}
[TopologicalSpace α]
[Preorder α]
[ClosedIicTopology α]
{f : β → α}
{a b : α}
{x : Filter β}
(lim : Filter.Tendsto f x (𝓝 a))
(h : ∃ᶠ (c : β) in x, f c ≤ b)


/-- Explicit formula for the Beta function when second argument is a positive integer. -/
theorem betaIntegral_eval_nat_add_one_right {u : ℂ} (hu : 0 < re u) (n : ℕ) :
    betaIntegral u (n + 1) = n ! / ∏ j ∈ Finset.range (n + 1), (u + j)

u.betaIntegral (↑n + 1) = ↑n ! / ∏ j ∈ Finset.range (n + 1), (u + ↑j)


theorem flatten_equiv {c : Computation (WSeq α)} {s} (h : s ∈ c) : flatten c ~ʷ s

{α : Type u}
{c : Computation (Stream'.WSeq α)}
{s : Stream'.WSeq α}
(h : s ∈ c)


/-- Show that the functor given by `rightAdjointOfEquiv` is indeed right adjoint to `F`. Dual
to `adjunctionOfEquivRight`. -/
@[simps!]
def adjunctionOfEquivRight (he : ∀ X' X Y f g, e X' Y (F.map f ≫ g) = f ≫ e X Y g) :
    F ⊣ (rightAdjointOfEquiv e he)

(e : (X : C) → (Y : D) → (F.obj X ⟶ Y) ≃ (X ⟶ G_obj Y))

(he :
  ∀ (X' X : C) (Y : D) (f : X' ⟶ X) (g : F.obj X ⟶ Y),
    (e X' Y) (CategoryTheory.CategoryStruct.comp (F.map f) g) = CategoryTheory.CategoryStruct.comp f ((e X Y) g))

(CategoryTheory.Adjunction.adjunctionOfEquivRight e he).unit.app X =
  (e X (F.obj X)) (CategoryTheory.CategoryStruct.id (F.obj X))


@[mono]
theorem restrict_mono {s t : Set α} (h : s ⊆ t) {m m' : OuterMeasure α} (hm : m ≤ m') :
    restrict s m ≤ restrict t m'

{α : Type u_1}
{s t : Set α}
(h : s ⊆ t)
{m m' : MeasureTheory.OuterMeasure α}
(hm : m ≤ m')

(MeasureTheory.OuterMeasure.restrict s) m ≤ (MeasureTheory.OuterMeasure.restrict t) m'


@[simp] theorem toSpanUnitSingleton_apply (x : E) (hx : ‖x‖ = 1) (r : 𝕜) :
    toSpanUnitSingleton x hx r = (⟨r • x, by aesop⟩ : 𝕜 ∙ x)

{𝕜 : Type u_1}
{E : Type u_2}
[NormedDivisionRing 𝕜]
[SeminormedAddCommGroup E]
[Module 𝕜 E]
[BoundedSMul 𝕜 E]
(x : E)
(hx : ‖x‖ = 1)
(r : 𝕜)

(LinearIsometryEquiv.toSpanUnitSingleton x hx) r = ⟨r • x, ⋯⟩


protected theorem toFinset_image [DecidableEq β] (f : α → β) (hs : s.Finite) (h : (f '' s).Finite) :
    h.toFinset = hs.toFinset.image f

{α : Type u}
{β : Type v}
{s : Set α}
[DecidableEq β]
(f : α → β)
(hs : s.Finite)
(h : (f '' s).Finite)


/-- The functor sending an arrow to its target. -/
@[simps!]
def rightFunc : Arrow C ⥤ C

(X : CategoryTheory.Comma (CategoryTheory.Functor.id C) (CategoryTheory.Functor.id C))

CategoryTheory.Arrow.rightFunc.obj X = X.right


/-- Over the reals or the complexes, a continuously differentiable function is strictly
differentiable. -/
theorem hasStrictDerivAt_of_hasDerivAt_of_continuousAt {f f' : 𝕜 → G} {x : 𝕜}
    (hder : ∀ᶠ y in 𝓝 x, HasDerivAt f (f' y) y) (hcont : ContinuousAt f' x) :
    HasStrictDerivAt f (f' x) x

(hder : ∀ᶠ (y : 𝕜) in 𝓝 x, HasDerivAt f (f' y) y)


/-- Compatibility of `nullHomotopicMap'` with the application of additive functors -/
theorem map_nullHomotopicMap' {W : Type*} [Category W] [Preadditive W] (G : V ⥤ W) [G.Additive]
    (hom : ∀ i j, c.Rel j i → (C.X i ⟶ D.X j)) :
    (G.mapHomologicalComplex c).map (nullHomotopicMap' hom) =
      nullHomotopicMap' fun i j hij => by exact G.map (hom i j hij)

(hom : (i j : ι) → c.Rel j i → (C.X i ⟶ D.X j))

(G.mapHomologicalComplex c).map (Homotopy.nullHomotopicMap' hom) =
  Homotopy.nullHomotopicMap' fun i j hij => G.map (hom i j hij)


@[simp] protected theorem mul_lt_mul_right (a0 : 0 < a) : b * a < c * a ↔ b < c


/-- A continuous function with compact support is strongly measurable. -/
@[to_additive]
theorem _root_.Continuous.stronglyMeasurable_of_hasCompactMulSupport
    [MeasurableSpace α] [TopologicalSpace α] [OpensMeasurableSpace α] [MeasurableSpace β]
    [TopologicalSpace β] [PseudoMetrizableSpace β] [BorelSpace β] [One β] {f : α → β}
    (hf : Continuous f) (h'f : HasCompactMulSupport f) : StronglyMeasurable f


theorem bound_of_shell_of_norm_map_coord_zero (hf₀ : ∀ {m i}, ‖m i‖ = 0 → ‖f m‖ = 0)
    {ε : ι → ℝ} {C : ℝ} (hε : ∀ i, 0 < ε i) {c : ι → 𝕜} (hc : ∀ i, 1 < ‖c i‖)
    (hf : ∀ m : ∀ i, E i, (∀ i, ε i / ‖c i‖ ≤ ‖m i‖) → (∀ i, ‖m i‖ < ε i) → ‖f m‖ ≤ C * ∏ i, ‖m i‖)
    (m : ∀ i, E i) : ‖f m‖ ≤ C * ∏ i, ‖m i‖

[(i : ι) → SeminormedAddCommGroup (E i)]

(hf₀ : ∀ {m : (i : ι) → E i} {i : ι}, ‖m i‖ = 0 → ‖f m‖ = 0)

(hf : ∀ (m : (i : ι) → E i), (∀ (i : ι), ε i / ‖c i‖ ≤ ‖m i‖) → (∀ (i : ι), ‖m i‖ < ε i) → ‖f m‖ ≤ C * ∏ i : ι, ‖m i‖)


theorem ssubset_iff_of_subset {s t : Set α} (h : s ⊆ t) : s ⊂ t ↔ ∃ x ∈ t, x ∉ s


@[to_additive AddSubgroup.card_eq_card_quotient_mul_card_addSubgroup]
theorem card_eq_card_quotient_mul_card_subgroup (s : Subgroup α) :
    Nat.card α = Nat.card (α ⧸ s) * Nat.card s

{α : Type u_1}
[Group α]
(s : Subgroup α)

Nat.card α = Nat.card (α ⧸ s) * Nat.card ↥s


theorem invFun_restrict [Nonempty α] : (Set.range f).restrict (invFun f) = f.invOfMemRange

{α : Type u_1}
{β : Type u_2}
[Fintype α]
[DecidableEq β]
(f : α ↪ β)
[Nonempty α]

(Set.range ⇑f).restrict (Function.invFun ⇑f) = f.invOfMemRange


@[simp]
theorem generateFrom_measurableSet [MeasurableSpace α] :
    generateFrom { s : Set α | MeasurableSet s } = ‹_›

MeasurableSpace.generateFrom {s | MeasurableSet s} = inst✝


/-- `sSup` of `norm` is nonneg applied to the image of `f` on the vertical line `re z = x` -/
lemma sSupNormIm_nonneg (x : ℝ) : 0 ≤ sSupNormIm f x

{E : Type u_1}
[NormedAddCommGroup E]
(f : ℂ → E)
(x : ℝ)

0 ≤ Complex.HadamardThreeLines.sSupNormIm f x


protected theorem _root_.IsMax.withBot (h : IsMax a) : IsMax (a : WithBot α)

{α : Type u_1}
{a : α}
[LE α]
(h : IsMax a)


/-- Note that this applies to `ℂ` via `Complex.strictOrderedCommRing`. -/
@[simp]
theorem dotProduct_star_self_eq_zero {v : n → R} : dotProduct (star v) v = 0 ↔ v = 0

{n : Type u_2}
{R : Type u_4}
[Fintype n]
[PartialOrder R]
[NonUnitalRing R]
[StarRing R]
[StarOrderedRing R]
[NoZeroDivisors R]
{v : n → R}

Matrix.dotProduct (star v) v = 0 ↔ v = 0


theorem mapAlgHom_eq_eval₂AlgHom'_CAlgHom (f : A →ₐ[R] B) : mapAlgHom f = eval₂AlgHom'
    (CAlgHom.comp f) X (fun a => (commute_X (C (f a))).symm)

{R : Type u}
{A : Type z}
{B : Type u_2}
[CommSemiring R]
[Semiring A]
[Semiring B]
[Algebra R A]
[Algebra R B]
(f : A →ₐ[R] B)

Polynomial.mapAlgHom f = Polynomial.eval₂AlgHom' (Polynomial.CAlgHom.comp f) Polynomial.X ⋯


theorem mul_apply [DecidableEq G] [Mul G] (f g : MonoidAlgebra k G) (x : G) :
    (f * g) x = f.sum fun a₁ b₁ => g.sum fun a₂ b₂ => if a₁ * a₂ = x then b₁ * b₂ else 0

{k : Type u₁}
{G : Type u₂}
[Semiring k]
[DecidableEq G]
[Mul G]
(f g : MonoidAlgebra k G)
(x : G)

(f * g) x = Finsupp.sum f fun a₁ b₁ => Finsupp.sum g fun a₂ b₂ => if a₁ * a₂ = x then b₁ * b₂ else 0


theorem sbtw_asymm {a b c : α} (h : sbtw a b c) : ¬sbtw c b a

{α : Type u_1}
[CircularPreorder α]
{a b c : α}
(h : sbtw a b c)


protected lemma eq_top_iff [Preorder α] {x : Iic a} :
    x = ⊤ ↔ (x : α) = a

{α : Type u_1}
{a : α}
[Preorder α]
{x : ↑(Set.Iic a)}


@[simp]
theorem nndist_vsub_cancel_right (x y z : P) : nndist (x -ᵥ z) (y -ᵥ z) = nndist x y

{V : Type u_2}
{P : Type u_3}
[SeminormedAddCommGroup V]
[PseudoMetricSpace P]
[NormedAddTorsor V P]
(x y z : P)


@[simp]
theorem cast_zero' [Zero α] [One α] [Add α] : (Num.zero : α) = 0


@[to_additive] lemma IsMulFreimanHom.superset (hB : B₁ ⊆ B₂) (hf : IsMulFreimanHom n A B₁ f) :
    IsMulFreimanHom n A B₂ f

{α : Type u_2}
{β : Type u_3}
[CommMonoid α]
[CommMonoid β]
{A : Set α}
{B₁ B₂ : Set β}
{f : α → β}
{n : ℕ}
(hB : B₁ ⊆ B₂)
(hf : IsMulFreimanHom n A B₁ f)


/-- Given a diagram of presheafed spaces,
we can push all the presheaves forward to the colimit `X` of the underlying topological spaces,
obtaining a diagram in `(Presheaf C X)ᵒᵖ`.
-/
@[simps]
def pushforwardDiagramToColimit (F : J ⥤ PresheafedSpace.{_, _, v} C) :
    J ⥤ (Presheaf C (colimit (F ⋙ PresheafedSpace.forget C)))ᵒᵖ

(F : J ⥤ AlgebraicGeometry.PresheafedSpace C)

(AlgebraicGeometry.PresheafedSpace.pushforwardDiagramToColimit F).obj j =
  Opposite.op
    ((TopCat.Presheaf.pushforward C
          (CategoryTheory.Limits.colimit.ι (F ⋙ AlgebraicGeometry.PresheafedSpace.forget C) j)).obj
      (F.obj j).presheaf)


lemma equivTensorQuot_naturality_mk (f : M →ₗ[R] M') (x : M) :
    equivTensorQuot r M' (map r f (Submodule.Quotient.mk x)) =
      f.rTensor (R ⧸ Ideal.span {r})
        (equivTensorQuot r M (Submodule.Quotient.mk x))

{R : Type u_2}
[CommRing R]
(r : R)
{M : Type u_1}
{M' : Type u_3}
[AddCommGroup M]
[Module R M]
[AddCommGroup M']
[Module R M']
(f : M →ₗ[R] M')
(x : M)

(QuotSMulTop.equivTensorQuot r M') (((QuotSMulTop.map r) f) (Submodule.Quotient.mk x)) =
  (LinearMap.rTensor (R ⧸ Ideal.span {r}) f) ((QuotSMulTop.equivTensorQuot r M) (Submodule.Quotient.mk x))


/-- The closure of a connected set is connected as well. -/
protected theorem IsConnected.closure {s : Set α} (H : IsConnected s) : IsConnected (closure s)

{α : Type u}
[TopologicalSpace α]
{s : Set α}
(H : IsConnected s)


/-- The multicospan associated to `I : MulticospanIndex`. -/
@[simps]
def multicospan : WalkingMulticospan I.fstTo I.sndTo ⥤ C

(I : CategoryTheory.Limits.MulticospanIndex C)

(x : CategoryTheory.Limits.WalkingMulticospan I.fstTo I.sndTo)

I.multicospan.obj x =
  match x with
  | CategoryTheory.Limits.WalkingMulticospan.left a => I.left a
  | CategoryTheory.Limits.WalkingMulticospan.right b => I.right b


@[simp]
theorem coe_mk {f : A →ₗ[R] B} (h h₁) : ((⟨f, h, h₁⟩ : A →ₗc[R] B) : A → B) = f

(h : Coalgebra.counit ∘ₗ f = Coalgebra.counit)

(h₁ : TensorProduct.map f f ∘ₗ Coalgebra.comul = Coalgebra.comul ∘ₗ f)

⇑{ toLinearMap := f, counit_comp := h, map_comp_comul := h₁ } = ⇑f


/-- A product over `s.subtype p` equals one over `s.filter p`. -/
@[to_additive (attr := simp, nolint simpNF)
  "A sum over `s.subtype p` equals one over `s.filter p`."]
theorem prod_subtype_eq_prod_filter (f : α → β) {p : α → Prop} [DecidablePred p] :
    ∏ x ∈ s.subtype p, f x = ∏ x ∈ s.filter p, f x

{α : Type u_3}
{β : Type u_4}
{s : Finset α}
[AddCommMonoid β]
(f : α → β)
{p : α → Prop}
[DecidablePred p]

∑ x ∈ Finset.subtype p s, f ↑x = ∑ x ∈ Finset.filter p s, f x


theorem coordinate_eval_9 :
    (coordinate 9).eval
      (.ofList (a0 :: a1 :: a2 :: a3 :: a4 :: a5 :: a6 :: a7 :: a8 :: a9 :: t)) = a9

{a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 : Int}
{t : List Int}

(Lean.Omega.LinearCombo.coordinate 9).eval
    (Lean.Omega.Coeffs.ofList (a0 :: a1 :: a2 :: a3 :: a4 :: a5 :: a6 :: a7 :: a8 :: a9 :: t)) =
  a9


theorem HasBasis.inf' (hl : l.HasBasis p s) (hl' : l'.HasBasis p' s') :
    (l ⊓ l').HasBasis (fun i : PProd ι ι' => p i.1 ∧ p' i.2) fun i => s i.1 ∩ s' i.2

{α : Type u_1}
{ι : Sort u_4}
{ι' : Sort u_5}
{l l' : Filter α}
{p : ι → Prop}
{s : ι → Set α}
{p' : ι' → Prop}
{s' : ι' → Set α}
(hl : l.HasBasis p s)
(hl' : l'.HasBasis p' s')

(l ⊓ l').HasBasis (fun i => p i.fst ∧ p' i.snd) fun i => s i.fst ∩ s' i.snd


/-- The infimum of `insert a s` is the minimum of `a` and the infimum of `s`, if `s` is
nonempty and bounded below. -/
theorem csInf_insert (hs : BddBelow s) (sne : s.Nonempty) : sInf (insert a s) = a ⊓ sInf s

{α : Type u_1}
[ConditionallyCompleteLattice α]
{s : Set α}
{a : α}
(hs : BddBelow s)
(sne : s.Nonempty)


@[simp]
lemma shiftFunctorAdd_inv_app_obj_of_induced (a b : A) (X : C) :
    letI := HasShift.induced F A s i
    (shiftFunctorAdd D a b).inv.app (F.obj X) =
      (s b).map ((i a).hom.app X) ≫
      (i b).hom.app ((shiftFunctor C a).obj X) ≫
      F.map ((shiftFunctorAdd C a b).inv.app X) ≫
      (i (a + b)).inv.app X

(i : (a : A) → F.comp (s a) ≅ (CategoryTheory.shiftFunctor C a).comp F)

[((CategoryTheory.whiskeringLeft C D D).obj F).Full]

[((CategoryTheory.whiskeringLeft C D D).obj F).Faithful]

(CategoryTheory.shiftFunctorAdd D a b).inv.app (F.obj X) =
  CategoryTheory.CategoryStruct.comp ((s b).map ((i a).hom.app X))
    (CategoryTheory.CategoryStruct.comp ((i b).hom.app ((CategoryTheory.shiftFunctor C a).obj X))
      (CategoryTheory.CategoryStruct.comp (F.map ((CategoryTheory.shiftFunctorAdd C a b).inv.app X))
        ((i (a + b)).inv.app X)))


/-- An equivalent condition for a map of presheaves to be locally surjective
is for all the induced maps on stalks to be surjective. -/
theorem locally_surjective_iff_surjective_on_stalks (T : ℱ ⟶ 𝒢) :
    IsLocallySurjective T ↔ ∀ x : X, Function.Surjective ((stalkFunctor C x).map T)

TopCat.Presheaf.IsLocallySurjective T ↔ ∀ (x : ↑X), Function.Surjective ⇑((TopCat.Presheaf.stalkFunctor C x).map T)


/-- The open sets of an open subscheme corresponds to the open sets containing in the subset. -/
@[simps!]
def opensRestrict :
    Scheme.Opens U ≃ { V : X.Opens // V ≤ U }

{X : AlgebraicGeometry.Scheme}
(U : X.Opens)

∀ (a : { V // V ≤ U }),
  ↑((AlgebraicGeometry.opensRestrict U).symm a) = ⇑U.ι.val.base ⁻¹' ↑↑((Equiv.subtypeEquivProp ⋯).symm a)


Polynomial.Chebyshev.T R 2 = 2 * Polynomial.X ^ 2 - 1


theorem isLocalMinOn_const {b : β} : IsLocalMinOn (fun _ => b) s a

{α : Type u}
{β : Type v}
[TopologicalSpace α]
[Preorder β]
{s : Set α}
{a : α}
{b : β}


theorem curry_le_prod {f : Filter α} {g : Filter β} : f.curry g ≤ f.prod g

{α : Type u_1}
{β : Type u_2}
{f : Filter α}
{g : Filter β}


@[simp]
theorem finsuppTensorFinsuppRid_single_tmul_single (a : ι) (b : κ) (m : M) (r : R) :
    finsuppTensorFinsuppRid R M ι κ (Finsupp.single a m ⊗ₜ[R] Finsupp.single b r) =
      Finsupp.single (a, b) (r • m)

(R : Type u_1)
(M : Type u_3)
(ι : Type u_5)
(κ : Type u_6)
[CommSemiring R]
[AddCommMonoid M]
[Module R M]
(a : ι)
(b : κ)
(m : M)
(r : R)

(finsuppTensorFinsuppRid R M ι κ) (Finsupp.single a m ⊗ₜ[R] Finsupp.single b r) = Finsupp.single (a, b) (r • m)


theorem neg_mul_neg (a b : α) : -a * -b = a * b

{α : Type u}
[Mul α]
[HasDistribNeg α]
(a b : α)


theorem sup_congr_right (ha : a ≤ b ⊔ c) (hb : b ≤ a ⊔ c) : a ⊔ c = b ⊔ c

{α : Type u}
[SemilatticeSup α]
{a b c : α}
(ha : a ≤ b ⊔ c)
(hb : b ≤ a ⊔ c)


theorem algebraMapCLM_coe : ⇑(algebraMapCLM R A) = algebraMap R A

(R : Type u_1)
(A : Type u)
[CommSemiring R]
[Semiring A]
[Algebra R A]
[TopologicalSpace R]
[TopologicalSpace A]
[ContinuousSMul R A]

⇑(algebraMapCLM R A) = ⇑(algebraMap R A)


@[simp] lemma add_modEq_right : a + n ≡ a [MOD n]


protected theorem set_forall_iff {α β} (e : α ≃ β) {p : Set α → Prop} :
    (∀ a, p a) ↔ ∀ a, p (e ⁻¹' a)

{α : Type u_1}
{β : Type u_2}
(e : α ≃ β)
{p : Set α → Prop}

(∀ (a : Set α), p a) ↔ ∀ (a : Set β), p (⇑e ⁻¹' a)


/-- The unoriented angle between two nonzero vectors is the absolute value of the oriented angle,
converted to a real. -/
theorem angle_eq_abs_oangle_toReal {x y : V} (hx : x ≠ 0) (hy : y ≠ 0) :
    InnerProductGeometry.angle x y = |(o.oangle x y).toReal|

[Fact (FiniteDimensional.finrank ℝ V = 2)]


@[simp]
theorem Homeomorph.coe_unitBall_apply_zero :
    (Homeomorph.unitBall (0 : E) : E) = 0

{E : Type u_1}
[SeminormedAddCommGroup E]
[NormedSpace ℝ E]


theorem unitInv_app_inverse (e : C ≌ D) (Y : D) :
    e.unitInv.app (e.inverse.obj Y) = e.inverse.map (e.counit.app Y)

{C : Type u₁}
[CategoryTheory.Category.{v₁, u₁} C]
{D : Type u₂}
[CategoryTheory.Category.{v₂, u₂} D]
(e : C ≌ D)
(Y : D)


/-- The unit for the equivalence `Mon_ (C ⥤ D) ≌ C ⥤ Mon_ D`.
-/
@[simps!]
def unitIso : 𝟭 (Mon_ (C ⥤ D)) ≅ functor ⋙ inverse

{C : Type u₁}
[CategoryTheory.Category.{v₁, u₁} C]
{D : Type u₂}
[CategoryTheory.Category.{v₂, u₂} D]
[CategoryTheory.MonoidalCategory D]
(X : Mon_ (C ⥤ D))

∀ (x : C), (CategoryTheory.Monoidal.MonFunctorCategoryEquivalence.unitIso.inv.app X).hom.app x = 𝟙 (X.X.obj x)


lemma addZ_of_Z_eq_zero_right {P Q : Fin 3 → R} (hQz : Q z = 0) :
    addZ P Q = -(Q x * P z) * P z

{R : Type u}
[CommRing R]
{P Q : Fin 3 → R}
(hQz : Q z = 0)

WeierstrassCurve.Jacobian.addZ P Q = -(Q x * P z) * P z


/-- Given three nonzero vectors, the angle between the first and the third minus the angle
between the second and the third equals the angle between the first and the second. -/
@[simp]
theorem oangle_sub_right {x y z : V} (hx : x ≠ 0) (hy : y ≠ 0) (hz : z ≠ 0) :
    o.oangle x z - o.oangle y z = o.oangle x y


@[to_additive]
theorem bot_eq_one : (⊥ : α) = 1

{α : Type u}
[CanonicallyOrderedCommMonoid α]


theorem card_functions_sum_skolem₁ :
    #(Σ n, (L.sum L.skolem₁).Functions n) = #(Σ n, L.BoundedFormula Empty (n + 1))

Cardinal.mk ((n : ℕ) × (L.sum L.skolem₁).Functions n) = Cardinal.mk ((n : ℕ) × L.BoundedFormula Empty (n + 1))


/--
A constructor for chain maps between `α`-indexed cochain complexes built using `CochainComplex.of`,
from a dependently typed collection of morphisms.
-/
@[simps]
def ofHom (f : ∀ i : α, X i ⟶ Y i) (comm : ∀ i : α, f i ≫ d_Y i = d_X i ≫ f (i + 1)) :
    of X d_X sq_X ⟶ of Y d_Y sq_Y

(comm : ∀ (i : α), f i ≫ d_Y i = d_X i ≫ f (i + 1))

(CochainComplex.ofHom X d_X sq_X Y d_Y sq_Y f comm).f i = f i


/-- Pre-composition by a *fixed* continuous linear map as a continuous linear map.
Note that in non-normed space it is not always true that composition is continuous
in both variables, so we have to fix one of them. -/
@[simps]
def precomp [TopologicalAddGroup G] [ContinuousConstSMul 𝕜₃ G] [RingHomSurjective σ]
    [RingHomIsometric σ] (L : E →SL[σ] F) : (F →SL[τ] G) →L[𝕜₃] E →SL[ρ] G

{𝕜₁ : Type u_1}
{𝕜₂ : Type u_2}
{𝕜₃ : Type u_3}
[NormedField 𝕜₁]
[NormedField 𝕜₂]
[NormedField 𝕜₃]
{σ : 𝕜₁ →+* 𝕜₂}
{τ : 𝕜₂ →+* 𝕜₃}
{ρ : 𝕜₁ →+* 𝕜₃}
[RingHomCompTriple σ τ ρ]
{E : Type u_4}
{F : Type u_5}
(G : Type u_6)
[AddCommGroup E]
[Module 𝕜₁ E]
[AddCommGroup F]
[Module 𝕜₂ F]
[AddCommGroup G]
[Module 𝕜₃ G]
[TopologicalSpace E]
[TopologicalSpace F]
[TopologicalSpace G]
[TopologicalAddGroup G]
[ContinuousConstSMul 𝕜₃ G]
[RingHomSurjective σ]
[RingHomIsometric σ]
(L : E →SL[σ] F)
(f : F →SL[τ] G)

(ContinuousLinearMap.precomp G L) f = f.comp L


/-- If `Fₙ` tends uniformly to `f` on a set `s`, and `gₙ` tends to `x` within `s`, then `Fₙ gₙ`
tends to `f x` if `f` is continuous at `x` within `s`. -/
theorem TendstoUniformlyOn.tendsto_comp (h : TendstoUniformlyOn F f p s)
    (hf : ContinuousWithinAt f s x) (hg : Tendsto g p (𝓝[s] x)) :
    Tendsto (fun n => F n (g n)) p (𝓝 (f x))

{α : Type u}
{β : Type v}
{ι : Type x}
[UniformSpace β]
{F : ι → α → β}
{f : α → β}
{s : Set α}
{x : α}
{p : Filter ι}
{g : ι → α}
[TopologicalSpace α]
(h : TendstoUniformlyOn F f p s)
(hf : ContinuousWithinAt f s x)
(hg : Filter.Tendsto g p (𝓝[s] x))

Filter.Tendsto (fun n => F n (g n)) p (𝓝 (f x))


/-- The generator we chose for the annihilating ideal is monic when the ideal is non-zero. -/
theorem monic_annIdealGenerator (a : A) (hg : annIdealGenerator 𝕜 a ≠ 0) :
    Monic (annIdealGenerator 𝕜 a)

(hg : Polynomial.annIdealGenerator 𝕜 a ≠ 0)


/-- The functor constructed with `copyObj` is isomorphic to the given functor. -/
@[simps!]
def isoCopyObj : F ≅ F.copyObj obj e

{C : Type u₁}
[CategoryTheory.Category.{v₁, u₁} C]
{D : Type u₂}
[CategoryTheory.Category.{v₂, u₂} D]
(F : C ⥤ D)
(obj : C → D)
(e : (X : C) → F.obj X ≅ obj X)
(X : C)

(F.isoCopyObj obj e).inv.app X = (e X).inv


theorem sign_one : sign (1 : Perm α) = 1

{α : Type u}
[DecidableEq α]
[Fintype α]


theorem boxProd_neighborSet (x : α × β) :
    (G □ H).neighborSet x = G.neighborSet x.1 ×ˢ {x.2} ∪ {x.1} ×ˢ H.neighborSet x.2

{α : Type u_1}
{β : Type u_2}
{G : SimpleGraph α}
{H : SimpleGraph β}
(x : α × β)


/-- A linear map `f` applied to `x : ι → R` can be computed using the image under `f` of elements
of the canonical basis. -/
theorem pi_apply_eq_sum_univ [Fintype ι] [DecidableEq ι] (f : (ι → R) →ₗ[R] M₂) (x : ι → R) :
    f x = ∑ i, x i • f fun j => if i = j then 1 else 0

{R : Type u}
{M₂ : Type w}
{ι : Type x}
[Semiring R]
[AddCommMonoid M₂]
[Module R M₂]
[Fintype ι]
[DecidableEq ι]
(f : (ι → R) →ₗ[R] M₂)
(x : ι → R)

f x = ∑ i : ι, x i • f fun j => if i = j then 1 else 0


/-- Typeclass for scalar multiplication that preserves `0` on the right. -/
class SMulZeroClass (M A : Type*) [Zero A] extends SMul M A where
  /-- Multiplying `0` by a scalar gives `0` -/
  smul_zero : ∀ a : M, a • (0 : A) = 0

{M : Type u_10}
{A : Type u_11}
[Zero A]
[self : SMulZeroClass M A]
(a : M)


@[simp] lemma mem_piAntidiag : f ∈ piAntidiag s n ↔ s.sum f = n ∧ ∀ i, f i ≠ 0 → i ∈ s

{ι : Type u_1}
{μ : Type u_2}
[DecidableEq ι]
[AddCommMonoid μ]
[Finset.HasAntidiagonal μ]
[DecidableEq μ]
{s : Finset ι}
{n : μ}
{f : ι → μ}

f ∈ s.piAntidiag n ↔ s.sum f = n ∧ ∀ (i : ι), f i ≠ 0 → i ∈ s


theorem volume_def : (volume : Measure I) = volume.comap Subtype.val

MeasureTheory.volume = MeasureTheory.Measure.comap Subtype.val MeasureTheory.volume


/-- A characterisation of the span of a family of submodules.

See also `Submodule.mem_iSup_iff_exists_finsupp`. -/
theorem mem_iSup_iff_exists_dfinsupp (p : ι → Submodule R N) (x : N) :
    x ∈ iSup p ↔
      ∃ f : Π₀ i, p i, DFinsupp.lsum ℕ (M := fun i ↦ ↥(p i)) (fun i => (p i).subtype) f = x

{ι : Type u_1}
{R : Type u_2}
{N : Type u_5}
[Semiring R]
[AddCommMonoid N]
[Module R N]
[DecidableEq ι]
(p : ι → Submodule R N)
(x : N)

x ∈ iSup p ↔ ∃ f, ((DFinsupp.lsum ℕ) fun i => (p i).subtype) f = x


@[scoped simp]
theorem map_sub_int' [AddGroupWithOne G] [AddGroup H] [AddConstMapClass F G H 1 b]
    (f : F) (x : G) (n : ℤ) : f (x - n) = f x - n • b

{F : Type u_1}
{G : Type u_2}
{H : Type u_3}
[FunLike F G H]
{b : H}
[AddGroupWithOne G]
[AddGroup H]
[AddConstMapClass F G H 1 b]
(f : F)
(x : G)
(n : ℤ)


theorem smooth_barycentric_coord (b : AffineBasis ι 𝕜 E) (i : ι) : ContDiff 𝕜 ⊤ (b.coord i)

{ι : Type u_1}
{𝕜 : Type u_2}
{E : Type u_3}
[NontriviallyNormedField 𝕜]
[CompleteSpace 𝕜]
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
[FiniteDimensional 𝕜 E]
(b : AffineBasis ι 𝕜 E)
(i : ι)


theorem sSup_inf_eq : sSup s ⊓ b = ⨆ a ∈ s, a ⊓ b

{α : Type u}
[Order.Frame α]
{s : Set α}
{b : α}


@[simp]
lemma whiskerLeftIso_trans (W : C) {X Y Z : C} (f : X ≅ Y) (g : Y ≅ Z) :
    whiskerLeftIso W (f ≪≫ g) = whiskerLeftIso W f ≪≫ whiskerLeftIso W g

{C : Type u}
[𝒞 : CategoryTheory.Category.{v, u} C]
[CategoryTheory.MonoidalCategory C]
(W : C)
{X Y Z : C}
(f : X ≅ Y)
(g : Y ≅ Z)

CategoryTheory.MonoidalCategory.whiskerLeftIso W (f ≪≫ g) =
  CategoryTheory.MonoidalCategory.whiskerLeftIso W f ≪≫ CategoryTheory.MonoidalCategory.whiskerLeftIso W g


/-- If a permutation `f ∘ σ` of the tuple `f` is not the same as `f ∘ sort f`, then `f ∘ σ`
has a pair of strictly decreasing entries. -/
theorem antitone_pair_of_not_sorted' (h : f ∘ σ ≠ f ∘ sort f) :
    ∃ i j, i < j ∧ (f ∘ σ) j < (f ∘ σ) i

{n : ℕ}
{α : Type u_1}
[LinearOrder α]
{f : Fin n → α}
{σ : Equiv.Perm (Fin n)}
(h : f ∘ ⇑σ ≠ f ∘ ⇑(Tuple.sort f))


/-- The empty set is a block -/
theorem isBlock_empty : IsBlock G (⊥ : Set X)

{G : Type u_1}
(X : Type u_2)
[SMul G X]


theorem pi_univ_Ioi_subset [Nonempty ι]: (pi univ fun i ↦ Ioi (x i)) ⊆ Ioi x

{ι : Type u_1}
{α : ι → Type u_2}
[(i : ι) → Preorder (α i)]
(x : (i : ι) → α i)
[Nonempty ι]

(Set.univ.pi fun i => Set.Ioi (x i)) ⊆ Set.Ioi x


theorem average_mem_openSegment_compl_self [IsFiniteMeasure μ] {f : α → E} {s : Set α}
    (hs : NullMeasurableSet s μ) (hs₀ : μ s ≠ 0) (hsc₀ : μ sᶜ ≠ 0) (hfi : Integrable f μ) :
    ⨍ x, f x ∂μ ∈ openSegment ℝ (⨍ x in s, f x ∂μ) (⨍ x in sᶜ, f x ∂μ)

(hs : MeasureTheory.NullMeasurableSet s μ)

⨍ (x : α), f x ∂μ ∈ openSegment ℝ (⨍ (x : α) in s, f x ∂μ) (⨍ (x : α) in sᶜ, f x ∂μ)


theorem ofFractionRing_inv (p : FractionRing K[X]) :
    ofFractionRing p⁻¹ = (ofFractionRing p)⁻¹

{K : Type u}
[CommRing K]
[IsDomain K]
(p : FractionRing K[X])

{ toFractionRing := p⁻¹ } = { toFractionRing := p }⁻¹


/-- One implication of the portmanteau theorem:
Assuming that for all Borel sets E whose boundary ∂E carries no probability mass under a
candidate limit probability measure μ we have convergence of the measures μsᵢ(E) to μ(E),
then for all closed sets F we have the limsup condition limsup μsᵢ(F) ≤ μ(F). -/
lemma limsup_measure_closed_le_of_forall_tendsto_measure
    {Ω ι : Type*} {L : Filter ι} [NeBot L]
    [MeasurableSpace Ω] [PseudoEMetricSpace Ω] [OpensMeasurableSpace Ω]
    {μ : Measure Ω} [IsFiniteMeasure μ] {μs : ι → Measure Ω}
    (h : ∀ {E : Set Ω}, MeasurableSet E → μ (frontier E) = 0 →
            Tendsto (fun i ↦ μs i E) L (𝓝 (μ E)))
    (F : Set Ω) (F_closed : IsClosed F) :
    L.limsup (fun i ↦ μs i F) ≤ μ F

(h : ∀ {E : Set Ω}, MeasurableSet E → μ (frontier E) = 0 → Filter.Tendsto (fun i => (μs i) E) L (𝓝 (μ E)))

Filter.limsup (fun i => (μs i) F) L ≤ μ F


@[simp]
theorem floor_sub_ofNat [Sub α] [OrderedSub α] [ExistsAddOfLE α] (a : α) (n : ℕ) [n.AtLeastTwo] :
    ⌊a - (no_index (OfNat.ofNat n))⌋₊ = ⌊a⌋₊ - OfNat.ofNat n

{α : Type u_2}
[LinearOrderedSemiring α]
[FloorSemiring α]
[Sub α]
[OrderedSub α]
[ExistsAddOfLE α]
(a : α)
(n : ℕ)
[n.AtLeastTwo]

⌊a - OfNat.ofNat n⌋₊ = ⌊a⌋₊ - OfNat.ofNat n


@[simp]
theorem coe_add : ⇑(f + g) = ⇑f + ⇑g

{R : Type u_1}
{M : Type u_2}
{N : Type u_4}
{ι : Type u_6}
[Semiring R]
[AddCommMonoid M]
[Module R M]
[TopologicalSpace M]
[AddCommMonoid N]
[Module R N]
[TopologicalSpace N]
(f g : M [⋀^ι]→L[R] N)
[ContinuousAdd N]


@[to_additive (attr := simp)]
theorem fst_mul [Mul M] [Mul N] (p q : M × N) : (p * q).1 = p.1 * q.1

{M : Type u_5}
{N : Type u_6}
[Mul M]
[Mul N]
(p q : M × N)


/-- The natural isomorphism of `G`-sets `Gⁿ⁺¹ ≅ G × Gⁿ`, where `G` acts by left multiplication on
each factor. -/
@[simps!]
noncomputable def diagonalSucc (G : Type u) [Monoid G] (n : ℕ) :
    diagonal G (n + 1) ≅ leftRegular G ⊗ diagonal G n

∀ (a : (CategoryTheory.MonoidalCategory.tensorObj (Action.leftRegular G) (Action.diagonal G n)).V),
  (Action.diagonalSucc G n).inv.hom a = (Equiv.piFinSuccAbove (fun a => G) 0).symm a


theorem curry_id_eq_coev : curry (𝟙 _) = (ihom.coev A).app X

{C : Type u}
[CategoryTheory.Category.{v, u} C]
[CategoryTheory.MonoidalCategory C]
(A X : C)
[CategoryTheory.Closed A]

CategoryTheory.MonoidalClosed.curry
    (CategoryTheory.CategoryStruct.id
      (CategoryTheory.MonoidalCategory.tensorObj A ((CategoryTheory.Functor.id C).obj X))) =
  (CategoryTheory.ihom.coev A).app X


theorem strictMono_rpow_of_pos {z : ℝ} (h : 0 < z) : StrictMono fun x : ℝ≥0 => x ^ z


theorem Valid'.of_gt {t : Ordnode α} {x : α} {o₁ o₂} (H : Valid' o₁ t o₂) (h₁ : Bounded nil x o₂)
    (h₂ : All (· > x) t) : Valid' x t o₂

(h₂ : Ordnode.All (fun x_1 => x_1 > x) t)


@[simp]
theorem domLCongr_refl : Finsupp.domLCongr (Equiv.refl α) = LinearEquiv.refl R (α →₀ M)

{α : Type u_1}
{M : Type u_2}
{R : Type u_5}
[Semiring R]
[AddCommMonoid M]
[Module R M]


/--
A typeclass describing the property that forming all explicit pullbacks is stable under the
property `P`.
-/
class HasExplicitPullbacks : Prop where
  hasProp {X Y B : CompHausLike P} (f : X ⟶ B) (g : Y ⟶ B) : HasExplicitPullback f g

[self : CompHausLike.HasExplicitPullbacks P]


theorem append_inj_right (h : s₁ ++ t₁ = s₂ ++ t₂) (hl : length s₁ = length s₂) : t₁ = t₂

∀ {α : Type u_1} {s₁ t₁ s₂ t₂ : List α}, s₁ ++ t₁ = s₂ ++ t₂ → s₁.length = s₂.length → t₁ = t₂


/-- The product of two non-null sets is null measurable
if and only if both of them are null measurable. -/
lemma nullMeasurableSet_prod_of_ne_zero {s : Set α} {t : Set β} (hs : μ s ≠ 0) (ht : ν t ≠ 0) :
    NullMeasurableSet (s ×ˢ t) (μ.prod ν) ↔ NullMeasurableSet s μ ∧ NullMeasurableSet t ν

{α : Type u_1}
{β : Type u_3}
[MeasurableSpace α]
[MeasurableSpace β]
{μ : MeasureTheory.Measure α}
{ν : MeasureTheory.Measure β}
[MeasureTheory.SFinite ν]
[MeasureTheory.SFinite μ]
{s : Set α}
{t : Set β}
(hs : μ s ≠ 0)
(ht : ν t ≠ 0)

MeasureTheory.NullMeasurableSet (s ×ˢ t) (μ.prod ν) ↔
  MeasureTheory.NullMeasurableSet s μ ∧ MeasureTheory.NullMeasurableSet t ν


@[simp]
theorem set_smul_top_eq_span (s : Set R) :
    s • ⊤ = Ideal.span s

{R : Type u}
[CommSemiring R]
(s : Set R)


theorem Spec.toPresheafedSpace_map_op (R S : CommRingCat.{u}) (f : R ⟶ S) :
    Spec.toPresheafedSpace.map f.op = Spec.sheafedSpaceMap f

AlgebraicGeometry.Spec.toPresheafedSpace.map f.op = AlgebraicGeometry.Spec.sheafedSpaceMap f


/-- Like `MultilinearMap.domCoprod`, but ensures the result is also alternating.

Note that this is usually defined (for instance, as used in Proposition 22.24 in [Gallier2011Notes])
over integer indices `ιa = Fin n` and `ιb = Fin m`, as
$$
(f \wedge g)(u_1, \ldots, u_{m+n}) =
  \sum_{\operatorname{shuffle}(m, n)} \operatorname{sign}(\sigma)
    f(u_{\sigma(1)}, \ldots, u_{\sigma(m)}) g(u_{\sigma(m+1)}, \ldots, u_{\sigma(m+n)}),
$$
where $\operatorname{shuffle}(m, n)$ consists of all permutations of $[1, m+n]$ such that
$\sigma(1) < \cdots < \sigma(m)$ and $\sigma(m+1) < \cdots < \sigma(m+n)$.

Here, we generalize this by replacing:
* the product in the sum with a tensor product
* the filtering of $[1, m+n]$ to shuffles with an isomorphic quotient
* the additions in the subscripts of $\sigma$ with an index of type `Sum`

The specialized version can be obtained by combining this definition with `finSumFinEquiv` and
`LinearMap.mul'`.
-/
@[simps]
def domCoprod (a : Mᵢ [⋀^ιa]→ₗ[R'] N₁) (b : Mᵢ [⋀^ιb]→ₗ[R'] N₂) :
    Mᵢ [⋀^ιa ⊕ ιb]→ₗ[R'] (N₁ ⊗[R'] N₂)

{ιa : Type u_1}
{ιb : Type u_2}
[Fintype ιa]
[Fintype ιb]
{R' : Type u_3}
{Mᵢ : Type u_4}
{N₁ : Type u_5}
{N₂ : Type u_6}
[CommSemiring R']
[AddCommGroup N₁]
[Module R' N₁]
[AddCommGroup N₂]
[Module R' N₂]
[AddCommMonoid Mᵢ]
[Module R' Mᵢ]
[DecidableEq ιa]
[DecidableEq ιb]
(a : Mᵢ [⋀^ιa]→ₗ[R'] N₁)
(b : Mᵢ [⋀^ιb]→ₗ[R'] N₂)
(v : ιa ⊕ ιb → Mᵢ)

(a.domCoprod b) v = (∑ σ : Equiv.Perm.ModSumCongr ιa ιb, AlternatingMap.domCoprod.summand a b σ) v


@[simp]
theorem extendDomain_single (a : Subtype P) (m : M) :
    (single a m).extendDomain = single a.val m

{α : Type u_1}
{M : Type u_13}
[Zero M]
{P : α → Prop}
[DecidablePred P]
(a : Subtype P)
(m : M)

(Finsupp.single a m).extendDomain = Finsupp.single (↑a) m


/-- If a continuous linear map is a topology embedding, then it is expands the distances
by a positive factor. -/
theorem antilipschitz_of_embedding (f : E →L[𝕜] Fₗ) (hf : Embedding f) :
    ∃ K, AntilipschitzWith K f

{𝕜 : Type u_1}
{E : Type u_4}
{Fₗ : Type u_7}
[NormedAddCommGroup E]
[NormedAddCommGroup Fₗ]
[NontriviallyNormedField 𝕜]
[NormedSpace 𝕜 E]
[NormedSpace 𝕜 Fₗ]
(f : E →L[𝕜] Fₗ)
(hf : Embedding ⇑f)


theorem inv_logb_div_base {a b : ℝ} (h₁ : a ≠ 0) (h₂ : b ≠ 0) (c : ℝ) :
    (logb (a / b) c)⁻¹ = (logb a c)⁻¹ - (logb b c)⁻¹

(Real.logb (a / b) c)⁻¹ = (Real.logb a c)⁻¹ - (Real.logb b c)⁻¹


lemma IsMeasurableRatCDF.tendsto_stieltjesFunction_atTop (a : α) :
    Tendsto (hf.stieltjesFunction a) atTop (𝓝 1)

{f : α → ℚ → ℝ}

(hf : ProbabilityTheory.IsMeasurableRatCDF f)

Filter.Tendsto (↑(hf.stieltjesFunction a)) Filter.atTop (𝓝 1)


theorem coeff_map (p : MvPolynomial σ R) : ∀ m : σ →₀ ℕ, coeff m (map f p) = f (coeff m p)

{R : Type u}
{S₁ : Type v}
{σ : Type u_1}
[CommSemiring R]
[CommSemiring S₁]
(f : R →+* S₁)
(p : MvPolynomial σ R)
(m : σ →₀ ℕ)

MvPolynomial.coeff m ((MvPolynomial.map f) p) = f (MvPolynomial.coeff m p)


@[to_additive]
theorem Filter.Tendsto.smul {f : α → M} {g : α → X} {l : Filter α} {c : M} {a : X}
    (hf : Tendsto f l (𝓝 c)) (hg : Tendsto g l (𝓝 a)) :
    Tendsto (fun x => f x • g x) l (𝓝 <| c • a)

{M : Type u_1}
{X : Type u_2}
{α : Type u_4}
[TopologicalSpace M]
[TopologicalSpace X]
[SMul M X]
[ContinuousSMul M X]
{f : α → M}
{g : α → X}
{l : Filter α}
{c : M}
{a : X}
(hf : Filter.Tendsto f l (𝓝 c))
(hg : Filter.Tendsto g l (𝓝 a))

Filter.Tendsto (fun x => f x • g x) l (𝓝 (c • a))


/-- A functor `F : C ⥤ D` which commutes with shift functors on `C` and `D` and preserves zero
morphisms can be lifted to a functor `DifferentialObject S C ⥤ DifferentialObject S D`. -/
@[simps]
def mapDifferentialObject (F : C ⥤ D)
    (η : (shiftFunctor C (1 : S)).comp F ⟶ F.comp (shiftFunctor D (1 : S)))
    (hF : ∀ c c', F.map (0 : c ⟶ c') = 0) : DifferentialObject S C ⥤ DifferentialObject S D

(η : (CategoryTheory.shiftFunctor C 1).comp F ⟶ F.comp (CategoryTheory.shiftFunctor D 1))

∀ {X Y : CategoryTheory.DifferentialObject S C} (f : X ⟶ Y),
  ((CategoryTheory.Functor.mapDifferentialObject D F η hF).map f).f = F.map f.f


theorem map_id_apply (x : FreeAbelianGroup α) : map id x = x


theorem IndepFun.cgf_add {X Y : Ω → ℝ} (h_indep : IndepFun X Y μ)
    (h_int_X : Integrable (fun ω => exp (t * X ω)) μ)
    (h_int_Y : Integrable (fun ω => exp (t * Y ω)) μ) :
    cgf (X + Y) μ t = cgf X μ t + cgf Y μ t

(h_indep : ProbabilityTheory.IndepFun X Y μ)

(h_int_X : MeasureTheory.Integrable (fun ω => rexp (t * X ω)) μ)

(h_int_Y : MeasureTheory.Integrable (fun ω => rexp (t * Y ω)) μ)

ProbabilityTheory.cgf (X + Y) μ t = ProbabilityTheory.cgf X μ t + ProbabilityTheory.cgf Y μ t


@[simp]
theorem image_union_image_compl_eq_range (f : α → β) : f '' s ∪ f '' sᶜ = range f

{α : Type u_1}
{β : Type u_2}
{s : Set α}
(f : α → β)


@[simp]
theorem coe_mk (f : R →* R') (hf) : (MulChar.mk f hf : R → R') = f

(hf : ∀ (a : R), ¬IsUnit a → (↑f).toFun a = 0)

⇑{ toMonoidHom := f, map_nonunit' := hf } = ⇑f


@[simp, norm_cast]
theorem coe_intCast (n : ℕ) : (↑(n : R) : c.Quotient) = n

{R : Type u_2}
[AddGroupWithOne R]
[Mul R]
(c : RingCon R)
(n : ℕ)


/-- Every element in the adic completion is represented by a Cauchy sequence. -/
theorem mk_surjective : Function.Surjective (mk I M)

{R : Type u_1}
[CommRing R]
(I : Ideal R)
(M : Type u_2)
[AddCommGroup M]
[Module R M]

Function.Surjective ⇑(AdicCompletion.mk I M)


/-- If `f` has a formal power series at x bounded by `1`, then `f` is constant equal
to `f x` in a neighborhood of `x`. -/
theorem HasFiniteFPowerSeriesAt.eventually_const_of_bound_one
    (hf : HasFiniteFPowerSeriesAt f pf x 1) : f =ᶠ[𝓝 x] (fun _ => f x)

{𝕜 : Type u_1}
{E : Type u_2}
{F : Type u_3}
[NontriviallyNormedField 𝕜]
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{f : E → F}
{pf : FormalMultilinearSeries 𝕜 E F}
{x : E}
(hf : HasFiniteFPowerSeriesAt f pf x 1)


@[to_additive]
theorem Pi.mulSingle_mul [∀ i, MulOneClass <| f i] (i : I) (x y : f i) :
    mulSingle i (x * y) = mulSingle i x * mulSingle i y

{I : Type u}
{f : I → Type v}
[DecidableEq I]
[(i : I) → MulOneClass (f i)]
(i : I)
(x y : f i)

Pi.mulSingle i (x * y) = Pi.mulSingle i x * Pi.mulSingle i y


/-- `HomOrthogonal.MatrixDecomposition` as an `R`-linear equivalence. -/
@[simps]
noncomputable def matrixDecompositionLinearEquiv (o : HomOrthogonal s) {α β : Type} [Finite α]
    [Finite β] {f : α → ι} {g : β → ι} :
    ((⨁ fun a => s (f a)) ⟶ ⨁ fun b => s (g b)) ≃ₗ[R]
      ∀ i : ι, Matrix (g ⁻¹' {i}) (f ⁻¹' {i}) (End (s i))

∀ (a : (i : ι) → Matrix (↑(g ⁻¹' {i})) (↑(f ⁻¹' {i})) (CategoryTheory.End (s i))),
  o.matrixDecompositionLinearEquiv.symm a = o.matrixDecompositionAddEquiv.invFun a


theorem preimage_real_toNNReal (h : t.OrdConnected) : (Real.toNNReal ⁻¹' t).OrdConnected


lemma continuousOn_cosKernel (a : UnitAddCircle) : ContinuousOn (cosKernel a) (Ioi 0)

ContinuousOn (HurwitzZeta.cosKernel a) (Set.Ioi 0)


theorem IsOrtho.zero_right (x : M) : IsOrtho Q x (0 : M)

{R : Type u_3}
{M : Type u_4}
{N : Type u_5}
[CommSemiring R]
[AddCommMonoid M]
[Module R M]
[AddCommMonoid N]
[Module R N]
{Q : QuadraticMap R M N}
(x : M)


theorem aemeasurable_const' (h : ∀ᵐ (x) (y) ∂μ, f x = f y) : AEMeasurable f μ

{α : Type u_2}
{β : Type u_3}
{m0 : MeasurableSpace α}
[MeasurableSpace β]
{f : α → β}
{μ : MeasureTheory.Measure α}
(h : ∀ᵐ (x : α) (y : α) ∂μ, f x = f y)


/-- The isomorphism `K.total c₁₂ ≅ L.total c₁₂` of homological complexes induced
by an isomorphism of bicomplexes `K ≅ L`. -/
@[simps]
noncomputable def mapIso : K.total c₁₂ ≅ L.total c₁₂

{C : Type u_1}
[CategoryTheory.Category.{u_5, u_1} C]
[CategoryTheory.Preadditive C]
{I₁ : Type u_2}
{I₂ : Type u_3}
{I₁₂ : Type u_4}
{c₁ : ComplexShape I₁}
{c₂ : ComplexShape I₂}
{K L : HomologicalComplex₂ C c₁ c₂}
(e : K ≅ L)
(c₁₂ : ComplexShape I₁₂)
[DecidableEq I₁₂]
[TotalComplexShape c₁ c₂ c₁₂]
[K.HasTotal c₁₂]
[L.HasTotal c₁₂]

(HomologicalComplex₂.total.mapIso e c₁₂).hom = HomologicalComplex₂.total.map e.hom c₁₂


theorem mem_adjoin_iff {s : Set A} {x : A} :
    x ∈ adjoin R s ↔ x ∈ Subring.closure (Set.range (algebraMap R A) ∪ s)

{R : Type uR}
{A : Type uA}
[CommRing R]
[Ring A]
[Algebra R A]
{s : Set A}
{x : A}

x ∈ Algebra.adjoin R s ↔ x ∈ Subring.closure (Set.range ⇑(algebraMap R A) ∪ s)


theorem isIso_of_components (f : C₁ ⟶ C₂) [∀ n : ι, IsIso (f.f n)] : IsIso f

[∀ (n : ι), CategoryTheory.IsIso (f.f n)]


/-- To check convex independence, one only has to check finsets thanks to Carathéodory's theorem. -/
theorem convexIndependent_iff_finset {p : ι → E} :
    ConvexIndependent 𝕜 p ↔
      ∀ (s : Finset ι) (x : ι), p x ∈ convexHull 𝕜 (s.image p : Set E) → x ∈ s

{𝕜 : Type u_1}
{E : Type u_2}
{ι : Type u_3}
[LinearOrderedField 𝕜]
[AddCommGroup E]
[Module 𝕜 E]
{p : ι → E}

ConvexIndependent 𝕜 p ↔ ∀ (s : Finset ι) (x : ι), p x ∈ (convexHull 𝕜) ↑(Finset.image p s) → x ∈ s


lemma pullback_ofObjects_eq_top
    {I : Type*} (Y : I → C) {X : C} {i : I} (g : X ⟶ Y i) :
    ofObjects Y X = ⊤

{C : Type u₁}
[CategoryTheory.Category.{v₁, u₁} C]
{I : Type u_1}
(Y : I → C)
{X : C}
{i : I}
(g : X ⟶ Y i)


theorem mk_smul_mk (r : R) (m : M) (s t : S) :
    Localization.mk r s • mk m t = mk (r • m) (s * t)

{R : Type u}
[CommSemiring R]
{S : Submonoid R}
{M : Type v}
[AddCommMonoid M]
[Module R M]
(r : R)
(m : M)
(s t : ↥S)

Localization.mk r s • LocalizedModule.mk m t = LocalizedModule.mk (r • m) (s * t)


/-- Composition of functions on pseudoelements is composition of morphisms. -/
theorem comp_comp {P Q R : C} (f : P ⟶ Q) (g : Q ⟶ R) : g ∘ f = f ≫ g

{C : Type u}
[CategoryTheory.Category.{v, u} C]
[CategoryTheory.Abelian C]
{P Q R : C}
(f : P ⟶ Q)
(g : Q ⟶ R)

CategoryTheory.Abelian.Pseudoelement.pseudoApply g ∘ CategoryTheory.Abelian.Pseudoelement.pseudoApply f =
  CategoryTheory.Abelian.Pseudoelement.pseudoApply (f ≫ g)


theorem encard_eq_two : s.encard = 2 ↔ ∃ x y, x ≠ y ∧ s = {x, y}


/-- The inclusion functor from sheaves to presheaves. -/
@[simps]
def sheafOfTypesToPresheaf : SheafOfTypes J ⥤ Cᵒᵖ ⥤ Type w

(J : CategoryTheory.GrothendieckTopology C)

(CategoryTheory.sheafOfTypesToPresheaf J).obj self = self.val


@[simp]
theorem openEmbedding_obj_top {X : TopCat} (U : Opens X) :
    U.openEmbedding.isOpenMap.functor.obj ⊤ = U

{X : TopCat}
(U : TopologicalSpace.Opens ↑X)


@[simp]
theorem trailingDegree_neg (p : R[X]) : trailingDegree (-p) = trailingDegree p


/-- The equivalence between isomorphisms in `CompHaus` and homeomorphisms
of topological spaces. -/
@[simps]
def isoEquivHomeo {X Y : CompHausLike.{u} P} : (X ≅ Y) ≃ (X ≃ₜ Y)

{P : TopCat → Prop}
{X Y : CompHausLike P}
(f : ↑X.toTop ≃ₜ ↑Y.toTop)

CompHausLike.isoEquivHomeo.symm f = CompHausLike.isoOfHomeo f


/-- Finite product of finite sets is finite. Note this is a variant of `Set.Finite.pi` without the
extra `i ∈ univ` binder. -/
lemma Finite.pi' (ht : ∀ i, (t i).Finite) : {f : ∀ i, κ i | ∀ i, f i ∈ t i}.Finite

{ι : Type u_1}
[Finite ι]
{κ : ι → Type u_2}
{t : (i : ι) → Set (κ i)}
(ht : ∀ (i : ι), (t i).Finite)


@[to_additive]
theorem singleton_mul_ball : {x} * ball y δ = ball (x * y) δ

{E : Type u_1}
[SeminormedAddCommGroup E]
(δ : ℝ)
(x y : E)

{x} + Metric.ball y δ = Metric.ball (x + y) δ


theorem testBit_two_pow_of_ne {n m : ℕ} (hm : n ≠ m) : testBit (2 ^ n) m = false


/-- A compact element `k` has the property that any `b < k` lies below a "maximal element below
`k`", which is to say `[⊥, k]` is coatomic. -/
theorem Iic_coatomic_of_compact_element {k : α} (h : IsCompactElement k) :
    IsCoatomic (Set.Iic k)

(h : CompleteLattice.IsCompactElement k)


lemma MonotoneOn.image_Icc_subset (h : MonotoneOn f (Icc a b)) : f '' Icc a b ⊆ Icc (f a) (f b)

{α : Type u_1}
{β : Type u_2}
{f : α → β}
[Preorder α]
[Preorder β]
{a b : α}
(h : MonotoneOn f (Set.Icc a b))


theorem basisSets_intersect (U V : Set E) (hU : U ∈ p.basisSets) (hV : V ∈ p.basisSets) :
    ∃ z ∈ p.basisSets, z ⊆ U ∩ V

{𝕜 : Type u_1}
{E : Type u_5}
{ι : Type u_8}
[NormedField 𝕜]
[AddCommGroup E]
[Module 𝕜 E]
(p : SeminormFamily 𝕜 E ι)
(U V : Set E)
(hU : U ∈ p.basisSets)
(hV : V ∈ p.basisSets)


theorem ContMDiffOn.clm_prodMap {g : M → F₁ →L[𝕜] F₃} {f : M → F₂ →L[𝕜] F₄} {s : Set M}
    (hg : ContMDiffOn I 𝓘(𝕜, F₁ →L[𝕜] F₃) n g s) (hf : ContMDiffOn I 𝓘(𝕜, F₂ →L[𝕜] F₄) n f s) :
    ContMDiffOn I 𝓘(𝕜, F₁ × F₂ →L[𝕜] F₃ × F₄) n (fun x => (g x).prodMap (f x)) s


@[simp]
theorem mem_map {f : P₁ →ᵃ[k] P₂} {x : P₂} {s : AffineSubspace k P₁} :
    x ∈ s.map f ↔ ∃ y ∈ s, f y = x

{k : Type u_1}
{V₁ : Type u_2}
{P₁ : Type u_3}
{V₂ : Type u_4}
{P₂ : Type u_5}
[Ring k]
[AddCommGroup V₁]
[Module k V₁]
[AffineSpace V₁ P₁]
[AddCommGroup V₂]
[Module k V₂]
[AffineSpace V₂ P₂]
{f : P₁ →ᵃ[k] P₂}
{x : P₂}
{s : AffineSubspace k P₁}

x ∈ AffineSubspace.map f s ↔ ∃ y ∈ s, f y = x


@[to_additive]
theorem mclosure_subset {s : Set G} : Monoid.Closure s ⊆ closure s

AddMonoid.Closure s ⊆ AddGroup.closure s


theorem mem_sInf {S : Set (Subfield K)} {x : K} : x ∈ sInf S ↔ ∀ p ∈ S, x ∈ p

{K : Type u}
[DivisionRing K]
{S : Set (Subfield K)}
{x : K}


@[measurability]
protected theorem nnnorm {β : Type*} [SeminormedAddCommGroup β] {f : α → β}
    (hf : AEStronglyMeasurable f μ) : AEStronglyMeasurable (fun x => ‖f x‖₊) μ

(hf : MeasureTheory.AEStronglyMeasurable f μ)

MeasureTheory.AEStronglyMeasurable (fun x => ‖f x‖₊) μ


@[reassoc, simp]
theorem whiskerLeft_rightUnitor_inv (f : a ⟶ b) (g : b ⟶ c) :
    f ◁ (ρ_ g).inv = (ρ_ (f ≫ g)).inv ≫ (α_ f g (𝟙 c)).hom

{B : Type u}
[CategoryTheory.Bicategory B]
{a b c : B}
(f : a ⟶ b)
(g : b ⟶ c)

CategoryTheory.Bicategory.whiskerLeft f (CategoryTheory.Bicategory.rightUnitor g).inv =
  CategoryTheory.CategoryStruct.comp
    (CategoryTheory.Bicategory.rightUnitor (CategoryTheory.CategoryStruct.comp f g)).inv
    (CategoryTheory.Bicategory.associator f g (CategoryTheory.CategoryStruct.id c)).hom


/-- A constructor to append an element `g` of `G` and `u : ℤˣ` to a word `w` with sufficient
hypotheses that no normalization or cancellation need take place for the result to be in normal form
-/
@[simps]
def cons (g : G) (u : ℤˣ) (w : NormalWord d) (h1 : w.head ∈ d.set u)
    (h2 : ∀ u' ∈ Option.map Prod.fst w.toList.head?, w.head ∈ toSubgroup A B u → u = u') :
    NormalWord d

{d : HNNExtension.NormalWord.TransversalPair G A B}

(h2 : ∀ u' ∈ Option.map Prod.fst w.toList.head?, w.head ∈ HNNExtension.toSubgroup A B u → u = u')

(HNNExtension.NormalWord.cons g u w h1 h2).head = g


@[simp] lemma removeNth_last {α : Type*} (f : Fin (n + 1) → α) : removeNth (last n) f = init f

{n : ℕ}
{α : Type u_1}
(f : Fin (n + 1) → α)


theorem reinsertAux_size [Hashable α] (data : Buckets α β) (a : α) (b : β) :
    (reinsertAux data a b).size = data.size.succ

(data : Batteries.HashMap.Imp.Buckets α β)

(Batteries.HashMap.Imp.reinsertAux data a b).size = data.size.succ


theorem eventually_mapsTo_of_isCompact_absorbing_of_isOpen_of_omegaLimit_subset [T2Space β]
    {c : Set β} (hc₁ : IsCompact c) (hc₂ : ∀ᶠ t in f, MapsTo (ϕ t) s c) {n : Set β} (hn₁ : IsOpen n)
    (hn₂ : ω f ϕ s ⊆ n) : ∀ᶠ t in f, MapsTo (ϕ t) s n

(ϕ : τ → α → β)

(hc₂ : ∀ᶠ (t : τ) in f, Set.MapsTo (ϕ t) s c)


@[to_additive]
lemma Submonoid.orderOf_le_card (s : Submonoid G) (hs : (s : Set G).Finite) (hx : x ∈ s) :
    orderOf x ≤ Nat.card s

{G : Type u_1}
[Group G]
{x : G}
(s : Submonoid G)
(hs : (↑s).Finite)
(hx : x ∈ s)


theorem eq_of_le_of_le (h₁ : J₁ ∈ π) (h₂ : J₂ ∈ π) (hle₁ : J ≤ J₁) (hle₂ : J ≤ J₂) : J₁ = J₂

{ι : Type u_1}
{I J J₁ J₂ : BoxIntegral.Box ι}
(π : BoxIntegral.Prepartition I)
(h₁ : J₁ ∈ π)
(h₂ : J₂ ∈ π)
(hle₁ : J ≤ J₁)
(hle₂ : J ≤ J₂)


@[simp]
theorem coe_compRingHom (q : R[X]) : (compRingHom q : R[X] → R[X]) = fun p => comp p q

{R : Type u}
[CommSemiring R]
(q : R[X])


theorem divByMonic_eq_div (p : R[X]) (hq : Monic q) : p /ₘ q = p / q

{R : Type u}
[Field R]
{q : R[X]}
(p : R[X])
(hq : q.Monic)


@[to_additive]
lemma prod_of_injOn (e : ι → κ) (he : Set.InjOn e s) (hest : Set.MapsTo e s t)
    (h' : ∀ i ∈ t, i ∉ e '' s → g i = 1) (h : ∀ i ∈ s, f i = g (e i))  :
    ∏ i ∈ s, f i = ∏ j ∈ t, g j

{ι : Type u_6}
{κ : Type u_7}
{α : Type u_8}
[AddCommMonoid α]
{s : Finset ι}
{t : Finset κ}
{f : ι → α}
{g : κ → α}
(e : ι → κ)
(he : Set.InjOn e ↑s)
(hest : Set.MapsTo e ↑s ↑t)
(h' : ∀ i ∈ t, i ∉ e '' ↑s → g i = 0)
(h : ∀ i ∈ s, f i = g (e i))


@[to_additive add_neg_lt_add_neg_iff]
theorem mul_inv_lt_mul_inv_iff' : a * b⁻¹ < c * d⁻¹ ↔ a * d < c * b

[CovariantClass α α (fun x x_1 => x * x_1) fun x x_1 => x < x_1]


@[to_additive (attr := simp)]
theorem preimage_mul_sphere (a b : E) (r : ℝ) : (b * ·) ⁻¹' sphere a r = sphere (a / b) r

{E : Type u_6}
[SeminormedAddCommGroup E]
(a b : E)
(r : ℝ)

(fun x => b + x) ⁻¹' Metric.sphere a r = Metric.sphere (a - b) r


/-- An open immersion is an iso if the underlying continuous map is epi. -/
theorem to_iso [h' : Epi f.base] : IsIso f

{X Y : AlgebraicGeometry.SheafedSpace C}

[H : AlgebraicGeometry.SheafedSpace.IsOpenImmersion f]


theorem mem_coprodᵢ_iff {s : Set (∀ i, α i)} :
    s ∈ Filter.coprodᵢ f ↔ ∀ i : ι, ∃ t₁ ∈ f i, eval i ⁻¹' t₁ ⊆ s

{ι : Type u_1}
{α : ι → Type u_2}
{f : (i : ι) → Filter (α i)}
{s : Set ((i : ι) → α i)}

s ∈ Filter.coprodᵢ f ↔ ∀ (i : ι), ∃ t₁ ∈ f i, Function.eval i ⁻¹' t₁ ⊆ s


@[simp] lemma Equiv.coe_embeddingFinSucc_symm {n : ℕ} {ι : Type*}
    (f : Σ (e : Fin n ↪ ι), {i // i ∉ Set.range e}) :
    ((Equiv.embeddingFinSucc n ι).symm f : Fin (n + 1) → ι) = Fin.cons f.2.1 f.1

(f : (e : Fin n ↪ ι) × { i // i ∉ Set.range ⇑e })

⇑((Equiv.embeddingFinSucc n ι).symm f) = Fin.cons ↑f.snd ⇑f.fst


/-- The order of the sum of two formal power series
 is at least the minimum of their orders. -/
theorem le_order_add (φ ψ : R⟦X⟧) : min (order φ) (order ψ) ≤ order (φ + ψ)

{R : Type u_1}
[Semiring R]
(φ ψ : PowerSeries R)


/-- The triangle in `CochainComplex C ℤ` attached to a degreewise split short exact sequence
of cochain complexes. -/
@[simps! obj₁ obj₂ obj₃ mor₁ mor₂ mor₃]
def triangleOfDegreewiseSplit : Triangle (CochainComplex C ℤ)

(S : CategoryTheory.ShortComplex (CochainComplex C ℤ))

(σ : (n : ℤ) → (S.map (HomologicalComplex.eval C (ComplexShape.up ℤ) n)).Splitting)

(CochainComplex.triangleOfDegreewiseSplit S σ).mor₃ = CochainComplex.homOfDegreewiseSplit S σ


theorem one_le_gauge_of_not_mem (hs₁ : StarConvex ℝ 0 s) (hs₂ : Absorbs ℝ s {x}) (hx : x ∉ s) :
    1 ≤ gauge s x

{E : Type u_2}
[AddCommGroup E]
[Module ℝ E]
{s : Set E}
{x : E}
(hs₁ : StarConvex ℝ 0 s)
(hs₂ : Absorbs ℝ s {x})
(hx : x ∉ s)


@[simp] lemma top_ne_ofNat (n : ℕ) [n.AtLeastTwo] : (⊤ : WithTop α) ≠ no_index (OfNat.ofNat n)

{α : Type u}
[AddMonoidWithOne α]
(n : ℕ)
[n.AtLeastTwo]


@[simp, norm_cast]
theorem ofReal_sin (x : ℝ) : (Real.sin x : ℂ) = sin x


@[to_additive (attr := simp, nolint simpComm)]
theorem semiconjBy_unop [Mul α] {a x y : αᵐᵒᵖ} :
    SemiconjBy (unop a) (unop y) (unop x) ↔ SemiconjBy a x y

AddSemiconjBy (AddOpposite.unop a) (AddOpposite.unop y) (AddOpposite.unop x) ↔ AddSemiconjBy a x y


theorem map_comap_le (f : V ↪ W) (G : SimpleGraph W) : (G.comap f).map f ≤ G

{V : Type u_1}
{W : Type u_2}
(f : V ↪ W)
(G : SimpleGraph W)

SimpleGraph.map f (SimpleGraph.comap (⇑f) G) ≤ G


/-- Lagrange multipliers theorem. Let `f : ι → E → ℝ` be a finite family of functions.
Suppose that `φ : E → ℝ` has a local extremum on the set `{x | ∀ i, f i x = f i x₀}` at `x₀`.
Suppose that all functions `f i` as well as `φ` are strictly differentiable at `x₀`.
Then the derivatives `f' i : E → L[ℝ] ℝ` and `φ' : E →L[ℝ] ℝ` are linearly dependent.

See also `IsLocalExtrOn.exists_multipliers_of_hasStrictFDerivAt` for a version that
that states existence of Lagrange multipliers `Λ` and `Λ₀` instead of using
`¬LinearIndependent ℝ _` -/
theorem IsLocalExtrOn.linear_dependent_of_hasStrictFDerivAt {ι : Type*} [Finite ι] {f : ι → E → ℝ}
    {f' : ι → E →L[ℝ] ℝ} (hextr : IsLocalExtrOn φ {x | ∀ i, f i x = f i x₀} x₀)
    (hf' : ∀ i, HasStrictFDerivAt (f i) (f' i) x₀) (hφ' : HasStrictFDerivAt φ φ' x₀) :
    ¬LinearIndependent ℝ (Option.elim' φ' f' : Option ι → E →L[ℝ] ℝ)

(hextr : IsLocalExtrOn φ {x | ∀ (i : ι), f i x = f i x₀} x₀)

(hf' : ∀ (i : ι), HasStrictFDerivAt (f i) (f' i) x₀)

¬LinearIndependent ℝ (Option.elim' φ' f')


lemma Submodule.mem_traceDual_iff_isIntegral {I : Submodule B L} {x} :
    x ∈ Iᵛ ↔ ∀ a ∈ I, IsIntegral A (traceForm K L x a)

{A : Type u_1}
{K : Type u_2}
{L : Type u}
{B : Type u_3}
[CommRing A]
[Field K]
[CommRing B]
[Field L]
[Algebra A K]
[Algebra B L]
[Algebra A B]
[Algebra K L]
[Algebra A L]
[IsScalarTower A K L]
[IsScalarTower A B L]
[IsFractionRing A K]
[IsIntegrallyClosed A]
{I : Submodule B L}
{x : L}

x ∈ Submodule.traceDual A K I ↔ ∀ a ∈ I, IsIntegral A (((Algebra.traceForm K L) x) a)


theorem multiplicity_lt_iff_not_dvd {a b : α} {k : ℕ} :
    multiplicity a b < (k : PartENat) ↔ ¬a ^ k ∣ b

{α : Type u_1}
[Monoid α]
[DecidableRel fun x x_1 => x ∣ x_1]
{a b : α}
{k : ℕ}


@[simp]
theorem comp_apply (f : B →⋆ₙ+* C) (g : A →⋆ₙ+* B) (a : A) : comp f g a = f (g a)

{A : Type u_1}
{B : Type u_2}
{C : Type u_3}
[NonUnitalNonAssocSemiring A]
[Star A]
[NonUnitalNonAssocSemiring B]
[Star B]
[NonUnitalNonAssocSemiring C]
[Star C]
(f : B →⋆ₙ+* C)
(g : A →⋆ₙ+* B)
(a : A)


/-- Shortcut lemma for `Matrix.toLin_mul` and `LinearMap.comp_apply`. -/
theorem Matrix.toLin_mul_apply [Finite l] [DecidableEq m] (A : Matrix l m R) (B : Matrix m n R)
    (x) : Matrix.toLin v₁ v₃ (A * B) x = (Matrix.toLin v₂ v₃ A) (Matrix.toLin v₁ v₂ B x)

{R : Type u_1}
[CommSemiring R]
{l : Type u_2}
{m : Type u_3}
{n : Type u_4}
[Fintype n]
[Fintype m]
[DecidableEq n]
{M₁ : Type u_5}
{M₂ : Type u_6}
[AddCommMonoid M₁]
[AddCommMonoid M₂]
[Module R M₁]
[Module R M₂]
(v₁ : Basis n R M₁)
(v₂ : Basis m R M₂)
{M₃ : Type u_7}
[AddCommMonoid M₃]
[Module R M₃]
(v₃ : Basis l R M₃)
[Finite l]
[DecidableEq m]
(A : Matrix l m R)
(B : Matrix m n R)
(x : M₁)

((Matrix.toLin v₁ v₃) (A * B)) x = ((Matrix.toLin v₂ v₃) A) (((Matrix.toLin v₁ v₂) B) x)


@[to_additive (attr := simp)]
theorem coeHom_apply (x : Mˣ) : coeHom M x = ↑x

{M : Type u}
[AddMonoid M]
(x : AddUnits M)


@[simp]
theorem isBigO_const_const_iff {c : E''} {c' : F''} (l : Filter α) [l.NeBot] :
    ((fun _x : α => c) =O[l] fun _x => c') ↔ c' = 0 → c = 0

{α : Type u_1}
{E'' : Type u_9}
{F'' : Type u_10}
[NormedAddCommGroup E'']
[NormedAddCommGroup F'']
{c : E''}
{c' : F''}
(l : Filter α)
[l.NeBot]


@[simp]
lemma sSup_image_lieSpan_singleton : sSup ((fun x ↦ lieSpan R L {x}) '' N) = N

(R : Type u)
(L : Type v)
{M : Type w}
[CommRing R]
[LieRing L]
[AddCommGroup M]
[Module R M]
[LieRingModule L M]
(N : LieSubmodule R L M)

sSup ((fun x => LieSubmodule.lieSpan R L {x}) '' ↑N) = N


/-- A constructor to append an element `g` of `G` and `u : ℤˣ` to a word `w` with sufficient
hypotheses that no normalization or cancellation need take place for the result to be in normal form
-/
@[simps]
def cons (g : G) (u : ℤˣ) (w : NormalWord d) (h1 : w.head ∈ d.set u)
    (h2 : ∀ u' ∈ Option.map Prod.fst w.toList.head?, w.head ∈ toSubgroup A B u → u = u') :
    NormalWord d

{d : HNNExtension.NormalWord.TransversalPair G A B}

(h2 : ∀ u' ∈ Option.map Prod.fst w.toList.head?, w.head ∈ HNNExtension.toSubgroup A B u → u = u')

(HNNExtension.NormalWord.cons g u w h1 h2).toList = (u, w.head) :: w.toList


theorem powerlt_le_powerlt_left {a b c : Cardinal} (h : b ≤ c) : a ^< b ≤ a ^< c


theorem dense_irrational : Dense { x : ℝ | Irrational x }


theorem Products.prop_of_isGood_of_contained  {l : Products I} (o : Ordinal) (h : l.isGood C)
    (hsC : contained C o) (i : I) (hi : i ∈ l.val) : ord I i < o

{l : Profinite.NobelingProof.Products I}

(h : Profinite.NobelingProof.Products.isGood C l)

(hsC : Profinite.NobelingProof.contained C o)


theorem xor_not_self : ∀ (x : Bool), xor x (!x) = true


@[simp]
theorem nim_equiv_iff_eq {o₁ o₂ : Ordinal} : (nim o₁ ≈ nim o₂) ↔ o₁ = o₂

SetTheory.PGame.nim o₁ ≈ SetTheory.PGame.nim o₂ ↔ o₁ = o₂


theorem hasDerivAt_pow (n : ℕ) (x : 𝕜) :
    HasDerivAt (fun x : 𝕜 => x ^ n) ((n : 𝕜) * x ^ (n - 1)) x

{𝕜 : Type u}
[NontriviallyNormedField 𝕜]
(n : ℕ)
(x : 𝕜)

HasDerivAt (fun x => x ^ n) (↑n * x ^ (n - 1)) x


/-- This lemma makes lemmas assuming `Infinite α` applicable to the situation where we have
  `Infinite β` instead. -/
theorem mk_equiv_comm : #(α ≃ β') = #(β' ≃ α)


theorem isUnit_det_J : IsUnit (det (J l R))

(l : Type u_1)
(R : Type u_2)
[DecidableEq l]
[CommRing R]
[Fintype l]


@[to_additive]
theorem smul_set_iInter {ι : Type*}
    (a : α) (t : ι → Set β) : (a • ⋂ i, t i) = ⋂ i, a • t i

{α : Type u_2}
{β : Type u_3}
[Group α]
[MulAction α β]
{ι : Type u_5}
(a : α)
(t : ι → Set β)


@[simp]
theorem superFactorial_two : sf 2 = 2


@[simp]
theorem closedBall_bot {r : ℝ} (x : E) (hr : 0 < r) :
    closedBall (⊥ : Seminorm 𝕜 E) x r = Set.univ

{𝕜 : Type u_3}
{E : Type u_7}
[SeminormedRing 𝕜]
[AddCommGroup E]
[Module 𝕜 E]
{r : ℝ}
(x : E)
(hr : 0 < r)


theorem toReal_iSup (hf : ∀ i, f i ≠ ∞) : (iSup f).toReal = ⨆ i, (f i).toReal

{ι : Sort u_1}
{f : ι → ℝ≥0∞}
(hf : ∀ (i : ι), f i ≠ ⊤)


theorem takeWhile_cons_of_neg {x : α} (h : ¬ p x) :
    List.takeWhile p (x :: l) = []

{α : Type u}
{p : α → Bool}
{l : List α}
{x : α}
(h : ¬p x = true)


theorem next : ∀ {s}, Valid s → s.toString.1 = m₁ ++ c :: m₂ →
    s.next ⟨utf8Len m₁⟩ = ⟨utf8Len m₁ + c.utf8Size⟩

{m₁ : List Char}
{c : Char}
{m₂ : List Char}
{s : Substring}

s.Valid →
  s.toString.data = m₁ ++ c :: m₂ →
    s.next { byteIdx := String.utf8Len m₁ } = { byteIdx := String.utf8Len m₁ + c.utf8Size }


/-- The `Ideal.closure` of a maximal ideal in a complete normed ring is the ideal itself. -/
theorem IsMaximal.closure_eq {I : Ideal R} (hI : I.IsMaximal) : I.closure = I

{R : Type u_1}
[NormedRing R]
[CompleteSpace R]
{I : Ideal R}
(hI : I.IsMaximal)


/-- If `re s` is greater than the abscissa of absolute convergence of `f`, then
the `m`th derivative of this L-series is `(-1)^m` times the L-series of `log^m * f`. -/
lemma LSeries_iteratedDeriv {f : ℕ → ℂ} (m : ℕ) {s : ℂ} (h : abscissaOfAbsConv f < s.re) :
    iteratedDeriv m (LSeries f) s = (-1) ^ m * LSeries (logMul^[m] f) s

(h : LSeries.abscissaOfAbsConv f < ↑s.re)

iteratedDeriv m (LSeries f) s = (-1) ^ m * LSeries (LSeries.logMul^[m] f) s


lemma compProd_add_right (μ : Measure α) [SFinite μ] (κ η : Kernel α β)
    [IsSFiniteKernel κ] [IsSFiniteKernel η] :
    μ ⊗ₘ (κ + η) = μ ⊗ₘ κ + μ ⊗ₘ η

{α : Type u_1}
{β : Type u_2}
{mα : MeasurableSpace α}
{mβ : MeasurableSpace β}
(μ : MeasureTheory.Measure α)
[MeasureTheory.SFinite μ]
(κ η : ProbabilityTheory.Kernel α β)
[ProbabilityTheory.IsSFiniteKernel κ]
[ProbabilityTheory.IsSFiniteKernel η]

μ ⊗ₘ (κ + η) = μ ⊗ₘ κ + μ ⊗ₘ η


theorem isNoetherianRing_iff {R} [Semiring R] : IsNoetherianRing R ↔ IsNoetherian R R


@[simp]
theorem isUpperSet_setOf : IsUpperSet { a | p a } ↔ Monotone p

{α : Type u_1}
[Preorder α]
{p : α → Prop}


theorem mem_inv_pointwise_smul_iff {a : M} {S : Subring R} {x : R} : x ∈ a⁻¹ • S ↔ a • x ∈ S

{M : Type u_1}
{R : Type u_2}
[Group M]
[Ring R]
[MulSemiringAction M R]
{a : M}
{S : Subring R}
{x : R}

x ∈ a⁻¹ • S ↔ a • x ∈ S


lemma toReal_rnDeriv_tilted_right (μ ν : Measure α) [SigmaFinite μ] [SigmaFinite ν]
    (hf : Integrable (fun x ↦ exp (f x)) ν) :
    (fun x ↦ (μ.rnDeriv (ν.tilted f) x).toReal)
      =ᵐ[ν] fun x ↦ exp (- f x) * (∫ x, exp (f x) ∂ν) * (μ.rnDeriv ν x).toReal

(hf : MeasureTheory.Integrable (fun x => rexp (f x)) ν)

(fun x => (μ.rnDeriv (ν.tilted f) x).toReal) =ᵐ[ν] fun x =>
  (rexp (-f x) * ∫ (x : α), rexp (f x) ∂ν) * (μ.rnDeriv ν x).toReal


theorem comp_injective_right (p : Path a b) : Injective (p.comp : Path b c → Path a c)

{V : Type u}
[Quiver V]
{a b c : V}
(p : Quiver.Path a b)


/-- For a family of functions between (pseudo) metric spaces, a convenient way to prove
uniform equicontinuity is to show that all of the functions share a common *global* continuity
modulus. -/
theorem uniformEquicontinuous_of_continuity_modulus {ι : Type*} [PseudoMetricSpace β] (b : ℝ → ℝ)
    (b_lim : Tendsto b (𝓝 0) (𝓝 0)) (F : ι → β → α)
    (H : ∀ (x y : β) (i), dist (F i x) (F i y) ≤ b (dist x y)) : UniformEquicontinuous F

(F : ι → β → α)

(H : ∀ (x y : β) (i : ι), dist (F i x) (F i y) ≤ b (dist x y))


@[simp, nolint simpNF] -- Porting note (#10959): simp cannot prove this
theorem norm_star (a : ℍ) : ‖star a‖ = ‖a‖


/-- `LocallyConstant.const` as a linear map. -/
@[simps!]
def constₗ (R : Type*) [Semiring R] [AddCommMonoid Y] [Module R Y] :
    Y →ₗ[R] LocallyConstant X Y

{X : Type u_1}
{Y : Type u_2}
[TopologicalSpace X]
(R : Type u_6)
[Semiring R]
[AddCommMonoid Y]
[Module R Y]
(y : Y)

∀ (a : X), ((LocallyConstant.constₗ R) y) a = y


theorem indep_limsup_atBot_self (h_le : ∀ n, s n ≤ m0) (h_indep : iIndep s μ) :
    Indep (limsup s atBot) (limsup s atBot) μ

(h_indep : ProbabilityTheory.iIndep s μ)

ProbabilityTheory.Indep (Filter.limsup s Filter.atBot) (Filter.limsup s Filter.atBot) μ


theorem MulEquiv.uniqueFactorizationMonoid (e : α ≃* β) (hα : UniqueFactorizationMonoid α) :
    UniqueFactorizationMonoid β

{α : Type u_1}
{β : Type u_2}
[CancelCommMonoidWithZero α]
[CancelCommMonoidWithZero β]
(e : α ≃* β)
(hα : UniqueFactorizationMonoid α)


theorem subsingleton_iff {I : Ideal R} : Subsingleton (R ⧸ I) ↔ I = ⊤


theorem ext_iff {inst₁ inst₂ : CommRing R} :
    inst₁ = inst₂ ↔
      (local_hAdd[R, inst₁] = local_hAdd[R, inst₂]) ∧
      (local_hMul[R, inst₁] = local_hMul[R, inst₂])

inst₁ = inst₂ ↔ HAdd.hAdd = HAdd.hAdd ∧ HMul.hMul = HMul.hMul


/-- Let `(g₀, g₁, ..., gₙ)` be a tuple of elements in `Gⁿ⁺¹`.
Then if `k < j`, this says `(g₀g₁...gₖ₋₁)⁻¹ * g₀g₁...gₖ = gₖ`.
If `k = j`, it says `(g₀g₁...gₖ₋₁)⁻¹ * g₀g₁...gₖ₊₁ = gₖgₖ₊₁`.
If `k > j`, it says `(g₀g₁...gₖ)⁻¹ * g₀g₁...gₖ₊₁ = gₖ₊₁.`
Useful for defining group cohomology. -/
@[to_additive
      "Let `(g₀, g₁, ..., gₙ)` be a tuple of elements in `Gⁿ⁺¹`.
      Then if `k < j`, this says `-(g₀ + g₁ + ... + gₖ₋₁) + (g₀ + g₁ + ... + gₖ) = gₖ`.
      If `k = j`, it says `-(g₀ + g₁ + ... + gₖ₋₁) + (g₀ + g₁ + ... + gₖ₊₁) = gₖ + gₖ₊₁`.
      If `k > j`, it says `-(g₀ + g₁ + ... + gₖ) + (g₀ + g₁ + ... + gₖ₊₁) = gₖ₊₁.`
      Useful for defining group cohomology."]
theorem inv_partialProd_mul_eq_contractNth {G : Type*} [Group G] (g : Fin (n + 1) → G)
    (j : Fin (n + 1)) (k : Fin n) :
    (partialProd g (j.succ.succAbove (Fin.castSucc k)))⁻¹ * partialProd g (j.succAbove k).succ =
      j.contractNth (· * ·) g k

{n : ℕ}
{G : Type u_3}
[AddGroup G]
(g : Fin (n + 1) → G)
(j : Fin (n + 1))
(k : Fin n)

-Fin.partialSum g (j.succ.succAbove k.castSucc) + Fin.partialSum g (j.succAbove k).succ =
  j.contractNth (fun x x_1 => x + x_1) g k


theorem mapDomain_algebraMap {F : Type*} [FunLike F G H] [MonoidHomClass F G H] (f : F) (r : k) :
    mapDomain f (algebraMap k (MonoidAlgebra A G) r) = algebraMap k (MonoidAlgebra A H) r

{k : Type u₁}
{G : Type u₂}
{H : Type u_1}
[CommSemiring k]
[Monoid G]
[Monoid H]
(A : Type u₃)
[Semiring A]
[Algebra k A]
{F : Type u_4}
[FunLike F G H]
[MonoidHomClass F G H]
(f : F)
(r : k)

MonoidAlgebra.mapDomain (⇑f) ((algebraMap k (MonoidAlgebra A G)) r) = (algebraMap k (MonoidAlgebra A H)) r


theorem totalDegree_add_eq_left_of_totalDegree_lt {p q : MvPolynomial σ R}
    (h : q.totalDegree < p.totalDegree) : (p + q).totalDegree = p.totalDegree

{R : Type u}
{σ : Type u_1}
[CommSemiring R]
{p q : MvPolynomial σ R}
(h : q.totalDegree < p.totalDegree)


@[simp]
theorem basisFun_repr (x : η → R) (i : η) : (Pi.basisFun R η).repr x i = x i

(R : Type u_1)
(η : Type u_2)
[Semiring R]
[Finite η]
(x : η → R)
(i : η)


@[to_additive (attr := simp)]
theorem Group.fg_iff_subgroup_fg (H : Subgroup G) : Group.FG H ↔ H.FG

{G : Type u_3}
[AddGroup G]
(H : AddSubgroup G)


theorem Sylow.conj_eq_normalizer_conj_of_mem [Fact p.Prime] [Finite (Sylow p G)] (P : Sylow p G)
    [_hP : (P : Subgroup G).IsCommutative] (x g : G) (hx : x ∈ P) (hy : g⁻¹ * x * g ∈ P) :
    ∃ n ∈ (P : Subgroup G).normalizer, g⁻¹ * x * g = n⁻¹ * x * n

{p : ℕ}
{G : Type u_1}
[Group G]
[Fact (Nat.Prime p)]
[Finite (Sylow p G)]
(P : Sylow p G)
[_hP : (↑P).IsCommutative]
(x g : G)
(hx : x ∈ P)
(hy : g⁻¹ * x * g ∈ P)

∃ n ∈ (↑P).normalizer, g⁻¹ * x * g = n⁻¹ * x * n


/-- The range of an indexed ordinal function, whose outputs live in a higher universe than the
    inputs, is always bounded above. See `Ordinal.lsub` for an explicit bound. -/
theorem bddAbove_range {ι : Type u} (f : ι → Ordinal.{max u v}) : BddAbove (Set.range f)


theorem isAtom_iff [OrderBot α] [IsAtomic α] [OrderBot β] {l : α → β} {u : β → α}
    (gi : GaloisInsertion l u) (hbot : u ⊥ = ⊥) (h_atom : ∀ a, IsAtom a → u (l a) = a) (a : α) :
    IsAtom (l a) ↔ IsAtom a

(h_atom : ∀ (a : α), IsAtom a → u (l a) = a)


/-- An isomorphism of short complexes `S₁ ≅ S₂` induces an isomorphism on the `K` fields
of left homology data of `S₁` and `S₂`. -/
@[simps]
def cyclesMapIso' (e : S₁ ≅ S₂) (h₁ : S₁.LeftHomologyData)
    (h₂ : S₂.LeftHomologyData) : h₁.K ≅ h₂.K

(CategoryTheory.ShortComplex.cyclesMapIso' e h₁ h₂).inv = CategoryTheory.ShortComplex.cyclesMap' e.inv h₂ h₁


@[simp]
theorem Discrete.mk_as {α : Type u₁} (X : Discrete α) : Discrete.mk X.as = X

{α : Type u₁}
(X : CategoryTheory.Discrete α)


/-- Flipping a complex of complexes over the diagonal, as a functor. -/
@[simps]
def flipFunctor :
    HomologicalComplex₂ C c₁ c₂ ⥤ HomologicalComplex₂ C c₂ c₁

(((HomologicalComplex₂.flipFunctor C c₁ c₂).map f).f i).f j = (f.f j).f i


theorem extract_append_right {a b : Array α} {i j : Nat} (h : a.size ≤ i) :
    (a ++ b).extract i j = b.extract (i - a.size) (j - a.size)

{α : Type u}
{a b : Array α}
{i j : Nat}
(h : a.size ≤ i)


/-- If two commuting elements `x` and `y` of a monoid have order `n` and `m`, there is an element
of order `lcm n m`. The result actually gives an explicit (computable) element, written as the
product of a power of `x` and a power of `y`. See also the result below if you don't need the
explicit formula. -/
@[to_additive "If two commuting elements `x` and `y` of an additive monoid have order `n` and `m`,
there is an element of order `lcm n m`. The result actually gives an explicit (computable) element,
written as the sum of a multiple of `x` and a multiple of `y`. See also the result below if you
don't need the explicit formula."]
lemma _root_.Commute.orderOf_mul_pow_eq_lcm {x y : G} (h : Commute x y) (hx : orderOf x ≠ 0)
    (hy : orderOf y ≠ 0) :
    orderOf (x ^ (orderOf x / (factorizationLCMLeft (orderOf x) (orderOf y))) *
      y ^ (orderOf y / factorizationLCMRight (orderOf x) (orderOf y))) =
      Nat.lcm (orderOf x) (orderOf y)

{G : Type u}
[Monoid G]
{x y : G}
(h : Commute x y)
(hx : orderOf x ≠ 0)
(hy : orderOf y ≠ 0)

orderOf
    (x ^ (orderOf x / (orderOf x).factorizationLCMLeft (orderOf y)) *
      y ^ (orderOf y / (orderOf x).factorizationLCMRight (orderOf y))) =
  (orderOf x).lcm (orderOf y)


@[to_additive prod_le_iff]
theorem prod_le_iff {H : Subgroup G} {K : Subgroup N} {J : Subgroup (G × N)} :
    H.prod K ≤ J ↔ map (MonoidHom.inl G N) H ≤ J ∧ map (MonoidHom.inr G N) K ≤ J

{G : Type u_1}
[AddGroup G]
{N : Type u_5}
[AddGroup N]
{H : AddSubgroup G}
{K : AddSubgroup N}
{J : AddSubgroup (G × N)}

H.prod K ≤ J ↔ AddSubgroup.map (AddMonoidHom.inl G N) H ≤ J ∧ AddSubgroup.map (AddMonoidHom.inr G N) K ≤ J


/-- If `T` and `T'` are terminal, they are isomorphic. -/
@[simps]
def IsTerminal.uniqueUpToIso {T T' : C} (hT : IsTerminal T) (hT' : IsTerminal T') : T ≅ T'

(hT : CategoryTheory.Limits.IsTerminal T)

(hT' : CategoryTheory.Limits.IsTerminal T')


@[simp]
theorem dual_comp (g : InfHom β γ) (f : InfHom α β) :
    InfHom.dual (g.comp f) = (InfHom.dual g).comp (InfHom.dual f)

{α : Type u_3}
{β : Type u_4}
{γ : Type u_5}
[Inf α]
[Inf β]
[Inf γ]
(g : InfHom β γ)
(f : InfHom α β)


protected theorem continuous (hf : QuotientMap f) : Continuous f

{X : Type u_1}
{Y : Type u_2}
{f : X → Y}
[TopologicalSpace X]
[TopologicalSpace Y]
(hf : QuotientMap f)


theorem tendsto_rightLim (x : α) : Tendsto f (𝓝[>] x) (𝓝 (rightLim f x))

{α : Type u_1}
{β : Type u_2}
[LinearOrder α]
[ConditionallyCompleteLinearOrder β]
[TopologicalSpace β]
[OrderTopology β]
{f : α → β}
(hf : Antitone f)
[TopologicalSpace α]
[OrderTopology α]
(x : α)

Filter.Tendsto f (𝓝[>] x) (𝓝 (Function.rightLim f x))


theorem CG.map_of_surjective {N : Type*} [L.Structure N] (h : CG L M) (f : M →[L] N)
    (hs : Function.Surjective f) : CG L N

(h : FirstOrder.Language.Structure.CG L M)


theorem uncurry_expComparison (A B : C) :
    CartesianClosed.uncurry ((expComparison F A).app B) =
      inv (prodComparison F _ _) ≫ F.map ((exp.ev _).app _)

[CategoryTheory.Limits.PreservesLimitsOfShape (CategoryTheory.Discrete CategoryTheory.Limits.WalkingPair) F]

CategoryTheory.CartesianClosed.uncurry ((CategoryTheory.expComparison F A).app B) =
  CategoryTheory.CategoryStruct.comp (CategoryTheory.inv (CategoryTheory.Limits.prodComparison F A (A ⟹ B)))
    (F.map ((CategoryTheory.exp.ev A).app B))


theorem rpow_left_surjective {x : ℝ} (hx : x ≠ 0) : Function.Surjective fun y : ℝ≥0 => y ^ x


lemma withTop_apply (f : LatticeHom α β) (a : WithTop α) : f.withTop a = a.map f

{α : Type u_3}
{β : Type u_4}
[Lattice α]
[Lattice β]
(f : LatticeHom α β)
(a : WithTop α)


@[to_additive]
theorem contMDiff_finset_prod' (h : ∀ i ∈ t, ContMDiff I' I n (f i)) :
    ContMDiff I' I n (∏ i ∈ t, f i)

{ι : Type u_1}
{𝕜 : Type u_2}
[NontriviallyNormedField 𝕜]
{H : Type u_3}
[TopologicalSpace H]
{E : Type u_4}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{I : ModelWithCorners 𝕜 E H}
{G : Type u_5}
[AddCommMonoid G]
[TopologicalSpace G]
[ChartedSpace H G]
[SmoothAdd I G]
{E' : Type u_6}
[NormedAddCommGroup E']
[NormedSpace 𝕜 E']
{H' : Type u_7}
[TopologicalSpace H']
{I' : ModelWithCorners 𝕜 E' H'}
{M : Type u_8}
[TopologicalSpace M]
[ChartedSpace H' M]
{t : Finset ι}
{f : ι → M → G}
{n : ℕ∞}
(h : ∀ i ∈ t, ContMDiff I' I n (f i))


theorem perm_append_left_iff {l₁ l₂ : List α} : ∀ l, l ++ l₁ ~ l ++ l₂ ↔ l₁ ~ l₂

{α : Type u_1}
{l₁ l₂ : List α}
(l : List α)


lemma isQuasiregular_iff {x : R} :
    IsQuasiregular x ↔ ∃ y, y + x + x * y = 0 ∧ x + y + y * x = 0

{R : Type u_1}
[NonUnitalSemiring R]
{x : R}


@[to_additive (attr := simp) existing zmod_val_inv_nsmul_nsmul]
lemma pow_pow_zmod_val_inv (hn : (Nat.card α).Coprime n) (a : α) :
    (a ^ n) ^ (n⁻¹ : ZMod (Nat.card α)).val = a

{α : Type u_1}
[Group α]
{n : ℕ}
(hn : (Nat.card α).Coprime n)
(a : α)


theorem card_le_one_iff_subsingleton (α : Type*) : card α ≤ 1 ↔ Subsingleton α


@[simp]
theorem wideCoequalizer.cotrident_π : (wideCoequalizer.cotrident f).π = wideCoequalizer.π f

(CategoryTheory.Limits.wideCoequalizer.cotrident f).π = CategoryTheory.Limits.wideCoequalizer.π f


@[simp]
lemma fromSingle₀Equiv_symm_apply_f_succ
    {C : ChainComplex V ℕ} {X : V} (f : X ⟶ C.X 0) (n : ℕ) :
    ((fromSingle₀Equiv C X).symm f).f (n + 1) = 0

((C.fromSingle₀Equiv X).symm f).f (n + 1) = 0


theorem sign_sum {ι : Type*} {s : Finset ι} {f : ι → α} (hs : s.Nonempty) (t : SignType)
    (h : ∀ i ∈ s, sign (f i) = t) : sign (∑ i ∈ s, f i) = t

{α : Type u_1}
[LinearOrderedAddCommGroup α]
{ι : Type u_2}
{s : Finset ι}
{f : ι → α}
(hs : s.Nonempty)
(t : SignType)
(h : ∀ i ∈ s, SignType.sign (f i) = t)


@[simp] theorem appendList_nil (arr : Array α) : arr ++ ([] : List α) = arr


/-- The `MonoidHom` from `S.leftInv` to `S` sending an element to its right inverse in `S`. -/
@[to_additive (attr := simps)
    "The `AddMonoidHom` from `S.leftNeg` to `S` sending an element to its
    right additive inverse in `S`."]
noncomputable def fromCommLeftInv : S.leftInv →* S

{M : Type u_1}
[AddCommMonoid M]
(S : AddSubmonoid M)

∀ (a : ↥S.leftNeg), S.fromCommLeftNeg a = S.fromLeftNeg a


/-- See also the strictly more general `initial_comp` below. -/
theorem initial_comp_equivalence [Initial F] [IsEquivalence G] : Initial (F ⋙ G)

{C : Type u₁}
[CategoryTheory.Category.{v₁, u₁} C]
{D : Type u₂}
[CategoryTheory.Category.{v₂, u₂} D]
{E : Type u₃}
[CategoryTheory.Category.{v₃, u₃} E]
(F : CategoryTheory.Functor C D)
(G : CategoryTheory.Functor D E)
[F.Initial]
[G.IsEquivalence]


theorem norm_le_norm_of_abs_le_abs {a b : α} (h : |a| ≤ |b|) : ‖a‖ ≤ ‖b‖

{α : Type u_1}
[NormedAddCommGroup α]
[Lattice α]
[HasSolidNorm α]
{a b : α}
(h : |a| ≤ |b|)


/-- The equivalence `(x, y) ↦ (x, y+1)`. -/
@[simps!]
def shiftUp : ℤ × ℤ ≃ ℤ × ℤ

∀ (a : ℤ × ℤ), SetTheory.PGame.Domineering.shiftUp.symm a = Prod.map id (fun x => x + -1) a


theorem map_dvd_map' [Field k] (f : R →+* k) {x y : R[X]} : x.map f ∣ y.map f ↔ x ∣ y

{R : Type u}
{k : Type y}
[Field R]
[Field k]
(f : R →+* k)
{x y : R[X]}

Polynomial.map f x ∣ Polynomial.map f y ↔ x ∣ y


/-- Integrals commute with subtraction inside a lower Lebesgue integral.
  `F` can be any function. -/
theorem lintegral_fn_integral_sub ⦃f g : α × β → E⦄ (F : E → ℝ≥0∞) (hf : Integrable f (μ.prod ν))
    (hg : Integrable g (μ.prod ν)) :
    (∫⁻ x, F (∫ y, f (x, y) - g (x, y) ∂ν) ∂μ) =
      ∫⁻ x, F ((∫ y, f (x, y) ∂ν) - ∫ y, g (x, y) ∂ν) ∂μ

⦃f g : α × β → E⦄

(hf : MeasureTheory.Integrable f (μ.prod ν))

(hg : MeasureTheory.Integrable g (μ.prod ν))

∫⁻ (x : α), F (∫ (y : β), f (x, y) - g (x, y) ∂ν) ∂μ =
  ∫⁻ (x : α), F (∫ (y : β), f (x, y) ∂ν - ∫ (y : β), g (x, y) ∂ν) ∂μ


protected theorem Set.UniformEquicontinuousOn.uniformContinuousOn_of_mem {H : Set <| β → α}
    {S : Set β} (h : H.UniformEquicontinuousOn S) {f : β → α} (hf : f ∈ H) :
    UniformContinuousOn f S

{α : Type u_7}
{β : Type u_9}
[uα : UniformSpace α]
[uβ : UniformSpace β]
{H : Set (β → α)}
{S : Set β}
(h : H.UniformEquicontinuousOn S)
{f : β → α}
(hf : f ∈ H)


theorem hasDerivAt_exp_smul_const_of_mem_ball (x : 𝔸) (t : 𝕂)
    (htx : t • x ∈ EMetric.ball (0 : 𝔸) (expSeries 𝕂 𝔸).radius) :
    HasDerivAt (fun u : 𝕂 => exp 𝕂 (u • x)) (exp 𝕂 (t • x) * x) t

(htx : t • x ∈ EMetric.ball 0 (NormedSpace.expSeries 𝕂 𝔸).radius)

HasDerivAt (fun u => NormedSpace.exp 𝕂 (u • x)) (NormedSpace.exp 𝕂 (t • x) * x) t


theorem Icc_mem_nhdsSet_Ioc (h : a ≤ b) (h' : c < d) : Icc a d ∈ 𝓝ˢ (Ioc b c)

{α : Type u_1}
[LinearOrder α]
[TopologicalSpace α]
[OrderClosedTopology α]
{a b c d : α}
(h : a ≤ b)
(h' : c < d)


@[to_additive]
theorem range_eq_top_of_epi [Epi f] : f.range = ⊤

{A B : AddCommGrp}
(f : A ⟶ B)
[CategoryTheory.Epi f]


@[simp]
theorem tropEquiv_coe_fn : (tropEquiv : R → Tropical R) = trop


theorem infinitePos_mul_of_infinitePos_not_infinitesimal_pos {x y : ℝ*} :
    InfinitePos x → ¬Infinitesimal y → 0 < y → InfinitePos (x * y)

x.InfinitePos → ¬y.Infinitesimal → 0 < y → (x * y).InfinitePos


theorem lintegral_of_real_lt_top (f : X →ᵇ ℝ) :
    ∫⁻ x, ENNReal.ofReal (f x) ∂μ < ∞

{X : Type u_1}
[MeasurableSpace X]
[TopologicalSpace X]
(μ : MeasureTheory.Measure X)
[MeasureTheory.IsFiniteMeasure μ]
(f : X →ᵇ ℝ)


@[reassoc (attr := simp)]
theorem limit.isoLimitCone_inv_π {F : J ⥤ C} [HasLimit F] (t : LimitCone F) (j : J) :
    (limit.isoLimitCone t).inv ≫ limit.π F j = t.cone.π.app j

{J : Type u₁}
[CategoryTheory.Category.{v₁, u₁} J]
{C : Type u}
[CategoryTheory.Category.{v, u} C]
{F : J ⥤ C}
[CategoryTheory.Limits.HasLimit F]
(t : CategoryTheory.Limits.LimitCone F)
(j : J)

(CategoryTheory.Limits.limit.isoLimitCone t).inv ≫ CategoryTheory.Limits.limit.π F j = t.cone.π.app j


@[simp] lemma map_addXYZ : addXYZ (W'.map f) (f ∘ P) (f ∘ Q) = f ∘ addXYZ W' P Q

{R : Type u}
[CommRing R]
{W' : WeierstrassCurve.Jacobian R}
{S : Type u_1}
[CommRing S]
(f : R →+* S)
(P Q : Fin 3 → R)

WeierstrassCurve.Jacobian.addXYZ (WeierstrassCurve.map W' f) (⇑f ∘ P) (⇑f ∘ Q) = ⇑f ∘ W'.addXYZ P Q


theorem pullbackCompatible_iff (x : FamilyOfElements P R) [R.hasPullbacks] :
    x.Compatible ↔ x.PullbackCompatible

{P : CategoryTheory.Functor Cᵒᵖ (Type w)}

(x : CategoryTheory.Presieve.FamilyOfElements P R)


/-- The image under a ring homomorphism of the subsemiring generated by a set equals
the subsemiring generated by the image of the set. -/
theorem map_closureS (f : R →+* S) (s : Set R) : (closure s).map f = closure (f '' s)

{R : Type u}
{S : Type v}
[NonAssocSemiring R]
[NonAssocSemiring S]
(f : R →+* S)
(s : Set R)

Subsemiring.map f (Subsemiring.closure s) = Subsemiring.closure (⇑f '' s)


@[simp]
theorem blockDiagonal_smul {R : Type*} [Monoid R] [AddMonoid α] [DistribMulAction R α] (x : R)
    (M : o → Matrix m n α) : blockDiagonal (x • M) = x • blockDiagonal M

{m : Type u_2}
{n : Type u_3}
{o : Type u_4}
{α : Type u_12}
[DecidableEq o]
{R : Type u_14}
[Monoid R]
[AddMonoid α]
[DistribMulAction R α]
(x : R)
(M : o → Matrix m n α)

Matrix.blockDiagonal (x • M) = x • Matrix.blockDiagonal M


theorem HasDerivWithinAt.clm_apply (hc : HasDerivWithinAt c c' s x)
    (hu : HasDerivWithinAt u u' s x) :
    HasDerivWithinAt (fun y => (c y) (u y)) (c' (u x) + c x u') s x

{𝕜 : Type u}
[NontriviallyNormedField 𝕜]
{F : Type v}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{x : 𝕜}
{s : Set 𝕜}
{G : Type u_2}
[NormedAddCommGroup G]
[NormedSpace 𝕜 G]
{c : 𝕜 → F →L[𝕜] G}
{c' : F →L[𝕜] G}
{u : 𝕜 → F}
{u' : F}
(hc : HasDerivWithinAt c c' s x)
(hu : HasDerivWithinAt u u' s x)

HasDerivWithinAt (fun y => (c y) (u y)) (c' (u x) + (c x) u') s x


theorem Filter.Tendsto.bddAbove_range_of_cofinite [IsDirected α (· ≤ ·)]
    (h : Tendsto u cofinite (𝓝 a)) : BddAbove (Set.range u)

(h : Filter.Tendsto u Filter.cofinite (𝓝 a))


lemma aeval [Algebra R S] (hφ : φ.IsHomogeneous m)
    (g : σ → MvPolynomial τ S) (hg : ∀ i, (g i).IsHomogeneous n) :
    (aeval g φ).IsHomogeneous (n * m)

{σ : Type u_1}
{τ : Type u_2}
{R : Type u_3}
{S : Type u_4}
[CommSemiring R]
[CommSemiring S]
{φ : MvPolynomial σ R}
{m n : ℕ}
[Algebra R S]
(hφ : φ.IsHomogeneous m)
(g : σ → MvPolynomial τ S)
(hg : ∀ (i : σ), (g i).IsHomogeneous n)

((MvPolynomial.aeval g) φ).IsHomogeneous (n * m)


/-- `𝓞 K ⧸ Ideal.span {ζ - 1}` is finite. -/
lemma finite_quotient_toInteger_sub_one [NumberField K] {k : ℕ+} (hk : 1 < k)
    (hζ : IsPrimitiveRoot ζ k) : Finite (𝓞 K ⧸ Ideal.span {hζ.toInteger - 1})

{K : Type u}
[Field K]
{ζ : K}
[NumberField K]
{k : ℕ+}
(hk : 1 < k)
(hζ : IsPrimitiveRoot ζ ↑k)


theorem unitary.spectrum_subset_circle (u : unitary E) :
    spectrum 𝕜 (u : E) ⊆ Metric.sphere 0 1

{𝕜 : Type u_1}
[NormedField 𝕜]
{E : Type u_2}
[NormedRing E]
[StarRing E]
[CstarRing E]
[NormedAlgebra 𝕜 E]
[CompleteSpace E]
(u : ↥(unitary E))


@[to_additive]
theorem smul_set_iUnion (a : α) (s : ι → Set β) : (a • ⋃ i, s i) = ⋃ i, a • s i

{α : Type u_2}
{β : Type u_3}
{ι : Sort u_5}
[VAdd α β]
(a : α)
(s : ι → Set β)


lemma factorial_two_mul_le (n : ℕ) : (2 * n)! ≤ (2 * n) ^ n * n !

(2 * n).factorial ≤ (2 * n) ^ n * n.factorial


@[fun_prop]
theorem ContinuousOn.comp' {g : β → γ} {f : α → β} {s : Set α} {t : Set β} (hg : ContinuousOn g t)
    (hf : ContinuousOn f s) : ContinuousOn (g ∘ f) (s ∩ f ⁻¹' t)

{α : Type u_1}
{β : Type u_2}
{γ : Type u_3}
[TopologicalSpace α]
[TopologicalSpace β]
[TopologicalSpace γ]
{g : β → γ}
{f : α → β}
{s : Set α}
{t : Set β}
(hg : ContinuousOn g t)
(hf : ContinuousOn f s)


@[simp] theorem toNat_ofNatLt (x : Nat) (p : x < 2^w) : (x#'p).toNat = x


@[to_additive]
theorem Filter.mulIndicator_const_eventuallyEq [One β] {l : Filter α} {c : β} (hc : c ≠ 1)
    {s t : Set α} : s.mulIndicator (fun _ ↦ c) =ᶠ[l] t.mulIndicator (fun _ ↦ c) ↔ s =ᶠ[l] t

{α : Type u_1}
{β : Type u_2}
[Zero β]
{l : Filter α}
{c : β}
(hc : c ≠ 0)
{s t : Set α}

((s.indicator fun x => c) =ᶠ[l] t.indicator fun x => c) ↔ s =ᶠ[l] t


@[to_additive abs_norm_sub_norm_le]
theorem abs_norm_sub_norm_le' (a b : E) : |‖a‖ - ‖b‖| ≤ ‖a / b‖

{E : Type u_6}
[SeminormedAddGroup E]
(a b : E)


theorem differentiableAt_GammaAux (s : ℂ) (n : ℕ) (h1 : 1 - s.re < n) (h2 : ∀ m : ℕ, s ≠ -m) :
    DifferentiableAt ℂ (GammaAux n) s

DifferentiableAt ℂ (Complex.GammaAux n) s


private theorem Gamma_integrand_deriv_integrable_B {s : ℂ} (hs : 0 < s.re) {Y : ℝ} (hY : 0 ≤ Y) :
    IntervalIntegrable (fun x : ℝ => (-x).exp * (s * x ^ (s - 1)) : ℝ → ℂ) volume 0 Y

IntervalIntegrable (fun x => ↑(rexp (-x)) * (s * ↑x ^ (s - 1))) MeasureTheory.volume 0 Y


@[simp]
theorem dualTensorIsoLinHom_hom_hom : (dualTensorIsoLinHom ρV W).hom.hom = dualTensorHom k V W

{k G V : Type u}
[Field k]
[Group G]
[AddCommGroup V]
[Module k V]
[FiniteDimensional k V]
(ρV : Representation k G V)
(W : FDRep k G)

(FDRep.dualTensorIsoLinHom ρV W).hom.hom = dualTensorHom k V (CoeSort.coe W)


@[simp]
theorem finSuccEquiv_zero : (finSuccEquiv n) 0 = none


theorem Exists.fst {b : Prop} {p : b → Prop} : Exists p → b


theorem integralClosure.isIntegral (x : integralClosure R A) : IsIntegral R x

{R : Type u_1}
{A : Type u_2}
[CommRing R]
[CommRing A]
[Algebra R A]
(x : ↥(integralClosure R A))


lemma isSheaf_iff_of_isGeneratedByOneHypercovers
    [GrothendieckTopology.IsGeneratedByOneHypercovers.{w} J] (P : Cᵒᵖ ⥤ A) :
    IsSheaf J P ↔ ∀ ⦃X : C⦄ (E : GrothendieckTopology.OneHypercover.{w} J X),
        Nonempty (IsLimit (E.multifork P))

(J : CategoryTheory.GrothendieckTopology C)

CategoryTheory.Presheaf.IsSheaf J P ↔
  ∀ ⦃X : C⦄ (E : J.OneHypercover X), Nonempty (CategoryTheory.Limits.IsLimit (E.multifork P))


@[simp]
theorem polar_add_left (x x' y : M) : polar Q (x + x') y = polar Q x y + polar Q x' y

{R : Type u_3}
{M : Type u_4}
{N : Type u_5}
[CommRing R]
[AddCommGroup M]
[AddCommGroup N]
[Module R M]
[Module R N]
(Q : QuadraticMap R M N)
(x x' y : M)

QuadraticMap.polar (⇑Q) (x + x') y = QuadraticMap.polar (⇑Q) x y + QuadraticMap.polar (⇑Q) x' y


@[simp]
theorem neg_left_iff : SemiconjBy (-a) x y ↔ SemiconjBy a x y

{R : Type x}
[Mul R]
[HasDistribNeg R]
{a x y : R}


/-- Product of a list of elements in an intermediate_field is in the intermediate_field. -/
protected theorem list_prod_mem {l : List L} : (∀ x ∈ l, x ∈ S) → l.prod ∈ S

{K : Type u_1}
{L : Type u_2}
[Field K]
[Field L]
[Algebra K L]
(S : IntermediateField K L)
{l : List L}


/-- Constructs an equivalence between bounded orders from an order isomorphism between them. -/
@[simps]
def Iso.mk {α β : BddOrd.{u}} (e : α ≃o β) : α ≅ β

{α β : BddOrd}
(e : ↑α.toPartOrd ≃o ↑β.toPartOrd)


/-- The image of a bicone under a functor. -/
@[simps]
def mapBicone {f : J → C} (b : Bicone f) : Bicone (F.obj ∘ f)


theorem mem_uIcc' : a ∈ [[b, c]] ↔ b ≤ a ∧ a ≤ c ∨ c ≤ a ∧ a ≤ b

{α : Type u_2}
[LinearOrder α]
[LocallyFiniteOrder α]
{a b c : α}


/-- RHS form is used, e.g., in the definition of `UniformSpace`. -/
lemma mem_comap_prod_mk {x : α} {s : Set β} {F : Filter (α × β)} :
    s ∈ comap (Prod.mk x) F ↔ {p : α × β | p.fst = x → p.snd ∈ s} ∈ F

{α : Type u}
{β : Type v}
{x : α}
{s : Set β}
{F : Filter (α × β)}

s ∈ Filter.comap (Prod.mk x) F ↔ {p | p.1 = x → p.2 ∈ s} ∈ F


/-- If `a` is any solution, then one of `a`, `a⁻¹`, `-a`, `-a⁻¹` has
positive `x` and nonnegative `y`. -/
theorem exists_pos_variant (h₀ : 0 < d) (a : Solution₁ d) :
    ∃ b : Solution₁ d, 0 < b.x ∧ 0 ≤ b.y ∧ a ∈ ({b, b⁻¹, -b, -b⁻¹} : Set (Solution₁ d))

{d : ℤ}
(h₀ : 0 < d)
(a : Pell.Solution₁ d)

∃ b, 0 < b.x ∧ 0 ≤ b.y ∧ a ∈ {b, b⁻¹, -b, -b⁻¹}


theorem oscillationWithin_eq_zero [TopologicalSpace E] {f : E → F} {D : Set E}
    {x : E} (hf : ContinuousWithinAt f D x) : oscillationWithin f D x = 0

{E : Type u}
{F : Type v}
[PseudoEMetricSpace F]
[TopologicalSpace E]
{f : E → F}
{D : Set E}
{x : E}
(hf : ContinuousWithinAt f D x)


theorem isSheaf_on_punit_of_isTerminal (F : Presheaf C (TopCat.of PUnit))
    (it : IsTerminal <| F.obj <| op ⊥) : F.IsSheaf

(F : TopCat.Presheaf C (TopCat.of PUnit.{u_1 + 1}))

(it : CategoryTheory.Limits.IsTerminal (F.obj (Opposite.op ⊥)))


@[simp]
theorem _root_.Matrix.separatingLeft_toLinearMap₂'_iff {M : Matrix ι ι R₁} :
    (Matrix.toLinearMap₂' R₁ M).SeparatingLeft (R := R₁) ↔ M.Nondegenerate

{R₁ : Type u_2}
{ι : Type u_16}
[CommRing R₁]
[DecidableEq ι]
[Fintype ι]
{M : Matrix ι ι R₁}

((Matrix.toLinearMap₂' R₁) M).SeparatingLeft ↔ M.Nondegenerate


@[simp]
theorem fderiv_sinh (hc : DifferentiableAt ℝ f x) :
    fderiv ℝ (fun x => Real.sinh (f x)) x = Real.cosh (f x) • fderiv ℝ f x

{E : Type u_1}
[NormedAddCommGroup E]
[NormedSpace ℝ E]
{f : E → ℝ}
{x : E}
(hc : DifferentiableAt ℝ f x)


@[simp]
theorem coeSubmodule_mul (I J : Ideal R) :
    coeSubmodule S (I * J) = coeSubmodule S I * coeSubmodule S J

{R : Type u_1}
[CommRing R]
(S : Type u_2)
[CommRing S]
[Algebra R S]
(I J : Ideal R)

IsLocalization.coeSubmodule S (I * J) = IsLocalization.coeSubmodule S I * IsLocalization.coeSubmodule S J


/-- An integral domain is equal to the intersection of its localizations at all its maximal ideals
viewed as subalgebras of its field of fractions. -/
theorem iInf_localization_eq_bot : (⨅ v : MaximalSpectrum R,
    Localization.subalgebra.ofField K _ v.asIdeal.primeCompl_le_nonZeroDivisors) = ⊥

(R : Type u)
[CommRing R]
[IsDomain R]
(K : Type v)
[Field K]
[Algebra R K]
[IsFractionRing R K]

⨅ v, Localization.subalgebra.ofField K v.asIdeal.primeCompl ⋯ = ⊥


/-- Fundamental theorem of calculus: if `f : ℝ → E` is integrable on `a..b` and `f x` has a finite
limit `c` almost surely as `x` tends to `a` from the right or from the left,
then `u ↦ ∫ x in u..b, f x` has right (resp., left) derivative `-c` at `a`. -/
theorem integral_hasDerivWithinAt_of_tendsto_ae_left (hf : IntervalIntegrable f volume a b)
    {s t : Set ℝ} [FTCFilter a (𝓝[s] a) (𝓝[t] a)] (hmeas : StronglyMeasurableAtFilter f (𝓝[t] a))
    (ha : Tendsto f (𝓝[t] a ⊓ ae volume) (𝓝 c)) :
    HasDerivWithinAt (fun u => ∫ x in u..b, f x) (-c) s a

(hf : IntervalIntegrable f MeasureTheory.volume a b)

[intervalIntegral.FTCFilter a (𝓝[s] a) (𝓝[t] a)]

(hmeas : StronglyMeasurableAtFilter f (𝓝[t] a) MeasureTheory.volume)

(ha : Filter.Tendsto f (𝓝[t] a ⊓ MeasureTheory.ae MeasureTheory.volume) (𝓝 c))

HasDerivWithinAt (fun u => ∫ (x : ℝ) in u..b, f x) (-c) s a


@[simp]
lemma homMap_id  :
    Φ.homMap L₁ L₂ (𝟙 (L₁.obj X)) = 𝟙 (L₂.obj (Φ.functor.obj X))

{W₁ : CategoryTheory.MorphismProperty C₁}

{W₂ : CategoryTheory.MorphismProperty C₂}

(Φ : CategoryTheory.LocalizerMorphism W₁ W₂)

Φ.homMap L₁ L₂ (CategoryTheory.CategoryStruct.id (L₁.obj X)) =
  CategoryTheory.CategoryStruct.id (L₂.obj (Φ.functor.obj X))


/-- A directed system is a functor from a category (directed poset) to another category. -/
class DirectedSystem (f : ∀ i j, i ≤ j → G i → G j) : Prop where
  map_self' : ∀ i x h, f i i h x = x
  map_map' : ∀ {i j k} (hij hjk x), f j k hjk (f i j hij x) = f i k (le_trans hij hjk) x

{ι : Type v}
[Preorder ι]
{G : ι → Type w}
{f : (i j : ι) → i ≤ j → G i → G j}
[self : DirectedSystem G f]
{i j k : ι}
(hij : i ≤ j)
(hjk : j ≤ k)
(x : G i)


/-- An alternative form of the equation, suitable for rewriting `x^2`. -/
theorem prop_x (a : Solution₁ d) : a.x ^ 2 = 1 + d * a.y ^ 2


@[simp]
theorem eq_top_iff (I : HomogeneousIdeal 𝒜) : I = ⊤ ↔ I.toIdeal = ⊤

{ι : Type u_1}
{σ : Type u_2}
{A : Type u_4}
[Semiring A]
[DecidableEq ι]
[AddMonoid ι]
[SetLike σ A]
[AddSubmonoidClass σ A]
{𝒜 : ι → σ}
[GradedRing 𝒜]
(I : HomogeneousIdeal 𝒜)


theorem untrop_injective : Function.Injective (untrop : Tropical R → R)


@[simp]
theorem Limit.lift_π_apply' (F : J ⥤ Type v) (s : Cone F) (j : J) (x : s.pt) :
    limit.π F j (limit.lift F s x) = s.π.app j x

{J : Type v}
[CategoryTheory.Category.{w, v} J]
(F : J ⥤ Type v)
(s : CategoryTheory.Limits.Cone F)
(j : J)
(x : s.pt)

CategoryTheory.Limits.limit.π F j (CategoryTheory.Limits.limit.lift F s x) = s.π.app j x


theorem iSup_emptyset {f : β → α} : ⨆ x ∈ (∅ : Set β), f x = ⊥

{α : Type u_1}
{β : Type u_2}
[CompleteLattice α]
{f : β → α}


theorem add [Preorder E] [CovariantClass E E (· + ·) (· ≤ ·)] (hf : Supermartingale f ℱ μ)
    (hg : Supermartingale g ℱ μ) : Supermartingale (f + g) ℱ μ

[CovariantClass E E (fun x x_1 => x + x_1) fun x x_1 => x ≤ x_1]

(hf : MeasureTheory.Supermartingale f ℱ μ)

(hg : MeasureTheory.Supermartingale g ℱ μ)

MeasureTheory.Supermartingale (f + g) ℱ μ


theorem restrictDvd_surjective (hpq : p ∣ q) (hq : q ≠ 0) :
    Function.Surjective (restrictDvd hpq)

{F : Type u_1}
[Field F]
{p q : F[X]}
(hpq : p ∣ q)
(hq : q ≠ 0)


@[to_additive (attr := simp) add_lt_iff_neg_right]
theorem mul_lt_iff_lt_one_right' [CovariantClass α α (swap (· * ·)) (· < ·)]
    [ContravariantClass α α (swap (· * ·)) (· < ·)] {a : α} (b : α) : a * b < b ↔ a < 1

[CovariantClass α α (Function.swap fun x x_1 => x + x_1) fun x x_1 => x < x_1]

[ContravariantClass α α (Function.swap fun x x_1 => x + x_1) fun x x_1 => x < x_1]


theorem add_eq_right_iff {x y : Tropical R} : x + y = y ↔ y ≤ x

{R : Type u}
[LinearOrder R]
{x y : Tropical R}


theorem toNonUnitalSemiring_injective :
    Function.Injective (@toNonUnitalSemiring R)


@[to_additive]
theorem mul_subset_mul_right : s₁ ⊆ s₂ → s₁ * t ⊆ s₂ * t

{α : Type u_2}
[DecidableEq α]
[Add α]
{s₁ s₂ t : Finset α}


theorem Ioc_mem_nhdsWithin_Iio' (H : a < b) : Ioc a b ∈ 𝓝[<] b

{α : Type u}
[TopologicalSpace α]
[LinearOrder α]
[ClosedIicTopology α]
{a b : α}
(H : a < b)


/-- Given `u : α → β` a uniform inducing map, a family `𝓕 : ι → X → α` is equicontinuous at a point
`x₀ : X` iff the family `𝓕'`, obtained by composing each function of `𝓕` by `u`, is
equicontinuous at `x₀`. -/
theorem UniformInducing.equicontinuousAt_iff {F : ι → X → α} {x₀ : X} {u : α → β}
    (hu : UniformInducing u) : EquicontinuousAt F x₀ ↔ EquicontinuousAt ((u ∘ ·) ∘ F) x₀

{ι : Type u_1}
{X : Type u_3}
{α : Type u_7}
{β : Type u_9}
[tX : TopologicalSpace X]
[uα : UniformSpace α]
[uβ : UniformSpace β]
{F : ι → X → α}
{x₀ : X}
{u : α → β}
(hu : UniformInducing u)

EquicontinuousAt F x₀ ↔ EquicontinuousAt ((fun x => u ∘ x) ∘ F) x₀


@[to_additive]
theorem ThreeGPFree.le_mulRothNumber (hs : ThreeGPFree (s : Set α)) (h : s ⊆ t) :
    s.card ≤ mulRothNumber t

{α : Type u_2}
[DecidableEq α]
[Monoid α]
{s t : Finset α}
(hs : ThreeGPFree ↑s)
(h : s ⊆ t)


@[to_additive]
theorem tendsto_inv (a : G) : Tendsto Inv.inv (𝓝 a) (𝓝 a⁻¹)

{G : Type w}
[TopologicalSpace G]
[Inv G]
[ContinuousInv G]
(a : G)


protected theorem ContMDiffWithinAt.coordChangeL
    (hf : ContMDiffWithinAt IM IB n f s x) (he : f x ∈ e.baseSet) (he' : f x ∈ e'.baseSet) :
    ContMDiffWithinAt IM 𝓘(𝕜, F →L[𝕜] F) n (fun y ↦ (e.coordChangeL 𝕜 e' (f y) : F →L[𝕜] F)) s x

[TopologicalSpace (Bundle.TotalSpace F E)]

{e e' : Trivialization F Bundle.TotalSpace.proj}

ContMDiffWithinAt IM 𝓘(𝕜, F →L[𝕜] F) n (fun y => ↑(Trivialization.coordChangeL 𝕜 e e' (f y))) s x


@[simp]
theorem coe_mulRight [NonUnitalNonAssocSemiring R] (r : R) :
    (mulRight r) = (· * r)

{R : Type u_1}
[NonUnitalNonAssocSemiring R]
(r : R)

⇑(AddMonoidHom.mulRight r) = fun x => x * r


/-- A map out of a sum type is continuous iff its restriction to each summand is. -/
@[simp]
theorem continuous_sigma_iff {f : Sigma σ → X} :
    Continuous f ↔ ∀ i, Continuous fun a => f ⟨i, a⟩

{X : Type u}
{ι : Type u_5}
{σ : ι → Type u_7}
[(i : ι) → TopologicalSpace (σ i)]
[TopologicalSpace X]
{f : Sigma σ → X}

Continuous f ↔ ∀ (i : ι), Continuous fun a => f ⟨i, a⟩


/-- Two bilinear maps are equal when they are equal on all basis vectors. -/
theorem ext_basis {B B' : M →ₛₗ[ρ₁₂] N →ₛₗ[σ₁₂] P} (h : ∀ i j, B (b₁ i) (b₂ j) = B' (b₁ i) (b₂ j)) :
    B = B'


@[simp]
theorem modByMonic_X_sub_C_eq_C_eval (p : R[X]) (a : R) : p %ₘ (X - C a) = C (p.eval a)

{R : Type u}
[CommRing R]
(p : R[X])
(a : R)

p %ₘ (Polynomial.X - Polynomial.C a) = Polynomial.C (Polynomial.eval a p)


theorem range_indicator {s : Set α} (hs : MeasurableSet s) (hs_nonempty : s.Nonempty)
    (hs_ne_univ : s ≠ univ) (x y : β) :
    (piecewise s hs (const α x) (const α y)).range = {x, y}

{α : Type u_1}
{β : Type u_2}
[MeasurableSpace α]
{s : Set α}
(hs : MeasurableSet s)
(hs_nonempty : s.Nonempty)
(hs_ne_univ : s ≠ Set.univ)
(x y : β)

(MeasureTheory.SimpleFunc.piecewise s hs (MeasureTheory.SimpleFunc.const α x)
      (MeasureTheory.SimpleFunc.const α y)).range =
  {x, y}


@[to_additive (attr := ext)]
theorem MonoidHom.ext [MulOneClass M] [MulOneClass N] ⦃f g : M →* N⦄ (h : ∀ x, f x = g x) : f = g

{M : Type u_4}
{N : Type u_5}
[MulOneClass M]
[MulOneClass N]
⦃f g : M →* N⦄
(h : ∀ (x : M), f x = g x)


theorem Directed.finite_le (D : Directed r f) (g : β → γ) : ∃ z, ∀ i, r (f (g i)) (f z)

{α : Type u_1}
{r : α → α → Prop}
[IsTrans α r]
{β : Type u_2}
{γ : Type u_3}
[Nonempty γ]
{f : γ → α}
[Finite β]
(D : Directed r f)
(g : β → γ)


private theorem fin_cast_val (e : n = n') (i : Fin n) : e ▸ i = ⟨i.1, e ▸ i.2⟩

e ▸ i = ⟨↑i, ⋯⟩


theorem Ici_prod_eq (a : α × β) : Ici a = Ici a.1 ×ˢ Ici a.2

{α : Type u_1}
{β : Type u_2}
[Preorder α]
[Preorder β]
(a : α × β)


@[simp]
theorem fst_intCast (n : ℤ) : (n : X q).fst = (n : ZMod q)


theorem derivative_sq (p : R[X]) : derivative (p ^ 2) = C 2 * p * derivative p

{R : Type u}
[CommSemiring R]
(p : R[X])

Polynomial.derivative (p ^ 2) = Polynomial.C 2 * p * Polynomial.derivative p


@[to_additive]
theorem mulSupport_curry' (f : α × β → M) :
    (mulSupport fun a b ↦ f (a, b)) = (mulSupport f).image Prod.fst

{α : Type u_1}
{β : Type u_2}
{M : Type u_5}
[Zero M]
(f : α × β → M)

(Function.support fun a b => f (a, b)) = Prod.fst '' Function.support f


/-- If both `f` and `f ∘ φ` have unit speed (on `t` and `s` respectively) and `φ`
monotonically maps `s` onto `t`, then `φ` is just a translation (on `s`).
-/
theorem unique_unit_speed {φ : ℝ → ℝ} (φm : MonotoneOn φ s) (hfφ : HasUnitSpeedOn (f ∘ φ) s)
    (hf : HasUnitSpeedOn f (φ '' s)) ⦃x : ℝ⦄ (xs : x ∈ s) : EqOn φ (fun y => y - x + φ x) s

{E : Type u_2}
[PseudoEMetricSpace E]
{f : ℝ → E}
{s : Set ℝ}
{φ : ℝ → ℝ}
(φm : MonotoneOn φ s)
(hfφ : HasUnitSpeedOn (f ∘ φ) s)
(hf : HasUnitSpeedOn f (φ '' s))
⦃x : ℝ⦄
(xs : x ∈ s)


@[simp] theorem uniqueBaseOn_self (I : Set α) : uniqueBaseOn I I = freeOn I

Matroid.uniqueBaseOn I I = Matroid.freeOn I


@[simp]
protected theorem coe_toBasis (b : OrthonormalBasis ι 𝕜 E) : (⇑b.toBasis : ι → E) = ⇑b

{ι : Type u_1}
{𝕜 : Type u_3}
[RCLike 𝕜]
{E : Type u_4}
[NormedAddCommGroup E]
[InnerProductSpace 𝕜 E]
[Fintype ι]
(b : OrthonormalBasis ι 𝕜 E)


theorem covBy_succ_of_not_isMax (h : ¬IsMax a) : a ⋖ succ a

{α : Type u_1}
[Preorder α]
[SuccOrder α]
{a : α}
(h : ¬IsMax a)


theorem isBigO_cocompact_rpow [ProperSpace E] (s : ℝ) :
    f =O[cocompact E] fun x => ‖x‖ ^ s

{E : Type u_4}
{F : Type u_5}
[NormedAddCommGroup E]
[NormedSpace ℝ E]
[NormedAddCommGroup F]
[NormedSpace ℝ F]
(f : SchwartzMap E F)
[ProperSpace E]
(s : ℝ)

⇑f =O[Filter.cocompact E] fun x => ‖x‖ ^ s


/-- This is Proposition 4.18 from [carter2005] except that we use
`LieModule.exists_forall_lie_eq_smul` instead of Lie's theorem (and so avoid
assuming `K` has characteristic zero). -/
lemma cartanEquivDual_symm_apply_mem_corootSpace (α : Weight K H L) :
    (cartanEquivDual H).symm α ∈ corootSpace α

(K : Type u_2)
(L : Type u_3)
[LieRing L]
[Field K]
[LieAlgebra K L]
[FiniteDimensional K L]
(H : LieSubalgebra K L)
[H.IsCartanSubalgebra]
[LieModule.IsTriangularizable K (↥H) L]
[LieAlgebra.IsKilling K L]
(α : LieModule.Weight K (↥H) L)

(LieAlgebra.IsKilling.cartanEquivDual H).symm (LieModule.Weight.toLinear K (↥H) L α) ∈ LieAlgebra.corootSpace ⇑α


/-- Version of `AnalyticAt.comp` where point equality is a separate hypothesis. -/
theorem AnalyticAt.comp_of_eq {g : F → G} {f : E → F} {y : F} {x : E} (hg : AnalyticAt 𝕜 g y)
    (hf : AnalyticAt 𝕜 f x) (hy : f x = y) : AnalyticAt 𝕜 (g ∘ f) x

{𝕜 : Type u_1}
{E : Type u_2}
{F : Type u_3}
{G : Type u_4}
[NontriviallyNormedField 𝕜]
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
[NormedAddCommGroup G]
[NormedSpace 𝕜 G]
{g : F → G}
{f : E → F}
{y : F}
{x : E}
(hg : AnalyticAt 𝕜 g y)
(hf : AnalyticAt 𝕜 f x)
(hy : f x = y)


@[simp]
theorem coe_floor_self (k : K) : (floor (Basis.singleton ι K) k : K) = ⌊k⌋

{ι : Type u_2}
{K : Type u_3}
[NormedLinearOrderedField K]
[FloorRing K]
[Fintype ι]
[Unique ι]
(k : K)

↑(Zspan.floor (Basis.singleton ι K) k) = ↑⌊k⌋


protected theorem add_assoc : ∀ a b c : Int, a + b + c = a + (b + c)


@[simp]
theorem compl_iInter (s : ι → Set β) : (⋂ i, s i)ᶜ = ⋃ i, (s i)ᶜ

{β : Type u_2}
{ι : Sort u_4}
(s : ι → Set β)


/-- If a function is integrable on a set `s`, and vanishes on `t \ s`, then it is integrable on `t`
if `t` is measurable. -/
theorem IntegrableOn.of_forall_diff_eq_zero (hf : IntegrableOn f s μ) (ht : MeasurableSet t)
    (h't : ∀ x ∈ t \ s, f x = 0) : IntegrableOn f t μ

{α : Type u_1}
{E : Type u_3}
[MeasurableSpace α]
[NormedAddCommGroup E]
{f : α → E}
{s t : Set α}
{μ : MeasureTheory.Measure α}
(hf : MeasureTheory.IntegrableOn f s μ)
(ht : MeasurableSet t)
(h't : ∀ x ∈ t \ s, f x = 0)


@[simp]
theorem image_emetric_ball (h : α ≃ᵢ β) (x : α) (r : ℝ≥0∞) :
    h '' EMetric.ball x r = EMetric.ball (h x) r

{α : Type u}
{β : Type v}
[PseudoEMetricSpace α]
[PseudoEMetricSpace β]
(h : α ≃ᵢ β)
(x : α)
(r : ℝ≥0∞)

⇑h '' EMetric.ball x r = EMetric.ball (h x) r


theorem IsLittleO.natCast_atTop {R : Type*} [StrictOrderedSemiring R] [Archimedean R]
    {f : R → E} {g : R → F} (h : f =o[atTop] g) :
    (fun (n : ℕ) => f n) =o[atTop] (fun n => g n)

{E : Type u_3}
{F : Type u_4}
[Norm E]
[Norm F]
{R : Type u_17}
[StrictOrderedSemiring R]
[Archimedean R]
{f : R → E}
{g : R → F}
(h : f =o[Filter.atTop] g)

(fun n => f ↑n) =o[Filter.atTop] fun n => g ↑n


lemma isCompl_ker_weight_span_coroot (α : Weight K H L) :
    IsCompl α.ker (K ∙ coroot α)

{K : Type u_2}
{L : Type u_3}
[LieRing L]
[Field K]
[LieAlgebra K L]
[FiniteDimensional K L]
{H : LieSubalgebra K L}
[H.IsCartanSubalgebra]
[LieModule.IsTriangularizable K (↥H) L]
[LieAlgebra.IsKilling K L]
[CharZero K]
(α : LieModule.Weight K (↥H) L)

IsCompl LieModule.Weight.ker (Submodule.span K {LieAlgebra.IsKilling.coroot α})


theorem inf_congr_left (hb : a ⊓ c ≤ b) (hc : a ⊓ b ≤ c) : a ⊓ b = a ⊓ c

{α : Type u}
[SemilatticeInf α]
{a b c : α}
(hb : a ⊓ c ≤ b)
(hc : a ⊓ b ≤ c)


theorem memℒp_indicator_const (p : ℝ≥0∞) (hs : MeasurableSet s) (c : E) (hμsc : c = 0 ∨ μ s ≠ ∞) :
    Memℒp (s.indicator fun _ => c) p μ

{α : Type u_1}
{E : Type u_2}
{m0 : MeasurableSpace α}
{μ : MeasureTheory.Measure α}
[NormedAddCommGroup E]
{s : Set α}
(p : ℝ≥0∞)
(hs : MeasurableSet s)
(c : E)
(hμsc : c = 0 ∨ μ s ≠ ⊤)

MeasureTheory.Memℒp (s.indicator fun x => c) p μ


theorem decomposition_id (Δ : SimplexCategoryᵒᵖ) :
    𝟙 (X.obj Δ) = ∑ A : IndexSet Δ, s.πSummand A ≫ (s.cofan Δ).inj A

{C : Type u_1}
[CategoryTheory.Category.{u_2, u_1} C]
{X : CategoryTheory.SimplicialObject C}
(s : SimplicialObject.Splitting X)
[CategoryTheory.Preadditive C]
(Δ : SimplexCategoryᵒᵖ)

𝟙 (X.obj Δ) = ∑ A : SimplicialObject.Splitting.IndexSet Δ, s.πSummand A ≫ (s.cofan Δ).inj A


theorem bot_topologicalSpace_eq_generateFrom_of_pred_succOrder [PartialOrder α] [PredOrder α]
    [SuccOrder α] [NoMinOrder α] [NoMaxOrder α] :
    (⊥ : TopologicalSpace α) = generateFrom { s | ∃ a, s = Ioi a ∨ s = Iio a }

{α : Type u_1}
[PartialOrder α]
[PredOrder α]
[SuccOrder α]
[NoMinOrder α]
[NoMaxOrder α]

⊥ = TopologicalSpace.generateFrom {s | ∃ a, s = Set.Ioi a ∨ s = Set.Iio a}


theorem IsOrtho.polar_eq_zero {x y : M} (h : IsOrtho Q x y) : polar Q x y = 0

{R : Type u_3}
{M : Type u_4}
{N : Type u_5}
[CommRing R]
[AddCommGroup M]
[Module R M]
[AddCommGroup N]
[Module R N]
{Q : QuadraticMap R M N}
{x y : M}
(h : Q.IsOrtho x y)


/-- The equivalence induced by `PartialFunToPointed` and `PointedToPartialFun`.
`Part.equivOption` made functorial. -/
@[simps!]
noncomputable def partialFunEquivPointed : PartialFun.{u} ≌ Pointed

(X : Pointed)
(a : ((𝟭 Pointed).obj X).X)

(partialFunEquivPointed.counitIso.inv.app X).toFun a = if h : a = X.point then none else some ⟨a, h⟩


@[simp, norm_cast]
theorem coe_inf (S T : NonUnitalStarSubalgebra R A) : (↑(S ⊓ T) : Set A) = (S : Set A) ∩ T

{R : Type u}
{A : Type v}
[CommSemiring R]
[StarRing R]
[NonUnitalSemiring A]
[StarRing A]
[Module R A]
[IsScalarTower R A A]
[SMulCommClass R A A]
[StarModule R A]
(S T : NonUnitalStarSubalgebra R A)


theorem singleton_seq {f : α → β} {t : Set α} : Set.seq ({f} : Set (α → β)) t = f '' t

{α : Type u_1}
{β : Type u_2}
{f : α → β}
{t : Set α}


@[simp]
theorem cycleType_cycleRange {n : ℕ} {i : Fin (n + 1)} (h0 : i ≠ 0) :
    cycleType (cycleRange i) = {(i + 1 : ℕ)}


theorem IsLowerSet.exists_subset_ball (hs : IsLowerSet s) (hx : x ∈ closure s) (hδ : 0 < δ) :
    ∃ y, closedBall y (δ / 4) ⊆ closedBall x δ ∧ closedBall y (δ / 4) ⊆ interior s

{ι : Type u_2}
[Fintype ι]
{s : Set (ι → ℝ)}
{x : ι → ℝ}
{δ : ℝ}
(hs : IsLowerSet s)
(hx : x ∈ closure s)
(hδ : 0 < δ)

∃ y, Metric.closedBall y (δ / 4) ⊆ Metric.closedBall x δ ∧ Metric.closedBall y (δ / 4) ⊆ interior s


theorem directed_id [IsDirected α r] : Directed r id

{α : Type u}
{r : α → α → Prop}
[IsDirected α r]


/-- Read off the continuity of a function `f : X → Z` at `x : X` by transferring via a
trivialization of `Z` containing `f x`. -/
theorem continuousAt_of_comp_left {X : Type*} [TopologicalSpace X] {f : X → Z} {x : X}
    (e : Trivialization F proj) (hf_proj : ContinuousAt (proj ∘ f) x) (he : proj (f x) ∈ e.baseSet)
    (hf : ContinuousAt (e ∘ f) x) : ContinuousAt f x

{B : Type u_2}
{F : Type u_3}
{Z : Type u_5}
[TopologicalSpace B]
[TopologicalSpace F]
{proj : Z → B}
[TopologicalSpace Z]
{X : Type u_6}
[TopologicalSpace X]
{f : X → Z}
{x : X}
(e : Trivialization F proj)
(hf_proj : ContinuousAt (proj ∘ f) x)
(he : proj (f x) ∈ e.baseSet)
(hf : ContinuousAt (↑e ∘ f) x)


theorem Ico_subset_Ico_left (h : a₁ ≤ a₂) : Ico a₂ b ⊆ Ico a₁ b

{α : Type u_2}
[Preorder α]
[LocallyFiniteOrder α]
{a₁ a₂ b : α}
(h : a₁ ≤ a₂)


@[simp]
theorem choose_zero_succ (k : ℕ) : choose 0 (succ k) = 0