/-- A homotopy `h` between chain maps `f` and `g` consists of components `h i j : C.X i ⟶ D.X j`
which are zero unless `c.Rel j i`, satisfying the homotopy condition.
-/
@[ext]
structure Homotopy (f g : C ⟶ D) where
  hom : ∀ i j, C.X i ⟶ D.X j
  zero : ∀ i j, ¬c.Rel j i → hom i j = 0 := by aesop_cat
  comm : ∀ i, f.f i = dNext i hom + prevD i hom + g.f i := by aesop_cat

{ι : Type u_1}
{V : Type u}
[CategoryTheory.Category.{v, u} V]
[CategoryTheory.Preadditive V]
{c : ComplexShape ι}
{C D : HomologicalComplex V c}
{f g : C ⟶ D}
(self : Homotopy f g)
(i : ι)

f.f i = (dNext i) self.hom + (prevD i) self.hom + g.f i


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

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


@[to_additive]
theorem prod_congr (f g : α → M) (h : ∀ a, f a = g a) : ∏ a, f a = ∏ a, g a

{α : Type u_1}
{M : Type u_4}
[Fintype α]
[AddCommMonoid M]
(f g : α → M)
(h : ∀ (a : α), f a = g a)


theorem antivaryOn_comm : AntivaryOn f g s ↔ AntivaryOn g f s

{ι : Type u_1}
{α : Type u_3}
{β : Type u_4}
[LinearOrder α]
[LinearOrder β]
{f : ι → α}
{g : ι → β}
{s : Set ι}


@[simp] lemma shiftRight_eq (m n : Nat) : shiftRight m n = m >>> n


@[simp] theorem filterMap_data (f : α → Option β) (l : Array α) :
    (l.filterMap f).data = l.data.filterMap f

{α : Type u_1}
{β : Type u_2}
(f : α → Option β)
(l : Array α)

(Array.filterMap f l 0).data = List.filterMap f l.data


@[simp]
theorem false_lt_true : false < true


protected theorem add_le_add_three {a b c d e f : Int}
    (h₁ : a ≤ d) (h₂ : b ≤ e) (h₃ : c ≤ f) : a + b + c ≤ d + e + f


theorem bit_neg_eq_neg (x : BitVec w) : -x = (adc (((iunfoldr (fun (i : Fin w) c => (c, !(x.getLsb i)))) ()).snd) (BitVec.ofNat w 1) false).snd

-x = ((BitVec.iunfoldr (fun i c => (c, !x.getLsb ↑i)) ()).snd.adc (1#w) false).snd


theorem abelian_derivedAbelianOfIdeal (I : LieIdeal R L) :
    IsLieAbelian (derivedAbelianOfIdeal I)

{R : Type u}
{L : Type v}
[CommRing R]
[LieRing L]
[LieAlgebra R L]
(I : LieIdeal R L)


theorem isAdjointPair_id : IsAdjointPair B B 1 1

{R : Type u_1}
{M : Type u_5}
{M₃ : Type u_8}
[CommSemiring R]
[AddCommMonoid M]
[Module R M]
[AddCommMonoid M₃]
[Module R M₃]
{I : R →+* R}
{B : M →ₗ[R] M →ₛₗ[I] M₃}


lemma shape (i j : ι) (hij : ¬ c.Rel i j) :
    d φ i j = 0

HomologicalComplex.homotopyCofiber.d φ i j = 0


/-- If `r` is a negative constant, `fun x ↦ f x * r` tends to infinity along a filter `l`
if and only if `f` tends to negative infinity along `l`. -/
theorem tendsto_mul_const_atTop_of_neg (hr : r < 0) :
    Tendsto (fun x => f x * r) l atTop ↔ Tendsto f l atBot

{α : Type u_3}
{β : Type u_4}
[LinearOrderedField α]
{l : Filter β}
{f : β → α}
{r : α}
(hr : r < 0)

Filter.Tendsto (fun x => f x * r) l Filter.atTop ↔ Filter.Tendsto f l Filter.atBot


theorem symm_trans_self : e.symm.trans e ≈ PartialHomeomorph.ofSet e.target e.open_target

{X : Type u_1}
{Y : Type u_3}
[TopologicalSpace X]
[TopologicalSpace Y]
(e : PartialHomeomorph X Y)

e.symm.trans e ≈ PartialHomeomorph.ofSet e.target ⋯


/-- The obvious homotopy between a morphism of short complexes and itself. -/
@[simps!]
def refl (φ : S₁ ⟶ S₂) : Homotopy φ φ

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

(CategoryTheory.ShortComplex.Homotopy.refl φ).h₂ = 0


theorem Prime.one_lt {p : ℕ+} : p.Prime → 1 < p


lemma strongRecOn'_beta {P : ℕ → Sort*} {h} :
    (strongRecOn' n h : P n) = h n fun m _ ↦ (strongRecOn' m h : P m)

{h : (n : ℕ) → ((m : ℕ) → m < n → P m) → P n}

n.strongRecOn' h = h n fun m x => m.strongRecOn' h


theorem neg_mem' (U : (Opens (ProjectiveSpectrum.top 𝒜))ᵒᵖ) (a : ∀ x : U.unop, at x.1)
    (ha : (isLocallyFraction 𝒜).pred a) : (isLocallyFraction 𝒜).pred (-a)

(U : (TopologicalSpace.Opens ↑(ProjectiveSpectrum.top 𝒜))ᵒᵖ)

(a : (x : ↥(Opposite.unop U)) → HomogeneousLocalization.AtPrime 𝒜 (↑x).asHomogeneousIdeal.toIdeal)

(ha : (AlgebraicGeometry.ProjectiveSpectrum.StructureSheaf.isLocallyFraction 𝒜).pred a)


/-- Forgetting to the underlying type and then building the bundled object returns the original
module. -/
@[simps]
def ofSelfIso (M : ModuleCat R) : ModuleCat.of R M ≅ M


@[simp]
theorem lift_symm (φ' : (⨂[R] i, s i) →ₗ[R] E) : lift.symm φ' = φ'.compMultilinearMap (tprod R)

(φ' : (PiTensorProduct R fun i => s i) →ₗ[R] E)

PiTensorProduct.lift.symm φ' = φ'.compMultilinearMap (PiTensorProduct.tprod R)


/-- A `CommRing` `S` which is the localization of an integral domain `R` at a subset of
non-zero elements is an integral domain. -/
theorem isDomain_of_le_nonZeroDivisors [Algebra A S] {M : Submonoid A} [IsLocalization M S]
    (hM : M ≤ nonZeroDivisors A) : IsDomain S

{S : Type u_2}
[CommRing S]
(A : Type u_6)
[CommRing A]
[IsDomain A]
[Algebra A S]
{M : Submonoid A}
[IsLocalization M S]
(hM : M ≤ nonZeroDivisors A)


@[to_additive]
lemma mem_stabilizer_finset {s : Finset α} : a ∈ stabilizer G s ↔ ∀ b, a • b ∈ s ↔ b ∈ s

{G : Type u_1}
{α : Type u_3}
[AddGroup G]
[AddAction G α]
{a : G}
[DecidableEq α]
{s : Finset α}

a ∈ AddAction.stabilizer G s ↔ ∀ (b : α), a +ᵥ b ∈ s ↔ b ∈ s


theorem degree_pos_of_eval₂_root {p : R[X]} (hp : p ≠ 0) (f : R →+* S) {z : S}
    (hz : eval₂ f z p = 0) (inj : ∀ x : R, f x = 0 → x = 0) : 0 < degree p

{R : Type u}
{S : Type v}
[Semiring R]
[Semiring S]
{p : R[X]}
(hp : p ≠ 0)
(f : R →+* S)
{z : S}
(hz : Polynomial.eval₂ f z p = 0)
(inj : ∀ (x : R), f x = 0 → x = 0)


/-- Given a monotone family `U` of complete submodules of `E` with dense span supremum,
and a fixed `x : E`, the orthogonal projection of `x` on `U i` tends to `x` along `at_top`. -/
theorem orthogonalProjection_tendsto_self [CompleteSpace E] {ι : Type*} [SemilatticeSup ι]
    (U : ι → Submodule 𝕜 E) [∀ t, CompleteSpace (U t)] (hU : Monotone U) (x : E)
    (hU' : ⊤ ≤ (⨆ t, U t).topologicalClosure) :
    Filter.Tendsto (fun t => (orthogonalProjection (U t) x : E)) atTop (𝓝 x)

Filter.Tendsto (fun t => ↑((orthogonalProjection (U t)) x)) Filter.atTop (𝓝 x)


@[simp]
theorem coe_to_linearEquiv (e : L₁ ≃ₗ⁅R⁆ L₂) : ⇑(e : L₁ ≃ₗ[R] L₂) = e

{R : Type u}
{L₁ : Type v}
{L₂ : Type w}
[CommRing R]
[LieRing L₁]
[LieRing L₂]
[LieAlgebra R L₁]
[LieAlgebra R L₂]
(e : L₁ ≃ₗ⁅R⁆ L₂)


/-- Oh, monads are just monoids in the category of endofunctors (equivalence of categories). -/
@[simps]
def monadMonEquiv : Monad C ≌ Mon_ (C ⥤ C)

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

(CategoryTheory.Monad.monadMonEquiv C).inverse = CategoryTheory.Monad.monToMonad C


/-- Two vectors are in the same ray, or the first is in the same ray as the negation of the
second, if and only if they are not linearly independent. -/
theorem sameRay_or_sameRay_neg_iff_not_linearIndependent {x y : M} :
    SameRay R x y ∨ SameRay R x (-y) ↔ ¬LinearIndependent R ![x, y]

{R : Type u_1}
[LinearOrderedCommRing R]
{M : Type u_2}
[AddCommGroup M]
[Module R M]
[NoZeroSMulDivisors R M]
{x y : M}


lemma and_forall_succ : p 0 ∧ (∀ n, p (n + 1)) ↔ ∀ n, p n


/-- The inverse of a `TransvectionStruct`, designed so that `t.inv.toMatrix` is the inverse of
`t.toMatrix`. -/
@[simps]
protected def inv (t : TransvectionStruct n R) : TransvectionStruct n R

{n : Type u_1}
{R : Type u₂}
[CommRing R]
(t : Matrix.TransvectionStruct n R)


protected theorem map_one (χ : MulChar R R') : χ (1 : R) = 1

{R : Type u_1}
[CommMonoid R]
{R' : Type u_2}
[CommMonoidWithZero R']
(χ : MulChar R R')


theorem neg_left (h : SemiconjBy a x y) : SemiconjBy (-a) x y

{R : Type x}
[Mul R]
[HasDistribNeg R]
{a x y : R}
(h : SemiconjBy a x y)


lemma left_measure_le_of_levyProkhorovEDist_lt {μ ν : Measure Ω} {c : ℝ≥0∞}
    (h : levyProkhorovEDist μ ν < c) {B : Set Ω} (B_mble : MeasurableSet B) :
    μ B ≤ ν (thickening c.toReal B) + c

(h : MeasureTheory.levyProkhorovEDist μ ν < c)

μ B ≤ ν (Metric.thickening c.toReal B) + c


theorem map_surjective (f : R →+* S) (hf : Surjective f) : Surjective (map f : 𝕎 R → 𝕎 S)

{p : ℕ}
{R : Type u_1}
{S : Type u_2}
[hp : Fact (Nat.Prime p)]
[CommRing R]
[CommRing S]
(f : R →+* S)
(hf : Function.Surjective ⇑f)


@[reassoc]
theorem biproduct.lift_desc {T U : C} {g : ∀ j, T ⟶ f j} {h : ∀ j, f j ⟶ U} :
    biproduct.lift g ≫ biproduct.desc h = ∑ j : J, g j ≫ h j

{C : Type u}
[CategoryTheory.Category.{v, u} C]
[CategoryTheory.Preadditive C]
{J : Type}
[Fintype J]
{f : J → C}
[CategoryTheory.Limits.HasBiproduct f]
{T U : C}
{g : (j : J) → T ⟶ f j}
{h : (j : J) → f j ⟶ U}

CategoryTheory.Limits.biproduct.lift g ≫ CategoryTheory.Limits.biproduct.desc h = ∑ j : J, g j ≫ h j


theorem mem_compression_of_insert_mem_compression (h : insert a s ∈ 𝓓 a 𝒜) : s ∈ 𝓓 a 𝒜

{α : Type u_1}
[DecidableEq α]
{𝒜 : Finset (Finset α)}
{s : Finset α}
{a : α}
(h : insert a s ∈ Down.compression a 𝒜)


@[simp]
theorem sphere_eq_empty_of_neg (hε : ε < 0) : sphere x ε = ∅

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


theorem exists_algebraMap_eq_of_pow_mem_subalgebra {K : Type*} [CommRing K] [Algebra R K]
    {S : Subalgebra R K} [IsIntegrallyClosed S] [IsFractionRing S K] {x : K} {n : ℕ} (hn : 0 < n)
    (hx : x ^ n ∈ S) : ∃ y : S, algebraMap S K y = x

{R : Type u_1}
[CommRing R]
{K : Type u_4}
[CommRing K]
[Algebra R K]
{S : Subalgebra R K}
[IsIntegrallyClosed ↥S]
[IsFractionRing (↥S) K]
{x : K}
{n : ℕ}
(hn : 0 < n)
(hx : x ^ n ∈ S)


theorem openEmbedding_restrict : OpenEmbedding (e.source.restrict e)

{X : Type u_1}
{Y : Type u_3}
[TopologicalSpace X]
[TopologicalSpace Y]
(e : PartialHomeomorph X Y)


@[simp, norm_cast] lemma mul_apply (ψ φ : AddChar A M) (a : A) : (ψ * φ) a = ψ a * φ a

{A : Type u_1}
{M : Type u_2}
[AddMonoid A]
[CommMonoid M]
(ψ φ : AddChar A M)
(a : A)


/-- To rewrite from right to left, use `Monotone.map_finset_max'`. -/
@[simp]
theorem max'_image [LinearOrder β] {f : α → β} (hf : Monotone f) (s : Finset α)
    (h : (s.image f).Nonempty) : (s.image f).max' h = f (s.max' h.of_image)

{α : Type u_2}
{β : Type u_3}
[LinearOrder α]
[LinearOrder β]
{f : α → β}
(hf : Monotone f)
(s : Finset α)
(h : (Finset.image f s).Nonempty)

(Finset.image f s).max' h = f (s.max' ⋯)


@[simp]
theorem coe_inv (e : P ≃ᵃⁱ[𝕜] P) : ⇑e⁻¹ = e.symm

{𝕜 : Type u_1}
{V : Type u_2}
{P : Type u_10}
[NormedField 𝕜]
[SeminormedAddCommGroup V]
[NormedSpace 𝕜 V]
[PseudoMetricSpace P]
[NormedAddTorsor V P]
(e : P ≃ᵃⁱ[𝕜] P)


lemma _root_.ContDiff.fourierPowSMulRight {f : V → E} {k : ℕ∞} (hf : ContDiff ℝ k f) (n : ℕ) :
    ContDiff ℝ k (fun v ↦ fourierPowSMulRight L f v n)

{E : Type u_1}
[NormedAddCommGroup E]
[NormedSpace ℂ E]
{V : Type u_2}
{W : Type u_3}
[NormedAddCommGroup V]
[NormedSpace ℝ V]
[NormedAddCommGroup W]
[NormedSpace ℝ W]
(L : V →L[ℝ] W →L[ℝ] ℝ)
{f : V → E}
{k : ℕ∞}
(hf : ContDiff ℝ k f)
(n : ℕ)

ContDiff ℝ k fun v => VectorFourier.fourierPowSMulRight L f v n


@[ext]
theorem algHom_ext' {A} [Semiring A] [Algebra S A] ⦃f g : tsze R M →ₐ[S] A⦄
    (hinl : f.comp (inlAlgHom S R M) = g.comp (inlAlgHom S R M))
    (hinr : f.toLinearMap.comp (inrHom R M |>.restrictScalars S) =
      g.toLinearMap.comp (inrHom R M |>.restrictScalars S)) : f = g

(hinl : f.comp (TrivSqZeroExt.inlAlgHom S R M) = g.comp (TrivSqZeroExt.inlAlgHom S R M))

(hinr : f.toLinearMap ∘ₗ ↑S (TrivSqZeroExt.inrHom R M) = g.toLinearMap ∘ₗ ↑S (TrivSqZeroExt.inrHom R M))


@[simp]
lemma residueFieldMap_id (x : X) :
    residueFieldMap (𝟙 X) x = 𝟙 (X.residueField x)

AlgebraicGeometry.LocallyRingedSpace.residueFieldMap (𝟙 X) x = 𝟙 (X.residueField x)


/-- Pull an opposite subring back to a subring along `MulOpposite.op` -/
@[simps toSubsemiring]
protected def unop (S : Subring Rᵐᵒᵖ) : Subring R

{R : Type u_2}
[Ring R]
(S : Subring Rᵐᵒᵖ)


theorem IsBigOWith.trans_le (hfg : IsBigOWith c l f g) (hgk : ∀ x, ‖g x‖ ≤ ‖k x‖) (hc : 0 ≤ c) :
    IsBigOWith c l f k

{α : Type u_1}
{E : Type u_3}
{F : Type u_4}
{G : Type u_5}
[Norm E]
[Norm F]
[Norm G]
{c : ℝ}
{f : α → E}
{g : α → F}
{k : α → G}
{l : Filter α}
(hfg : Asymptotics.IsBigOWith c l f g)
(hgk : ∀ (x : α), ‖g x‖ ≤ ‖k x‖)
(hc : 0 ≤ c)


lemma autEquivZmod_symm_apply_natCast {ζ : K} (hζ : IsPrimitiveRoot ζ n) (m : ℕ) :
    (autEquivZmod H L hζ).symm (Multiplicative.ofAdd (m : ZMod n)) α = ζ ^ m • α

(H : Irreducible (Polynomial.X ^ n - Polynomial.C a))

[Polynomial.IsSplittingField K L (Polynomial.X ^ n - Polynomial.C a)]

((autEquivZmod H L hζ).symm (Multiplicative.ofAdd ↑m)) α = ζ ^ m • α


theorem toCotangent_eq_zero (x : I) : I.toCotangent x = 0 ↔ (x : R) ∈ I ^ 2

{R : Type u}
[CommRing R]
(I : Ideal R)
(x : ↥I)


theorem epimorphisms.infer_property [hf : Epi f] : (epimorphisms C) f

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


theorem lt_nmul_iff : c < a ⨳ b ↔ ∃ a' < a, ∃ b' < b, c ♯ a' ⨳ b' ≤ a' ⨳ b ♯ a ⨳ b'


@[to_additive]
theorem div_iInter₂_subset (s : Set α) (t : ∀ i, κ i → Set α) :
    (s / ⋂ (i) (j), t i j) ⊆ ⋂ (i) (j), s / t i j

{α : Type u_2}
{ι : Sort u_5}
{κ : ι → Sort u_6}
[Sub α]
(s : Set α)
(t : (i : ι) → κ i → Set α)

s - ⋂ i, ⋂ j, t i j ⊆ ⋂ i, ⋂ j, s - t i j


theorem nontrivial_of_exists_lt [Preorder α]
    (H : ∃ᵉ (x ∈ s) (y ∈ s), x < y) : s.Nontrivial

{α : Type u}
{s : Set α}
[Preorder α]
(H : ∃ x ∈ s, ∃ y ∈ s, x < y)


@[simp, norm_cast]
theorem coe_coe_sign (x : SignType) : ((x : ℝ) : EReal) = x


protected theorem ssubset_iff_subset_ne {s t : Set α} : s ⊂ t ↔ s ⊆ t ∧ s ≠ t


theorem Decidable.not_and_iff_or_not_not [Decidable a] : ¬(a ∧ b) ↔ ¬a ∨ ¬b

¬(a ∧ b) ↔ ¬a ∨ ¬b


lemma not_countable_iff : ¬Countable α ↔ Uncountable α


theorem const_smul {f : X → Y} (hf : Conformal f) {c : ℝ} (hc : c ≠ 0) : Conformal (c • f)

{X : Type u_1}
{Y : Type u_2}
[NormedAddCommGroup X]
[NormedAddCommGroup Y]
[NormedSpace ℝ X]
[NormedSpace ℝ Y]
{f : X → Y}
(hf : Conformal f)
{c : ℝ}
(hc : c ≠ 0)


@[simp]
theorem app_neg (X : C) (α : F ⟶ G) : (-α).app X = -α.app X

{C : Type u_1}
{D : Type u_2}
[CategoryTheory.Category.{u_4, u_1} C]
[CategoryTheory.Category.{u_3, u_2} D]
[CategoryTheory.Preadditive D]
{F G : CategoryTheory.Functor C D}
(X : C)
(α : F ⟶ G)


theorem length_split_le :
    ∀ {l l₁ l₂ : List α}, split l = (l₁, l₂) → length l₁ ≤ length l ∧ length l₂ ≤ length l

l.split = (l₁, l₂) → l₁.length ≤ l.length ∧ l₂.length ≤ l.length


@[simp]
theorem whiskering_linearCoyoneda :
    linearCoyoneda R C ⋙ (whiskeringRight _ _ _).obj (forget (ModuleCat.{v} R)) = coyoneda

(R : Type w)
[Ring R]
(C : Type u)
[CategoryTheory.Category.{v, u} C]
[CategoryTheory.Preadditive C]
[CategoryTheory.Linear R C]

(CategoryTheory.linearCoyoneda R C).comp
    ((CategoryTheory.whiskeringRight C (ModuleCat R) (Type v)).obj (CategoryTheory.forget (ModuleCat R))) =
  CategoryTheory.coyoneda


private lemma image_subtype_val_Ixx_Ixi {p q r : α → α → Prop} {a b : α} (c : {x // p a x ∧ q x b})
    (h : ∀ {x}, r c x → p a x) :
    Subtype.val '' {y : {x // p a x ∧ q x b} | r c.1 y.1} = {y : α | r c.1 y ∧ q y b}

{α : Type u_1}
{p q r : α → α → Prop}
{a b : α}
(c : { x // p a x ∧ q x b })
(h : ∀ {x : α}, r (↑c) x → p a x)

Subtype.val '' {y | r ↑c ↑y} = {y | r (↑c) y ∧ q y b}


theorem variance_smul (c : ℝ) (X : Ω → ℝ) (μ : Measure Ω) :
    variance (c • X) μ = c ^ 2 * variance X μ

{Ω : Type u_1}
{m : MeasurableSpace Ω}
(c : ℝ)
(X : Ω → ℝ)
(μ : MeasureTheory.Measure Ω)

ProbabilityTheory.variance (c • X) μ = c ^ 2 * ProbabilityTheory.variance X μ


theorem add (hφ : IsHomogeneous φ n) (hψ : IsHomogeneous ψ n) : IsHomogeneous (φ + ψ) n

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


theorem exists_code.comp {m n} {f : Vector ℕ n →. ℕ} {g : Fin n → Vector ℕ m →. ℕ}
    (hf : ∃ c : Code, ∀ v : Vector ℕ n, c.eval v.1 = pure <$> f v)
    (hg : ∀ i, ∃ c : Code, ∀ v : Vector ℕ m, c.eval v.1 = pure <$> g i v) :
    ∃ c : Code, ∀ v : Vector ℕ m, c.eval v.1 = pure <$> ((Vector.mOfFn fun i => g i v) >>= f)

(hf : ∃ c, ∀ (v : Mathlib.Vector ℕ n), c.eval ↑v = pure <$> f v)

(hg : ∀ (i : Fin n), ∃ c, ∀ (v : Mathlib.Vector ℕ m), c.eval ↑v = pure <$> g i v)

∃ c, ∀ (v : Mathlib.Vector ℕ m), c.eval ↑v = pure <$> ((Mathlib.Vector.mOfFn fun i => g i v) >>= f)


@[simp]
theorem natIso_app {I : Type u₁} {F G : Discrete I ⥤ C} (f : ∀ i : Discrete I, F.obj i ≅ G.obj i)
    (i : Discrete I) : (Discrete.natIso f).app i = f i

{F G : CategoryTheory.Functor (CategoryTheory.Discrete I) C}

(f : (i : CategoryTheory.Discrete I) → F.obj i ≅ G.obj i)

(CategoryTheory.Discrete.natIso f).app i = f i


/-- The normal closure of s is the smallest normal subgroup containing s. -/
theorem normalClosure_subset {s t : Set G} (ht : IsNormalSubgroup t) (h : s ⊆ t) :
    normalClosure s ⊆ t

{G : Type u_1}
[Group G]
{s t : Set G}
(ht : IsNormalSubgroup t)
(h : s ⊆ t)


theorem nValue_pos (hN : 2 ≤ N) : 0 < nValue N


theorem lt_of_count_lt_count {a b : ℕ} (h : count p a < count p b) : a < b

{p : ℕ → Prop}
[DecidablePred p]
{a b : ℕ}
(h : Nat.count p a < Nat.count p b)


@[to_additive (attr := simp)]
theorem mulETransformRight_one : mulETransformRight 1 x = x

{α : Type u_1}
[DecidableEq α]
[Group α]
(x : Finset α × Finset α)


theorem changeOrigin_eval_of_finite (p : FormalMultilinearSeries 𝕜 E F) {n : ℕ}
    (hn : ∀ (m : ℕ), n ≤ m → p m = 0) (x y : E) :
    (p.changeOrigin x).sum y = p.sum (x + y)

{𝕜 : Type u_1}
{E : Type u_2}
{F : Type u_3}
[NontriviallyNormedField 𝕜]
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
(p : FormalMultilinearSeries 𝕜 E F)
{n : ℕ}
(hn : ∀ (m : ℕ), n ≤ m → p m = 0)
(x y : E)


theorem bounds_bddBelow {f : NormedAddGroupHom V₁ V₂} :
    BddBelow { c | 0 ≤ c ∧ ∀ x, ‖f x‖ ≤ c * ‖x‖ }

{V₁ : Type u_2}
{V₂ : Type u_3}
[SeminormedAddCommGroup V₁]
[SeminormedAddCommGroup V₂]
{f : NormedAddGroupHom V₁ V₂}

BddBelow {c | 0 ≤ c ∧ ∀ (x : V₁), ‖f x‖ ≤ c * ‖x‖}


theorem mk_sigma_iff : (⟨i, a⟩ : Σ i, α i) ∈ s.sigma t ↔ i ∈ s ∧ a ∈ t i

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


@[reassoc (attr := simp)]
lemma hom_inv_id_eval (e : X ≅ Y) (j : J) :
    e.hom j ≫ e.inv j = 𝟙 _

{C : Type u_1}
{J : Type u_4}
[CategoryTheory.Category.{u_5, u_1} C]
{X Y : CategoryTheory.GradedObject J C}
(e : X ≅ Y)
(j : J)

CategoryTheory.CategoryStruct.comp (e.hom j) (e.inv j) = CategoryTheory.CategoryStruct.id (X j)


/-- The duality equivalence `WalkingSpanᵒᵖ ≌ WalkingCospan` -/
@[simps!]
def walkingSpanOpEquiv : WalkingSpanᵒᵖ ≌ WalkingCospan

(X : (CategoryTheory.Limits.WidePushoutShape CategoryTheory.Limits.WalkingPair)ᵒᵖ)

CategoryTheory.Limits.walkingSpanOpEquiv.unitIso.hom.app X = 𝟙 X


theorem mem_iInter₂ {x : γ} {s : ∀ i, κ i → Set γ} : (x ∈ ⋂ (i) (j), s i j) ↔ ∀ i j, x ∈ s i j

{γ : Type u_3}
{ι : Sort u_4}
{κ : ι → Sort u_7}
{x : γ}
{s : (i : ι) → κ i → Set γ}

x ∈ ⋂ i, ⋂ j, s i j ↔ ∀ (i : ι) (j : κ i), x ∈ s i j


@[simp]
theorem BilinForm.toMatrix_mul_basis_toMatrix (c : Basis o R₂ M₂) (B : BilinForm R₂ M₂) :
    (b.toMatrix c)ᵀ * BilinForm.toMatrix b B * b.toMatrix c = BilinForm.toMatrix c B

{R₂ : Type u_5}
{M₂ : Type u_6}
[CommSemiring R₂]
[AddCommMonoid M₂]
[Module R₂ M₂]
{n : Type u_11}
{o : Type u_12}
[Fintype n]
[Fintype o]
[DecidableEq n]
(b : Basis n R₂ M₂)
[DecidableEq o]
(c : Basis o R₂ M₂)
(B : LinearMap.BilinForm R₂ M₂)

(b.toMatrix ⇑c).transpose * (BilinForm.toMatrix b) B * b.toMatrix ⇑c = (BilinForm.toMatrix c) B


/-- The height one prime spectrum of a Dedekind domain `R` is the type of nonzero prime ideals of
`R`. Note that this equals the maximal spectrum if `R` has Krull dimension 1. -/
-- Porting note(#5171): removed `has_nonempty_instance`, linter doesn't exist yet
@[ext, nolint unusedArguments]
structure HeightOneSpectrum where
  asIdeal : Ideal R
  isPrime : asIdeal.IsPrime
  ne_bot : asIdeal ≠ ⊥

(self : IsDedekindDomain.HeightOneSpectrum R)


theorem yn_modEq_a_sub_one : ∀ n, yn a1 n ≡ n [MOD a - 1]


/-- If `f : ℝ → ℝ` is strictly convex on `S` and differentiable at `y ∈ S`, then the slope of any
secant line with right endpoint at `y` is strictly less than the derivative of `f` at `y`. -/
lemma slope_lt_of_hasDerivAt (hfc : StrictConvexOn ℝ S f) (hx : x ∈ S) (hy : y ∈ S) (hxy : x < y)
    (hf' : HasDerivAt f f' y) :
    slope f x y < f'

{S : Set ℝ}
{f : ℝ → ℝ}
{x y f' : ℝ}
(hfc : StrictConvexOn ℝ S f)
(hx : x ∈ S)
(hy : y ∈ S)
(hxy : x < y)
(hf' : HasDerivAt f f' y)


@[simp]
theorem «forall» (p : ConjAct G → Prop) : (∀ x : ConjAct G, p x) ↔ ∀ x : G, p (toConjAct x)

{G : Type u_3}
[DivInvMonoid G]
(p : ConjAct G → Prop)

(∀ (x : ConjAct G), p x) ↔ ∀ (x : G), p (ConjAct.toConjAct x)


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

((CategoryTheory.overToCoalgebra X).obj f).a =
  CategoryTheory.Limits.prod.lift f.hom (CategoryTheory.CategoryStruct.id f.left)


theorem mem_inv_pointwise_smul_iff₀ {a : M} (ha : a ≠ 0) (S : Subring R) (x : R) :
    x ∈ a⁻¹ • S ↔ a • x ∈ S

{M : Type u_1}
{R : Type u_2}
[GroupWithZero M]
[Ring R]
[MulSemiringAction M R]
{a : M}
(ha : a ≠ 0)
(S : Subring R)
(x : R)

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


@[simp]
theorem AbsoluteValue.map_units_intCast [Nontrivial R] (abv : AbsoluteValue R S) (x : ℤˣ) :
    abv ((x : ℤ) : R) = 1

{R : Type u_1}
{S : Type u_2}
[Ring R]
[LinearOrderedCommRing S]
[Nontrivial R]
(abv : AbsoluteValue R S)
(x : ℤˣ)


theorem mem_carrier_iff (q : Spec.T A⁰_ f) (a : A) :
    a ∈ carrier f_deg q ↔ ∀ i, (HomogeneousLocalization.mk ⟨m * i, ⟨proj 𝒜 i a ^ m, by mem_tac⟩,
      ⟨f ^ i, by rw [mul_comm]; mem_tac⟩, ⟨_, rfl⟩⟩ : A⁰_ f) ∈ q.1

(q :
  ↑↑(AlgebraicGeometry.Spec.locallyRingedSpaceObj
          (CommRingCat.of (HomogeneousLocalization.Away 𝒜 f))).toPresheafedSpace)

a ∈ AlgebraicGeometry.ProjIsoSpecTopComponent.FromSpec.carrier f_deg q ↔
  ∀ (i : ℕ),
    HomogeneousLocalization.mk
        { deg := m * i, num := ⟨(GradedAlgebra.proj 𝒜 i) a ^ m, ⋯⟩, den := ⟨f ^ i, ⋯⟩, den_mem := ⋯ } ∈
      q.asIdeal


@[simp] theorem add_eq : Nat.add x y = x + y


@[simp]
theorem Basis.ofZlatticeBasis_apply (i : ι) :
    b.ofZlatticeBasis K L i =  b i

(K : Type u_1)
[NormedLinearOrderedField K]
[HasSolidNorm K]
[FloorRing K]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace K E]
[FiniteDimensional K E]
[ProperSpace E]
(L : AddSubgroup E)
[DiscreteTopology ↥L]
{ι : Type u_3}
[hs : IsZlattice K L]
(b : Basis ι ℤ ↥L)
(i : ι)

(Basis.ofZlatticeBasis K L b) i = ↑(b i)


/-- If `f` is a map with countable codomain, then `μ.map f` is a sum of Dirac measures. -/
theorem map_eq_sum [Countable β] [MeasurableSingletonClass β] (μ : Measure α) (f : α → β)
    (hf : Measurable f) : μ.map f = sum fun b : β => μ (f ⁻¹' {b}) • dirac b

{α : Type u_1}
{β : Type u_2}
[MeasurableSpace α]
[MeasurableSpace β]
[Countable β]
[MeasurableSingletonClass β]
(μ : MeasureTheory.Measure α)
(f : α → β)
(hf : Measurable f)

MeasureTheory.Measure.map f μ = MeasureTheory.Measure.sum fun b => μ (f ⁻¹' {b}) • MeasureTheory.Measure.dirac b


theorem natCast_def' (n : ℕ) : (n : A ⊗[R] B) = (1 : A) ⊗ₜ (n : B)

{R : Type uR}
{A : Type uA}
{B : Type uB}
[CommSemiring R]
[AddCommMonoidWithOne A]
[Module R A]
[AddCommMonoidWithOne B]
[Module R B]
(n : ℕ)


/-- The constant factor occurring in the conclusion of `eLpNorm_le_eLpNorm_fderiv_one`.
It only depends on `E`, `μ` and `p`. -/
irreducible_def eLpNormLESNormFDerivOneConst (p : ℝ) : ℝ≥0

{E : Type u_5}
[NormedAddCommGroup E]
[NormedSpace ℝ E]
[MeasurableSpace E]
[BorelSpace E]
[FiniteDimensional ℝ E]
(μ : MeasureTheory.Measure E)
[μ.IsAddHaarMeasure]
(p : ℝ)

MeasureTheory.eLpNormLESNormFDerivOneConst μ p = MeasureTheory.lintegralPowLePowLIntegralFDerivConst μ p ^ p⁻¹


/-- A small family of surreals is bounded below. -/
lemma bddBelow_range_of_small {ι : Type*} [Small.{u} ι] (f : ι → Surreal.{u}) :
    BddBelow (Set.range f)

{ι : Type u_1}
[Small.{u, u_1} ι]
(f : ι → Surreal)


/-- A bundled expression of the fact that a map between partial orders that is strictly monotone
is weakly monotone. -/
@[simps (config := .asFn)]
def toOrderHom : α →o β


theorem toSmoothPartitionOfUnity_apply (i : ι) (x : M) :
    fs.toSmoothPartitionOfUnity i x = fs i x * ∏ᶠ (j) (_ : WellOrderingRel j i), (1 - fs j x)

{ι : Type uι}
{E : Type uE}
[NormedAddCommGroup E]
[NormedSpace ℝ E]
[FiniteDimensional ℝ E]
{H : Type uH}
[TopologicalSpace H]
{I : ModelWithCorners ℝ E H}
{M : Type uM}
[TopologicalSpace M]
[ChartedSpace H M]
[SmoothManifoldWithCorners I M]
{s : Set M}
(fs : SmoothBumpCovering ι I M s)
[T2Space M]
(i : ι)
(x : M)

(fs.toSmoothPartitionOfUnity i) x = ↑(fs.toFun i) x * ∏ᶠ (j : ι) (_ : WellOrderingRel j i), (1 - ↑(fs.toFun j) x)


@[to_additive (attr := simp)]
theorem csInf_one : sInf (1 : Set α) = 1

{α : Type u_1}
[ConditionallyCompleteLattice α]
[One α]


@[simp]
theorem Sized.size_eq_zero {t : Ordnode α} (ht : Sized t) : size t = 0 ↔ t = nil

{α : Type u_1}
{t : Ordnode α}
(ht : t.Sized)


theorem succ_exact :
    (ShortComplex.mk (ModuleCat.ofHom (πs C o)) (ModuleCat.ofHom (Linear_CC' C hsC ho))
    (by ext; apply CC_comp_zero)).Exact

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

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

(CategoryTheory.ShortComplex.mk (ModuleCat.ofHom (Profinite.NobelingProof.πs C o))
    (ModuleCat.ofHom (Profinite.NobelingProof.Linear_CC' C hsC ho)) ⋯).Exact


/-- The sine of an angle in a right-angled triangle multiplied by the hypotenuse equals the
opposite side. -/
theorem sin_oangle_right_mul_dist_of_oangle_eq_pi_div_two {p₁ p₂ p₃ : P}
    (h : ∡ p₁ p₂ p₃ = ↑(π / 2)) : Real.Angle.sin (∡ p₂ p₃ p₁) * dist p₁ p₃ = dist p₁ p₂

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

(∡ p₂ p₃ p₁).sin * dist p₁ p₃ = dist p₁ p₂


lemma measurableSet_natGeneratingSequence [MeasurableSpace α] [CountablyGenerated α] (n : ℕ) :
    MeasurableSet (natGeneratingSequence α n)

{α : Type u_1}
[MeasurableSpace α]
[MeasurableSpace.CountablyGenerated α]
(n : ℕ)

MeasurableSet (MeasurableSpace.natGeneratingSequence α n)


@[simp]
lemma nndist_pi_const [Nonempty β] (a b : α) : (nndist (fun _ : β => a) fun _ => b) = nndist a b

{α : Type u_1}
{β : Type u_2}
[PseudoMetricSpace α]
[Fintype β]
[Nonempty β]
(a b : α)

(nndist (fun x => a) fun x => b) = nndist a b


theorem indicator_of_mem (hi : i ∈ s) (f : ∀ i ∈ s, α) : indicator s f i = f i hi

{ι : Type u_1}
{α : Type u_2}
[Zero α]
{s : Finset ι}
{i : ι}
(hi : i ∈ s)
(f : (i : ι) → i ∈ s → α)


theorem coe_iterateFrobenius_mul : iterateFrobenius R p (m * n) = (iterateFrobenius R p m)^[n]

(R : Type u)
[CommSemiring R]
(p m n : ℕ)
[ExpChar R p]

⇑(iterateFrobenius R p (m * n)) = (⇑(iterateFrobenius R p m))^[n]


/-- If one controls the norm of every `f x`, then one controls the norm of `x`.
    Compare `ContinuousLinearMap.opNorm_le_bound`. -/
theorem norm_le_dual_bound (x : E) {M : ℝ} (hMp : 0 ≤ M) (hM : ∀ f : Dual 𝕜 E, ‖f x‖ ≤ M * ‖f‖) :
    ‖x‖ ≤ M

(hM : ∀ (f : NormedSpace.Dual 𝕜 E), ‖f x‖ ≤ M * ‖f‖)


@[simp]
theorem length_neg : ∀ s : Interval α, (-s).length = s.length

{α : Type u_2}
[OrderedAddCommGroup α]
(s : Interval α)


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


@[fun_prop]
theorem hasStrictFDerivAt_snd : HasStrictFDerivAt (@Prod.snd E F) (snd 𝕜 E F) p

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

HasStrictFDerivAt Prod.snd (ContinuousLinearMap.snd 𝕜 E F) p


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

{α : Type u_2}
{β : Type u_3}
{γ : Type u_4}
[Preorder α]
[BoundedOrder α]
[Preorder β]
[BoundedOrder β]
[Preorder γ]
[BoundedOrder γ]
(g : BoundedOrderHom β γ)
(f : BoundedOrderHom α β)

BoundedOrderHom.dual (g.comp f) = (BoundedOrderHom.dual g).comp (BoundedOrderHom.dual f)


theorem natDegree_quadratic (ha : a ≠ 0) : natDegree (C a * X ^ 2 + C b * X + C c) = 2

{R : Type u}
{a b c : R}
[Semiring R]
(ha : a ≠ 0)

(Polynomial.C a * Polynomial.X ^ 2 + Polynomial.C b * Polynomial.X + Polynomial.C c).natDegree = 2


theorem single_trans_of_mem (a : α) {b : β} {c : γ} {f : β ≃. γ} (h : c ∈ f b) :
    (single a b).trans f = single a c

{α : Type u}
{β : Type v}
{γ : Type w}
[DecidableEq α]
[DecidableEq β]
[DecidableEq γ]
(a : α)
{b : β}
{c : γ}
{f : β ≃. γ}
(h : c ∈ f b)

(PEquiv.single a b).trans f = PEquiv.single a c


theorem symmL_continuousLinearMapAt (e : Trivialization F (π F E)) [e.IsLinear R] {b : B}
    (hb : b ∈ e.baseSet) (y : E b) : e.symmL R b (e.continuousLinearMapAt R b y) = y

[TopologicalSpace (Bundle.TotalSpace F E)]

(e : Trivialization F Bundle.TotalSpace.proj)

(Trivialization.symmL R e b) ((Trivialization.continuousLinearMapAt R e b) y) = y


/-- `generateMeasurableRec s` generates precisely the smallest sigma-algebra containing `s`. -/
theorem generateMeasurable_eq_rec (s : Set (Set α)) :
    { t | GenerateMeasurable s t } =
        ⋃ (i : (Quotient.out (aleph 1).ord).α), generateMeasurableRec s i

{t | MeasurableSpace.GenerateMeasurable s t} = ⋃ i, MeasurableSpace.generateMeasurableRec s i


lemma nil [Nontrivial M] : IsRegular M ([] : List R)

(R : Type u_1)
(M : Type u_3)
[CommRing R]
[AddCommGroup M]
[Module R M]
[Nontrivial M]


@[to_additive]
theorem mul_eq_of_eq_inv_mul (h : b = a⁻¹ * c) : a * b = c

{G : Type u_3}
[AddGroup G]
{a b c : G}
(h : b = -a + c)


/-- Polarization identity: The real part of the inner product, in terms of the norm. -/
theorem re_inner_eq_norm_add_mul_self_sub_norm_mul_self_sub_norm_mul_self_div_two (x y : E) :
    re ⟪x, y⟫ = (‖x + y‖ * ‖x + y‖ - ‖x‖ * ‖x‖ - ‖y‖ * ‖y‖) / 2

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

RCLike.re ⟪x, y⟫_𝕜 = (‖x + y‖ * ‖x + y‖ - ‖x‖ * ‖x‖ - ‖y‖ * ‖y‖) / 2


@[to_additive (attr := fun_prop)]
theorem ContinuousOn.mul {f g : X → M} {s : Set X} (hf : ContinuousOn f s) (hg : ContinuousOn g s) :
    ContinuousOn (fun x => f x * g x) s

{M : Type u_3}
{X : Type u_5}
[TopologicalSpace X]
[TopologicalSpace M]
[Add M]
[ContinuousAdd M]
{f g : X → M}
{s : Set X}
(hf : ContinuousOn f s)
(hg : ContinuousOn g s)


theorem fg_def {N : Submodule R M} : N.FG ↔ ∃ S : Set M, S.Finite ∧ span R S = N

{R : Type u_1}
{M : Type u_2}
[Semiring R]
[AddCommMonoid M]
[Module R M]
{N : Submodule R M}

N.FG ↔ ∃ S, S.Finite ∧ Submodule.span R S = N


lemma cons_nonzero_iff {v : Fin n → α} {x : α} : vecCons x v ≠ 0 ↔ x ≠ 0 ∨ v ≠ 0

{α : Type u_1}
{n : ℕ}
[Zero α]
{v : Fin n → α}
{x : α}


lemma norm_inr (a : A) : ‖(a : Unitization 𝕜 A)‖ = ‖a‖

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


theorem contravariant_le_iff_contravariant_lt_and_eq [PartialOrder N] :
    Contravariant M N μ (· ≤ ·) ↔ Contravariant M N μ (· < ·) ∧ Contravariant M N μ (· = ·)

(M : Type u_1)
(N : Type u_2)
(μ : M → N → N)
[PartialOrder N]

(Contravariant M N μ fun x x_1 => x ≤ x_1) ↔
  (Contravariant M N μ fun x x_1 => x < x_1) ∧ Contravariant M N μ fun x x_1 => x = x_1


@[to_additive (attr := simp)]
theorem comp_one (f : β →*o γ) : f.comp (1 : α →*o β) = 1

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


theorem range_dualMap_le_dualAnnihilator_ker :
    LinearMap.range f.dualMap ≤ f.ker.dualAnnihilator

{R : Type uR}
[CommSemiring R]
{M₁ : Type uM₁}
{M₂ : Type uM₂}
[AddCommMonoid M₁]
[Module R M₁]
[AddCommMonoid M₂]
[Module R M₂]
(f : M₁ →ₗ[R] M₂)

LinearMap.range f.dualMap ≤ (LinearMap.ker f).dualAnnihilator


@[simp]
lemma fromSingle₀Equiv_symm_apply_f_zero {C : CochainComplex V ℕ} {X : V}
    (f : X ⟶ C.X 0) (hf : f ≫ C.d 0 1 = 0) :
    ((fromSingle₀Equiv C X).symm ⟨f, hf⟩).f 0 = f

((C.fromSingle₀Equiv X).symm ⟨f, hf⟩).f 0 = f


/-- Analogous construction of `FiberBundleCore` for vector bundles. This
construction gives a way to construct vector bundles from a structure registering how
trivialization changes act on fibers. -/
structure VectorBundleCore (ι : Type*) where
  baseSet : ι → Set B
  isOpen_baseSet : ∀ i, IsOpen (baseSet i)
  indexAt : B → ι
  mem_baseSet_at : ∀ x, x ∈ baseSet (indexAt x)
  coordChange : ι → ι → B → F →L[R] F
  coordChange_self : ∀ i, ∀ x ∈ baseSet i, ∀ v, coordChange i i x v = v
  continuousOn_coordChange : ∀ i j, ContinuousOn (coordChange i j) (baseSet i ∩ baseSet j)
  coordChange_comp : ∀ i j k, ∀ x ∈ baseSet i ∩ baseSet j ∩ baseSet k, ∀ v,
    (coordChange j k x) (coordChange i j x v) = coordChange i k x v

{R : Type u_1}
{B : Type u_2}
{F : Type u_3}
[NontriviallyNormedField R]
[NormedAddCommGroup F]
[NormedSpace R F]
[TopologicalSpace B]
{ι : Type u_5}
(self : VectorBundleCore R B F ι)
(x : B)


@[simp]
theorem restrict_compl_add_restrict (hs : MeasurableSet s) : μ.restrict sᶜ + μ.restrict s = μ

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


theorem Finite.exists_equiv_fin (α : Sort*) [h : Finite α] : ∃ n : ℕ, Nonempty (α ≃ Fin n)


/-- The derivative of `det (1 + M X)` at `0` is the trace of `M`. -/
lemma derivative_det_one_add_X_smul (M : Matrix n n R) :
    (derivative <| det (1 + (X : R[X]) • M.map C)).eval 0 = trace M

{R : Type u}
[CommRing R]
{n : Type v}
[DecidableEq n]
[Fintype n]
(M : Matrix n n R)

Polynomial.eval 0 (Polynomial.derivative (1 + Polynomial.X • M.map ⇑Polynomial.C).det) = M.trace


theorem Rel.smul {r : A → A → Prop} (k : S) ⦃a b : A⦄ (h : Rel r a b) : Rel r (k • a) (k • b)

{S : Type uS}
[CommSemiring S]
{A : Type uA}
[Semiring A]
[Algebra S A]
{r : A → A → Prop}
(k : S)
⦃a b : A⦄
(h : RingQuot.Rel r a b)


@[simp]
theorem ofAdd_list_prod (s : List α) : ofAdd s.sum = (s.map ofAdd).prod

{α : Type u_3}
[AddMonoid α]
(s : List α)

Multiplicative.ofAdd s.sum = (List.map (⇑Multiplicative.ofAdd) s).prod


@[simp]
theorem lt_map_inv_iff (f : F) {a : α} {b : β} : a < EquivLike.inv f b ↔ f a < b

{F : Type u_1}
{α : Type u_2}
{β : Type u_3}
[Preorder α]
[Preorder β]
[EquivLike F α β]
[OrderIsoClass F α β]
(f : F)
{a : α}
{b : β}


@[simp]
theorem image_sub_const_Icc : (fun x => x - a) '' Icc b c = Icc (b - a) (c - a)

{α : Type u_1}
[OrderedAddCommGroup α]
(a b c : α)

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


protected lemma neg {f : ℝ → ℝ} (hf : GrowsPolynomially f) : GrowsPolynomially (-f)

(hf : AkraBazziRecurrence.GrowsPolynomially f)


@[to_additive] lemma Antivary.div_right (h₁ : Antivary f g₁) (h₂ : Monovary f g₂) :
    Antivary f (g₁ / g₂)

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


@[simp]
theorem const_zero (p : Fin 0 → Type u) {τ : Type u} (t : τ) : const p t = t


@[deprecated exists_subset_range_and_iff (since := "2024-06-06")]
theorem exists_subset_range_iff {f : α → β} {p : Set β → Prop} :
    (∃ (s : _) (_ : s ⊆ range f), p s) ↔ ∃ s, p (f '' s)

{α : Type u_1}
{β : Type u_2}
{f : α → β}
{p : Set β → Prop}

(∃ s, ∃ (_ : s ⊆ Set.range f), p s) ↔ ∃ s, p (f '' s)


theorem cauchy_zero : (0 : ℝ).cauchy = 0


@[simp]
lemma HomologyData.leftRightHomologyComparison'_eq (h : S.HomologyData) :
    leftRightHomologyComparison' h.left h.right = h.iso.hom

CategoryTheory.ShortComplex.leftRightHomologyComparison' h.left h.right = h.iso.hom


@[simp] lemma comp_sdiff_comp (a b : α) : comp a \ comp b = lift (b \ a)

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

Booleanisation.comp a \ Booleanisation.comp b = Booleanisation.lift (b \ a)


theorem transcendental_liouvilleNumber {m : ℕ} (hm : 2 ≤ m) :
    Transcendental ℤ (liouvilleNumber m)


@[simp] theorem truncate_append {x : BitVec w} {y : BitVec v} :
    (x ++ y).truncate k = if h : k ≤ v then y.truncate k else (x.truncate (k - v) ++ y).cast (by omega)

{w v k : Nat}
{x : BitVec w}
{y : BitVec v}

BitVec.truncate k (x ++ y) = if h : k ≤ v then BitVec.truncate k y else BitVec.cast ⋯ (BitVec.truncate (k - v) x ++ y)


lemma iSup_prod' (f : β → γ → α) : (⨆ i, ⨆ j, f i j) = ⨆ x : β × γ, f x.1 x.2

{α : Type u_1}
{β : Type u_2}
{γ : Type u_4}
[CompleteLattice α]
(f : β → γ → α)


/-- A complex measure is said to `HaveLebesgueDecomposition` with respect to a positive measure
if both its real and imaginary part `HaveLebesgueDecomposition` with respect to that measure. -/
class HaveLebesgueDecomposition (c : ComplexMeasure α) (μ : Measure α) : Prop where
  rePart : c.re.HaveLebesgueDecomposition μ
  imPart : c.im.HaveLebesgueDecomposition μ

{α : Type u_1}
{m : MeasurableSpace α}
{c : MeasureTheory.ComplexMeasure α}
{μ : MeasureTheory.Measure α}
[self : c.HaveLebesgueDecomposition μ]


theorem nhds_sInf {s : Set (TopologicalSpace α)} {a : α} :
    @nhds α (sInf s) a = ⨅ t ∈ s, @nhds α t a

{α : Type u}
{s : Set (TopologicalSpace α)}
{a : α}


theorem map_unique {f : ZFSet.{u} → ZFSet.{u}} [H : Definable 1 f] {x z : ZFSet.{u}}
    (zx : z ∈ x) : ∃! w, pair z w ∈ map f x

{f : ZFSet → ZFSet}
[H : PSet.Definable 1 f]
{x z : ZFSet}
(zx : z ∈ x)


theorem restrictScalars_injective :
    Function.Injective (restrictScalars R : (A →⋆ₙₐ[S] B) → A →⋆ₙₐ[R] B)

(R : Type u_1)
{S : Type u_2}
{A : Type u_3}
{B : Type u_4}
[Monoid R]
[Monoid S]
[Star A]
[Star B]
[NonUnitalNonAssocSemiring A]
[NonUnitalNonAssocSemiring B]
[MulAction R S]
[DistribMulAction S A]
[DistribMulAction S B]
[DistribMulAction R A]
[DistribMulAction R B]
[IsScalarTower R S A]
[IsScalarTower R S B]


@[to_additive]
lemma prod_prod_Ioi_mul_eq_prod_prod_off_diag (f : α → α → M) :
    ∏ i, ∏ j ∈ Ioi i, f j i * f i j = ∏ i, ∏ j ∈ {i}ᶜ, f j i

{α : Type u_1}
{M : Type u_2}
[Fintype α]
[LinearOrder α]
[LocallyFiniteOrderTop α]
[LocallyFiniteOrderBot α]
[AddCommMonoid M]
(f : α → α → M)

∑ i : α, ∑ j ∈ Finset.Ioi i, (f j i + f i j) = ∑ i : α, ∑ j ∈ {i}ᶜ, f j i


theorem fmod_lt_of_pos (a : Int) {b : Int} (H : 0 < b) : a.fmod b < b


theorem fst_list_prod [Monoid R] [AddMonoid M] [DistribMulAction R M] [DistribMulAction Rᵐᵒᵖ M]
    [SMulCommClass R Rᵐᵒᵖ M] (l : List (tsze R M)) : l.prod.fst = (l.map fst).prod

{R : Type u}
{M : Type v}
[Monoid R]
[AddMonoid M]
[DistribMulAction R M]
[DistribMulAction Rᵐᵒᵖ M]
[SMulCommClass R Rᵐᵒᵖ M]
(l : List (tsze R M))

l.prod.fst = (List.map TrivSqZeroExt.fst l).prod


protected theorem isIdeal (s : Ideal P) : IsIdeal (s : Set P)

{P : Type u_1}
[LE P]
(s : Order.Ideal P)


@[simp]
theorem zero_app (F G : C ⥤ D) (j : C) : (0 : F ⟶ G).app j = 0


theorem NeBot.mono {f g : Filter α} (hf : NeBot f) (hg : f ≤ g) : NeBot g

{α : Type u}
{f g : Filter α}
(hf : f.NeBot)
(hg : f ≤ g)


protected theorem ne_of_lt {a b : Int} (h : a < b) : a ≠ b


/-- A multifork `c : Multifork I` in the category of types is limit iff the
map `c.toSections : c.pt → I.sections` is a bijection. -/
lemma isLimit_types_iff : Nonempty (IsLimit c) ↔ Function.Bijective c.toSections

{I : CategoryTheory.Limits.MulticospanIndex (Type u)}

Nonempty (CategoryTheory.Limits.IsLimit c) ↔ Function.Bijective c.toSections


/-- The cartesian product of two lax monoidal functors is lax monoidal. -/
@[simps]
def prod : LaxMonoidalFunctor (B × D) (C × E)

(F : CategoryTheory.LaxMonoidalFunctor B C)

(G : CategoryTheory.LaxMonoidalFunctor D E)

(F.prod G).toFunctor = F.prod G.toFunctor


@[simp] lemma coe_map (f : LatticeHom α β) (L : Sublattice α) : (L.map f : Set β) = f '' L

{α : Type u_2}
{β : Type u_3}
[Lattice α]
[Lattice β]
(f : LatticeHom α β)
(L : Sublattice α)


lemma filter_attach' (s : Multiset α) (p : {a // a ∈ s} → Prop) [DecidableEq α]
    [DecidablePred p] :
    s.attach.filter p =
      (s.filter fun x ↦ ∃ h, p ⟨x, h⟩).attach.map (Subtype.map id fun x ↦ mem_of_mem_filter)

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

Multiset.filter p s.attach =
  Multiset.map (Subtype.map id ⋯) (Multiset.filter (fun x => ∃ (h : x ∈ s), p ⟨x, h⟩) s).attach


@[simp]
theorem inv_re (z : ℂ) : z⁻¹.re = z.re / normSq z


@[simp]
protected theorem down_up (s : Set α) : SetSemiring.down (Set.up s) = s


/-- If `p` is always true, then every `x` satisfies it. -/
theorem of_true [Applicative m] [LawfulApplicative m] {x : m α}
    (h : ∀ a, p a) : SatisfiesM p x

{m : Type u_1 → Type u_2}
{α : Type u_1}
{p : α → Prop}
[Applicative m]
[LawfulApplicative m]
{x : m α}
(h : ∀ (a : α), p a)


theorem encard_eq_add_one_iff {k : ℕ∞} :
    s.encard = k + 1 ↔ (∃ a t, ¬a ∈ t ∧ insert a t = s ∧ t.encard = k)

s.encard = k + 1 ↔ ∃ a t, a ∉ t ∧ insert a t = s ∧ t.encard = k


/-- The canonical `RightHomologyData` of a short complex `S` in an abelian category, for
which the `H` field is `Abelian.image (kernel.ι S.g ≫ cokernel.π S.f)`. -/
@[simps]
noncomputable def ofAbelian : S.RightHomologyData

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

(CategoryTheory.ShortComplex.RightHomologyData.ofAbelian S).ι =
  CategoryTheory.Limits.kernel.ι
    (CategoryTheory.Limits.cokernel.π
      (CategoryTheory.CategoryStruct.comp (CategoryTheory.Limits.kernel.ι S.g) (CategoryTheory.Limits.cokernel.π S.f)))


/-- The pushforward of sheaves of modules that is induced by a continuous functor `F`
and a morphism of sheaves of rings `φ : S ⟶ (F.sheafPushforwardContinuous RingCat J K).obj R`. -/
@[simps]
noncomputable def pushforward : SheafOfModules.{v} R ⥤ SheafOfModules.{v} S

{J : CategoryTheory.GrothendieckTopology C}

{K : CategoryTheory.GrothendieckTopology D}

(φ : S ⟶ (F.sheafPushforwardContinuous RingCat J K).obj R)

((SheafOfModules.pushforward φ).obj M).val = (PresheafOfModules.pushforward φ.val).obj M.val


@[simp]
theorem coe_product (l₁ : List α) (l₂ : List β) :
    (l₁ : Multiset α) ×ˢ (l₂ : Multiset β) = (l₁ ×ˢ l₂)

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

↑l₁ ×ˢ ↑l₂ = ↑(l₁ ×ˢ l₂)


/-- A nontrivial monoid is not torsion-free if any nontrivial element has finite order. -/
@[to_additive (attr := simp) "An additive monoid is not torsion free if any
  nontrivial element has finite order."]
theorem not_isTorsionFree_iff : ¬IsTorsionFree G ↔ ∃ g : G, g ≠ 1 ∧ IsOfFinOrder g

¬AddMonoid.IsTorsionFree G ↔ ∃ g, g ≠ 0 ∧ IsOfFinAddOrder g


@[simp]
theorem deriv_add (hf : DifferentiableAt 𝕜 f x) (hg : DifferentiableAt 𝕜 g x) :
    deriv (fun y => f y + g y) x = deriv f x + deriv g x

{𝕜 : Type u}
[NontriviallyNormedField 𝕜]
{F : Type v}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{f g : 𝕜 → F}
{x : 𝕜}
(hf : DifferentiableAt 𝕜 f x)
(hg : DifferentiableAt 𝕜 g x)


theorem repr_symm_single : b.repr.symm (Finsupp.single i c) = c • b i

{ι : Type u_1}
{R : Type u_3}
{M : Type u_6}
[Semiring R]
[AddCommMonoid M]
[Module R M]
(b : Basis ι R M)
(i : ι)
(c : R)


theorem cmp_congr_right (yz : cmp y z = .eq) : cmp x y = cmp x z

∀ {x : Sort u_1} {cmp : x → x → Ordering} [inst : Batteries.TransCmp cmp] {y z x : x},
  cmp y z = Ordering.eq → cmp x y = cmp x z


lemma IsCondKernel.isMarkovKernel [MeasurableSingletonClass α] (hρ : ∀ a, ρ.fst {a} ≠ 0) :
    IsMarkovKernel ρCond

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


theorem inclusion_injective {I₁ I₂ : LieIdeal R L} (h : I₁ ≤ I₂) :
    Function.Injective (inclusion h)

{R : Type u}
{L : Type v}
[CommRing R]
[LieRing L]
[LieAlgebra R L]
{I₁ I₂ : LieIdeal R L}
(h : I₁ ≤ I₂)


theorem isOpen_iSup_iff {s : Set α} : IsOpen[⨆ i, t i] s ↔ ∀ i, IsOpen[t i] s

{α : Type u}
{ι : Sort v}
{t : ι → TopologicalSpace α}
{s : Set α}


theorem induction {C : Poly α → Prop} (H1 : ∀ i, C (proj i)) (H2 : ∀ n, C (const n))
    (H3 : ∀ f g, C f → C g → C (f - g)) (H4 : ∀ f g, C f → C g → C (f * g)) (f : Poly α) : C f

(H3 : ∀ (f g : Poly α), C f → C g → C (f - g))

(H4 : ∀ (f g : Poly α), C f → C g → C (f * g))


/-- Moves one-sided right toNat equality to BitVec equality. -/
theorem nat_eq_toNat (x : BitVec w) (y : Nat)
  : (y = x.toNat) ↔ (y < 2^w ∧ (x = BitVec.ofNat w y))

y = x.toNat ↔ y < 2 ^ w ∧ x = BitVec.ofNat w y


/-- If `f` is analytic at `z₀`, then exactly one of the following two possibilities occurs: either
`f` vanishes identically near `z₀`, or locally around `z₀` it has the form `z ↦ (z - z₀) ^ n • g z`
for some `n` and some `g` which is analytic and non-vanishing at `z₀`. -/
theorem exists_eventuallyEq_pow_smul_nonzero_iff (hf : AnalyticAt 𝕜 f z₀) :
    (∃ (n : ℕ), ∃ (g : 𝕜 → E), AnalyticAt 𝕜 g z₀ ∧ g z₀ ≠ 0 ∧
    ∀ᶠ z in 𝓝 z₀, f z = (z - z₀) ^ n • g z) ↔ (¬∀ᶠ z in 𝓝 z₀, f z = 0)

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{f : 𝕜 → E}
{z₀ : 𝕜}
(hf : AnalyticAt 𝕜 f z₀)

(∃ n g, AnalyticAt 𝕜 g z₀ ∧ g z₀ ≠ 0 ∧ ∀ᶠ (z : 𝕜) in 𝓝 z₀, f z = (z - z₀) ^ n • g z) ↔ ¬∀ᶠ (z : 𝕜) in 𝓝 z₀, f z = 0


/-- Applying a multilinear map to a vector is continuous in both coordinates. -/
theorem ContinuousMultilinearMap.continuous_eval {𝕜 ι : Type*} {E : ι → Type*} {F : Type*}
    [NormedField 𝕜] [Finite ι] [∀ i, SeminormedAddCommGroup (E i)] [∀ i, NormedSpace 𝕜 (E i)]
    [TopologicalSpace F] [AddCommGroup F] [TopologicalAddGroup F] [Module 𝕜 F] :
    Continuous fun p : ContinuousMultilinearMap 𝕜 E F × ∀ i, E i => p.1 p.2

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


theorem mul_coeff_zero (x y : 𝕎 R) : (x * y).coeff 0 = x.coeff 0 * y.coeff 0

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


/-- In a Noetherian space, every closed set is a finite union of irreducible closed sets. -/
theorem NoetherianSpace.exists_finite_set_closeds_irreducible [NoetherianSpace α] (s : Closeds α) :
    ∃ S : Set (Closeds α), S.Finite ∧ (∀ t ∈ S, IsIrreducible (t : Set α)) ∧ s = sSup S

{α : Type u_1}
[TopologicalSpace α]
[TopologicalSpace.NoetherianSpace α]
(s : TopologicalSpace.Closeds α)

∃ S, S.Finite ∧ (∀ t ∈ S, IsIrreducible ↑t) ∧ s = sSup S


theorem modByMonic_eq_zero_iff_dvd (hq : Monic q) : p %ₘ q = 0 ↔ q ∣ p

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


@[simp]
theorem toFinset_empty [Fintype (∅ : Set α)] : (∅ : Set α).toFinset = ∅


theorem sSup_mem {s : Set ℕ} (h₁ : s.Nonempty) (h₂ : BddAbove s) : sSup s ∈ s


@[to_additive (attr := simp)]
theorem symm_smul (c : G) : (smul c : α ≃ᵐ α).symm = smul c⁻¹

{G : Type u_1}
{α : Type u_3}
[MeasurableSpace G]
[MeasurableSpace α]
[Group G]
[MulAction G α]
[MeasurableSMul G α]
(c : G)

(MeasurableEquiv.smul c).symm = MeasurableEquiv.smul c⁻¹


theorem taylor_eval {R} [CommSemiring R] (r : R) (f : R[X]) (s : R) :
    (taylor r f).eval s = f.eval (s + r)

{R : Type u_2}
[CommSemiring R]
(r : R)
(f : Polynomial R)
(s : R)

Polynomial.eval s ((Polynomial.taylor r) f) = Polynomial.eval (s + r) f


theorem blockDiag_map (M : Matrix (m × o) (n × o) α) (f : α → β) :
    blockDiag (M.map f) = fun k => (blockDiag M k).map f

{m : Type u_2}
{n : Type u_3}
{o : Type u_4}
{α : Type u_12}
{β : Type u_13}
(M : Matrix (m × o) (n × o) α)
(f : α → β)

(M.map f).blockDiag = fun k => (M.blockDiag k).map f


@[simp] theorem map_id (l : List α) : map id l = l


@[simp]
theorem map_id : s.map (NonUnitalRingHom.id R) = s

{R : Type u}
[NonUnitalNonAssocSemiring R]
(s : NonUnitalSubsemiring R)

NonUnitalSubsemiring.map (NonUnitalRingHom.id R) s = s


@[simp]
lemma memPartition_zero (f : ℕ → Set α) : memPartition f 0 = {univ}


@[simp]
theorem continuousMultilinearCurryRightEquiv_apply
    (f : ContinuousMultilinearMap 𝕜 (fun i : Fin n => Ei <| castSucc i) (Ei (last n) →L[𝕜] G))
    (v : ∀ i, Ei i) : (continuousMultilinearCurryRightEquiv 𝕜 Ei G) f v = f (init v) (v (last n))

[(i : Fin n.succ) → NormedAddCommGroup (Ei i)]

[(i : Fin n.succ) → NormedSpace 𝕜 (Ei i)]

(f : ContinuousMultilinearMap 𝕜 (fun i => Ei i.castSucc) (Ei (Fin.last n) →L[𝕜] G))

((continuousMultilinearCurryRightEquiv 𝕜 Ei G) f) v = (f (Fin.init v)) (v (Fin.last n))


@[simp]
theorem inter_diff_self (a b : Set α) : a ∩ (b \ a) = ∅


@[simp] lemma predAbove_right_zero [NeZero n] {i : Fin n} : predAbove (i : Fin n) 0 = 0


theorem lt_of_le_pred (h : 0 < m) : n ≤ pred m → n < m


@[norm_cast]
theorem ofReal_one : ((1 : ℝ) : K) = 1


@[simp]
theorem vsub_bot : f -ᵥ (⊥ : Filter β) = ⊥

{α : Type u_2}
{β : Type u_3}
[VSub α β]
{f : Filter β}


@[simp]
theorem liftAux_self [PerfectRing L p] : liftAux i i p = id

{K : Type u_1}
{L : Type u_2}
[CommSemiring K]
[CommSemiring L]
(i : K →+* L)
(p : ℕ)
[ExpChar L p]
[IsPRadical i p]
[PerfectRing L p]


theorem T_sub_one (n : ℤ) : T R (n - 1) = 2 * X * T R n - T R (n + 1)

Polynomial.Chebyshev.T R (n - 1) = 2 * Polynomial.X * Polynomial.Chebyshev.T R n - Polynomial.Chebyshev.T R (n + 1)


/-- A Lie module is nilpotent if its lower central series reaches 0 (in a finite number of
steps). -/
class IsNilpotent : Prop where
  nilpotent : ∃ k, lowerCentralSeries R L M k = ⊥

{R : Type u}
{L : Type v}
{M : Type w}
[CommRing R]
[LieRing L]
[LieAlgebra R L]
[AddCommGroup M]
[Module R M]
[LieRingModule L M]
[self : LieModule.IsNilpotent R L M]

∃ k, LieModule.lowerCentralSeries R L M k = ⊥


theorem inf_eq_iInf [CompleteLattice β] (s : Finset α) (f : α → β) : s.inf f = ⨅ a ∈ s, f a

{α : Type u_2}
{β : Type u_3}
[CompleteLattice β]
(s : Finset α)
(f : α → β)


theorem cokernel_funext {C : Type*} [Category C] [HasZeroMorphisms C] [ConcreteCategory C]
    {M N K : C} {f : M ⟶ N} [HasCokernel f] {g h : cokernel f ⟶ K}
    (w : ∀ n : N, g (cokernel.π f n) = h (cokernel.π f n)) : g = h

{g h : CategoryTheory.Limits.cokernel f ⟶ K}

(w :
  ∀ (n : (CategoryTheory.forget C).obj N),
    g ((CategoryTheory.Limits.cokernel.π f) n) = h ((CategoryTheory.Limits.cokernel.π f) n))


theorem natDegree_sub_le_iff_right (pn : p.natDegree ≤ n) :
    (p - q).natDegree ≤ n ↔ q.natDegree ≤ n

{R : Type u}
{n : ℕ}
[Ring R]
{p q : R[X]}
(pn : p.natDegree ≤ n)


@[to_additive]
theorem image_mul_right' :
    image (· * b⁻¹) t = preimage t (· * b) (mul_left_injective _).injOn

{α : Type u_2}
[DecidableEq α]
[Group α]
{t : Finset α}
{b : α}

Finset.image (fun x => x * b⁻¹) t = t.preimage (fun x => x * b) ⋯


theorem iInter_unpair {α} (f : ℕ → ℕ → Set α) :
    ⋂ n : ℕ, f n.unpair.1 n.unpair.2 = ⋂ (i : ℕ) (j : ℕ), f i j

⋂ n, f (Nat.unpair n).1 (Nat.unpair n).2 = ⋂ i, ⋂ j, f i j


lemma fac' : p.map φ = eqToHom (domain_eq p f φ) ≫ f ≫ eqToHom (codomain_eq p f φ).symm

{𝒮 : Type u₁}
{𝒳 : Type u₂}
[CategoryTheory.Category.{v₁, u₂} 𝒳]
[CategoryTheory.Category.{v₂, u₁} 𝒮]
(p : 𝒳 ⥤ 𝒮)
{R S : 𝒮}
{a b : 𝒳}
(f : R ⟶ S)
(φ : a ⟶ b)
[p.IsHomLift f φ]

p.map φ = CategoryTheory.eqToHom ⋯ ≫ f ≫ CategoryTheory.eqToHom ⋯


@[simp]
theorem lift_le_continuum {c : Cardinal.{u}} : lift.{v} c ≤ 𝔠 ↔ c ≤ 𝔠

Cardinal.lift.{v, u} c ≤ Cardinal.continuum ↔ c ≤ Cardinal.continuum


theorem removeNone_none {x : α} (h : e (some x) = none) : some (removeNone e x) = e none

{α : Type u_1}
{β : Type u_2}
(e : Option α ≃ Option β)
{x : α}
(h : e (some x) = none)


@[simp] theorem sizeOf_thunk [SizeOf α] (f : Unit → α) : sizeOf f = sizeOf (f ())

{α : Sort u_1}
[SizeOf α]
(f : Unit → α)


theorem disjoint_comap (h : Disjoint g₁ g₂) : Disjoint (comap m g₁) (comap m g₂)

{α : Type u}
{β : Type v}
{g₁ g₂ : Filter β}
{m : α → β}
(h : Disjoint g₁ g₂)

Disjoint (Filter.comap m g₁) (Filter.comap m g₂)


/-- Construct an isomorphism in the over category given isomorphisms of the objects whose forward
direction gives a commutative triangle.
-/
@[simps!]
def isoMk {f g : Over X} (hl : f.left ≅ g.left) (hw : hl.hom ≫ g.hom = f.hom := by aesop_cat) :
    f ≅ g

(hw : CategoryTheory.CategoryStruct.comp hl.hom g.hom = f.hom := by aesop_cat)

(CategoryTheory.Over.isoMk hl hw).inv.left = hl.inv


lemma _root_.LinearEquiv.isRegular_congr (e : M ≃ₗ[R] M₂) (rs : List R) :
    IsRegular M rs ↔ IsRegular M₂ rs

{R : Type u_1}
{M : Type u_3}
{M₂ : Type u_4}
[CommRing R]
[AddCommGroup M]
[AddCommGroup M₂]
[Module R M]
[Module R M₂]
(e : M ≃ₗ[R] M₂)
(rs : List R)

RingTheory.Sequence.IsRegular M rs ↔ RingTheory.Sequence.IsRegular M₂ rs


/-- Tensoring on the right with a fixed object, as a functor. -/
@[simps!]
def tensorRight (X : C) : C ⥤ C

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

∀ {X_1 Y : C} (f : X_1 ⟶ Y),
  (CategoryTheory.MonoidalCategory.tensorRight X).map f = CategoryTheory.MonoidalCategory.whiskerRight f X


/-- A Lie ring module is an additive group, together with an additive action of a
Lie ring on this group, such that the Lie bracket acts as the commutator of endomorphisms.
(For representations of Lie *algebras* see `LieModule`.) -/
class LieRingModule (L : Type v) (M : Type w) [LieRing L] [AddCommGroup M] extends Bracket L M where
  /-- A Lie ring module bracket is additive in its first component. -/
  protected add_lie : ∀ (x y : L) (m : M), ⁅x + y, m⁆ = ⁅x, m⁆ + ⁅y, m⁆
  /-- A Lie ring module bracket is additive in its second component. -/
  protected lie_add : ∀ (x : L) (m n : M), ⁅x, m + n⁆ = ⁅x, m⁆ + ⁅x, n⁆
  /-- A Lie ring module bracket satisfies a Leibniz / Jacobi identity. -/
  protected leibniz_lie : ∀ (x y : L) (m : M), ⁅x, ⁅y, m⁆⁆ = ⁅⁅x, y⁆, m⁆ + ⁅y, ⁅x, m⁆⁆

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


@[simp] theorem runK_pure (a : α) (s : σ) (k : α → σ → m β) : (pure a : StateCpsT σ m α).runK s k = k a s

{α σ : Type u}
{m : Type u → Type v}
{β : Type u}
(a : α)
(s : σ)
(k : α → σ → m β)


/-- Many `Fintype` instances for sets are defined using an extensionally equal `Finset`.
Rewriting `s.toFinset` with `Set.toFinset_ofFinset` replaces the term with such a `Finset`. -/
theorem toFinset_ofFinset {p : Set α} (s : Finset α) (H : ∀ x, x ∈ s ↔ x ∈ p) :
    @Set.toFinset _ p (Fintype.ofFinset s H) = s

{α : Type u_1}
{p : Set α}
(s : Finset α)
(H : ∀ (x : α), x ∈ s ↔ x ∈ p)


theorem uniformContinuous_map₂ (f : α → β → γ) : UniformContinuous₂ (Completion.map₂ f)

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


lemma toSubgraph_le_induce_support (p : G.Walk u v) :
    p.toSubgraph ≤ (⊤ : G.Subgraph).induce {v | v ∈ p.support}

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

p.toSubgraph ≤ ⊤.induce {v_1 | v_1 ∈ p.support}


@[to_additive]
theorem relindex_ne_zero_trans (hHK : H.relindex K ≠ 0) (hKL : K.relindex L ≠ 0) :
    H.relindex L ≠ 0

{G : Type u_1}
[Group G]
{H K L : Subgroup G}
(hHK : H.relindex K ≠ 0)
(hKL : K.relindex L ≠ 0)


theorem aeval_sum {ι : Type*} (s : Finset ι) (φ : ι → MvPolynomial σ R) :
    aeval f (∑ i ∈ s, φ i) = ∑ i ∈ s, aeval f (φ i)

{R : Type u}
{S₁ : Type v}
{σ : Type u_1}
[CommSemiring R]
[CommSemiring S₁]
[Algebra R S₁]
(f : σ → S₁)
{ι : Type u_2}
(s : Finset ι)
(φ : ι → MvPolynomial σ R)

(MvPolynomial.aeval f) (∑ i ∈ s, φ i) = ∑ i ∈ s, (MvPolynomial.aeval f) (φ i)


theorem union_lowerBounds_subset_lowerBounds_inter :
    lowerBounds s ∪ lowerBounds t ⊆ lowerBounds (s ∩ t)


theorem isMinFilter_const {b : β} : IsMinFilter (fun _ => b) l a

{α : Type u}
{β : Type v}
[Preorder β]
{l : Filter α}
{a : α}
{b : β}


theorem ftaylorSeriesWithin_univ : ftaylorSeriesWithin 𝕜 f univ = ftaylorSeries 𝕜 f

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

ftaylorSeriesWithin 𝕜 f Set.univ = ftaylorSeries 𝕜 f


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

{α : Type u}
{β : Type v}
[SemilatticeInf β]
{f g : α → β}
{a : α}
{l : Filter α}
(hf : IsMaxFilter f l a)
(hg : IsMaxFilter g l a)


@[simp]
theorem coe_toEquiv (h : α ≃ᵤ β) : ⇑h.toEquiv = h

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


/-- Applying a continuous linear map commutes with taking an (infinite) sum. -/
protected theorem ContinuousLinearEquiv.hasSum {f : ι → M} (e : M ≃SL[σ] M₂) {y : M₂} :
    HasSum (fun b : ι ↦ e (f b)) y ↔ HasSum f (e.symm y)

{ι : Type u_5}
{R : Type u_7}
{R₂ : Type u_8}
{M : Type u_9}
{M₂ : Type u_10}
[Semiring R]
[Semiring R₂]
[AddCommMonoid M]
[Module R M]
[AddCommMonoid M₂]
[Module R₂ M₂]
[TopologicalSpace M]
[TopologicalSpace M₂]
{σ : R →+* R₂}
{σ' : R₂ →+* R}
[RingHomInvPair σ σ']
[RingHomInvPair σ' σ]
{f : ι → M}
(e : M ≃SL[σ] M₂)
{y : M₂}

HasSum (fun b => e (f b)) y ↔ HasSum f (e.symm y)


/-- Create a `selfAdjoint` element from a `skewAdjoint` element by multiplying by the scalar
`-Complex.I`. -/
@[simps]
def skewAdjoint.negISMul : skewAdjoint A →ₗ[ℝ] selfAdjoint A

{A : Type u_1}
[AddCommGroup A]
[Module ℂ A]
[StarAddMonoid A]
[StarModule ℂ A]
(a : ↥(skewAdjoint A))

↑(skewAdjoint.negISMul a) = -Complex.I • ↑a


theorem symmDiff_of_le {a b : α} (h : a ≤ b) : a ∆ b = b \ a

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


theorem SOppSide.nonempty {s : AffineSubspace R P} {x y : P} (h : s.SOppSide x y) :
    (s : Set P).Nonempty

{R : Type u_1}
{V : Type u_2}
{P : Type u_4}
[StrictOrderedCommRing R]
[AddCommGroup V]
[Module R V]
[AddTorsor V P]
{s : AffineSubspace R P}
{x y : P}
(h : s.SOppSide x y)


@[to_additive]
theorem mem_iSup_of_directed {S : ι → Subsemigroup M} (hS : Directed (· ≤ ·) S) {x : M} :
    (x ∈ ⨆ i, S i) ↔ ∃ i, x ∈ S i

(hS : Directed (fun x x_1 => x ≤ x_1) S)


theorem toEnd_injective : Injective (CentroidHom.toEnd : CentroidHom α → AddMonoid.End α)

{α : Type u_5}
[NonUnitalNonAssocSemiring α]


theorem liftRel_congr {R : α → β → Prop} {ca ca' : Computation α} {cb cb' : Computation β}
    (ha : ca ~ ca') (hb : cb ~ cb') : LiftRel R ca cb ↔ LiftRel R ca' cb'

{α : Type u}
{β : Type v}
{R : α → β → Prop}
{ca ca' : Computation α}
{cb cb' : Computation β}
(ha : ca.Equiv ca')
(hb : cb.Equiv cb')

Computation.LiftRel R ca cb ↔ Computation.LiftRel R ca' cb'


protected theorem pow_add_one (n m : Nat) : n^(m + 1) = n^m * n


/-- If `F` has a limit, then the limit projections can be interpreted as structured arrows
    `limit F ⟶ F.obj -`. -/
@[simps]
noncomputable def limit.toStructuredArrow (F : J ⥤ C) [HasLimit F] :
    J ⥤ StructuredArrow (limit F) F

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

(CategoryTheory.Limits.limit.toStructuredArrow F).obj j =
  CategoryTheory.StructuredArrow.mk (CategoryTheory.Limits.limit.π F j)


/-- If the sign of the oriented angle between two vectors is zero, either one of the vectors is
zero or the unoriented angle is 0 or π. -/
theorem eq_zero_or_angle_eq_zero_or_pi_of_sign_oangle_eq_zero {x y : V}
    (h : (o.oangle x y).sign = 0) :
    x = 0 ∨ y = 0 ∨ InnerProductGeometry.angle x y = 0 ∨ InnerProductGeometry.angle x y = π

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


@[simp]
theorem untrop_le_iff [LE R] {x y : Tropical R} : untrop x ≤ untrop y ↔ x ≤ y

Tropical.untrop x ≤ Tropical.untrop y ↔ x ≤ y


@[simp]
theorem eqLocusS_same (f : R →+* S) : f.eqLocusS f = ⊤

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


lemma Group.IsNilpotent.nilpotent (G : Type*) [Group G] [IsNilpotent G] :
    ∃ n : ℕ, upperCentralSeries G n = ⊤

(G : Type u_2)
[Group G]
[Group.IsNilpotent G]


lemma truncatedInf_union_right (hs : a ∉ upperClosure s) (ht : a ∈ upperClosure t) :
    truncatedInf (s ∪ t) a = truncatedInf t a

{α : Type u_1}
[SemilatticeInf α]
[BoundedOrder α]
[DecidableRel fun x x_1 => x ≤ x_1]
{s t : Finset α}
{a : α}
[DecidableEq α]
(hs : a ∉ upperClosure ↑s)
(ht : a ∈ upperClosure ↑t)

(s ∪ t).truncatedInf a = t.truncatedInf a


theorem image_Ioo (e : α ↪o β) (he : OrdConnected (range e)) (x y : α) :
    e '' Ioo x y = Ioo (e x) (e y)

{α : Type u_1}
{β : Type u_2}
[Preorder α]
[Preorder β]
(e : α ↪o β)
(he : (Set.range ⇑e).OrdConnected)
(x y : α)


@[simp]
theorem mk_eq_one [Monoid α] {a : α} : Associates.mk a = 1 ↔ IsUnit a


theorem tendsto_atTop_add_right_of_le (C : β) (hf : Tendsto f l atTop) (hg : ∀ x, C ≤ g x) :
    Tendsto (fun x => f x + g x) l atTop

{α : Type u_3}
{β : Type u_4}
[OrderedAddCommGroup β]
(l : Filter α)
{f g : α → β}
(C : β)
(hf : Filter.Tendsto f l Filter.atTop)
(hg : ∀ (x : α), C ≤ g x)

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


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

You should also extend this typeclass when you extend `CocompactMap`. -/
class CocompactMapClass (F : Type*) (α β : outParam Type*) [TopologicalSpace α]
  [TopologicalSpace β] [FunLike F α β] extends ContinuousMapClass F α β : Prop where
  /-- The cocompact filter on `α` tends to the cocompact filter on `β` under the function -/
  cocompact_tendsto (f : F) : Tendsto f (cocompact α) (cocompact β)

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

Filter.Tendsto (⇑f) (Filter.cocompact α) (Filter.cocompact β)


theorem iUnion_false {s : False → Set α} : iUnion s = ∅


theorem norm_toL1_eq_lintegral_norm (f : α → β) (hf : Integrable f μ) :
    ‖hf.toL1 f‖ = ENNReal.toReal (∫⁻ a, ENNReal.ofReal ‖f a‖ ∂μ)

{α : Type u_1}
{β : Type u_2}
{m : MeasurableSpace α}
{μ : MeasureTheory.Measure α}
[NormedAddCommGroup β]
(f : α → β)
(hf : MeasureTheory.Integrable f μ)

‖MeasureTheory.Integrable.toL1 f hf‖ = (∫⁻ (a : α), ENNReal.ofReal ‖f a‖ ∂μ).toReal


/-- A function is invariant to a swap if it is equal at both elements -/
theorem apply_swap_eq_self {v : α → β} {i j : α} (hv : v i = v j) (k : α) :
    v (swap i j k) = v k

{α : Sort u_2}
[DecidableEq α]
{β : Sort u_1}
{v : α → β}
{i j : α}
(hv : v i = v j)
(k : α)


/-- The map `colimit_limit_to_limit_colimit` realized as a map of cones. -/
@[simps]
noncomputable def colimitLimitToLimitColimitCone (G : J ⥤ K ⥤ C) [HasLimit G] :
    colim.mapCone (limit.cone G) ⟶ limit.cone (G ⋙ colim)

(CategoryTheory.Limits.colimitLimitToLimitColimitCone G).hom =
  CategoryTheory.Limits.colim.map (CategoryTheory.Limits.limitIsoSwapCompLim G).hom ≫
    CategoryTheory.Limits.colimitLimitToLimitColimit (CategoryTheory.uncurry.obj G) ≫
      CategoryTheory.Limits.lim.map
        (CategoryTheory.whiskerRight (CategoryTheory.currying.unitIso.app G).inv CategoryTheory.Limits.colim)


theorem nhds_eq : 𝓝 x = ⨅ ε > 0, 𝓟 (ball x ε)

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

𝓝 x = ⨅ ε, ⨅ (_ : ε > 0), 𝓟 (EMetric.ball x ε)


theorem Joined.mem_pathComponent (hyz : Joined y z) (hxy : y ∈ pathComponent x) :
    z ∈ pathComponent x

{X : Type u_1}
[TopologicalSpace X]
{x y z : X}
(hyz : Joined y z)
(hxy : y ∈ pathComponent x)


@[simp]
theorem yonedaEvaluation_map_down (P Q : Cᵒᵖ × (Cᵒᵖ ⥤ Type v₁)) (α : P ⟶ Q)
    (x : (yonedaEvaluation C).obj P) :
    ((yonedaEvaluation C).map α x).down = α.2.app Q.1 (P.2.map α.1 x.down)

(P Q : Cᵒᵖ × CategoryTheory.Functor Cᵒᵖ (Type v₁))

(x : (CategoryTheory.yonedaEvaluation C).obj P)

((CategoryTheory.yonedaEvaluation C).map α x).down = α.2.app Q.1 (P.2.map α.1 x.down)


@[simp]
theorem supportedEquivMvPolynomial_symm_C (s : Set σ) (x : R) :
    (supportedEquivMvPolynomial s).symm (C x) = algebraMap R (supported R s) x

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

(MvPolynomial.supportedEquivMvPolynomial s).symm (MvPolynomial.C x) = (algebraMap R ↥(MvPolynomial.supported R s)) x


@[simp]
theorem length_ndinsert_of_mem {a : α} {s : Multiset α} (h : a ∈ s) :
    card (ndinsert a s) = card s

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

Multiset.card (Multiset.ndinsert a s) = Multiset.card s


@[simp]
theorem lie_bot : ⁅I, (⊥ : LieSubmodule R L M)⁆ = ⊥

{R : Type u}
{L : Type v}
{M : Type w}
[CommRing R]
[LieRing L]
[LieAlgebra R L]
[AddCommGroup M]
[Module R M]
[LieRingModule L M]
(I : LieIdeal R L)


theorem orbitZPowersEquiv_symm_apply' (k : ℤ) :
    (orbitZPowersEquiv a b).symm k =
      (⟨a, mem_zpowers a⟩ : zpowers a) ^ k • ⟨b, mem_orbit_self b⟩

{α : Type u_3}
{β : Type u_4}
[Group α]
(a : α)
[MulAction α β]
(b : β)
(k : ℤ)

(MulAction.orbitZPowersEquiv a b).symm ↑k = ⟨a, ⋯⟩ ^ k • ⟨b, ⋯⟩


/-- The supremum of a set of congruence relations `S` equals the smallest congruence relation
    containing the binary relation 'there exists `c ∈ S` such that `x` is related to `y` by
    `c`'. -/
@[to_additive sSup_eq_addConGen "The supremum of a set of additive congruence relations `S` equals
the smallest additive congruence relation containing the binary relation 'there exists `c ∈ S`
such that `x` is related to `y` by `c`'."]
theorem sSup_eq_conGen (S : Set (Con M)) :
    sSup S = conGen fun x y => ∃ c : Con M, c ∈ S ∧ c x y

{M : Type u_1}
[Mul M]
(S : Set (Con M))

sSup S = conGen fun x y => ∃ c ∈ S, c x y


@[to_additive]
theorem period_le_exponent (exp_pos : 0 < Monoid.exponent M) (m : M) (a : α) :
    period m a ≤ Monoid.exponent M

{α : Type v}
{M : Type u}
[AddMonoid M]
[AddAction M α]
(exp_pos : 0 < AddMonoid.exponent M)
(m : M)
(a : α)

AddAction.period m a ≤ AddMonoid.exponent M


theorem sum_schlomilch_le {C : ℕ} (hf : ∀ ⦃m n⦄, 1 < m → m ≤ n → f n ≤ f m) (h_pos : ∀ n, 0 < u n)
    (h_nonneg : ∀ n, 0 ≤ f n) (hu : Monotone u) (h_succ_diff : SuccDiffBounded C u) (n : ℕ) :
    ∑ k ∈ range (n + 1), (u (k + 1) - u k) • f (u k) ≤
    (u 1 - u 0) • f (u 0) + C • ∑ k ∈ Ico (u 0 + 1) (u n + 1), f k

(hf : ∀ ⦃m n : ℕ⦄, 1 < m → m ≤ n → f n ≤ f m)

∑ k ∈ Finset.range (n + 1), (u (k + 1) - u k) • f (u k) ≤
  (u 1 - u 0) • f (u 0) + C • ∑ k ∈ Finset.Ico (u 0 + 1) (u n + 1), f k


theorem eq_iff_iff {a b : Bool} : a = b ↔ (a ↔ b)


/-- `lpTrimToLpMeasSubgroup` is a left inverse of `lpMeasSubgroupToLpTrim`. -/
theorem lpMeasSubgroupToLpTrim_left_inv (hm : m ≤ m0) :
    Function.LeftInverse (lpTrimToLpMeasSubgroup F p μ hm) (lpMeasSubgroupToLpTrim F p μ hm)

{α : Type u_1}
{F : Type u_3}
{p : ℝ≥0∞}
[NormedAddCommGroup F]
{m m0 : MeasurableSpace α}
{μ : MeasureTheory.Measure α}
(hm : m ≤ m0)

Function.LeftInverse (MeasureTheory.lpTrimToLpMeasSubgroup F p μ hm) (MeasureTheory.lpMeasSubgroupToLpTrim F p μ hm)


/-- Let `G` be the subgroup of `AddCircle T` generated by a point `u` of finite order `n : ℕ`. Then
any set `I` that is almost equal to a ball of radius `T / 2n` is a fundamental domain for the action
of `G` on `AddCircle T` by left addition. -/
theorem isAddFundamentalDomain_of_ae_ball (I : Set <| AddCircle T) (u x : AddCircle T)
    (hu : IsOfFinAddOrder u) (hI : I =ᵐ[volume] ball x (T / (2 * addOrderOf u))) :
    IsAddFundamentalDomain (AddSubgroup.zmultiples u) I

(hI : I =ᵐ[MeasureTheory.volume] Metric.ball x (T / (2 * ↑(addOrderOf u))))

MeasureTheory.IsAddFundamentalDomain (↥(AddSubgroup.zmultiples u)) I MeasureTheory.volume


theorem le_inf_support_finset_prod (degt0 : 0 ≤ degt 0)
    (degtm : ∀ a b, degt a + degt b ≤ degt (a + b)) (s : Finset ι) (f : ι → R[A]) :
    (∑ i ∈ s, (f i).support.inf degt) ≤ (∏ i ∈ s, f i).support.inf degt

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

[CovariantClass T T (Function.swap fun x x_1 => x + x_1) fun x x_1 => x ≤ x_1]

(degtm : ∀ (a b : A), degt a + degt b ≤ degt (a + b))

∑ i ∈ s, (f i).support.inf degt ≤ (∏ i ∈ s, f i).support.inf degt


@[simp, norm_cast]
theorem coe_comap (S : Subalgebra R B) (f : A →ₐ[R] B) : (S.comap f : Set A) = f ⁻¹' (S : Set B)

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


/-- The colimit of a diagram `F : J ⥤ K ⥤ C` is isomorphic to the functor given by
the individual colimits on objects. -/
@[simps!]
def colimitIsoFlipCompColim [HasColimitsOfShape J C] (F : J ⥤ K ⥤ C) : colimit F ≅ F.flip ⋙ colim

(CategoryTheory.Limits.colimitIsoFlipCompColim F).hom.app X =
  (CategoryTheory.Limits.colimitObjIsoColimitCompEvaluation F X).hom


theorem mem_sup_left {S T : NonUnitalSubalgebra R A} : ∀ {x : A}, x ∈ S → x ∈ S ⊔ T

{R : Type u}
{A : Type v}
[CommSemiring R]
[NonUnitalNonAssocSemiring A]
[Module R A]
[IsScalarTower R A A]
[SMulCommClass R A A]
{S T : NonUnitalSubalgebra R A}
{x : A}


@[to_additive (attr := simp)]
lemma monoidHomOfForallMemZpowers_apply_gen :
    monoidHomOfForallMemZpowers hg hg' g = g'

(hg : ∀ (x : G), x ∈ Subgroup.zpowers g)

(monoidHomOfForallMemZpowers hg hg') g = g'


/-- An explicit upper bound for `‖jacobiTheta τ - 1‖`. -/
theorem norm_jacobiTheta_sub_one_le {τ : ℂ} (hτ : 0 < im τ) :
    ‖jacobiTheta τ - 1‖ ≤ 2 / (1 - rexp (-π * τ.im)) * rexp (-π * τ.im)


theorem perm_replace {a : α} {b : β a} {s₁ s₂ : AList β} :
    s₁.entries ~ s₂.entries → (replace a b s₁).entries ~ (replace a b s₂).entries

{α : Type u}
{β : α → Type v}
[DecidableEq α]
{a : α}
{b : β a}
{s₁ s₂ : AList β}

s₁.entries ~ s₂.entries → (AList.replace a b s₁).entries ~ (AList.replace a b s₂).entries


/-- In the specific case of continuous alternating maps on spaces indexed by `Fin (n+1)`, where one
can build an element of `Π(i : Fin (n+1)), M i` using `cons`, one can express directly the
multiplicativity of an alternating map along the first variable. -/
theorem vecCons_smul (f : ContinuousAlternatingMap R M N (Fin (n + 1))) (m : Fin n → M) (c : R)
    (x : M) : f (vecCons (c • x) m) = c • f (vecCons x m)

{R : Type u_1}
{M : Type u_2}
{N : Type u_4}
[Semiring R]
[AddCommMonoid M]
[Module R M]
[TopologicalSpace M]
[AddCommMonoid N]
[Module R N]
[TopologicalSpace N]
{n : ℕ}
(f : M [⋀^Fin (n + 1)]→L[R] N)
(m : Fin n → M)
(c : R)
(x : M)

f (Matrix.vecCons (c • x) m) = c • f (Matrix.vecCons x m)


/-- `SMul` version of `one_mul_eq_id` -/
@[to_additive "`VAdd` version of `zero_add_eq_id`"]
lemma one_smul_eq_id : (((1 : M) • ·) : α → α) = id

(M : Type u_1)
{α : Type u_7}
[AddMonoid M]
[AddAction M α]


@[simp]
theorem mem_nil {α} (x : α) : x ∈ @LazyList.nil α ↔ False


theorem coe_le_iff {x : WithZero α} : (a : WithZero α) ≤ x ↔ ∃ b : α, x = b ∧ a ≤ b

{α : Type u_1}
[Preorder α]
{a : α}
{x : WithZero α}


@[simp] theorem not_imp_self : ¬a → a ↔ a


theorem sbtw_iff_not_btw {a b c : α} : sbtw a b c ↔ ¬btw c b a

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


/-- **Jensen's inequality**: if a function `g : E → ℝ` is convex and continuous on a convex closed
set `s`, `μ` is a finite non-zero measure on `α`, and `f : α → E` is a function sending
`μ`-a.e. points of a set `t` to `s`, then the value of `g` at the average value of `f` over `t` is
less than or equal to the average value of `g ∘ f` over `t` provided that both `f` and `g ∘ f` are
integrable. -/
theorem ConvexOn.set_average_mem_epigraph (hg : ConvexOn ℝ s g) (hgc : ContinuousOn g s)
    (hsc : IsClosed s) (h0 : μ t ≠ 0) (ht : μ t ≠ ∞) (hfs : ∀ᵐ x ∂μ.restrict t, f x ∈ s)
    (hfi : IntegrableOn f t μ) (hgi : IntegrableOn (g ∘ f) t μ) :
    (⨍ x in t, f x ∂μ, ⨍ x in t, g (f x) ∂μ) ∈ {p : E × ℝ | p.1 ∈ s ∧ g p.1 ≤ p.2}

(hfs : ∀ᵐ (x : α) ∂μ.restrict t, f x ∈ s)

(hfi : MeasureTheory.IntegrableOn f t μ)

(hgi : MeasureTheory.IntegrableOn (g ∘ f) t μ)

(⨍ (x : α) in t, f x ∂μ, ⨍ (x : α) in t, g (f x) ∂μ) ∈ {p | p.1 ∈ s ∧ g p.1 ≤ p.2}


/-- **Fermat's Little Theorem**: for all `a : ℤ` coprime to `p`, we have
`a ^ (p - 1) ≡ 1 [ZMOD p]`. -/
theorem Int.ModEq.pow_card_sub_one_eq_one {p : ℕ} (hp : Nat.Prime p) {n : ℤ} (hpn : IsCoprime n p) :
    n ^ (p - 1) ≡ 1 [ZMOD p]

{p : ℕ}
(hp : Nat.Prime p)
{n : ℤ}
(hpn : IsCoprime n ↑p)


@[simp]
theorem mul_comp {R : Type*} [CommSemiring R] (p q r : R[X]) :
    (p * q).comp r = p.comp r * q.comp r

{R : Type u_1}
[CommSemiring R]
(p q r : R[X])


/-- For an element `a` of a linear ordered ring, either `abs a = a` and `0 ≤ a`,
    or `abs a = -a` and `a < 0`.
    Use cases on this lemma to automate linarith in inequalities -/
theorem abs_cases (a : α) : |a| = a ∧ 0 ≤ a ∨ |a| = -a ∧ a < 0

{α : Type u_1}
[LinearOrderedAddCommGroup α]
(a : α)


theorem isometry_comap_mkMetric (m : ℝ≥0∞ → ℝ≥0∞) {f : X → Y} (hf : Isometry f)
    (H : Monotone m ∨ Surjective f) : comap f (mkMetric m) = mkMetric m

(m : ℝ≥0∞ → ℝ≥0∞)

(H : Monotone m ∨ Function.Surjective f)

(MeasureTheory.OuterMeasure.comap f) (MeasureTheory.OuterMeasure.mkMetric m) = MeasureTheory.OuterMeasure.mkMetric m


theorem integral_mul_left {L : Type*} [RCLike L] (r : L) (f : α → L) :
    ∫ a, r * f a ∂μ = r * ∫ a, f a ∂μ

{α : Type u_1}
{m : MeasurableSpace α}
{μ : MeasureTheory.Measure α}
{L : Type u_6}
[RCLike L]
(r : L)
(f : α → L)

∫ (a : α), r * f a ∂μ = r * ∫ (a : α), f a ∂μ


@[simp]
theorem coe_finsupport (x₀ : X) :
    (ρ.finsupport x₀ : Set ι) = support fun i ↦ ρ i x₀

{ι : Type u}
{X : Type v}
[TopologicalSpace X]
{s : Set X}
(ρ : PartitionOfUnity ι X s)
(x₀ : X)

↑(ρ.finsupport x₀) = Function.support fun i => (ρ i) x₀


theorem lintegral_restrict {m : MeasurableSpace α} (f : α →ₛ ℝ≥0∞) (s : Set α) (μ : Measure α) :
    f.lintegral (μ.restrict s) = ∑ y ∈ f.range, y * μ (f ⁻¹' {y} ∩ s)

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

f.lintegral (μ.restrict s) = ∑ y ∈ f.range, y * μ (↑f ⁻¹' {y} ∩ s)


/-- A preconnected set in a conditionally complete linear order is either one of the intervals
`[Inf s, Sup s]`, `[Inf s, Sup s)`, `(Inf s, Sup s]`, `(Inf s, Sup s)`, `[Inf s, +∞)`,
`(Inf s, +∞)`, `(-∞, Sup s]`, `(-∞, Sup s)`, `(-∞, +∞)`, or `∅`. The converse statement requires
`α` to be densely ordered. -/
theorem IsPreconnected.mem_intervals {s : Set α} (hs : IsPreconnected s) :
    s ∈
      ({Icc (sInf s) (sSup s), Ico (sInf s) (sSup s), Ioc (sInf s) (sSup s), Ioo (sInf s) (sSup s),
          Ici (sInf s), Ioi (sInf s), Iic (sSup s), Iio (sSup s), univ, ∅} : Set (Set α))

{α : Type u}
[ConditionallyCompleteLinearOrder α]
[TopologicalSpace α]
[OrderTopology α]
{s : Set α}
(hs : IsPreconnected s)

s ∈
  {Set.Icc (sInf s) (sSup s), Set.Ico (sInf s) (sSup s), Set.Ioc (sInf s) (sSup s), Set.Ioo (sInf s) (sSup s),
    Set.Ici (sInf s), Set.Ioi (sInf s), Set.Iic (sSup s), Set.Iio (sSup s), Set.univ, ∅}


/-- Rational root theorem part 2:
if `r : f.codomain` is a root of a polynomial over the ufd `A`,
then the denominator of `r` divides the leading coefficient -/
theorem den_dvd_of_is_root {p : A[X]} {r : K} (hr : aeval r p = 0) :
    (den A r : A) ∣ p.leadingCoeff

{A : Type u_1}
{K : Type u_2}
[CommRing A]
[IsDomain A]
[UniqueFactorizationMonoid A]
[Field K]
[Algebra A K]
[IsFractionRing A K]
{p : A[X]}
{r : K}
(hr : (Polynomial.aeval r) p = 0)

↑(IsFractionRing.den A r) ∣ p.leadingCoeff


@[csimp] theorem takeList_eq_takeListTR : @takeList = @takeListTR


theorem IsTrail.even_countP_edges_iff {u v : V} {p : G.Walk u v} (ht : p.IsTrail) (x : V) :
    Even (p.edges.countP fun e => x ∈ e) ↔ u ≠ v → x ≠ u ∧ x ≠ v

{V : Type u_1}
{G : SimpleGraph V}
[DecidableEq V]
{u v : V}
{p : G.Walk u v}
(ht : p.IsTrail)
(x : V)

Even (List.countP (fun e => decide (x ∈ e)) p.edges) ↔ u ≠ v → x ≠ u ∧ x ≠ v


@[to_additive]
lemma orderOf_pow_of_dvd {x : G} {n : ℕ} (hn : n ≠ 0) (dvd : n ∣ orderOf x) :
    orderOf (x ^ n) = orderOf x / n

{G : Type u_1}
[AddMonoid G]
{x : G}
{n : ℕ}
(hn : n ≠ 0)
(dvd : n ∣ addOrderOf x)


@[reassoc (attr := simp)]
lemma Cofan.IsColimit.fac {F : β → C} {c : Cofan F} (hc : IsColimit c) {A : C}
    (f : ∀ i, F i ⟶ A) (i : β) :
    c.inj i ≫ Cofan.IsColimit.desc hc f = f i

(hc : CategoryTheory.Limits.IsColimit c)

c.inj i ≫ CategoryTheory.Limits.Cofan.IsColimit.desc hc f = f i


@[simp]
theorem Ioc_union_Ioc_eq_Ioc {a b c : α} (h₁ : a ≤ b) (h₂ : b ≤ c) :
    Ioc a b ∪ Ioc b c = Ioc a c

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

Finset.Ioc a b ∪ Finset.Ioc b c = Finset.Ioc a c


theorem mkRingHom_surjective (r : R → R → Prop) : Function.Surjective (mkRingHom r)

{R : Type uR}
[Semiring R]
(r : R → R → Prop)


@[to_additive]
lemma iIndepFun.indepFun_div_left (hf_indep : iIndepFun (fun _ ↦ m) f μ)
    (hf_meas : ∀ i, Measurable (f i)) (i j k : ι) (hik : i ≠ k) (hjk : j ≠ k) :
    IndepFun (f i / f j) (f k) μ

{f : ι → Ω → β}

(hf_indep : ProbabilityTheory.iIndepFun (fun x => m) f μ)

ProbabilityTheory.IndepFun (f i / f j) (f k) μ


@[reassoc (attr := simp)]
theorem P_f_naturality (q n : ℕ) {X Y : SimplicialObject C} (f : X ⟶ Y) :
    f.app (op [n]) ≫ (P q).f n = (P q).f n ≫ f.app (op [n])

{X Y : CategoryTheory.SimplicialObject C}

f.app (Opposite.op [n]) ≫ (AlgebraicTopology.DoldKan.P q).f n =
  (AlgebraicTopology.DoldKan.P q).f n ≫ f.app (Opposite.op [n])


theorem sum_le_sum {ι} (f g : ι → Cardinal) (H : ∀ i, f i ≤ g i) : sum f ≤ sum g

{ι : Type u_1}
(f g : ι → Cardinal.{u_2})
(H : ∀ (i : ι), f i ≤ g i)


theorem not_inseparable_iff_exists_open :
    ¬(x ~ᵢ y) ↔ ∃ s : Set X, IsOpen s ∧ Xor' (x ∈ s) (y ∈ s)

{X : Type u_1}
[TopologicalSpace X]
{x y : X}

¬(x ~ᵢ y) ↔ ∃ s, IsOpen s ∧ Xor' (x ∈ s) (y ∈ s)


theorem balancedSz_zero {l : ℕ} : BalancedSz l 0 ↔ l ≤ 1


@[to_additive] lemma mabs_of_one_le (h : 1 ≤ a) : |a|ₘ = a

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


lemma completedSinZeta_neg (a : UnitAddCircle) (s : ℂ) :
    completedSinZeta (-a) s = -completedSinZeta a s

HurwitzZeta.completedSinZeta (-a) s = -HurwitzZeta.completedSinZeta a s


theorem abs_re_div_norm_le_one (z : K) : |re z / ‖z‖| ≤ 1


theorem comp_right_differentiableAt_iff {f : F → G} {x : E} :
    DifferentiableAt 𝕜 (f ∘ iso) x ↔ DifferentiableAt 𝕜 f (iso 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]
(iso : E ≃L[𝕜] F)
{f : F → G}
{x : E}

DifferentiableAt 𝕜 (f ∘ ⇑iso) x ↔ DifferentiableAt 𝕜 f (iso x)


theorem exists_irreducible_of_natDegree_pos {R : Type u} [CommRing R] [IsDomain R] [WfDvdMonoid R]
    {f : R[X]} (hf : 0 < f.natDegree) : ∃ g, Irreducible g ∧ g ∣ f


@[simp]
theorem rename_comp_expand (f : σ → τ) (p : ℕ) :
    (rename f).comp (expand p) =
      (expand p).comp (rename f : MvPolynomial σ R →ₐ[R] MvPolynomial τ R)

{σ : Type u_1}
{τ : Type u_2}
{R : Type u_3}
[CommSemiring R]
(f : σ → τ)
(p : ℕ)

(MvPolynomial.rename f).comp (MvPolynomial.expand p) = (MvPolynomial.expand p).comp (MvPolynomial.rename f)


lemma rel_or_eq_of_le [IsTrans α r] (x : RelSeries r) {i j : Fin (x.length + 1)} (h : i ≤ j) :
    r (x i) (x j) ∨ x i = x j

{α : Type u_1}
{r : Rel α α}
[IsTrans α r]
(x : RelSeries r)
{i j : Fin (x.length + 1)}
(h : i ≤ j)

r (x.toFun i) (x.toFun j) ∨ x.toFun i = x.toFun j


@[simp]
theorem empty_union (a : Set α) : ∅ ∪ a = a


@[simp]
lemma map_add_inv_app (a b : A) (X : C) :
    F.map ((add hF s i a b).inv.app X) =
      (i b).hom.app ((s a).obj X) ≫ ((i a).hom.app X)⟦b⟧' ≫
        (shiftFunctorAdd D a b).inv.app (F.obj X) ≫ (i (a + b)).inv.app X

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

F.map ((CategoryTheory.Functor.FullyFaithful.hasShift.add hF s i a b).inv.app X) =
  CategoryTheory.CategoryStruct.comp ((i b).hom.app ((s a).obj X))
    (CategoryTheory.CategoryStruct.comp ((CategoryTheory.shiftFunctor D b).map ((i a).hom.app X))
      (CategoryTheory.CategoryStruct.comp ((CategoryTheory.shiftFunctorAdd D a b).inv.app (F.obj X))
        ((i (a + b)).inv.app X)))


@[simp]
theorem mem_sort {s : Multiset α} {a : α} : a ∈ sort r s ↔ a ∈ s

{α : Type u_1}
(r : α → α → Prop)
[DecidableRel r]
[IsTrans α r]
[IsAntisymm α r]
[IsTotal α r]
{s : Multiset α}
{a : α}


theorem smul_inj (s : S) (m₁ m₂ : M') : s • m₁ = s • m₂ ↔ m₁ = m₂

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


theorem SuperpolynomialDecay.congr (hf : SuperpolynomialDecay l k f) (hfg : ∀ x, f x = g x) :
    SuperpolynomialDecay l k g

(hf : Asymptotics.SuperpolynomialDecay l k f)


theorem card_sdiff_add_card (s t : Finset α) : (s \ t).card + t.card = (s ∪ t).card

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


@[simp]
theorem core_univ : r.core Set.univ = Set.univ

{α : Type u_1}
{β : Type u_2}
(r : Rel α β)


theorem comp₂ {f : γ → σ} {g : α → β → γ} (hf : Computable f) (hg : Computable₂ g) :
    Computable₂ fun a b => f (g a b)

{α : Type u_1}
{β : Type u_2}
{γ : Type u_3}
{σ : Type u_4}
[Primcodable α]
[Primcodable β]
[Primcodable γ]
[Primcodable σ]
{f : γ → σ}
{g : α → β → γ}
(hf : Computable f)
(hg : Computable₂ g)


@[simp] lemma num_ofNat (n : ℕ) : num (no_index (OfNat.ofNat n)) = OfNat.ofNat n


/-- We can prove two cone points `(s : Cone F).pt` and `(t : Cone G).pt` are isomorphic if
* both cones are limit cones
* their indexing categories are equivalent via some `e : J ≌ K`,
* the triangle of functors commutes up to a natural isomorphism: `e.functor ⋙ G ≅ F`.

This is the most general form of uniqueness of cone points,
allowing relabelling of both the indexing category (up to equivalence)
and the functor (up to natural isomorphism).
-/
@[simps]
def conePointsIsoOfEquivalence {F : J ⥤ C} {s : Cone F} {G : K ⥤ C} {t : Cone G} (P : IsLimit s)
    (Q : IsLimit t) (e : J ≌ K) (w : e.functor ⋙ G ≅ F) : s.pt ≅ t.pt

{J : Type u₁}
[CategoryTheory.Category.{v₁, u₁} J]
{K : Type u₂}
[CategoryTheory.Category.{v₂, u₂} K]
{C : Type u₃}
[CategoryTheory.Category.{v₃, u₃} C]
{F : J ⥤ C}
{s : CategoryTheory.Limits.Cone F}
{G : K ⥤ C}
{t : CategoryTheory.Limits.Cone G}
(P : CategoryTheory.Limits.IsLimit s)
(Q : CategoryTheory.Limits.IsLimit t)
(e : J ≌ K)
(w : e.functor ⋙ G ≅ F)

(P.conePointsIsoOfEquivalence Q e w).inv =
  P.lift ((CategoryTheory.Limits.Cones.equivalenceOfReindexing e w).functor.obj t)


@[simp]
theorem algebraMap_apply (k : R) (a : α) : algebraMap R C(α, A) k a = k • (1 : A)

{α : Type u_1}
[TopologicalSpace α]
{R : Type u_2}
[CommSemiring R]
{A : Type u_3}
[TopologicalSpace A]
[Semiring A]
[Algebra R A]
[TopologicalSemiring A]
(k : R)
(a : α)


@[simp]
theorem intValuationDef_zero : v.intValuationDef 0 = 0

(v : IsDedekindDomain.HeightOneSpectrum R)


@[simp]
theorem mapPath_nil (a : V) : F.mapPath (Path.nil : Path a a) = Path.nil

{V : Type u₁}
[Quiver V]
{W : Type u₂}
[Quiver W]
(F : V ⥤q W)
(a : V)

F.mapPath Quiver.Path.nil = Quiver.Path.nil


theorem eLpNorm_eq_lintegral_rpow_nnnorm (hp_ne_zero : p ≠ 0) (hp_ne_top : p ≠ ∞) {f : α → F} :
    eLpNorm f p μ = (∫⁻ x, (‖f x‖₊ : ℝ≥0∞) ^ p.toReal ∂μ) ^ (1 / p.toReal)

{α : Type u_1}
{F : Type u_3}
{m0 : MeasurableSpace α}
{p : ℝ≥0∞}
{μ : MeasureTheory.Measure α}
[NormedAddCommGroup F]
(hp_ne_zero : p ≠ 0)
(hp_ne_top : p ≠ ⊤)
{f : α → F}

MeasureTheory.eLpNorm f p μ = (∫⁻ (x : α), ↑‖f x‖₊ ^ p.toReal ∂μ) ^ (1 / p.toReal)


/-- Pythagorean theorem, vector angle form. -/
theorem norm_add_sq_eq_norm_sq_add_norm_sq' (x y : V) (h : angle x y = π / 2) :
    ‖x + y‖ * ‖x + y‖ = ‖x‖ * ‖x‖ + ‖y‖ * ‖y‖

(h : InnerProductGeometry.angle x y = π / 2)


@[simp, norm_cast]
theorem coe_pow_unitClosedBall [SeminormedRing 𝕜] [NormOneClass 𝕜] (x : closedBall (0 : 𝕜) 1)
    (n : ℕ) : ↑(x ^ n) = (x : 𝕜) ^ n

{𝕜 : Type u_1}
[SeminormedRing 𝕜]
[NormOneClass 𝕜]
(x : ↑(Metric.closedBall 0 1))
(n : ℕ)


theorem Monic.irreducible_iff_natDegree (hp : p.Monic) :
    Irreducible p ↔
      p ≠ 1 ∧ ∀ f g : R[X], f.Monic → g.Monic → f * g = p → f.natDegree = 0 ∨ g.natDegree = 0

{R : Type u}
[CommSemiring R]
[NoZeroDivisors R]
{p : R[X]}
(hp : p.Monic)

Irreducible p ↔ p ≠ 1 ∧ ∀ (f g : R[X]), f.Monic → g.Monic → f * g = p → f.natDegree = 0 ∨ g.natDegree = 0


theorem cycleType_formPerm (hl : Nodup l) (hn : 2 ≤ l.length) :
    cycleType l.attach.formPerm = {l.length}

{α : Type u_1}
[DecidableEq α]
{l : List α}
(hl : l.Nodup)
(hn : 2 ≤ l.length)


/-- If a product is 1 and the function is 1 except possibly at one
point, it is 1 everywhere on the `Finset`. -/
@[to_additive "If a sum is 0 and the function is 0 except possibly at one
point, it is 0 everywhere on the `Finset`."]
theorem eq_one_of_prod_eq_one {s : Finset α} {f : α → β} {a : α} (hp : ∏ x ∈ s, f x = 1)
    (h1 : ∀ x ∈ s, x ≠ a → f x = 1) : ∀ x ∈ s, f x = 1

{α : Type u_3}
{β : Type u_4}
[CommMonoid β]
{s : Finset α}
{f : α → β}
{a : α}
(hp : ∏ x ∈ s, f x = 1)
(h1 : ∀ x ∈ s, x ≠ a → f x = 1)
(x : α)


theorem disconnect_le : S.disconnect ≤ S

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


/-- `I⁻¹` is the inverse of `I` if `I` has an inverse. -/
theorem right_inverse_eq (I J : FractionalIdeal R₁⁰ K) (h : I * J = 1) : J = I⁻¹

(K : Type u_3)
[Field K]
{R₁ : Type u_4}
[CommRing R₁]
[IsDomain R₁]
[Algebra R₁ K]
[IsFractionRing R₁ K]
(I J : FractionalIdeal R₁⁰ K)
(h : I * J = 1)


theorem Integrable.sub {f g : α → β} (hf : Integrable f μ) (hg : Integrable g μ) :
    Integrable (f - g) μ

{α : Type u_1}
{β : Type u_2}
{m : MeasurableSpace α}
{μ : MeasureTheory.Measure α}
[NormedAddCommGroup β]
{f g : α → β}
(hf : MeasureTheory.Integrable f μ)
(hg : MeasureTheory.Integrable g μ)


/-- The functor which sends a sheaf of modules to its type of sections. -/
@[simps]
def sectionsFunctor : SheafOfModules.{v} R ⥤ Type _

{J : CategoryTheory.GrothendieckTopology C}

(SheafOfModules.sectionsFunctor R).obj M = M.sections


@[simp] lemma card_compls : sᶜˢ.card = s.card

{α : Type u_2}
[BooleanAlgebra α]
(s : Finset α)


@[simp]
theorem comp_inj (h : N ↪[L] P) (f g : M ↪[L] N) : h.comp f = h.comp g ↔ f = g

{L : FirstOrder.Language}
{M : Type w}
{N : Type w'}
[L.Structure M]
[L.Structure N]
{P : Type u_1}
[L.Structure P]
(h : L.Embedding N P)
(f g : L.Embedding M N)


/-- The `Field.finSepDegree F E` is equal to the cardinality of `E →ₐ[F] K`
if `E = F(S)` such that every element
`s` of `S` is integral (= algebraic) over `F` and whose minimal polynomial splits in `K`. -/
theorem finSepDegree_eq_of_adjoin_splits {S : Set E} (hS : adjoin F S = ⊤)
    (hK : ∀ s ∈ S, IsIntegral F s ∧ Splits (algebraMap F K) (minpoly F s)) :
    finSepDegree F E = Nat.card (E →ₐ[F] K)

(hK : ∀ s ∈ S, IsIntegral F s ∧ Polynomial.Splits (algebraMap F K) (minpoly F s))

Field.finSepDegree F E = Nat.card (E →ₐ[F] K)


@[to_additive (attr := simp, norm_cast)]
theorem coe_mul (s t : Finset α) : (↑(s * t) : Set α) = ↑s * ↑t

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


lemma imaginaryPart_surjective : Function.Surjective (imaginaryPart (A := A))

{A : Type u_1}
[AddCommGroup A]
[Module ℂ A]
[StarAddMonoid A]
[StarModule ℂ A]


lemma toFiniteAux_univ_le_one (μ : Measure α) [SFinite μ] : μ.toFiniteAux Set.univ ≤ 1

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


/-- The functor `LightCondSet ⥤ TopCat`  -/
@[simps]
def _root_.lightCondSetToTopCat : LightCondSet.{u} ⥤ TopCat.{u}

∀ {X Y : LightCondSet} (f : X ⟶ Y), lightCondSetToTopCat.map f = LightCondSet.toTopCatMap f


@[simp]
theorem not_empty_hom (x : ZFSet.{u}) : ¬(∅ : Class.{u}) x


@[to_additive]
theorem union_mul : (s₁ ∪ s₂) * t = s₁ * t ∪ s₂ * t

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


theorem fderiv.comp {g : F → G} (hg : DifferentiableAt 𝕜 g (f x)) (hf : DifferentiableAt 𝕜 f x) :
    fderiv 𝕜 (g ∘ f) x = (fderiv 𝕜 g (f x)).comp (fderiv 𝕜 f 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 → F}
(x : E)
{g : F → G}
(hg : DifferentiableAt 𝕜 g (f x))
(hf : DifferentiableAt 𝕜 f x)


@[aesop (rule_sets := [builtin]) norm simp]
theorem heq_iff_eq (x y : α) : HEq x y ↔ x = y


/-- If `𝒰` is an open cover of a scheme `X`, then `X` is locally noetherian if and only if
`𝒰.obj i` are all locally noetherian. -/
theorem isLocallyNoetherian_iff_openCover (𝒰 : Scheme.OpenCover X) :
    IsLocallyNoetherian X ↔ ∀ (i : 𝒰.J), IsLocallyNoetherian (𝒰.obj i)

{X : AlgebraicGeometry.Scheme}
(𝒰 : X.OpenCover)

AlgebraicGeometry.IsLocallyNoetherian X ↔ ∀ (i : 𝒰.J), AlgebraicGeometry.IsLocallyNoetherian (𝒰.obj i)


protected theorem MemBaseSet.unionComplToSubordinate (hπ₁ : l.MemBaseSet I c r₁ π₁)
    (hle : ∀ x ∈ Box.Icc I, r₂ x ≤ r₁ x) {π₂ : Prepartition I} (hU : π₂.iUnion = ↑I \ π₁.iUnion)
    (hc : l.bDistortion → π₂.distortion ≤ c) :
    l.MemBaseSet I c r₁ (π₁.unionComplToSubordinate π₂ hU r₂)

(hle : ∀ x ∈ BoxIntegral.Box.Icc I, r₂ x ≤ r₁ x)

(hc : l.bDistortion = true → π₂.distortion ≤ c)


/-- If `C` has an initial object such that every morphism *to* it is an isomorphism, then `C`
has strict initial objects. -/
theorem hasStrictInitialObjects_of_initial_is_strict [HasInitial C]
    (h : ∀ (A) (f : A ⟶ ⊥_ C), IsIso f) : HasStrictInitialObjects C

(h : ∀ (A : C) (f : A ⟶ ⊥_ C), CategoryTheory.IsIso f)


/-- The `ts` argument to `permutationsAux2` can be folded into the `f` argument. -/
theorem permutationsAux2_comp_append {t : α} {ts ys : List α} {r : List β} (f : List α → β) :
    ((permutationsAux2 t [] r ys) fun x => f (x ++ ts)).2 = (permutationsAux2 t ts r ys f).2

{α : Type u_1}
{β : Type u_2}
{t : α}
{ts ys : List α}
{r : List β}
(f : List α → β)

(List.permutationsAux2 t [] r ys fun x => f (x ++ ts)).2 = (List.permutationsAux2 t ts r ys f).2


@[reassoc]
theorem δ_comp_σ_succ' {n} {j : Fin (n + 2)} {i : Fin (n + 1)} (H : j = i.succ) :
    X.σ i ≫ X.δ j = 𝟙 _

{C : Type u}
[CategoryTheory.Category.{v, u} C]
(X : CategoryTheory.SimplicialObject C)
{n : ℕ}
{j : Fin (n + 2)}
{i : Fin (n + 1)}
(H : j = i.succ)

X.σ i ≫ X.δ j = 𝟙 (X.obj (Opposite.op (SimplexCategory.mk n)))


@[to_additive]
theorem inv_lt_div_iff_lt_mul' : b⁻¹ < a / c ↔ c < a * b

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


/-- A homology data for a short complex `S` induces a homology data for `S.op`. -/
@[simps]
def op (h : S.HomologyData) : S.op.HomologyData


@[simp] theorem toList_some (a : α) : (a : Option α).toList = [a]


@[reassoc (attr := simp)]
lemma LeftHomologyData.lift_K_comp_cyclesIso_inv :
    h.liftK k hk ≫ h.cyclesIso.inv = S.liftCycles k hk

(hk : CategoryTheory.CategoryStruct.comp k S.g = 0)

CategoryTheory.CategoryStruct.comp (h.liftK k hk) h.cyclesIso.inv = S.liftCycles k hk


@[simp]
theorem inv_bot : (⊥ : Rel α β).inv = (⊥ : Rel β α)


@[simp]
theorem Prime.squarefree [CancelCommMonoidWithZero R] {x : R} (h : Prime x) : Squarefree x

{R : Type u_1}
[CancelCommMonoidWithZero R]
{x : R}
(h : Prime x)


@[simp]
theorem hasDerivWithinAt_derivWithin_iff :
    HasDerivWithinAt f (derivWithin f s x) s x ↔ DifferentiableWithinAt 𝕜 f s x

{𝕜 : Type u}
[NontriviallyNormedField 𝕜]
{F : Type v}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{f : 𝕜 → F}
{x : 𝕜}
{s : Set 𝕜}


/-- Consider a real set `s`. If a property is true almost everywhere in `s ∩ (a, b)` for
all `a, b ∈ s`, then it is true almost everywhere in `s`. Formulated with `μ.restrict`.
See also `ae_of_mem_of_ae_of_mem_inter_Ioo`. -/
theorem ae_restrict_of_ae_restrict_inter_Ioo {μ : Measure ℝ} [NoAtoms μ] {s : Set ℝ} {p : ℝ → Prop}
    (h : ∀ a b, a ∈ s → b ∈ s → a < b → ∀ᵐ x ∂μ.restrict (s ∩ Ioo a b), p x) :
    ∀ᵐ x ∂μ.restrict s, p x

(h : ∀ (a b : ℝ), a ∈ s → b ∈ s → a < b → ∀ᵐ (x : ℝ) ∂μ.restrict (s ∩ Set.Ioo a b), p x)


@[to_additive]
theorem hasProd_empty [IsEmpty β] : HasProd f 1

{α : Type u_1}
{β : Type u_2}
[CommMonoid α]
[TopologicalSpace α]
{f : β → α}
[IsEmpty β]


protected theorem one_mul : ∀ x : EReal, 1 * x = x


@[simp]
theorem cos_pi_div_four : cos (π / 4) = √2 / 2


@[simp]
lemma forall_subset_image_iff {p : Set β → Prop} : (∀ t ⊆ f '' s, p t) ↔ ∀ t ⊆ s, p (f '' t)

{α : Type u_1}
{β : Type u_2}
{f : α → β}
{s : Set α}
{p : Set β → Prop}


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

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

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

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

Nat.recDiag zero_zero zero_succ succ_zero succ_succ (m + 1) (n + 1) =
  succ_succ m n (Nat.recDiag zero_zero zero_succ succ_zero succ_succ m n)


/-- A special case of `CategoryTheory.Limits.cokernel.map_desc` adapted to `explicitCokernel`. -/
theorem ExplicitCoker.map_desc {A B C D B' D' : SemiNormedGrp.{u}}
    {fab : A ⟶ B} {fbd : B ⟶ D} {fac : A ⟶ C} {fcd : C ⟶ D} {h : fab ≫ fbd = fac ≫ fcd}
    {fbb' : B ⟶ B'} {fdd' : D ⟶ D'} {condb : fab ≫ fbb' = 0} {condd : fcd ≫ fdd' = 0} {g : B' ⟶ D'}
    (h' : fbb' ≫ g = fbd ≫ fdd') :
    explicitCokernelDesc condb ≫ g = explicitCokernel.map h ≫ explicitCokernelDesc condd

{A B C D B' D' : SemiNormedGrp}
{fab : A ⟶ B}
{fbd : B ⟶ D}
{fac : A ⟶ C}
{fcd : C ⟶ D}
{h : fab ≫ fbd = fac ≫ fcd}
{fbb' : B ⟶ B'}
{fdd' : D ⟶ D'}
{condb : fab ≫ fbb' = 0}
{condd : fcd ≫ fdd' = 0}
{g : B' ⟶ D'}
(h' : fbb' ≫ g = fbd ≫ fdd')

SemiNormedGrp.explicitCokernelDesc condb ≫ g =
  SemiNormedGrp.explicitCokernel.map h ≫ SemiNormedGrp.explicitCokernelDesc condd


/--
Cones over `diagram U ⋙ F` are the same as a cones over the usual sheaf condition equalizer diagram.
-/
@[simps]
def coneEquiv :
    Limits.Cone ((diagram U).op ⋙ F) ≌
      Limits.Cone (SheafConditionEqualizerProducts.diagram F U)

{C : Type u}
[CategoryTheory.Category.{v, u} C]
[CategoryTheory.Limits.HasProducts C]
{X : TopCat}
(F : TopCat.Presheaf C X)
{ι : Type v'}
(U : ι → TopologicalSpace.Opens ↑X)

(TopCat.Presheaf.SheafConditionPairwiseIntersections.coneEquiv F U).unitIso =
  TopCat.Presheaf.SheafConditionPairwiseIntersections.coneEquivUnitIso F U


/-- Symmetric statement to `Filter.map_map₂_antidistrib_left`. -/
theorem map₂_map_left_anticomm {m : α' → β → γ} {n : α → α'} {m' : β → α → δ} {n' : δ → γ}
    (h_left_anticomm : ∀ a b, m (n a) b = n' (m' b a)) :
    map₂ m (f.map n) g = (map₂ m' g f).map n'

{m : α' → β → γ}

{m' : β → α → δ}

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

Filter.map₂ m (Filter.map n f) g = Filter.map n' (Filter.map₂ m' g f)


@[to_additive]
theorem ofMulEquivOfLocalizations_comp {k : N ≃* P} {j : P ≃* Q} :
    (f.ofMulEquivOfLocalizations (k.trans j)).toMap =
      j.toMonoidHom.comp (f.ofMulEquivOfLocalizations k).toMap

{M : Type u_1}
[AddCommMonoid M]
{S : AddSubmonoid M}
{N : Type u_2}
[AddCommMonoid N]
{P : Type u_3}
[AddCommMonoid P]
(f : S.LocalizationMap N)
{Q : Type u_4}
[AddCommMonoid Q]
{k : N ≃+ P}
{j : P ≃+ Q}

(f.ofAddEquivOfLocalizations (k.trans j)).toMap = j.toAddMonoidHom.comp (f.ofAddEquivOfLocalizations k).toMap


theorem mem_upperBounds_image2_of_mem_upperBounds_of_mem_lowerBounds (ha : a ∈ upperBounds s)
    (hb : b ∈ lowerBounds t) : f a b ∈ upperBounds (image2 f s t)

{f : α → β → γ}

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


theorem union_mem_nhdsSet (h₁ : s₁ ∈ 𝓝ˢ t₁) (h₂ : s₂ ∈ 𝓝ˢ t₂) : s₁ ∪ s₂ ∈ 𝓝ˢ (t₁ ∪ t₂)

{X : Type u_1}
[TopologicalSpace X]
{s₁ s₂ t₁ t₂ : Set X}
(h₁ : s₁ ∈ 𝓝ˢ t₁)
(h₂ : s₂ ∈ 𝓝ˢ t₂)

s₁ ∪ s₂ ∈ 𝓝ˢ (t₁ ∪ t₂)


/-- The type of `A`-graded natural transformations between `V`-functors `F` and `G`.
This is the type of morphisms in `V` from `A` to the `V`-object of natural transformations.
-/
@[ext]
structure GradedNatTrans (A : Center V) (F G : EnrichedFunctor V C D) where
  app : ∀ X : C, A.1 ⟶ F.obj X ⟶[V] G.obj X
  naturality :
    ∀ X Y : C,
      (A.2.β (X ⟶[V] Y)).hom ≫ (F.map X Y ⊗ app Y) ≫ eComp V _ _ _ =
        (app X ⊗ G.map X Y) ≫ eComp V _ _ _

{F G : CategoryTheory.EnrichedFunctor V C D}

(self : CategoryTheory.GradedNatTrans A F G)

CategoryTheory.CategoryStruct.comp (A.snd.β (CategoryTheory.EnrichedCategory.Hom X Y)).hom
    (CategoryTheory.CategoryStruct.comp (CategoryTheory.MonoidalCategory.tensorHom (F.map X Y) (self.app Y))
      (CategoryTheory.eComp V (F.obj X) (F.obj Y) (G.obj Y))) =
  CategoryTheory.CategoryStruct.comp (CategoryTheory.MonoidalCategory.tensorHom (self.app X) (G.map X Y))
    (CategoryTheory.eComp V (F.obj X) (G.obj X) (G.obj Y))


theorem Left.neg_of_mul_neg_right [PosMulMono α] (h : a * b < 0) (a0 : 0 ≤ a) : b < 0

{α : Type u_1}
{a b : α}
[MulZeroClass α]
[LinearOrder α]
[PosMulMono α]
(h : a * b < 0)
(a0 : 0 ≤ a)


theorem pmap_map {p : β → Prop} (g : ∀ b, p b → γ) (f : α → β) (l H) :
    pmap g (map f l) H = pmap (fun a h => g (f a) h) l fun a h => H _ (mem_map_of_mem _ h)

{α : Type u}
{β : Type v}
{γ : Type w}
{p : β → Prop}
(g : (b : β) → p b → γ)
(f : α → β)
(l : List α)
(H : ∀ (a : β), a ∈ List.map f l → p a)

List.pmap g (List.map f l) H = List.pmap (fun a h => g (f a) h) l ⋯


theorem Cofix.ext_mk {α : TypeVec n} (x y : F (α ::: Cofix F α)) (h : Cofix.mk x = Cofix.mk y) :
    x = y

(h : MvQPF.Cofix.mk x = MvQPF.Cofix.mk y)


theorem norm_indicatorConstLp' (hp_pos : p ≠ 0) (hμs_pos : μ s ≠ 0) :
    ‖indicatorConstLp p hs hμs c‖ = ‖c‖ * (μ s).toReal ^ (1 / p.toReal)

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

‖MeasureTheory.indicatorConstLp p hs hμs c‖ = ‖c‖ * (μ s).toReal ^ (1 / p.toReal)


@[simp] theorem add_emod_emod (m n k : Int) : (m + n % k) % k = (m + n) % k


lemma mem_smoothNumbers {n m : ℕ} : m ∈ smoothNumbers n ↔ m ≠ 0 ∧ ∀ p ∈ primeFactorsList m, p < n

m ∈ n.smoothNumbers ↔ m ≠ 0 ∧ ∀ p ∈ m.primeFactorsList, p < n


@[mono]
theorem ωSup_le_ωSup_of_le {c₀ c₁ : Chain α} (h : c₀ ≤ c₁) : ωSup c₀ ≤ ωSup c₁

{c₀ c₁ : OmegaCompletePartialOrder.Chain α}

OmegaCompletePartialOrder.ωSup c₀ ≤ OmegaCompletePartialOrder.ωSup c₁


@[simp]
theorem isPredLimit_toDual_iff : IsPredLimit (toDual a) ↔ IsSuccLimit a

Order.IsPredLimit (OrderDual.toDual a) ↔ Order.IsSuccLimit a


theorem to_part {n f} (pf : @Partrec' n f) : _root_.Partrec f

{n : ℕ}
{f : Mathlib.Vector ℕ n →. ℕ}
(pf : Nat.Partrec' f)


/-- The infimum of a set of congruence relations is the same as the infimum of the set's image
    under the map to the underlying binary relation. -/
@[to_additive (attr := simp, norm_cast)
  "The infimum of a set of additive congruence relations is the same as the infimum
  of the set's image under the map to the underlying binary relation."]
theorem coe_sInf (S : Set (Con M)) :
    ⇑(sInf S) = sInf ((⇑) '' S)

{M : Type u_1}
[Mul M]
(S : Set (Con M))


@[simp, norm_cast] lemma coe_addHom : ⇑(addHom : α →+ WithBot α) = WithBot.some


lemma YClass_ne_zero [Nontrivial R] (y : R[X]) : YClass W y ≠ 0

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

WeierstrassCurve.Affine.CoordinateRing.YClass W y ≠ 0


theorem liftCover_of_mem {i : ι} {x : α} (hx : (x : α) ∈ S i) :
    liftCover S f hf hS x = f i ⟨x, hx⟩

{hf : ∀ (i j : ι) (x : α) (hxi : x ∈ S i) (hxj : x ∈ S j), f i ⟨x, hxi⟩ = f j ⟨x, hxj⟩}


@[simp]
theorem toCotangent_to_quotient_square (x : I) :
    I.cotangentToQuotientSquare (I.toCotangent x) = (I ^ 2).mkQ x

{R : Type u}
[CommRing R]
(I : Ideal R)
(x : ↥I)

I.cotangentToQuotientSquare (I.toCotangent x) = (Submodule.mkQ (I ^ 2)) ↑x


@[simp] theorem length_one : ℓ (1 : W) = 0

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


theorem pos_iff_one_le {x : PartENat} : 0 < x ↔ 1 ≤ x


theorem lowerSemicontinuousAt_iSup {f : ι → α → δ} (h : ∀ i, LowerSemicontinuousAt (f i) x) :
    LowerSemicontinuousAt (fun x' => ⨆ i, f i x') x

{f : ι → α → δ}

(h : ∀ (i : ι), LowerSemicontinuousAt (f i) x)