@[reassoc]
lemma ι_totalShift₁Iso_hom_f (a b n : ℤ) (h : a + b = n) (a' : ℤ) (ha' : a' = a + x)
    (n' : ℤ) (hn' : n' = n + x) :
    ((shiftFunctor₁ C x).obj K).ιTotal (up ℤ) a b n h ≫ (K.totalShift₁Iso x).hom.f n =
      (K.shiftFunctor₁XXIso a x a' ha' b).hom ≫ K.ιTotal (up ℤ) a' b n' (by dsimp; omega) ≫
        (CochainComplex.shiftFunctorObjXIso (K.total (up ℤ)) x n n' hn').inv

(K : HomologicalComplex₂ C (ComplexShape.up ℤ) (ComplexShape.up ℤ))

((HomologicalComplex₂.shiftFunctor₁ C x).obj K).ιTotal (ComplexShape.up ℤ) a b n h ≫ (K.totalShift₁Iso x).hom.f n =
  (K.shiftFunctor₁XXIso a x a' ha' b).hom ≫
    K.ιTotal (ComplexShape.up ℤ) a' b n' ⋯ ≫
      (CochainComplex.shiftFunctorObjXIso (K.total (ComplexShape.up ℤ)) x n n' hn').inv


@[simp]
theorem adjunction_counit_app {R : CommRingCatᵒᵖ} :
    ΓSpec.adjunction.counit.app R = (Scheme.ΓSpecIso (unop R)).inv.op

AlgebraicGeometry.ΓSpec.adjunction.counit.app R = (AlgebraicGeometry.Scheme.ΓSpecIso (Opposite.unop R)).inv.op


@[simp]
theorem det_isUnit (A : unitaryGroup n α) : IsUnit (A : Matrix n n α).det

{n : Type u}
[DecidableEq n]
[Fintype n]
{α : Type v}
[CommRing α]
[StarRing α]
(A : ↥(Matrix.unitaryGroup n α))


theorem lexAccessible {a : α} (aca : Acc ra a) (acb : (b : β) → Acc rb b) (b : β) : Acc (Prod.Lex ra rb) (a, b)

{α : Type u}
{β : Type v}
{ra : α → α → Prop}
{rb : β → β → Prop}
{a : α}
(aca : Acc ra a)
(acb : ∀ (b : β), Acc rb b)
(b : β)

Acc (Prod.Lex ra rb) { fst := a, snd := b }


protected theorem coe_pow (x : S) (n : ℕ) : (↑(x ^ n) : A) = (x : A) ^ n

{R : Type u}
{A : Type v}
[CommSemiring R]
[Semiring A]
[Algebra R A]
(S : Subalgebra R A)
(x : ↥S)
(n : ℕ)


nonrec theorem ContinuousWithinAt.log (hf : ContinuousWithinAt f s a) (h₀ : f a ≠ 0) :
    ContinuousWithinAt (fun x => log (f x)) s a

{α : Type u_1}
[TopologicalSpace α]
{f : α → ℝ}
{s : Set α}
{a : α}
(hf : ContinuousWithinAt f s a)
(h₀ : f a ≠ 0)

ContinuousWithinAt (fun x => Real.log (f x)) s a


/--
The map `fun x => a * x + b`, as a homeomorphism from `𝕜` (a topological field) to itself,
when `a ≠ 0`.
-/
@[simps]
def affineHomeomorph (a b : 𝕜) (h : a ≠ 0) : 𝕜 ≃ₜ 𝕜

{𝕜 : Type u_2}
[Field 𝕜]
[TopologicalSpace 𝕜]
[TopologicalRing 𝕜]
(a b : 𝕜)
(h : a ≠ 0)
(x : 𝕜)


theorem strictAntiOn_logb : StrictAntiOn (logb b) (Set.Iio 0)


@[to_additive]
theorem one [One Y] : IsLocallyConstant (1 : X → Y)

{X : Type u_1}
{Y : Type u_2}
[TopologicalSpace X]
[One Y]


theorem mapIdx_induction (as : Array α) (f : Fin as.size → α → β)
    (motive : Nat → Prop) (h0 : motive 0)
    (p : Fin as.size → β → Prop)
    (hs : ∀ i, motive i.1 → p i (f i as[i]) ∧ motive (i + 1)) :
    motive as.size ∧ ∃ eq : (Array.mapIdx as f).size = as.size,
      ∀ i h, p ⟨i, h⟩ ((Array.mapIdx as f)[i])

(hs : ∀ (i : Fin as.size), motive ↑i → p i (f i as[i]) ∧ motive (↑i + 1))

(h₂ : ∀ (i : Nat) (h : i < as.size) (h' : i < bs.size), p ⟨i, h⟩ bs[i])

let arr := Array.mapIdxM.map as f i j h bs;
motive as.size ∧ ∃ eq, ∀ (i_1 : Nat) (h : i_1 < as.size), p ⟨i_1, h⟩ arr[i_1]


lemma tendsto_log_mul_self_nhds_zero_left : Filter.Tendsto (fun x ↦ log x * x) (𝓝[<] 0) (𝓝 0)

Filter.Tendsto (fun x => Real.log x * x) (𝓝[<] 0) (𝓝 0)


{K : Type v}
{L : Type w}
[CommRing K]
[Field L]
(i : K →+* L)


/-- `Setoid.quotientKerEquivOfRightInverse` as a homeomorphism. -/
@[simps!]
def Function.RightInverse.homeomorph {f' : C(Y, X)} (hf : Function.RightInverse f' f) :
    Quotient (Setoid.ker f) ≃ₜ Y

{X : Type u_1}
{Y : Type u_2}
[TopologicalSpace X]
[TopologicalSpace Y]
{f : C(X, Y)}
{f' : C(Y, X)}
(hf : Function.RightInverse ⇑f' ⇑f)
(b : Y)

hf.homeomorph.symm b = Quotient.mk'' (f' b)


/-- Shows that definability is closed under finite projections. -/
theorem Definable.image_comp {s : Set (β → M)} (h : A.Definable L s) (f : α → β) [Finite α]
    [Finite β] : A.Definable L ((fun g : β → M => g ∘ f) '' s)

{M : Type w}
{A : Set M}
{L : FirstOrder.Language}
[L.Structure M]
{α : Type u₁}
{β : Type u_1}
{s : Set (β → M)}
(h : A.Definable L s)
(f : α → β)
[Finite α]
[Finite β]


/-- Isomorphic functors have equal essential images. -/
theorem essImage_eq_of_natIso {F' : C ⥤ D} (h : F ≅ F') : essImage F = essImage F'

{C : Type u₁}
{D : Type u₂}
[CategoryTheory.Category.{v₁, u₁} C]
[CategoryTheory.Category.{v₂, u₂} D]
{F F' : CategoryTheory.Functor C D}
(h : F ≅ F')


theorem setLIntegral_eq_const {f : α → ℝ≥0∞} (hf : Measurable f) (r : ℝ≥0∞) :
    ∫⁻ x in { x | f x = r }, f x ∂μ = r * μ { x | f x = r }

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

∫⁻ (x : α) in {x | f x = r}, f x ∂μ = r * μ {x | f x = r}


@[simp]
theorem arsinh_neg_iff : arsinh x < 0 ↔ x < 0


@[to_additive (attr := gcongr)]
lemma zpow_lt_zpow' (hn : 0 < n) (h : a < b) : a ^ n < b ^ n

{α : Type u_1}
[OrderedCommGroup α]
{n : ℤ}
{a b : α}
(hn : 0 < n)
(h : a < b)


theorem differentiableAt_tan {x : ℝ} : DifferentiableAt ℝ tan x ↔ cos x ≠ 0

DifferentiableAt ℝ Real.tan x ↔ Real.cos x ≠ 0


@[simp]
theorem emptyIsInitial_to : emptyIsInitial.to = Scheme.emptyTo


@[to_additive]
theorem mem_sSup_of_mem {S : Set (Subgroup G)} {s : Subgroup G} (hs : s ∈ S) :
    ∀ {x : G}, x ∈ s → x ∈ sSup S

{G : Type u_1}
[AddGroup G]
{S : Set (AddSubgroup G)}
{s : AddSubgroup G}
(hs : s ∈ S)
{x : G}


/-- General fencing theorem for continuous functions with an estimate on the norm of the derivative.
Let `f` and `B` be continuous functions on `[a, b]` such that

* `‖f a‖ ≤ B a`;
* `f` and `B` have right derivatives `f'` and `B'` respectively at every point of `[a, b)`;
* we have `‖f' x‖ ≤ B x` everywhere on `[a, b)`.

Then `‖f x‖ ≤ B x` everywhere on `[a, b]`. We use one-sided derivatives in the assumptions
to make this theorem work for piecewise differentiable functions.
-/
theorem image_norm_le_of_norm_deriv_right_le_deriv_boundary' {f' : ℝ → E}
    (hf : ContinuousOn f (Icc a b)) (hf' : ∀ x ∈ Ico a b, HasDerivWithinAt f (f' x) (Ici x) x)
    {B B' : ℝ → ℝ} (ha : ‖f a‖ ≤ B a) (hB : ContinuousOn B (Icc a b))
    (hB' : ∀ x ∈ Ico a b, HasDerivWithinAt B (B' x) (Ici x) x)
    (bound : ∀ x ∈ Ico a b, ‖f' x‖ ≤ B' x) : ∀ ⦃x⦄, x ∈ Icc a b → ‖f x‖ ≤ B x

(hf' : ∀ x ∈ Set.Ico a b, HasDerivWithinAt f (f' x) (Set.Ici x) x)

(hB' : ∀ x ∈ Set.Ico a b, HasDerivWithinAt B (B' x) (Set.Ici x) x)

(bound : ∀ x ∈ Set.Ico a b, ‖f' x‖ ≤ B' x)


/-- The character of level `d` through which `χ` factors is uniquely determined. -/
lemma existsUnique {d : ℕ} [NeZero n] (h : FactorsThrough χ d) :
    ∃! χ' : DirichletCharacter R d, χ = changeLevel h.dvd χ'

{R : Type u_1}
[CommMonoidWithZero R]
{n : ℕ}
{χ : DirichletCharacter R n}
{d : ℕ}
[NeZero n]
(h : χ.FactorsThrough d)

∃! χ', χ = (DirichletCharacter.changeLevel ⋯) χ'


lemma map'_inv_eq_inv_map' {n m : ℕ} (h : n+1 ≤ m) {f g : ComposableArrows C m}
    (app : f.obj' n ≅ g.obj' n) (app' : f.obj' (n+1) ≅ g.obj' (n+1))
    (w : f.map' n (n+1) ≫ app'.hom = app.hom ≫ g.map' n (n+1)) :
    map' g n (n+1) ≫ app'.inv = app.inv ≫ map' f n (n+1)

{f g : CategoryTheory.ComposableArrows C m}

(app' : f.obj' (n + 1) h ≅ g.obj' (n + 1) h)

(w :
  CategoryTheory.CategoryStruct.comp (f.map' n (n + 1) ⋯ h) app'.hom =
    CategoryTheory.CategoryStruct.comp app.hom (g.map' n (n + 1) ⋯ h))

CategoryTheory.CategoryStruct.comp (g.map' n (n + 1) ⋯ h) app'.inv =
  CategoryTheory.CategoryStruct.comp app.inv (f.map' n (n + 1) ⋯ h)


theorem zero_mem_smul_finset (h : (0 : β) ∈ t) : (0 : β) ∈ a • t

{α : Type u_2}
{β : Type u_3}
[Zero β]
[SMulZeroClass α β]
[DecidableEq β]
{t : Finset β}
{a : α}
(h : 0 ∈ t)


@[reassoc, simp]
lemma map₂_hom_inv {f g : a ⟶ b} (η : f ≅ g) :
    F.map₂ η.hom ≫ F.map₂ η.inv = 𝟙 (F.map f)

{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)

CategoryTheory.CategoryStruct.comp (F.map₂ η.hom) (F.map₂ η.inv) = CategoryTheory.CategoryStruct.id (F.map f)


@[simp] lemma box_zero : (box 0 : Finset α) = {0}

{α : Type u_1}
[OrderedRing α]
[LocallyFiniteOrder α]
[DecidableEq α]


theorem borel_eq_generateFrom_Ioi_rat : borel ℝ = .generateFrom (⋃ a : ℚ, {Ioi (a : ℝ)})

borel ℝ = MeasurableSpace.generateFrom (⋃ a, {Set.Ioi ↑a})


/-- Two finite measures on a Borel space are equal if they agree on all open-closed intervals.  If
`α` is a conditionally complete linear order with no top element,
`MeasureTheory.Measure.ext_of_Ioc` is an extensionality lemma with weaker assumptions on `μ` and
`ν`. -/
theorem ext_of_Ioc_finite {α : Type*} [TopologicalSpace α] {m : MeasurableSpace α}
    [SecondCountableTopology α] [LinearOrder α] [OrderTopology α] [BorelSpace α] (μ ν : Measure α)
    [IsFiniteMeasure μ] (hμν : μ univ = ν univ) (h : ∀ ⦃a b⦄, a < b → μ (Ioc a b) = ν (Ioc a b)) :
    μ = ν

(h : ∀ ⦃a b : α⦄, a < b → μ (Set.Ioc a b) = ν (Set.Ioc a b))


/-- Together `Matrix.diagonalInvertible` and `Matrix.invertibleOfDiagonalInvertible` form an
equivalence, although both sides of the equiv are subsingleton anyway. -/
@[simps]
def diagonalInvertibleEquivInvertible (v : n → α) : Invertible (diagonal v) ≃ Invertible v

{n : Type u'}
{α : Type v}
[Fintype n]
[DecidableEq n]
[CommRing α]
(v : n → α)
[Invertible v]

(Matrix.diagonalInvertibleEquivInvertible v).symm inst✝ = Matrix.diagonalInvertible v


/-- We say that there exists an absolute left Kan lift of `g` along `f` if any 1-morphism `h`
commutes with the left Kan lift `f₊ g`. -/
class HasAbsLeftKanLift (f : b ⟶ a) (g : c ⟶ a) extends HasLeftKanLift f g : Prop where
  commute : ∀ {x : B} (h : x ⟶ c), LanLift.CommuteWith f g h

[self : CategoryTheory.Bicategory.HasAbsLeftKanLift f g]

CategoryTheory.Bicategory.LanLift.CommuteWith f g h


theorem isAdjointPair_inner (A : E →L[𝕜] F) :
    LinearMap.IsAdjointPair (sesqFormOfInner : E →ₗ[𝕜] E →ₗ⋆[𝕜] 𝕜)
      (sesqFormOfInner : F →ₗ[𝕜] F →ₗ⋆[𝕜] 𝕜) A (A†)

{𝕜 : Type u_1}
{E : Type u_2}
{F : Type u_3}
[RCLike 𝕜]
[NormedAddCommGroup E]
[NormedAddCommGroup F]
[InnerProductSpace 𝕜 E]
[InnerProductSpace 𝕜 F]
[CompleteSpace E]
[CompleteSpace F]
(A : E →L[𝕜] F)

sesqFormOfInner.IsAdjointPair sesqFormOfInner ↑A ↑(ContinuousLinearMap.adjoint A)


/-- The functor `Triangle C ⥤ Triangle D` that is induced by a functor `F : C ⥤ D`
which commutes with shift by `ℤ`. -/
@[simps]
def mapTriangle : Triangle C ⥤ Triangle D

(T : CategoryTheory.Pretriangulated.Triangle C)

F.mapTriangle.obj T =
  CategoryTheory.Pretriangulated.Triangle.mk (F.map T.mor₁) (F.map T.mor₂)
    (CategoryTheory.CategoryStruct.comp (F.map T.mor₃) ((F.commShiftIso 1).hom.app T.obj₁))


{B : Type u_1}
{W : Type u_2}
[Group W]
{M : CoxeterMatrix B}
{cs : CoxeterSystem M W}
{t : W}
(ht : cs.IsReflection t)


theorem hasLimitsOfShape_of_essentiallySmall [EssentiallySmall.{w₁} J]
    [HasLimitsOfSize.{w₁, w₁} C] : HasLimitsOfShape J C

[CategoryTheory.EssentiallySmall.{w₁, v₂, u₂} J]

[CategoryTheory.Limits.HasLimitsOfSize.{w₁, w₁, v₁, u₁} C]


theorem setToL1S_indicatorConst {T : Set α → E →L[ℝ] F} {s : Set α}
    (h_zero : ∀ s, MeasurableSet s → μ s = 0 → T s = 0) (h_add : FinMeasAdditive μ T)
    (hs : MeasurableSet s) (hμs : μ s < ∞) (x : E) :
    setToL1S T (simpleFunc.indicatorConst 1 hs hμs.ne x) = T s x

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

(h_add : MeasureTheory.FinMeasAdditive μ T)

MeasureTheory.L1.SimpleFunc.setToL1S T (MeasureTheory.Lp.simpleFunc.indicatorConst 1 hs ⋯ x) = (T s) x


protected theorem PSigma.eq {α : Sort u} {β : α → Sort v} : ∀ {p₁ p₂ : Σ' a, β a} (h₁ : p₁.1 = p₂.1),
    (Eq.recOn h₁ p₁.2 : β p₂.1) = p₂.2 → p₁ = p₂

{α : Sort u}
{β : α → Sort v}
{p₁ p₂ : (a : α) ×' β a}
(h₁ : p₁.fst = p₂.fst)


theorem ball_eq_ball' (ε : ℝ) (x : α) :
    UniformSpace.ball x { p | dist p.1 p.2 < ε } = Metric.ball x ε

{α : Type u}
[PseudoMetricSpace α]
(ε : ℝ)
(x : α)

UniformSpace.ball x {p | dist p.1 p.2 < ε} = Metric.ball x ε


theorem isAtom_single {i : ι} [DecidableEq ι] [∀ i, PartialOrder (π i)] [∀ i, OrderBot (π i)]
    {a : π i} (h : IsAtom a) : IsAtom (Function.update (⊥ : ∀ i, π i) i a)

{ι : Type u_4}
{π : ι → Type u}
{i : ι}
[DecidableEq ι]
[(i : ι) → PartialOrder (π i)]
[(i : ι) → OrderBot (π i)]
{a : π i}
(h : IsAtom a)


protected theorem Filter.Tendsto.max {b : Filter β} {a₁ a₂ : α} (hf : Tendsto f b (𝓝 a₁))
    (hg : Tendsto g b (𝓝 a₂)) : Tendsto (fun b => max (f b) (g b)) b (𝓝 (max a₁ a₂))

{α : Type u}
{β : Type v}
[TopologicalSpace α]
[LinearOrder α]
[OrderClosedTopology α]
{f g : β → α}
{b : Filter β}
{a₁ a₂ : α}
(hf : Filter.Tendsto f b (𝓝 a₁))
(hg : Filter.Tendsto g b (𝓝 a₂))

Filter.Tendsto (fun b => max (f b) (g b)) b (𝓝 (max a₁ a₂))


theorem subset_adjoin_of_subset_left {F : Subfield E} {T : Set E} (HT : T ⊆ F) : T ⊆ adjoin F S

{E : Type u_2}
[Field E]
(S : Set E)
{F : Subfield E}
{T : Set E}
(HT : T ⊆ ↑F)


lemma nonsingular_neg_iff (x y : R) : W.Nonsingular x (W.negY x y) ↔ W.Nonsingular x y

{R : Type u}
[CommRing R]
(W : WeierstrassCurve.Affine R)
(x y : R)


theorem mem_iff_boolIndicator (x : α) : x ∈ s ↔ s.boolIndicator x = true


/-- The unit of the adjunction `lightCondSetToTopCat ⊣ topCatToLightCondSet` -/
@[simps val_app val_app_apply]
def topCatAdjunctionUnit (X : LightCondSet.{u}) : X ⟶ X.toTopCat.toLightCondSet

(s : ↑(LightProfinite.toTopCat.obj (Opposite.unop S)))

(X.topCatAdjunctionUnit.val.app S x) s = X.val.map (LightProfinite.const (Opposite.unop S) s).op x


theorem BddBelow_zero [Nonempty Γ] : BddBelow (Function.support (0 : Γ → R))

{Γ : Type u_1}
{R : Type u_2}
[Zero R]
[LinearOrder Γ]
[Nonempty Γ]


theorem map_smulₛₗ (c : R) (x : E) : e (c • x) = σ₁₂ c • e x

{R : Type u_1}
{R₂ : Type u_2}
{E : Type u_5}
{E₂ : Type u_6}
[Semiring R]
[Semiring R₂]
{σ₁₂ : R →+* R₂}
{σ₂₁ : R₂ →+* R}
[RingHomInvPair σ₁₂ σ₂₁]
[RingHomInvPair σ₂₁ σ₁₂]
[SeminormedAddCommGroup E]
[SeminormedAddCommGroup E₂]
[Module R E]
[Module R₂ E₂]
(e : E ≃ₛₗᵢ[σ₁₂] E₂)
(c : R)
(x : E)


/-- A point equals its orthogonal projection if and only if it lies in
the subspace. -/
theorem orthogonalProjection_eq_self_iff {s : AffineSubspace ℝ P} [Nonempty s]
    [HasOrthogonalProjection s.direction] {p : P} : ↑(orthogonalProjection s p) = p ↔ p ∈ s

{V : Type u_1}
{P : Type u_2}
[NormedAddCommGroup V]
[InnerProductSpace ℝ V]
[MetricSpace P]
[NormedAddTorsor V P]
{s : AffineSubspace ℝ P}
[Nonempty ↥s]
[HasOrthogonalProjection s.direction]
{p : P}

↑((EuclideanGeometry.orthogonalProjection s) p) = p ↔ p ∈ s


/-- Product of a list of elements in a subfield is in the subfield. -/
protected theorem list_prod_mem {l : List K} : (∀ x ∈ l, x ∈ s) → l.prod ∈ s

{K : Type u}
[DivisionRing K]
(s : Subfield K)
{l : List K}


lemma ofJ_c₄ : (ofJ j).c₄ = j * (j - 1728) ^ 3

(WeierstrassCurve.ofJ j).c₄ = j * (j - 1728) ^ 3


theorem nnnorm_def (A : Matrix m n α) : ‖A‖₊ = ‖fun i j => A i j‖₊

{m : Type u_3}
{n : Type u_4}
{α : Type u_5}
[Fintype m]
[Fintype n]
[SeminormedAddCommGroup α]
(A : Matrix m n α)


lemma top_eq_last (n : ℕ) : ⊤ = Fin.last n


/-- The geometric sequence `q^n` is a solution of `E` iff
  `q` is a root of `E`'s characteristic polynomial. -/
theorem geom_sol_iff_root_charPoly (q : α) :
    (E.IsSolution fun n ↦ q ^ n) ↔ E.charPoly.IsRoot q

{α : Type u_1}
[CommRing α]
(E : LinearRecurrence α)
(q : α)

(E.IsSolution fun n => q ^ n) ↔ E.charPoly.IsRoot q


lemma setLIntegral_toKernel_prod [IsFiniteKernel κ] (hf : IsCondKernelCDF f κ ν)
    (a : α) {s : Set β} (hs : MeasurableSet s) {t : Set ℝ} (ht : MeasurableSet t) :
    ∫⁻ b in s, hf.toKernel f (a, b) t ∂(ν a) = κ a (s ×ˢ t)

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

(hf : ProbabilityTheory.IsCondKernelCDF f κ ν)

∫⁻ (b : β) in s, ((ProbabilityTheory.IsCondKernelCDF.toKernel f hf) (a, b)) t ∂ν a = (κ a) (s ×ˢ t)


theorem monic_of_a_eq_one' : (toPoly ⟨1, b, c, d⟩).Monic

{ a := 1, b := b, c := c, d := d }.toPoly.Monic


theorem isSymm_transpose_add_self [AddCommSemigroup α] (A : Matrix n n α) : (Aᵀ + A).IsSymm

{α : Type u_1}
{n : Type u_3}
[AddCommSemigroup α]
(A : Matrix n n α)


lemma sumLexLift_eq_empty :
    sumLexLift f₁ f₂ g₁ g₂ a b = ∅ ↔
      (∀ a₁ b₁, a = inl a₁ → b = inl b₁ → f₁ a₁ b₁ = ∅) ∧
        (∀ a₁ b₂, a = inl a₁ → b = inr b₂ → g₁ a₁ b₂ = ∅ ∧ g₂ a₁ b₂ = ∅) ∧
          ∀ a₂ b₂, a = inr a₂ → b = inr b₂ → f₂ a₂ b₂ = ∅

{α₁ : Type u_1}
{α₂ : Type u_2}
{β₁ : Type u_3}
{β₂ : Type u_4}
{γ₁ : Type u_5}
{γ₂ : Type u_6}
{f₁ : α₁ → β₁ → Finset γ₁}
{f₂ : α₂ → β₂ → Finset γ₂}
{g₁ : α₁ → β₂ → Finset γ₁}
{g₂ : α₁ → β₂ → Finset γ₂}
{a : α₁ ⊕ α₂}
{b : β₁ ⊕ β₂}

Finset.sumLexLift f₁ f₂ g₁ g₂ a b = ∅ ↔
  (∀ (a₁ : α₁) (b₁ : β₁), a = Sum.inl a₁ → b = Sum.inl b₁ → f₁ a₁ b₁ = ∅) ∧
    (∀ (a₁ : α₁) (b₂ : β₂), a = Sum.inl a₁ → b = Sum.inr b₂ → g₁ a₁ b₂ = ∅ ∧ g₂ a₁ b₂ = ∅) ∧
      ∀ (a₂ : α₂) (b₂ : β₂), a = Sum.inr a₂ → b = Sum.inr b₂ → f₂ a₂ b₂ = ∅


theorem isMax_of_succFn_le [LocallyFiniteOrder ι] (i : ι) (hi : succFn i ≤ i) : IsMax i

(hi : LinearLocallyFiniteOrder.succFn i ≤ i)


@[simp]
theorem ClassGroup.mk_canonicalEquiv (K' : Type*) [Field K'] [Algebra R K'] [IsFractionRing R K']
    (I : (FractionalIdeal R⁰ K)ˣ) :
    ClassGroup.mk (Units.map (↑(canonicalEquiv R⁰ K K')) I : (FractionalIdeal R⁰ K')ˣ) =
      ClassGroup.mk I

{R : Type u_1}
(K : Type u_2)
[CommRing R]
[Field K]
[Algebra R K]
[IsFractionRing R K]
[IsDomain R]
(K' : Type u_4)
[Field K']
[Algebra R K']
[IsFractionRing R K']
(I : (FractionalIdeal R⁰ K)ˣ)

ClassGroup.mk ((Units.map ↑(FractionalIdeal.canonicalEquiv R⁰ K K')) I) = ClassGroup.mk I


theorem vectorAll_iff_forall : ∀ {n} (f : Vector3 α n → Prop), VectorAll n f ↔ ∀ v, f v

{α : Type u_1}
{n : ℕ}
(f : Vector3 α n → Prop)

VectorAll n f ↔ ∀ (v : Vector3 α n), f v


@[simp] lemma mapSetEmbedding_indep_iff {f : M.E ↪ β} {I : Set β} :
    (M.mapSetEmbedding f).Indep I ↔ M.Indep ↑(f ⁻¹' I) ∧ I ⊆ range f

{α : Type u_1}
{β : Type u_2}
{M : Matroid α}
{f : ↑M.E ↪ β}
{I : Set β}

(M.mapSetEmbedding f).Indep I ↔ M.Indep ↑(⇑f ⁻¹' I) ∧ I ⊆ Set.range ⇑f


theorem find_eq_iff : PNat.find h = m ↔ p m ∧ ∀ n < m, ¬p n

{p : ℕ+ → Prop}
[DecidablePred p]
(h : ∃ n, p n)
{m : ℕ+}


theorem cantorFunctionAux_succ (f : ℕ → Bool) :
    (fun n => cantorFunctionAux c f (n + 1)) = fun n =>
      c * cantorFunctionAux c (fun n => f (n + 1)) n

(fun n => Cardinal.cantorFunctionAux c f (n + 1)) = fun n => c * Cardinal.cantorFunctionAux c (fun n => f (n + 1)) n


@[simp]
theorem eLpNormEssSup_eq_zero_iff {f : α → F} : eLpNormEssSup f μ = 0 ↔ f =ᵐ[μ] 0

{α : Type u_1}
{F : Type u_3}
{m0 : MeasurableSpace α}
{μ : MeasureTheory.Measure α}
[NormedAddCommGroup F]
{f : α → F}

MeasureTheory.eLpNormEssSup f μ = 0 ↔ f =ᵐ[μ] 0


theorem Directed.strictConvex_iUnion {ι : Sort*} {s : ι → Set E} (hdir : Directed (· ⊆ ·) s)
    (hs : ∀ ⦃i : ι⦄, StrictConvex 𝕜 (s i)) : StrictConvex 𝕜 (⋃ i, s i)

(hdir : Directed (fun x x_1 => x ⊆ x_1) s)


protected theorem Set.Equicontinuous.continuous_of_mem {H : Set <| X → α} (h : H.Equicontinuous)
    {f : X → α} (hf : f ∈ H) : Continuous f

{X : Type u_3}
{α : Type u_7}
[tX : TopologicalSpace X]
[uα : UniformSpace α]
{H : Set (X → α)}
(h : H.Equicontinuous)
{f : X → α}
(hf : f ∈ H)


theorem atTop_basis_Ioi [Nonempty α] [SemilatticeSup α] [NoMaxOrder α] :
    (@atTop α _).HasBasis (fun _ => True) Ioi

{α : Type u_3}
[Nonempty α]
[SemilatticeSup α]
[NoMaxOrder α]

Filter.atTop.HasBasis (fun x => True) Set.Ioi


@[to_additive (attr := simp)]
theorem mk_smul (n : ℕ) (x : α) : mk (f := f) n • x = f^[n] x

{α : Type u_1}
{f : α → α}
(n : ℕ)
(x : α)


/-- If `C` has all colimits of diagrams `pair X Y`, then it has all binary coproducts -/
theorem hasBinaryCoproducts_of_hasColimit_pair [∀ {X Y : C}, HasColimit (pair X Y)] :
    HasBinaryCoproducts C

[∀ {X Y : C}, CategoryTheory.Limits.HasColimit (CategoryTheory.Limits.pair X Y)]


/-- The image of an additive Haar measure under a surjective linear map is proportional to a given
additive Haar measure, with a positive (but maybe infinite) factor. -/
theorem LinearMap.exists_map_addHaar_eq_smul_addHaar (h : Function.Surjective L) :
    ∃ (c : ℝ≥0∞), 0 < c ∧ μ.map L = c • ν

{𝕜 : Type u_1}
{E : Type u_2}
{F : Type u_3}
[NontriviallyNormedField 𝕜]
[CompleteSpace 𝕜]
[NormedAddCommGroup E]
[MeasurableSpace E]
[BorelSpace E]
[NormedSpace 𝕜 E]
[NormedAddCommGroup F]
[MeasurableSpace F]
[BorelSpace F]
[NormedSpace 𝕜 F]
(L : E →ₗ[𝕜] F)
(μ : MeasureTheory.Measure E)
(ν : MeasureTheory.Measure F)
[μ.IsAddHaarMeasure]
[ν.IsAddHaarMeasure]
[LocallyCompactSpace E]
(h : Function.Surjective ⇑L)

∃ c, 0 < c ∧ MeasureTheory.Measure.map (⇑L) μ = c • ν


theorem filter_ne' [DecidableEq β] (s : Finset β) (b : β) : (s.filter fun a => a ≠ b) = s.erase b

{β : Type u_2}
[DecidableEq β]
(s : Finset β)
(b : β)

Finset.filter (fun a => a ≠ b) s = s.erase b


/-- If `e` is not primitive, then `e.mulShift d = 1` for some proper divisor `d` of `N`. -/
lemma exists_divisor_of_not_isPrimitive (he : ¬e.IsPrimitive) :
    ∃ d : ℕ, d ∣ N ∧ d < N ∧ e.mulShift d = 1

{N : ℕ}
[NeZero N]
{R : Type u_1}
[CommRing R]
(e : AddChar (ZMod N) R)
(he : ¬e.IsPrimitive)


/-- Sum of a list of elements in a non-unital subring is in the non-unital subring. -/
protected theorem list_sum_mem {l : List R} : (∀ x ∈ l, x ∈ s) → l.sum ∈ s

{R : Type u}
[NonUnitalNonAssocRing R]
(s : NonUnitalSubring R)
{l : List R}


@[simp]
theorem colLen_transpose (μ : YoungDiagram) (j : ℕ) : μ.transpose.colLen j = μ.rowLen j


@[simp]
theorem sInf_toSubsemigroup (s : Set (NonUnitalSubring R)) :
    (sInf s).toSubsemigroup = ⨅ t ∈ s, NonUnitalSubring.toSubsemigroup t

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

(sInf s).toSubsemigroup = ⨅ t ∈ s, t.toSubsemigroup


@[continuity]
theorem Continuous.matrix_mulVec [NonUnitalNonAssocSemiring R] [ContinuousAdd R] [ContinuousMul R]
    [Fintype n] {A : X → Matrix m n R} {B : X → n → R} (hA : Continuous A) (hB : Continuous B) :
    Continuous fun x => A x *ᵥ B x

{X : Type u_1}
{m : Type u_4}
{n : Type u_5}
{R : Type u_8}
[TopologicalSpace X]
[TopologicalSpace R]
[NonUnitalNonAssocSemiring R]
[ContinuousAdd R]
[ContinuousMul R]
[Fintype n]
{A : X → Matrix m n R}
{B : X → n → R}
(hA : Continuous A)
(hB : Continuous B)


@[fun_prop]
theorem IsBoundedLinearMap.hasFDerivWithinAt (h : IsBoundedLinearMap 𝕜 f) :
    HasFDerivWithinAt f h.toContinuousLinearMap s x

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{F : Type u_3}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{f : E → F}
{x : E}
{s : Set E}
(h : IsBoundedLinearMap 𝕜 f)


lemma succAbove_of_lt_succ (p : Fin (n + 1)) (i : Fin n) (h : p < succ i) :
    p.succAbove i = succ i

{n : ℕ}
(p : Fin (n + 1))
(i : Fin n)
(h : p < i.succ)


@[simp]
theorem eventually_comap : (∀ᶠ a in comap f l, p a) ↔ ∀ᶠ b in l, ∀ a, f a = b → p a

{α : Type u}
{β : Type v}
{f : α → β}
{l : Filter β}
{p : α → Prop}

(∀ᶠ (a : α) in Filter.comap f l, p a) ↔ ∀ᶠ (b : β) in l, ∀ (a : α), f a = b → p a


lemma leftUnitor_hom_app {B C : Cat} (F : B ⟶ C) (X : B) : (λ_ F).hom.app X = eqToHom (by simp)

{B C : CategoryTheory.Cat}
(F : B ⟶ C)
(X : ↑B)

(CategoryTheory.Bicategory.leftUnitor F).hom.app X = CategoryTheory.eqToHom ⋯


theorem num_mul_den_eq_num_mul_den_iff_eq {x y : K} :
    num A y * den A x = num A x * den A y ↔ x = y

{A : Type u_4}
[CommRing A]
[IsDomain A]
[UniqueFactorizationMonoid A]
{K : Type u_5}
[Field K]
[Algebra A K]
[IsFractionRing A K]
{x y : K}

IsFractionRing.num A y * ↑(IsFractionRing.den A x) = IsFractionRing.num A x * ↑(IsFractionRing.den A y) ↔ x = y


@[to_additive (attr := simp)]
theorem eq_one_iff {N : Subgroup G} [nN : N.Normal] (x : G) : (x : G ⧸ N) = 1 ↔ x ∈ N

{G : Type u}
[Group G]
{N : Subgroup G}
[nN : N.Normal]
(x : G)


@[simp]
theorem map₂_eq_bot_iff : map₂ m f g = ⊥ ↔ f = ⊥ ∨ g = ⊥

{α : Type u_1}
{β : Type u_3}
{γ : Type u_5}
{m : α → β → γ}
{f : Filter α}
{g : Filter β}


lemma evenKernel_neg (a : UnitAddCircle) (x : ℝ) : evenKernel (-a) x = evenKernel a x

HurwitzZeta.evenKernel (-a) x = HurwitzZeta.evenKernel a x


protected theorem prod_mk_right (b : β) : LocallyLipschitz (fun a : α => (a, b))

{α : Type u}
{β : Type v}
[PseudoEMetricSpace α]
[PseudoEMetricSpace β]
(b : β)


/--
The category of subterminal objects is equivalent to the category of monomorphisms to the terminal
object (which is in turn equivalent to the subobjects of the terminal object).
-/
@[simps]
def subterminalsEquivMonoOverTerminal [HasTerminal C] : Subterminals C ≌ MonoOver (⊤_ C)

(C : Type u₁)
[CategoryTheory.Category.{v₁, u₁} C]
[CategoryTheory.Limits.HasTerminal C]
(X : CategoryTheory.MonoOver (⊤_ C))

((CategoryTheory.subterminalsEquivMonoOverTerminal C).inverse.obj X).obj = X.obj.left


theorem IsSheaf.isSheafFor {P : Cᵒᵖ ⥤ Type w} (hp : IsSheaf J P) (R : Presieve X)
    (hr : generate R ∈ J X) : IsSheafFor P R

(J : CategoryTheory.GrothendieckTopology C)

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

(hp : CategoryTheory.Presieve.IsSheaf J P)

(hr : CategoryTheory.Sieve.generate R ∈ J.sieves X)


@[simp]
theorem mem_attachFin {n : ℕ} {s : Finset ℕ} (h : ∀ m ∈ s, m < n) {a : Fin n} :
    a ∈ s.attachFin h ↔ (a : ℕ) ∈ s


lemma sep_sups_le (s t : Set α) (a : α) :
    {b ∈ s ⊻ t | b ≤ a} = {b ∈ s | b ≤ a} ⊻ {b ∈ t | b ≤ a}

{α : Type u_2}
[SemilatticeSup α]
(s t : Set α)
(a : α)

{b | b ∈ s ⊻ t ∧ b ≤ a} = {b | b ∈ s ∧ b ≤ a} ⊻ {b | b ∈ t ∧ b ≤ a}


/-- Postcomposing `f` with `Prod.snd` is continuous at `x` -/
@[fun_prop]
theorem ContinuousAt.snd {f : X → Y × Z} {x : X} (hf : ContinuousAt f x) :
    ContinuousAt (fun x : X => (f x).2) x

{X : Type u}
{Y : Type v}
{Z : Type u_1}
[TopologicalSpace X]
[TopologicalSpace Y]
[TopologicalSpace Z]
{f : X → Y × Z}
{x : X}
(hf : ContinuousAt f x)


theorem wittPow_vars (m : ℕ) (n : ℕ) : (wittPow p m n).vars ⊆ Finset.univ ×ˢ Finset.range (n + 1)

(p : ℕ)
[hp : Fact (Nat.Prime p)]
(m n : ℕ)

(WittVector.wittPow p m n).vars ⊆ Finset.univ ×ˢ Finset.range (n + 1)


theorem smul_mk [SMul R M] [IsScalarTower R M M] (c : R) (a b) :
    c • (mk a b : Localization S) = mk (c • a) b

{M : Type u_1}
[CommMonoid M]
{S : Submonoid M}
{R : Type u_4}
[SMul R M]
[IsScalarTower R M M]
(c : R)
(a : M)
(b : ↥S)

c • Localization.mk a b = Localization.mk (c • a) b


theorem homogeneousComponent_eq_zero (h : φ.totalDegree < n) : homogeneousComponent n φ = 0

{σ : Type u_1}
{R : Type u_3}
[CommSemiring R]
(n : ℕ)
(φ : MvPolynomial σ R)
(h : φ.totalDegree < n)

(MvPolynomial.homogeneousComponent n) φ = 0


@[simp] lemma map_negDblY : negDblY (W'.map f) (f ∘ P) = f (W'.negDblY P)

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

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


theorem iff_of_true (ha : a) (hb : b) : a ↔ b


theorem lintegral_prod_mul {f : α → ℝ≥0∞} {g : β → ℝ≥0∞} (hf : AEMeasurable f μ)
    (hg : AEMeasurable g ν) : ∫⁻ z, f z.1 * g z.2 ∂μ.prod ν = (∫⁻ x, f x ∂μ) * ∫⁻ y, g y ∂ν

{α : Type u_1}
{β : Type u_3}
[MeasurableSpace α]
[MeasurableSpace β]
{μ : MeasureTheory.Measure α}
{ν : MeasureTheory.Measure β}
[MeasureTheory.SFinite ν]
{f : α → ℝ≥0∞}
{g : β → ℝ≥0∞}
(hf : AEMeasurable f μ)
(hg : AEMeasurable g ν)

∫⁻ (z : α × β), f z.1 * g z.2 ∂μ.prod ν = (∫⁻ (x : α), f x ∂μ) * ∫⁻ (y : β), g y ∂ν


theorem AffineMap.restrict.surjective (φ : P₁ →ᵃ[k] P₂) {E : AffineSubspace k P₁}
    {F : AffineSubspace k P₂} [Nonempty E] [Nonempty F] (h : E.map φ = F) :
    Function.Surjective (AffineMap.restrict φ (le_of_eq h))

{k : Type u_1}
{V₁ : Type u_2}
{P₁ : Type u_3}
{V₂ : Type u_4}
{P₂ : Type u_5}
[Ring k]
[AddCommGroup V₁]
[AddCommGroup V₂]
[Module k V₁]
[Module k V₂]
[AddTorsor V₁ P₁]
[AddTorsor V₂ P₂]
(φ : P₁ →ᵃ[k] P₂)
{E : AffineSubspace k P₁}
{F : AffineSubspace k P₂}
[Nonempty ↥E]
[Nonempty ↥F]
(h : AffineSubspace.map φ E = F)


lemma smul_lt_smul_of_le_of_lt' [PosSMulStrictMono α β] [SMulPosMono α β] (ha : a₁ ≤ a₂)
    (hb : b₁ < b₂) (h₂ : 0 < a₂) (h₁ : 0 ≤ b₁) : a₁ • b₁ < a₂ • b₂

{α : Type u_1}
{β : Type u_2}
{a₁ a₂ : α}
{b₁ b₂ : β}
[SMul α β]
[Preorder α]
[Preorder β]
[Zero α]
[Zero β]
[PosSMulStrictMono α β]
[SMulPosMono α β]
(ha : a₁ ≤ a₂)
(hb : b₁ < b₂)
(h₂ : 0 < a₂)
(h₁ : 0 ≤ b₁)

a₁ • b₁ < a₂ • b₂


protected theorem dvd_sub : ∀ {a b c : Int}, a ∣ b → a ∣ c → a ∣ b - c


@[simp, norm_cast] lemma ratCast_re (q : ℚ) : (q : ℍ[R]).re = q

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


@[to_additive MeasureTheory.NullMeasurableSet.addFundamentalInterior]
protected theorem NullMeasurableSet.fundamentalInterior (hs : NullMeasurableSet s μ) :
    NullMeasurableSet (fundamentalInterior G s) μ

[MeasureTheory.VAddInvariantMeasure G α μ]

(hs : MeasureTheory.NullMeasurableSet s μ)

MeasureTheory.NullMeasurableSet (MeasureTheory.addFundamentalInterior G s) μ


lemma biUnion_image_sup_right : t.biUnion (fun b ↦ s.image (· ⊔ b)) = s ⊻ t

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

(t.biUnion fun b => Finset.image (fun x => x ⊔ b) s) = s ⊻ t


protected theorem toFinset_univ [Fintype α] (h : (Set.univ : Set α).Finite) :
    h.toFinset = Finset.univ

{α : Type u}
[Fintype α]
(h : Set.univ.Finite)


theorem multiset_prod_X_sub_C_coeff_card_pred (t : Multiset R) (ht : 0 < Multiset.card t) :
    (t.map fun x => X - C x).prod.coeff ((Multiset.card t) - 1) = -t.sum

{R : Type u}
[CommRing R]
(t : Multiset R)
(ht : 0 < Multiset.card t)

(Multiset.map (fun x => Polynomial.X - Polynomial.C x) t).prod.coeff (Multiset.card t - 1) = -t.sum


/-- An injective morphism of vector spaces induces an injective morphism of exterior algebras. -/
lemma map_injective_field {f : E →ₗ[K] F} (hf : LinearMap.ker f = ⊥) :
    Function.Injective (map f)

{K : Type u_2}
{E : Type u_3}
{F : Type u_4}
[Field K]
[AddCommGroup E]
[Module K E]
[AddCommGroup F]
[Module K F]
{f : E →ₗ[K] F}
(hf : LinearMap.ker f = ⊥)


/-- **Kummer's Theorem**

The `p`-adic valuation of `n.choose k` is the number of carries when `k` and `n - k` are added
in base `p`. This sum is expressed over the finset `Ico 1 b` where `b` is any bound greater than
`log p n`. -/
theorem padicValNat_choose {n k b : ℕ} [hp : Fact p.Prime] (hkn : k ≤ n) (hnb : log p n < b) :
    padicValNat p (choose n k) =
    ((Finset.Ico 1 b).filter fun i => p ^ i ≤ k % p ^ i + (n - k) % p ^ i).card

{p n k b : ℕ}
[hp : Fact (Nat.Prime p)]
(hkn : k ≤ n)
(hnb : Nat.log p n < b)

padicValNat p (n.choose k) = (Finset.filter (fun i => p ^ i ≤ k % p ^ i + (n - k) % p ^ i) (Finset.Ico 1 b)).card


/-- If `e : C ≌ D` is an equivalence of categories, and `iso : e.functor ≅ G` is
an isomorphism, then there is an equivalence of categories whose functor is `G`. -/
@[simps!]
def changeFunctor (e : C ≌ D) {G : C ⥤ D} (iso : e.functor ≅ G) : C ≌ D

{C : Type u₁}
[CategoryTheory.Category.{v₁, u₁} C]
{D : Type u₂}
[CategoryTheory.Category.{v₂, u₂} D]
(e : C ≌ D)
{G : CategoryTheory.Functor C D}
(iso : e.functor ≅ G)
(X : C)

(e.changeFunctor iso).unitIso.hom.app X =
  CategoryTheory.CategoryStruct.comp (e.unitIso.hom.app X) (e.inverse.map (iso.hom.app X))


@[simp]
theorem isConj_iff_eq {α : Type*} [CommMonoid α] {a b : α} : IsConj a b ↔ a = b


protected theorem le_of_add_le_add_left : a ≠ ∞ → a + b ≤ a + c → b ≤ c


@[simp]
theorem val_neg : ∀ y : HomogeneousLocalization 𝒜 x, (-y).val = -y.val

{ι : Type u_1}
{R : Type u_2}
{A : Type u_3}
[CommRing R]
[CommRing A]
[Algebra R A]
{𝒜 : ι → Submodule R A}
{x : Submonoid A}
(y : HomogeneousLocalization 𝒜 x)


lemma toEquiv_injective : Injective (toEquiv : (G ≃+c[a, b] H) → G ≃ H)

{G : Type u_1}
{H : Type u_2}
[Add G]
[Add H]
{a : G}
{b : H}


theorem hasSum_conj' {f : α → ℂ} {x : ℂ} : HasSum (fun x => conj (f x)) (conj x) ↔ HasSum f x

HasSum (fun x => (starRingEnd ℂ) (f x)) ((starRingEnd ℂ) x) ↔ HasSum f x


/-- If `a ∈ s` is known, see also `Finset.card_erase_of_mem` and `Finset.erase_eq_of_not_mem`. -/
theorem card_erase_eq_ite : (s.erase a).card = if a ∈ s then s.card - 1 else s.card

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


/-- Proof that `H.evalAt x = H(0 ⟶ 1, x ⟶ x)`, with the appropriate casts -/
theorem evalAt_eq (x : X) : ⟦H.evalAt x⟧ = hcast (H.apply_zero x).symm ≫
    (πₘ H.uliftMap).map (prodToProdTopI uhpath01 (𝟙 (fromTop x))) ≫
      hcast (H.apply_one x).symm.symm

{X Y : TopCat}
{f g : C(↑X, ↑Y)}
(H : f.Homotopy g)
(x : ↑X)

⟦H.evalAt x⟧ =
  ContinuousMap.Homotopy.hcast ⋯ ≫
    (π.map H.uliftMap).map
        (ContinuousMap.Homotopy.prodToProdTopI unitInterval.uhpath01 (𝟙 (FundamentalGroupoid.fromTop x))) ≫
      ContinuousMap.Homotopy.hcast ⋯


@[measurability]
theorem measurable_im : Measurable (im : 𝕜 → ℝ)


@[simp] theorem not_irrational_ofNat (n : ℕ) [n.AtLeastTwo] :
    ¬Irrational (no_index (OfNat.ofNat n))


@[simp]
theorem sup_natCast : sup Nat.cast = ω


theorem surjective (f : M ≃[L] N) : Function.Surjective f

{L : FirstOrder.Language}
{M : Type w}
{N : Type w'}
[L.Structure M]
[L.Structure N]
(f : L.Equiv M N)


/-- If the orthogonal projection to `K` is well-defined, then a vector splits as the sum of its
orthogonal projections onto a complete submodule `K` and onto the orthogonal complement of `K`. -/
theorem orthogonalProjection_add_orthogonalProjection_orthogonal [HasOrthogonalProjection K]
    (w : E) : (orthogonalProjection K w : E) + (orthogonalProjection Kᗮ w : E) = w

{𝕜 : Type u_1}
{E : Type u_2}
[RCLike 𝕜]
[NormedAddCommGroup E]
[InnerProductSpace 𝕜 E]
(K : Submodule 𝕜 E)
[HasOrthogonalProjection K]
(w : E)

↑((orthogonalProjection K) w) + ↑((orthogonalProjection Kᗮ) w) = w


theorem pimage_inter [DecidableEq α] : (s ∩ t).pimage f ⊆ s.pimage f ∩ t.pimage f

{α : Type u_1}
{β : Type u_2}
[DecidableEq β]
{f : α →. β}
[(x : α) → Decidable (f x).Dom]
{s t : Finset α}
[DecidableEq α]

Finset.pimage f (s ∩ t) ⊆ Finset.pimage f s ∩ Finset.pimage f t


theorem edist_def (f g : α →₁[μ] β) : edist f g = ∫⁻ a, edist (f a) (g a) ∂μ

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

edist f g = ∫⁻ (a : α), edist (↑↑f a) (↑↑g a) ∂μ


theorem HasDerivAt.ccos (hf : HasDerivAt f f' x) :
    HasDerivAt (fun x => Complex.cos (f x)) (-Complex.sin (f x) * f') x

{f : ℂ → ℂ}
{f' x : ℂ}
(hf : HasDerivAt f f' x)


/-- Given linear maps `f : M → Q`, `g : N → S`, and `h : P → T`, if we identify `(M ⊗ N) ⊗ P`
with `M ⊗ (N ⊗ P)` and `(Q ⊗ S) ⊗ T` with `Q ⊗ (S ⊗ T)`, then this lemma states that
`f ⊗ (g ⊗ h) = (f ⊗ g) ⊗ h`. -/
lemma map_map_comp_assoc_eq (f : M →ₗ[R] Q) (g : N →ₗ[R] S) (h : P →ₗ[R] T) :
    map f (map g h) ∘ₗ TensorProduct.assoc R M N P =
      TensorProduct.assoc R Q S T ∘ₗ map (map f g) h

{R : Type u_1}
[CommSemiring R]
{M : Type u_4}
{N : Type u_5}
{P : Type u_6}
{Q : Type u_7}
{S : Type u_8}
{T : Type u_9}
[AddCommMonoid M]
[AddCommMonoid N]
[AddCommMonoid P]
[AddCommMonoid Q]
[AddCommMonoid S]
[AddCommMonoid T]
[Module R M]
[Module R N]
[Module R P]
[Module R Q]
[Module R S]
[Module R T]
(f : M →ₗ[R] Q)
(g : N →ₗ[R] S)
(h : P →ₗ[R] T)

TensorProduct.map f (TensorProduct.map g h) ∘ₗ ↑(TensorProduct.assoc R M N P) =
  ↑(TensorProduct.assoc R Q S T) ∘ₗ TensorProduct.map (TensorProduct.map f g) h


@[to_additive Iic_add_Iio_subset]
theorem Iic_mul_Iio_subset' (a b : α) : Iic a * Iio b ⊆ Iio (a * b)

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

[CovariantClass α α (Function.swap HAdd.hAdd) LT.lt]


@[simp] lemma div_mul_cancel₀ (a : G₀) (h : b ≠ 0) : a / b * b = a

{G₀ : Type u_3}
[GroupWithZero G₀]
{b : G₀}
(a : G₀)
(h : b ≠ 0)


theorem support_eq_singleton {f : α →₀ M} {a : α} :
    f.support = {a} ↔ f a ≠ 0 ∧ f = single a (f a)

{α : Type u_1}
{M : Type u_5}
[Zero M]
{f : α →₀ M}
{a : α}

f.support = {a} ↔ f a ≠ 0 ∧ f = Finsupp.single a (f a)


theorem Differentiable.norm (hf : Differentiable ℝ f) (h0 : ∀ x, f x ≠ 0) :
    Differentiable ℝ fun y => ‖f y‖

(𝕜 : Type u_1)
{E : Type u_2}
[RCLike 𝕜]
[NormedAddCommGroup E]
[InnerProductSpace 𝕜 E]
[NormedSpace ℝ E]
{G : Type u_4}
[NormedAddCommGroup G]
[NormedSpace ℝ G]
{f : G → E}
(hf : Differentiable ℝ f)
(h0 : ∀ (x : G), f x ≠ 0)


@[simp]
theorem add_left [Distrib R] {a b c : R} : Commute a c → Commute b c → Commute (a + b) c


theorem condexpL1_undef (hf : ¬Integrable f μ) : condexpL1 hm μ f = 0

{α : Type u_1}
{F' : Type u_4}
[NormedAddCommGroup F']
[NormedSpace ℝ F']
[CompleteSpace F']
{m m0 : MeasurableSpace α}
{μ : MeasureTheory.Measure α}
{hm : m ≤ m0}
[MeasureTheory.SigmaFinite (μ.trim hm)]
{f : α → F'}
(hf : ¬MeasureTheory.Integrable f μ)


lemma mul_self_le_mul_self (h : m ≤ n) : m * m ≤ n * n


theorem OrdConnected.preimage_anti {f : β → α} (hs : OrdConnected s) (hf : Antitone f) :
    OrdConnected (f ⁻¹' s)

{α : Type u_1}
{β : Type u_2}
[Preorder α]
[Preorder β]
{s : Set α}
{f : β → α}
(hs : s.OrdConnected)
(hf : Antitone f)


/-- The geometric pmf is measurable. -/
@[measurability]
lemma measurable_geometricPMFReal : Measurable (geometricPMFReal p)


theorem ContDiffWithinAt.congr_nhds (h : ContDiffWithinAt 𝕜 n f s x) {t : Set E}
    (hst : 𝓝[s] x = 𝓝[t] x) : ContDiffWithinAt 𝕜 n f t x

{𝕜 : Type u}
[NontriviallyNormedField 𝕜]
{E : Type uE}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{F : Type uF}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{s : Set E}
{f : E → F}
{x : E}
{n : ℕ∞}
(h : ContDiffWithinAt 𝕜 n f s x)
{t : Set E}
(hst : 𝓝[s] x = 𝓝[t] x)


theorem ofDual_le_iff {a : WithBot αᵒᵈ} {b : WithTop α} :
    WithBot.ofDual a ≤ b ↔ WithTop.toDual b ≤ a

{α : Type u_1}
[LE α]
{a : WithBot αᵒᵈ}
{b : WithTop α}


theorem stalkPushforward_iso_of_openEmbedding {f : X ⟶ Y} (hf : OpenEmbedding f) (F : X.Presheaf C)
    (x : X) : IsIso (F.stalkPushforward _ f x)

(C : Type u)
[CategoryTheory.Category.{v, u} C]
[CategoryTheory.Limits.HasColimits C]
{X Y : TopCat}
{f : X ⟶ Y}
(hf : OpenEmbedding ⇑f)
(F : TopCat.Presheaf C X)
(x : ↑X)

CategoryTheory.IsIso (TopCat.Presheaf.stalkPushforward C f F x)


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

∀ {X Y : LinOrd} (a : ↑X →o ↑Y), LinOrd.dual.map a = OrderHom.dual a


@[simp] theorem bot_prod : (⊥ : Filter α) ×ˢ g = ⊥

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


/-- The sum of two upper semicontinuous functions is upper semicontinuous. Formulated with
`[ContinuousAdd]`. The primed version of the lemma uses an explicit continuity assumption on
addition, for application to `EReal`. -/
theorem UpperSemicontinuousAt.add {f g : α → γ} (hf : UpperSemicontinuousAt f x)
    (hg : UpperSemicontinuousAt g x) : UpperSemicontinuousAt (fun z => f z + g z) x

{α : Type u_1}
[TopologicalSpace α]
{x : α}
{γ : Type u_4}
[LinearOrderedAddCommMonoid γ]
[TopologicalSpace γ]
[OrderTopology γ]
[ContinuousAdd γ]
{f g : α → γ}
(hf : UpperSemicontinuousAt f x)
(hg : UpperSemicontinuousAt g x)


theorem degree_eq_card_roots {p : K[X]} {i : K →+* L} (p_ne_zero : p ≠ 0) (hsplit : Splits i p) :
    p.degree = Multiset.card (p.map i).roots

{K : Type v}
{L : Type w}
[Field K]
[Field L]
{p : K[X]}
{i : K →+* L}
(p_ne_zero : p ≠ 0)
(hsplit : Polynomial.Splits i p)

p.degree = ↑(Multiset.card (Polynomial.map i p).roots)


/-- Given a Localization map `f : M →* N` for a Submonoid `S ⊆ M`, if a `CommMonoid` map
`g : M →* P` induces a map `f.lift hg : N →* P` then for all `z : N, v : P`, we have
`f.lift hg z = v ↔ g x = g y * v`, where `x : M, y ∈ S` are such that `z * f y = f x`. -/
@[to_additive
    "Given a Localization map `f : M →+ N` for a Submonoid `S ⊆ M`, if an
`AddCommMonoid` map `g : M →+ P` induces a map `f.lift hg : N →+ P` then for all
`z : N, v : P`, we have `f.lift hg z = v ↔ g x = g y + v`, where `x : M, y ∈ S` are such that
`z + f y = f x`."]
theorem lift_spec (z v) : f.lift hg z = v ↔ g (f.sec z).1 = g (f.sec z).2 * v

{M : Type u_1}
[CommMonoid M]
{S : Submonoid M}
{N : Type u_2}
[CommMonoid N]
{P : Type u_3}
[CommMonoid P]
(f : S.LocalizationMap N)
{g : M →* P}
(hg : ∀ (y : ↥S), IsUnit (g ↑y))
(z : N)
(v : P)

(f.lift hg) z = v ↔ g (f.sec z).1 = g ↑(f.sec z).2 * v


theorem lt_asymm {a b : α} (h : a < b) : ¬b < a

{α : Type u}
[Preorder α]
{a b : α}
(h : a < b)


theorem continuous_iInf_dom {t₁ : ι → TopologicalSpace α} {t₂ : TopologicalSpace β} {i : ι} :
    Continuous[t₁ i, t₂] f → Continuous[iInf t₁, t₂] f

{α : Type u}
{β : Type v}
{f : α → β}
{ι : Sort u_2}
{t₁ : ι → TopologicalSpace α}
{t₂ : TopologicalSpace β}
{i : ι}


theorem isBounded_range_of_cauchy_map_cofinite {f : β → α} (hf : Cauchy (map f cofinite)) :
    IsBounded (range f)

(hf : Cauchy (Filter.map f Filter.cofinite))


theorem rightLim_le (h : x ≤ y) : rightLim f y ≤ f x

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


theorem comp_continuous_iff {α : Type*} [TopologicalSpace α] (e : M₁ ≃SL[σ₁₂] M₂) {f : α → M₁} :
    Continuous (e ∘ f) ↔ Continuous f

{R₁ : Type u_1}
{R₂ : Type u_2}
[Semiring R₁]
[Semiring R₂]
{σ₁₂ : R₁ →+* R₂}
{σ₂₁ : R₂ →+* R₁}
[RingHomInvPair σ₁₂ σ₂₁]
[RingHomInvPair σ₂₁ σ₁₂]
{M₁ : Type u_4}
[TopologicalSpace M₁]
[AddCommMonoid M₁]
{M₂ : Type u_6}
[TopologicalSpace M₂]
[AddCommMonoid M₂]
[Module R₁ M₁]
[Module R₂ M₂]
{α : Type u_9}
[TopologicalSpace α]
(e : M₁ ≃SL[σ₁₂] M₂)
{f : α → M₁}


lemma Rewrites.exists_parts {r : ContextFreeRule T N} {u v : List (Symbol T N)}
    (hyp : r.Rewrites u v) :
    ∃ p q : List (Symbol T N),
      u = p ++ [Symbol.nonterminal r.input] ++ q ∧ v = p ++ r.output ++ q

{T : Type uT}
{N : Type uN}
{r : ContextFreeRule T N}
{u v : List (Symbol T N)}
(hyp : r.Rewrites u v)

∃ p q, u = p ++ [Symbol.nonterminal r.input] ++ q ∧ v = p ++ r.output ++ q


@[to_additive (attr := simp)]
lemma coe_id {X : CommGrp} : (𝟙 X : X → X) = id


/-- Use `Quotient.out` to create a functor out of the thin skeleton. -/
@[simps]
noncomputable def fromThinSkeleton : ThinSkeleton C ⥤ C

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

∀ (a : Quotient (CategoryTheory.isIsomorphicSetoid C)), (CategoryTheory.ThinSkeleton.fromThinSkeleton C).obj a = a.out


/-- To prove that the lift of a supremum is bounded by some cardinal `t`,
it suffices to show that the lift of each cardinal is bounded by `t`. -/
theorem lift_iSup_le {ι : Type v} {f : ι → Cardinal.{w}} {t : Cardinal} (hf : BddAbove (range f))
    (w : ∀ i, lift.{u} (f i) ≤ t) : lift.{u} (iSup f) ≤ t

(w : ∀ (i : ι), Cardinal.lift.{u, w} (f i) ≤ t)


@[simp]
theorem ceil_nat : (Nat.ceil : ℕ → ℕ) = id


lemma mono_of_injective [HasCoproduct (fun (k : ((Set.range ι)ᶜ : Set I)) => X k.1)] :
    Mono (Cofan.IsColimit.desc hc₁ (fun i => c.inj (ι i)))

(c₁ : CategoryTheory.Limits.Cofan (X ∘ ι))

(hc : CategoryTheory.Limits.IsColimit c)

(hc₁ : CategoryTheory.Limits.IsColimit c₁)

[CategoryTheory.Limits.HasCoproduct fun k => X ↑k]

CategoryTheory.Mono (CategoryTheory.Limits.Cofan.IsColimit.desc hc₁ fun i => c.inj (ι i))


@[simp]
lemma ofNat_le_ofENat {m : ℕ} [m.AtLeastTwo] {n : ℕ∞} :
    no_index (OfNat.ofNat m : Cardinal) ≤ n ↔ OfNat.ofNat m ≤ n


@[simp]
theorem coeff_X_pow_mul (p : R⟦X⟧) (n d : ℕ) :
    coeff R (d + n) (X ^ n * p) = coeff R d p

{R : Type u_1}
[Semiring R]
(p : PowerSeries R)
(n d : ℕ)

(PowerSeries.coeff R (d + n)) (PowerSeries.X ^ n * p) = (PowerSeries.coeff R d) p


@[measurability]
theorem measurable_infNndist {s : Set α} : Measurable fun x => infNndist x s

{α : Type u_1}
[PseudoMetricSpace α]
[MeasurableSpace α]
[OpensMeasurableSpace α]
{s : Set α}

Measurable fun x => Metric.infNndist x s


@[simp] theorem isOrtho_inl_inl_iff {Q₁ : QuadraticMap R M₁ P} {Q₂ : QuadraticMap R M₂ P}
    (m₁ m₁' : M₁) :
    (Q₁.prod Q₂).IsOrtho (m₁, 0) (m₁', 0) ↔ Q₁.IsOrtho m₁ m₁'

{R : Type u_2}
{M₁ : Type u_3}
{M₂ : Type u_4}
{P : Type u_7}
[CommSemiring R]
[AddCommMonoid M₁]
[AddCommMonoid M₂]
[AddCommMonoid P]
[Module R M₁]
[Module R M₂]
[Module R P]
{Q₁ : QuadraticMap R M₁ P}
{Q₂ : QuadraticMap R M₂ P}
(m₁ m₁' : M₁)


/-- A stochastic process that frequently visits below `a` and above `b` has infinite upcrossings. -/
theorem upcrossings_eq_top_of_frequently_lt (hab : a < b) (h₁ : ∃ᶠ n in atTop, f n ω < a)
    (h₂ : ∃ᶠ n in atTop, b < f n ω) : upcrossings a b f ω = ∞

{f : ℕ → Ω → ℝ}

(h₁ : ∃ᶠ (n : ℕ) in Filter.atTop, f n ω < a)

(h₂ : ∃ᶠ (n : ℕ) in Filter.atTop, b < f n ω)


lemma sub_one_lt [ZeroLEOneClass α] [NeZero (R := α) 1]
    [CovariantClass α α (· + ·) (· < ·)]
    (a : α) : a - 1 < a

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


theorem AEFinStronglyMeasurable.ae_eq_of_forall_setIntegral_eq {f g : α → E}
    (hf_int_finite : ∀ s, MeasurableSet s → μ s < ∞ → IntegrableOn f s μ)
    (hg_int_finite : ∀ s, MeasurableSet s → μ s < ∞ → IntegrableOn g s μ)
    (hfg_eq : ∀ s : Set α, MeasurableSet s → μ s < ∞ → ∫ x in s, f x ∂μ = ∫ x in s, g x ∂μ)
    (hf : AEFinStronglyMeasurable f μ) (hg : AEFinStronglyMeasurable g μ) : f =ᵐ[μ] g

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

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

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

(hf : MeasureTheory.AEFinStronglyMeasurable f μ)

(hg : MeasureTheory.AEFinStronglyMeasurable g μ)


@[to_additive]
theorem subgroupOf_sup (A A' B : Subgroup G) (hA : A ≤ B) (hA' : A' ≤ B) :
    (A ⊔ A').subgroupOf B = A.subgroupOf B ⊔ A'.subgroupOf B

{G : Type u_1}
[AddGroup G]
(A A' B : AddSubgroup G)
(hA : A ≤ B)
(hA' : A' ≤ B)

(A ⊔ A').addSubgroupOf B = A.addSubgroupOf B ⊔ A'.addSubgroupOf B


@[to_additive]
protected theorem eq_inv_of_mul_eq_one_right {a : α} (h : a * u = 1) : a = ↑u⁻¹

{α : Type u}
[AddMonoid α]
{u : AddUnits α}
{a : α}
(h : a + ↑u = 0)


theorem swap_comm (a : Array α) {i j : Fin a.size} : a.swap i j = a.swap j i

{α : Type u_1}
(a : Array α)
{i j : Fin a.size}


theorem Tendsto.prod_map_prod_atTop [SemilatticeSup γ] {F : Filter α} {G : Filter β} {f : α → γ}
    {g : β → γ} (hf : Tendsto f F atTop) (hg : Tendsto g G atTop) :
    Tendsto (Prod.map f g) (F ×ˢ G) atTop

{α : Type u_3}
{β : Type u_4}
{γ : Type u_5}
[SemilatticeSup γ]
{F : Filter α}
{G : Filter β}
{f : α → γ}
{g : β → γ}
(hf : Filter.Tendsto f F Filter.atTop)
(hg : Filter.Tendsto g G Filter.atTop)

Filter.Tendsto (Prod.map f g) (F ×ˢ G) Filter.atTop


/-- An algebra of sets is closed by finite intersections. -/
theorem biInter_mem {ι : Type*} (h𝒜 : IsSetAlgebra 𝒜) {s : ι → Set α} (S : Finset ι)
    (hs : ∀ i ∈ S, s i ∈ 𝒜) : ⋂ i ∈ S, s i ∈ 𝒜

{α : Type u_1}
{𝒜 : Set (Set α)}
{ι : Type u_2}
(h𝒜 : MeasureTheory.IsSetAlgebra 𝒜)
{s : ι → Set α}
(S : Finset ι)
(hs : ∀ i ∈ S, s i ∈ 𝒜)


/-- ε-characterization of the closure in pseudometric spaces-/
theorem mem_closure_iff {s : Set α} {a : α} : a ∈ closure s ↔ ∀ ε > 0, ∃ b ∈ s, dist a b < ε

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


/-- The identity lax functor. -/
@[simps]
def id (B : Type u₁) [Bicategory.{w₁, v₁} B] : LaxFunctor B B

(B : Type u₁)
[CategoryTheory.Bicategory B]

(CategoryTheory.LaxFunctor.id B).toPrelaxFunctor = CategoryTheory.PrelaxFunctor.id B


/-- Functor translating a comonoid object in a functor category
to a functor into the category of comonoid objects.
-/
@[simps]
def functor : Comon_ (C ⥤ D) ⥤ C ⥤ Comon_ D

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

CategoryTheory.Monoidal.ComonFunctorCategoryEquivalence.functor.obj A =
  CategoryTheory.Monoidal.ComonFunctorCategoryEquivalence.functorObj A


lemma SMulPosReflectLE.toSMulPosStrictMono [SMulPosReflectLE α β] : SMulPosStrictMono α β

{α : Type u_1}
{β : Type u_2}
[SMul α β]
[Preorder α]
[LinearOrder β]
[Zero β]
[SMulPosReflectLE α β]


@[simp]
theorem algebraMap_eq : algebraMap R R[X] = C


protected theorem add (hf : UnifTight f p μ) (hg : UnifTight g p μ)
    (hf_meas : ∀ i, AEStronglyMeasurable (f i) μ) (hg_meas : ∀ i, AEStronglyMeasurable (g i) μ) :
    UnifTight (f + g) p μ

{f g : ι → α → β}

(hf_meas : ∀ (i : ι), MeasureTheory.AEStronglyMeasurable (f i) μ)

(hg_meas : ∀ (i : ι), MeasureTheory.AEStronglyMeasurable (g i) μ)


theorem mk'_smul (r : R) (m : M) (s : S) : mk' f (r • m) s = r • mk' f m s

{R : Type u_1}
[CommSemiring R]
{S : Submonoid R}
{M : Type u_2}
{M' : Type u_3}
[AddCommMonoid M]
[AddCommMonoid M']
[Module R M]
[Module R M']
(f : M →ₗ[R] M')
[IsLocalizedModule S f]
(r : R)
(m : M)
(s : ↥S)

IsLocalizedModule.mk' f (r • m) s = r • IsLocalizedModule.mk' f m s


lemma sep_infs_le (s t : Set α) (a : α) :
    {b ∈ s ⊼ t | a ≤ b} = {b ∈ s | a ≤ b} ⊼ {b ∈ t | a ≤ b}

{α : Type u_2}
[SemilatticeInf α]
(s t : Set α)
(a : α)

{b | b ∈ s ⊼ t ∧ a ≤ b} = {b | b ∈ s ∧ a ≤ b} ⊼ {b | b ∈ t ∧ a ≤ b}


@[to_additive]
theorem extend_inv [Inv γ] (f : α → β) (g : α → γ) (e : β → γ) :
    Function.extend f g⁻¹ e⁻¹ = (Function.extend f g e)⁻¹

{α : Type u_1}
{β : Type u_2}
{γ : Type u_3}
[Neg γ]
(f : α → β)
(g : α → γ)
(e : β → γ)

Function.extend f (-g) (-e) = -Function.extend f g e


@[simp] lemma erase_wcovBy (s : Finset α) (a : α) : s.erase a ⩿ s

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


lemma add_eq_max_iff : m + n = max m n ↔ m = 0 ∨ n = 0


@[simp] theorem map_const (l : List α) (b : β) : map (Function.const α b) l = replicate l.length b

{α : Type u_1}
{β : Type u_2}
(l : List α)
(b : β)

List.map (Function.const α b) l = List.replicate l.length b


@[simp]
theorem not_isMax_iff : ¬IsMax a ↔ ∃ b, a < b


theorem splits_of_comp (j : L →+* F) {f : K[X]} (h : Splits (j.comp i) f)
    (roots_mem_range : ∀ a ∈ (f.map (j.comp i)).roots, a ∈ j.range) : Splits i f

(roots_mem_range : ∀ a ∈ (Polynomial.map (j.comp i) f).roots, a ∈ j.range)


@[simp]
theorem boundedBy_measure (μ : Measure α) : OuterMeasure.boundedBy μ = μ.toOuterMeasure

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

MeasureTheory.OuterMeasure.boundedBy ⇑μ = μ.toOuterMeasure


/-- If `Y` is Hausdorff and compactly generated, then proper maps `X → Y` are exactly
continuous maps such that the preimage of any compact set is compact.

This result should be the only one needed to link the definition of a proper map and
the criteria "preimage of compact sets are compact", but the notion of compactly generated space
is not yet in Mathlib (TODO) so we use it as an intermediate result to prove
`WeaklyLocallyCompactSpace.isProperMap_iff_isCompact_preimage` and
`SequentialSpace.isProperMap_iff_isCompact_preimage`. In the future those should be inferred
by typeclass inference. -/
theorem isProperMap_iff_isCompact_preimage [T2Space Y]
    (compactlyGenerated : ∀ s : Set Y, IsClosed s ↔ ∀ ⦃K⦄, IsCompact K → IsClosed (s ∩ K)) :
    IsProperMap f ↔ Continuous f ∧ ∀ ⦃K⦄, IsCompact K → IsCompact (f ⁻¹' K)

(compactlyGenerated : ∀ (s : Set Y), IsClosed s ↔ ∀ ⦃K : Set Y⦄, IsCompact K → IsClosed (s ∩ K))

IsProperMap f ↔ Continuous f ∧ ∀ ⦃K : Set Y⦄, IsCompact K → IsCompact (f ⁻¹' K)


@[to_additive const_sub]
theorem Filter.Tendsto.const_div' (b : G) {c : G} {f : α → G} {l : Filter α}
    (h : Tendsto f l (𝓝 c)) : Tendsto (fun k : α => b / f k) l (𝓝 (b / c))

{G : Type w}
{α : Type u}
[TopologicalSpace G]
[Div G]
[ContinuousDiv G]
(b : G)
{c : G}
{f : α → G}
{l : Filter α}
(h : Filter.Tendsto f l (𝓝 c))

Filter.Tendsto (fun k => b / f k) l (𝓝 (b / c))


theorem map_iSup {ι : Sort*} (f : R →+* S) (s : ι → Subsemiring R) :
    (iSup s).map f = ⨆ i, (s i).map f

{R : Type u}
{S : Type v}
[NonAssocSemiring R]
[NonAssocSemiring S]
{ι : Sort u_1}
(f : R →+* S)
(s : ι → Subsemiring R)

Subsemiring.map f (iSup s) = ⨆ i, Subsemiring.map f (s i)


theorem _root_.AlgHom.fieldRange_eq_map (f : E →ₐ[F] K) :
    f.fieldRange = IntermediateField.map f ⊤

{F : Type u_1}
[Field F]
{E : Type u_2}
[Field E]
[Algebra F E]
{K : Type u_3}
[Field K]
[Algebra F K]
(f : E →ₐ[F] K)


lemma rpow_natCast_mul (hx : 0 ≤ x) (n : ℕ) (z : ℝ) : x ^ (n * z) = (x ^ n) ^ z


theorem isHomogeneous_one : IsHomogeneous (1 : MvPolynomial σ R) 0

(σ : Type u_1)
(R : Type u_3)
[CommSemiring R]


/-- `X ⨯ -` has a comonad structure. This is sometimes called the writer comonad. -/
@[simps!]
def prodComonad : Comonad C

(CategoryTheory.prodComonad X).ε.app Y = CategoryTheory.Limits.prod.snd


lemma vInv_vInv (h : CatCommSq T L.functor R.functor B) :
    vInv B L.symm R.symm T (vInv T L R B h) = h

(h : CategoryTheory.CatCommSq T L.functor R.functor B)

CategoryTheory.CatCommSq.vInv B L.symm R.symm T (CategoryTheory.CatCommSq.vInv T L R B h) = h


@[to_additive]
theorem _root_.SemiconjBy.unop [Mul α] {a x y : αᵐᵒᵖ} (h : SemiconjBy a x y) :
    SemiconjBy (unop a) (unop y) (unop x)

{α : Type u_1}
[Mul α]
{a x y : αᵐᵒᵖ}
(h : SemiconjBy a x y)

SemiconjBy (MulOpposite.unop a) (MulOpposite.unop y) (MulOpposite.unop x)


theorem Prod.eta (p : α × β) : (p.1, p.2) = p

{α : Type u_1}
{β : Type u_2}
(p : α × β)


theorem mem_twoCocycles_iff (f : G × G → A) :
    f ∈ twoCocycles A ↔ ∀ g h j : G,
      f (g * h, j) + f (g, h) =
        A.ρ g (f (h, j)) + f (g, h * j)

{k G : Type u}
[CommRing k]
[Group G]
{A : Rep k G}
(f : G × G → CoeSort.coe A)

f ∈ groupCohomology.twoCocycles A ↔ ∀ (g h j : G), f (g * h, j) + f (g, h) = (A.ρ g) (f (h, j)) + f (g, h * j)


@[to_additive] private theorem toIsLeftCancelMul [UniqueProds G] : IsLeftCancelMul G


/-- A non zero weighted homogeneous polynomial of weighted degree `n` has weighted total degree
  `n`. -/
theorem weighted_total_degree [SemilatticeSup M] {w : σ → M} (hφ : IsWeightedHomogeneous w φ n)
    (h : φ ≠ 0) : weightedTotalDegree' w φ = n

(hφ : MvPolynomial.IsWeightedHomogeneous w φ n)

MvPolynomial.weightedTotalDegree' w φ = ↑n


theorem HasCompactSupport.mul_right (hf : HasCompactSupport f) : HasCompactSupport (f * f')

{α : Type u_2}
{β : Type u_4}
[TopologicalSpace α]
[MulZeroClass β]
{f f' : α → β}
(hf : HasCompactSupport f)


/-- A subset of a topological space is homeomorphic to its image under a homeomorphism.
-/
@[simps!]
def image (e : X ≃ₜ Y) (s : Set X) : s ≃ₜ e '' s

{X : Type u_1}
{Y : Type u_2}
[TopologicalSpace X]
[TopologicalSpace Y]
(e : X ≃ₜ Y)
(s : Set X)
(x : ↑s)


theorem sign_of_neg {r : ℝ} (hr : r < 0) : sign r = -1


theorem isIso_of_mono (h : IsKernelPair f a b) [Mono f] : IsIso a

{C : Type u}
[CategoryTheory.Category.{v, u} C]
{R X Y : C}
{f : X ⟶ Y}
{a b : R ⟶ X}
(h : CategoryTheory.IsKernelPair f a b)
[CategoryTheory.Mono f]


@[ext]
theorem ext {φ ψ : PresentedGroup rels →* G} (hx : ∀ (x : α), φ (.of x) = ψ (.of x)) : φ = ψ

(hx : ∀ (x : α), φ (PresentedGroup.of x) = ψ (PresentedGroup.of x))


theorem ediv_eq_zero_of_lt {a b : Int} (H1 : 0 ≤ a) (H2 : a < b) : a / b = 0


/-- Equation theorem for `Int.sub` when both arguments are `Int.ofNat` -/
private theorem Int.ofNat_sub_ofNat_of_lt {n m : Nat} (hlt : n < m) :
    (n : Int) - (m : Int) = -(↑(m - 1 - n) + 1)


@[simp]
theorem comp_id (f : PseudoEpimorphism α β) : f.comp (PseudoEpimorphism.id α) = f

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


@[simp]
theorem symm_toCoalgEquiv (e : A ≃ₐc[R] B) :
    e.symm = (e : A ≃ₗc[R] B).symm

{R : Type u}
{A : Type v}
{B : Type w}
[CommSemiring R]
[Semiring A]
[Semiring B]
[Algebra R A]
[Algebra R B]
[CoalgebraStruct R A]
[CoalgebraStruct R B]
(e : A ≃ₐc[R] B)


/-- A type-class version of `n ≠ 0`.  -/
class NeZero (n : R) : Prop where
  /-- The proposition that `n` is not zero. -/
  out : n ≠ 0

{R : Type u_1}
[Zero R]
{n : R}
[self : NeZero n]


/-- One subspace is not less than or equal to another if and only if it has a point not in the
second subspace. -/
theorem not_le_iff_exists (s1 s2 : AffineSubspace k P) : ¬s1 ≤ s2 ↔ ∃ p ∈ s1, p ∉ s2

{k : Type u_1}
{V : Type u_2}
{P : Type u_3}
[Ring k]
[AddCommGroup V]
[Module k V]
[S : AffineSpace V P]
(s1 s2 : AffineSubspace k P)


theorem comp_orderIso [Preorder α] [Preorder β] [Preorder γ] {f : α → β} {g : β → α}
    (h : IsOrderRightAdjoint f g) (e : γ ≃o α) : IsOrderRightAdjoint (f ∘ e) (e.symm ∘ g)

{α : Type u_1}
{β : Type u_2}
{γ : Type u_3}
[Preorder α]
[Preorder β]
[Preorder γ]
{f : α → β}
{g : β → α}
(h : IsOrderRightAdjoint f g)
(e : γ ≃o α)

IsOrderRightAdjoint (f ∘ ⇑e) (⇑e.symm ∘ g)


theorem rank_add_le (f g : V →ₗ[K] V') : rank (f + g) ≤ rank f + rank g

{K : Type u}
{V : Type v}
{V' : Type v'}
[DivisionRing K]
[AddCommGroup V]
[Module K V]
[AddCommGroup V']
[Module K V']
(f g : V →ₗ[K] V')


lemma cycles_ext_iff {A : C} (f₁ f₂ : A ⟶ S.cycles) :
    f₁ = f₂ ↔ f₁ ≫ S.iCycles = f₂ ≫ S.iCycles

f₁ = f₂ ↔ CategoryTheory.CategoryStruct.comp f₁ S.iCycles = CategoryTheory.CategoryStruct.comp f₂ S.iCycles


theorem ordConnected_setOf_ball_subset (x : α) (s : Set α) : OrdConnected { r | ball x r ⊆ s }

{α : Type u}
[PseudoEMetricSpace α]
(x : α)
(s : Set α)


/-- The functor sending each quiver to its path category. -/
@[simps]
def free : Quiv.{v, u} ⥤ Cat.{max u v, u}

∀ {X Y : CategoryTheory.Quiv} (F : X ⟶ Y) (X_1 : ↑((fun V => CategoryTheory.Cat.of (CategoryTheory.Paths ↑V)) X)),
  (CategoryTheory.Cat.free.map F).obj X_1 = F.obj X_1


@[simp]
theorem volume_Ioc {a b : ℝ} : volume (Ioc a b) = ofReal (b - a)

MeasureTheory.volume (Set.Ioc a b) = ENNReal.ofReal (b - a)


theorem infinite_univ_iff : (@univ α).Infinite ↔ Infinite α


theorem exists_pow_mul_eq_zero_of_res_basicOpen_eq_zero_of_isAffineOpen (X : Scheme)
    {U : X.Opens} (hU : IsAffineOpen U) (x f : Γ(X, U))
    (H : x |_ X.basicOpen f = 0) : ∃ n : ℕ, f ^ n * x = 0

(X : AlgebraicGeometry.Scheme)
{U : X.Opens}
(hU : AlgebraicGeometry.IsAffineOpen U)
(x f : ↑Γ(X, U))
(H : (x |_ X.basicOpen f) ⋯ = 0)


theorem lowerSemicontinuousAt_sum {f : ι → α → γ} {a : Finset ι}
    (ha : ∀ i ∈ a, LowerSemicontinuousAt (f i) x) :
    LowerSemicontinuousAt (fun z => ∑ i ∈ a, f i z) x

{f : ι → α → γ}


theorem SemilatticeInf.ext_inf {α} {A B : SemilatticeInf α}
    (H : ∀ x y : α, (haveI := A; x ≤ y) ↔ x ≤ y)
    (x y : α) :
    (haveI := A; x ⊓ y) = x ⊓ y

{α : Type u_1}
{A B : SemilatticeInf α}
(H : ∀ (x y : α), x ≤ y ↔ x ≤ y)
(x y : α)


theorem _root_.Set.Finite.nullMeasurableSet_sInter {s : Set (Set α)} (hs : s.Finite)
    (h : ∀ t ∈ s, NullMeasurableSet t μ) : NullMeasurableSet (⋂₀ s) μ

(h : ∀ t ∈ s, MeasureTheory.NullMeasurableSet t μ)

MeasureTheory.NullMeasurableSet (⋂₀ s) μ


/-- The preimage of a proper space under a Lipschitz homeomorphism is proper. -/
protected theorem LipschitzWith.properSpace [PseudoMetricSpace α] [MetricSpace β] [ProperSpace β]
    {K : ℝ≥0} {f : α ≃ₜ β} (hK : LipschitzWith K f) : ProperSpace α

{α : Type u_1}
{β : Type u_2}
[PseudoMetricSpace α]
[MetricSpace β]
[ProperSpace β]
{K : ℝ≥0}
{f : α ≃ₜ β}
(hK : LipschitzWith K ⇑f)


theorem not_eq_of_eq_false {a : Prop} (h : a = False) : Not a = True


theorem contMDiffAt_hom_bundle (f : M → LE₁E₂) {x₀ : M} {n : ℕ∞} :
    ContMDiffAt IM (IB.prod 𝓘(𝕜, F₁ →L[𝕜] F₂)) n f x₀ ↔
      ContMDiffAt IM IB n (fun x => (f x).1) x₀ ∧
        ContMDiffAt IM 𝓘(𝕜, F₁ →L[𝕜] F₂) n
          (fun x => inCoordinates F₁ E₁ F₂ E₂ (f x₀).1 (f x).1 (f x₀).1 (f x).1 (f x).2) x₀

[TopologicalSpace (Bundle.TotalSpace F₁ E₁)]

[TopologicalSpace (Bundle.TotalSpace F₂ E₂)]

ContMDiffAt IM (IB.prod 𝓘(𝕜, F₁ →L[𝕜] F₂)) n f x₀ ↔
  ContMDiffAt IM IB n (fun x => (f x).proj) x₀ ∧
    ContMDiffAt IM 𝓘(𝕜, F₁ →L[𝕜] F₂) n
      (fun x => ContinuousLinearMap.inCoordinates F₁ E₁ F₂ E₂ (f x₀).proj (f x).proj (f x₀).proj (f x).proj (f x).snd)
      x₀


theorem SmoothOn.contMDiffOn (h : SmoothOn I I' f s) : 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}
{n : ℕ∞}
(h : SmoothOn I I' f s)


theorem sometimes_spec {p : Prop} {α} [Nonempty α] (P : α → Prop) (f : p → α) (a : p)
    (h : P (f a)) : P (sometimes f)

{p : Prop}
{α : Sort u_1}
[Nonempty α]
(P : α → Prop)
(f : p → α)
(a : p)
(h : P (f a))


@[simp]
theorem symm_refl : (refl k P₁).symm = refl k P₁

{k : Type u_1}
{P₁ : Type u_2}
{V₁ : Type u_6}
[Ring k]
[AddCommGroup V₁]
[Module k V₁]
[AddTorsor V₁ P₁]
[TopologicalSpace P₁]

(ContinuousAffineEquiv.refl k P₁).symm = ContinuousAffineEquiv.refl k P₁


@[to_additive]
theorem inv_toGerm (f : α →ₘ[μ] γ) : f⁻¹.toGerm = f.toGerm⁻¹

{α : Type u_1}
{γ : Type u_3}
[MeasurableSpace α]
{μ : MeasureTheory.Measure α}
[TopologicalSpace γ]
[Group γ]
[TopologicalGroup γ]
(f : α →ₘ[μ] γ)


/-- If `x ∈ closure s` and `x + y ∈ interior s`, then `x + t y ∈ interior s` for `t ∈ (0, 1]`. -/
theorem Convex.add_smul_mem_interior' {s : Set E} (hs : Convex 𝕜 s) {x y : E} (hx : x ∈ closure s)
    (hy : x + y ∈ interior s) {t : 𝕜} (ht : t ∈ Ioc (0 : 𝕜) 1) : x + t • y ∈ interior s

{𝕜 : Type u_2}
{E : Type u_3}
[LinearOrderedField 𝕜]
[AddCommGroup E]
[Module 𝕜 E]
[TopologicalSpace E]
[TopologicalAddGroup E]
[ContinuousConstSMul 𝕜 E]
{s : Set E}
(hs : Convex 𝕜 s)
{x y : E}
(hx : x ∈ closure s)
(hy : x + y ∈ interior s)
{t : 𝕜}
(ht : t ∈ Set.Ioc 0 1)


lemma compProd_toKernel [IsFiniteKernel κ] [IsSFiniteKernel ν] (hf : IsCondKernelCDF f κ ν) :
    ν ⊗ₖ hf.toKernel f = κ

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

(hf : ProbabilityTheory.IsCondKernelCDF f κ ν)

ν ⊗ₖ ProbabilityTheory.IsCondKernelCDF.toKernel f hf = κ


lemma tendsto_Gamma_term_aux : Tendsto (fun s ↦ 1 / (s - 1) - 1 / Gammaℝ s / (s - 1)) (𝓝[≠] 1)
    (𝓝 (-(γ + Complex.log (4 * ↑π)) / 2))

Filter.Tendsto (fun s => 1 / (s - 1) - 1 / s.Gammaℝ / (s - 1)) (𝓝[≠] 1) (𝓝 (-(↑γ + Complex.log (4 * ↑π)) / 2))


@[to_additive]
theorem map_list_prod {F : Type*} [FunLike F M N] [MonoidHomClass F M N] (f : F) (l : List M) :
    f l.prod = (l.map f).prod

{M : Type u_4}
{N : Type u_5}
[Monoid M]
[Monoid N]
{F : Type u_8}
[FunLike F M N]
[MonoidHomClass F M N]
(f : F)
(l : List M)


/-- The equivalence between the nonsingular rational points on a Weierstrass curve `W` in Jacobian
coordinates with the nonsingular rational points on `W` in affine coordinates. -/
@[simps]
noncomputable def toAffineAddEquiv : W.Point ≃+ W.toAffine.Point

{F : Type v}
[Field F]
(W : WeierstrassCurve.Jacobian F)
(P : W.Point)

(WeierstrassCurve.Jacobian.Point.toAffineAddEquiv W) P = P.toAffineLift


@[simp]
theorem sumAddHom_comp_single [∀ i, AddZeroClass (β i)] [AddCommMonoid γ] (f : ∀ i, β i →+ γ)
    (i : ι) : (sumAddHom f).comp (singleAddHom β i) = f i

{ι : Type u}
{γ : Type w}
{β : ι → Type v}
[DecidableEq ι]
[(i : ι) → AddZeroClass (β i)]
[AddCommMonoid γ]
(f : (i : ι) → β i →+ γ)
(i : ι)

(DFinsupp.sumAddHom f).comp (DFinsupp.singleAddHom β i) = f i


@[simp] theorem and_not_self : ¬(a ∧ ¬a)


@[to_additive]
theorem prod_univ_seven [CommMonoid β] (f : Fin 7 → β) :
    ∏ i, f i = f 0 * f 1 * f 2 * f 3 * f 4 * f 5 * f 6

{β : Type u_2}
[CommMonoid β]
(f : Fin 7 → β)


theorem Real.mem_closure_iff {s : Set ℝ} {x : ℝ} :
    x ∈ closure s ↔ ∀ ε > 0, ∃ y ∈ s, |y - x| < ε


@[simp]
theorem mod_zero (a : Ordinal) : a % 0 = a


@[simp] theorem length_val (v : Vector α n) : v.val.length = n

{n : ℕ}
{α : Type u_1}
(v : Mathlib.Vector α n)


lemma inv_rnDeriv [SigmaFinite μ] [SigmaFinite ν] (hμν : μ ≪ ν) :
    (μ.rnDeriv ν)⁻¹ =ᵐ[μ] ν.rnDeriv μ

{α : Type u_1}
{m : MeasurableSpace α}
{μ ν : MeasureTheory.Measure α}
[MeasureTheory.SigmaFinite μ]
[MeasureTheory.SigmaFinite ν]
(hμν : μ ≪ ν)


theorem sin_int_mul_two_pi_sub (x : ℂ) (n : ℤ) : sin (n * (2 * π) - x) = -sin x

Complex.sin (↑n * (2 * ↑Real.pi) - x) = -Complex.sin x


theorem condexp_of_not_sigmaFinite (hm : m ≤ m0) (hμm_not : ¬SigmaFinite (μ.trim hm)) :
    μ[f|m] = 0

(hμm_not : ¬MeasureTheory.SigmaFinite (μ.trim hm))


@[simp]
theorem closedBall_diff_sphere : closedBall x ε \ sphere x ε = ball x ε

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

Metric.closedBall x ε \ Metric.sphere x ε = Metric.ball x ε


theorem IsSuccLimit.succ_lt_iff (hb : IsSuccLimit b) : succ a < b ↔ a < b

{α : Type u_1}
[PartialOrder α]
[SuccOrder α]
{a b : α}
(hb : Order.IsSuccLimit b)


@[to_additive]
theorem HasProd.unique {a₁ a₂ : α} [T2Space α] : HasProd f a₁ → HasProd f a₂ → a₁ = a₂

{α : Type u_1}
{β : Type u_2}
[AddCommMonoid α]
[TopologicalSpace α]
{f : β → α}
{a₁ a₂ : α}
[T2Space α]


/-- If `e : C ≌ D` is an equivalence of categories, then `functoriality F e.functor` induces an
equivalence between cocones over `F` and cocones over `F ⋙ e.functor`.
-/
@[simps]
def functorialityEquivalence (e : C ≌ D) : Cocone F ≌ Cocone (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.Cocones.functorialityEquivalence F e).unitIso =
  CategoryTheory.NatIso.ofComponents
    (fun c => CategoryTheory.Limits.Cocones.ext (e.unitIso.app ((𝟭 (CategoryTheory.Limits.Cocone F)).obj c).1) ⋯) ⋯


@[simp]
theorem image_Ioc (e : α ≃o β) (a b : α) : e '' Ioc a b = Ioc (e a) (e b)

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


@[simp]
theorem map_obj_arrow (f : X ⟶ Y) [Mono f] (g : MonoOver X) : ((map f).obj g).arrow = g.arrow ≫ f

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

((CategoryTheory.MonoOver.map f).obj g).arrow = CategoryTheory.CategoryStruct.comp g.arrow f


theorem liftAlgHom_apply {L S : Type*} [Field L] [CommSemiring S] [Algebra S K[X]] [Algebra S L]
    (φ : K[X] →ₐ[S] L) (hφ : K[X]⁰ ≤ L⁰.comap φ) (f : RatFunc K) :
    liftAlgHom φ hφ f = φ f.num / φ f.denom

{K : Type u}
[Field K]
{L : Type u_1}
{S : Type u_2}
[Field L]
[CommSemiring S]
[Algebra S K[X]]
[Algebra S L]
(φ : K[X] →ₐ[S] L)
(hφ : K[X]⁰ ≤ Submonoid.comap φ L⁰)
(f : RatFunc K)

(RatFunc.liftAlgHom φ hφ) f = φ f.num / φ f.denom


@[simp]
theorem induced_iInf {ι : Sort w} {t : ι → TopologicalSpace α} :
    (⨅ i, t i).induced g = ⨅ i, (t i).induced g

{α : Type u_1}
{β : Type u_2}
{g : β → α}
{ι : Sort w}
{t : ι → TopologicalSpace α}

TopologicalSpace.induced g (⨅ i, t i) = ⨅ i, TopologicalSpace.induced g (t i)


/-- The backward direction of the equivalence from coalgebras for the product comonad to the over
category.
-/
@[simps]
def overToCoalgebra : Over X ⥤ Coalgebra (prodComonad X)

∀ {X_1 Y : CategoryTheory.Over X} (g : X_1 ⟶ Y), ((CategoryTheory.overToCoalgebra X).map g).f = g.left


@[reassoc]
lemma mappingConeCompHomotopyEquiv_comm₁ :
    inr (map f (f ≫ g) (𝟙 X₁) g (by rw [id_comp])) ≫
      (mappingConeCompHomotopyEquiv f g).inv = (mappingConeCompTriangle f g).mor₂

CochainComplex.mappingCone.inr (CochainComplex.mappingCone.map f (f ≫ g) (𝟙 X₁) g ⋯) ≫
    (CochainComplex.mappingConeCompHomotopyEquiv f g).inv =
  (CochainComplex.mappingConeCompTriangle f g).mor₂


theorem prod_dirac (y : β) : μ.prod (dirac y) = map (fun x => (x, y)) μ

{α : Type u_1}
{β : Type u_3}
[MeasurableSpace α]
[MeasurableSpace β]
{μ : MeasureTheory.Measure α}
[MeasureTheory.SFinite μ]
(y : β)

μ.prod (MeasureTheory.Measure.dirac y) = MeasureTheory.Measure.map (fun x => (x, y)) μ


/-- The inner product between a vector and a multiple of a `π / 2` rotation of that vector is
zero. -/
@[simp]
theorem inner_smul_rotation_pi_div_two_right (x : V) (r : ℝ) :
    ⟪x, r • o.rotation (π / 2 : ℝ) x⟫ = 0

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


/-- The values before the squashed position stay the same. -/
theorem squashSeq_nth_of_lt {m : ℕ} (m_lt_n : m < n) : (squashSeq s n).get? m = s.get? m

{K : Type u_1}
{n : ℕ}
{s : Stream'.Seq (GenContFract.Pair K)}
[DivisionRing K]
{m : ℕ}
(m_lt_n : m < n)

(GenContFract.squashSeq s n).get? m = s.get? m


theorem Irreducible.dvd_comm [Monoid α] {p q : α} (hp : Irreducible p) (hq : Irreducible q) :
    p ∣ q ↔ q ∣ p

{α : Type u_1}
[Monoid α]
{p q : α}
(hp : Irreducible p)
(hq : Irreducible q)


@[simp]
theorem inter_singleton_eq_empty : s ∩ {a} = ∅ ↔ a ∉ s


theorem elementalStarAlgebra.bijective_characterSpaceToSpectrum :
    Function.Bijective (elementalStarAlgebra.characterSpaceToSpectrum a)

{A : Type u_1}
[NormedRing A]
[NormedAlgebra ℂ A]
[StarRing A]
[CstarRing A]
[StarModule ℂ A]
[CompleteSpace A]
(a : A)
[IsStarNormal a]


/-- The real power function with any exponent is not integrable on `(0, +∞)`. -/
theorem not_integrableOn_Ioi_rpow (s : ℝ) : ¬ IntegrableOn (fun x ↦ x ^ s) (Ioi (0 : ℝ))

¬MeasureTheory.IntegrableOn (fun x => x ^ s) (Set.Ioi 0) MeasureTheory.volume


/-- The diagram of the multifork attached to a presheaf
`F : Cᵒᵖ ⥤ A`, `S : C` and `E : PreOneHypercover S`. -/
@[simps]
def multicospanIndex (F : Cᵒᵖ ⥤ A) : MulticospanIndex A

{C : Type u}
[CategoryTheory.Category.{v, u} C]
{A : Type u_1}
[CategoryTheory.Category.{u_2, u_1} A]
{S : C}
(E : CategoryTheory.PreOneHypercover S)
(F : CategoryTheory.Functor Cᵒᵖ A)
(j : E.I₁')

(E.multicospanIndex F).snd j = F.map (E.p₂ j.snd).op


theorem spectralRadius_le_liminf_pow_nnnorm_pow_one_div (a : A) :
    spectralRadius 𝕜 a ≤ atTop.liminf fun n : ℕ => (‖a ^ n‖₊ : ℝ≥0∞) ^ (1 / n : ℝ)

(𝕜 : Type u_1)
{A : Type u_2}
[NormedField 𝕜]
[NormedRing A]
[NormedAlgebra 𝕜 A]
[CompleteSpace A]
(a : A)

spectralRadius 𝕜 a ≤ Filter.liminf (fun n => ↑‖a ^ n‖₊ ^ (1 / ↑n)) Filter.atTop


theorem Balanced.add (hs : Balanced 𝕜 s) (ht : Balanced 𝕜 t) : Balanced 𝕜 (s + t)

{𝕜 : Type u_1}
{E : Type u_3}
[SeminormedRing 𝕜]
[AddCommGroup E]
[Module 𝕜 E]
{s t : Set E}
(hs : Balanced 𝕜 s)
(ht : Balanced 𝕜 t)


theorem divInt_mul_divInt (n₁ n₂ : Int) {d₁ d₂} (z₁ : d₁ ≠ 0) (z₂ : d₂ ≠ 0) :
    (n₁ /. d₁) * (n₂ /. d₂) = (n₁ * n₂) /. (d₁ * d₂)

(n₁ n₂ : Int)
{d₁ d₂ : Int}
(z₁ : d₁ ≠ 0)
(z₂ : d₂ ≠ 0)

n₁ /. d₁ * (n₂ /. d₂) = n₁ * n₂ /. (d₁ * d₂)


theorem piecewise_apply' (a : α) (t : Set β) :
    piecewise hs κ η a t = if a ∈ s then κ a t else η a t

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

((ProbabilityTheory.Kernel.piecewise hs κ η) a) t = if a ∈ s then (κ a) t else (η a) t


@[simp]
theorem ι_isoCarrier_inv (i : D.J) :
    (D_).ι i ≫ D.isoCarrier.inv = (D.ι i).1.base

(D : AlgebraicGeometry.Scheme.GlueData)
(i : D.J)

D.toLocallyRingedSpaceGlueData.toSheafedSpaceGlueData.toPresheafedSpaceGlueData.toTopGlueData.ι i ≫ D.isoCarrier.inv =
  (D.ι i).val.base


/-- The gcd and lcm operations on positive integers correspond
 to the inf and sup operations on multisets. -/
theorem factorMultiset_gcd (m n : ℕ+) :
    factorMultiset (gcd m n) = factorMultiset m ⊓ factorMultiset n

(m.gcd n).factorMultiset = m.factorMultiset ⊓ n.factorMultiset


@[simp] lemma nextCoeffUp_zero : nextCoeffUp (0 : R[X]) = 0


/-- The integral defining the `Γ` function converges for complex `s` with `0 < re s`.

This is proved by reduction to the real case. -/
theorem GammaIntegral_convergent {s : ℂ} (hs : 0 < s.re) :
    IntegrableOn (fun x => (-x).exp * x ^ (s - 1) : ℝ → ℂ) (Ioi 0)

MeasureTheory.IntegrableOn (fun x => ↑(rexp (-x)) * ↑x ^ (s - 1)) (Set.Ioi 0) MeasureTheory.volume


theorem le_div_iff_mul_le (k0 : 0 < k) : x ≤ y / k ↔ x * k ≤ y


theorem IsPreconnected.union (x : α) {s t : Set α} (H1 : x ∈ s) (H2 : x ∈ t) (H3 : IsPreconnected s)
    (H4 : IsPreconnected t) : IsPreconnected (s ∪ t)

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


@[simp]
theorem rTensor_zero : rTensor M (0 : N →ₗ[R] P) = 0

{R : Type u_1}
[CommSemiring R]
(M : Type u_4)
{N : Type u_5}
{P : Type u_6}
[AddCommMonoid M]
[AddCommMonoid N]
[AddCommMonoid P]
[Module R M]
[Module R N]
[Module R P]


lemma update_piecewise [DecidableEq ι] (i : ι) (v : π i) :
    update (s.piecewise f g) i v = s.piecewise (update f i v) (update g i v)

{ι : Type u_1}
{π : ι → Sort u_2}
(s : Finset ι)
(f g : (i : ι) → π i)
[(j : ι) → Decidable (j ∈ s)]
[DecidableEq ι]
(i : ι)
(v : π i)

Function.update (s.piecewise f g) i v = s.piecewise (Function.update f i v) (Function.update g i v)


@[to_additive const_add]
theorem Monotone.const_mul' [CovariantClass α α (· * ·) (· ≤ ·)] (hf : Monotone f) (a : α) :
    Monotone fun x => a * f x

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


lemma addU_of_Z_eq_zero_left {P Q : Fin 3 → F} (hPz : P z = 0) : addU P Q = 0

{F : Type v}
[Field F]
{P Q : Fin 3 → F}
(hPz : P z = 0)


@[simp]
lemma zero_not_mem_slitPlane : 0 ∉ slitPlane


@[simp] theorem isPrefixOf_length_pos_nil {L : List α} (h : 0 < L.length) : isPrefixOf L [] = false

{α : Type u_1}
[BEq α]
{L : List α}
(h : 0 < L.length)


theorem card_fintypeIci : Fintype.card (Set.Ici a) = n - a


lemma ContinuousWithinAt.inf' (hf : ContinuousWithinAt f s x) (hg : ContinuousWithinAt g s x) :
    ContinuousWithinAt (f ⊓ g) s x

{L : Type u_1}
{X : Type u_2}
[TopologicalSpace L]
[TopologicalSpace X]
[Inf L]
[ContinuousInf L]
{f g : X → L}
{s : Set X}
{x : X}
(hf : ContinuousWithinAt f s x)
(hg : ContinuousWithinAt g s x)


@[simp]
lemma _root_.NonUnitalStarAlgHom.map_adjoin_singleton (f : F) (x : A) :
    map f (adjoin R {x}) = adjoin R {f x}

{F : Type v'}
{R : Type u}
{A : Type v}
{B : Type w}
[CommSemiring R]
[StarRing R]
[NonUnitalSemiring A]
[StarRing A]
[Module R A]
[IsScalarTower R A A]
[SMulCommClass R A A]
[StarModule R A]
[NonUnitalSemiring B]
[StarRing B]
[Module R B]
[IsScalarTower R B B]
[SMulCommClass R B B]
[StarModule R B]
[FunLike F A B]
[NonUnitalAlgHomClass F R A B]
[NonUnitalStarAlgHomClass F R A B]
(f : F)
(x : A)

NonUnitalStarSubalgebra.map f (NonUnitalStarAlgebra.adjoin R {x}) = NonUnitalStarAlgebra.adjoin R {f x}


lemma sinKernel_zero (x : ℝ) : sinKernel 0 x = 0


@[simp]
theorem closure_univ : closure (Set.univ : Set K) = ⊤


/-- If there exists an `a` such that `b = l a`, then `a = u b` is one such element. -/
theorem exists_eq_l (b : β) : (∃ a : α, b = l a) ↔ b = l (u b)

{α : Type u}
{β : Type v}
[Preorder α]
[PartialOrder β]
{l : α → β}
{u : β → α}
(gc : GaloisConnection l u)
(b : β)


nonrec theorem HasDerivAt.const_add (c : F) (hf : HasDerivAt f f' x) :
    HasDerivAt (fun x => c + f x) f' x

{𝕜 : Type u}
[NontriviallyNormedField 𝕜]
{F : Type v}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{f : 𝕜 → F}
{f' : F}
{x : 𝕜}
(c : F)
(hf : HasDerivAt f f' x)


theorem uniformity_comap {_ : UniformSpace β} (f : α → β) :
    𝓤[UniformSpace.comap f ‹_›] = comap (Prod.map f f) (𝓤 β)

∀ {x : UniformSpace β} (f : α → β), 𝓤 α = Filter.comap (Prod.map f f) (𝓤 β)


/--
This typeclass captures properties shared by ℝ and ℂ, with an API that closely matches that of ℂ.
-/
class RCLike (K : semiOutParam Type*) extends DenselyNormedField K, StarRing K,
    NormedAlgebra ℝ K, CompleteSpace K where
  re : K →+ ℝ
  im : K →+ ℝ
  /-- Imaginary unit in `K`. Meant to be set to `0` for `K = ℝ`. -/
  I : K
  I_re_ax : re I = 0
  I_mul_I_ax : I = 0 ∨ I * I = -1
  re_add_im_ax : ∀ z : K, 𝓚 (re z) + 𝓚 (im z) * I = z
  ofReal_re_ax : ∀ r : ℝ, re (𝓚 r) = r
  ofReal_im_ax : ∀ r : ℝ, im (𝓚 r) = 0
  mul_re_ax : ∀ z w : K, re (z * w) = re z * re w - im z * im w
  mul_im_ax : ∀ z w : K, im (z * w) = re z * im w + im z * re w
  conj_re_ax : ∀ z : K, re (conj z) = re z
  conj_im_ax : ∀ z : K, im (conj z) = -im z
  conj_I_ax : conj I = -I
  norm_sq_eq_def_ax : ∀ z : K, ‖z‖ ^ 2 = re z * re z + im z * im z
  mul_im_I_ax : ∀ z : K, im z * im I = im z
  /-- only an instance in the `ComplexOrder` locale -/
  [toPartialOrder : PartialOrder K]
  le_iff_re_im {z w : K} : z ≤ w ↔ re z ≤ re w ∧ im z = im w
  -- note we cannot put this in the `extends` clause
  [toDecidableEq : DecidableEq K]

{K : semiOutParam (Type u_1)}
[self : RCLike K]


theorem fold_eq_foldl (b : α) (s : Multiset α) :
    fold op b s = foldl op (right_comm _ hc.comm ha.assoc) b s

{α : Type u_1}
(op : α → α → α)
[hc : Std.Commutative op]
[ha : Std.Associative op]
(b : α)
(s : Multiset α)

Multiset.fold op b s = Multiset.foldl op ⋯ b s


theorem normUnit_X : normUnit (X : Polynomial R) = 1

{R : Type u}
[CommRing R]
[IsDomain R]
[NormalizationMonoid R]


theorem IsLUB.exists_between_sub_self (h : IsLUB s a) (hε : 0 < ε) : ∃ b ∈ s, a - ε < b ∧ b ≤ a

{α : Type u_1}
[LinearOrderedAddCommGroup α]
{s : Set α}
{a ε : α}
(h : IsLUB s a)
(hε : 0 < ε)


theorem Function.Surjective.lieAlgebra_isNilpotent [h₁ : IsNilpotent R L] {f : L →ₗ⁅R⁆ L'}
    (h₂ : Function.Surjective f) : IsNilpotent R L'

{R : Type u}
{L : Type v}
{L' : Type w}
[CommRing R]
[LieRing L]
[LieAlgebra R L]
[LieRing L']
[LieAlgebra R L']
[h₁ : LieAlgebra.IsNilpotent R L]
{f : L →ₗ⁅R⁆ L'}
(h₂ : Function.Surjective ⇑f)


/-- A variant of `List.prod_pos` for `CanonicallyOrderedCommSemiring`. -/
@[simp] lemma _root_.CanonicallyOrderedCommSemiring.list_prod_pos
    {α : Type*} [CanonicallyOrderedCommSemiring α] [Nontrivial α] :
    ∀ {l : List α}, 0 < l.prod ↔ (∀ x ∈ l, (0 : α) < x)

{α : Type u_2}
[CanonicallyOrderedCommSemiring α]
[Nontrivial α]
{l : List α}


@[simp]
theorem sigmaFinsuppAddEquivPiFinsupp_apply {α : Type*} {ιs : η → Type*} [AddMonoid α]
    (f : (Σj, ιs j) →₀ α) (j i) : sigmaFinsuppAddEquivPiFinsupp f j i = f ⟨j, i⟩

{η : Type u_14}
[Fintype η]
{α : Type u_16}
{ιs : η → Type u_17}
[AddMonoid α]
(f : (j : η) × ιs j →₀ α)
(j : η)
(i : ιs j)

(Finsupp.sigmaFinsuppAddEquivPiFinsupp f j) i = f ⟨j, i⟩


/-- The limit cone for the product over an index type with exactly one term. -/
@[simps]
def limitConeOfUnique : LimitCone (Discrete.functor f)

(s : CategoryTheory.Limits.Cone (CategoryTheory.Discrete.functor f))

(CategoryTheory.Limits.limitConeOfUnique f).isLimit.lift s = s.π.app default


/-- If `A` is a topological module over a commutative `R` with compatible actions,
then `star` is a continuous semilinear equivalence. -/
@[simps!]
def starL (R : Type*) {A : Type*} [CommSemiring R] [StarRing R] [AddCommMonoid A]
    [StarAddMonoid A] [Module R A] [StarModule R A] [TopologicalSpace A] [ContinuousStar A] :
    A ≃L⋆[R] A

(R : Type u_1)
{A : Type u_2}
[CommSemiring R]
[StarRing R]
[AddCommMonoid A]
[StarAddMonoid A]
[Module R A]
[StarModule R A]
[TopologicalSpace A]
[ContinuousStar A]


@[reassoc (attr := simp)]
theorem ι_preservesColimitsIso_inv (j : J) :
    colimit.ι _ j ≫ (preservesColimitIso G F).inv = G.map (colimit.ι F j)

CategoryTheory.CategoryStruct.comp (CategoryTheory.Limits.colimit.ι (F.comp G) j)
    (CategoryTheory.preservesColimitIso G F).inv =
  G.map (CategoryTheory.Limits.colimit.ι F j)


@[simp]
theorem TwoP_swap_comp_forget_to_Bipointed :
    TwoP.swap ⋙ forget₂ TwoP Bipointed = forget₂ TwoP Bipointed ⋙ Bipointed.swap

TwoP.swap ⋙ CategoryTheory.forget₂ TwoP Bipointed = CategoryTheory.forget₂ TwoP Bipointed ⋙ Bipointed.swap


theorem left_triangle (X : LocallyRingedSpace) :
    SpecΓIdentity.inv.app (Γ.obj (op X)) ≫ (identityToΓSpec.app X).val.c.app (op ⊤) = 𝟙 _

CategoryTheory.CategoryStruct.comp
    (AlgebraicGeometry.LocallyRingedSpace.SpecΓIdentity.inv.app
      (AlgebraicGeometry.LocallyRingedSpace.Γ.obj (Opposite.op X)))
    ((AlgebraicGeometry.identityToΓSpec.app X).val.c.app (Opposite.op ⊤)) =
  CategoryTheory.CategoryStruct.id
    ((CategoryTheory.Functor.id CommRingCat).obj (AlgebraicGeometry.LocallyRingedSpace.Γ.obj (Opposite.op X)))


theorem HasBasis.le_basis_iff (hl : l.HasBasis p s) (hl' : l'.HasBasis p' s') :
    l ≤ l' ↔ ∀ i', p' i' → ∃ i, p i ∧ s i ⊆ s' i'

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

l ≤ l' ↔ ∀ (i' : ι'), p' i' → ∃ i, p i ∧ s i ⊆ s' i'


theorem skipLeft_wf (α : Type u) {β : Type v} {s : β → β → Prop} (hb : WellFounded s) :
    WellFounded (SkipLeft α s)


theorem glued_cover_cocycle (x y z : 𝒰.J) :
    gluedCoverT' 𝒰 x y z ≫ gluedCoverT' 𝒰 y z x ≫ gluedCoverT' 𝒰 z x y = 𝟙 _

{X : AlgebraicGeometry.Scheme}
(𝒰 : X.OpenCover)
(x y z : 𝒰.J)

𝒰.gluedCoverT' x y z ≫ 𝒰.gluedCoverT' y z x ≫ 𝒰.gluedCoverT' z x y =
  𝟙
    (CategoryTheory.Limits.pullback (CategoryTheory.Limits.pullback.fst (𝒰.map x) (𝒰.map y))
      (CategoryTheory.Limits.pullback.fst (𝒰.map x) (𝒰.map z)))


/-- If `0 ≤ r < 1`, then `n * r ^ n` tends to zero. This is a specialized version of
`tendsto_self_mul_const_pow_of_abs_lt_one`, singled out for ease of application. -/
theorem tendsto_self_mul_const_pow_of_lt_one {r : ℝ} (hr : 0 ≤ r) (h'r : r < 1) :
    Tendsto (fun n ↦ n * r ^ n : ℕ → ℝ) atTop (𝓝 0)

Filter.Tendsto (fun n => ↑n * r ^ n) Filter.atTop (𝓝 0)


theorem Biprod.isIso_inl_iff_isZero (X Y : C) : IsIso (biprod.inl : X ⟶ X ⊞ Y) ↔ IsZero Y

CategoryTheory.IsIso CategoryTheory.Limits.biprod.inl ↔ CategoryTheory.Limits.IsZero Y


/-- `BipointedToPointed_snd` is inverse to `PointedToBipointed`. -/
@[simps!]
def pointedToBipointedCompBipointedToPointedSnd :
    pointedToBipointed ⋙ bipointedToPointedSnd ≅ 𝟭 _

(a : ((pointedToBipointed ⋙ bipointedToPointedSnd).obj X).X)

(pointedToBipointedCompBipointedToPointedSnd.hom.app X).toFun a = a


@[simp, norm_cast]
theorem coe_inf (s t : UpperSet α) : (↑(s ⊓ t) : Set α) = (s : Set α) ∪ t

{α : Type u_1}
[LE α]
(s t : UpperSet α)


@[simp]
theorem append_nil {u v : V} (p : G.Walk u v) : p.append nil = p

{V : Type u}
{G : SimpleGraph V}
{u v : V}
(p : G.Walk u v)


@[simp]
theorem upperCentralSeries_one : upperCentralSeries G 1 = center G

upperCentralSeries G 1 = Subgroup.center G


@[to_additive ContinuousWithinAt.norm]
theorem ContinuousWithinAt.norm' {s : Set α} {a : α} (h : ContinuousWithinAt f s a) :
    ContinuousWithinAt (fun x => ‖f x‖) s a

{α : Type u_3}
{E : Type u_6}
[SeminormedAddGroup E]
[TopologicalSpace α]
{f : α → E}
{s : Set α}
{a : α}
(h : ContinuousWithinAt f s a)


theorem of_hasBinaryProduct [HasBinaryProduct X Y] [HasZeroObject C] [HasZeroMorphisms C] :
    IsPullback Limits.prod.fst Limits.prod.snd (0 : X ⟶ 0) (0 : Y ⟶ 0)

CategoryTheory.IsPullback CategoryTheory.Limits.prod.fst CategoryTheory.Limits.prod.snd 0 0


@[simp]
theorem setIndependent_empty : SetIndependent (∅ : Set α)


theorem isCountablyGenerated_of_seq {f : Filter α} (h : ∃ x : ℕ → Set α, f = ⨅ i, 𝓟 (x i)) :
    f.IsCountablyGenerated

{α : Type u_1}
{f : Filter α}
(h : ∃ x, f = ⨅ i, 𝓟 (x i))


lemma T2Space.isSeparatedMap [T2Space X] (f : X → Y) : IsSeparatedMap f

{X : Type u_1}
{Y : Sort u_2}
[TopologicalSpace X]
[T2Space X]
(f : X → Y)


/-- If `e : C ≌ D` is an equivalence of categories, and `iso : e.functor ≅ G` is
an isomorphism, then there is an equivalence of categories whose inverse is `G`. -/
@[simps!]
def changeInverse (e : C ≌ D) {G : D ⥤ C} (iso : e.inverse ≅ G) : C ≌ D

{C : Type u₁}
[CategoryTheory.Category.{v₁, u₁} C]
{D : Type u₂}
[CategoryTheory.Category.{v₂, u₂} D]
(e : C ≌ D)
{G : CategoryTheory.Functor D C}
(iso : e.inverse ≅ G)

(e.changeInverse iso).functor = e.functor


@[simp]
lemma ofHoms_comp (φ : ∀ (p : ℤ), F.X p ⟶ G.X p) (ψ : ∀ (p : ℤ), G.X p ⟶ K.X p) :
    (ofHoms φ).comp (ofHoms ψ) (zero_add 0) = ofHoms (fun p => φ p ≫ ψ p)

{C : Type u}
[CategoryTheory.Category.{v, u} C]
[CategoryTheory.Preadditive C]
{F G K : CochainComplex C ℤ}
(φ : (p : ℤ) → F.X p ⟶ G.X p)
(ψ : (p : ℤ) → G.X p ⟶ K.X p)

(CochainComplex.HomComplex.Cochain.ofHoms φ).comp (CochainComplex.HomComplex.Cochain.ofHoms ψ) ⋯ =
  CochainComplex.HomComplex.Cochain.ofHoms fun p => φ p ≫ ψ p


protected theorem Nodup.dedup {l : List α} (h : l.Nodup) : l.dedup = l

{α : Type u_1}
[DecidableEq α]
{l : List α}
(h : l.Nodup)


theorem ordConnected_dual {s : Set α} : OrdConnected (OrderDual.ofDual ⁻¹' s) ↔ OrdConnected s

(⇑OrderDual.ofDual ⁻¹' s).OrdConnected ↔ s.OrdConnected


theorem mul_congr_left {a b : Int} (h₁ : a = b)  (c : Int) : a * c = b * c


@[to_additive]
theorem mul [Mul Y] ⦃f g : X → Y⦄ (hf : IsLocallyConstant f) (hg : IsLocallyConstant g) :
    IsLocallyConstant (f * g)

{X : Type u_1}
{Y : Type u_2}
[TopologicalSpace X]
[Add Y]
⦃f g : X → Y⦄
(hf : IsLocallyConstant f)
(hg : IsLocallyConstant g)


@[simp]
theorem pullbackConeOfLeftIso_snd : (pullbackConeOfLeftIso f g).snd = 𝟙 _

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

(CategoryTheory.Limits.pullbackConeOfLeftIso f g).snd = 𝟙 (CategoryTheory.Limits.pullbackConeOfLeftIso f g).pt


theorem isNoetherian_coeIdeal [IsNoetherianRing R₁] (I : Ideal R₁) :
    IsNoetherian R₁ (I : FractionalIdeal R₁⁰ K)

{R₁ : Type u_3}
[CommRing R₁]
{K : Type u_4}
[Field K]
[Algebra R₁ K]
[IsNoetherianRing R₁]
(I : Ideal R₁)


theorem filter_sum [DecidablePred p] (s : Finset ι) (f : ι → α →₀ M) :
    (∑ a ∈ s, f a).filter p = ∑ a ∈ s, filter p (f a)

{α : Type u_1}
{ι : Type u_4}
{M : Type u_5}
[AddCommMonoid M]
{p : α → Prop}
[DecidablePred p]
(s : Finset ι)
(f : ι → α →₀ M)

Finsupp.filter p (∑ a ∈ s, f a) = ∑ a ∈ s, Finsupp.filter p (f a)


@[fun_prop]
theorem hasFDerivWithinAt_const (c : F) (x : E) (s : Set E) :
    HasFDerivWithinAt (fun _ => c) (0 : E →L[𝕜] F) s x

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{F : Type u_3}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
(c : F)
(x : E)
(s : Set E)


theorem coe_injective : Function.Injective (coe : R → ℍ[R,c₁,c₂])


@[simp]
theorem compMeasurePreserving_val (g : Lp E p μb) (hf : MeasurePreserving f μ μb) :
    (compMeasurePreserving f hf g).1 = g.1.compMeasurePreserving f hf

(hf : MeasureTheory.MeasurePreserving f μ μb)

↑((MeasureTheory.Lp.compMeasurePreserving f hf) g) = (↑g).compMeasurePreserving f hf


@[simp]
theorem top_ne_ofNat (a : ℕ) [a.AtLeastTwo] : ⊤ ≠ (no_index (OfNat.ofNat a : ℕ∞))


theorem gc_map_comap (f : P₁ →ᵃ[k] P₂) : GaloisConnection (map f) (comap f)

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

GaloisConnection (AffineSubspace.map f) (AffineSubspace.comap f)


@[simp]
theorem distortion_disjUnion (h : Disjoint π₁.iUnion π₂.iUnion) :
    (π₁.disjUnion π₂ h).distortion = max π₁.distortion π₂.distortion

{π₁ π₂ : BoxIntegral.TaggedPrepartition I}


@[to_additive] lemma Monovary.mul_right (h₁ : Monovary f g₁) (h₂ : Monovary f g₂) :
    Monovary f (g₁ * g₂)

{ι : Type u_1}
{α : Type u_2}
{β : Type u_3}
[OrderedAddCommGroup α]
[LinearOrderedAddCommGroup β]
{f : ι → α}
{g₁ g₂ : ι → β}
(h₁ : Monovary f g₁)
(h₂ : Monovary f g₂)


/-- The `StarAlgEquiv` onto the range corresponding to an injective `StarAlgHom`. -/
@[simps]
noncomputable def _root_.StarAlgEquiv.ofInjective (f : A →⋆ₐ[R] B)
    (hf : Function.Injective f) : A ≃⋆ₐ[R] f.range

{R : Type u_2}
{A : Type u_3}
{B : Type u_4}
[CommSemiring R]
[StarRing R]
[Semiring A]
[Algebra R A]
[StarRing A]
[Semiring B]
[Algebra R B]
[StarRing B]
[StarModule R B]
(f : A →⋆ₐ[R] B)
(hf : Function.Injective ⇑f)
(a : A)

(StarAlgEquiv.ofInjective f hf) a = f.rangeRestrict a


theorem isBigO_const_mul_right_iff {g : α → 𝕜} {c : 𝕜} (hc : c ≠ 0) :
    (f =O[l] fun x => c * g x) ↔ f =O[l] g

{α : Type u_1}
{E : Type u_3}
{𝕜 : Type u_15}
[Norm E]
[NormedDivisionRing 𝕜]
{f : α → E}
{l : Filter α}
{g : α → 𝕜}
{c : 𝕜}
(hc : c ≠ 0)


theorem foldl_fixed' {f : α → β → α} {a : α} (hf : ∀ b, f a b = a) : ∀ l : List β, foldl f a l = a

{α : Type u}
{β : Type v}
{f : α → β → α}
{a : α}
(hf : ∀ (b : β), f a b = a)
(l : List β)


/-- Given two disjoint closed sets `s, t` in a Hausdorff σ-compact finite dimensional manifold,
there exists an infinitely smooth function that is equal to `0` exactly on `s` and to `1`
exactly on `t`. See also `exists_smooth_zero_one_of_isClosed` for a slightly weaker version. -/
theorem exists_msmooth_zero_iff_one_iff_of_isClosed {s t : Set M}
    (hs : IsClosed s) (ht : IsClosed t) (hd : Disjoint s t) :
    ∃ f : M → ℝ, Smooth I 𝓘(ℝ) f ∧ range f ⊆ Icc 0 1 ∧ (∀ x, x ∈ s ↔ f x = 0)
      ∧ (∀ x, x ∈ t ↔ f x = 1)

{E : Type uE}
[NormedAddCommGroup E]
[NormedSpace ℝ E]
[FiniteDimensional ℝ E]
{H : Type uH}
[TopologicalSpace H]
(I : ModelWithCorners ℝ E H)
{M : Type uM}
[TopologicalSpace M]
[ChartedSpace H M]
[SmoothManifoldWithCorners I M]
[SigmaCompactSpace M]
[T2Space M]
{s t : Set M}
(hs : IsClosed s)
(ht : IsClosed t)
(hd : Disjoint s t)

∃ f, Smooth I 𝓘(ℝ, ℝ) f ∧ Set.range f ⊆ Set.Icc 0 1 ∧ (∀ (x : M), x ∈ s ↔ f x = 0) ∧ ∀ (x : M), x ∈ t ↔ f x = 1


@[to_additive]
theorem le_iff_forall_one_lt_lt_mul' : a ≤ b ↔ ∀ ε, 1 < ε → a < b * ε

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

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


/-- Quotients of polynomial functors.

Roughly speaking, saying that `F` is a quotient of a polynomial functor means that for each `α`,
elements of `F α` are represented by pairs `⟨a, f⟩`, where `a` is the shape of the object and
`f` indexes the relevant elements of `α`, in a suitably natural manner.
-/
class QPF (F : Type u → Type u) extends Functor F where
  P : PFunctor.{u}
  abs : ∀ {α}, P α → F α
  repr : ∀ {α}, F α → P α
  abs_repr : ∀ {α} (x : F α), abs (repr x) = x
  abs_map : ∀ {α β} (f : α → β) (p : P α), abs (P.map f p) = f <$> abs p

{F : Type u → Type u}
[self : QPF F]
{α : Type u}
(x : F α)


@[simp]
theorem fst_mk (i : ι) (l : List ι) (f : ∀ i, α i) : (TProd.mk (i :: l) f).1 = f i

{ι : Type u}
{α : ι → Type v}
(i : ι)
(l : List ι)
(f : (i : ι) → α i)


theorem csSup_le' {s : Set α} {a : α} (h : a ∈ upperBounds s) : sSup s ≤ a

{α : Type u_1}
[ConditionallyCompleteLinearOrderBot α]
{s : Set α}
{a : α}
(h : a ∈ upperBounds s)


/-- A group is finitely generated if it is finitely generated as a submonoid of itself. -/
class Group.FG : Prop where
  out : (⊤ : Subgroup G).FG

{G : Type u_3}
[Group G]
[self : Group.FG G]


@[simp]
theorem symm_iff : e.symm.IsImage t s ↔ e.IsImage s t

{X : Type u_1}
{Y : Type u_3}
[TopologicalSpace X]
[TopologicalSpace Y]
{e : PartialHomeomorph X Y}
{s : Set X}
{t : Set Y}


theorem localization_comap_injective [Algebra R S] (M : Submonoid R) [IsLocalization M S] :
    Function.Injective (comap (algebraMap R S))

{R : Type u}
(S : Type v)
[CommSemiring R]
[CommSemiring S]
[Algebra R S]
(M : Submonoid R)
[IsLocalization M S]

Function.Injective ⇑(PrimeSpectrum.comap (algebraMap R S))


/-- For every prime `p` dividing the order of a finite additive group `G` there exists an element of
order `p` in `G`. This is the additive version of Cauchy's theorem. -/
theorem _root_.exists_prime_addOrderOf_dvd_card {G : Type*} [AddGroup G] [Fintype G] (p : ℕ)
    [hp : Fact p.Prime] (hdvd : p ∣ Fintype.card G) : ∃ x : G, addOrderOf x = p

{G : Type u_3}
[AddGroup G]
[Fintype G]
(p : ℕ)
[hp : Fact (Nat.Prime p)]
(hdvd : p ∣ Fintype.card G)


/--
The type `Coverage C` of coverages on `C`.
A coverage is a collection of *covering* presieves on every object `X : C`,
which satisfies a *pullback compatibility* condition.
Explicitly, this condition says that whenever `S` is a covering presieve for `X` and
`f : Y ⟶ X` is a morphism, then there exists some covering presieve `T` for `Y`
such that `T` factors through `S` along `f`.
-/
@[ext]
structure Coverage where
  /-- The collection of covering presieves for an object `X`. -/
  covering : ∀ (X : C), Set (Presieve X)
  /-- Given any covering sieve `S` on `X` and a morphism `f : Y ⟶ X`, there exists
    some covering sieve `T` on `Y` such that `T` factors through `S` along `f`. -/
  pullback : ∀ ⦃X Y : C⦄ (f : Y ⟶ X) (S : Presieve X) (_ : S ∈ covering X),
    ∃ (T : Presieve Y), T ∈ covering Y ∧ T.FactorsThruAlong S f

{C : Type u_1}
[CategoryTheory.Category.{u_2, u_1} C]
(self : CategoryTheory.Coverage C)
⦃X Y : C⦄
(f : Y ⟶ X)
(S : CategoryTheory.Presieve X)

S ∈ self.covering X → ∃ T ∈ self.covering Y, T.FactorsThruAlong S f


theorem Finite.inf_of_right {s : Set α} (h : s.Finite) (t : Set α) : (t ⊓ s).Finite

{α : Type u}
{s : Set α}
(h : s.Finite)
(t : Set α)


/-- Being filtered or empty is preserved by equivalence of categories. -/
theorem of_equivalence (h : C ≌ D) : IsFilteredOrEmpty D

{C : Type u}
[CategoryTheory.Category.{v, u} C]
[CategoryTheory.IsFilteredOrEmpty C]
{D : Type u₁}
[CategoryTheory.Category.{v₁, u₁} D]
(h : C ≌ D)


@[deprecated smul_mono_right (since := "2024-03-31")]
protected theorem smul_mono_right (h : N ≤ P) : I • N ≤ I • P

{R : Type u}
{M : Type v}
[CommSemiring R]
[AddCommMonoid M]
[Module R M]
{I : Ideal R}
{N P : Submodule R M}
(h : N ≤ P)


@[simp]
theorem top_prod_top : (⊤ : Subring R).prod (⊤ : Subring S) = ⊤

{R : Type u}
{S : Type v}
[Ring R]
[Ring S]


@[simp, norm_cast]
theorem sqrt_natCast (n : ℕ) : Int.sqrt (n : ℤ) = Nat.sqrt n


@[to_additive]
theorem SubgroupNormal.mem_comm {H K : Subgroup G} (hK : H ≤ K) [hN : (H.subgroupOf K).Normal]
    {a b : G} (hb : b ∈ K) (h : a * b ∈ H) : b * a ∈ H

{G : Type u_1}
[Group G]
{H K : Subgroup G}
(hK : H ≤ K)
[hN : (H.subgroupOf K).Normal]
{a b : G}
(hb : b ∈ K)
(h : a * b ∈ H)


theorem map_ofDual (f : α → β) (a : WithTop αᵒᵈ) :
    WithBot.map f (WithTop.ofDual a) = a.map (ofDual ∘ f)

{α : Type u_1}
{β : Type u_2}
(f : α → β)
(a : WithTop αᵒᵈ)

WithBot.map f (WithTop.ofDual a) = WithTop.map (⇑OrderDual.ofDual ∘ f) a


theorem power_def (α β : Type u) : #α ^ #β = #(β → α)

Cardinal.mk α ^ Cardinal.mk β = Cardinal.mk (β → α)


@[simp] lemma two_dvd_ne_zero : ¬2 ∣ n ↔ n % 2 = 1


/-- The symmetric version of Tonelli's Theorem: For `ℝ≥0∞`-valued almost everywhere measurable
functions on `α × β`, the integral of `f` is equal to the iterated integral, in reverse order. -/
theorem lintegral_prod_symm [SFinite μ] (f : α × β → ℝ≥0∞) (hf : AEMeasurable f (μ.prod ν)) :
    ∫⁻ z, f z ∂μ.prod ν = ∫⁻ y, ∫⁻ x, f (x, y) ∂μ ∂ν

{α : Type u_1}
{β : Type u_3}
[MeasurableSpace α]
[MeasurableSpace β]
{μ : MeasureTheory.Measure α}
{ν : MeasureTheory.Measure β}
[MeasureTheory.SFinite ν]
[MeasureTheory.SFinite μ]
(f : α × β → ℝ≥0∞)
(hf : AEMeasurable f (μ.prod ν))

∫⁻ (z : α × β), f z ∂μ.prod ν = ∫⁻ (y : β), ∫⁻ (x : α), f (x, y) ∂μ ∂ν


theorem Primrec.to_comp {α σ} [Primcodable α] [Primcodable σ] {f : α → σ} (hf : Primrec f) :
    Computable f

{α : Type u_1}
{σ : Type u_2}
[Primcodable α]
[Primcodable σ]
{f : α → σ}
(hf : Primrec f)


@[simp]
theorem map₂_mk_eq_prod (f : Filter α) (g : Filter β) : map₂ Prod.mk f g = f ×ˢ g

{α : Type u_1}
{β : Type u_3}
(f : Filter α)
(g : Filter β)


theorem mapsTo_toEnd_weightSpace_add_of_mem_rootSpace (α χ : H → R)
    {x : L} (hx : x ∈ rootSpace H α) :
    MapsTo (toEnd R L M x) (weightSpace M χ) (weightSpace M (α + χ))

(R : Type u_1)
(L : Type u_2)
[CommRing R]
[LieRing L]
[LieAlgebra R L]
(H : LieSubalgebra R L)
[LieAlgebra.IsNilpotent R ↥H]
(M : Type u_3)
[AddCommGroup M]
[Module R M]
[LieRingModule L M]
[LieModule R L M]
(α χ : ↥H → R)
{x : L}
(hx : x ∈ LieAlgebra.rootSpace H α)

Set.MapsTo ⇑((LieModule.toEnd R L M) x) ↑(LieModule.weightSpace M χ) ↑(LieModule.weightSpace M (α + χ))


theorem erase_subset (a : α) (s : Finset α) : erase s a ⊆ s

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


@[simp]
theorem comap_id (S : L.Substructure P) : S.comap (Hom.id _ _) = S

{L : FirstOrder.Language}
{P : Type u_2}
[L.Structure P]
(S : L.Substructure P)

FirstOrder.Language.Substructure.comap (FirstOrder.Language.Hom.id L P) S = S


theorem pure_injective : Injective (pure : α → Filter α)


/-- Multiplication in the colimit is independent of the chosen "maximum" in the filtered category.
In particular, this lemma allows us to "unfold" the definition of the multiplication of `x` and `y`,
using a custom object `k` and morphisms `f : x.1 ⟶ k` and `g : y.1 ⟶ k`.
-/
@[to_additive
      "Addition in the colimit is independent of the chosen \"maximum\" in the filtered
      category. In particular, this lemma allows us to \"unfold\" the definition of the addition of
      `x` and `y`, using a custom object `k` and morphisms `f : x.1 ⟶ k` and `g : y.1 ⟶ k`."]
theorem colimit_mul_mk_eq (x y : Σ j, F.obj j) (k : J) (f : x.1 ⟶ k) (g : y.1 ⟶ k) :
    M.mk.{v, u} F x * M.mk F y = M.mk F ⟨k, F.map f x.2 * F.map g y.2⟩

{J : Type v}
[CategoryTheory.SmallCategory J]
(F : J ⥤ AddMonCatMax)
[CategoryTheory.IsFiltered J]
(x y : (j : J) × ↑(F.obj j))
(k : J)
(f : x.fst ⟶ k)
(g : y.fst ⟶ k)

AddMonCat.FilteredColimits.M.mk F x + AddMonCat.FilteredColimits.M.mk F y =
  AddMonCat.FilteredColimits.M.mk F ⟨k, (F.map f) x.snd + (F.map g) y.snd⟩


@[reassoc (attr := simp)]
lemma map_ofInv_hom_id (s : Y ⟶ X) (hs : W s) (L : C ⥤ D) (hL : W.IsInvertedBy L) :
    (ofInv s hs).map L hL ≫ L.map s = 𝟙 _

{C : Type u_1}
{D : Type u_2}
[CategoryTheory.Category.{u_3, u_1} C]
[CategoryTheory.Category.{u_4, u_2} D]
(W : CategoryTheory.MorphismProperty C)
{X Y : C}
(s : Y ⟶ X)
(hs : W s)
(L : CategoryTheory.Functor C D)
(hL : W.IsInvertedBy L)

CategoryTheory.CategoryStruct.comp ((CategoryTheory.MorphismProperty.RightFraction.ofInv s hs).map L hL) (L.map s) =
  CategoryTheory.CategoryStruct.id (L.obj X)


theorem isJacobson_polynomial_iff_isJacobson : IsJacobson R[X] ↔ IsJacobson R

Ideal.IsJacobson (Polynomial R) ↔ Ideal.IsJacobson R


theorem functorPushforward_extend_eq {R : Presieve X} :
    (generate R).arrows.functorPushforward F = R.functorPushforward F

{C : Type u₁}
[CategoryTheory.Category.{v₁, u₁} C]
{D : Type u₂}
[CategoryTheory.Category.{v₂, u₂} D]
(F : CategoryTheory.Functor C D)
{X : C}
{R : CategoryTheory.Presieve X}

CategoryTheory.Presieve.functorPushforward F (CategoryTheory.Sieve.generate R).arrows =
  CategoryTheory.Presieve.functorPushforward F R


/-- The Hausdorff dimension of the range of a `C¹`-smooth function defined on a finite dimensional
real normed space is at most the dimension of its domain as a vector space over `ℝ`. -/
theorem ContDiff.dimH_range_le {f : E → F} (h : ContDiff ℝ 1 f) : dimH (range f) ≤ finrank ℝ E

{E : Type u_4}
{F : Type u_5}
[NormedAddCommGroup E]
[NormedSpace ℝ E]
[FiniteDimensional ℝ E]
[NormedAddCommGroup F]
[NormedSpace ℝ F]
{f : E → F}
(h : ContDiff ℝ 1 f)

dimH (Set.range f) ≤ ↑(FiniteDimensional.finrank ℝ E)


theorem domCoprod.summand_mk'' (a : Mᵢ [⋀^ιa]→ₗ[R'] N₁) (b : Mᵢ [⋀^ιb]→ₗ[R'] N₂)
    (σ : Equiv.Perm (ιa ⊕ ιb)) :
    domCoprod.summand a b (Quotient.mk'' σ) =
      Equiv.Perm.sign σ •
        (MultilinearMap.domCoprod ↑a ↑b : MultilinearMap R' (fun _ => Mᵢ) (N₁ ⊗ N₂)).domDomCongr
          σ

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

AlternatingMap.domCoprod.summand a b (Quotient.mk'' σ) =
  Equiv.Perm.sign σ • MultilinearMap.domDomCongr σ ((↑a).domCoprod ↑b)


@[simp]
theorem mkMetric_top : (mkMetric (fun _ => ∞ : ℝ≥0∞ → ℝ≥0∞) : Measure X) = ⊤

{X : Type u_2}
[EMetricSpace X]
[MeasurableSpace X]
[BorelSpace X]

(MeasureTheory.Measure.mkMetric fun x => ⊤) = ⊤


theorem subset_interior_iff : t ⊆ interior s ↔ ∃ U, IsOpen U ∧ t ⊆ U ∧ U ⊆ s

{X : Type u}
{s t : Set X}
[TopologicalSpace X]


@[to_additive] lemma oneLePart_def (f : ∀ i, α i) : f⁺ = fun i ↦ (f i)⁺

{ι : Type u_3}
{α : ι → Type u_4}
[(i : ι) → Lattice (α i)]
[(i : ι) → AddCommGroup (α i)]
(f : (i : ι) → α i)


theorem exp_bound_div_one_sub_of_interval' {x : ℝ} (h1 : 0 < x) (h2 : x < 1) :
    Real.exp x < 1 / (1 - x)


@[simp, mfld_simps]
theorem localTrivAsPartialEquiv_target :
    (Z.localTrivAsPartialEquiv i).target = (Z.localTriv i).target

{ι : Type u_1}
{B : Type u_2}
{F : Type u_3}
[TopologicalSpace B]
[TopologicalSpace F]
(Z : FiberBundleCore ι B F)
(i : ι)


lemma snd_prodMkRight (κ : Kernel α (β × γ)) (δ : Type*) [MeasurableSpace δ] :
    snd (prodMkRight δ κ) = prodMkRight δ (snd κ)

(κ : ProbabilityTheory.Kernel α (β × γ))

(ProbabilityTheory.Kernel.prodMkRight δ κ).snd = ProbabilityTheory.Kernel.prodMkRight δ κ.snd


@[simp]
theorem image_vsub_product : image₂ (· -ᵥ ·) s t = s -ᵥ t

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

Finset.image₂ (fun x x_1 => x -ᵥ x_1) s t = s -ᵥ t