/-- Construct an isomorphism from a homeomorphism. -/
@[simps!]
def isoOfHomeo {X Y : CompHausLike.{u} P} (f : X ≃ₜ Y) : X ≅ Y

(a : ↑((CompHausLike.compHausLikeToTop P).obj X))


@[to_additive (attr := simp) card_nsmul_eq_zero]
theorem pow_card_eq_one : x ^ Fintype.card G = 1

{G : Type u_1}
[AddGroup G]
[Fintype G]
{x : G}


/-- The functor `StructuredArrow L R ⥤ StructuredArrow L' R'` that is deduced from
a natural transformation `R ⋙ G ⟶ F ⋙ R'` and a morphism `L' ⟶ G.obj L.` -/
@[simps!]
def map₂ : StructuredArrow L R ⥤ StructuredArrow L' R'

(X : CategoryTheory.Comma (CategoryTheory.Functor.fromPUnit L) R)

((CategoryTheory.StructuredArrow.map₂ α β).obj X).hom =
  CategoryTheory.CategoryStruct.comp α (CategoryTheory.CategoryStruct.comp (G.map X.hom) (β.app X.right))


@[simp] lemma toAddMonoidHomEquiv_symm_apply (ψ : A →+ Additive M) (a : A) :
    toAddMonoidHomEquiv.symm ψ a = Additive.toMul (ψ a)

{A : Type u_1}
{M : Type u_3}
[AddMonoid A]
[Monoid M]
(ψ : A →+ Additive M)
(a : A)

(AddChar.toAddMonoidHomEquiv.symm ψ) a = Additive.toMul (ψ a)


@[simp]
theorem inclusion_inclusion {L : S} (hHK : H ≤ K) (hKL : K ≤ L) (x : H) :
    inclusion hKL (inclusion hHK x) = inclusion (hHK.trans hKL) x

{G : Type u_1}
[Group G]
{S : Type u_6}
{H K : S}
[SetLike S G]
[SubgroupClass S G]
{L : S}
(hHK : H ≤ K)
(hKL : K ≤ L)
(x : ↥H)

(SubgroupClass.inclusion hKL) ((SubgroupClass.inclusion hHK) x) = (SubgroupClass.inclusion ⋯) x


theorem LinearIndependent.to_subtype_range {ι} {f : ι → M} (hf : LinearIndependent R f) :
    LinearIndependent R ((↑) : range f → M)

{R : Type u_2}
{M : Type u_4}
[Ring R]
[AddCommGroup M]
[Module R M]
{ι : Type u_8}
{f : ι → M}
(hf : LinearIndependent R f)

LinearIndependent (ι := { x // x ∈ Set.range f }) R Subtype.val


@[simp]
theorem basicOpen_mul : X.basicOpen (f * g) = X.basicOpen f ⊓ X.basicOpen g

(f g : ↑(X.presheaf.obj (Opposite.op U)))


@[simp]
theorem coe_mulEquiv_trans (e₁ : R ≃+* S) (e₂ : S ≃+* S') :
    (e₁.trans e₂ : R ≃* S') = (e₁ : R ≃* S).trans ↑e₂

{R : Type u_4}
{S : Type u_5}
{S' : Type u_6}
[Mul R]
[Mul S]
[Add R]
[Add S]
[Mul S']
[Add S']
(e₁ : R ≃+* S)
(e₂ : S ≃+* S')


theorem nontrivial_iff_exists_ne {x} (hx : x ∈ s) : s.Nontrivial ↔ ∃ y ∈ s, y ≠ x

{α : Type u}
{s : Set α}
{x : α}
(hx : x ∈ s)


theorem set_eq_of_length_le {l : List α} {n : Nat} (h : l.length ≤ n) {a : α} :
    l.set n a = l

{α : Type u_1}
{l : List α}
{n : Nat}
(h : l.length ≤ n)
{a : α}


/-- The map from a group to its completion as a group hom. -/
@[simps]
def toCompl : α →+ Completion α

{α : Type u_3}
[UniformSpace α]
[AddGroup α]
[UniformAddGroup α]

∀ (a : α), UniformSpace.Completion.toCompl a = ↑α a


theorem abs {f : ℝ → ℝ} (h : IntervalIntegrable f μ a b) :
    IntervalIntegrable (fun x => |f x|) μ a b

{a b : ℝ}
{μ : MeasureTheory.Measure ℝ}
{f : ℝ → ℝ}
(h : IntervalIntegrable f μ a b)


@[simp]
theorem colimit.coconeMorphism_hom {F : J ⥤ C} [HasColimit F] (c : Cocone F) :
    (colimit.coconeMorphism c).hom = colimit.desc F c

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

(CategoryTheory.Limits.colimit.coconeMorphism c).hom = CategoryTheory.Limits.colimit.desc F c


theorem map_eval₂ (f : R →+* S₁) (g : S₂ → MvPolynomial S₃ R) (p : MvPolynomial S₂ R) :
    map f (eval₂ C g p) = eval₂ C (map f ∘ g) (map f p)

{R : Type u}
{S₁ : Type v}
{S₂ : Type w}
{S₃ : Type x}
[CommSemiring R]
[CommSemiring S₁]
(f : R →+* S₁)
(g : S₂ → MvPolynomial S₃ R)
(p : MvPolynomial S₂ R)

(MvPolynomial.map f) (MvPolynomial.eval₂ MvPolynomial.C g p) =
  MvPolynomial.eval₂ MvPolynomial.C (⇑(MvPolynomial.map f) ∘ g) ((MvPolynomial.map f) p)


theorem infix_bind_of_mem {a : α} {as : List α} (h : a ∈ as) (f : α → List α) :
    f a <:+: as.bind f

{α : Type u}
{a : α}
{as : List α}
(h : a ∈ as)
(f : α → List α)


theorem iUnion_vsub (s : ι → Set β) (t : Set β) : (⋃ i, s i) -ᵥ t = ⋃ i, s i -ᵥ t

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


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


theorem coe_smul_adicCompletion (r : R) (x : K) :
    (↑(r • x) : v.adicCompletion K) = r • (↑x : v.adicCompletion K)

(v : IsDedekindDomain.HeightOneSpectrum R)


@[to_additive]
theorem pi_eq_bot_iff (H : ∀ i, Subgroup (f i)) : pi Set.univ H = ⊥ ↔ ∀ i, H i = ⊥

{η : Type u_7}
{f : η → Type u_8}
[(i : η) → AddGroup (f i)]
(H : (i : η) → AddSubgroup (f i))

AddSubgroup.pi Set.univ H = ⊥ ↔ ∀ (i : η), H i = ⊥


theorem hom_right_act_hom' :
    (P.tensorBimod (regular S)).actRight ≫ hom P = (hom P ▷ S.X) ≫ P.actRight

[(X : C) →
    CategoryTheory.Limits.PreservesColimitsOfSize.{0, 0, v₁, v₁, u₁, u₁} (CategoryTheory.MonoidalCategory.tensorLeft X)]

[(X : C) →
    CategoryTheory.Limits.PreservesColimitsOfSize.{0, 0, v₁, v₁, u₁, u₁}
      (CategoryTheory.MonoidalCategory.tensorRight X)]

(P.tensorBimod (Bimod.regular S)).actRight ≫ Bimod.RightUnitorBimod.hom P =
  Bimod.RightUnitorBimod.hom P ▷ S.X ≫ P.actRight


theorem sups_infs_subset_left : s ⊻ t ⊼ u ⊆ (s ⊻ t) ⊼ (s ⊻ u)

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


@[simp]
theorem powerset_inj : powerset s = powerset t ↔ s = t


@[simp]
theorem intCast_mul_mem_zmultiples : ↑(k : ℤ) * r ∈ zmultiples r


/-- The `ratio` is equal to the distance ratio for any two points with nonzero finite distance.
`dist` and `nndist` versions below -/
theorem ratio_unique [DilationClass F α β] {f : F} {x y : α} {r : ℝ≥0} (h₀ : edist x y ≠ 0)
    (htop : edist x y ≠ ⊤) (hr : edist (f x) (f y) = r * edist x y) : r = ratio f

(hr : edist (f x) (f y) = ↑r * edist x y)


lemma insert_id_rhs {C : Type*} [Category C] {X Y : C} (f g : X ⟶ Y) (w : f = g ≫ 𝟙 _) :
    f = g

{C : Type u_1}
[CategoryTheory.Category.{u_2, u_1} C]
{X Y : C}
(f g : X ⟶ Y)
(w : f = g ≫ 𝟙 Y)


theorem gaugeSeminorm_lt_one_of_isOpen (hs : IsOpen s) {x : E} (hx : x ∈ s) :
    gaugeSeminorm hs₀ hs₁ hs₂ x < 1

{𝕜 : Type u_1}
{E : Type u_2}
[AddCommGroup E]
[Module ℝ E]
{s : Set E}
[RCLike 𝕜]
[Module 𝕜 E]
[IsScalarTower ℝ 𝕜 E]
{hs₀ : Balanced 𝕜 s}
{hs₁ : Convex ℝ s}
{hs₂ : Absorbent ℝ s}
[TopologicalSpace E]
[ContinuousSMul ℝ E]
(hs : IsOpen s)
{x : E}
(hx : x ∈ s)


@[simp]
theorem norm_fst (a : 𝓜(𝕜, A)) : ‖a.fst‖ = ‖a‖

{𝕜 : Type u_1}
{A : Type u_2}
[NontriviallyNormedField 𝕜]
[NonUnitalNormedRing A]
[NormedSpace 𝕜 A]
[SMulCommClass 𝕜 A A]
[IsScalarTower 𝕜 A A]
[StarRing A]
[CstarRing A]
(a : 𝓜(𝕜, A))


theorem symm_bijective : Function.Bijective (DilationEquiv.symm : (X ≃ᵈ Y) → Y ≃ᵈ X)

{X : Type u_1}
{Y : Type u_2}
[PseudoEMetricSpace X]
[PseudoEMetricSpace Y]


theorem truncateFun_intCast (m : ℤ) : truncateFun n (m : 𝕎 R) = m

{p : ℕ}
[hp : Fact (Nat.Prime p)]
(n : ℕ)
{R : Type u_1}
[CommRing R]
(m : ℤ)


@[simp]
theorem swap_map_inl {X Y : C} {f : inl X ⟶ inl Y} : (swap C D).map f = f

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


theorem mul_invOf_mul_self_cancel [Monoid α] (a b : α) [Invertible b] : a * ⅟ b * b = a

{α : Type u}
[Monoid α]
(a b : α)
[Invertible b]


/-- A series whose terms are bounded by the terms of a converging geometric series converges. -/
theorem summable_one_div_pow_of_le {m : ℝ} {f : ℕ → ℕ} (hm : 1 < m) (fi : ∀ i, i ≤ f i) :
    Summable fun i ↦ 1 / m ^ f i

{m : ℝ}
{f : ℕ → ℕ}
(hm : 1 < m)
(fi : ∀ (i : ℕ), i ≤ f i)


@[simp]
theorem coe_finset_sup {ι : Type*} {s : Finset ι} {f : ι → Compacts α} :
    (↑(s.sup f) : Set α) = s.sup fun i => ↑(f i)

{α : Type u_1}
[TopologicalSpace α]
{ι : Type u_4}
{s : Finset ι}
{f : ι → TopologicalSpace.Compacts α}


lemma effectiveEpiFamily_of_map (F : C ⥤ D) [ReflectsEffectiveEpiFamilies.{u} F]
    {α : Type u} {B : C} (X : α → C) (π : (a : α) → (X a ⟶ B))
    (h : EffectiveEpiFamily (fun a ↦ F.obj (X a)) (fun a  ↦ F.map (π a))) :
    EffectiveEpiFamily X π

(h : CategoryTheory.EffectiveEpiFamily (fun a => F.obj (X a)) fun a => F.map (π a))


lemma map_add_left_Ico (a b c : α) : (Ico a b).map (c + ·) = Ico (c + a) (c + b)

{α : Type u_1}
[OrderedCancelAddCommMonoid α]
[ExistsAddOfLE α]
[LocallyFiniteOrder α]
(a b c : α)

Multiset.map (fun x => c + x) (Multiset.Ico a b) = Multiset.Ico (c + a) (c + b)


theorem card_sym2 {m : Multiset α} :
    Multiset.card m.sym2 = Nat.choose (Multiset.card m + 1) 2

Multiset.card m.sym2 = (Multiset.card m + 1).choose 2


theorem IsQF.not {φ : L.BoundedFormula α n} (h : IsQF φ) : IsQF φ.not

{L : FirstOrder.Language}
{α : Type u'}
{n : ℕ}
{φ : L.BoundedFormula α n}
(h : φ.IsQF)


theorem iso_isometry {V W : SemiNormedGrp₁} (i : V ≅ W) : Isometry i.hom


@[simp]
lemma mkInv_comp_mk [HasSmallLocalizedHom.{w} W X X] [HasSmallLocalizedHom.{w} W X Y]
    [HasSmallLocalizedHom.{w} W Y X] (f : Y ⟶ X) (hf : W f) :
    (mkInv f hf).comp (mk W f) = mk W (𝟙 X)

[CategoryTheory.Localization.HasSmallLocalizedHom W X X]

[CategoryTheory.Localization.HasSmallLocalizedHom W X Y]

[CategoryTheory.Localization.HasSmallLocalizedHom W Y X]

(CategoryTheory.Localization.SmallHom.mkInv f hf).comp (CategoryTheory.Localization.SmallHom.mk W f) =
  CategoryTheory.Localization.SmallHom.mk W (CategoryTheory.CategoryStruct.id X)


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

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

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


theorem toMatrix_sumInl (t : TransvectionStruct n R) :
    (t.sumInl p).toMatrix = fromBlocks t.toMatrix 0 0 1

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

(Matrix.TransvectionStruct.sumInl p t).toMatrix = Matrix.fromBlocks t.toMatrix 0 0 1


lemma slope_le_of_hasDerivWithinAt_Ioi (hfc : ConcaveOn ℝ S f)
    (hx : x ∈ S) (hy : y ∈ S) (hxy : x < y) (hf' : HasDerivWithinAt f f' (Ioi x) x) :
    slope f x y ≤ f'

(hf' : HasDerivWithinAt f f' (Set.Ioi x) x)


/-- Post-composition by a *fixed* continuous linear map as a continuous linear map.
Note that in non-normed space it is not always true that composition is continuous
in both variables, so we have to fix one of them. -/
@[simps]
def postcomp [TopologicalAddGroup F] [TopologicalAddGroup G] [ContinuousConstSMul 𝕜₃ G]
    [ContinuousConstSMul 𝕜₂ F] (L : F →SL[τ] G) : (E →SL[σ] F) →SL[τ] E →SL[ρ] G

{𝕜₁ : Type u_1}
{𝕜₂ : Type u_2}
{𝕜₃ : Type u_3}
[NormedField 𝕜₁]
[NormedField 𝕜₂]
[NormedField 𝕜₃]
{σ : 𝕜₁ →+* 𝕜₂}
{τ : 𝕜₂ →+* 𝕜₃}
{ρ : 𝕜₁ →+* 𝕜₃}
[RingHomCompTriple σ τ ρ]
(E : Type u_4)
{F : Type u_5}
{G : Type u_6}
[AddCommGroup E]
[Module 𝕜₁ E]
[AddCommGroup F]
[Module 𝕜₂ F]
[AddCommGroup G]
[Module 𝕜₃ G]
[TopologicalSpace E]
[TopologicalSpace F]
[TopologicalSpace G]
[TopologicalAddGroup F]
[TopologicalAddGroup G]
[ContinuousConstSMul 𝕜₃ G]
[ContinuousConstSMul 𝕜₂ F]
(L : F →SL[τ] G)
(f : E →SL[σ] F)

(ContinuousLinearMap.postcomp E L) f = L.comp f


theorem mdifferentiableAt_atlas_symm (h : e ∈ atlas H M) {x : H} (hx : x ∈ e.target) :
    MDifferentiableAt I I e.symm 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]
[SmoothManifoldWithCorners I M]
{e : PartialHomeomorph M H}
(h : e ∈ atlas H M)
{x : H}
(hx : x ∈ e.target)


/-- The first isomorphism theorem for morphisms of Lie algebras. -/
@[simps]
noncomputable def quotKerEquivRange : (L ⧸ f.ker) ≃ₗ⁅R⁆ f.range

{R : Type u_1}
{L : Type u_2}
{L' : Type u_3}
[CommRing R]
[LieRing L]
[LieAlgebra R L]
[LieRing L']
[LieAlgebra R L']
(f : L →ₗ⁅R⁆ L')

∀ (a : ↥(LinearMap.range ↑f)), f.quotKerEquivRange.invFun a = (↑f).quotKerEquivRange.invFun a


@[simp]
theorem image2_empty_right : image2 f s ∅ = ∅

{α : Type u_1}
{β : Type u_3}
{γ : Type u_5}
{f : α → β → γ}
{s : Set α}


@[simp]
theorem seq_neg (f : FreeAbelianGroup (α → β)) (x : FreeAbelianGroup α) : f <*> -x = -(f <*> x)

{α β : Type u}
(f : FreeAbelianGroup (α → β))
(x : FreeAbelianGroup α)

(Seq.seq f fun x_1 => -x) = -Seq.seq f fun x_1 => x


/-- A submonoid is either the trivial submonoid or nontrivial. -/
@[to_additive "An additive submonoid is either the trivial additive submonoid or nontrivial."]
theorem bot_or_nontrivial (S : Submonoid M) : S = ⊥ ∨ Nontrivial S

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


/-- The infimum of two congruence relations equals the infimum of the underlying binary
operations. -/
@[simp, norm_cast]
theorem coe_inf {c d : RingCon R} : ⇑(c ⊓ d) = ⇑c ⊓ ⇑d

{R : Type u_2}
[Add R]
[Mul R]
{c d : RingCon R}


theorem neg_right_iff (x y : R) : IsCoprime x (-y) ↔ IsCoprime x y


@[to_additive] lemma oneLePart_mono : Monotone (oneLePart : α → α)


/-- The product of a family of partial equivalences, as a partial equivalence on the pi type. -/
@[simps (config := mfld_cfg) apply source target]
protected def pi (ei : ∀ i, PartialEquiv (αi i) (βi i)) : PartialEquiv (∀ i, αi i) (∀ i, βi i)

(ei : (i : ι) → PartialEquiv (αi i) (βi i))

(PartialEquiv.pi ei).target = Set.univ.pi fun i => (ei i).target


theorem sup'_eq_sup {s : Finset β} (H : s.Nonempty) (f : β → α) : s.sup' H f = s.sup f

{α : Type u_2}
{β : Type u_3}
[SemilatticeSup α]
[OrderBot α]
{s : Finset β}
(H : s.Nonempty)
(f : β → α)


theorem sumOfConjugatesEquivariant_apply (v : W) :
    π.sumOfConjugatesEquivariant G v = ∑ g : G, π.conjugate g v

{k : Type u}
[CommRing k]
(G : Type u)
[Group G]
{V : Type v}
[AddCommGroup V]
[Module k V]
[Module (MonoidAlgebra k G) V]
[IsScalarTower k (MonoidAlgebra k G) V]
{W : Type w}
[AddCommGroup W]
[Module k W]
[Module (MonoidAlgebra k G) W]
[IsScalarTower k (MonoidAlgebra k G) W]
(π : W →ₗ[k] V)
[Fintype G]
(v : W)

(LinearMap.sumOfConjugatesEquivariant G π) v = ∑ g : G, (π.conjugate g) v


/-- Equivalences between finite types are the same as isomorphisms in `FintypeCat`. -/
@[simps]
def equivEquivIso {A B : FintypeCat} : A ≃ B ≃ (A ≅ B)

{A B : FintypeCat}
(e : ↑A ≃ ↑B)
(a : ↑A)

(FintypeCat.equivEquivIso e).hom a = e a


theorem Normal.minpoly_eq_iff_mem_orbit [h : Normal F E] {x y : E} :
    minpoly F x = minpoly F y ↔ x ∈ MulAction.orbit (E ≃ₐ[F] E) y

{F : Type u_1}
[Field F]
(E : Type u_6)
[Field E]
[Algebra F E]
[h : Normal F E]
{x y : E}


theorem sign_ofNat_of_nonzero {n : Nat} (hn : n ≠ 0) : Int.sign n = 1


theorem frobenius_norm_mul (A : Matrix l m α) (B : Matrix m n α) : ‖A * B‖ ≤ ‖A‖ * ‖B‖

{l : Type u_2}
{m : Type u_3}
{n : Type u_4}
{α : Type u_5}
[Fintype l]
[Fintype m]
[Fintype n]
[RCLike α]
(A : Matrix l m α)
(B : Matrix m n α)

‖A * B‖ ≤ ‖A‖ * ‖B‖


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

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

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


lemma two_pow_and (n i : ℕ) : 2 ^ i &&& n = 2 ^ i * (n.testBit i).toNat


theorem aemeasurable_withDensity_iff {E : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E]
    [SecondCountableTopology E] [MeasurableSpace E] [BorelSpace E] {f : α → ℝ≥0}
    (hf : Measurable f) {g : α → E} :
    AEMeasurable g (μ.withDensity fun x => (f x : ℝ≥0∞)) ↔
      AEMeasurable (fun x => (f x : ℝ) • g x) μ

{α : Type u_1}
{m : MeasurableSpace α}
{μ : MeasureTheory.Measure α}
{E : Type u_5}
[NormedAddCommGroup E]
[NormedSpace ℝ E]
[SecondCountableTopology E]
[MeasurableSpace E]
[BorelSpace E]
{f : α → ℝ≥0}
(hf : Measurable f)
{g : α → E}

AEMeasurable g (μ.withDensity fun x => ↑(f x)) ↔ AEMeasurable (fun x => ↑(f x) • g x) μ


/-- Reinterpret `α →+ β` as `Multiplicative α →* Multiplicative β`. -/
@[simps]
def AddMonoidHom.toMultiplicative [AddZeroClass α] [AddZeroClass β] :
    (α →+ β) ≃ (Multiplicative α →* Multiplicative β)

(f : Multiplicative α →* Multiplicative β)

(AddMonoidHom.toMultiplicative.symm f) a = Multiplicative.toAdd (f (Multiplicative.ofAdd a))


theorem le_succ_bot_iff : a ≤ succ ⊥ ↔ a = ⊥ ∨ a = succ ⊥

{α : Type u_1}
[PartialOrder α]
[SuccOrder α]
{a : α}
[OrderBot α]

a ≤ Order.succ ⊥ ↔ a = ⊥ ∨ a = Order.succ ⊥


theorem Real.convex_iff_isPreconnected {s : Set ℝ} : Convex ℝ s ↔ IsPreconnected s


theorem aestronglyMeasurable_derivWithin_Ici (μ : Measure ℝ) :
    AEStronglyMeasurable (fun x => derivWithin f (Ici x) x) μ

{F : Type u_1}
[NormedAddCommGroup F]
[NormedSpace ℝ F]
(f : ℝ → F)
[CompleteSpace F]
(μ : MeasureTheory.Measure ℝ)

MeasureTheory.AEStronglyMeasurable (fun x => derivWithin f (Set.Ici x) x) μ


@[fun_prop]
theorem HasFDerivAt.mul' (ha : HasFDerivAt a a' x) (hb : HasFDerivAt b b' x) :
    HasFDerivAt (fun y => a y * b y) (a x • b' + a'.smulRight (b x)) x

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{x : E}
{𝔸 : Type u_6}
[NormedRing 𝔸]
[NormedAlgebra 𝕜 𝔸]
{a b : E → 𝔸}
{a' b' : E →L[𝕜] 𝔸}
(ha : HasFDerivAt a a' x)
(hb : HasFDerivAt b b' x)


theorem infsep_pos_iff_nontrivial_of_finite [Finite s] : 0 < s.infsep ↔ s.Nontrivial

{α : Type u_1}
[MetricSpace α]
{s : Set α}
[Finite ↑s]


@[simp]
theorem ListBlank.tail_map {Γ Γ'} [Inhabited Γ] [Inhabited Γ'] (f : PointedMap Γ Γ')
    (l : ListBlank Γ) : (l.map f).tail = l.tail.map f

{Γ : Type u_1}
{Γ' : Type u_2}
[Inhabited Γ]
[Inhabited Γ']
(f : Turing.PointedMap Γ Γ')
(l : Turing.ListBlank Γ)

(Turing.ListBlank.map f l).tail = Turing.ListBlank.map f l.tail


theorem mem_image (y : β) (s : Set α) : y ∈ image r s ↔ ∃ x ∈ s, r x y

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


@[simp]
theorem neg_lt_neg_iff {x y : PGame} : -y < -x ↔ x < y


@[to_additive]
theorem tprod_eq_one_iff (hf : Multipliable f) : ∏' i, f i = 1 ↔ ∀ x, f x = 1

{ι : Type u_1}
{α : Type u_3}
[CanonicallyOrderedCommMonoid α]
[TopologicalSpace α]
[OrderClosedTopology α]
{f : ι → α}
(hf : Multipliable f)


theorem HasDerivAt.complexToReal_fderiv {f : ℂ → ℂ} {f' x : ℂ} (h : HasDerivAt f f' x) :
    HasFDerivAt f (f' • (1 : ℂ →L[ℝ] ℂ)) x


@[simp]
theorem coe_zero : ⇑(0 : M [⋀^ι]→L[R] N) = 0

{R : Type u_1}
{M : Type u_2}
{N : Type u_4}
{ι : Type u_6}
[Semiring R]
[AddCommMonoid M]
[Module R M]
[TopologicalSpace M]
[AddCommMonoid N]
[Module R N]
[TopologicalSpace N]


@[simp]
theorem mk_eq (f : Arrow T) : Arrow.mk f.hom = f

{T : Type u}
[CategoryTheory.Category.{v, u} T]
(f : CategoryTheory.Arrow T)


theorem conductor_eq_top_of_adjoin_eq_top (h : R<x> = ⊤) : conductor R x = ⊤

{R : Type u_1}
{S : Type u_2}
[CommRing R]
[CommRing S]
[Algebra R S]
{x : S}
(h : Algebra.adjoin R {x} = ⊤)


protected theorem lt_of_sub_pos {a b : Int} (h : 0 < a - b) : b < a


theorem nhds_eq (l : Filter α) : 𝓝 l = l.lift' (Iic ∘ 𝓟)


theorem Nonempty.of_infs_left : (s ⊼ t).Nonempty → s.Nonempty

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


@[simp] theorem length_reverse (as : List α) : (as.reverse).length = as.length


/-- Construct a prelax functor from a map on objects, and functors between the corresponding
hom types. -/
@[simps]
def mkOfHomFunctors (F : B → C) (F' : (a : B) → (b : B) → (a ⟶ b) ⥤ (F a ⟶ F b)) :
    PrelaxFunctor B C

(F' : (a b : B) → CategoryTheory.Functor (a ⟶ b) (F a ⟶ F b))

(CategoryTheory.PrelaxFunctor.mkOfHomFunctors F F').toPrelaxFunctorStruct =
  CategoryTheory.PrelaxFunctorStruct.mkOfHomPrefunctors F fun a b => (F' a b).toPrefunctor


@[simp] lemma zeckendorf_of_pos : ∀ {n}, 0 < n →
    zeckendorf n = greatestFib n :: zeckendorf (n - fib (greatestFib n))

0 < n → n.zeckendorf = n.greatestFib :: (n - Nat.fib n.greatestFib).zeckendorf


/-- The diagram (in the sense of `CategoryTheory`)
 of an unbundled `directLimit` of modules. -/
@[simps]
def directLimitDiagram : ι ⥤ ModuleCat R

[DirectedSystem G fun i j h => ⇑(f i j h)]

(ModuleCat.directLimitDiagram G f).obj i = ModuleCat.of R (G i)


@[simp]
theorem geom_sum_two {x : α} : ∑ i ∈ range 2, x ^ i = x + 1


{α : Type u_1}
[CommMonoidWithZero α]
{p : α}
(hp : Prime p)


/-- The inverse rotation of triangles gives an endofunctor on the category of triangles in `C`.
-/
@[simps]
def invRotate : Triangle C ⥤ Triangle C

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

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


@[simp]
theorem conjTranspose_natCast [DecidableEq n] [Semiring α] [StarRing α] (d : ℕ) :
    (d : Matrix n n α)ᴴ = d

{n : Type u_3}
{α : Type v}
[DecidableEq n]
[Semiring α]
[StarRing α]
(d : ℕ)


@[simp]
theorem toFinset_toMultiset (s : Cycle α) : s.toMultiset.toFinset = s.toFinset

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


/-- A prefunctor from a quiver `B` to a bicategory `C` can be lifted to a pseudofunctor from
`free_bicategory B` to `C`.
-/
@[simps]
def lift : Pseudofunctor (FreeBicategory B) C

{B : Type u₁}
[Quiver B]
{C : Type u₂}
[CategoryTheory.Bicategory C]
(F : B ⥤q C)

∀ {X Y : CategoryTheory.FreeBicategory B} (a : X ⟶ Y),
  (CategoryTheory.FreeBicategory.lift F).map a = CategoryTheory.FreeBicategory.liftHom F a


@[to_additive (attr := simp)]
theorem fst_swap (x : M ∗ N) : fst (swap M N x) = snd x

{M : Type u_1}
{N : Type u_2}
[AddMonoid M]
[AddMonoid N]
(x : AddMonoid.Coprod M N)

AddMonoid.Coprod.fst ((AddMonoid.Coprod.swap M N) x) = AddMonoid.Coprod.snd x


theorem strictConvex_Ico (r s : β) : StrictConvex 𝕜 (Ico r s)

{𝕜 : Type u_1}
{β : Type u_5}
[OrderedSemiring 𝕜]
[TopologicalSpace β]
[LinearOrderedCancelAddCommMonoid β]
[OrderTopology β]
[Module 𝕜 β]
[OrderedSMul 𝕜 β]
(r s : β)


theorem hasFTaylorSeriesUpToOn_zero_iff :
    HasFTaylorSeriesUpToOn 0 f p s ↔ ContinuousOn f s ∧ ∀ x ∈ s, (p x 0).uncurry0 = f x

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


@[simp, reassoc] lemma comp_f₀ : (f ≫ g).f₀ = f.f₀ ≫ g.f₀

{S₁ S₂ S₃ : CategoryTheory.ShortComplex.SnakeInput C}

(CategoryTheory.CategoryStruct.comp f g).f₀ = CategoryTheory.CategoryStruct.comp f.f₀ g.f₀


@[simp] lemma dvd_div_iff_mul_dvd (hbc : c ∣ b) : a ∣ b / c ↔ c * a ∣ b


@[to_additive]
theorem tprod_dite_left (P : Prop) [Decidable P] (x : β → P → α) :
    ∏' b : β, (if h : P then x b h else 1) = if h : P then ∏' b : β, x b h else 1

{α : Type u_1}
{β : Type u_2}
[CommMonoid α]
[TopologicalSpace α]
(P : Prop)
[Decidable P]
(x : β → P → α)

(∏' (b : β), if h : P then x b h else 1) = if h : P then ∏' (b : β), x b h else 1


theorem sup_vanishingIdeal_le (t t' : Set (ProjectiveSpectrum 𝒜)) :
    vanishingIdeal t ⊔ vanishingIdeal t' ≤ vanishingIdeal (t ∩ t')

{R : Type u_1}
{A : Type u_2}
[CommSemiring R]
[CommRing A]
[Algebra R A]
(𝒜 : ℕ → Submodule R A)
[GradedAlgebra 𝒜]
(t t' : Set (ProjectiveSpectrum 𝒜))

ProjectiveSpectrum.vanishingIdeal t ⊔ ProjectiveSpectrum.vanishingIdeal t' ≤ ProjectiveSpectrum.vanishingIdeal (t ∩ t')


@[simp]
theorem ldiff_bit (a m b n) : ldiff (bit a m) (bit b n) = bit (a && not b) (ldiff m n)

(Int.bit a m).ldiff (Int.bit b n) = Int.bit (a && !b) (m.ldiff n)


theorem map_erase_of_mem [DecidableEq α] [DecidableEq β] (f : α → β)
    (s : Multiset α) {x : α} (h : x ∈ s) : (s.erase x).map f = (s.map f).erase (f x)

{α : Type u_1}
{β : Type v}
[DecidableEq α]
[DecidableEq β]
(f : α → β)
(s : Multiset α)
{x : α}
(h : x ∈ s)

Multiset.map f (s.erase x) = (Multiset.map f s).erase (f x)


theorem lift_comm {g : Filter β} {h : Set α → Set β → Filter γ} :
    (f.lift fun s => g.lift (h s)) = g.lift fun t => f.lift fun s => h s t

{α : Type u_1}
{β : Type u_2}
{γ : Type u_3}
{f : Filter α}
{g : Filter β}
{h : Set α → Set β → Filter γ}


@[simp]
theorem powerset_apply {A : Class.{u}} {x : ZFSet.{u}} : powerset A x ↔ ↑x ⊆ A


@[to_additive]
theorem IsCompact.exists_finite_cover_smul [IsMinimal G α] [ContinuousConstSMul G α]
    {K U : Set α} (hK : IsCompact K) (hUo : IsOpen U) (hne : U.Nonempty) :
    ∃ I : Finset G, K ⊆ ⋃ g ∈ I, g • U

(G : Type u_2)
{α : Type u_3}
[AddGroup G]
[TopologicalSpace α]
[AddAction G α]
[AddAction.IsMinimal G α]
[ContinuousConstVAdd G α]
{K U : Set α}
(hK : IsCompact K)
(hUo : IsOpen U)
(hne : U.Nonempty)


/-- The `a`-torsion submodule is an `a`-torsion module. -/
theorem torsionBy_isTorsionBy : IsTorsionBy R (torsionBy R M a) a

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

Module.IsTorsionBy R (↥(Submodule.torsionBy R M a)) a


/-- The glue data associated with an open cover.
The canonical isomorphism `𝒰.gluedCover.glued ⟶ X` is provided by `𝒰.fromGlued`. -/
@[simps]
def gluedCover : Scheme.GlueData.{u}

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

𝒰.gluedCover.t' x y z = 𝒰.gluedCoverT' x y z


@[gcongr]
theorem ceil_le_ceil : ∀ x y : α, x ≤ y → ⌈x⌉₊ ≤ ⌈y⌉₊

{α : Type u_2}
[LinearOrderedSemiring α]
[FloorSemiring α]
(x y : α)

x ≤ y → ⌈x⌉₊ ≤ ⌈y⌉₊


@[simp]
theorem invOf_mul_self' [Mul α] [One α] (a : α) {_ : Invertible a} : ⅟ a * a = 1


protected theorem Homeomorph.contractibleSpace [ContractibleSpace Y] (e : X ≃ₜ Y) :
    ContractibleSpace X

{X : Type u_1}
{Y : Type u_2}
[TopologicalSpace X]
[TopologicalSpace Y]
[ContractibleSpace Y]
(e : X ≃ₜ Y)


theorem derivWithin_Ioi_eq_Ici {E : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E] (f : ℝ → E)
    (x : ℝ) : derivWithin f (Ioi x) x = derivWithin f (Ici x) x

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

derivWithin f (Set.Ioi x) x = derivWithin f (Set.Ici x) x


theorem zero_le_degree_iff : 0 ≤ degree p ↔ p ≠ 0


/-- Hölder's inequality, as an inequality on the `ℒp` seminorm of an elementwise operation
`fun x => b (f x) (g x)`. -/
theorem eLpNorm_le_eLpNorm_mul_eLpNorm_of_nnnorm {p q r : ℝ≥0∞}
    (hf : AEStronglyMeasurable f μ) (hg : AEStronglyMeasurable g μ) (b : E → F → G)
    (h : ∀ᵐ x ∂μ, ‖b (f x) (g x)‖₊ ≤ ‖f x‖₊ * ‖g x‖₊) (hpqr : 1 / p = 1 / q + 1 / r) :
    eLpNorm (fun x => b (f x) (g x)) p μ ≤ eLpNorm f q μ * eLpNorm g r μ

(hf : MeasureTheory.AEStronglyMeasurable f μ)

(hg : MeasureTheory.AEStronglyMeasurable g μ)

(h : ∀ᵐ (x : α) ∂μ, ‖b (f x) (g x)‖₊ ≤ ‖f x‖₊ * ‖g x‖₊)

MeasureTheory.eLpNorm (fun x => b (f x) (g x)) p μ ≤ MeasureTheory.eLpNorm f q μ * MeasureTheory.eLpNorm g r μ


theorem restrict (hf : AntilipschitzWith K f) (s : Set α) : AntilipschitzWith K (s.restrict f)

{α : Type u_1}
{β : Type u_2}
[PseudoEMetricSpace α]
[PseudoEMetricSpace β]
{K : ℝ≥0}
{f : α → β}
(hf : AntilipschitzWith K f)
(s : Set α)


@[simp]
theorem eval_basisDivisor_right : eval y (basisDivisor x y) = 0

Polynomial.eval y (Lagrange.basisDivisor x y) = 0


lemma homEquiv_isoOfHom_inv (f : Y ⟶ X) (hf : W f) :
    homEquiv W L₁ L₂ (isoOfHom L₁ W f hf).inv = (isoOfHom L₂ W f hf).inv

(CategoryTheory.Localization.homEquiv W L₁ L₂) (CategoryTheory.Localization.isoOfHom L₁ W f hf).inv =
  (CategoryTheory.Localization.isoOfHom L₂ W f hf).inv


/-- A continuous antitone function between (conditionally) complete linear ordered spaces sends a
`Filter.liminf` to the `Filter.limsup` of the images (if the filter is bounded from below and
frequently bounded from above). -/
theorem Antitone.map_liminf_of_continuousAt {f : R → S} (f_decr : Antitone f) (a : ι → R)
    (f_cont : ContinuousAt f (F.liminf a))
    (cobdd : F.IsCoboundedUnder (· ≥ ·) a := by isBoundedDefault)
    (bdd_below : F.IsBoundedUnder (· ≥ ·) a := by isBoundedDefault) :
    f (F.liminf a) = F.limsup (f ∘ a)

(f_cont : ContinuousAt f (Filter.liminf a F))

(cobdd : Filter.IsCoboundedUnder (fun x x_1 => x ≥ x_1) F a := by isBoundedDefault)

(bdd_below : Filter.IsBoundedUnder (fun x x_1 => x ≥ x_1) F a := by isBoundedDefault)

f (Filter.liminf a F) = Filter.limsup (f ∘ a) F


theorem measurableSet_range (hf : MeasurableEmbedding f) : MeasurableSet (range f)

{α : Type u_1}
{β : Type u_2}
{mα : MeasurableSpace α}
[MeasurableSpace β]
{f : α → β}
(hf : MeasurableEmbedding f)


theorem filter_le_of_le_bot {n m l : ℕ} (hln : l ≤ n) :
    ((Ico n m).filter fun x => l ≤ x) = Ico n m

List.filter (fun x => decide (l ≤ x)) (List.Ico n m) = List.Ico n m


lemma toNNReal_eq_iff_eq_coe {r : ℝ} {p : ℝ≥0} (hp : p ≠ 0) : r.toNNReal = p ↔ r = p


theorem tendsto_iff_rtendsto' (l₁ : Filter α) (l₂ : Filter β) (f : α → β) :
    Tendsto f l₁ l₂ ↔ RTendsto' (Function.graph f) l₁ l₂

{α : Type u}
{β : Type v}
(l₁ : Filter α)
(l₂ : Filter β)
(f : α → β)

Filter.Tendsto f l₁ l₂ ↔ Filter.RTendsto' (Function.graph f) l₁ l₂


@[simp] theorem rotateLeft_nil : ([] : List α).rotateLeft n = []


theorem coe_inv_circle_eq_conj (z : circle) : ↑z⁻¹ = conj (z : ℂ)


theorem isLUB_Ioo {a b : γ} (hab : a < b) : IsLUB (Ioo a b) b

{γ : Type w}
[SemilatticeInf γ]
[DenselyOrdered γ]
{a b : γ}
(hab : a < b)


/-- The zero morphism maps every pseudoelement to 0. -/
@[simp]
theorem zero_apply {P : C} (Q : C) (a : P) : (0 : P ⟶ Q) a = 0

(a : CategoryTheory.Abelian.Pseudoelement P)

CategoryTheory.Abelian.Pseudoelement.pseudoApply 0 a = 0


@[simp]
theorem gcd_add_self_left (m n : ℕ) : gcd (m + n) n = gcd m n


@[simp]
theorem aleph_zero : aleph 0 = ℵ₀


theorem Monotone.strictMono_of_injective (h₁ : Monotone f) (h₂ : Injective f) : StrictMono f

{α : Type u}
{β : Type v}
[Preorder α]
[PartialOrder β]
{f : α → β}
(h₁ : Monotone f)
(h₂ : Function.Injective f)


@[to_additive (attr := simp)]
theorem MulHom.coe_coe [MulHomClass F M N] (f : F) : ((f : MulHom M N) : M → N) = f

{M : Type u_4}
{N : Type u_5}
{F : Type u_9}
[Mul M]
[Mul N]
[FunLike F M N]
[MulHomClass F M N]
(f : F)


theorem single_apply_ne_zero {a x : α} {b : M} : single a b x ≠ 0 ↔ x = a ∧ b ≠ 0

{α : Type u_1}
{M : Type u_5}
[Zero M]
{a x : α}
{b : M}

(Finsupp.single a b) x ≠ 0 ↔ x = a ∧ b ≠ 0


@[to_additive nndist_nnnorm_nnnorm_le]
theorem nndist_nnnorm_nnnorm_le' (a b : E) : nndist ‖a‖₊ ‖b‖₊ ≤ ‖a / b‖₊

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


theorem Lex.wellFounded' (hbot : ∀ ⦃i a⦄, ¬s i a 0) (hs : ∀ i, WellFounded (s i))
    [IsTrichotomous ι r] (hr : WellFounded (Function.swap r)) :
    WellFounded (DFinsupp.Lex r s)

{ι : Type u_1}
{α : ι → Type u_2}
[(i : ι) → Zero (α i)]
{r : ι → ι → Prop}
{s : (i : ι) → α i → α i → Prop}
(hbot : ∀ ⦃i : ι⦄ ⦃a : α i⦄, ¬s i a 0)
(hs : ∀ (i : ι), WellFounded (s i))
[IsTrichotomous ι r]
(hr : WellFounded (Function.swap r))


protected theorem t1Space [T1Space R] : T1Space V

{R : Type u_1}
{V : Type u_2}
[Ring R]
[AddCommGroup V]
[TopologicalSpace V]
[TopologicalSpace R]
[Module R V]
[SeparatingDual R V]
[T1Space R]


theorem _root_.natCast_memℓp_infty (n : ℕ) : Memℓp (n : ∀ i, B i) ∞

{I : Type u_3}
{B : I → Type u_4}
[(i : I) → NormedRing (B i)]
[∀ (i : I), NormOneClass (B i)]
(n : ℕ)


lemma pairing_zero_iff : P.pairing i j = 0 ↔ P.pairing j i = 0

{ι : Type u_1}
{R : Type u_2}
{M : Type u_3}
{N : Type u_4}
[LinearOrderedCommRing R]
[AddCommGroup M]
[Module R M]
[AddCommGroup N]
[Module R N]
{P : RootPairing ι R M N}
(B : M →ₗ[R] M →ₗ[R] R)
[P.IsRootPositive B]
(i j : ι)


@[simp]
theorem inv_neg' (a : α) : (-a)⁻¹ = -a⁻¹

{α : Type u_2}
[Group α]
[HasDistribNeg α]
(a : α)


@[simp]
theorem prod_repr_inr (x) (i) : (b.prod b').repr x (Sum.inr i) = b'.repr x.2 i

{ι : Type u_1}
{ι' : Type u_2}
{R : Type u_3}
{M : Type u_6}
{M' : Type u_7}
[Semiring R]
[AddCommMonoid M]
[Module R M]
[AddCommMonoid M']
[Module R M']
(b : Basis ι R M)
(b' : Basis ι' R M')
(x : M × M')
(i : ι')

((b.prod b').repr x) (Sum.inr i) = (b'.repr x.2) i


theorem Sized.rotateR {l x r} (hl : @Sized α l) (hr : Sized r) : Sized (rotateR l x r)

{α : Type u_1}
{l : Ordnode α}
{x : α}
{r : Ordnode α}
(hl : l.Sized)
(hr : r.Sized)


lemma setLIntegral_condKernel (hf : Measurable f) {s : Set β}
    (hs : MeasurableSet s) {t : Set Ω} (ht : MeasurableSet t) :
    ∫⁻ b in s, ∫⁻ ω in t, f (b, ω) ∂(ρ.condKernel b) ∂ρ.fst
      = ∫⁻ x in s ×ˢ t, f x ∂ρ

{β : Type u_2}
{Ω : Type u_3}
{mβ : MeasurableSpace β}
[MeasurableSpace Ω]
[StandardBorelSpace Ω]
[Nonempty Ω]
{ρ : MeasureTheory.Measure (β × Ω)}
[MeasureTheory.IsFiniteMeasure ρ]
{f : β × Ω → ℝ≥0∞}
(hf : Measurable f)
{s : Set β}
(hs : MeasurableSet s)
{t : Set Ω}
(ht : MeasurableSet t)

∫⁻ (b : β) in s, ∫⁻ (ω : Ω) in t, f (b, ω) ∂ρ.condKernel b ∂ρ.fst = ∫⁻ (x : β × Ω) in s ×ˢ t, f x ∂ρ


lemma cast_eq_zero_iff (a : ℕ) : (a : R) = 0 ↔ p ∣ a

(R : Type u_1)
[AddMonoidWithOne R]
(p : ℕ)
[CharP R p]
(a : ℕ)


/-- We have that `hζ.toInteger - 1` does not divide `2`. -/
lemma toInteger_sub_one_not_dvd_two [IsCyclotomicExtension {p ^ (k + 1)} ℚ K]
    (hζ : IsPrimitiveRoot ζ ↑(p ^ (k + 1))) (hodd : p ≠ 2) : ¬ hζ.toInteger - 1 ∣ 2


/-- If `s` is σ-compact and `f` continuous, `f(s)` is σ-compact. -/
lemma IsSigmaCompact.image {f : X → Y} (hf : Continuous f) {s : Set X} (hs : IsSigmaCompact s) :
    IsSigmaCompact (f '' s)

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


lemma levyProkhorovEDist_lt_top (μ ν : Measure Ω) [IsFiniteMeasure μ] [IsFiniteMeasure ν] :
    levyProkhorovEDist μ ν < ∞

{Ω : Type u_2}
[MeasurableSpace Ω]
[PseudoEMetricSpace Ω]
(μ ν : MeasureTheory.Measure Ω)
[MeasureTheory.IsFiniteMeasure μ]
[MeasureTheory.IsFiniteMeasure ν]

MeasureTheory.levyProkhorovEDist μ ν < ⊤


@[simp, norm_cast]
theorem isLittleO_ofReal_right {f : α → E} {g : α → ℝ} : f =o[l] (g · : α → ℂ) ↔ f =o[l] g

{α : Type u_1}
{E : Type u_2}
[Norm E]
{l : Filter α}
{f : α → E}
{g : α → ℝ}


/-- A version of `exists_idempotent_of_compact_t2_of_continuous_mul_left` where the idempotent lies
in some specified nonempty compact subsemigroup. -/
@[to_additive exists_idempotent_in_compact_add_subsemigroup
      "A version of
      `exists_idempotent_of_compact_t2_of_continuous_add_left` where the idempotent lies in
      some specified nonempty compact additive subsemigroup."]
theorem exists_idempotent_in_compact_subsemigroup {M} [Semigroup M] [TopologicalSpace M] [T2Space M]
    (continuous_mul_left : ∀ r : M, Continuous (· * r)) (s : Set M) (snemp : s.Nonempty)
    (s_compact : IsCompact s) (s_add : ∀ᵉ (x ∈ s) (y ∈ s), x * y ∈ s) :
    ∃ m ∈ s, m * m = m

(continuous_mul_left : ∀ (r : M), Continuous fun x => x + r)


theorem ker_pow_eq_ker_pow_finrank_of_le [FiniteDimensional K V] {f : End K V} {m : ℕ}
    (hm : finrank K V ≤ m) : LinearMap.ker (f ^ m) = LinearMap.ker (f ^ finrank K V)

(hm : FiniteDimensional.finrank K V ≤ m)

LinearMap.ker (f ^ m) = LinearMap.ker (f ^ FiniteDimensional.finrank K V)


/-- The product of `f` over `insert a s` is the same as
the product over `s`, as long as `a` is in `s` or `f a = 1`. -/
@[to_additive (attr := simp) "The sum of `f` over `insert a s` is the same as
the sum over `s`, as long as `a` is in `s` or `f a = 0`."]
theorem prod_insert_of_eq_one_if_not_mem [DecidableEq α] (h : a ∉ s → f a = 1) :
    ∏ x ∈ insert a s, f x = ∏ x ∈ s, f x

{α : Type u_3}
{β : Type u_4}
{s : Finset α}
{a : α}
{f : α → β}
[CommMonoid β]
[DecidableEq α]
(h : a ∉ s → f a = 1)


/-- The `n`th elementary symmetric `MvPolynomial σ R` is obtained by evaluating the
`n`th elementary symmetric at the `Multiset` of the monomials -/
theorem esymm_eq_multiset_esymm : esymm σ R = (univ.val.map X).esymm

(σ : Type u_1)
(R : Type u_2)
[CommSemiring R]
[Fintype σ]

MvPolynomial.esymm σ R = (Multiset.map MvPolynomial.X Finset.univ.val).esymm


@[to_additive]
theorem subset_mul_left (s : Finset α) {t : Finset α} (ht : (1 : α) ∈ t) : s ⊆ s * t

{α : Type u_2}
[DecidableEq α]
[MulOneClass α]
(s : Finset α)
{t : Finset α}
(ht : 1 ∈ t)


@[simp]
theorem smul_mem_pointwise_smul_iff {a : M} {S : Subring R} {x : R} : a • x ∈ a • S ↔ x ∈ S

{M : Type u_1}
{R : Type u_2}
[Group M]
[Ring R]
[MulSemiringAction M R]
{a : M}
{S : Subring R}
{x : R}


theorem mem_leadingCoeffNth (n : ℕ) (x) :
    x ∈ I.leadingCoeffNth n ↔ ∃ p ∈ I, degree p ≤ n ∧ p.leadingCoeff = x

{R : Type u}
[CommSemiring R]
(I : Ideal R[X])
(n : ℕ)
(x : R)

x ∈ I.leadingCoeffNth n ↔ ∃ p ∈ I, p.degree ≤ ↑n ∧ p.leadingCoeff = x


theorem Eventually.frequently {f : Filter α} [NeBot f] {p : α → Prop} (h : ∀ᶠ x in f, p x) :
    ∃ᶠ x in f, p x

{α : Type u}
{f : Filter α}
[f.NeBot]
{p : α → Prop}
(h : ∀ᶠ (x : α) in f, p x)


theorem nodup_add {s t : Multiset α} : Nodup (s + t) ↔ Nodup s ∧ Nodup t ∧ Disjoint s t

(s + t).Nodup ↔ s.Nodup ∧ t.Nodup ∧ s.Disjoint t


lemma formalMultilinearSeries_geometric_radius (𝕜) [NontriviallyNormedField 𝕜]
    (A : Type*) [NormedRing A] [NormOneClass A] [NormedAlgebra 𝕜 A] :
    (formalMultilinearSeries_geometric 𝕜 A).radius = 1

(𝕜 : Type u_10)
[NontriviallyNormedField 𝕜]
(A : Type u_9)
[NormedRing A]
[NormOneClass A]
[NormedAlgebra 𝕜 A]


theorem differentiableAt_sin {x : ℂ} : DifferentiableAt ℂ sin x


@[simp]
theorem decompose_neg (x : M) : decompose ℳ (-x) = -decompose ℳ x

{ι : Type u_1}
{M : Type u_3}
{σ : Type u_4}
[DecidableEq ι]
[AddCommGroup M]
[SetLike σ M]
[AddSubgroupClass σ M]
(ℳ : ι → σ)
[DirectSum.Decomposition ℳ]
(x : M)

(DirectSum.decompose ℳ) (-x) = -(DirectSum.decompose ℳ) x


@[to_additive]
theorem map.unique (g : FreeGroup α →* FreeGroup β)
    (hg : ∀ x, g (FreeGroup.of x) = FreeGroup.of (f x)) :
    ∀ {x}, g x = map f x

(hg : ∀ (x : α), g (FreeAddGroup.of x) = FreeAddGroup.of (f x))


/--
If `α` has a unique term, the type of finitely supported functions `α →₀ β` is equivalent to `β`.
-/
@[simps!]
noncomputable def _root_.Equiv.finsuppUnique {ι : Type*} [Unique ι] : (ι →₀ M) ≃ M

{M : Type u_5}
[Zero M]
{ι : Type u_13}
[Unique ι]

∀ (a : ι →₀ M), Equiv.finsuppUnique a = a default


/-- The functor `(Square C)ᵒᵖ ⥤ Square Cᵒᵖ`. -/
@[simps]
def opFunctor : (Square C)ᵒᵖ ⥤ Square Cᵒᵖ

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

∀ {X Y : (CategoryTheory.Square C)ᵒᵖ} (φ : X ⟶ Y), (CategoryTheory.Square.opFunctor.map φ).τ₂ = φ.unop.τ₂.op


lemma BddBelow.range_comp {γ : Type*} [Preorder β] [Preorder γ] {f : α → β} {g : β → γ}
    (hf : BddBelow (range f)) (hg : Monotone g) : BddBelow (range (fun x => g (f x)))

{α : Type u}
{β : Type v}
{γ : Type u_1}
[Preorder β]
[Preorder γ]
{f : α → β}
{g : β → γ}
(hf : BddBelow (Set.range f))
(hg : Monotone g)


/-- A submonoid `H` of `G` determines a submonoid `H.op` of the opposite group `Gᵐᵒᵖ`. -/
@[to_additive (attr := simps) "A additive submonoid `H` of `G` determines an additive submonoid
`H.op` of the opposite group `Gᵐᵒᵖ`."]
def opEquiv : Submonoid M ≃o Submonoid Mᵐᵒᵖ

{M : Type u_2}
[AddZeroClass M]
(x : AddSubmonoid M)


@[to_additive (attr := simp)]
theorem measure_preimage_smul (c : G) (s : Set α) : μ ((c • ·) ⁻¹' s) = μ s

[MeasureTheory.VAddInvariantMeasure G α μ]


@[simp]
theorem toDualBotEquiv_coe [LE α] (a : α) :
    WithTop.toDualBotEquiv ↑(toDual a) = toDual (a : WithBot α)

WithTop.toDualBotEquiv ↑(OrderDual.toDual a) = OrderDual.toDual ↑a


@[to_additive]
theorem continuousMul_sInf {ts : Set (TopologicalSpace M)}
    (h : ∀ t ∈ ts, @ContinuousMul M t _) : @ContinuousMul M (sInf ts) _

{M : Type u_3}
[Add M]
{ts : Set (TopologicalSpace M)}
(h : ∀ t ∈ ts, ContinuousAdd M)


theorem mulVec_injective_of_invertible (A : Matrix m m K) [Invertible A] :
    Function.Injective A.mulVec

{m : Type u}
[DecidableEq m]
{K : Type u_3}
[Field K]
[Fintype m]
(A : Matrix m m K)
[Invertible A]


protected theorem diff {s' t'} (h : e.IsImage s t) (h' : e.IsImage s' t') :
    e.IsImage (s \ s') (t \ t')

{α : Type u_1}
{β : Type u_2}
{e : PartialEquiv α β}
{s : Set α}
{t : Set β}
{s' : Set α}
{t' : Set β}
(h : e.IsImage s t)
(h' : e.IsImage s' t')


theorem fract_div_natCast_eq_div_natCast_mod {m n : ℕ} : fract ((m : k) / n) = ↑(m % n) / n

{k : Type u_4}
[LinearOrderedField k]
[FloorRing k]
{m n : ℕ}


@[simp] lemma ofEpiOfIsIsoOfMono_g' : (ofEpiOfIsIsoOfMono φ h).g' = h.g' ≫ φ.τ₃

(CategoryTheory.ShortComplex.RightHomologyData.ofEpiOfIsIsoOfMono φ h).g' = CategoryTheory.CategoryStruct.comp h.g' φ.τ₃


theorem of_union {A B : Set α} (h : Disjoint A B) (hA : MeasurableSet A) (hB : MeasurableSet B) :
    v (A ∪ B) = v A + v B

{α : Type u_1}
{m : MeasurableSpace α}
{M : Type u_3}
[AddCommMonoid M]
[TopologicalSpace M]
[T2Space M]
{v : MeasureTheory.VectorMeasure α M}
{A B : Set α}
(h : Disjoint A B)
(hA : MeasurableSet A)
(hB : MeasurableSet B)


@[simp]
theorem snd_comp_prod : (snd S T).comp (f.prod g) = g

{R : Type u_3}
{S : Type u_5}
{T : Type u_7}
[NonUnitalNonAssocSemiring R]
[NonUnitalNonAssocSemiring S]
[NonUnitalNonAssocSemiring T]
(f : R →ₙ+* S)
(g : R →ₙ+* T)

(NonUnitalRingHom.snd S T).comp (f.prod g) = g


@[to_additive]
theorem image_of_equiv {ν : Measure β} (h : IsFundamentalDomain G s μ) (f : α ≃ β)
    (hf : QuasiMeasurePreserving f.symm ν μ) (e : H ≃ G)
    (hef : ∀ g, Semiconj f (e g • ·) (g • ·)) : IsFundamentalDomain H (f '' s) ν

(h : MeasureTheory.IsFundamentalDomain G s μ)

(hf : MeasureTheory.Measure.QuasiMeasurePreserving (⇑f.symm) ν μ)

(hef : ∀ (g : H), Function.Semiconj (⇑f) (fun x => e g • x) fun x => g • x)

MeasureTheory.IsFundamentalDomain H (⇑f '' s) ν


theorem LinearOrderedRing.orderOf_le_two : orderOf x ≤ 2

{G : Type u_1}
[LinearOrderedRing G]
{x : G}


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

(F : CategoryTheory.LaxMonoidalFunctor B C)

(G : CategoryTheory.LaxMonoidalFunctor D E)


/-- If `f` and `g` are two exact solutions of the same ODE, then the distance between them
can't grow faster than exponentially. This is a simple corollary of Grönwall's inequality, and some
people call this Grönwall's inequality too.

This version assumes all inequalities to be true in the whole space. -/
theorem dist_le_of_trajectories_ODE
    (hv : ∀ t, LipschitzWith K (v t))
    (hf : ContinuousOn f (Icc a b))
    (hf' : ∀ t ∈ Ico a b, HasDerivWithinAt f (v t (f t)) (Ici t) t)
    (hg : ContinuousOn g (Icc a b))
    (hg' : ∀ t ∈ Ico a b, HasDerivWithinAt g (v t (g t)) (Ici t) t)
    (ha : dist (f a) (g a) ≤ δ) :
    ∀ t ∈ Icc a b, dist (f t) (g t) ≤ δ * exp (K * (t - a))

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

(hg' : ∀ t ∈ Set.Ico a b, HasDerivWithinAt g (v t (g t)) (Set.Ici t) t)

t ∈ Set.Icc a b → dist (f t) (g t) ≤ δ * rexp (↑K * (t - a))


/-- **Equational criterion for flatness**
[Stacks 00HK](https://stacks.math.columbia.edu/tag/00HK), alternate form.

A module $M$ is flat if and only if for all finite free modules $R^\iota$,
all $f \in R^{\iota}$, and all homomorphisms $x \colon R^{\iota} \to M$ such that $x(f) = 0$, there
exist a finite free module $R^\kappa$ and homomorphisms $a \colon R^{\iota} \to R^{\kappa}$ and
$y \colon R^{\kappa} \to M$ such that $x = y \circ a$ and $a(f) = 0$. -/
theorem iff_forall_exists_factorization : Flat R M ↔
    ∀ {ι : Type u} [Fintype ι] {f : ι →₀ R} {x : (ι →₀ R) →ₗ[R] M}, x f = 0 →
      ∃ (κ : Type u) (_ : Fintype κ) (a : (ι →₀ R) →ₗ[R] (κ →₀ R)) (y : (κ →₀ R) →ₗ[R] M),
        x = y ∘ₗ a ∧ a f = 0

{R M : Type u}
[CommRing R]
[AddCommGroup M]
[Module R M]

Module.Flat R M ↔
  ∀ {ι : Type u} [inst : Fintype ι] {f : ι →₀ R} {x : (ι →₀ R) →ₗ[R] M}, x f = 0 → ∃ κ x_1 a y, x = y ∘ₗ a ∧ a f = 0


theorem expSeries_hasSum_exp_of_mem_ball' (x : 𝔸)
    (hx : x ∈ EMetric.ball (0 : 𝔸) (expSeries 𝕂 𝔸).radius) :
    HasSum (fun n => (n !⁻¹ : 𝕂) • x ^ n) (exp 𝕂 x)

(hx : x ∈ EMetric.ball 0 (NormedSpace.expSeries 𝕂 𝔸).radius)

HasSum (fun n => (↑n.factorial)⁻¹ • x ^ n) (NormedSpace.exp 𝕂 x)


theorem map_neg (f : E →ₗ.[R] F) (x : f.domain) : f (-x) = -f x

{R : Type u_1}
[Ring R]
{E : Type u_2}
[AddCommGroup E]
[Module R E]
{F : Type u_3}
[AddCommGroup F]
[Module R F]
(f : E →ₗ.[R] F)
(x : ↥f.domain)


@[to_additive (attr := simp)]
theorem coe_singletonMonoidHom : (singletonMonoidHom : α → Set α) = singleton


@[simp]
theorem integral_const (c : E) : integral I l (fun _ => c) vol = vol I c

{ι : Type u}
{E : Type v}
{F : Type w}
[NormedAddCommGroup E]
[NormedSpace ℝ E]
[NormedAddCommGroup F]
[NormedSpace ℝ F]
{I : BoxIntegral.Box ι}
[Fintype ι]
{l : BoxIntegral.IntegrationParams}
{vol : ι →ᵇᵃ[⊤] E →L[ℝ] F}
(c : E)

BoxIntegral.integral I l (fun x => c) vol = (vol I) c


theorem nonempty_of_mem {x u : ZFSet} (h : x ∈ u) : u.Nonempty


lemma tendsto_rpow_atTop_of_base_gt_one (b : ℝ) (hb : 1 < b) :
    Tendsto (b ^ · : ℝ → ℝ) atBot (𝓝 (0 : ℝ))

Filter.Tendsto (fun x => b ^ x) Filter.atBot (𝓝 0)


@[to_additive]
theorem div_mem_div : a ∈ s → b ∈ t → a / b ∈ s / t

{α : Type u_2}
[Sub α]
{s t : Set α}
{a b : α}


lemma C_addPolynomial_slope {x₁ x₂ y₁ y₂ : F} (h₁ : W.Equation x₁ y₁) (h₂ : W.Equation x₂ y₂)
    (hxy : x₁ = x₂ → y₁ ≠ W.negY x₂ y₂) : mk W (C <| W.addPolynomial x₁ y₁ <| W.slope x₁ x₂ y₁ y₂) =
      -(XClass W x₁ * XClass W x₂ * XClass W (W.addX x₁ x₂ <| W.slope x₁ x₂ y₁ y₂))

{F : Type u}
[Field F]
{W : WeierstrassCurve.Affine F}
{x₁ x₂ y₁ y₂ : F}
(h₁ : W.Equation x₁ y₁)
(h₂ : W.Equation x₂ y₂)
(hxy : x₁ = x₂ → y₁ ≠ W.negY x₂ y₂)

(WeierstrassCurve.Affine.CoordinateRing.mk W) (Polynomial.C (W.addPolynomial x₁ y₁ (W.slope x₁ x₂ y₁ y₂))) =
  -(WeierstrassCurve.Affine.CoordinateRing.XClass W x₁ * WeierstrassCurve.Affine.CoordinateRing.XClass W x₂ *
      WeierstrassCurve.Affine.CoordinateRing.XClass W (W.addX x₁ x₂ (W.slope x₁ x₂ y₁ y₂)))


@[simp]
theorem comp_f {S₁ S₂ S₃ : Split C} (Φ₁₂ : S₁ ⟶ S₂) (Φ₂₃ : S₂ ⟶ S₃) (n : ℕ) :
    (Φ₁₂ ≫ Φ₂₃).f n = Φ₁₂.f n ≫ Φ₂₃.f n

{C : Type u_1}
[CategoryTheory.Category.{u_2, u_1} C]
{S₁ S₂ S₃ : SimplicialObject.Split C}
(Φ₁₂ : S₁ ⟶ S₂)
(Φ₂₃ : S₂ ⟶ S₃)
(n : ℕ)

(Φ₁₂ ≫ Φ₂₃).f n = Φ₁₂.f n ≫ Φ₂₃.f n


theorem derivWithin_add_const (hxs : UniqueDiffWithinAt 𝕜 s x) (c : F) :
    derivWithin (fun y => f y + c) s x = derivWithin f s x

{𝕜 : Type u}
[NontriviallyNormedField 𝕜]
{F : Type v}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{f : 𝕜 → F}
{x : 𝕜}
{s : Set 𝕜}
(hxs : UniqueDiffWithinAt 𝕜 s x)
(c : F)


/-- Typeclass for separable field extension: `K` is a separable field extension of `F` iff
the minimal polynomial of every `x : K` is separable. This implies that `K/F` is an algebraic
extension, because the minimal polynomial of a non-integral element is `0`, which is not
separable.

We define this for general (commutative) rings and only assume `F` and `K` are fields if this
is needed for a proof.
-/
@[mk_iff isSeparable_def] protected class Algebra.IsSeparable : Prop where
  isSeparable' : ∀ x : K, IsSeparable F x

(F : Type u_1)
(K : Type u_2)
[CommRing F]
[Ring K]
[Algebra F K]

Algebra.IsSeparable F K ↔ ∀ (x : K), IsSeparable F x


@[to_additive]
theorem exists_zpow_eq_one (x : G) : ∃ (i : ℤ) (_ : i ≠ 0), x ^ (i : ℤ) = 1

{G : Type u_1}
[Group G]
[Finite G]
(x : G)


/-- special case of `mul_dvd_mul_iff_left` for `ℕ`.
Duplicated here to keep simple imports for this file. -/
protected lemma mul_dvd_mul_iff_left (ha : 0 < a) : a * b ∣ a * c ↔ b ∣ c


@[simp]
theorem cotangentEquivIdeal_apply (x : I.Cotangent) :
    ↑(I.cotangentEquivIdeal x) = I.cotangentToQuotientSquare x

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


theorem ae_tendsto_of_cauchy_eLpNorm' [CompleteSpace E] {f : ℕ → α → E} {p : ℝ}
    (hf : ∀ n, AEStronglyMeasurable (f n) μ) (hp1 : 1 ≤ p) {B : ℕ → ℝ≥0∞} (hB : ∑' i, B i ≠ ∞)
    (h_cau : ∀ N n m : ℕ, N ≤ n → N ≤ m → eLpNorm' (f n - f m) p μ < B N) :
    ∀ᵐ x ∂μ, ∃ l : E, atTop.Tendsto (fun n => f n x) (𝓝 l)

(hf : ∀ (n : ℕ), MeasureTheory.AEStronglyMeasurable (f n) μ)

{B : ℕ → ℝ≥0∞}

(h_cau : ∀ (N n m : ℕ), N ≤ n → N ≤ m → MeasureTheory.eLpNorm' (f n - f m) p μ < B N)

∀ᵐ (x : α) ∂μ, ∃ l, Filter.Tendsto (fun n => f n x) Filter.atTop (𝓝 l)


@[fun_prop]
protected theorem HasStrictFDerivAt.snd (h : HasStrictFDerivAt f₂ f₂' x) :
    HasStrictFDerivAt (fun x => (f₂ x).2) ((snd 𝕜 F G).comp f₂') x

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

HasStrictFDerivAt (fun x => (f₂ x).2) ((ContinuousLinearMap.snd 𝕜 F G).comp f₂') x


theorem nmul_nadd_lt₃' {a' b' c' : Ordinal} (ha : a' < a) (hb : b' < b) (hc : c' < c) :
    a' ⨳ (b ⨳ c) ♯ a ⨳ (b' ⨳ c) ♯ a ⨳ (b ⨳ c') ♯ a' ⨳ (b' ⨳ c') <
      a ⨳ (b ⨳ c) ♯ a' ⨳ (b' ⨳ c) ♯ a' ⨳ (b ⨳ c') ♯ a ⨳ (b' ⨳ c')

{a b c a' b' c' : Ordinal.{u}}
(ha : a' < a)
(hb : b' < b)
(hc : c' < c)


theorem mk_perm_eq_self_power : #(Equiv.Perm α) = #α ^ #α


@[simp]
theorem toReal_top : toReal ⊤ = 0


theorem exists_eq_neg_ofNat {a : Int} (H : a ≤ 0) : ∃ n : Nat, a = -(n : Int)


theorem gcd_eq_nat_gcd (m n : ℕ) : gcd m n = Nat.gcd m n


@[to_additive]
theorem min_le_mul_of_one_le_right [CovariantClass α α (· * ·) (· ≤ ·)] {a b : α} (hb : 1 ≤ b) :
    min a b ≤ a * b

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


@[simp]
theorem mk_func (α A) : Func ⟨α, A⟩ = A


@[to_additive (attr := simp)]
theorem mulEquivOfMulEquiv_eq_map_apply {k : LocalizationMap T Q} {j : M ≃* P}
    (H : S.map j.toMonoidHom = T) (x) :
    f.mulEquivOfMulEquiv k H x =
      f.map (fun y : S ↦ show j.toMonoidHom y ∈ T from H ▸ Set.mem_image_of_mem j y.2) k x

{M : Type u_1}
[CommMonoid M]
{S : Submonoid M}
{N : Type u_2}
[CommMonoid N]
{P : Type u_3}
[CommMonoid P]
(f : S.LocalizationMap N)
{T : Submonoid P}
{Q : Type u_4}
[CommMonoid Q]
{k : T.LocalizationMap Q}
{j : M ≃* P}
(H : Submonoid.map j.toMonoidHom S = T)
(x : N)

(f.mulEquivOfMulEquiv k H) x = (f.map ⋯ k) x


theorem nsmul_right_injective (n : ℕ) (h : n ≠ 0) :
    Injective (n • · : R → R)

{R : Type u_1}
[AddCommMonoid R]
[Pow R ℕ]
[BinomialRing R]
(n : ℕ)
(h : n ≠ 0)


/-- The topology of a locally convex space is induced by the gauge seminorm family. -/
theorem with_gaugeSeminormFamily : WithSeminorms (gaugeSeminormFamily 𝕜 E)

{𝕜 : Type u_1}
{E : Type u_2}
[RCLike 𝕜]
[AddCommGroup E]
[TopologicalSpace E]
[Module 𝕜 E]
[Module ℝ E]
[IsScalarTower ℝ 𝕜 E]
[ContinuousSMul ℝ E]
[TopologicalAddGroup E]
[ContinuousSMul 𝕜 E]
[SMulCommClass ℝ 𝕜 E]
[LocallyConvexSpace ℝ E]


theorem isLittleO_comm : (fun x => f₁ x - f₂ x) =o[l] g ↔ (fun x => f₂ x - f₁ x) =o[l] g

{α : Type u_1}
{F : Type u_4}
{E' : Type u_6}
[Norm F]
[SeminormedAddCommGroup E']
{g : α → F}
{l : Filter α}
{f₁ f₂ : α → E'}


@[simp]
theorem mem_toFlag (b : Basis (Fin n) K V) {p : Submodule K V} : p ∈ b.toFlag ↔ ∃ k, b.flag k = p

{K : Type u_1}
{V : Type u_2}
[DivisionRing K]
[AddCommGroup V]
[Module K V]
{n : ℕ}
(b : Basis (Fin n) K V)
{p : Submodule K V}


@[to_additive]
theorem unop_closure (s : Set Mᵐᵒᵖ) : (closure s).unop = closure (MulOpposite.op ⁻¹' s)

{M : Type u_2}
[AddZeroClass M]
(s : Set Mᵃᵒᵖ)

(AddSubmonoid.closure s).unop = AddSubmonoid.closure (AddOpposite.op ⁻¹' s)


/-- A subpresheaf with a submonoid structure on each of the components. -/
structure SubmonoidPresheaf [∀ X : C, MulOneClass X] [∀ X Y : C, MonoidHomClass (X ⟶ Y) X Y]
    (F : X.Presheaf C) where
  obj : ∀ U, Submonoid (F.obj U)
  map : ∀ {U V : (Opens X)ᵒᵖ} (i : U ⟶ V), obj U ≤ (obj V).comap (F.map i)

[(X : C) → MulOneClass ((CategoryTheory.forget C).obj X)]

[∀ (X Y : C), MonoidHomClass (X ⟶ Y) ((CategoryTheory.forget C).obj X) ((CategoryTheory.forget C).obj Y)]

self.obj U ≤ Submonoid.comap (F.map i) (self.obj V)


protected theorem sub_mem {x y : L} : x ∈ L' → y ∈ L' → (x - y : L) ∈ L'

{R : Type u}
{L : Type v}
[CommRing R]
[LieRing L]
[LieAlgebra R L]
(L' : LieSubalgebra R L)
{x y : L}


lemma girth_eq_zero : G.girth = 0 ↔ G.IsAcyclic


/-- Each function of a family equicontinuous at `x₀` within `S` is continuous at `x₀` within `S`. -/
theorem EquicontinuousWithinAt.continuousWithinAt {F : ι → X → α} {S : Set X} {x₀ : X}
    (h : EquicontinuousWithinAt F S x₀) (i : ι) :
    ContinuousWithinAt (F i) S x₀

{ι : Type u_1}
{X : Type u_3}
{α : Type u_7}
[tX : TopologicalSpace X]
[uα : UniformSpace α]
{F : ι → X → α}
{S : Set X}
{x₀ : X}
(h : EquicontinuousWithinAt F S x₀)
(i : ι)


/-- An antitone map sends a greatest element of a set to a least element of its image. -/
theorem map_isGreatest : IsGreatest s a → IsLeast (f '' s) (f a)

{α : Type u}
{β : Type v}
[Preorder α]
[Preorder β]
{f : α → β}
(hf : Antitone f)
{a : α}
{s : Set α}


lemma MorphismProperty.map_eq_iff_postcomp {X Y : C} (f₁ f₂ : X ⟶ Y) :
    L.map f₁ = L.map f₂ ↔ ∃ (Z : C) (s : Y ⟶ Z) (_ : W s), f₁ ≫ s = f₂ ≫ s

{C : Type u_1}
{D : Type u_2}
[CategoryTheory.Category.{u_3, u_1} C]
[CategoryTheory.Category.{u_4, u_2} D]
(L : CategoryTheory.Functor C D)
(W : CategoryTheory.MorphismProperty C)
[L.IsLocalization W]
[W.HasLeftCalculusOfFractions]
{X Y : C}
(f₁ f₂ : X ⟶ Y)

L.map f₁ = L.map f₂ ↔
  ∃ Z s, ∃ (_ : W s), CategoryTheory.CategoryStruct.comp f₁ s = CategoryTheory.CategoryStruct.comp f₂ s


/-- Let `f : γ → α`, `𝔖 : Set (Set α)`, `𝔗 : Set (Set γ)`, and assume that `∀ T ∈ 𝔗, f '' T ∈ 𝔖`.
Then, the function `(fun g ↦ g ∘ f) : (α →ᵤ[𝔖] β) → (γ →ᵤ[𝔗] β)` is uniformly continuous.

Note that one can easily see that assuming `∀ T ∈ 𝔗, ∃ S ∈ 𝔖, f '' T ⊆ S` would work too, but
we will get this for free when we prove that `𝒱(α, β, 𝔖, uβ) = 𝒱(α, β, 𝔖', uβ)` where `𝔖'` is the
***noncovering*** bornology generated by `𝔖`. -/
protected theorem precomp_uniformContinuous {𝔗 : Set (Set γ)} {f : γ → α}
    (hf : MapsTo (f '' ·) 𝔗 𝔖) :
    UniformContinuous fun g : α →ᵤ[𝔖] β => ofFun 𝔗 (toFun 𝔖 g ∘ f)

{α : Type u_1}
{β : Type u_2}
{γ : Type u_3}
[UniformSpace β]
{𝔖 : Set (Set α)}
{𝔗 : Set (Set γ)}
{f : γ → α}
(hf : Set.MapsTo (fun x => f '' x) 𝔗 𝔖)

UniformContinuous fun g => (UniformOnFun.ofFun 𝔗) ((UniformOnFun.toFun 𝔖) g ∘ f)


theorem ofInt'_neg : ∀ n : ℤ, ofInt' (-n) = -ofInt' n


/-- Convolution of the dirac measure at 1 with a measure μ returns μ. -/
@[to_additive (attr := simp)]
theorem dirac_one_mconv [MeasurableMul₂ M] (μ : Measure M) [SFinite μ] :
    (Measure.dirac 1) ∗ μ = μ

{M : Type u_1}
[Monoid M]
[MeasurableSpace M]
[MeasurableMul₂ M]
(μ : MeasureTheory.Measure M)
[MeasureTheory.SFinite μ]

(MeasureTheory.Measure.dirac 1).mconv μ = μ


@[simp] theorem neg_eq (x : BitVec w)                     : BitVec.neg x = -x


@[simp] lemma coe_toLatticeHom (f : FrameHom α β) : ⇑f.toLatticeHom = f

{α : Type u_2}
{β : Type u_3}
[CompleteLattice α]
[CompleteLattice β]
(f : FrameHom α β)


theorem nodal_erase_eq_nodal_div (hi : i ∈ s) :
    nodal (s.erase i) v = nodal s v / (X - C (v i))

{F : Type u_1}
[Field F]
{ι : Type u_2}
[DecidableEq ι]
{s : Finset ι}
{v : ι → F}
{i : ι}
(hi : i ∈ s)

Lagrange.nodal (s.erase i) v = Lagrange.nodal s v / (Polynomial.X - Polynomial.C (v i))


@[ext]
theorem ext {S T : Subalgebra R A} (h : ∀ x : A, x ∈ S ↔ x ∈ T) : S = T

{R : Type u}
{A : Type v}
[CommSemiring R]
[Semiring A]
[Algebra R A]
{S T : Subalgebra R A}
(h : ∀ (x : A), x ∈ S ↔ x ∈ T)


/-- `s` is a submonoid: a set containing 1 and closed under multiplication.
Note that this structure is deprecated, and the bundled variant `Submonoid M` should be
preferred. -/
@[to_additive]
structure IsSubmonoid (s : Set M) : Prop where
  /-- The proposition that s contains 1. -/
  one_mem : (1 : M) ∈ s
  /-- The proposition that s is closed under multiplication. -/
  mul_mem {a b} : a ∈ s → b ∈ s → a * b ∈ s

{M : Type u_1}
[Monoid M]
{s : Set M}
(self : IsSubmonoid s)
{a b : M}


theorem rank_eq_of_surjective {f : M →ₗ[R] M₁} (h : Surjective f) :
    Module.rank R M = Module.rank R M₁ + Module.rank R (LinearMap.ker f)

{R : Type u_1}
{M M₁ : Type u}
[Ring R]
[AddCommGroup M]
[AddCommGroup M₁]
[Module R M]
[Module R M₁]
[HasRankNullity.{u, u_1} R]
{f : M →ₗ[R] M₁}
(h : Function.Surjective ⇑f)

Module.rank R M = Module.rank R M₁ + Module.rank R ↥(LinearMap.ker f)


theorem exists_mem (s : Sym α n.succ) : ∃ a, a ∈ s

{α : Type u_1}
{n : ℕ}
(s : Sym α n.succ)


theorem le_floor_add_floor (a b : α) : ⌊a + b⌋ - 1 ≤ ⌊a⌋ + ⌊b⌋

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


theorem map_injective {f : F} (hf : Function.Injective f) :
    Function.Injective (map f : NonUnitalSubalgebra R A → NonUnitalSubalgebra R B)

{F : Type v'}
{R : Type u}
{A : Type v}
{B : Type w}
[CommSemiring R]
[NonUnitalNonAssocSemiring A]
[NonUnitalNonAssocSemiring B]
[Module R A]
[Module R B]
[FunLike F A B]
[NonUnitalAlgHomClass F R A B]
{f : F}
(hf : Function.Injective ⇑f)


run_cmd
  for typeName' in [`UInt8, `UInt16, `UInt32, `UInt64, `USize] do
  let typeName := Lean.mkIdent typeName'
  Lean.Elab.Command.elabCommand (← `(
    namespace $typeName
      instance neZero : NeZero size := ⟨by decide⟩

      instance : Neg $typeName where
        neg a := mk (-a.val)

      instance : Pow $typeName ℕ where
        pow a n := mk (a.val ^ n)

      instance : SMul ℕ $typeName where
        smul n a := mk (n • a.val)

      instance : SMul ℤ $typeName where
        smul z a := mk (z • a.val)

      lemma neg_def (a : $typeName) : -a = ⟨-a.val⟩ := rfl

      lemma pow_def (a : $typeName) (n : ℕ) : a ^ n = ⟨a.val ^ n⟩ := rfl

      lemma nsmul_def (n : ℕ) (a : $typeName) : n • a = ⟨n • a.val⟩ := rfl

      lemma zsmul_def (z : ℤ) (a : $typeName) : z • a = ⟨z • a.val⟩ := rfl

      open $typeName (eq_of_val_eq) in
      lemma val_injective : Function.Injective val := @eq_of_val_eq

      instance instCommMonoid : CommMonoid $typeName :=
        Function.Injective.commMonoid val val_injective
          rfl (fun _ _ => rfl) (fun _ _ => rfl)

      instance instNonUnitalCommRing : NonUnitalCommRing $typeName :=
        Function.Injective.nonUnitalCommRing val val_injective
          rfl (fun _ _ => rfl) (fun _ _ => rfl) (fun _ => rfl) (fun _ _ => rfl)
          (fun _ _ => rfl) (fun _ _ => rfl)

      local instance instNatCast : NatCast $typeName where
        natCast n := mk n

      local instance instIntCast : IntCast $typeName where
        intCast z := mk z

      lemma natCast_def (n : ℕ) : (n : $typeName) = ⟨n⟩ := rfl

      lemma intCast_def (z : ℤ) : (z : $typeName) = ⟨z⟩ := rfl

      local instance instCommRing : CommRing $typeName :=
        Function.Injective.commRing val val_injective
          rfl rfl (fun _ _ => rfl) (fun _ _ => rfl) (fun _ => rfl) (fun _ _ => rfl)
          (fun _ _ => rfl) (fun _ _ => rfl) (fun _ _ => rfl) (fun _ => rfl) (fun _ => rfl)

      namespace CommRing
      attribute [scoped instance] instCommRing instNatCast instIntCast
      end CommRing

    end $typeName
  ))
  -- interpolating docstrings above is more trouble than it's worth
  let docString :=
    s!"To use this instance, use `open scoped {typeName'}.CommRing`.\n\n" ++
    "See the module docstring for an explanation"
  Lean.addDocString (typeName'.mkStr "instCommRing") docString
  Lean.addDocString (typeName'.mkStr "instNatCast") docString
  Lean.addDocString (typeName'.mkStr "instIntCast") docString


nonrec theorem exists_mem_Ico_zpow {x : ℝ≥0} {y : ℝ≥0} (hx : x ≠ 0) (hy : 1 < y) :
    ∃ n : ℤ, x ∈ Set.Ico (y ^ n) (y ^ (n + 1))


@[to_additive]
theorem mem_smul_set : x ∈ a • t ↔ ∃ y, y ∈ t ∧ a • y = x

{α : Type u_2}
{β : Type u_3}
[SMul α β]
{t : Set β}
{a : α}
{x : β}


theorem ne_one_iff_exists_prime_dvd : ∀ {n}, n ≠ 1 ↔ ∃ p : ℕ, p.Prime ∧ p ∣ n


theorem toNat_sub (m n : Nat) : toNat (m - n) = m - n


theorem natDegree_cubic_le : natDegree (C a * X ^ 3 + C b * X ^ 2 + C c * X + C d) ≤ 3

(Polynomial.C a * Polynomial.X ^ 3 + Polynomial.C b * Polynomial.X ^ 2 + Polynomial.C c * Polynomial.X +
      Polynomial.C d).natDegree ≤
  3


@[to_additive (attr := simp)]
theorem map.of {x} : map f (of x) = of (f x)

{α : Type u}
{β : Type v}
{f : α → β}
{x : α}

(FreeAddGroup.map f) (FreeAddGroup.of x) = FreeAddGroup.of (f x)


theorem closedBall_mem_nhds (x : α) {ε : ℝ} (ε0 : 0 < ε) : closedBall x ε ∈ 𝓝 x

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


@[to_additive]
theorem prod_range_add_div_prod_range {α : Type*} [CommGroup α] (f : ℕ → α) (n m : ℕ) :
    (∏ k ∈ range (n + m), f k) / ∏ k ∈ range n, f k = ∏ k ∈ Finset.range m, f (n + k)

{α : Type u_6}
[AddCommGroup α]
(f : ℕ → α)
(n m : ℕ)

∑ k ∈ Finset.range (n + m), f k - ∑ k ∈ Finset.range n, f k = ∑ k ∈ Finset.range m, f (n + k)


theorem existsOfSubtype {α : Type u} {p : α → Prop} : { x // p x } → Exists (fun x => p x)

(Subtype fun x => p x) → Exists fun x => p x


@[simp]
lemma _root_.absorbs_inter : Absorbs G₀ (s ∩ t) u ↔ Absorbs G₀ s u ∧ Absorbs G₀ t u

{G₀ : Type u_1}
{α : Type u_2}
[GroupWithZero G₀]
[Bornology G₀]
[MulAction G₀ α]
{s t u : Set α}


theorem tendsto_lift' {m : γ → β} {l : Filter γ} :
    Tendsto m l (f.lift' h) ↔ ∀ s ∈ f, ∀ᶠ a in l, m a ∈ h s

{α : Type u_1}
{β : Type u_2}
{γ : Type u_3}
{f : Filter α}
{h : Set α → Set β}
{m : γ → β}
{l : Filter γ}

Filter.Tendsto m l (f.lift' h) ↔ ∀ s ∈ f, ∀ᶠ (a : γ) in l, m a ∈ h s


theorem one_lt_iff_nontrivial {α : Type u} : 1 < #α ↔ Nontrivial α


/-- The definition of `x ⧏ 0` on pre-games, in terms of `⧏ 0` two moves later. -/
theorem lf_zero {x : PGame} : x ⧏ 0 ↔ ∃ j, ∀ i, (x.moveRight j).moveLeft i ⧏ 0

x.LF 0 ↔ ∃ j, ∀ (i : (x.moveRight j).LeftMoves), ((x.moveRight j).moveLeft i).LF 0


theorem Smooth.mdifferentiableWithinAt (hf : Smooth I I' f) : MDifferentiableWithinAt I I' f s 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 : M → M'}
{x : M}
{s : Set M}
(hf : Smooth I I' f)


/-- The mean value theorem on a convex set in dimension 1: if the derivative of a function is
bounded by `C` on `s`, then the function is `C`-Lipschitz on `s`.
Version with `derivWithin` and `LipschitzOnWith`. -/
theorem lipschitzOnWith_of_nnnorm_derivWithin_le {C : ℝ≥0} (hs : Convex ℝ s)
    (hf : DifferentiableOn 𝕜 f s) (bound : ∀ x ∈ s, ‖derivWithin f s x‖₊ ≤ C) :
    LipschitzOnWith C f s


/-- `Multicofork.toSigmaCofork` as a functor. -/
@[simps]
noncomputable def toSigmaCoforkFunctor : Multicofork I ⥤ Cofork I.fstSigmaMap I.sndSigmaMap

(I : CategoryTheory.Limits.MultispanIndex C)

(K : CategoryTheory.Limits.Multicofork I)

I.toSigmaCoforkFunctor.obj K = K.toSigmaCofork


@[simp] lemma inv_mul_ne_top (a : ℝ≥0∞) : a⁻¹ * a ≠ ⊤


theorem contDiff_rpow_const_of_le {p : ℝ} {n : ℕ} (h : ↑n ≤ p) :
    ContDiff ℝ n fun x : ℝ => x ^ p


@[simp]
theorem diag_isDiag (a : α) : IsDiag (diag a)


theorem comp_sub {X Y Z : C} (f : X ⟶ Y) (g h : Y ⟶ Z) : f ≫ (g - h) = f ≫ g - f ≫ h


@[simp]
theorem grundyValue_star : grundyValue star = 1


theorem getMsb_rev (x : BitVec w) (i : Fin w) :
    x.getMsb i.rev = x.getLsb i


run_cmd
  for typeName' in [`UInt8, `UInt16, `UInt32, `UInt64, `USize] do
  let typeName := Lean.mkIdent typeName'
  Lean.Elab.Command.elabCommand (← `(
    namespace $typeName
      instance neZero : NeZero size := ⟨by decide⟩

      instance : Neg $typeName where
        neg a := mk (-a.val)

      instance : Pow $typeName ℕ where
        pow a n := mk (a.val ^ n)

      instance : SMul ℕ $typeName where
        smul n a := mk (n • a.val)

      instance : SMul ℤ $typeName where
        smul z a := mk (z • a.val)

      lemma neg_def (a : $typeName) : -a = ⟨-a.val⟩ := rfl

      lemma pow_def (a : $typeName) (n : ℕ) : a ^ n = ⟨a.val ^ n⟩ := rfl

      lemma nsmul_def (n : ℕ) (a : $typeName) : n • a = ⟨n • a.val⟩ := rfl

      lemma zsmul_def (z : ℤ) (a : $typeName) : z • a = ⟨z • a.val⟩ := rfl

      open $typeName (eq_of_val_eq) in
      lemma val_injective : Function.Injective val := @eq_of_val_eq

      instance instCommMonoid : CommMonoid $typeName :=
        Function.Injective.commMonoid val val_injective
          rfl (fun _ _ => rfl) (fun _ _ => rfl)

      instance instNonUnitalCommRing : NonUnitalCommRing $typeName :=
        Function.Injective.nonUnitalCommRing val val_injective
          rfl (fun _ _ => rfl) (fun _ _ => rfl) (fun _ => rfl) (fun _ _ => rfl)
          (fun _ _ => rfl) (fun _ _ => rfl)

      local instance instNatCast : NatCast $typeName where
        natCast n := mk n

      local instance instIntCast : IntCast $typeName where
        intCast z := mk z

      lemma natCast_def (n : ℕ) : (n : $typeName) = ⟨n⟩ := rfl

      lemma intCast_def (z : ℤ) : (z : $typeName) = ⟨z⟩ := rfl

      local instance instCommRing : CommRing $typeName :=
        Function.Injective.commRing val val_injective
          rfl rfl (fun _ _ => rfl) (fun _ _ => rfl) (fun _ => rfl) (fun _ _ => rfl)
          (fun _ _ => rfl) (fun _ _ => rfl) (fun _ _ => rfl) (fun _ => rfl) (fun _ => rfl)

      namespace CommRing
      attribute [scoped instance] instCommRing instNatCast instIntCast
      end CommRing

    end $typeName
  ))
  -- interpolating docstrings above is more trouble than it's worth
  let docString :=
    s!"To use this instance, use `open scoped {typeName'}.CommRing`.\n\n" ++
    "See the module docstring for an explanation"
  Lean.addDocString (typeName'.mkStr "instCommRing") docString
  Lean.addDocString (typeName'.mkStr "instNatCast") docString
  Lean.addDocString (typeName'.mkStr "instIntCast") docString


/-- Two nonempty compact spaces have the same image in `GHSpace` if and only if they are
isometric. -/
theorem toGHSpace_eq_toGHSpace_iff_isometryEquiv {X : Type u} [MetricSpace X] [CompactSpace X]
    [Nonempty X] {Y : Type v} [MetricSpace Y] [CompactSpace Y] [Nonempty Y] :
    toGHSpace X = toGHSpace Y ↔ Nonempty (X ≃ᵢ Y)

GromovHausdorff.toGHSpace X = GromovHausdorff.toGHSpace Y ↔ Nonempty (X ≃ᵢ Y)


/-- An equality of subobjects gives an isomorphism of the corresponding objects. -/
@[simps]
def isoOfMkEqMk {B A₁ A₂ : C} (f : A₁ ⟶ B) (g : A₂ ⟶ B) [Mono f] [Mono g] (h : mk f = mk g) :
    A₁ ≅ A₂

(h : CategoryTheory.Subobject.mk f = CategoryTheory.Subobject.mk g)

(CategoryTheory.Subobject.isoOfMkEqMk f g h).inv = CategoryTheory.Subobject.ofMkLEMk g f ⋯


theorem lifts_and_natDegree_eq_and_monic {p : S[X]} (hlifts : p ∈ lifts f) (hp : p.Monic) :
    ∃ q : R[X], map f q = p ∧ q.natDegree = p.natDegree ∧ q.Monic

{R : Type u}
[Semiring R]
{S : Type v}
[Semiring S]
{f : R →+* S}
{p : S[X]}
(hlifts : p ∈ Polynomial.lifts f)
(hp : p.Monic)

∃ q, Polynomial.map f q = p ∧ q.natDegree = p.natDegree ∧ q.Monic


@[simp, norm_cast] lemma coe_inf (s t : CompactOpens α) : ↑(s ⊓ t) = (s ∩ t : Set α)

{α : Type u_1}
[TopologicalSpace α]
[QuasiSeparatedSpace α]
(s t : TopologicalSpace.CompactOpens α)


theorem mul_star_self_pos [Nontrivial R] {x : R} (hx : IsRegular x) : 0 < x * star x

{R : Type u}
[NonUnitalSemiring R]
[PartialOrder R]
[StarRing R]
[StarOrderedRing R]
[Nontrivial R]
{x : R}
(hx : IsRegular x)


theorem ncard_le_one_iff_eq (hs : s.Finite := by toFinite_tac) :
    s.ncard ≤ 1 ↔ s = ∅ ∨ ∃ a, s = {a}

{α : Type u_1}
{s : Set α}
(hs : s.Finite := by toFinite_tac)


lemma KaehlerDifferential.ker_map_of_surjective (h : Function.Surjective (algebraMap A B)) :
    LinearMap.ker (map R R A B) =
      (LinearMap.ker finsupp_map).map (Finsupp.total A _ A (D R A))

(h : Function.Surjective ⇑(algebraMap A B))

LinearMap.ker (KaehlerDifferential.map R R A B) =
  Submodule.map (Finsupp.total A (Ω[A⁄R]) A ⇑(KaehlerDifferential.D R A))
    (LinearMap.ker (Finsupp.mapRange.linearMap (Algebra.linearMap A B) ∘ₗ Finsupp.lmapDomain A A ⇑(algebraMap A B)))


@[simp]
theorem convexJoin_union_left (s₁ s₂ t : Set E) :
    convexJoin 𝕜 (s₁ ∪ s₂) t = convexJoin 𝕜 s₁ t ∪ convexJoin 𝕜 s₂ t

{𝕜 : Type u_2}
{E : Type u_3}
[OrderedSemiring 𝕜]
[AddCommMonoid E]
[Module 𝕜 E]
(s₁ s₂ t : Set E)


@[to_additive (attr := simp, norm_cast)]
theorem coe_smul (s : Finset α) (t : Finset β) : ↑(s • t) = (s : Set α) • (t : Set β)

{α : Type u_2}
{β : Type u_3}
[DecidableEq β]
[VAdd α β]
(s : Finset α)
(t : Finset β)


/-- Shrinking lemma for coverings by open balls in a proper metric space. A point-finite open cover
of a closed subset of a proper metric space by nonempty open balls can be shrunk to a new cover by
nonempty open balls so that each of the new balls has strictly smaller radius than the old one. -/
theorem exists_subset_iUnion_ball_radius_pos_lt {r : ι → ℝ} (hr : ∀ i, 0 < r i) (hs : IsClosed s)
    (uf : ∀ x ∈ s, { i | x ∈ ball (c i) (r i) }.Finite) (us : s ⊆ ⋃ i, ball (c i) (r i)) :
    ∃ r' : ι → ℝ, (s ⊆ ⋃ i, ball (c i) (r' i)) ∧ ∀ i, r' i ∈ Ioo 0 (r i)

(uf : ∀ x ∈ s, {i | x ∈ Metric.ball (c i) (r i)}.Finite)

∃ r', s ⊆ ⋃ i, Metric.ball (c i) (r' i) ∧ ∀ (i : ι), r' i ∈ Set.Ioo 0 (r i)


theorem unique_subtype_iff_exists_unique {α} (p : α → Prop) :
    Nonempty (Unique (Subtype p)) ↔ ∃! a, p a


theorem _root_.HasCompactSupport.convolution_integrand_bound_right_of_subset
    (hcg : HasCompactSupport g) (hg : Continuous g)
    {x t : G} {s u : Set G} (hx : x ∈ s) (hu : -tsupport g + s ⊆ u) :
    ‖L (f t) (g (x - t))‖ ≤ u.indicator (fun t => ‖L‖ * ‖f t‖ * ⨆ i, ‖g i‖) t

{𝕜 : Type u𝕜}
{G : Type uG}
{E : Type uE}
{E' : Type uE'}
{F : Type uF}
[NormedAddCommGroup E]
[NormedAddCommGroup E']
[NormedAddCommGroup F]
{f : G → E}
{g : G → E'}
[NontriviallyNormedField 𝕜]
[NormedSpace 𝕜 E]
[NormedSpace 𝕜 E']
[NormedSpace 𝕜 F]
(L : E →L[𝕜] E' →L[𝕜] F)
[AddGroup G]
[TopologicalSpace G]
(hcg : HasCompactSupport g)
(hg : Continuous g)
{x t : G}
{s u : Set G}
(hx : x ∈ s)
(hu : -tsupport g + s ⊆ u)

‖(L (f t)) (g (x - t))‖ ≤ u.indicator (fun t => ‖L‖ * ‖f t‖ * ⨆ i, ‖g i‖) t


theorem preimage_interior_eq_interior_preimage (hf₁ : IsOpenMap f) (hf₂ : Continuous f)
    (s : Set Y) : f ⁻¹' interior s = interior (f ⁻¹' s)

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


@[to_additive]
lemma single_le_prod [OrderedCommMonoid M] {l : List M} (hl₁ : ∀ x ∈ l, (1 : M) ≤ x) :
    ∀ x ∈ l, x ≤ l.prod

{M : Type u_3}
[OrderedAddCommMonoid M]
{l : List M}
(hl₁ : ∀ x ∈ l, 0 ≤ x)
(x : M)


@[trans]
theorem _root_.Filter.EventuallyEq.trans_isTheta {f₁ f₂ : α → E} {g : α → F} (hf : f₁ =ᶠ[l] f₂)
    (h : f₂ =Θ[l] g) : f₁ =Θ[l] g

{α : Type u_1}
{E : Type u_3}
{F : Type u_4}
[Norm E]
[Norm F]
{l : Filter α}
{f₁ f₂ : α → E}
{g : α → F}
(hf : f₁ =ᶠ[l] f₂)
(h : f₂ =Θ[l] g)


theorem val_lt_last {i : Fin (n + 1)} : i ≠ last n → (i : Nat) < n


theorem prod_X_sub_C_eq [CommRing S] {x y z : S} :
    (X - C x) * (X - C y) * (X - C z) =
      toPoly ⟨1, -(x + y + z), x * y + x * z + y * z, -(x * y * z)⟩

(Polynomial.X - Polynomial.C x) * (Polynomial.X - Polynomial.C y) * (Polynomial.X - Polynomial.C z) =
  { a := 1, b := -(x + y + z), c := x * y + x * z + y * z, d := -(x * y * z) }.toPoly


@[to_additive (attr := simp)]
lemma Commute.units_zpow_left (h : Commute ↑u a) (m : ℤ) : Commute ↑(u ^ m) a

{M : Type u_1}
[Monoid M]
{a : M}
{u : Mˣ}
(h : Commute (↑u) a)
(m : ℤ)


protected theorem mono {m m' : MeasurableSpace α} [TopologicalSpace β]
    (hf : StronglyMeasurable[m'] f) (h_mono : m' ≤ m) : StronglyMeasurable[m] f

(hf : MeasureTheory.StronglyMeasurable f)


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

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


protected theorem rightInverse : RightInverse f f

{α : Sort u}
{f : α → α}
(h : Function.Involutive f)


/--
A histogram entry consists of the number of times the element occurs in the left and right input
arrays along with an index at which the element can be found, if applicable.
-/
structure Histogram.Entry (α : Type u) (lsize rsize : Nat) where
  /-- How many times the element occurs in the left array -/
  leftCount : Nat
  /-- An index of the element in the left array, if applicable -/
  leftIndex : Option (Fin lsize)
  /-- Invariant: the count is non-zero iff there is a saved index -/
  leftWF : leftCount = 0 ↔ leftIndex = none
  /-- How many times the element occurs in the right array -/
  rightCount : Nat
  /-- An index of the element in the right array, if applicable -/
  rightIndex : Option (Fin rsize)
  /-- Invariant: the count is non-zero iff there is a saved index -/
  rightWF : rightCount = 0 ↔ rightIndex = none

(self : Lean.Diff.Histogram.Entry α lsize rsize)

self.rightCount = 0 ↔ self.rightIndex = none


theorem lt_def [LT α] [LT β] {a b : α ⊕ β} : a < b ↔ LiftRel (· < ·) (· < ·) a b

{α : Type u_1}
{β : Type u_2}
[LT α]
[LT β]
{a b : α ⊕ β}

a < b ↔ Sum.LiftRel (fun x x_1 => x < x_1) (fun x x_1 => x < x_1) a b


@[simp] protected theorem mul_zero (a : Int) : a * 0 = 0


theorem setOf_liouville_eq_irrational_inter_iInter_iUnion :
    { x | Liouville x } =
      { x | Irrational x } ∩ ⋂ n : ℕ, ⋃ (a : ℤ) (b : ℤ) (hb : 1 < b),
      ball (a / b) (1 / (b : ℝ) ^ n)

{x | Liouville x} = {x | Irrational x} ∩ ⋂ n, ⋃ a, ⋃ b, ⋃ (_ : 1 < b), Metric.ball (↑a / ↑b) (1 / ↑b ^ n)


/-- This is the reverse direction of the equivalence we're constructing. -/
@[simps! obj map]
def costructuredArrowPresheafToOver (A : Cᵒᵖ ⥤ Type v) :
    ((CostructuredArrow yoneda A)ᵒᵖ ⥤ Type v) ⥤ Over A

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

∀ {X Y : CategoryTheory.Functor (CategoryTheory.CostructuredArrow CategoryTheory.yoneda A)ᵒᵖ (Type v)} (g : X ⟶ Y),
  (CategoryTheory.OverPresheafAux.costructuredArrowPresheafToOver A).map g =
    CategoryTheory.CostructuredArrow.homMk (CategoryTheory.OverPresheafAux.yonedaCollectionPresheafMap₁ g) ⋯


theorem irreducible_iff [Monoid α] {p : α} :
    Irreducible p ↔ ¬IsUnit p ∧ ∀ a b, p = a * b → IsUnit a ∨ IsUnit b

Irreducible p ↔ ¬IsUnit p ∧ ∀ (a b : α), p = a * b → IsUnit a ∨ IsUnit b


theorem derivative_C_mul_X_sq (a : R) : derivative (C a * X ^ 2) = C (a * 2) * X

Polynomial.derivative (Polynomial.C a * Polynomial.X ^ 2) = Polynomial.C (a * 2) * Polynomial.X


theorem IsBigOWith.inv_rev {f : α → 𝕜} {g : α → 𝕜'} (h : IsBigOWith c l f g)
    (h₀ : ∀ᶠ x in l, f x = 0 → g x = 0) : IsBigOWith c l (fun x => (g x)⁻¹) fun x => (f x)⁻¹

(h₀ : ∀ᶠ (x : α) in l, f x = 0 → g x = 0)

Asymptotics.IsBigOWith c l (fun x => (g x)⁻¹) fun x => (f x)⁻¹


@[simp]
theorem testAgainstNN_coe_eq {μ : FiniteMeasure Ω} {f : Ω →ᵇ ℝ≥0} :
    (μ.testAgainstNN f : ℝ≥0∞) = ∫⁻ ω, f ω ∂(μ : Measure Ω)

{Ω : Type u_1}
[MeasurableSpace Ω]
[TopologicalSpace Ω]
{μ : MeasureTheory.FiniteMeasure Ω}
{f : Ω →ᵇ ℝ≥0}

↑(μ.testAgainstNN f) = ∫⁻ (ω : Ω), ↑(f ω) ∂↑μ


@[simp]
theorem exists_apply_eq_apply' (f : α → β) (a' : α) : ∃ a, f a' = f a

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


theorem list_length : Primrec (@List.length α)


/-- If a set `s` is a neighborhood of `x`, then there exists a smooth function `f` taking
values in `[0, 1]`, supported in `s` and with `f x = 1`. -/
theorem exists_smooth_tsupport_subset {s : Set E} {x : E} (hs : s ∈ 𝓝 x) :
    ∃ f : E → ℝ,
      tsupport f ⊆ s ∧ HasCompactSupport f ∧ ContDiff ℝ ⊤ f ∧ range f ⊆ Icc 0 1 ∧ f x = 1

{E : Type u_1}
[NormedAddCommGroup E]
[NormedSpace ℝ E]
[FiniteDimensional ℝ E]
{s : Set E}
{x : E}
(hs : s ∈ 𝓝 x)

∃ f, tsupport f ⊆ s ∧ HasCompactSupport f ∧ ContDiff ℝ ⊤ f ∧ Set.range f ⊆ Set.Icc 0 1 ∧ f x = 1


theorem proj_comp_opProductIsoCoproduct'_hom {f : Fan Z} {c : Cofan (op <| Z ·)}
    (hf : IsLimit f) (hc : IsColimit c) (b : α) :
    (f.proj b).op ≫ (opProductIsoCoproduct' hf hc).hom = c.inj b

{c : CategoryTheory.Limits.Cofan fun x => Opposite.op (Z x)}

(hc : CategoryTheory.Limits.IsColimit c)

(f.proj b).op ≫ (CategoryTheory.Limits.opProductIsoCoproduct' hf hc).hom = c.inj b


lemma next_f_of_not_boundaryLE [e.IsRelIff] {j k : ι} (hjk : c.next j = k)
    (hj : ¬ e.BoundaryLE j) :
    c'.next (e.f j) = e.f k

{ι : Type u_1}
{ι' : Type u_2}
{c : ComplexShape ι}
{c' : ComplexShape ι'}
(e : c.Embedding c')
[e.IsRelIff]
{j k : ι}
(hjk : c.next j = k)
(hj : ¬e.BoundaryLE j)


/-- The pdf of the gamma distribution integrates to 1 -/
@[simp]
lemma lintegral_gammaPDF_eq_one {a r : ℝ} (ha : 0 < a) (hr : 0 < r) :
    ∫⁻ x, gammaPDF a r x = 1

∫⁻ (x : ℝ), ProbabilityTheory.gammaPDF a r x = 1


theorem image₂_inter_right [DecidableEq β] (hf : Injective2 f) :
    image₂ f s (t ∩ t') = image₂ f s t ∩ image₂ f s t'

{α : Type u_1}
{β : Type u_3}
{γ : Type u_5}
[DecidableEq γ]
{f : α → β → γ}
{s : Finset α}
{t t' : Finset β}
[DecidableEq β]
(hf : Function.Injective2 f)

Finset.image₂ f s (t ∩ t') = Finset.image₂ f s t ∩ Finset.image₂ f s t'


@[to_additive sub_abs_eq_neg_two_nsmul_negPart]
lemma div_mabs_eq_inv_leOnePart_sq (a : α) : a / |a|ₘ = (a⁻ᵐ ^ 2)⁻¹

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


@[simp]
theorem mem_iota {m n : Nat} : m ∈ iota n ↔ 1 ≤ m ∧ m ≤ n


/-- If `g` is surjective, then the kernel of `(id A) ⊗ g` is generated by the kernel of `g` -/
lemma Algebra.TensorProduct.lTensor_ker (hg : Function.Surjective g) :
    RingHom.ker (map (AlgHom.id R A) g) =
      (RingHom.ker g).map (Algebra.TensorProduct.includeRight : C →ₐ[R] A ⊗[R] C)

{R : Type u_4}
[CommRing R]
{A : Type u_5}
{C : Type u_7}
{D : Type u_8}
[Ring A]
[Ring C]
[Ring D]
[Algebra R A]
[Algebra R C]
[Algebra R D]
(g : C →ₐ[R] D)
(hg : Function.Surjective ⇑g)

RingHom.ker (Algebra.TensorProduct.map (AlgHom.id R A) g) = Ideal.map Algebra.TensorProduct.includeRight (RingHom.ker g)


@[simp, norm_cast]
lemma coe_sup' {ι : Type*} {s : Finset ι} (H : s.Nonempty) (f : ι → C(α, β)) :
    ⇑(s.sup' H f) = s.sup' H fun i ↦ ⇑(f i)

{α : Type u_1}
{β : Type u_2}
[TopologicalSpace α]
[TopologicalSpace β]
[SemilatticeSup β]
[ContinuousSup β]
{ι : Type u_4}
{s : Finset ι}
(H : s.Nonempty)
(f : ι → C(α, β))

⇑(s.sup' H f) = s.sup' H fun i => ⇑(f i)


/-- See also `MeasureTheory.ae_uIoc_iff`. -/
theorem ae_restrict_uIoc_iff [LinearOrder α] {a b : α} {P : α → Prop} :
    (∀ᵐ x ∂μ.restrict (Ι a b), P x) ↔
      (∀ᵐ x ∂μ.restrict (Ioc a b), P x) ∧ ∀ᵐ x ∂μ.restrict (Ioc b a), P x

{α : Type u_2}
{m0 : MeasurableSpace α}
{μ : MeasureTheory.Measure α}
[LinearOrder α]
{a b : α}
{P : α → Prop}

(∀ᵐ (x : α) ∂μ.restrict (Ι a b), P x) ↔
  (∀ᵐ (x : α) ∂μ.restrict (Set.Ioc a b), P x) ∧ ∀ᵐ (x : α) ∂μ.restrict (Set.Ioc b a), P x


@[simp]
theorem Prime.minFac_eq {p : ℕ} (hp : Prime p) : minFac p = p


@[simp]
theorem finite_toSet_toFinset [DecidableEq α] (s : Multiset α) :
    s.finite_toSet.toFinset = s.toFinset

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


theorem zero_zpow_eq (n : ℤ) : (0 : M) ^ n = if n = 0 then 1 else 0

{n' : Type u_1}
[DecidableEq n']
[Fintype n']
{R : Type u_2}
[CommRing R]
(n : ℤ)


lemma cauchy_natCast (n : ℕ) : (n : ℝ).cauchy = n


@[to_additive (attr := simp, to_additive) (reorder := 1 2, 4 5) ofDual_smul']
theorem pow_ofDual [Pow α β] (a : α) (b : βᵒᵈ) : a ^ ofDual b = a ^ b

{β : Type u_2}
{α : Type u_1}
[SMul β α]
(b : βᵒᵈ)
(a : α)


/-- The intersection of a disjoint covering by two open sets of a clopen set will be clopen. -/
theorem isClopen_inter_of_disjoint_cover_clopen {s a b : Set X} (h : IsClopen s) (cover : s ⊆ a ∪ b)
    (ha : IsOpen a) (hb : IsOpen b) (hab : Disjoint a b) : IsClopen (s ∩ a)

{X : Type u}
[TopologicalSpace X]
{s a b : Set X}
(h : IsClopen s)
(cover : s ⊆ a ∪ b)
(ha : IsOpen a)
(hb : IsOpen b)
(hab : Disjoint a b)


@[to_additive (attr := fun_prop)]
theorem ContinuousAt.zpow {f : α → G} {x : α} (hf : ContinuousAt f x) (z : ℤ) :
    ContinuousAt (fun x => f x ^ z) x

{G : Type w}
{α : Type u}
[TopologicalSpace G]
[Group G]
[TopologicalGroup G]
[TopologicalSpace α]
{f : α → G}
{x : α}
(hf : ContinuousAt f x)
(z : ℤ)


protected lemma BddBelow.isBounded (hs₀ : BddBelow s) (hs₁ : BddAbove s) : IsBounded s

{α : Type u_1}
[Bornology α]
{s : Set α}
[Preorder α]
[IsOrderBornology α]
(hs₀ : BddBelow s)
(hs₁ : BddAbove s)


/-- Helper lemma for the evaluation of `prec` in the recursive case. -/
theorem eval_prec_succ (cf cg : Code) (a k : ℕ) :
    eval (prec cf cg) (Nat.pair a (Nat.succ k)) =
      do {let ih ← eval (prec cf cg) (Nat.pair a k); eval cg (Nat.pair a (Nat.pair k ih))}

(cf.prec cg).eval (Nat.pair a k.succ) = do
  let ih ← (cf.prec cg).eval (Nat.pair a k)
  cg.eval (Nat.pair a (Nat.pair k ih))


lemma negDblY_smul (P : Fin 3 → R) (u : R) : W'.negDblY (u • P) = (u ^ 4) ^ 3 * W'.negDblY P

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


@[simp, norm_cast]
protected theorem coe_pos {x : ℝ} : (0 : EReal) < x ↔ 0 < x


/--
The morphism from `Spec(O_x)` to `X` given by `IsAffineOpen.fromSpec` does not depend on the affine
open neighborhood of `x` we choose.
-/
theorem IsAffineOpen.fromSpecStalk_eq {X : Scheme} (x : X) {U V : X.Opens}
    (hU : IsAffineOpen U) (hV : IsAffineOpen V) (hxU : x ∈ U) (hxV : x ∈ V) :
    hU.fromSpecStalk hxU = hV.fromSpecStalk hxV

{X : AlgebraicGeometry.Scheme}
(x : ↑↑X.toPresheafedSpace)
{U V : X.Opens}
(hU : AlgebraicGeometry.IsAffineOpen U)
(hV : AlgebraicGeometry.IsAffineOpen V)
(hxU : x ∈ U)
(hxV : x ∈ V)


@[simp]
theorem codeSupp_succ (k) : codeSupp Code.succ k = trStmts₁ (trNormal Code.succ k) ∪ contSupp k

Turing.PartrecToTM2.codeSupp Turing.ToPartrec.Code.succ k =
  Turing.PartrecToTM2.trStmts₁ (Turing.PartrecToTM2.trNormal Turing.ToPartrec.Code.succ k) ∪
    Turing.PartrecToTM2.contSupp k


@[to_additive (attr := simp)]
theorem closure_eq_bot_iff : closure k = ⊥ ↔ k ⊆ {1}


/-- A `Submodule` over `R ⊗[ℤ] S` is naturally also a `Submodule` over the canonically-isomorphic
ring `R ⊗[ℕ] S`. -/
@[simps!]
def toSubbimoduleNat (p : Submodule (R ⊗[ℤ] S) M) : Submodule (R ⊗[ℕ] S) M

(R : Type u_1)
(S : Type u_2)
(M : Type u_3)
[Ring R]
[Ring S]
[AddCommGroup M]
[Module R M]
[Module S M]
[SMulCommClass R S M]
(p : Submodule (R ⊗[ℤ] S) M)

↑(Subbimodule.toSubbimoduleNat R S M p) = ↑p


theorem filter_and (s : Finset α) : (s.filter fun a => p a ∧ q a) = s.filter p ∩ s.filter q

{α : Type u_1}
(p q : α → Prop)
[DecidablePred p]
[DecidablePred q]
[DecidableEq α]
(s : Finset α)

Finset.filter (fun a => p a ∧ q a) s = Finset.filter p s ∩ Finset.filter q s


/-- If `f` satisfies a boundedness property around `0`, one can deduce a bound on `f m₁ - f m₂`
using the multilinearity. Here, we give a precise but hard to use version. See
`norm_image_sub_le_of_bound` for a less precise but more usable version. The bound reads
`‖f m - f m'‖ ≤
  C * ‖m 1 - m' 1‖ * max ‖m 2‖ ‖m' 2‖ * max ‖m 3‖ ‖m' 3‖ * ... * max ‖m n‖ ‖m' n‖ + ...`,
where the other terms in the sum are the same products where `1` is replaced by any `i`. -/
theorem norm_image_sub_le_of_bound' [DecidableEq ι] {C : ℝ} (hC : 0 ≤ C)
    (H : ∀ m, ‖f m‖ ≤ C * ∏ i, ‖m i‖) (m₁ m₂ : ∀ i, E i) :
    ‖f m₁ - f m₂‖ ≤ C * ∑ i, ∏ j, if j = i then ‖m₁ i - m₂ i‖ else max ‖m₁ j‖ ‖m₂ j‖

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

(H : ∀ (m : (i : ι) → E i), ‖f m‖ ≤ C * ∏ i : ι, ‖m i‖)

‖f m₁ - f m₂‖ ≤ C * ∑ i : ι, ∏ j : ι, if j = i then ‖m₁ i - m₂ i‖ else max ‖m₁ j‖ ‖m₂ j‖


/-- An algebra is finitely generated if and only if it is a quotient
of a free algebra whose variables are indexed by a finset. -/
theorem iff_quotient_freeAlgebra :
    FiniteType R A ↔
      ∃ (s : Finset A) (f : FreeAlgebra R s →ₐ[R] A), Surjective f

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

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


/-- `HeytingHomClass F α β` states that `F` is a type of Heyting homomorphisms.

You should extend this class when you extend `HeytingHom`. -/
class HeytingHomClass (F α β : Type*) [HeytingAlgebra α] [HeytingAlgebra β] [FunLike F α β]
  extends LatticeHomClass F α β : Prop where
  /-- The proposition that a Heyting homomorphism preserves the bottom element. -/
  map_bot (f : F) : f ⊥ = ⊥
  /-- The proposition that a Heyting homomorphism preserves the Heyting implication. -/
  map_himp (f : F) : ∀ a b, f (a ⇨ b) = f a ⇨ f b

{F : Type u_6}
{α : Type u_7}
{β : Type u_8}
[HeytingAlgebra α]
[HeytingAlgebra β]
[FunLike F α β]
[self : HeytingHomClass F α β]
(f : F)


/-- The symmetry of homotopy between morphisms of short complexes. -/
@[simps]
def symm (h : Homotopy φ₁ φ₂) : Homotopy φ₂ φ₁

{φ₁ φ₂ : S₁ ⟶ S₂}

(h : CategoryTheory.ShortComplex.Homotopy φ₁ φ₂)


@[elab_as_elim, induction_eliminator]
protected theorem induction_on {C : FreeRing α → Prop} (z : FreeRing α) (hn1 : C (-1))
    (hb : ∀ b, C (of b)) (ha : ∀ x y, C x → C y → C (x + y)) (hm : ∀ x y, C x → C y → C (x * y)) :
    C z

(ha : ∀ (x y : FreeRing α), C x → C y → C (x + y))

(hm : ∀ (x y : FreeRing α), C x → C y → C (x * y))


theorem map_smul_of_tower {R'} [SMul R' A] [SMul R' B] [LinearMap.CompatibleSMul A B R' R] (r : R')
    (x : A) : φ (r • x) = r • φ x

{R : Type u_1}
{A : Type u_2}
{B : Type u_3}
[CommSemiring R]
[AddCommMonoid A]
[Module R A]
[AddCommMonoid B]
[Module R B]
[CoalgebraStruct R A]
[CoalgebraStruct R B]
(φ : A →ₗc[R] B)
{R' : Type u_6}
[SMul R' A]
[SMul R' B]
[LinearMap.CompatibleSMul A B R' R]
(r : R')
(x : A)


lemma singularPart_eq_zero_iff_absolutelyContinuous (κ η : Kernel α γ)
    [IsFiniteKernel κ] [IsFiniteKernel η] (a : α) :
    singularPart κ η a = 0 ↔ κ a ≪ η a

[hαγ : MeasurableSpace.CountableOrCountablyGenerated α γ]


@[simp]
theorem neg_snd (x : X q) : (-x).2 = -x.2


theorem flip_quotDualCoannihilatorToDual_bijective (W : Subspace K (Dual K V))
    [FiniteDimensional K W] : Function.Bijective W.quotDualCoannihilatorToDual.flip

{K : Type u_1}
{V : Type u_2}
[Field K]
[AddCommGroup V]
[Module K V]
(W : Subspace K (Module.Dual K V))
[FiniteDimensional K ↥W]


@[simp]
theorem prod_mem_prod_iff [f.NeBot] [g.NeBot] : s ×ˢ t ∈ f ×ˢ g ↔ s ∈ f ∧ t ∈ g

{α : Type u_1}
{β : Type u_2}
{s : Set α}
{t : Set β}
{f : Filter α}
{g : Filter β}
[f.NeBot]
[g.NeBot]

s ×ˢ t ∈ f ×ˢ g ↔ s ∈ f ∧ t ∈ g


@[to_additive]
theorem trivial_eq_closure : trivial G = Group.closure ∅

IsAddSubgroup.trivial G = AddGroup.closure ∅


@[norm_cast] -- Porting note: no longer a `simp`
theorem coe_iInf₂ (f : ∀ i, κ i → LowerSet α) :
    (↑(⨅ (i) (j), f i j) : Set α) = ⋂ (i) (j), f i j

{α : Type u_1}
{ι : Sort u_4}
{κ : ι → Sort u_5}
[LE α]
(f : (i : ι) → κ i → LowerSet α)


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

{V : Type u_1}
{P : Type u_2}
[NormedAddCommGroup V]
[InnerProductSpace ℝ V]
[MetricSpace P]
[NormedAddTorsor V P]
{p₁ p₂ p₃ : P}
(h : ∠ p₁ p₂ p₃ = π / 2)


protected theorem IsTopologicalBasis.mem_nhds {a : α} {s : Set α} {b : Set (Set α)}
    (hb : IsTopologicalBasis b) (hs : s ∈ b) (ha : a ∈ s) : s ∈ 𝓝 a

(hb : TopologicalSpace.IsTopologicalBasis b)


/-- Fundamental theorem of calculus: if `f : ℝ → E` is integrable on `a..b` and `f x` is continuous
from the left or from the right at `b`, then `u ↦ ∫ x in a..u, f x` has left (resp., right)
derivative `f b` at `b`. -/
theorem integral_hasDerivWithinAt_right (hf : IntervalIntegrable f volume a b) {s t : Set ℝ}
    [FTCFilter b (𝓝[s] b) (𝓝[t] b)] (hmeas : StronglyMeasurableAtFilter f (𝓝[t] b))
    (hb : ContinuousWithinAt f t b) : HasDerivWithinAt (fun u => ∫ x in a..u, f x) (f b) s b

(hf : IntervalIntegrable f MeasureTheory.volume a b)

[intervalIntegral.FTCFilter b (𝓝[s] b) (𝓝[t] b)]

(hmeas : StronglyMeasurableAtFilter f (𝓝[t] b) MeasureTheory.volume)

HasDerivWithinAt (fun u => ∫ (x : ℝ) in a..u, f x) (f b) s b


theorem isOpen_iff_coe_preimage_of_iSup_eq_top (s : Set β) :
    IsOpen s ↔ ∀ i, IsOpen ((↑) ⁻¹' s : Set (U i))

{β : Type u_2}
[TopologicalSpace β]
{ι : Type u_3}
{U : ι → TopologicalSpace.Opens β}
(hU : iSup U = ⊤)
(s : Set β)

IsOpen s ↔ ∀ (i : ι), IsOpen (Subtype.val ⁻¹' s)


private theorem dist_nonneg' : 0 ≤ dist f g

{α : Type u}
{β : Type v}
[TopologicalSpace α]
[PseudoMetricSpace β]
{f g : BoundedContinuousFunction α β}


@[simp]
theorem prod_cons (g : G) (u : ℤˣ) (w : NormalWord d) (h1 : w.head ∈ d.set u)
    (h2 : ∀ u' ∈ Option.map Prod.fst w.toList.head?,
      w.head ∈ toSubgroup A B u → u = u') :
    (cons g u w h1 h2).prod φ = of g * (t ^ (u : ℤ) * w.prod φ)

{d : HNNExtension.NormalWord.TransversalPair G A B}

(h2 : ∀ u' ∈ Option.map Prod.fst w.toList.head?, w.head ∈ HNNExtension.toSubgroup A B u → u = u')

HNNExtension.NormalWord.ReducedWord.prod φ (HNNExtension.NormalWord.cons g u w h1 h2).toReducedWord =
  HNNExtension.of g * (HNNExtension.t ^ ↑u * HNNExtension.NormalWord.ReducedWord.prod φ w.toReducedWord)


@[simp]
theorem of_zero_smul {i} (a : A 0) (b : A i) : of _ _ (a • b) = of _ _ a * of _ _ b

(DirectSum.of A i) (a • b) = (DirectSum.of A 0) a * (DirectSum.of A i) b


/-- The box product is associative up to isomorphism. `Equiv.prodAssoc` as a graph isomorphism. -/
@[simps!]
def boxProdAssoc (I : SimpleGraph γ) : G □ H □ I ≃g G □ (H □ I)

{α : Type u_1}
{β : Type u_2}
{γ : Type u_3}
(G : SimpleGraph α)
(H : SimpleGraph β)
(I : SimpleGraph γ)
(p : α × β × γ)

(RelIso.symm (G.boxProdAssoc H I)) p = ((p.1, p.2.1), p.2.2)


lemma mappingConeCompTriangleh_distinguished :
    (CochainComplex.mappingConeCompTriangleh f g) ∈
      distTriang (HomotopyCategory C (ComplexShape.up ℤ))

CochainComplex.mappingConeCompTriangleh f g ∈ CategoryTheory.Pretriangulated.distinguishedTriangles


/-- The minimal polynomial of a root of unity `μ` divides `X ^ n - 1`. -/
theorem minpoly_dvd_x_pow_sub_one : minpoly ℤ μ ∣ X ^ n - 1

{n : ℕ}
{K : Type u_1}
[CommRing K]
{μ : K}
(h : IsPrimitiveRoot μ n)
[IsDomain K]
[CharZero K]


@[simp]
theorem lookup_union_right {a} {s₁ s₂ : Finmap β} : a ∉ s₁ → lookup a (s₁ ∪ s₂) = lookup a s₂

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

a ∉ s₁ → Finmap.lookup a (s₁ ∪ s₂) = Finmap.lookup a s₂


@[simp]
lemma generateFrom_empty : generateFrom (∅ : Set (Set α)) = ⊥


theorem Gamma_add_one {s : ℝ} (hs : s ≠ 0) : Gamma (s + 1) = s * Gamma s


/-- If every functor `yoneda.obj X` is a `J`-sheaf, then `J` is subcanonical. -/
theorem of_yoneda_isSheaf (J : GrothendieckTopology C)
    (h : ∀ X, Presieve.IsSheaf J (yoneda.obj X)) : Subcanonical J

(J : CategoryTheory.GrothendieckTopology C)

(h : ∀ (X : C), CategoryTheory.Presieve.IsSheaf J (CategoryTheory.yoneda.obj X))


theorem liftOfRightInverse_comp_apply (hf : Function.RightInverse f_inv f)
    (g : { g : A →+* C // RingHom.ker f ≤ RingHom.ker g }) (x : A) :
    (f.liftOfRightInverse f_inv hf g) (f x) = g.1 x

(g : { g // RingHom.ker f ≤ RingHom.ker g })

((f.liftOfRightInverse f_inv hf) g) (f x) = ↑g x


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

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


theorem Basis.ofIsLocalizedModule_span :
    span R (Set.range (b.ofIsLocalizedModule Rₛ S f)) = LinearMap.range f

{R : Type u_1}
(Rₛ : Type u_2)
[CommSemiring R]
(S : Submonoid R)
[CommRing Rₛ]
[Algebra R Rₛ]
[hT : IsLocalization S Rₛ]
{M : Type u_3}
{Mₛ : Type u_4}
[AddCommGroup M]
[AddCommGroup Mₛ]
[Module R M]
[Module R Mₛ]
[Module Rₛ Mₛ]
(f : M →ₗ[R] Mₛ)
[IsLocalizedModule S f]
[IsScalarTower R Rₛ Mₛ]
{ι : Type u_5}
(b : Basis ι R M)

Submodule.span R (Set.range ⇑(Basis.ofIsLocalizedModule Rₛ S f b)) = LinearMap.range f


@[simp]
theorem choose_zero_succ (R) [NonAssocRing R] [Pow R ℕ] [NatPowAssoc R] [BinomialRing R]
    (n : ℕ) : choose (0 : R) (n + 1) = 0

(R : Type u_2)
[NonAssocRing R]
[Pow R ℕ]
[NatPowAssoc R]
[BinomialRing R]
(n : ℕ)


lemma smul_lowerBounds_subset_upperBounds_smul (ha : a ≤ 0) :
    a • lowerBounds s ⊆ upperBounds (a • s)

{α : Type u_1}
{β : Type u_2}
[OrderedRing α]
[OrderedAddCommGroup β]
[Module α β]
[PosSMulMono α β]
{s : Set β}
{a : α}
(ha : a ≤ 0)


@[simp]
theorem coe_apply (a : α) (f : α →𝒄 β) : (f : α →o β) a = f a

{α : Type u}
{β : Type v}
[OmegaCompletePartialOrder α]
[OmegaCompletePartialOrder β]
(a : α)
(f : α →𝒄 β)


theorem stronglyMeasurable_coeFn (f : α →₁[μ] β) : StronglyMeasurable f

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


theorem _root_.Char.utf8Size_le_four (c : Char) : c.utf8Size ≤ 4


@[simp]
theorem support_countable (p : PMF α) : p.support.Countable


@[to_additive]
theorem csSup_div (hs₀ : s.Nonempty) (hs₁ : BddAbove s) (ht₀ : t.Nonempty) (ht₁ : BddBelow t) :
    sSup (s / t) = sSup s / sInf t

[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]


theorem exists_chain_of_prime_pow {p : Associates M} {n : ℕ} (hn : n ≠ 0) (hp : Prime p) :
    ∃ c : Fin (n + 1) → Associates M,
      c 1 = p ∧ StrictMono c ∧ ∀ {r : Associates M}, r ≤ p ^ n ↔ ∃ i, r = c i

{M : Type u_1}
[CancelCommMonoidWithZero M]
{p : Associates M}
{n : ℕ}
(hn : n ≠ 0)
(hp : Prime p)

∃ c, c 1 = p ∧ StrictMono c ∧ ∀ {r : Associates M}, r ≤ p ^ n ↔ ∃ i, r = c i


@[simp]
theorem id_apply (x : α) : NonUnitalRingHom.id α x = x

{α : Type u_2}
[NonUnitalNonAssocSemiring α]
(x : α)


lemma volume_pi_eq_dirac {ι : Type*} [Fintype ι] [IsEmpty ι]
    {α : ι → Type*} [∀ i, MeasureSpace (α i)] (x : ∀ a, α a := isEmptyElim) :
    (volume : Measure (∀ i, α i)) = Measure.dirac x

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

(x : (a : ι) → α a := fun a => isEmptyElim a)

MeasureTheory.volume = MeasureTheory.Measure.dirac x


/-- Reindexing a simplex along an `Equiv` of index types does not change the circumcenter. -/
@[simp]
theorem circumcenter_reindex {m n : ℕ} (s : Simplex ℝ P m) (e : Fin (m + 1) ≃ Fin (n + 1)) :
    (s.reindex e).circumcenter = s.circumcenter

{V : Type u_1}
{P : Type u_2}
[NormedAddCommGroup V]
[InnerProductSpace ℝ V]
[MetricSpace P]
[NormedAddTorsor V P]
{m n : ℕ}
(s : Affine.Simplex ℝ P m)
(e : Fin (m + 1) ≃ Fin (n + 1))


/-- Constructor for `ComposableArrows C 0`. -/
@[simps!]
def mk₀ (X : C) : ComposableArrows C 0

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

∀ (x : Fin 1), (CategoryTheory.ComposableArrows.mk₀ X).obj x = X


lemma mkOfObjOfMapSucc_arrow (i : ℕ) (hi : i < n := by valid) :
    (mkOfObjOfMapSucc obj mapSucc).arrow i = mk₁ (mapSucc ⟨i, hi⟩)

(mapSucc : (i : Fin n) → obj i.castSucc ⟶ obj i.succ)

(CategoryTheory.ComposableArrows.mkOfObjOfMapSucc obj mapSucc).arrow i hi =
  CategoryTheory.ComposableArrows.mk₁ (mapSucc ⟨i, hi⟩)


@[to_additive]
theorem prod_ite {s : Finset α} {p : α → Prop} {hp : DecidablePred p} (f g : α → β) :
    ∏ x ∈ s, (if p x then f x else g x) =
      (∏ x ∈ s.filter p, f x) * ∏ x ∈ s.filter fun x => ¬p x, g x

{α : Type u_3}
{β : Type u_4}
[AddCommMonoid β]
{s : Finset α}
{p : α → Prop}
{hp : DecidablePred p}
(f g : α → β)

(∑ x ∈ s, if p x then f x else g x) = ∑ x ∈ Finset.filter p s, f x + ∑ x ∈ Finset.filter (fun x => ¬p x) s, g x


theorem root_right_of_root_gcd [CommSemiring k] [DecidableEq R] {ϕ : R →+* k} {f g : R[X]} {α : k}
    (hα : (EuclideanDomain.gcd f g).eval₂ ϕ α = 0) : g.eval₂ ϕ α = 0

(hα : Polynomial.eval₂ ϕ α (EuclideanDomain.gcd f g) = 0)


lemma LSeriesSummable.add {f g : ℕ → ℂ} {s : ℂ} (hf : LSeriesSummable f s)
    (hg : LSeriesSummable g s) :
    LSeriesSummable (f + g) s


/--
A ring of characteristic zero is of "mixed characteristic `(0, p)`" if there exists an ideal
such that the quotient `R ⧸ I` has characteristic `p`.

**Remark:** For `p = 0`, `MixedChar R 0` is a meaningless definition (i.e. satisfied by any ring)
as `R ⧸ ⊥ ≅ R` has by definition always characteristic zero.
One could require `(I ≠ ⊥)` in the definition, but then `MixedChar R 0` would mean something
like `ℤ`-algebra of extension degree `≥ 1` and would be completely independent from
whether something is a `ℚ`-algebra or not (e.g. `ℚ[X]` would satisfy it but `ℚ` wouldn't).
-/
class MixedCharZero (p : ℕ) : Prop where
  [toCharZero : CharZero R]
  charP_quotient : ∃ I : Ideal R, I ≠ ⊤ ∧ CharP (R ⧸ I) p

{R : Type u_1}
[CommRing R]
{p : ℕ}
[self : MixedCharZero R p]


@[simp, norm_cast]
theorem coe_set_eq : (p : Set B) = q ↔ p = q

{A : Type u_1}
{B : Type u_2}
[i : SetLike A B]
{p q : A}


theorem Nonempty.inr (ht : t.Nonempty) : (s ∪ t).Nonempty

{α : Type u}
{s t : Set α}
(ht : t.Nonempty)


@[simp]
lemma toBlocks₂₂_diagonal (v : l ⊕ m → α) :
    toBlocks₂₂ (diagonal v) = diagonal (fun i => v (Sum.inr i))

{l : Type u_1}
{m : Type u_2}
{α : Type u_12}
[DecidableEq l]
[DecidableEq m]
[Zero α]
(v : l ⊕ m → α)

(Matrix.diagonal v).toBlocks₂₂ = Matrix.diagonal fun i => v (Sum.inr i)


theorem ext_iff {f g : M →[L] N} : f = g ↔ ∀ x, f x = g x

{L : FirstOrder.Language}
{M : Type w}
{N : Type w'}
[L.Structure M]
[L.Structure N]
{f g : L.Hom M N}


theorem compl_sInter (S : Set (Set α)) : (⋂₀ S)ᶜ = ⋃₀(compl '' S)


/-- A local ring `R` is *Henselian* if the following condition holds:
for every polynomial `f` over `R`, with a *simple* root `a₀` over the residue field,
there exists a lift `a : R` of `a₀` that is a root of `f`.
(Recall that a root `b` of a polynomial `g` is *simple* if it is not a double root, so if
`g.derivative.eval b ≠ 0`.)

In other words, `R` is local Henselian if it is Henselian at the ideal `I`,
in the sense of `HenselianRing`. -/
class HenselianLocalRing (R : Type*) [CommRing R] extends LocalRing R : Prop where
  is_henselian :
    ∀ (f : R[X]) (_ : f.Monic) (a₀ : R) (_ : f.eval a₀ ∈ maximalIdeal R)
      (_ : IsUnit (f.derivative.eval a₀)), ∃ a : R, f.IsRoot a ∧ a - a₀ ∈ maximalIdeal R

{R : Type u_1}
[CommRing R]
[self : HenselianLocalRing R]
(f : R[X])

f.Monic →
  ∀ (a₀ : R),
    Polynomial.eval a₀ f ∈ LocalRing.maximalIdeal R →
      IsUnit (Polynomial.eval a₀ (Polynomial.derivative f)) → ∃ a, f.IsRoot a ∧ a - a₀ ∈ LocalRing.maximalIdeal R


theorem and_or_inj_left_iff :
    ∀ {m x y : Bool}, (m && x) = (m && y) ∧ (m || x) = (m || y) ↔ x = y


theorem tendsto_atTop_of_leadingCoeff_nonneg (hdeg : 0 < P.degree) (hnng : 0 ≤ P.leadingCoeff) :
    Tendsto (fun x => eval x P) atTop atTop

{𝕜 : Type u_1}
[NormedLinearOrderedField 𝕜]
(P : 𝕜[X])
[OrderTopology 𝕜]
(hdeg : 0 < P.degree)
(hnng : 0 ≤ P.leadingCoeff)

Filter.Tendsto (fun x => Polynomial.eval x P) Filter.atTop Filter.atTop


/-- A Type `R` is a `CompatibleRing` if it is a structure for the language of rings and this
structure is the same as the structure already given on `R` by the classes `Add`, `Mul` etc.

It is recommended to use this type class as a hypothesis to any theorem whose statement
requires a type to have be both a `Ring` (or `Field` etc.) and a
`Language.ring.Structure`  -/
/- This class does not extend `Add` etc, because this way it can be used in
combination with a `Ring`, or `Field` instance without having multiple different
`Add` structures on the Type. -/
class CompatibleRing (R : Type*) [Add R] [Mul R] [Neg R] [One R] [Zero R]
    extends Language.ring.Structure R where
  /-- Addition in the `Language.ring.Structure` is the same as the addition given by the
    `Add` instance -/
  funMap_add : ∀ x, funMap addFunc x = x 0 + x 1
  /-- Multiplication in the `Language.ring.Structure` is the same as the multiplication given by the
    `Mul` instance -/
  funMap_mul : ∀ x, funMap mulFunc x = x 0 * x 1
  /-- Negation in the `Language.ring.Structure` is the same as the negation given by the
    `Neg` instance -/
  funMap_neg : ∀ x, funMap negFunc x = -x 0
  /-- The constant `0` in the `Language.ring.Structure` is the same as the constant given by the
    `Zero` instance -/
  funMap_zero : ∀ x, funMap (zeroFunc : Language.ring.Constants) x = 0
  /-- The constant `1` in the `Language.ring.Structure` is the same as the constant given by the
    `One` instance -/
  funMap_one : ∀ x, funMap (oneFunc : Language.ring.Constants) x = 1

[self : FirstOrder.Ring.CompatibleRing R]

FirstOrder.Language.Structure.funMap FirstOrder.Ring.addFunc x = x 0 + x 1