theorem inf_le_left {A : C} (f g : Subobject A) : (inf.obj f).obj g ≤ f

{C : Type u₁}
[CategoryTheory.Category.{v₁, u₁} C]
[CategoryTheory.Limits.HasPullbacks C]
{A : C}
(f g : CategoryTheory.Subobject A)

(CategoryTheory.Subobject.inf.obj f).obj g ≤ f


theorem Pairwise.sublists' {R} :
    ∀ {l : List α}, Pairwise R l → Pairwise (Lex (swap R)) (sublists' l)

{α : Type u}
{R : α → α → Prop}
{l : List α}

List.Pairwise R l → List.Pairwise (List.Lex (Function.swap R)) l.sublists'


theorem Finite.encard_eq_coe (h : s.Finite) : s.encard = ENat.toNat s.encard

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


@[simp] theorem true_or (p : Prop) : (True ∨ p) = True


private lemma natDegree_coeff_preΨ' (n : ℕ) :
    (W.preΨ' n).natDegree ≤ expDegree n ∧ (W.preΨ' n).coeff (expDegree n) = expCoeff n

{R : Type u}
[CommRing R]
(W : WeierstrassCurve R)
(n : ℕ)

(W.preΨ' n).natDegree ≤ WeierstrassCurve.expDegree n ∧
  (W.preΨ' n).coeff (WeierstrassCurve.expDegree n) = ↑(WeierstrassCurve.expCoeff n)


theorem symm_bijective [Module R M] [Module S M₂] [RingHomInvPair σ' σ] [RingHomInvPair σ σ'] :
    Function.Bijective (symm : (M ≃ₛₗ[σ] M₂) → M₂ ≃ₛₗ[σ'] M)

{R : Type u_1}
{S : Type u_7}
{M : Type u_8}
{M₂ : Type u_10}
[Semiring R]
[Semiring S]
[AddCommMonoid M]
[AddCommMonoid M₂]
{σ : R →+* S}
{σ' : S →+* R}
[Module R M]
[Module S M₂]
[RingHomInvPair σ' σ]
[RingHomInvPair σ σ']


@[simp]
theorem mul_div_cancel (a) {b : Ordinal} (b0 : b ≠ 0) : b * a / b = a

(a : Ordinal.{u_4})
{b : Ordinal.{u_4}}
(b0 : b ≠ 0)


/-- `CliffordAlgebra.involute` is analogous to `Complex.conj`. -/
@[simp]
theorem toComplex_involute (c : CliffordAlgebra Q) :
    toComplex (involute c) = conj (toComplex c)

(c : CliffordAlgebra CliffordAlgebraComplex.Q)

CliffordAlgebraComplex.toComplex (CliffordAlgebra.involute c) = (starRingEnd ℂ) (CliffordAlgebraComplex.toComplex c)


/-- The functor lifting a braided category to its center, using the braiding as the half-braiding.
-/
@[simps]
def ofBraided : MonoidalFunctor C (Center C)

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

(CategoryTheory.Center.ofBraided C).ε.f = 𝟙 (𝟙_ (CategoryTheory.Center C)).fst


theorem card_eq_nrRealPlaces_add_nrComplexPlaces :
    Fintype.card (InfinitePlace K) = NrRealPlaces K + NrComplexPlaces K

(K : Type u_2)
[Field K]
[NumberField K]

Fintype.card (NumberField.InfinitePlace K) =
  NumberField.InfinitePlace.NrRealPlaces K + NumberField.InfinitePlace.NrComplexPlaces K


@[deprecated get_insertNth_of_lt (since := "2023-01-05")]
theorem nthLe_insertNth_of_lt : ∀ (l : List α) (x : α) (n k : ℕ), k < n → ∀ (hk : k < l.length)
    (hk' : k < (insertNth n x l).length := hk.trans_le (length_le_length_insertNth _ _ _)),
    (insertNth n x l).nthLe k hk' = l.nthLe k hk

{α : Type u}
(l : List α)
(x : α)
(n k : ℕ)

k < n →
  ∀ (hk : k < l.length) (hk' : optParam (k < (List.insertNth n x l).length) ⋯),
    (List.insertNth n x l).nthLe k hk' = l.nthLe k hk


theorem lineMap_vadd (v v' : V₁) (p : P₁) (c : k) :
    lineMap v v' c +ᵥ p = lineMap (v +ᵥ p) (v' +ᵥ p) c

{k : Type u_1}
{P₁ : Type u_2}
{V₁ : Type u_6}
[Ring k]
[AddCommGroup V₁]
[Module k V₁]
[AffineSpace V₁ P₁]
(v v' : V₁)
(p : P₁)
(c : k)

(AffineMap.lineMap v v') c +ᵥ p = (AffineMap.lineMap (v +ᵥ p) (v' +ᵥ p)) c


@[simp]
theorem mapEmbedding_apply : mapEmbedding f s = map f s

{α : Type u_1}
{β : Type u_2}
{f : α ↪ β}
{s : Finset α}

(Finset.mapEmbedding f) s = Finset.map f s


@[simp] theorem ofBdd_indep (E : Set α) Indep indep_empty indep_subset indep_aug
    subset_ground h_bdd : (IndepMatroid.ofBdd
      E Indep indep_empty indep_subset indep_aug subset_ground h_bdd).Indep = Indep

(indep_subset : ∀ ⦃I J : Set α⦄, Indep J → I ⊆ J → Indep I)

(indep_aug :
  ∀ ⦃I B : Set α⦄,
    Indep I →
      I ∉ maximals (fun x x_1 => x ⊆ x_1) {I | Indep I} →
        B ∈ maximals (fun x x_1 => x ⊆ x_1) {I | Indep I} → ∃ x ∈ B \ I, Indep (insert x I))

(subset_ground : ∀ (I : Set α), Indep I → I ⊆ E)

(h_bdd : ∃ n, ∀ (I : Set α), Indep I → I.encard ≤ ↑n)


theorem coe_algEquiv_lpBCF_symm (f : α →ᵇ A) : ((AlgEquiv.lpBCF α A 𝕜).symm f : α → A) = f

{α : Type u_1}
{A : Type u_4}
{𝕜 : Type u_5}
[TopologicalSpace α]
[DiscreteTopology α]
[NormedRing A]
[NormOneClass A]
[NontriviallyNormedField 𝕜]
[NormedAlgebra 𝕜 A]
(f : BoundedContinuousFunction α A)


theorem norm_lt_iff_of_nonempty [Nonempty α] {M : ℝ} : ‖f‖ < M ↔ ∀ x, ‖f x‖ < M

{α : Type u_1}
{E : Type u_3}
[TopologicalSpace α]
[CompactSpace α]
[NormedAddCommGroup E]
(f : C(α, E))
[Nonempty α]
{M : ℝ}


@[simp] theorem toZeroAtInfty_toBCF (f : 𝓢(E, F)) :
    f.toZeroAtInfty.toBCF = f.toBoundedContinuousFunction

{E : Type u_4}
{F : Type u_5}
[NormedAddCommGroup E]
[NormedSpace ℝ E]
[NormedAddCommGroup F]
[NormedSpace ℝ F]
[ProperSpace E]
(f : SchwartzMap E F)


theorem infinitePos_iff_infinite_of_pos {x : ℝ*} (hp : 0 < x) : InfinitePos x ↔ Infinite x


theorem PrimrecPred.comp {p : β → Prop} [DecidablePred p] {f : α → β} :
    PrimrecPred p → Primrec f → PrimrecPred fun a => p (f a)

{α : Type u_1}
{β : Type u_2}
[Primcodable α]
[Primcodable β]
{p : β → Prop}
[DecidablePred p]
{f : α → β}


theorem iInf_and {p q : Prop} {s : p ∧ q → α} : iInf s = ⨅ (h₁) (h₂), s ⟨h₁, h₂⟩

{α : Type u_1}
[CompleteLattice α]
{p q : Prop}
{s : p ∧ q → α}


lemma coborder_preimage (hf : IsOpenMap f) (hf' : Continuous f) (s : Set Y) :
    coborder (f ⁻¹' s) = f ⁻¹' (coborder s)

{X : Type u_1}
{Y : Type u_2}
[TopologicalSpace X]
[TopologicalSpace Y]
{f : X → Y}
(hf : IsOpenMap f)
(hf' : Continuous f)
(s : Set Y)


@[to_additive]
lemma ofUnits_iSup {ι : Sort*} {f : ι → Subgroup Mˣ} :
    (iSup f).ofUnits = ⨆ (i : ι), (f i).ofUnits

{M : Type u_1}
[AddMonoid M]
{ι : Sort u_2}
{f : ι → AddSubgroup (AddUnits M)}

(iSup f).ofAddUnits = ⨆ i, (f i).ofAddUnits


@[simp] lemma val_covBy_val : s.1 ⋖ t.1 ↔ s ⋖ t


/-- **Stirling's Formula** -/
theorem tendsto_stirlingSeq_sqrt_pi : Tendsto stirlingSeq atTop (𝓝 (√π))

Filter.Tendsto Stirling.stirlingSeq Filter.atTop (𝓝 √π)


/-- The preimage of a substructure along a homomorphism is a substructure. -/
@[simps]
def comap (φ : M →[L] N) (S : L.Substructure N) : L.Substructure M

{L : FirstOrder.Language}
{M : Type w}
{N : Type u_1}
[L.Structure M]
[L.Structure N]
(φ : L.Hom M N)
(S : L.Substructure N)

↑(FirstOrder.Language.Substructure.comap φ S) = ⇑φ ⁻¹' ↑S


theorem toFun_eq_coe {f : α →CO β} : f.toFun = (f : α → β)

{α : Type u_2}
{β : Type u_3}
[TopologicalSpace α]
[TopologicalSpace β]
{f : α →CO β}


theorem transReflReparamAux_one : transReflReparamAux 1 = 1


@[to_additive (attr := simp)]
lemma smul_assoc {M N} [SMul M N] [SMul N α] [SMul M α] [IsScalarTower M N α] (x : M) (y : N)
    (z : α) : (x • y) • z = x • y • z

{α : Type u_7}
{M : Type u_11}
{N : Type u_12}
[SMul M N]
[SMul N α]
[SMul M α]
[IsScalarTower M N α]
(x : M)
(y : N)
(z : α)


@[reassoc]
theorem hom_comp_map_image_ι {X Y : A} (f : X ⟶ Y) :
    (iso L f).hom ≫ L.map (image.ι f) = image.ι (L.map f)

[{X Y Z : A} → (f : X ⟶ Z) → (g : Y ⟶ Z) → CategoryTheory.Limits.PreservesLimit (CategoryTheory.Limits.cospan f g) L]

[{X Y Z : A} → (f : X ⟶ Y) → (g : X ⟶ Z) → CategoryTheory.Limits.PreservesColimit (CategoryTheory.Limits.span f g) L]

CategoryTheory.CategoryStruct.comp (CategoryTheory.PreservesImage.iso L f).hom
    (L.map (CategoryTheory.Limits.image.ι f)) =
  CategoryTheory.Limits.image.ι (L.map f)


@[simp]
theorem lflip_apply (m : M) (n : N) : lflip f n m = f m n

{R : Type u_1}
[CommSemiring R]
{R₂ : Type u_2}
[CommSemiring R₂]
{R₃ : Type u_3}
[CommSemiring R₃]
{M : Type u_5}
{N : Type u_6}
{P : Type u_7}
[AddCommMonoid M]
[AddCommMonoid N]
[AddCommMonoid P]
[Module R M]
[Module R₂ N]
[Module R₃ P]
{σ₂₃ : R₂ →+* R₃}
{σ₁₃ : R →+* R₃}
(f : M →ₛₗ[σ₁₃] N →ₛₗ[σ₂₃] P)
(m : M)
(n : N)


@[simp, norm_cast]
theorem coe_eq_coe {x y : p} : (x : B) = y ↔ x = y

{A : Type u_1}
{B : Type u_2}
[i : SetLike A B]
{p : A}
{x y : ↥p}


@[simp]
theorem clog_one_left (n : ℕ) : clog 1 n = 0


@[simp]
theorem walkingParallelPairHom_id (X : WalkingParallelPair) : WalkingParallelPairHom.id X = 𝟙 X

CategoryTheory.Limits.WalkingParallelPairHom.id X = CategoryTheory.CategoryStruct.id X


/-- If `L` is a finite separable extension of `K = Frac(A)`, where `A` is a principal ring
and `L` has no zero smul divisors by `A`, the `A`-rank of the integral closure `C` of `A` in `L`
is equal to the `K`-rank of `L`. -/
theorem IsIntegralClosure.rank [IsPrincipalIdealRing A] [NoZeroSMulDivisors A L] :
    FiniteDimensional.finrank A C = FiniteDimensional.finrank K L

(A : Type u_2)
(K : Type u_3)
[CommRing A]
[Field K]
[IsDomain A]
[Algebra A K]
[IsFractionRing A K]
(L : Type u_4)
[Field L]
(C : Type u_5)
[CommRing C]
[Algebra K L]
[Algebra A L]
[IsScalarTower A K L]
[Algebra C L]
[IsIntegralClosure C A L]
[Algebra A C]
[IsScalarTower A C L]
[FiniteDimensional K L]
[Algebra.IsSeparable K L]
[IsPrincipalIdealRing A]
[NoZeroSMulDivisors A L]


theorem nonempty_iff : Nonempty (T.CompleteType α) ↔ T.IsSatisfiable

{L : FirstOrder.Language}
{T : L.Theory}
{α : Type w}


theorem implicitToPartialHomeomorphOfComplemented_apply (hf : HasStrictFDerivAt f f' a)
    (hf' : range f' = ⊤) (hker : (ker f').ClosedComplemented) (y : E) :
    hf.implicitToPartialHomeomorphOfComplemented f f' hf' hker y =
      (f y, Classical.choose hker (y - a))

(hker : (LinearMap.ker f').ClosedComplemented)

↑(HasStrictFDerivAt.implicitToPartialHomeomorphOfComplemented f f' hf hf' hker) y =
  (f y, (Classical.choose hker) (y - a))


@[simp]
theorem coe_toConvexCone (S : Submodule 𝕜 E) : ↑S.toConvexCone = (S : Set E)

{𝕜 : Type u_1}
{E : Type u_2}
[OrderedSemiring 𝕜]
[AddCommMonoid E]
[Module 𝕜 E]
(S : Submodule 𝕜 E)


theorem coe_powers (x : M) : ↑(powers x) = Set.range fun n : ℕ => x ^ n

↑(Submonoid.powers x) = Set.range fun n => x ^ n


theorem Coprime.pow_left (n : Nat) (H1 : Coprime m k) : Coprime (m ^ n) k

{m k : Nat}
(n : Nat)
(H1 : m.Coprime k)


@[simp]
theorem model_union_iff {T' : L.Theory} : M ⊨ T ∪ T' ↔ M ⊨ T ∧ M ⊨ T'

{L : FirstOrder.Language}
{M : Type w}
[L.Structure M]
{T T' : L.Theory}


@[simp]
theorem trans_one : e.trans (1 : E₂ ≃ₗᵢ[R₂] E₂) = e

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


private theorem extensionOfMax_adjoin.aux1 {y : N} (x : supExtensionOfMaxSingleton i f y) :
    ∃ (a : (extensionOfMax i f).domain) (b : R), x.1 = a.1 + b • y

(x : ↥(Module.Baer.supExtensionOfMaxSingleton i f y))


theorem InfiniteNeg.lt_zero {x : ℝ*} : InfiniteNeg x → x < 0


theorem finrank_eq_zero_of_not_exists_basis_finset (h : ¬∃ s : Finset M, Nonempty (Basis s R M)) :
    finrank R M = 0

(h : ¬∃ s, Nonempty (Basis { x // x ∈ s } R M))


@[simp]
theorem toIso_hom {e : X ≃ Y} : e.toIso.hom = e


@[simp]
theorem comp_apply (f : β →Co γ) (g : α →Co β) (a : α) : (f.comp g) a = f (g a)

{α : Type u_2}
{β : Type u_3}
{γ : Type u_4}
[TopologicalSpace α]
[Preorder α]
[TopologicalSpace β]
[Preorder β]
[TopologicalSpace γ]
[Preorder γ]
(f : β →Co γ)
(g : α →Co β)
(a : α)


theorem Prod.right_inv {x : B × F₁ × F₂}
    (h : x ∈ (e₁.baseSet ∩ e₂.baseSet) ×ˢ (univ : Set (F₁ × F₂))) :
    Prod.toFun' e₁ e₂ (Prod.invFun' e₁ e₂ x) = x

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

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

{e₁ : Trivialization F₁ Bundle.TotalSpace.proj}

{e₂ : Trivialization F₂ Bundle.TotalSpace.proj}

(h : x ∈ (e₁.baseSet ∩ e₂.baseSet) ×ˢ Set.univ)

Trivialization.Prod.toFun' e₁ e₂ (Trivialization.Prod.invFun' e₁ e₂ x) = x


/-- This breaks a list of `m*n` items into `n` groups each containing `m` elements. -/
theorem ofFn_mul' {m n} (f : Fin (m * n) → α) :
    List.ofFn f = List.join (List.ofFn fun i : Fin n => List.ofFn fun j : Fin m => f ⟨m * i + j,
    calc
      m * i + j < m * (i + 1) :=
        (Nat.add_lt_add_left j.prop _).trans_eq (by rw [Nat.mul_add, Nat.mul_one])
      _ ≤ _ := Nat.mul_le_mul_left _ i.prop⟩)

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

List.ofFn f = (List.ofFn fun i => List.ofFn fun j => f ⟨m * ↑i + ↑j, ⋯⟩).join


/-- Inversion as a measurable automorphism of a group or group with zero. -/
@[to_additive (attr := simps! (config := .asFn) toEquiv apply)
    "Negation as a measurable automorphism of an additive group."]
def inv (G) [MeasurableSpace G] [InvolutiveInv G] [MeasurableInv G] : G ≃ᵐ G

(G : Type u_4)
[MeasurableSpace G]
[InvolutiveNeg G]
[MeasurableNeg G]


/-- A normed group is an additive group endowed with a norm for which `dist x y = ‖x - y‖` defines a
metric space structure. -/
class NormedAddGroup (E : Type*) extends Norm E, AddGroup E, MetricSpace E where
  dist := fun x y => ‖x - y‖
  /-- The distance function is induced by the norm. -/
  dist_eq : ∀ x y, dist x y = ‖x - y‖ := by aesop

{E : Type u_9}
[self : NormedAddGroup E]
(x y : E)


@[simp]
theorem const_apply (b : β) (a : α) : const α b a = b

(α : Type u_3)
{β : Type u_4}
[Sup α]
[SemilatticeSup β]
(b : β)
(a : α)


@[to_additive]
theorem leftInv_le_isUnit : S.leftInv ≤ IsUnit.submonoid M

{M : Type u_1}
[CommMonoid M]
(S : Submonoid M)


theorem lt_succ_floor (a : α) : a < ⌊a⌋.succ

{α : Type u_2}
[LinearOrderedRing α]
[FloorRing α]
(a : α)


@[simp]
theorem nondegenerate_congr_iff {B : BilinForm R M} (e : M ≃ₗ[R] M') :
    (congr e B).Nondegenerate ↔ B.Nondegenerate

{R : Type u_1}
{M : Type u_2}
[CommSemiring R]
[AddCommMonoid M]
[Module R M]
{M' : Type u_9}
[AddCommMonoid M']
[Module R M']
{B : LinearMap.BilinForm R M}
(e : M ≃ₗ[R] M')

((LinearMap.BilinForm.congr e) B).Nondegenerate ↔ B.Nondegenerate


theorem xor_not_not : Xor' (¬a) (¬b) ↔ Xor' a b


@[simp]
theorem lapply_comp_lsingle_same (a : α) : lapply a ∘ₗ lsingle a = (.id : M →ₗ[R] M)

{α : Type u_1}
{M : Type u_2}
{R : Type u_5}
[Semiring R]
[AddCommMonoid M]
[Module R M]
(a : α)

Finsupp.lapply a ∘ₗ Finsupp.lsingle a = LinearMap.id


theorem trans_single_of_eq_none {b : β} (c : γ) {f : δ ≃. β} (h : f.symm b = none) :
    f.trans (single b c) = ⊥

{β : Type v}
{γ : Type w}
{δ : Type x}
[DecidableEq β]
[DecidableEq γ]
{b : β}
(c : γ)
{f : δ ≃. β}
(h : f.symm b = none)


theorem image_frontier (h : X ≃ₜ Y) (s : Set X) : h '' frontier s = frontier (h '' s)

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


theorem aleph_pos (o : Ordinal) : 0 < aleph o


lemma isClopen_iUnion (hf : ∀ i, IsClopen (f i)) : IsClopen (⋃ i, f i)

{ι : Sort u_1}
{α : Type u_3}
[TopologicalSpace α]
[AlexandrovDiscrete α]
{f : ι → Set α}
(hf : ∀ (i : ι), IsClopen (f i))


@[reassoc (attr := simp)]
theorem biprod.inr_map {W X Y Z : C} [HasBinaryBiproduct W X] [HasBinaryBiproduct Y Z] (f : W ⟶ Y)
    (g : X ⟶ Z) : biprod.inr ≫ biprod.map f g = g ≫ biprod.inr

CategoryTheory.Limits.biprod.inr ≫ CategoryTheory.Limits.biprod.map f g = g ≫ CategoryTheory.Limits.biprod.inr


@[simp]
theorem whiskerRight_id' {G : C ⥤ D} (F : D ⥤ E) : whiskerRight (𝟙 G) F = 𝟙 (G.comp F)

{C : Type u₁}
[CategoryTheory.Category.{v₁, u₁} C]
{D : Type u₂}
[CategoryTheory.Category.{v₂, u₂} D]
{E : Type u₃}
[CategoryTheory.Category.{v₃, u₃} E]
{G : CategoryTheory.Functor C D}
(F : CategoryTheory.Functor D E)

CategoryTheory.whiskerRight (CategoryTheory.CategoryStruct.id G) F = CategoryTheory.CategoryStruct.id (G.comp F)


/-- A category `IsCofiltered` if
1. for every pair of objects there exists another object "to the left",
2. for every pair of parallel morphisms there exists a morphism to the left so the compositions
   are equal, and
3. there exists some object.

See <https://stacks.math.columbia.edu/tag/04AZ>.
-/
class IsCofiltered extends IsCofilteredOrEmpty C : Prop where
  /-- a cofiltered category must be non empty -/
  [nonempty : Nonempty C]

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


theorem isNoetherian_submodule_left {N : Submodule R M} :
    IsNoetherian R N ↔ ∀ s : Submodule R M, (N ⊓ s).FG

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

IsNoetherian R ↥N ↔ ∀ (s : Submodule R M), (N ⊓ s).FG


theorem count_map_roots [IsDomain A] [DecidableEq B] {p : A[X]} {f : A →+* B} (hmap : map f p ≠ 0)
    (b : B) :
    (p.roots.map f).count b ≤ rootMultiplicity b (p.map f)

{A : Type u_1}
{B : Type u_2}
[CommRing A]
[CommRing B]
[IsDomain A]
[DecidableEq B]
{p : Polynomial A}
{f : A →+* B}
(hmap : Polynomial.map f p ≠ 0)
(b : B)

Multiset.count b (Multiset.map (⇑f) p.roots) ≤ Polynomial.rootMultiplicity b (Polynomial.map f p)


theorem lt_of_lt_floor (h : n < ⌊a⌋₊) : ↑n < a

{α : Type u_2}
[LinearOrderedSemiring α]
[FloorSemiring α]
{a : α}
{n : ℕ}
(h : n < ⌊a⌋₊)


theorem isIntegral_of_submodule_noetherian (S : Subalgebra R B)
    (H : IsNoetherian R (Subalgebra.toSubmodule S)) (x : B) (hx : x ∈ S) : IsIntegral R x

(H : IsNoetherian R ↥(Subalgebra.toSubmodule S))


/-- Hard part of FTC-2 for integrable derivatives, real-valued functions: one has
`g b - g a ≤ ∫ y in a..b, g' y` when `g'` is integrable.
Auxiliary lemma in the proof of `integral_eq_sub_of_hasDeriv_right_of_le`.
We give the slightly more general version that `g b - g a ≤ ∫ y in a..b, φ y` when `g' ≤ φ` and
`φ` is integrable (even if `g'` is not known to be integrable).
Version assuming that `g` is differentiable on `(a, b)`. -/
theorem sub_le_integral_of_hasDeriv_right_of_le (hab : a ≤ b) (hcont : ContinuousOn g (Icc a b))
    (hderiv : ∀ x ∈ Ioo a b, HasDerivWithinAt g (g' x) (Ioi x) x) (φint : IntegrableOn φ (Icc a b))
    (hφg : ∀ x ∈ Ioo a b, g' x ≤ φ x) : g b - g a ≤ ∫ y in a..b, φ y

(hderiv : ∀ x ∈ Set.Ioo a b, HasDerivWithinAt g (g' x) (Set.Ioi x) x)

(φint : MeasureTheory.IntegrableOn φ (Set.Icc a b) MeasureTheory.volume)


theorem impartial_def {G : PGame} :
    G.Impartial ↔ (G ≈ -G) ∧ (∀ i, Impartial (G.moveLeft i)) ∧ ∀ j, Impartial (G.moveRight j)

G.Impartial ↔ G ≈ -G ∧ (∀ (i : G.LeftMoves), (G.moveLeft i).Impartial) ∧ ∀ (j : G.RightMoves), (G.moveRight j).Impartial


theorem Convex.quasiconcaveOn_of_convex_ge (hs : Convex 𝕜 s) (h : ∀ r, Convex 𝕜 { x | r ≤ f x }) :
    QuasiconcaveOn 𝕜 s f

{𝕜 : Type u_1}
{E : Type u_2}
{β : Type u_4}
[OrderedSemiring 𝕜]
[AddCommMonoid E]
[LE β]
[SMul 𝕜 E]
{s : Set E}
{f : E → β}
(hs : Convex 𝕜 s)
(h : ∀ (r : β), Convex 𝕜 {x | r ≤ f x})


@[simp]
theorem mapPresheaf_map_f (F : C ⥤ D) {X Y : PresheafedSpace C} (f : X ⟶ Y) :
    (F.mapPresheaf.map f).base = f.base

{X Y : AlgebraicGeometry.PresheafedSpace C}


@[simp] theorem dropLast_nil : ([] : List α).dropLast = []


Real.tan (x + y) = (Real.tan x + Real.tan y) / (1 - Real.tan x * Real.tan y)


/-- Adic completion preserves injectivity of finite modules over a Noetherian ring. -/
theorem map_injective {f : M →ₗ[R] N} (hf : Function.Injective f) :
    Function.Injective (map I f)

{R : Type u}
[CommRing R]
(I : Ideal R)
{M : Type u}
[AddCommGroup M]
[Module R M]
{N : Type u}
[AddCommGroup N]
[Module R N]
[IsNoetherianRing R]
[Module.Finite R N]
{f : M →ₗ[R] N}
(hf : Function.Injective ⇑f)

Function.Injective ⇑(AdicCompletion.map I f)


@[simp]
theorem iSup_apply {ι} (f : ι → OuterMeasure α) (s : Set α) : (⨆ i : ι, f i) s = ⨆ i, f i s

{α : Type u_1}
{ι : Sort u_3}
(f : ι → MeasureTheory.OuterMeasure α)
(s : Set α)


lemma reverse_involutive : Function.Involutive (reverse : Language α → _)


theorem tensor_comp {X₁ Y₁ Z₁ X₂ Y₂ Z₂ : C} (f₁ : X₁ ⟶ Y₁) (f₂ : X₂ ⟶ Y₂) (g₁ : Y₁ ⟶ Z₁)
    (g₂ : Y₂ ⟶ Z₂) : tensorHom ℬ (f₁ ≫ g₁) (f₂ ≫ g₂) = tensorHom ℬ f₁ f₂ ≫ tensorHom ℬ g₁ g₂

(ℬ : (X Y : C) → CategoryTheory.Limits.LimitCone (CategoryTheory.Limits.pair X Y))

CategoryTheory.MonoidalOfChosenFiniteProducts.tensorHom ℬ (CategoryTheory.CategoryStruct.comp f₁ g₁)
    (CategoryTheory.CategoryStruct.comp f₂ g₂) =
  CategoryTheory.CategoryStruct.comp (CategoryTheory.MonoidalOfChosenFiniteProducts.tensorHom ℬ f₁ f₂)
    (CategoryTheory.MonoidalOfChosenFiniteProducts.tensorHom ℬ g₁ g₂)


/-- An element of a star monoid is normal if it commutes with its adjoint. -/
@[mk_iff]
class IsStarNormal [Mul R] [Star R] (x : R) : Prop where
  /-- A normal element of a star monoid commutes with its adjoint. -/
  star_comm_self : Commute (star x) x


/-- A graded version of `Semiring`. -/
class GSemiring [AddMonoid ι] [∀ i, AddCommMonoid (A i)] extends GNonUnitalNonAssocSemiring A,
  GradedMonoid.GMonoid A where
  /-- The canonical map from ℕ to the zeroth component of a graded semiring. -/
  natCast : ℕ → A 0
  /-- The canonical map from ℕ to a graded semiring respects zero. -/
  natCast_zero : natCast 0 = 0
  /-- The canonical map from ℕ to a graded semiring respects successors. -/
  natCast_succ : ∀ n : ℕ, natCast (n + 1) = natCast n + GradedMonoid.GOne.one

{ι : Type u_1}
{A : ι → Type u_2}
[AddMonoid ι]
[(i : ι) → AddCommMonoid (A i)]
[self : DirectSum.GSemiring A]
(n : ℕ)

DirectSum.GSemiring.natCast (n + 1) = DirectSum.GSemiring.natCast n + GradedMonoid.GOne.one


theorem Ioo_subset_Iic_self : Ioo a b ⊆ Iic b

{α : Type u_2}
[Preorder α]
[LocallyFiniteOrder α]
{a b : α}
[LocallyFiniteOrderBot α]


@[to_additive]
theorem smul_opposite_image_mul_preimage' (g : G) (h : Gᵐᵒᵖ) (s : Set G) :
    (fun y => h • y) '' ((g * ·) ⁻¹' s) = (g * ·) ⁻¹' ((fun y => h • y) '' s)

{G : Type u_2}
[AddGroup G]
(g : G)
(h : Gᵃᵒᵖ)
(s : Set G)

(fun y => h +ᵥ y) '' ((fun x => g + x) ⁻¹' s) = (fun x => g + x) ⁻¹' ((fun y => h +ᵥ y) '' s)


@[to_additive]
theorem mem_sup : x ∈ s ⊔ t ↔ ∃ y ∈ s, ∃ z ∈ t, y * z = x

{C : Type u_6}
[AddCommGroup C]
{s t : AddSubgroup C}
{x : C}


lemma powersetCard_empty_subsingleton (n : ℕ) :
    (powersetCard n (∅ : Finset α) : Set $ Finset α).Subsingleton


theorem inf'_sup_inf' (f : ι → α) (g : κ → α) :
    s.inf' hs f ⊔ t.inf' ht g = (s ×ˢ t).inf' (hs.product ht) fun i => f i.1 ⊔ g i.2

{α : Type u_2}
{ι : Type u_5}
{κ : Type u_6}
[DistribLattice α]
{s : Finset ι}
{t : Finset κ}
(hs : s.Nonempty)
(ht : t.Nonempty)
(f : ι → α)
(g : κ → α)

s.inf' hs f ⊔ t.inf' ht g = (s ×ˢ t).inf' ⋯ fun i => f i.1 ⊔ g i.2


/-- When the first map `S.f` is zero, this is the homology data on `S` given
by any limit kernel fork of `S.g` -/
@[simps]
def ofIsLimitKernelFork (hf : S.f = 0) (c : KernelFork S.g) (hc : IsLimit c) :
    S.HomologyData

(c : CategoryTheory.Limits.KernelFork S.g)

(CategoryTheory.ShortComplex.HomologyData.ofIsLimitKernelFork S hf c hc).iso =
  CategoryTheory.Iso.refl (CategoryTheory.ShortComplex.LeftHomologyData.ofIsLimitKernelFork S hf c hc).H


theorem ker_eq_bot_of_injective {f : F} (hf : Injective f) : ker f = ⊥

{R : Type u_1}
{R₂ : Type u_3}
{M : Type u_6}
{M₂ : Type u_8}
[Semiring R]
[Semiring R₂]
[AddCommMonoid M]
[AddCommMonoid M₂]
[Module R M]
[Module R₂ M₂]
{τ₁₂ : R →+* R₂}
{F : Type u_12}
[FunLike F M M₂]
[SemilinearMapClass F τ₁₂ M M₂]
{f : F}
(hf : Function.Injective ⇑f)


theorem isCompactOperator_iff_exists_mem_nhds_image_subset_compact (f : M₁ → M₂) :
    IsCompactOperator f ↔ ∃ V ∈ (𝓝 0 : Filter M₁), ∃ K : Set M₂, IsCompact K ∧ f '' V ⊆ K

{M₁ : Type u_3}
{M₂ : Type u_4}
[TopologicalSpace M₁]
[AddCommMonoid M₁]
[TopologicalSpace M₂]
(f : M₁ → M₂)

IsCompactOperator f ↔ ∃ V ∈ 𝓝 0, ∃ K, IsCompact K ∧ f '' V ⊆ K


@[to_additive]
theorem tendsto_div_comap_self (x₀ : α) :
    Tendsto (fun t : β × β => t.2 / t.1) ((comap fun p : β × β => (e p.1, e p.2)) <| 𝓝 (x₀, x₀))
      (𝓝 1)

{α : Type u_1}
{β : Type u_2}
{hom : Type u_3}
[TopologicalSpace α]
[AddGroup α]
[TopologicalAddGroup α]
[TopologicalSpace β]
[AddGroup β]
[FunLike hom β α]
[AddMonoidHomClass hom β α]
{e : hom}
(de : DenseInducing ⇑e)
(x₀ : α)

Filter.Tendsto (fun t => t.2 - t.1) (Filter.comap (fun p => (e p.1, e p.2)) (𝓝 (x₀, x₀))) (𝓝 0)


theorem contractRight_algebraMap_mul (r : R) (b : CliffordAlgebra Q) :
    algebraMap _ _ r * b⌊d = algebraMap _ _ r * (b⌊d)

{R : Type u1}
[CommRing R]
{M : Type u2}
[AddCommGroup M]
[Module R M]
{Q : QuadraticForm R M}
(d : Module.Dual R M)
(r : R)
(b : CliffordAlgebra Q)

(CliffordAlgebra.contractRight ((algebraMap R (CliffordAlgebra Q)) r * b)) d =
  (algebraMap R (CliffordAlgebra Q)) r * (CliffordAlgebra.contractRight b) d


theorem bounded_le_Iic [Preorder α] (a : α) : Bounded (· ≤ ·) (Iic a)

Set.Bounded (fun x x_1 => x ≤ x_1) (Set.Iic a)


theorem concaveOn_id {s : Set β} (hs : Convex 𝕜 s) : ConcaveOn 𝕜 s _root_.id

{𝕜 : Type u_1}
{β : Type u_5}
[OrderedSemiring 𝕜]
[OrderedAddCommMonoid β]
[SMul 𝕜 β]
{s : Set β}
(hs : Convex 𝕜 s)


theorem mk_union_add_mk_inter {α : Type u} {S T : Set α} :
    #(S ∪ T : Set α) + #(S ∩ T : Set α) = #S + #T

Cardinal.mk ↑(S ∪ T) + Cardinal.mk ↑(S ∩ T) = Cardinal.mk ↑S + Cardinal.mk ↑T


@[simp, mfld_simps]
theorem localTrivAt_apply_mk (b : B) (a : F) : Z.localTrivAt b ⟨b, a⟩ = ⟨b, a⟩

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

↑(Z.localTrivAt b) { proj := b, snd := a } = (b, a)


theorem neg_mk (a b) : -(mk a b : Localization M) = mk (-a) b

{R : Type u_1}
[CommRing R]
{M : Submonoid R}
(a : R)
(b : ↥M)

-Localization.mk a b = Localization.mk (-a) b


/-- If `f : X → X` is a non-strictly contracting map (i.e., it is Lipschitz with constant `1`),
`g : X → E` is a uniformly continuous, and `l : X → E` is a continuous function,
then the set of points `x`
such that the Birkhoff average of `g` along the orbit of `x` tends to `l x`
is a closed set. -/
theorem isClosed_setOf_tendsto_birkhoffAverage
    (hf : LipschitzWith 1 f) (hg : UniformContinuous g) (hl : Continuous l) :
    IsClosed {x | Tendsto (birkhoffAverage 𝕜 f g · x) atTop (𝓝 (l x))}

(𝕜 : Type u_1)
{X : Type u_2}
{E : Type u_3}
[PseudoEMetricSpace X]
[RCLike 𝕜]
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{f : X → X}
{g l : X → E}
(hf : LipschitzWith 1 f)
(hg : UniformContinuous g)
(hl : Continuous l)

IsClosed {x | Filter.Tendsto (fun x_1 => birkhoffAverage 𝕜 f g x_1 x) Filter.atTop (𝓝 (l x))}


@[to_additive]
theorem ball_one_div_singleton : ball 1 δ / {x} = ball x⁻¹ δ

{E : Type u_1}
[SeminormedCommGroup E]
(δ : ℝ)
(x : E)

Metric.ball 1 δ / {x} = Metric.ball x⁻¹ δ


@[simp] theorem neg_imI : (-a).imI = -a.imI

{R : Type u_3}
[CommRing R]
{c₁ c₂ : R}
(a : ℍ[R,c₁,c₂])


theorem sqrt_sq_eq_abs (x : ℝ) : √(x ^ 2) = |x|


/-- Uniform convergence to a constant function is equivalent to convergence in `p ×ˢ ⊤`. -/
theorem tendsto_prod_top_iff {c : β} :
    Tendsto (↿F) (p ×ˢ ⊤) (𝓝 c) ↔ TendstoUniformly F (fun _ => c) p

{α : Type u}
{β : Type v}
{ι : Type x}
[UniformSpace β]
{F : ι → α → β}
{p : Filter ι}
{c : β}

Filter.Tendsto (↿F) (p ×ˢ ⊤) (𝓝 c) ↔ TendstoUniformly F (fun x => c) p


/-- See also `Module.End.intCast_def`. -/
@[simp]
theorem _root_.Module.End.intCast_apply (z : ℤ) (m : N₁) : (z : Module.End R N₁) m = z • m

{R : Type u_1}
{N₁ : Type u_10}
[Semiring R]
[AddCommGroup N₁]
[Module R N₁]
(z : ℤ)
(m : N₁)


theorem Subtype.strictMono_coe [Preorder α] (t : Set α) :
    StrictMono ((↑) : Subtype t → α)


/-- The right_inv direction of the equivalence -/
theorem rowLens_ofRowLens_eq_self {w : List ℕ} {hw : w.Sorted (· ≥ ·)} (hpos : ∀ x ∈ w, 0 < x) :
    (ofRowLens w hw).rowLens = w

{hw : List.Sorted (fun x x_1 => x ≥ x_1) w}

(YoungDiagram.ofRowLens w hw).rowLens = w


/-- Given three points not equal to `p`, the angle between the second and the third at `p` plus
the angle between the first and the second equals the angle between the first and the third. -/
@[simp]
theorem oangle_add_swap {p p₁ p₂ p₃ : P} (hp₁ : p₁ ≠ p) (hp₂ : p₂ ≠ p) (hp₃ : p₃ ≠ p) :
    ∡ p₂ p p₃ + ∡ p₁ p p₂ = ∡ p₁ p p₃

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


@[simp]
theorem comp_val {X Y Z : LocallyRingedSpace.{u}} (f : X ⟶ Y) (g : Y ⟶ Z) :
    (f ≫ g).val = f.val ≫ g.val

{X Y Z : AlgebraicGeometry.LocallyRingedSpace}


theorem mul_le_mul_of_mul_div_le (h : a * (b / c) ≤ d) (hc : 0 < c) : b * a ≤ d * c

{α : Type u_2}
[LinearOrderedSemifield α]
{a b c d : α}
(h : a * (b / c) ≤ d)
(hc : 0 < c)


theorem insertNth_apply_above {i j : Fin (n + 1)} (h : i < j) (x : α i)
    (p : ∀ k, α (i.succAbove k)) :
    i.insertNth x p j = @Eq.recOn _ _ (fun x _ ↦ α x) _
    (succAbove_pred_of_lt _ _ h) (p <| j.pred _)

{n : ℕ}
{α : Fin (n + 1) → Type u}
{i j : Fin (n + 1)}
(h : i < j)
(x : α i)
(p : (k : Fin n) → α (i.succAbove k))

i.insertNth x p j = Eq.recOn ⋯ (p (j.pred ⋯))


theorem c_eq_algebraMap : C σ R = algebraMap R (MvPowerSeries σ R)

{σ : Type u_1}
{R : Type u_2}
[CommSemiring R]

MvPowerSeries.C σ R = algebraMap R (MvPowerSeries σ R)


theorem inf_apply [Inf β] (f g : α →ₛ β) (a : α) : (f ⊓ g) a = f a ⊓ g a

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


@[simp]
theorem map_append (f : α → β) (s t) : map f (append s t) = append (map f s) (map f t)

{α : Type u}
{β : Type v}
(f : α → β)
(s t : Stream'.WSeq α)

Stream'.WSeq.map f (s.append t) = (Stream'.WSeq.map f s).append (Stream'.WSeq.map f t)


@[simp]
theorem blockDiagonal_one [DecidableEq m] [One α] : blockDiagonal (1 : o → Matrix m m α) = 1

{m : Type u_2}
{o : Type u_4}
{α : Type u_12}
[DecidableEq o]
[Zero α]
[DecidableEq m]
[One α]


@[simp]
theorem succPNat_inj {n m : ℕ} : succPNat n = succPNat m ↔ n = m


@[to_additive (attr := simp)]
theorem div_eq_empty : s / t = ∅ ↔ s = ∅ ∨ t = ∅

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


/-- The star subalgebra of `C(AddCircle T, ℂ)` generated by `fourier n` for `n ∈ ℤ` is in fact the
linear span of these functions. -/
theorem fourierSubalgebra_coe :
    Subalgebra.toSubmodule (@fourierSubalgebra T).toSubalgebra = span ℂ (range (@fourier T))

Subalgebra.toSubmodule fourierSubalgebra.toSubalgebra = Submodule.span ℂ (Set.range fourier)


theorem head (hab : r a b) (hbc : ReflTransGen r b c) : ReflTransGen r a c

{α : Type u_1}
{r : α → α → Prop}
{a b c : α}
(hab : r a b)
(hbc : Relation.ReflTransGen r b c)


/-- The constant sheaf functor commutes with `sheafCompose` up to isomorphism. -/
@[simps!]
noncomputable def constantCommuteCompose :
    constantSheaf J A ⋙ sheafCompose J U ≅ U ⋙ constantSheaf J B

(J : CategoryTheory.GrothendieckTopology C)

∀ (X_1 : Cᵒᵖ),
  ((CategoryTheory.Sheaf.constantCommuteCompose J U).hom.app X).val.app X_1 =
    ((CategoryTheory.sheafComposeNatIso J U (CategoryTheory.sheafificationAdjunction J A)
                    (CategoryTheory.sheafificationAdjunction J B)).inv.app
              ((CategoryTheory.Functor.const Cᵒᵖ).obj X)).val.app
        X_1 ≫
      ((CategoryTheory.presheafToSheaf J B).map ((CategoryTheory.Functor.compConstIso Cᵒᵖ U).inv.app X)).val.app X_1


@[reassoc (attr := simp)]
lemma ιMapObj_D₂ (i₁₂ i₁₂' : I₁₂) (i : I₁ × I₂) (h : ComplexShape.π c₁ c₂ c₁₂ i = i₁₂) :
    K.toGradedObject.ιMapObj (ComplexShape.π c₁ c₂ c₁₂) i i₁₂ h ≫ K.D₂ c₁₂ i₁₂ i₁₂' =
      K.d₂ c₁₂ i.1 i.2 i₁₂'

{C : Type u_1}
[CategoryTheory.Category.{u_5, u_1} C]
[CategoryTheory.Preadditive C]
{I₁ : Type u_2}
{I₂ : Type u_3}
{I₁₂ : Type u_4}
{c₁ : ComplexShape I₁}
{c₂ : ComplexShape I₂}
(K : HomologicalComplex₂ C c₁ c₂)
(c₁₂ : ComplexShape I₁₂)
[DecidableEq I₁₂]
[TotalComplexShape c₁ c₂ c₁₂]
[K.HasTotal c₁₂]
(i₁₂ i₁₂' : I₁₂)
(i : I₁ × I₂)
(h : c₁.π c₂ c₁₂ i = i₁₂)

K.toGradedObject.ιMapObj (c₁.π c₂ c₁₂) i i₁₂ h ≫ K.D₂ c₁₂ i₁₂ i₁₂' = K.d₂ c₁₂ i.1 i.2 i₁₂'


@[simp]
theorem refl_apply (a : α) : PEquiv.refl α a = some a


theorem idealOfLE_le_of_le (R S : ValuationSubring K) (hR : A ≤ R) (hS : A ≤ S) (h : R ≤ S) :
    idealOfLE A S hS ≤ idealOfLE A R hR

{K : Type u}
[Field K]
(A R S : ValuationSubring K)
(hR : A ≤ R)
(hS : A ≤ S)
(h : R ≤ S)


@[simp]
protected theorem mul_inv_cancel (φ : MvPowerSeries σ k) (h : constantCoeff σ k φ ≠ 0) :
    φ * φ⁻¹ = 1

(h : (MvPowerSeries.constantCoeff σ k) φ ≠ 0)


/-- The top subalgebra is isomorphic to the algebra.

This is the algebra version of `Submodule.topEquiv`. -/
@[simps!]
def topEquiv : (⊤ : Subalgebra R A) ≃ₐ[R] A

{R : Type u}
{A : Type v}
[CommSemiring R]
[Semiring A]
[Algebra R A]
(a : ↥⊤)


theorem isBigOWith_prod_left :
    IsBigOWith c l (fun x => (f' x, g' x)) k' ↔ IsBigOWith c l f' k' ∧ IsBigOWith c l g' k'

{α : Type u_1}
{E' : Type u_6}
{F' : Type u_7}
{G' : Type u_8}
[SeminormedAddCommGroup E']
[SeminormedAddCommGroup F']
[SeminormedAddCommGroup G']
{c : ℝ}
{f' : α → E'}
{g' : α → F'}
{k' : α → G'}
{l : Filter α}

Asymptotics.IsBigOWith c l (fun x => (f' x, g' x)) k' ↔
  Asymptotics.IsBigOWith c l f' k' ∧ Asymptotics.IsBigOWith c l g' k'


/-- Functors from `Discrete PUnit` are equivalent to the category itself. -/
@[simps]
def equiv : Discrete PUnit.{w + 1} ⥤ C ≌ C

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

CategoryTheory.Functor.equiv.unitIso =
  CategoryTheory.NatIso.ofComponents
    (fun X =>
      CategoryTheory.Discrete.natIso fun i =>
        CategoryTheory.Iso.refl
          (((CategoryTheory.Functor.id (CategoryTheory.Functor (CategoryTheory.Discrete PUnit.{w + 1}) C)).obj X).obj
            i))
    ⋯


/-- A quadratic has roots if its discriminant has square roots -/
theorem exists_quadratic_eq_zero (ha : a ≠ 0) (h : ∃ s, discrim a b c = s * s) :
    ∃ x, a * x * x + b * x + c = 0

{K : Type u_1}
[Field K]
[NeZero 2]
{a b c : K}
(ha : a ≠ 0)
(h : ∃ s, discrim a b c = s * s)


/-- This cannot be an instance because it can cause infinite loops whenever the `SMul` arguments
are still metavariables. -/
@[to_additive
"This cannot be an instance because it can cause infinite loops whenever the `VAdd` arguments
are still metavariables."]
lemma comp.smulCommClass [SMul β α] [SMulCommClass M β α] (g : N → M) :
    haveI := comp α g
    SMulCommClass N β α

{M : Type u_1}
{N : Type u_2}
{α : Type u_7}
{β : Type u_8}
[VAdd M α]
[VAdd β α]
[VAddCommClass M β α]
(g : N → M)


theorem natDegree_linear_le : natDegree (C a * X + C b) ≤ 1

(Polynomial.C a * Polynomial.X + Polynomial.C b).natDegree ≤ 1


theorem submatrix_mul [Fintype n] [Fintype o] [Mul α] [AddCommMonoid α] {p q : Type*}
    (M : Matrix m n α) (N : Matrix n p α) (e₁ : l → m) (e₂ : o → n) (e₃ : q → p)
    (he₂ : Function.Bijective e₂) :
    (M * N).submatrix e₁ e₃ = M.submatrix e₁ e₂ * N.submatrix e₂ e₃

{l : Type u_1}
{m : Type u_2}
{n : Type u_3}
{o : Type u_4}
{α : Type v}
[Fintype n]
[Fintype o]
[Mul α]
[AddCommMonoid α]
{p : Type u_10}
{q : Type u_11}
(M : Matrix m n α)
(N : Matrix n p α)
(e₁ : l → m)
(e₂ : o → n)
(e₃ : q → p)
(he₂ : Function.Bijective e₂)


theorem not_mem_of_not_mem_cons {a b : α} {l : List α} : a ∉ b::l → a ∉ l


theorem mem_inv_pointwise_smul_iff {a : α} {S : AddSubmonoid A} {x : A} : x ∈ a⁻¹ • S ↔ a • x ∈ S

{α : Type u_1}
{A : Type u_5}
[AddMonoid A]
[Group α]
[DistribMulAction α A]
{a : α}
{S : AddSubmonoid A}
{x : A}

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


theorem IsCycle.conj : IsCycle f → IsCycle (g * f * g⁻¹)


theorem _root_.continuous_coe_ennreal_ereal : Continuous ((↑) : ℝ≥0∞ → EReal)


lemma _root_.MvPolynomial.isHomogeneous_C_mul_X (r : R) (i : σ) :
    (C r * X i).IsHomogeneous 1

{σ : Type u_1}
{R : Type u_3}
[CommSemiring R]
(r : R)
(i : σ)

(MvPolynomial.C r * MvPolynomial.X i).IsHomogeneous 1


/-- Bourbaki GT III.6.5 Theorem I:
ℤ-bilinear continuous maps from dense images into a complete Hausdorff group extend by continuity.
Note: Bourbaki assumes that α and β are also complete Hausdorff, but this is not necessary. -/
theorem extend_Z_bilin : Continuous (extend (de.prod df) (fun p : β × δ => φ p.1 p.2))

{α : Type u_1}
{β : Type u_2}
{γ : Type u_3}
{δ : Type u_4}
{G : Type u_5}
[TopologicalSpace α]
[AddCommGroup α]
[TopologicalAddGroup α]
[TopologicalSpace β]
[AddCommGroup β]
[TopologicalSpace γ]
[AddCommGroup γ]
[TopologicalAddGroup γ]
[TopologicalSpace δ]
[AddCommGroup δ]
[UniformSpace G]
[AddCommGroup G]
[UniformAddGroup G]
[T0Space G]
[CompleteSpace G]
{e : β →+ α}
(de : DenseInducing ⇑e)
{f : δ →+ γ}
(df : DenseInducing ⇑f)
{φ : β →+ δ →+ G}
(hφ : Continuous fun p => (φ p.1) p.2)

Continuous (⋯.extend fun p => (φ p.1) p.2)


/-- In an (extended) metric space with second countable topology, the Hausdorff dimension
of a set `s` is the supremum over all `x` of the limit superiors of `dimH t` along
`(𝓝[s] x).smallSets`. -/
theorem iSup_limsup_dimH (s : Set X) : ⨆ x, limsup dimH (𝓝[s] x).smallSets = dimH s

{X : Type u_2}
[EMetricSpace X]
[SecondCountableTopology X]
(s : Set X)

⨆ x, Filter.limsup dimH (𝓝[s] x).smallSets = dimH s


private theorem toIxxMod_cyclic_left {x₁ x₂ x₃ : α} (h : toIcoMod hp x₁ x₂ ≤ toIocMod hp x₁ x₃) :
    toIcoMod hp x₂ x₃ ≤ toIocMod hp x₂ x₁


theorem slice_add [Add α] (i : ℕ) (hid : i < d) (x : Holor α (d :: ds)) (y : Holor α (d :: ds)) :
    slice x i hid + slice y i hid = slice (x + y) i hid

{α : Type}
{d : ℕ}
{ds : List ℕ}
[Add α]
(i : ℕ)
(hid : i < d)
(x y : Holor α (d :: ds))

x.slice i hid + y.slice i hid = (x + y).slice i hid


@[to_additive (attr := simp)]
theorem lowerClosure_smul : lowerClosure (a • s) = a • lowerClosure s

{α : Type u_1}
[OrderedAddCommGroup α]
(s : Set α)
(a : α)

lowerClosure (a +ᵥ s) = a +ᵥ lowerClosure s


@[simp]
lemma mapDomainAlgHom_id (k A) [CommSemiring k] [Semiring A] [Algebra k A] [AddMonoid G] :
    mapDomainAlgHom k A (AddMonoidHom.id G) = AlgHom.id k (AddMonoidAlgebra A G)

{G : Type u₂}
(k : Type u_3)
(A : Type u_4)
[CommSemiring k]
[Semiring A]
[Algebra k A]
[AddMonoid G]

AddMonoidAlgebra.mapDomainAlgHom k A (AddMonoidHom.id G) = AlgHom.id k (AddMonoidAlgebra A G)


/-- A product over `Finset.powersetCard` which only depends on the size of the sets is constant. -/
@[to_additive
"A sum over `Finset.powersetCard` which only depends on the size of the sets is constant."]
lemma prod_powersetCard (n : ℕ) (s : Finset α) (f : ℕ → β) :
    ∏ t ∈ powersetCard n s, f t.card = f n ^ s.card.choose n

{α : Type u_3}
{β : Type u_4}
[AddCommMonoid β]
(n : ℕ)
(s : Finset α)
(f : ℕ → β)

∑ t ∈ Finset.powersetCard n s, f t.card = s.card.choose n • f n


@[simp]
lemma eqToHom_comp_lift_iff {R S : 𝒮} {a b b' : 𝒳} (f : R ⟶ S) (φ : a ⟶ b) (h : b = b') :
    p.IsHomLift f (φ ≫ eqToHom h) ↔ p.IsHomLift f φ

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

p.IsHomLift f (φ ≫ CategoryTheory.eqToHom h) ↔ p.IsHomLift f φ


theorem minimals_swap : minimals (swap r) s = maximals r s

{α : Type u_1}
(r : α → α → Prop)
(s : Set α)

minimals (Function.swap r) s = maximals r s


/-- Any free group is isomorphic to "the" free group. -/
irreducible_def mulEquiv : FreeGroup (Generators G) ≃* G

(G : Type u_2)
[Group G]
[IsFreeGroup G]

IsFreeGroup.mulEquiv G = ⋯.some.repr.symm


theorem map_atTop_eq [Nonempty α] [SemilatticeSup α] {f : α → β} :
    atTop.map f = ⨅ a, 𝓟 (f '' { a' | a ≤ a' })

{α : Type u_3}
{β : Type u_4}
[Nonempty α]
[SemilatticeSup α]
{f : α → β}

Filter.map f Filter.atTop = ⨅ a, 𝓟 (f '' {a' | a ≤ a'})


/--
`Fin n` is a natural number `i` with the constraint that `0 ≤ i < n`.
It is the "canonical type with `n` elements".
-/
@[pp_using_anonymous_constructor]
structure Fin (n : Nat) where
  /-- Creates a `Fin n` from `i : Nat` and a proof that `i < n`. -/
  mk ::
  /-- If `i : Fin n`, then `i.val : ℕ` is the described number. It can also be
  written as `i.1` or just `i` when the target type is known. -/
  val  : Nat
  /-- If `i : Fin n`, then `i.2` is a proof that `i.1 < n`. -/
  isLt : LT.lt val n


theorem linearIndependent_equiv' (e : ι ≃ ι') {f : ι' → M} {g : ι → M} (h : f ∘ e = g) :
    LinearIndependent R g ↔ LinearIndependent R f

{ι : Type u'}
{ι' : Type u_1}
{R : Type u_2}
{M : Type u_4}
[Semiring R]
[AddCommMonoid M]
[Module R M]
(e : ι ≃ ι')
{f : ι' → M}
{g : ι → M}
(h : f ∘ ⇑e = g)


@[to_additive]
theorem tendsto_one_iff_norm_tendsto_zero {f : α → E} {a : Filter α} :
    Tendsto f a (𝓝 1) ↔ Tendsto (‖f ·‖) a (𝓝 0)

{α : Type u_3}
{E : Type u_6}
[SeminormedGroup E]
{f : α → E}
{a : Filter α}

Filter.Tendsto f a (𝓝 1) ↔ Filter.Tendsto (fun x => ‖f x‖) a (𝓝 0)


theorem eq_of_eqOn_set_top {f g : R →+* S} (h : Set.EqOn f g (⊤ : Subring R)) : f = g

{R : Type u}
[Ring R]
{S : Type v}
[Semiring S]
{f g : R →+* S}
(h : Set.EqOn ⇑f ⇑g ↑⊤)


@[reassoc (attr := simp)]
lemma LeftHomologyData.homologyIso_hom_comp_leftHomologyIso_inv (h : S.LeftHomologyData) :
    h.homologyIso.hom ≫ h.leftHomologyIso.inv = S.leftHomologyIso.inv

CategoryTheory.CategoryStruct.comp h.homologyIso.hom h.leftHomologyIso.inv = S.leftHomologyIso.inv


/-- Composition is a continuous map from `C(X, Y) × C(Y, Z)` to `C(X, Z)`,
provided that `Y` is locally compact.
This is Prop. 9 of Chap. X, §3, №. 4 of Bourbaki's *Topologie Générale*. -/
theorem continuous_comp' : Continuous fun x : C(X, Y) × C(Y, Z) => x.2.comp x.1

{X : Type u_2}
{Y : Type u_3}
{Z : Type u_4}
[TopologicalSpace X]
[TopologicalSpace Y]
[TopologicalSpace Z]
[LocallyCompactPair Y Z]


theorem Coloring.card_colorClasses_le [Fintype α] [Fintype C.colorClasses] :
    Fintype.card C.colorClasses ≤ Fintype.card α

{V : Type u}
{G : SimpleGraph V}
{α : Type u_1}
(C : G.Coloring α)
[Fintype α]
[Fintype ↑C.colorClasses]

Fintype.card ↑C.colorClasses ≤ Fintype.card α


theorem get_interleave_right : ∀ (n : ℕ) (s₁ s₂ : Stream' α),
    get (s₁ ⋈ s₂) (2 * n + 1) = get s₂ n

{α : Type u}
(n : ℕ)
(s₁ s₂ : Stream' α)


@[to_additive] theorem mrange_eq (f : M ∗ N →* P) :
    MonoidHom.mrange f = MonoidHom.mrange (f.comp inl) ⊔ MonoidHom.mrange (f.comp inr)

{M : Type u_1}
{N : Type u_2}
{P : Type u_5}
[AddZeroClass M]
[AddZeroClass N]
[AddZeroClass P]
(f : AddMonoid.Coprod M N →+ P)

AddMonoidHom.mrange f =
  AddMonoidHom.mrange (f.comp AddMonoid.Coprod.inl) ⊔ AddMonoidHom.mrange (f.comp AddMonoid.Coprod.inr)


{R : Type u_4}
{S : Type u_5}
[NonAssocRing R]
[NonAssocRing S]
(f : R ≃+* S)


@[to_additive]
theorem prod_sum_elim (s : Finset α) (t : Finset γ) (f : α → β) (g : γ → β) :
    ∏ x ∈ s.disjSum t, Sum.elim f g x = (∏ x ∈ s, f x) * ∏ x ∈ t, g x

{α : Type u_3}
{β : Type u_4}
{γ : Type u_5}
[AddCommMonoid β]
(s : Finset α)
(t : Finset γ)
(f : α → β)
(g : γ → β)

∑ x ∈ s.disjSum t, Sum.elim f g x = ∑ x ∈ s, f x + ∑ x ∈ t, g x


/-- If `f` is convex on `S` and differentiable on `S`, then its derivative within `S` is monotone
on `S`. -/
lemma strictMonoOn_derivWithin (hfc : StrictConvexOn ℝ S f) (hfd : DifferentiableOn ℝ f S) :
    StrictMonoOn (derivWithin f S) S

{S : Set ℝ}
{f : ℝ → ℝ}
(hfc : StrictConvexOn ℝ S f)
(hfd : DifferentiableOn ℝ f S)


/-- If `C` holds for the `algebraMap` of `r : R` into `CliffordAlgebra Q`, the `ι` of `x : M`,
and is preserved under addition and muliplication, then it holds for all of `CliffordAlgebra Q`.

See also the stronger `CliffordAlgebra.left_induction` and `CliffordAlgebra.right_induction`.
-/
@[elab_as_elim]
theorem induction {C : CliffordAlgebra Q → Prop}
    (algebraMap : ∀ r, C (algebraMap R (CliffordAlgebra Q) r)) (ι : ∀ x, C (ι Q x))
    (mul : ∀ a b, C a → C b → C (a * b)) (add : ∀ a b, C a → C b → C (a + b))
    (a : CliffordAlgebra Q) : C a

(algebraMap : ∀ (r : R), C ((algebraMap R (CliffordAlgebra Q)) r))

(ι : ∀ (x : M), C ((CliffordAlgebra.ι Q) x))

(mul : ∀ (a b : CliffordAlgebra Q), C a → C b → C (a * b))

(add : ∀ (a b : CliffordAlgebra Q), C a → C b → C (a + b))


/-- If we swap two strictly decreasing values in a function, then the result is lexicographically
smaller than the original function. -/
theorem lex_desc {α} [Preorder ι] [DecidableEq ι] [Preorder α] {f : ι → α} {i j : ι} (h₁ : i ≤ j)
    (h₂ : f j < f i) : toLex (f ∘ Equiv.swap i j) < toLex f

{ι : Type u_1}
{α : Type u_3}
[Preorder ι]
[DecidableEq ι]
[Preorder α]
{f : ι → α}
{i j : ι}
(h₁ : i ≤ j)
(h₂ : f j < f i)


/-- Taking the affine span of a set, adding a point and taking the span again produces the same
results as adding the point to the set and taking the span. -/
theorem affineSpan_insert_affineSpan (p : P) (ps : Set P) :
    affineSpan k (insert p (affineSpan k ps : Set P)) = affineSpan k (insert p ps)

(k : Type u_1)
{V : Type u_2}
{P : Type u_3}
[Ring k]
[AddCommGroup V]
[Module k V]
[AffineSpace V P]
(p : P)
(ps : Set P)

affineSpan k (insert p ↑(affineSpan k ps)) = affineSpan k (insert p ps)


@[to_additive]
theorem mem_range_mulIndicator {r : M} {s : Set α} {f : α → M} :
    r ∈ range (mulIndicator s f) ↔ r = 1 ∧ s ≠ univ ∨ r ∈ f '' s

{α : Type u_1}
{M : Type u_4}
[One M]
{r : M}
{s : Set α}
{f : α → M}

r ∈ Set.range (s.mulIndicator f) ↔ r = 1 ∧ s ≠ Set.univ ∨ r ∈ f '' s


@[to_additive (attr := simp)]
theorem fst_inv [Inv G] [Inv H] (p : G × H) : p⁻¹.1 = p.1⁻¹

{G : Type u_3}
{H : Type u_4}
[Inv G]
[Inv H]
(p : G × H)


theorem Products.span_nil_eq_top :
    Submodule.span ℤ (eval ({fun _ ↦ false} : Set (I → Bool)) '' {nil}) = ⊤

Submodule.span ℤ (Profinite.NobelingProof.Products.eval {fun x => false} '' {Profinite.NobelingProof.Products.nil}) = ⊤


@[to_additive]
theorem Filter.Tendsto.const_mul (b : M) {c : M} {f : α → M} {l : Filter α}
    (h : Tendsto (fun k : α => f k) l (𝓝 c)) : Tendsto (fun k : α => b * f k) l (𝓝 (b * c))

(h : Filter.Tendsto (fun k => f k) l (𝓝 c))

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


lemma ProperSpace.of_locallyCompact_module [Nontrivial E] [LocallyCompactSpace E] :
    ProperSpace 𝕜

(𝕜 : Type u)
[NontriviallyNormedField 𝕜]
(E : Type v)
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
[CompleteSpace 𝕜]
[Nontrivial E]
[LocallyCompactSpace E]


/-- The orthogonal group of `F` is generated by reflections. -/
theorem LinearIsometryEquiv.reflections_generate [FiniteDimensional ℝ F] :
    Subgroup.closure (Set.range fun v : F => reflection (ℝ ∙ v)ᗮ) = ⊤

{F : Type u_3}
[NormedAddCommGroup F]
[InnerProductSpace ℝ F]
[FiniteDimensional ℝ F]

Subgroup.closure (Set.range fun v => reflection (Submodule.span ℝ {v})ᗮ) = ⊤


/-- The image of the closed-open interval `[a, a + p)` under the quotient map `𝕜 → AddCircle p` is
the entire space. -/
@[simp]
theorem coe_image_Ico_eq : ((↑) : 𝕜 → AddCircle p) '' Ico a (a + p) = univ

{𝕜 : Type u_1}
[LinearOrderedAddCommGroup 𝕜]
[TopologicalSpace 𝕜]
[OrderTopology 𝕜]
(p : 𝕜)
[hp : Fact (0 < p)]
(a : 𝕜)
[Archimedean 𝕜]

QuotientAddGroup.mk '' Set.Ico a (a + p) = Set.univ


theorem compProdFun_eq_tsum (κ : Kernel α β) [IsSFiniteKernel κ] (η : Kernel (α × β) γ)
    [IsSFiniteKernel η] (a : α) (hs : MeasurableSet s) :
    compProdFun κ η a s = ∑' (n) (m), compProdFun (seq κ n) (seq η m) a s

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

κ.compProdFun η a s = ∑' (n : ℕ) (m : ℕ), (κ.seq n).compProdFun (η.seq m) a s


@[simp] lemma IsUpperSet.disjoint_lowerClosure_left (ht : IsUpperSet t) :
    Disjoint ↑(lowerClosure s) t ↔ Disjoint s t

{α : Type u_1}
[Preorder α]
{s t : Set α}
(ht : IsUpperSet t)

Disjoint (↑(lowerClosure s)) t ↔ Disjoint s t


@[simp]
theorem reindexLinearEquiv_apply (eₘ : m ≃ m') (eₙ : n ≃ n') (M : Matrix m n A) :
    reindexLinearEquiv R A eₘ eₙ M = reindex eₘ eₙ M

{m : Type u_2}
{n : Type u_3}
{m' : Type u_6}
{n' : Type u_7}
(R : Type u_11)
(A : Type u_12)
[Semiring R]
[AddCommMonoid A]
[Module R A]
(eₘ : m ≃ m')
(eₙ : n ≃ n')
(M : Matrix m n A)

(Matrix.reindexLinearEquiv R A eₘ eₙ) M = (Matrix.reindex eₘ eₙ) M


/-- A family of points in projective space is independent if and only if the family of
submodules which the points determine is independent in the lattice-theoretic sense. -/
theorem independent_iff_completeLattice_independent :
    Independent f ↔ CompleteLattice.Independent fun i => (f i).submodule

{ι : Type u_1}
{K : Type u_2}
{V : Type u_3}
[DivisionRing K]
[AddCommGroup V]
[Module K V]
{f : ι → ℙ K V}

Projectivization.Independent f ↔ CompleteLattice.Independent fun i => (f i).submodule


theorem dvd_bmod_sub_self {x : Int} {m : Nat} : (m : Int) ∣ bmod x m - x


theorem comapEq_symm {β γ : Type w} {f g : β → γ} (h : f = g) :
    comapEq C h.symm = (comapEq C h).symm

(C : Type u)
[CategoryTheory.Category.{v, u} C]
{β γ : Type w}
{f g : β → γ}
(h : f = g)

CategoryTheory.GradedObject.comapEq C ⋯ = (CategoryTheory.GradedObject.comapEq C h).symm


lemma relativeDifferentials'_map_apply {X Y : Dᵒᵖ} (f : X ⟶ Y)
    (x : CommRingCat.KaehlerDifferential (φ'.app X)) :
    (relativeDifferentials' φ').map f x =
        CommRingCat.KaehlerDifferential.map (φ'.naturality f) x

(x : ↑(CommRingCat.KaehlerDifferential (φ'.app X)))

((PresheafOfModules.DifferentialsConstruction.relativeDifferentials' φ').map f) x =
  (CommRingCat.KaehlerDifferential.map ⋯) x


protected theorem ClosedEmbedding.measurableEmbedding {f : α → β} (h : ClosedEmbedding f) :
    MeasurableEmbedding f

{α : Type u_1}
{β : Type u_2}
[TopologicalSpace α]
[MeasurableSpace α]
[BorelSpace α]
[TopologicalSpace β]
[MeasurableSpace β]
[BorelSpace β]
{f : α → β}
(h : ClosedEmbedding f)


/-- The set of points for which a sequence of measurable functions converges to a given function
is measurable. -/
@[measurability]
lemma measurableSet_tendsto_fun [MeasurableSpace γ] [Countable ι]
    {l : Filter ι} [l.IsCountablyGenerated]
    [TopologicalSpace γ] [SecondCountableTopology γ] [PseudoMetrizableSpace γ]
    [OpensMeasurableSpace γ]
    {f : ι → β → γ} (hf : ∀ i, Measurable (f i)) {g : β → γ} (hg : Measurable g) :
    MeasurableSet { x | Tendsto (fun n ↦ f n x) l (𝓝 (g x)) }

{f : ι → β → γ}

MeasurableSet {x | Filter.Tendsto (fun n => f n x) l (𝓝 (g x))}


theorem add_neg {X Y : C} (a b : X ⟶ Y) : a + -b = a - b


@[simp]
theorem measureUnivNNReal_eq_zero [IsFiniteMeasure μ] : measureUnivNNReal μ = 0 ↔ μ = 0

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

MeasureTheory.measureUnivNNReal μ = 0 ↔ μ = 0


/-- Common factors on the right can be turned into common factors on the left, a weak form of
cancellability. -/
@[to_additive AddOreLocalization.ore_right_cancel]
theorem ore_right_cancel (r₁ r₂ : R) (s : S) (h : r₁ * s = r₂ * s) : ∃ s' : S, s' * r₁ = s' * r₂

{R : Type u_1}
[AddMonoid R]
{S : AddSubmonoid R}
[AddOreLocalization.AddOreSet S]
(r₁ r₂ : R)
(s : ↥S)
(h : r₁ + ↑s = r₂ + ↑s)


/-- A sheaf `P` is isomorphic to its own sheafification. -/
@[simps]
noncomputable def sheafificationIso (P : Sheaf J D) : P ≅ (presheafToSheaf J D).obj P.val

{J : CategoryTheory.GrothendieckTopology C}

(CategoryTheory.sheafificationIso P).inv.val = (CategoryTheory.isoSheafify J ⋯).inv


@[simp]
theorem map_σ (m : α → β) {f : Filter α} (F : f.Realizer) : (F.map m).σ = F.σ

{α : Type u_1}
{β : Type u_2}
(m : α → β)
{f : Filter α}
(F : f.Realizer)


theorem abs_rpow_le_abs_rpow (x y : ℝ) : |x ^ y| ≤ |x| ^ y


theorem mem_closure_iff_nhds' : x ∈ closure s ↔ ∀ t ∈ 𝓝 x, ∃ y : s, ↑y ∈ t

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


lemma piecewise_piecewise_of_subset_left {s t : Finset ι} [∀ i, Decidable (i ∈ s)]
    [∀ i, Decidable (i ∈ t)] (h : s ⊆ t) (f₁ f₂ g : ∀ a, π a) :
    s.piecewise (t.piecewise f₁ f₂) g = s.piecewise f₁ g

{ι : Type u_1}
{π : ι → Sort u_2}
{s t : Finset ι}
[(i : ι) → Decidable (i ∈ s)]
[(i : ι) → Decidable (i ∈ t)]
(h : s ⊆ t)
(f₁ f₂ g : (a : ι) → π a)


@[simp, norm_cast] lemma map_coe (f : α → β) (l : List α) : map f l = l.map f

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


@[mono]
lemma image_val_mono (h : D ⊆ E) : (↑D : Set α) ⊆ ↑E

{α : Type u_2}
{A : Set α}
{D E : Set ↑A}
(h : D ⊆ E)


/-- In the model space, any element of the groupoid is in the maximal atlas. -/
theorem StructureGroupoid.mem_maximalAtlas_of_mem_groupoid {f : PartialHomeomorph H H}
    (hf : f ∈ G) : f ∈ G.maximalAtlas H

{H : Type u}
[TopologicalSpace H]
(G : StructureGroupoid H)
{f : PartialHomeomorph H H}
(hf : f ∈ G)


lemma div_self {a : EReal} (h₁ : a ≠ ⊥) (h₂ : a ≠ ⊤) (h₃ : a ≠ 0) : a / a = 1


@[simp]
theorem const_comp (x : SimplexCategory) {y z : SimplexCategory}
    (f : y ⟶ z) (i : Fin (y.len + 1)) :
    const x y i ≫ f = const x z (f.toOrderHom i)

x.const y i ≫ f = x.const z ((SimplexCategory.Hom.toOrderHom f) i)


theorem IsNormal.trans {f g} (H₁ : IsNormal f) (H₂ : IsNormal g) : IsNormal (f ∘ g)

{f : Ordinal.{u_4} → Ordinal.{u_5}}
{g : Ordinal.{u_6} → Ordinal.{u_4}}
(H₁ : Ordinal.IsNormal f)
(H₂ : Ordinal.IsNormal g)


/-- If `B/A` is an injective ring extension, and `a` is an element of `A`,
then the minimal polynomial of `algebraMap A B a` is `X - C a`. -/
theorem eq_X_sub_C_of_algebraMap_inj (a : A) (hf : Function.Injective (algebraMap A B)) :
    minpoly A (algebraMap A B a) = X - C a

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

minpoly A ((algebraMap A B) a) = Polynomial.X - Polynomial.C a


theorem isLinearMap_of_compatibleSMul [Module S M] [Module S M₂] [CompatibleSMul M M₂ R S]
    (f : M →ₗ[S] M₂) : IsLinearMap R f

(R : Type u_1)
{S : Type u_6}
{M : Type u_9}
{M₂ : Type u_11}
[Semiring R]
[Semiring S]
[AddCommMonoid M]
[AddCommMonoid M₂]
[Module R M]
[Module R M₂]
[Module S M]
[Module S M₂]
[LinearMap.CompatibleSMul M M₂ R S]
(f : M →ₗ[S] M₂)


theorem intCast_def [Ring k] [AddZeroClass G] (z : ℤ) :
    (z : k[G]) = single (0 : G) (z : k)

{k : Type u₁}
{G : Type u₂}
[Ring k]
[AddZeroClass G]
(z : ℤ)


@[simp] theorem Thunk.sizeOf_eq [SizeOf α] (a : Thunk α) : sizeOf a = 1 + sizeOf a.get


theorem cons_ne_zero_iff : cons y s ≠ 0 ↔ y ≠ 0 ∨ s ≠ 0

{n : ℕ}
{M : Type u_1}
[Zero M]
{y : M}
{s : Fin n →₀ M}


@[to_additive (attr := simp)]
theorem map_pure (f : α → β) (x) : (f <$> pure x : FreeSemigroup β) = pure (f x)


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

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


theorem mem_maximals_iff_forall_lt_not_mem [Preorder α] {x : α} {s : Set α} :
    x ∈ maximals (· ≤ ·) s ↔ x ∈ s ∧ ∀ ⦃y⦄, x < y → y ∉ s

{α : Type u_1}
[Preorder α]
{x : α}
{s : Set α}

x ∈ maximals (fun x x_1 => x ≤ x_1) s ↔ x ∈ s ∧ ∀ ⦃y : α⦄, x < y → y ∉ s


@[simp]
theorem lt_eq_ssubset : ((· < ·) : Set α → Set α → Prop) = (· ⊂ ·)


theorem mem_cthickening_of_dist_le {α : Type*} [PseudoMetricSpace α] (x y : α) (δ : ℝ) (E : Set α)
    (h : y ∈ E) (h' : dist x y ≤ δ) : x ∈ cthickening δ E

{α : Type u_2}
[PseudoMetricSpace α]
(x y : α)
(δ : ℝ)
(E : Set α)
(h : y ∈ E)
(h' : dist x y ≤ δ)


@[to_additive]
theorem zpow_eq_zpow_iff_modEq {m n : ℤ} : x ^ m = x ^ n ↔ m ≡ n [ZMOD orderOf x]

{G : Type u_1}
[Group G]
{x : G}
{m n : ℤ}

x ^ m = x ^ n ↔ m ≡ n [ZMOD ↑(orderOf x)]


@[simp]
theorem closure_iUnion₂_closure (f : ∀ i, κ i → α) :
    l (⋃ (i) (j), l (f i j)) = l (⋃ (i) (j), f i j)

{α : Type u_1}
{ι : Sort u_2}
{κ : ι → Sort u_3}
{β : Type u_4}
[SetLike α β]
(l : LowerAdjoint SetLike.coe)
(f : (i : ι) → κ i → α)

l.toFun (⋃ i, ⋃ j, ↑(l.toFun ↑(f i j))) = l.toFun (⋃ i, ⋃ j, ↑(f i j))


/-- If a function `f` has a finite power series `p` around `x`, then the function
`z ↦ f (z - y)` has the same finite power series around `x + y`. -/
theorem HasFiniteFPowerSeriesOnBall.comp_sub (hf : HasFiniteFPowerSeriesOnBall f p x n r) (y : E) :
    HasFiniteFPowerSeriesOnBall (fun z => f (z - y)) p (x + y) n r


@[simp]
theorem self_trans_symm : e.trans e.symm = refl R E

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

e.trans e.symm = LinearIsometryEquiv.refl R E


theorem symm_bijective :
    Function.Bijective (PartialEquiv.symm : PartialEquiv α β → PartialEquiv β α)


theorem Ideal.IsPrime.isMaximal {R : Type*} [CommRing R] [DimensionLEOne R]
    {p : Ideal R} (h : p.IsPrime) (hp : p ≠ ⊥) : p.IsMaximal

{R : Type u_4}
[CommRing R]
[Ring.DimensionLEOne R]
{p : Ideal R}
(h : p.IsPrime)
(hp : p ≠ ⊥)


lemma iff_eventuallyEq_zpow_smul_analyticAt {f : 𝕜 → E} {x : 𝕜} : MeromorphicAt f x ↔
    ∃ (n : ℤ) (g : 𝕜 → E), AnalyticAt 𝕜 g x ∧ ∀ᶠ z in 𝓝[≠] x, f z = (z - x) ^ n • g z

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

MeromorphicAt f x ↔ ∃ n g, AnalyticAt 𝕜 g x ∧ ∀ᶠ (z : 𝕜) in 𝓝[≠] x, f z = (z - x) ^ n • g z


/-- If `a₁ a₂ : A ⟶ Y` is a kernel pair for `g : Y ⟶ Z`, then `a₁ ×[Z] X` and `a₂ ×[Z] X`
(`A ×[Z] X ⟶ Y ×[Z] X`) is a kernel pair for `Y ×[Z] X ⟶ X`. -/
protected theorem pullback {X Y Z A : C} {g : Y ⟶ Z} {a₁ a₂ : A ⟶ Y} (h : IsKernelPair g a₁ a₂)
    (f : X ⟶ Z) [HasPullback f g] [HasPullback f (a₁ ≫ g)] :
    IsKernelPair (pullback.fst f g)
      (pullback.map f _ f _ (𝟙 X) a₁ (𝟙 Z) (by simp) <| Category.comp_id _)
      (pullback.map _ _ _ _ (𝟙 X) a₂ (𝟙 Z) (by simp) <| (Category.comp_id _).trans h.1.1)

(h : CategoryTheory.IsKernelPair g a₁ a₂)

[CategoryTheory.Limits.HasPullback f (CategoryTheory.CategoryStruct.comp a₁ g)]

CategoryTheory.IsKernelPair (CategoryTheory.Limits.pullback.fst f g)
  (CategoryTheory.Limits.pullback.map f (CategoryTheory.CategoryStruct.comp a₁ g) f g
    (CategoryTheory.CategoryStruct.id X) a₁ (CategoryTheory.CategoryStruct.id Z) ⋯ ⋯)
  (CategoryTheory.Limits.pullback.map f (CategoryTheory.CategoryStruct.comp a₁ g) f g
    (CategoryTheory.CategoryStruct.id X) a₂ (CategoryTheory.CategoryStruct.id Z) ⋯ ⋯)


@[simp]
theorem support_eq_empty {f : Π₀ i, β i} : f.support = ∅ ↔ f = 0

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


theorem continuous_eval_const (x : Π i, E i) :
    Continuous fun p : ContinuousMultilinearMap 𝕜 E F ↦ p x

{𝕜 : Type u_1}
{ι : Type u_2}
{E : ι → Type u_3}
{F : Type u_4}
[NormedField 𝕜]
[(i : ι) → TopologicalSpace (E i)]
[(i : ι) → AddCommGroup (E i)]
[(i : ι) → Module 𝕜 (E i)]
[AddCommGroup F]
[Module 𝕜 F]
[TopologicalSpace F]
[TopologicalAddGroup F]
[∀ (i : ι), ContinuousSMul 𝕜 (E i)]
(x : (i : ι) → E i)


theorem one_sub_K_ne_zero (hf : ContractingWith K f) : (1 : ℝ≥0∞) - K ≠ 0

{α : Type u_1}
[EMetricSpace α]
{K : ℝ≥0}
{f : α → α}
(hf : ContractingWith K f)


/-- The inner product of a nonzero vector with a nonzero multiple of
itself, divided by the product of their norms, has absolute value
1. -/
theorem abs_real_inner_div_norm_mul_norm_eq_one_of_ne_zero_of_ne_zero_mul {x : F} {r : ℝ}
    (hx : x ≠ 0) (hr : r ≠ 0) : |⟪x, r • x⟫_ℝ| / (‖x‖ * ‖r • x‖) = 1

{F : Type u_3}
[NormedAddCommGroup F]
[InnerProductSpace ℝ F]
{x : F}
{r : ℝ}
(hx : x ≠ 0)
(hr : r ≠ 0)


@[simp] theorem isWF_singleton {a : α} : IsWF ({a} : Set α)


@[to_additive (attr := simp)]
theorem invRev_invRev : invRev (invRev L₁) = L₁

FreeAddGroup.negRev (FreeAddGroup.negRev L₁) = L₁


theorem to_rightInvOn (hf : AntilipschitzWith K f) {g : β → α} {t : Set β} (h : RightInvOn g f t) :
    LipschitzWith K (t.restrict g)

{α : Type u_1}
{β : Type u_2}
[PseudoEMetricSpace α]
[PseudoEMetricSpace β]
{K : ℝ≥0}
{f : α → β}
(hf : AntilipschitzWith K f)
{g : β → α}
{t : Set β}
(h : Set.RightInvOn g f t)


protected theorem bijective (e : M₁ ≃SL[σ₁₂] M₂) : Function.Bijective e

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


/-- A morphism of schemes is surjective if the underlying map is. -/
@[mk_iff]
class Surjective : Prop where
  surj : Function.Surjective f.1.base

{X Y : AlgebraicGeometry.Scheme}
{f : X ⟶ Y}
[self : AlgebraicGeometry.Surjective f]


protected theorem UniformSpace.le_sInf {tt : Set (UniformSpace α)} {t : UniformSpace α}
    (h : ∀ t' ∈ tt, t ≤ t') : t ≤ sInf tt

{α : Type ua}
{tt : Set (UniformSpace α)}
{t : UniformSpace α}
(h : ∀ t' ∈ tt, t ≤ t')


@[simp]
theorem trace_prod_apply [Module.Free R S] [Module.Free R T] [Module.Finite R S] [Module.Finite R T]
    (x : S × T) : trace R (S × T) x = trace R S x.fst + trace R T x.snd

{R : Type u_1}
{S : Type u_2}
{T : Type u_3}
[CommRing R]
[CommRing S]
[CommRing T]
[Algebra R S]
[Algebra R T]
[Module.Free R S]
[Module.Free R T]
[Module.Finite R S]
[Module.Finite R T]
(x : S × T)

(Algebra.trace R (S × T)) x = (Algebra.trace R S) x.1 + (Algebra.trace R T) x.2


@[simp]
theorem C (r : R) : IsSymmetric (C r : MvPolynomial σ R)

{σ : Type u_1}
{R : Type u_2}
[CommSemiring R]
(r : R)


/-- `P.complement` is the formal direct factor of `P.X` given by the idempotent
endomorphism `𝟙 P.X - P.p` -/
@[simps]
def complement (P : Karoubi C) : Karoubi C

(P : CategoryTheory.Idempotents.Karoubi C)

P.complement.p = CategoryTheory.CategoryStruct.id P.X - P.p


@[simp]
theorem zero_apply (v : V₁) : (0 : NormedAddGroupHom V₁ V₂) v = 0

{V₁ : Type u_2}
{V₂ : Type u_3}
[SeminormedAddCommGroup V₁]
[SeminormedAddCommGroup V₂]
(v : V₁)


/-- `mapCone` commutes with `whisker`
-/
@[simps!]
def mapConeWhisker {E : K ⥤ J} {c : Cone F} : mapCone H (c.whisker E) ≅ (mapCone H c).whisker E

{J : Type u₁}
[CategoryTheory.Category.{v₁, u₁} J]
{K : Type u₂}
[CategoryTheory.Category.{v₂, u₂} K]
{C : Type u₃}
[CategoryTheory.Category.{v₃, u₃} C]
{D : Type u₄}
[CategoryTheory.Category.{v₄, u₄} D]
(H : C ⥤ D)
{F : J ⥤ C}
{E : K ⥤ J}
{c : CategoryTheory.Limits.Cone F}

H.mapConeWhisker.inv.hom = 𝟙 (H.obj c.pt)


theorem toIocMod_periodic (a : α) : Function.Periodic (toIocMod hp a) p

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


theorem exists_eq_pow_mul_of_is_compact_of_quasi_separated_space_aux_aux {X : TopCat}
    (F : X.Presheaf CommRingCat) {U₁ U₂ U₃ U₄ U₅ U₆ U₇ : Opens X} {n₁ n₂ : ℕ}
    {y₁ : F.obj (op U₁)} {y₂ : F.obj (op U₂)} {f : F.obj (op <| U₁ ⊔ U₂)}
    {x : F.obj (op U₃)} (h₄₁ : U₄ ≤ U₁) (h₄₂ : U₄ ≤ U₂) (h₅₁ : U₅ ≤ U₁) (h₅₃ : U₅ ≤ U₃)
    (h₆₂ : U₆ ≤ U₂) (h₆₃ : U₆ ≤ U₃) (h₇₄ : U₇ ≤ U₄) (h₇₅ : U₇ ≤ U₅) (h₇₆ : U₇ ≤ U₆)
    (e₁ : y₁ |_ U₅ = (f |_ U₁ |_ U₅) ^ n₁ * x |_ U₅)
    (e₂ : y₂ |_ U₆ = (f |_ U₂ |_ U₆) ^ n₂ * x |_ U₆) :
    (((f |_ U₁) ^ n₂ * y₁) |_ U₄) |_ U₇ = (((f |_ U₂) ^ n₁ * y₂) |_ U₄) |_ U₇

{U₁ U₂ U₃ U₄ U₅ U₆ U₇ : TopologicalSpace.Opens ↑X}

(e₁ : (y₁ |_ U₅) h₅₁ = ((f |_ U₁) ⋯ |_ U₅) h₅₁ ^ n₁ * (x |_ U₅) h₅₃)

(e₂ : (y₂ |_ U₆) h₆₂ = ((f |_ U₂) ⋯ |_ U₆) h₆₂ ^ n₂ * (x |_ U₆) h₆₃)

((((f |_ U₁) ⋯ ^ n₂ * y₁) |_ U₄) h₄₁ |_ U₇) h₇₄ = ((((f |_ U₂) ⋯ ^ n₁ * y₂) |_ U₄) h₄₂ |_ U₇) h₇₄


@[simp]
theorem conjTranspose_eq_diagonal [DecidableEq n] [AddMonoid α] [StarAddMonoid α]
    {M : Matrix n n α} {v : n → α} :
    Mᴴ = diagonal v ↔ M = diagonal (star v)

{n : Type u_3}
{α : Type v}
[DecidableEq n]
[AddMonoid α]
[StarAddMonoid α]
{M : Matrix n n α}
{v : n → α}

Mᴴ = Matrix.diagonal v ↔ M = Matrix.diagonal (star v)


/-- `SignType.cast` as a `MulWithZeroHom`. -/
@[simps]
def castHom {α} [MulZeroOneClass α] [HasDistribNeg α] : SignType →*₀ α

{α : Type u_1}
[MulZeroOneClass α]
[HasDistribNeg α]

∀ (a : SignType), SignType.castHom a = ↑a


@[simp, norm_cast]
theorem coe_lt_coe : (p : E → ℝ) < q ↔ p < q

{E : Type u_4}
[AddGroup E]
{p q : NonarchAddGroupSeminorm E}


/-- A topological space is metrizable if there exists a metric space structure compatible with the
topology. To endow such a space with a compatible distance, use
`letI : MetricSpace X := TopologicalSpace.metrizableSpaceMetric X`. -/
class MetrizableSpace (X : Type*) [t : TopologicalSpace X] : Prop where
  exists_metric : ∃ m : MetricSpace X, m.toUniformSpace.toTopologicalSpace = t

[self : TopologicalSpace.MetrizableSpace X]

∃ m, UniformSpace.toTopologicalSpace = t


@[simp]
theorem equiv_symm (f : α ≃ₜ β) : Compacts.equiv f.symm = (Compacts.equiv f).symm

{α : Type u_1}
{β : Type u_2}
[TopologicalSpace α]
[TopologicalSpace β]
(f : α ≃ₜ β)

TopologicalSpace.Compacts.equiv f.symm = (TopologicalSpace.Compacts.equiv f).symm


@[simp] lemma Nat.sum_eq_listSum (l : List ℕ) : Nat.sum l = l.sum


/-- The embedding of `β` into the sum `α ⊕ β`. -/
@[simps]
def inr {α β : Type*} : β ↪ α ⊕ β

Function.Embedding.inr val = Sum.inr val


(K : Type u_1)
[Field K]
[NumberField K]
[DecidableEq (K →+* ℂ)]


theorem mem_of_mem_erase : b ∈ erase s a → b ∈ s

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


@[simp]
theorem degree_map [Semiring S] [Nontrivial S] (p : R[X]) (f : R →+* S) :
    degree (p.map f) = degree p

{R : Type u}
{S : Type v}
[DivisionRing R]
[Semiring S]
[Nontrivial S]
(p : R[X])
(f : R →+* S)


theorem Filter.EventuallyEq.lineDerivWithin_eq (hs : f₁ =ᶠ[𝓝[s] x] f) (hx : f₁ x = f x) :
    lineDerivWithin 𝕜 f₁ s x v = lineDerivWithin 𝕜 f s x v

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{F : Type u_2}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{E : Type u_3}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{f f₁ : E → F}
{s : Set E}
{x v : E}
(hs : f₁ =ᶠ[𝓝[s] x] f)
(hx : f₁ x = f x)


theorem minpoly_eq (x : S) : minpoly K x = minpoly K (x : L)

{K : Type u_1}
{L : Type u_2}
[Field K]
[Field L]
[Algebra K L]
{S : IntermediateField K L}
(x : ↥S)


theorem H0LequivOfIsTrivial_apply [A.IsTrivial] (x : H0 A) :
    H0LequivOfIsTrivial A x = x

{k G : Type u}
[CommRing k]
[Group G]
(A : Rep k G)
[A.IsTrivial]
(x : ↥(groupCohomology.H0 A))

(groupCohomology.H0LequivOfIsTrivial A) x = ↑x


theorem vector_toList {n} : Computable (@Vector.toList α n)


theorem Ico_subset_Ioo_left (h₁ : a₁ < a₂) : Ico a₂ b ⊆ Ioo a₁ b

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


theorem IsPreconnected.preimage_of_isOpenMap [TopologicalSpace β] {f : α → β} {s : Set β}
    (hs : IsPreconnected s) (hinj : Function.Injective f) (hf : IsOpenMap f) (hsf : s ⊆ range f) :
    IsPreconnected (f ⁻¹' s)

{α : Type u}
{β : Type v}
[TopologicalSpace α]
[TopologicalSpace β]
{f : α → β}
{s : Set β}
(hs : IsPreconnected s)
(hinj : Function.Injective f)
(hf : IsOpenMap f)
(hsf : s ⊆ Set.range f)


theorem le_succFn (i : ι) : i ≤ succFn i


theorem of_ne_one_ne_zero {z : ℤ} (hp : p ≠ 1) (hz : z ≠ 0) :
    padicValInt p z =
      (multiplicity (p : ℤ) z).get
        (by
          apply multiplicity.finite_int_iff.2
          simp [hp, hz])

padicValInt p z = (multiplicity (↑p) z).get ⋯


theorem ker_ne_top [Nontrivial S] (f : F) : ker f ≠ ⊤

{R : Type u}
{S : Type v}
{F : Type u_1}
[Semiring R]
[Semiring S]
[FunLike F R S]
[rcf : RingHomClass F R S]
[Nontrivial S]
(f : F)


theorem locallyConvexSpace_iff :
    LocallyConvexSpace 𝕜 E ↔ ∀ x : E, (𝓝 x).HasBasis (fun s : Set E => s ∈ 𝓝 x ∧ Convex 𝕜 s) id

(𝕜 : Type u_1)
(E : Type u_2)
[OrderedSemiring 𝕜]
[AddCommMonoid E]
[Module 𝕜 E]
[TopologicalSpace E]

LocallyConvexSpace 𝕜 E ↔ ∀ (x : E), (𝓝 x).HasBasis (fun s => s ∈ 𝓝 x ∧ Convex 𝕜 s) id


theorem isFractional_span_singleton (x : P) : IsFractional S (span R {x} : Submodule R P)

{R : Type u_1}
[CommRing R]
{S : Submonoid R}
{P : Type u_2}
[CommRing P]
[Algebra R P]
[loc : IsLocalization S P]
(x : P)


/-- This is [grinberg_clifford_2016][] Theorem 7 -/
theorem contractLeft_contractLeft (x : CliffordAlgebra Q) : d⌋(d⌋x) = 0

{R : Type u1}
[CommRing R]
{M : Type u2}
[AddCommGroup M]
[Module R M]
{Q : QuadraticForm R M}
(d : Module.Dual R M)
(x : CliffordAlgebra Q)

(CliffordAlgebra.contractLeft d) ((CliffordAlgebra.contractLeft d) x) = 0


@[to_additive sub_nsmul_nsmul_add]
lemma pow_sub_mul_pow (a : M) (h : m ≤ n) : a ^ (n - m) * a ^ m = a ^ n

{M : Type u_4}
[Monoid M]
{m n : ℕ}
(a : M)
(h : m ≤ n)


/-- The technical version of *Legendre's Theorem*. -/
theorem exists_rat_eq_convergent' {v : ℕ} (h' : ContfracLegendre.Ass ξ u v) :
    ∃ n, (u / v : ℚ) = ξ.convergent n

{ξ : ℝ}
{u : ℤ}
{v : ℕ}
(h' : Real.ContfracLegendre.Ass ξ u ↑v)


theorem smul_le_smul {s t : SetSemiring A} {M N : Submodule R A}
    (h₁ : SetSemiring.down (α := A) s ⊆ SetSemiring.down (α := A) t)
    (h₂ : M ≤ N) : s • M ≤ t • N

(h₁ : SetSemiring.down s ⊆ SetSemiring.down t)


theorem one_apply {x : ℕ} : (1 : ArithmeticFunction R) x = ite (x = 1) 1 0


theorem mul_apply_one [Semiring R] {f g : ArithmeticFunction R} : (f * g) 1 = f 1 * g 1

{R : Type u_1}
[Semiring R]
{f g : ArithmeticFunction R}


theorem mem_isPrincipalSubmonoid_iff {I : Ideal R} :
    I ∈ isPrincipalSubmonoid R ↔ IsPrincipal I

{R : Type u_1}
[CommRing R]
{I : Ideal R}

I ∈ Ideal.isPrincipalSubmonoid R ↔ Submodule.IsPrincipal I


theorem map' {f : M → N} (hf : IsMonoidHom f) {x : M} (h : IsUnit x) : IsUnit (f x)

{M : Type u_1}
{N : Type u_2}
[Monoid M]
[Monoid N]
{f : M → N}
(hf : IsMonoidHom f)
{x : M}
(h : IsUnit x)


theorem powersetCard_zero_right (n : ℕ) : @powersetCard α (n + 1) 0 = 0


@[simp]
theorem fst_re_dualNumberEquiv_symm (d : DualNumber (Quaternion R)) :
    (dualNumberEquiv.symm d).re.fst = d.fst.re

{R : Type u_1}
[CommRing R]
(d : DualNumber (Quaternion R))

TrivSqZeroExt.fst (Quaternion.dualNumberEquiv.symm d).re = (TrivSqZeroExt.fst d).re


/-- When both maps `S.f` and `S.g` of a short complex `S` are zero, this is the left homology map
data (for the identity of `S`) which relates the left homology data `ofZeros` and
`ofIsColimitCokernelCofork`. -/
@[simps]
def compatibilityOfZerosOfIsColimitCokernelCofork (hf : S.f = 0) (hg : S.g = 0)
    (c : CokernelCofork S.f) (hc : IsColimit c) :
    LeftHomologyMapData (𝟙 S) (LeftHomologyData.ofZeros S hf hg)
      (LeftHomologyData.ofIsColimitCokernelCofork S hg c hc)

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

(hc : CategoryTheory.Limits.IsColimit c)

(CategoryTheory.ShortComplex.LeftHomologyMapData.compatibilityOfZerosOfIsColimitCokernelCofork S hf hg c hc).φK =
  CategoryTheory.CategoryStruct.id (CategoryTheory.ShortComplex.LeftHomologyData.ofZeros S hf hg).K


theorem tendsto_sub : ∀ {a b : ℝ≥0∞}, (a ≠ ∞ ∨ b ≠ ∞) →
    Tendsto (fun p : ℝ≥0∞ × ℝ≥0∞ => p.1 - p.2) (𝓝 (a, b)) (𝓝 (a - b))

a ≠ ⊤ ∨ b ≠ ⊤ → Filter.Tendsto (fun p => p.1 - p.2) (𝓝 (a, b)) (𝓝 (a - b))


nonrec theorem continuous_fst : Continuous (fst : tsze R M → R)

{R : Type u_3}
{M : Type u_4}
[TopologicalSpace R]
[TopologicalSpace M]


theorem partitionable_iff_colorable {n : ℕ} : G.Partitionable n ↔ G.Colorable n

{V : Type u}
{G : SimpleGraph V}
{n : ℕ}


lemma counitForward_counitBackward (F : (CostructuredArrow yoneda A)ᵒᵖ ⥤ Type v)
    (s : CostructuredArrow yoneda A) : counitForward F s ∘ counitBackward F s = id

{A : CategoryTheory.Functor Cᵒᵖ (Type v)}

(F : CategoryTheory.Functor (CategoryTheory.CostructuredArrow CategoryTheory.yoneda A)ᵒᵖ (Type v))

(s : CategoryTheory.CostructuredArrow CategoryTheory.yoneda A)

CategoryTheory.OverPresheafAux.counitForward F s ∘ CategoryTheory.OverPresheafAux.counitBackward F s = id


@[simps]
def Triangle.homMk (A B : Triangle C)
    (hom₁ : A.obj₁ ⟶ B.obj₁) (hom₂ : A.obj₂ ⟶ B.obj₂) (hom₃ : A.obj₃ ⟶ B.obj₃)
    (comm₁ : A.mor₁ ≫ hom₂ = hom₁ ≫ B.mor₁ := by aesop_cat)
    (comm₂ : A.mor₂ ≫ hom₃ = hom₂ ≫ B.mor₂ := by aesop_cat)
    (comm₃ : A.mor₃ ≫ hom₁⟦1⟧' = hom₃ ≫ B.mor₃ := by aesop_cat) :
    A ⟶ B

(A B : CategoryTheory.Pretriangulated.Triangle C)

(comm₃ : A.mor₃ ≫ (CategoryTheory.shiftFunctor C 1).map hom₁ = hom₃ ≫ B.mor₃ := by aesop_cat)

(A.homMk B hom₁ hom₂ hom₃ comm₁ comm₂ comm₃).hom₂ = hom₂


@[simp]
theorem compl_inj_iff : xᶜ = yᶜ ↔ x = y

{α : Type u}
{x y : α}
[BooleanAlgebra α]


/-- Right unit cancellation `X ⊗ 1 ≅ X` in `Dial C`. -/
@[simps!] def rightUnitor (X : Dial C) : tensorObj X tensorUnit ≅ X

X.rightUnitor.inv.f =
  CategoryTheory.Limits.prod.lift (CategoryTheory.CategoryStruct.id X.src) (CategoryTheory.Limits.terminal.from X.src)


lemma card_eq_card_toFinset (s : Set α) [Fintype s] : Nat.card s = s.toFinset.card


theorem arg_ofReal_of_nonneg {x : ℝ} (hx : 0 ≤ x) : arg x = 0


theorem mem_iff_ultrafilter : s ∈ f ↔ ∀ g : Ultrafilter α, ↑g ≤ f → s ∈ g

s ∈ f ↔ ∀ (g : Ultrafilter α), ↑g ≤ f → s ∈ g


@[deprecated next_get (since := "2023-01-27")]
theorem next_nthLe (l : List α) (h : Nodup l) (n : ℕ) (hn : n < l.length) :
    next l (l.nthLe n hn) (nthLe_mem _ _ _) =
      l.nthLe ((n + 1) % l.length) (Nat.mod_lt _ (n.zero_le.trans_lt hn))

{α : Type u_1}
[DecidableEq α]
(l : List α)
(h : l.Nodup)
(n : ℕ)
(hn : n < l.length)

l.next (l.nthLe n hn) ⋯ = l.nthLe ((n + 1) % l.length) ⋯


/-- The rank of the composition of two maps is less than the minimum of their ranks. -/
theorem lift_rank_comp_le (g : V →ₗ[K] V') (f : V' →ₗ[K] V'') :
    Cardinal.lift.{v'} (rank (f.comp g)) ≤
      min (Cardinal.lift.{v'} (rank f)) (Cardinal.lift.{v''} (rank g))

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

Cardinal.lift.{v', v''} (f ∘ₗ g).rank ≤ min (Cardinal.lift.{v', v''} f.rank) (Cardinal.lift.{v'', v'} g.rank)


/-- Maps a sentence's symbols along a language equivalence. -/
@[simps!] -- Porting note: add `!` to `simps`
def onSentence (φ : L ≃ᴸ L') : L.Sentence ≃ L'.Sentence

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

∀ (a : L.BoundedFormula Empty 0), φ.onSentence a = φ.toLHom.onBoundedFormula a


theorem exists_antitone_seq (f : Filter α) [f.IsCountablyGenerated] :
    ∃ x : ℕ → Set α, Antitone x ∧ ∀ {s}, s ∈ f ↔ ∃ i, x i ⊆ s

{α : Type u_1}
(f : Filter α)
[f.IsCountablyGenerated]

∃ x, Antitone x ∧ ∀ {s : Set α}, s ∈ f ↔ ∃ i, x i ⊆ s


theorem coe_stdBasis (i : ι) : ⇑(stdBasis R φ i) = Pi.single i

(R : Type u_1)
{ι : Type u_2}
[Semiring R]
(φ : ι → Type u_3)
[(i : ι) → AddCommMonoid (φ i)]
[(i : ι) → Module R (φ i)]
[DecidableEq ι]
(i : ι)

⇑(LinearMap.stdBasis R φ i) = Pi.single i


theorem prod_eq_inf {A : C} {f₁ f₂ : Subobject A} [HasBinaryProduct f₁ f₂] :
    (f₁ ⨯ f₂) = f₁ ⊓ f₂


/-- The braiding isomorphism which swaps a binary coproduct. -/
@[simps]
def coprod.braiding (P Q : C) : P ⨿ Q ≅ Q ⨿ P

(CategoryTheory.Limits.coprod.braiding P Q).inv =
  CategoryTheory.Limits.coprod.desc CategoryTheory.Limits.coprod.inr CategoryTheory.Limits.coprod.inl


/-- This cannot be an instance because it can cause infinite loops whenever the `SMul` arguments
are still metavariables. -/
@[to_additive
"This cannot be an instance because it can cause infinite loops whenever the `VAdd` arguments
are still metavariables."]
lemma comp.smulCommClass' [SMul β α] [SMulCommClass β M α] (g : N → M) :
    haveI := comp α g
    SMulCommClass β N α

{M : Type u_1}
{N : Type u_2}
{α : Type u_7}
{β : Type u_8}
[SMul M α]
[SMul β α]
[SMulCommClass β M α]
(g : N → M)


@[congr]
theorem iInter_congr_Prop {p q : Prop} {f₁ : p → Set α} {f₂ : q → Set α} (pq : p ↔ q)
    (f : ∀ x, f₁ (pq.mpr x) = f₂ x) : iInter f₁ = iInter f₂

{α : Type u_1}
{p q : Prop}
{f₁ : p → Set α}
{f₂ : q → Set α}
(pq : p ↔ q)
(f : ∀ (x : q), f₁ ⋯ = f₂ x)


protected theorem mul_div_mul_right (a b : ℝ≥0∞) (hc : c ≠ 0) (hc' : c ≠ ⊤) :
    a * c / (b * c) = a / b

{c : ENNReal}
(a b : ENNReal)
(hc : c ≠ 0)
(hc' : c ≠ ⊤)


@[simp] theorem mul_div_left (m : Nat) {n : Nat} (H : 0 < n) : m * n / n = m


@[to_additive (attr := simp, norm_cast)]
theorem val_one : ((1 : αˣ) : α) = 1


theorem closure_sup_closure (x y : α) : c (c x ⊔ c y) = c (x ⊔ y)

{α : Type u_1}
[SemilatticeSup α]
(c : ClosureOperator α)
(x y : α)


theorem Filter.HasBasis.nhds_interior {x : X} {p : ι → Prop} {s : ι → Set X}
    (h : (𝓝 x).HasBasis p s) : (𝓝 x).HasBasis p (interior <| s ·)

{X : Type u}
{ι : Sort w}
[TopologicalSpace X]
{x : X}
{p : ι → Prop}
{s : ι → Set X}
(h : (𝓝 x).HasBasis p s)

(𝓝 x).HasBasis p fun x => interior (s x)


@[simp, norm_cast]
theorem castNum_or : ∀ m n : Num, ↑(m ||| n) = (↑m ||| ↑n : ℕ)


theorem IsOpen.upperSemicontinuousOn_indicator (hs : IsOpen s) (hy : y ≤ 0) :
    UpperSemicontinuousOn (indicator s fun _x => y) t

{α : Type u_1}
[TopologicalSpace α]
{β : Type u_2}
[Preorder β]
{s t : Set α}
{y : β}
[Zero β]
(hs : IsOpen s)
(hy : y ≤ 0)

UpperSemicontinuousOn (s.indicator fun _x => y) t


/-- `-a ≤ b ↔ -b ≤ a` on `EReal`. -/
protected theorem neg_le {a b : EReal} : -a ≤ b ↔ -b ≤ a


/-- See `zero_lt_two` for a version with the type implicit. -/
lemma zero_lt_two' : (0 : α) < 2

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


@[simp]
theorem Ico_eq_empty_of_le (h : b ≤ a) : Ico a b = ∅

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


theorem Convex.convex_remove_iff_not_mem_convexHull_remove {s : Set E} (hs : Convex 𝕜 s) (x : E) :
    Convex 𝕜 (s \ {x}) ↔ x ∉ convexHull 𝕜 (s \ {x})

{𝕜 : Type u_1}
{E : Type u_2}
[OrderedSemiring 𝕜]
[AddCommMonoid E]
[Module 𝕜 E]
{s : Set E}
(hs : Convex 𝕜 s)
(x : E)

Convex 𝕜 (s \ {x}) ↔ x ∉ (convexHull 𝕜) (s \ {x})


theorem continuousAt_infty' {Y : Type*} [TopologicalSpace Y] {f : OnePoint X → Y} :
    ContinuousAt f ∞ ↔ Tendsto (f ∘ (↑)) (coclosedCompact X) (𝓝 (f ∞))

{X : Type u_1}
[TopologicalSpace X]
{Y : Type u_2}
[TopologicalSpace Y]
{f : OnePoint X → Y}

ContinuousAt f OnePoint.infty ↔ Filter.Tendsto (f ∘ OnePoint.some) (Filter.coclosedCompact X) (𝓝 (f OnePoint.infty))


/-- If the set where you want `f` to be smooth lies entirely in a single chart, and `f` maps it
  into a single chart, the smoothness of `f` on that set can be expressed by purely looking in
  these charts.
  Note: this lemma uses `extChartAt I x '' s` instead of `(extChartAt I x).symm ⁻¹' s` to ensure
  that this set lies in `(extChartAt I x).target`. -/
theorem contMDiffOn_iff_of_subset_source' {x : M} {y : M'} (hs : s ⊆ (extChartAt I x).source)
    (h2s : MapsTo f s (extChartAt I' y).source) :
    ContMDiffOn I I' n f s ↔
        ContDiffOn 𝕜 n (extChartAt I' y ∘ f ∘ (extChartAt I x).symm) (extChartAt I x '' s)

(h2s : Set.MapsTo f s (extChartAt I' y).source)

ContMDiffOn I I' n f s ↔ ContDiffOn 𝕜 n (↑(extChartAt I' y) ∘ f ∘ ↑(extChartAt I x).symm) (↑(extChartAt I x) '' s)


theorem injOn_range (h : Semiconj f fa fb) (ha : Injective fa) (hf : InjOn f (range fa)) :
    InjOn fb (range f)

{α : Type u_1}
{β : Type u_2}
{fa : α → α}
{fb : β → β}
{f : α → β}
(h : Function.Semiconj f fa fb)
(ha : Function.Injective fa)
(hf : Set.InjOn f (Set.range fa))


theorem lift_word_prod_nontrivial_of_head_card {i j} (w : NeWord H i j) (hcard : 3 ≤ #(H i))
    (hheadtail : i ≠ j) : lift f w.prod ≠ 1

(hXnonempty : ∀ (i : ι), (X i).Nonempty)

(hXdisj : Pairwise fun i j => Disjoint (X i) (X j))

(hpp : Pairwise fun i j => ∀ (h : H i), h ≠ 1 → (f i) h • X j ⊆ X i)


theorem congr_fun (h : Q = Q') (x : M) : Q x = Q' x

{R : Type u_3}
{M : Type u_4}
{N : Type u_5}
[CommSemiring R]
[AddCommMonoid M]
[Module R M]
[AddCommMonoid N]
[Module R N]
{Q Q' : QuadraticMap R M N}
(h : Q = Q')
(x : M)


protected theorem IsUnit.star [Monoid R] [StarMul R] {a : R} : IsUnit a → IsUnit (star a)

{R : Type u}
[Monoid R]
[StarMul R]
{a : R}


theorem multiplicity_eq_factorization {n p : ℕ} (pp : p.Prime) (hn : n ≠ 0) :
    multiplicity p n = n.factorization p

{n p : ℕ}
(pp : Nat.Prime p)
(hn : n ≠ 0)


@[rify_simps] lemma ratCast_lt (a b : ℚ) : a < b ↔ (a : ℝ) < (b : ℝ)


theorem mul_equiv_zero' (g : CauSeq _ abv) {f : CauSeq _ abv} (hf : f ≈ 0) : f * g ≈ 0

{α : Type u_1}
{β : Type u_2}
[LinearOrderedField α]
[Ring β]
{abv : β → α}
[IsAbsoluteValue abv]
(g : CauSeq β abv)
{f : CauSeq β abv}
(hf : f ≈ 0)


@[to_additive]
theorem mul_mem_sup {S T : Submonoid M} {x y : M} (hx : x ∈ S) (hy : y ∈ T) : x * y ∈ S ⊔ T

{M : Type u_1}
[MulOneClass M]
{S T : Submonoid M}
{x y : M}
(hx : x ∈ S)
(hy : y ∈ T)


@[to_additive]
theorem isUnit_iff_mulLeft_bijective {a : M} :
    IsUnit a ↔ Function.Bijective (a * ·)

IsAddUnit a ↔ Function.Bijective fun x => a + x


theorem _root_.Polynomial.Monic.isEisensteinAt_of_mem_of_not_mem (hf : f.Monic) (h : 𝓟 ≠ ⊤)
    (hmem : ∀ {n}, n < f.natDegree → f.coeff n ∈ 𝓟) (hnot_mem : f.coeff 0 ∉ 𝓟 ^ 2) :
    f.IsEisensteinAt 𝓟

(hmem : ∀ {n : ℕ}, n < f.natDegree → f.coeff n ∈ 𝓟)


theorem coeff_hermite (n k : ℕ) :
    coeff (hermite n) k =
      if Even (n + k) then (-1 : ℤ) ^ ((n - k) / 2) * (n - k - 1)‼ * Nat.choose n k else 0

(Polynomial.hermite n).coeff k =
  if Even (n + k) then (-1) ^ ((n - k) / 2) * ↑(n - k - 1).doubleFactorial * ↑(n.choose k) else 0


@[to_additive]
theorem comap_sup_comap_le (H K : Subgroup N) (f : G →* N) :
    comap f H ⊔ comap f K ≤ comap f (H ⊔ K)

{G : Type u_1}
[AddGroup G]
{N : Type u_5}
[AddGroup N]
(H K : AddSubgroup N)
(f : G →+ N)

AddSubgroup.comap f H ⊔ AddSubgroup.comap f K ≤ AddSubgroup.comap f (H ⊔ K)


/-- Two parametrizations `orderEmbOfFin` of the same set take the same value on `i` and `j` if
and only if `i = j`. Since they can be defined on a priori not defeq types `Fin k` and `Fin l`
(although necessarily `k = l`), the conclusion is rather written `(i : ℕ) = (j : ℕ)`. -/
@[simp]
theorem orderEmbOfFin_eq_orderEmbOfFin_iff {k l : ℕ} {s : Finset α} {i : Fin k} {j : Fin l}
    {h : s.card = k} {h' : s.card = l} :
    s.orderEmbOfFin h i = s.orderEmbOfFin h' j ↔ (i : ℕ) = (j : ℕ)

{α : Type u_1}
[LinearOrder α]
{k l : ℕ}
{s : Finset α}
{i : Fin k}
{j : Fin l}
{h : s.card = k}
{h' : s.card = l}

(s.orderEmbOfFin h) i = (s.orderEmbOfFin h') j ↔ ↑i = ↑j


theorem corecF_eq {α : TypeVec n} {β : Type u} (g : β → F (α.append1 β)) (x : β) :
    M.dest q.P (corecF g x) = appendFun id (corecF g) <$$> repr (g x)

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

MvPFunctor.M.dest (MvQPF.P F) (MvQPF.corecF g x) = (TypeVec.id ::: MvQPF.corecF g) <$$> MvQPF.repr (g x)


/-- Generalization of `Finsupp.mul_prod_erase`: if `g` maps a second argument of 0 to 1,
then its product over `f : α →₀ M` is the same as multiplying the value on any element
`y : α` by the product over `erase y f`. -/
@[to_additive
      " Generalization of `Finsupp.add_sum_erase`: if `g` maps a second argument of 0
      to 0, then its sum over `f : α →₀ M` is the same as adding the value on any element
      `y : α` to the sum over `erase y f`. "]
theorem mul_prod_erase' (f : α →₀ M) (y : α) (g : α → M → N) (hg : ∀ i : α, g i 0 = 1) :
    g y (f y) * (erase y f).prod g = f.prod g

{α : Type u_1}
{M : Type u_8}
{N : Type u_10}
[Zero M]
[CommMonoid N]
(f : α →₀ M)
(y : α)
(g : α → M → N)
(hg : ∀ (i : α), g i 0 = 1)

g y (f y) * (Finsupp.erase y f).prod g = f.prod g


@[to_additive]
theorem finprod_congr {f g : α → M} (h : ∀ x, f x = g x) : finprod f = finprod g

{M : Type u_2}
{α : Sort u_4}
[CommMonoid M]
{f g : α → M}
(h : ∀ (x : α), f x = g x)


theorem intentClosure_iUnion₂ (f : ∀ i, κ i → Set α) :
    intentClosure r (⋃ (i) (j), f i j) = ⋂ (i) (j), intentClosure r (f i j)

{ι : Sort u_1}
{α : Type u_2}
{β : Type u_3}
{κ : ι → Sort u_5}
(r : α → β → Prop)
(f : (i : ι) → κ i → Set α)

intentClosure r (⋃ i, ⋃ j, f i j) = ⋂ i, ⋂ j, intentClosure r (f i j)


/-- A specific witness of `pfilter.nonempty` when `P` has a top element. -/
@[simp] theorem top_mem : ⊤ ∈ F

{P : Type u_1}
[Preorder P]
[OrderTop P]
{F : Order.PFilter P}


theorem map_coe_atTop_of_Ioo_subset (hb : s ⊆ Iio b) (hs : ∀ a' < b, ∃ a < b, Ioo a b ⊆ s) :
    map ((↑) : s → α) atTop = 𝓝[<] b

(hs : ∀ a' < b, ∃ a < b, Set.Ioo a b ⊆ s)

Filter.map Subtype.val Filter.atTop = 𝓝[<] b


theorem mem_iSup {ι : Sort*} (p : ι → Submodule R M) {m : M} :
    (m ∈ ⨆ i, p i) ↔ ∀ N, (∀ i, p i ≤ N) → m ∈ N

{R : Type u_1}
{M : Type u_4}
[Semiring R]
[AddCommMonoid M]
[Module R M]
{ι : Sort u_9}
(p : ι → Submodule R M)
{m : M}

m ∈ ⨆ i, p i ↔ ∀ (N : Submodule R M), (∀ (i : ι), p i ≤ N) → m ∈ N


/-- `Real.exp` is convex on the whole real line. -/
theorem convexOn_exp : ConvexOn ℝ univ exp


theorem natCast_eq_iff (x y : ℕ) : (x : PerfectClosure K p) = y ↔ (x : K) = y

(K : Type u)
[CommRing K]
(p : ℕ)
[Fact (Nat.Prime p)]
[CharP K p]
(x y : ℕ)


@[simp]
theorem limLax_obj (F : J ⥤ C) : limLax.obj F = limit F

CategoryTheory.Limits.limLax.obj F = CategoryTheory.Limits.limit F


theorem two_nsmul_toReal_eq_two_mul {θ : Angle} :
    ((2 : ℕ) • θ).toReal = 2 * θ.toReal ↔ θ.toReal ∈ Set.Ioc (-π / 2) (π / 2)

(2 • θ).toReal = 2 * θ.toReal ↔ θ.toReal ∈ Set.Ioc (-π / 2) (π / 2)


theorem _root_.Function.LeftInverse.filter_comap {f : α → β} {g : β → α} (hfg : LeftInverse g f) :
    RightInverse (comap g) (comap f)

{α : Type u}
{β : Type v}
{f : α → β}
{g : β → α}
(hfg : Function.LeftInverse g f)

Function.RightInverse (Filter.comap g) (Filter.comap f)


@[simp] theorem tail_replicate (a : α) (n) :
    tail (replicate n a) = replicate (n - 1) a

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


theorem neg_lt_iff {x y : PGame} : -y < x ↔ -x < y


@[simp]
theorem preimage_cast_uIoc (p q : ℚ) : (↑) ⁻¹' uIoc (p : K) q = uIoc p q

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


/-- Adjoins a `⊤` to the domain and codomain of a `LatticeHom`. -/
@[simps]
protected def withTop (f : LatticeHom α β) : LatticeHom (WithTop α) (WithTop β)

{α : Type u_3}
{β : Type u_4}
[Lattice α]
[Lattice β]
(f : LatticeHom α β)


@[simp] lemma mem_disjiUnion {b : β} {h} : b ∈ s.disjiUnion t h ↔ ∃ a ∈ s, b ∈ t a

{α : Type u_1}
{β : Type u_2}
{s : Finset α}
{t : α → Finset β}
{b : β}
{h : (↑s).PairwiseDisjoint t}


theorem reflection_orthogonal_apply (v : E) : reflection Kᗮ v = -reflection K v

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


theorem adjoin_tmul_eq_top : adjoin R { t : A ⊗[R] B | ∃ a b, a ⊗ₜ[R] b = t } = ⊤

(R : Type uR)
(A : Type uA)
(B : Type uB)
[CommSemiring R]
[Semiring A]
[Algebra R A]
[Semiring B]
[Algebra R B]

Algebra.adjoin R {t | ∃ a b, a ⊗ₜ[R] b = t} = ⊤


/-- The graph induced by the adjacency matrix of `G` is `G` itself. -/
theorem toGraph_adjMatrix_eq [MulZeroOneClass α] [Nontrivial α] :
    (G.isAdjMatrix_adjMatrix α).toGraph = G

{V : Type u_1}
(α : Type u_2)
(G : SimpleGraph V)
[DecidableRel G.Adj]
[MulZeroOneClass α]
[Nontrivial α]


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

(hl : ∀ f ∈ l, MeasureTheory.AEStronglyMeasurable f μ)


/-- Dual of `Monotone.covariant_of_const'` -/
theorem Antitone.covariant_of_const' {μ : N → N → N} [CovariantClass N N (swap μ) (· ≤ ·)]
    (hf : Antitone f) (m : N) : Antitone (f <| μ · m)

[CovariantClass N N (Function.swap μ) fun x x_1 => x ≤ x_1]


theorem span_le {p} : span R s ≤ p ↔ s ⊆ p

{R : Type u_1}
{M : Type u_4}
[Semiring R]
[AddCommMonoid M]
[Module R M]
{s : Set M}
{p : Submodule R M}


@[to_additive]
theorem singleton_one : ({1} : Finset α) = 1


theorem data_toArray (as : List α) : as.toArray.data = as


@[ext]
theorem ext {f g : lp E p} (h : (f : ∀ i, E i) = g) : f = g

{α : Type u_1}
{E : α → Type u_2}
{p : ℝ≥0∞}
[(i : α) → NormedAddCommGroup (E i)]
{f g : ↥(lp E p)}
(h : ↑f = ↑g)


lemma ShortExact.mk' (h : S.Exact) (_ : Mono S.f) (_ : Epi S.g) : S.ShortExact

CategoryTheory.Mono S.f → CategoryTheory.Epi S.g → S.ShortExact


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

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


lemma ext_from (i j : ℤ) (hij : j + 1 = i) {A : C} {f g : (mappingCone φ).X j ⟶ A}
    (h₁ : (inl φ).v i j (by omega) ≫ f = (inl φ).v i j (by omega) ≫ g)
    (h₂ : (inr φ).f j ≫ f = (inr φ).f j ≫ g) :
    f = g

{f g : (CochainComplex.mappingCone φ).X j ⟶ A}

(h₁ : (CochainComplex.mappingCone.inl φ).v i j ⋯ ≫ f = (CochainComplex.mappingCone.inl φ).v i j ⋯ ≫ g)

(h₂ : (CochainComplex.mappingCone.inr φ).f j ≫ f = (CochainComplex.mappingCone.inr φ).f j ≫ g)


theorem hom_mk {v : V} (vnL : v ∉ L) (h : K ⊆ L) :
    (G.componentComplMk vnL).hom h = G.componentComplMk (Set.not_mem_subset h vnL)

{V : Type u}
{G : SimpleGraph V}
{K L : Set V}
{v : V}
(vnL : v ∉ L)
(h : K ⊆ L)

SimpleGraph.ComponentCompl.hom h (G.componentComplMk vnL) = G.componentComplMk ⋯


@[simps]
instance assoc' (W X Y Z : C) [MonoidalCoherence W (X ⊗ (Y ⊗ Z))] :
    MonoidalCoherence W ((X ⊗ Y) ⊗ Z)

[CategoryTheory.MonoidalCoherence W (X ⊗ Y ⊗ Z)]


/-- A traversable functor is lawful if its `traverse` satisfies a
number of additional properties.  It must send `pure : α → Id α` to `pure`,
send the composition of applicative functors to the composition of the
`traverse` of each, send each function `f` to `fun x ↦ f <$> x`, and
satisfy a naturality condition with respect to applicative
transformations. -/
class LawfulTraversable (t : Type u → Type u) [Traversable t] extends LawfulFunctor t :
    Prop where
  /-- `traverse` plays well with `pure` of the identity monad-/
  id_traverse : ∀ {α} (x : t α), traverse (pure : α → Id α) x = x
  /-- `traverse` plays well with composition of applicative functors. -/
  comp_traverse :
    ∀ {F G} [Applicative F] [Applicative G] [LawfulApplicative F] [LawfulApplicative G] {α β γ}
      (f : β → F γ) (g : α → G β) (x : t α),
      traverse (Functor.Comp.mk ∘ map f ∘ g) x = Comp.mk (map (traverse f) (traverse g x))
  /-- An axiom for `traverse` involving `pure : β → Id β`. -/
  traverse_eq_map_id : ∀ {α β} (f : α → β) (x : t α),
    traverse ((pure : β → Id β) ∘ f) x = id.mk (f <$> x)
  /-- The naturality axiom explaining how lawful traversable functors should play with
  lawful applicative functors. -/
  naturality :
    ∀ {F G} [Applicative F] [Applicative G] [LawfulApplicative F] [LawfulApplicative G]
      (η : ApplicativeTransformation F G) {α β} (f : α → F β) (x : t α),
      η (traverse f x) = traverse (@η _ ∘ f) x

{t : Type u → Type u}
[Traversable t]
[self : LawfulTraversable t]
{F G : Type u → Type u}
[Applicative F]
[Applicative G]
[LawfulApplicative F]
[LawfulApplicative G]
(η : ApplicativeTransformation F G)
{α β : Type u}
(f : α → F β)
(x : t α)

(fun {α} => η.app α) (traverse f x) = traverse ((fun {α} => η.app α) ∘ f) x


theorem add_pf_add_overlap_zero
    (h : IsNat (a₁ + b₁) (nat_lit 0)) (h₄ : a₂ + b₂ = c) : (a₁ + a₂ : R) + (b₁ + b₂) = c

(h : Mathlib.Meta.NormNum.IsNat (a₁ + b₁) 0)


/-- The dimension of a submodule is bounded by the dimension of the ambient space. -/
theorem Submodule.finrank_le [Module.Finite R M] (s : Submodule R M) :
    finrank R s ≤ finrank R M

{R : Type u}
{M : Type v}
[Ring R]
[AddCommGroup M]
[Module R M]
[StrongRankCondition R]
[Module.Finite R M]
(s : Submodule R M)

FiniteDimensional.finrank R ↥s ≤ FiniteDimensional.finrank R M


theorem ext_fourfold {g h : ((M ⊗[R] N) ⊗[R] P) ⊗[R] Q →ₗ[R] S}
    (H : ∀ w x y z, g (w ⊗ₜ x ⊗ₜ y ⊗ₜ z) = h (w ⊗ₜ x ⊗ₜ y ⊗ₜ z)) : g = h

{g h : TensorProduct R (TensorProduct R (TensorProduct R M N) P) Q →ₗ[R] S}


lemma toReal_mul {x y : EReal} : toReal (x * y) = toReal x * toReal y


theorem tendsto_Icc_vitaliFamily_left (x : ℝ) :
    Tendsto (fun y => Icc y x) (𝓝[<] x) ((vitaliFamily (volume : Measure ℝ) 1).filterAt x)

Filter.Tendsto (fun y => Set.Icc y x) (𝓝[<] x)
  ((IsUnifLocDoublingMeasure.vitaliFamily MeasureTheory.volume 1).filterAt x)


@[simp]
theorem cos_int_mul_two_pi_sub (x : ℝ) (n : ℤ) : cos (n * (2 * π) - x) = cos x

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


theorem IsInt.raw_refl (n : ℤ) : IsInt n n


@[simp]
theorem attach_image_val [DecidableEq α] {s : Finset α} : s.attach.image Subtype.val = s

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


@[simp]
theorem id_comp (f : SpectralMap α β) : (SpectralMap.id β).comp f = f

{α : Type u_2}
{β : Type u_3}
[TopologicalSpace α]
[TopologicalSpace β]
(f : SpectralMap α β)


theorem zorn_preorder (h : ∀ c : Set α, IsChain (· ≤ ·) c → BddAbove c) :
    ∃ m : α, ∀ a, m ≤ a → a ≤ m

(h : ∀ (c : Set α), IsChain (fun x x_1 => x ≤ x_1) c → BddAbove c)


/-- `Matrix.blockDiagonal` as a `RingHom`. -/
@[simps]
def blockDiagonalRingHom [DecidableEq m] [Fintype o] [Fintype m] [NonAssocSemiring α] :
    (o → Matrix m m α) →+* Matrix (m × o) (m × o) α

(m : Type u_2)
(o : Type u_4)
(α : Type u_12)
[DecidableEq o]
[DecidableEq m]
[Fintype o]
[Fintype m]
[NonAssocSemiring α]
(M : o → Matrix m m α)

(Matrix.blockDiagonalRingHom m o α) M = Matrix.blockDiagonal M


@[simp]
theorem withTopCongr_refl : (OrderIso.refl α).withTopCongr = OrderIso.refl _

(OrderIso.refl α).withTopCongr = OrderIso.refl (WithTop α)


theorem memℒp_top_of_bound {f : α → E} (hf : AEStronglyMeasurable f μ) (C : ℝ)
    (hfC : ∀ᵐ x ∂μ, ‖f x‖ ≤ C) : Memℒp f ∞ μ

(hf : MeasureTheory.AEStronglyMeasurable f μ)


@[simp, fun_prop]
theorem differentiable_id : Differentiable 𝕜 (id : E → E)

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]


theorem homothety_apply (c : P1) (r : k) (p : P1) : homothety c r p = r • (p -ᵥ c : V1) +ᵥ c

{k : Type u_2}
{V1 : Type u_3}
{P1 : Type u_4}
[CommRing k]
[AddCommGroup V1]
[AffineSpace V1 P1]
[Module k V1]
(c : P1)
(r : k)
(p : P1)

(AffineMap.homothety c r) p = r • (p -ᵥ c) +ᵥ c


@[simp] theorem coe_singleton [MeasurableSingletonClass α] (a : α) :
    ↑({a} : Subtype (MeasurableSet : Set α → Prop)) = ({a} : Set α)

{α : Type u_1}
[MeasurableSpace α]
[MeasurableSingletonClass α]
(a : α)


theorem mem_of_mem_suffix (hx : a ∈ l₁) (hl : l₁ <:+ l₂) : a ∈ l₂

{α : Type u_1}
{l₁ l₂ : List α}
{a : α}
(hx : a ∈ l₁)
(hl : l₁ <:+ l₂)


/-- The formula
`Ring.inverse (x + t) =
  (∑ i ∈ Finset.range n, (- x⁻¹ * t) ^ i) * x⁻¹ + (- x⁻¹ * t) ^ n * Ring.inverse (x + t)`
holds for `t` sufficiently small. -/
theorem inverse_add_nth_order (x : Rˣ) (n : ℕ) :
    ∀ᶠ t in 𝓝 0, inverse ((x : R) + t) =
      (∑ i ∈ range n, (-↑x⁻¹ * t) ^ i) * ↑x⁻¹ + (-↑x⁻¹ * t) ^ n * inverse (x + t)

{R : Type u_1}
[NormedRing R]
[CompleteSpace R]
(x : Rˣ)
(n : ℕ)

∀ᶠ (t : R) in 𝓝 0,
  Ring.inverse (↑x + t) = (∑ i ∈ Finset.range n, (-↑x⁻¹ * t) ^ i) * ↑x⁻¹ + (-↑x⁻¹ * t) ^ n * Ring.inverse (↑x + t)


lemma map_id (i : Fin (n + 1 + 1)) : map F f i i (by simp) = 𝟙 _

(F : CategoryTheory.ComposableArrows C n)

CategoryTheory.ComposableArrows.Precomp.map F f i i ⋯ =
  CategoryTheory.CategoryStruct.id (CategoryTheory.ComposableArrows.Precomp.obj F X i)


@[simp]
theorem append_inj_right (s : Sym α n) {t t' : Sym α n'} : s.append t = s.append t' ↔ t = t'

{α : Type u_1}
{n n' : ℕ}
(s : Sym α n)
{t t' : Sym α n'}


@[to_additive]
theorem comap_map_eq_self {f : G →* N} {H : Subgroup G} (h : f.ker ≤ H) :
    comap f (map f H) = H

{G : Type u_1}
[Group G]
{N : Type u_5}
[Group N]
{f : G →* N}
{H : Subgroup G}
(h : f.ker ≤ H)


@[to_additive]
theorem le_comap_of_map_le {T : Subsemigroup N} {f : M →ₙ* N} : S.map f ≤ T → S ≤ T.comap f

{M : Type u_1}
{N : Type u_2}
[Mul M]
[Mul N]
(S : Subsemigroup M)
{T : Subsemigroup N}
{f : M →ₙ* N}

Subsemigroup.map f S ≤ T → S ≤ Subsemigroup.comap f T


@[simp]
theorem add_moveLeft_inl {x : PGame} (y : PGame) (i) :
    (x + y).moveLeft (toLeftMovesAdd (Sum.inl i)) = x.moveLeft i + y

{x : SetTheory.PGame}
(y : SetTheory.PGame)
(i : x.LeftMoves)

(x + y).moveLeft (SetTheory.PGame.toLeftMovesAdd (Sum.inl i)) = x.moveLeft i + y


theorem exists_of_liftRel_left {R : α → β → Prop} {ca cb} (H : LiftRel R ca cb) {a} (h : a ∈ ca) :
    ∃ b, b ∈ cb ∧ R a b

{α : Type u}
{β : Type v}
{R : α → β → Prop}
{ca : Computation α}
{cb : Computation β}
(H : Computation.LiftRel R ca cb)
{a : α}
(h : a ∈ ca)


@[simp] theorem erase_cons_tail {a b : α} (l : List α) (h : ¬(b == a)) :
    (b :: l).erase a = b :: l.erase a

{α : Type u_1}
[BEq α]
{a b : α}
(l : List α)
(h : ¬(b == a) = true)


/-- If `τ : F₁ ⟶ F₂` is a natural transformation between two functors
which commute with a shift by an additive monoid `A`, this typeclass
asserts a compatibility of `τ` with these shifts. -/
class CommShift : Prop :=
  comm' (a : A) : (F₁.commShiftIso a).hom ≫ whiskerRight τ _ =
    whiskerLeft _ τ ≫ (F₂.commShiftIso a).hom

[self : CategoryTheory.NatTrans.CommShift τ A]

CategoryTheory.CategoryStruct.comp (F₁.commShiftIso a).hom
    (CategoryTheory.whiskerRight τ (CategoryTheory.shiftFunctor D a)) =
  CategoryTheory.CategoryStruct.comp (CategoryTheory.whiskerLeft (CategoryTheory.shiftFunctor C a) τ)
    (F₂.commShiftIso a).hom


protected theorem eq (hs : IsAntichain r s) {a b : α} (ha : a ∈ s) (hb : b ∈ s) (h : r a b) :
    a = b

{α : Type u_1}
{r : α → α → Prop}
{s : Set α}
(hs : IsAntichain r s)
{a b : α}
(ha : a ∈ s)
(hb : b ∈ s)
(h : r a b)


lemma predAbove_of_lt_succ (p : Fin n) (i : Fin (n + 1)) (h : i < succ p)
    (hi := Fin.ne_last_of_lt h) : p.predAbove i = i.castPred hi

{n : ℕ}
(p : Fin n)
(i : Fin (n + 1))
(h : i < p.succ)
(hi : i ≠ Fin.last n := ⋯)


/-- Uses `left` co(ntra)variant. -/
@[to_additive (attr := simp) "Uses `left` co(ntra)variant."]
theorem Left.inv_lt_one_iff : a⁻¹ < 1 ↔ 1 < a

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


theorem ofNat_surjective_aux : ∀ {x : ℕ} (hx : x ∈ s), ∃ n, ofNat s n = ⟨x, hx⟩

{s : Set ℕ}
[Infinite ↑s]
[DecidablePred fun x => x ∈ s]
{x : ℕ}
(hx : x ∈ s)


theorem equivalence : Equivalence (@Commensurable G _)


theorem norm_eq_integral (f : α →₁ₛ[μ] E) : ‖f‖ = ((toSimpleFunc f).map norm).integral μ

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

‖f‖ =
  MeasureTheory.SimpleFunc.integral μ (MeasureTheory.SimpleFunc.map norm (MeasureTheory.Lp.simpleFunc.toSimpleFunc f))


theorem natAbs_dichotomy {a : Int} : 0 ≤ a ∧ a.natAbs = a ∨ a < 0 ∧ a.natAbs = -a

0 ≤ a ∧ ↑a.natAbs = a ∨ a < 0 ∧ ↑a.natAbs = -a


theorem ratio_le_opNorm : ‖f x‖ / ‖x‖ ≤ ‖f‖

{𝕜 : Type u_1}
{𝕜₂ : Type u_2}
{E : Type u_4}
{F : Type u_6}
[SeminormedAddCommGroup E]
[SeminormedAddCommGroup F]
[NontriviallyNormedField 𝕜]
[NontriviallyNormedField 𝕜₂]
[NormedSpace 𝕜 E]
[NormedSpace 𝕜₂ F]
{σ₁₂ : 𝕜 →+* 𝕜₂}
[RingHomIsometric σ₁₂]
(f : E →SL[σ₁₂] F)
(x : E)

‖f x‖ / ‖x‖ ≤ ‖f‖


@[to_additive]
lemma UniformInducing.uniformContinuousConstSMul [SMul M Y] [UniformContinuousConstSMul M Y]
    {f : X → Y} (hf : UniformInducing f) (hsmul : ∀ (c : M) x, f (c • x) = c • f x) :
    UniformContinuousConstSMul M X

(hsmul : ∀ (c : M) (x : X), f (c • x) = c • f x)


theorem AdjoinMonic.exists_root {f : k[X]} (hfm : f.Monic) (hfi : Irreducible f) :
    ∃ x : AdjoinMonic k, f.eval₂ (toAdjoinMonic k) x = 0

(k : Type u)
[Field k]
{f : k[X]}
(hfm : f.Monic)
(hfi : Irreducible f)

∃ x, Polynomial.eval₂ (AlgebraicClosure.toAdjoinMonic k) x f = 0


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

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

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


/-- Auxiliary lemma for `condKernel_apply_of_ne_zero`. -/
@[deprecated Measure.IsCondKernel.apply_of_ne_zero (since := "2024-07-24"), nolint unusedArguments]
lemma _root_.MeasureTheory.Measure.condKernel_apply_of_ne_zero_of_measurableSet
    [MeasurableSingletonClass α] {x : α} (hx : ρ.fst {x} ≠ 0) {s : Set Ω} (hs : MeasurableSet s) :
    ρ.condKernel x s = (ρ.fst {x})⁻¹ * ρ ({x} ×ˢ s)

{α : Type u_1}
{Ω : Type u_4}
{mα : MeasurableSpace α}
[MeasurableSpace Ω]
[StandardBorelSpace Ω]
[Nonempty Ω]
{ρ : MeasureTheory.Measure (α × Ω)}
[MeasureTheory.IsFiniteMeasure ρ]
[MeasurableSingletonClass α]
{x : α}
(hx : ρ.fst {x} ≠ 0)
{s : Set Ω}
(hs : MeasurableSet s)

(ρ.condKernel x) s = (ρ.fst {x})⁻¹ * ρ ({x} ×ˢ s)


protected theorem Symmetric.compl (h : Symmetric r) : Symmetric rᶜ

{α : Type u_1}
{r : α → α → Prop}
(h : Symmetric r)


theorem MeasureTheory.AEStronglyMeasurable.fst {γ} [TopologicalSpace γ] [SFinite ν] {f : α → γ}
    (hf : AEStronglyMeasurable f μ) : AEStronglyMeasurable (fun z : α × β => f z.1) (μ.prod ν)

(hf : MeasureTheory.AEStronglyMeasurable f μ)

MeasureTheory.AEStronglyMeasurable (fun z => f z.1) (μ.prod ν)


lemma cfcₙ_eq_restrict (f : C(S, R)) (halg : UniformEmbedding (algebraMap R S)) {a : A} (hpa : p a)
    (hqa : q a) (h : QuasispectrumRestricts a f) [CompactSpace (σₙ S a)] (g : R → R) :
    cfcₙ g a = cfcₙ (fun x ↦ algebraMap R S (g (f x))) a

(halg : UniformEmbedding ⇑(algebraMap R S))

cfcₙ g a = cfcₙ (fun x => (algebraMap R S) (g (f x))) a