@[to_additive]
theorem smulAntidiagonal_min_smul_min [LinearOrder G] [LinearOrder P] [SMul G P]
    [IsOrderedCancelSMul G P] {s : Set G} {t : Set P} (hs : s.IsWF) (ht : t.IsWF) (hns : s.Nonempty)
    (hnt : t.Nonempty) :
    SMulAntidiagonal hs.isPWO ht.isPWO (hs.min hns • ht.min hnt) = {(hs.min hns, ht.min hnt)}

{G : Type u_1}
{P : Type u_2}
[LinearOrder G]
[LinearOrder P]
[SMul G P]
[IsOrderedCancelSMul G P]
{s : Set G}
{t : Set P}
(hs : s.IsWF)
(ht : t.IsWF)
(hns : s.Nonempty)
(hnt : t.Nonempty)

Finset.SMulAntidiagonal ⋯ ⋯ (hs.min hns • ht.min hnt) = {(hs.min hns, ht.min hnt)}


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

{α : Type u_2}
{β : Type u_3}
[Bornology α]
[Bornology β]
(f : LocallyBoundedMap α β)


@[simp, mfld_simps]
theorem trans_source : (e.trans e').source = e.source ∩ e ⁻¹' e'.source

{α : Type u_1}
{β : Type u_2}
{γ : Type u_3}
(e : PartialEquiv α β)
(e' : PartialEquiv β γ)

(e.trans e').source = e.source ∩ ↑e ⁻¹' e'.source


@[simp]
theorem natCast_def (n : ℕ) : (n : ∀ a, π a) = fun _ ↦ ↑n

{α : Type u_1}
{π : α → Type u_3}
[(a : α) → NatCast (π a)]
(n : ℕ)


lemma even_finrank_of_not_isUnramified [IsGalois k K]
    (hw : ¬ IsUnramified k w) : Even (finrank k K)

(hw : ¬NumberField.InfinitePlace.IsUnramified k w)


@[simp]
theorem pair_obj_right (X Y : C) : (pair X Y).obj ⟨right⟩ = Y

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

(CategoryTheory.Limits.pair X Y).obj { as := CategoryTheory.Limits.WalkingPair.right } = Y


@[simp]
theorem coe_unit_eq_one (u : (Associates α)ˣ) : (u : Associates α) = 1

{α : Type u_1}
[CommMonoid α]
(u : (Associates α)ˣ)


theorem exists_SL2_smul_eq_of_apply_zero_one_eq_zero (g : SL(2, ℝ)) (hc : ↑ₘ[ℝ] g 1 0 = 0) :
    ∃ (u : { x : ℝ // 0 < x }) (v : ℝ), (g • · : ℍ → ℍ) = (v +ᵥ ·) ∘ (u • ·)

∃ u v, (fun x => g • x) = (fun x => v +ᵥ x) ∘ fun x => u • x


@[simp]
theorem piCongrRight_symm (e : (i : ι) → φ i ≃ₗ[R] ψ i) :
    (piCongrRight e).symm = piCongrRight fun i => (e i).symm

{R : Type u}
{ι : Type x}
[Semiring R]
{φ : ι → Type u_1}
{ψ : ι → Type u_2}
[(i : ι) → AddCommMonoid (φ i)]
[(i : ι) → Module R (φ i)]
[(i : ι) → AddCommMonoid (ψ i)]
[(i : ι) → Module R (ψ i)]
(e : (i : ι) → φ i ≃ₗ[R] ψ i)

(LinearEquiv.piCongrRight e).symm = LinearEquiv.piCongrRight fun i => (e i).symm


theorem of_separable_splitting_field_aux [hFE : FiniteDimensional F E] [sp : p.IsSplittingField F E]
    (hp : p.Separable) (K : Type*) [Field K] [Algebra F K] [Algebra K E] [IsScalarTower F K E]
    {x : E} (hx : x ∈ p.aroots E)
    -- these are both implied by `hFE`, but as they carry data this makes the lemma more general
    [Fintype (K →ₐ[F] E)]
    [Fintype (K⟮x⟯.restrictScalars F →ₐ[F] E)] :
    Fintype.card (K⟮x⟯.restrictScalars F →ₐ[F] E) = Fintype.card (K →ₐ[F] E) * finrank K K⟮x⟯

[sp : Polynomial.IsSplittingField F E p]

[Fintype (↥(IntermediateField.restrictScalars F K⟮x⟯) →ₐ[F] E)]

Fintype.card (↥(IntermediateField.restrictScalars F K⟮x⟯) →ₐ[F] E) =
  Fintype.card (K →ₐ[F] E) * FiniteDimensional.finrank K ↥K⟮x⟯


theorem blockTriangular_stdBasisMatrix' {i j : m} (hij : b j ≤ b i) (c : R) :
    BlockTriangular (stdBasisMatrix i j c) (toDual ∘ b)

{α : Type u_1}
{m : Type u_3}
{R : Type v}
[CommRing R]
{b : m → α}
[Preorder α]
[DecidableEq m]
{i j : m}
(hij : b j ≤ b i)
(c : R)

(Matrix.stdBasisMatrix i j c).BlockTriangular (⇑OrderDual.toDual ∘ b)


theorem exists_algHom_adjoin_of_splits_of_aeval : ∃ φ : adjoin F S →ₐ[F] K, φ ⟨x, hx⟩ = y

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

(hy : (Polynomial.aeval y) (minpoly F x) = 0)


/-- Multiplying `a` by itself and then by its inverse results in `a`
(whether or not `a` is zero). -/
@[simp]
theorem mul_self_mul_inv (a : G₀) : a * a * a⁻¹ = a

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


protected theorem prod_mk {f : α → β} {g : α → γ} (hf : AEStronglyMeasurable f μ)
    (hg : AEStronglyMeasurable g μ) : AEStronglyMeasurable (fun x => (f x, g x)) μ

(hf : MeasureTheory.AEStronglyMeasurable f μ)

(hg : MeasureTheory.AEStronglyMeasurable g μ)

MeasureTheory.AEStronglyMeasurable (fun x => (f x, g x)) μ


lemma thickening_biUnion {ι : Type*} (δ : ℝ) (f : ι → Set α) (I : Set ι) :
    thickening δ (⋃ i ∈ I, f i) = ⋃ i ∈ I, thickening δ (f i)

{α : Type u}
[PseudoEMetricSpace α]
{ι : Type u_2}
(δ : ℝ)
(f : ι → Set α)
(I : Set ι)

Metric.thickening δ (⋃ i ∈ I, f i) = ⋃ i ∈ I, Metric.thickening δ (f i)


theorem ClassGroup.mk0_surjective [IsDedekindDomain R] :
    Function.Surjective (ClassGroup.mk0 : (Ideal R)⁰ → ClassGroup R)

{R : Type u_1}
[CommRing R]
[IsDomain R]
[IsDedekindDomain R]


theorem zero_addChar_eq (c : Char) : (0 : Pos) + c = ⟨c.utf8Size⟩


theorem setToFun_mono_left' {T T' : Set α → E →L[ℝ] G''} {C C' : ℝ}
    (hT : DominatedFinMeasAdditive μ T C) (hT' : DominatedFinMeasAdditive μ T' C')
    (hTT' : ∀ s, MeasurableSet s → μ s < ∞ → ∀ x, T s x ≤ T' s x) (f : α → E) :
    setToFun μ T hT f ≤ setToFun μ T' hT' f

(hT : MeasureTheory.DominatedFinMeasAdditive μ T C)

(hT' : MeasureTheory.DominatedFinMeasAdditive μ T' C')

(hTT' : ∀ (s : Set α), MeasurableSet s → μ s < ⊤ → ∀ (x : E), (T s) x ≤ (T' s) x)

MeasureTheory.setToFun μ T hT f ≤ MeasureTheory.setToFun μ T' hT' f


theorem restrictDvd_def [Decidable (q = 0)] (hpq : p ∣ q) :
    restrictDvd hpq =
      if hq : q = 0 then 1
      else
        @restrict F _ p _ _ _
          ⟨splits_of_splits_of_dvd (algebraMap F q.SplittingField) hq (SplittingField.splits q)
              hpq⟩

{F : Type u_1}
[Field F]
{p q : F[X]}
[Decidable (q = 0)]
(hpq : p ∣ q)

Polynomial.Gal.restrictDvd hpq = if hq : q = 0 then 1 else Polynomial.Gal.restrict p q.SplittingField


@[simp]
theorem integrableOn_union : IntegrableOn f (s ∪ t) μ ↔ IntegrableOn f s μ ∧ IntegrableOn f t μ

{α : Type u_1}
{E : Type u_3}
[MeasurableSpace α]
[NormedAddCommGroup E]
{f : α → E}
{s t : Set α}
{μ : MeasureTheory.Measure α}

MeasureTheory.IntegrableOn f (s ∪ t) μ ↔ MeasureTheory.IntegrableOn f s μ ∧ MeasureTheory.IntegrableOn f t μ


theorem tan_arctan {z : ℂ} (h₁ : z ≠ I) (h₂ : z ≠ -I) : tan (arctan z) = z

{z : ℂ}
(h₁ : z ≠ Complex.I)
(h₂ : z ≠ -Complex.I)


theorem mem_sym2_iff {xs : List α} {z : Sym2 α} :
    z ∈ xs.sym2 ↔ ∀ y ∈ z, y ∈ xs

{α : Type u_1}
{xs : List α}
{z : Sym2 α}


/-- The equivalence induced by `a ↦ (a / n, a % n)` for nonzero `n`.
See `Int.ediv_emod_unique` for a similar propositional statement. -/
@[simps]
def Int.divModEquiv (n : ℕ) [NeZero n] : ℤ ≃ ℤ × Fin n

(Int.divModEquiv n) a = (a / ↑n, ↑(a.natMod ↑n))


theorem le_of_forall_ge_of_dense [LinearOrder α] [DenselyOrdered α] {a₁ a₂ : α}
    (h : ∀ a₃ < a₁, a₃ ≤ a₂) : a₁ ≤ a₂

{α : Type u_2}
[LinearOrder α]
[DenselyOrdered α]
{a₁ a₂ : α}
(h : ∀ (a₃ : α), a₃ < a₁ → a₃ ≤ a₂)


theorem IsClosed.isComplete [CompleteSpace α] {s : Set α} (h : IsClosed s) : IsComplete s

{α : Type u}
[uniformSpace : UniformSpace α]
[CompleteSpace α]
{s : Set α}
(h : IsClosed s)


/-- If `L/K` is an algebraic extension, then the Krull topology on `L ≃ₐ[K] L` is Hausdorff. -/
theorem krullTopology_t2 {K L : Type*} [Field K] [Field L] [Algebra K L]
    [Algebra.IsIntegral K L] : T2Space (L ≃ₐ[K] L)

{K : Type u_1}
{L : Type u_2}
[Field K]
[Field L]
[Algebra K L]
[Algebra.IsIntegral K L]


theorem OrderIso.map_top [LE α] [PartialOrder β] [OrderTop α] [OrderTop β] (f : α ≃o β) : f ⊤ = ⊤

{α : Type u_2}
{β : Type u_3}
[LE α]
[PartialOrder β]
[OrderTop α]
[OrderTop β]
(f : α ≃o β)


theorem sign_prod_list_swap {l : List (Perm α)} (hl : ∀ g ∈ l, IsSwap g) :
    sign l.prod = (-1) ^ l.length

{α : Type u}
[DecidableEq α]
[Fintype α]
{l : List (Equiv.Perm α)}
(hl : ∀ g ∈ l, g.IsSwap)

Equiv.Perm.sign l.prod = (-1) ^ l.length


@[to_additive]
theorem nhds_one_hasBasis (B : GroupFilterBasis G) :
    HasBasis (@nhds G B.topology 1) (fun V : Set G ↦ V ∈ B) id

{G : Type u}
[Group G]
(B : GroupFilterBasis G)


theorem mk {f : α → β → σ} (hf : Primrec fun p : α × β => f p.1 p.2) : Primrec₂ f

{α : Type u_1}
{β : Type u_2}
{σ : Type u_3}
[Primcodable α]
[Primcodable β]
[Primcodable σ]
{f : α → β → σ}
(hf : Primrec fun p => f p.1 p.2)


lemma map_comp_apply (f : Hom P P') (g : Hom P' P'') (x) :
    CotangentSpace.map (g.comp f) x = .map g (.map f x)

{R : Type u}
{S : Type v}
[CommRing R]
[CommRing S]
[Algebra R S]
{P : Algebra.Generators R S}
{R' : Type u'}
{S' : Type v'}
[CommRing R']
[CommRing S']
[Algebra R' S']
{P' : Algebra.Generators R' S'}
[Algebra R R']
[Algebra S S']
[Algebra R S']
[IsScalarTower R R' S']
[IsScalarTower R S S']
{R'' : Type u''}
{S'' : Type v''}
[CommRing R'']
[CommRing S'']
[Algebra R'' S'']
{P'' : Algebra.Generators R'' S''}
[Algebra R R'']
[Algebra S S'']
[Algebra R S'']
[IsScalarTower R R'' S'']
[IsScalarTower R S S'']
[Algebra R' R'']
[Algebra S' S'']
[Algebra R' S'']
[IsScalarTower R' R'' S'']
[IsScalarTower R' S' S'']
[IsScalarTower S S' S'']
(f : P.Hom P')
(g : P'.Hom P'')
(x : P.CotangentSpace)

(Algebra.Generators.CotangentSpace.map (g.comp f)) x =
  (Algebra.Generators.CotangentSpace.map g) ((Algebra.Generators.CotangentSpace.map f) x)


@[to_additive (attr := simp)]
theorem smul_def [SMul R M] (s : ULift R) (x : M) : s • x = s.down • x

{R : Type u}
{M : Type v}
[SMul R M]
(s : ULift.{u_1, u} R)
(x : M)


theorem degrees_mul (p q : MvPolynomial σ R) : (p * q).degrees ≤ p.degrees + q.degrees

{R : Type u}
{σ : Type u_1}
[CommSemiring R]
(p q : MvPolynomial σ R)


lemma toFin_pow (x : BitVec w) (n : ℕ)    : toFin (x ^ n) = x.toFin ^ n


theorem fg_biSup {ι : Type*} (s : Finset ι) (N : ι → Submodule R M) (h : ∀ i ∈ s, (N i).FG) :
    (⨆ i ∈ s, N i).FG

{R : Type u_1}
{M : Type u_2}
[Semiring R]
[AddCommMonoid M]
[Module R M]
{ι : Type u_3}
(s : Finset ι)
(N : ι → Submodule R M)
(h : ∀ i ∈ s, (N i).FG)


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


theorem IsBigO.smul (h₁ : k₁ =O[l] k₂) (h₂ : f' =O[l] g') :
    (fun x => k₁ x • f' x) =O[l] fun x => k₂ x • g' x

{α : Type u_1}
{E' : Type u_6}
{F' : Type u_7}
{R : Type u_13}
{𝕜' : Type u_16}
[SeminormedAddCommGroup E']
[SeminormedAddCommGroup F']
[SeminormedRing R]
[NormedDivisionRing 𝕜']
{f' : α → E'}
{g' : α → F'}
{l : Filter α}
[Module R E']
[BoundedSMul R E']
[Module 𝕜' F']
[BoundedSMul 𝕜' F']
{k₁ : α → R}
{k₂ : α → 𝕜'}
(h₁ : k₁ =O[l] k₂)
(h₂ : f' =O[l] g')


/-- `tprod_iSup_decode₂` specialized to the complete lattice of sets. -/
@[to_additive "`tsum_iSup_decode₂` specialized to the complete lattice of sets."]
theorem tprod_iUnion_decode₂ (m : Set α → M) (m0 : m ∅ = 1) (s : β → Set α) :
    ∏' i, m (⋃ b ∈ decode₂ β i, s b) = ∏' b, m (s b)

{M : Type u_1}
[AddCommMonoid M]
[TopologicalSpace M]
{α : Type u_3}
{β : Type u_4}
[Encodable β]
(m : Set α → M)
(m0 : m ∅ = 0)
(s : β → Set α)

∑' (i : ℕ), m (⋃ b ∈ Encodable.decode₂ β i, s b) = ∑' (b : β), m (s b)


theorem _root_.MeasureTheory.Integrable.integral_compProd [NormedSpace ℝ E]
    ⦃f : β × γ → E⦄ (hf : Integrable f ((κ ⊗ₖ η) a)) :
    Integrable (fun x => ∫ y, f (x, y) ∂η (a, x)) (κ a)

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

⦃f : β × γ → E⦄

(hf : MeasureTheory.Integrable f ((κ ⊗ₖ η) a))

MeasureTheory.Integrable (fun x => ∫ (y : γ), f (x, y) ∂η (a, x)) (κ a)


@[aesop 30% apply (rule_sets := [Measurable])]
protected theorem StronglyMeasurable.aestronglyMeasurable {α β} {_ : MeasurableSpace α}
    [TopologicalSpace β] {f : α → β} {μ : Measure α} (hf : StronglyMeasurable f) :
    AEStronglyMeasurable f μ

∀ {x : MeasurableSpace α} [inst : TopologicalSpace β] {f : α → β} {μ : MeasureTheory.Measure α},
  MeasureTheory.StronglyMeasurable f → MeasureTheory.AEStronglyMeasurable f μ


@[simp] theorem natAbs_one : natAbs (1 : Int) = (1 : Nat)


@[measurability]
theorem AEMeasurable.sup' (hf : AEMeasurable f μ) (hg : AEMeasurable g μ) :
    AEMeasurable (f ⊔ g) μ

{M : Type u_1}
[MeasurableSpace M]
{α : Type u_2}
{m : MeasurableSpace α}
{μ : MeasureTheory.Measure α}
{f g : α → M}
[Sup M]
[MeasurableSup₂ M]
(hf : AEMeasurable f μ)
(hg : AEMeasurable g μ)


/-- Given a valuation v : R → Γ₀ and a ring homomorphism O →+* R, we say that O is the integers of v
if f is injective, and its range is exactly `v.integer`. -/
structure Integers : Prop where
  hom_inj : Function.Injective (algebraMap O R)
  map_le_one : ∀ x, v (algebraMap O R x) ≤ 1
  exists_of_le_one : ∀ ⦃r⦄, v r ≤ 1 → ∃ x, algebraMap O R x = r

{R : Type u}
{Γ₀ : Type v}
[CommRing R]
[LinearOrderedCommGroupWithZero Γ₀]
{v : Valuation R Γ₀}
{O : Type w}
[CommRing O]
[Algebra O R]
(self : v.Integers O)
⦃r : R⦄


@[simp]
theorem toLocalizationMap_toMap : (toLocalizationMap M S).toMap = (algebraMap R S : R →*₀ S)

{R : Type u_1}
[CommSemiring R]
(M : Submonoid R)
(S : Type u_2)
[CommSemiring S]
[Algebra R S]
[IsLocalization M S]

(IsLocalization.toLocalizationMap M S).toMap = ↑↑(algebraMap R S)


protected theorem HolderWith.holderOnWith {C r : ℝ≥0} {f : X → Y} (h : HolderWith C r f)
    (s : Set X) : HolderOnWith C r f s

{X : Type u_1}
{Y : Type u_2}
[PseudoEMetricSpace X]
[PseudoEMetricSpace Y]
{C r : ℝ≥0}
{f : X → Y}
(h : HolderWith C r f)
(s : Set X)


lemma d₂_eq (i₁ : I₁) {i₂ i₂' : I₂} (h : c₂.Rel i₂ i₂') (i₁₂ : I₁₂)
    (h' : ComplexShape.π c₁ c₂ c₁₂ ⟨i₁, i₂'⟩ = i₁₂) :
    K.d₂ c₁₂ i₁ i₂ i₁₂ = ComplexShape.ε₂ c₁ c₂ c₁₂ ⟨i₁, i₂⟩ • ((K.X i₁).d i₂ i₂' ≫
    K.toGradedObject.ιMapObj (ComplexShape.π c₁ c₂ c₁₂) ⟨i₁, i₂'⟩ i₁₂ h')

{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₂}
(h : c₂.Rel i₂ i₂')
(i₁₂ : I₁₂)
(h' : c₁.π c₂ c₁₂ (i₁, i₂') = i₁₂)

K.d₂ c₁₂ i₁ i₂ i₁₂ = c₁.ε₂ c₂ c₁₂ (i₁, i₂) • (K.X i₁).d i₂ i₂' ≫ K.toGradedObject.ιMapObj (c₁.π c₂ c₁₂) (i₁, i₂') i₁₂ h'


theorem isBigOWith_norm_norm :
    (IsBigOWith c l (fun x => ‖f' x‖) fun x => ‖g' x‖) ↔ IsBigOWith c l f' g'

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

(Asymptotics.IsBigOWith c l (fun x => ‖f' x‖) fun x => ‖g' x‖) ↔ Asymptotics.IsBigOWith c l f' g'


lemma toAffine_of_Z_eq_zero {P : Fin 3 → F} (hPz : P z = 0) :
    toAffine W P = 0

{F : Type v}
[Field F]
{W : WeierstrassCurve.Jacobian F}
{P : Fin 3 → F}
(hPz : P z = 0)

WeierstrassCurve.Jacobian.Point.toAffine W P = 0


theorem algebraMap_apply {r : R} :
    algebraMap R (MvPowerSeries σ A) r = C σ A (algebraMap R A r)

{σ : Type u_1}
{R : Type u_2}
{A : Type u_3}
[CommSemiring R]
[Semiring A]
[Algebra R A]
{r : R}

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


/-- The inverse function is continuous on `f '' s`.
Use properties of `PartialHomeomorph` instead. -/
theorem inverse_continuousOn (hf : ApproximatesLinearOn f (f' : E →L[𝕜] F) s c)
    (hc : Subsingleton E ∨ c < N⁻¹) : ContinuousOn (hf.toPartialEquiv hc).symm (f '' s)

(hc : Subsingleton E ∨ c < ‖↑f'.symm‖₊⁻¹)

ContinuousOn (↑(hf.toPartialEquiv hc).symm) (f '' s)


theorem mfderivWithin_fst {s : Set (M × M')} {x : M × M'}
    (hxs : UniqueMDiffWithinAt (I.prod I') s x) :
    mfderivWithin (I.prod I') I Prod.fst s x =
      ContinuousLinearMap.fst 𝕜 (TangentSpace I x.1) (TangentSpace I' x.2)


theorem ModelWithCorners.range_eq_univ {𝕜 : Type*} [NontriviallyNormedField 𝕜] {E : Type*}
    [NormedAddCommGroup E] [NormedSpace 𝕜 E] {H : Type*} [TopologicalSpace H]
    (I : ModelWithCorners 𝕜 E H) [I.Boundaryless] :
    range I = univ

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


theorem arg_of_re_neg_of_im_nonneg {x : ℂ} (hx_re : x.re < 0) (hx_im : 0 ≤ x.im) :
    arg x = Real.arcsin ((-x).im / abs x) + π

x.arg = Real.arcsin ((-x).im / Complex.abs x) + π


/-- We have `gaussSum χ ψ * gaussSum χ⁻¹ ψ⁻¹ = Fintype.card R`
when `χ` is nontrivial and `ψ` is primitive (and `R` is a field). -/
theorem gaussSum_mul_gaussSum_eq_card {χ : MulChar R R'} (hχ : χ ≠ 1) {ψ : AddChar R R'}
    (hψ : IsPrimitive ψ) :
    gaussSum χ ψ * gaussSum χ⁻¹ ψ⁻¹ = Fintype.card R

{R : Type u}
[Field R]
[Fintype R]
{R' : Type v}
[CommRing R']
[IsDomain R']
{χ : MulChar R R'}
(hχ : χ ≠ 1)
{ψ : AddChar R R'}
(hψ : ψ.IsPrimitive)

gaussSum χ ψ * gaussSum χ⁻¹ ψ⁻¹ = ↑(Fintype.card R)


theorem normSq_eq_zero {x : F} : normSqF x = 0 ↔ x = 0

{𝕜 : Type u_1}
{F : Type u_3}
[RCLike 𝕜]
[AddCommGroup F]
[Module 𝕜 F]
[c : InnerProductSpace.Core 𝕜 F]
{x : F}

InnerProductSpace.Core.normSq x = 0 ↔ x = 0


/-- The sum of two `C^n` functions at a point is `C^n` at this point. -/
theorem ContDiffAt.add {f g : E → F} (hf : ContDiffAt 𝕜 n f x) (hg : ContDiffAt 𝕜 n g x) :
    ContDiffAt 𝕜 n (fun x => f x + g x) x

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type uE}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{F : Type uF}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{x : E}
{n : ℕ∞}
{f g : E → F}
(hf : ContDiffAt 𝕜 n f x)
(hg : ContDiffAt 𝕜 n g x)


/-- We say that a functor `C ⥤ D` into a site is "locally dense" if
for each covering sieve `T` in `D`, `T ∩ mor(C)` generates a covering sieve in `D`.
-/
class LocallyCoverDense : Prop where
  functorPushforward_functorPullback_mem :
    ∀ ⦃X : C⦄ (T : K (G.obj X)), (T.val.functorPullback G).functorPushforward G ∈ K (G.obj X)

{K : CategoryTheory.GrothendieckTopology D}

CategoryTheory.Sieve.functorPushforward G (CategoryTheory.Sieve.functorPullback G ↑T) ∈ K.sieves (G.obj X)


/-- The proposition that a square
```
  Z ---f---> X
  |          |
  g         inl
  |          |
  v          v
  Y --inr--> P

```
is a pushout square. (Also known as a fiber coproduct or cocartesian square.)
-/
structure IsPushout {Z X Y P : C} (f : Z ⟶ X) (g : Z ⟶ Y) (inl : X ⟶ P) (inr : Y ⟶ P) extends
  CommSq f g inl inr : Prop where
  /-- the pushout cocone is a colimit -/
  isColimit' : Nonempty (IsColimit (PushoutCocone.mk _ _ w))

(self : CategoryTheory.IsPushout f g inl inr)

Nonempty (CategoryTheory.Limits.IsColimit (CategoryTheory.Limits.PushoutCocone.mk inl inr ⋯))


@[simp]
theorem valuation_of_unit_eq (x : Rˣ) :
    v.valuationOfNeZero (Units.map (algebraMap R K : R →* K) x) = 1

(v : IsDedekindDomain.HeightOneSpectrum R)

v.valuationOfNeZero ((Units.map ↑(algebraMap R K)) x) = 1


@[simp]
theorem succ_eq_succ : Order.succ = succ


theorem squarefree_iff_factorization_le_one {n : ℕ} (hn : n ≠ 0) :
    Squarefree n ↔ ∀ p, n.factorization p ≤ 1

Squarefree n ↔ ∀ (p : ℕ), n.factorization p ≤ 1


lemma not_mem_primesBelow (n : ℕ) : n ∉ primesBelow n


@[simp] theorem cardFactors_one : Ω 1 = 0


@[simp]
theorem pointedToBipointedFst_comp_swap :
    pointedToBipointedFst ⋙ Bipointed.swap = pointedToBipointedSnd


theorem zpow_lt_top (ha : a ≠ 0) (h'a : a ≠ ∞) (n : ℤ) : a ^ n < ∞

{a : ENNReal}
(ha : a ≠ 0)
(h'a : a ≠ ⊤)
(n : ℤ)


theorem le_of_mul_le_mul_right [MulPosReflectLE α] (bc : b * a ≤ c * a) (a0 : 0 < a) : b ≤ c

{α : Type u_1}
{a b c : α}
[Mul α]
[Zero α]
[Preorder α]
[MulPosReflectLE α]
(bc : b * a ≤ c * a)
(a0 : 0 < a)


/-- **AM-GM inequality**: The **geometric mean is less than or equal to the arithmetic mean. --/
theorem geom_mean_le_arith_mean {ι : Type*} (s : Finset ι) (w : ι → ℝ) (z : ι → ℝ)
    (hw : ∀ i ∈ s, 0 ≤ w i) (hw' : 0 < ∑ i ∈ s, w i) (hz : ∀ i ∈ s, 0 ≤ z i) :
    (∏ i ∈ s, z i ^ w i) ^ (∑ i ∈ s, w i)⁻¹  ≤  (∑ i ∈ s, w i * z i) / (∑ i ∈ s, w i)

{ι : Type u_1}
(s : Finset ι)
(w z : ι → ℝ)
(hw : ∀ i ∈ s, 0 ≤ w i)
(hw' : 0 < ∑ i ∈ s, w i)
(hz : ∀ i ∈ s, 0 ≤ z i)

(∏ i ∈ s, z i ^ w i) ^ (∑ i ∈ s, w i)⁻¹ ≤ (∑ i ∈ s, w i * z i) / ∑ i ∈ s, w i


@[fun_prop, measurability]
theorem measurable_apply [MeasurableSpace F] [BorelSpace F] (x : E) :
    Measurable fun f : E →L[𝕜] F => f x

{𝕜 : Type u_2}
[NontriviallyNormedField 𝕜]
{E : Type u_3}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{F : Type u_4}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
[MeasurableSpace F]
[BorelSpace F]
(x : E)


theorem birkhoffAverage_one (f : α → α) (g : α → M) (x : α) :
    birkhoffAverage R f g 1 x = g x

(R : Type u_1)
{α : Type u_2}
{M : Type u_3}
[DivisionSemiring R]
[AddCommMonoid M]
[Module R M]
(f : α → α)
(g : α → M)
(x : α)


/-- Composing two multiplications on the right by `y` and `x`
is equal to a multiplication on the right by `y * x`.
-/
@[to_additive (attr := simp) "Composing two additions on the right by `y` and `x`
is equal to an addition on the right by `y + x`."]
theorem comp_mul_right (x y : α) : (· * x) ∘ (· * y) = (· * (y * x))


theorem biUnion_univ (s : α → Set β) : ⋃ x ∈ @univ α, s x = ⋃ x, s x

{α : Type u_1}
{β : Type u_2}
(s : α → Set β)


theorem measure_pos_of_superset (h : s ⊆ t) (hs : μ s ≠ 0) : 0 < μ t

{α : Type u_1}
{F : Type u_3}
[FunLike F (Set α) ℝ≥0∞]
[MeasureTheory.OuterMeasureClass F α]
{μ : F}
{s t : Set α}
(h : s ⊆ t)
(hs : μ s ≠ 0)


theorem isAddFundamentalDomain_Ioc {T : ℝ} (hT : 0 < T) (t : ℝ)
    (μ : Measure ℝ := by volume_tac) :
    IsAddFundamentalDomain (AddSubgroup.zmultiples T) (Ioc t (t + T)) μ

(μ : MeasureTheory.Measure ℝ := by volume_tac)

MeasureTheory.IsAddFundamentalDomain (↥(AddSubgroup.zmultiples T)) (Set.Ioc t (t + T)) μ


/--  Standard basis vectors are eigenvectors of any associated diagonal linear operator. -/
lemma hasEigenvector_toLin'_diagonal (d : n → R) (i : n) :
    HasEigenvector (toLin' (diagonal d)) (d i) (Pi.basisFun R n i)

{R : Type u_1}
{n : Type u_2}
[DecidableEq n]
[Fintype n]
[CommRing R]
[Nontrivial R]
(d : n → R)
(i : n)

Module.End.HasEigenvector (Matrix.toLin' (Matrix.diagonal d)) (d i) ((Pi.basisFun R n) i)


/-- Composition by continuous linear equivs on the left respects higher differentiability on
domains. -/
theorem ContinuousLinearEquiv.comp_contDiffOn_iff (e : F ≃L[𝕜] G) :
    ContDiffOn 𝕜 n (e ∘ f) s ↔ ContDiffOn 𝕜 n f s

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type uE}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{F : Type uF}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{G : Type uG}
[NormedAddCommGroup G]
[NormedSpace 𝕜 G]
{s : Set E}
{f : E → F}
{n : ℕ∞}
(e : F ≃L[𝕜] G)

ContDiffOn 𝕜 n (⇑e ∘ f) s ↔ ContDiffOn 𝕜 n f s


@[to_additive]
theorem div_comp [Div γ] (x y : β → γ) (z : α → β) : (x / y) ∘ z = x ∘ z / y ∘ z

{α : Type u_1}
{β : Type u_2}
{γ : Type u_3}
[Div γ]
(x y : β → γ)
(z : α → β)


@[simp]
theorem toDFinsupp_support (s : Multiset α) : s.toDFinsupp.support = s.toFinset

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

(Multiset.toDFinsupp s).support = s.toFinset


theorem neg_le_of_abs_le (h : |a| ≤ b) : -b ≤ a

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


lemma lintegral_le_liminf_lintegral_of_forall_isOpen_measure_le_liminf_measure
    {μ : Measure Ω} {μs : ℕ → Measure Ω} {f : Ω → ℝ} (f_cont : Continuous f) (f_nn : 0 ≤ f)
    (h_opens : ∀ G, IsOpen G → μ G ≤ atTop.liminf (fun i ↦ μs i G)) :
    ∫⁻ x, ENNReal.ofReal (f x) ∂μ ≤ atTop.liminf (fun i ↦ ∫⁻ x, ENNReal.ofReal (f x) ∂ (μs i))

(h_opens : ∀ (G : Set Ω), IsOpen G → μ G ≤ Filter.liminf (fun i => (μs i) G) Filter.atTop)

∫⁻ (x : Ω), ENNReal.ofReal (f x) ∂μ ≤ Filter.liminf (fun i => ∫⁻ (x : Ω), ENNReal.ofReal (f x) ∂μs i) Filter.atTop


theorem mk' (i : α → β) (c : Continuous i) (dense : ∀ x, x ∈ closure (range i))
    (H : ∀ (a : α), ∀ s ∈ 𝓝 a, ∃ t ∈ 𝓝 (i a), ∀ b, i b ∈ t → b ∈ s) : DenseInducing i

(dense : ∀ (x : β), x ∈ closure (Set.range i))

(H : ∀ (a : α), ∀ s ∈ 𝓝 a, ∃ t ∈ 𝓝 (i a), ∀ (b : α), i b ∈ t → b ∈ s)


/-- Characterize `IsSplittingField` with `IntermediateField.adjoin` instead of `Algebra.adjoin`. -/
theorem _root_.isSplittingField_iff_intermediateField {p : F[X]} :
    p.IsSplittingField F E ↔ p.Splits (algebraMap F E) ∧ adjoin F (p.rootSet E) = ⊤

{F : Type u_1}
[Field F]
{E : Type u_2}
[Field E]
[Algebra F E]
{p : F[X]}

Polynomial.IsSplittingField F E p ↔ Polynomial.Splits (algebraMap F E) p ∧ IntermediateField.adjoin F (p.rootSet E) = ⊤


@[reassoc (attr := simp)]
lemma inr_f_desc_f (p : ℤ) :
    (inr φ).f p ≫ (desc φ α β eq).f p = β.f p

(α : CochainComplex.HomComplex.Cochain F K (-1))

(eq : CochainComplex.HomComplex.δ (-1) 0 α = CochainComplex.HomComplex.Cochain.ofHom (φ ≫ β))

(CochainComplex.mappingCone.inr φ).f p ≫ (CochainComplex.mappingCone.desc φ α β eq).f p = β.f p


@[simp] theorem isLUB_empty_iff : IsLUB ∅ a ↔ IsBot a


@[to_additive]
theorem le_mul_of_le_mul_left [CovariantClass α α (· * ·) (· ≤ ·)] {a b c d : α} (h : a ≤ b * c)
    (hle : c ≤ d) :
    a ≤ b * d

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


@[simp]
lemma _root_.LieIdeal.idealizer_eq_normalizer (I : LieIdeal R L) :
    I.idealizer = I.normalizer

{R : Type u_1}
{L : Type u_2}
[CommRing R]
[LieRing L]
[LieAlgebra R L]
(I : LieIdeal R L)

LieSubmodule.idealizer I = LieSubmodule.normalizer I


@[to_additive (attr := simp)]
theorem mul_div_cancel (a b : G) : a * (b / a) = b


/-- Given subsets `t` and `s` of a monoid `M`, if `s ⊆ t`, the submonoid of `M` generated by `s` is
    contained in the submonoid generated by `t`. -/
@[to_additive
      "Given subsets `t` and `s` of an `AddMonoid M`, if `s ⊆ t`, the `AddSubmonoid`
      of `M` generated by `s` is contained in the `AddSubmonoid` generated by `t`."]
theorem closure_mono {s t : Set M} (h : s ⊆ t) : Closure s ⊆ Closure t

{M : Type u_1}
[Monoid M]
{s t : Set M}
(h : s ⊆ t)


@[to_additive]
theorem mem_mul : s ∈ f * g ↔ ∃ t₁ ∈ f, ∃ t₂ ∈ g, t₁ * t₂ ⊆ s

{α : Type u_2}
[Mul α]
{f g : Filter α}
{s : Set α}


lemma gaussianPDFReal_mul {μ : ℝ} {v : ℝ≥0} {c : ℝ} (hc : c ≠ 0) (x : ℝ) :
    gaussianPDFReal μ v (c * x)
      = |c⁻¹| * gaussianPDFReal (c⁻¹ * μ) (⟨(c^2)⁻¹, inv_nonneg.mpr (sq_nonneg _)⟩ * v) x

ProbabilityTheory.gaussianPDFReal μ v (c * x) =
  |c⁻¹| * ProbabilityTheory.gaussianPDFReal (c⁻¹ * μ) (⟨(c ^ 2)⁻¹, ⋯⟩ * v) x


/-- Strict convexity is equivalent to `‖a • x + b • y‖ < 1` for all `x` and `y` of norm at most `1`
and all strictly positive `a` and `b` such that `a + b = 1`. This lemma shows that it suffices to
check this for points of norm one and some `a`, `b` such that `a + b = 1`. -/
theorem StrictConvexSpace.of_norm_combo_lt_one
    (h : ∀ x y : E, ‖x‖ = 1 → ‖y‖ = 1 → x ≠ y → ∃ a b : ℝ, a + b = 1 ∧ ‖a • x + b • y‖ < 1) :
    StrictConvexSpace ℝ E

(h : ∀ (x y : E), ‖x‖ = 1 → ‖y‖ = 1 → x ≠ y → ∃ a b, a + b = 1 ∧ ‖a • x + b • y‖ < 1)


/-- When `R` is commutative and permits an `algebraMap`, `Pi.constRingHom` is equal to that
map. -/
@[simp]
theorem constRingHom_eq_algebraMap : constRingHom A R = algebraMap R (A → R)

(R : Type u_1)
(A : Type u_2)
[CommSemiring R]

Pi.constRingHom A R = algebraMap R (A → R)


theorem disjoint_sdiff_self_right : Disjoint x (y \ x)

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


lemma addPolynomial_eq (x y L : R) : W.addPolynomial x y L = -Cubic.toPoly
    ⟨1, -L ^ 2 - W.a₁ * L + W.a₂,
      2 * x * L ^ 2 + (W.a₁ * x - 2 * y - W.a₃) * L + (-W.a₁ * y + W.a₄),
      -x ^ 2 * L ^ 2 + (2 * x * y + W.a₃ * x) * L - (y ^ 2 + W.a₃ * y - W.a₆)⟩

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


protected theorem modCore_eq_mod (n m : Nat) : Nat.modCore n m = n % m


@[reassoc]
theorem map_π_preserves_coequalizer_inv :
    G.map (coequalizer.π f g) ≫ (PreservesCoequalizer.iso G f g).inv =
      coequalizer.π (G.map f) (G.map g)

[CategoryTheory.Limits.HasCoequalizer (G.map f) (G.map g)]

[CategoryTheory.Limits.PreservesColimit (CategoryTheory.Limits.parallelPair f g) G]

G.map (CategoryTheory.Limits.coequalizer.π f g) ≫ (CategoryTheory.Limits.PreservesCoequalizer.iso G f g).inv =
  CategoryTheory.Limits.coequalizer.π (G.map f) (G.map g)


/-- An integral domain is equal to the intersection of its localizations at all its prime ideals
viewed as subalgebras of its field of fractions. -/
theorem iInf_localization_eq_bot : ⨅ v : PrimeSpectrum R,
    Localization.subalgebra.ofField K _ (v.asIdeal.primeCompl_le_nonZeroDivisors) = ⊥

(R : Type u)
[CommRing R]
[IsDomain R]
(K : Type v)
[Field K]
[Algebra R K]
[IsFractionRing R K]

⨅ v, Localization.subalgebra.ofField K v.asIdeal.primeCompl ⋯ = ⊥


theorem HasFDerivAtFilter.sub (hf : HasFDerivAtFilter f f' x L) (hg : HasFDerivAtFilter g g' x L) :
    HasFDerivAtFilter (fun x => f x - g x) (f' - g') x L

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{F : Type u_3}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{f g : E → F}
{f' g' : E →L[𝕜] F}
{x : E}
{L : Filter E}
(hf : HasFDerivAtFilter f f' x L)
(hg : HasFDerivAtFilter g g' x L)


/-- An algebra is finitely generated if and only if it is a quotient
of a polynomial ring whose variables are indexed by a fintype. -/
theorem iff_quotient_freeAlgebra' : FiniteType R A ↔
    ∃ (ι : Type uA) (_ : Fintype ι) (f : FreeAlgebra R ι →ₐ[R] A), Surjective f

{R : Type uR}
{A : Type uA}
[CommSemiring R]
[Semiring A]
[Algebra R A]

Algebra.FiniteType R A ↔ ∃ ι x f, Function.Surjective ⇑f


@[to_additive]
protected theorem Multipliable.mulIndicator (hf : Multipliable f) (s : Set β) :
    Multipliable (s.mulIndicator f)

{α : Type u_1}
{β : Type u_2}
[CommGroup α]
[UniformSpace α]
[UniformGroup α]
{f : β → α}
[CompleteSpace α]
(hf : Multipliable f)
(s : Set β)


theorem le_rpow_inv_iff_of_neg (hx : 0 < x) (hy : 0 < y) (hz : z < 0) :
    x ≤ y ^ z⁻¹ ↔ y ≤ x ^ z


private lemma surjective_ofWType : Function.Surjective (WType.elim _ <| operate s)

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

Function.Surjective (WType.elim (↥(Subfield.closure s)) (Subfield.operate s))


/-- The diagram described by the universal property for quotients of monoids, when the congruence
    relation is the kernel of the homomorphism, commutes. -/
@[to_additive (attr := simp) "The diagram described by the universal property for quotients
of `AddMonoid`s, when the additive congruence relation is the kernel of the homomorphism,
commutes."]
theorem kerLift_mk (x : M) : kerLift f x = f x

{M : Type u_1}
{P : Type u_3}
[AddZeroClass M]
[AddZeroClass P]
{f : M →+ P}
(x : M)


protected theorem lt_trichotomy (a b : Nat) : a < b ∨ a = b ∨ b < a


theorem zmod_cast_comp_toZModPow (m n : ℕ) (h : m ≤ n) :
    (ZMod.castHom (pow_dvd_pow p h) (ZMod (p ^ m))).comp (@toZModPow p _ n) = @toZModPow p _ m

{p : ℕ}
[hp_prime : Fact (Nat.Prime p)]
(m n : ℕ)
(h : m ≤ n)

(ZMod.castHom ⋯ (ZMod (p ^ m))).comp (PadicInt.toZModPow n) = PadicInt.toZModPow m


/-- A natural isomorphism `L₁ ≅ L₂` induces an equivalence of categories
    `Comma L₁ R ≌ Comma L₂ R`. -/
@[simps!]
def mapLeftIso (i : L₁ ≅ L₂) : Comma L₁ R ≌ Comma L₂ R

{A : Type u₁}
[CategoryTheory.Category.{v₁, u₁} A]
{B : Type u₂}
[CategoryTheory.Category.{v₂, u₂} B]
{T : Type u₃}
[CategoryTheory.Category.{v₃, u₃} T]
(R : CategoryTheory.Functor B T)
{L₁ L₂ : CategoryTheory.Functor A T}
(i : L₁ ≅ L₂)
(X : CategoryTheory.Comma L₂ R)

((CategoryTheory.Comma.mapLeftIso R i).counitIso.inv.app X).left = CategoryTheory.CategoryStruct.id X.left


@[simp]
theorem Ico_disjoint_Ico : Disjoint (Ico a₁ a₂) (Ico b₁ b₂) ↔ min a₂ b₂ ≤ max a₁ b₁

{α : Type v}
[LinearOrder α]
{a₁ a₂ b₁ b₂ : α}

Disjoint (Set.Ico a₁ a₂) (Set.Ico b₁ b₂) ↔ min a₂ b₂ ≤ max a₁ b₁


lemma Odd.of_dvd_nat (hn : Odd n) (hm : m ∣ n) : Odd m


theorem HasDerivWithinAt.cosh (hf : HasDerivWithinAt f f' s x) :
    HasDerivWithinAt (fun x => Real.cosh (f x)) (Real.sinh (f x) * f') s x

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


theorem rev_injective : Injective (@rev n)


theorem bddBelow_coe (s : Set ℝ≥0) : BddBelow (((↑) : ℝ≥0 → ℝ) '' s)


lemma hasSum_int_cosKernel (a : ℝ) {t : ℝ} (ht : 0 < t) :
    HasSum (fun n : ℤ ↦ cexp (2 * π * I * a * n) * rexp (-π * n ^ 2 * t)) ↑(cosKernel a t)

HasSum (fun n => cexp (2 * ↑π * Complex.I * ↑a * ↑n) * ↑(rexp (-π * ↑n ^ 2 * t))) ↑(HurwitzZeta.cosKernel (↑a) t)


@[simp] lemma ofENat_le_aleph0 (n : ℕ∞) : ↑n ≤ ℵ₀


@[simp]
theorem eqToHom_right {X Y : StructuredArrow S T} (h : X = Y) :
    (eqToHom h).right = eqToHom (by rw [h])

{X Y : CategoryTheory.StructuredArrow S T}

(CategoryTheory.eqToHom h).right = CategoryTheory.eqToHom ⋯


@[to_additive]
theorem prod_nsmul (m : Multiset α) : ∀ n : ℕ, (n • m).prod = m.prod ^ n

{α : Type u_3}
[AddCommMonoid α]
(m : Multiset α)
(n : ℕ)


/-- If a function `f` with a densely ordered codomain is strictly monotone on a neighborhood of `a`
and the closure of the image of this neighborhood under `f` is a neighborhood of `f a`, then `f` is
continuous at `a`. -/
theorem StrictMonoOn.continuousAt_of_closure_image_mem_nhds [DenselyOrdered β] {f : α → β}
    {s : Set α} {a : α} (h_mono : StrictMonoOn f s) (hs : s ∈ 𝓝 a)
    (hfs : closure (f '' s) ∈ 𝓝 (f a)) : ContinuousAt f a

{α : Type u_1}
{β : Type u_2}
[LinearOrder α]
[TopologicalSpace α]
[OrderTopology α]
[LinearOrder β]
[TopologicalSpace β]
[OrderTopology β]
[DenselyOrdered β]
{f : α → β}
{s : Set α}
{a : α}
(h_mono : StrictMonoOn f s)
(hs : s ∈ 𝓝 a)
(hfs : closure (f '' s) ∈ 𝓝 (f a))


theorem finrank_span_set_eq_card {s : Set M} [Fintype s] (hs : LinearIndependent R ((↑) : s → M)) :
    finrank R (span R s) = s.toFinset.card

(hs : LinearIndependent (ι := { x // x ∈ s }) R Subtype.val)

FiniteDimensional.finrank R ↥(Submodule.span R s) = s.toFinset.card


@[to_additive (attr := simp)]
theorem mk_pow {M} [Monoid M] {A : Type*} [SetLike A M] [SubmonoidClass A M] {S : A} (x : M)
    (hx : x ∈ S) (n : ℕ) : (⟨x, hx⟩ : S) ^ n = ⟨x ^ n, pow_mem hx n⟩

{M : Type u_6}
[AddMonoid M]
{A : Type u_5}
[SetLike A M]
[AddSubmonoidClass A M]
{S : A}
(x : M)
(hx : x ∈ S)
(n : ℕ)


/-- A special case of **Sylow's first theorem**. If `G` is a `p`-group and `H` a subgroup of size at
least `p ^ n` then there is a subgroup of `H` of cardinality `p ^ n`. -/
lemma exists_subgroup_le_card_pow_prime_of_le_card {n p : ℕ} (hp : p.Prime) (h : IsPGroup p G)
    {H : Subgroup G} (hn : p ^ n ≤ Nat.card H) : ∃ H' ≤ H, Nat.card H' = p ^ n

{G : Type u}
[Group G]
{n p : ℕ}
(hp : Nat.Prime p)
(h : IsPGroup p G)
{H : Subgroup G}
(hn : p ^ n ≤ Nat.card ↥H)


@[to_additive nsmul_top]
theorem top_pow : ∀ {n : ℕ}, n ≠ 0 → (⊤ : Filter α) ^ n = ⊤


@[to_additive UniformContinuous.const_zsmul]
theorem UniformContinuous.zpow_const [UniformSpace β] {f : β → α} (hf : UniformContinuous f) :
    ∀ n : ℤ, UniformContinuous fun x => f x ^ n

{α : Type u_1}
{β : Type u_2}
[UniformSpace α]
[Group α]
[UniformGroup α]
[UniformSpace β]
{f : β → α}
(hf : UniformContinuous f)
(n : ℤ)


/-- If the oriented angle between two vectors is `π / 2`, the inner product of those vectors
(reversed) is zero. -/
theorem inner_rev_eq_zero_of_oangle_eq_pi_div_two {x y : V} (h : o.oangle x y = (π / 2 : ℝ)) :
    ⟪y, x⟫ = 0

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


theorem HasStrictDerivAt.const_add (c : F) (hf : HasStrictDerivAt f f' x) :
    HasStrictDerivAt (fun y ↦ c + f y) f' x

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

HasStrictDerivAt (fun y => c + f y) f' x


@[simp]
theorem coe_copy (f : BiheytingHom α β) (f' : α → β) (h : f' = f) : ⇑(f.copy f' h) = f'

{α : Type u_2}
{β : Type u_3}
[BiheytingAlgebra α]
[BiheytingAlgebra β]
(f : BiheytingHom α β)
(f' : α → β)
(h : f' = ⇑f)


lemma mul_div_le_mul_div_assoc (a b c : ℕ) : a * (b / c) ≤ a * b / c


/-- The circumcenter lies in the affine span. -/
theorem circumcenter_mem_affineSpan {n : ℕ} (s : Simplex ℝ P n) :
    s.circumcenter ∈ affineSpan ℝ (Set.range s.points)

{V : Type u_1}
{P : Type u_2}
[NormedAddCommGroup V]
[InnerProductSpace ℝ V]
[MetricSpace P]
[NormedAddTorsor V P]
{n : ℕ}
(s : Affine.Simplex ℝ P n)


theorem norm_algebraMap (x : 𝕜) : ‖algebraMap 𝕜 𝕜' x‖ = ‖x‖ * ‖(1 : 𝕜')‖

{𝕜 : Type u_1}
(𝕜' : Type u_2)
[NormedField 𝕜]
[SeminormedRing 𝕜']
[NormedAlgebra 𝕜 𝕜']
(x : 𝕜)


@[simp]
theorem isBigO_neg_right : (f =O[l] fun x => -g' x) ↔ f =O[l] g'

{α : Type u_1}
{E : Type u_3}
{F' : Type u_7}
[Norm E]
[SeminormedAddCommGroup F']
{f : α → E}
{g' : α → F'}
{l : Filter α}


/-- The first projection of `prod F G`, onto `F`. -/
@[simps]
def prod.fst : prod F G ⟶ F

{F G : CategoryTheory.Functor C (Type w)}

∀ (x : C) (a : (CategoryTheory.FunctorToTypes.prod F G).obj x), CategoryTheory.FunctorToTypes.prod.fst.app x a = a.1


theorem one_lt_zpow (ha : 1 < a) : ∀ n : ℤ, 0 < n → 1 < a ^ n

{α : Type u_1}
[LinearOrderedSemifield α]
{a : α}
(ha : 1 < a)
(n : ℤ)


theorem iteratedDeriv_eq_iteratedFDeriv :
    iteratedDeriv n f x = (iteratedFDeriv 𝕜 n f x : (Fin n → 𝕜) → F) fun _ : Fin n => 1

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{F : Type u_2}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{n : ℕ}
{f : 𝕜 → F}
{x : 𝕜}

iteratedDeriv n f x = (iteratedFDeriv 𝕜 n f x) fun x => 1


lemma Odd.toUnitHom_eval_neg_one (hψ : ψ.Odd) : ψ.toUnitHom (-1) = -1

{S : Type}
[CommRing S]
{m : ℕ}
(ψ : DirichletCharacter S m)
(hψ : ψ.Odd)


@[simp]
theorem prodProdProdComm_symm (α β γ δ : Type*) :
    (prodProdProdComm α β γ δ).symm = prodProdProdComm α γ β δ

(α : Type u_1)
(β : Type u_2)
(γ : Type u_3)
(δ : Type u_4)

(Equiv.prodProdProdComm α β γ δ).symm = Equiv.prodProdProdComm α γ β δ


theorem iCondIndepFun.condIndepFun {β : ι → Type*}
    {m : ∀ x, MeasurableSpace (β x)} {f : ∀ i, Ω → β i}
    (hf_Indep : iCondIndepFun m' hm' m f μ) {i j : ι} (hij : i ≠ j) :
    CondIndepFun m' hm' (f i) (f j) μ

(hf_Indep : ProbabilityTheory.iCondIndepFun m' hm' m f μ)

ProbabilityTheory.CondIndepFun m' hm' (f i) (f j) μ


theorem insertNth_eraseIdx_of_le :
    ∀ n m as,
      n < length as → m ≤ n → insertNth m a (as.eraseIdx n) = (as.insertNth m a).eraseIdx (n + 1)

{α : Type u}
{a : α}
(n m : ℕ)
(as : List α)

n < as.length → m ≤ n → List.insertNth m a (as.eraseIdx n) = (List.insertNth m a as).eraseIdx (n + 1)


@[simp]
theorem _root_.AddMonoid.exponent_additive :
    AddMonoid.exponent (Additive G) = exponent G

AddMonoid.exponent (Additive G) = Monoid.exponent G


theorem OrderIso.strictConvexOn_symm (f : α ≃o β) (hf : StrictConcaveOn 𝕜 univ f) :
    StrictConvexOn 𝕜 univ f.symm

{𝕜 : Type u_1}
{α : Type u_4}
{β : Type u_5}
[OrderedSemiring 𝕜]
[OrderedAddCommMonoid α]
[SMul 𝕜 α]
[OrderedAddCommMonoid β]
[SMul 𝕜 β]
(f : α ≃o β)
(hf : StrictConcaveOn 𝕜 Set.univ ⇑f)


@[simp]
theorem mk_left (f : S.obj Y ⟶ T) : (mk f).left = Y

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

(CategoryTheory.CostructuredArrow.mk f).left = Y


theorem _root_.Function.Bijective.list_map {f : α → β} (h : Bijective f) : Bijective (map f)

{α : Type u}
{β : Type v}
{f : α → β}
(h : Function.Bijective f)


theorem one_sub_K_pos (hf : ContractingWith K f) : (0 : ℝ) < 1 - K

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


/-- See also `LieSubmodule.lieIdeal_oper_eq_linear_span'` and
`LieSubmodule.lieIdeal_oper_eq_tensor_map_range`. -/
theorem lieIdeal_oper_eq_linear_span :
    (↑⁅I, N⁆ : Submodule R M) =
      Submodule.span R { m | ∃ (x : I) (n : N), ⁅(x : L), (n : M)⁆ = m }

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

↑⁅I, N⁆ = Submodule.span R {m | ∃ x n, ⁅↑x, ↑n⁆ = m}


/-- An orthogonal family of subspaces of `E` satisfies `DirectSum.IsInternal` (that is,
they provide an internal direct sum decomposition of `E`) if and only if their span has trivial
orthogonal complement. -/
theorem OrthogonalFamily.isInternal_iff_of_isComplete [DecidableEq ι] {V : ι → Submodule 𝕜 E}
    (hV : OrthogonalFamily 𝕜 (fun i => V i) fun i => (V i).subtypeₗᵢ)
    (hc : IsComplete (↑(iSup V) : Set E)) : DirectSum.IsInternal V ↔ (iSup V)ᗮ = ⊥

(hV : OrthogonalFamily 𝕜 (fun i => ↥(V i)) fun i => (V i).subtypeₗᵢ)


@[simp]
theorem sum_apply {α : Type*} (f : α → M [⋀^ι]→L[R] N) (m : ι → M) {s : Finset α} :
    (∑ a ∈ s, f a) m = ∑ a ∈ s, f a m

{R : Type u_1}
{M : Type u_2}
{N : Type u_4}
{ι : Type u_6}
[Semiring R]
[AddCommMonoid M]
[Module R M]
[TopologicalSpace M]
[AddCommMonoid N]
[Module R N]
[TopologicalSpace N]
[ContinuousAdd N]
{α : Type u_7}
(f : α → M [⋀^ι]→L[R] N)
(m : ι → M)
{s : Finset α}


lemma inr_le_iff (a b : A) (ha : IsSelfAdjoint a := by cfc_tac)
    (hb : IsSelfAdjoint b := by cfc_tac) :
    (a : Unitization ℂ A) ≤ (b : Unitization ℂ A) ↔ a ≤ b

{A : Type u_1}
[NonUnitalNormedRing A]
[CompleteSpace A]
[PartialOrder A]
[StarRing A]
[StarOrderedRing A]
[CstarRing A]
[NormedSpace ℂ A]
[StarModule ℂ A]
[SMulCommClass ℂ A A]
[IsScalarTower ℂ A A]
(a b : A)
(ha : IsSelfAdjoint a := by cfc_tac)
(hb : IsSelfAdjoint b := by cfc_tac)

↑a ≤ ↑b ↔ a ≤ b


@[simp] lemma op_inv_associator (X Y Z : C) :
    (α_ X Y Z).inv.op = (α_ (op X) (op Y) (op Z)).hom

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

(CategoryTheory.MonoidalCategory.associator X Y Z).inv.op =
  (CategoryTheory.MonoidalCategory.associator (Opposite.op X) (Opposite.op Y) (Opposite.op Z)).hom


@[to_additive sum_lt_sum_of_nonempty]
lemma prod_lt_prod_of_nonempty' (hs : s ≠ ∅) (hfg : ∀ i ∈ s, f i < g i) :
    (s.map f).prod < (s.map g).prod

{ι : Type u_1}
{α : Type u_2}
[OrderedCancelCommMonoid α]
{s : Multiset ι}
{f g : ι → α}
(hs : s ≠ ∅)
(hfg : ∀ i ∈ s, f i < g i)

(Multiset.map f s).prod < (Multiset.map g s).prod


@[simp]
theorem polynomial_smul_apply [Semiring R'] [SMul R' S'] (p : R'[X]) (f : R' → S') (x : R') :
    (p • f) x = eval x p • f x

(R' : Type u)
(S' : Type v)
[Semiring R']
[SMul R' S']
(p : R'[X])
(f : R' → S')
(x : R')


theorem Poly.denote_sort (ctx : Context) (m : Poly) : m.sort.denote ctx = m.denote ctx

(ctx : Nat.Linear.Context)
(m : Nat.Linear.Poly)

Nat.Linear.Poly.denote ctx m.sort = Nat.Linear.Poly.denote ctx m


/-- In a nontrivial ring, `Matrix.mvPolynomialX m m R` has non-zero determinant. -/
theorem det_mvPolynomialX_ne_zero [DecidableEq m] [Fintype m] [CommRing R] [Nontrivial R] :
    det (mvPolynomialX m m R) ≠ 0

(m : Type u_1)
(R : Type u_3)
[DecidableEq m]
[Fintype m]
[CommRing R]
[Nontrivial R]


/-- `Equiv.mulLeft₀` as an order_iso. -/
@[simps! (config := { simpRhs := true })]
def OrderIso.mulLeft₀ (a : α) (ha : 0 < a) : α ≃o α

{α : Type u_2}
[LinearOrderedSemifield α]
(a : α)
(ha : 0 < a)
(x : α)

(RelIso.symm (OrderIso.mulLeft₀ a ha)) x = a⁻¹ * x


theorem neg_one_eq_one_iff [Nontrivial R] : (-1 : R) = 1 ↔ ringChar R = 2


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

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


theorem one_div_le_neg_one (h1 : a < 0) (h2 : -1 ≤ a) : 1 / a ≤ -1

{α : Type u_2}
[LinearOrderedField α]
{a : α}
(h1 : a < 0)
(h2 : -1 ≤ a)


theorem HasBasis.limsup_eq_sInf_univ_of_empty {f : ι → α} {v : Filter ι}
    {p : ι' → Prop} {s : ι' → Set ι} (hv : v.HasBasis p s) (i : ι') (hi : p i) (h'i : s i = ∅) :
    limsup f v = sInf univ

{α : Type u_1}
{ι : Type u_4}
{ι' : Type u_5}
[ConditionallyCompleteLattice α]
{f : ι → α}
{v : Filter ι}
{p : ι' → Prop}
{s : ι' → Set ι}
(hv : v.HasBasis p s)
(i : ι')
(hi : p i)
(h'i : s i = ∅)


@[to_additive]
theorem mul_le_of_mul_le_right [CovariantClass α α (swap (· * ·)) (· ≤ ·)] {a b c d : α}
    (h : a * b ≤ c) (hle : d ≤ a) :
    d * b ≤ c

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


/-- A local diffeomorphism on `s` is a local homeomorphism on `s`. -/
theorem IsLocalDiffeomorphOn.isLocalHomeomorphOn {s : Set M} (hf : IsLocalDiffeomorphOn I J n f s) :
    IsLocalHomeomorphOn f s

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{F : Type u_3}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{H : Type u_4}
[TopologicalSpace H]
{G : Type u_5}
[TopologicalSpace G]
{I : ModelWithCorners 𝕜 E H}
{J : ModelWithCorners 𝕜 F G}
{M : Type u_6}
[TopologicalSpace M]
[ChartedSpace H M]
{N : Type u_7}
[TopologicalSpace N]
[ChartedSpace G N]
{n : ℕ∞}
{f : M → N}
{s : Set M}
(hf : IsLocalDiffeomorphOn I J n f s)


/-- A `Fintype` can be given a field structure iff its cardinality is a prime power. -/
theorem Fintype.nonempty_field_iff {α} [Fintype α] : Nonempty (Field α) ↔ IsPrimePow ‖α‖


theorem card_units (p : ℕ) [Fact p.Prime] : Fintype.card (ZMod p)ˣ = p - 1


theorem _root_.MeasurableSet.exists_isClosed_diff_lt [OpensMeasurableSpace α] [WeaklyRegular μ]
    ⦃A : Set α⦄ (hA : MeasurableSet A) (h'A : μ A ≠ ∞) {ε : ℝ≥0∞} (hε : ε ≠ 0) :
    ∃ F, F ⊆ A ∧ IsClosed F ∧ μ (A \ F) < ε

{α : Type u_1}
[MeasurableSpace α]
[TopologicalSpace α]
{μ : MeasureTheory.Measure α}
[OpensMeasurableSpace α]
[μ.WeaklyRegular]
⦃A : Set α⦄
(hA : MeasurableSet A)
(h'A : μ A ≠ ⊤)
{ε : ℝ≥0∞}
(hε : ε ≠ 0)


@[to_additive (attr := aesop safe 20 apply (rule_sets := [Measurable]))]
protected theorem div [Group β] [TopologicalGroup β] (hf : AEStronglyMeasurable f μ)
    (hg : AEStronglyMeasurable g μ) : AEStronglyMeasurable (f / g) μ

(hf : MeasureTheory.AEStronglyMeasurable f μ)

(hg : MeasureTheory.AEStronglyMeasurable g μ)

MeasureTheory.AEStronglyMeasurable (f - g) μ


@[simp]
theorem coe_top : (↑(⊤ : ClopenUpperSet α) : Set α) = univ

{α : Type u_1}
[TopologicalSpace α]
[LE α]


theorem mul_div_cancel_of_mod_eq_zero {a b : Int} (H : a.mod b = 0) : b * (a.div b) = a


/-- For any extended real number `x` which is not `⊥`, the sum of `⊤` and `x` is equal to `⊤`. -/
@[simp]
theorem top_add_of_ne_bot {x : EReal} (h : x ≠ ⊥) : ⊤ + x = ⊤


theorem left_mem_Ico : a ∈ Ico a b ↔ a < b

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


theorem w_cases {α : TypeVec n} {C : P.W α → Prop}
    (ih : ∀ (a : P.A) (f' : P.drop.B a ⟹ α) (f : P.last.B a → P.W α), C (P.wMk a f' f)) :
    ∀ x, C x

(ih : ∀ (a : P.A) (f' : (P.drop.B a).Arrow α) (f : P.last.B a → P.W α), C (P.wMk a f' f))


/-- For each `q`, `P q` is a natural transformation. -/
@[simps]
def natTransP (q : ℕ) : alternatingFaceMapComplex C ⟶ alternatingFaceMapComplex C

{C : Type u_1}
[CategoryTheory.Category.{u_2, u_1} C]
[CategoryTheory.Preadditive C]
(q : ℕ)
(X : CategoryTheory.SimplicialObject C)

(AlgebraicTopology.DoldKan.natTransP q).app X = AlgebraicTopology.DoldKan.P q


@[simp high]
theorem _root_.LinearIsometryEquiv.piLpCongrLeft_single [DecidableEq ι] [DecidableEq ι']
    (e : ι ≃ ι') (i : ι) (v : E) :
    LinearIsometryEquiv.piLpCongrLeft p 𝕜 E e ((WithLp.equiv p (_ → E)).symm <| Pi.single i v) =
      (WithLp.equiv p (_ → E)).symm (Pi.single (e i) v)

{p : ℝ≥0∞}
{𝕜 : Type u_1}
{ι : Type u_2}
[Fact (1 ≤ p)]
[Fintype ι]
[Semiring 𝕜]
{ι' : Type u_5}
[Fintype ι']
{E : Type u_6}
[SeminormedAddCommGroup E]
[Module 𝕜 E]
[DecidableEq ι]
[DecidableEq ι']
(e : ι ≃ ι')
(i : ι)
(v : E)

(LinearIsometryEquiv.piLpCongrLeft p 𝕜 E e) ((WithLp.equiv p (ι → E)).symm (Pi.single i v)) =
  (WithLp.equiv p (ι' → E)).symm (Pi.single (e i) v)


@[simp]
theorem wellFoundedOn_univ : (univ : Set α).WellFoundedOn r ↔ WellFounded r

Set.univ.WellFoundedOn r ↔ WellFounded r


theorem LeftInverse.prodMap (hf : LeftInverse f₁ f₂) (hg : LeftInverse g₁ g₂) :
    LeftInverse (map f₁ g₁) (map f₂ g₂)

{α : Type u_1}
{β : Type u_2}
{γ : Type u_3}
{δ : Type u_4}
{f₁ : α → β}
{g₁ : γ → δ}
{f₂ : β → α}
{g₂ : δ → γ}
(hf : Function.LeftInverse f₁ f₂)
(hg : Function.LeftInverse g₁ g₂)

Function.LeftInverse (Prod.map f₁ g₁) (Prod.map f₂ g₂)


theorem continuous_map_sInf {α : Type*} [TopologicalSpace α]
    {S : Set (Setoid α)} {s : Setoid α} (h : s ∈ S) : Continuous (Setoid.map_sInf h)

{α : Type u_5}
[TopologicalSpace α]
{S : Set (Setoid α)}
{s : Setoid α}
(h : s ∈ S)


theorem card_support_le_one' [Nonempty α] {f : α →₀ M} :
    card f.support ≤ 1 ↔ ∃ a b, f = single a b

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

f.support.card ≤ 1 ↔ ∃ a b, f = Finsupp.single a b


theorem smul_tmul' (r : R') (m : M) (n : N) : r • m ⊗ₜ[R] n = (r • m) ⊗ₜ n

{R : Type u_1}
[CommSemiring R]
{R' : Type u_2}
[Monoid R']
{M : Type u_4}
{N : Type u_5}
[AddCommMonoid M]
[AddCommMonoid N]
[Module R M]
[Module R N]
[DistribMulAction R' M]
[SMulCommClass R R' M]
(r : R')
(m : M)
(n : N)


@[to_additive]
theorem NeBot.smul_filter : f.NeBot → (a • f).NeBot

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


/-- Composite functors induce composite functors on matrix categories.
-/
@[simps!]
def mapMatComp {E : Type*} [Category.{v₁} E] [Preadditive E] (F : C ⥤ D) [Functor.Additive F]
    (G : D ⥤ E) [Functor.Additive G] : (F ⋙ G).mapMat_ ≅ F.mapMat_ ⋙ G.mapMat_

{C : Type u₁}
[CategoryTheory.Category.{v₁, u₁} C]
[CategoryTheory.Preadditive C]
{D : Type u_1}
[CategoryTheory.Category.{v₁, u_1} D]
[CategoryTheory.Preadditive D]
{E : Type u_2}
[CategoryTheory.Category.{v₁, u_2} E]
[CategoryTheory.Preadditive E]
(F : C ⥤ D)
[F.Additive]
(G : D ⥤ E)
[G.Additive]
(X : CategoryTheory.Mat_ C)

(F.mapMatComp G).hom.app X = 𝟙 ((F ⋙ G).mapMat_.obj X)


theorem bddBelow_Ioo : BddBelow (Ioo a b)


theorem arcsin_sin' {x : ℝ} (hx : x ∈ Icc (-(π / 2)) (π / 2)) : arcsin (sin x) = x


theorem forall_image {p : β → Prop} : (∀ b ∈ s.image f, p b) ↔ ∀ a ∈ s, p (f a)

{α : Type u_1}
{β : Type u_2}
[DecidableEq β]
{f : α → β}
{s : Finset α}
{p : β → Prop}

(∀ b ∈ Finset.image f s, p b) ↔ ∀ a ∈ s, p (f a)


/-- The `AddMonoidHom` between spaces of matrices induced by an `AddMonoidHom` between their
coefficients. This is `Matrix.map` as an `AddMonoidHom`. -/
@[simps]
def mapMatrix (f : α →+ β) : Matrix m n α →+ Matrix m n β

{m : Type u_2}
{n : Type u_3}
{α : Type v}
{β : Type w}
[AddZeroClass α]
[AddZeroClass β]
(f : α →+ β)
(M : Matrix m n α)


/-- A partition of `n` is a multiset of positive integers summing to `n`. -/
@[ext]
structure Partition (n : ℕ) where
  /-- positive integers summing to `n`-/
  parts : Multiset ℕ
  /-- proof that the `parts` are positive-/
  parts_pos : ∀ {i}, i ∈ parts → 0 < i
  /-- proof that the `parts` sum to `n`-/
  parts_sum : parts.sum = n


@[simp]
theorem LinearMap.toMatrix_algebraMap (x : R) :
    LinearMap.toMatrix v₁ v₁ (algebraMap R (Module.End R M₁) x) = scalar n x

{R : Type u_1}
[CommSemiring R]
{n : Type u_4}
[Fintype n]
[DecidableEq n]
{M₁ : Type u_5}
[AddCommMonoid M₁]
[Module R M₁]
(v₁ : Basis n R M₁)
(x : R)

(LinearMap.toMatrix v₁ v₁) ((algebraMap R (Module.End R M₁)) x) = (Matrix.scalar n) x


/-- A function `-f` is strictly convex iff `f` is strictly concave. -/
@[simp]
theorem neg_strictConvexOn_iff : StrictConvexOn 𝕜 s (-f) ↔ StrictConcaveOn 𝕜 s f

{𝕜 : Type u_1}
{E : Type u_2}
{β : Type u_5}
[OrderedSemiring 𝕜]
[AddCommMonoid E]
[OrderedAddCommGroup β]
[SMul 𝕜 E]
[Module 𝕜 β]
{s : Set E}
{f : E → β}


theorem discr_comp (f : (n → R) →ₗ[R] n → R) :
    (Q.comp f).discr = f.toMatrix'.det * f.toMatrix'.det * Q.discr

{R : Type u_3}
{n : Type w}
[Fintype n]
[CommRing R]
[DecidableEq n]
[Invertible 2]
{Q : QuadraticMap R (n → R) R}
(f : (n → R) →ₗ[R] n → R)

(Q.comp f).discr = (LinearMap.toMatrix' f).det * (LinearMap.toMatrix' f).det * Q.discr


theorem lintegral_strict_mono_of_ae_le_of_ae_lt_on {f g : α → ℝ≥0∞} (hg : AEMeasurable g μ)
    (hfi : ∫⁻ x, f x ∂μ ≠ ∞) (h_le : f ≤ᵐ[μ] g) {s : Set α} (hμs : μ s ≠ 0)
    (h : ∀ᵐ x ∂μ, x ∈ s → f x < g x) : ∫⁻ x, f x ∂μ < ∫⁻ x, g x ∂μ

{α : Type u_1}
{m : MeasurableSpace α}
{μ : MeasureTheory.Measure α}
{f g : α → ℝ≥0∞}
(hg : AEMeasurable g μ)
(hfi : ∫⁻ (x : α), f x ∂μ ≠ ⊤)
(h_le : f ≤ᵐ[μ] g)
{s : Set α}
(hμs : μ s ≠ 0)
(h : ∀ᵐ (x : α) ∂μ, x ∈ s → f x < g x)


/-- The horizontal composition of two commutative squares as below is a commutative square.
```
  W ---f---> X ---f'--> X'
  |          |          |
  g          h          h'
  |          |          |
  v          v          v
  Y ---i---> Z ---i'--> Z'

```
-/
lemma horiz_comp {W X X' Y Z Z' : C} {f : W ⟶ X} {f' : X ⟶ X'} {g : W ⟶ Y} {h : X ⟶ Z}
    {h' : X' ⟶ Z'} {i : Y ⟶ Z} {i' : Z ⟶ Z'} (hsq₁ : CommSq f g h i) (hsq₂ : CommSq f' h h' i') :
    CommSq (f ≫ f') g h' (i ≫ i')

(hsq₂ : CategoryTheory.CommSq f' h h' i')

CategoryTheory.CommSq (CategoryTheory.CategoryStruct.comp f f') g h' (CategoryTheory.CategoryStruct.comp i i')


@[simp]
theorem char_one (V : FDRep k G) : V.character 1 = FiniteDimensional.finrank k V

{k : Type u}
[Field k]
{G : Type u}
[Monoid G]
(V : FDRep k G)

V.character 1 = ↑(FiniteDimensional.finrank k (CoeSort.coe V))


{α : Type u_1}
{β : Type u_2}
(e : PartialEquiv α β)


theorem comp_init {α : Type*} {β : Type*} (g : α → β) (q : Fin n.succ → α) :
    g ∘ init q = init (g ∘ q)

{n : ℕ}
{α : Type u_1}
{β : Type u_2}
(g : α → β)
(q : Fin n.succ → α)


/-- *Diagonalization theorem*, *spectral theorem*; version 2: A self-adjoint operator `T` on a
finite-dimensional inner product space `E` acts diagonally on the identification of `E` with
Euclidean space induced by an orthonormal basis of eigenvectors of `T`. -/
theorem eigenvectorBasis_apply_self_apply (v : E) (i : Fin n) :
    (hT.eigenvectorBasis hn).repr (T v) i =
      hT.eigenvalues hn i * (hT.eigenvectorBasis hn).repr v i

(hn : FiniteDimensional.finrank 𝕜 E = n)

(hT.eigenvectorBasis hn).repr (T v) i = ↑(hT.eigenvalues hn i) * (hT.eigenvectorBasis hn).repr v i


theorem rel_sections {r : α → β → Prop} :
    (Forall₂ (Forall₂ r) ⇒ Forall₂ (Forall₂ r)) sections sections

{α : Type u_1}
{β : Type u_2}
{r : α → β → Prop}

(List.Forall₂ (List.Forall₂ r) ⇒ List.Forall₂ (List.Forall₂ r)) List.sections List.sections


/-- Implementation of `SheafConditionPairwiseIntersections.coneEquiv`. -/
@[simps!]
def coneEquivCounitIso :
    coneEquivInverse F U ⋙ coneEquivFunctor F U ≅
      𝟭 (Limits.Cone (SheafConditionEqualizerProducts.diagram F U))

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

∀ (X_1 : CategoryTheory.Limits.Cone (TopCat.Presheaf.SheafConditionEqualizerProducts.diagram F U)),
  ((TopCat.Presheaf.SheafConditionPairwiseIntersections.coneEquivCounitIso F U).inv.app X_1).hom = 𝟙 X_1.pt


@[to_additive]
theorem div_iInter_subset (s : Set α) (t : ι → Set α) : (s / ⋂ i, t i) ⊆ ⋂ i, s / t i

{α : Type u_2}
{ι : Sort u_5}
[Div α]
(s : Set α)
(t : ι → Set α)


theorem Γ_map_op {X Y : Scheme} (f : X ⟶ Y) : Γ.map f.op = f.app ⊤

{X Y : AlgebraicGeometry.Scheme}
(f : X ⟶ Y)

AlgebraicGeometry.Scheme.Γ.map f.op = AlgebraicGeometry.Scheme.Hom.app f ⊤


theorem lift_comp_reindex (e : ι ≃ ι₂) (φ : MultilinearMap R (fun i ↦ s (e.symm i)) E) :
    lift φ ∘ₗ (reindex R s e) = lift ((domDomCongrLinearEquiv' R R s _ e).symm φ)

(e : ι ≃ ι₂)

(φ : MultilinearMap R (fun i => s (e.symm i)) E)

PiTensorProduct.lift φ ∘ₗ ↑(PiTensorProduct.reindex R s e) =
  PiTensorProduct.lift ((MultilinearMap.domDomCongrLinearEquiv' R R s E e).symm φ)


@[simp] lemma cons_lt_cons_iff : a ::ₘ s < a ::ₘ t ↔ s < t

{α : Type u_1}
{s t : Multiset α}
{a : α}


theorem isOpen_Iic_principal {s : Set α} : IsOpen (Iic (𝓟 s))


theorem ContMDiffAt.snd {f : N → M × M'} {x : N} (hf : ContMDiffAt J (I.prod I') n f x) :
    ContMDiffAt J I' n (fun x => (f x).2) x

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{H : Type u_3}
[TopologicalSpace H]
{I : ModelWithCorners 𝕜 E H}
{M : Type u_4}
[TopologicalSpace M]
[ChartedSpace H M]
{E' : Type u_5}
[NormedAddCommGroup E']
[NormedSpace 𝕜 E']
{H' : Type u_6}
[TopologicalSpace H']
{I' : ModelWithCorners 𝕜 E' H'}
{M' : Type u_7}
[TopologicalSpace M']
[ChartedSpace H' M']
{F : Type u_11}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{G : Type u_12}
[TopologicalSpace G]
{J : ModelWithCorners 𝕜 F G}
{N : Type u_13}
[TopologicalSpace N]
[ChartedSpace G N]
{n : ℕ∞}
{f : N → M × M'}
{x : N}
(hf : ContMDiffAt J (I.prod I') n f x)


lemma inv_smul_lt_iff_of_neg (h : a < 0) : a⁻¹ • b₁ < b₂ ↔ a • b₂ < b₁

{α : Type u_1}
{β : Type u_2}
[LinearOrderedField α]
[OrderedAddCommGroup β]
[Module α β]
{a : α}
{b₁ b₂ : β}
[PosSMulStrictMono α β]
(h : a < 0)

a⁻¹ • b₁ < b₂ ↔ a • b₂ < b₁


@[to_additive]
protected theorem one_mul (x : R[S⁻¹]) : 1 * x = x

{R : Type u_1}
[Monoid R]
{S : Submonoid R}
[OreLocalization.OreSet S]
(x : OreLocalization S R)


/-- Construct an algebra isomorphism from an equality of intermediate fields -/
@[simps! apply]
def equivOfEq {S T : IntermediateField F E} (h : S = T) : S ≃ₐ[F] T

{F : Type u_1}
[Field F]
{E : Type u_2}
[Field E]
[Algebra F E]
{S T : IntermediateField F E}
(h : S = T)
(x : ↥S.toSubalgebra)

(IntermediateField.equivOfEq h) x = ⟨↑x, ⋯⟩


lemma neg_of_Z_eq_zero {P : Fin 3 → F} (hP : W.Nonsingular P) (hPz : P z = 0) :
    W.neg P = -(P y / P x) • ![1, 1, 0]

{F : Type v}
[Field F]
{W : WeierstrassCurve.Jacobian F}
{P : Fin 3 → F}
(hP : W.Nonsingular P)
(hPz : P z = 0)


theorem log_eq_zero {b o : Ordinal} (hbo : o < b) : log b o = 0


lemma IsOfFinOrder.pow {n : ℕ} : IsOfFinOrder a → IsOfFinOrder (a ^ n)

{G : Type u_1}
[Monoid G]
{a : G}
{n : ℕ}


/-- Functoriality maps for `ComposableArrows.sc'`. -/
@[simps]
def sc'Map {S₁ S₂ : ComposableArrows C n} (φ : S₁ ⟶ S₂) (h₁ : S₁.IsComplex) (h₂ : S₂.IsComplex)
    (i j k : ℕ) (hij : i + 1 = j := by omega)
    (hjk : j + 1 = k := by omega) (hk : k ≤ n := by omega) :
    S₁.sc' h₁ i j k ⟶ S₂.sc' h₂ i j k

{S₁ S₂ : CategoryTheory.ComposableArrows C n}

(CategoryTheory.ComposableArrows.sc'Map φ h₁ h₂ i j k hij hjk hk).τ₂ = φ.app ⟨j, ⋯⟩


@[to_additive]
theorem isPeriodicPt_mul_iff_pow_eq_one (x : G) : IsPeriodicPt (x * ·) n 1 ↔ x ^ n = 1

{G : Type u_1}
[AddMonoid G]
{n : ℕ}
(x : G)

Function.IsPeriodicPt (fun x_1 => x + x_1) n 0 ↔ n • x = 0


theorem bijOn_iUnion_of_directed {s : ι → Set α} (hs : Directed (· ⊆ ·) s) {t : ι → Set β}
    {f : α → β} (H : ∀ i, BijOn f (s i) (t i)) : BijOn f (⋃ i, s i) (⋃ i, t i)

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

(H : ∀ (i : ι), Set.BijOn f (s i) (t i))


/-- The category of `MonoOver α`, for `α : Type u`, is equivalent to the partial order `Set α`.
-/
@[simps]
noncomputable def Types.monoOverEquivalenceSet (α : Type u) : MonoOver α ≌ Set α

(Types.monoOverEquivalenceSet α).unitIso =
  CategoryTheory.NatIso.ofComponents (fun f => CategoryTheory.MonoOver.isoMk (Equiv.ofInjective f.obj.hom ⋯).toIso ⋯) ⋯


protected lemma sub_lt_iff_lt_add (hba : b ≤ a) : a - b < c ↔ a < b + c


@[to_additive (attr := simp)] lemma antivary_inv_left : Antivary f⁻¹ g ↔ Monovary f g

{ι : Type u_1}
{α : Type u_2}
{β : Type u_3}
[OrderedAddCommGroup α]
[OrderedAddCommGroup β]
{f : ι → α}
{g : ι → β}


/-- (Impl) The key property defining the map `λ : L ⟶ TL`. -/
theorem commuting (j : J) : lambda c t ≫ (T : C ⥤ C).map (c.π.app j) = c.π.app j ≫ (D.obj j).a

{D : CategoryTheory.Functor J T.Coalgebra}

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

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

CategoryTheory.CategoryStruct.comp (CategoryTheory.Comonad.ForgetCreatesLimits'.lambda c t) (T.map (c.π.app j)) =
  CategoryTheory.CategoryStruct.comp (c.π.app j) (D.obj j).a


theorem mem_degrees {p : MvPolynomial σ R} {i : σ} :
    i ∈ p.degrees ↔ ∃ d, p.coeff d ≠ 0 ∧ i ∈ d.support

{R : Type u}
{σ : Type u_1}
[CommSemiring R]
{p : MvPolynomial σ R}
{i : σ}

i ∈ p.degrees ↔ ∃ d, MvPolynomial.coeff d p ≠ 0 ∧ i ∈ d.support


@[to_additive sum_le_sum_of_subset_of_nonneg]
theorem prod_le_prod_of_subset_of_one_le' (h : s ⊆ t) (hf : ∀ i ∈ t, i ∉ s → 1 ≤ f i) :
    ∏ i ∈ s, f i ≤ ∏ i ∈ t, f i

{ι : Type u_1}
{N : Type u_5}
[OrderedAddCommMonoid N]
{f : ι → N}
{s t : Finset ι}
(h : s ⊆ t)
(hf : ∀ i ∈ t, i ∉ s → 0 ≤ f i)


lemma charP_zero_iff_charZero : CharP R 0 ↔ CharZero R


/-- If the field `L` is a finite extension of the fraction field of the integral domain `A`,
the integral closure of `A` in `L` has fraction field `L`. -/
theorem isFractionRing_of_finite_extension [Algebra A L] [Algebra K L] [IsScalarTower A K L]
    [FiniteDimensional K L] : IsFractionRing (integralClosure A L) L

{A : Type u_4}
(K : Type u_5)
[CommRing A]
[IsDomain A]
(L : Type u_6)
[Field K]
[Field L]
[Algebra A K]
[IsFractionRing A K]
[Algebra A L]
[Algebra K L]
[IsScalarTower A K L]
[FiniteDimensional K L]

IsFractionRing (↥(integralClosure A L)) L


/-- The class `EquivLike E α β` expresses that terms of type `E` have an
injective coercion to bijections between `α` and `β`.

Note that this does not directly extend `FunLike`, nor take `FunLike` as a parameter,
so we can state `coe_injective'` in a nicer way.

This typeclass is used in the definition of the isomorphism (or equivalence) typeclasses,
such as `ZeroEquivClass`, `MulEquivClass`, `MonoidEquivClass`, ....
-/
class EquivLike (E : Sort*) (α β : outParam (Sort*)) where
  /-- The coercion to a function in the forward direction. -/
  coe : E → α → β
  /-- The coercion to a function in the backwards direction. -/
  inv : E → β → α
  /-- The coercions are left inverses. -/
  left_inv : ∀ e, Function.LeftInverse (inv e) (coe e)
  /-- The coercions are right inverses. -/
  right_inv : ∀ e, Function.RightInverse (inv e) (coe e)
  /-- The two coercions to functions are jointly injective. -/
  coe_injective' : ∀ e g, coe e = coe g → inv e = inv g → e = g

{E : Sort u_1}
{α : outParam (Sort u_2)}
{β : outParam (Sort u_3)}
[self : EquivLike E α β]
(e : E)

Function.RightInverse (EquivLike.inv e) (EquivLike.coe e)


/-- If `E` is an `F`-algebra, and there exists a surjective `F`-linear map from `F` to `E`,
then the algebra map from `F` to `E` is also surjective. -/
theorem surjective_algebraMap_of_linearMap (hb : Function.Surjective b) :
    Function.Surjective (algebraMap F E)

{F : Type u_1}
{E : Type u_2}
[CommSemiring F]
[Semiring E]
[Algebra F E]
(b : F →ₗ[F] E)
(hb : Function.Surjective ⇑b)


/-- The `v`-adic valuation of `0 : R` equals 0. -/
theorem intValuation.map_zero' : v.intValuationDef 0 = 0

(v : IsDedekindDomain.HeightOneSpectrum R)


/-- For `m ≤ n`, `(n, m)` is in the reflexive-transitive closure of `~` if `i ~ pred i`
  for all `i` between `n` and `m`. -/
theorem reflTransGen_of_pred_of_ge (r : α → α → Prop) {n m : α} (h : ∀ i ∈ Ioc m n, r i (pred i))
    (hnm : m ≤ n) : ReflTransGen r n m

(h : ∀ i ∈ Set.Ioc m n, r i (Order.pred i))


@[reassoc (attr := simp)]
lemma limitOpIsoOpColimit_hom_comp_ι (F : I ⥤ C) [HasColimit F] (i : I) :
    (limitOpIsoOpColimit F).hom ≫ (colimit.ι F i).op = limit.π F.op ⟨i⟩

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

CategoryTheory.CategoryStruct.comp (CategoryTheory.Limits.limitOpIsoOpColimit F).hom
    (CategoryTheory.Limits.colimit.ι F i).op =
  CategoryTheory.Limits.limit.π F.op (Opposite.op i)


theorem GradedRing.mem_support_iff [∀ (i) (x : 𝒜 i), Decidable (x ≠ 0)] (r : A) (i : ι) :
    i ∈ (decompose 𝒜 r).support ↔ GradedRing.proj 𝒜 i r ≠ 0

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

i ∈ DFinsupp.support ((DirectSum.decompose 𝒜) r) ↔ (GradedRing.proj 𝒜 i) r ≠ 0


@[to_additive]
theorem mem_inv {x : α} : x ∈ s⁻¹ ↔ ∃ y ∈ s, y⁻¹ = x

{α : Type u_2}
[DecidableEq α]
[Neg α]
{s : Finset α}
{x : α}


/-- The product of the constant function `1` over any set equals `1`. -/
@[to_additive "The sum of the constant function `0` over any set equals `0`."]
theorem finprod_mem_one (s : Set α) : (∏ᶠ i ∈ s, (1 : M)) = 1

{α : Type u_1}
{M : Type u_5}
[AddCommMonoid M]
(s : Set α)


/-- A `Dart` is an oriented edge, implemented as an ordered pair of adjacent vertices.
This terminology comes from combinatorial maps, and they are also known as "half-edges"
or "bonds." -/
structure Dart extends V × V where
  adj : G.Adj fst snd
  deriving DecidableEq

{V : Type u_1}
{G : SimpleGraph V}
(self : G.Dart)


@[simp]
theorem den_zero : Rat.den 0 = 1


theorem _root_.AddSubmonoid.mem_iSup_iff_exists_dfinsupp [AddCommMonoid γ] (S : ι → AddSubmonoid γ)
    (x : γ) : x ∈ iSup S ↔ ∃ f : Π₀ i, S i, DFinsupp.sumAddHom (fun i => (S i).subtype) f = x

{ι : Type u}
{γ : Type w}
[DecidableEq ι]
[AddCommMonoid γ]
(S : ι → AddSubmonoid γ)
(x : γ)

x ∈ iSup S ↔ ∃ f, (DFinsupp.sumAddHom fun i => (S i).subtype) f = x


@[simp]
nonrec theorem exp_ne_zero : exp x ≠ 0


@[simp]
lemma upperBounds_range_partialSups (f : ℕ → α) :
    upperBounds (Set.range (partialSups f)) = upperBounds (Set.range f)

{α : Type u_1}
[SemilatticeSup α]
(f : ℕ → α)

upperBounds (Set.range ⇑(partialSups f)) = upperBounds (Set.range f)


/-- A simplicial complex in a `𝕜`-module is a collection of simplices which glue nicely together.
Note that the textbook meaning of "glue nicely" is given in
`Geometry.SimplicialComplex.disjoint_or_exists_inter_eq_convexHull`. It is mostly useless, as
`Geometry.SimplicialComplex.convexHull_inter_convexHull` is enough for all purposes. -/
@[ext]
structure SimplicialComplex where
  /-- the faces of this simplicial complex: currently, given by their spanning vertices -/
  faces : Set (Finset E)
  /-- the empty set is not a face: hence, all faces are non-empty -/
  not_empty_mem : ∅ ∉ faces
  /-- the vertices in each face are affine independent: this is an implementation detail -/
  indep : ∀ {s}, s ∈ faces → AffineIndependent 𝕜 ((↑) : s → E)
  /-- faces are downward closed: a non-empty subset of its spanning vertices spans another face -/
  down_closed : ∀ {s t}, s ∈ faces → t ⊆ s → t ≠ ∅ → t ∈ faces
  inter_subset_convexHull : ∀ {s t}, s ∈ faces → t ∈ faces →
    convexHull 𝕜 ↑s ∩ convexHull 𝕜 ↑t ⊆ convexHull 𝕜 (s ∩ t : Set E)

{𝕜 : Type u_1}
{E : Type u_2}
[OrderedRing 𝕜]
[AddCommGroup E]
[Module 𝕜 E]
(self : Geometry.SimplicialComplex 𝕜 E)
{s t : Finset E}

s ∈ self.faces → t ∈ self.faces → (convexHull 𝕜) ↑s ∩ (convexHull 𝕜) ↑t ⊆ (convexHull 𝕜) (↑s ∩ ↑t)


/-- The equivalence between coarsenings of a valuation ring and its prime ideals. -/
@[simps]
def primeSpectrumEquiv : PrimeSpectrum A ≃ {S // A ≤ S}

{K : Type u}
[Field K]
(A : ValuationSubring K)
(S : { S // A ≤ S })

(A.primeSpectrumEquiv.symm S).asIdeal = A.idealOfLE ↑S ⋯


@[simp]
theorem quot_one : Quot.mk Setoid.r one = (1 : ColimitType F)

{J : Type v}
[CategoryTheory.SmallCategory J]
(F : J ⥤ CommRingCat)

Quot.mk Setoid.r CommRingCat.Colimits.Prequotient.one = 1


@[to_additive]
theorem orderOf_le_exponent (h : ExponentExists G) (g : G) : orderOf g ≤ exponent G

{G : Type u}
[AddMonoid G]
(h : AddMonoid.ExponentExists G)
(g : G)


theorem FamilyOfElements.Compatible.pullback (f : Y ⟶ X) {x : FamilyOfElements P S}
    (h : x.Compatible) : (x.pullback f).Compatible

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

{x : CategoryTheory.Presieve.FamilyOfElements P S.arrows}


lemma tensor_map_id_left_eq_map :
    (AlgebraTensorModule.map LinearMap.id f) =
      (ofTensorProductEquivOfFiniteNoetherian I N).symm.toLinearMap ∘ₗ
      map I f ∘ₗ
      (ofTensorProductEquivOfFiniteNoetherian I M).toLinearMap

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

TensorProduct.AlgebraTensorModule.map LinearMap.id f =
  ↑(AdicCompletion.ofTensorProductEquivOfFiniteNoetherian I N).symm ∘ₗ
    AdicCompletion.map I f ∘ₗ ↑(AdicCompletion.ofTensorProductEquivOfFiniteNoetherian I M)


lemma nnnorm_op [SeminormedAddGroup E] (a : E) : ‖MulOpposite.op a‖₊ = ‖a‖₊

{E : Type u_2}
[SeminormedAddGroup E]
(a : E)


theorem Ico_subset_Ico_iff {a₁ b₁ a₂ b₂ : α} (h : a₁ < b₁) :
    Ico a₁ b₁ ⊆ Ico a₂ b₂ ↔ a₂ ≤ a₁ ∧ b₁ ≤ b₂

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

Multiset.Ico a₁ b₁ ⊆ Multiset.Ico a₂ b₂ ↔ a₂ ≤ a₁ ∧ b₁ ≤ b₂


/-- A single point is collinear. -/
theorem collinear_singleton (p : P) : Collinear k ({p} : Set P)

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


theorem tsub_add_tsub_cancel (hab : b ≤ a) (hcb : c ≤ b) : a - b + (b - c) = a - c

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


@[nontriviality]
theorem of_subsingleton [Subsingleton M] (x : M) : IsPrimitiveRoot x 1

{M : Type u_1}
[CommMonoid M]
[Subsingleton M]
(x : M)


@[to_additive]
theorem mem_iSup_of_mem {ι : Sort*} {S : ι → Submonoid M} (i : ι) :
    ∀ {x : M}, x ∈ S i → x ∈ iSup S

{M : Type u_1}
[AddZeroClass M]
{ι : Sort u_4}
{S : ι → AddSubmonoid M}
(i : ι)
{x : M}


@[simp]
theorem add_apply [Add α] (A B : Matrix m n α) (i : m) (j : n) :
    (A + B) i j = (A i j) + (B i j)

{m : Type u_2}
{n : Type u_3}
{α : Type v}
[Add α]
(A B : Matrix m n α)
(i : m)
(j : n)


@[simp]
theorem coe_toNonUnitalRingHom (f : A →⋆ₙ+* B) : ⇑f.toNonUnitalRingHom = f

{A : Type u_1}
{B : Type u_2}
[NonUnitalNonAssocSemiring A]
[Star A]
[NonUnitalNonAssocSemiring B]
[Star B]
(f : A →⋆ₙ+* B)


@[to_additive]
theorem prod_map_zpow {n : ℤ} : (m.map fun i => f i ^ n).prod = (m.map f).prod ^ n

{ι : Type u_2}
{α : Type u_3}
[SubtractionCommMonoid α]
{m : Multiset ι}
{f : ι → α}
{n : ℤ}

(Multiset.map (fun i => n • f i) m).sum = n • (Multiset.map f m).sum


@[simp]
theorem cons_vec_bit0_eq_alt0 (x : α) (u : Fin n → α) (i : Fin (n + 1)) :
    vecCons x u (i + i) = vecAlt0 rfl (vecAppend rfl (vecCons x u) (vecCons x u)) i

{α : Type u}
{n : ℕ}
(x : α)
(u : Fin n → α)
(i : Fin (n + 1))

Matrix.vecCons x u (i + i) = Matrix.vecAlt0 ⋯ (Matrix.vecAppend ⋯ (Matrix.vecCons x u) (Matrix.vecCons x u)) i


theorem InjOn.rightInvOn_of_leftInvOn (hf : InjOn f s) (hf' : LeftInvOn f f' t)
    (h₁ : MapsTo f s t) (h₂ : MapsTo f' t s) : RightInvOn f f' s

{α : Type u_1}
{β : Type u_2}
{s : Set α}
{t : Set β}
{f : α → β}
{f' : β → α}
(hf : Set.InjOn f s)
(hf' : Set.LeftInvOn f f' t)
(h₁ : Set.MapsTo f s t)
(h₂ : Set.MapsTo f' t s)


theorem mem_of_mem_inter_right (h : a ∈ l₁ ∩ l₂) : a ∈ l₂

{α : Type u_1}
{l₁ l₂ : List α}
{a : α}
[DecidableEq α]
(h : a ∈ l₁ ∩ l₂)


theorem foldr_eq_foldrM (f : α → β → β) (b) (l : List α) :
    l.foldr f b = l.foldrM (m := Id) f b

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


theorem nfp_mul_opow_omega_add {a c : Ordinal} (b) (ha : 0 < a) (hc : 0 < c) (hca : c ≤ (a^omega)) :
    nfp (a * ·) ((a^omega) * b + c) = (a^omega.{u}) * succ b

{a c : Ordinal.{u}}
(b : Ordinal.{u})
(ha : 0 < a)
(hc : 0 < c)
(hca : c ≤ a ^ Ordinal.omega)

Ordinal.nfp (fun x => a * x) (a ^ Ordinal.omega * b + c) = a ^ Ordinal.omega * Order.succ b


/--
An `R`-algebra `S` is called standard smooth, if there
exists a submersive presentation.
-/
class IsStandardSmooth : Prop where
  out : Nonempty (SubmersivePresentation.{t, w} R S)

{R : Type u}
[CommRing R]
{S : Type v}
[CommRing S]
[Algebra R S]
[self : Algebra.IsStandardSmooth R S]

Nonempty (Algebra.SubmersivePresentation R S)


/-- Given a point in the affine span from which all the points are
equidistant, that point is the circumcenter. -/
theorem eq_circumcenter_of_dist_eq {n : ℕ} (s : Simplex ℝ P n) {p : P}
    (hp : p ∈ affineSpan ℝ (Set.range s.points)) {r : ℝ} (hr : ∀ i, dist (s.points i) p = r) :
    p = s.circumcenter

(hr : ∀ (i : Fin (n + 1)), dist (s.points i) p = r)


@[simp, norm_cast]
theorem zero_lt_real {x : ℝ} : (0 : ℂ) < (x : ℂ) ↔ 0 < x


/-- A morphism of Lie algebra modules is a linear map which commutes with the action of the Lie
algebra. -/
structure LieModuleHom extends M →ₗ[R] N where
  /-- A module of Lie algebra modules is compatible with the action of the Lie algebra on the
  modules. -/
  map_lie' : ∀ {x : L} {m : M}, toFun ⁅x, m⁆ = ⁅x, toFun m⁆

{R : Type u}
{L : Type v}
{M : Type w}
{N : Type w₁}
[CommRing R]
[LieRing L]
[AddCommGroup M]
[AddCommGroup N]
[Module R M]
[Module R N]
[LieRingModule L M]
[LieRingModule L N]
(self : M →ₗ⁅R,L⁆ N)
{x : L}
{m : M}

(↑self).toFun ⁅x, m⁆ = ⁅x, (↑self).toFun m⁆


theorem monic_of_b_eq_one' : (toPoly ⟨0, 1, c, d⟩).Monic

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


@[simp]
theorem X_inv : (X : k⟦X⟧)⁻¹ = 0


lemma integrable_toReal_rnDeriv [IsFiniteMeasure μ] :
    Integrable (fun x ↦ (μ.rnDeriv ν x).toReal) ν

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

MeasureTheory.Integrable (fun x => (μ.rnDeriv ν x).toReal) ν


/-- The cardinality of an algebraic extension is at most the maximum of the cardinality
of the base ring or `ℵ₀` -/
theorem cardinal_mk_le_max : #L ≤ max #R ℵ₀

(R L : Type u)
[CommRing R]
[CommRing L]
[IsDomain L]
[Algebra R L]
[NoZeroSMulDivisors R L]
[Algebra.IsAlgebraic R L]


@[to_additive norm_le_of_mem_closedBall]
theorem norm_le_of_mem_closedBall' (h : b ∈ closedBall a r) : ‖b‖ ≤ ‖a‖ + r

{E : Type u_6}
[SeminormedGroup E]
{a b : E}
{r : ℝ}
(h : b ∈ Metric.closedBall a r)

‖b‖ ≤ ‖a‖ + r


/-- Any `K`-algebra module that is 1-dimensional over `K` is simple. -/
theorem is_simple_module_of_finrank_eq_one {A} [Semiring A] [Module A V] [SMul K A]
    [IsScalarTower K A V] (h : finrank K V = 1) : IsSimpleOrder (Submodule A V)

{K : Type u}
{V : Type v}
[DivisionRing K]
[AddCommGroup V]
[Module K V]
{A : Type u_1}
[Semiring A]
[Module A V]
[SMul K A]
[IsScalarTower K A V]
(h : FiniteDimensional.finrank K V = 1)


/-- Given an action of a group `α` on a set `β`, each `g : α` defines a permutation of `β`. -/
@[simps]
def MulAction.toPermHom : α →* Equiv.Perm β

(α : Type u_1)
(β : Type u_2)
[Group α]
[MulAction α β]
(a : α)

(MulAction.toPermHom α β) a = MulAction.toPerm a


theorem measure_compl_le_add_iff [IsFiniteMeasure μ] (hs : MeasurableSet s) (ht : MeasurableSet t)
    {ε : ℝ≥0∞} : μ sᶜ ≤ μ tᶜ + ε ↔ μ t ≤ μ s + ε

{α : Type u_1}
{m0 : MeasurableSpace α}
{μ : MeasureTheory.Measure α}
{s t : Set α}
[MeasureTheory.IsFiniteMeasure μ]
(hs : MeasurableSet s)
(ht : MeasurableSet t)
{ε : ℝ≥0∞}

μ sᶜ ≤ μ tᶜ + ε ↔ μ t ≤ μ s + ε


theorem mul_le_mul_left₀ (ha : a ≠ 0) : a * b ≤ a * c ↔ b ≤ c

{α : Type u_1}
[LinearOrderedCommGroupWithZero α]
{a b c : α}
(ha : a ≠ 0)


theorem Matrix.Represents.one : (1 : Matrix ι ι R).Represents b 1

{ι : Type u_1}
[Fintype ι]
{M : Type u_2}
[AddCommGroup M]
{R : Type u_3}
[CommRing R]
[Module R M]
{b : ι → M}
[DecidableEq ι]


lemma posSemidef_sqrt : PosSemidef hA.sqrt

{n : Type u_2}
{𝕜 : Type u_4}
[Fintype n]
[RCLike 𝕜]
[DecidableEq n]
{A : Matrix n n 𝕜}
(hA : A.PosSemidef)


@[simp]
lemma dualBasis_flip_dualBasis (B : BilinForm K V) (hB : B.Nondegenerate) {ι}
    [Finite ι] [DecidableEq ι] [FiniteDimensional K V] (b : Basis ι K V) :
    B.flip.dualBasis hB.flip (B.dualBasis hB b) = b

{V : Type u_5}
{K : Type u_6}
[Field K]
[AddCommGroup V]
[Module K V]
(B : LinearMap.BilinForm K V)
(hB : B.Nondegenerate)
{ι : Type u_11}
[Finite ι]
[DecidableEq ι]
[FiniteDimensional K V]
(b : Basis ι K V)

B.flip.dualBasis ⋯ (B.dualBasis hB b) = b


@[simp]
theorem to_mul_symm_eq : (@toConjAct G _).symm = ofConjAct


@[simp, norm_cast]
theorem coe_insert (a : α) (s : Finset α) : ↑(insert a s) = (insert a s : Set α)

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


@[simp] lemma antivary_inv_left₀ (hf : StrongLT 0 f) : Antivary f⁻¹ g ↔ Monovary f g

{ι : Type u_1}
{α : Type u_2}
{β : Type u_3}
[LinearOrderedSemifield α]
[LinearOrderedSemifield β]
{f : ι → α}
{g : ι → β}
(hf : StrongLT 0 f)


/-- A family of equivalences between preimages of points gives an equivalence between domains. -/
@[simps!]
def ofPreimageEquiv {α β γ} {f : α → γ} {g : β → γ} (e : ∀ c, f ⁻¹' {c} ≃ g ⁻¹' {c}) : α ≃ β

∀ (a : β), (Equiv.ofPreimageEquiv e).symm a = ↑((Equiv.sigmaCongrRight e).symm ((Equiv.sigmaFiberEquiv g).symm a)).snd


theorem adjoin_map {E' : Type*} [Field E'] [Algebra F E'] (f : E →ₐ[F] E') :
    (adjoin F S).map f = adjoin F (f '' S)

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

IntermediateField.map f (IntermediateField.adjoin F S) = IntermediateField.adjoin F (⇑f '' S)


@[reassoc (attr := simp), elementwise (attr := simp)]
theorem stalkSpecializes_stalkFunctor_map {F G : X.Presheaf C} (f : F ⟶ G) {x y : X} (h : x ⤳ y) :
    F.stalkSpecializes h ≫ (stalkFunctor C x).map f =
      (stalkFunctor C y).map f ≫ G.stalkSpecializes h

{C : Type u}
[CategoryTheory.Category.{v, u} C]
[CategoryTheory.Limits.HasColimits C]
{X : TopCat}
{F G : TopCat.Presheaf C X}
(f : F ⟶ G)
{x y : ↑X}
(h : x ⤳ y)

F.stalkSpecializes h ≫ (TopCat.Presheaf.stalkFunctor C x).map f =
  (TopCat.Presheaf.stalkFunctor C y).map f ≫ G.stalkSpecializes h


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

(α : Type u_3)
{β : Type u_4}
[Inf α]
[SemilatticeInf β]
(b : β)
(a : α)


theorem nhds_eq_iInf_abs_sub (a : α) : 𝓝 a = ⨅ r > 0, 𝓟 { b | |a - b| < r }

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


@[simp]
protected theorem add_tsub_cancel_right (hb : AddLECancellable b) : a + b - b = a

{α : Type u_1}
[PartialOrder α]
[AddCommSemigroup α]
[Sub α]
[OrderedSub α]
{a b : α}
(hb : AddLECancellable b)


lemma iff_eventuallyEq {f g : ℝ → ℝ} (h : f =ᶠ[atTop] g) :
    GrowsPolynomially f ↔ GrowsPolynomially g

{f g : ℝ → ℝ}
(h : f =ᶠ[Filter.atTop] g)

AkraBazziRecurrence.GrowsPolynomially f ↔ AkraBazziRecurrence.GrowsPolynomially g


@[simp]
theorem LieSubmodule.trivial_lie_oper_zero [LieModule.IsTrivial L M] : ⁅I, N⁆ = ⊥

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


theorem coe_range (n : ℕ) : ↑(List.range n) = range n


theorem Dom.of_bind {f : α → Part β} {a : Part α} (h : (a.bind f).Dom) : a.Dom

{α : Type u_1}
{β : Type u_2}
{f : α → Part β}
{a : Part α}
(h : (a.bind f).Dom)


theorem Monotone.convex_le (hf : Monotone f) (r : β) : Convex 𝕜 { x | f x ≤ r }

{𝕜 : Type u_1}
{E : Type u_2}
{β : Type u_4}
[OrderedSemiring 𝕜]
[LinearOrderedAddCommMonoid E]
[OrderedAddCommMonoid β]
[Module 𝕜 E]
[OrderedSMul 𝕜 E]
{f : E → β}
(hf : Monotone f)
(r : β)


theorem IsNoetherianRing.isNilpotent_nilradical (R : Type*) [CommRing R] [IsNoetherianRing R] :
    IsNilpotent (nilradical R)

(R : Type u_1)
[CommRing R]
[IsNoetherianRing R]


/-- If `m₁` and `m₂` are both homogenous,
and the quadratic spaces `Q₁` and `Q₂` map into
orthogonal subspaces of `Qₙ` (for instance, when `Qₙ = Q₁.prod Q₂`),
then the product of the embedding in `CliffordAlgebra Q` commutes up to a sign factor. -/
nonrec theorem map_mul_map_of_isOrtho_of_mem_evenOdd
    {i₁ i₂ : ZMod 2} (hm₁ : m₁ ∈ evenOdd Q₁ i₁) (hm₂ : m₂ ∈ evenOdd Q₂ i₂) :
    map f₁ m₁ * map f₂ m₂ = (-1 : ℤˣ) ^ (i₂ * i₁) • (map f₂ m₂ * map f₁ m₁)

(hf : ∀ (x : M₁) (y : M₂), QuadraticMap.IsOrtho Qₙ (f₁ x) (f₂ y))

(hm₁ : m₁ ∈ CliffordAlgebra.evenOdd Q₁ i₁)

(hm₂ : m₂ ∈ CliffordAlgebra.evenOdd Q₂ i₂)

(CliffordAlgebra.map f₁) m₁ * (CliffordAlgebra.map f₂) m₂ =
  (-1) ^ (i₂ * i₁) • ((CliffordAlgebra.map f₂) m₂ * (CliffordAlgebra.map f₁) m₁)


/-- If `K` is a compact set in a uniform space and `{V i | p i}` is a basis of entourages,
then `{⋃ x ∈ K, UniformSpace.ball x (V i) | p i}` is a basis of `𝓝ˢ K`.

Here "`{s i | p i}` is a basis of a filter `l`" means `Filter.HasBasis l p s`. -/
theorem IsCompact.nhdsSet_basis_uniformity {p : ι → Prop} {V : ι → Set (α × α)}
    (hbasis : (𝓤 α).HasBasis p V) (hK : IsCompact K) :
    (𝓝ˢ K).HasBasis p fun i => ⋃ x ∈ K, ball x (V i)

{α : Type ua}
{ι : Sort u_1}
[UniformSpace α]
{K : Set α}
{p : ι → Prop}
{V : ι → Set (α × α)}
(hbasis : (𝓤 α).HasBasis p V)
(hK : IsCompact K)

(𝓝ˢ K).HasBasis p fun i => ⋃ x ∈ K, UniformSpace.ball x (V i)


/-- If `f` and `g` are commuting endomorphisms of a finite, free `R`-module `M`, such that `f`
is triangularizable, then to prove that the trace of `g ∘ f` vanishes, it is sufficient to prove
that the trace of `g` vanishes on each generalized eigenspace of `f`. -/
lemma trace_comp_eq_zero_of_commute_of_trace_restrict_eq_zero
    [IsDomain R] [IsPrincipalIdealRing R] [Module.Free R M] [Module.Finite R M]
    {f g : Module.End R M}
    (h_comm : Commute f g)
    (hf : ⨆ μ, ⨆ k, f.genEigenspace μ k = ⊤)
    (hg : ∀ μ, trace R _ (g.restrict (f.mapsTo_iSup_genEigenspace_of_comm h_comm μ)) = 0) :
    trace R _ (g ∘ₗ f) = 0

(hf : ⨆ μ, ⨆ k, (f.genEigenspace μ) k = ⊤)

(hg : ∀ (μ : R), (LinearMap.trace R ↥(⨆ k, (f.genEigenspace μ) k)) (LinearMap.restrict g ⋯) = 0)


@[simp]
theorem add_eq_zero_iff {a b : Tropical (WithTop R)} : a + b = 0 ↔ a = 0 ∧ b = 0

{R : Type u}
[LinearOrder R]
{a b : Tropical (WithTop R)}


theorem abs_abv_sub_le_abv_sub (a b : R) : abs (abv a - abv b) ≤ abv (a - b)

{S : Type u_5}
[LinearOrderedCommRing S]
{R : Type u_6}
[Ring R]
(abv : R → S)
[IsAbsoluteValue abv]
(a b : R)


theorem support_iteratedFDeriv_subset (n : ℕ) : support (iteratedFDeriv 𝕜 n f) ⊆ tsupport f

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

Function.support (iteratedFDeriv 𝕜 n f) ⊆ tsupport f


theorem ofInt_mul {n} (x y : Int) : BitVec.ofInt n (x * y) =
    BitVec.ofInt n x * BitVec.ofInt n y


@[to_additive]
theorem mul_lt_of_lt_of_le_one [CovariantClass α α (· * ·) (· ≤ ·)] {a b c : α} (hbc : b < c)
    (ha : a ≤ 1) :
    b * a < c

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


@[simp]
theorem one_apply (x : A) : (1 : A →ₐ[R] A) x = x

{R : Type u}
{A : Type v}
[CommSemiring R]
[Semiring A]
[Algebra R A]
(x : A)


lemma not_inv_le_one_of_ne_bot [IsDedekindDomain A] {I : Ideal A}
    (hI0 : I ≠ ⊥) (hI1 : I ≠ ⊤) : ¬(I⁻¹ : FractionalIdeal A⁰ K) ≤ 1

{A : Type u_2}
{K : Type u_3}
[CommRing A]
[Field K]
[Algebra A K]
[IsFractionRing A K]
[IsDedekindDomain A]
{I : Ideal A}
(hI0 : I ≠ ⊥)
(hI1 : I ≠ ⊤)


theorem IsTheta.tendsto_norm_atTop_iff (h : f' =Θ[l] g') :
    Tendsto (norm ∘ f') l atTop ↔ Tendsto (norm ∘ g') l atTop

{α : Type u_1}
{E' : Type u_6}
{F' : Type u_7}
[SeminormedAddCommGroup E']
[SeminormedAddCommGroup F']
{f' : α → E'}
{g' : α → F'}
{l : Filter α}
(h : f' =Θ[l] g')

Filter.Tendsto (norm ∘ f') l Filter.atTop ↔ Filter.Tendsto (norm ∘ g') l Filter.atTop


/-- `Finset.image₂` in terms of monadic operations. Note that this can't be taken as the definition
because of the lack of universe polymorphism. -/
theorem image₂_def {α β γ : Type u} (f : α → β → γ) (s : Finset α) (t : Finset β) :
    image₂ f s t = f <$> s <*> t

[(P : Prop) → Decidable P]
{α β γ : Type u}
(f : α → β → γ)
(s : Finset α)
(t : Finset β)

Finset.image₂ f s t = Seq.seq (f <$> s) fun x => t


@[to_additive (attr := aesop safe 20 apply (rule_sets := [Measurable]))]
theorem AEMeasurable.mul' [MeasurableMul₂ M] (hf : AEMeasurable f μ) (hg : AEMeasurable g μ) :
    AEMeasurable (f * g) μ

{M : Type u_2}
{α : Type u_3}
[MeasurableSpace M]
[Add M]
{m : MeasurableSpace α}
{f g : α → M}
{μ : MeasureTheory.Measure α}
[MeasurableAdd₂ M]
(hf : AEMeasurable f μ)
(hg : AEMeasurable g μ)


theorem ediam_image_le_of_subset (hf : HolderOnWith C r f s) (ht : t ⊆ s) :
    EMetric.diam (f '' t) ≤ (C : ℝ≥0∞) * EMetric.diam t ^ (r : ℝ)

{X : Type u_1}
{Y : Type u_2}
[PseudoEMetricSpace X]
[PseudoEMetricSpace Y]
{C r : ℝ≥0}
{f : X → Y}
{s t : Set X}
(hf : HolderOnWith C r f s)
(ht : t ⊆ s)

EMetric.diam (f '' t) ≤ ↑C * EMetric.diam t ^ ↑r


@[simp] theorem drop_succ_cons : (a :: l).drop (n + 1) = l.drop n

∀ {α : Type u_1} {a : α} {l : List α} {n : Nat}, List.drop (n + 1) (a :: l) = List.drop n l


theorem not_mem_idealOfSet {s : Set X} {f : C(X, R)} : f ∉ idealOfSet R s ↔ ∃ x ∈ sᶜ, f x ≠ 0

{X : Type u_1}
{R : Type u_2}
[TopologicalSpace X]
[Semiring R]
[TopologicalSpace R]
[TopologicalSemiring R]
{s : Set X}
{f : C(X, R)}

f ∉ ContinuousMap.idealOfSet R s ↔ ∃ x ∈ sᶜ, f x ≠ 0


@[simp]
theorem star_algebraMap (r : R) :
    star (algebraMap R (CliffordAlgebra Q) r) = algebraMap R (CliffordAlgebra Q) r

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

star ((algebraMap R (CliffordAlgebra Q)) r) = (algebraMap R (CliffordAlgebra Q)) r


@[ext 1100]
theorem ringQuot_ext' {s : A → A → Prop} (f g : RingQuot s →ₐ[S] B)
    (w : f.comp (mkAlgHom S s) = g.comp (mkAlgHom S s)) : f = g

(w : f.comp (RingQuot.mkAlgHom S s) = g.comp (RingQuot.mkAlgHom S s))


/-- `mk a` as an embedding. This is the symmetric version of `Function.Embedding.sectl`. -/
@[simps]
def mkEmbedding (a : α) : α ↪ Sym2 α


theorem IsSeqCompact.exists_tendsto (hs : IsSeqCompact s) {u : ℕ → X} (hu : ∀ n, u n ∈ s)
    (huc : CauchySeq u) : ∃ x ∈ s, Tendsto u atTop (𝓝 x)

{X : Type u_1}
[UniformSpace X]
{s : Set X}
(hs : IsSeqCompact s)
{u : ℕ → X}
(hu : ∀ (n : ℕ), u n ∈ s)
(huc : CauchySeq u)

∃ x ∈ s, Filter.Tendsto u Filter.atTop (𝓝 x)


@[simp]
theorem mem_compl_iff : a ∈ s.compl ↔ a ∉ s

{α : Type u_1}
[LE α]
{s : LowerSet α}
{a : α}


theorem Not.imp_symm : (¬a → b) → ¬b → a


@[to_additive (attr := simp)]
theorem OneHom.coe_comp [One M] [One N] [One P] (g : OneHom N P) (f : OneHom M N) :
    ↑(g.comp f) = g ∘ f

{M : Type u_4}
{N : Type u_5}
{P : Type u_6}
[Zero M]
[Zero N]
[Zero P]
(g : ZeroHom N P)
(f : ZeroHom M N)


@[simp] protected lemma LinearOrder.isSublattice (s : Set α) : IsSublattice s

{α : Type u_2}
[LinearOrder α]
(s : Set α)


theorem IsArtinianRing.of_finite (R S) [CommRing R] [Ring S] [Algebra R S]
    [IsArtinianRing R] [Module.Finite R S] : IsArtinianRing S

(R : Type u_1)
(S : Type u_2)
[CommRing R]
[Ring S]
[Algebra R S]
[IsArtinianRing R]
[Module.Finite R S]


theorem isAtom_of_u_bot [OrderBot α] [OrderBot β] {l : α → β} {u : β → α}
    (gi : GaloisInsertion l u) (hbot : u ⊥ = ⊥) {b : β} (hb : IsAtom (u b)) : IsAtom b

{α : Type u_2}
{β : Type u_3}
[PartialOrder α]
[PartialOrder β]
[OrderBot α]
[OrderBot β]
{l : α → β}
{u : β → α}
(gi : GaloisInsertion l u)
(hbot : u ⊥ = ⊥)
{b : β}
(hb : IsAtom (u b))


/-- The product of an antitone function and a strictly antitone function is strictly antitone. -/
@[to_additive add_strictAnti "The sum of an antitone function and a strictly antitone function is
strictly antitone."]
theorem AntitoneOn.mul_strictAnti' [CovariantClass α α (· * ·) (· < ·)]
    [CovariantClass α α (swap (· * ·)) (· ≤ ·)] {f g : β → α} (hf : AntitoneOn f s)
    (hg : StrictAntiOn g s) :
    StrictAntiOn (fun x => f x * g x) s

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

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


@[simp]
theorem coe_id : ⇑(id : L₁ →ₗ⁅R⁆ L₁) = _root_.id

{R : Type u}
{L₁ : Type v}
[CommRing R]
[LieRing L₁]
[LieAlgebra R L₁]


theorem unitLattice_span_eq_top :
    Submodule.span ℝ (unitLattice K : Set ({w : InfinitePlace K // w ≠ w₀} → ℝ)) = ⊤

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

Submodule.span ℝ ↑(NumberField.Units.unitLattice K) = ⊤


theorem exists_separating_of_ne {x y : V} (h : x ≠ y) :
    ∃ f : V →L[R] R, f x ≠ f y

{R : Type u_1}
{V : Type u_2}
[Ring R]
[AddCommGroup V]
[TopologicalSpace V]
[TopologicalSpace R]
[Module R V]
[SeparatingDual R V]
{x y : V}
(h : x ≠ y)


@[simp]
theorem eval_zero_map (f : R →+* S) (p : R[X]) : (p.map f).eval 0 = f (p.eval 0)

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

Polynomial.eval 0 (Polynomial.map f p) = f (Polynomial.eval 0 p)


nonrec theorem Infinitesimal.add {x y : ℝ*} (hx : Infinitesimal x) (hy : Infinitesimal y) :
    Infinitesimal (x + y)

{x y : ℝ*}
(hx : x.Infinitesimal)
(hy : y.Infinitesimal)


theorem opow_mul (a b c : Ordinal) : a ^ (b * c) = (a ^ b) ^ c


/-- The adjoint is involutive. -/
@[simp]
theorem adjoint_adjoint (A : E →ₗ[𝕜] F) : LinearMap.adjoint (LinearMap.adjoint A) = A

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


@[simp]
theorem map_hnot (a : α) : f (￢a) = ￢f a

{F : Type u_1}
{α : Type u_2}
{β : Type u_3}
[FunLike F α β]
[CoheytingAlgebra α]
[CoheytingAlgebra β]
[CoheytingHomClass F α β]
(f : F)
(a : α)


private theorem measure_sInf_le (h : μ ∈ m) : sInf m ≤ μ

{α : Type u_1}
{m0 : MeasurableSpace α}
{μ : MeasureTheory.Measure α}
{m : Set (MeasureTheory.Measure α)}
(h : μ ∈ m)


/-- The product of two partial homeomorphisms, as a partial homeomorphism on the product space. -/
@[simps! (config := mfld_cfg) toPartialEquiv apply,
  simps! (config := .lemmasOnly) source target symm_apply]
def prod (eX : PartialHomeomorph X X') (eY : PartialHomeomorph Y Y') :
    PartialHomeomorph (X × Y) (X' × Y')

{X : Type u_1}
{X' : Type u_2}
{Y : Type u_3}
{Y' : Type u_4}
[TopologicalSpace X]
[TopologicalSpace X']
[TopologicalSpace Y]
[TopologicalSpace Y']
(eX : PartialHomeomorph X X')
(eY : PartialHomeomorph Y Y')

(eX.prod eY).toPartialEquiv = eX.prod eY.toPartialEquiv


theorem zero_le (I : FractionalIdeal S P) : 0 ≤ I

{R : Type u_1}
[CommRing R]
{S : Submonoid R}
{P : Type u_2}
[CommRing P]
[Algebra R P]
(I : FractionalIdeal S P)


@[simp] lemma sub_cons (v : Fin n.succ → α) (y : α) (w : Fin n → α) :
    v - vecCons y w = vecCons (vecHead v - y) (vecTail v - w)

{α : Type u_1}
{n : ℕ}
[Sub α]
(v : Fin n.succ → α)
(y : α)
(w : Fin n → α)

v - Matrix.vecCons y w = Matrix.vecCons (Matrix.vecHead v - y) (Matrix.vecTail v - w)


@[simp]
theorem map_pure (f : α → β) (a : α) : map f (pure a) = pure (f a)

{α : Type u}
{β : Type v}
(f : α → β)
(a : α)


theorem natDegree_eq_support_max' (h : p ≠ 0) :
    p.natDegree = p.support.max' (nonempty_support_iff.mpr h)

{R : Type u}
[Semiring R]
{p : R[X]}
(h : p ≠ 0)


protected theorem IsUpperSet.upperClosure (hs : IsUpperSet s) : ↑(upperClosure s) = s

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


theorem squarefree_iff_irreducible_sq_not_dvd_of_ne_zero {r : R} (hr : r ≠ 0) :
    Squarefree r ↔ ∀ x : R, Irreducible x → ¬x * x ∣ r

{R : Type u_1}
[CommMonoidWithZero R]
[WfDvdMonoid R]
{r : R}
(hr : r ≠ 0)

Squarefree r ↔ ∀ (x : R), Irreducible x → ¬x * x ∣ r


@[simp]
theorem _root_.BoundedContinuousFunction.norm_mkOfCompact (f : C(α, E)) : ‖mkOfCompact f‖ = ‖f‖

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

‖BoundedContinuousFunction.mkOfCompact f‖ = ‖f‖


/-- The subgroup generated by an element of a group equals the set of integer number powers of
    the element. -/
@[to_additive
      "The `AddSubgroup` generated by an element of an `AddGroup` equals the set of
      natural number multiples of the element."]
theorem mem_closure_singleton {x y : G} : y ∈ closure ({x} : Set G) ↔ ∃ n : ℤ, x ^ n = y

y ∈ AddSubgroup.closure {x} ↔ ∃ n, n • x = y


theorem Irreducible.prime [DecompositionMonoid α] {a : α} (irr : Irreducible a) : Prime a

{α : Type u_1}
[CommMonoidWithZero α]
[DecompositionMonoid α]
{a : α}
(irr : Irreducible a)


theorem det_vandermonde_eq_zero_iff [IsDomain R] {n : ℕ} {v : Fin n → R} :
    det (vandermonde v) = 0 ↔ ∃ i j : Fin n, v i = v j ∧ i ≠ j

{R : Type u_1}
[CommRing R]
[IsDomain R]
{n : ℕ}
{v : Fin n → R}

(Matrix.vandermonde v).det = 0 ↔ ∃ i j, v i = v j ∧ i ≠ j


theorem isMaximal_iff_eq_vanishingIdeal_singleton (I : Ideal (MvPolynomial σ k)) :
    I.IsMaximal ↔ ∃ x : σ → k, I = vanishingIdeal {x}

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

I.IsMaximal ↔ ∃ x, I = MvPolynomial.vanishingIdeal {x}


@[csimp] theorem leftpad_eq_leftpadTR : @leftpad = @leftpadTR


@[elab_as_elim]
protected theorem mul_induction_on {M N : AddSubmonoid R} {C : R → Prop} {r : R} (hr : r ∈ M * N)
    (hm : ∀ m ∈ M, ∀ n ∈ N, C (m * n)) (ha : ∀ x y, C x → C y → C (x + y)) : C r

(ha : ∀ (x y : R), C x → C y → C (x + y))


theorem Chain.iff {S : α → α → Prop} (H : ∀ a b, R a b ↔ S a b) {a : α} {l : List α} :
    Chain R a l ↔ Chain S a l

{α : Type u}
{R S : α → α → Prop}
(H : ∀ (a b : α), R a b ↔ S a b)
{a : α}
{l : List α}


/-- See `zero_lt_one'` for a version with the type explicit. -/
@[simp] lemma zero_lt_one : (0 : α) < 1

{α : Type u_1}
[Zero α]
[One α]
[PartialOrder α]
[ZeroLEOneClass α]
[NeZero 1]


theorem Ioc_eq_filter_powerset : Ioc s t = t.powerset.filter (s ⊂ ·)

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

Finset.Ioc s t = Finset.filter (fun x => s ⊂ x) t.powerset


lemma IsHamiltonian.map {H : SimpleGraph β} (f : G →g H) (hf : Bijective f) (hp : p.IsHamiltonian) :
    (p.map f).IsHamiltonian

{α : Type u_1}
{β : Type u_2}
[DecidableEq α]
[DecidableEq β]
{G : SimpleGraph α}
{a b : α}
{p : G.Walk a b}
{H : SimpleGraph β}
(f : G →g H)
(hf : Function.Bijective ⇑f)
(hp : p.IsHamiltonian)


/-- Pushforwards of finite submodules have a smaller finrank. -/
theorem Submodule.finrank_map_le (f : M →ₗ[R] M') (p : Submodule R M) [Module.Finite R p] :
    finrank R (p.map f) ≤ finrank R p

{R : Type u}
{M : Type v}
{M' : Type v'}
[Ring R]
[AddCommGroup M]
[AddCommGroup M']
[Module R M]
[Module R M']
[StrongRankCondition R]
(f : M →ₗ[R] M')
(p : Submodule R M)
[Module.Finite R ↥p]

FiniteDimensional.finrank R ↥(Submodule.map f p) ≤ FiniteDimensional.finrank R ↥p


theorem mk (s : Set α) (hs : MeasurableSet s) (h₁ : ∀ t ⊆ s, MeasurableSet t → v t = 0)
    (h₂ : ∀ t ⊆ sᶜ, MeasurableSet t → w t = 0) : v ⟂ᵥ w

(h₁ : ∀ t ⊆ s, MeasurableSet t → ↑v t = 0)

(h₂ : ∀ t ⊆ sᶜ, MeasurableSet t → ↑w t = 0)


/-- Reinterpret `BoxIntegral.HasIntegral` as `Filter.Tendsto`, e.g., dot-notation theorems
that are shadowed in the `BoxIntegral.HasIntegral` namespace. -/
theorem HasIntegral.tendsto (h : HasIntegral I l f vol y) :
    Tendsto (integralSum f vol) (l.toFilteriUnion I ⊤) (𝓝 y)

(h : BoxIntegral.HasIntegral I l f vol y)

Filter.Tendsto (BoxIntegral.integralSum f vol) (l.toFilteriUnion I ⊤) (𝓝 y)


@[to_additive (attr := simp)]
theorem refl_symm : (refl M).symm = refl M

(AddEquiv.refl M).symm = AddEquiv.refl M


@[to_additive]
theorem edist_eq_coe_nnnorm_div (a b : E) : edist a b = ‖a / b‖₊

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


/-- The projection map onto one component, as a morphism of Lie algebras. -/
@[simps]
def lieAlgebraComponent (j : ι) : (⨁ i, L i) →ₗ⁅R⁆ L j

(R : Type u)
(ι : Type v)
[CommRing R]
(L : ι → Type w)
[(i : ι) → LieRing (L i)]
[(i : ι) → LieAlgebra R (L i)]
(j : ι)
(a : DirectSum ι fun i => L i)

(DirectSum.lieAlgebraComponent R ι L j) a = (DirectSum.component R ι L j) a


/-- `Function.const` as an `AlgHom`. The name matches `Pi.constRingHom`, `Pi.constMonoidHom`,
etc. -/
@[simps]
def constAlgHom : B →ₐ[R] A → B

(R : Type u_1)
(A : Type u_2)
(B : Type u_3)
[CommSemiring R]
[Semiring B]
[Algebra R B]
(a : B)

∀ (a_1 : A), (Pi.constAlgHom R A B) a a_1 = Function.const A a a_1


@[to_additive dist_norm_norm_le]
theorem dist_norm_norm_le' (a b : E) : dist ‖a‖ ‖b‖ ≤ ‖a / b‖


@[simp]
theorem cocone_naturality {j j' : J} (f : j ⟶ j') :
    F.map f ≫ coconeMorphism.{w} F j' = coconeMorphism F j

{J : Type u}
[CategoryTheory.Category.{v, u} J]
(F : J ⥤ AddCommGrp)
{j j' : J}
(f : j ⟶ j')

F.map f ≫ AddCommGrp.Colimits.coconeMorphism F j' = AddCommGrp.Colimits.coconeMorphism F j


theorem lie_mem_right (I : LieIdeal R L) (x y : L) (h : y ∈ I) : ⁅x, y⁆ ∈ I

(R : Type u)
(L : Type v)
[CommRing R]
[LieRing L]
[LieAlgebra R L]
(I : LieIdeal R L)
(x y : L)
(h : y ∈ I)


theorem pred_le_le_iff {a b : α} : pred a ≤ b ∧ b ≤ a ↔ b = a ∨ b = pred a

{α : Type u_1}
[PartialOrder α]
[PredOrder α]
{a b : α}

Order.pred a ≤ b ∧ b ≤ a ↔ b = a ∨ b = Order.pred a


@[simp]
theorem coeff_smul {S₁ : Type*} [SMulZeroClass S₁ R] (m : σ →₀ ℕ) (C : S₁) (p : MvPolynomial σ R) :
    coeff m (C • p) = C • coeff m p

{R : Type u}
{σ : Type u_1}
[CommSemiring R]
{S₁ : Type u_2}
[SMulZeroClass S₁ R]
(m : σ →₀ ℕ)
(C : S₁)
(p : MvPolynomial σ R)

MvPolynomial.coeff m (C • p) = C • MvPolynomial.coeff m p


@[elab_as_elim]
protected theorem InClosure.recOn {C : R → Prop} {x : R} (hx : x ∈ closure s) (h1 : C 1)
    (hneg1 : C (-1)) (hs : ∀ z ∈ s, ∀ n, C n → C (z * n)) (ha : ∀ {x y}, C x → C y → C (x + y)) :
    C x

(hs : ∀ z ∈ s, ∀ (n : R), C n → C (z * n))

(ha : ∀ {x y : R}, C x → C y → C (x + y))


/-- A `SemilatticeInf` is a meet-semilattice, that is, a partial order
  with a meet (a.k.a. glb / greatest lower bound, inf / infimum) operation
  `⊓` which is the greatest element smaller than both factors. -/
class SemilatticeInf (α : Type u) extends Inf α, PartialOrder α where
  /-- The infimum is a lower bound on the first argument -/
  protected inf_le_left : ∀ a b : α, a ⊓ b ≤ a
  /-- The infimum is a lower bound on the second argument -/
  protected inf_le_right : ∀ a b : α, a ⊓ b ≤ b
  /-- The infimum is the *greatest* lower bound -/
  protected le_inf : ∀ a b c : α, a ≤ b → a ≤ c → a ≤ b ⊓ c

{α : Type u}
[self : SemilatticeInf α]
(a b c : α)


@[to_additive (attr := simp)]
protected theorem SemiconjBy.map [MulHomClass F M N] (h : SemiconjBy a x y) (f : F) :
    SemiconjBy (f a) (f x) (f y)

{F : Type u_1}
{M : Type u_2}
{N : Type u_3}
[Mul M]
[Mul N]
{a x y : M}
[FunLike F M N]
[MulHomClass F M N]
(h : SemiconjBy a x y)
(f : F)


theorem countable_of_Lindelof_of_discrete [LindelofSpace X] [DiscreteTopology X] : Countable X

{X : Type u}
[TopologicalSpace X]
[LindelofSpace X]
[DiscreteTopology X]


lemma coyonedaEquiv_symm_map {X Y : C} (f : X ⟶ Y) {F : C ⥤ Type v₁} (t : F.obj X) :
    coyonedaEquiv.symm (F.map f t) = coyoneda.map f.op ≫ coyonedaEquiv.symm t

{F : CategoryTheory.Functor C (Type v₁)}

CategoryTheory.coyonedaEquiv.symm (F.map f t) =
  CategoryTheory.CategoryStruct.comp (CategoryTheory.coyoneda.map f.op) (CategoryTheory.coyonedaEquiv.symm t)


lemma PosSMulMono.toPosSMulStrictMono [PosSMulMono α β] : PosSMulStrictMono α β

{α : Type u_1}
{β : Type u_2}
[Semiring α]
[AddCommGroup β]
[Module α β]
[NoZeroSMulDivisors α β]
[Preorder α]
[PartialOrder β]
[PosSMulMono α β]


/-- Interpreting the legs of a cone as a structured arrow, interpreting this arrow as an arrow over
    the cone point, and finally forgetting the arrow is the same as just applying the functor the
    cone was over. -/
@[simps!]
def Cone.toStructuredArrowCompToUnderCompForget {F : J ⥤ C} (c : Cone F) :
    c.toStructuredArrow ⋙ StructuredArrow.toUnder _ _ ⋙ Under.forget _ ≅ F

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

c.toStructuredArrowCompToUnderCompForget.hom.app X = CategoryTheory.CategoryStruct.id (F.obj X)


/-- A seminorm on a group `G` is a function `f : G → ℝ` that sends one to zero, is submultiplicative
and such that `f x⁻¹ = f x` for all `x`. -/
@[to_additive]
structure GroupSeminorm (G : Type*) [Group G] where
  /-- The bare function of a `GroupSeminorm`. -/
  protected toFun : G → ℝ
  /-- The image of one is zero. -/
  protected map_one' : toFun 1 = 0
  /-- The seminorm applied to a product is dominated by the sum of the seminorm applied to the
  factors. -/
  protected mul_le' : ∀ x y, toFun (x * y) ≤ toFun x + toFun y
  /-- The seminorm is invariant under inversion. -/
  protected inv' : ∀ x, toFun x⁻¹ = toFun x

{G : Type u_7}
[Group G]
(self : GroupSeminorm G)


theorem Γ_def : (Γ : _ ⥤ C) = forgetToPresheafedSpace.op ⋙ PresheafedSpace.Γ

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

AlgebraicGeometry.SheafedSpace.Γ =
  AlgebraicGeometry.SheafedSpace.forgetToPresheafedSpace.op ⋙ AlgebraicGeometry.PresheafedSpace.Γ


theorem ack_le_ack {m₁ m₂ n₁ n₂ : ℕ} (hm : m₁ ≤ m₂) (hn : n₁ ≤ n₂) : ack m₁ n₁ ≤ ack m₂ n₂


/-- Multiplication as a multiplicative homomorphism with zero. -/
@[simps]
def mulMonoidWithZeroHom [CommMonoidWithZero M₀] : M₀ × M₀ →*₀ M₀

∀ (a : M₀ × M₀), mulMonoidWithZeroHom a = (↑mulMonoidHom).toFun a


theorem eq_none_or_eq_some (o : Part α) : o = none ∨ ∃ x, o = some x


theorem finSuccEquiv'_symm_some_below {i : Fin (n + 1)} {m : Fin n} (h : Fin.castSucc m < i) :
    (finSuccEquiv' i).symm (some m) = Fin.castSucc m

{n : ℕ}
{i : Fin (n + 1)}
{m : Fin n}
(h : m.castSucc < i)

(finSuccEquiv' i).symm (some m) = m.castSucc