@[simp]
theorem mk_π_app_left {W : C} (fst : W ⟶ X) (snd : W ⟶ Y) (eq : fst ≫ f = snd ≫ g) :
    (mk fst snd eq).π.app WalkingCospan.left = fst

{C : Type u}
[CategoryTheory.Category.{v, u} C]
{X Y Z : C}
{f : X ⟶ Z}
{g : Y ⟶ Z}
{W : C}
(fst : W ⟶ X)
(snd : W ⟶ Y)
(eq : fst ≫ f = snd ≫ g)

(CategoryTheory.Limits.PullbackCone.mk fst snd eq).π.app CategoryTheory.Limits.WalkingCospan.left = fst


@[csimp] theorem fold_eq_foldTR : @fold = @foldTR

(α : Type u_1)
(f : Nat → α → α)
(init : α)
(m n : Nat)

Nat.foldTR.loop f (m + n) m (Nat.fold f n init) = Nat.fold f (m + n) init


@[to_additive]
theorem mul_right_cancel'' [ContravariantClass α α (swap (· * ·)) (· ≤ ·)] {a b c : α}
    (h : a * b = c * b) :
    a = c

[ContravariantClass α α (Function.swap fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1]


theorem le_nfpBFamily {o : Ordinal} (f : ∀ b < o, Ordinal → Ordinal) (a) :
    a ≤ nfpBFamily.{u, v} o f a

(f : (b : Ordinal.{u}) → b < o → Ordinal.{max u v} → Ordinal.{max u v})


@[to_additive (attr := simp)]
protected theorem inv_inv (μ : Measure G) : μ.inv.inv = μ

{G : Type u_2}
[MeasurableSpace G]
[InvolutiveNeg G]
[MeasurableNeg G]
(μ : MeasureTheory.Measure G)


theorem tan_mul_I : tan (x * I) = tanh x * I

Complex.tan (x * Complex.I) = Complex.tanh x * Complex.I


/-- Functor composition induces a functor on cosimplicial objects. -/
@[simps!]
def whiskering (D : Type*) [Category D] : (C ⥤ D) ⥤ CosimplicialObject C ⥤ CosimplicialObject D

(C : Type u)
[CategoryTheory.Category.{v, u} C]
(D : Type u_1)
[CategoryTheory.Category.{u_2, u_1} D]
(H : C ⥤ D)
(F : SimplexCategory ⥤ C)
(X : SimplexCategory)

(((CategoryTheory.CosimplicialObject.whiskering C D).obj H).obj F).obj X = H.obj (F.obj X)


theorem isOpenMap_prod_of_discrete_right [DiscreteTopology β] {f : α × β → γ} :
    IsOpenMap f ↔ ∀ b, IsOpenMap (f ⟨·, b⟩)

{α : Type u_1}
{β : Type u_2}
{γ : Type u_3}
[TopologicalSpace α]
[TopologicalSpace β]
[TopologicalSpace γ]
[DiscreteTopology β]
{f : α × β → γ}

IsOpenMap f ↔ ∀ (b : β), IsOpenMap fun x => f (x, b)


@[simp]
theorem ofEquiv_aequiv {U : Type*} [CommRing U] [Algebra R U] (h : IsAdjoinRoot S f)
    (h' : IsAdjoinRoot U f) (e : S ≃ₐ[R] T) :
    (h.ofEquiv e).aequiv h' = e.symm.trans (h.aequiv h')

{R : Type u}
{S : Type v}
[CommRing R]
[CommRing S]
[Algebra R S]
{f : R[X]}
{T : Type u_1}
[CommRing T]
[Algebra R T]
{U : Type u_2}
[CommRing U]
[Algebra R U]
(h : IsAdjoinRoot S f)
(h' : IsAdjoinRoot U f)
(e : S ≃ₐ[R] T)


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


@[simp]
theorem preimage_Ioo {a b : α} (ha : 0 ≤ a) :
    (Nat.cast : ℕ → α) ⁻¹' Set.Ioo a b = Set.Ioo ⌊a⌋₊ ⌈b⌉₊

{α : Type u_2}
[LinearOrderedSemiring α]
[FloorSemiring α]
{a b : α}
(ha : 0 ≤ a)

Nat.cast ⁻¹' Set.Ioo a b = Set.Ioo ⌊a⌋₊ ⌈b⌉₊


theorem gcd_mono_fun {g : β → α} (h : ∀ b ∈ s, f b ∣ g b) : s.gcd f ∣ s.gcd g

{α : Type u_2}
{β : Type u_3}
[CancelCommMonoidWithZero α]
[NormalizedGCDMonoid α]
{s : Finset β}
{f g : β → α}
(h : ∀ b ∈ s, f b ∣ g b)


/-- `gramSchmidt` produces linearly independent vectors when given linearly independent vectors. -/
theorem gramSchmidt_linearIndependent {f : ι → E} (h₀ : LinearIndependent 𝕜 f) :
    LinearIndependent 𝕜 (gramSchmidt 𝕜 f)

{𝕜 : Type u_1}
{E : Type u_2}
[RCLike 𝕜]
[NormedAddCommGroup E]
[InnerProductSpace 𝕜 E]
{ι : Type u_3}
[LinearOrder ι]
[LocallyFiniteOrderBot ι]
[IsWellOrder ι fun x x_1 => x < x_1]
{f : ι → E}
(h₀ : LinearIndependent 𝕜 f)


/-- In a seminormed ring, the left-multiplication `AddMonoidHom` is bounded. -/
theorem mulLeft_bound (x : α) : ∀ y : α, ‖AddMonoidHom.mulLeft x y‖ ≤ ‖x‖ * ‖y‖

{α : Type u_1}
[NonUnitalSeminormedRing α]
(x y : α)

‖(AddMonoidHom.mulLeft x) y‖ ≤ ‖x‖ * ‖y‖


lemma appLE_eq_app {U : Y.Opens} :
    f.appLE U (f ⁻¹ᵁ U) le_rfl = f.app U

{X Y : AlgebraicGeometry.Scheme}
(f : X.Hom Y)
{U : Y.Opens}

f.appLE U ((TopologicalSpace.Opens.map f.val.base).obj U) ⋯ = f.app U


/-- This is often the more useful lemma to rewrite the norm as opposed to `Unitization.norm_def`. -/
theorem norm_eq_sup (x : Unitization 𝕜 A) :
    ‖x‖ = ‖x.fst‖ ⊔ ‖algebraMap 𝕜 (A →L[𝕜] A) x.fst + mul 𝕜 A x.snd‖

{𝕜 : Type u_1}
{A : Type u_2}
[NontriviallyNormedField 𝕜]
[NonUnitalNormedRing A]
[NormedSpace 𝕜 A]
[IsScalarTower 𝕜 A A]
[SMulCommClass 𝕜 A A]
[RegularNormedAlgebra 𝕜 A]
(x : Unitization 𝕜 A)

‖x‖ = ‖x.fst‖ ⊔ ‖(algebraMap 𝕜 (A →L[𝕜] A)) x.fst + (ContinuousLinearMap.mul 𝕜 A) x.snd‖


theorem indep_iSup_of_disjoint [IsProbabilityMeasure μ]
    (h_le : ∀ i, m i ≤ _mΩ) (h_indep : iIndep m μ) {S T : Set ι} (hST : Disjoint S T) :
    Indep (⨆ i ∈ S, m i) (⨆ i ∈ T, m i) μ

(h_indep : ProbabilityTheory.iIndep m μ)

ProbabilityTheory.Indep (⨆ i ∈ S, m i) (⨆ i ∈ T, m i) μ


@[simp]
theorem bsup_eq_sup' {ι : Type u} (r : ι → ι → Prop) [IsWellOrder ι r] (f : ι → Ordinal.{max u v}) :
    bsup.{_, v} _ (bfamilyOfFamily' r f) = sup.{_, v} f

(Ordinal.type r).bsup (Ordinal.bfamilyOfFamily' r f) = Ordinal.sup f


lemma truncatedInf_of_isAntichain (hs : IsAntichain (· ≤ ·) (s : Set α)) (ha : a ∈ s) :
    truncatedInf s a = a

(hs : IsAntichain (fun x x_1 => x ≤ x_1) ↑s)


@[to_additive (attr := simp)]
theorem inv_empty : (∅ : Set α)⁻¹ = ∅


/-- The symbol `J(a | b)` takes the value `1` or `-1` if `a` and `b` are coprime. -/
theorem eq_one_or_neg_one {a : ℤ} {b : ℕ} (h : a.gcd b = 1) : J(a | b) = 1 ∨ J(a | b) = -1


theorem cos_antiperiodic : Function.Antiperiodic cos π


@[simp]
theorem symm_preimage_preimage (e : α ≃o β) (s : Set β) : e.symm ⁻¹' (e ⁻¹' s) = s

{α : Type u_2}
{β : Type u_3}
[LE α]
[LE β]
(e : α ≃o β)
(s : Set β)


protected theorem Subsingleton.intersecting (hs : s.Subsingleton) : s.Intersecting ↔ s ≠ {⊥}

{α : Type u_1}
[SemilatticeInf α]
[OrderBot α]
{s : Set α}
(hs : s.Subsingleton)


/-- If any functor to a discrete category is constant on objects, J is connected.
The converse of `any_functor_const_on_obj`.
-/
theorem IsConnected.of_any_functor_const_on_obj [Nonempty J]
    (h : ∀ {α : Type u₁} (F : J ⥤ Discrete α), ∀ j j' : J, F.obj j = F.obj j') : IsConnected J

(h : ∀ {α : Type u₁} (F : CategoryTheory.Functor J (CategoryTheory.Discrete α)) (j j' : J), F.obj j = F.obj j')


@[to_additive]
theorem map_equiv_eq_comap_symm (f : G ≃* N) (K : Subgroup G) :
    K.map f = K.comap (G := N) f.symm

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

Subgroup.map (↑f) K = Subgroup.comap (↑f.symm) K


theorem sdiff_symmDiff : c \ a ∆ b = c ⊓ a ⊓ b ⊔ c \ a ⊓ c \ b

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


@[deprecated isClosed_Iic (since := "2024-02-15")]
lemma ClosedIicTopology.isClosed_le' (a : α) : IsClosed {x | x ≤ a}

{α : Type u}
[TopologicalSpace α]
[Preorder α]
[ClosedIicTopology α]
(a : α)


@[to_additive (attr := simp)]
lemma inv_inter (s t : Finset α) : (s ∩ t)⁻¹ = s⁻¹ ∩ t⁻¹

{α : Type u_2}
[DecidableEq α]
[InvolutiveNeg α]
(s t : Finset α)


@[simp]
theorem Matrix.mulVecLin_zero [Fintype n] : Matrix.mulVecLin (0 : Matrix m n R) = 0

{R : Type u_1}
[CommSemiring R]
{m : Type u_4}
{n : Type u_5}
[Fintype n]


theorem kernel_not_epi_of_nonzero (w : f ≠ 0) : ¬Epi (kernel.ι f)


protected theorem hasMFDerivAt {x} : HasMFDerivAt I 𝓘(𝕜, E) I x (ContinuousLinearMap.id _ _)

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{H : Type u_3}
[TopologicalSpace H]
(I : ModelWithCorners 𝕜 E H)
{x : H}

HasMFDerivAt I 𝓘(𝕜, E) (↑I) x (ContinuousLinearMap.id 𝕜 (TangentSpace I x))


theorem Cauchy.ultrafilter_of {l : Filter α} (h : Cauchy l) :
    Cauchy (@Ultrafilter.of _ l h.1 : Filter α)

{α : Type u}
[uniformSpace : UniformSpace α]
{l : Filter α}
(h : Cauchy l)


@[simp]
theorem foldl_ι (f : M →ₗ[R] N →ₗ[R] N) (hf) (n : N) (m : M) : foldl Q f hf n (ι Q m) = f m n

((CliffordAlgebra.foldl Q f hf) n) ((CliffordAlgebra.ι Q) m) = (f m) n


protected theorem comp (hg : OpenEmbedding g)
    (hf : OpenEmbedding f) : OpenEmbedding (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 : OpenEmbedding g)
(hf : OpenEmbedding f)


theorem val_eq_ite_valMinAbs {n : ℕ} [NeZero n] (a : ZMod n) :
    (a.val : ℤ) = a.valMinAbs + if a.val ≤ n / 2 then 0 else n

↑a.val = a.valMinAbs + ↑(if a.val ≤ n / 2 then 0 else n)


@[simp, norm_cast]
theorem coe_inv (x : s) : (↑x⁻¹ : K) = (↑x)⁻¹

{K : Type u}
[DivisionRing K]
(s : Subfield K)
(x : ↥s)

↑x⁻¹ = (↑x)⁻¹


@[simp] theorem dot_smul_left (xs ys : IntList) (i : Int) : (i * xs).dot ys = i * xs.dot ys


/-- A homeomorphism of spaces gives an equivalence of categories of open sets.

TODO: define `OrderIso.equivalence`, use it.
-/
@[simps]
def mapMapIso {X Y : TopCat.{u}} (H : X ≅ Y) : Opens Y ≌ Opens X

(TopologicalSpace.Opens.mapMapIso H).counitIso =
  CategoryTheory.NatIso.ofComponents (fun U => CategoryTheory.eqToIso ⋯) ⋯


theorem prod_normalizedFactors_eq_self (hI : I ≠ ⊥) : (normalizedFactors I).prod = I

{T : Type u_4}
[CommRing T]
[IsDedekindDomain T]
{I : Ideal T}
(hI : I ≠ ⊥)

(UniqueFactorizationMonoid.normalizedFactors I).prod = I


@[simp]
theorem deleteEdges_adj (v w : V) : (G'.deleteEdges s).Adj v w ↔ G'.Adj v w ∧ ¬s(v, w) ∈ s

{V : Type u}
{G : SimpleGraph V}
{G' : G.Subgraph}
(s : Set (Sym2 V))
(v w : V)

(G'.deleteEdges s).Adj v w ↔ G'.Adj v w ∧ s(v, w) ∉ s


theorem mod_def' (m n : Int) : m % n = emod m n


theorem ideal_span_singleton_smul (r : R) (N : Submodule R M) :
    (Ideal.span {r} : Ideal R) • N = r • N

{R : Type u}
{M : Type v}
[CommSemiring R]
[AddCommMonoid M]
[Module R M]
(r : R)
(N : Submodule R M)


@[simp]
lemma inclDesc_hom_app (i : I) (X : C i) : (inclDesc F i).hom.app X = 𝟙 ((F i).obj X)

[(i : I) → CategoryTheory.Category.{v₁, u₁} (C i)]

(F : (i : I) → CategoryTheory.Functor (C i) D)

(CategoryTheory.Sigma.inclDesc F i).hom.app X = CategoryTheory.CategoryStruct.id ((F i).obj X)


theorem union_inter_distrib_left (s t u : Set α) : s ∪ t ∩ u = (s ∪ t) ∩ (s ∪ u)


/-- If `f ≤ g` and `f` is monotone, then `f^[n] ≤ g^[n]`. -/
theorem iterate_le_of_le {g : α → α} (hf : Monotone f) (h : f ≤ g) (n : ℕ) : f^[n] ≤ g^[n]

{α : Type u_1}
[Preorder α]
{f g : α → α}
(hf : Monotone f)
(h : f ≤ g)
(n : ℕ)


@[simp, mfld_simps]
theorem coe_achart (x : M) : (achart H x : PartialHomeomorph M H) = chartAt H x

(H : Type u)
{M : Type u_2}
[TopologicalSpace H]
[TopologicalSpace M]
[ChartedSpace H M]
(x : M)


@[simp]
theorem map_mk {f : S' ⟶ T.obj Y} (g : S ⟶ S') : (map g).obj (mk f) = mk (g ≫ f)

{C : Type u₁}
[CategoryTheory.Category.{v₁, u₁} C]
{D : Type u₂}
[CategoryTheory.Category.{v₂, u₂} D]
{S S' : D}
{Y : C}
{T : CategoryTheory.Functor C D}
{f : S' ⟶ T.obj Y}
(g : S ⟶ S')

(CategoryTheory.StructuredArrow.map g).obj (CategoryTheory.StructuredArrow.mk f) =
  CategoryTheory.StructuredArrow.mk (CategoryTheory.CategoryStruct.comp g f)


/-- `OuterMeasure.trim` is antitone in the σ-algebra. -/
theorem trim_anti_measurableSpace (m : OuterMeasure α) {m0 m1 : MeasurableSpace α}
    (h : m0 ≤ m1) : @trim _ m1 m ≤ @trim _ m0 m

{α : Type u_1}
(m : MeasureTheory.OuterMeasure α)
{m0 m1 : MeasurableSpace α}
(h : m0 ≤ m1)


lemma size_positive' [Nonempty (Fin n)] : 0 < n


theorem inTangentCoordinates_eq (f : N → M) (g : N → M') (ϕ : N → E →L[𝕜] E') {x₀ x : N}
    (hx : f x ∈ (chartAt H (f x₀)).source) (hy : g x ∈ (chartAt H' (g x₀)).source) :
    inTangentCoordinates I I' f g ϕ x₀ x =
      (tangentBundleCore I' M').coordChange (achart H' (g x)) (achart H' (g x₀)) (g x) ∘L
        ϕ x ∘L (tangentBundleCore I M).coordChange (achart H (f x₀)) (achart H (f x)) (f x)

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{E' : Type u_3}
[NormedAddCommGroup E']
[NormedSpace 𝕜 E']
{H : Type u_4}
[TopologicalSpace H]
(I : ModelWithCorners 𝕜 E H)
{H' : Type u_5}
[TopologicalSpace H']
(I' : ModelWithCorners 𝕜 E' H')
{M : Type u_6}
[TopologicalSpace M]
[ChartedSpace H M]
[SmoothManifoldWithCorners I M]
{M' : Type u_7}
[TopologicalSpace M']
[ChartedSpace H' M']
[SmoothManifoldWithCorners I' M']
{N : Type u_9}
(f : N → M)
(g : N → M')
(ϕ : N → E →L[𝕜] E')
{x₀ x : N}
(hx : f x ∈ (chartAt H (f x₀)).source)
(hy : g x ∈ (chartAt H' (g x₀)).source)

inTangentCoordinates I I' f g ϕ x₀ x =
  ((tangentBundleCore I' M').coordChange (achart H' (g x)) (achart H' (g x₀)) (g x)).comp
    ((ϕ x).comp ((tangentBundleCore I M).coordChange (achart H (f x₀)) (achart H (f x)) (f x)))


theorem nonempty_compl : sᶜ.Nonempty ↔ s ≠ univ


@[simp]
theorem conjTranspose_zsmul [AddGroup α] [StarAddMonoid α] (c : ℤ) (M : Matrix m n α) :
    (c • M)ᴴ = c • Mᴴ

{m : Type u_2}
{n : Type u_3}
{α : Type v}
[AddGroup α]
[StarAddMonoid α]
(c : ℤ)
(M : Matrix m n α)


theorem continuousWithinAt_fst {s : Set (α × β)} {p : α × β} : ContinuousWithinAt Prod.fst s p

{α : Type u_1}
{β : Type u_2}
[TopologicalSpace α]
[TopologicalSpace β]
{s : Set (α × β)}
{p : α × β}


@[simp]
theorem tendsto_ofReal_nhds_top {f : α → ℝ} {l : Filter α} :
    Tendsto (fun x ↦ ENNReal.ofReal (f x)) l (𝓝 ∞) ↔ Tendsto f l atTop

{α : Type u_1}
{f : α → ℝ}
{l : Filter α}

Filter.Tendsto (fun x => ENNReal.ofReal (f x)) l (𝓝 ⊤) ↔ Filter.Tendsto f l Filter.atTop


lemma ceilDiv_def (f : ι →₀ β) (a : α) : f ⌈/⌉ a = f.mapRange (· ⌈/⌉ a) (zero_ceilDiv _)

{ι : Type u_1}
{α : Type u_2}
{β : Type u_3}
[OrderedAddCommMonoid α]
[OrderedAddCommMonoid β]
[SMulZeroClass α β]
[CeilDiv α β]
(f : ι →₀ β)
(a : α)

f ⌈/⌉ a = Finsupp.mapRange (fun x => x ⌈/⌉ a) ⋯ f


@[to_additive (attr := simp)]
lemma mker_fst : mker (fst M N) = .prod ⊥ ⊤

{M : Type u_1}
{N : Type u_2}
[AddZeroClass M]
[AddZeroClass N]

AddMonoidHom.mker (AddMonoidHom.fst M N) = ⊥.prod ⊤


/-- The Fourier integral of the Fréchet derivative of a function is obtained by multiplying the
Fourier integral of the original function by `2πI ⟪v, w⟫`. -/
theorem fourierIntegral_fderiv
    (hf : Integrable f) (h'f : Differentiable ℝ f) (hf' : Integrable (fderiv ℝ f)) :
    𝓕 (fderiv ℝ f) = fourierSMulRight (-innerSL ℝ) (𝓕 f)

(hf : MeasureTheory.Integrable f MeasureTheory.volume)

(hf' : MeasureTheory.Integrable (fderiv ℝ f) MeasureTheory.volume)

𝓕 (fderiv ℝ f) = VectorFourier.fourierSMulRight (-innerSL ℝ) (𝓕 f)


theorem mk_surjective : Function.Surjective (mk I)


theorem Simple.of_iso {X Y : C} [Simple Y] (i : X ≅ Y) : Simple X


/-- The (distinguished) triangle in the derived category of `C` given by a
short exact short complex in `C`. -/
@[simps!]
noncomputable def singleTriangle : Triangle (DerivedCategory C)

{C : Type u}
[CategoryTheory.Category.{v, u} C]
[CategoryTheory.Abelian C]
[HasDerivedCategory C]
{S : CategoryTheory.ShortComplex C}
(hS : S.ShortExact)

hS.singleTriangle.obj₁ = (DerivedCategory.singleFunctor C 0).obj S.X₁


theorem le_vanishingIdeal_zeroLocus (I : Ideal (MvPolynomial σ k)) :
    I ≤ vanishingIdeal (zeroLocus I)

{k : Type u_1}
[Field k]
{σ : Type u_2}
(I : Ideal (MvPolynomial σ k))

I ≤ MvPolynomial.vanishingIdeal (MvPolynomial.zeroLocus I)


lemma predAbove_castSucc_of_lt (p i : Fin n) (h : p < i) (hi := castSucc_ne_zero_of_lt h) :
    p.predAbove (castSucc i) = i.castSucc.pred hi

{n : ℕ}
(p i : Fin n)
(h : p < i)
(hi : i.castSucc ≠ 0 := ⋯)

p.predAbove i.castSucc = i.castSucc.pred hi


@[simp]
lemma map_apply_mk (f : M →ₗ[R] M') (x : M) :
    map r f (Submodule.Quotient.mk x) =
      (Submodule.Quotient.mk (f x) : QuotSMulTop r M')

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

((QuotSMulTop.map r) f) (Submodule.Quotient.mk x) = Submodule.Quotient.mk (f x)


@[simp]
theorem dlookup_kerase (a) {l : List (Sigma β)} (nd : l.NodupKeys) :
    dlookup a (kerase a l) = none

{α : Type u}
{β : α → Type v}
[DecidableEq α]
(a : α)
{l : List (Sigma β)}
(nd : l.NodupKeys)


@[simp] theorem ite_eq_false_distrib (p : Prop) [h : Decidable p] (t f : Bool) :
    (ite p t f = false) = ite p (t = false) (f = false)

((if p then t else f) = false) = if p then t = false else f = false


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

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

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

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

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

(him : ∀ (x : ℝ), 0 ≤ x → f (↑x * Complex.I) = 0)


/-- (Impl) Prove that the lifted cocone is colimiting. -/
@[simps]
def liftedCoconeIsColimit : IsColimit (liftedCocone c t)

{D : CategoryTheory.Functor J T.Algebra}

(c : CategoryTheory.Limits.Cocone (D.comp T.forget))

[CategoryTheory.Limits.PreservesColimit (D.comp T.forget) T.toFunctor]

[CategoryTheory.Limits.PreservesColimit ((D.comp T.forget).comp T.toFunctor) T.toFunctor]

((CategoryTheory.Monad.ForgetCreatesColimits.liftedCoconeIsColimit c t).desc s).f = t.desc (T.forget.mapCocone s)


theorem cast_rev (i : Fin n) (h : n = m) :
    cast h i.rev = (i.cast h).rev


@[simp]
theorem _root_.Real.map_toNNReal_atTop : map Real.toNNReal atTop = atTop

Filter.map Real.toNNReal Filter.atTop = Filter.atTop


/-- If `m u = ∞` for any set `u` that has nonempty intersection both with `s` and `t`, then
`μ (s ∪ t) = μ s + μ t`, where `μ = MeasureTheory.OuterMeasure.ofFunction m m_empty`.

E.g., if `α` is an (e)metric space and `m u = ∞` on any set of diameter `≥ r`, then this lemma
implies that `μ (s ∪ t) = μ s + μ t` on any two sets such that `r ≤ edist x y` for all `x ∈ s`
and `y ∈ t`.  -/
theorem ofFunction_union_of_top_of_nonempty_inter {s t : Set α}
    (h : ∀ u, (s ∩ u).Nonempty → (t ∩ u).Nonempty → m u = ∞) :
    OuterMeasure.ofFunction m m_empty (s ∪ t) =
      OuterMeasure.ofFunction m m_empty s + OuterMeasure.ofFunction m m_empty t

(h : ∀ (u : Set α), (s ∩ u).Nonempty → (t ∩ u).Nonempty → m u = ⊤)

(MeasureTheory.OuterMeasure.ofFunction m m_empty) (s ∪ t) =
  (MeasureTheory.OuterMeasure.ofFunction m m_empty) s + (MeasureTheory.OuterMeasure.ofFunction m m_empty) t


@[simp]
theorem fderivCLM_apply (f : 𝓢(E, F)) (x : E) : fderivCLM 𝕜 f x = fderiv ℝ f x

(𝕜 : Type u_1)
{E : Type u_4}
{F : Type u_5}
[NormedAddCommGroup E]
[NormedSpace ℝ E]
[NormedAddCommGroup F]
[NormedSpace ℝ F]
[RCLike 𝕜]
[NormedSpace 𝕜 F]
[SMulCommClass ℝ 𝕜 F]
(f : SchwartzMap E F)
(x : E)

((SchwartzMap.fderivCLM 𝕜) f) x = fderiv ℝ (⇑f) x


/-- If `e : C ≌ D` is an equivalence of categories, then `functoriality F e.functor` induces an
equivalence between cones over `F` and cones over `F ⋙ e.functor`.
-/
@[simps]
def functorialityEquivalence (e : C ≌ D) : Cone F ≌ Cone (F ⋙ e.functor)

{J : Type u₁}
[CategoryTheory.Category.{v₁, u₁} J]
{C : Type u₃}
[CategoryTheory.Category.{v₃, u₃} C]
{D : Type u₄}
[CategoryTheory.Category.{v₄, u₄} D]
(F : J ⥤ C)
(e : C ≌ D)

(CategoryTheory.Limits.Cones.functorialityEquivalence F e).inverse =
  CategoryTheory.Limits.Cones.functoriality (F ⋙ e.functor) e.inverse ⋙
    (CategoryTheory.Limits.Cones.postcomposeEquivalence
        (F.associator e.functor e.inverse ≪≫ CategoryTheory.isoWhiskerLeft F e.unitIso.symm ≪≫ F.rightUnitor)).functor


theorem mk_zero (x : S) : mk 0 (x : S) = 0

{M : Type u_1}
[CommMonoidWithZero M]
{S : Submonoid M}
(x : ↥S)


theorem fst_sumFinsuppLEquivProdFinsupp {α β : Type*} (f : α ⊕ β →₀ M) (x : α) :
    (sumFinsuppLEquivProdFinsupp R f).1 x = f (Sum.inl x)

{M : Type u_2}
(R : Type u_5)
[Semiring R]
[AddCommMonoid M]
[Module R M]
{α : Type u_7}
{β : Type u_8}
(f : α ⊕ β →₀ M)
(x : α)

((Finsupp.sumFinsuppLEquivProdFinsupp R) f).1 x = f (Sum.inl x)


theorem χ₈'_int_eq_χ₄_mul_χ₈ (a : ℤ) : χ₈' a = χ₄ a * χ₈ a


@[to_additive (attr := simp)]
theorem dist_div_eq_dist_mul_right (a b c : E) : dist a (b / c) = dist (a * c) b

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


@[simp, nolint simpNF]
theorem lift_umax_eq {a : Cardinal.{u}} {b : Cardinal.{v}} :
    lift.{max v w} a = lift.{max u w} b ↔ lift.{v} a = lift.{u} b

Cardinal.lift.{max v w, u} a = Cardinal.lift.{max u w, v} b ↔ Cardinal.lift.{v, u} a = Cardinal.lift.{u, v} b


theorem sq_add_sq_ne_zero {R : Type*} [LinearOrderedCommRing R] {a b : R} (h : IsCoprime a b) :
    a ^ 2 + b ^ 2 ≠ 0

{R : Type u_1}
[LinearOrderedCommRing R]
{a b : R}
(h : IsCoprime a b)


@[to_additive]
theorem mulAntidiagonal_mono_right (h : u ⊆ t) :
    mulAntidiagonal hs hu a ⊆ mulAntidiagonal hs ht a

{α : Type u_1}
[OrderedCancelCommMonoid α]
{s t : Set α}
{hs : s.IsPWO}
{ht : t.IsPWO}
{a : α}
{u : Set α}
{hu : u.IsPWO}
(h : u ⊆ t)

Finset.mulAntidiagonal hs hu a ⊆ Finset.mulAntidiagonal hs ht a


lemma addZ_ne_zero_of_X_ne {P Q : Fin 3 → R} (hx : P x * Q z ^ 2 ≠ Q x * P z ^ 2) : addZ P Q ≠ 0

{R : Type u}
[CommRing R]
{P Q : Fin 3 → R}
(hx : P x * Q z ^ 2 ≠ Q x * P z ^ 2)


theorem integrable_withDensity_iff_integrable_smul₀ {f : α → ℝ≥0} (hf : AEMeasurable f μ)
    {g : α → E} : Integrable g (μ.withDensity fun x => f x) ↔ Integrable (fun x => f x • g x) μ

{α : Type u_1}
{m : MeasurableSpace α}
{μ : MeasureTheory.Measure α}
{E : Type u_5}
[NormedAddCommGroup E]
[NormedSpace ℝ E]
{f : α → ℝ≥0}
(hf : AEMeasurable f μ)
{g : α → E}

MeasureTheory.Integrable g (μ.withDensity fun x => ↑(f x)) ↔ MeasureTheory.Integrable (fun x => f x • g x) μ


/-- The bundled derivative of a `C^{n+1}` function is `C^n`. -/
theorem ContDiff.contDiff_fderiv_apply {f : E → F} (hf : ContDiff 𝕜 n f) (hmn : m + 1 ≤ n) :
    ContDiff 𝕜 m fun p : E × E => (fderiv 𝕜 f p.1 : E →L[𝕜] F) p.2

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type uE}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{F : Type uF}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{m n : ℕ∞}
{f : E → F}
(hf : ContDiff 𝕜 n f)
(hmn : m + 1 ≤ n)

ContDiff 𝕜 m fun p => (fderiv 𝕜 f p.1) p.2


theorem distortion_le_iff {c : ℝ≥0} : π.distortion ≤ c ↔ ∀ J ∈ π, Box.distortion J ≤ c

{ι : Type u_1}
{I : BoxIntegral.Box ι}
(π : BoxIntegral.Prepartition I)
[Fintype ι]
{c : ℝ≥0}

π.distortion ≤ c ↔ ∀ J ∈ π, J.distortion ≤ c


lemma nilRank_le_card (b : Basis ι R M) : nilRank φ ≤ Fintype.card ι

{R : Type u_1}
{L : Type u_2}
{M : Type u_3}
{ι : Type u_5}
[CommRing R]
[AddCommGroup L]
[Module R L]
[AddCommGroup M]
[Module R M]
(φ : L →ₗ[R] Module.End R M)
[Fintype ι]
[Module.Free R M]
[Module.Finite R M]
[Module.Finite R L]
[Module.Free R L]
[Nontrivial R]
(b : Basis ι R M)


theorem contMDiff_prod_iff (f : M → M' × N') :
    ContMDiff I (I'.prod J') n f ↔
      ContMDiff I I' n (Prod.fst ∘ f) ∧ ContMDiff I J' n (Prod.snd ∘ f)

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{H : Type u_3}
[TopologicalSpace H]
{I : ModelWithCorners 𝕜 E H}
{M : Type u_4}
[TopologicalSpace M]
[ChartedSpace H M]
{E' : Type u_5}
[NormedAddCommGroup E']
[NormedSpace 𝕜 E']
{H' : Type u_6}
[TopologicalSpace H']
{I' : ModelWithCorners 𝕜 E' H'}
{M' : Type u_7}
[TopologicalSpace M']
[ChartedSpace H' M']
{F' : Type u_14}
[NormedAddCommGroup F']
[NormedSpace 𝕜 F']
{G' : Type u_15}
[TopologicalSpace G']
{J' : ModelWithCorners 𝕜 F' G'}
{N' : Type u_16}
[TopologicalSpace N']
[ChartedSpace G' N']
{n : ℕ∞}
(f : M → M' × N')


/-- Changes the type of a finpartition to an equal one. -/
@[simps]
def copy {a b : α} (P : Finpartition a) (h : a = b) : Finpartition b

{α : Type u_1}
[Lattice α]
[OrderBot α]
{a b : α}
(P : Finpartition a)
(h : a = b)


theorem trans_toLinearEquiv :
    (e₁₂.trans e₂₃ : A ≃ₗ[R] C) = (e₁₂ : A ≃ₗ[R] B) ≪≫ₗ e₂₃

{R : Type u_1}
{A : Type u_2}
{B : Type u_3}
{C : Type u_4}
[CommSemiring R]
[AddCommMonoid A]
[AddCommMonoid B]
[AddCommMonoid C]
[Module R A]
[Module R B]
[Module R C]
[CoalgebraStruct R A]
[CoalgebraStruct R B]
[CoalgebraStruct R C]
{e₁₂ : A ≃ₗc[R] B}
{e₂₃ : B ≃ₗc[R] C}

↑(e₁₂.trans e₂₃) = ↑e₁₂ ≪≫ₗ ↑e₂₃


/-- The uniform bound we have given is summable, and remains so after multiplying by any fixed
power of `|n|` (we shall need this for `k = 0, 1, 2`). -/
lemma summable_pow_mul_jacobiTheta₂_term_bound (S : ℝ) {T : ℝ} (hT : 0 < T) (k : ℕ) :
    Summable (fun n : ℤ ↦ (|n| ^ k : ℝ) * Real.exp (-π * (T * n ^ 2 - 2 * S * |n|)))

Summable fun n => ↑|n| ^ k * rexp (-π * (T * ↑n ^ 2 - 2 * S * ↑|n|))


@[simp]
theorem nil_eq_rotate_iff {l : List α} {n : ℕ} : [] = l.rotate n ↔ [] = l


@[simp]
theorem id_apply (x : A) : DistribMulActionHom.id M x = x

(M : Type u_1)
[Monoid M]
{A : Type u_4}
[AddMonoid A]
[DistribMulAction M A]
(x : A)


theorem AntitoneOn.integral_le_sum_Ico (hab : a ≤ b) (hf : AntitoneOn f (Set.Icc a b)) :
    (∫ x in a..b, f x) ≤ ∑ x ∈ Finset.Ico a b, f x

{a b : ℕ}
{f : ℝ → ℝ}
(hab : a ≤ b)
(hf : AntitoneOn f (Set.Icc ↑a ↑b))

∫ (x : ℝ) in ↑a..↑b, f x ≤ ∑ x ∈ Finset.Ico a b, f ↑x


@[simp] theorem disjoint_nil_right (l : List α) : Disjoint l []


protected theorem IsBoundedBilinearMap.isBigO' (h : IsBoundedBilinearMap 𝕜 f) :
    f =O[⊤] fun p : E × F => ‖p‖ * ‖p‖

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{F : Type u_3}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{G : Type u_4}
[NormedAddCommGroup G]
[NormedSpace 𝕜 G]
{f : E × F → G}
(h : IsBoundedBilinearMap 𝕜 f)


/-- Build an isomorphism in the category `CommRingCat` from a `RingEquiv` between `CommRingCat`s. -/
@[simps]
def toCommRingCatIso [CommRing X] [CommRing Y] (e : X ≃+* Y) :
    CommRingCat.of X ≅ CommRingCat.of Y

{X Y : Type u}
[CommRing X]
[CommRing Y]
(e : X ≃+* Y)


/-- The pushforward `Ideal.map` as a monoid-with-zero homomorphism. -/
@[simps]
def mapHom : Ideal R →*₀ Ideal S

{R : Type u}
{S : Type v}
{F : Type u_1}
[CommRing R]
[CommRing S]
[FunLike F R S]
[rc : RingHomClass F R S]
(f : F)
(I : Ideal R)


lemma unop_list_prod (l : List Mᵐᵒᵖ) : l.prod.unop = (l.map unop).reverse.prod

{M : Type u_4}
[Monoid M]
(l : List Mᵐᵒᵖ)

MulOpposite.unop l.prod = (List.map MulOpposite.unop l).reverse.prod


@[simp]
theorem preimage_image (e : α ≃o β) (s : Set α) : e ⁻¹' (e '' s) = s

{α : Type u_2}
{β : Type u_3}
[LE α]
[LE β]
(e : α ≃o β)
(s : Set α)


theorem choose_spec (hp : ∃! a, a ∈ l ∧ p a) : choose p l hp ∈ l ∧ p (choose p l hp)

{α : Type u_1}
(p : α → Prop)
[DecidablePred p]
(l : Finset α)
(hp : ∃! a, a ∈ l ∧ p a)

Finset.choose p l hp ∈ l ∧ p (Finset.choose p l hp)


lemma mapEquiv_eq_map (f : α ≃ β) : M.mapEquiv f = M.map f f.injective.injOn

{α : Type u_1}
{β : Type u_2}
{M : Matroid α}
(f : α ≃ β)


@[to_additive]
theorem prod_range_mul_prod_Ico (f : ℕ → M) {m n : ℕ} (h : m ≤ n) :
    ((∏ k ∈ range m, f k) * ∏ k ∈ Ico m n, f k) = ∏ k ∈ range n, f k

{M : Type u_2}
[AddCommMonoid M]
(f : ℕ → M)
{m n : ℕ}
(h : m ≤ n)

∑ k ∈ Finset.range m, f k + ∑ k ∈ Finset.Ico m n, f k = ∑ k ∈ Finset.range n, f k


theorem map₂_comm {n : β → α → γ} (h_comm : ∀ a b, m a b = n b a) : map₂ m f g = map₂ n g f

{m : α → β → γ}

{n : β → α → γ}

(h_comm : ∀ (a : α) (b : β), m a b = n b a)


theorem map_iInf {ι β} {f : α → β} (hf : Injective f) (m : ι → OuterMeasure α) :
    map f (⨅ i, m i) = restrict (range f) (⨅ i, map f (m i))

{α : Type u_1}
{ι : Sort u_2}
{β : Type u_3}
{f : α → β}
(hf : Function.Injective f)
(m : ι → MeasureTheory.OuterMeasure α)

(MeasureTheory.OuterMeasure.map f) (⨅ i, m i) =
  (MeasureTheory.OuterMeasure.restrict (Set.range f)) (⨅ i, (MeasureTheory.OuterMeasure.map f) (m i))


/-- Compute the composition of two partial homeomorphisms induced by fiberwise linear
equivalences. -/
theorem trans_partialHomeomorph_apply (hU : IsOpen U)
    (hφ : ContinuousOn (fun x => φ x : B → F →L[𝕜] F) U)
    (h2φ : ContinuousOn (fun x => (φ x).symm : B → F →L[𝕜] F) U) (hU' : IsOpen U')
    (hφ' : ContinuousOn (fun x => φ' x : B → F →L[𝕜] F) U')
    (h2φ' : ContinuousOn (fun x => (φ' x).symm : B → F →L[𝕜] F) U') (b : B) (v : F) :
    (FiberwiseLinear.partialHomeomorph φ hU hφ h2φ ≫ₕ
      FiberwiseLinear.partialHomeomorph φ' hU' hφ' h2φ')
        ⟨b, v⟩ =
      ⟨b, φ' b (φ b v)⟩

(h2φ : ContinuousOn (fun x => ↑(φ x).symm) U)

(hφ' : ContinuousOn (fun x => ↑(φ' x)) U')

(h2φ' : ContinuousOn (fun x => ↑(φ' x).symm) U')

↑(FiberwiseLinear.partialHomeomorph φ hU hφ h2φ ≫ₕ FiberwiseLinear.partialHomeomorph φ' hU' hφ' h2φ') (b, v) =
  (b, (φ' b) ((φ b) v))


theorem mk_eq_mk {a h a' h'} : @mk α p a h = @mk α p a' h' ↔ a = a'

{α : Sort u_1}
{p : α → Prop}
{a : α}
{h : p a}
{a' : α}
{h' : p a'}


@[to_additive existing (attr := simp)]
lemma powersHom_apply (x : α) (n : Multiplicative ℕ) :
    powersHom α x n = x ^ Multiplicative.toAdd n

{α : Type u_1}
[Monoid α]
(x : α)
(n : Multiplicative ℕ)

((powersHom α) x) n = x ^ Multiplicative.toAdd n


theorem nilFun_comp {α₀ : TypeVec 0} (f₀ : α₀ ⟹ Fin2.elim0) : nilFun ⊚ f₀ = f₀

{α₀ : TypeVec.{u_1} 0}
(f₀ : α₀.Arrow Fin2.elim0)


/-- Lifts a function `α → β` to a semigroup homomorphism `FreeSemigroup α → β` given
a semigroup `β`. -/
@[to_additive (attr := simps symm_apply) "Lifts a function `α → β` to an additive semigroup
homomorphism `FreeAddSemigroup α → β` given an additive semigroup `β`."]
def lift : (α → β) ≃ (FreeSemigroup α →ₙ* β)

{α : Type u}
{β : Type v}
[Semigroup β]
(f : FreeSemigroup α →ₙ* β)

∀ (a : α), FreeSemigroup.lift.symm f a = (⇑f ∘ FreeSemigroup.of) a


@[to_additive (attr := simp)]
lemma inv_op_smul_finset_distrib (a : α) (s : Finset α) : (op a • s)⁻¹ = a⁻¹ • s⁻¹

{α : Type u_2}
[Group α]
[DecidableEq α]
(a : α)
(s : Finset α)


protected theorem le_min {a b c : Nat} : a ≤ min b c ↔ a ≤ b ∧ a ≤ c


@[to_additive add]
theorem mul' (hf : LipschitzWith Kf f) (hg : LipschitzWith Kg g) :
    LipschitzWith (Kf + Kg) fun x => f x * g x

{α : Type u_5}
{E : Type u_6}
[SeminormedCommGroup E]
[PseudoEMetricSpace α]
{Kf Kg : ℝ≥0}
{f g : α → E}
(hf : LipschitzWith Kf f)
(hg : LipschitzWith Kg g)


/-- Pseudo metric and Metric spaces

A pseudo metric space is endowed with a distance for which the requirement `d(x,y)=0 → x = y` might
not hold. A metric space is a pseudo metric space such that `d(x,y)=0 → x = y`.
Each pseudo metric space induces a canonical `UniformSpace` and hence a canonical
`TopologicalSpace` This is enforced in the type class definition, by extending the `UniformSpace`
structure. When instantiating a `PseudoMetricSpace` structure, the uniformity fields are not
necessary, they will be filled in by default. In the same way, each (pseudo) metric space induces a
(pseudo) emetric space structure. It is included in the structure, but filled in by default.
-/
class PseudoMetricSpace (α : Type u) extends Dist α : Type u where
  dist_self : ∀ x : α, dist x x = 0
  dist_comm : ∀ x y : α, dist x y = dist y x
  dist_triangle : ∀ x y z : α, dist x z ≤ dist x y + dist y z
  edist : α → α → ℝ≥0∞ := fun x y => ENNReal.ofNNReal ⟨dist x y, dist_nonneg' _ ‹_› ‹_› ‹_›⟩
  edist_dist : ∀ x y : α, edist x y = ENNReal.ofReal (dist x y) := by
    intros x y; exact ENNReal.coe_nnreal_eq _
  toUniformSpace : UniformSpace α := .ofDist dist dist_self dist_comm dist_triangle
  uniformity_dist : 𝓤 α = ⨅ ε > 0, 𝓟 { p : α × α | dist p.1 p.2 < ε } := by intros; rfl
  toBornology : Bornology α := Bornology.ofDist dist dist_comm dist_triangle
  cobounded_sets : (Bornology.cobounded α).sets =
    { s | ∃ C : ℝ, ∀ x ∈ sᶜ, ∀ y ∈ sᶜ, dist x y ≤ C } := by intros; rfl

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

(Bornology.cobounded α).sets = {s | ∃ C, ∀ x ∈ sᶜ, ∀ y ∈ sᶜ, dist x y ≤ C}


@[simp]
theorem length_coe (l : List α) : length (l : Cycle α) = l.length


/-- `WType.Natα` is equivalent to `PUnit ⊕ PUnit`.
This is useful when considering the associated polynomial endofunctor.
-/
@[simps]
def NatαEquivPUnitSumPUnit : Natα ≃ PUnit.{u + 1} ⊕ PUnit

WType.NatαEquivPUnitSumPUnit.symm b =
  match b with
  | Sum.inl val => WType.Natα.zero
  | Sum.inr val => WType.Natα.succ


@[simp]
theorem restrictScalars_bot_eq_self (K : IntermediateField F E) :
    (⊥ : IntermediateField K E).restrictScalars _ = K

{F : Type u_1}
[Field F]
{E : Type u_2}
[Field E]
[Algebra F E]
(K : IntermediateField F E)

IntermediateField.restrictScalars F ⊥ = K


@[simp]
theorem spanExt_inv_app_left : (spanExt iX iY iZ wf wg).inv.app WalkingSpan.left = iY.inv

{C : Type u}
[CategoryTheory.Category.{v, u} C]
{X Y Z X' Y' Z' : C}
(iX : X ≅ X')
(iY : Y ≅ Y')
(iZ : Z ≅ Z')
{f : X ⟶ Y}
{g : X ⟶ Z}
{f' : X' ⟶ Y'}
{g' : X' ⟶ Z'}
(wf : iX.hom ≫ f' = f ≫ iY.hom)
(wg : iX.hom ≫ g' = g ≫ iZ.hom)

(CategoryTheory.Limits.spanExt iX iY iZ wf wg).inv.app CategoryTheory.Limits.WalkingSpan.left = iY.inv


theorem mem_lowerBounds : a ∈ lowerBounds s ↔ ∀ x ∈ s, a ≤ x

{α : Type u}
[Preorder α]
{s : Set α}
{a : α}


@[to_additive]
theorem StrictMonoOn.inv (hf : StrictMonoOn f s) : StrictAntiOn (fun x => (f x)⁻¹) s

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

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


theorem Subset.refl (s : Finset α) : s ⊆ s


theorem Commute.tsum_left (a) (h : ∀ i, Commute (f i) a) : Commute (∑' i, f i) a

{ι : Type u_1}
{α : Type u_4}
[NonUnitalNonAssocSemiring α]
[TopologicalSpace α]
[TopologicalSemiring α]
{f : ι → α}
[T2Space α]
(a : α)
(h : ∀ (i : ι), Commute (f i) a)


@[reassoc]
lemma stalkMap_germ (U : Opens Y)
    (x : (Opens.map f.val.base).obj U) :
    Y.presheaf.germ ⟨f.val.base x.val, x.property⟩ ≫ f.stalkMap x.val =
      f.val.c.app (op U) ≫ X.presheaf.germ x

{X Y : AlgebraicGeometry.LocallyRingedSpace}

(U : TopologicalSpace.Opens ↑Y.toTopCat)

(x : ↥((TopologicalSpace.Opens.map f.val.base).obj U))

Y.presheaf.germ ⟨f.val.base ↑x, ⋯⟩ ≫ AlgebraicGeometry.LocallyRingedSpace.Hom.stalkMap f ↑x =
  f.val.c.app (Opposite.op U) ≫ X.presheaf.germ x


@[simp]
theorem star_inv [Group R] [StarMul R] (x : R) : star x⁻¹ = (star x)⁻¹

{R : Type u}
[Group R]
[StarMul R]
(x : R)


@[to_additive (attr := simp)]
theorem quotientMapOfLE_apply_mk (h : s ≤ t) (g : α) :
    quotientMapOfLE h (QuotientGroup.mk g) = QuotientGroup.mk g

{α : Type u_1}
[AddGroup α]
{s t : AddSubgroup α}
(h : s ≤ t)
(g : α)


theorem measure_ball_lt_top [PseudoMetricSpace α] [ProperSpace α] {μ : Measure α}
    [IsFiniteMeasureOnCompacts μ] {x : α} {r : ℝ} : μ (Metric.ball x r) < ∞


/-- A version of `x.property` or `x.2` where `p` is syntactically applied to the coercion of `x`
  instead of `x.1`. A similar result is `Subtype.mem` in `Data.Set.Basic`. -/
theorem prop (x : Subtype p) : p x

{α : Sort u_1}
{p : α → Prop}
(x : Subtype p)


/-- If `U ≤ V`, then projecting on `V` and then on `U` is the same as projecting on `U`. -/
theorem orthogonalProjection_orthogonalProjection_of_le {U V : Submodule 𝕜 E}
    [HasOrthogonalProjection U] [HasOrthogonalProjection V] (h : U ≤ V) (x : E) :
    orthogonalProjection U (orthogonalProjection V x) = orthogonalProjection U x

{𝕜 : Type u_1}
{E : Type u_2}
[RCLike 𝕜]
[NormedAddCommGroup E]
[InnerProductSpace 𝕜 E]
{U V : Submodule 𝕜 E}
[HasOrthogonalProjection U]
[HasOrthogonalProjection V]
(h : U ≤ V)
(x : E)

(orthogonalProjection U) ↑((orthogonalProjection V) x) = (orthogonalProjection U) x


theorem conj_cpow_eq_ite (x : ℂ) (n : ℂ) :
    conj x ^ n = if x.arg = π then x ^ n else conj (x ^ conj n)

(starRingEnd ℂ) x ^ n = if x.arg = π then x ^ n else (starRingEnd ℂ) (x ^ (starRingEnd ℂ) n)


@[simp] theorem recDiag_zero_zero {motive : Nat → Nat → Sort _} (zero_zero : motive 0 0)
    (zero_succ : ∀ n, motive 0 n → motive 0 (n+1)) (succ_zero : ∀ m, motive m 0 → motive (m+1) 0)
    (succ_succ : ∀ m n, motive m n → motive (m+1) (n+1)) :
    Nat.recDiag (motive:=motive) zero_zero zero_succ succ_zero succ_succ 0 0 = zero_zero

(zero_succ : (n : Nat) → motive 0 n → motive 0 (n + 1))

(succ_zero : (m : Nat) → motive m 0 → motive (m + 1) 0)

(succ_succ : (m n : Nat) → motive m n → motive (m + 1) (n + 1))

Nat.recDiag zero_zero zero_succ succ_zero succ_succ 0 0 = zero_zero


@[simp]
lemma stalkMap_hom_inv_apply (e : X ≅ Y) (y : Y) (z) :
    e.inv.stalkMap y (e.hom.stalkMap (e.inv.val.base y) z) =
      Y.presheaf.stalkSpecializes (specializes_of_eq <| by simp) z

(z : ↑(Y.presheaf.stalk (e.hom.val.base (e.inv.val.base y))))

(AlgebraicGeometry.LocallyRingedSpace.Hom.stalkMap e.inv y)
    ((AlgebraicGeometry.LocallyRingedSpace.Hom.stalkMap e.hom (e.inv.val.base y)) z) =
  (Y.presheaf.stalkSpecializes ⋯) z


theorem card_functions_sum_skolem₁_le : #(Σ n, (L.sum L.skolem₁).Functions n) ≤ max ℵ₀ L.card

Cardinal.mk ((n : ℕ) × (L.sum L.skolem₁).Functions n) ≤ max Cardinal.aleph0 L.card


@[to_additive (attr := simp low, norm_cast)]
theorem coe_mul (x y : S') : (↑(x * y) : M) = ↑x * ↑y

{M : Type u_1}
{A : Type u_5}
[Mul M]
[SetLike A M]
[hA : MulMemClass A M]
(S' : A)
(x y : ↥S')


/-- The support of a polynomial `f` is a finset in `ℕ`.  The lemma `toLaurent_support f`
shows that the support of `f.toLaurent` is the same finset, but viewed in `ℤ` under the natural
inclusion `ℕ ↪ ℤ`. -/
theorem toLaurent_support (f : R[X]) : f.toLaurent.support = f.support.map Nat.castEmbedding

(Polynomial.toLaurent f).support = Finset.map Nat.castEmbedding f.support


theorem Functor.map_id : (id <$> ·) = (id : F α → F α)

{F : Type u → Type v}
{α : Type u}
[Functor F]
[LawfulFunctor F]


theorem eval_mul : eval f (p * q) = eval f p * eval f q

{R : Type u}
{σ : Type u_1}
[CommSemiring R]
{p q : MvPolynomial σ R}
{f : σ → R}

(MvPolynomial.eval f) (p * q) = (MvPolynomial.eval f) p * (MvPolynomial.eval f) q


@[to_additive]
theorem comp_nat_add {f : ℕ → M} {k : ℕ} (h : Multipliable fun n ↦ f (n + k)) : Multipliable f

{M : Type u_1}
[AddCommMonoid M]
[TopologicalSpace M]
[ContinuousAdd M]
{f : ℕ → M}
{k : ℕ}
(h : Summable fun n => f (n + k))


@[simp]
theorem bind_eq_bind {α β} (f : Part α) (g : α → Part β) : f >>= g = f.bind g

{α β : Type u_4}
(f : Part α)
(g : α → Part β)


theorem ext_iff {φ₁ φ₂ : A →ₐc[R] B} : φ₁ = φ₂ ↔ ∀ x, φ₁ x = φ₂ x

{R : Type u_1}
{A : Type u_2}
{B : Type u_3}
[CommSemiring R]
[Semiring A]
[Algebra R A]
[Semiring B]
[Algebra R B]
[CoalgebraStruct R A]
[CoalgebraStruct R B]
{φ₁ φ₂ : A →ₐc[R] B}

φ₁ = φ₂ ↔ ∀ (x : A), φ₁ x = φ₂ x


/-- The functor `Arrow (Arrow C) ⥤ Square C` which sends
a morphism `Arrow.mk f ⟶ Arrow.mk g` to the commutative square
with `f` on the left side and `g` on the right side. -/
@[simps!]
def fromArrowArrowFunctor : Arrow (Arrow C) ⥤ Square C

(f : CategoryTheory.Arrow (CategoryTheory.Arrow C))

(CategoryTheory.Square.fromArrowArrowFunctor.obj f).X₃ = f.left.right


/-- A functor induces a functor of matrix categories.
-/
@[simps]
def mapMat_ (F : C ⥤ D) [Functor.Additive F] : Mat_ C ⥤ Mat_ D

{C : Type u₁}
[CategoryTheory.Category.{v₁, u₁} C]
[CategoryTheory.Preadditive C]
{D : Type u_1}
[CategoryTheory.Category.{v₁, u_1} D]
[CategoryTheory.Preadditive D]
(F : C ⥤ D)
[F.Additive]
(M : CategoryTheory.Mat_ C)
(i : M.ι)


/-- Composing an independent indexed family with an order isomorphism on the elements results in
another independent indexed family. -/
theorem Independent.map_orderIso {ι : Sort*} {α β : Type*} [CompleteLattice α]
    [CompleteLattice β] (f : α ≃o β) {a : ι → α} (ha : Independent a) : Independent (f ∘ a)

{ι : Sort u_5}
{α : Type u_6}
{β : Type u_7}
[CompleteLattice α]
[CompleteLattice β]
(f : α ≃o β)
{a : ι → α}
(ha : CompleteLattice.Independent a)


@[to_additive]
theorem CauchySeq.mul_const {ι : Type*} [Preorder ι] {u : ι → α} {x : α} (hu : CauchySeq u) :
    CauchySeq fun n => u n * x

{α : Type u_1}
[UniformSpace α]
[Group α]
[UniformGroup α]
{ι : Type u_3}
[Preorder ι]
{u : ι → α}
{x : α}
(hu : CauchySeq u)


lemma isClosed_of_isUpperSet (h : IsUpperSet s) : IsClosed s

{α : Type u_1}
[Preorder α]
[TopologicalSpace α]
[Topology.IsScottHausdorff α]
{s : Set α}
(h : IsUpperSet s)


theorem _root_.Matrix.mem_range_scalar_iff_commute_transvectionStruct {M : Matrix n n R} :
    M ∈ Set.range (Matrix.scalar n) ↔ ∀ t : TransvectionStruct n R, Commute t.toMatrix M

{n : Type u_1}
{R : Type u₂}
[DecidableEq n]
[CommRing R]
[Fintype n]
{M : Matrix n n R}

M ∈ Set.range ⇑(Matrix.scalar n) ↔ ∀ (t : Matrix.TransvectionStruct n R), Commute t.toMatrix M


@[simp, norm_cast] lemma im_nnratCast (q : ℚ≥0) : (q : ℍ[R]).im = 0

{R : Type u_1}
[LinearOrderedField R]
(q : ℚ≥0)


theorem isIntegral_algebraMap_iff [Algebra A B] [IsScalarTower R A B] {x : A}
    (hAB : Function.Injective (algebraMap A B)) :
    IsIntegral R (algebraMap A B x) ↔ IsIntegral R x

(hAB : Function.Injective ⇑(algebraMap A B))

IsIntegral R ((algebraMap A B) x) ↔ IsIntegral R x


theorem ofSubtype_apply_of_mem (f : Perm (Subtype p)) (ha : p a) : ofSubtype f a = f ⟨a, ha⟩

{α : Type u}
{p : α → Prop}
[DecidablePred p]
{a : α}
(f : Equiv.Perm (Subtype p))
(ha : p a)

(Equiv.Perm.ofSubtype f) a = ↑(f ⟨a, ha⟩)


theorem ofNat_add_ofNat {n} (x y : Nat) : BitVec.ofNat n x + BitVec.ofNat n y = BitVec.ofNat n (x + y)


@[to_additive (attr := simp)]
theorem coe_comap (S : Subsemigroup N) (f : M →ₙ* N) : (S.comap f : Set M) = f ⁻¹' S

{M : Type u_1}
{N : Type u_2}
[Add M]
[Add N]
(S : AddSubsemigroup N)
(f : AddHom M N)

↑(AddSubsemigroup.comap f S) = ⇑f ⁻¹' ↑S


/-- The polar set is closed in the weak topology induced by `B.flip`. -/
theorem polar_weak_closed (s : Set E) : IsClosed[WeakBilin.instTopologicalSpace B.flip]
    (B.polar s)

{𝕜 : Type u_1}
{E : Type u_2}
{F : Type u_3}
[NormedCommRing 𝕜]
[AddCommMonoid E]
[AddCommMonoid F]
[Module 𝕜 E]
[Module 𝕜 F]
(B : E →ₗ[𝕜] F →ₗ[𝕜] 𝕜)
(s : Set E)


theorem of_eq_tot {f : α →. σ} {g : α → σ} (hf : Partrec f) (H : ∀ n, g n ∈ f n) : Computable g

{α : Type u_1}
{σ : Type u_4}
[Primcodable α]
[Primcodable σ]
{f : α →. σ}
{g : α → σ}
(hf : Partrec f)
(H : ∀ (n : α), g n ∈ f n)


theorem mem_supported' {s : Set α} (p : α →₀ M) :
    p ∈ supported M R s ↔ ∀ x ∉ s, p x = 0

{α : Type u_1}
{M : Type u_2}
(R : Type u_5)
[Semiring R]
[AddCommMonoid M]
[Module R M]
{s : Set α}
(p : α →₀ M)

p ∈ Finsupp.supported M R s ↔ ∀ x ∉ s, p x = 0


@[to_additive (attr := simp) nnnorm_eq_zero]
theorem nnnorm_eq_zero' : ‖a‖₊ = 0 ↔ a = 1


@[simp]
theorem neg_lie : ⁅-x, m⁆ = -⁅x, m⁆

{L : Type v}
{M : Type w}
[LieRing L]
[AddCommGroup M]
[LieRingModule L M]
(x : L)
(m : M)


@[simp]
theorem map_eq_map {α β} (f : α → β) (o : Part α) : f <$> o = map f o

{α β : Type u_4}
(f : α → β)
(o : Part α)


@[simp]
theorem closure_diff_interior (s : Set X) : closure s \ interior s = frontier s

{X : Type u}
[TopologicalSpace X]
(s : Set X)


theorem wOppSide_smul_vsub_vadd_right {s : AffineSubspace R P} {p₁ p₂ : P} (x : P) (hp₁ : p₁ ∈ s)
    (hp₂ : p₂ ∈ s) {t : R} (ht : t ≤ 0) : s.WOppSide x (t • (x -ᵥ p₁) +ᵥ p₂)

{R : Type u_1}
{V : Type u_2}
{P : Type u_4}
[StrictOrderedCommRing R]
[AddCommGroup V]
[Module R V]
[AddTorsor V P]
{s : AffineSubspace R P}
{p₁ p₂ : P}
(x : P)
(hp₁ : p₁ ∈ s)
(hp₂ : p₂ ∈ s)
{t : R}
(ht : t ≤ 0)


theorem BoundedSMul.of_norm_smul_le (h : ∀ (r : α) (x : β), ‖r • x‖ ≤ ‖r‖ * ‖x‖) :
    BoundedSMul α β


theorem mem_span_singleton_mul {x y : R} {I : Ideal R} : x ∈ span {y} * I ↔ ∃ z ∈ I, y * z = x

{R : Type u}
[CommSemiring R]
{x y : R}
{I : Ideal R}

x ∈ Ideal.span {y} * I ↔ ∃ z ∈ I, y * z = x


@[simp]
theorem complete_graph_degree [DecidableEq V] (v : V) :
    (⊤ : SimpleGraph V).degree v = Fintype.card V - 1

{V : Type u_1}
[Fintype V]
[DecidableEq V]
(v : V)


theorem infinite_of_not_bddBelow : ¬BddBelow s → s.Infinite

{α : Type u}
[Preorder α]
[IsDirected α fun x x_1 => x ≥ x_1]
[Nonempty α]
{s : Set α}


lemma eval_modulus_sub (x : ZMod n) : χ (n - x) = χ (-x)

{R : Type u_1}
[CommMonoidWithZero R]
{n : ℕ}
(χ : DirichletCharacter R n)
(x : ZMod n)


{α : Type u_2}
[Preorder α]
[LocallyFiniteOrder α]
(a : α)


@[simp]
theorem integral_sin_sq_mul_cos_sq :
    ∫ x in a..b, sin x ^ 2 * cos x ^ 2 = (b - a) / 8 - (sin (4 * b) - sin (4 * a)) / 32

∫ (x : ℝ) in a..b, Real.sin x ^ 2 * Real.cos x ^ 2 = (b - a) / 8 - (Real.sin (4 * b) - Real.sin (4 * a)) / 32


/-- If `f` is `ℝ`-valued and integrable, then for any `c < 0` the set `{x | f x ≤ c}` has finite
measure. -/
lemma Integrable.measure_le_lt_top {f : α → ℝ} (hf : Integrable f μ) {c : ℝ} (c_neg : c < 0) :
    μ {a : α | f a ≤ c} < ∞

{α : Type u_1}
{m : MeasurableSpace α}
{μ : MeasureTheory.Measure α}
{f : α → ℝ}
(hf : MeasureTheory.Integrable f μ)
{c : ℝ}
(c_neg : c < 0)


@[simp]
theorem mulLeft₀_symm_apply (c : α) (hc : c ≠ 0) :
    ((Homeomorph.mulLeft₀ c hc).symm : α → α) = (c⁻¹ * ·)

{α : Type u_1}
[TopologicalSpace α]
[GroupWithZero α]
[ContinuousMul α]
(c : α)
(hc : c ≠ 0)

⇑(Homeomorph.mulLeft₀ c hc).symm = fun x => c⁻¹ * x


theorem exists_dist_le_le (hδ : 0 ≤ δ) (hε : 0 ≤ ε) (h : dist x z ≤ ε + δ) :
    ∃ y, dist x y ≤ δ ∧ dist y z ≤ ε

{E : Type u_2}
[SeminormedAddCommGroup E]
[NormedSpace ℝ E]
{x z : E}
{δ ε : ℝ}
(hδ : 0 ≤ δ)
(hε : 0 ≤ ε)
(h : dist x z ≤ ε + δ)


/-- A prelaxfunctor `F` sends 2-isomorphisms `η : f ≅ f` to 2-isomorphisms `F.map f ≅ F.map g`. -/
@[simps!]
abbrev map₂Iso {f g : a ⟶ b} (η : f ≅ g) : F.map f ≅ F.map g

{B : Type u₁}
[CategoryTheory.Bicategory B]
{C : Type u₂}
[CategoryTheory.Bicategory C]
(F : CategoryTheory.PrelaxFunctor B C)
{a b : B}
{f g : a ⟶ b}
(η : f ≅ g)


/-- If `a ^ n = 1`, `n ≠ 0`, then `a` is a unit. -/
@[to_additive (attr := simps!) "If `n • x = 0`, `n ≠ 0`, then `x` is an additive unit."]
def Units.ofPowEqOne (a : M) (n : ℕ) (ha : a ^ n = 1) (hn : n ≠ 0) : Mˣ

{M : Type u_1}
[AddMonoid M]
(a : M)
(n : ℕ)
(ha : n • a = 0)
(hn : n ≠ 0)


/-- Composition by a fixed left argument as an `R`-linear map. -/
@[simps]
def leftComp {X Y : C} (Z : C) (f : X ⟶ Y) : (Y ⟶ Z) →ₗ[R] X ⟶ Z

{C : Type u}
[CategoryTheory.Category.{v, u} C]
[CategoryTheory.Preadditive C]
(R : Type w)
[Semiring R]
[CategoryTheory.Linear R C]
{X Y : C}
(Z : C)
(f : X ⟶ Y)
(g : Y ⟶ Z)

(CategoryTheory.Linear.leftComp R Z f) g = f ≫ g


theorem isClosed_range (hf : IsClosedMap f) : IsClosed (range f)

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


@[simp]
theorem cone_fst (s : CommSq f g h i) : s.cone.fst = f

{C : Type u₁}
[CategoryTheory.Category.{v₁, u₁} C]
{W X Y Z : C}
{f : W ⟶ X}
{g : W ⟶ Y}
{h : X ⟶ Z}
{i : Y ⟶ Z}
(s : CategoryTheory.CommSq f g h i)


theorem card_Ico : (Ico f g).card = (∏ i ∈ f.support ∪ g.support, (Icc (f i) (g i)).card) - 1

{ι : Type u_1}
{α : Type u_2}
[PartialOrder α]
[Zero α]
[LocallyFiniteOrder α]
(f g : ι →₀ α)

(Finset.Ico f g).card = ∏ i ∈ f.support ∪ g.support, (Finset.Icc (f i) (g i)).card - 1


@[simp]
theorem iUnion_toSubordinate (π : Prepartition I) (r : (ι → ℝ) → Ioi (0 : ℝ)) :
    (π.toSubordinate r).iUnion = π.iUnion

{ι : Type u_1}
[Fintype ι]
{I : BoxIntegral.Box ι}
(π : BoxIntegral.Prepartition I)
(r : (ι → ℝ) → ↑(Set.Ioi 0))


theorem moveRight_card {b : Board} {m : ℤ × ℤ} (h : m ∈ right b) :
    Finset.card (moveRight b m) + 2 = Finset.card b

(h : m ∈ SetTheory.PGame.Domineering.right b)

Finset.card (SetTheory.PGame.Domineering.moveRight b m) + 2 = Finset.card b


theorem range_ι_le_evenOdd_one : LinearMap.range (ι Q) ≤ evenOdd Q 1

{R : Type u_1}
{M : Type u_2}
[CommRing R]
[AddCommGroup M]
[Module R M]
(Q : QuadraticForm R M)

LinearMap.range (CliffordAlgebra.ι Q) ≤ CliffordAlgebra.evenOdd Q 1


/-- Any point is a periodic point of period `0`. -/
theorem isPeriodicPt_zero (f : α → α) (x : α) : IsPeriodicPt f 0 x


@[to_additive (attr := simp, norm_cast)]
theorem coe_inv [Inv β] (f : α →ₛ β) : ⇑(f⁻¹) = (⇑f)⁻¹

{α : Type u_1}
{β : Type u_2}
[MeasurableSpace α]
[Inv β]
(f : MeasureTheory.SimpleFunc α β)

↑f⁻¹ = (↑f)⁻¹


@[to_additive]
theorem pow_subset_pow_of_one_mem (hs : (1 : α) ∈ s) : m ≤ n → s ^ m ⊆ s ^ n

{α : Type u_2}
[DecidableEq α]
[Monoid α]
{s : Finset α}
{m n : ℕ}
(hs : 1 ∈ s)


theorem embedding_sigma_map {f₁ : ι → κ} {f₂ : ∀ i, σ i → τ (f₁ i)} (h : Injective f₁) :
    Embedding (Sigma.map f₁ f₂) ↔ ∀ i, Embedding (f₂ i)

{ι : Type u_5}
{κ : Type u_6}
{σ : ι → Type u_7}
{τ : κ → Type u_8}
[(i : ι) → TopologicalSpace (σ i)]
[(k : κ) → TopologicalSpace (τ k)]
{f₁ : ι → κ}
{f₂ : (i : ι) → σ i → τ (f₁ i)}
(h : Function.Injective f₁)

Embedding (Sigma.map f₁ f₂) ↔ ∀ (i : ι), Embedding (f₂ i)


theorem _root_.Commute.exp_right [T2Space 𝔸] {x y : 𝔸} (h : Commute x y) :
    Commute x (exp 𝕂 y)

(𝕂 : Type u_1)
{𝔸 : Type u_2}
[Field 𝕂]
[Ring 𝔸]
[Algebra 𝕂 𝔸]
[TopologicalSpace 𝔸]
[TopologicalRing 𝔸]
[T2Space 𝔸]
{x y : 𝔸}
(h : Commute x y)


theorem toGlueR_isometry (hΦ : Isometry Φ) (hΨ : Isometry Ψ) : Isometry (toGlueR hΦ hΨ)

{X : Type u}
{Y : Type v}
{Z : Type w}
[Nonempty Z]
[MetricSpace Z]
[MetricSpace X]
[MetricSpace Y]
{Φ : Z → X}
{Ψ : Z → Y}
(hΦ : Isometry Φ)
(hΨ : Isometry Ψ)


/-- The image of a set `s` under a continuous linear map `f` has measure
equal to `μ s` times the absolute value of the determinant of `f`. -/
@[simp]
theorem addHaar_image_continuousLinearMap (f : E →L[ℝ] E) (s : Set E) :
    μ (f '' s) = ENNReal.ofReal |LinearMap.det (f : E →ₗ[ℝ] E)| * μ s

{E : Type u_1}
[NormedAddCommGroup E]
[NormedSpace ℝ E]
[MeasurableSpace E]
[BorelSpace E]
[FiniteDimensional ℝ E]
(μ : MeasureTheory.Measure E)
[μ.IsAddHaarMeasure]
(f : E →L[ℝ] E)
(s : Set E)

μ (⇑f '' s) = ENNReal.ofReal |LinearMap.det ↑f| * μ s


theorem attach_bind_coe (s : Multiset α) (f : α → Multiset β) :
    (s.attach.bind fun i => f i) = s.bind f

{α : Type u_1}
{β : Type v}
(s : Multiset α)
(f : α → Multiset β)

(s.attach.bind fun i => f ↑i) = s.bind f


@[to_additive]
theorem eq_one_or_one_lt (a : α) : a = 1 ∨ 1 < a

{α : Type u}
[CanonicallyOrderedAddCommMonoid α]
(a : α)


/-- The symbol `J(a | b)` vanishes if and only if `b ≠ 0` and `a` and `b` are not coprime. -/
theorem eq_zero_iff {a : ℤ} {b : ℕ} : J(a | b) = 0 ↔ b ≠ 0 ∧ a.gcd b ≠ 1

jacobiSym a b = 0 ↔ b ≠ 0 ∧ a.gcd ↑b ≠ 1


@[to_additive]
theorem HasProd.sigma {γ : β → Type*} {f : (Σ b : β, γ b) → α} {g : β → α} {a : α}
    (ha : HasProd f a) (hf : ∀ b, HasProd (fun c ↦ f ⟨b, c⟩) (g b)) : HasProd g a

(hf : ∀ (b : β), HasProd (fun c => f ⟨b, c⟩) (g b))


@[simp]
theorem toSet_range {α : Type u} (f : α → ZFSet.{max u v}) :
    (range.{u, v} f).toSet = Set.range f


theorem lt_toNNRat_iff_coe_lt {q : ℚ≥0} : q < toNNRat p ↔ ↑q < p


/-- The identity oplax natural transformation. -/
@[simps]
def id : OplaxNatTrans F F

{B : Type u₁}
[CategoryTheory.Bicategory B]
{C : Type u₂}
[CategoryTheory.Bicategory C]
(F : CategoryTheory.OplaxFunctor B C)
(a : B)

(CategoryTheory.OplaxNatTrans.id F).app a = CategoryTheory.CategoryStruct.id (F.obj a)


theorem nfpFamily_le_fp (H : ∀ i, Monotone (f i)) {a b} (ab : a ≤ b) (h : ∀ i, f i b ≤ b) :
    nfpFamily.{u, v} f a ≤ b

{f : ι → Ordinal.{max u v} → Ordinal.{max u v}}


theorem setIntegral_piecewise {E : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E]
    (a : α) (g : β → E) (t : Set β) :
    ∫ b in t, g b ∂piecewise hs κ η a =
      if a ∈ s then ∫ b in t, g b ∂κ a else ∫ b in t, g b ∂η a

{α : Type u_1}
{β : Type u_2}
{mα : MeasurableSpace α}
{mβ : MeasurableSpace β}
{κ η : ProbabilityTheory.Kernel α β}
{s : Set α}
{hs : MeasurableSet s}
[DecidablePred fun x => x ∈ s]
{E : Type u_4}
[NormedAddCommGroup E]
[NormedSpace ℝ E]
(a : α)
(g : β → E)
(t : Set β)

∫ (b : β) in t, g b ∂(ProbabilityTheory.Kernel.piecewise hs κ η) a =
  if a ∈ s then ∫ (b : β) in t, g b ∂κ a else ∫ (b : β) in t, g b ∂η a


lemma piAntidiag_insert [DecidableEq (ι → μ)] (hi : i ∉ s) (n : μ) :
    piAntidiag (insert i s) n = (antidiagonal n).biUnion fun p : μ × μ ↦ (piAntidiag s p.snd).image
      (fun f j ↦ f j + if j = i then p.fst else 0)

{ι : Type u_1}
{μ : Type u_2}
[DecidableEq ι]
[AddCancelCommMonoid μ]
[Finset.HasAntidiagonal μ]
[DecidableEq μ]
{i : ι}
{s : Finset ι}
[DecidableEq (ι → μ)]
(hi : i ∉ s)
(n : μ)

(insert i s).piAntidiag n =
  (Finset.antidiagonal n).biUnion fun p => Finset.image (fun f j => f j + if j = i then p.1 else 0) (s.piAntidiag p.2)


theorem smul_pi₀ [GroupWithZero K] [∀ i, MulAction K (R i)] {r : K} (S : Set ι) (t : ∀ i, Set (R i))
    (hr : r ≠ 0) : r • S.pi t = S.pi (r • t)

{K : Type u_1}
{ι : Type u_2}
{R : ι → Type u_3}
[GroupWithZero K]
[(i : ι) → MulAction K (R i)]
{r : K}
(S : Set ι)
(t : (i : ι) → Set (R i))
(hr : r ≠ 0)


@[simp]
theorem log_zero_right (b : Ordinal) : log b 0 = 0


theorem closedBall_prod_same [PseudoEMetricSpace β] (x : α) (y : β) (r : ℝ≥0∞) :
    closedBall x r ×ˢ closedBall y r = closedBall (x, y) r

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

EMetric.closedBall x r ×ˢ EMetric.closedBall y r = EMetric.closedBall (x, y) r


@[to_additive (attr := simp)]
theorem liftExpand_of {C : Sort*} {P : X → S → C}
    {hP : ∀ (r : X) (t : R) (s : S) (ht : t * s ∈ S), P r s = P (t • r) ⟨t * s, ht⟩} (r : X)
    (s : S) : liftExpand P hP (r /ₒ s) = P r s

{hP : ∀ (r : X) (t : R) (s : ↥S) (ht : t * ↑s ∈ S), P r s = P (t • r) ⟨t * ↑s, ht⟩}

OreLocalization.liftExpand P hP (r /ₒ s) = P r s


@[simp]
theorem not_mem_empty (a : α) : a ∉ (∅ : Finset α)


theorem not_dvd_geom_sum₂ {p : R} (hp : Prime p) (hxy : p ∣ x - y) (hx : ¬p ∣ x) (hn : ¬p ∣ n) :
    ¬p ∣ ∑ i ∈ range n, x ^ i * y ^ (n - 1 - i)

{R : Type u_1}
{n : ℕ}
[CommRing R]
{x y p : R}
(hp : Prime p)
(hxy : p ∣ x - y)
(hx : ¬p ∣ x)
(hn : ¬p ∣ ↑n)

¬p ∣ ∑ i ∈ Finset.range n, x ^ i * y ^ (n - 1 - i)


@[simp]
theorem bmod_add_bmod_congr : Int.bmod (Int.bmod x n + y) n = Int.bmod (x + y) n


/-- The measurable cylinders generate the product σ-algebra. -/
theorem generateFrom_measurableCylinders :
    MeasurableSpace.generateFrom (measurableCylinders α) = MeasurableSpace.pi

{ι : Type u_1}
{α : ι → Type u_2}
[(i : ι) → MeasurableSpace (α i)]

MeasurableSpace.generateFrom (MeasureTheory.measurableCylinders α) = MeasurableSpace.pi


theorem dist_lt_iff_of_nonempty [Nonempty α] : dist f g < C ↔ ∀ x : α, dist (f x) (g x) < C

{α : Type u_1}
{β : Type u_2}
[TopologicalSpace α]
[CompactSpace α]
[MetricSpace β]
{f g : C(α, β)}
{C : ℝ}
[Nonempty α]

dist f g < C ↔ ∀ (x : α), dist (f x) (g x) < C


@[simp, norm_cast]
lemma cast_min (p q : ℚ) : (↑(min p q) : K) = min (p : K) (q : K)

{K : Type u_5}
[LinearOrderedField K]
(p q : ℚ)


@[simp]
theorem support_embDomain (f : α ↪ β) (v : α →₀ M) : (embDomain f v).support = v.support.map f

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

(Finsupp.embDomain f v).support = Finset.map f v.support


theorem eLpNorm_sub_le' (hf : AEStronglyMeasurable f μ) (hg : AEStronglyMeasurable g μ)
    (p : ℝ≥0∞) : eLpNorm (f - g) p μ ≤ LpAddConst p * (eLpNorm f p μ + eLpNorm g p μ)

(hf : MeasureTheory.AEStronglyMeasurable f μ)

(hg : MeasureTheory.AEStronglyMeasurable g μ)

MeasureTheory.eLpNorm (f - g) p μ ≤
  MeasureTheory.LpAddConst p * (MeasureTheory.eLpNorm f p μ + MeasureTheory.eLpNorm g p μ)


theorem hasFDerivAtFilter_fst {L : Filter (E × F)} :
    HasFDerivAtFilter (@Prod.fst E F) (fst 𝕜 E F) p L

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{F : Type u_3}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{p : E × F}
{L : Filter (E × F)}

HasFDerivAtFilter Prod.fst (ContinuousLinearMap.fst 𝕜 E F) p L


theorem Quot.EqvGen_sound {r : α → α → Prop} {a b : α} (H : EqvGen r a b) :
    Quot.mk r a = Quot.mk r b

{α : Type u}
{r : α → α → Prop}
{a b : α}
(H : EqvGen r a b)


(v : ↑(Equiv.Perm.vectorsProdEqOne G n))

Equiv.Perm.VectorsProdEqOne.rotate v n = v


theorem tan_nat_mul_pi_sub (x : ℝ) (n : ℕ) : tan (n * π - x) = -tan x

Real.tan (↑n * Real.pi - x) = -Real.tan x


theorem monotone_or {p q : α → Prop} (m_p : Monotone p) (m_q : Monotone q) :
    Monotone fun x => p x ∨ q x

{α : Type u}
[Preorder α]
{p q : α → Prop}
(m_p : Monotone p)
(m_q : Monotone q)


theorem not_ge_eq (a b : β) : (¬ (a ≥ b)) = (a < b)

{β : Type u_2}
[LinearOrder β]
(a b : β)


theorem antidiagonal_succ_succ' {n : ℕ} :
    antidiagonal (n + 2) =
      (0, n + 2) :: (antidiagonal n).map (Prod.map Nat.succ Nat.succ) ++ [(n + 2, 0)]

List.Nat.antidiagonal (n + 2) =
  (0, n + 2) :: List.map (Prod.map Nat.succ Nat.succ) (List.Nat.antidiagonal n) ++ [(n + 2, 0)]


@[simp] theorem mem_inter_iff [BEq α] [LawfulBEq α] {x : α} {l₁ l₂ : List α} :
    x ∈ l₁ ∩ l₂ ↔ x ∈ l₁ ∧ x ∈ l₂

{α : Type u_1}
[BEq α]
[LawfulBEq α]
{x : α}
{l₁ l₂ : List α}

x ∈ l₁ ∩ l₂ ↔ x ∈ l₁ ∧ x ∈ l₂


@[gcongr]
theorem Ioo_subset_Ioo_right (h : b₁ ≤ b₂) : Ioo a b₁ ⊆ Ioo a b₂

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


theorem Eventually.mono {p q : α → Prop} {f : Filter α} (hp : ∀ᶠ x in f, p x)
    (hq : ∀ x, p x → q x) : ∀ᶠ x in f, q x

{α : Type u}
{p q : α → Prop}
{f : Filter α}
(hp : ∀ᶠ (x : α) in f, p x)
(hq : ∀ (x : α), p x → q x)


/-- For an indexed family `s : ι → Set α` of disjoint sets,
the natural injection from the sigma-type `(i : ι) × ↑(s i)` to `α`. -/
@[simps] def Function.Embedding.sigmaSet {s : ι → Set α} (h : Pairwise (Disjoint on s)) :
    (i : ι) × s i ↪ α

{α : Type u_1}
{ι : Type u_2}
{s : ι → Set α}
(h : Pairwise (Disjoint on s))
(x : (i : ι) × ↑(s i))

(Function.Embedding.sigmaSet h) x = ↑x.snd


protected theorem comp_traverse {α β γ : Type u} (f : β → F γ) (g : α → G β) (x : σ ⊕ α) :
    Sum.traverse (Comp.mk ∘ (f <$> ·) ∘ g) x =
    Comp.mk.{u} (Sum.traverse f <$> Sum.traverse g x)

{σ : Type u}
{F G : Type u → Type u}
[Applicative F]
[Applicative G]
[LawfulApplicative G]
{α β γ : Type u}
(f : β → F γ)
(g : α → G β)
(x : σ ⊕ α)

Sum.traverse (Functor.Comp.mk ∘ (fun x => f <$> x) ∘ g) x = Functor.Comp.mk (Sum.traverse f <$> Sum.traverse g x)


theorem setToL1S_congr (T : Set α → E →L[ℝ] F) (h_zero : ∀ s, MeasurableSet s → μ s = 0 → T s = 0)
    (h_add : FinMeasAdditive μ T) {f g : α →₁ₛ[μ] E} (h : toSimpleFunc f =ᵐ[μ] toSimpleFunc g) :
    setToL1S T f = setToL1S T g

(h_zero : ∀ (s : Set α), MeasurableSet s → μ s = 0 → T s = 0)

(h_add : MeasureTheory.FinMeasAdditive μ T)

{f g : ↥(MeasureTheory.Lp.simpleFunc E 1 μ)}

(h : ↑(MeasureTheory.Lp.simpleFunc.toSimpleFunc f) =ᵐ[μ] ↑(MeasureTheory.Lp.simpleFunc.toSimpleFunc g))

MeasureTheory.L1.SimpleFunc.setToL1S T f = MeasureTheory.L1.SimpleFunc.setToL1S T g


@[simp]
theorem Bool.symmDiff_eq_xor : ∀ p q : Bool, p ∆ q = xor p q


/-- The balance properties of the `append` function. -/
protected theorem Balanced.append {l r : RBNode α}
    (hl : l.Balanced c₁ n) (hr : r.Balanced c₂ n) :
    (l.append r).RedRed (c₁ = black → c₂ ≠ black) n

{α : Type u_1}
{c₁ : Batteries.RBColor}
{n : Nat}
{c₂ : Batteries.RBColor}
{l r : Batteries.RBNode α}
(hl : l.Balanced c₁ n)
(hr : r.Balanced c₂ n)

Batteries.RBNode.RedRed (c₁ = Batteries.RBColor.black → c₂ ≠ Batteries.RBColor.black) (l.append r) n


/-- The backward direction of `Comon_ (Mon_ C) ≌ Mon_ (Comon_ C)` -/
@[simps]
def ofMon_Comon_ : Mon_ (Comon_ C) ⥤ Bimon_ C

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

(Bimon_.ofMon_Comon_ C).obj M = Bimon_.ofMon_Comon_obj C M


@[to_additive (attr := simp, norm_cast)]
theorem val_lt_val [Monoid α] [Preorder α] {a b : αˣ} : (a : α) < b ↔ a < b

{α : Type u_1}
[Monoid α]
[Preorder α]
{a b : αˣ}


@[simp]
theorem toFinset_none [Decidable (none : Part α).Dom] : none.toFinset = (∅ : Finset α)

{α : Type u_1}
[Decidable Part.none.Dom]


/-- The scalar factor between two left-invariant measures is non-zero when both measures are
positive on open sets. -/
@[to_additive]
lemma haarScalarFactor_pos_of_isHaarMeasure (μ' μ : Measure G) [IsHaarMeasure μ]
    [IsHaarMeasure μ'] : 0 < haarScalarFactor μ' μ

{G : Type u_1}
[TopologicalSpace G]
[AddGroup G]
[TopologicalAddGroup G]
[MeasurableSpace G]
[BorelSpace G]
(μ' μ : MeasureTheory.Measure G)
[μ.IsAddHaarMeasure]
[μ'.IsAddHaarMeasure]


@[simp]
theorem coe_toContinuousMap : ⇑γ.toContinuousMap = γ

{X : Type u_1}
[TopologicalSpace X]
{x y : X}
(γ : Path x y)


@[to_additive]
theorem mulTSupport_extend_one_subset :
    mulTSupport (g.extend f 1) ⊆ g '' mulTSupport f

{α : Type u_2}
{α' : Type u_3}
{β : Type u_4}
[TopologicalSpace α]
[TopologicalSpace α']
[Zero β]
{f : α → β}
[T2Space α']
(hf : HasCompactSupport f)
{g : α → α'}
(cont : Continuous g)

tsupport (Function.extend g f 0) ⊆ g '' tsupport f


/-- If `S`, `Q` are localizations of `R` and `P` at submonoids `M, T` respectively, an
isomorphism `j : R ≃+* P` such that `j(M) = T` induces an isomorphism of localizations
`S ≃+* Q`. -/
@[simps]
noncomputable def ringEquivOfRingEquiv (h : R ≃+* P) (H : M.map h.toMonoidHom = T) : S ≃+* Q

{R : Type u_1}
[CommSemiring R]
{M : Submonoid R}
(S : Type u_2)
[CommSemiring S]
[Algebra R S]
{P : Type u_3}
[CommSemiring P]
[IsLocalization M S]
{T : Submonoid P}
(Q : Type u_4)
[CommSemiring Q]
[Algebra P Q]
[IsLocalization T Q]
(h : R ≃+* P)
(H : Submonoid.map h.toMonoidHom M = T)
(a : Q)

(IsLocalization.ringEquivOfRingEquiv S Q h H).symm a = (IsLocalization.map S ↑h.symm ⋯) a


theorem mem_permutationsAux2 {t : α} {ts : List α} {ys : List α} {l l' : List α} :
    l' ∈ (permutationsAux2 t ts [] ys (l ++ ·)).2 ↔
      ∃ l₁ l₂, l₂ ≠ [] ∧ ys = l₁ ++ l₂ ∧ l' = l ++ l₁ ++ t :: l₂ ++ ts

{α : Type u_1}
{t : α}
{ts ys l l' : List α}

l' ∈ (List.permutationsAux2 t ts [] ys fun x => l ++ x).2 ↔
  ∃ l₁ l₂, l₂ ≠ [] ∧ ys = l₁ ++ l₂ ∧ l' = l ++ l₁ ++ t :: l₂ ++ ts


theorem ae_eq_trim_iff [TopologicalSpace γ] [MetrizableSpace γ] (hm : m ≤ m0) {f g : β → γ}
    (hf : StronglyMeasurable[m] f) (hg : StronglyMeasurable[m] g) :
    f =ᵐ[μ.trim hm] g ↔ f =ᵐ[μ] g

(hf : MeasureTheory.StronglyMeasurable f)

(hg : MeasureTheory.StronglyMeasurable g)


/-- **Fundamental theorem of calculus-1**, strict derivative in both limits for a locally finite
measure.

Let `f` be a measurable function integrable on `a..b`. Let `(la, la')` be a pair of
`intervalIntegral.FTCFilter`s around `a`; let `(lb, lb')` be a pair of `intervalIntegral.FTCFilter`s
around `b`. Suppose that `f` has finite limits `ca` and `cb` at `la' ⊓ ae μ` and `lb' ⊓ ae μ`,
respectively.
Then `∫ x in va..vb, f x ∂μ - ∫ x in ua..ub, f x ∂μ =
  ∫ x in ub..vb, cb ∂μ - ∫ x in ua..va, ca ∂μ +
    o(‖∫ x in ua..va, (1:ℝ) ∂μ‖ + ‖∫ x in ub..vb, (1:ℝ) ∂μ‖)`
as `ua` and `va` tend to `la` while `ub` and `vb` tend to `lb`.
-/
theorem measure_integral_sub_integral_sub_linear_isLittleO_of_tendsto_ae
    (hab : IntervalIntegrable f μ a b) (hmeas_a : StronglyMeasurableAtFilter f la' μ)
    (hmeas_b : StronglyMeasurableAtFilter f lb' μ) (ha_lim : Tendsto f (la' ⊓ ae μ) (𝓝 ca))
    (hb_lim : Tendsto f (lb' ⊓ ae μ) (𝓝 cb)) (hua : Tendsto ua lt la) (hva : Tendsto va lt la)
    (hub : Tendsto ub lt lb) (hvb : Tendsto vb lt lb) :
    (fun t =>
        ((∫ x in va t..vb t, f x ∂μ) - ∫ x in ua t..ub t, f x ∂μ) -
          ((∫ _ in ub t..vb t, cb ∂μ) - ∫ _ in ua t..va t, ca ∂μ)) =o[lt]
      fun t => ‖∫ _ in ua t..va t, (1 : ℝ) ∂μ‖ + ‖∫ _ in ub t..vb t, (1 : ℝ) ∂μ‖

(ha_lim : Filter.Tendsto f (la' ⊓ MeasureTheory.ae μ) (𝓝 ca))

(hb_lim : Filter.Tendsto f (lb' ⊓ MeasureTheory.ae μ) (𝓝 cb))

(fun t =>
    ∫ (x : ℝ) in va t..vb t, f x ∂μ - ∫ (x : ℝ) in ua t..ub t, f x ∂μ -
      (∫ (x : ℝ) in ub t..vb t, cb ∂μ - ∫ (x : ℝ) in ua t..va t, ca ∂μ)) =o[lt]
  fun t => ‖∫ (x : ℝ) in ua t..va t, 1 ∂μ‖ + ‖∫ (x : ℝ) in ub t..vb t, 1 ∂μ‖


@[simp]
theorem coe_equivMapOfInjective_apply (f : F) (hf : Function.Injective f) (x : s) :
    (equivMapOfInjective s f hf x : S) = f x

{R : Type u}
{S : Type v}
[NonUnitalNonAssocSemiring R]
[NonUnitalNonAssocSemiring S]
{F : Type u_1}
[FunLike F R S]
[NonUnitalRingHomClass F R S]
(s : NonUnitalSubsemiring R)
(f : F)
(hf : Function.Injective ⇑f)
(x : ↥s)

↑((s.equivMapOfInjective f hf) x) = f ↑x


/-- To check a monic polynomial is irreducible, it suffices to check only for
divisors that have smaller degree.

See also: `Polynomial.Monic.irreducible_iff_natDegree`.
-/
theorem Monic.irreducible_iff_degree_lt {p : R[X]} (p_monic : Monic p) (p_1 : p ≠ 1) :
    Irreducible p ↔ ∀ q, degree q ≤ ↑(p.natDegree / 2) → q ∣ p → IsUnit q

{R : Type u}
[CommRing R]
[IsDomain R]
{p : Polynomial R}
(p_monic : p.Monic)
(p_1 : p ≠ 1)

Irreducible p ↔ ∀ (q : Polynomial R), q.degree ≤ ↑(p.natDegree / 2) → q ∣ p → IsUnit q


@[simp]
-- Porting note: Added a type to `↑f`.
theorem liftMonoid_symm_coe (f : FreeAbelianGroup α →+* R) :
    ⇑(liftMonoid.symm f) = lift.symm (↑f : FreeAbelianGroup α →+ R)

{α : Type u}
{R : Type u_1}
[Monoid α]
[Ring R]
(f : FreeAbelianGroup α →+* R)

⇑(FreeAbelianGroup.liftMonoid.symm f) = FreeAbelianGroup.lift.symm ↑f


protected theorem const (y : Y) : IsLocallyConstant (Function.const X y)

{X : Type u_1}
{Y : Type u_2}
[TopologicalSpace X]
(y : Y)


@[to_additive]
theorem ContinuousInv.induced {α : Type*} {β : Type*} {F : Type*} [FunLike F α β] [Group α]
    [Group β] [MonoidHomClass F α β] [tβ : TopologicalSpace β] [ContinuousInv β] (f : F) :
    @ContinuousInv α (tβ.induced f) _

{α : Type u_1}
{β : Type u_2}
{F : Type u_3}
[FunLike F α β]
[AddGroup α]
[AddGroup β]
[AddMonoidHomClass F α β]
[tβ : TopologicalSpace β]
[ContinuousNeg β]
(f : F)


@[simp]
theorem mul_nonsing_inv_cancel_right (B : Matrix m n α) (h : IsUnit A.det) : B * A * A⁻¹ = B

{m : Type u}
{n : Type u'}
{α : Type v}
[Fintype n]
[DecidableEq n]
[CommRing α]
(A : Matrix n n α)
(B : Matrix m n α)
(h : IsUnit A.det)


theorem eval₂_primPart_eq_zero {S : Type*} [CommRing S] [IsDomain S] {f : R →+* S}
    (hinj : Function.Injective f) {p : R[X]} {s : S} (hpzero : p ≠ 0) (hp : eval₂ f s p = 0) :
    eval₂ f s p.primPart = 0

{R : Type u_1}
[CommRing R]
[IsDomain R]
[NormalizedGCDMonoid R]
{S : Type u_2}
[CommRing S]
[IsDomain S]
{f : R →+* S}
(hinj : Function.Injective ⇑f)
{p : Polynomial R}
{s : S}
(hpzero : p ≠ 0)
(hp : Polynomial.eval₂ f s p = 0)


@[simp]
theorem isUpperSet_compl : IsUpperSet sᶜ ↔ IsLowerSet s


theorem AEFinStronglyMeasurable.ae_eq_zero_of_forall_setIntegral_eq_zero {f : α → E}
    (hf_int_finite : ∀ s, MeasurableSet s → μ s < ∞ → IntegrableOn f s μ)
    (hf_zero : ∀ s : Set α, MeasurableSet s → μ s < ∞ → ∫ x in s, f x ∂μ = 0)
    (hf : AEFinStronglyMeasurable f μ) : f =ᵐ[μ] 0

(hf_int_finite : ∀ (s : Set α), MeasurableSet s → μ s < ⊤ → MeasureTheory.IntegrableOn f s μ)

(hf_zero : ∀ (s : Set α), MeasurableSet s → μ s < ⊤ → ∫ (x : α) in s, f x ∂μ = 0)

(hf : MeasureTheory.AEFinStronglyMeasurable f μ)


theorem toIocDiv_neg (a b : α) : toIocDiv hp a (-b) = -(toIcoDiv hp (-a) b + 1)

{α : Type u_1}
[LinearOrderedAddCommGroup α]
[hα : Archimedean α]
{p : α}
(hp : 0 < p)
(a b : α)


theorem relatively_discrete_of_finite [Finite s] :
    ∃ C > 0, ∀ x ∈ s, ∀ y ∈ s, x ≠ y → C ≤ edist x y

{α : Type u_1}
[EMetricSpace α]
{s : Set α}
[Finite ↑s]


lemma spectrum_subset_quasispectrum (R : Type*) {A : Type*} [CommSemiring R] [Ring A] [Algebra R A]
    (a : A) : spectrum R a ⊆ quasispectrum R a

(R : Type u_3)
{A : Type u_4}
[CommSemiring R]
[Ring A]
[Algebra R A]
(a : A)


@[simp]
lemma dist_prod_same_left {x : α} {y₁ y₂ : β} : dist (x, y₁) (x, y₂) = dist y₁ y₂

{α : Type u_1}
{β : Type u_2}
[PseudoMetricSpace α]
[PseudoMetricSpace β]
{x : α}
{y₁ y₂ : β}


@[reassoc]
theorem lift_base : lift f fs w ≫ base arrows = f

[CategoryTheory.Limits.HasWidePullback B objs arrows]

CategoryTheory.Limits.WidePullback.lift f fs w ≫ CategoryTheory.Limits.WidePullback.base arrows = f


/-- The definition of the "one" in the colimit is independent of the chosen object of `J`.
In particular, this lemma allows us to "unfold" the definition of `colimit_one` at a custom chosen
object `j`.
-/
@[to_additive
      "The definition of the \"zero\" in the colimit is independent of the chosen object
      of `J`. In particular, this lemma allows us to \"unfold\" the definition of `colimit_zero` at
      a custom chosen object `j`."]
theorem colimit_one_eq (j : J) : (1 : M.{v, u} F) = M.mk F ⟨j, 1⟩

{J : Type v}
[CategoryTheory.SmallCategory J]
(F : J ⥤ AddMonCatMax)
[CategoryTheory.IsFiltered J]
(j : J)

0 = AddMonCat.FilteredColimits.M.mk F ⟨j, 0⟩


theorem viaEmbedding_apply (x : α) : e.viaEmbedding ι (ι x) = ι (e x)

{α : Type u_1}
{β : Type u_2}
(e : Equiv.Perm α)
(ι : α ↪ β)
(x : α)


theorem _root_.IsMin.Iic_eq (h : IsMin a) : Iic a = {a}

{α : Type u_1}
[PartialOrder α]
{a : α}
(h : IsMin a)


@[simp]
theorem lift_lt_ofNat_iff {a : Cardinal.{u}} {n : ℕ} [n.AtLeastTwo] :
    lift.{v} a < (no_index (OfNat.ofNat n)) ↔ a < OfNat.ofNat n

Cardinal.lift.{v, u} a < OfNat.ofNat n ↔ a < OfNat.ofNat n


lemma comp_tendsto {lb : Filter β} {g : β → γ} (hg : EventuallyConst g lb)
    (hf : Tendsto f l lb) : EventuallyConst (g ∘ f) l

{α : Type u_1}
{β : Type u_2}
{γ : Type u_3}
{l : Filter α}
{f : α → β}
{lb : Filter β}
{g : β → γ}
(hg : Filter.EventuallyConst g lb)
(hf : Filter.Tendsto f l lb)


@[to_additive (attr := ext)]
lemma ext {X Y : MonCat} {f g : X ⟶ Y} (w : ∀ x : X, f x = g x) : f = g

{X Y : AddMonCat}
{f g : X ⟶ Y}
(w : ∀ (x : ↑X), f x = g x)


theorem ssubset_iff : s ⊂ t ↔ ∃ a ∉ s, insert a s ⊆ t

{α : Type u_1}
[DecidableEq α]
{s t : Finset α}


/-- Given an exact short complex `S` and a colimit cokernel cofork `cc` for `S.f`, this is the
right homology data for `S` with `Q := cc.pt` and `H := 0`. -/
@[simps]
noncomputable def Exact.rightHomologyDataOfIsColimitCokernelCofork
    (hS : S.Exact) [HasZeroObject C] (cc : CokernelCofork S.f) (hcc : IsColimit cc) :
    S.RightHomologyData

(cc : CategoryTheory.Limits.CokernelCofork S.f)

(hcc : CategoryTheory.Limits.IsColimit cc)

(hS.rightHomologyDataOfIsColimitCokernelCofork cc hcc).p = CategoryTheory.Limits.Cofork.π cc


theorem primeFactorsList_sorted (n : ℕ) : List.Sorted (· ≤ ·) (primeFactorsList n)

List.Sorted (fun x x_1 => x ≤ x_1) n.primeFactorsList


theorem closedBall_inv_subset_polar_closedBall {r : ℝ} :
    closedBall (0 : Dual 𝕜 E) r⁻¹ ⊆ polar 𝕜 (closedBall (0 : E) r)

(𝕜 : Type u_1)
[NontriviallyNormedField 𝕜]
{E : Type u_2}
[SeminormedAddCommGroup E]
[NormedSpace 𝕜 E]
{r : ℝ}

Metric.closedBall 0 r⁻¹ ⊆ NormedSpace.polar 𝕜 (Metric.closedBall 0 r)


/-- The vertex group at `c`. -/
@[simps mul one inv]
instance vertexGroup (c : C) : Group (c ⟶ c)

{C : Type u}
[CategoryTheory.Groupoid C]
(c : C)

∀ (a : c ⟶ c), a⁻¹ = CategoryTheory.Groupoid.inv a


theorem star_def [Star R] [Star S] (x : R × S) : star x = (star x.1, star x.2)

{R : Type u}
{S : Type v}
[Star R]
[Star S]
(x : R × S)


/--
The Frattini subgroup consists of "non-generating" elements in the following sense:

If a subgroup together with the Frattini subgroup generates the whole group,
then the subgroup is already the whole group.
-/
theorem frattini_nongenerating [IsCoatomic (Subgroup G)] {K : Subgroup G}
    (h : K ⊔ frattini G = ⊤) : K = ⊤

{G : Type u_1}
[Group G]
[IsCoatomic (Subgroup G)]
{K : Subgroup G}
(h : K ⊔ frattini G = ⊤)


@[simp]
theorem blockDiagonal_inj [DecidableEq o] {M N : o → Matrix m n α} :
    blockDiagonal M = blockDiagonal N ↔ M = N

{m : Type u_2}
{n : Type u_3}
{o : Type u_4}
{α : Type u_12}
[Zero α]
[DecidableEq o]
{M N : o → Matrix m n α}

Matrix.blockDiagonal M = Matrix.blockDiagonal N ↔ M = N


theorem card_le_of_surjective [Finite α] (f : α → β) (hf : Function.Surjective f) :
    Nat.card β ≤ Nat.card α

{α : Type u_1}
{β : Type u_2}
[Finite α]
(f : α → β)
(hf : Function.Surjective f)


theorem HasDerivWithinAt.arctan (hf : HasDerivWithinAt f f' s x) :
    HasDerivWithinAt (fun x => arctan (f x)) (1 / (1 + f x ^ 2) * f') s x

{f : ℝ → ℝ}
{f' x : ℝ}
{s : Set ℝ}
(hf : HasDerivWithinAt f f' s x)

HasDerivWithinAt (fun x => Real.arctan (f x)) (1 / (1 + f x ^ 2) * f') s x


@[to_additive]
lemma prod_mulIndicator_eq_prod_inter [DecidableEq ι] (s t : Finset ι) (f : ι → β) :
    ∏ i ∈ s, (t : Set ι).mulIndicator f i = ∏ i ∈ s ∩ t, f i

{ι : Type u_1}
{β : Type u_4}
[CommMonoid β]
[DecidableEq ι]
(s t : Finset ι)
(f : ι → β)

∏ i ∈ s, (↑t).mulIndicator f i = ∏ i ∈ s ∩ t, f i


@[norm_cast]
theorem coe_list_prod (l : List ℚ≥0) : (l.prod : ℚ) = (l.map (↑)).prod


@[to_additive]
theorem Filter.Tendsto.const_smul {f : β → α} {l : Filter β} {a : α} (hf : Tendsto f l (𝓝 a))
    (c : M) : Tendsto (fun x => c • f x) l (𝓝 (c • a))

{M : Type u_1}
{α : Type u_2}
{β : Type u_3}
[TopologicalSpace α]
[SMul M α]
[ContinuousConstSMul M α]
{f : β → α}
{l : Filter β}
{a : α}
(hf : Filter.Tendsto f l (𝓝 a))
(c : M)

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


@[simp]
theorem lcm_ndunion (s₁ s₂ : Multiset α) : (ndunion s₁ s₂).lcm = GCDMonoid.lcm s₁.lcm s₂.lcm

{α : Type u_1}
[CancelCommMonoidWithZero α]
[NormalizedGCDMonoid α]
[DecidableEq α]
(s₁ s₂ : Multiset α)


@[simp]
theorem empty_disjUnion (t : Finset α) (h : Disjoint ∅ t := disjoint_bot_left) :
    disjUnion ∅ t h = t

{α : Type u_1}
(t : Finset α)
(h : Disjoint ∅ t := ⋯)


/-- If `μ` is inner regular for measurable finite measure sets with respect to some class of sets,
then its restriction to any set is also inner regular for measurable finite measure sets, with
respect to the same class of sets. -/
lemma restrict (h : InnerRegularWRT μ p (fun s ↦ MeasurableSet s ∧ μ s ≠ ∞)) (A : Set α) :
    InnerRegularWRT (μ.restrict A) p (fun s ↦ MeasurableSet s ∧ μ.restrict A s ≠ ∞)

(h : μ.InnerRegularWRT p fun s => MeasurableSet s ∧ μ s ≠ ⊤)

(μ.restrict A).InnerRegularWRT p fun s => MeasurableSet s ∧ (μ.restrict A) s ≠ ⊤


/-- The map `(x, y) ↦ (y, yx)` sends the measure `μ × ν` to `ν × μ`.
This is the map `SR` in [Halmos, §59].
`S` is the map `(x, y) ↦ (x, xy)` and `R` is `Prod.swap`. -/
@[to_additive measurePreserving_prod_add_swap
" The map `(x, y) ↦ (y, y + x)` sends the measure `μ × ν` to `ν × μ`. "]
theorem measurePreserving_prod_mul_swap [IsMulLeftInvariant μ] :
    MeasurePreserving (fun z : G × G => (z.2, z.2 * z.1)) (μ.prod ν) (ν.prod μ)

{G : Type u_1}
[MeasurableSpace G]
[AddGroup G]
[MeasurableAdd₂ G]
(μ ν : MeasureTheory.Measure G)
[MeasureTheory.SFinite ν]
[MeasureTheory.SFinite μ]
[μ.IsAddLeftInvariant]

MeasureTheory.MeasurePreserving (fun z => (z.2, z.2 + z.1)) (μ.prod ν) (ν.prod μ)


protected theorem summable_inner_mul_inner (b : HilbertBasis ι 𝕜 E) (x y : E) :
    Summable fun i => ⟪x, b i⟫ * ⟪b i, y⟫

{ι : Type u_1}
{𝕜 : Type u_2}
[RCLike 𝕜]
{E : Type u_3}
[NormedAddCommGroup E]
[InnerProductSpace 𝕜 E]
(b : HilbertBasis ι 𝕜 E)
(x y : E)

Summable fun i => ⟪x, (fun i => b.repr.symm (lp.single 2 i 1)) i⟫_𝕜 * ⟪(fun i => b.repr.symm (lp.single 2 i 1)) i, y⟫_𝕜


@[simp]
theorem map_coe (γ : Path x y) {f : X → Y} (h : Continuous f) :
    (γ.map h : I → Y) = f ∘ γ

{X : Type u_1}
{Y : Type u_2}
[TopologicalSpace X]
[TopologicalSpace Y]
{x y : X}
(γ : Path x y)
{f : X → Y}
(h : Continuous f)


/-- The subalgebra of `C(AddCircle T, ℂ)` generated by `fourier n` for `n ∈ ℤ`
separates points. -/
theorem fourierSubalgebra_separatesPoints : (@fourierSubalgebra T).SeparatesPoints


@[to_additive (attr := simp)]
theorem liftOfRightInverse_comp (hf : Function.RightInverse f_inv f)
    (g : { g : G₁ →* G₃ // f.ker ≤ g.ker }) : (f.liftOfRightInverse f_inv hf g).comp f = g

{G₁ : Type u_5}
{G₂ : Type u_6}
{G₃ : Type u_7}
[AddGroup G₁]
[AddGroup G₂]
[AddGroup G₃]
(f : G₁ →+ G₂)
(f_inv : G₂ → G₁)
(hf : Function.RightInverse f_inv ⇑f)
(g : { g // f.ker ≤ g.ker })

((f.liftOfRightInverse f_inv hf) g).comp f = ↑g


theorem shiftLeft_sub (m : ℤ) (n : ℕ) (k : ℤ) : m <<< (n - k) = (m <<< (n : ℤ)) >>> k


/-- Identity map is a relation homomorphism. -/
@[refl, simps]
protected def id (r : α → α → Prop) : r →r r

{α : Type u_1}
(r : α → α → Prop)
(x : α)


theorem map_add (v w : VectorMeasure α M) (f : α → β) : (v + w).map f = v.map f + w.map f

{α : Type u_1}
{β : Type u_2}
[MeasurableSpace α]
[MeasurableSpace β]
{M : Type u_3}
[AddCommMonoid M]
[TopologicalSpace M]
[ContinuousAdd M]
(v w : MeasureTheory.VectorMeasure α M)
(f : α → β)


/-- A topological space `X` is a *perfectly normal space* provided it is normal and
closed sets are Gδ. -/
class PerfectlyNormalSpace (X : Type u) [TopologicalSpace X] extends NormalSpace X : Prop where
    closed_gdelta : ∀ ⦃h : Set X⦄, IsClosed h → IsGδ h

{X : Type u}
[TopologicalSpace X]
[self : PerfectlyNormalSpace X]
⦃h : Set X⦄


theorem linearization_map_hom_single (x : X.V) (r : k) :
    ((linearization k G).map f).hom (Finsupp.single x r) = Finsupp.single (f.hom x) r

{k G : Type u}
[CommRing k]
[Monoid G]
{X Y : Action (Type u) (MonCat.of G)}
(f : X ⟶ Y)
(x : X.V)
(r : k)

((Rep.linearization k G).map f).hom (Finsupp.single x r) = Finsupp.single (f.hom x) r


lemma isNilpotent.restrict {R M : Type*} [Semiring R] [AddCommMonoid M] [Module R M]
    {f : M →ₗ[R] M} {p : Submodule R M} (hf : MapsTo f p p) (hnil : IsNilpotent f) :
    IsNilpotent (f.restrict hf)

{R : Type u_3}
{M : Type u_4}
[Semiring R]
[AddCommMonoid M]
[Module R M]
{f : M →ₗ[R] M}
{p : Submodule R M}
(hf : Set.MapsTo ⇑f ↑p ↑p)
(hnil : IsNilpotent f)


@[simp]
lemma localization_counit_app (X₂ : C₂) :
    (adj.localization L₁ W₁ L₂ W₂ G' F').counit.app (L₂.obj X₂) =
    G'.map ((CatCommSq.iso F L₂ L₁ F').inv.app X₂) ≫
      (CatCommSq.iso G L₁ L₂ G').inv.app (F.obj X₂) ≫
      L₂.map (adj.counit.app X₂)

(W₁ : CategoryTheory.MorphismProperty C₁)

(W₂ : CategoryTheory.MorphismProperty C₂)

(adj.localization L₁ W₁ L₂ W₂ G' F').counit.app (L₂.obj X₂) =
  CategoryTheory.CategoryStruct.comp (G'.map ((CategoryTheory.CatCommSq.iso F L₂ L₁ F').inv.app X₂))
    (CategoryTheory.CategoryStruct.comp ((CategoryTheory.CatCommSq.iso G L₁ L₂ G').inv.app (F.obj X₂))
      (L₂.map (adj.counit.app X₂)))


theorem lt_rootMultiplicity_of_isRoot_iterate_derivative
    [CharZero R] {p : R[X]} {t : R} {n : ℕ} (h : p ≠ 0)
    (hroot : ∀ m ≤ n, (derivative^[m] p).IsRoot t) :
    n < p.rootMultiplicity t

(hroot : ∀ m ≤ n, ((⇑Polynomial.derivative)^[m] p).IsRoot t)


/-- For vectors `a x y : E`, the identity `⟪a, x⟫ * ⟪a, y⟫ + ω a x * ω a y = ‖a‖ ^ 2 * ⟪x, y⟫`. (See
`Orientation.inner_mul_inner_add_areaForm_mul_areaForm` for the "applied" form.)-/
theorem inner_mul_inner_add_areaForm_mul_areaForm' (a x : E) :
    ⟪a, x⟫ • innerₛₗ ℝ a + ω a x • ω a = ‖a‖ ^ 2 • innerₛₗ ℝ x

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

⟪a, x⟫_ℝ • (innerₛₗ ℝ) a + (o.areaForm a) x • o.areaForm a = ‖a‖ ^ 2 • (innerₛₗ ℝ) x


/-- If a function `f` is continuous on `ℝ`, and `f''` is strictly negative on `ℝ`,
then `f` is strictly concave on `ℝ`.
Note that we don't require twice differentiability explicitly as it is already implied by the second
derivative being strictly negative, except at at most one point. -/
theorem strictConcaveOn_univ_of_deriv2_neg {f : ℝ → ℝ} (hf : Continuous f)
    (hf'' : ∀ x, deriv^[2] f x < 0) : StrictConcaveOn ℝ univ f

{f : ℝ → ℝ}
(hf : Continuous f)
(hf'' : ∀ (x : ℝ), deriv^[2] f x < 0)


private theorem le_sInf' {S : Set (Submodule R M)} {p} : (∀ q ∈ S, p ≤ q) → p ≤ sInf S

{R : Type u_1}
{M : Type u_3}
[Semiring R]
[AddCommMonoid M]
[Module R M]
{S : Set (Submodule R M)}
{p : Submodule R M}


theorem degree_intCast_le (n : ℤ) : degree (n : R[X]) ≤ 0


theorem dvd_lcm {s : Multiset α} {a : α} (h : a ∈ s) : a ∣ s.lcm

{α : Type u_1}
[CancelCommMonoidWithZero α]
[NormalizedGCDMonoid α]
{s : Multiset α}
{a : α}
(h : a ∈ s)


@[to_additive (attr := simp)]
theorem neBot_inv_iff : f⁻¹.NeBot ↔ NeBot f


@[simp] lemma sdiff_singleton (s : UpperSet α) (a : α) : s.sdiff {a} = s.erase a

{α : Type u_1}
[Preorder α]
(s : UpperSet α)
(a : α)


/-- Auxiliary definition for `unopEquivalence`. -/
@[simps]
def unopFunctor : (HomologicalComplex Vᵒᵖ c)ᵒᵖ ⥤ HomologicalComplex V c.symm

(HomologicalComplex.unopFunctor V c).obj X = (Opposite.unop X).unop


/-- Compatibility of `nullHomotopicMap'` with the postcomposition by a morphism
of complexes. -/
theorem nullHomotopicMap'_comp (hom : ∀ i j, c.Rel j i → (C.X i ⟶ D.X j)) (g : D ⟶ E) :
    nullHomotopicMap' hom ≫ g = nullHomotopicMap' fun i j hij => hom i j hij ≫ g.f j

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

Homotopy.nullHomotopicMap' hom ≫ g = Homotopy.nullHomotopicMap' fun i j hij => hom i j hij ≫ g.f j


theorem aestronglyMeasurable_coeFn (f : α →₁[μ] β) : AEStronglyMeasurable f μ

{α : Type u_1}
{β : Type u_2}
{m : MeasurableSpace α}
{μ : MeasureTheory.Measure α}
[NormedAddCommGroup β]
(f : ↥(MeasureTheory.Lp β 1 μ))


/-- A Borel-measurable set in a Polish space is analytic. -/
theorem _root_.MeasurableSet.analyticSet {α : Type*} [t : TopologicalSpace α] [PolishSpace α]
    [MeasurableSpace α] [BorelSpace α] {s : Set α} (hs : MeasurableSet s) : AnalyticSet s

{α : Type u_3}
[t : TopologicalSpace α]
[PolishSpace α]
[MeasurableSpace α]
[BorelSpace α]
{s : Set α}
(hs : MeasurableSet s)


/-- Two bilinear forms are equal when they are equal on all basis vectors. -/
theorem ext_basis (h : ∀ i j, B (b i) (b j) = F₂ (b i) (b j)) : B = F₂


theorem iterate_pred_toZ (i : ι) (hi : i < i0) : pred^[(-toZ i0 i).toNat] i0 = i

{ι : Type u_1}
[LinearOrder ι]
[SuccOrder ι]
[IsSuccArchimedean ι]
[PredOrder ι]
{i0 : ι}
(i : ι)
(hi : i < i0)


@[simp]
theorem div_self_mul_self' (a : G₀) : a / (a * a) = a⁻¹

{G₀ : Type u_3}
[GroupWithZero G₀]
(a : G₀)


/-- Given an embedding `f : α ↪ β` and a point outside of `Set.range f`, construct an embedding
`Option α ↪ β`. -/
@[simps]
def optionElim {α β} (f : α ↪ β) (x : β) (h : x ∉ Set.range f) : Option α ↪ β

{α : Type u_1}
{β : Type u_2}
(f : α ↪ β)
(x : β)
(h : x ∉ Set.range ⇑f)

∀ (a : Option α), (f.optionElim x h) a = Option.elim' x (⇑f) a


theorem ae_eq_zero_of_lintegral_rpow_eq_zero {p : ℝ} (hp0 : 0 ≤ p) {f : α → ℝ≥0∞}
    (hf : AEMeasurable f μ) (hf_zero : ∫⁻ a, f a ^ p ∂μ = 0) : f =ᵐ[μ] 0

{α : Type u_1}
[MeasurableSpace α]
{μ : MeasureTheory.Measure α}
{p : ℝ}
(hp0 : 0 ≤ p)
{f : α → ENNReal}
(hf : AEMeasurable f μ)
(hf_zero : ∫⁻ (a : α), f a ^ p ∂μ = 0)


/-- A language equivalence maps the symbols of one language to symbols of another bijectively. -/
structure LEquiv (L L' : Language) where
  toLHom : L →ᴸ L'
  invLHom : L' →ᴸ L
  left_inv : invLHom.comp toLHom = LHom.id L
  right_inv : toLHom.comp invLHom = LHom.id L'

{L : FirstOrder.Language}
{L' : FirstOrder.Language}
(self : L ≃ᴸ L')

self.toLHom.comp self.invLHom = FirstOrder.Language.LHom.id L'


theorem tendsto_iff_tendstoUniformlyOn {ι : Type*} {p : Filter ι} [UniformSpace F]
    [UniformAddGroup F] (𝔖 : Set (Set E)) {a : ι → UniformConvergenceCLM σ F 𝔖}
    {a₀ : UniformConvergenceCLM σ F 𝔖} :
    Filter.Tendsto a p (𝓝 a₀) ↔ ∀ s ∈ 𝔖, TendstoUniformlyOn (a · ·) a₀ p s

{𝕜₁ : Type u_1}
{𝕜₂ : Type u_2}
[NormedField 𝕜₁]
[NormedField 𝕜₂]
(σ : 𝕜₁ →+* 𝕜₂)
{E : Type u_3}
(F : Type u_4)
[AddCommGroup E]
[Module 𝕜₁ E]
[TopologicalSpace E]
[AddCommGroup F]
[Module 𝕜₂ F]
{ι : Type u_5}
{p : Filter ι}
[UniformSpace F]
[UniformAddGroup F]
(𝔖 : Set (Set E))
{a : ι → UniformConvergenceCLM σ F 𝔖}
{a₀ : UniformConvergenceCLM σ F 𝔖}

Filter.Tendsto a p (𝓝 a₀) ↔ ∀ s ∈ 𝔖, TendstoUniformlyOn (fun x x_1 => (a x) x_1) (⇑a₀) p s


@[simp]
theorem one_add_self_mul_kstar_eq_kstar (l : Language α) : 1 + l * l∗ = l∗


@[reassoc, simp]
theorem associator_conjugation {X X' Y Y' Z Z' : C} (f : X ⟶ X') (g : Y ⟶ Y') (h : Z ⟶ Z') :
    (f ⊗ g) ⊗ h = (α_ X Y Z).hom ≫ (f ⊗ g ⊗ h) ≫ (α_ X' Y' Z').inv

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

CategoryTheory.MonoidalCategory.tensorHom (CategoryTheory.MonoidalCategory.tensorHom f g) h =
  CategoryTheory.CategoryStruct.comp (CategoryTheory.MonoidalCategory.associator X Y Z).hom
    (CategoryTheory.CategoryStruct.comp
      (CategoryTheory.MonoidalCategory.tensorHom f (CategoryTheory.MonoidalCategory.tensorHom g h))
      (CategoryTheory.MonoidalCategory.associator X' Y' Z').inv)


@[aesop safe apply]
lemma differentiableAt_one_add_smoothingFn {x : ℝ} (hx : 1 < x) :
    DifferentiableAt ℝ (fun z => 1 + ε z) x

DifferentiableAt ℝ (fun z => 1 + AkraBazziRecurrence.smoothingFn z) x


@[simp]
theorem untrop_inv [Neg R] (x : Tropical R) : untrop x⁻¹ = -untrop x

Tropical.untrop x⁻¹ = -Tropical.untrop x


theorem sin_pi_div_two_sub (x : ℝ) : sin (π / 2 - x) = cos x


@[to_additive]
lemma map_comp_mul_inv [Group G] [DivisionMonoid H] [MonoidHomClass F G H] (f : F) (g h : ι → G) :
    f ∘ (g * h⁻¹) = f ∘ g * (f ∘ h)⁻¹

{ι : Type u_1}
{G : Type u_7}
{H : Type u_8}
{F : Type u_9}
[FunLike F G H]
[Group G]
[DivisionMonoid H]
[MonoidHomClass F G H]
(f : F)
(g h : ι → G)


protected theorem star_inv [Group α] [StarMul α] (s : Set α) : s⁻¹⋆ = s⋆⁻¹

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


@[to_additive]
theorem characteristic_iff_map_le : H.Characteristic ↔ ∀ ϕ : G ≃* G, H.map ϕ.toMonoidHom ≤ H

{G : Type u_1}
[AddGroup G]
{H : AddSubgroup G}

H.Characteristic ↔ ∀ (ϕ : G ≃+ G), AddSubgroup.map ϕ.toAddMonoidHom H ≤ H


theorem ofFunction_caratheodory {m : Set α → ℝ≥0∞} {s : Set α} {h₀ : m ∅ = 0}
    (hs : ∀ t, m (t ∩ s) + m (t \ s) ≤ m t) :
    MeasurableSet[(OuterMeasure.ofFunction m h₀).caratheodory] s

(hs : ∀ (t : Set α), m (t ∩ s) + m (t \ s) ≤ m t)


lemma setLIntegral_stieltjesOfMeasurableRat_rat [IsFiniteKernel κ] (hf : IsRatCondKernelCDF f κ ν)
    (a : α) (q : ℚ) {s : Set β} (hs : MeasurableSet s) :
    ∫⁻ b in s, ENNReal.ofReal (stieltjesOfMeasurableRat f hf.measurable (a, b) q) ∂(ν a)
      = κ a (s ×ˢ Iic (q : ℝ))

{κ : ProbabilityTheory.Kernel α (β × ℝ)}

{f : α × β → ℚ → ℝ}

(hf : ProbabilityTheory.IsRatCondKernelCDF f κ ν)

∫⁻ (b : β) in s, ENNReal.ofReal (↑(ProbabilityTheory.stieltjesOfMeasurableRat f ⋯ (a, b)) ↑q) ∂ν a =
  (κ a) (s ×ˢ Set.Iic ↑q)


theorem iteratedFDerivWithin_univ {n : ℕ} :
    iteratedFDerivWithin 𝕜 n f univ = iteratedFDeriv 𝕜 n f

{𝕜 : Type u}
[NontriviallyNormedField 𝕜]
{E : Type uE}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{F : Type uF}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{f : E → F}
{n : ℕ}

iteratedFDerivWithin 𝕜 n f Set.univ = iteratedFDeriv 𝕜 n f


theorem toTrivSqZeroExt_comp_map [Module Rᵐᵒᵖ M] [IsCentralScalar R M] [Module Rᵐᵒᵖ N]
    [IsCentralScalar R N] (f : M →ₗ[R] N) :
    toTrivSqZeroExt.comp (map f) = (TrivSqZeroExt.map f).comp toTrivSqZeroExt

{R : Type u1}
[CommRing R]
{M : Type u2}
[AddCommGroup M]
[Module R M]
{N : Type u4}
[AddCommGroup N]
[Module R N]
[Module Rᵐᵒᵖ M]
[IsCentralScalar R M]
[Module Rᵐᵒᵖ N]
[IsCentralScalar R N]
(f : M →ₗ[R] N)

ExteriorAlgebra.toTrivSqZeroExt.comp (ExteriorAlgebra.map f) =
  (TrivSqZeroExt.map f).comp ExteriorAlgebra.toTrivSqZeroExt


theorem continuousAt_const_rpow' {a b : ℝ} (h : b ≠ 0) : ContinuousAt (a ^ ·) b


@[simp]
theorem associator_hom_app {F G H : C ⥤ D} {X} :
    ((α_ F G H).hom : (F ⊗ G) ⊗ H ⟶ F ⊗ G ⊗ H).app X = (α_ (F.obj X) (G.obj X) (H.obj X)).hom

{C : Type u₁}
[CategoryTheory.Category.{v₁, u₁} C]
{D : Type u₂}
[CategoryTheory.Category.{v₂, u₂} D]
[CategoryTheory.MonoidalCategory D]
{F G H : C ⥤ D}
{X : C}

(α_ F G H).hom.app X = (α_ (F.obj X) (G.obj X) (H.obj X)).hom


@[to_additive (attr := simp)]
theorem uncurry_one [∀ a b, One (γ a b)] : Sigma.uncurry (1 : ∀ a b, γ a b) = 1

{α : Type u_3}
{β : α → Type u_4}
{γ : (a : α) → β a → Type u_5}
[(a : α) → (b : β a) → One (γ a b)]


@[simp]
theorem coe_erase [DecidableEq α] {s : Sym α n.succ} {a : α} (h : a ∈ s) :
    (s.erase a h : Multiset α) = Multiset.erase s a

{α : Type u_1}
{n : ℕ}
[DecidableEq α]
{s : Sym α n.succ}
{a : α}
(h : a ∈ s)


theorem liftFun_iff_succ {α : Type*} (r : α → α → Prop) [IsTrans α r] {f : Fin (n + 1) → α} :
    ((· < ·) ⇒ r) f f ↔ ∀ i : Fin n, r (f (castSucc i)) (f i.succ)

{n : ℕ}
{α : Type u_1}
(r : α → α → Prop)
[IsTrans α r]
{f : Fin (n + 1) → α}

((fun x x_1 => x < x_1) ⇒ r) f f ↔ ∀ (i : Fin n), r (f i.castSucc) (f i.succ)


@[simp]
theorem equivCongrLeft_symm (f : α ≃ β) :
    (@equivCongrLeft _ _ M _ f).symm = equivCongrLeft f.symm

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

(Finsupp.equivCongrLeft f).symm = Finsupp.equivCongrLeft f.symm


theorem toEven_ι (m : M) : (toEven Q (ι Q m) : CliffordAlgebra (Q' Q)) = e0 Q * v Q m

{R : Type u_1}
{M : Type u_2}
[CommRing R]
[AddCommGroup M]
[Module R M]
(Q : QuadraticForm R M)
(m : M)

↑((CliffordAlgebra.toEven Q) ((CliffordAlgebra.ι Q) m)) =
  CliffordAlgebra.EquivEven.e0 Q * (CliffordAlgebra.EquivEven.v Q) m


lemma map_Φ (n : ℤ) : (W.map f).Φ n = (W.Φ n).map f

{R : Type r}
{S : Type s}
[CommRing R]
[CommRing S]
(W : WeierstrassCurve R)
(f : R →+* S)
(n : ℤ)

(W.map f).Φ n = Polynomial.map f (W.Φ n)


theorem isLeftAdjoint_iff_hasTerminal_costructuredArrow {F : C ⥤ D} :
    F.IsLeftAdjoint ↔ ∀ A, HasTerminal (CostructuredArrow F A)

{C : Type u₁}
{D : Type u₂}
[CategoryTheory.Category.{v₁, u₁} C]
[CategoryTheory.Category.{v₂, u₂} D]
{F : CategoryTheory.Functor C D}

F.IsLeftAdjoint ↔ ∀ (A : D), CategoryTheory.Limits.HasTerminal (CategoryTheory.CostructuredArrow F A)


theorem fract_neg {x : α} (hx : fract x ≠ 0) : fract (-x) = 1 - fract x

{α : Type u_2}
[LinearOrderedRing α]
[FloorRing α]
{x : α}
(hx : Int.fract x ≠ 0)


/-- Directional derivative agrees with `HasFDeriv`. -/
theorem HasFDerivAt.lim (hf : HasFDerivAt f f' x) (v : E) {α : Type*} {c : α → 𝕜} {l : Filter α}
    (hc : Tendsto (fun n => ‖c n‖) l atTop) :
    Tendsto (fun n => c n • (f (x + (c n)⁻¹ • v) - f x)) l (𝓝 (f' v))

(hc : Filter.Tendsto (fun n => ‖c n‖) l Filter.atTop)

Filter.Tendsto (fun n => c n • (f (x + (c n)⁻¹ • v) - f x)) l (𝓝 (f' v))


theorem not_summable_of_ratio_test_tendsto_gt_one {α : Type*} [SeminormedAddCommGroup α]
    {f : ℕ → α} {l : ℝ} (hl : 1 < l) (h : Tendsto (fun n ↦ ‖f (n + 1)‖ / ‖f n‖) atTop (𝓝 l)) :
    ¬Summable f

(h : Filter.Tendsto (fun n => ‖f (n + 1)‖ / ‖f n‖) Filter.atTop (𝓝 l))


@[simp, norm_cast]
theorem coe_max : ↑(max a b) = (max a b : ℕ)


/-- Same as limsup_const applied to `⊤` but without the `NeBot f` assumption -/
@[simp]
theorem liminf_const_top {f : Filter β} : liminf (fun _ : β => (⊤ : α)) f = (⊤ : α)

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


@[to_additive sum_eq_zero_iff_of_nonpos]
theorem prod_eq_one_iff_of_le_one' :
    (∀ i ∈ s, f i ≤ 1) → ((∏ i ∈ s, f i) = 1 ↔ ∀ i ∈ s, f i = 1)

{ι : Type u_1}
{N : Type u_5}
[OrderedCommMonoid N]
{f : ι → N}
{s : Finset ι}

(∀ i ∈ s, f i ≤ 1) → (∏ i ∈ s, f i = 1 ↔ ∀ i ∈ s, f i = 1)


/-- If `S` is order-connected and contains two points `x < y`, then `S` is a right neighbourhood
of `x`. -/
lemma mem_nhdsWithin_Ici [NoMaxOrder α] {S : Set α} (hS : OrdConnected S)
    {x y : α} (hx : x ∈ S) (hy : y ∈ S) (hxy : x < y) :
    S ∈ 𝓝[≥] x

{α : Type u_1}
[TopologicalSpace α]
[LinearOrder α]
[OrderTopology α]
[DenselyOrdered α]
[NoMaxOrder α]
{S : Set α}
(hS : S.OrdConnected)
{x y : α}
(hx : x ∈ S)
(hy : y ∈ S)
(hxy : x < y)


@[simp]
theorem quot_mul (x y) :
    (by exact Quot.mk Setoid.r (mul x y) : ColimitType F) =
      (by exact Quot.mk _ x) * (by exact Quot.mk _ y)

{J : Type v}
[CategoryTheory.SmallCategory J]
(F : J ⥤ RingCat)
(x y : RingCat.Colimits.Prequotient F)

Quot.mk Setoid.r (x.mul y) = Quot.mk Setoid.r x * Quot.mk Setoid.r y


/-- The free functor from the Eilenberg-Moore category, constructing an algebra for any object. -/
@[simps]
def free : C ⥤ Algebra T

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


theorem mem_smul_iff {i j : ι} {m₁ : M i} {m₂ : M j} {w : Word M} :
    ⟨_, m₁⟩ ∈ (of m₂ • w).toList ↔
      (¬i = j ∧ ⟨i, m₁⟩ ∈ w.toList)
      ∨ (m₁ ≠ 1 ∧ ∃ (hij : i = j),(⟨i, m₁⟩ ∈ w.toList.tail) ∨
        (∃ m', ⟨j, m'⟩ ∈ w.toList.head? ∧ m₁ = hij ▸ (m₂ * m')) ∨
        (w.fstIdx ≠ some j ∧ m₁ = hij ▸ m₂))

{ι : Type u_1}
{M : ι → Type u_2}
[(i : ι) → Monoid (M i)]
[(i : ι) → DecidableEq (M i)]
[DecidableEq ι]
{i j : ι}
{m₁ : M i}
{m₂ : M j}
{w : Monoid.CoprodI.Word M}

⟨i, m₁⟩ ∈ (Monoid.CoprodI.of m₂ • w).toList ↔
  ¬i = j ∧ ⟨i, m₁⟩ ∈ w.toList ∨
    m₁ ≠ 1 ∧
      ∃ (hij : i = j),
        ⟨i, m₁⟩ ∈ w.toList.tail ∨
          (∃ m', ⟨j, m'⟩ ∈ w.toList.head? ∧ m₁ = ⋯ ▸ (m₂ * m')) ∨ w.fstIdx ≠ some j ∧ m₁ = ⋯ ▸ m₂


@[to_additive (attr := simp, to_additive) (reorder := 2 3, 5 6) smul_const]
lemma _root_.Function.const_pow [Pow α β] (a : α) (b : β) : const I a ^ b = const I (a ^ b)

{I : Type u}
{β : Type u_2}
{α : Type u_1}
[SMul β α]
(b : β)
(a : α)

b • Function.const I a = Function.const I (b • a)


@[to_additive (attr := simp)]
theorem prod_take_mul_prod_drop : ∀ (L : List M) (i : ℕ), (L.take i).prod * (L.drop i).prod = L.prod

{M : Type u_4}
[AddMonoid M]
(L : List M)
(i : ℕ)

(List.take i L).sum + (List.drop i L).sum = L.sum


/-- The function `(f, x) ↦ update f a x : (Π a, π a) × π a → Π a, π a` is measurable. -/
theorem measurable_update'  {a : δ} [DecidableEq δ] :
    Measurable (fun p : (∀ i, π i) × π a ↦ update p.1 a p.2)

{δ : Type u_4}
{π : δ → Type u_6}
[(a : δ) → MeasurableSpace (π a)]
{a : δ}
[DecidableEq δ]

Measurable fun p => Function.update p.1 a p.2


theorem apply_eq_iff_eq (e : P₁ ≃ᵃL[k] P₂) {p₁ p₂ : P₁} : e p₁ = e p₂ ↔ p₁ = 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₁]
[AddTorsor V₁ P₁]
[AddCommGroup V₂]
[Module k V₂]
[AddTorsor V₂ P₂]
[TopologicalSpace P₁]
[TopologicalSpace P₂]
(e : P₁ ≃ᵃL[k] P₂)
{p₁ p₂ : P₁}


theorem contMDiffOn_top : SmoothOn I I' f s ↔ ∀ n : ℕ, ContMDiffOn I I' n f s

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{H : Type u_3}
[TopologicalSpace H]
{I : ModelWithCorners 𝕜 E H}
{M : Type u_4}
[TopologicalSpace M]
[ChartedSpace H M]
{E' : Type u_5}
[NormedAddCommGroup E']
[NormedSpace 𝕜 E']
{H' : Type u_6}
[TopologicalSpace H']
{I' : ModelWithCorners 𝕜 E' H'}
{M' : Type u_7}
[TopologicalSpace M']
[ChartedSpace H' M']
{f : M → M'}
{s : Set M}

SmoothOn I I' f s ↔ ∀ (n : ℕ), ContMDiffOn I I' (↑n) f s


theorem IsDiag.add [AddZeroClass α] {A B : Matrix n n α} (ha : A.IsDiag) (hb : B.IsDiag) :
    (A + B).IsDiag

{α : Type u_1}
{n : Type u_4}
[AddZeroClass α]
{A B : Matrix n n α}
(ha : A.IsDiag)
(hb : B.IsDiag)


theorem const_min (hf : LocallyLipschitz f) (a : ℝ) : LocallyLipschitz fun x => min a (f x)

{α : Type u}
[PseudoEMetricSpace α]
{f : α → ℝ}
(hf : LocallyLipschitz f)
(a : ℝ)


@[simp]
theorem preimage_const_of_not_mem {b : β} {s : Set β} (h : b ∉ s) : (fun _ : α => b) ⁻¹' s = ∅

{α : Type u_1}
{β : Type u_2}
{b : β}
{s : Set β}
(h : b ∉ s)


/-- A set is equivalent to its image under an equivalence.
-/
@[simps]
def image {α β : Type*} (e : α ≃ β) (s : Set α) :
    s ≃ e '' s

{α : Type u_1}
{β : Type u_2}
(e : α ≃ β)
(s : Set α)
(y : ↑(⇑e '' s))


theorem truncation_eq_self {f : α → ℝ} {A : ℝ} {x : α} (h : |f x| < A) :
    truncation f A x = f x

ProbabilityTheory.truncation f A x = f x


/-- An octahedron is a type of datum whose existence is asserted by
the octahedron axiom (TR 4), see https://stacks.math.columbia.edu/tag/05QK -/
structure Octahedron
  {X₁ X₂ X₃ Z₁₂ Z₂₃ Z₁₃ : C}
  {u₁₂ : X₁ ⟶ X₂} {u₂₃ : X₂ ⟶ X₃} {u₁₃ : X₁ ⟶ X₃} (comm : u₁₂ ≫ u₂₃ = u₁₃)
  {v₁₂ : X₂ ⟶ Z₁₂} {w₁₂ : Z₁₂ ⟶ X₁⟦(1 : ℤ)⟧} (h₁₂ : Triangle.mk u₁₂ v₁₂ w₁₂ ∈ distTriang C)
  {v₂₃ : X₃ ⟶ Z₂₃} {w₂₃ : Z₂₃ ⟶ X₂⟦(1 : ℤ)⟧} (h₂₃ : Triangle.mk u₂₃ v₂₃ w₂₃ ∈ distTriang C)
  {v₁₃ : X₃ ⟶ Z₁₃} {w₁₃ : Z₁₃ ⟶ X₁⟦(1 : ℤ)⟧} (h₁₃ : Triangle.mk u₁₃ v₁₃ w₁₃ ∈ distTriang C) where
  m₁ : Z₁₂ ⟶ Z₁₃
  m₃ : Z₁₃ ⟶ Z₂₃
  comm₁ : v₁₂ ≫ m₁ = u₂₃ ≫ v₁₃
  comm₂ : m₁ ≫ w₁₃ = w₁₂
  comm₃ : v₁₃ ≫ m₃ = v₂₃
  comm₄ : w₁₃ ≫ u₁₂⟦1⟧' = m₃ ≫ w₂₃
  mem : Triangle.mk m₁ m₃ (w₂₃ ≫ v₁₂⟦1⟧') ∈ distTriang C

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

{comm : CategoryTheory.CategoryStruct.comp u₁₂ u₂₃ = u₁₃}

{v₁₂ : X₂ ⟶ Z₁₂}

{w₁₂ : Z₁₂ ⟶ (CategoryTheory.shiftFunctor C 1).obj X₁}

{h₁₂ : CategoryTheory.Pretriangulated.Triangle.mk u₁₂ v₁₂ w₁₂ ∈ CategoryTheory.Pretriangulated.distinguishedTriangles}

{v₂₃ : X₃ ⟶ Z₂₃}

{w₂₃ : Z₂₃ ⟶ (CategoryTheory.shiftFunctor C 1).obj X₂}

{h₂₃ : CategoryTheory.Pretriangulated.Triangle.mk u₂₃ v₂₃ w₂₃ ∈ CategoryTheory.Pretriangulated.distinguishedTriangles}

{v₁₃ : X₃ ⟶ Z₁₃}

{w₁₃ : Z₁₃ ⟶ (CategoryTheory.shiftFunctor C 1).obj X₁}

{h₁₃ : CategoryTheory.Pretriangulated.Triangle.mk u₁₃ v₁₃ w₁₃ ∈ CategoryTheory.Pretriangulated.distinguishedTriangles}

(self : CategoryTheory.Triangulated.Octahedron comm h₁₂ h₂₃ h₁₃)

CategoryTheory.CategoryStruct.comp self.m₁ w₁₃ = w₁₂


@[simp]
theorem sum_C {A : Type*} [AddCommMonoid A] {b : (σ →₀ ℕ) → R → A} (w : b 0 0 = 0) :
    sum (C a) b = b 0 a

{R : Type u}
{σ : Type u_1}
{a : R}
[CommSemiring R]
{A : Type u_2}
[AddCommMonoid A]
{b : (σ →₀ ℕ) → R → A}
(w : b 0 0 = 0)

Finsupp.sum (MvPolynomial.C a) b = b 0 a


theorem closure_iUnion {ι} (s : ι → Set R) : closure (⋃ i, s i) = ⨆ i, closure (s i)

{R : Type u}
[NonUnitalNonAssocSemiring R]
{ι : Sort u_2}
(s : ι → Set R)

NonUnitalSubsemiring.closure (⋃ i, s i) = ⨆ i, NonUnitalSubsemiring.closure (s i)


theorem UInt8.ext_iff {x y : UInt8} : x = y ↔ x.toNat = y.toNat


nonrec theorem IsLocalMin.inf (hf : IsLocalMin f a) (hg : IsLocalMin g a) :
    IsLocalMin (fun x => f x ⊓ g x) a

{α : Type u}
{β : Type v}
[TopologicalSpace α]
[SemilatticeInf β]
{f g : α → β}
{a : α}
(hf : IsLocalMin f a)
(hg : IsLocalMin g a)


/-- A list with product not one must have positive length. -/
@[to_additive "A list with sum not zero must have positive length."]
theorem length_pos_of_prod_ne_one (L : List M) (h : L.prod ≠ 1) : 0 < L.length

{M : Type u_4}
[AddMonoid M]
(L : List M)
(h : L.sum ≠ 0)


@[simp] lemma zero_floorDiv (a : α) : (0 : β) ⌊/⌋ a = 0

{α : Type u_2}
{β : Type u_3}
[OrderedAddCommMonoid α]
[OrderedAddCommMonoid β]
[SMulZeroClass α β]
[FloorDiv α β]
(a : α)


@[deprecated nodup_iff_injective_get (since := "2023-01-10")]
theorem nodup_iff_nthLe_inj {l : List α} :
    Nodup l ↔ ∀ i j h₁ h₂, nthLe l i h₁ = nthLe l j h₂ → i = j

l.Nodup ↔ ∀ (i j : ℕ) (h₁ : i < l.length) (h₂ : j < l.length), l.nthLe i h₁ = l.nthLe j h₂ → i = j


lemma forall_mem_eraseNone {s : Finset (Option α)} {p : Option α → Prop} :
    (∀ a ∈ eraseNone s, p a) ↔ ∀ a : α, (a : Option α) ∈ s → p a

{α : Type u_1}
{s : Finset (Option α)}
{p : Option α → Prop}

(∀ a ∈ Finset.eraseNone s, p (some a)) ↔ ∀ (a : α), some a ∈ s → p (some a)


@[to_additive norm_add₃_le]
theorem norm_mul₃_le (a b c : E) : ‖a * b * c‖ ≤ ‖a‖ + ‖b‖ + ‖c‖

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


@[simp]
theorem coe_mul [MulZeroClass β] [ContinuousMul β] (f g : C_c(α, β)) : ⇑(f * g) = f * g

{α : Type u_2}
{β : Type u_3}
[TopologicalSpace α]
[TopologicalSpace β]
[MulZeroClass β]
[ContinuousMul β]
(f g : α →C_c β)


@[simp]
theorem dist_eq_zero_iff_eq_or_not_reachable :
    G.dist u v = 0 ↔ u = v ∨ ¬G.Reachable u v

{V : Type u_1}
{G : SimpleGraph V}
{u v : V}


@[simp]
theorem round_int_add (x : α) (y : ℤ) : round ((y : α) + x) = y + round x

{α : Type u_2}
[LinearOrderedRing α]
[FloorRing α]
(x : α)
(y : ℤ)


@[elab_as_elim]
protected theorem ind {β : G.ConnectedComponent → Prop}
    (h : ∀ v : V, β (G.connectedComponentMk v)) (c : G.ConnectedComponent) : β c

(h : ∀ (v : V), β (G.connectedComponentMk v))


protected theorem Subsingleton.wellFoundedOn (hs : s.Subsingleton) : s.WellFoundedOn r

{α : Type u_2}
{r : α → α → Prop}
[IsStrictOrder α r]
{s : Set α}
(hs : s.Subsingleton)


theorem true_eq_false_eq_False : ¬true = false


theorem ne_iff {x y : ℝ≥0} : (x : ℝ) ≠ (y : ℝ) ↔ x ≠ y

↑x ≠ ↑y ↔ x ≠ y


@[simp, fun_prop]
theorem DifferentiableAt.inv' (hf : DifferentiableAt 𝕜 h z) (hz : h z ≠ 0) :
    DifferentiableAt 𝕜 (fun x => (h x)⁻¹) z

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{R : Type u_6}
[NormedDivisionRing R]
[NormedAlgebra 𝕜 R]
[CompleteSpace R]
{h : E → R}
{z : E}
(hf : DifferentiableAt 𝕜 h z)
(hz : h z ≠ 0)


@[simp] lemma op_eq_one_iff [One α] {a : α} : op a = 1 ↔ a = 1