lemma integral_preCDF_fst (ρ : Measure (α × ℝ)) (r : ℚ) [IsFiniteMeasure ρ] :
    ∫ x, (preCDF ρ r x).toReal ∂ρ.fst = (ρ.IicSnd r univ).toReal

{α : Type u_1}
{mα : MeasurableSpace α}
(ρ : MeasureTheory.Measure (α × ℝ))
(r : ℚ)
[MeasureTheory.IsFiniteMeasure ρ]

∫ (x : α), (ProbabilityTheory.preCDF ρ r x).toReal ∂ρ.fst = ((ρ.IicSnd ↑r) Set.univ).toReal


@[simp]
protected theorem neg (a b : α) : multiplicity a (-b) = multiplicity a b

{α : Type u_1}
[Ring α]
[DecidableRel fun x x_1 => x ∣ x_1]
(a b : α)


@[simp] lemma mem_compls : a ∈ sᶜˢ ↔ aᶜ ∈ s

{α : Type u_2}
[BooleanAlgebra α]
{s : Finset α}
{a : α}


@[to_additive (attr := simp)]
theorem dist_smul_Lp (c : Mᵈᵐᵃ) (f g : Lp E p μ) : dist (c • f) (c • g) = dist f g

[MeasureTheory.SMulInvariantMeasure M α μ]


/-- `WalkingParallelPair` as a category is equivalent to a special case of
`WalkingParallelFamily`.  -/
@[simps!]
def walkingParallelFamilyEquivWalkingParallelPair :
    WalkingParallelFamily.{w} (ULift Bool) ≌ WalkingParallelPair

CategoryTheory.Limits.walkingParallelFamilyEquivWalkingParallelPair.counitIso.hom.app X = CategoryTheory.eqToHom ⋯


lemma dvd_iff_div_mul_eq (n d : ℕ) : d ∣ n ↔ n / d * d = n


theorem leftDistributor_rightDistributor_assoc {J : Type _} [Fintype J]
    (X : C) (f : J → C) (Y : C) :
    (leftDistributor X f ⊗ asIso (𝟙 Y)) ≪≫ rightDistributor _ Y =
      α_ X (⨁ f) Y ≪≫
        (asIso (𝟙 X) ⊗ rightDistributor _ Y) ≪≫
          leftDistributor X _ ≪≫ biproduct.mapIso fun j => (α_ _ _ _).symm

(CategoryTheory.leftDistributor X f ⊗ CategoryTheory.asIso (CategoryTheory.CategoryStruct.id Y)) ≪≫
    CategoryTheory.rightDistributor (fun j => CategoryTheory.MonoidalCategory.tensorObj X (f j)) Y =
  CategoryTheory.MonoidalCategory.associator X (⨁ f) Y ≪≫
    (CategoryTheory.asIso (CategoryTheory.CategoryStruct.id X) ⊗ CategoryTheory.rightDistributor f Y) ≪≫
      (CategoryTheory.leftDistributor X fun j => CategoryTheory.MonoidalCategory.tensorObj (f j) Y) ≪≫
        CategoryTheory.Limits.biproduct.mapIso fun j => (CategoryTheory.MonoidalCategory.associator X (f j) Y).symm


/-- Any uncountable closed set in a second countable space contains a nonempty perfect subset. -/
theorem exists_perfect_nonempty_of_isClosed_of_not_countable [SecondCountableTopology α]
    (hclosed : IsClosed C) (hunc : ¬C.Countable) : ∃ D : Set α, Perfect D ∧ D.Nonempty ∧ D ⊆ C

{α : Type u_1}
[TopologicalSpace α]
{C : Set α}
[SecondCountableTopology α]
(hclosed : IsClosed C)
(hunc : ¬C.Countable)


@[simp]
theorem pi_mem_pi_iff [∀ i, NeBot (f i)] {I : Set ι} (hI : I.Finite) :
    I.pi s ∈ pi f ↔ ∀ i ∈ I, s i ∈ f i

{ι : Type u_1}
{α : ι → Type u_2}
{f : (i : ι) → Filter (α i)}
{s : (i : ι) → Set (α i)}
[∀ (i : ι), (f i).NeBot]
{I : Set ι}
(hI : I.Finite)

I.pi s ∈ Filter.pi f ↔ ∀ i ∈ I, s i ∈ f i


@[to_additive]
theorem Step.append_left : ∀ {L₁ L₂ L₃ : List (α × Bool)}, Step L₂ L₃ → Step (L₁ ++ L₂) (L₁ ++ L₃)

{α : Type u}
{L₁ L₂ L₃ : List (α × Bool)}

FreeGroup.Red.Step L₂ L₃ → FreeGroup.Red.Step (L₁ ++ L₂) (L₁ ++ L₃)


/-- Subsequent Fibonacci numbers are coprime,
  see https://proofwiki.org/wiki/Consecutive_Fibonacci_Numbers_are_Coprime -/
theorem fib_coprime_fib_succ (n : ℕ) : Nat.Coprime (fib n) (fib (n + 1))


theorem xor_not : ∀ (x y : Bool), xor x (!y) = !(xor x y)


theorem Ne.lt_of_le : a ≠ b → a ≤ b → a < b

{α : Type u_2}
[PartialOrder α]
{a b : α}


theorem condexp_of_not_le (hm_not : ¬m ≤ m0) : μ[f|m] = 0

{α : Type u_1}
{F' : Type u_3}
[NormedAddCommGroup F']
[NormedSpace ℝ F']
[CompleteSpace F']
{m m0 : MeasurableSpace α}
{μ : MeasureTheory.Measure α}
{f : α → F'}
(hm_not : ¬m ≤ m0)


@[simp, reassoc]
theorem colimitIsoColimitCurryCompColim_ι_ι_inv {j} {k} :
    colimit.ι ((curry.obj G).obj j) k ≫ colimit.ι (curry.obj G ⋙ colim) j ≫
      (colimitIsoColimitCurryCompColim G).inv  = colimit.ι _ (j, k)

[CategoryTheory.Limits.HasColimit (CategoryTheory.curry.obj G ⋙ CategoryTheory.Limits.colim)]

CategoryTheory.Limits.colimit.ι ((CategoryTheory.curry.obj G).obj j) k ≫
    CategoryTheory.Limits.colimit.ι (CategoryTheory.curry.obj G ⋙ CategoryTheory.Limits.colim) j ≫
      (CategoryTheory.Limits.colimitIsoColimitCurryCompColim G).inv =
  CategoryTheory.Limits.colimit.ι G (j, k)


@[reassoc]
theorem associator_naturality_right (f : a ⟶ b) (g : b ⟶ c) {h h' : c ⟶ d} (η : h ⟶ h') :
    (f ≫ g) ◁ η ≫ (α_ f g h').hom = (α_ f g h).hom ≫ f ◁ g ◁ η

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

CategoryTheory.CategoryStruct.comp (CategoryTheory.Bicategory.whiskerLeft (CategoryTheory.CategoryStruct.comp f g) η)
    (CategoryTheory.Bicategory.associator f g h').hom =
  CategoryTheory.CategoryStruct.comp (CategoryTheory.Bicategory.associator f g h).hom
    (CategoryTheory.Bicategory.whiskerLeft f (CategoryTheory.Bicategory.whiskerLeft g η))


/-- For an Abelian Lie algebra, characters are just linear forms. -/
@[simps! apply symm_apply]
def lieCharacterEquivLinearDual [IsLieAbelian L] : LieCharacter R L ≃ Module.Dual R L

{R : Type u}
{L : Type v}
[CommRing R]
[LieRing L]
[LieAlgebra R L]
[IsLieAbelian L]
(ψ : Module.Dual R L)

LieAlgebra.lieCharacterEquivLinearDual.symm ψ = { toLinearMap := ψ, map_lie' := ⋯ }


/-- `NegMemClass S G` states `S` is a type of subsets `s ⊆ G` closed under negation. -/
class NegMemClass (S G : Type*) [Neg G] [SetLike S G] : Prop where
  /-- `s` is closed under negation -/
  neg_mem : ∀ {s : S} {x}, x ∈ s → -x ∈ s

{S : Type u_5}
{G : Type u_6}
[Neg G]
[SetLike S G]
[self : NegMemClass S G]
{s : S}
{x : G}


@[simp]
theorem init_init (x : 𝕎 R) (n : ℕ) : init n (init n x) = init n x

{p : ℕ}
{R : Type u_1}
[CommRing R]
(x : 𝕎 R)
(n : ℕ)

WittVector.init n (WittVector.init n x) = WittVector.init n x


theorem card_Ioo : (Ioo a b).card = (∏ i, (Icc (a i) (b i)).card) - 2

{ι : Type u_1}
{α : ι → Type u_2}
[Fintype ι]
[DecidableEq ι]
[(i : ι) → DecidableEq (α i)]
[(i : ι) → PartialOrder (α i)]
[(i : ι) → LocallyFiniteOrder (α i)]
(a b : (i : ι) → α i)

(Finset.Ioo a b).card = ∏ i : ι, (Finset.Icc (a i) (b i)).card - 2


@[simp]
theorem truncateFun_add (x y : 𝕎 R) :
    truncateFun n (x + y) = truncateFun n x + truncateFun n y

{p : ℕ}
[hp : Fact (Nat.Prime p)]
(n : ℕ)
{R : Type u_1}
[CommRing R]
(x y : 𝕎 R)

WittVector.truncateFun n (x + y) = WittVector.truncateFun n x + WittVector.truncateFun n y


/-- The supremum of a subspace and the span of a set of points is equal to the span of the union of
the subspace and the set of points. -/
theorem sup_span {S : Set (ℙ K V)} {W : Subspace K V} : W ⊔ span S = span (W ∪ S)

{K : Type u_1}
{V : Type u_2}
[Field K]
[AddCommGroup V]
[Module K V]
{S : Set (Projectivization K V)}
{W : Projectivization.Subspace K V}

W ⊔ Projectivization.Subspace.span S = Projectivization.Subspace.span (↑W ∪ S)


theorem succ_coe_of_ne_top {a : α} (h : a ≠ ⊤) : succ (↑a : WithTop α) = ↑(succ a)

{α : Type u_1}
[DecidableEq α]
[PartialOrder α]
[OrderTop α]
[SuccOrder α]
{a : α}
(h : a ≠ ⊤)


lemma toSlashInvariantForm_intCast (Γ : Subgroup SL(2, ℤ)) (z : ℤ) :
    (z : ModularForm Γ 0).toSlashInvariantForm = z


/-- The obvious equivalence `ShortComplex (J ⥤ C) ≌ J ⥤ ShortComplex C`. -/
@[simps]
def functorEquivalence : ShortComplex (J ⥤ C) ≌ J ⥤ ShortComplex C

(CategoryTheory.ShortComplex.functorEquivalence J C).unitIso =
  CategoryTheory.ShortComplex.FunctorEquivalence.unitIso J C


/-- The canonical isomorphism `S.cycles ≅ kernel S.g`. -/
@[simps]
noncomputable def cyclesIsoKernel [HasKernel S.g] : S.cycles ≅ kernel S.g

S.cyclesIsoKernel.inv = S.liftCycles (CategoryTheory.Limits.kernel.ι S.g) ⋯


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

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

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


theorem hasDerivAt_zpow (m : ℤ) (x : 𝕜) (h : x ≠ 0 ∨ 0 ≤ m) :
    HasDerivAt (fun x => x ^ m) ((m : 𝕜) * x ^ (m - 1)) x

{𝕜 : Type u}
[NontriviallyNormedField 𝕜]
(m : ℤ)
(x : 𝕜)
(h : x ≠ 0 ∨ 0 ≤ m)

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


@[to_additive (attr := simp)]
theorem mem_op {x : Mᵐᵒᵖ} {S : Submonoid M} : x ∈ S.op ↔ x.unop ∈ S

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


theorem restrict_dirac' (hs : MeasurableSet s) [Decidable (a ∈ s)] :
    (Measure.dirac a).restrict s = if a ∈ s then Measure.dirac a else 0

{α : Type u_1}
[MeasurableSpace α]
{s : Set α}
{a : α}
(hs : MeasurableSet s)
[Decidable (a ∈ s)]

(MeasureTheory.Measure.dirac a).restrict s = if a ∈ s then MeasureTheory.Measure.dirac a else 0


theorem mk_surjective_eq_zero_iff :
    #{f : α → β | Surjective f} = 0 ↔ #α < #β ∨ (#α ≠ 0 ∧ #β = 0)

#↑{f | Function.Surjective f} = 0 ↔ #α < #β ∨ #α ≠ 0 ∧ #β = 0


/-- If `L/K` is a field extension and `b : ι → L`, then `discr K b` is the square of the
determinant of the matrix whose `(i, j)` coefficient is `σⱼ (b i)`, where `σⱼ : L →ₐ[K] E` is the
embedding in an algebraically closed field `E` corresponding to `j : ι` via a bijection
`e : ι ≃ (L →ₐ[K] E)`. -/
theorem discr_eq_det_embeddingsMatrixReindex_pow_two
    [Algebra.IsSeparable K L] (e : ι ≃ (L →ₐ[K] E)) :
    algebraMap K E (discr K b) = (embeddingsMatrixReindex K E b e).det ^ 2

{ι : Type w}
[DecidableEq ι]
[Fintype ι]
(K : Type u)
{L : Type v}
(E : Type z)
[Field K]
[Field L]
[Field E]
[Algebra K L]
[Algebra K E]
[Module.Finite K L]
[IsAlgClosed E]
(b : ι → L)
[Algebra.IsSeparable K L]
(e : ι ≃ (L →ₐ[K] E))

(algebraMap K E) (Algebra.discr K b) = (Algebra.embeddingsMatrixReindex K E b e).det ^ 2


theorem eq_X_add_C_of_natDegree_le_one (h : natDegree p ≤ 1) :
    p = C (p.coeff 1) * X + C (p.coeff 0)

{R : Type u}
[Semiring R]
{p : R[X]}
(h : p.natDegree ≤ 1)

p = Polynomial.C (p.coeff 1) * Polynomial.X + Polynomial.C (p.coeff 0)


@[simp]
theorem zero_mod (b : R) : 0 % b = 0

{R : Type u}
[EuclideanDomain R]
(b : R)


@[simp]
theorem toFun_eq_coe (f : A →ₐ[R] B) : f.toFun = f

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


/--
For an object `X` of a category `C`, a `Sieve X` is a set of morphisms to `X` which is closed under
left-composition.
-/
structure Sieve {C : Type u₁} [Category.{v₁} C] (X : C) where
  /-- the underlying presieve -/
  arrows : Presieve X
  /-- stability by precomposition -/
  downward_closed : ∀ {Y Z f} (_ : arrows f) (g : Z ⟶ Y), arrows (g ≫ f)

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

self.arrows f → ∀ (g : Z ⟶ Y), self.arrows (CategoryTheory.CategoryStruct.comp g f)


theorem stoppedProcess_eq'' [LinearOrder ι] [LocallyFiniteOrderBot ι] [AddCommMonoid E] (n : ι) :
    stoppedProcess u τ n = Set.indicator {a | n ≤ τ a} (u n) +
      ∑ i ∈ Finset.Iio n, Set.indicator {ω | τ ω = i} (u i)

{Ω : Type u_1}
{ι : Type u_3}
{τ : Ω → ι}
{E : Type u_4}
{u : ι → Ω → E}
[LinearOrder ι]
[LocallyFiniteOrderBot ι]
[AddCommMonoid E]
(n : ι)

MeasureTheory.stoppedProcess u τ n = {a | n ≤ τ a}.indicator (u n) + ∑ i ∈ Finset.Iio n, {ω | τ ω = i}.indicator (u i)


@[to_additive (attr := simp)]
theorem isUnit_unop {M} [Monoid M] {m : Mᵐᵒᵖ} : IsUnit (unop m) ↔ IsUnit m

IsAddUnit (AddOpposite.unop m) ↔ IsAddUnit m


theorem StrictMono.const_mul_of_neg [ExistsAddOfLE α] [PosMulStrictMono α]
    [CovariantClass α α (swap (· + ·)) (· < ·)] [ContravariantClass α α (swap (· + ·)) (· < ·)]
    (hf : StrictMono f) (ha : a < 0) : StrictAnti fun x => a * f x

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

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


/--
A class describing the property of preserving effective epimorphisms.
-/
class PreservesEffectiveEpis (F : C ⥤ D) : Prop where
  /--
  A functor preserves effective epimorphisms if it maps effective
  epimorphisms to effective epimorphisms.
  -/
  preserves : ∀ {X Y : C} (f : X ⟶ Y) [EffectiveEpi f], EffectiveEpi (F.map f)

{C : Type u_1}
[CategoryTheory.Category.{u_3, u_1} C]
{D : Type u_2}
[CategoryTheory.Category.{u_4, u_2} D]
{F : CategoryTheory.Functor C D}
[self : F.PreservesEffectiveEpis]
{X Y : C}
(f : X ⟶ Y)
[CategoryTheory.EffectiveEpi f]


theorem tendsto_atTop_diagonal [SemilatticeSup α] : Tendsto (fun a : α => (a, a)) atTop atTop

Filter.Tendsto (fun a => (a, a)) Filter.atTop Filter.atTop


lemma IsCondKernel.isSFiniteKernel (hρ : ρ ≠ 0) : IsSFiniteKernel ρCond

{α : Type u_1}
{Ω : Type u_3}
{mα : MeasurableSpace α}
{mΩ : MeasurableSpace Ω}
(ρ : MeasureTheory.Measure (α × Ω))
(ρCond : ProbabilityTheory.Kernel α Ω)
[ρ.IsCondKernel ρCond]
(hρ : ρ ≠ 0)


/-- 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 : D)

(e.changeFunctor iso).counitIso.hom.app X =
  CategoryTheory.CategoryStruct.comp (iso.inv.app (e.inverse.obj X)) (e.counitIso.hom.app X)


/-- The opposite of the left homology functor is the right homology functor. -/
@[simps!]
noncomputable def leftHomologyFunctorOpNatIso :
    (leftHomologyFunctor C).op ≅ opFunctor C ⋙ rightHomologyFunctor Cᵒᵖ

(CategoryTheory.ShortComplex.leftHomologyFunctorOpNatIso C).inv.app X = (Opposite.unop X).rightHomologyOpIso.hom


theorem factor_dvd_of_not_isUnit {f : K[X]} (hf1 : ¬IsUnit f) : factor f ∣ f

{K : Type v}
[Field K]
{f : K[X]}
(hf1 : ¬IsUnit f)


lemma support_mono (hfg : f ≤ g) : f.support ⊆ g.support

[(i : ι) → CanonicallyOrderedAddCommMonoid (α i)]

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


theorem coe_toNNReal_ae_eq {f : α → ℝ≥0∞} (hf : ∀ᵐ x ∂μ, f x < ∞) :
    (fun x => ((f x).toNNReal : ℝ≥0∞)) =ᵐ[μ] f

{α : Type u_1}
{m : MeasurableSpace α}
{μ : MeasureTheory.Measure α}
{f : α → ℝ≥0∞}
(hf : ∀ᵐ (x : α) ∂μ, f x < ⊤)


@[simp]
theorem dual_map (f : α →o β) (s : Interval α) : dual (s.map f) = s.dual.map (OrderHom.dual f)

{α : Type u_1}
{β : Type u_2}
[Preorder α]
[Preorder β]
(f : α →o β)
(s : Interval α)

Interval.dual (Interval.map f s) = Interval.map (OrderHom.dual f) (Interval.dual s)


lemma IsRatCondKernelCDFAux.setIntegral_iInf_rat_gt (hf : IsRatCondKernelCDFAux f κ ν)
    [IsFiniteKernel κ] [IsFiniteKernel ν] (a : α) (q : ℚ) {A : Set β} (hA : MeasurableSet A) :
    ∫ t in A, ⨅ r : Ioi q, f (a, t) r ∂(ν a) = (κ a (A ×ˢ Iic (q : ℝ))).toReal

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

{f : α × β → ℚ → ℝ}

(hf : ProbabilityTheory.IsRatCondKernelCDFAux f κ ν)

∫ (t : β) in A, ⨅ r, f (a, t) ↑r ∂ν a = ((κ a) (A ×ˢ Set.Iic ↑q)).toReal


@[simp]
lemma lie_lie : ⁅⁅x, y⁆, m⁆ = ⁅x, ⁅y, m⁆⁆ - ⁅y, ⁅x, m⁆⁆

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


@[simps (config := .lemmasOnly)]
instance instMonoidalCategoryStruct : MonoidalCategoryStruct (ModuleCat.{u} R)

{R : Type u}
[CommRing R]
(M N : ModuleCat R)

CategoryTheory.MonoidalCategory.tensorObj M N = ModuleCat.MonoidalCategory.tensorObj M N


lemma pow_dvd_pow_iff (ha₀ : a ≠ 0) (ha : ¬IsUnit a) : a ^ n ∣ a ^ m ↔ n ≤ m

{α : Type u_1}
[CancelCommMonoidWithZero α]
{a : α}
{m n : ℕ}
(ha₀ : a ≠ 0)
(ha : ¬IsUnit a)


theorem map_eq_iff {x y : E} : e x = e y ↔ x = y

{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₂)
{x y : E}


theorem sup_equiv_sup {a₁ b₁ a₂ b₂ : CauSeq α abs} (ha : a₁ ≈ a₂) (hb : b₁ ≈ b₂) :
    a₁ ⊔ b₁ ≈ a₂ ⊔ b₂

{α : Type u_1}
[LinearOrderedField α]
{a₁ b₁ a₂ b₂ : CauSeq α abs}
(ha : a₁ ≈ a₂)
(hb : b₁ ≈ b₂)

a₁ ⊔ b₁ ≈ a₂ ⊔ b₂


@[to_additive sub_const]
theorem Filter.Tendsto.div_const' {c : G} {f : α → G} {l : Filter α} (h : Tendsto f l (𝓝 c))
    (b : G) : Tendsto (f · / b) l (𝓝 (c / b))

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

Filter.Tendsto (fun x => f x - b) l (𝓝 (c - b))


/-- The empty scheme. -/
@[simps]
def empty : Scheme

↑AlgebraicGeometry.Scheme.empty.toPresheafedSpace = TopCat.of PEmpty.{u_1 + 1}


/-- Coercion to a function as an `AlgHom`. -/
@[simps]
def coeFnAlgHom : C^∞⟮I, N; 𝓘(𝕜, A), A⟯ →ₐ[𝕜] N → A

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{H : Type u_4}
[TopologicalSpace H]
{I : ModelWithCorners 𝕜 E H}
{N : Type u_6}
[TopologicalSpace N]
[ChartedSpace H N]
{A : Type u_10}
[NormedRing A]
[NormedAlgebra 𝕜 A]
[SmoothRing 𝓘(𝕜, A) A]

∀ (a : C^⊤⟮I, N; 𝓘(𝕜, A), A⟯) (a_1 : N), SmoothMap.coeFnAlgHom a a_1 = a a_1


@[to_additive (attr := measurability)]
theorem List.aemeasurable_prod' (l : List (α → M)) (hl : ∀ f ∈ l, AEMeasurable f μ) :
    AEMeasurable l.prod μ

{M : Type u_2}
{α : Type u_3}
[Monoid M]
[MeasurableSpace M]
[MeasurableMul₂ M]
{m : MeasurableSpace α}
{μ : MeasureTheory.Measure α}
(l : List (α → M))
(hl : ∀ f ∈ l, AEMeasurable f μ)


/-- Homeomorphism between `X` and `Y`, also called topological isomorphism -/
structure Homeomorph (X : Type*) (Y : Type*) [TopologicalSpace X] [TopologicalSpace Y]
    extends X ≃ Y where
  /-- The forward map of a homeomorphism is a continuous function. -/
  continuous_toFun : Continuous toFun := by continuity
  /-- The inverse map of a homeomorphism is a continuous function. -/
  continuous_invFun : Continuous invFun := by continuity

{X : Type u_4}
{Y : Type u_5}
[TopologicalSpace X]
[TopologicalSpace Y]
(self : X ≃ₜ Y)


@[rclike_simps, norm_cast]
theorem ofReal_sum {α : Type*} (s : Finset α) (f : α → ℝ) :
    ((∑ i ∈ s, f i : ℝ) : K) = ∑ i ∈ s, (f i : K)

{K : Type u_1}
[RCLike K]
{α : Type u_3}
(s : Finset α)
(f : α → ℝ)


@[deprecated (since := "2024-04-26")]
theorem BilinForm.toLin_symm :
    (BilinForm.toLin.symm : _ ≃ₗ[R] BilinForm R M) = LinearMap.toBilin

{R : Type u_1}
{M : Type u_2}
[CommSemiring R]
[AddCommMonoid M]
[Module R M]


theorem mem_fixingSubgroup_compl_iff_movedBy_subset {s : Set α} {m : M} :
    m ∈ fixingSubgroup M sᶜ ↔ (fixedBy α m)ᶜ ⊆ s

(M : Type u_1)
{α : Type u_2}
[Group M]
[MulAction M α]
{s : Set α}
{m : M}

m ∈ fixingSubgroup M sᶜ ↔ (MulAction.fixedBy α m)ᶜ ⊆ s


theorem iff_of_source_openCover [IsAffine Y] (𝒰 : X.OpenCover) [∀ i, IsAffine (𝒰.obj i)] :
    P f ↔ ∀ i, Q ((𝒰.map i ≫ f).app ⊤)

{P : CategoryTheory.MorphismProperty AlgebraicGeometry.Scheme}

{Q : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop}

[∀ (i : 𝒰.J), AlgebraicGeometry.IsAffine (𝒰.obj i)]

P f ↔ ∀ (i : 𝒰.J), Q (AlgebraicGeometry.Scheme.Hom.app (𝒰.map i ≫ f) ⊤)


@[simp]
protected lemma zero (μ : Measure α) : 0 ≪ μ

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


theorem degree_eq_one_iff_unique_adj {G' : Subgraph G} {v : V} [Fintype (G'.neighborSet v)] :
    G'.degree v = 1 ↔ ∃! w : V, G'.Adj v w

{V : Type u}
{G : SimpleGraph V}
{G' : G.Subgraph}
{v : V}
[Fintype ↑(G'.neighborSet v)]


theorem Sylow.smul_eq_iff_mem_normalizer {g : G} {P : Sylow p G} :
    g • P = P ↔ g ∈ (P : Subgroup G).normalizer

{p : ℕ}
{G : Type u_1}
[Group G]
{g : G}
{P : Sylow p G}


theorem toPOUFun_zero_of_zero {i : ι} {x : X} (h : f i x = 0) : f.toPOUFun i x = 0

{ι : Type u}
{X : Type v}
[TopologicalSpace X]
{s : Set X}
(f : BumpCovering ι X s)
{i : ι}
{x : X}
(h : (f i) x = 0)


@[simp] theorem filter_data (p : α → Bool) (l : Array α) :
    (l.filter p).data = l.data.filter p

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

(Array.filter p l 0).data = List.filter p l.data


protected theorem IsStoppingTime.measurableSet_le (hτ : IsStoppingTime f τ) (i : ι) :
    MeasurableSet[f i] {ω | τ ω ≤ i}

{Ω : Type u_1}
{ι : Type u_3}
{m : MeasurableSpace Ω}
[Preorder ι]
{f : MeasureTheory.Filtration ι m}
{τ : Ω → ι}
(hτ : MeasureTheory.IsStoppingTime f τ)
(i : ι)


@[simp]
lemma Sigma.map_id {f : α → C} [HasCoproduct f] : Sigma.map (fun a => 𝟙 (f a)) = 𝟙 (∐ f)

{α : Type w₂}
{C : Type u}
[CategoryTheory.Category.{v, u} C]
{f : α → C}
[CategoryTheory.Limits.HasCoproduct f]

(CategoryTheory.Limits.Sigma.map fun a => 𝟙 (f a)) = 𝟙 (∐ f)


theorem interpolate_singleton : interpolate {i} v r = C (r i)

{F : Type u_1}
[Field F]
{ι : Type u_2}
[DecidableEq ι]
{i : ι}
{v : ι → F}
(r : ι → F)

(Lagrange.interpolate {i} v) r = Polynomial.C (r i)


theorem image_mul_right_Icc' (a b : α) {c : α} (h : 0 < c) :
    (fun x => x * c) '' Icc a b = Icc (a * c) (b * c)

{α : Type u_1}
[LinearOrderedField α]
(a b : α)
{c : α}
(h : 0 < c)

(fun x => x * c) '' Set.Icc a b = Set.Icc (a * c) (b * c)


@[simp]
theorem symm_dual_id : SupBotHom.dual.symm (InfTopHom.id _) = SupBotHom.id α

SupBotHom.dual.symm (InfTopHom.id αᵒᵈ) = SupBotHom.id α


theorem union_C0C1_eq : (C0 C ho) ∪ (C1 C ho) = C

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

Profinite.NobelingProof.C0 C ho ∪ Profinite.NobelingProof.C1 C ho = C


theorem comap_upperCentralSeries_quotient_center (n : ℕ) :
    comap (mk' (center G)) (upperCentralSeries (G ⧸ center G) n) = upperCentralSeries G n.succ

Subgroup.comap (QuotientGroup.mk' (Subgroup.center G)) (upperCentralSeries (G ⧸ Subgroup.center G) n) =
  upperCentralSeries G n.succ


@[simp]
theorem neg_apply (f : SlashInvariantForm Γ k) (z : ℍ) : (-f) z = -f z

{Γ : Subgroup SL(2, ℤ)}
{k : ℤ}
(f : SlashInvariantForm Γ k)
(z : ℍ)


/-- The canonical isomorphism relating `Cospan f.op g.op` and `(Span f g).op` -/
@[simps!]
def cospanOp {X Y Z : C} (f : X ⟶ Y) (g : X ⟶ Z) :
    cospan f.op g.op ≅ walkingSpanOpEquiv.inverse ⋙ (span f g).op

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

∀ (X_1 : CategoryTheory.Limits.WalkingCospan),
  (CategoryTheory.Limits.cospanOp f g).hom.app X_1 =
    (Option.rec (CategoryTheory.Iso.refl (Opposite.op X))
        (fun val =>
          CategoryTheory.Limits.WalkingPair.rec (CategoryTheory.Iso.refl (Opposite.op Y))
            (CategoryTheory.Iso.refl (Opposite.op Z)) val)
        X_1).hom


theorem disjoint_union_left (x y z : Finmap β) :
    Disjoint (x ∪ y) z ↔ Disjoint x z ∧ Disjoint y z

{α : Type u}
{β : α → Type v}
[DecidableEq α]
(x y z : Finmap β)

(x ∪ y).Disjoint z ↔ x.Disjoint z ∧ y.Disjoint z


@[simp]
theorem inf_toSubmodule (S T : Subalgebra R A) :
    toSubmodule (S ⊓ T) = toSubmodule S ⊓ toSubmodule T

{R : Type u}
{A : Type v}
[CommSemiring R]
[Semiring A]
[Algebra R A]
(S T : Subalgebra R A)

Subalgebra.toSubmodule (S ⊓ T) = Subalgebra.toSubmodule S ⊓ Subalgebra.toSubmodule T


@[to_additive]
theorem invRev_surjective : Function.Surjective (@invRev α)


@[simp]
theorem div_zero (a : R) : a / 0 = 0

{R : Type u}
[EuclideanDomain R]
(a : R)


/-- A necessary and sufficient condition for an exact sequence to descend to a quotient. -/
lemma Exact.exact_mapQ_iff {f : M →ₗ[R] N} {g : N →ₗ[R] P}
    (hfg : Exact f g) {p q r} (hpq : p ≤ comap f q) (hqr : q ≤ comap g r) :
    Exact (mapQ p q f hpq) (mapQ q r g hqr) ↔ range g ⊓ r ≤ map g q

{R : Type u_1}
{M : Type u_2}
{N : Type u_4}
{P : Type u_6}
[Ring R]
[AddCommGroup M]
[AddCommGroup N]
[AddCommGroup P]
[Module R M]
[Module R N]
[Module R P]
{f : M →ₗ[R] N}
{g : N →ₗ[R] P}
(hfg : Function.Exact ⇑f ⇑g)
{p : Submodule R M}
{q : Submodule R N}
{r : Submodule R P}
(hpq : p ≤ Submodule.comap f q)
(hqr : q ≤ Submodule.comap g r)

Function.Exact ⇑(p.mapQ q f hpq) ⇑(q.mapQ r g hqr) ↔ LinearMap.range g ⊓ r ≤ Submodule.map g q


/-- The spectrum, as a contravariant functor from commutative rings to schemes. -/
@[simps]
protected def Scheme.Spec : CommRingCatᵒᵖ ⥤ Scheme

∀ {X Y : CommRingCatᵒᵖ} (f : X ⟶ Y), AlgebraicGeometry.Scheme.Spec.map f = AlgebraicGeometry.Spec.map f.unop


theorem le_nth_of_lt_nth_succ {k a : ℕ} (h : a < nth p (k + 1)) (ha : p a) : a ≤ nth p k

{p : ℕ → Prop}
{k a : ℕ}
(h : a < Nat.nth p (k + 1))
(ha : p a)


@[simp]
theorem algebraMap_C (a : K) : algebraMap K[X] (RatFunc K) (Polynomial.C a) = C a

{K : Type u}
[CommRing K]
[IsDomain K]
(a : K)

(algebraMap (Polynomial K) (RatFunc K)) (Polynomial.C a) = RatFunc.C a


lemma find_le {h : ∃ n, p n} (hn : p n) : Nat.find h ≤ n

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


protected theorem le_of_eq : ∀ {x y : Bool}, x = y → x ≤ y


@[simp]
theorem disjoint_empty_left (s : Finset α) : Disjoint ∅ s


/-- A side of a right-angled triangle divided by the sine of the opposite angle equals the
hypotenuse, version subtracting vectors. -/
theorem norm_div_sin_angle_sub_of_inner_eq_zero {x y : V} (h : ⟪x, y⟫ = 0) (h0 : x = 0 ∨ y ≠ 0) :
    ‖y‖ / Real.sin (angle x (x - y)) = ‖x - y‖

{V : Type u_1}
[NormedAddCommGroup V]
[InnerProductSpace ℝ V]
{x y : V}
(h : ⟪x, y⟫_ℝ = 0)
(h0 : x = 0 ∨ y ≠ 0)

‖y‖ / Real.sin (InnerProductGeometry.angle x (x - y)) = ‖x - y‖


@[simp]
theorem unitsEquivAut_apply (u : Rˣ) (x : R) : unitsEquivAut R u x = x * u

{R : Type u_1}
[Ring R]
[TopologicalSpace R]
[ContinuousMul R]
(u : Rˣ)
(x : R)

((ContinuousLinearEquiv.unitsEquivAut R) u) x = x * ↑u


@[to_additive eq_zero_of_neg_eq]
theorem eq_one_of_inv_eq' (h : a⁻¹ = a) : a = 1

{α : Type u}
[LinearOrderedAddCommGroup α]
{a : α}
(h : -a = a)


/-- If `‖r‖ < 1`, then `∑' n : ℕ, n * r ^ n = r / (1 - r) ^ 2`, `HasSum` version. -/
theorem hasSum_coe_mul_geometric_of_norm_lt_one {𝕜 : Type*} [NormedDivisionRing 𝕜] [CompleteSpace 𝕜]
    {r : 𝕜} (hr : ‖r‖ < 1) : HasSum (fun n ↦ n * r ^ n : ℕ → 𝕜) (r / (1 - r) ^ 2)

{𝕜 : Type u_4}
[NormedDivisionRing 𝕜]
[CompleteSpace 𝕜]
{r : 𝕜}
(hr : ‖r‖ < 1)

HasSum (fun n => ↑n * r ^ n) (r / (1 - r) ^ 2)


@[simp] theorem norm_inr (m : M) : ‖(inr m : tsze R M)‖ = ‖m‖

{R : Type u_3}
{M : Type u_4}
[SeminormedRing R]
[SeminormedAddCommGroup M]
(m : M)


/-- A finitely generated torsion module over a PID is isomorphic to a direct sum of some
  `R ⧸ R ∙ (p i ^ e i)` where the `p i ^ e i` are prime powers. -/
theorem equiv_directSum_of_isTorsion [h' : Module.Finite R N] (hN : Module.IsTorsion R N) :
    ∃ (ι : Type u) (_ : Fintype ι) (p : ι → R) (_ : ∀ i, Irreducible <| p i) (e : ι → ℕ),
      Nonempty <| N ≃ₗ[R] ⨁ i : ι, R ⧸ R ∙ p i ^ e i

{R : Type u}
[CommRing R]
[IsDomain R]
[IsPrincipalIdealRing R]
{N : Type (max u v)}
[AddCommGroup N]
[Module R N]
[h' : Module.Finite R N]
(hN : Module.IsTorsion R N)

∃ ι x p, ∃ (_ : ∀ (i : ι), Irreducible (p i)), ∃ e, Nonempty (N ≃ₗ[R] ⨁ (i : ι), R ⧸ Submodule.span R {p i ^ e i})


theorem Injective.mem_range_iff_exists_unique (hf : Injective f) {b : β} :
    b ∈ range f ↔ ∃! a, f a = b

{α : Type u_1}
{β : Type u_2}
{f : α → β}
(hf : Function.Injective f)
{b : β}


@[to_additive (attr := simp)]
lemma mem_aestabilizer : g ∈ aestabilizer G μ s ↔ g • s =ᵐ[μ] s

{G : Type u_1}
{α : Type u_2}
[AddGroup G]
[AddAction G α]

∀ {x : MeasurableSpace α} {μ : MeasureTheory.Measure α} [inst : MeasureTheory.VAddInvariantMeasure G α μ] {g : G}
  {s : Set α}, g ∈ AddAction.aestabilizer G μ s ↔ g +ᵥ s =ᵐ[μ] s


lemma homologySequence_exact₂ :
    (ShortComplex.mk _ _ (F.homologySequence_comp T hT n₀)).Exact

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

(T : CategoryTheory.Pretriangulated.Triangle C)

(hT : T ∈ CategoryTheory.Pretriangulated.distinguishedTriangles)

(CategoryTheory.ShortComplex.mk ((F.shift n₀).map T.mor₁) ((F.shift n₀).map T.mor₂) ⋯).Exact


theorem CovBy.le_of_lt (hab : a ⋖ b) : c < b → c ≤ a

{α : Type u_1}
[LinearOrder α]
{a b c : α}
(hab : a ⋖ b)


/-- A subpresheaf of a presheaf consists of a subset of `F.obj U` for every `U`,
compatible with the restriction maps `F.map i`. -/
@[ext]
structure Subpresheaf (F : Cᵒᵖ ⥤ Type w) where
  /-- If `G` is a sub-presheaf of `F`, then the sections of `G` on `U` forms a subset of sections of
    `F` on `U`. -/
  obj : ∀ U, Set (F.obj U)
  /-- If `G` is a sub-presheaf of `F` and `i : U ⟶ V`, then for each `G`-sections on `U` `x`,
    `F i x` is in `F(V)`. -/
  map : ∀ {U V : Cᵒᵖ} (i : U ⟶ V), obj U ⊆ F.map i ⁻¹' obj V

(self : CategoryTheory.GrothendieckTopology.Subpresheaf F)


theorem _root_.Irreducible.separable [CharZero F] {f : F[X]} (hf : Irreducible f) :
    f.Separable

{F : Type u}
[Field F]
[CharZero F]
{f : F[X]}
(hf : Irreducible f)


@[simp]
theorem single_mul_apply (r : k) (x : G) (f : MonoidAlgebra k G) (y : G) :
    (single x r * f) y = r * f (x⁻¹ * y)

{k : Type u₁}
{G : Type u₂}
[Semiring k]
[Group G]
(r : k)
(x : G)
(f : MonoidAlgebra k G)
(y : G)

(MonoidAlgebra.single x r * f) y = r * f (x⁻¹ * y)


@[to_additive]
theorem inter_div_union_subset_union : s₁ ∩ s₂ / (t₁ ∪ t₂) ⊆ s₁ / t₁ ∪ s₂ / t₂

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


@[to_additive]
theorem one_eq_mk [One M] [One N] : (1 : M × N) = (1, 1)

{M : Type u_5}
{N : Type u_6}
[One M]
[One N]


theorem utf8PrevAux_of_valid {cs cs' : List Char} {c : Char} {i p : Nat}
    (hp : i + (utf8Len cs + c.utf8Size) = p) :
    utf8PrevAux (cs ++ c :: cs') ⟨i⟩ ⟨p⟩ = ⟨i + utf8Len cs⟩

(hp : i + (String.utf8Len cs + c.utf8Size) = p)

String.utf8PrevAux (cs ++ c :: cs') { byteIdx := i } { byteIdx := p } = { byteIdx := i + String.utf8Len cs }


theorem EventuallyEq.prod_mk {l} {f f' : α → β} (hf : f =ᶠ[l] f') {g g' : α → γ} (hg : g =ᶠ[l] g') :
    (fun x => (f x, g x)) =ᶠ[l] fun x => (f' x, g' x)

{α : Type u}
{β : Type v}
{γ : Type w}
{l : Filter α}
{f f' : α → β}
(hf : f =ᶠ[l] f')
{g g' : α → γ}
(hg : g =ᶠ[l] g')


theorem balancedCore_subset_balancedCoreAux : balancedCore 𝕜 s ⊆ balancedCoreAux 𝕜 s

{𝕜 : Type u_1}
{E : Type u_2}
[NormedField 𝕜]
[AddCommGroup E]
[Module 𝕜 E]
{s : Set E}


theorem natDegree_list_sum_le (l : List S[X]) : natDegree l.sum ≤ (l.map natDegree).foldr max 0

{S : Type u_1}
[Semiring S]
(l : List S[X])

l.sum.natDegree ≤ List.foldr max 0 (List.map Polynomial.natDegree l)


theorem ClassGroup.Quot_mk_eq_mk (I : (FractionalIdeal R⁰ (FractionRing R))ˣ) :
    Quot.mk _ I = ClassGroup.mk I


theorem inits_eq (s : Stream' α) :
    inits s = [head s]::map (List.cons (head s)) (inits (tail s))

s.inits = Stream'.cons [s.head] (Stream'.map (List.cons s.head) s.tail.inits)


theorem sub_one_lt_of_le (h₀ : 0 < a) (h₁ : a ≤ b) : a - 1 < b


@[to_additive]
theorem ext_iff_mulSupport {f g : α → M} :
    f = g ↔ f.mulSupport = g.mulSupport ∧ ∀ x ∈ f.mulSupport, f x = g x

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

f = g ↔ Function.support f = Function.support g ∧ ∀ x ∈ Function.support f, f x = g x


theorem vecMul_surjective_of_invertible (A : Matrix m m R) [Invertible A] :
    Function.Surjective A.vecMul

{m : Type u}
[DecidableEq m]
{R : Type u_2}
[CommRing R]
[Fintype m]
(A : Matrix m m R)
[Invertible A]

Function.Surjective fun v => Matrix.vecMul v A


/-- **Strict inequality case of the Rearrangement Inequality**: Pointwise multiplication of
`f` and `g`, which monovary together, is strictly decreased by a permutation if and only if
`f ∘ σ` and `g` do not monovary together. Stated by permuting the entries of `f`. -/
theorem MonovaryOn.sum_comp_perm_mul_lt_sum_mul_iff (hfg : MonovaryOn f g s)
    (hσ : {x | σ x ≠ x} ⊆ s) :
    ∑ i ∈ s, f (σ i) * g i < ∑ i ∈ s, f i * g i ↔ ¬MonovaryOn (f ∘ σ) g s

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

∑ i ∈ s, f (σ i) * g i < ∑ i ∈ s, f i * g i ↔ ¬MonovaryOn (f ∘ ⇑σ) g ↑s


/-- The integral of an almost-everywhere strongly measurable function over `UnitAddCircle` is
equal to the integral over an interval (t, t + 1] in `ℝ` of its lift to `ℝ`. -/
protected theorem integral_preimage (t : ℝ) (f : UnitAddCircle → E) :
    (∫ a in Ioc t (t + 1), f a) = ∫ b : UnitAddCircle, f b

{E : Type u_1}
[NormedAddCommGroup E]
[NormedSpace ℝ E]
(t : ℝ)
(f : UnitAddCircle → E)

∫ (a : ℝ) in Set.Ioc t (t + 1), f ↑a = ∫ (b : UnitAddCircle), f b


/-- A consequence of the special adjoint functor theorem: if `C` is cocomplete, well-copowered and
    has a small separating set, then it is complete. -/
theorem hasLimits_of_hasColimits_of_isSeparating [HasColimits C] [WellPowered Cᵒᵖ] {𝒢 : Set C}
    [Small.{v} 𝒢] (h𝒢 : IsSeparating 𝒢) : HasLimits C

{C : Type u}
[CategoryTheory.Category.{v, u} C]
[CategoryTheory.Limits.HasColimits C]
[CategoryTheory.WellPowered Cᵒᵖ]
{𝒢 : Set C}
[Small.{v, u} ↑𝒢]
(h𝒢 : CategoryTheory.IsSeparating 𝒢)


/-- The object in the category of `R`-bialgebras associated to an `R`-bialgebra. -/
@[simps]
def of (X : Type v) [Ring X] [Bialgebra R X] :
    BialgebraCat R

(R : Type u)
[CommRing R]
(X : Type v)
[Ring X]
[Bialgebra R X]


protected lemma lt_asymm : a < b → ¬ b < a


/-- Construct a bundled `LaxMonoidalFunctor` from the object level function
and `Functorial` and `LaxMonoidal` typeclasses.
-/
@[simps]
def of (F : C → D) [I₁ : Functorial.{v₁, v₂} F] [I₂ : LaxMonoidal.{v₁, v₂} F] :
    LaxMonoidalFunctor.{v₁, v₂} C D

{C : Type u₁}
[CategoryTheory.Category.{v₁, u₁} C]
[CategoryTheory.MonoidalCategory C]
{D : Type u₂}
[CategoryTheory.Category.{v₂, u₂} D]
[CategoryTheory.MonoidalCategory D]
(F : C → D)
[I₁ : CategoryTheory.Functorial F]
[I₂ : CategoryTheory.LaxMonoidal F]

(CategoryTheory.LaxMonoidalFunctor.of F).ε = CategoryTheory.LaxMonoidal.ε


/-- The categorical kernel inclusion for `f : G ⟶ H`, as an object over `G`,
agrees with the `AddSubgroup.subtype` map.
-/
@[simps! hom_left_apply_coe inv_left_apply]
def kernelIsoKerOver {G H : AddCommGrp.{u}} (f : G ⟶ H) :
    Over.mk (kernel.ι f) ≅ @Over.mk _ _ G (AddCommGrp.of f.ker) (AddSubgroup.subtype f.ker)

∀ (a : ↑(CategoryTheory.Limits.KernelFork.ofι (AddMonoidHom.ker f).subtype ⋯).pt),
  (AddCommGrp.kernelIsoKerOver f).inv.left a =
    (CategoryTheory.Limits.limit.lift (CategoryTheory.Limits.parallelPair f 0)
        (CategoryTheory.Limits.KernelFork.ofι (AddMonoidHom.ker f).subtype ⋯))
      a


@[simp]
theorem repr_mul : ∀ (o₁ o₂) [NF o₁] [NF o₂], repr (o₁ * o₂) = repr o₁ * repr o₂


theorem absNorm_one : absNorm (1 : FractionalIdeal R⁰ K) = 1

{R : Type u_1}
[CommRing R]
[IsDedekindDomain R]
[Module.Free ℤ R]
[Module.Finite ℤ R]
{K : Type u_2}
[CommRing K]
[Algebra R K]
[IsFractionRing R K]


theorem bmod_lt {x : Int} {m : Nat} (h : 0 < m) : bmod x m < (m + 1) / 2


lemma one_le_iff_ne_zero : 1 ≤ n ↔ n ≠ 0


@[simp]
theorem act'_apply (x y : R) : act' x y = x ◃ y


theorem get_enumFrom (l : List α) (n) (i : Fin (l.enumFrom n).length) :
    (l.enumFrom n).get i = (n + i, l.get (i.cast enumFrom_length))

{α : Type u_1}
(l : List α)
(n : ℕ)
(i : Fin (List.enumFrom n l).length)

(List.enumFrom n l).get i = (n + ↑i, l.get (Fin.cast ⋯ i))


theorem condIndep_biSup_limsup [StandardBorelSpace Ω] [Nonempty Ω]
    (hm : m ≤ m0) [IsFiniteMeasure μ]
    (h_le : ∀ n, s n ≤ m0) (h_indep : iCondIndep m hm s μ) (hf : ∀ t, p t → tᶜ ∈ f)
    {t : Set ι} (ht : p t) :
    CondIndep m (⨆ n ∈ t, s n) (limsup s f) hm μ

(h_indep : ProbabilityTheory.iCondIndep m hm s μ)

ProbabilityTheory.CondIndep m (⨆ n ∈ t, s n) (Filter.limsup s f) hm μ


theorem of_nat_sub (m : ℕ) (h : Irrational (m - x)) : Irrational x

{x : ℝ}
(m : ℕ)
(h : Irrational (↑m - x))


theorem bounded_gt_Icc [Preorder α] [NoMinOrder α] (a b : α) : Bounded (· > ·) (Icc a b)

{α : Type u_1}
[Preorder α]
[NoMinOrder α]
(a b : α)

Set.Bounded (fun x x_1 => x > x_1) (Set.Icc a b)


/-- If a set of ae strongly measurable functions is stable under addition and approximates
characteristic functions in `ℒp`, then it is dense in `ℒp`. -/
theorem Memℒp.induction_dense (hp_ne_top : p ≠ ∞) (P : (α → E) → Prop)
    (h0P :
      ∀ (c : E) ⦃s : Set α⦄,
        MeasurableSet s →
          μ s < ∞ →
            ∀ {ε : ℝ≥0∞}, ε ≠ 0 → ∃ g : α → E, eLpNorm (g - s.indicator fun _ => c) p μ ≤ ε ∧ P g)
    (h1P : ∀ f g, P f → P g → P (f + g)) (h2P : ∀ f, P f → AEStronglyMeasurable f μ) {f : α → E}
    (hf : Memℒp f p μ) {ε : ℝ≥0∞} (hε : ε ≠ 0) : ∃ g : α → E, eLpNorm (f - g) p μ ≤ ε ∧ P g

(h0P :
  ∀ (c : E) ⦃s : Set α⦄,
    MeasurableSet s →
      μ s < ⊤ → ∀ {ε : ℝ≥0∞}, ε ≠ 0 → ∃ g, MeasureTheory.eLpNorm (g - s.indicator fun x => c) p μ ≤ ε ∧ P g)

(h1P : ∀ (f g : α → E), P f → P g → P (f + g))

(h2P : ∀ (f : α → E), P f → MeasureTheory.AEStronglyMeasurable f μ)

∃ g, MeasureTheory.eLpNorm (f - g) p μ ≤ ε ∧ P g


theorem rangeFactorization_eq {f : ι → β} : Subtype.val ∘ rangeFactorization f = f

{β : Type u_2}
{ι : Sort u_4}
{f : ι → β}

Subtype.val ∘ Set.rangeFactorization f = f


/-- A functor that preserves zero morphisms also preserves the zero object. -/
@[simps]
def mapZeroObject [PreservesZeroMorphisms F] : F.obj 0 ≅ 0


theorem parallel_congr_right {S T : WSeq (Computation α)} {a} (h2 : ∀ t ∈ T, t ~> a)
    (H : S.LiftRel Equiv T) : parallel S ~ parallel T

(h2 : ∀ (t : Computation α), t ∈ T → t.Promises a)

(H : Stream'.WSeq.LiftRel Computation.Equiv S T)

(Computation.parallel S).Equiv (Computation.parallel T)


theorem antilipschitzWith_addEquiv :
    AntilipschitzWith 2 (addEquiv 𝕜 A)

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

AntilipschitzWith 2 ⇑(Unitization.addEquiv 𝕜 A)


/-- Adding a gift horse right option does not change the value of `x`. A gift horse right option is
 a game `x'` with `x ⧏ x'`. It is called "gift horse" because it seems like Right has gotten the
 "gift" of a new option, but actually the value of the game did not change. -/
lemma insertRight_equiv_of_lf {x x' : PGame} (h : x ⧏ x') : insertRight x x' ≈ x


theorem subset_range_sup_succ (s : Finset ℕ) : s ⊆ range (s.sup id).succ


@[to_additive]
theorem le_mul_of_le_right : a ≤ c → a ≤ b * c

{α : Type u}
[CanonicallyOrderedAddCommMonoid α]
{a b c : α}


/-- The equivalence between `TwoP` and itself induced by `Prod.swap` both ways. -/
@[simps!]
noncomputable def swapEquiv : TwoP ≌ TwoP

(TwoP.swapEquiv.inverse.obj X).toTwoPointing.toProd = (X.toTwoPointing.toProd.2, X.toTwoPointing.toProd.1)


theorem summable_sum_mul_antidiagonal_of_summable_mul
    (h : Summable fun x : A × A ↦ f x.1 * g x.2) :
    Summable fun n ↦ ∑ kl ∈ antidiagonal n, f kl.1 * g kl.2

{α : Type u_4}
{A : Type u_5}
[AddCommMonoid A]
[Finset.HasAntidiagonal A]
[TopologicalSpace α]
[NonUnitalNonAssocSemiring α]
{f g : A → α}
[T3Space α]
[TopologicalSemiring α]
(h : Summable fun x => f x.1 * g x.2)

Summable fun n => ∑ kl ∈ Finset.antidiagonal n, f kl.1 * g kl.2


theorem powHalf_leftMoves (n) : (powHalf n).LeftMoves = PUnit

(SetTheory.PGame.powHalf n).LeftMoves = PUnit.{u_1 + 1}


@[to_additive]
theorem _root_.List.periodic_prod [Add α] [Monoid β] (l : List (α → β))
    (hl : ∀ f ∈ l, Periodic f c) : Periodic l.prod c

{α : Type u_1}
{β : Type u_2}
{c : α}
[Add α]
[AddMonoid β]
(l : List (α → β))
(hl : ∀ f ∈ l, Function.Periodic f c)


theorem map_bind₂ (f : R →+* MvPolynomial σ S) (g : S →+* T) (φ : MvPolynomial σ R) :
    map g (bind₂ f φ) = bind₂ ((map g).comp f) φ

{σ : Type u_1}
{R : Type u_3}
{S : Type u_4}
{T : Type u_5}
[CommSemiring R]
[CommSemiring S]
[CommSemiring T]
(f : R →+* MvPolynomial σ S)
(g : S →+* T)
(φ : MvPolynomial σ R)

(MvPolynomial.map g) ((MvPolynomial.bind₂ f) φ) = (MvPolynomial.bind₂ ((MvPolynomial.map g).comp f)) φ


theorem pred_ne_top (a : α) : pred a ≠ ⊤

{α : Type u_1}
[PartialOrder α]
[PredOrder α]
[OrderTop α]
[Nontrivial α]
(a : α)


/-- A multiset `{p,q,r}` of positive natural numbers
is a solution to `(p⁻¹ + q⁻¹ + r⁻¹ : ℚ) > 1` if and only if
it is `admissible` which means it is one of:

* `A' q r := {1,q,r}`
* `D' r := {2,2,r}`
* `E6 := {2,3,3}`, or `E7 := {2,3,4}`, or `E8 := {2,3,5}`
-/
theorem classification (p q r : ℕ+) : 1 < sumInv {p, q, r} ↔ Admissible {p, q, r}

1 < ADEInequality.sumInv {p, q, r} ↔ ADEInequality.Admissible {p, q, r}


theorem strong_law_aux2 {c : ℝ} (c_one : 1 < c) :
    ∀ᵐ ω, (fun n : ℕ => ∑ i ∈ range ⌊c ^ n⌋₊, truncation (X i) i ω -
      𝔼[∑ i ∈ range ⌊c ^ n⌋₊, truncation (X i) i]) =o[atTop] fun n : ℕ => (⌊c ^ n⌋₊ : ℝ)

(X : ℕ → Ω → ℝ)

(hint : MeasureTheory.Integrable (X 0) ℙ)

(hindep : Pairwise fun i j => ProbabilityTheory.IndepFun (X i) (X j) ℙ)

(hident : ∀ (i : ℕ), ProbabilityTheory.IdentDistrib (X i) (X 0) ℙ ℙ)

(hnonneg : ∀ (i : ℕ) (ω : Ω), 0 ≤ X i ω)

∀ᵐ (ω : Ω),
  (fun n =>
      ∑ i ∈ Finset.range ⌊c ^ n⌋₊, ProbabilityTheory.truncation (X i) (↑i) ω -
        ∫ (a : Ω), (∑ i ∈ Finset.range ⌊c ^ n⌋₊, ProbabilityTheory.truncation (X i) ↑i) a) =o[Filter.atTop]
    fun n => ↑⌊c ^ n⌋₊


@[to_additive (attr := simp) relindex_eq_one]
theorem relindex_eq_one : H.relindex K = 1 ↔ K ≤ H

{G : Type u_1}
[Group G]
{H K : Subgroup G}


@[simp]
theorem bind_eq_out {α β} (a f) : @bind α β a f = f a.out

{α : Sort u_1}
{β : Sort u_2}
(a : Erased α)
(f : α → Erased β)


@[simp] theorem dropLast_replicate (n) (a : α) : dropLast (replicate n a) = replicate (n - 1) a

(List.replicate n a).dropLast = List.replicate (n - 1) a


theorem card_le_mul_card_image_of_maps_to {f : α → β} {s : Finset α} {t : Finset β}
    (Hf : ∀ a ∈ s, f a ∈ t) (n : ℕ) (hn : ∀ a ∈ t, (s.filter fun x ↦ f x = a).card ≤ n) :
    s.card ≤ n * t.card

(hn : ∀ a ∈ t, (Finset.filter (fun x => f x = a) s).card ≤ n)


@[simp, nolint simpNF]
theorem subrelIso_apply (f : r ≺i s) (a : α) :
    f.subrelIso ⟨f a, f.down.mpr ⟨a, rfl⟩⟩ = a

{α : Type u_1}
{β : Type u_2}
{r : α → α → Prop}
{s : β → β → Prop}
(f : r ≺i s)
(a : α)


/-- `UniqueDiffWithinAt` achieves its goal: it implies the uniqueness of the derivative. -/
theorem UniqueDiffWithinAt.eq (H : UniqueDiffWithinAt 𝕜 s x) (hf : HasFDerivWithinAt f f' s x)
    (hg : HasFDerivWithinAt f f₁' s x) : f' = f₁'

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{F : Type u_3}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{f : E → F}
{f' f₁' : E →L[𝕜] F}
{x : E}
{s : Set E}
(H : UniqueDiffWithinAt 𝕜 s x)
(hf : HasFDerivWithinAt f f' s x)
(hg : HasFDerivWithinAt f f₁' s x)


theorem isClosedMap_sigmaMk {i : ι} : IsClosedMap (@Sigma.mk ι σ i)

{ι : Type u_5}
{σ : ι → Type u_7}
[(i : ι) → TopologicalSpace (σ i)]
{i : ι}


/-- The multiplicity of an irreducible factor of a nonzero element is exactly the number of times
the normalized factor occurs in the `normalizedFactors`.

See also `count_normalizedFactors_eq` which expands the definition of `multiplicity`
to produce a specification for `count (normalizedFactors _) _`..
-/
theorem multiplicity_eq_count_normalizedFactors [DecidableEq R] {a b : R} (ha : Irreducible a)
    (hb : b ≠ 0) : multiplicity a b = (normalizedFactors b).count (normalize a)

{R : Type u_2}
[CancelCommMonoidWithZero R]
[UniqueFactorizationMonoid R]
[NormalizationMonoid R]
[DecidableRel Dvd.dvd]
[DecidableEq R]
{a b : R}
(ha : Irreducible a)
(hb : b ≠ 0)

multiplicity a b = ↑(Multiset.count (normalize a) (UniqueFactorizationMonoid.normalizedFactors b))


@[to_additive]
theorem ne_one_of_map {R S F : Type*} [One R] [One S] [FunLike F R S] [OneHomClass F R S]
    {f : F} {x : R} (hx : f x ≠ 1) : x ≠ 1

{R : Type u_10}
{S : Type u_11}
{F : Type u_12}
[Zero R]
[Zero S]
[FunLike F R S]
[ZeroHomClass F R S]
{f : F}
{x : R}
(hx : f x ≠ 0)


@[to_additive]
lemma ofUnits_strictMono : StrictMono (ofUnits (M := M))


/-- Bijection between a subgroup `H` and its opposite. -/
@[to_additive (attr := simps!) "Bijection between an additive subgroup `H` and its opposite."]
def equivOp (H : Subgroup G) : H ≃ H.op

{G : Type u_2}
[Group G]
(H : Subgroup G)
(b : { b // (fun x => x ∈ H.op) b })

↑(H.equivOp.symm b) = MulOpposite.unop ↑b


@[deprecated Nat.mul_le_mul_right (since := "2024-02-19")]
protected theorem mul_le_mul_of_nonneg_right {a b c : Nat} : a ≤ b → a * c ≤ b * c


theorem lintegral_add {ν} (f : α →ₛ ℝ≥0∞) : f.lintegral (μ + ν) = f.lintegral μ + f.lintegral ν

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


theorem unpair_left_le : ∀ n : ℕ, (unpair n).1 ≤ n


theorem mul_left_eq_zero {a b : M₀} (hb : IsUnit b) : a * b = 0 ↔ a = 0

{M₀ : Type u_2}
[MonoidWithZero M₀]
{a b : M₀}
(hb : IsUnit b)


@[to_additive (attr := simp) sub_add_sub_cancel']
theorem div_mul_div_cancel'' (a b c : G) : a / b * (c / a) = c / b

{G : Type u_3}
[AddCommGroup G]
(a b c : G)


/-- We may construct a glue data from a family of open sets. -/
@[simps! toGlueData_J toGlueData_U toGlueData_V toGlueData_t toGlueData_f]
def ofOpenSubsets : TopCat.GlueData.{u}

{α : Type u}
[TopologicalSpace α]
{J : Type u}
(U : J → TopologicalSpace.Opens α)


theorem subset_product_image_fst [DecidableEq α] : (s ×ˢ t).image Prod.fst ⊆ s

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


@[simp, norm_cast]
theorem ofENat_toWithTop (x : PartENat) {_ : Decidable (x : PartENat).Dom} : toWithTop x = x

∀ {x_1 : Decidable x.Dom}, ↑x.toWithTop = x


theorem contMDiff_const : ContMDiff I I' n fun _ : M => c

{𝕜 : 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']
{n : ℕ∞}
{c : M'}


@[simp]
lemma withDensity_zero (κ : Kernel α β) [IsSFiniteKernel κ] :
    Kernel.withDensity κ 0 = 0

{α : Type u_1}
{β : Type u_2}
{mα : MeasurableSpace α}
{mβ : MeasurableSpace β}
(κ : ProbabilityTheory.Kernel α β)
[ProbabilityTheory.IsSFiniteKernel κ]


@[simp] lemma injOn_pair {b : α} : InjOn f {a, b} ↔ f a = f b → a = b

{α : Type u_1}
{β : Type u_2}
{f : α → β}
{a b : α}


/-- The non-commutative version of `Finset.prod_union` -/
@[to_additive "The non-commutative version of `Finset.sum_union`"]
theorem noncommProd_union_of_disjoint [DecidableEq α] {s t : Finset α} (h : Disjoint s t)
    (f : α → β) (comm : { x | x ∈ s ∪ t }.Pairwise fun a b => Commute (f a) (f b)) :
    noncommProd (s ∪ t) f comm =
      noncommProd s f (comm.mono <| coe_subset.2 subset_union_left) *
        noncommProd t f (comm.mono <| coe_subset.2 subset_union_right)

(comm : {x | x ∈ s ∪ t}.Pairwise fun a b => Commute (f a) (f b))

(s ∪ t).noncommProd f comm = s.noncommProd f ⋯ * t.noncommProd f ⋯


lemma hasDerivAt_Gamma_one : HasDerivAt Gamma (-γ) 1


theorem exists_congr (h : ∀ a, p a ↔ q a) : (∃ a, p a) ↔ ∃ a, q a

{α : Sort u_1}
{p q : α → Prop}
(h : ∀ (a : α), p a ↔ q a)


@[simp]
theorem IicExtend_coe (f : Iic b → β) (x : Iic b) : IicExtend f x = f x

{α : Type u_1}
{β : Type u_2}
[LinearOrder α]
{b : α}
(f : ↑(Set.Iic b) → β)
(x : ↑(Set.Iic b))


theorem eq_top_iff' (A : NonUnitalSubring R) : A = ⊤ ↔ ∀ x : R, x ∈ A

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


theorem enoughProjectives_iff (F : C ≌ D) : EnoughProjectives C ↔ EnoughProjectives D

{C : Type u}
[CategoryTheory.Category.{v, u} C]
{D : Type u'}
[CategoryTheory.Category.{v', u'} D]
(F : C ≌ D)

CategoryTheory.EnoughProjectives C ↔ CategoryTheory.EnoughProjectives D


@[reassoc (attr := simp)]
lemma limitRightOpIsoOpColimit_inv_comp_π (F : Iᵒᵖ ⥤ C) [HasColimit F] (i : I) :
    (limitRightOpIsoOpColimit F).inv ≫ limit.π F.rightOp i = (colimit.ι F ⟨i⟩).op

{C : Type u₁}
[CategoryTheory.Category.{u₂, u₁} C]
{I : Type v₁}
[CategoryTheory.Category.{v₂, v₁} I]
(F : CategoryTheory.Functor Iᵒᵖ C)
[CategoryTheory.Limits.HasColimit F]
(i : I)

CategoryTheory.CategoryStruct.comp (CategoryTheory.Limits.limitRightOpIsoOpColimit F).inv
    (CategoryTheory.Limits.limit.π F.rightOp i) =
  (CategoryTheory.Limits.colimit.ι F (Opposite.op i)).op


@[simp]
theorem iInf_exists {p : ι → Prop} {f : Exists p → α} : ⨅ x, f x = ⨅ (i) (h), f ⟨i, h⟩

{α : Type u_1}
{ι : Sort u_5}
[CompleteLattice α]
{p : ι → Prop}
{f : Exists p → α}

⨅ (x : Exists p), f x = ⨅ i, ⨅ (h : p i), f ⋯


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

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

(X : CategoryTheory.Pretriangulated.Triangle C)

(CategoryTheory.Pretriangulated.invRotCompRot.hom.app X).hom₂ = 𝟙 X.obj₂


@[simp]
theorem sigma_eq_empty : s.sigma t = ∅ ↔ ∀ i ∈ s, t i = ∅

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


theorem CPolynomialAt.eventually_cPolynomialAt {f : E → F} {x : E} (h : CPolynomialAt 𝕜 f x) :
    ∀ᶠ y in 𝓝 x, CPolynomialAt 𝕜 f y

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


theorem Tendsto.atTop_nsmul_const {f : α → ℕ} (hr : 0 < r) (hf : Tendsto f l atTop) :
    Tendsto (fun x => f x • r) l atTop

{α : Type u_1}
{R : Type u_2}
{l : Filter α}
{r : R}
[LinearOrderedCancelAddCommMonoid R]
[Archimedean R]
{f : α → ℕ}
(hr : 0 < r)
(hf : Filter.Tendsto f l Filter.atTop)

Filter.Tendsto (fun x => f x • r) l Filter.atTop


lemma isPritive_one_level_zero : IsPrimitive (1 : DirichletCharacter R 0)


theorem comap_map_eq_self_of_injective
    {f : A →ₐ[R] B} (hf : Function.Injective f) (S : Subalgebra R A) : (S.map f).comap f = S

{R : Type u_1}
{A : Type u_2}
{B : Type u_3}
[CommSemiring R]
[Semiring A]
[Algebra R A]
[Semiring B]
[Algebra R B]
{f : A →ₐ[R] B}
(hf : Function.Injective ⇑f)
(S : Subalgebra R A)

Subalgebra.comap f (Subalgebra.map f S) = S


/-- (Implementation). An auxiliary cocone which is useful in order to construct colimits
in the comma category. -/
@[simps!]
def colimitAuxiliaryCocone (c₂ : Cocone (F ⋙ snd L R)) : Cocone ((F ⋙ fst L R) ⋙ L)

(F : CategoryTheory.Functor J (CategoryTheory.Comma L R))

(c₂ : CategoryTheory.Limits.Cocone (F.comp (CategoryTheory.Comma.snd L R)))

(CategoryTheory.Comma.colimitAuxiliaryCocone F c₂).pt = R.obj c₂.pt


/-- The inclusion of the Moore complex in the alternating face map complex
is a homotopy equivalence -/
@[simps]
def homotopyEquivNormalizedMooreComplexAlternatingFaceMapComplex {A : Type*} [Category A]
    [Abelian A] {Y : SimplicialObject A} :
    HomotopyEquiv ((normalizedMooreComplex A).obj Y) ((alternatingFaceMapComplex A).obj Y)

{A : Type u_2}
[CategoryTheory.Category.{u_3, u_2} A]
[CategoryTheory.Abelian A]
{Y : CategoryTheory.SimplicialObject A}

AlgebraicTopology.DoldKan.homotopyEquivNormalizedMooreComplexAlternatingFaceMapComplex.homotopyHomInvId =
  Homotopy.ofEq ⋯


theorem emod_eq_emod_iff_emod_sub_eq_zero {m n k : Int} : m % n = k % n ↔ (m - k) % n = 0


@[to_additive]
theorem coe_monoidHom_refl : (refl M : M →* M) = MonoidHom.id M


@[simp]
theorem sigmaFinsuppLEquivPiFinsupp_apply {M : Type*} {ιs : η → Type*} [AddCommMonoid M]
    [Module R M] (f : (Σj, ιs j) →₀ M) (j i) : sigmaFinsuppLEquivPiFinsupp R f j i = f ⟨j, i⟩

(R : Type u_5)
[Semiring R]
{η : Type u_7}
[Fintype η]
{M : Type u_9}
{ιs : η → Type u_10}
[AddCommMonoid M]
[Module R M]
(f : (j : η) × ιs j →₀ M)
(j : η)
(i : ιs j)

((Finsupp.sigmaFinsuppLEquivPiFinsupp R) f j) i = f ⟨j, i⟩


/-- `IsEmpty α` expresses that `α` is empty. -/
class IsEmpty (α : Sort*) : Prop where
  protected false : α → False


theorem AffineMap.restrict.linear (φ : P₁ →ᵃ[k] P₂) {E : AffineSubspace k P₁}
    {F : AffineSubspace k P₂} [Nonempty E] [Nonempty F] (hEF : E.map φ ≤ F) :
    (φ.restrict hEF).linear = φ.linear.restrict (AffineMap.restrict.linear_aux hEF)

{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]
(hEF : AffineSubspace.map φ E ≤ F)

(φ.restrict hEF).linear = φ.linear.restrict ⋯


@[simp]
theorem Ioo_eq_empty (h : ¬a < b) : Ioo a b = ∅

{α : Type u_2}
[Preorder α]
[LocallyFiniteOrder α]
{a b : α}
(h : ¬a < b)


theorem filter_filterMap (f : α → Option β) (p : β → Bool) (l : List α) :
    filter p (filterMap f l) = filterMap (fun x => (f x).filter p) l

{α : Type u_1}
{β : Type u_2}
(f : α → Option β)
(p : β → Bool)
(l : List α)

List.filter p (List.filterMap f l) = List.filterMap (fun x => Option.filter p (f x)) l


theorem fpowerSeriesBilinear_apply_one (f : E →L[𝕜] F →L[𝕜] G) (x : E × F) :
    fpowerSeriesBilinear f x 1 = (continuousMultilinearCurryFin1 𝕜 (E × F) G).symm (f.deriv₂ x)

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

f.fpowerSeriesBilinear x 1 = (continuousMultilinearCurryFin1 𝕜 (E × F) G).symm (f.deriv₂ x)


@[simp]
theorem log_inv (x : ℝ) : log x⁻¹ = -log x


@[simp]
theorem toSubalgebra_map (f : L →ₐ[K] L') : (S.map f).toSubalgebra = S.toSubalgebra.map f

{K : Type u_1}
{L : Type u_2}
{L' : Type u_3}
[Field K]
[Field L]
[Field L']
[Algebra K L]
[Algebra K L']
(S : IntermediateField K L)
(f : L →ₐ[K] L')

(IntermediateField.map f S).toSubalgebra = Subalgebra.map f S.toSubalgebra


/-- If `f` is `C^1` at `x`, then `f` is Lipschitz in a neighborhood of `x`. -/
theorem ContDiffAt.exists_lipschitzOnWith {f : E' → F'} {x : E'} (hf : ContDiffAt 𝕂 1 f x) :
    ∃ K, ∃ t ∈ 𝓝 x, LipschitzOnWith K f t

{𝕂 : Type u_1}
[RCLike 𝕂]
{E' : Type u_2}
[NormedAddCommGroup E']
[NormedSpace 𝕂 E']
{F' : Type u_3}
[NormedAddCommGroup F']
[NormedSpace 𝕂 F']
{f : E' → F'}
{x : E'}
(hf : ContDiffAt 𝕂 1 f x)


@[fun_prop]
theorem HasStrictFDerivAt.const_smul (h : HasStrictFDerivAt f f' x) (c : R) :
    HasStrictFDerivAt (fun x => c • f x) (c • f') x

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{F : Type u_3}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{f : E → F}
{f' : E →L[𝕜] F}
{x : E}
{R : Type u_6}
[Semiring R]
[Module R F]
[SMulCommClass 𝕜 R F]
[ContinuousConstSMul R F]
(h : HasStrictFDerivAt f f' x)
(c : R)


/-- A submodule of a free `R`-module of finite rank is also a free `R`-module of finite rank,
if `R` is a principal ideal domain.

This is a `lemma` to make the induction a bit easier. To actually access the basis,
see `Submodule.basisOfPid`.

See also the stronger version `Submodule.smithNormalForm`.
-/
theorem Submodule.nonempty_basis_of_pid {ι : Type*} [Finite ι] (b : Basis ι R M)
    (N : Submodule R M) : ∃ n : ℕ, Nonempty (Basis (Fin n) R N)

{R : Type u_2}
[CommRing R]
[IsDomain R]
[IsPrincipalIdealRing R]
{M : Type u_3}
[AddCommGroup M]
[Module R M]
{ι : Type u_4}
[Finite ι]
(b : Basis ι R M)
(N : Submodule R M)


{α : Type u_1}
[Preorder α]
[LocallyFiniteOrder α]
{a b : α}


@[reassoc]
theorem id_tensor_comp (f : W ⟶ X) (g : X ⟶ Y) : 𝟙 Z ⊗ f ≫ g = (𝟙 Z ⊗ f) ≫ (𝟙 Z ⊗ g)

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

CategoryTheory.MonoidalCategory.tensorHom (CategoryTheory.CategoryStruct.id Z)
    (CategoryTheory.CategoryStruct.comp f g) =
  CategoryTheory.CategoryStruct.comp (CategoryTheory.MonoidalCategory.tensorHom (CategoryTheory.CategoryStruct.id Z) f)
    (CategoryTheory.MonoidalCategory.tensorHom (CategoryTheory.CategoryStruct.id Z) g)


theorem iInf_mul_left {ι} [Nonempty ι] {f : ι → ℝ≥0∞} {a : ℝ≥0∞}
    (h : a = ∞ → ⨅ i, f i = 0 → ∃ i, f i = 0) : ⨅ i, a * f i = a * ⨅ i, f i

{f : ι → ℝ≥0∞}

(h : a = ⊤ → ⨅ i, f i = 0 → ∃ i, f i = 0)


theorem or_assoc (x y z : BitVec w) :
    x ||| y ||| z = x ||| (y ||| z)


theorem differentiable_cosh : Differentiable ℝ cosh


/-- A family of seminorms inducing a T₁ topology is separating. -/
theorem WithSeminorms.separating_of_T1 [T1Space E] (hp : WithSeminorms p) (x : E) (hx : x ≠ 0) :
    ∃ i, p i x ≠ 0

{𝕜 : Type u_1}
{E : Type u_5}
{ι : Type u_8}
[NormedField 𝕜]
[AddCommGroup E]
[Module 𝕜 E]
[Nonempty ι]
[TopologicalSpace E]
{p : SeminormFamily 𝕜 E ι}
[T1Space E]
(hp : WithSeminorms p)
(x : E)
(hx : x ≠ 0)


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

(h₁ : ∀ (x y : A), f.toFun (x * y) = f.toFun x * f.toFun y)

↑{ toCoalgHom := f, map_one' := h, map_mul' := h₁ } = f


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

{M : Type u_2}
[Mul M]
{S : Set (Subsemigroup M)}
{s : Subsemigroup M}
(hs : s ∈ S)
{x : M}


@[simp]
theorem sup_eq_union (s t : Multiset α) : s ⊔ t = s ∪ t

{α : Type u_1}
[DecidableEq α]
(s t : Multiset α)


@[simp]
theorem mapMatrix_trans (f : α ≃ β) (g : β ≃ γ) :
    f.mapMatrix.trans g.mapMatrix = ((f.trans g).mapMatrix : Matrix m n α ≃ _)

{m : Type u_2}
{n : Type u_3}
{α : Type v}
{β : Type w}
{γ : Type u_9}
(f : α ≃ β)
(g : β ≃ γ)

f.mapMatrix.trans g.mapMatrix = (f.trans g).mapMatrix


theorem Restriction.finitary {M : Matroid α} [Finitary M] (h : N ≤r M) : N.Finitary

{α : Type u_1}
{N M : Matroid α}
[M.Finitary]
(h : N.Restriction M)


@[to_additive (attr := simp)]
theorem isComplement'_top_left : IsComplement' ⊤ H ↔ H = ⊥

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


@[measurability]
theorem measurableSet_preimage {t : Set β} (hf : Measurable f) (ht : MeasurableSet t) :
    MeasurableSet (f ⁻¹' t)

{α : Type u_1}
{β : Type u_2}
{f : α → β}
{m : MeasurableSpace α}
{mβ : MeasurableSpace β}
{t : Set β}
(hf : Measurable f)
(ht : MeasurableSet t)


/-- The image of a commutative square by a functor. -/
@[simps]
def map (sq : Square C) (F : C ⥤ D) : Square D

{C : Type u}
[CategoryTheory.Category.{v, u} C]
{D : Type u'}
[CategoryTheory.Category.{v', u'} D]
(sq : CategoryTheory.Square C)
(F : CategoryTheory.Functor C D)


/-- Given a bifunctor `F : C₁ ⥤ C₂ ⥤ C₃` and a map `p : I × J → K`, this is the
functor `GradedObject I C₁ ⥤ GradedObject J C₂ ⥤ GradedObject K C₃` sending
`X : GradedObject I C₁` and `Y : GradedObject J C₂` to the `K`-graded object sending
`k` to the coproduct of `(F.obj (X i)).obj (Y j)` for `p ⟨i, j⟩ = k`. -/
@[simps]
noncomputable def mapBifunctorMap [∀ X Y, HasMap (((mapBifunctor F I J).obj X).obj Y) p] :
    GradedObject I C₁ ⥤ GradedObject J C₂ ⥤ GradedObject K C₃

(F : CategoryTheory.Functor C₁ (CategoryTheory.Functor C₂ C₃))

[∀ (X : CategoryTheory.GradedObject I C₁) (Y : CategoryTheory.GradedObject J C₂),
    (((CategoryTheory.GradedObject.mapBifunctor F I J).obj X).obj Y).HasMap p]

{X₁ X₂ : CategoryTheory.GradedObject I C₁}

((CategoryTheory.GradedObject.mapBifunctorMap F p).map φ).app Y i =
  CategoryTheory.GradedObject.mapBifunctorMapMap F p φ (CategoryTheory.CategoryStruct.id Y) i


theorem toPNat'_coe {n : ℕ} : 0 < n → (n.toPNat' : ℕ) = n


/-- Do not use this lemma: It is made obsolete by `exists_right_complement'_of_coprime` -/
theorem step7 : IsCommutative N

(h2 :
  ∀ (G' : Type u) [inst : Group G'] [inst_1 : Finite G'],
    Nat.card G' < Nat.card G →
      ∀ {N' : Subgroup G'} [inst_2 : N'.Normal], (Nat.card ↥N').Coprime N'.index → ∃ H', N'.IsComplement' H')

(h3 : ∀ (H : Subgroup G), ¬N.IsComplement' H)


/-- `HasFTaylorSeriesUpToOn n f p s` registers the fact that `p 0 = f` and `p (m+1)` is a
derivative of `p m` for `m < n`, and is continuous for `m ≤ n`. This is a predicate analogous to
`HasFDerivWithinAt` but for higher order derivatives.

Notice that `p` does not sum up to `f` on the diagonal (`FormalMultilinearSeries.sum`), even if
`f` is analytic and `n = ∞`: an additional `1/m!` factor on the `m`th term is necessary for that. -/
structure HasFTaylorSeriesUpToOn (n : ℕ∞) (f : E → F) (p : E → FormalMultilinearSeries 𝕜 E F)
  (s : Set E) : Prop where
  zero_eq : ∀ x ∈ s, (p x 0).uncurry0 = f x
  protected fderivWithin : ∀ m : ℕ, (m : ℕ∞) < n → ∀ x ∈ s,
    HasFDerivWithinAt (p · m) (p x m.succ).curryLeft s x
  cont : ∀ m : ℕ, (m : ℕ∞) ≤ n → ContinuousOn (p · m) s

{𝕜 : Type u}
[NontriviallyNormedField 𝕜]
{E : Type uE}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{F : Type uF}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{n : ℕ∞}
{f : E → F}
{p : E → FormalMultilinearSeries 𝕜 E F}
{s : Set E}
(self : HasFTaylorSeriesUpToOn n f p s)
(m : ℕ)

↑m < n → ∀ x ∈ s, HasFDerivWithinAt (fun x => p x m) (p x m.succ).curryLeft s x


/-- If there are `ε * (card α)^2` disjoint triangles, then the graph is `ε`-far from being
triangle-free. -/
lemma farFromTriangleFree_of_disjoint_triangles (tris : Finset (Finset α))
    (htris : tris ⊆ G.cliqueFinset 3)
    (pd : (tris : Set (Finset α)).Pairwise fun x y ↦ (x ∩ y : Set α).Subsingleton)
    (tris_big : ε * (card α ^ 2 : ℕ) ≤ tris.card) :
    G.FarFromTriangleFree ε

(pd : (↑tris).Pairwise fun x y => (↑x ∩ ↑y).Subsingleton)

(tris_big : ε * ↑(Fintype.card α ^ 2) ≤ ↑tris.card)


/-- **Disintegration** of finite product measures on `α × Ω`, where `Ω` is standard Borel. Such a
measure can be written as the composition-product of `ρ.fst` (marginal measure over `α`) and
a Markov kernel from `α` to `Ω`. We call that Markov kernel `ρ.condKernel`. -/
@[deprecated Measure.disintegrate (since := "2024-07-24")]
lemma _root_.MeasureTheory.Measure.compProd_fst_condKernel
    (ρ : Measure (α × Ω)) [IsFiniteMeasure ρ] :
    ρ.fst ⊗ₘ ρ.condKernel = ρ

{α : Type u_1}
{Ω : Type u_4}
{mα : MeasurableSpace α}
[MeasurableSpace Ω]
[StandardBorelSpace Ω]
[Nonempty Ω]
(ρ : MeasureTheory.Measure (α × Ω))
[MeasureTheory.IsFiniteMeasure ρ]


@[simp, norm_cast]
theorem coe_eq_zero {x : ℝ} : (x : EReal) = 0 ↔ x = 0


@[simp]
theorem cons_product : (a ::ₘ s) ×ˢ t = map (Prod.mk a) t + s ×ˢ t

{α : Type u_1}
{β : Type v}
(a : α)
(s : Multiset α)
(t : Multiset β)

(a ::ₘ s) ×ˢ t = Multiset.map (Prod.mk a) t + s ×ˢ t


theorem mem_asymm {x y : Class} : x ∈ y → y ∉ x


/-- A group homomorphism is injective iff its kernel is trivial. -/
@[to_additive "An additive group homomorphism is injective if its kernel is trivial."]
theorem injective_iff {f : α → β} (hf : IsGroupHom f) :
    Function.Injective f ↔ ∀ a, f a = 1 → a = 1

{α : Type u}
{β : Type v}
[Group α]
[Group β]
{f : α → β}
(hf : IsGroupHom f)

Function.Injective f ↔ ∀ (a : α), f a = 1 → a = 1


@[simp] theorem elim_inr (f : α → γ) (g : β → γ) (x : β) :
    Sum.elim f g (inr x) = g x

{α : Type u_1}
{γ : Sort u_2}
{β : Type u_3}
(f : α → γ)
(g : β → γ)
(x : β)


lemma not_reachable_iff_isEmpty_walk {u v : V} : ¬G.Reachable u v ↔ IsEmpty (G.Walk u v)

{V : Type u}
{G : SimpleGraph V}
{u v : V}


theorem dualAnnihilator_le_dualAnnihilator_iff {W W' : Subspace K V} :
    W.dualAnnihilator ≤ W'.dualAnnihilator ↔ W' ≤ W

{K : Type u}
{V : Type v}
[Field K]
[AddCommGroup V]
[Module K V]
{W W' : Subspace K V}

Submodule.dualAnnihilator W ≤ Submodule.dualAnnihilator W' ↔ W' ≤ W


theorem right_dom_of_inter_dom [Inter α] {a b : Part α} (hab : Dom (a ∩ b)) : b.Dom

{α : Type u_1}
[Inter α]
{a b : Part α}
(hab : (a ∩ b).Dom)


@[simp]
theorem dimH_sUnion {S : Set (Set X)} (hS : S.Countable) : dimH (⋃₀ S) = ⨆ s ∈ S, dimH s

{X : Type u_2}
[EMetricSpace X]
{S : Set (Set X)}
(hS : S.Countable)


protected theorem tsum_eq_limsup_sum_nat {f : ℕ → ℝ≥0∞} :
    ∑' i, f i = limsup (fun n => ∑ i ∈ Finset.range n, f i) atTop

{f : ℕ → ℝ≥0∞}

∑' (i : ℕ), f i = Filter.limsup (fun n => ∑ i ∈ Finset.range n, f i) Filter.atTop


theorem isAntichain_singleton (a : α) (r : α → α → Prop) : IsAntichain r {a}

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


@[to_additive (attr := measurability)]
protected theorem const_mul [Mul β] [ContinuousMul β] (hf : AEStronglyMeasurable f μ) (c : β) :
    AEStronglyMeasurable (fun x => c * f x) μ

(hf : MeasureTheory.AEStronglyMeasurable f μ)

MeasureTheory.AEStronglyMeasurable (fun x => c * f x) μ


theorem sSup_continuous' (s : Set (α → β)) (hc : ∀ f ∈ s, Continuous' f) :
    Continuous' (sSup s)

(hc : ∀ f ∈ s, OmegaCompletePartialOrder.Continuous' f)


/-- `ContinuousMapClass F α β` states that `F` is a type of continuous maps.

You should extend this class when you extend `ContinuousMap`. -/
class ContinuousMapClass (F α β : Type*) [TopologicalSpace α] [TopologicalSpace β]
    [FunLike F α β] : Prop where
  /-- Continuity -/
  map_continuous (f : F) : Continuous f

{F : Type u_1}
{α : Type u_2}
{β : Type u_3}
[TopologicalSpace α]
[TopologicalSpace β]
[FunLike F α β]
[self : ContinuousMapClass F α β]
(f : F)


theorem degree_add_eq_left_of_degree_lt (h : degree q < degree p) : degree (p + q) = degree p

{R : Type u}
[Semiring R]
{p q : R[X]}
(h : q.degree < p.degree)


@[to_additive]
theorem preimage_image_mk (N : Subgroup α) (s : Set α) :
    mk ⁻¹' ((mk : α → α ⧸ N) '' s) = ⋃ x : N, (· * (x : α)) ⁻¹' s

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

QuotientGroup.mk ⁻¹' (QuotientGroup.mk '' s) = ⋃ x, (fun x_1 => x_1 * ↑x) ⁻¹' s


/-- The third projection `Triangle C ⥤ C`. -/
@[simps]
def π₃ : Triangle C ⥤ C

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

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


@[mono, gcongr]
theorem closure_mono (h : s ⊆ t) : closure s ⊆ closure t

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


lemma farFromTriangleFree [ExplicitDisjoint t] {ε : 𝕜}
    (ht : ε * ((Fintype.card α + Fintype.card β + Fintype.card γ) ^ 2 : ℕ) ≤ t.card) :
    (graph t).FarFromTriangleFree ε

(ht : ε * ↑((Fintype.card α + Fintype.card β + Fintype.card γ) ^ 2) ≤ ↑t.card)


theorem toDual_eq_equivFun [Finite ι] (m : M) (i : ι) : b.toDual m (b i) = b.equivFun m i

{R : Type uR}
{M : Type uM}
{ι : Type uι}
[CommSemiring R]
[AddCommMonoid M]
[Module R M]
[DecidableEq ι]
(b : Basis ι R M)
[Finite ι]
(m : M)
(i : ι)


lemma _root_.Set.Finite.absorbs_biUnion {ι : Type*} {t : ι → Set α} {I : Set ι} (hI : I.Finite) :
    Absorbs M s (⋃ i ∈ I, t i) ↔ ∀ i ∈ I, Absorbs M s (t i)

{M : Type u_1}
{α : Type u_2}
[Bornology M]
[SMul M α]
{s : Set α}
{ι : Type u_3}
{t : ι → Set α}
{I : Set ι}
(hI : I.Finite)


theorem ContDiff.contDiffOn (h : ContDiff 𝕜 n f) : ContDiffOn 𝕜 n f s

{𝕜 : Type u}
[NontriviallyNormedField 𝕜]
{E : Type uE}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{F : Type uF}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{s : Set E}
{f : E → F}
{n : ℕ∞}
(h : ContDiff 𝕜 n f)


/-- The number of complex roots equals the number of real roots plus
    the number of roots not fixed by complex conjugation (i.e. with some imaginary component). -/
theorem card_complex_roots_eq_card_real_add_card_not_gal_inv (p : ℚ[X]) :
    (p.rootSet ℂ).toFinset.card =
      (p.rootSet ℝ).toFinset.card +
        (galActionHom p ℂ (restrict p ℂ
        (AlgEquiv.restrictScalars ℚ Complex.conjAe))).support.card

(p.rootSet ℂ).toFinset.card =
  (p.rootSet ℝ).toFinset.card +
    ((Polynomial.Gal.galActionHom p ℂ)
          ((Polynomial.Gal.restrict p ℂ) (AlgEquiv.restrictScalars ℚ Complex.conjAe))).support.card


/-- Swapping elements in `σ` with equal values in `v` result in zero if the swap has no effect
on the quotient. -/
theorem domCoprod.summand_eq_zero_of_smul_invariant (a : Mᵢ [⋀^ιa]→ₗ[R'] N₁)
    (b : Mᵢ [⋀^ιb]→ₗ[R'] N₂) (σ : Perm.ModSumCongr ιa ιb) {v : ιa ⊕ ιb → Mᵢ}
    {i j : ιa ⊕ ιb} (hv : v i = v j) (hij : i ≠ j) :
    swap i j • σ = σ → domCoprod.summand a b σ v = 0

{ι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.ModSumCongr ιa ιb)
{v : ιa ⊕ ιb → Mᵢ}
{i j : ιa ⊕ ιb}
(hv : v i = v j)
(hij : i ≠ j)

Equiv.swap i j • σ = σ → (AlternatingMap.domCoprod.summand a b σ) v = 0


@[simp, norm_cast]
theorem coe_fst : ↑(fst R A B) = AlgHom.fst R A B

{R : Type u_1}
[CommSemiring R]
{A : Type u_2}
[Semiring A]
[TopologicalSpace A]
{B : Type u_3}
[Semiring B]
[TopologicalSpace B]
[Algebra R A]
[Algebra R B]

↑(ContinuousAlgHom.fst R A B) = AlgHom.fst R A B


/-- A monoid is isomorphic to the opposite of its opposite. -/
@[to_additive (attr := simps!)
      "A additive monoid is isomorphic to the opposite of its opposite."]
def MulEquiv.opOp (M : Type*) [Mul M] : M ≃* Mᵐᵒᵖᵐᵒᵖ

∀ (a : Mᵃᵒᵖᵃᵒᵖ), (AddEquiv.opOp M).symm a = AddOpposite.unop (AddOpposite.unop a)


@[to_additive Set.AddAntidiagonal.eq_of_fst_le_fst_of_snd_le_snd]
theorem eq_of_fst_le_fst_of_snd_le_snd (h₁ : (x : α × α).1 ≤ (y : α × α).1)
    (h₂ : (x : α × α).2 ≤ (y : α × α).2) : x = y

{α : Type u_1}
[OrderedCancelAddCommMonoid α]
(s t : Set α)
(a : α)
{x y : ↑(s.addAntidiagonal t a)}
(h₁ : (↑x).1 ≤ (↑y).1)
(h₂ : (↑x).2 ≤ (↑y).2)


theorem IsInt.of_raw (α) [Ring α] (n : ℤ) : IsInt (n.rawCast : α) n


theorem map_bind {α β γ} (f : β → γ) (x : Option α) (g : α → Option β) :
    Option.map f (x >>= g) = x >>= fun a ↦ Option.map f (g a)

{α β γ : Type u_5}
(f : β → γ)
(x : Option α)
(g : α → Option β)

Option.map f (x >>= g) = do
  let a ← x
  Option.map f (g a)


@[simp] lemma diffs_singleton : s \\ {b} = s.image (· \ b)

{α : Type u_2}
[DecidableEq α]
[GeneralizedBooleanAlgebra α]
{s : Finset α}
{b : α}

s.diffs {b} = Finset.image (fun x => x \ b) s


theorem isOpenMap_barycentric_coord [Nontrivial ι] (b : AffineBasis ι 𝕜 P) (i : ι) :
    IsOpenMap (b.coord i)

{ι : Type u_1}
{𝕜 : Type u_2}
{E : Type u_3}
{P : Type u_4}
[NontriviallyNormedField 𝕜]
[CompleteSpace 𝕜]
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
[MetricSpace P]
[NormedAddTorsor E P]
[Nontrivial ι]
(b : AffineBasis ι 𝕜 P)
(i : ι)


lemma coe_injective : Injective ((↑) : ℝ≥0 → ℝ≥0∞)


theorem limsInf_principal {s : Set α} (h : BddBelow s) (hs : s.Nonempty) : limsInf (𝓟 s) = sInf s

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


/-- The Hausdorff distance between a set and itself is zero. -/
@[simp]
theorem hausdorffDist_self_zero : hausdorffDist s s = 0

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


@[simp] theorem cons_subset : a :: l ⊆ m ↔ a ∈ m ∧ l ⊆ m

∀ {α : Type u_1} {a : α} {l m : List α}, a :: l ⊆ m ↔ a ∈ m ∧ l ⊆ m


@[simp]
theorem prod_sup : s ×ˢ (t₁ ⊔ t₂) = s ×ˢ t₁ ⊔ s ×ˢ t₂

{α : Type u_1}
{β : Type u_2}
[Preorder α]
[Preorder β]
(s : UpperSet α)
(t₁ t₂ : UpperSet β)

s ×ˢ (t₁ ⊔ t₂) = s ×ˢ t₁ ⊔ s ×ˢ t₂


theorem integrable_cexp_neg_mul_sq_norm_add_of_euclideanSpace
    {ι : Type*} [Fintype ι] (hb : 0 < b.re) (c : ℂ) (w : EuclideanSpace ℝ ι) :
    Integrable (fun (v : EuclideanSpace ℝ ι) ↦ cexp (- b * ‖v‖^2 + c * ⟪w, v⟫))

{b : ℂ}
{ι : Type u_2}
[Fintype ι]
(hb : 0 < b.re)
(c : ℂ)
(w : EuclideanSpace ℝ ι)

MeasureTheory.Integrable (fun v => cexp (-b * ↑‖v‖ ^ 2 + c * ↑⟪w, v⟫_ℝ)) MeasureTheory.volume


/-- If bounded continuous functions tend to the indicator of a measurable set and are
uniformly bounded, then their integrals against a finite measure tend to the measure of the set.
This formulation assumes:
 * the functions tend to a limit along a countably generated filter;
 * the limit is in the almost everywhere sense;
 * boundedness holds almost everywhere.
-/
theorem measure_of_cont_bdd_of_tendsto_filter_indicator {ι : Type*} {L : Filter ι}
    [L.IsCountablyGenerated] [TopologicalSpace Ω] [OpensMeasurableSpace Ω] (μ : Measure Ω)
    [IsFiniteMeasure μ] {c : ℝ≥0} {E : Set Ω} (E_mble : MeasurableSet E) (fs : ι → Ω →ᵇ ℝ≥0)
    (fs_bdd : ∀ᶠ i in L, ∀ᵐ ω : Ω ∂μ, fs i ω ≤ c)
    (fs_lim : ∀ᵐ ω ∂μ, Tendsto (fun i ↦ fs i ω) L (𝓝 (indicator E (fun _ ↦ (1 : ℝ≥0)) ω))) :
    Tendsto (fun n ↦ lintegral μ fun ω ↦ fs n ω) L (𝓝 (μ E))

(fs : ι → Ω →ᵇ ℝ≥0)

(fs_bdd : ∀ᶠ (i : ι) in L, ∀ᵐ (ω : Ω) ∂μ, (fs i) ω ≤ c)

(fs_lim : ∀ᵐ (ω : Ω) ∂μ, Filter.Tendsto (fun i => (fs i) ω) L (𝓝 (E.indicator (fun x => 1) ω)))

Filter.Tendsto (fun n => ∫⁻ (ω : Ω), ↑((fs n) ω) ∂μ) L (𝓝 (μ E))


@[simp] theorem matroid_indep_iff {M : IndepMatroid α} {I : Set α} :
    M.matroid.Indep I ↔ M.Indep I

{α : Type u_1}
{M : IndepMatroid α}
{I : Set α}


theorem smul_closure (a : α) (s : Set M) : a • closure s = closure (a • s)

{α : Type u_1}
{M : Type u_3}
[Monoid M]
[Monoid α]
[MulDistribMulAction α M]
(a : α)
(s : Set M)

a • Submonoid.closure s = Submonoid.closure (a • s)


lemma sheafComposeNatTrans_fac (P : Cᵒᵖ ⥤ A) :
    adj₂.unit.app (P ⋙ F) ≫
      (sheafToPresheaf J B).map ((sheafComposeNatTrans J F adj₁ adj₂).app P) =
        whiskerRight (adj₁.unit.app P) F

(J : CategoryTheory.GrothendieckTopology C)

{G₁ : CategoryTheory.Functor (CategoryTheory.Functor Cᵒᵖ A) (CategoryTheory.Sheaf J A)}

(adj₁ : G₁ ⊣ CategoryTheory.sheafToPresheaf J A)

{G₂ : CategoryTheory.Functor (CategoryTheory.Functor Cᵒᵖ B) (CategoryTheory.Sheaf J B)}

(adj₂ : G₂ ⊣ CategoryTheory.sheafToPresheaf J B)

CategoryTheory.CategoryStruct.comp (adj₂.unit.app (P.comp F))
    ((CategoryTheory.sheafToPresheaf J B).map ((CategoryTheory.sheafComposeNatTrans J F adj₁ adj₂).app P)) =
  CategoryTheory.whiskerRight (adj₁.unit.app P) F


@[simp]
theorem Icc_union_Ioi_eq_Ici (h : a ≤ b) : Icc a b ∪ Ioi b = Ici a

{α : Type u_1}
[LinearOrder α]
{a b : α}
(h : a ≤ b)


theorem eLpNorm_mono_ae {f : α → F} {g : α → G} (h : ∀ᵐ x ∂μ, ‖f x‖ ≤ ‖g x‖) :
    eLpNorm f p μ ≤ eLpNorm g p μ

{α : Type u_1}
{F : Type u_3}
{G : Type u_4}
{m0 : MeasurableSpace α}
{p : ℝ≥0∞}
{μ : MeasureTheory.Measure α}
[NormedAddCommGroup F]
[NormedAddCommGroup G]
{f : α → F}
{g : α → G}
(h : ∀ᵐ (x : α) ∂μ, ‖f x‖ ≤ ‖g x‖)

MeasureTheory.eLpNorm f p μ ≤ MeasureTheory.eLpNorm g p μ


/-- The equivalence between the quaternions over `R` and `Fin 4 → R`. -/
@[simps! symm_apply]
def Quaternion.equivTuple (R : Type*) [One R] [Neg R] : ℍ[R] ≃ (Fin 4 → R)

(R : Type u_1)
[One R]
[Neg R]
(a : Fin 4 → R)

(Quaternion.equivTuple R).symm a = { re := a 0, imI := a 1, imJ := a 2, imK := a 3 }


theorem IsAtom.inf_eq_bot_of_ne [SemilatticeInf α] [OrderBot α] {a b : α} (ha : IsAtom a)
    (hb : IsAtom b) (hab : a ≠ b) : a ⊓ b = ⊥

{α : Type u_2}
[SemilatticeInf α]
[OrderBot α]
{a b : α}
(ha : IsAtom a)
(hb : IsAtom b)
(hab : a ≠ b)


protected theorem Unit.ext (x y : Unit) : x = y


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


@[to_additive (attr := simp) snd_comp_prod]
theorem snd_comp_prod (f : M →* N) (g : M →* P) : (snd N P).comp (f.prod g) = g

{M : Type u_5}
{N : Type u_6}
{P : Type u_7}
[AddZeroClass M]
[AddZeroClass N]
[AddZeroClass P]
(f : M →+ N)
(g : M →+ P)

(AddMonoidHom.snd N P).comp (f.prod g) = g


lemma self_mul_conjTranspose_mulVec_eq_zero (A : Matrix m n R) (v : m → R) :
    (A * Aᴴ) *ᵥ v = 0 ↔ Aᴴ *ᵥ v = 0

{m : Type u_1}
{n : Type u_2}
{R : Type u_4}
[Fintype m]
[Fintype n]
[PartialOrder R]
[NonUnitalRing R]
[StarRing R]
[StarOrderedRing R]
[NoZeroDivisors R]
(A : Matrix m n R)
(v : m → R)

(A * A.conjTranspose).mulVec v = 0 ↔ A.conjTranspose.mulVec v = 0


theorem SameCycle.cycleOf_apply : SameCycle f x y → cycleOf f x y = f y

{α : Type u_2}
{f : Equiv.Perm α}
{x y : α}
[DecidableRel f.SameCycle]


@[simp]
lemma disjoint_prod {f' : Filter α} {g' : Filter β} :
    Disjoint (f ×ˢ g) (f' ×ˢ g') ↔ Disjoint f f' ∨ Disjoint g g'

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


@[simp]
lemma map_zero_succ_succ (j : ℕ) (hj : j + 2 < n + 1 + 1) :
    map F f 0 ⟨j + 2, hj⟩ (by simp) = f ≫ F.map' 0 (j+1)

(F : CategoryTheory.ComposableArrows C n)

CategoryTheory.ComposableArrows.Precomp.map F f 0 ⟨j + 2, hj⟩ ⋯ =
  CategoryTheory.CategoryStruct.comp f (F.map' 0 (j + 1) ⋯ ⋯)


/-- The powerset functor. `Set` as a contravariant functor. -/
@[simps]
def typeToBoolAlgOp : Type u ⥤ BoolAlgᵒᵖ

typeToBoolAlgOp.obj X = Opposite.op (BoolAlg.of (Set X))


/-- **Uniqueness of left-invariant measures**: In a second-countable locally compact group, any
  σ-finite left-invariant measure is a scalar multiple of the Haar measure.
  This is slightly weaker than assuming that `μ` is a Haar measure (in particular we don't require
  `μ ≠ 0`).
  See also `isMulLeftInvariant_eq_smul_of_regular`
  for a statement not assuming second-countability. -/
@[to_additive
"**Uniqueness of left-invariant measures**: In a second-countable locally compact additive group,
  any σ-finite left-invariant measure is a scalar multiple of the additive Haar measure.
  This is slightly weaker than assuming that `μ` is a additive Haar measure (in particular we don't
  require `μ ≠ 0`).
  See also `isAddLeftInvariant_eq_smul_of_regular`
  for a statement not assuming second-countability."]
theorem haarMeasure_unique (μ : Measure G) [SigmaFinite μ] [IsMulLeftInvariant μ]
    (K₀ : PositiveCompacts G) : μ = μ K₀ • haarMeasure K₀

(K₀ : TopologicalSpace.PositiveCompacts G)

μ = μ ↑K₀ • MeasureTheory.Measure.addHaarMeasure K₀


/-- `ContinuousSemilinearEquivClass F σ M M₂` asserts `F` is a type of bundled continuous
`σ`-semilinear equivs `M → M₂`.  See also `ContinuousLinearEquivClass F R M M₂` for the case
where `σ` is the identity map on `R`.  A map `f` between an `R`-module and an `S`-module over a ring
homomorphism `σ : R →+* S` is semilinear if it satisfies the two properties `f (x + y) = f x + f y`
and `f (c • x) = (σ c) • f x`. -/
class ContinuousSemilinearEquivClass (F : Type*) {R : outParam Type*} {S : outParam Type*}
    [Semiring R] [Semiring S] (σ : outParam <| R →+* S) {σ' : outParam <| S →+* R}
    [RingHomInvPair σ σ'] [RingHomInvPair σ' σ] (M : outParam Type*) [TopologicalSpace M]
    [AddCommMonoid M] (M₂ : outParam Type*) [TopologicalSpace M₂] [AddCommMonoid M₂] [Module R M]
    [Module S M₂] [EquivLike F M M₂] extends SemilinearEquivClass F σ M M₂ : Prop where
  map_continuous : ∀ f : F, Continuous f := by continuity
  inv_continuous : ∀ f : F, Continuous (EquivLike.inv f) := by continuity

[self : ContinuousSemilinearEquivClass F σ M M₂]


theorem strong_law_aux6 {c : ℝ} (c_one : 1 < c) :
    ∀ᵐ ω, Tendsto (fun n : ℕ => (∑ i ∈ range ⌊c ^ n⌋₊, X i ω) / ⌊c ^ n⌋₊) atTop (𝓝 𝔼[X 0])

(X : ℕ → Ω → ℝ)

(hint : MeasureTheory.Integrable (X 0) ℙ)

(hindep : Pairwise fun i j => ProbabilityTheory.IndepFun (X i) (X j) ℙ)

(hident : ∀ (i : ℕ), ProbabilityTheory.IdentDistrib (X i) (X 0) ℙ ℙ)

(hnonneg : ∀ (i : ℕ) (ω : Ω), 0 ≤ X i ω)

∀ᵐ (ω : Ω),
  Filter.Tendsto (fun n => (∑ i ∈ Finset.range ⌊c ^ n⌋₊, X i ω) / ↑⌊c ^ n⌋₊) Filter.atTop (𝓝 (∫ (a : Ω), X 0 a))


@[simp]
theorem LinearMap.toMatrix₂'_compl₁₂ (B : (n → R) →ₗ[R] (m → R) →ₗ[R] R) (l : (n' → R) →ₗ[R] n → R)
    (r : (m' → R) →ₗ[R] m → R) :
    toMatrix₂' R (B.compl₁₂ l r) = (toMatrix' l)ᵀ * toMatrix₂' R B * toMatrix' r

{n : Type u_12}
{m : Type u_13}
{n' : Type u_14}
{m' : Type u_15}
{R : Type u_17}
[CommSemiring R]
[Fintype n]
[Fintype m]
[DecidableEq n]
[DecidableEq m]
[Fintype n']
[Fintype m']
[DecidableEq n']
[DecidableEq m']
(B : (n → R) →ₗ[R] (m → R) →ₗ[R] R)
(l : (n' → R) →ₗ[R] n → R)
(r : (m' → R) →ₗ[R] m → R)

(LinearMap.toMatrix₂' R) (B.compl₁₂ l r) = (LinearMap.toMatrix' l)ᵀ * (LinearMap.toMatrix₂' R) B * LinearMap.toMatrix' r


{X₁ X₂ Y : TopCat}
{f : C(↑X₁, ↑Y)}
{g : C(↑X₂, ↑Y)}
{x₀ x₁ : ↑X₁}
{x₂ x₃ : ↑X₂}
{p : Path x₀ x₁}
{q : Path x₂ x₃}
(hfg : ∀ (t : ↑I), f (p t) = g (q t))


/-- Adding a vector to a point in the given subspace, then taking the
orthogonal projection, produces the original point if the vector is a
multiple of the result of subtracting a point's orthogonal projection
from that point. -/
theorem orthogonalProjection_vadd_smul_vsub_orthogonalProjection {s : AffineSubspace ℝ P}
    [Nonempty s] [HasOrthogonalProjection s.direction] {p1 : P} (p2 : P) (r : ℝ) (hp : p1 ∈ s) :
    orthogonalProjection s (r • (p2 -ᵥ orthogonalProjection s p2 : V) +ᵥ p1) = ⟨p1, hp⟩

{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]
{p1 : P}
(p2 : P)
(r : ℝ)
(hp : p1 ∈ s)

(EuclideanGeometry.orthogonalProjection s) (r • (p2 -ᵥ ↑((EuclideanGeometry.orthogonalProjection s) p2)) +ᵥ p1) =
  ⟨p1, hp⟩


theorem mul_le_of_le_of_le_one' [PosMulMono α] [MulPosMono α] (bc : b ≤ c) (ha : a ≤ 1) (a0 : 0 ≤ a)
    (c0 : 0 ≤ c) : b * a ≤ c

{α : Type u_1}
{a b c : α}
[MulOneClass α]
[Zero α]
[Preorder α]
[PosMulMono α]
[MulPosMono α]
(bc : b ≤ c)
(ha : a ≤ 1)
(a0 : 0 ≤ a)
(c0 : 0 ≤ c)


theorem mem_find_carrier_iff {c : Set (PartialRefinement u s)} {i : ι} (ne : c.Nonempty) :
    i ∈ (find c ne i).carrier ↔ i ∈ chainSupCarrier c

{c : Set (ShrinkingLemma.PartialRefinement u s)}

i ∈ (ShrinkingLemma.PartialRefinement.find c ne i).carrier ↔ i ∈ ShrinkingLemma.PartialRefinement.chainSupCarrier c


@[simp]
theorem mem_mk {s h₁ h₂} : J ∈ (mk s h₁ h₂ : Prepartition I) ↔ J ∈ s

{h₂ : (↑s).Pairwise (Disjoint on BoxIntegral.Box.toSet)}

J ∈ { boxes := s, le_of_mem' := h₁, pairwiseDisjoint := h₂ } ↔ J ∈ s


/-- The functor `AddCommGroup ⥤ CommGroup` by sending `X ↦ multiplicative Y` and `f ↦ f`.
-/
@[simps]
def toCommGrp : AddCommGrp ⥤ CommGrp

AddCommGrp.toCommGrp.obj X = CommGrp.of (Multiplicative ↑X)


lemma restrictionApp_id (M : PresheafOfModules R) (X : Cᵒᵖ) :
    restrictionApp (𝟙 X) M =
      (ModuleCat.restrictScalarsId' (R.map (𝟙 X)) (R.map_id X)).inv.app (M.obj X)

{C : Type u₁}
[CategoryTheory.Category.{v₁, u₁} C]
{R : Cᵒᵖ ⥤ RingCat}
(M : PresheafOfModules R)
(X : Cᵒᵖ)

PresheafOfModules.restrictionApp (𝟙 X) M = (ModuleCat.restrictScalarsId' (R.map (𝟙 X)) ⋯).inv.app (M.obj X)


/-- Change a cocone on `F : J ⥤ Cᵒᵖ` to a cone on `F.leftOp : Jᵒᵖ ⥤ C`. -/
@[simps!]
def coneLeftOpOfCocone (c : Cocone F) : Cone F.leftOp

{J : Type u₁}
[CategoryTheory.Category.{v₁, u₁} J]
{C : Type u₃}
[CategoryTheory.Category.{v₃, u₃} C]
{F : J ⥤ Cᵒᵖ}
(c : CategoryTheory.Limits.Cocone F)

(CategoryTheory.Limits.coneLeftOpOfCocone c).pt = Opposite.unop c.pt


lemma exists_not_and_succ_of_not_zero_of_exists {p : ℕ → Prop} (H' : ¬ p 0) (H : ∃ n, p n) :
    ∃ n, ¬ p n ∧ p (n + 1)

{p : ℕ → Prop}
(H' : ¬p 0)
(H : ∃ n, p n)


@[simp]
theorem drop_left : ∀ l₁ l₂ : List α, drop (length l₁) (l₁ ++ l₂) = l₂


theorem dvd_natAbs {a b : Int} : a ∣ b.natAbs ↔ a ∣ b


theorem coprodMap_apply_single (f : ∀ i : ι, M i →ₗ[R] N) (i : ι) (x : M i) :
    coprodMap f (single i x) = f i x

{ι : Type u_1}
{R : Type u_2}
{M : ι → Type u_4}
{N : Type u_5}
[Semiring R]
[(i : ι) → AddCommMonoid (M i)]
[(i : ι) → Module R (M i)]
[AddCommMonoid N]
[Module R N]
[DecidableEq ι]
(f : (i : ι) → M i →ₗ[R] N)
(i : ι)
(x : M i)

(DFinsupp.coprodMap f) (DFinsupp.single i x) = (f i) x


theorem LinearMap.toMatrixAlgEquiv_apply (f : M₁ →ₗ[R] M₁) (i j : n) :
    LinearMap.toMatrixAlgEquiv v₁ f i j = v₁.repr (f (v₁ j)) i

{R : Type u_1}
[CommSemiring R]
{n : Type u_4}
[Fintype n]
[DecidableEq n]
{M₁ : Type u_5}
[AddCommMonoid M₁]
[Module R M₁]
(v₁ : Basis n R M₁)
(f : M₁ →ₗ[R] M₁)
(i j : n)

(LinearMap.toMatrixAlgEquiv v₁) f i j = (v₁.repr (f (v₁ j))) i


/-- `x^n`, `n : ℕ` is strictly convex on the whole real line whenever `n ≠ 0` is even. -/
theorem Even.strictConvexOn_pow {n : ℕ} (hn : Even n) (h : n ≠ 0) :
    StrictConvexOn ℝ Set.univ fun x : ℝ => x ^ n

StrictConvexOn ℝ Set.univ fun x => x ^ n


theorem gradeBy_id : gradeBy R (id : M → M) = grade R

{M : Type u_1}
(R : Type u_3)
[CommSemiring R]

AddMonoidAlgebra.gradeBy R id = AddMonoidAlgebra.grade R


theorem modular_T_smul (z : ℍ) : ModularGroup.T • z = (1 : ℝ) +ᵥ z


@[simp]
theorem mapMatrix_refl : (Equiv.refl α).mapMatrix = Equiv.refl (Matrix m n α)

{m : Type u_2}
{n : Type u_3}
{α : Type v}


theorem kerase_sublist (a : α) (l : List (Sigma β)) : kerase a l <+ l

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


@[to_additive]
lemma comp_ne_one_iff [One β] [One γ] (f : α → β) {g : β → γ} (hg : Injective g) (hg0 : g 1 = 1) :
    g ∘ f ≠ 1 ↔ f ≠ 1

{α : Type u_1}
{β : Type u_2}
{γ : Type u_3}
[Zero β]
[Zero γ]
(f : α → β)
{g : β → γ}
(hg : Function.Injective g)
(hg0 : g 0 = 0)


lemma coe_inv_map_Δ' : (E.map φ).Δ'⁻¹ = φ ↑E.Δ'⁻¹

{R : Type u}
[CommRing R]
(E : EllipticCurve R)
{A : Type v}
[CommRing A]
(φ : R →+* A)


theorem isLowerSet_univ : IsLowerSet (univ : Set α)


@[mono]
theorem coprod_mono {f₁ f₂ : Filter α} {g₁ g₂ : Filter β} (hf : f₁ ≤ f₂) (hg : g₁ ≤ g₂) :
    f₁.coprod g₁ ≤ f₂.coprod g₂

{α : Type u_1}
{β : Type u_2}
{f₁ f₂ : Filter α}
{g₁ g₂ : Filter β}
(hf : f₁ ≤ f₂)
(hg : g₁ ≤ g₂)


/-- If `x` is an element of a subgroup `s` of a seminormed group `E`, its norm in `s` is equal to
its norm in `E`.

This is a reversed version of the `simp` lemma `Subgroup.coe_norm` for use by `norm_cast`. -/
@[to_additive (attr := norm_cast) "If `x` is an element of a subgroup `s` of a seminormed group `E`,
its norm in `s` is equal to its norm in `E`.

This is a reversed version of the `simp` lemma `AddSubgroup.coe_norm` for use by `norm_cast`."]
theorem norm_coe {s : Subgroup E} (x : s) : ‖(x : E)‖ = ‖x‖

{E : Type u_6}
[SeminormedAddGroup E]
{s : AddSubgroup E}
(x : ↥s)


lemma isSMulRegular_on_quot_iff_lsmul_comap_eq :
    IsSMulRegular (M ⧸ N) r ↔ N.comap (LinearMap.lsmul R M r) = N

{R : Type u_1}
{M : Type u_3}
[CommRing R]
[AddCommGroup M]
[Module R M]
(N : Submodule R M)
(r : R)

IsSMulRegular (M ⧸ N) r ↔ Submodule.comap ((LinearMap.lsmul R M) r) N = N


theorem ContDiff.contDiffWithinAt (h : ContDiff 𝕜 n f) : ContDiffWithinAt 𝕜 n f s 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 : ContDiff 𝕜 n f)


@[to_additive]
theorem MonoidHom.map_finprod_of_preimage_one (f : M →* N) (hf : ∀ x, f x = 1 → x = 1) (g : α → M) :
    f (∏ᶠ i, g i) = ∏ᶠ i, f (g i)

{M : Type u_2}
{N : Type u_3}
{α : Sort u_4}
[CommMonoid M]
[CommMonoid N]
(f : M →* N)
(hf : ∀ (x : M), f x = 1 → x = 1)
(g : α → M)

f (∏ᶠ (i : α), g i) = ∏ᶠ (i : α), f (g i)


@[simp]
lemma mk_preimage_down {s : Set α} : #(ULift.down.{v} ⁻¹' s) = lift.{v} (#s)

Cardinal.mk ↑(ULift.down ⁻¹' s) = Cardinal.lift.{v, u} (Cardinal.mk ↑s)


theorem localRingHom_mk' (J : Ideal P) [J.IsPrime] (f : R →+* P) (hIJ : I = J.comap f) (x : R)
    (y : I.primeCompl) :
    localRingHom I J f hIJ (IsLocalization.mk' _ x y) =
      IsLocalization.mk' (Localization.AtPrime J) (f x)
        (⟨f y, le_comap_primeCompl_iff.mpr (ge_of_eq hIJ) y.2⟩ : J.primeCompl)

{R : Type u_1}
[CommSemiring R]
{P : Type u_3}
[CommSemiring P]
(I : Ideal R)
[hI : I.IsPrime]
(J : Ideal P)
[J.IsPrime]
(f : R →+* P)
(hIJ : I = Ideal.comap f J)
(x : R)
(y : ↥I.primeCompl)

(Localization.localRingHom I J f hIJ) (IsLocalization.mk' (Localization.AtPrime I) x y) =
  IsLocalization.mk' (Localization.AtPrime J) (f x) ⟨f ↑y, ⋯⟩


theorem image2_lowerBounds_upperBounds_subset_upperBounds_image2 :
    image2 f (lowerBounds s) (upperBounds t) ⊆ upperBounds (image2 f s t)

{f : α → β → γ}

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

Set.image2 f (lowerBounds s) (upperBounds t) ⊆ upperBounds (Set.image2 f s t)


theorem exp_eq_one_iff {x : ℂ} : exp x = 1 ↔ ∃ n : ℤ, x = n * (2 * π * I)

Complex.exp x = 1 ↔ ∃ n, x = ↑n * (2 * ↑Real.pi * Complex.I)


theorem v_p_lt_val {x : O} :
    v p < v (algebraMap O K x) ↔ (Ideal.Quotient.mk _ x : ModP K v O hv p) ≠ 0

{K : Type u₁}
[Field K]
{v : Valuation K ℝ≥0}
{O : Type u₂}
[CommRing O]
[Algebra O K]
(hv : v.Integers O)
{p : ℕ}
{x : O}

v ↑p < v ((algebraMap O K) x) ↔ (Ideal.Quotient.mk (Ideal.span {↑p})) x ≠ 0


theorem WithDensityᵥEq.congr_ae {f g : α → E} (h : f =ᵐ[μ] g) :
    μ.withDensityᵥ f = μ.withDensityᵥ g

{α : Type u_1}
{m : MeasurableSpace α}
{μ : MeasureTheory.Measure α}
{E : Type u_3}
[NormedAddCommGroup E]
[NormedSpace ℝ E]
{f g : α → E}
(h : f =ᵐ[μ] g)


theorem isDetecting_iff_isSeparating [HasEqualizers C] [Balanced C] (𝒢 : Set C) :
    IsDetecting 𝒢 ↔ IsSeparating 𝒢

{C : Type u₁}
[CategoryTheory.Category.{v₁, u₁} C]
[CategoryTheory.Limits.HasEqualizers C]
[CategoryTheory.Balanced C]
(𝒢 : Set C)

CategoryTheory.IsDetecting 𝒢 ↔ CategoryTheory.IsSeparating 𝒢


theorem mem_ext {l₀ l₁ : List (Sigma β)} (nd₀ : l₀.Nodup) (nd₁ : l₁.Nodup)
    (h : ∀ x, x ∈ l₀ ↔ x ∈ l₁) : l₀ ~ l₁

{α : Type u}
{β : α → Type v}
{l₀ l₁ : List (Sigma β)}
(nd₀ : l₀.Nodup)
(nd₁ : l₁.Nodup)
(h : ∀ (x : Sigma β), x ∈ l₀ ↔ x ∈ l₁)


theorem univ_nontrivial_iff :
    (Finset.univ : Finset α).Nontrivial ↔ Nontrivial α


theorem iterate_pred_comp_of_pos {n : ℕ} (hn : 0 < n) : f^[n.pred] ∘ f = f^[n]

{α : Type u}
(f : α → α)
{n : ℕ}
(hn : 0 < n)


@[symm]
nonrec theorem IndepFun.symm {_ : MeasurableSpace β} {_ : MeasurableSpace β'}
    (hfg : IndepFun f g κ μ) : IndepFun g f κ μ

{α : Type u_1}
{Ω : Type u_2}
{β : Type u_4}
{β' : Type u_5}
{_mα : MeasurableSpace α}
{_mΩ : MeasurableSpace Ω}
{κ : ProbabilityTheory.Kernel α Ω}
{μ : MeasureTheory.Measure α}
{f : Ω → β}
{g : Ω → β'}

∀ {x : MeasurableSpace β} {x_1 : MeasurableSpace β'},
  ProbabilityTheory.Kernel.IndepFun f g κ μ → ProbabilityTheory.Kernel.IndepFun g f κ μ


lemma quasiIso_iff (f : K ⟶ L) [∀ i, K.HasHomology i] [∀ i, L.HasHomology i] :
    QuasiIso f ↔ ∀ i, QuasiIsoAt f i


theorem det_of_upperTriangular [LinearOrder m] (h : M.BlockTriangular id) :
    M.det = ∏ i : m, M i i

{m : Type u_3}
{R : Type v}
[CommRing R]
{M : Matrix m m R}
[DecidableEq m]
[Fintype m]
[LinearOrder m]
(h : M.BlockTriangular id)


@[to_additive]
theorem orderOf_map_dvd {H : Type*} [Monoid H] (ψ : G →* H) (x : G) :
    orderOf (ψ x) ∣ orderOf x

{G : Type u_1}
[AddMonoid G]
{H : Type u_6}
[AddMonoid H]
(ψ : G →+ H)
(x : G)


/-- For maps between vector spaces, `MDifferentiable` and `Differentiable` coincide -/
theorem mdifferentiable_iff_differentiable :
    MDifferentiable 𝓘(𝕜, E) 𝓘(𝕜, E') f ↔ Differentiable 𝕜 f

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{E' : Type u_3}
[NormedAddCommGroup E']
[NormedSpace 𝕜 E']
{f : E → E'}


@[to_additive sum_le_card_nsmul]
lemma prod_le_pow_card [Preorder M] [CovariantClass M M (Function.swap (· * ·)) (· ≤ ·)]
    [CovariantClass M M (· * ·) (· ≤ ·)] (l : List M) (n : M) (h : ∀ x ∈ l, x ≤ n) :
    l.prod ≤ n ^ l.length

[CovariantClass M M (Function.swap fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1]

[CovariantClass M M (fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1]


{R : Type u_1}
{R₁ : Type u_2}
{M : Type u_5}
{M₁ : Type u_6}
[CommSemiring R]
[AddCommGroup M]
[Module R M]
[CommSemiring R₁]
[AddCommMonoid M₁]
[Module R₁ M₁]
{I₁ I₂ : R₁ →+* R}
{B : M₁ →ₛₗ[I₁] M₁ →ₛₗ[I₂] M}
(H : B.IsAlt)
(x y : M₁)


theorem le_sSup_of_le (hb : b ∈ s) (h : a ≤ b) : a ≤ sSup s

{α : Type u_1}
[CompleteSemilatticeSup α]
{s : Set α}
{a b : α}
(hb : b ∈ s)
(h : a ≤ b)


/-- A version of **Fubini's theorem** with the variables indexed by a general finite type. -/
theorem integral_fintype_prod_eq_prod (ι : Type*) [Fintype ι] {E : ι → Type*}
    (f : (i : ι) → E i → 𝕜) [∀ i, MeasureSpace (E i)] [∀ i, SigmaFinite (volume : Measure (E i))] :
    ∫ x : (i : ι) → E i, ∏ i, f i (x i) = ∏ i, ∫ x, f i x

[(i : ι) → MeasureTheory.MeasureSpace (E i)]

[∀ (i : ι), MeasureTheory.SigmaFinite MeasureTheory.volume]

∫ (x : (i : ι) → E i), ∏ i : ι, f i (x i) = ∏ i : ι, ∫ (x : E i), f i x


protected theorem bddAbove_range_iff {ι : Sort*} {p : ι → Seminorm 𝕜 E} :
    BddAbove (range p) ↔ ∀ x, BddAbove (range fun i ↦ p i x)

{𝕜 : Type u_3}
{E : Type u_7}
[NormedField 𝕜]
[AddCommGroup E]
[Module 𝕜 E]
{ι : Sort u_13}
{p : ι → Seminorm 𝕜 E}

BddAbove (Set.range p) ↔ ∀ (x : E), BddAbove (Set.range fun i => (p i) x)


/-- With `z ≤ w` iff `w - z` is real and nonnegative, `ℝ` and `ℂ` are star ordered rings.
(That is, a star ring in which the nonnegative elements are those of the form `star z * z`.)

Note this is only an instance with `open scoped ComplexOrder`. -/
lemma toStarOrderedRing : StarOrderedRing K


/--
Associate to a `(u+1)`-small topological space the corresponding condensed set, given by
`yonedaPresheaf`.
-/
@[simps! val_obj val_map]
noncomputable def TopCat.toCondensedSet (X : TopCat.{u+1}) : CondensedSet.{u}

∀ (X_1 : CompHausᵒᵖ), X.toCondensedSet.val.obj X_1 = C(↑(Opposite.unop X_1).toTop, ↑X)


theorem TransGen.closed {p : α → α → Prop} :
    (∀ a b, r a b → TransGen p a b) → TransGen r a b → TransGen p a b

{α : Type u_1}
{r : α → α → Prop}
{a b : α}
{p : α → α → Prop}

(∀ (a b : α), r a b → Relation.TransGen p a b) → Relation.TransGen r a b → Relation.TransGen p a b


theorem exp_conj' (y : 𝔸) (x : 𝔸) (hy : y ≠ 0) : exp 𝕂 (y⁻¹ * x * y) = y⁻¹ * exp 𝕂 x * y

{𝕂 : Type u_1}
{𝔸 : Type u_2}
[RCLike 𝕂]
[NormedDivisionRing 𝔸]
[NormedAlgebra 𝕂 𝔸]
[CompleteSpace 𝔸]
(y x : 𝔸)
(hy : y ≠ 0)

NormedSpace.exp 𝕂 (y⁻¹ * x * y) = y⁻¹ * NormedSpace.exp 𝕂 x * y


theorem IsNilpotent.isUnit_sub_one [Ring R] {r : R} (hnil : IsNilpotent r) : IsUnit (r - 1)

{R : Type u_1}
[Ring R]
{r : R}
(hnil : IsNilpotent r)


theorem coimageIsoImage'_hom :
    (coimageIsoImage' f).hom =
      cokernel.desc _ (factorThruImage f) (by simp [← cancel_mono (Limits.image.ι f)])

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

(CategoryTheory.Abelian.coimageIsoImage' f).hom =
  CategoryTheory.Limits.cokernel.desc (CategoryTheory.Limits.kernel.ι f) (CategoryTheory.Limits.factorThruImage f) ⋯


theorem insert_inj (ha : a ∉ s) : insert a s = insert b s ↔ a = b

{α : Type u}
{a b : α}
{s : Set α}
(ha : a ∉ s)


@[simp]
theorem aroots_one [CommRing S] [IsDomain S] [Algebra T S] :
    (1 : T[X]).aroots S = 0

{S : Type v}
{T : Type w}
[CommRing T]
[CommRing S]
[IsDomain S]
[Algebra T S]


@[simp]
theorem zipWith3_same_mid (f : α → β → α → γ) :
    ∀ (la : List α) (lb : List β), zipWith3 f la lb la = zipWith (fun a b => f a b a) la lb

{α : Type u}
{β : Type u_1}
{γ : Type u_2}
(f : α → β → α → γ)
(la : List α)
(lb : List β)

List.zipWith3 f la lb la = List.zipWith (fun a b => f a b a) la lb


@[to_additive]
theorem closure_iUnion {ι} (s : ι → Set G) : closure (⋃ i, s i) = ⨆ i, closure (s i)

{G : Type u_1}
[Group G]
{ι : Sort u_5}
(s : ι → Set G)

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


@[to_additive]
theorem IsWF.min_mul (hs : s.IsWF) (ht : t.IsWF) (hsn : s.Nonempty) (htn : t.Nonempty) :
    (hs.mul ht).min (hsn.mul htn) = hs.min hsn * ht.min htn

{α : Type u_1}
{s t : Set α}
[LinearOrderedCancelCommMonoid α]
(hs : s.IsWF)
(ht : t.IsWF)
(hsn : s.Nonempty)
(htn : t.Nonempty)


theorem Perm.pmap {p : α → Prop} (f : ∀ a, p a → β) {l₁ l₂ : List α} (p : l₁ ~ l₂) {H₁ H₂} :
    pmap f l₁ H₁ ~ pmap f l₂ H₂

{α : Type u_1}
{β : Type u_2}
{p : α → Prop}
(f : (a : α) → p a → β)
{l₁ l₂ : List α}

l₁ ~ l₂ → ∀ {H₁ : ∀ (a : α), a ∈ l₁ → p a} {H₂ : ∀ (a : α), a ∈ l₂ → p a}, List.pmap f l₁ H₁ ~ List.pmap f l₂ H₂


theorem biUnion_filter_atomise (ht : t ∈ F) (hts : t ⊆ s) :
    ((atomise s F).parts.filter fun u ↦ u ⊆ t ∧ u.Nonempty).biUnion id = t

{α : Type u_1}
[DecidableEq α]
{s t : Finset α}
[Fintype α]
{F : Finset (Finset α)}
(ht : t ∈ F)
(hts : t ⊆ s)

(Finset.filter (fun u => u ⊆ t ∧ u.Nonempty) (Finpartition.atomise s F).parts).biUnion id = t


theorem Memℒp.comp_measurePreserving {ν : MeasureTheory.Measure β} (hg : Memℒp g p ν)
    (hf : MeasurePreserving f μ ν) : Memℒp (g ∘ f) p μ

(hf : MeasureTheory.MeasurePreserving f μ ν)


theorem polarCoord_symm_abs (p : ℝ × ℝ) :
    Complex.abs (Complex.polarCoord.symm p) = |p.1|

Complex.abs (↑Complex.polarCoord.symm p) = |p.1|


@[simp] lemma truncatedInf_singleton (b a : α) : truncatedInf {b} a = if b ≤ a then b else ⊥

{α : Type u_1}
[SemilatticeInf α]
[BoundedOrder α]
[DecidableRel fun x x_1 => x ≤ x_1]
(b a : α)

{b}.truncatedInf a = if b ≤ a then b else ⊥


theorem exists_pos_sum_of_countable' {ε : ℝ≥0∞} (hε : ε ≠ 0) (ι) [Countable ι] :
    ∃ ε' : ι → ℝ≥0∞, (∀ i, 0 < ε' i) ∧ ∑' i, ε' i < ε

{ε : ℝ≥0∞}
(hε : ε ≠ 0)
(ι : Type u_4)
[Countable ι]


theorem Colimit.w_apply {j j' : J} {x : F.obj j} (f : j ⟶ j') :
    colimit.ι F j' (F.map f x) = colimit.ι F j x

{J : Type v}
[CategoryTheory.Category.{w, v} J]
{F : J ⥤ Type u}
[CategoryTheory.Limits.HasColimit F]
{j j' : J}
{x : F.obj j}
(f : j ⟶ j')

CategoryTheory.Limits.colimit.ι F j' (F.map f x) = CategoryTheory.Limits.colimit.ι F j x


/-- A (left) adjoint square has a lifting if and only if the original square has a lifting. -/
theorem left_adjoint_hasLift_iff : HasLift (sq.left_adjoint adj) ↔ HasLift sq

(sq : CategoryTheory.CommSq u i (F.map p) v)


theorem top_mem [OrderTop α] (s : Flag α) : (⊤ : α) ∈ s

{α : Type u_1}
[LE α]
[OrderTop α]
(s : Flag α)


@[simp] lemma map_id : map (OrderHom.id : α →o α) = ContinuousMap.id _

Topology.WithUpperSet.map OrderHom.id = ContinuousMap.id (Topology.WithUpperSet α)


@[simp]
theorem nnnorm_eq (x : ℝ≥0) : ‖(x : ℝ)‖₊ = x


theorem norm_lt_pow_iff_norm_le_pow_sub_one (x : ℤ_[p]) (n : ℤ) :
    ‖x‖ < (p : ℝ) ^ n ↔ ‖x‖ ≤ (p : ℝ) ^ (n - 1)

{p : ℕ}
[hp : Fact (Nat.Prime p)]
(x : ℤ_[p])
(n : ℤ)


@[simp]
theorem bddBelow_preimage (e : α ≃o β) {s : Set β} : BddBelow (e ⁻¹' s) ↔ BddBelow s

{α : Type u}
{β : Type v}
[Preorder α]
[Preorder β]
(e : α ≃o β)
{s : Set β}


@[to_additive (attr := simp)]
theorem smul_swap : (a • x).swap = a • x.swap

{M : Type u_1}
{α : Type u_4}
{β : Type u_5}
[SMul M α]
[SMul M β]
(a : M)
(x : α ⊕ β)


@[fun_prop]
theorem differentiableOn_inverse : DifferentiableOn 𝕜 (@Ring.inverse R _) {x | IsUnit x}

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{R : Type u_6}
[NormedRing R]
[NormedAlgebra 𝕜 R]
[CompleteSpace R]

DifferentiableOn 𝕜 Ring.inverse {x | IsUnit x}


@[to_additive]
theorem apply_eq_iff_eq (e : M ≃* N) {x y : M} : e x = e y ↔ x = y

{M : Type u_6}
{N : Type u_7}
[Mul M]
[Mul N]
(e : M ≃* N)
{x y : M}


@[reassoc (attr := simp)]
lemma wideCospan.limitIsoPi_hom_comp_pi [Finite ι] (X : C) (j : ι) :
    (wideCospan.limitIsoPi ι X).hom ≫ Pi.π _ j = WidePullback.π _ j

(CategoryTheory.CechNerveTerminalFrom.wideCospan.limitIsoPi ι X).hom ≫ CategoryTheory.Limits.Pi.π (fun x => X) j =
  CategoryTheory.Limits.WidePullback.π (fun x => CategoryTheory.Limits.terminal.from X) j


theorem isDetecting_empty_of_groupoid [∀ {X Y : C} (f : X ⟶ Y), IsIso f] :
    IsDetecting (∅ : Set C)

[∀ {X Y : C} (f : X ⟶ Y), CategoryTheory.IsIso f]


@[simp] lemma preCantorSet_succ (n : ℕ) :
    preCantorSet (n + 1) = (· / 3) '' preCantorSet n ∪ (fun x ↦ (2 + x) / 3) '' preCantorSet n

preCantorSet (n + 1) = (fun x => x / 3) '' preCantorSet n ∪ (fun x => (2 + x) / 3) '' preCantorSet n


theorem integrable_pair {f : α →ₛ E} {g : α →ₛ F} :
    Integrable f μ → Integrable g μ → Integrable (pair f g) μ

{α : Type u_1}
{E : Type u_4}
{F : Type u_5}
[MeasurableSpace α]
[NormedAddCommGroup E]
[NormedAddCommGroup F]
{μ : MeasureTheory.Measure α}
{f : MeasureTheory.SimpleFunc α E}
{g : MeasureTheory.SimpleFunc α F}

MeasureTheory.Integrable (↑f) μ → MeasureTheory.Integrable (↑g) μ → MeasureTheory.Integrable (↑(f.pair g)) μ


@[to_additive]
theorem min_mul_distrib (a b c : α) : min a (b * c) = min a (min a b * min a c)

min a (b + c) = min a (min a b + min a c)


@[to_additive]
theorem Specializes.const_smul {x y : α} (h : x ⤳ y) (c : M) : (c • x) ⤳ (c • y)

{M : Type u_1}
{α : Type u_2}
[TopologicalSpace α]
[VAdd M α]
[ContinuousConstVAdd M α]
{x y : α}
(h : x ⤳ y)
(c : M)


theorem map_eq_zero_of_not_injective (v : ι → M) (hv : ¬Function.Injective v) : f v = 0

{R : Type u_1}
{M : Type u_2}
{N : Type u_4}
{ι : Type u_6}
[Semiring R]
[AddCommMonoid M]
[Module R M]
[TopologicalSpace M]
[AddCommMonoid N]
[Module R N]
[TopologicalSpace N]
(f : M [⋀^ι]→L[R] N)
(v : ι → M)
(hv : ¬Function.Injective v)


private theorem add_left_aux2 (x y z : E) : ‖x + y - z‖ * ‖x + y - z‖ =
    (‖2 • x + y‖ * ‖2 • x + y‖ + ‖y - 2 • z‖ * ‖y - 2 • z‖) / 2 - ‖x + z‖ * ‖x + z‖

{E : Type u_2}
[NormedAddCommGroup E]
[InnerProductSpaceable E]
(x y z : E)


@[to_additive]
theorem map_sup (H K : Subgroup G) (f : G →* N) : (H ⊔ K).map f = H.map f ⊔ K.map f

{G : Type u_1}
[AddGroup G]
{N : Type u_5}
[AddGroup N]
(H K : AddSubgroup G)
(f : G →+ N)

AddSubgroup.map f (H ⊔ K) = AddSubgroup.map f H ⊔ AddSubgroup.map f K