/-- Lift a functor `F : C ⥤ D` to `WithInitial C ⥤ D`. -/
@[simps]
def lift {D : Type*} [Category D] {Z : D} (F : C ⥤ D) (M : ∀ x : C, Z ⟶ F.obj x)
    (hM : ∀ (x y : C) (f : x ⟶ y), M x ≫ F.map f = M y) : WithInitial C ⥤ D

(hM : ∀ (x y : C) (f : x ⟶ y), CategoryTheory.CategoryStruct.comp (M x) (F.map f) = M y)

(CategoryTheory.WithInitial.lift F M hM).map f =
  match X, Y, f with
  | CategoryTheory.WithInitial.of x, CategoryTheory.WithInitial.of y, f => F.map (CategoryTheory.WithInitial.down f)
  | CategoryTheory.WithInitial.star, CategoryTheory.WithInitial.of x, x_1 => M x
  | CategoryTheory.WithInitial.star, CategoryTheory.WithInitial.star, x =>
    CategoryTheory.CategoryStruct.id
      ((fun X =>
          match X with
          | CategoryTheory.WithInitial.of x => F.obj x
          | CategoryTheory.WithInitial.star => Z)
        CategoryTheory.WithInitial.star)


@[to_additive (attr := aesop safe 20 apply (rule_sets := [Measurable])) const_nsmul]
protected theorem pow [Monoid β] [ContinuousMul β] (hf : StronglyMeasurable f) (n : ℕ) :
    StronglyMeasurable (f ^ n)

(hf : MeasureTheory.StronglyMeasurable f)

MeasureTheory.StronglyMeasurable (f ^ n)


theorem IsOpenMap.continuousOn_range_of_leftInverse {f : α → β} (hf : IsOpenMap f) {finv : β → α}
    (hleft : Function.LeftInverse finv f) : ContinuousOn finv (range f)

{α : Type u_1}
{β : Type u_2}
[TopologicalSpace α]
[TopologicalSpace β]
{f : α → β}
(hf : IsOpenMap f)
{finv : β → α}
(hleft : Function.LeftInverse finv f)


/-- The functor `CostructuredArrow S T ⥤ CostructuredArrow U V` that is deduced from
a natural transformation `F ⋙ U ⟶ S ⋙ G` and a morphism `G.obj T ⟶ V` -/
@[simps!]
def map₂ : CostructuredArrow S T ⥤ CostructuredArrow U V

(X : CategoryTheory.Comma S (CategoryTheory.Functor.fromPUnit T))

((CategoryTheory.CostructuredArrow.map₂ α β).obj X).hom =
  CategoryTheory.CategoryStruct.comp (α.app X.left) (CategoryTheory.CategoryStruct.comp (G.map X.hom) β)


@[to_additive (attr := simp) const_neg']
theorem const_lt_one : const β a < 1 ↔ a < 1

{α : Type u_3}
{β : Type u_4}
[Zero α]
[Preorder α]
{a : α}
[Nonempty β]


@[simp]
lemma smulRight_zero (f : M₁ →ₗ[R] S) : f.smulRight (0 : M) = 0

{R : Type u_1}
{S : Type u_4}
{M : Type u_5}
{M₁ : Type u_6}
[Semiring R]
[AddCommMonoid M]
[AddCommMonoid M₁]
[Module R M]
[Module R M₁]
[Semiring S]
[Module R S]
[Module S M]
[IsScalarTower R S M]
(f : M₁ →ₗ[R] S)


theorem _root_.MeasureTheory.Memℒp.sup {f g : α → E} (hf : Memℒp f p μ) (hg : Memℒp g p μ) :
    Memℒp (f ⊔ g) p μ

{α : Type u_1}
{E : Type u_2}
{m : MeasurableSpace α}
{μ : MeasureTheory.Measure α}
{p : ℝ≥0∞}
[NormedLatticeAddCommGroup E]
{f g : α → E}
(hf : MeasureTheory.Memℒp f p μ)
(hg : MeasureTheory.Memℒp g p μ)


@[simp]
theorem sign_add_pi (θ : Angle) : (θ + π).sign = -θ.sign


@[simp]
theorem algebraMap_apply (r : R) : algebraMap R (A × B) r = (algebraMap R A r, algebraMap R B r)

{R : Type u_1}
{A : Type u_2}
{B : Type u_3}
[CommSemiring R]
[Semiring A]
[Algebra R A]
[Semiring B]
[Algebra R B]
(r : R)

(algebraMap R (A × B)) r = ((algebraMap R A) r, (algebraMap R B) r)


@[simp]
theorem truncateAugment_hom_f (C : ChainComplex V ℕ) {X : V} (f : C.X 0 ⟶ X) (w : C.d 1 0 ≫ f = 0)
    (i : ℕ) : (truncateAugment C f w).hom.f i = 𝟙 (C.X i)

(C.truncateAugment f w).hom.f i = 𝟙 (C.X i)


lemma _root_.Even.intCast {n : ℤ} (h : Even n) : Even (n : α)

{α : Type u_3}
[AddGroupWithOne α]
{n : ℤ}
(h : Even n)


/-- Euler's Criterion: a nonzero `a : ZMod p` is a square if and only if `x ^ (p / 2) = 1`. -/
theorem euler_criterion {a : ZMod p} (ha : a ≠ 0) : IsSquare (a : ZMod p) ↔ a ^ (p / 2) = 1

(p : ℕ)
[Fact (Nat.Prime p)]
{a : ZMod p}
(ha : a ≠ 0)


theorem exists_effectiveEpi_iff_mem_induced (X : C) (S : Sieve X) :
    (∃ (Y : C) (π : Y ⟶ X),
      EffectiveEpi π ∧ S.arrows π) ↔
    (S ∈ F.inducedTopology (regularTopology _) X)

(∃ Y π, CategoryTheory.EffectiveEpi π ∧ S.arrows π) ↔
  S ∈ (F.inducedTopology (CategoryTheory.regularTopology D)).sieves X


theorem mem_wf : @WellFounded Class.{u} (· ∈ ·)


/-- The shift functor `Triangle C ⥤ Triangle C` by `n : ℤ` sends a triangle
to the triangle obtained by shifting the objects by `n` in `C` and by
multiplying the three morphisms by `(-1)^n`. -/
@[simps]
noncomputable def Triangle.shiftFunctor (n : ℤ) : Triangle C ⥤ Triangle C

(C : Type u)
[CategoryTheory.Category.{v, u} C]
[CategoryTheory.Preadditive C]
[CategoryTheory.HasShift C ℤ]
(n : ℤ)

∀ {X Y : CategoryTheory.Pretriangulated.Triangle C} (f : X ⟶ Y),
  ((CategoryTheory.Pretriangulated.Triangle.shiftFunctor C n).map f).hom₃ = (CategoryTheory.shiftFunctor C n).map f.hom₃


theorem pi_nonempty_iff : (s.pi t).Nonempty ↔ ∀ i, ∃ x, i ∈ s → x ∈ t i

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

(s.pi t).Nonempty ↔ ∀ (i : ι), ∃ x, i ∈ s → x ∈ t i


@[simp]
theorem mem_attach (s : Multiset α) : ∀ x, x ∈ s.attach

{α : Type u_1}
(s : Multiset α)
(x : { x // x ∈ s })


theorem withDensity_congr_ae {f g : α → ℝ≥0∞} (h : f =ᵐ[μ] g) :
    μ.withDensity f = μ.withDensity g

{α : Type u_1}
{m0 : MeasurableSpace α}
{μ : MeasureTheory.Measure α}
{f g : α → ℝ≥0∞}
(h : f =ᵐ[μ] g)


lemma addXYZ_of_Z_eq_zero_left {P Q : Fin 3 → R} (hP : W'.Equation P) (hPz : P z = 0) :
    W'.addXYZ P Q = (P x * Q z) • Q

{R : Type u}
[CommRing R]
{W' : WeierstrassCurve.Jacobian R}
{P Q : Fin 3 → R}
(hP : W'.Equation P)
(hPz : P z = 0)


theorem le_cardinalGenerate_iff_of_cardinalInterFilter {f : Filter α} [CardinalInterFilter f c]
    (hc : 2 < c) : f ≤ cardinalGenerate g hc ↔ g ⊆ f.sets

{α : Type u}
{c : Cardinal.{u}}
{g : Set (Set α)}
{f : Filter α}
[CardinalInterFilter f c]
(hc : 2 < c)

f ≤ Filter.cardinalGenerate g hc ↔ g ⊆ f.sets


/-- The Jacobi symbol takes only the values `0`, `1` and `-1`. -/
theorem trichotomy (a : ℤ) (b : ℕ) : J(a | b) = 0 ∨ J(a | b) = 1 ∨ J(a | b) = -1

jacobiSym a b = 0 ∨ jacobiSym a b = 1 ∨ jacobiSym a b = -1


theorem Ico_ae_eq_Ioc : Ico a b =ᵐ[μ] Ioc a b

{α : Type u_1}
{m0 : MeasurableSpace α}
{μ : MeasureTheory.Measure α}
[MeasureTheory.NoAtoms μ]
[PartialOrder α]
{a b : α}


theorem continuousAt_toIocMod : ContinuousAt (toIocMod hp a) x

{𝕜 : Type u_1}
[LinearOrderedAddCommGroup 𝕜]
[Archimedean 𝕜]
[TopologicalSpace 𝕜]
[OrderTopology 𝕜]
{p : 𝕜}
(hp : 0 < p)
(a : 𝕜)
{x : 𝕜}
(hx : ↑x ≠ ↑a)


/-- If a function is analytic on a set `s`, so is its derivative. -/
theorem AnalyticOn.deriv [CompleteSpace F] (h : AnalyticOn 𝕜 f s) : AnalyticOn 𝕜 (deriv f) s

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{F : Type v}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{f : 𝕜 → F}
{s : Set 𝕜}
[CompleteSpace F]
(h : AnalyticOn 𝕜 f s)


theorem lift_down {a : Ordinal.{u}} {b : Ordinal.{max u v}} (h : b ≤ lift.{v,u} a) :
    ∃ a', lift.{v,u} a' = b

{a : Ordinal.{u}}
{b : Ordinal.{max u v}}
(h : b ≤ Ordinal.lift.{v, u} a)


/-- `PUnit` is a left identity for type product up to an equivalence. -/
@[simps!]
def punitProd (α) : PUnit × α ≃ α

∀ (a : PUnit.{u_2 + 1} × α), (Equiv.punitProd α) a = a.2


@[simp]
theorem keys_replace (a : α) (b : β a) (s : Finmap β) : (replace a b s).keys = s.keys

{α : Type u}
{β : α → Type v}
[DecidableEq α]
(a : α)
(b : β a)
(s : Finmap β)


@[to_additive]
theorem universalMulHom_commutes {r : R} : universalMulHom f fS hf (numeratorHom r) = f r

{R : Type u_1}
[AddMonoid R]
{S : AddSubmonoid R}
[AddOreLocalization.AddOreSet S]
{T : Type u_2}
[AddMonoid T]
(f : R →+ T)
(fS : ↥S →+ AddUnits T)
(hf : ∀ (s : ↥S), f ↑s = ↑(fS s))
{r : R}

(AddOreLocalization.universalAddHom f fS hf) (AddOreLocalization.numeratorHom r) = f r


theorem projectQuotient_factors [HasColimits C] [PreservesColimits S] {A : CostructuredArrow S T} :
    ∀ P : Subobject (op A), ∃ q, S.map (projectQuotient P).arrow.unop ≫ q = A.hom

{A : CategoryTheory.CostructuredArrow S T}

(P : CategoryTheory.Subobject (Opposite.op A))

∃ q,
  CategoryTheory.CategoryStruct.comp (S.map (CategoryTheory.CostructuredArrow.projectQuotient P).arrow.unop) q = A.hom


@[reassoc (attr := simp)]
lemma LeftHomologyData.π_comp_homologyIso_inv (h : S.LeftHomologyData) :
    h.π ≫ h.homologyIso.inv = h.cyclesIso.inv ≫ S.homologyπ

CategoryTheory.CategoryStruct.comp h.π h.homologyIso.inv =
  CategoryTheory.CategoryStruct.comp h.cyclesIso.inv S.homologyπ


/-- The binary product functor. -/
@[simps]
def prod.functor : C ⥤ C ⥤ C

∀ {X Y : C} (f : X ⟶ Y) (T : C),
  (CategoryTheory.Limits.prod.functor.map f).app T = CategoryTheory.Limits.prod.map f (𝟙 T)


@[reassoc (attr := simp)]
theorem coprod.inl_map {W X Y Z : C} [HasBinaryCoproduct W X] [HasBinaryCoproduct Y Z] (f : W ⟶ Y)
    (g : X ⟶ Z) : coprod.inl ≫ coprod.map f g = f ≫ coprod.inl

CategoryTheory.Limits.coprod.inl ≫ CategoryTheory.Limits.coprod.map f g = f ≫ CategoryTheory.Limits.coprod.inl


theorem exists_ultrafilter_of_finite_inter_nonempty (S : Set (Set α))
    (cond : ∀ T : Finset (Set α), (↑T : Set (Set α)) ⊆ S → (⋂₀ (↑T : Set (Set α))).Nonempty) :
    ∃ F : Ultrafilter α, S ⊆ F.sets

(cond : ∀ (T : Finset (Set α)), ↑T ⊆ S → (⋂₀ ↑T).Nonempty)


@[to_additive (attr := simp low)]
theorem mk_mul_mk (x y : M) (hx : x ∈ S') (hy : y ∈ S') :
    (⟨x, hx⟩ : S') * ⟨y, hy⟩ = ⟨x * y, mul_mem hx hy⟩

{M : Type u_1}
{A : Type u_5}
[Add M]
[SetLike A M]
[hA : AddMemClass A M]
(S' : A)
(x y : M)
(hx : x ∈ S')
(hy : y ∈ S')


/-- If `C, D` has all limits of shape `J`, and `G` preserves them, then `preservesLimitsIso` is
functorial wrt `F`. -/
@[simps!]
def preservesLimitNatIso : lim ⋙ G ≅ (whiskeringRight J C D).obj G ⋙ lim

(CategoryTheory.preservesLimitNatIso G).inv.app X = (CategoryTheory.preservesLimitIso G X).inv


/-- The diagram describing the universal property for quotients of monoids commutes. -/
@[to_additive "The diagram describing the universal property for quotients of `AddMonoid`s
commutes."]
theorem lift_mk' (H : c ≤ ker f) (x) : c.lift f H (c.mk' x) = f x

{M : Type u_1}
{P : Type u_3}
[AddZeroClass M]
[AddZeroClass P]
{c : AddCon M}
{f : M →+ P}
(H : c ≤ AddCon.ker f)
(x : M)


@[simp]
theorem mul_lt_iff_lt_one_right [PosMulStrictMono α] [PosMulReflectLT α] (a0 : 0 < a) :
    a * b < a ↔ b < 1

{α : Type u_1}
{a b : α}
[MulOneClass α]
[Zero α]
[Preorder α]
[PosMulStrictMono α]
[PosMulReflectLT α]
(a0 : 0 < a)


@[simp]
protected theorem smul_neg : s • -t = -(s • t)

{α : Type u_2}
{β : Type u_3}
[Monoid α]
[AddGroup β]
[DistribMulAction α β]
(s : Set α)
(t : Set β)


@[simp]
theorem interedges_empty_left (t : Finset α) : G.interedges ∅ t = ∅

{α : Type u_4}
(G : SimpleGraph α)
[DecidableRel G.Adj]
(t : Finset α)


@[to_additive prod_mono]
theorem prod_mono : ((· ≤ ·) ⇒ (· ≤ ·) ⇒ (· ≤ ·)) (@prod G _ N _) (@prod G _ N _)

{G : Type u_1}
[AddGroup G]
{N : Type u_5}
[AddGroup N]

((fun x x_1 => x ≤ x_1) ⇒ (fun x x_1 => x ≤ x_1) ⇒ fun x x_1 => x ≤ x_1) AddSubgroup.prod AddSubgroup.prod


/-- A version of Hölder with multiple arguments -/
theorem lintegral_prod_norm_pow_le {α ι : Type*} [MeasurableSpace α] {μ : Measure α}
    (s : Finset ι) {f : ι → α → ℝ≥0∞} (hf : ∀ i ∈ s, AEMeasurable (f i) μ)
    {p : ι → ℝ} (hp : ∑ i ∈ s, p i = 1) (h2p : ∀ i ∈ s, 0 ≤ p i) :
    ∫⁻ a, ∏ i ∈ s, f i a ^ p i ∂μ ≤ ∏ i ∈ s, (∫⁻ a, f i a ∂μ) ^ p i

{α : Type u_2}
{ι : Type u_3}
[MeasurableSpace α]
{μ : MeasureTheory.Measure α}
(s : Finset ι)
{f : ι → α → ENNReal}
(hf : ∀ i ∈ s, AEMeasurable (f i) μ)
{p : ι → ℝ}
(hp : ∑ i ∈ s, p i = 1)
(h2p : ∀ i ∈ s, 0 ≤ p i)

∫⁻ (a : α), ∏ i ∈ s, f i a ^ p i ∂μ ≤ ∏ i ∈ s, (∫⁻ (a : α), f i a ∂μ) ^ p i


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

{α : Type u}
{β : Type v}
[OmegaCompletePartialOrder α]
[OmegaCompletePartialOrder β]
(f : α →𝒄 β)


@[to_additive]
theorem coe_center : ↑(center M) = Set.center M

↑(AddSubmonoid.center M) = Set.addCenter M


lemma tendsto_defaultRatCDF_atBot : Tendsto defaultRatCDF atBot (𝓝 0)

Filter.Tendsto ProbabilityTheory.defaultRatCDF Filter.atBot (𝓝 0)


/-- The equivalence between `C` and `AsSmall C`. -/
@[simps]
def AsSmall.equiv : C ≌ AsSmall C

{C : Type u₁}
[CategoryTheory.Category.{v₁, u₁} C]

CategoryTheory.AsSmall.equiv.counitIso = CategoryTheory.NatIso.ofComponents (fun X => CategoryTheory.eqToIso ⋯) ⋯


@[to_additive (attr := simp)]
lemma forget_map {X Y : CommMonCat} (f : X ⟶ Y) :
    (forget CommMonCat).map f = (f : X → Y)

(CategoryTheory.forget AddCommMonCat).map f = ⇑f


theorem integral_cos_mul_complex {z : ℂ} (hz : z ≠ 0) (a b : ℝ) :
    (∫ x in a..b, Complex.cos (z * x)) = Complex.sin (z * b) / z - Complex.sin (z * a) / z

∫ (x : ℝ) in a..b, Complex.cos (z * ↑x) = Complex.sin (z * ↑b) / z - Complex.sin (z * ↑a) / z


/-- One direction of the **Borel-Cantelli lemma** (sometimes called the "*first* Borel-Cantelli
lemma"): if (sᵢ) is a sequence of sets such that `∑ μ sᵢ` is finite, then the limit superior of the
`sᵢ` is a null set.

Note: for the *second* Borel-Cantelli lemma (applying to independent sets in a probability space),
see `ProbabilityTheory.measure_limsup_eq_one`. -/
theorem measure_limsup_eq_zero {s : ℕ → Set α} (hs : (∑' i, μ (s i)) ≠ ∞) :
    μ (limsup s atTop) = 0

{α : Type u_1}
{m : MeasurableSpace α}
{μ : MeasureTheory.Measure α}
{s : ℕ → Set α}
(hs : ∑' (i : ℕ), μ (s i) ≠ ⊤)


theorem log_pos {b o : Ordinal} (hb : 1 < b) (ho : o ≠ 0) (hbo : b ≤ o) : 0 < log b o

{b o : Ordinal.{u_1}}
(hb : 1 < b)
(ho : o ≠ 0)
(hbo : b ≤ o)


/-- If we replace a row of a matrix by a linear combination of its rows, then the determinant is
multiplied by the coefficient of that row. -/
theorem det_updateRow_sum (A : Matrix n n R) (j : n) (c : n → R) :
    (A.updateRow j (∑ k, (c k) • A k)).det = (c j) • A.det

{n : Type u_2}
[DecidableEq n]
[Fintype n]
{R : Type v}
[CommRing R]
(A : Matrix n n R)
(j : n)
(c : n → R)

(A.updateRow j (∑ k : n, c k • A k)).det = c j • A.det


/-- Construct an isomorphism `G.inverse ⋙ F ≅ H` from an isomorphism `F ≅ G.functor ⋙ H`. -/
@[simps!]
def inverseCompIso {G : C ≌ D} (i : F ≅ G.functor ⋙ H) : G.inverse ⋙ F ≅ H

{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 E}
{H : CategoryTheory.Functor D E}
{G : C ≌ D}
(i : F ≅ G.functor.comp H)
(X : D)

i.inverseCompIso.inv.app X =
  CategoryTheory.CategoryStruct.comp (H.map (G.counitIso.inv.app X)) (i.inv.app (G.inverse.obj X))


theorem isIntegral_of_isAffine_of_isDomain [IsAffine X] [Nonempty X] [IsDomain Γ(X, ⊤)] :
    IsIntegral X

[IsDomain ↑(X.presheaf.obj (Opposite.op ⊤))]


/-- `J.diagram P`, as a functor in `P`. -/
@[simps]
def diagramFunctor (X : C) : (Cᵒᵖ ⥤ D) ⥤ (J.Cover X)ᵒᵖ ⥤ D

(J : CategoryTheory.GrothendieckTopology C)

[CategoryTheory.Category.{max v u, w} D]

[∀ (P : CategoryTheory.Functor Cᵒᵖ D) (X : C) (S : J.Cover X), CategoryTheory.Limits.HasMultiequalizer (S.index P)]

(J.diagramFunctor D X).obj P = J.diagram P X


theorem coe_mul_apply_eq_dfinsupp_sum [AddMonoid ι] [SetLike.GradedMonoid A]
    [∀ (i : ι) (x : A i), Decidable (x ≠ 0)] (r r' : ⨁ i, A i) (n : ι) :
    ((r * r') n : R) = r.sum fun i ri => r'.sum fun j rj => if i + j = n then (ri * rj : R)
      else 0

[(i : ι) → (x : ↥(A i)) → Decidable (x ≠ 0)]

↑((r * r') n) = DFinsupp.sum r fun i ri => DFinsupp.sum r' fun j rj => if i + j = n then ↑ri * ↑rj else 0


@[to_additive] theorem of_mulHom (f : H →ₙ* G)
    (hf : ∀ ⦃a b c d : H⦄, a * b = c * d → f a = f c ∧ f b = f d → a = c ∧ b = d)
    [TwoUniqueProds G] : TwoUniqueProds H

(hf : ∀ ⦃a b c d : H⦄, a + b = c + d → f a = f c ∧ f b = f d → a = c ∧ b = d)


theorem isBoundedBilinearMap_smul {𝕜' : Type*} [NormedField 𝕜'] [NormedAlgebra 𝕜 𝕜'] {E : Type*}
    [NormedAddCommGroup E] [NormedSpace 𝕜 E] [NormedSpace 𝕜' E] [IsScalarTower 𝕜 𝕜' E] :
    IsBoundedBilinearMap 𝕜 fun p : 𝕜' × E => p.1 • p.2

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{𝕜' : Type u_5}
[NormedField 𝕜']
[NormedAlgebra 𝕜 𝕜']
{E : Type u_6}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
[NormedSpace 𝕜' E]
[IsScalarTower 𝕜 𝕜' E]

IsBoundedBilinearMap 𝕜 fun p => p.1 • p.2


theorem prefix_iff_eq_take : l₁ <+: l₂ ↔ l₁ = take (length l₁) l₂


theorem Cofix.dest_mk {α : TypeVec n} (x : F (α.append1 <| Cofix F α)) :
    Cofix.dest (Cofix.mk x) = x

{n : ℕ}
{F : TypeVec.{u} (n + 1) → Type u}
[q : MvQPF F]
{α : TypeVec.{u} n}
(x : F (α ::: MvQPF.Cofix F α))


theorem length_pos_iff_exists_mem {l : List α} : 0 < length l ↔ ∃ a, a ∈ l


theorem notBelow_isOpen : IsOpen (notBelow y)

{α : Type u_1}
[OmegaCompletePartialOrder α]
(y : Scott α)


/-- Let `C(G, A)` denote the complex of inhomogeneous cochains of `A : Rep k G`. This lemma
says `dZero` gives a simpler expression for the 0th differential: that is, the following
square commutes:
```
  C⁰(G, A) ---d⁰---> C¹(G, A)
  |                    |
  |                    |
  |                    |
  v                    v
  A ---- dZero ---> Fun(G, A)
```
where the vertical arrows are `zeroCochainsLequiv` and `oneCochainsLequiv` respectively.
-/
theorem dZero_comp_eq : dZero A ∘ₗ (zeroCochainsLequiv A) =
    oneCochainsLequiv A ∘ₗ (inhomogeneousCochains A).d 0 1

{k G : Type u}
[CommRing k]
[Group G]
(A : Rep k G)

groupCohomology.dZero A ∘ₗ ↑(groupCohomology.zeroCochainsLequiv A) =
  ↑(groupCohomology.oneCochainsLequiv A) ∘ₗ (groupCohomology.inhomogeneousCochains A).d 0 1


/-- We can promote a type-level `Equiv` to
an equivalence between the corresponding `discrete` categories.
-/
@[simps]
def equivalence {I : Type u₁} {J : Type u₂} (e : I ≃ J) : Discrete I ≌ Discrete J

(CategoryTheory.Discrete.equivalence e).counitIso = CategoryTheory.Discrete.natIso fun j => CategoryTheory.eqToIso ⋯


theorem mem_iInf {ι : Sort*} {S : ι → Subalgebra R A} {x : A} : (x ∈ ⨅ i, S i) ↔ ∀ i, x ∈ S i

{R : Type u}
{A : Type v}
[CommSemiring R]
[Semiring A]
[Algebra R A]
{ι : Sort u_1}
{S : ι → Subalgebra R A}
{x : A}


@[simp]
theorem Differentiable.sin (hc : Differentiable ℝ f) : Differentiable ℝ fun x => Real.sin (f x)

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


@[to_additive (attr := ext 1100)]
theorem hom_ext {β : Type v} [Mul β] {f g : FreeMagma α →ₙ* β} (h : f ∘ of = g ∘ of) : f = g

(h : ⇑f ∘ FreeAddMagma.of = ⇑g ∘ FreeAddMagma.of)


@[csimp] theorem takeWhile₂_eq_takeWhile₂TR : @takeWhile₂ = @takeWhile₂TR

(α : Type u_2)
(β : Type u_1)
(R : α → β → Bool)
(as : List α)
(bs : List β)
(acca : List α)
(accb : List β)

List.takeWhile₂TR.go R as bs acca accb =
  (acca.reverse ++ (List.takeWhile₂ R as bs).fst, accb.reverse ++ (List.takeWhile₂ R as bs).snd)


theorem slice_union_shadow_falling_succ : 𝒜 # k ∪ ∂ (falling (k + 1) 𝒜) = falling k 𝒜

{α : Type u_2}
[DecidableEq α]
(k : ℕ)
(𝒜 : Finset (Finset α))

𝒜 # k ∪ ∂ (Finset.falling (k + 1) 𝒜) = Finset.falling k 𝒜


/-- If `k ∈ S`, then `f(k/n)` is close to `f x`.
-/
theorem lt_of_mem_S {f : C(I, ℝ)} {ε : ℝ} {h : 0 < ε} {n : ℕ} {x : I} {k : Fin (n + 1)}
    (m : k ∈ S f ε h n x) : |f k/ₙ - f x| < ε / 2

(m : k ∈ bernsteinApproximation.S f ε h n x)


theorem extend_source_mem_nhds {x : M} (h : x ∈ f.source) : (f.extend I).source ∈ 𝓝 x

{𝕜 : Type u_1}
{E : Type u_2}
{M : Type u_3}
{H : Type u_4}
[NontriviallyNormedField 𝕜]
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
[TopologicalSpace H]
[TopologicalSpace M]
(f : PartialHomeomorph M H)
(I : ModelWithCorners 𝕜 E H)
{x : M}
(h : x ∈ f.source)


theorem evariance_eq_top [IsFiniteMeasure μ] (hXm : AEStronglyMeasurable X μ) (hX : ¬Memℒp X 2 μ) :
    evariance X μ = ∞

(hXm : MeasureTheory.AEStronglyMeasurable X μ)


theorem sinh_half_dist (z w : ℍ) :
    sinh (dist z w / 2) = dist (z : ℂ) w / (2 * √(z.im * w.im))

Real.sinh (dist z w / 2) = dist ↑z ↑w / (2 * √(z.im * w.im))


theorem derivative_succ_aux (n ν : ℕ) :
    Polynomial.derivative (bernsteinPolynomial R (n + 1) (ν + 1)) =
      (n + 1) * (bernsteinPolynomial R n ν - bernsteinPolynomial R n (ν + 1))

Polynomial.derivative (bernsteinPolynomial R (n + 1) (ν + 1)) =
  (↑n + 1) * (bernsteinPolynomial R n ν - bernsteinPolynomial R n (ν + 1))


@[to_additive]
theorem div_subset_iff : s / t ⊆ u ↔ ∀ x ∈ s, ∀ y ∈ t, x / y ∈ u


theorem utf8Len_le_of_suffix (h : cs₁ <:+ cs₂) : utf8Len cs₁ ≤ utf8Len cs₂


theorem length_scanl : ∀ a l, length (scanl f a l) = l.length + 1

{α : Type u}
{β : Type v}
{f : β → α → β}
(a : β)
(l : List α)

(List.scanl f a l).length = l.length + 1


@[to_additive]
theorem isClosed [ContinuousMul G] (U : OpenSubgroup G) : IsClosed (U : Set G)

{G : Type u_1}
[Group G]
[TopologicalSpace G]
[ContinuousMul G]
(U : OpenSubgroup G)


@[reassoc (attr := simp)]
theorem PreservesPullback.iso_inv_fst :
    (PreservesPullback.iso G f g).inv ≫ G.map (pullback.fst f g) = pullback.fst _ _

[CategoryTheory.Limits.PreservesLimit (CategoryTheory.Limits.cospan f g) G]

[CategoryTheory.Limits.HasPullback (G.map f) (G.map g)]

(CategoryTheory.Limits.PreservesPullback.iso G f g).inv ≫ G.map (CategoryTheory.Limits.pullback.fst f g) =
  CategoryTheory.Limits.pullback.fst (G.map f) (G.map g)


@[simp]
theorem coe_comp (f : B →⋆ₐ[R] C) (g : A →⋆ₐ[R] B) : ⇑(comp f g) = f ∘ g

{R : Type u_2}
{A : Type u_3}
{B : Type u_4}
{C : Type u_5}
[CommSemiring R]
[Semiring A]
[Algebra R A]
[Star A]
[Semiring B]
[Algebra R B]
[Star B]
[Semiring C]
[Algebra R C]
[Star C]
(f : B →⋆ₐ[R] C)
(g : A →⋆ₐ[R] B)


/-- The order isomorphism between ordinals less than `o` and `o.out.α`. -/
@[simps!]
noncomputable def enumIsoOut (o : Ordinal) : Set.Iio o ≃o o.out.α

(o : Ordinal.{u_3})
(x : (Quotient.out o).α)

↑((RelIso.symm o.enumIsoOut) x) = Ordinal.typein (fun x x_1 => x < x_1) x


protected theorem mdifferentiableAt : MDifferentiableAt 𝓘(𝕜, E) 𝓘(𝕜, E') f x

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{E' : Type u_5}
[NormedAddCommGroup E']
[NormedSpace 𝕜 E']
(f : E ≃L[𝕜] E')
{x : E}

MDifferentiableAt 𝓘(𝕜, E) 𝓘(𝕜, E') (⇑f) x


/-- If `f` is multilinear, then `f (Σ_{j₁ ∈ A₁} g₁ j₁, ..., Σ_{jₙ ∈ Aₙ} gₙ jₙ)` is the sum of
`f (g₁ (r 1), ..., gₙ (r n))` where `r` ranges over all functions with `r 1 ∈ A₁`, ...,
`r n ∈ Aₙ`. This follows from multilinearity by expanding successively with respect to each
coordinate. Here, we give an auxiliary statement tailored for an inductive proof. Use instead
`map_sum_finset`. -/
theorem map_sum_finset_aux [DecidableEq ι] [Fintype ι] {n : ℕ} (h : (∑ i, (A i).card) = n) :
    (f fun i => ∑ j ∈ A i, g i j) = ∑ r ∈ piFinset A, f fun i => g i (r i)

{R : Type uR}
{ι : Type uι}
{M₁ : ι → Type v₁}
{M₂ : Type v₂}
[Semiring R]
[(i : ι) → AddCommMonoid (M₁ i)]
[AddCommMonoid M₂]
[(i : ι) → Module R (M₁ i)]
[Module R M₂]
(f : MultilinearMap R M₁ M₂)
{α : ι → Type u_1}
(g : (i : ι) → α i → M₁ i)
(A : (i : ι) → Finset (α i))
[DecidableEq ι]
[Fintype ι]
{n : ℕ}
(h : ∑ i : ι, (A i).card = n)

(f fun i => ∑ j ∈ A i, g i j) = ∑ r ∈ Fintype.piFinset A, f fun i => g i (r i)


@[simp]
theorem eventually_nhds_nhdsWithin {a : α} {s : Set α} {p : α → Prop} :
    (∀ᶠ y in 𝓝 a, ∀ᶠ x in 𝓝[s] y, p x) ↔ ∀ᶠ x in 𝓝[s] a, p x

{α : Type u_1}
[TopologicalSpace α]
{a : α}
{s : Set α}
{p : α → Prop}

(∀ᶠ (y : α) in 𝓝 a, ∀ᶠ (x : α) in 𝓝[s] y, p x) ↔ ∀ᶠ (x : α) in 𝓝[s] a, p x


/-- In a space with second countable topology and a sigma-finite measure,
  `AEFinStronglyMeasurable` and `AEMeasurable` are equivalent. -/
theorem aefinStronglyMeasurable_iff_aemeasurable {_m0 : MeasurableSpace α} (μ : Measure α)
    [SigmaFinite μ] : AEFinStronglyMeasurable f μ ↔ AEMeasurable f μ

{α : Type u_1}
{G : Type u_5}
[SeminormedAddCommGroup G]
[MeasurableSpace G]
[BorelSpace G]
[SecondCountableTopology G]
{f : α → G}
{_m0 : MeasurableSpace α}
(μ : MeasureTheory.Measure α)
[MeasureTheory.SigmaFinite μ]

MeasureTheory.AEFinStronglyMeasurable f μ ↔ AEMeasurable f μ


@[simp]
theorem unify_sigma_mk_self {α : Type*} {i : ι} {x : α → G i} :
    (unify f (fun a => .mk f i (x a)) i fun j ⟨a, hj⟩ =>
      _root_.trans (le_of_eq hj.symm) (refl _)) = x

[DirectedSystem G fun i j h => ⇑(f i j h)]

FirstOrder.Language.DirectLimit.unify f (fun a => FirstOrder.Language.Structure.Sigma.mk f i (x a)) i ⋯ = x


/-- **Equality case of the Rearrangement Inequality**: Pointwise scalar multiplication of `f` and
`g`, which antivary together, is unchanged by a permutation if and only if `f` and `g ∘ σ` antivary
together. Stated by permuting the entries of `g`. -/
theorem AntivaryOn.sum_smul_comp_perm_eq_sum_smul_iff (hfg : AntivaryOn f g s)
    (hσ : {x | σ x ≠ x} ⊆ s) :
    ∑ i ∈ s, f i • g (σ i) = ∑ i ∈ s, f i • g i ↔ AntivaryOn f (g ∘ σ) s

{ι : Type u_1}
{α : Type u_2}
{β : Type u_3}
[LinearOrderedRing α]
[LinearOrderedAddCommGroup β]
[Module α β]
[OrderedSMul α β]
{s : Finset ι}
{σ : Equiv.Perm ι}
{f : ι → α}
{g : ι → β}
(hfg : AntivaryOn f g ↑s)
(hσ : {x | σ x ≠ x} ⊆ ↑s)

∑ i ∈ s, f i • g (σ i) = ∑ i ∈ s, f i • g i ↔ AntivaryOn f (g ∘ ⇑σ) ↑s


theorem add_div {a b c : ℕ} (hc0 : 0 < c) :
    (a + b) / c = a / c + b / c + if c ≤ a % c + b % c then 1 else 0


theorem LowerSemicontinuousAt.comp_continuousAt_of_eq {f : α → β} {g : ι → α} {y : α} {x : ι}
    (hf : LowerSemicontinuousAt f y) (hg : ContinuousAt g x) (hy : g x = y) :
    LowerSemicontinuousAt (fun x ↦ f (g x)) x

{α : Type u_1}
[TopologicalSpace α]
{β : Type u_2}
[Preorder β]
{ι : Type u_5}
[TopologicalSpace ι]
{f : α → β}
{g : ι → α}
{y : α}
{x : ι}
(hf : LowerSemicontinuousAt f y)
(hg : ContinuousAt g x)
(hy : g x = y)

LowerSemicontinuousAt (fun x => f (g x)) x


theorem eq_of_cylinder_eq_of_subset [h_nonempty : Nonempty (∀ i, α i)] {I J : Finset ι}
    {S : Set (∀ i : I, α i)} {T : Set (∀ i : J, α i)} (h_eq : cylinder I S = cylinder J T)
    (hJI : J ⊆ I) :
    S = (fun f : ∀ i : I, α i ↦ fun j : J ↦ f ⟨j, hJI j.prop⟩) ⁻¹' T

(h_eq : MeasureTheory.cylinder I S = MeasureTheory.cylinder J T)


@[to_additive]
protected theorem mul_eq_one_iff : s * t = 1 ↔ ∃ a b, s = {a} ∧ t = {b} ∧ a * b = 1

{α : Type u_2}
[DecidableEq α]
[DivisionMonoid α]
{s t : Finset α}


theorem unzip_right (l : List (α × β)) : (unzip l).2 = l.map Prod.snd

{α : Type u}
{β : Type u_1}
(l : List (α × β))


@[to_additive (attr := simp, norm_cast)]
theorem coe_iInf {ι : Sort*} {S : ι → Subgroup G} : (↑(⨅ i, S i) : Set G) = ⋂ i, S i

{G : Type u_1}
[AddGroup G]
{ι : Sort u_5}
{S : ι → AddSubgroup G}


@[simp]
theorem map_Iic (f : α ≃o β) (a : α) : map f (Iic a) = Iic (f a)

{α : Type u_1}
{β : Type u_2}
[Preorder α]
[Preorder β]
(f : α ≃o β)
(a : α)

(LowerSet.map f) (LowerSet.Iic a) = LowerSet.Iic (f a)


nonrec theorem IsLocalMaxOn.add (hf : IsLocalMaxOn f s a) (hg : IsLocalMaxOn g s a) :
    IsLocalMaxOn (fun x => f x + g x) s a

{α : Type u}
{β : Type v}
[TopologicalSpace α]
[OrderedAddCommMonoid β]
{f g : α → β}
{a : α}
{s : Set α}
(hf : IsLocalMaxOn f s a)
(hg : IsLocalMaxOn g s a)


@[to_additive]
lemma iCondIndepFun.indepFun_div_right (hf_indep : iCondIndepFun m' hm' (fun _ ↦ m) f μ)
    (hf_meas : ∀ i, Measurable (f i)) (i j k : ι) (hij : i ≠ j) (hik : i ≠ k) :
    CondIndepFun m' hm' (f i) (f j / f k) μ

{f : ι → Ω → β}

(hf_indep : ProbabilityTheory.iCondIndepFun m' hm' (fun x => m) f μ)

ProbabilityTheory.CondIndepFun m' hm' (f i) (f j - f k) μ


@[simp]
theorem mk_eq_zero' {m : M} : mk (N := N) m = 0 ↔ m ∈ 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)
{m : M}


/-- `t ∈ ∂^k 𝒜` iff `t` is exactly `k` elements less than something from `𝒜`.

See also `Finset.mem_shadow_iff_exists_mem_card_add`. -/
lemma mem_shadow_iterate_iff_exists_sdiff : t ∈ ∂^[k] 𝒜 ↔ ∃ s ∈ 𝒜, t ⊆ s ∧ (s \ t).card = k

{α : Type u_1}
[DecidableEq α]
{𝒜 : Finset (Finset α)}
{t : Finset α}
{k : ℕ}

t ∈ Finset.shadow^[k] 𝒜 ↔ ∃ s ∈ 𝒜, t ⊆ s ∧ (s \ t).card = k


@[simp]
theorem ofTop_apply {h} (x : p) : ofTop p h x = x

{R : Type u_1}
{M : Type u_5}
[Semiring R]
[AddCommMonoid M]
{module_M : Module R M}
(p : Submodule R M)
{h : p = ⊤}
(x : ↥p)


theorem support_single_mul [Add G] [IsLeftCancelAdd G] (f : k[G]) (r : k)
    (hr : ∀ y, r * y = 0 ↔ y = 0) (x : G) :
    (single x r * f : k[G]).support = f.support.map (addLeftEmbedding x)

{k : Type u₁}
{G : Type u₂}
[Semiring k]
[Add G]
[IsLeftCancelAdd G]
(f : AddMonoidAlgebra k G)
(r : k)
(hr : ∀ (y : k), r * y = 0 ↔ y = 0)
(x : G)

(AddMonoidAlgebra.single x r * f).support = Finset.map (addLeftEmbedding x) f.support


/-- Corresponds to `dist_zero_left`. -/
@[simp]
theorem hammingDist_zero_left : hammingDist (0 : ∀ i, β i) = hammingNorm

{ι : Type u_2}
{β : ι → Type u_3}
[Fintype ι]
[(i : ι) → DecidableEq (β i)]
[(i : ι) → Zero (β i)]


@[simp]
theorem basicOpen_eq_bot_iff (f : R) : basicOpen f = ⊥ ↔ IsNilpotent f

PrimeSpectrum.basicOpen f = ⊥ ↔ IsNilpotent f


theorem xgcdAux_val (x y : R) : xgcdAux x 1 0 y 0 1 = (gcd x y, xgcd x y)

{R : Type u}
[EuclideanDomain R]
[DecidableEq R]
(x y : R)

EuclideanDomain.xgcdAux x 1 0 y 0 1 = (EuclideanDomain.gcd x y, EuclideanDomain.xgcd x y)


/-- The L-series of the (convolution) product of two `ℂ`-valued arithmetic functions `f` and `g`
equals the product of their L-series, assuming both L-series converge. -/
lemma LSeries_mul' {f g : ArithmeticFunction ℂ} {s : ℂ} (hf : LSeriesSummable ↗f s)
    (hg : LSeriesSummable ↗g s) :
    LSeries ↗(f * g) s = LSeries ↗f s * LSeries ↗g s

{f g : ArithmeticFunction ℂ}
{s : ℂ}
(hf : LSeriesSummable (fun n => f n) s)
(hg : LSeriesSummable (fun n => g n) s)

L (fun n => (f * g) n) s = L (fun n => f n) s * L (fun n => g n) s


/-- The coercion of an algebra into its multiplier algebra as a non-unital star algebra
homomorphism. -/
@[simps]
noncomputable def coeHom [StarRing 𝕜] [StarRing A] [StarModule 𝕜 A] [NormedStarGroup A] :
    A →⋆ₙₐ[𝕜] 𝓜(𝕜, A)

{𝕜 : Type u_1}
{A : Type u_2}
[NontriviallyNormedField 𝕜]
[NonUnitalNormedRing A]
[NormedSpace 𝕜 A]
[SMulCommClass 𝕜 A A]
[IsScalarTower 𝕜 A A]
[StarRing 𝕜]
[StarRing A]
[StarModule 𝕜 A]
[NormedStarGroup A]
(a : A)


/-- We call a category `NonPreadditiveAbelian` if it has a zero object, kernels, cokernels, binary
    products and coproducts, and every monomorphism and every epimorphism is normal. -/
class NonPreadditiveAbelian extends HasZeroMorphisms C, NormalMonoCategory C,
    NormalEpiCategory C where
  [has_zero_object : HasZeroObject C]
  [has_kernels : HasKernels C]
  [has_cokernels : HasCokernels C]
  [has_finite_products : HasFiniteProducts C]
  [has_finite_coproducts : HasFiniteCoproducts C]

[self : CategoryTheory.NonPreadditiveAbelian C]


@[simp]
theorem toFun_eq_coe : K.toFun = K

{X : Type u_1}
[TopologicalSpace X]
(K : CompactExhaustion X)


/-- Concave **Jensen's inequality** where an element plays a distinguished role. -/
lemma ConcaveOn.map_add_sum_le (hf : ConcaveOn 𝕜 s f) (h₀ : ∀ i ∈ t, 0 ≤ w i)
    (h₁ : v + ∑ i ∈ t, w i = 1) (hmem : ∀ i ∈ t, p i ∈ s) (hv : 0 ≤ v) (hq : q ∈ s) :
    v • f q + ∑ i ∈ t, w i • f (p i) ≤ f (v • q + ∑ i ∈ t, w i • p i)

{𝕜 : Type u_1}
{E : Type u_2}
{β : Type u_4}
{ι : Type u_5}
[LinearOrderedField 𝕜]
[AddCommGroup E]
[OrderedAddCommGroup β]
[Module 𝕜 E]
[Module 𝕜 β]
[OrderedSMul 𝕜 β]
{s : Set E}
{f : E → β}
{t : Finset ι}
{w : ι → 𝕜}
{p : ι → E}
{v : 𝕜}
{q : E}
(hf : ConcaveOn 𝕜 s f)
(h₀ : ∀ i ∈ t, 0 ≤ w i)
(h₁ : v + ∑ i ∈ t, w i = 1)
(hmem : ∀ i ∈ t, p i ∈ s)
(hv : 0 ≤ v)
(hq : q ∈ s)


lemma not_mem_uIoc : a ∉ Ι b c ↔ a ≤ b ∧ a ≤ c ∨ c < a ∧ b < a

{α : Type u_1}
[LinearOrder α]
{a b c : α}


/-- Open balls are bounded -/
theorem isBounded_ball : IsBounded (ball x r)

{α : Type u}
[PseudoMetricSpace α]
{x : α}
{r : ℝ}


/-- The **first isomorphism** theorem for algebras, computable version. -/
@[simps!]
def quotientKerAlgEquivOfRightInverse {f : A →ₐ[R₁] B} {g : B → A}
    (hf : Function.RightInverse g f) : (A ⧸ RingHom.ker f) ≃ₐ[R₁] B

{R₁ : Type u_1}
{A : Type u_3}
{B : Type u_4}
[CommSemiring R₁]
[CommRing A]
[Algebra R₁ A]
[Semiring B]
[Algebra R₁ B]
{f : A →ₐ[R₁] B}
{g : B → A}
(hf : Function.RightInverse g ⇑f)
(a : A ⧸ RingHom.ker f.toRingHom)

(Ideal.quotientKerAlgEquivOfRightInverse hf) a = (↑f).kerLift a


theorem pNilradical_eq_nilradical {R : Type*} [CommSemiring R] {p : ℕ} (hp : 1 < p) :
    pNilradical R p = nilradical R

{R : Type u_1}
[CommSemiring R]
{p : ℕ}
(hp : 1 < p)


theorem aeval_eq_constantCoeff_of_vars [Algebra R S] {g : σ → S} {p : MvPolynomial σ R}
    (hp : ∀ i ∈ p.vars, g i = 0) : aeval g p = algebraMap _ _ (constantCoeff p)

{R : Type u}
{S : Type v}
{σ : Type u_1}
[CommSemiring R]
[CommSemiring S]
[Algebra R S]
{g : σ → S}
{p : MvPolynomial σ R}
(hp : ∀ i ∈ p.vars, g i = 0)

(MvPolynomial.aeval g) p = (algebraMap R S) (MvPolynomial.constantCoeff p)


/-- Given a category of complexes with objects in `Vᵒᵖ`, there is a natural equivalence between its
opposite category and a category of complexes with objects in `V`. -/
@[simps]
def unopEquivalence : (HomologicalComplex Vᵒᵖ c)ᵒᵖ ≌ HomologicalComplex V c.symm

(HomologicalComplex.unopEquivalence V c).counitIso = HomologicalComplex.unopCounitIso V c


/-- **L'Hôpital's rule** for approaching +∞, `deriv` version -/
theorem lhopital_zero_atTop (hdf : ∀ᶠ x : ℝ in atTop, DifferentiableAt ℝ f x)
    (hg' : ∀ᶠ x : ℝ in atTop, deriv g x ≠ 0) (hftop : Tendsto f atTop (𝓝 0))
    (hgtop : Tendsto g atTop (𝓝 0)) (hdiv : Tendsto (fun x => (deriv f) x / (deriv g) x) atTop l) :
    Tendsto (fun x => f x / g x) atTop l

(hdf : ∀ᶠ (x : ℝ) in Filter.atTop, DifferentiableAt ℝ f x)

(hg' : ∀ᶠ (x : ℝ) in Filter.atTop, deriv g x ≠ 0)

(hftop : Filter.Tendsto f Filter.atTop (𝓝 0))

(hgtop : Filter.Tendsto g Filter.atTop (𝓝 0))

(hdiv : Filter.Tendsto (fun x => deriv f x / deriv g x) Filter.atTop l)

Filter.Tendsto (fun x => f x / g x) Filter.atTop l


@[to_additive existing (attr := simp)]
lemma powersHom_symm_apply (f : Multiplicative ℕ →* α) :
    (powersHom α).symm f = f (Multiplicative.ofAdd 1)

{α : Type u_1}
[Monoid α]
(f : Multiplicative ℕ →* α)


theorem contDiff_prod_mk_right (e₀ : E) : ContDiff 𝕜 n fun f : F => (e₀, f)

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type uE}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{F : Type uF}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{n : ℕ∞}
(e₀ : E)


theorem prevD_eq (f : ∀ i j, C.X i ⟶ D.X j) {j j' : ι} (w : c.Rel j' j) :
    prevD j f = f j j' ≫ D.d j' j

{ι : Type u_1}
{V : Type u}
[CategoryTheory.Category.{v, u} V]
[CategoryTheory.Preadditive V]
{c : ComplexShape ι}
{C D : HomologicalComplex V c}
(f : (i j : ι) → C.X i ⟶ D.X j)
{j j' : ι}
(w : c.Rel j' j)


@[simp]
theorem coe_dualDual_symm : ⇑(dualDual α).symm = ofDual ∘ ofDual

⇑(OrderIso.dualDual α).symm = ⇑OrderDual.ofDual ∘ ⇑OrderDual.ofDual


protected theorem apply (hx : IsPeriodicPt f n x) : IsPeriodicPt f n (f x)

{α : Type u_1}
{f : α → α}
{x : α}
{n : ℕ}
(hx : Function.IsPeriodicPt f n x)


@[simp] lemma zero_τ₃ : Hom.τ₃ (0 : S₁ ⟶ S₂) = 0

CategoryTheory.ShortComplex.Hom.τ₃ 0 = 0


theorem RespectsIso.of_respects_arrow_iso (P : MorphismProperty C)
    (hP : ∀ (f g : Arrow C) (_ : f ≅ g) (_ : P f.hom), P g.hom) : RespectsIso P

(hP : ∀ (f g : CategoryTheory.Arrow C), (f ≅ g) → P f.hom → P g.hom)


@[simp]
theorem count_add_count_not (l : List Bool) (b : Bool) : count b l + count (!b) l = length l

List.count b l + List.count (!b) l = l.length


theorem lt_of_exists_le {x y : PGame} (ox : x.Numeric) (oy : y.Numeric) :
    ((∃ i, x ≤ y.moveLeft i) ∨ ∃ j, x.moveRight j ≤ y) → x < y

{x y : SetTheory.PGame}
(ox : x.Numeric)
(oy : y.Numeric)


/-- The quotient map from `I` to `I ⧸ I ^ 2`. -/
@[simps! (config := .lemmasOnly) apply]
def toCotangent : I →ₗ[R] I.Cotangent

∀ (a : ↥I), I.toCotangent a = Submodule.Quotient.mk a


@[simp]
theorem coe_sup (s t : NonemptyCompacts α) : (↑(s ⊔ t) : Set α) = ↑s ∪ ↑t

(s t : TopologicalSpace.NonemptyCompacts α)


@[to_additive]
theorem Function.Surjective.tprod_eq_tprod_of_hasProd_iff_hasProd {α' : Type*} [CommMonoid α']
    [TopologicalSpace α'] {e : α' → α} (hes : Function.Surjective e) (h1 : e 1 = 1) {f : β → α}
    {g : γ → α'} (h : ∀ {a}, HasProd f (e a) ↔ HasProd g a) : ∏' b, f b = e (∏' c, g c)

(h : ∀ {a : α'}, HasProd f (e a) ↔ HasProd g a)


/-- `midpoint` does not depend on the ring `R`. -/
theorem midpoint_unique (R' : Type*) [Ring R'] [Invertible (2 : R')] [Module R' V] (x y : P) :
    midpoint R x y = midpoint R' x y

(R : Type u_1)
{V : Type u_2}
{P : Type u_4}
[Ring R]
[Invertible 2]
[AddCommGroup V]
[Module R V]
[AddTorsor V P]
(R' : Type u_6)
[Ring R']
[Invertible 2]
[Module R' V]
(x y : P)


theorem map_sub_int [AddGroupWithOne G] [AddGroupWithOne H] [AddConstMapClass F G H 1 1]
    (f : F) (x : G) (n : ℤ) : f (x - n) = f x - n

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


@[simp]
theorem not_nonempty_empty : ¬(∅ : Set α).Nonempty


theorem preimage_find_eq_disjointed (s : ℕ → Set α) (H : ∀ x, ∃ n, x ∈ s n)
    [∀ x n, Decidable (x ∈ s n)] (n : ℕ) : (fun x => Nat.find (H x)) ⁻¹' {n} = disjointed s n

[(x : α) → (n : ℕ) → Decidable (x ∈ s n)]

(fun x => Nat.find ⋯) ⁻¹' {n} = disjointed s n


@[simp] theorem congr_zpow (f : M ≃ₗ[R] M) (g : N ≃ₗ[R] N) (n : ℤ) :
    congr f g ^ n = congr (f ^ n) (g ^ n)

{R : Type u_1}
[CommSemiring R]
{M : Type u_4}
{N : Type u_5}
[AddCommMonoid M]
[AddCommMonoid N]
[Module R M]
[Module R N]
(f : M ≃ₗ[R] M)
(g : N ≃ₗ[R] N)
(n : ℤ)

TensorProduct.congr f g ^ n = TensorProduct.congr (f ^ n) (g ^ n)


theorem pushforward_union {f : Y ⟶ X} (S R : Sieve Y) :
    (S ⊔ R).pushforward f = S.pushforward f ⊔ R.pushforward f

{C : Type u₁}
[CategoryTheory.Category.{v₁, u₁} C]
{X Y : C}
{f : Y ⟶ X}
(S R : CategoryTheory.Sieve Y)

CategoryTheory.Sieve.pushforward f (S ⊔ R) = CategoryTheory.Sieve.pushforward f S ⊔ CategoryTheory.Sieve.pushforward f R


@[simp]
protected theorem div_zero (n : Num) : n / 0 = 0


/-- The cosine of an angle in a right-angled triangle multiplied by the hypotenuse equals the
adjacent side, version subtracting vectors. -/
theorem cos_oangle_sub_right_mul_norm_of_oangle_eq_pi_div_two {x y : V}
    (h : o.oangle x y = ↑(π / 2)) : Real.Angle.cos (o.oangle y (y - x)) * ‖y - x‖ = ‖y‖

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

(o.oangle y (y - x)).cos * ‖y - x‖ = ‖y‖


theorem real_smul_posPart_neg (r : ℝ) (hr : r < 0) :
    (r • j).posPart = (-r).toNNReal • j.negPart

(j : MeasureTheory.JordanDecomposition α)


theorem iterate_derivative_X_sub_pow (n k : ℕ) (c : R) :
    derivative^[k] ((X - C c) ^ n) = n.descFactorial k • (X - C c) ^ (n - k)

{R : Type u}
[CommRing R]
(n k : ℕ)
(c : R)

(⇑Polynomial.derivative)^[k] ((Polynomial.X - Polynomial.C c) ^ n) =
  n.descFactorial k • (Polynomial.X - Polynomial.C c) ^ (n - k)


@[to_additive]
theorem closedEmbedding_toContinuousMap [ContinuousMul B] [T2Space B] :
    ClosedEmbedding (toContinuousMap : ContinuousMonoidHom A B → C(A, B))

(A : Type u_2)
(B : Type u_3)
[Monoid A]
[Monoid B]
[TopologicalSpace A]
[TopologicalSpace B]
[ContinuousMul B]
[T2Space B]


@[simp]
theorem IsInitial.to_self {X : C} (t : IsInitial X) : t.to X = 𝟙 X

{C : Type u₁}
[CategoryTheory.Category.{v₁, u₁} C]
{X : C}
(t : CategoryTheory.Limits.IsInitial X)


theorem isCoseparator_unop_iff (G : Cᵒᵖ) : IsCoseparator (unop G) ↔ IsSeparator G

{C : Type u₁}
[CategoryTheory.Category.{v₁, u₁} C]
(G : Cᵒᵖ)

CategoryTheory.IsCoseparator (Opposite.unop G) ↔ CategoryTheory.IsSeparator G


@[simp]
theorem toPlus_comp_plusCompIso_inv :
    J.toPlus _ ≫ (J.plusCompIso F P).inv = whiskerRight (J.toPlus _) _

(J : CategoryTheory.GrothendieckTopology C)

[CategoryTheory.Category.{max v u, w₁} D]

[CategoryTheory.Category.{max v u, w₂} E]

[∀ (α β : Type (max v u)) (fst snd : β → α),
    CategoryTheory.Limits.HasLimitsOfShape (CategoryTheory.Limits.WalkingMulticospan fst snd) D]

[∀ (α β : Type (max v u)) (fst snd : β → α),
    CategoryTheory.Limits.HasLimitsOfShape (CategoryTheory.Limits.WalkingMulticospan fst snd) E]

[(X : C) →
    (W : J.Cover X) →
      (P : CategoryTheory.Functor Cᵒᵖ D) → CategoryTheory.Limits.PreservesLimit (W.index P).multicospan F]

[∀ (X : C), CategoryTheory.Limits.HasColimitsOfShape (J.Cover X)ᵒᵖ D]

[∀ (X : C), CategoryTheory.Limits.HasColimitsOfShape (J.Cover X)ᵒᵖ E]

[(X : C) → CategoryTheory.Limits.PreservesColimitsOfShape (J.Cover X)ᵒᵖ F]

CategoryTheory.CategoryStruct.comp (J.toPlus (P.comp F)) (J.plusCompIso F P).inv =
  CategoryTheory.whiskerRight (J.toPlus P) F


/-- The `p`-adic norm of `p` is less than `1` if `p` is prime.

See also `padicNorm.padicNorm_p_lt_one` for a version assuming `1 < p`. -/
theorem padicNorm_p_lt_one_of_prime [Fact p.Prime] : padicNorm p p < 1


lemma sSup_ringCon (S : Set (TwoSidedIdeal R)) :
    (sSup S).ringCon = sSup (TwoSidedIdeal.ringCon '' S)

(R : Type u_1)
[NonUnitalNonAssocRing R]
(S : Set (TwoSidedIdeal R))


@[simp]
theorem sup_himp_self_right (a b : α) : a ⊔ b ⇨ b = a ⇨ b

{α : Type u_2}
[GeneralizedHeytingAlgebra α]
(a b : α)


/-- A (non-commutative) Jordan multiplication. -/
class IsJordan [Mul A] : Prop where
  lmul_comm_rmul : ∀ a b : A, a * b * a = a * (b * a)
  lmul_lmul_comm_lmul : ∀ a b : A, a * a * (a * b) = a * (a * a * b)
  lmul_lmul_comm_rmul : ∀ a b : A, a * a * (b * a) = a * a * b * a
  lmul_comm_rmul_rmul : ∀ a b : A, a * b * (a * a) = a * (b * (a * a))
  rmul_comm_rmul_rmul : ∀ a b : A, b * a * (a * a) = b * (a * a) * a

{A : Type u_1}
[Mul A]
[self : IsJordan A]
(a b : A)


@[to_additive (attr := simp)]
theorem ofMulEquivOfLocalizations_apply {k : N ≃* P} (x) :
    (f.ofMulEquivOfLocalizations k).toMap x = k (f.toMap x)

{M : Type u_1}
[CommMonoid M]
{S : Submonoid M}
{N : Type u_2}
[CommMonoid N]
{P : Type u_3}
[CommMonoid P]
(f : S.LocalizationMap N)
{k : N ≃* P}
(x : M)


@[simp]
theorem contSupp_cons₂ (k) :
    contSupp (Cont'.cons₂ k) = trStmts₁ (head stack <| Λ'.ret k) ∪ contSupp k

Turing.PartrecToTM2.contSupp k.cons₂ =
  Turing.PartrecToTM2.trStmts₁ (Turing.PartrecToTM2.head Turing.PartrecToTM2.K'.stack (Turing.PartrecToTM2.Λ'.ret k)) ∪
    Turing.PartrecToTM2.contSupp k


@[simp]
theorem denselyOrdered_orderDual [LT α] : DenselyOrdered αᵒᵈ ↔ DenselyOrdered α


@[to_additive (attr := simp)]
lemma smul_left_cancel_iff (g : α) {x y : β} : g • x = g • y ↔ x = y

{α : Type u_1}
{β : Type u_2}
[AddGroup α]
[AddAction α β]
(g : α)
{x y : β}


@[to_additive (attr := simp)]
theorem coe_of {f : M → N} (hf : IsMonoidHom f) : ⇑(MonoidHom.of hf) = f

{M : Type u_1}
{N : Type u_2}
{mM : AddZeroClass M}
{mN : AddZeroClass N}
{f : M → N}
(hf : IsAddMonoidHom f)


@[simp]
theorem inl_zero [Zero R] [Zero M] : (inl 0 : tsze R M) = 0

{R : Type u}
(M : Type v)
[Zero R]
[Zero M]


@[to_additive (attr := simp 1001)]
-- porting note (#10618): increase priority because `simp` can prove this
theorem dist_self_div_left (a b : E) : dist (a / b) a = ‖b‖

{E : Type u_3}
[SeminormedAddCommGroup E]
(a b : E)


@[to_additive]
lemma IsMulFreimanIso.isMulFreimanHom (hf : IsMulFreimanIso n A B f) : IsMulFreimanHom n A B f

{α : Type u_2}
{β : Type u_3}
[AddCommMonoid α]
[AddCommMonoid β]
{A : Set α}
{B : Set β}
{f : α → β}
{n : ℕ}
(hf : IsAddFreimanIso n A B f)


lemma snd_map_prod_id (κ : Kernel α β) {γ : Type*} {mγ : MeasurableSpace γ}
    {f : β → γ} (hf : Measurable f) :
    snd (map κ (fun a ↦ (f a, a)) (hf.prod_mk measurable_id)) = κ

{α : Type u_1}
{β : Type u_2}
{mα : MeasurableSpace α}
{mβ : MeasurableSpace β}
(κ : ProbabilityTheory.Kernel α β)
{γ : Type u_6}
{mγ : MeasurableSpace γ}
{f : β → γ}
(hf : Measurable f)


@[to_additive exists_lt_of_sum_lt]
theorem exists_lt_of_prod_lt' (Hlt : ∏ i ∈ s, f i < ∏ i ∈ s, g i) : ∃ i ∈ s, f i < g i

{ι : Type u_1}
{M : Type u_4}
[LinearOrderedCancelAddCommMonoid M]
{f g : ι → M}
{s : Finset ι}
(Hlt : ∑ i ∈ s, f i < ∑ i ∈ s, g i)


theorem IsPreconnected.subset_connectedComponent {x : α} {s : Set α} (H1 : IsPreconnected s)
    (H2 : x ∈ s) : s ⊆ connectedComponent x

{α : Type u}
[TopologicalSpace α]
{x : α}
{s : Set α}
(H1 : IsPreconnected s)
(H2 : x ∈ s)


lemma epi_iff_surjective_on_stonean : Epi f ↔
    ∀ (S : Stonean), Function.Surjective (f.val.app (op S.compHaus))

CategoryTheory.Epi f ↔ ∀ (S : Stonean), Function.Surjective (f.val.app (Opposite.op S.compHaus))


@[simp]
theorem zero_comp [HasZeroMorphisms C] {X : C} {Y Z : C} {f : Y ⟶ Z} :
    (0 : X ⟶ Y) ≫ f = (0 : X ⟶ Z)


theorem degree_mul_leadingCoeff_inv (p : K[X]) {q : K[X]} (h : q ≠ 0) :
    degree (p * C (leadingCoeff q)⁻¹) = degree p

{K : Type u_1}
[DivisionRing K]
(p : K[X])
{q : K[X]}
(h : q ≠ 0)

(p * Polynomial.C q.leadingCoeff⁻¹).degree = p.degree


theorem trailingDegree_mul' (h : p.trailingCoeff * q.trailingCoeff ≠ 0) :
    (p * q).trailingDegree = p.trailingDegree + q.trailingDegree


theorem Tendsto.isCompact_insert_range_of_cofinite {f : ι → X} {x} (hf : Tendsto f cofinite (𝓝 x)) :
    IsCompact (insert x (range f))

(hf : Filter.Tendsto f Filter.cofinite (𝓝 x))


/-- Scalar multiplication by a non-zero element of a group with zero acting on `α` is a
homeomorphism from `α` onto itself. -/
@[simps! (config := .asFn) apply]
protected def Homeomorph.smulOfNeZero (c : G₀) (hc : c ≠ 0) : α ≃ₜ α

{α : Type u_2}
{G₀ : Type u_4}
[TopologicalSpace α]
[GroupWithZero G₀]
[MulAction G₀ α]
[ContinuousConstSMul G₀ α]
(c : G₀)
(hc : c ≠ 0)

⇑(Homeomorph.smulOfNeZero c hc) = fun x => c • x


lemma Odd.of_mul_right (h : Odd (m * n)) : Odd n


@[simp]
theorem casesOn'_none (x : β) (f : α → β) : casesOn' none x f = x

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


@[simp] lemma cast_nonneg : 0 ≤ (q : K) ↔ 0 ≤ q

{q : ℚ}
{K : Type u_5}
[LinearOrderedField K]

0 ≤ ↑q ↔ 0 ≤ q


@[to_additive]
theorem inv_unique {u₁ u₂ : αˣ} (h : (↑u₁ : α) = ↑u₂) : (↑u₁⁻¹ : α) = ↑u₂⁻¹

{α : Type u}
[Monoid α]
{u₁ u₂ : αˣ}
(h : ↑u₁ = ↑u₂)

↑u₁⁻¹ = ↑u₂⁻¹


@[simp]
theorem bihimp_eq_bot : a ⇔ b = ⊥ ↔ IsCompl a b

{α : Type u_2}
[BooleanAlgebra α]
(a b : α)


/-- In a T0 topological space, `diracProbaEquiv` is continuous. -/
lemma continuous_diracProbaEquiv [T0Space X] :
    Continuous (diracProbaEquiv (X := X))

{X : Type u_1}
[MeasurableSpace X]
[TopologicalSpace X]
[OpensMeasurableSpace X]
[T0Space X]


theorem Disjoint.closure_left (hd : Disjoint s t) (ht : IsOpen t) :
    Disjoint (closure s) t

{X : Type u}
{s t : Set X}
[TopologicalSpace X]
(hd : Disjoint s t)
(ht : IsOpen t)


@[to_additive (attr := simp)]
theorem center_eq_top : center M = ⊤


@[simp]
lemma isSelfAdjoint_inr : IsSelfAdjoint (a : Unitization R A) ↔ IsSelfAdjoint a

{R : Type u_1}
{A : Type u_2}
[Semiring R]
[StarAddMonoid R]
[Star A]
{a : A}


lemma curry_obj_injective {F₁ F₂ : C × D ⥤ E} (h : curry.obj F₁ = curry.obj F₂) :
    F₁ = F₂

{F₁ F₂ : CategoryTheory.Functor (C × D) E}

(h : CategoryTheory.curry.obj F₁ = CategoryTheory.curry.obj F₂)


theorem Ico_succ_right_of_not_isMax (hb : ¬IsMax b) : Ico a (succ b) = Icc a b

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


theorem convs'Aux_succ_none {s : Stream'.Seq (Pair K)} (h : s.head = none) (n : ℕ) :
    convs'Aux s (n + 1) = 0

{K : Type u_1}
[DivisionRing K]
{s : Stream'.Seq (GenContFract.Pair K)}
(h : s.head = none)
(n : ℕ)


/-- The image of the normalizer is equal to the normalizer of the image of an isomorphism. -/
@[to_additive
      "The image of the normalizer is equal to the normalizer of the image of an
      isomorphism."]
theorem map_equiv_normalizer_eq (H : Subgroup G) (f : G ≃* N) :
    H.normalizer.map f.toMonoidHom = (H.map f.toMonoidHom).normalizer

{G : Type u_1}
[Group G]
{N : Type u_5}
[Group N]
(H : Subgroup G)
(f : G ≃* N)

Subgroup.map f.toMonoidHom H.normalizer = (Subgroup.map f.toMonoidHom H).normalizer


@[to_additive]
theorem op_le_iff {S₁ : Submonoid M} {S₂ : Submonoid Mᵐᵒᵖ} : S₁.op ≤ S₂ ↔ S₁ ≤ S₂.unop

{M : Type u_2}
[AddZeroClass M]
{S₁ : AddSubmonoid M}
{S₂ : AddSubmonoid Mᵃᵒᵖ}


@[to_additive (attr := simp, norm_cast)]
theorem coe_prod (U : OpenSubgroup G) (V : OpenSubgroup H) :
    (U.prod V : Set (G × H)) = (U : Set G) ×ˢ (V : Set H)

{G : Type u_1}
[AddGroup G]
[TopologicalSpace G]
{H : Type u_2}
[AddGroup H]
[TopologicalSpace H]
(U : OpenAddSubgroup G)
(V : OpenAddSubgroup H)


@[to_additive (attr := simp, norm_cast)]
lemma coe_eq_one : (s : Set α) = 1 ↔ s = 1


@[simp]
theorem mem_sInf : x ∈ sInf S ↔ ∀ s ∈ S, x ∈ s

{P : Type u_1}
[SemilatticeSup P]
[OrderBot P]
{x : P}
{S : Set (Order.Ideal P)}


theorem germ_injective_of_isIntegral [IsIntegral X] {U : X.Opens} (x : U) :
    Function.Injective (X.presheaf.germ x)

(X : AlgebraicGeometry.Scheme)
[AlgebraicGeometry.IsIntegral X]
{U : X.Opens}
(x : ↥U)


theorem OrthogonalFamily.inner_right_fintype [Fintype ι] (l : ∀ i, G i) (i : ι) (v : G i) :
    ⟪V i v, ∑ j : ι, V j (l j)⟫ = ⟪v, l i⟫

{𝕜 : Type u_1}
{E : Type u_2}
[RCLike 𝕜]
[NormedAddCommGroup E]
[InnerProductSpace 𝕜 E]
{ι : Type u_4}
{G : ι → Type u_5}
[(i : ι) → NormedAddCommGroup (G i)]
[(i : ι) → InnerProductSpace 𝕜 (G i)]
{V : (i : ι) → G i →ₗᵢ[𝕜] E}
(hV : OrthogonalFamily 𝕜 G V)
[Fintype ι]
(l : (i : ι) → G i)
(i : ι)
(v : G i)

⟪(V i) v, ∑ j : ι, (V j) (l j)⟫_𝕜 = ⟪v, l i⟫_𝕜


@[simp]
theorem _root_.PredOrder.limitRecOn_pred (ha : ¬ IsMin a) :
    PredOrder.limitRecOn (pred a) H_pred H_lim
      = H_pred a ha (PredOrder.limitRecOn a H_pred H_lim)

(H_pred : (a : α) → ¬IsMin a → C a → C (Order.pred a))

(H_lim : (a : α) → Order.IsPredLimit a → ((b : α) → b > a → C b) → C a)

PredOrder.limitRecOn (Order.pred a) H_pred H_lim = H_pred a ha (PredOrder.limitRecOn a H_pred H_lim)


theorem restrict_apply_univ (s : Set α) : μ.restrict s univ = μ s

{α : Type u_2}
{m0 : MeasurableSpace α}
{μ : MeasureTheory.Measure α}
(s : Set α)


@[to_additive]
theorem comap_surjective_of_injective : Function.Surjective (comap f)

{M : Type u_1}
{N : Type u_2}
[MulOneClass M]
[MulOneClass N]
{F : Type u_4}
[FunLike F M N]
[mc : MonoidHomClass F M N]
{f : F}
(hf : Function.Injective ⇑f)


theorem norm_norm [Algebra L F] [IsScalarTower K L F] [Algebra.IsSeparable K F] (x : F) :
    norm K (norm L x) = norm K x

(K : Type u_4)
(L : Type u_5)
{F : Type u_6}
[Field K]
[Field L]
[Field F]
[Algebra K L]
[Algebra K F]
[Algebra L F]
[IsScalarTower K L F]
[Algebra.IsSeparable K F]
(x : F)

(Algebra.norm K) ((Algebra.norm L) x) = (Algebra.norm K) x


@[simp]
theorem funMap_apply₀ (c₀ : c) {x : Fin 0 → M} :
    @Structure.funMap _ M (Structure.mk₂ c' f₁' f₂' r₁' r₂') 0 c₀ x = c' c₀

{M : Type w}
{c f₁ f₂ : Type u}
{r₁ r₂ : Type v}
{c' : c → M}
{f₁' : f₁ → M → M}
{f₂' : f₂ → M → M → M}
{r₁' : r₁ → Set M}
{r₂' : r₂ → M → M → Prop}
(c₀ : c)
{x : Fin 0 → M}

FirstOrder.Language.Structure.funMap c₀ x = c' c₀


theorem two_zsmul_toReal_eq_two_mul_sub_two_pi {θ : Angle} :
    ((2 : ℤ) • θ).toReal = 2 * θ.toReal - 2 * π ↔ π / 2 < θ.toReal

(2 • θ).toReal = 2 * θ.toReal - 2 * π ↔ π / 2 < θ.toReal


/-- The bottom map in the equalizer diagram we will construct. -/
@[simps]
def CofreeEqualizer.bottomMap :
    (Comonad.cofree T).obj X.A ⟶ (Comonad.cofree T).obj (T.obj X.A)

{C : Type u₁}
[CategoryTheory.Category.{v₁, u₁} C]
{T : CategoryTheory.Comonad C}
(X : T.Coalgebra)

(CategoryTheory.Comonad.CofreeEqualizer.bottomMap X).f = T.δ.app X.A


theorem mem_conductor_iff {y : S} : y ∈ conductor R x ↔ ∀ b : S, y * b ∈ R<x>

{R : Type u_1}
{S : Type u_2}
[CommRing R]
[CommRing S]
[Algebra R S]
{x y : S}

y ∈ conductor R x ↔ ∀ (b : S), y * b ∈ Algebra.adjoin R {x}


@[simp]
theorem filter_union [DecidableEq α] (s t : Multiset α) :
    filter p (s ∪ t) = filter p s ∪ filter p t

{α : Type u_1}
(p : α → Prop)
[DecidablePred p]
[DecidableEq α]
(s t : Multiset α)

Multiset.filter p (s ∪ t) = Multiset.filter p s ∪ Multiset.filter p t


@[to_additive]
theorem Nonempty.smul : s.Nonempty → t.Nonempty → (s • t).Nonempty

{α : Type u_2}
{β : Type u_3}
[DecidableEq β]
[SMul α β]
{s : Finset α}
{t : Finset β}


@[simp]
theorem nil_le {α} [LinearOrder α] {l : List α} : [] ≤ l

{α : Type u_1}
[LinearOrder α]
{l : List α}


theorem chain'_cons_of_lt (l : MaxProducts C ho)
    (q : Products I) (hq : q < l.val.Tail) :
    List.Chain' (fun x x_1 ↦ x > x_1) (term I ho :: q.val)

(hsC : Profinite.NobelingProof.contained C (Order.succ o))

(ho : o < Ordinal.type fun x x_1 => x < x_1)

(l : ↑(Profinite.NobelingProof.GoodProducts.MaxProducts C ho))

(q : Profinite.NobelingProof.Products I)

List.Chain' (fun x x_1 => x > x_1) (Profinite.NobelingProof.term I ho :: ↑q)


@[simp]
theorem map_id : map (MonoidHom.id G) = MonoidHom.id (Abelianization G)

Abelianization.map (MonoidHom.id G) = MonoidHom.id (Abelianization G)


theorem xor_comm (a b : Prop) : Xor' a b = Xor' b a


@[simp]
theorem prod.lift_fst_comp_snd_comp {W X Y Z : C} [HasBinaryProduct W Y] [HasBinaryProduct X Z]
    (g : W ⟶ X) (g' : Y ⟶ Z) : prod.lift (prod.fst ≫ g) (prod.snd ≫ g') = prod.map g g'

CategoryTheory.Limits.prod.lift (CategoryTheory.Limits.prod.fst ≫ g) (CategoryTheory.Limits.prod.snd ≫ g') =
  CategoryTheory.Limits.prod.map g g'


theorem le_of_le_le {x y z w : ℤ} (xz : x ≤ z) (yw : y ≤ w) : (⟨x, y⟩ : ℤ√d) ≤ ⟨z, w⟩

{d : ℕ}
{x y z w : ℤ}
(xz : x ≤ z)
(yw : y ≤ w)


/-- Reinterpret a bundled monotone function as a monotone function between dual orders. -/
@[simps]
protected def dual : (α →o β) ≃ (αᵒᵈ →o βᵒᵈ)

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

∀ (a : αᵒᵈ), (OrderHom.dual f) a = (⇑OrderDual.toDual ∘ ⇑f ∘ ⇑OrderDual.ofDual) a


theorem Encoding.card_le_aleph0 {α : Type u} (e : Encoding.{u, v} α) [Countable e.Γ] :
    #α ≤ ℵ₀

{α : Type u}
(e : Computability.Encoding α)
[Countable e.Γ]


lemma le_of_eq_sum_of_eq_sum_norm {ι : Type*} {a b : ℝ} (f : ι → ℂ) (s : Finset ι) (ha₀ : 0 ≤ a)
    (ha : a = ∑ i ∈ s, f i) (hb : b = ∑ i ∈ s, (‖f i‖ : ℂ)) : a ≤ b

{ι : Type u_2}
{a b : ℝ}
(f : ι → ℂ)
(s : Finset ι)
(ha₀ : 0 ≤ a)
(ha : ↑a = ∑ i ∈ s, f i)
(hb : ↑b = ∑ i ∈ s, ↑‖f i‖)


@[to_additive (attr := simp, nolint simpNF)] -- Porting note (#10675): dsimp can not prove this
theorem mem_carrier {s : Subgroup G} {x : G} : x ∈ s.carrier ↔ x ∈ s

{G : Type u_1}
[AddGroup G]
{s : AddSubgroup G}
{x : G}


@[simp]
lemma one_lt_toNNReal {r : ℝ} : 1 < r.toNNReal ↔ 1 < r


/-- The limit bicone for the biproduct over an index type with exactly one term. -/
@[simps]
def limitBiconeOfUnique : LimitBicone f

(CategoryTheory.Limits.limitBiconeOfUnique f).isBilimit.isColimit =
  (CategoryTheory.Limits.colimitCoconeOfUnique f).isColimit


@[to_additive]
theorem r_of_eq {x y : M × S} (h : ↑y.2 * x.1 = ↑x.2 * y.1) : r S x y

{M : Type u_1}
[CommMonoid M]
{S : Submonoid M}
{x y : M × ↥S}
(h : ↑y.2 * x.1 = ↑x.2 * y.1)


/-- A homeomorphism of spaces gives an equivalence of categories of presheaves. -/
@[simps!]
def presheafEquivOfIso {X Y : TopCat} (H : X ≅ Y) : X.Presheaf C ≌ Y.Presheaf C

(C : Type u)
[CategoryTheory.Category.{v, u} C]
{X Y : TopCat}
(H : X ≅ Y)

∀ (X_1 : (TopologicalSpace.Opens ↑Y)ᵒᵖ ⥤ C) (X_2 : (TopologicalSpace.Opens ↑Y)ᵒᵖ),
  ((TopCat.Presheaf.presheafEquivOfIso C H).counitIso.inv.app X_1).app X_2 = X_1.map (CategoryTheory.eqToHom ⋯)


/-- Constructor for isomorphisms in `ComposableArrows C 0`. -/
@[simps!]
def isoMk₀ {F G : ComposableArrows C 0} (e : F.obj' 0 ≅ G.obj' 0) : F ≅ G

{F G : CategoryTheory.ComposableArrows C 0}

(CategoryTheory.ComposableArrows.isoMk₀ e).inv.app i =
  match i with
  | ⟨0, isLt⟩ => e.inv


/-- Given a diagram `CostructuredArrow F X`s, we may obtain a cocone with cone point `X`. -/
@[simps!]
def Cocone.fromCostructuredArrow (F : C ⥤ D) {X : D} (G : J ⥤ CostructuredArrow F X) :
    Cocone (G ⋙ CostructuredArrow.proj F X ⋙ F)

(G : CategoryTheory.Functor J (CategoryTheory.CostructuredArrow F X))

(CategoryTheory.Limits.Cocone.fromCostructuredArrow F G).pt = X


theorem isometry_ofReal : Isometry ((↑) : ℝ → ℂ)


/-- Given two subgroups `H' ⊆ H`, there exists a right transversal to `H'` inside `H`. -/
@[to_additive "Given two subgroups `H' ⊆ H`, there exists a transversal to `H'` inside `H`"]
lemma exists_right_transversal_of_le {H' H : Subgroup G} (h : H' ≤ H) :
    ∃ S : Set G, H' * S = H ∧ Nat.card H' * Nat.card S = Nat.card H

{G : Type u_1}
[AddGroup G]
{H' H : AddSubgroup G}
(h : H' ≤ H)

∃ S, ↑H' + S = ↑H ∧ Nat.card ↥H' * Nat.card ↑S = Nat.card ↥H


@[simp]
theorem trim_eq_self [MeasurableSpace α] {μ : Measure α} : μ.trim le_rfl = μ

{α : Type u_1}
[MeasurableSpace α]
{μ : MeasureTheory.Measure α}


theorem image_subtype_val_Ico_subset (a b : {x // p x}) :
    Subtype.val '' Ico a b ⊆ Ico a.val b.val

{α : Type u_1}
[Preorder α]
{p : α → Prop}
(a b : { x // p x })

Subtype.val '' Set.Ico a b ⊆ Set.Ico ↑a ↑b


∀ {X_1 Y_1 : (TopologicalSpace.Opens ↑Y)ᵒᵖ ⥤ C} (α : X_1 ⟶ Y_1) (X_2 : (TopologicalSpace.Opens ↑X)ᵒᵖ),
  ((TopCat.Presheaf.presheafEquivOfIso C H).inverse.map α).app X_2 =
    α.app (Opposite.op ((TopologicalSpace.Opens.map H.inv).obj (Opposite.unop X_2)))


theorem sub_apply : (f - g) x = f x - g x

{α : Type u}
{β : Type v}
[TopologicalSpace α]
[TopologicalSpace β]
(x : α)
[AddGroup β]
[TopologicalAddGroup β]
(f g : α →C₀ β)


lemma leRec_succ' {n} {motive : (m : ℕ) → n ≤ m → Sort*} (refl le_succ_of_le) :
    (leRec (motive := motive) refl le_succ_of_le (le_succ _)) = le_succ_of_le _ refl

(le_succ_of_le : ⦃k : ℕ⦄ → (h : n ≤ k) → motive k h → motive (k + 1) ⋯)

Nat.leRec refl le_succ_of_le ⋯ = le_succ_of_le ⋯ refl


/-- Shifting cochain complexes by `n` and evaluating in a degree `i` identifies
to the evaluation in degree `i'` when `n + i = i'`. -/
@[simps!]
def shiftEval (n i i' : ℤ) (hi : n + i = i') :
    (CategoryTheory.shiftFunctor (CochainComplex C ℤ) n) ⋙
      HomologicalComplex.eval C (ComplexShape.up ℤ) i ≅
      HomologicalComplex.eval C (ComplexShape.up ℤ) i'

(C : Type u)
[CategoryTheory.Category.{v, u} C]
[CategoryTheory.Preadditive C]
(n i i' : ℤ)
(hi : n + i = i')
(X : CochainComplex C ℤ)

(CochainComplex.shiftEval C n i i' hi).inv.app X = (HomologicalComplex.XIsoOfEq X ⋯).inv


/-- Given three nonzero vectors, adding the angles between them in cyclic order, with the second
vector in each angle negated, results in π. If the vectors add to 0, this is a version of the
sum of the angles of a triangle. -/
@[simp]
theorem oangle_add_cyc3_neg_right {x y z : V} (hx : x ≠ 0) (hy : y ≠ 0) (hz : z ≠ 0) :
    o.oangle x (-y) + o.oangle y (-z) + o.oangle z (-x) = π

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

o.oangle x (-y) + o.oangle y (-z) + o.oangle z (-x) = ↑π


@[simp]
theorem map_vadd (e : P₁ ≃ᵃ[k] P₂) (p : P₁) (v : V₁) : e (v +ᵥ p) = e.linear v +ᵥ e p

{k : Type u_1}
{P₁ : Type u_2}
{P₂ : Type u_3}
{V₁ : Type u_6}
{V₂ : Type u_7}
[Ring k]
[AddCommGroup V₁]
[Module k V₁]
[AffineSpace V₁ P₁]
[AddCommGroup V₂]
[Module k V₂]
[AffineSpace V₂ P₂]
(e : P₁ ≃ᵃ[k] P₂)
(p : P₁)
(v : V₁)


@[to_additive]
theorem isOpen_of_openSubgroup [ContinuousMul G] (H: Subgroup G) {U : OpenSubgroup G} (h : ↑U ≤ H) :
    IsOpen (H : Set G)

{G : Type u_1}
[Group G]
[TopologicalSpace G]
[ContinuousMul G]
(H : Subgroup G)
{U : OpenSubgroup G}
(h : ↑U ≤ H)


/-- When `a` is odd and `b` is even, we can replace `b` by `b / 2`. -/
theorem jacobiSymNat.odd_even (a b c : ℕ) (r : ℤ) (ha : a % 2 = 1) (hb : b % 2 = 0) (hc : b / 2 = c)
    (hr : jacobiSymNat a c = r) : jacobiSymNat a b = r

(hr : Mathlib.Meta.NormNum.jacobiSymNat a c = r)

Mathlib.Meta.NormNum.jacobiSymNat a b = r


theorem Perm.length_eq {l₁ l₂ : List α} (p : l₁ ~ l₂) : length l₁ = length l₂

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


lemma sigmaι_eq_iff (i j : ι) (x y) :
    (Sigma.ι f i).1.base x = (Sigma.ι f j).1.base y ↔
      (Sigma.mk i x : Σ i, f i) = Sigma.mk j y

{ι : Type u}
(f : ι → AlgebraicGeometry.Scheme)
(i j : ι)
(x : ↑↑(f i).toPresheafedSpace)
(y : ↑↑(f j).toPresheafedSpace)

(CategoryTheory.Limits.Sigma.ι f i).val.base x = (CategoryTheory.Limits.Sigma.ι f j).val.base y ↔ ⟨i, x⟩ = ⟨j, y⟩


lemma pi_lex_lt_cons_cons {x₀ y₀ : α 0} {x y : ∀ i : Fin n, α i.succ}
    (s : ∀ {i : Fin n.succ}, α i → α i → Prop) :
    Pi.Lex (· < ·) (@s) (Fin.cons x₀ x) (Fin.cons y₀ y) ↔
      s x₀ y₀ ∨ x₀ = y₀ ∧ Pi.Lex (· < ·) (@fun i : Fin n ↦ @s i.succ) x y

(s : {i : Fin n.succ} → α i → α i → Prop)

Pi.Lex (fun x x_1 => x < x_1) s (Fin.cons x₀ x) (Fin.cons y₀ y) ↔
  s x₀ y₀ ∨ x₀ = y₀ ∧ Pi.Lex (fun x x_1 => x < x_1) (fun i => s) x y


/-- The unit isomorphism of the auto-equivalence of categories `triangleRotation C` of
`Triangle C` given by the rotation of triangles. -/
@[simps!]
def rotCompInvRot : 𝟭 (Triangle C) ≅ rotate C ⋙ invRotate C

[∀ (n : ℤ), (CategoryTheory.shiftFunctor C n).Additive]

(X : CategoryTheory.Pretriangulated.Triangle C)

(CategoryTheory.Pretriangulated.rotCompInvRot.inv.app X).hom₃ = 𝟙 X.obj₃


@[simp]
theorem val_disjSum : (s.disjSum t).1 = s.1.disjSum t.1

{α : Type u_1}
{β : Type u_2}
(s : Finset α)
(t : Finset β)


/-- The point given by `secondInter` lies on the sphere. -/
@[simp]
theorem Sphere.secondInter_mem {s : Sphere P} {p : P} (v : V) : s.secondInter p v ∈ s ↔ p ∈ s

{V : Type u_1}
{P : Type u_2}
[NormedAddCommGroup V]
[InnerProductSpace ℝ V]
[MetricSpace P]
[NormedAddTorsor V P]
{s : EuclideanGeometry.Sphere P}
{p : P}
(v : V)


/-- The unipotent upper triangular matrix
```
(1 r)
(0 1)
```
as an isomorphism.
-/
@[simps]
def Biprod.unipotentUpper {X₁ X₂ : C} (r : X₁ ⟶ X₂) : X₁ ⊞ X₂ ≅ X₁ ⊞ X₂

(CategoryTheory.Biprod.unipotentUpper r).inv = CategoryTheory.Biprod.ofComponents (𝟙 X₁) (-r) 0 (𝟙 X₂)


theorem mod_add_div (m k : ℕ+) : (mod m k + k * div m k : ℕ) = m


@[to_additive]
theorem prod_filter_mul_prod_filter_not
    (s : Finset α) (p : α → Prop) [DecidablePred p] [∀ x, Decidable (¬p x)] (f : α → β) :
    (∏ x ∈ s.filter p, f x) * ∏ x ∈ s.filter fun x => ¬p x, f x = ∏ x ∈ s, f x

{α : Type u_3}
{β : Type u_4}
[CommMonoid β]
(s : Finset α)
(p : α → Prop)
[DecidablePred p]
[(x : α) → Decidable ¬p x]
(f : α → β)

(∏ x ∈ Finset.filter p s, f x) * ∏ x ∈ Finset.filter (fun x => ¬p x) s, f x = ∏ x ∈ s, f x


@[simp] theorem mem_compl_iff (s : Set α) (x : α) : x ∈ sᶜ ↔ x ∉ s

x ∈ sᶜ ↔ ¬x ∈ s


@[measurability]
theorem measurable_sin : Measurable sin


@[simp]
theorem ball_zero : ball x 0 = ∅

{α : Type u}
[PseudoMetricSpace α]
{x : α}


/-- Construct an isomorphism of monoids by giving an isomorphism between the underlying objects
and checking compatibility with unit and multiplication only in the forward direction.
-/
@[simps]
def mkIso {M N : Mon_ C} (f : M.X ≅ N.X) (one_f : M.one ≫ f.hom = N.one := by aesop_cat)
    (mul_f : M.mul ≫ f.hom = (f.hom ⊗ f.hom) ≫ N.mul := by aesop_cat) : M ≅ N

(Mon_.mkIso f one_f mul_f).hom.hom = f.hom


theorem div_def (a b : Rat) : a / b = a * b.inv


theorem existsUnique_zsmul_near_of_pos' {a : α} (ha : 0 < a) (g : α) :
    ∃! k : ℤ, 0 ≤ g - k • a ∧ g - k • a < a

{α : Type u_1}
[LinearOrderedAddCommGroup α]
[Archimedean α]
{a : α}
(ha : 0 < a)
(g : α)


@[reassoc]
lemma homologyMap_comp : homologyMap (φ ≫ ψ) i = homologyMap φ i ≫ homologyMap ψ i

HomologicalComplex.homologyMap (φ ≫ ψ) i = HomologicalComplex.homologyMap φ i ≫ HomologicalComplex.homologyMap ψ i


lemma id :
    (fst φ).1.comp (inl φ) (add_neg_self 1) +
      (snd φ).comp (Cochain.ofHom (inr φ)) (add_zero 0) = Cochain.ofHom (𝟙 _)

(↑(CochainComplex.mappingCone.fst φ)).comp (CochainComplex.mappingCone.inl φ) ⋯ +
    (CochainComplex.mappingCone.snd φ).comp (CochainComplex.HomComplex.Cochain.ofHom (CochainComplex.mappingCone.inr φ))
      ⋯ =
  CochainComplex.HomComplex.Cochain.ofHom (𝟙 (CochainComplex.mappingCone φ))


/-- **Bézout's lemma** -/
theorem exists_gcd_eq_mul_add_mul (a b : R) : ∃ x y, gcd a b = a * x + b * y

{R : Type u}
[CommRing R]
[IsDomain R]
[IsBezout R]
[GCDMonoid R]
(a b : R)


theorem exists_isClopen_of_totally_separated {α : Type*} [TopologicalSpace α]
    [TotallySeparatedSpace α] {x y : α} (hxy : x ≠ y) :
    ∃ U : Set α, IsClopen U ∧ x ∈ U ∧ y ∈ Uᶜ

{α : Type u_3}
[TopologicalSpace α]
[TotallySeparatedSpace α]
{x y : α}
(hxy : x ≠ y)


/-- To show that `∀ y ∈ K, P x y` holds for `x` close enough to `x₀` when `K` is compact,
it is sufficient to show that for all `y₀ ∈ K` there `P x y` holds for `(x, y)` close enough
to `(x₀, y₀)`.

Provided for backwards compatibility,
see `IsCompact.mem_prod_nhdsSet_of_forall` for a stronger statement.
-/
theorem IsCompact.eventually_forall_of_forall_eventually {x₀ : X} {K : Set Y} (hK : IsCompact K)
    {P : X → Y → Prop} (hP : ∀ y ∈ K, ∀ᶠ z : X × Y in 𝓝 (x₀, y), P z.1 z.2) :
    ∀ᶠ x in 𝓝 x₀, ∀ y ∈ K, P x y

(hP : ∀ y ∈ K, ∀ᶠ (z : X × Y) in 𝓝 (x₀, y), P z.1 z.2)


@[to_additive]
theorem nnnorm_prod_le (s : Finset ι) (f : ι → E) : ‖∏ a ∈ s, f a‖₊ ≤ ∑ a ∈ s, ‖f a‖₊

{ι : Type u_4}
{E : Type u_6}
[SeminormedAddCommGroup E]
(s : Finset ι)
(f : ι → E)

‖∑ a ∈ s, f a‖₊ ≤ ∑ a ∈ s, ‖f a‖₊


@[simp]
theorem baseChange_neg : (-f).baseChange A = -f.baseChange A

{R : Type u_1}
{A : Type u_2}
{M : Type u_4}
{N : Type u_5}
[CommRing R]
[Ring A]
[Algebra R A]
[AddCommGroup M]
[Module R M]
[AddCommGroup N]
[Module R N]
(f : M →ₗ[R] N)

LinearMap.baseChange A (-f) = -LinearMap.baseChange A f


@[simp] lemma smul_τ₂ (a : R) (φ : S₁ ⟶ S₂) : (a • φ).τ₂ = a • φ.τ₂

{R : Type u_1}
{C : Type u_2}
[Semiring R]
[CategoryTheory.Category.{u_3, u_2} C]
[CategoryTheory.Preadditive C]
[CategoryTheory.Linear R C]
{S₁ S₂ : CategoryTheory.ShortComplex C}
(a : R)
(φ : S₁ ⟶ S₂)

(a • φ).τ₂ = a • φ.τ₂


@[fun_prop]
theorem HasFDerivWithinAt.sum (h : ∀ i ∈ u, HasFDerivWithinAt (A i) (A' i) s x) :
    HasFDerivWithinAt (fun y => ∑ i ∈ u, A i y) (∑ i ∈ u, A' i) s x


/-- `OrderDual` as a functor. -/
@[simps]
def dual : NonemptyFinLinOrd ⥤ NonemptyFinLinOrd

NonemptyFinLinOrd.dual.obj X = NonemptyFinLinOrd.of (↑X)ᵒᵈ


theorem mul_left_strictMono (h0 : a ≠ 0) (hinf : a ≠ ∞) : StrictMono (a * ·)


protected theorem mul_add (n m k : Nat) : n * (m + k) = n * m + n * k


theorem lcm_image [DecidableEq β] {g : γ → β} (s : Finset γ) :
    (s.image g).lcm f = s.lcm (f ∘ g)

{α : Type u_2}
{β : Type u_3}
{γ : Type u_4}
[CancelCommMonoidWithZero α]
[NormalizedGCDMonoid α]
{f : β → α}
[DecidableEq β]
{g : γ → β}
(s : Finset γ)

(Finset.image g s).lcm f = s.lcm (f ∘ g)


theorem withDensityᵥ_smul' {𝕜 : Type*} [NontriviallyNormedField 𝕜] [NormedSpace 𝕜 E]
    [SMulCommClass ℝ 𝕜 E] (f : α → E) (r : 𝕜) :
    (μ.withDensityᵥ fun x => r • f x) = r • μ.withDensityᵥ f

{α : Type u_1}
{m : MeasurableSpace α}
{μ : MeasureTheory.Measure α}
{E : Type u_3}
[NormedAddCommGroup E]
[NormedSpace ℝ E]
{𝕜 : Type u_4}
[NontriviallyNormedField 𝕜]
[NormedSpace 𝕜 E]
[SMulCommClass ℝ 𝕜 E]
(f : α → E)
(r : 𝕜)


theorem mem_verts_if_mem_edge {G' : Subgraph G} {e : Sym2 V} {v : V} (he : e ∈ G'.edgeSet)
    (hv : v ∈ e) : v ∈ G'.verts

{V : Type u}
{G : SimpleGraph V}
{G' : G.Subgraph}
{e : Sym2 V}
{v : V}
(he : e ∈ G'.edgeSet)
(hv : v ∈ e)


@[simp]
theorem wittPolynomial_one : wittPolynomial p R 1 = C (p : R) * X 1 + X 0 ^ p

W_ R 1 = MvPolynomial.C ↑p * MvPolynomial.X 1 + MvPolynomial.X 0 ^ p


theorem add_comm_equiv {x y : PGame} : x + y ≈ y + x


@[simp]
theorem symm_comp_self (h : α ≃ᵤ β) : (h.symm : β → α) ∘ h = id

{α : Type u}
{β : Type u_1}
[UniformSpace α]
[UniformSpace β]
(h : α ≃ᵤ β)


/-- The continued fraction of a rational number terminates. -/
theorem terminates_of_rat (q : ℚ) : (of q).Terminates


/-- The symbol `J(a | b)` depends only on `a` mod `b`. -/
theorem mod_left (a : ℤ) (b : ℕ) : J(a | b) = J(a % b | b)


/-- `NonemptyCompacts.toCloseds` is a uniform embedding (as it is an isometry) -/
theorem NonemptyCompacts.ToCloseds.uniformEmbedding :
    UniformEmbedding (@NonemptyCompacts.toCloseds α _ _)


/-- The L-series of the Möbius function converges absolutely at `s` if and only if `re s > 1`. -/
lemma LSeriesSummable_moebius_iff {s : ℂ} : LSeriesSummable ↗μ s ↔ 1 < s.re

LSeriesSummable (fun n => ↑(ArithmeticFunction.moebius n)) s ↔ 1 < s.re


/-- The subfunctor of `F` obtained by restricting to the eventual range at each index. -/
@[simps]
def toEventualRanges : J ⥤ Type v

{J : Type u}
[CategoryTheory.Category.{u_1, u} J]
(F : J ⥤ Type v)
[CategoryTheory.IsCofilteredOrEmpty J]

∀ {X Y : J} (f : X ⟶ Y) (a : ↑(F.eventualRange X)),
  F.toEventualRanges.map f a = Set.MapsTo.restrict (F.map f) (F.eventualRange X) (F.eventualRange Y) ⋯ a


/-- (Implementation detail).
The function underlying `A ⊗[R] R[X] →ₐ[R] A[X]`,
as a bilinear function of two arguments.
-/
-- Porting note: was  `@[simps apply_apply]`
@[simps! apply_apply]
def toFunBilinear : A →ₗ[A] R[X] →ₗ[R] A[X]

(R : Type u_1)
(A : Type u_2)
[CommSemiring R]
[Semiring A]
[Algebra R A]
(b : A)
(a : R[X])

((PolyEquivTensor.toFunBilinear R A) b) a = b • (Polynomial.aeval Polynomial.X) a


@[simp] lemma mop_whiskerRight {X Y : C} (f : X ⟶ Y) (Z : C) :
    (f ▷ Z).mop = mop Z ◁ f.mop

{C : Type u₁}
[CategoryTheory.Category.{v₁, u₁} C]
[CategoryTheory.MonoidalCategory C]
{X Y : C}
(f : X ⟶ Y)
(Z : C)

(CategoryTheory.MonoidalCategory.whiskerRight f Z).mop =
  CategoryTheory.MonoidalCategory.whiskerLeft { unmop := Z } f.mop


/-- If the coproduct `Y ⨿ Z` and the coequalizer of `f ≫ ι₁` and `g ≫ ι₂` exist, then the
    pushout of `f` and `g` exists: It is given by composing the inclusions with the coequalizer. -/
theorem hasColimit_span_of_hasColimit_pair_of_hasColimit_parallelPair {C : Type u}
    [𝒞 : Category.{v} C] {X Y Z : C} (f : X ⟶ Y) (g : X ⟶ Z) [HasColimit (pair Y Z)]
    [HasColimit (parallelPair (f ≫ coprod.inl) (g ≫ coprod.inr))] : HasColimit (span f g)

[CategoryTheory.Limits.HasColimit (CategoryTheory.Limits.pair Y Z)]

[CategoryTheory.Limits.HasColimit
    (CategoryTheory.Limits.parallelPair (f ≫ CategoryTheory.Limits.coprod.inl) (g ≫ CategoryTheory.Limits.coprod.inr))]

CategoryTheory.Limits.HasColimit (CategoryTheory.Limits.span f g)


/-- Dependent version of `Submodule.pow_induction_on_left`. -/
@[elab_as_elim]
protected theorem pow_induction_on_left' {C : ∀ (n : ℕ) (x), x ∈ M ^ n → Prop}
    (algebraMap : ∀ r : R, C 0 (algebraMap _ _ r) (algebraMap_mem r))
    (add : ∀ x y i hx hy, C i x hx → C i y hy → C i (x + y) (add_mem ‹_› ‹_›))
    (mem_mul : ∀ m (hm : m ∈ M), ∀ (i x hx), C i x hx → C i.succ (m * x)
      ((pow_succ' M i).symm ▸ (mul_mem_mul hm hx)))
    -- Porting note: swapped argument order to match order of `C`
    {n : ℕ} {x : A}
    (hx : x ∈ M ^ n) : C n x hx

{C : (n : ℕ) → (x : A) → x ∈ M ^ n → Prop}

(algebraMap : ∀ (r : R), C 0 ((algebraMap R A) r) ⋯)

(add : ∀ (x y : A) (i : ℕ) (hx : x ∈ M ^ i) (hy : y ∈ M ^ i), C i x hx → C i y hy → C i (x + y) ⋯)

(mem_mul : ∀ (m : A) (hm : m ∈ M) (i : ℕ) (x : A) (hx : x ∈ M ^ i), C i x hx → C i.succ (m * x) ⋯)


lemma IsEverywherePos.smul_measure (hs : IsEverywherePos μ s) {c : ℝ≥0∞} (hc : c ≠ 0) :
    IsEverywherePos (c • μ) s

{α : Type u_1}
[TopologicalSpace α]
[MeasurableSpace α]
{μ : MeasureTheory.Measure α}
{s : Set α}
(hs : μ.IsEverywherePos s)
{c : ℝ≥0∞}
(hc : c ≠ 0)


lemma LeftHomologyData.mapLeftHomologyIso_eq [S.HasLeftHomology]
    [F.PreservesLeftHomologyOf S] :
    S.mapLeftHomologyIso F = (hl.map F).leftHomologyIso ≪≫ F.mapIso hl.leftHomologyIso.symm


theorem of_eq_of_ne (i j : ι) (x : β i) (h : i ≠ j) : (of _ i x) j = 0

{ι : Type v}
{β : ι → Type w}
[(i : ι) → AddCommMonoid (β i)]
[DecidableEq ι]
(i j : ι)
(x : β i)
(h : i ≠ j)


lemma Function.HasMaxCutPropertyAt.rows_lt_aux
    {f : (Fin 2 → D) → C} {a b : D} (mcf : f.HasMaxCutPropertyAt a b) (hab : a ≠ b)
    {ω : FractionalOperation D 2} (symmega : ω.IsSymmetric)
    {r : Fin 2 → D} (rin : r ∈ (ω.tt ![![a, b], ![b, a]])) :
    f ![a, b] < f r

(mcf : Function.HasMaxCutPropertyAt f a b)


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

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

Equicontinuous F ↔ Equicontinuous ((fun x => u ∘ x) ∘ F)


/-- The binary coproduct functor. -/
@[simps]
def coprod.functor : C ⥤ C ⥤ C

(CategoryTheory.Limits.coprod.functor.obj X).obj Y = (X ⨿ Y)


theorem update_comp_equiv [DecidableEq α'] [DecidableEq α] (f : α → β)
    (g : α' ≃ α) (a : α) (v : β) :
    update f a v ∘ g = update (f ∘ g) (g.symm a) v

{α' : Sort u_1}
{α : Sort u_2}
{β : Sort u_3}
[DecidableEq α']
[DecidableEq α]
(f : α → β)
(g : α' ≃ α)
(a : α)
(v : β)

Function.update f a v ∘ ⇑g = Function.update (f ∘ ⇑g) (g.symm a) v


/-- Every lower adjoint induces a closure operator given by the composition. This is the partial
order version of the statement that every adjunction induces a monad. -/
@[simps]
def closureOperator : ClosureOperator α

{α : Type u_1}
{β : Type u_4}
[PartialOrder α]
[Preorder β]
{u : β → α}
(l : LowerAdjoint u)
(x : α)


@[to_additive pi_norm_const_le]
lemma pi_norm_const_le' (a : E) : ‖fun _ : ι => a‖ ≤ ‖a‖

{ι : Type u_1}
{E : Type u_2}
[Fintype ι]
[SeminormedAddGroup E]
(a : E)


/-- A sequentially complete pseudoemetric space is complete. -/
theorem complete_of_cauchySeq_tendsto :
    (∀ u : ℕ → α, CauchySeq u → ∃ a, Tendsto u atTop (𝓝 a)) → CompleteSpace α

(∀ (u : ℕ → α), CauchySeq u → ∃ a, Filter.Tendsto u Filter.atTop (𝓝 a)) → CompleteSpace α


/--
The categories of coherent sheaves and extensive sheaves on `C` are equivalent if `C` is
preregular, finitary extensive, and every object is projective.
-/
@[simps]
def coherentExtensiveEquivalence [Preregular C] [FinitaryExtensive C] [∀ (X : C), Projective X] :
    Sheaf (coherentTopology C) A ≌ Sheaf (extensiveTopology C) A

[∀ (X : C), CategoryTheory.Projective X]

CategoryTheory.Presheaf.coherentExtensiveEquivalence.unitIso =
  CategoryTheory.Iso.refl (CategoryTheory.Functor.id (CategoryTheory.Sheaf (CategoryTheory.coherentTopology C) A))


theorem coe_star_mul_self (U : unitary R) : (star U : R) * U = 1

{R : Type u_1}
[Monoid R]
[StarMul R]
(U : ↥(unitary R))


@[simp]
theorem hasFTaylorSeriesUpToOn_pi' :
    HasFTaylorSeriesUpToOn n Φ P' s ↔
      ∀ i, HasFTaylorSeriesUpToOn n (fun x => Φ x i)
        (fun x m => (@ContinuousLinearMap.proj 𝕜 _ ι F' _ _ _ i).compContinuousMultilinearMap
          (P' x m)) s

{P' : E → FormalMultilinearSeries 𝕜 E ((i : ι) → F' i)}

HasFTaylorSeriesUpToOn n Φ P' s ↔
  ∀ (i : ι),
    HasFTaylorSeriesUpToOn n (fun x => Φ x i)
      (fun x m => (ContinuousLinearMap.proj i).compContinuousMultilinearMap (P' x m)) s


theorem unpaired {f : ℕ → ℕ →. α} : Partrec (Nat.unpaired f) ↔ Partrec₂ f

{α : Type u_1}
[Primcodable α]
{f : ℕ → ℕ →. α}


/-- The same-universe version of `Field.lift_rank_mul_lift_sepDegree_of_isSeparable`. -/
lemma rank_mul_sepDegree_of_isSeparable (K : Type v) [Field K] [Algebra F K]
    [Algebra E K] [IsScalarTower F E K] [Algebra.IsSeparable F E] :
    Module.rank F E * sepDegree E K = sepDegree F K

(F : Type u)
(E : Type v)
[Field F]
[Field E]
[Algebra F E]
(K : Type v)
[Field K]
[Algebra F K]
[Algebra E K]
[IsScalarTower F E K]
[Algebra.IsSeparable F E]

Module.rank F E * Field.sepDegree E K = Field.sepDegree F K


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

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


/-- An `n`-Freiman homomorphism from a set `A` to a set `B` is a map which preserves products of `n`
elements. -/
@[to_additive]
structure IsMulFreimanIso (n : ℕ) (A : Set α) (B : Set β) (f : α → β) : Prop where
  bijOn : BijOn f A B
  /-- An `n`-Freiman homomorphism preserves products of `n` elements. -/
  map_prod_eq_map_prod ⦃s t : Multiset α⦄ (hsA : ∀ ⦃x⦄, x ∈ s → x ∈ A) (htA : ∀ ⦃x⦄, x ∈ t → x ∈ A)
    (hs : Multiset.card s = n) (ht : Multiset.card t = n) :
    (s.map f).prod = (t.map f).prod ↔ s.prod = t.prod

{α : Type u_2}
{β : Type u_3}
[CommMonoid α]
[CommMonoid β]
{n : ℕ}
{A : Set α}
{B : Set β}
{f : α → β}
(self : IsMulFreimanIso n A B f)


protected theorem add_right (c : α) (h : a ≡ b [PMOD p]) : a + c ≡ b + c [PMOD p]

{α : Type u_1}
[AddCommGroup α]
{p a b : α}
(c : α)
(h : a ≡ b [PMOD p])


/-- A commutative algebra is isomorphic to its opposite. -/
@[simps!]
def toOpposite : A ≃ₐ[R] Aᵐᵒᵖ

(R : Type u_1)
(A : Type u_3)
[CommSemiring R]
[CommSemiring A]
[Algebra R A]

∀ (a : Aᵐᵒᵖ), (AlgEquiv.toOpposite R A).symm a = MulOpposite.unop a


@[simp]
theorem natAbs_mod_two (a : ℤ) : (a.natAbs : ZMod 2) = a


lemma StrictAntiOn.image_Iio_subset (h : StrictAntiOn f (Iic b)) : f '' Iio b ⊆ Ioi (f b)

{α : Type u_1}
{β : Type u_2}
{f : α → β}
[Preorder α]
[Preorder β]
{b : α}
(h : StrictAntiOn f (Set.Iic b))


protected theorem comp (hg : QuotientMap g) (hf : QuotientMap f) : QuotientMap (g ∘ f)

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


theorem ae_le_of_forall_setLIntegral_le_of_sigmaFinite₀ [SigmaFinite μ]
    {f g : α → ℝ≥0∞} (hf : AEMeasurable f μ)
    (h : ∀ s, MeasurableSet s → μ s < ∞ → ∫⁻ x in s, f x ∂μ ≤ ∫⁻ x in s, g x ∂μ) :
    f ≤ᵐ[μ] g

(h : ∀ (s : Set α), MeasurableSet s → μ s < ⊤ → ∫⁻ (x : α) in s, f x ∂μ ≤ ∫⁻ (x : α) in s, g x ∂μ)


theorem tendsto_tsum_powerSeries_nhdsWithin_lt
    (h : Tendsto (fun n ↦ ∑ i ∈ range n, f i) atTop (𝓝 l)) :
    Tendsto (fun z ↦ ∑' n, f n * z ^ n) ((𝓝[<] 1).map ofReal') (𝓝 l)

(h : Filter.Tendsto (fun n => ∑ i ∈ Finset.range n, f i) Filter.atTop (𝓝 l))

Filter.Tendsto (fun z => ∑' (n : ℕ), f n * z ^ n) (Filter.map Complex.ofReal' (𝓝[<] 1)) (𝓝 l)


theorem mulMap_op :
    mulMap (equivOpposite.symm (MulOpposite.op M)) (equivOpposite.symm (MulOpposite.op N)) =
    (MulOpposite.opLinearEquiv R).toLinearMap ∘ₗ mulMap N M ∘ₗ
    (TensorProduct.congr
      (LinearEquiv.ofSubmodule' (MulOpposite.opLinearEquiv R).symm M)
      (LinearEquiv.ofSubmodule' (MulOpposite.opLinearEquiv R).symm N) ≪≫ₗ
    TensorProduct.comm R M N).toLinearMap

{R : Type u}
{S : Type v}
[CommSemiring R]
[Semiring S]
[Algebra R S]
(M N : Submodule R S)

(Submodule.equivOpposite.symm (MulOpposite.op M)).mulMap (Submodule.equivOpposite.symm (MulOpposite.op N)) =
  ↑(MulOpposite.opLinearEquiv R) ∘ₗ
    N.mulMap M ∘ₗ
      ↑(TensorProduct.congr ((MulOpposite.opLinearEquiv R).symm.ofSubmodule' M)
            ((MulOpposite.opLinearEquiv R).symm.ofSubmodule' N) ≪≫ₗ
          TensorProduct.comm R ↥M ↥N)


@[to_additive]
theorem map_div₂ {_ : Group M} {_ : MulOneClass N} {_ : CommGroup P} (f : M →* N →* P)
    (m₁ m₂ : M) (n : N) : f (m₁ / m₂) n = f m₁ n / f m₂ n

{M : Type uM}
{N : Type uN}
{P : Type uP}

∀ {x : Group M} {x_1 : MulOneClass N} {x_2 : CommGroup P} (f : M →* N →* P) (m₁ m₂ : M) (n : N),
  (f (m₁ / m₂)) n = (f m₁) n / (f m₂) n


theorem csSup_mem {s : Set ℤ} (h1 : s.Nonempty) (h2 : BddAbove s) : sSup s ∈ s


@[to_additive (attr := simp)]
theorem mul_inv_eq_one {a : α} : a * ↑u⁻¹ = 1 ↔ a = u

{α : Type u}
[Monoid α]
{u : αˣ}
{a : α}


theorem derivWithin_sum (hxs : UniqueDiffWithinAt 𝕜 s x)
    (h : ∀ i ∈ u, DifferentiableWithinAt 𝕜 (A i) s x) :
    derivWithin (fun y => ∑ i ∈ u, A i y) s x = ∑ i ∈ u, derivWithin (A i) s x


@[continuity, fun_prop]
lemma Hom.continuous {X Y : Scheme} (f : X ⟶ Y) : Continuous f.1.base

{X Y : AlgebraicGeometry.Scheme}
(f : X ⟶ Y)


∀ (a : A), (AlgEquiv.toOpposite R A) a = MulOpposite.op a


theorem fst_mem_support_of_mem_edges {t u v w : V} (p : G.Walk v w) (he : s(t, u) ∈ p.edges) :
    t ∈ p.support

{V : Type u}
{G : SimpleGraph V}
{t u v w : V}
(p : G.Walk v w)
(he : s(t, u) ∈ p.edges)


/-- The other direction does not hold because of the `f-f` cross terms on the RHS. -/
theorem map₂_distrib_le_left {m : α → δ → ε} {n : β → γ → δ} {m₁ : α → β → β'} {m₂ : α → γ → γ'}
    {n' : β' → γ' → ε} (h_distrib : ∀ a b c, m a (n b c) = n' (m₁ a b) (m₂ a c)) :
    map₂ m f (map₂ n g h) ≤ map₂ n' (map₂ m₁ f g) (map₂ m₂ f h)

{m : α → δ → ε}

{n : β → γ → δ}

{m₁ : α → β → β'}

{m₂ : α → γ → γ'}

(h_distrib : ∀ (a : α) (b : β) (c : γ), m a (n b c) = n' (m₁ a b) (m₂ a c))

Filter.map₂ m f (Filter.map₂ n g h) ≤ Filter.map₂ n' (Filter.map₂ m₁ f g) (Filter.map₂ m₂ f h)


@[to_additive]
theorem mul_self_mem_of_index_two (h : H.index = 2) (a : G) : a * a ∈ H

{G : Type u_1}
[Group G]
{H : Subgroup G}
(h : H.index = 2)
(a : G)


theorem coeFn_compLp (hg : LipschitzWith c g) (g0 : g 0 = 0) (f : Lp E p μ) :
    hg.compLp g0 f =ᵐ[μ] g ∘ f

{α : Type u_1}
{E : Type u_2}
{F : Type u_3}
{m0 : MeasurableSpace α}
{p : ℝ≥0∞}
{μ : MeasureTheory.Measure α}
[NormedAddCommGroup E]
[NormedAddCommGroup F]
{g : E → F}
{c : ℝ≥0}
(hg : LipschitzWith c g)
(g0 : g 0 = 0)
(f : ↥(MeasureTheory.Lp E p μ))


@[norm_cast]
theorem tendsto_coe {α : Type*} {f : Filter α} {m : α → ℝ} {a : ℝ} :
    Tendsto (fun a => (m a : EReal)) f (𝓝 ↑a) ↔ Tendsto m f (𝓝 a)

{α : Type u_2}
{f : Filter α}
{m : α → ℝ}
{a : ℝ}

Filter.Tendsto (fun a => ↑(m a)) f (𝓝 ↑a) ↔ Filter.Tendsto m f (𝓝 a)


/-- **Phragmen-Lindelöf principle** in the third quadrant. Let `f : ℂ → E` be a function such that

* `f` is differentiable in the open third quadrant and is continuous on its closure;
* `‖f z‖` is bounded from above by `A * exp(B * (abs z) ^ c)` on the open third quadrant
  for some `A`, `B`, and `c < 2`;
* `f` is equal to zero on the boundary of the third quadrant.

Then `f` is equal to zero on the closed third quadrant. -/
theorem eq_zero_on_quadrant_III (hd : DiffContOnCl ℂ f (Iio 0 ×ℂ Iio 0))
    (hB : ∃ c < (2 : ℝ), ∃ B,
      f =O[cobounded ℂ ⊓ 𝓟 (Iio 0 ×ℂ Iio 0)] fun z => expR (B * abs z ^ c))
    (hre : ∀ x : ℝ, x ≤ 0 → f x = 0) (him : ∀ x : ℝ, x ≤ 0 → f (x * I) = 0) :
    EqOn f 0 {z | z.re ≤ 0 ∧ z.im ≤ 0}

(hd : DiffContOnCl ℂ f (Set.Iio 0 ×ℂ Set.Iio 0))

(hB : ∃ c < 2, ∃ B, f =O[Bornology.cobounded ℂ ⊓ 𝓟 (Set.Iio 0 ×ℂ Set.Iio 0)] fun z => expR (B * Complex.abs z ^ c))


lemma minpolyDiv_monic : Monic (minpolyDiv R x)

{R : Type u_2}
{S : Type u_1}
[CommRing R]
[CommRing S]
[Algebra R S]
{x : S}
(hx : IsIntegral R x)


@[ext]
theorem ext {f g : α →ᵈ β} (h : ∀ x, f x = g x) : f = g

{α : Type u_1}
{β : Type u_2}
[PseudoEMetricSpace α]
[PseudoEMetricSpace β]
{f g : α →ᵈ β}
(h : ∀ (x : α), f x = g x)


private lemma _root_.AddHom.map_smul_top_toAddSubgroup_of_surjective
    {f : M →+ M₂} {as : List R} {bs : List S} (hf : Function.Surjective f)
    (h : List.Forall₂ (fun r s => ∀ x, f (r • x) = s • f x) as bs) :
    (Ideal.ofList as • ⊤ : Submodule R M).toAddSubgroup.map f =
      (Ideal.ofList bs • ⊤ : Submodule S M₂).toAddSubgroup

(h : List.Forall₂ (fun r s => ∀ (x : M), f (r • x) = s • f x) as bs)

AddSubgroup.map f (Ideal.ofList as • ⊤).toAddSubgroup = (Ideal.ofList bs • ⊤).toAddSubgroup


@[to_additive (attr := simp)]
theorem one_ne_coe {a : α} : (1 : WithOne α) ≠ a


theorem inner_comp_rightAngleRotation (x y : E) : ⟪J x, J y⟫ = ⟪x, y⟫

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

⟪o.rightAngleRotation x, o.rightAngleRotation y⟫_ℝ = ⟪x, y⟫_ℝ


/-- Given three points on a circle, twice the radius of that circle may be expressed explicitly as
the distance between two of those points divided by the absolute value of the sine of the angle
at the third point (a version of the law of sines or sine rule). -/
theorem dist_div_sin_oangle_eq_two_mul_radius {s : Sphere P} {p₁ p₂ p₃ : P} (hp₁ : p₁ ∈ s)
    (hp₂ : p₂ ∈ s) (hp₃ : p₃ ∈ s) (hp₁p₂ : p₁ ≠ p₂) (hp₁p₃ : p₁ ≠ p₃) (hp₂p₃ : p₂ ≠ p₃) :
    dist p₁ p₃ / |Real.Angle.sin (∡ p₁ p₂ p₃)| = 2 * s.radius

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

dist p₁ p₃ / |(∡ p₁ p₂ p₃).sin| = 2 * s.radius


@[simp] theorem beq_iff_eq [BEq α] [LawfulBEq α] (a b : α) : a == b ↔ a = b

{α : Type u_1}
[BEq α]
[LawfulBEq α]
(a b : α)


theorem WOppSide.trans_sOppSide {s : AffineSubspace R P} {x y z : P} (hxy : s.WOppSide x y)
    (hyz : s.SOppSide y z) : s.WSameSide x z

{R : Type u_1}
{V : Type u_2}
{P : Type u_4}
[LinearOrderedField R]
[AddCommGroup V]
[Module R V]
[AddTorsor V P]
{s : AffineSubspace R P}
{x y z : P}
(hxy : s.WOppSide x y)
(hyz : s.SOppSide y z)


theorem sin_sub_pi (x : ℂ) : sin (x - π) = -sin x

Complex.sin (x - ↑Real.pi) = -Complex.sin x


/-- A scheme `X` is Noetherian if it is locally Noetherian and compact. -/
@[mk_iff]
class IsNoetherian (X : Scheme) extends IsLocallyNoetherian X, CompactSpace X : Prop

AlgebraicGeometry.IsNoetherian X ↔ AlgebraicGeometry.IsLocallyNoetherian X ∧ CompactSpace ↑↑X.toPresheafedSpace


@[simp]
protected theorem of (x : α) : lift f (of x) = f x

{α : Type u}
{β : Type v}
[AddCommGroup β]
(f : α → β)
(x : α)

(FreeAbelianGroup.lift f) (FreeAbelianGroup.of x) = f x


@[to_additive]
theorem orbit_smul_subset (m : M) (a : α) : orbit M (m • a) ⊆ orbit M a

{M : Type u}
[Monoid M]
{α : Type v}
[MulAction M α]
(m : M)
(a : α)

MulAction.orbit M (m • a) ⊆ MulAction.orbit M a


theorem of_diff {M : Type*} [AddCommGroup M] [TopologicalSpace M] [T2Space M]
    {v : VectorMeasure α M} {A B : Set α} (hA : MeasurableSet A) (hB : MeasurableSet B)
    (h : A ⊆ B) : v (B \ A) = v B - v A

{α : Type u_1}
{m : MeasurableSpace α}
{M : Type u_4}
[AddCommGroup M]
[TopologicalSpace M]
[T2Space M]
{v : MeasureTheory.VectorMeasure α M}
{A B : Set α}
(hA : MeasurableSet A)
(hB : MeasurableSet B)
(h : A ⊆ B)


@[simp]
theorem sup_snd (c d : Concept α β r) : (c ⊔ d).snd = c.snd ∩ d.snd

{α : Type u_2}
{β : Type u_3}
{r : α → β → Prop}
(c d : Concept α β r)

(c ⊔ d).toProd.2 = c.toProd.2 ∩ d.toProd.2


/-- `Real.log` is strictly concave on `(0, +∞)`. -/
theorem strictConcaveOn_log_Ioi : StrictConcaveOn ℝ (Ioi 0) log


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


@[simp]
theorem unitsEquiv_apply (f : (M →L[R] M)ˣ) (x : M) : unitsEquiv R M f x = (f : M →L[R] M) x

(R : Type u_1)
[Ring R]
(M : Type u_3)
[TopologicalSpace M]
[AddCommGroup M]
[Module R M]
(f : (M →L[R] M)ˣ)
(x : M)

((ContinuousLinearEquiv.unitsEquiv R M) f) x = ↑f x


theorem run_contT_map_contT (f : m r → m r) (x : ContT r m α) : run (map f x) = f ∘ run x

{r : Type u}
{m : Type u → Type v}
{α : Type w}
(f : m r → m r)
(x : ContT r m α)


theorem liftPropOn_congr (h : LiftPropOn P g s) (h₁ : ∀ y ∈ s, g' y = g y) : LiftPropOn P g' s

{H : Type u_1}
{M : Type u_2}
{H' : Type u_3}
{M' : Type u_4}
[TopologicalSpace H]
[TopologicalSpace M]
[ChartedSpace H M]
[TopologicalSpace H']
[TopologicalSpace M']
[ChartedSpace H' M']
{G : StructureGroupoid H}
{G' : StructureGroupoid H'}
{P : (H → H') → Set H → H → Prop}
{g g' : M → M'}
{s : Set M}
(hG : G.LocalInvariantProp G' P)
(h : ChartedSpace.LiftPropOn P g s)
(h₁ : ∀ y ∈ s, g' y = g y)


@[simp, norm_cast] theorem ofNat_pos {n : Nat} : 0 < (↑n : Int) ↔ 0 < n


theorem add_lf_add_left {y z : PGame} (h : y ⧏ z) (x) : x + y ⧏ x + z

{y z : SetTheory.PGame}
(h : y.LF z)
(x : SetTheory.PGame)


theorem sigma_diff_sigma : s₁.sigma t₁ \ s₂.sigma t₂ = s₁.sigma (t₁ \ t₂) ∪ (s₁ \ s₂).sigma t₁

{ι : Type u_1}
{α : ι → Type u_3}
{s₁ s₂ : Set ι}
{t₁ t₂ : (i : ι) → Set (α i)}


lemma isProbabilityMeasure_iff : IsProbabilityMeasure μ ↔ μ univ = 1

{α : Type u_1}
{m0 : MeasurableSpace α}
{μ : MeasureTheory.Measure α}

MeasureTheory.IsProbabilityMeasure μ ↔ μ Set.univ = 1


lemma coe_id {X : RingCat} : (𝟙 X : X → X) = id


/-- `C a` is the constant Hahn Series `a`. `C` is provided as a ring homomorphism. -/
@[simps]
def C : R →+* HahnSeries Γ R

{Γ : Type u_1}
{R : Type u_3}
[OrderedCancelAddCommMonoid Γ]
[NonAssocSemiring R]
(a : R)

HahnSeries.C a = (HahnSeries.single 0) a


@[to_additive (attr := simp)]
theorem mulIndicator_range_comp {ι : Sort*} (f : ι → α) (g : α → M) :
    mulIndicator (range f) g ∘ f = g ∘ f

{α : Type u_1}
{M : Type u_4}
[Zero M]
{ι : Sort u_6}
(f : ι → α)
(g : α → M)


@[deprecated get_ofFn (since := "2023-01-17")]
theorem nthLe_ofFn {n} (f : Fin n → α) (i : Fin n) :
    nthLe (ofFn f) i ((length_ofFn f).symm ▸ i.2) = f i

{α : Type u}
{n : ℕ}
(f : Fin n → α)
(i : Fin n)


/-- In a (pre)irreducible space, a nonempty open set is dense. -/
protected theorem IsOpen.dense [PreirreducibleSpace X] (ho : IsOpen s) (hne : s.Nonempty) :
    Dense s

{X : Type u_1}
[TopologicalSpace X]
{s : Set X}
[PreirreducibleSpace X]
(ho : IsOpen s)
(hne : s.Nonempty)


theorem monotoneOn_iff_monotone : MonotoneOn f s ↔
    Monotone fun a : s => f a

{α : Type u}
{β : Type v}
{s : Set α}
[Preorder α]
[Preorder β]
{f : α → β}


theorem closure_sup_closure_le (x y : α) : u (l x) ⊔ u (l y) ≤ u (l (x ⊔ y))

{α : Type u_1}
{β : Type u_4}
[SemilatticeSup α]
[Preorder β]
{u : β → α}
(l : LowerAdjoint u)
(x y : α)

u (l.toFun x) ⊔ u (l.toFun y) ≤ u (l.toFun (x ⊔ y))


@[refl]
theorem oneOneEquiv_refl {α} [Primcodable α] (p : α → Prop) : OneOneEquiv p p

{α : Type u_1}
[Primcodable α]
(p : α → Prop)


theorem lfpApprox_monotone : Monotone (lfpApprox f x)

{α : Type u}
[CompleteLattice α]
(f : α →o α)
(x : α)


theorem IsGreatest.isLeast_image2 (ha : IsGreatest s a) (hb : IsGreatest t b) :
    IsLeast (Set.image2 f s t) (f a b)

{f : α → β → γ}

(h₀ : ∀ (b : β), Antitone (Function.swap f b))


theorem coeFn_inf (f g : Lp E p μ) : ⇑(f ⊓ g) =ᵐ[μ] ⇑f ⊓ ⇑g

{α : Type u_1}
{E : Type u_2}
{m : MeasurableSpace α}
{μ : MeasureTheory.Measure α}
{p : ℝ≥0∞}
[NormedLatticeAddCommGroup E]
(f g : ↥(MeasureTheory.Lp E p μ))

↑↑(f ⊓ g) =ᵐ[μ] ↑↑f ⊓ ↑↑g


/-- A totally bounded set is separable in countably generated uniform spaces. This can be obtained
from the more general `EMetric.subset_countable_closure_of_almost_dense_set`.-/
lemma TotallyBounded.isSeparable [UniformSpace X] [i : IsCountablyGenerated (𝓤 X)]
    {s : Set X} (h : TotallyBounded s) : TopologicalSpace.IsSeparable s

{X : Type u_1}
[UniformSpace X]
[i : (𝓤 X).IsCountablyGenerated]
{s : Set X}
(h : TotallyBounded s)


lemma span_coeff_minpolyDiv :
    Submodule.span R (Set.range (coeff (minpolyDiv R x))) =
      Subalgebra.toSubmodule (Algebra.adjoin R {x})

{R : Type u_2}
{S : Type u_1}
[CommRing R]
[CommRing S]
[Algebra R S]
{x : S}
(hx : IsIntegral R x)

Submodule.span R (Set.range (minpolyDiv R x).coeff) = Subalgebra.toSubmodule (Algebra.adjoin R {x})


@[simp, reassoc]
theorem comp_right {X Y Z : Arrow T} (f : X ⟶ Y) (g : Y ⟶ Z) :
    (f ≫ g).right = f.right ≫ g.right

{T : Type u}
[CategoryTheory.Category.{v, u} T]
{X Y Z : CategoryTheory.Arrow T}
(f : X ⟶ Y)
(g : Y ⟶ Z)

(CategoryTheory.CategoryStruct.comp f g).right = CategoryTheory.CategoryStruct.comp f.right g.right


theorem pi_dvd_iff {x y : ∀ i, G i} : x ∣ y ↔ ∀ i, x i ∣ y i

{ι : Type u_1}
{G : ι → Type u_4}
[(i : ι) → Semigroup (G i)]
{x y : (i : ι) → G i}


theorem integral_rpow_mul_exp_neg_mul_rpow {p q b : ℝ} (hp : 0 < p) (hq : - 1 < q) (hb : 0 < b) :
    ∫ x in Ioi (0 : ℝ), x ^ q * exp (- b * x ^ p) =
      b ^ (-(q + 1) / p) * (1 / p) * Gamma ((q + 1) / p)


@[simp]
theorem not_bddAbove_univ [NoMaxOrder α] : ¬BddAbove (univ : Set α)

{α : Type u}
[Preorder α]
[NoMaxOrder α]


/-- The Riesz content λ associated to a given positive linear functional Λ is
finitely subadditive: `λ(K₁ ∪ K₂) ≤ λ(K₁) + λ(K₂)` for any compact subsets `K₁, K₂ ⊆ X`. -/
theorem rieszContentAux_sup_le (K1 K2 : Compacts X) :
    rieszContentAux Λ (K1 ⊔ K2) ≤ rieszContentAux Λ K1 + rieszContentAux Λ K2

{X : Type u_1}
[TopologicalSpace X]
(Λ : (X →ᵇ ℝ≥0) →ₗ[ℝ≥0] ℝ≥0)
(K1 K2 : TopologicalSpace.Compacts X)


@[simp] theorem insert_nil (a : α) : [].insert a = [a]

{α : Type u_1}
[BEq α]
[LawfulBEq α]
(a : α)


theorem integral_add (hf : Integrable I l f vol) (hg : Integrable I l g vol) :
    integral I l (f + g) vol = integral I l f vol + integral I l g vol

{ι : Type u}
{E : Type v}
{F : Type w}
[NormedAddCommGroup E]
[NormedSpace ℝ E]
[NormedAddCommGroup F]
[NormedSpace ℝ F]
{I : BoxIntegral.Box ι}
[Fintype ι]
{l : BoxIntegral.IntegrationParams}
{f g : (ι → ℝ) → E}
{vol : ι →ᵇᵃ[⊤] E →L[ℝ] F}
(hf : BoxIntegral.Integrable I l f vol)
(hg : BoxIntegral.Integrable I l g vol)

BoxIntegral.integral I l (f + g) vol = BoxIntegral.integral I l f vol + BoxIntegral.integral I l g vol


@[to_additive]
theorem uniformContinuous_monoidHom_of_continuous {hom : Type*} [UniformSpace β] [Group β]
    [UniformGroup β] [FunLike hom α β] [MonoidHomClass hom α β] {f : hom} (h : Continuous f) :
    UniformContinuous f

{α : Type u_1}
{β : Type u_2}
[UniformSpace α]
[AddGroup α]
[UniformAddGroup α]
{hom : Type u_3}
[UniformSpace β]
[AddGroup β]
[UniformAddGroup β]
[FunLike hom α β]
[AddMonoidHomClass hom α β]
{f : hom}
(h : Continuous ⇑f)


@[simp, norm_cast] lemma ofReal_natCast (n : ℕ) : ENNReal.ofReal n = n


lemma CotangentSpace.span_image_eq_top_iff [IsNoetherianRing R] {s : Set (maximalIdeal R)} :
    Submodule.span (ResidueField R) ((maximalIdeal R).toCotangent '' s) = ⊤ ↔
      Submodule.span R s = ⊤

{R : Type u_1}
[CommRing R]
[LocalRing R]
[IsNoetherianRing R]
{s : Set ↥(LocalRing.maximalIdeal R)}

Submodule.span (LocalRing.ResidueField R) (⇑(LocalRing.maximalIdeal R).toCotangent '' s) = ⊤ ↔ Submodule.span R s = ⊤


@[symm]
theorem IndepSets.symm {s₁ s₂ : Set (Set Ω)} (h : IndepSets s₁ s₂ μ) : IndepSets s₂ s₁ μ

(h : ProbabilityTheory.IndepSets s₁ s₂ μ)


theorem comap_mono {f : F} {q q' : Submodule R₂ M₂} : q ≤ q' → comap f q ≤ comap f q'

{R : Type u_1}
{R₂ : Type u_3}
{M : Type u_5}
{M₂ : Type u_7}
[Semiring R]
[Semiring R₂]
[AddCommMonoid M]
[AddCommMonoid M₂]
[Module R M]
[Module R₂ M₂]
{σ₁₂ : R →+* R₂}
{F : Type u_9}
[FunLike F M M₂]
[SemilinearMapClass F σ₁₂ M M₂]
{f : F}
{q q' : Submodule R₂ M₂}

q ≤ q' → Submodule.comap f q ≤ Submodule.comap f q'


/-- Defining equation for the recursor of `W` -/
theorem wRec_eq {α : TypeVec n} {C : Type*}
    (g : ∀ a : P.A, P.drop.B a ⟹ α → (P.last.B a → P.W α) → (P.last.B a → C) → C) (a : P.A)
    (f' : P.drop.B a ⟹ α) (f : P.last.B a → P.W α) :
    P.wRec g (P.wMk a f' f) = g a f' f fun i => P.wRec g (f i)

(g : (a : P.A) → (P.drop.B a).Arrow α → (P.last.B a → P.W α) → (P.last.B a → C) → C)


theorem compare_def_le (a b : Nat) :
    compare a b = if a ≤ b then if b ≤ a then .eq else .lt else .gt

compare a b = if a ≤ b then if b ≤ a then Ordering.eq else Ordering.lt else Ordering.gt


theorem symmDiff_eq_sup_sdiff_inf : a ∆ b = (a ⊔ b) \ (a ⊓ b)

{α : Type u_2}
[GeneralizedCoheytingAlgebra α]
(a b : α)


theorem essSup_mul_le (f g : α → ℝ≥0∞) : essSup (f * g) μ ≤ essSup f μ * essSup g μ

{α : Type u_1}
{m : MeasurableSpace α}
{μ : MeasureTheory.Measure α}
(f g : α → ℝ≥0∞)


theorem finset_sum_eq_sup_iff_disjoint [DecidableEq α] {β : Type*} {i : Finset β}
    {f : β → Multiset α} :
    i.sum f = i.sup f ↔
      ∀ᵉ (x ∈ i) (y ∈ i), x ≠ y → Multiset.Disjoint (f x) (f y)

{α : Type u_2}
[DecidableEq α]
{β : Type u_9}
{i : Finset β}
{f : β → Multiset α}

i.sum f = i.sup f ↔ ∀ x ∈ i, ∀ y ∈ i, x ≠ y → (f x).Disjoint (f y)


theorem map_toSubmodule {S : Subalgebra R A} {f : A →ₐ[R] B} :
    (toSubmodule <| S.map f) = S.toSubmodule.map f.toLinearMap

{R : Type u}
{A : Type v}
{B : Type w}
[CommSemiring R]
[Semiring A]
[Algebra R A]
[Semiring B]
[Algebra R B]
{S : Subalgebra R A}
{f : A →ₐ[R] B}

Subalgebra.toSubmodule (Subalgebra.map f S) = Submodule.map f.toLinearMap (Subalgebra.toSubmodule S)


theorem arg_real_mul (x : ℂ) {r : ℝ} (hr : 0 < r) : arg (r * x) = arg x


theorem sum_sq (s : Finset ι) (f : ι → R) : (∑ i ∈ s, f i) ^ 2 = ∑ i ∈ s, f i ^ 2

{R : Type u_1}
{ι : Type u_2}
[CommSemiring R]
[CharP R 2]
(s : Finset ι)
(f : ι → R)


/-- A special case of `List.ofFn_inj` for when the two functions are indexed by defeq `n`. -/
@[simp]
theorem ofFn_inj {n : ℕ} {f g : Fin n → α} : ofFn f = ofFn g ↔ f = g


@[simp]
theorem smul_contLinear (t : R) (f : P →ᴬ[R] W) : (t • f).contLinear = t • f.contLinear

{R : Type u_2}
{V : Type u_3}
{W : Type u_4}
{P : Type u_6}
[NormedAddCommGroup V]
[MetricSpace P]
[NormedAddTorsor V P]
[NormedAddCommGroup W]
[NormedField R]
[NormedSpace R V]
[NormedSpace R W]
(t : R)
(f : P →ᴬ[R] W)


theorem fst_iso_of_right_embedding_range_subset {X Y S : TopCat} (f : X ⟶ S) {g : Y ⟶ S}
    (hg : Embedding g) (H : Set.range f ⊆ Set.range g) :
    IsIso (pullback.fst f g)

{X Y S : TopCat}
(f : X ⟶ S)
{g : Y ⟶ S}
(hg : Embedding ⇑g)
(H : Set.range ⇑f ⊆ Set.range ⇑g)

CategoryTheory.IsIso (CategoryTheory.Limits.pullback.fst f g)


theorem findIdx_cons (p : α → Bool) (b : α) (l : List α) :
    (b :: l).findIdx p = bif p b then 0 else (l.findIdx p) + 1

{α : Type u_1}
(p : α → Bool)
(b : α)
(l : List α)

List.findIdx p (b :: l) = bif p b then 0 else List.findIdx p l + 1


@[gcongr]
lemma toNat_le_toNat {m n : ℕ∞} (h : m ≤ n) (hn : n ≠ ⊤) : toNat m ≤ toNat n


/-- We can turn any colimit cocone over a discrete collection of objects into a bicone. -/
@[simps]
def ofColimitCocone {f : J → C} {t : Cocone (Discrete.functor f)} (ht : IsColimit t) :
    Bicone f

{t : CategoryTheory.Limits.Cocone (CategoryTheory.Discrete.functor f)}

(ht : CategoryTheory.Limits.IsColimit t)

(CategoryTheory.Limits.Bicone.ofColimitCocone ht).ι j = t.ι.app { as := j }


@[to_additive]
theorem mul_mem_iff_of_index_two (h : H.index = 2) {a b : G} : a * b ∈ H ↔ (a ∈ H ↔ b ∈ H)

{G : Type u_1}
[AddGroup G]
{H : AddSubgroup G}
(h : H.index = 2)
{a b : G}


theorem continuousOn_primitive_Icc (h_int : IntegrableOn f (Icc a b) μ) :
    ContinuousOn (fun x => ∫ t in Icc a x, f t ∂μ) (Icc a b)

(h_int : MeasureTheory.IntegrableOn f (Set.Icc a b) μ)

ContinuousOn (fun x => ∫ (t : ℝ) in Set.Icc a x, f t ∂μ) (Set.Icc a b)


/-- Implementation of `CommMon_.equivLaxBraidedFunctorPUnit`. -/
@[simps]
def laxBraidedToCommMon : LaxBraidedFunctor (Discrete PUnit.{u + 1}) C ⥤ CommMon_ C

(C : Type u₁)
[CategoryTheory.Category.{v₁, u₁} C]
[CategoryTheory.MonoidalCategory C]
[CategoryTheory.BraidedCategory C]

∀ {X Y : CategoryTheory.LaxBraidedFunctor (CategoryTheory.Discrete PUnit.{u + 1}) C} (α : X ⟶ Y),
  (CommMon_.EquivLaxBraidedFunctorPUnit.laxBraidedToCommMon C).map α =
    ((CategoryTheory.LaxBraidedFunctor.mapCommMonFunctor (CategoryTheory.Discrete PUnit.{u + 1}) C).map α).app
      (CommMon_.trivial (CategoryTheory.Discrete PUnit.{u + 1}))


@[simp]
theorem mem_sup {f g : Filter α} {s : Set α} : s ∈ f ⊔ g ↔ s ∈ f ∧ s ∈ g

{α : Type u}
{f g : Filter α}
{s : Set α}


@[to_additive]
theorem partialProd_left_inv {G : Type*} [Group G] (f : Fin (n + 1) → G) :
    (f 0 • partialProd fun i : Fin n => (f i)⁻¹ * f i.succ) = f

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

(f 0 +ᵥ Fin.partialSum fun i => -f ↑↑i + f i.succ) = f


@[mono]
theorem induce_mono_right (hs : s ⊆ s') : G'.induce s ≤ G'.induce s'

{V : Type u}
{G : SimpleGraph V}
{G' : G.Subgraph}
{s s' : Set V}
(hs : s ⊆ s')


@[simp] lemma ssubset_singleton_iff : s ⊂ {a} ↔ s = 0


@[to_additive]
theorem mul_apply [Mul β] (f g : α →ₛ β) (a : α) : (f * g) a = f a * g a

{α : Type u_1}
{β : Type u_2}
[MeasurableSpace α]
[Mul β]
(f g : MeasureTheory.SimpleFunc α β)
(a : α)


theorem finSuccAboveEquiv_symm_apply_ne_last {p : Fin (n + 1)} (h : p ≠ Fin.last n)
    (x : { x : Fin (n + 1) // x ≠ p }) :
    (finSuccAboveEquiv p).symm x = (p.castLT (Fin.val_lt_last h)).predAbove x

{n : ℕ}
{p : Fin (n + 1)}
(h : p ≠ Fin.last n)
(x : { x // x ≠ p })

(finSuccAboveEquiv p).symm x = (p.castLT ⋯).predAbove ↑x


@[simp]
theorem strictMono_map_iff {f : α → β} : StrictMono (WithTop.map f) ↔ StrictMono f

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


theorem tendsto_dist_left_cocompact_atTop [ProperSpace α] (x : α) :
    Tendsto (dist x) (cocompact α) atTop

{α : Type u}
[PseudoMetricSpace α]
[ProperSpace α]
(x : α)

Filter.Tendsto (dist x) (Filter.cocompact α) Filter.atTop


@[to_additive]
theorem le_centralizer [h : H.IsCommutative] : H ≤ centralizer H

{G : Type u_1}
[Group G]
(H : Subgroup G)
[h : H.IsCommutative]


theorem mk_mem_interedges_iff : (a, b) ∈ interedges r s t ↔ a ∈ s ∧ b ∈ t ∧ r a b

{α : Type u_4}
{β : Type u_5}
{r : α → β → Prop}
[(a : α) → DecidablePred (r a)]
{s : Finset α}
{t : Finset β}
{a : α}
{b : β}

(a, b) ∈ Rel.interedges r s t ↔ a ∈ s ∧ b ∈ t ∧ r a b


/-- Left invariant Borel measures on a measurable group are unique (up to a scalar). -/
@[to_additive
" Left invariant Borel measures on an additive measurable group are unique (up to a scalar). "]
theorem measure_eq_div_smul (h2s : ν' s ≠ 0) (h3s : ν' s ≠ ∞) :
    μ' = (μ' s / ν' s) • ν'

{G : Type u_1}
[MeasurableSpace G]
[Group G]
[MeasurableMul₂ G]
{s : Set G}
[MeasurableInv G]
(μ' ν' : MeasureTheory.Measure G)
[MeasureTheory.SigmaFinite μ']
[MeasureTheory.SigmaFinite ν']
[μ'.IsMulLeftInvariant]
[ν'.IsMulLeftInvariant]
(h2s : ν' s ≠ 0)
(h3s : ν' s ≠ ⊤)