lemma fromColumns_ext_iff (A₁ : Matrix m n₁ R) (A₂ : Matrix m n₂ R) (B₁ : Matrix m n₁ R)
    (B₂ : Matrix m n₂ R) :
    fromColumns A₁ A₂ = fromColumns B₁ B₂ ↔ A₁ = B₁ ∧ A₂ = B₂

{R : Type u_1}
{m : Type u_2}
{n₁ : Type u_6}
{n₂ : Type u_7}
(A₁ : Matrix m n₁ R)
(A₂ : Matrix m n₂ R)
(B₁ : Matrix m n₁ R)
(B₂ : Matrix m n₂ R)

A₁.fromColumns A₂ = B₁.fromColumns B₂ ↔ A₁ = B₁ ∧ A₂ = B₂


theorem rank_finset_sum_le {η} (s : Finset η) (f : η → V →ₗ[K] V') :
    rank (∑ d ∈ s, f d) ≤ ∑ d ∈ s, rank (f d)

{K : Type u}
{V : Type v}
{V' : Type v'}
[DivisionRing K]
[AddCommGroup V]
[Module K V]
[AddCommGroup V']
[Module K V']
{η : Type u_1}
(s : Finset η)
(f : η → V →ₗ[K] V')

(∑ d ∈ s, f d).rank ≤ ∑ d ∈ s, (f d).rank


theorem le_symm_apply (e : α ≃o β) {x : α} {y : β} : x ≤ e.symm y ↔ e x ≤ y

{α : Type u_2}
{β : Type u_3}
[LE α]
[LE β]
(e : α ≃o β)
{x : α}
{y : β}


@[simp]
theorem neLocus_self_sub_left : neLocus (f - g) f = g.support

{α : Type u_1}
{N : α → Type u_2}
[DecidableEq α]
[(a : α) → DecidableEq (N a)]
[(a : α) → AddGroup (N a)]
(f g : Π₀ (a : α), N a)


@[simp]
lemma quasispectrum.coe_zero [Nontrivial R] (a : A) : (0 : quasispectrum R a) = (0 : R)

{R : Type u_1}
{A : Type u_2}
[CommSemiring R]
[NonUnitalRing A]
[Module R A]
[Nontrivial R]
(a : A)


@[simp]
theorem toFinsupp_of (x : X) : toFinsupp (of x) = Finsupp.single x 1

FreeAbelianGroup.toFinsupp (FreeAbelianGroup.of x) = Finsupp.single x 1


/-- A logarithmic upper bound on the multiplicity of a prime in a binomial coefficient. -/
theorem factorization_choose_le_log : (choose n k).factorization p ≤ log p n

(n.choose k).factorization p ≤ Nat.log p n


theorem InjOn.pairwiseDisjoint_image {g : ι' → ι} {s : Set ι'} (h : s.InjOn g) :
    (g '' s).PairwiseDisjoint f ↔ s.PairwiseDisjoint (f ∘ g)

{α : Type u_1}
{ι : Type u_4}
{ι' : Type u_5}
[PartialOrder α]
[OrderBot α]
{f : ι → α}
{g : ι' → ι}
{s : Set ι'}
(h : Set.InjOn g s)


theorem absolutelyContinuous_of_le_smul {μ' : Measure α} {c : ℝ≥0∞} (hμ'_le : μ' ≤ c • μ) :
    μ' ≪ μ

{α : Type u_1}
{m0 : MeasurableSpace α}
{μ μ' : MeasureTheory.Measure α}
{c : ENNReal}
(hμ'_le : μ' ≤ c • μ)


theorem contDiffAt_one_iff :
    ContDiffAt 𝕜 1 f x ↔
      ∃ f' : E → E →L[𝕜] F, ∃ u ∈ 𝓝 x, ContinuousOn f' u ∧ ∀ x ∈ u, HasFDerivAt f (f' x) x

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

ContDiffAt 𝕜 1 f x ↔ ∃ f', ∃ u ∈ 𝓝 x, ContinuousOn f' u ∧ ∀ x ∈ u, HasFDerivAt f (f' x) x


theorem coeff_X_pow [DecidableEq σ] (i : σ) (m) (k : ℕ) :
    coeff m (X i ^ k : MvPolynomial σ R) = if Finsupp.single i k = m then 1 else 0

{R : Type u}
{σ : Type u_1}
[CommSemiring R]
[DecidableEq σ]
(i : σ)
(m : σ →₀ ℕ)
(k : ℕ)

MvPolynomial.coeff m (MvPolynomial.X i ^ k) = if Finsupp.single i k = m then 1 else 0


/-- Given left homology data `h₁` and `h₂` for two short complexes `S₁` and `S₂`,
a `LeftHomologyMapData` for a morphism `φ : S₁ ⟶ S₂`
consists of a description of the induced morphisms on the `K` (cycles)
and `H` (left homology) fields of `h₁` and `h₂`. -/
structure LeftHomologyMapData where
  /-- the induced map on cycles -/
  φK : h₁.K ⟶ h₂.K
  /-- the induced map on left homology -/
  φH : h₁.H ⟶ h₂.H
  /-- commutation with `i` -/
  commi : φK ≫ h₂.i = h₁.i ≫ φ.τ₂ := by aesop_cat
  /-- commutation with `f'` -/
  commf' : h₁.f' ≫ φK = φ.τ₁ ≫ h₂.f' := by aesop_cat
  /-- commutation with `π` -/
  commπ : h₁.π ≫ φH = φK ≫ h₂.π := by aesop_cat

(self : CategoryTheory.ShortComplex.LeftHomologyMapData φ h₁ h₂)

CategoryTheory.CategoryStruct.comp self.φK h₂.i = CategoryTheory.CategoryStruct.comp h₁.i φ.τ₂


theorem lt_of_not_ge {x y : Int} (h : ¬ (x ≤ y)) : y < x


theorem finite_le_nat (n : ℕ) : Set.Finite { i | i ≤ n }


/-- `f` factors through its image via the canonical morphism `p`. -/
protected theorem image.fac : Abelian.factorThruImage f ≫ image.ι f = f

CategoryTheory.Abelian.factorThruImage f ≫ CategoryTheory.Abelian.image.ι f = f


@[simp] theorem sign_neg : ∀ x : EReal, sign (-x) = -sign x


/-- Transfer the arguments to a map along an equivalence between argument indices.

This is the alternating version of `MultilinearMap.domDomCongr`. -/
@[simps]
def domDomCongr (σ : ι ≃ ι') (f : M [⋀^ι]→ₗ[R] N) : M [⋀^ι']→ₗ[R] N

{R : Type u_1}
[Semiring R]
{M : Type u_2}
[AddCommMonoid M]
[Module R M]
{N : Type u_3}
[AddCommMonoid N]
[Module R N]
{ι : Type u_7}
{ι' : Type u_8}
(σ : ι ≃ ι')
(f : M [⋀^ι]→ₗ[R] N)
(v : ι' → M)

(AlternatingMap.domDomCongr σ f) v = f (v ∘ ⇑σ)


lemma Indep.not_mem_closure_iff (hI : M.Indep I) (he : e ∈ M.E := by aesop_mat) :
    e ∉ M.closure I ↔ M.Indep (insert e I) ∧ e ∉ I

{α : Type u_2}
{M : Matroid α}
{e : α}
{I : Set α}
(hI : M.Indep I)
(he : e ∈ M.E := by aesop_mat)


theorem app_top (H : P f) [IsAffine X] [IsAffine Y] : Q (f.app ⊤)

(P : CategoryTheory.MorphismProperty AlgebraicGeometry.Scheme)

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

Q (AlgebraicGeometry.Scheme.Hom.app f ⊤)


@[simp]
theorem coe_inv_det (f : M ≃ₗ[R] M) : ↑(LinearEquiv.det f)⁻¹ = LinearMap.det (f.symm : M →ₗ[R] M)

{R : Type u_1}
[CommRing R]
{M : Type u_2}
[AddCommGroup M]
[Module R M]
(f : M ≃ₗ[R] M)

↑(LinearEquiv.det f)⁻¹ = LinearMap.det ↑f.symm


@[simp]
theorem antitone_comp_ofDual_iff : Antitone (f ∘ ofDual) ↔ Monotone f

{α : Type u}
{β : Type v}
[Preorder α]
[Preorder β]
{f : α → β}

Antitone (f ∘ ⇑OrderDual.ofDual) ↔ Monotone f


/-- The map part of the functor `LightCondSet ⥤ TopCat`  -/
@[simps]
def toTopCatMap : X.toTopCat ⟶ Y.toTopCat

∀ (a : X.val.obj (Opposite.op (LightProfinite.of PUnit.{u + 1}))),
  (LightCondSet.toTopCatMap f) a = f.val.app (Opposite.op (LightProfinite.of PUnit.{u + 1})) a


theorem restrict_le_restrict_union (hi₁ : MeasurableSet i) (hi₂ : v ≤[i] w) (hj₁ : MeasurableSet j)
    (hj₂ : v ≤[j] w) : v ≤[i ∪ j] w

{α : Type u_1}
{m : MeasurableSpace α}
{M : Type u_3}
[TopologicalSpace M]
[OrderedAddCommMonoid M]
[OrderClosedTopology M]
(v w : MeasureTheory.VectorMeasure α M)
{i j : Set α}
(hi₁ : MeasurableSet i)
(hi₂ : v.restrict i ≤ w.restrict i)
(hj₁ : MeasurableSet j)
(hj₂ : v.restrict j ≤ w.restrict j)


@[simp]
theorem spanSingleton_pow (x : P) (n : ℕ) : spanSingleton S x ^ n = spanSingleton S (x ^ n)

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

FractionalIdeal.spanSingleton S x ^ n = FractionalIdeal.spanSingleton S (x ^ n)


theorem piTensorHomMapFun₂_add (φ ψ : ⨂[R] i, s i →ₗ[R] t i →ₗ[R] t' i) :
    piTensorHomMapFun₂ (φ + ψ) = piTensorHomMapFun₂ φ + piTensorHomMapFun₂ ψ

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

(φ + ψ).piTensorHomMapFun₂ = φ.piTensorHomMapFun₂ + ψ.piTensorHomMapFun₂


@[to_additive]
theorem isUnit_iff_exists_inv' [CommMonoid M] {a : M} : IsUnit a ↔ ∃ b, b * a = 1


theorem image_coe_eq_restrict_image {δ : Type*} {f : α → δ} : f '' γ = β.restrict f '' γ

{α : Type u}
{β : Set α}
{γ : Set ↑β}
{δ : Type u_1}
{f : α → δ}

(f '' do
    let a ← γ
    pure ↑a) =
  β.restrict f '' γ


/-- The forgetful functor from `Top` to `Locale` which forgets that the space has "enough points".
-/
@[simps!]
def topToLocale : TopCat ⥤ Locale

topToLocale.obj X = Opposite.op (Frm.of (TopologicalSpace.Opens ↑X))


@[to_additive (attr := simp)]
theorem diam_smul [PseudoMetricSpace X] [SMul M X] [IsometricSMul M X] (c : M) (s : Set X) :
    Metric.diam (c • s) = Metric.diam s

{M : Type u}
{X : Type w}
[PseudoMetricSpace X]
[VAdd M X]
[IsometricVAdd M X]
(c : M)
(s : Set X)


theorem natTransOfLe_comm {S T : Sieve X} (h : S ≤ T) :
    natTransOfLe h ≫ functorInclusion _ = functorInclusion _

{C : Type u₁}
[CategoryTheory.Category.{v₁, u₁} C]
{X : C}
{S T : CategoryTheory.Sieve X}
(h : S ≤ T)

CategoryTheory.CategoryStruct.comp (CategoryTheory.Sieve.natTransOfLe h) T.functorInclusion = S.functorInclusion


theorem mem_lookup_iff {a : α} {b : β a} {s : AList β} :
    b ∈ lookup a s ↔ Sigma.mk a b ∈ s.entries

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

b ∈ AList.lookup a s ↔ ⟨a, b⟩ ∈ s.entries


@[simp]
theorem coe_toAddEquiv (f : R ≃+* S) : ⇑(f : R ≃+ S) = f

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


@[simp]
theorem toModuleHom_apply (x : L) (m : M) : toModuleHom R L M (x ⊗ₜ m) = ⁅x, m⁆

(R : Type u)
[CommRing R]
(L : Type v)
(M : Type w)
[LieRing L]
[LieAlgebra R L]
[AddCommGroup M]
[Module R M]
[LieRingModule L M]
[LieModule R L M]
(x : L)
(m : M)

(LieModule.toModuleHom R L M) (x ⊗ₜ[R] m) = ⁅x, m⁆


theorem exists_pos_preimage_ball [PseudoMetricSpace δ] (f : α → δ) (x : δ) (hμ : μ ≠ 0) :
    ∃ n : ℕ, 0 < μ (f ⁻¹' Metric.ball x n)

{α : Type u_1}
{δ : Type u_3}
{m0 : MeasurableSpace α}
{μ : MeasureTheory.Measure α}
[PseudoMetricSpace δ]
(f : α → δ)
(x : δ)
(hμ : μ ≠ 0)


@[to_additive (attr := norm_cast, simp)]
theorem coe_one [One β] : ⇑(1 : C(α, β)) = 1

{α : Type u_1}
{β : Type u_2}
[TopologicalSpace α]
[TopologicalSpace β]
[One β]


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

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

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

(P.conePointsIsoOfEquivalence Q e w).hom =
  Q.lift
    ((CategoryTheory.Limits.Cones.equivalenceOfReindexing e.symm
            ((CategoryTheory.isoWhiskerLeft e.inverse w).symm ≪≫ e.invFunIdAssoc G)).functor.obj
      s)


theorem ae_tendsto_limRatioMeas :
    ∀ᵐ x ∂μ, Tendsto (fun a => ρ a / μ a) (v.filterAt x) (𝓝 (v.limRatioMeas hρ x))

(hρ : ρ ≪ μ)

∀ᵐ (x : α) ∂μ, Filter.Tendsto (fun a => ρ a / μ a) (v.filterAt x) (𝓝 (v.limRatioMeas hρ x))


theorem eLpNorm_le_eLpNorm_mul_eLpNorm_top (p : ℝ≥0∞) {f : α → E} (hf : AEStronglyMeasurable f μ)
    (g : α → F) (b : E → F → G) (h : ∀ᵐ x ∂μ, ‖b (f x) (g x)‖₊ ≤ ‖f x‖₊ * ‖g x‖₊) :
    eLpNorm (fun x => b (f x) (g x)) p μ ≤ eLpNorm f p μ * eLpNorm g ∞ μ

(hf : MeasureTheory.AEStronglyMeasurable f μ)

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

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


/-- Composition with a linear isometry on the right preserves the norm of the iterated derivative
within a set. -/
theorem LinearIsometryEquiv.norm_iteratedFDeriv_comp_right (g : G ≃ₗᵢ[𝕜] E) (f : E → F) (x : G)
    (i : ℕ) : ‖iteratedFDeriv 𝕜 i (f ∘ g) x‖ = ‖iteratedFDeriv 𝕜 i f (g x)‖

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type uE}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{F : Type uF}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{G : Type uG}
[NormedAddCommGroup G]
[NormedSpace 𝕜 G]
(g : G ≃ₗᵢ[𝕜] E)
(f : E → F)
(x : G)
(i : ℕ)

‖iteratedFDeriv 𝕜 i (f ∘ ⇑g) x‖ = ‖iteratedFDeriv 𝕜 i f (g x)‖


@[to_additive (attr := fun_prop)]
theorem ContinuousAt.pow {f : X → M} {x : X} (hf : ContinuousAt f x) (n : ℕ) :
    ContinuousAt (fun x => f x ^ n) x

{M : Type u_3}
{X : Type u_5}
[TopologicalSpace X]
[TopologicalSpace M]
[Monoid M]
[ContinuousMul M]
{f : X → M}
{x : X}
(hf : ContinuousAt f x)
(n : ℕ)


theorem cmpLT.trans (h₁ : cmpLT cmp x y) (h₂ : cmpLT cmp y z) : cmpLT cmp x z

∀ {α : Sort u_1} {cmp : α → α → Ordering} {x y z : α},
  Batteries.RBNode.cmpLT cmp x y → Batteries.RBNode.cmpLT cmp y z → Batteries.RBNode.cmpLT cmp x z


theorem Γ_def : Γ = (inducedFunctor Scheme.toLocallyRingedSpace).op ⋙ LocallyRingedSpace.Γ

AlgebraicGeometry.Scheme.Γ =
  (CategoryTheory.inducedFunctor AlgebraicGeometry.Scheme.toLocallyRingedSpace).op ⋙
    AlgebraicGeometry.LocallyRingedSpace.Γ


@[simp] lemma exists_succAbove_eq_iff {x y : Fin (n + 1)} : (∃ z, x.succAbove z = y) ↔ y ≠ x


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

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


@[simp]
theorem measure_Ioc (a b : ℝ) : f.measure (Ioc a b) = ofReal (f b - f a)

f.measure (Set.Ioc a b) = ENNReal.ofReal (↑f b - ↑f a)


protected theorem GT.gt.lt [LT α] {x y : α} (h : x > y) : y < x

{α : Type u_2}
[LT α]
{x y : α}
(h : x > y)


protected theorem Monotone.IicExtend {f : Iic b → β} (hf : Monotone f) : Monotone (IicExtend f)

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


@[to_additive add_center_normal]
theorem center_normal : IsNormalSubgroup (center G)


theorem foldr_hom₂ (l : List ι) (f : α → β → γ) (op₁ : ι → α → α) (op₂ : ι → β → β)
    (op₃ : ι → γ → γ) (a : α) (b : β) (h : ∀ a b i, f (op₁ i a) (op₂ i b) = op₃ i (f a b)) :
    foldr op₃ (f a b) l = f (foldr op₁ a l) (foldr op₂ b l)

(f : α → β → γ)

(op₁ : ι → α → α)

(op₂ : ι → β → β)

(op₃ : ι → γ → γ)

(h : ∀ (a : α) (b : β) (i : ι), f (op₁ i a) (op₂ i b) = op₃ i (f a b))

List.foldr op₃ (f a b) l = f (List.foldr op₁ a l) (List.foldr op₂ b l)


theorem bounded (f : CauSeq β abv) : ∃ r, ∀ i, abv (f i) < r

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


@[simp]
theorem exists_fin_zero_pi {α : Fin 0 → Sort*} {P : (∀ i, α i) → Prop} :
    (∃ x, P x) ↔ P finZeroElim

{α : Fin 0 → Sort u_1}
{P : ((i : Fin 0) → α i) → Prop}


theorem erase_ne {i i' : ι} {f : Π₀ i, β i} (h : i' ≠ i) : (f.erase i) i' = f i'

{ι : Type u}
{β : ι → Type v}
[DecidableEq ι]
[(i : ι) → Zero (β i)]
{i i' : ι}
{f : Π₀ (i : ι), β i}
(h : i' ≠ i)


theorem card_fintype_Ioc : Fintype.card (Set.Ioc a b) = b - a


theorem Frequently.exists {p : α → Prop} {f : Filter α} (hp : ∃ᶠ x in f, p x) : ∃ x, p x

{α : Type u}
{p : α → Prop}
{f : Filter α}
(hp : ∃ᶠ (x : α) in f, p x)


theorem prod_assoc_symm_image {α β γ} {s : Set α} {t : Set β} {u : Set γ} :
    (Equiv.prodAssoc α β γ).symm '' s ×ˢ t ×ˢ u = (s ×ˢ t) ×ˢ u

{α : Type u_1}
{β : Type u_2}
{γ : Type u_3}
{s : Set α}
{t : Set β}
{u : Set γ}

⇑(Equiv.prodAssoc α β γ).symm '' s ×ˢ t ×ˢ u = (s ×ˢ t) ×ˢ u


/-- Precomposition of a 1-morphism as a functor from the category of 1-morphisms `a ⟶ b` into the
category of functors `(b ⟶ c) ⥤ (a ⟶ c)`. -/
@[simps]
def precomposing (a b c : B) : (a ⟶ b) ⥤ (b ⟶ c) ⥤ (a ⟶ c)

{B : Type u}
[CategoryTheory.Bicategory B]
(a b c : B)

∀ {X Y : a ⟶ b} (η : X ⟶ Y) (x : b ⟶ c),
  ((CategoryTheory.Bicategory.precomposing a b c).map η).app x = CategoryTheory.Bicategory.whiskerRight η x


theorem toLp_injective [μ.IsOpenPosMeasure] [NormedField 𝕜] [NormedSpace 𝕜 E] :
    Function.Injective (⇑(toLp p μ 𝕜 : C(α, E) →L[𝕜] Lp E p μ))

{α : Type u_1}
{E : Type u_2}
{m0 : MeasurableSpace α}
{p : ℝ≥0∞}
(μ : MeasureTheory.Measure α)
[NormedAddCommGroup E]
[TopologicalSpace α]
[BorelSpace α]
[SecondCountableTopologyEither α E]
[CompactSpace α]
[MeasureTheory.IsFiniteMeasure μ]
{𝕜 : Type u_5}
[Fact (1 ≤ p)]
[μ.IsOpenPosMeasure]
[NormedField 𝕜]
[NormedSpace 𝕜 E]

Function.Injective ⇑(ContinuousMap.toLp p μ 𝕜)


theorem IsMaximal.ne_top {I : Ideal α} (h : I.IsMaximal) : I ≠ ⊤

{α : Type u}
[Semiring α]
{I : Ideal α}
(h : I.IsMaximal)


protected theorem le_add_of_nonneg_right {a b : Int} (h : 0 ≤ b) : a ≤ a + b


@[simp] lemma unop_leftUnitor (X : Cᵒᵖ) : (λ_ X).unop = (λ_ (unop X)).symm

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

(CategoryTheory.MonoidalCategory.leftUnitor X).unop =
  (CategoryTheory.MonoidalCategory.leftUnitor (Opposite.unop X)).symm


lemma _root_.Submodule.map_comap_eq_of_le [RingHomSurjective τ₁₂] {f : F} {p : Submodule R₂ M₂}
    (h : p ≤ LinearMap.range f) : (p.comap f).map f = p

{R : Type u_1}
{R₂ : Type u_2}
{M : Type u_6}
{M₂ : Type u_7}
[Semiring R]
[Semiring R₂]
[AddCommMonoid M]
[AddCommMonoid M₂]
[Module R M]
[Module R₂ M₂]
{τ₁₂ : R →+* R₂}
{F : Type u_11}
[FunLike F M M₂]
[SemilinearMapClass F τ₁₂ M M₂]
[RingHomSurjective τ₁₂]
{f : F}
{p : Submodule R₂ M₂}
(h : p ≤ LinearMap.range f)

Submodule.map f (Submodule.comap f p) = p


/-- A `*`-ring `R` is a non-unital, non-associative (semi)ring with an involutive `star` operation
which is additive which makes `R` with its multiplicative structure into a `*`-multiplication
(i.e. `star (r * s) = star s * star r`).  -/
class StarRing (R : Type u) [NonUnitalNonAssocSemiring R] extends StarMul R where
  /-- `star` commutes with addition -/
  star_add : ∀ r s : R, star (r + s) = star r + star s

{R : Type u}
[NonUnitalNonAssocSemiring R]
[self : StarRing R]
(r s : R)


@[to_additive]
theorem MonoidHom.isGroupHom {G H : Type*} {_ : Group G} {_ : Group H} (f : G →* H) :
    IsGroupHom (f : G → H)

∀ {x : AddGroup G} {x_1 : AddGroup H} (f : G →+ H), IsAddGroupHom ⇑f


lemma dblX_of_Z_ne_zero {P Q : Fin 3 → F} (hP : W.Equation P) (hQ : W.Equation Q) (hPz : P z ≠ 0)
    (hQz : Q z ≠ 0) (hx : P x * Q z ^ 2 = Q x * P z ^ 2) (hy : P y * Q z ^ 3 ≠ W.negY Q * P z ^ 3) :
    W.dblX P / W.dblZ P ^ 2 = W.toAffine.addX (P x / P z ^ 2) (Q x / Q z ^ 2)
      (W.toAffine.slope (P x / P z ^ 2) (Q x / Q z ^ 2) (P y / P z ^ 3) (Q y / Q z ^ 3))


@[simp, rclike_simps]
theorem ofNat_im (n : ℕ) [n.AtLeastTwo] : im (no_index (OfNat.ofNat n) : K) = 0

{K : Type u_1}
[RCLike K]
(n : ℕ)
[n.AtLeastTwo]


/-- Under a dense continuous linear map, a submodule whose `TopologicalClosure` is `⊤` is sent to
another such submodule.  That is, the image of a dense set under a map with dense range is dense.
-/
theorem _root_.DenseRange.topologicalClosure_map_submodule [RingHomSurjective σ₁₂]
    [TopologicalSpace R₁] [TopologicalSpace R₂] [ContinuousSMul R₁ M₁] [ContinuousAdd M₁]
    [ContinuousSMul R₂ M₂] [ContinuousAdd M₂] {f : M₁ →SL[σ₁₂] M₂} (hf' : DenseRange f)
    {s : Submodule R₁ M₁} (hs : s.topologicalClosure = ⊤) :
    (s.map (f : M₁ →ₛₗ[σ₁₂] M₂)).topologicalClosure = ⊤

{R₁ : Type u_1}
{R₂ : Type u_2}
[Semiring R₁]
[Semiring R₂]
{σ₁₂ : R₁ →+* R₂}
{M₁ : Type u_4}
[TopologicalSpace M₁]
[AddCommMonoid M₁]
{M₂ : Type u_6}
[TopologicalSpace M₂]
[AddCommMonoid M₂]
[Module R₁ M₁]
[Module R₂ M₂]
[RingHomSurjective σ₁₂]
[TopologicalSpace R₁]
[TopologicalSpace R₂]
[ContinuousSMul R₁ M₁]
[ContinuousAdd M₁]
[ContinuousSMul R₂ M₂]
[ContinuousAdd M₂]
{f : M₁ →SL[σ₁₂] M₂}
(hf' : DenseRange ⇑f)
{s : Submodule R₁ M₁}
(hs : s.topologicalClosure = ⊤)

(Submodule.map (↑f) s).topologicalClosure = ⊤


theorem div_pos_of_neg_of_neg (ha : a < 0) (hb : b < 0) : 0 < a / b

{α : Type u_2}
[LinearOrderedField α]
{a b : α}
(ha : a < 0)
(hb : b < 0)


theorem beq_eq_decide_eq [BEq α] [LawfulBEq α] [DecidableEq α] (a b : α) :
    (a == b) = decide (a = b)

{α : Type u_1}
[BEq α]
[LawfulBEq α]
[DecidableEq α]
(a b : α)


theorem nmul_succ (a b) : a ⨳ succ b = a ⨳ b ♯ a


@[simp]
theorem apply_pow_apply_eq_iff (f : Perm α) (n : ℕ) {x : α} :
    f ((f ^ n) x) = (f ^ n) x ↔ f x = x

{α : Type u_1}
(f : Equiv.Perm α)
(n : ℕ)
{x : α}


/-- The cycles functor `ShortComplex C ⥤ C` which sends a short complex `S` to `S.cycles`
which is a kernel of `S.g : S.X₂ ⟶ S.X₃`. -/
@[simps]
noncomputable def cyclesFunctor : ShortComplex C ⥤ C

(CategoryTheory.ShortComplex.cyclesFunctor C).obj S = S.cycles


@[simp]
theorem inr_pushoutZeroZeroIso_hom (X Y : C) [HasBinaryCoproduct X Y] :
    pushout.inr _ _ ≫ (pushoutZeroZeroIso X Y).hom = coprod.inr

CategoryTheory.Limits.pushout.inr 0 0 ≫ (CategoryTheory.Limits.pushoutZeroZeroIso X Y).hom =
  CategoryTheory.Limits.coprod.inr


@[reassoc]
lemma opcyclesMap_comp : opcyclesMap (φ ≫ ψ) i = opcyclesMap φ i ≫ opcyclesMap ψ i

HomologicalComplex.opcyclesMap (φ ≫ ψ) i = HomologicalComplex.opcyclesMap φ i ≫ HomologicalComplex.opcyclesMap ψ i


lemma isReal_comp_iff {f : k ≃+* K} {φ : K →+* ℂ} :
    IsReal (φ.comp (f : k →+* K)) ↔ IsReal φ

{K : Type u_1}
[Field K]
{k : Type u_2}
[Field k]
{f : k ≃+* K}
{φ : K →+* ℂ}

NumberField.ComplexEmbedding.IsReal (φ.comp ↑f) ↔ NumberField.ComplexEmbedding.IsReal φ


lemma IsReal.comp (f : k →+* K) {φ : K →+* ℂ} (hφ : IsReal φ) :
    IsReal (φ.comp f)

(hφ : NumberField.ComplexEmbedding.IsReal φ)


/-- If we multiply a positive solution with the inverse of a fundamental solution,
the `y`-coordinate remains nonnegative. -/
theorem mul_inv_y_nonneg {a₁ : Solution₁ d} (h : IsFundamental a₁) {a : Solution₁ d} (hax : 1 < a.x)
    (hay : 0 < a.y) : 0 ≤ (a * a₁⁻¹).y

{d : ℤ}
{a₁ : Pell.Solution₁ d}
(h : Pell.IsFundamental a₁)
{a : Pell.Solution₁ d}
(hax : 1 < a.x)
(hay : 0 < a.y)


@[simp]
theorem measurableSet_toMeasurable (μ : Measure α) (s : Set α) :
    MeasurableSet (toMeasurable μ s)

{α : Type u_1}
[MeasurableSpace α]
(μ : MeasureTheory.Measure α)
(s : Set α)

MeasurableSet (MeasureTheory.toMeasurable μ s)


@[reassoc (attr := simp)]
lemma mappingConeCompHomotopyEquiv_hom_inv_id :
    (mappingConeCompHomotopyEquiv f g).hom ≫
      (mappingConeCompHomotopyEquiv f g).inv = 𝟙 _

(CochainComplex.mappingConeCompHomotopyEquiv f g).hom ≫ (CochainComplex.mappingConeCompHomotopyEquiv f g).inv =
  𝟙 (CochainComplex.mappingCone g)


theorem of_eq (e : x = y) : Inseparable x y

{X : Type u_1}
[TopologicalSpace X]
{x y : X}
(e : x = y)


/--
If `B` is a strict bicategory and `I` is a (1-)category, any functor (of 1-categories) `I ⥤ B` can
be promoted to a pseudofunctor from `LocallyDiscrete I` to `B`.
-/
@[simps]
def Functor.toPseudoFunctor (F : I ⥤ B) : Pseudofunctor (LocallyDiscrete I) B

{I : Type u₁}
[CategoryTheory.Category.{v₁, u₁} I]
{B : Type u₂}
[CategoryTheory.Bicategory B]
[CategoryTheory.Bicategory.Strict B]
(F : CategoryTheory.Functor I B)
(i : CategoryTheory.LocallyDiscrete I)


@[gcongr, mono]
theorem normalizer_mono (h : N₁ ≤ N₂) : normalizer N₁ ≤ normalizer N₂

{R : Type u_1}
{L : Type u_2}
{M : Type u_3}
[CommRing R]
[LieRing L]
[LieAlgebra R L]
[AddCommGroup M]
[Module R M]
[LieRingModule L M]
[LieModule R L M]
{N₁ N₂ : LieSubmodule R L M}
(h : N₁ ≤ N₂)


nonrec theorem IsLocalMaxOn.comp_mono (hf : IsLocalMaxOn f s a) {g : β → γ} (hg : Monotone g) :
    IsLocalMaxOn (g ∘ f) s a

{α : Type u}
{β : Type v}
{γ : Type w}
[TopologicalSpace α]
[Preorder β]
[Preorder γ]
{f : α → β}
{s : Set α}
{a : α}
(hf : IsLocalMaxOn f s a)
{g : β → γ}
(hg : Monotone g)


/-- Two real exponents `p, q` are conjugate if they are `> 1` and satisfy the equality
`1/p + 1/q = 1`. This condition shows up in many theorems in analysis, notably related to `L^p`
norms. -/
@[mk_iff]
structure IsConjExponent (p q : ℝ) : Prop where
  one_lt : 1 < p
  inv_add_inv_conj : p⁻¹ + q⁻¹ = 1


/-- If `e : C ≌ D` is an equivalence of categories, and `iso : e.functor ≅ G` is
an isomorphism, then there is an equivalence of categories whose functor is `G`. -/
@[simps!]
def changeFunctor (e : C ≌ D) {G : C ⥤ D} (iso : e.functor ≅ G) : C ≌ D

{C : Type u₁}
[CategoryTheory.Category.{v₁, u₁} C]
{D : Type u₂}
[CategoryTheory.Category.{v₂, u₂} D]
(e : C ≌ D)
{G : CategoryTheory.Functor C D}
(iso : e.functor ≅ G)

(e.changeFunctor iso).inverse = e.inverse


theorem inr_mem_sumLift₂ {c₂ : γ₂} :
    inr c₂ ∈ sumLift₂ f g a b ↔ ∃ a₂ b₂, a = inr a₂ ∧ b = inr b₂ ∧ c₂ ∈ g a₂ b₂

{α₁ : Type u_1}
{α₂ : Type u_2}
{β₁ : Type u_3}
{β₂ : Type u_4}
{γ₁ : Type u_5}
{γ₂ : Type u_6}
{f : α₁ → β₁ → Finset γ₁}
{g : α₂ → β₂ → Finset γ₂}
{a : α₁ ⊕ α₂}
{b : β₁ ⊕ β₂}
{c₂ : γ₂}

Sum.inr c₂ ∈ Finset.sumLift₂ f g a b ↔ ∃ a₂ b₂, a = Sum.inr a₂ ∧ b = Sum.inr b₂ ∧ c₂ ∈ g a₂ b₂


theorem mem_finsuppAntidiag_insert {a : ι} {s : Finset ι}
    (h : a ∉ s) (n : μ) {f : ι →₀ μ} :
    f ∈ finsuppAntidiag (insert a s) n ↔
      ∃ m ∈ antidiagonal n, ∃ (g : ι →₀ μ),
        f = Finsupp.update g a m.1 ∧ g ∈ finsuppAntidiag s m.2

{ι : Type u_1}
{μ : Type u_2}
[DecidableEq ι]
[AddCommMonoid μ]
[Finset.HasAntidiagonal μ]
[DecidableEq μ]
{a : ι}
{s : Finset ι}
(h : a ∉ s)
(n : μ)
{f : ι →₀ μ}

f ∈ (insert a s).finsuppAntidiag n ↔ ∃ m ∈ Finset.antidiagonal n, ∃ g, f = g.update a m.1 ∧ g ∈ s.finsuppAntidiag m.2


theorem append_snoc {α} (as : Fin n → α) (bs : Fin m → α) (b : α) :
    Fin.append as (snoc bs b) = snoc (Fin.append as bs) b

{m n : ℕ}
{α : Type u_1}
(as : Fin n → α)
(bs : Fin m → α)
(b : α)

Fin.append as (Fin.snoc bs b) = Fin.snoc (Fin.append as bs) b


@[deprecated (since := "2024-04-07")]
theorem sublist_of_cons_sublist_cons {a} (h : a :: l₁ <+ a :: l₂) : l₁ <+ l₂

{α : Type u}
{l₁ l₂ : List α}
{a : α}
(h : (a :: l₁).Sublist (a :: l₂))


theorem Measure.isComplete_iff : μ.IsComplete ↔ ∀ s, μ s = 0 → MeasurableSet s

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

μ.IsComplete ↔ ∀ (s : Set α), μ s = 0 → MeasurableSet s


@[simp]
lemma coe_add (z₁ z₂ : Cocycle F G n) :
    (↑(z₁ + z₂) : Cochain F G n) = (z₁ : Cochain F G n) + (z₂ : Cochain F G n)

(z₁ z₂ : CochainComplex.HomComplex.Cocycle F G n)


{α : Type u}
[TopologicalSpace α]
[LinearOrder α]
[ClosedIciTopology α]
{a : α}


theorem Perm.subset_congr_left {l₁ l₂ l₃ : List α} (h : l₁ ~ l₂) : l₁ ⊆ l₃ ↔ l₂ ⊆ l₃

{α : Type u_1}
{l₁ l₂ l₃ : List α}
(h : l₁.Perm l₂)

l₁ ⊆ l₃ ↔ l₂ ⊆ l₃


theorem collapseF.not_lt [IsWellOrder β s] (f : r ↪r s) (a : α) {b}
    (h : ∀ a' (_ : r a' a), s (collapseF f a').1 b) : ¬s b (collapseF f a).1

(h : ∀ (a' : α), r a' a → s (↑(f.collapseF a')) b)


@[simp]
theorem smul_coeff {r : R} {x : HahnSeries Γ V} {a : Γ} : (r • x).coeff a = r • x.coeff a

{Γ : Type u_1}
{R : Type u_2}
[PartialOrder Γ]
{V : Type u_3}
[Zero V]
[SMulZeroClass R V]
{r : R}
{x : HahnSeries Γ V}
{a : Γ}


/-- The product of two strictly monotone functions is strictly monotone. -/
@[to_additive add "The sum of two strictly monotone functions is strictly monotone."]
theorem StrictMonoOn.mul' [CovariantClass α α (· * ·) (· < ·)]
    [CovariantClass α α (swap (· * ·)) (· < ·)] (hf : StrictMonoOn f s) (hg : StrictMonoOn g s) :
    StrictMonoOn (fun x => f x * g x) s

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

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


theorem _root_.Wbtw.wSameSide₃₂ {s : AffineSubspace R P} {x y z : P} (h : Wbtw R x y z)
    (hx : x ∈ s) : s.WSameSide z y

{R : Type u_1}
{V : Type u_2}
{P : Type u_4}
[StrictOrderedCommRing R]
[AddCommGroup V]
[Module R V]
[AddTorsor V P]
{s : AffineSubspace R P}
{x y z : P}
(h : Wbtw R x y z)
(hx : x ∈ s)


@[simp, norm_cast]
theorem coe_eq_univ {U : Opens α} : (U : Set α) = univ ↔ U = ⊤

{α : Type u_2}
[TopologicalSpace α]
{U : TopologicalSpace.Opens α}


theorem conj_comp (e : α ≃ β) (f₁ f₂ : α → α) : e.conj (f₁ ∘ f₂) = e.conj f₁ ∘ e.conj f₂

{α : Sort u}
{β : Sort v}
(e : α ≃ β)
(f₁ f₂ : α → α)


/-- If `f` is monic, the powers of `h.root` form a basis. -/
@[simps! gen dim basis]
def powerBasis (h : IsAdjoinRootMonic S f) : PowerBasis R S

{R : Type u}
{S : Type v}
[CommRing R]
[Ring S]
{f : R[X]}
[Algebra R S]
(h : IsAdjoinRootMonic S f)


/-- The canonical isomorphism of triangles
`binaryProductTriangle X₁ X₂ ≅ binaryBiproductTriangle X₁ X₂`. -/
@[simps!]
def binaryProductTriangleIsoBinaryBiproductTriangle
    (X₁ X₂ : C) [HasZeroMorphisms C] [HasBinaryBiproduct X₁ X₂] :
    binaryProductTriangle X₁ X₂ ≅ binaryBiproductTriangle X₁ X₂

(CategoryTheory.Pretriangulated.binaryProductTriangleIsoBinaryBiproductTriangle X₁ X₂).hom.hom₁ = 𝟙 X₁


@[simp]
theorem mem_disconnect_objs_iff {c : C} : c ∈ S.disconnect.objs ↔ c ∈ S.objs

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


@[to_additive] lemma mabs_le_mabs_of_one_le (ha : 1 ≤ a) (hab : a ≤ b) : |a|ₘ ≤ |b|ₘ

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


theorem copy_eq (f : BiheytingHom α β) (f' : α → β) (h : f' = f) : f.copy f' h = f

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


theorem inner_self_eq_norm_mul_norm (x : F) : re ⟪x, x⟫ = ‖x‖ * ‖x‖

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


@[simp] lemma ofNat_eq_natCast (n : ℕ) : Int.ofNat n = n


lemma congr_apply {X} {P : Cᵒᵖ ⥤ D} {S : J.Cover X} (x : Meq P S) {Y}
    {f g : Y ⟶ X} (h : f = g) (hf : S f) :
    x ⟨_, _, hf⟩ = x ⟨_, g, by simpa only [← h] using hf⟩

{J : CategoryTheory.GrothendieckTopology C}

[CategoryTheory.Category.{max v u, w} D]


protected theorem const_mul (hm : IsPeriodicPt f m x) (n : ℕ) : IsPeriodicPt f (n * m) x

{α : Type u_1}
{f : α → α}
{x : α}
{m : ℕ}
(hm : Function.IsPeriodicPt f m x)
(n : ℕ)


@[simp] lemma unop_f' {S : ShortComplex Cᵒᵖ} (h : S.RightHomologyData) :
    h.unop.f' = h.g'.unop


@[deprecated map_one (since := "2024-06-26")]
protected theorem map_one : φ 1 = 1

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


@[simp]
lemma ltTrichotomy_gt (h : y < x) : ltTrichotomy x y p q r = r

{α : Type u_2}
[LinearOrder α]
{P : Sort u_5}
{x y : α}
{p q r : P}
(h : y < x)


theorem HasFiniteFPowerSeriesOnBall.sum (h : HasFiniteFPowerSeriesOnBall f p x n r) {y : E}
    (hy : y ∈ EMetric.ball (0 : E) r) : f (x + y) = p.sum y


protected theorem convex (hAB : IsExposed 𝕜 A B) (hA : Convex 𝕜 A) : Convex 𝕜 B

{𝕜 : Type u_1}
{E : Type u_2}
[TopologicalSpace 𝕜]
[LinearOrderedRing 𝕜]
[AddCommMonoid E]
[TopologicalSpace E]
[Module 𝕜 E]
{A B : Set E}
(hAB : IsExposed 𝕜 A B)
(hA : Convex 𝕜 A)


@[simp]
theorem coe_quotientOut (α) [Setoid α] : ↑(quotientOut α) = Quotient.out

⇑(Function.Embedding.quotientOut α) = Quotient.out


/-- Given two perfectly-paired `R`-modules `M` and `N`, a root pairing with indexing set `ι`
is the data of an `ι`-indexed subset of `M` ("the roots"), an `ι`-indexed subset of `N`
("the coroots"), and an `ι`-indexed set of permutations of `ι`, such that each root-coroot pair
evaluates to `2`, and the permutation attached to each element of `ι` is compatible with the
reflections on the corresponding roots and coroots.

It exists to allow for a convenient unification of the theories of root systems and root data. -/
structure RootPairing extends PerfectPairing R M N :=
  /-- A parametrized family of vectors, called roots. -/
  root : ι ↪ M
  /-- A parametrized family of dual vectors, called coroots. -/
  coroot : ι ↪ N
  root_coroot_two : ∀ i, toLin (root i) (coroot i) = 2
  /-- A parametrized family of permutations, induced by reflection. -/
  reflection_perm : ι → (ι ≃ ι)
  reflection_perm_root : ∀ i j,
    root j - toLin (root j) (coroot i) • root i = root (reflection_perm i j)
  reflection_perm_coroot : ∀ i j,
    coroot j - toLin (root i) (coroot j) • coroot i = coroot (reflection_perm i j)

{ι : Type u_1}
{R : Type u_2}
{M : Type u_3}
{N : Type u_4}
[CommRing R]
[AddCommGroup M]
[Module R M]
[AddCommGroup N]
[Module R N]
(self : RootPairing ι R M N)
(i j : ι)

self.coroot j - (self.toLin (self.root i)) (self.coroot j) • self.coroot i = self.coroot ((self.reflection_perm i) j)


theorem Summable.of_nnnorm_bounded {f : ι → E} (g : ι → ℝ≥0) (hg : Summable g)
    (h : ∀ i, ‖f i‖₊ ≤ g i) : Summable f

{ι : Type u_1}
{E : Type u_3}
[SeminormedAddCommGroup E]
[CompleteSpace E]
{f : ι → E}
(g : ι → ℝ≥0)
(hg : Summable g)
(h : ∀ (i : ι), ‖f i‖₊ ≤ g i)


theorem mem_ordConnectedComponent_trans (hxy : y ∈ ordConnectedComponent s x)
    (hyz : z ∈ ordConnectedComponent s y) : z ∈ ordConnectedComponent s x

{α : Type u_1}
[LinearOrder α]
{s : Set α}
{x y z : α}
(hxy : y ∈ s.ordConnectedComponent x)
(hyz : z ∈ s.ordConnectedComponent y)


theorem diff_diff_comm {s t u : Set α} : (s \ t) \ u = (s \ u) \ t


theorem Poly.denote_sort_go (ctx : Context) (p : Poly) (r : Poly) : (sort.go p r).denote ctx = p.denote ctx + r.denote ctx

(ctx : Nat.Linear.Context)
(p r : Nat.Linear.Poly)

Nat.Linear.Poly.denote ctx (Nat.Linear.Poly.sort.go p r) = Nat.Linear.Poly.denote ctx p + Nat.Linear.Poly.denote ctx r


private theorem mk_mul (x y : Pre R X) :
    Quot.mk (Rel R X) (x * y) = (HMul.hMul (self := instHMul (α := FreeAlgebra R X))
    (Quot.mk (Rel R X) x) (Quot.mk (Rel R X) y))

(R : Type u_1)
[CommSemiring R]
(X : Type u_2)
(x y : FreeAlgebra.Pre R X)

Quot.mk (FreeAlgebra.Rel R X) (x * y) = Quot.mk (FreeAlgebra.Rel R X) x * Quot.mk (FreeAlgebra.Rel R X) y


lemma add_self_of_Y_ne' {x₁ y₁ : F} {h₁ : W.Nonsingular x₁ y₁} (hy : y₁ ≠ W.negY x₁ y₁) :
    some h₁ + some h₁ = -some (nonsingular_negAdd h₁ h₁ fun _ => hy)

{F : Type u}
[Field F]
{W : WeierstrassCurve.Affine F}
{x₁ y₁ : F}
{h₁ : W.Nonsingular x₁ y₁}
(hy : y₁ ≠ W.negY x₁ y₁)

WeierstrassCurve.Affine.Point.some h₁ + WeierstrassCurve.Affine.Point.some h₁ = -WeierstrassCurve.Affine.Point.some ⋯


/-- The slit plane is star-convex at a positive number. -/
lemma starConvex_slitPlane {z : ℂ} (hz : 0 < z) : StarConvex ℝ z slitPlane


@[simp]
theorem realize_all : (all θ).Realize v xs ↔ ∀ a : M, θ.Realize v (Fin.snoc xs a)

{L : FirstOrder.Language}
{M : Type w}
[L.Structure M]
{α : Type u'}
{l : ℕ}
{θ : L.BoundedFormula α l.succ}
{v : α → M}
{xs : Fin l → M}

θ.all.Realize v xs ↔ ∀ (a : M), θ.Realize v (Fin.snoc xs a)


lemma coe_eta : (η : 𝓞 K) = hζ.toInteger

{K : Type u_1}
[Field K]
{ζ : K}
(hζ : IsPrimitiveRoot ζ ↑3)


@[bv_toNat] theorem toNat_ne (x y : BitVec n) : x ≠ y ↔ x.toNat ≠ y.toNat


theorem IsSpectralMap.comp {f : β → γ} {g : α → β} (hf : IsSpectralMap f) (hg : IsSpectralMap g) :
    IsSpectralMap (f ∘ g)

{α : Type u_2}
{β : Type u_3}
{γ : Type u_4}
[TopologicalSpace α]
[TopologicalSpace β]
[TopologicalSpace γ]
{f : β → γ}
{g : α → β}
(hf : IsSpectralMap f)
(hg : IsSpectralMap g)


/-- A *left*-invariant measure is quasi-preserved by *right*-multiplication.
This should not be confused with `(measurePreserving_mul_right μ g).quasiMeasurePreserving`. -/
@[to_additive
"A *left*-invariant measure is quasi-preserved by *right*-addition.
This should not be confused with `(measurePreserving_add_right μ g).quasiMeasurePreserving`. "]
theorem quasiMeasurePreserving_mul_right [IsMulLeftInvariant μ] (g : G) :
    QuasiMeasurePreserving (fun h : G => h * g) μ μ

{G : Type u_1}
[MeasurableSpace G]
[Group G]
[MeasurableMul₂ G]
(μ : MeasureTheory.Measure G)
[MeasureTheory.SFinite μ]
[MeasurableInv G]
[μ.IsMulLeftInvariant]
(g : G)

MeasureTheory.Measure.QuasiMeasurePreserving (fun h => h * g) μ μ


/-- The arrows pseudo-equal to a zero morphism are precisely the zero morphisms. -/
theorem pseudoZero_aux {P : C} (Q : C) (f : Over P) : f ≈ (0 : Q ⟶ P) ↔ f.hom = 0

{C : Type u}
[CategoryTheory.Category.{v, u} C]
[CategoryTheory.Abelian C]
{P : C}
(Q : C)
(f : CategoryTheory.Over P)

f ≈ CategoryTheory.Over.mk 0 ↔ f.hom = 0


@[simp]
theorem coe_pointwise_vadd (v : V) (s : AffineSubspace k P) :
    ((v +ᵥ s : AffineSubspace k P) : Set P) = v +ᵥ (s : Set P)

{k : Type u_1}
[Ring k]
{V : Type u_2}
{P : Type u_3}
[AddCommGroup V]
[Module k V]
[AffineSpace V P]
(v : V)
(s : AffineSubspace k P)


lemma isUnramified_iff :
    IsUnramified k w ↔ IsReal w ∨ IsComplex (w.comap (algebraMap k K))

{k : Type u_1}
[Field k]
{K : Type u_2}
[Field K]
[Algebra k K]
{w : NumberField.InfinitePlace K}

NumberField.InfinitePlace.IsUnramified k w ↔ w.IsReal ∨ (w.comap (algebraMap k K)).IsComplex


@[ext]
theorem ext (L₁' L₂' : LieSubalgebra R L) (h : ∀ x, x ∈ L₁' ↔ x ∈ L₂') : L₁' = L₂'

{R : Type u}
{L : Type v}
[CommRing R]
[LieRing L]
[LieAlgebra R L]
(L₁' L₂' : LieSubalgebra R L)
(h : ∀ (x : L), x ∈ L₁' ↔ x ∈ L₂')


/-- Adjoins a `⊤` to the codomain of an `InfHom`. -/
@[simps]
def withTop' [OrderTop β] (f : InfHom α β) : InfTopHom (WithTop α) β

{α : Type u_3}
{β : Type u_4}
[SemilatticeInf α]
[SemilatticeInf β]
[OrderTop β]
(f : InfHom α β)
(a : WithTop α)

f.withTop'.toInfHom a = Option.elim a ⊤ ⇑f


@[to_additive index_mul_card]
theorem index_mul_card : H.index * Nat.card H = Nat.card G

{G : Type u_1}
[Group G]
(H : Subgroup G)


/-- A version of `Finite.exists_minimal_wrt` with the (weaker) hypothesis that the image of `s`
  is finite rather than `s` itself. -/
lemma Finite.exists_minimal_wrt' [PartialOrder β] (f : α → β) (s : Set α) (h : (f '' s).Finite)
    (hs : s.Nonempty) : (∃ a ∈ s, ∀ (a' : α), a' ∈ s → f a' ≤ f a → f a = f a')

{α : Type u}
{β : Type v}
[PartialOrder β]
(f : α → β)
(s : Set α)
(h : (f '' s).Finite)
(hs : s.Nonempty)

∃ a ∈ s, ∀ a' ∈ s, f a' ≤ f a → f a = f a'


lemma order_eq_top_iff (hf : AnalyticAt 𝕜 f z₀) : hf.order = ⊤ ↔ ∀ᶠ z in 𝓝 z₀, f z = 0

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

hf.order = ⊤ ↔ ∀ᶠ (z : 𝕜) in 𝓝 z₀, f z = 0


/-- A bounded variation function into a finite dimensional product vector space is differentiable
almost everywhere. Superseded by `ae_differentiableWithinAt_of_mem`. -/
theorem ae_differentiableWithinAt_of_mem_pi {ι : Type*} [Fintype ι] {f : ℝ → ι → ℝ} {s : Set ℝ}
    (h : LocallyBoundedVariationOn f s) : ∀ᵐ x, x ∈ s → DifferentiableWithinAt ℝ f s x

{ι : Type u_4}
[Fintype ι]
{f : ℝ → ι → ℝ}
{s : Set ℝ}
(h : LocallyBoundedVariationOn f s)

∀ᵐ (x : ℝ), x ∈ s → DifferentiableWithinAt ℝ f s x


@[simp]
theorem toRel_prop (s : Set (Sym2 α)) (x y : α) : ToRel s x y ↔ s(x, y) ∈ s

{α : Type u_1}
(s : Set (Sym2 α))
(x y : α)


@[to_additive (attr := simp)]
theorem restrict_mrange (f : M →* N) : mrange (f.restrict S) = S.map f

{M : Type u_1}
{N : Type u_2}
[MulOneClass M]
[MulOneClass N]
(S : Submonoid M)
(f : M →* N)

MonoidHom.mrange (f.restrict S) = Submonoid.map f S


@[simp]
lemma prodEquiv_symm_apply_snd (x : X₁ × X₂) :
    (Limits.prod.snd : X₁ ⨯ X₂ ⟶ X₂) ((prodEquiv X₁ X₂).symm x) = x.2

[CategoryTheory.Limits.PreservesLimit (CategoryTheory.Limits.pair X₁ X₂) (CategoryTheory.forget C)]

(x : (CategoryTheory.forget C).obj X₁ × (CategoryTheory.forget C).obj X₂)

CategoryTheory.Limits.prod.snd ((CategoryTheory.Limits.Concrete.prodEquiv X₁ X₂).symm x) = x.2


theorem valuedAdicCompletion_def {x : v.adicCompletion K} :
    Valued.v x = @Valued.extension K _ _ _ (adicValued v) x

(v : IsDedekindDomain.HeightOneSpectrum R)

{x : IsDedekindDomain.HeightOneSpectrum.adicCompletion K v}


theorem norm_compLp_le (hg : LipschitzWith c g) (g0 : g 0 = 0) (f : Lp E p μ) :
    ‖hg.compLp g0 f‖ ≤ c * ‖f‖

{α : Type u_1}
{E : Type u_2}
{F : Type u_3}
{m0 : MeasurableSpace α}
{p : ℝ≥0∞}
{μ : MeasureTheory.Measure α}
[NormedAddCommGroup E]
[NormedAddCommGroup F]
{g : E → F}
{c : ℝ≥0}
(hg : LipschitzWith c g)
(g0 : g 0 = 0)
(f : ↥(MeasureTheory.Lp E p μ))


@[simp] lemma mapSetEmbedding_ground (M : Matroid α) (f : M.E ↪ β) :
    (M.mapSetEmbedding f).E = range f

{α : Type u_1}
{β : Type u_2}
(M : Matroid α)
(f : ↑M.E ↪ β)


@[elab_as_elim]
theorem trans_induction_on {P : ∀ {a b : α}, ReflTransGen r a b → Prop} {a b : α}
    (h : ReflTransGen r a b) (ih₁ : ∀ a, @P a a refl) (ih₂ : ∀ {a b} (h : r a b), P (single h))
    (ih₃ : ∀ {a b c} (h₁ : ReflTransGen r a b) (h₂ : ReflTransGen r b c), P h₁ → P h₂ →
     P (h₁.trans h₂)) : P h

{P : {a b : α} → Relation.ReflTransGen r a b → Prop}

(ih₃ : ∀ {a b c : α} (h₁ : Relation.ReflTransGen r a b) (h₂ : Relation.ReflTransGen r b c), P h₁ → P h₂ → P ⋯)


theorem comp₂ (f : ℕ → ℕ → ℕ) (hf : @Primrec' 2 fun v => f v.head v.tail.head) {n g h}
    (hg : @Primrec' n g) (hh : @Primrec' n h) : Primrec' fun v => f (g v) (h v)

(f : ℕ → ℕ → ℕ)

(hf : Nat.Primrec' fun v => f v.head v.tail.head)


@[simp]
theorem isUnit_iff {I : Ideal R} : IsUnit I ↔ I = ⊤

{R : Type u}
[CommSemiring R]
{I : Ideal R}


lemma IsIntegralCurveAt.comp_add (hγ : IsIntegralCurveAt γ v t₀) (dt : ℝ) :
    IsIntegralCurveAt (γ ∘ (· + dt)) v (t₀ - dt)

{E : Type u_1}
[NormedAddCommGroup E]
[NormedSpace ℝ E]
{H : Type u_2}
[TopologicalSpace H]
{I : ModelWithCorners ℝ E H}
{M : Type u_3}
[TopologicalSpace M]
[ChartedSpace H M]
[SmoothManifoldWithCorners I M]
{γ : ℝ → M}
{v : (x : M) → TangentSpace I x}
{t₀ : ℝ}
(hγ : IsIntegralCurveAt γ v t₀)
(dt : ℝ)

IsIntegralCurveAt (γ ∘ fun x => x + dt) v (t₀ - dt)


@[simp]
theorem isSuccLimitRecOn_succ (hs : ∀ a, ¬IsMax a → C (succ a)) (hl : ∀ a, IsSuccLimit a → C a)
    (b : α) : @isSuccLimitRecOn α _ _ C (succ b) hs hl = hs b (not_isMax b)

(hs : (a : α) → ¬IsMax a → C (Order.succ a))

(hl : (a : α) → Order.IsSuccLimit a → C a)

Order.isSuccLimitRecOn (Order.succ b) hs hl = hs b ⋯


lemma algebraMap_le_cfc (f : R → R) (r : R) (a : A) (h : ∀ x ∈ spectrum R a, r ≤ f x)
    (hf : ContinuousOn f (spectrum R a) := by cfc_cont_tac) (ha : p a := by cfc_tac) :
    algebraMap R A r ≤ cfc f a

[∀ (α : Type u_1) [inst : TopologicalSpace α], StarOrderedRing C(α, R)]


lemma integrable_compProd_iff [SFinite μ] [IsSFiniteKernel κ] {E : Type*} [NormedAddCommGroup E]
    {f : α × β → E} (hf : AEStronglyMeasurable f (μ ⊗ₘ κ)) :
    Integrable f (μ ⊗ₘ κ) ↔
      (∀ᵐ x ∂μ, Integrable (fun y => f (x, y)) (κ x)) ∧
        Integrable (fun x => ∫ y, ‖f (x, y)‖ ∂(κ x)) μ

(hf : MeasureTheory.AEStronglyMeasurable f (μ ⊗ₘ κ))

MeasureTheory.Integrable f (μ ⊗ₘ κ) ↔
  (∀ᵐ (x : α) ∂μ, MeasureTheory.Integrable (fun y => f (x, y)) (κ x)) ∧
    MeasureTheory.Integrable (fun x => ∫ (y : β), ‖f (x, y)‖ ∂κ x) μ


theorem ext_iff₂ {f g : M →ₛₗ[ρ₁₂] N →ₛₗ[σ₁₂] P} : f = g ↔ ∀ m n, f m n = g m n

{R : Type u_1}
[Semiring R]
{S : Type u_2}
[Semiring S]
{R₂ : Type u_3}
[Semiring R₂]
{S₂ : Type u_4}
[Semiring S₂]
{M : Type u_5}
{N : Type u_6}
{P : Type u_7}
[AddCommMonoid M]
[AddCommMonoid N]
[AddCommMonoid P]
[Module R M]
[Module S N]
[Module R₂ P]
[Module S₂ P]
[SMulCommClass S₂ R₂ P]
{ρ₁₂ : R →+* R₂}
{σ₁₂ : S →+* S₂}
{f g : M →ₛₗ[ρ₁₂] N →ₛₗ[σ₁₂] P}

f = g ↔ ∀ (m : M) (n : N), (f m) n = (g m) n


@[simp, norm_cast] -- Porting note: added `simp`
theorem coe_eq_coe : (a : WithTop α) = b ↔ a = b


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

(I : CategoryTheory.Limits.MultispanIndex C)

(c : CategoryTheory.Limits.Cofork I.fstSigmaMap I.sndSigmaMap)

I.ofSigmaCoforkFunctor.obj c = CategoryTheory.Limits.Multicofork.ofSigmaCofork I c


theorem IsSeparable.univ_pi {ι : Type*} [Countable ι] {X : ι → Type*} {s : ∀ i, Set (X i)}
    [∀ i, TopologicalSpace (X i)] (h : ∀ i, IsSeparable (s i)) :
    IsSeparable (univ.pi s)

(h : ∀ (i : ι), TopologicalSpace.IsSeparable (s i))


@[reassoc]
lemma mapComp_assoc_left {a b c d : B} (f : a ⟶ b) (g : b ⟶ c) (h : c ⟶ d) :
    F.mapComp (f ≫ g) h ≫ F.mapComp f g ▷ F.map h =
    F.map₂ (α_ f g h).hom ≫ F.mapComp f (g ≫ h) ≫ F.map f ◁ F.mapComp g h
    ≫ (α_ (F.map f) (F.map g) (F.map h)).inv

{B : Type u₁}
[CategoryTheory.Bicategory B]
{C : Type u₂}
[CategoryTheory.Bicategory C]
(F : CategoryTheory.OplaxFunctor B C)
{a b c d : B}
(f : a ⟶ b)
(g : b ⟶ c)
(h : c ⟶ d)

CategoryTheory.CategoryStruct.comp (F.mapComp (CategoryTheory.CategoryStruct.comp f g) h)
    (CategoryTheory.Bicategory.whiskerRight (F.mapComp f g) (F.map h)) =
  CategoryTheory.CategoryStruct.comp (F.map₂ (CategoryTheory.Bicategory.associator f g h).hom)
    (CategoryTheory.CategoryStruct.comp (F.mapComp f (CategoryTheory.CategoryStruct.comp g h))
      (CategoryTheory.CategoryStruct.comp (CategoryTheory.Bicategory.whiskerLeft (F.map f) (F.mapComp g h))
        (CategoryTheory.Bicategory.associator (F.map f) (F.map g) (F.map h)).inv))


theorem pi_disjoint_of_disjoint {δ : α → Type*} {s : Finset α} (t₁ t₂ : ∀ a, Finset (δ a)) {a : α}
    (ha : a ∈ s) (h : Disjoint (t₁ a) (t₂ a)) : Disjoint (s.pi t₁) (s.pi t₂)

{α : Type u_1}
[DecidableEq α]
{δ : α → Type u_2}
{s : Finset α}
(t₁ t₂ : (a : α) → Finset (δ a))
{a : α}
(ha : a ∈ s)
(h : Disjoint (t₁ a) (t₂ a))


@[simp, norm_cast]
theorem coe_sqrt {x : ℝ≥0} : (NNReal.sqrt x : ℝ) = √(x : ℝ)


@[gcongr]
protected theorem mul (h₁ : a ≡ b [MOD n]) (h₂ : c ≡ d [MOD n]) : a * c ≡ b * d [MOD n]

{n a b c d : ℕ}
(h₁ : a ≡ b [MOD n])
(h₂ : c ≡ d [MOD n])


theorem isOpen_iff' {s : Set (CofiniteTopology X)} : IsOpen s ↔ s = ∅ ∨ sᶜ.Finite

{X : Type u}
{s : Set (CofiniteTopology X)}


/-- **Young's inequality**, `ℝ≥0` version. We use `{p q : ℝ≥0}` in order to avoid constructing
witnesses of `0 ≤ p` and `0 ≤ q` for the denominators.  -/
theorem young_inequality (a b : ℝ≥0) {p q : ℝ≥0} (hpq : p.IsConjExponent q) :
    a * b ≤ a ^ (p : ℝ) / p + b ^ (q : ℝ) / q


theorem biInter_lt_succ' (u : ℕ → Set α) (n : ℕ) : ⋂ k < n + 1, u k = u 0 ∩ ⋂ k < n, u (k + 1)


@[simp]
theorem union_prod : (s₁ ∪ s₂) ×ˢ t = s₁ ×ˢ t ∪ s₂ ×ˢ t

{α : Type u_1}
{β : Type u_2}
{s₁ s₂ : Set α}
{t : Set β}

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


theorem skyscraperPresheaf_isSheaf : (skyscraperPresheaf p₀ A).IsSheaf

[(U : TopologicalSpace.Opens ↑X) → Decidable (p₀ ∈ U)]


@[simp]
theorem mem_toNonUnitalSubring {R : Type u} {A : Type v} [CommRing R] [NonUnitalRing A] [Module R A]
    [Star A] {S : NonUnitalStarSubalgebra R A} {x} : x ∈ S.toNonUnitalSubring ↔ x ∈ S

{R : Type u}
{A : Type v}
[CommRing R]
[NonUnitalRing A]
[Module R A]
[Star A]
{S : NonUnitalStarSubalgebra R A}
{x : A}


@[simp] theorem append_right_eq_self {x y : List α} : x ++ y = x ↔ y = []


lemma inv_mul_eq_iff_eq_mul₀ (ha : a ≠ 0) : a⁻¹ * b = c ↔ b = a * c

{G₀ : Type u_3}
[GroupWithZero G₀]
{a b c : G₀}
(ha : a ≠ 0)


@[simp]
theorem takeUntil_copy {u v w v' w'} (p : G.Walk v w) (hv : v = v') (hw : w = w')
    (h : u ∈ (p.copy hv hw).support) :
    (p.copy hv hw).takeUntil u h = (p.takeUntil u (by subst_vars; exact h)).copy hv rfl

{V : Type u}
{G : SimpleGraph V}
[DecidableEq V]
{u v w v' w' : V}
(p : G.Walk v w)
(hv : v = v')
(hw : w = w')
(h : u ∈ (p.copy hv hw).support)

(p.copy hv hw).takeUntil u h = (p.takeUntil u ⋯).copy hv ⋯


@[simp] lemma one_le_card : 1 ≤ s.card ↔ s.Nonempty


theorem HasFDerivAt.arctan (hf : HasFDerivAt f f' x) :
    HasFDerivAt (fun x => arctan (f x)) ((1 / (1 + f x ^ 2)) • f') x

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

HasFDerivAt (fun x => Real.arctan (f x)) ((1 / (1 + f x ^ 2)) • f') x


theorem eq_univ_iff_forall : s = univ ↔ ∀ x, x ∈ s

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


@[to_additive (attr := simp, to_additive) (reorder := 1 2, 4 5) toLex_smul']
theorem pow_toLex [Pow α β] (a : α) (b : β) : a ^ toLex b = a ^ b

{α : Type u_1}
{β : Type u_2}
[Pow α β]
(a : α)
(b : β)


@[simp]
lemma not_equitableOn : ¬s.EquitableOn f ↔ ∃ a ∈ s, ∃ b ∈ s, f b + 1 < f a

{α : Type u_1}
{β : Type u_2}
[LinearOrder β]
[Add β]
[One β]
{s : Set α}
{f : α → β}


theorem ofNat_ne_zero : ((n : Nat) : Int) ≠ 0 ↔ n ≠ 0

↑n ≠ 0 ↔ n ≠ 0


theorem LocallyIntegrable.locallyIntegrableOn (hf : LocallyIntegrable f μ) (s : Set X) :
    LocallyIntegrableOn f s μ

(hf : MeasureTheory.LocallyIntegrable f μ)


@[simp]
theorem preimage_symm_preimage {α β} (e : α ≃ β) (s : Set α) : e ⁻¹' (e.symm ⁻¹' s) = s

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


theorem support_mono {H H' : Subgraph G} (h : H ≤ H') : H.support ⊆ H'.support

{V : Type u}
{G : SimpleGraph V}
{H H' : G.Subgraph}
(h : H ≤ H')


@[simp]
lemma unitization_mul (x y : WithLp 1 (Unitization 𝕜 A)) :
    WithLp.equiv 1 _ (x * y) = (WithLp.equiv 1 _ x) * (WithLp.equiv 1 _ y)

{𝕜 : Type u_1}
{A : Type u_2}
[NormedField 𝕜]
[NonUnitalNormedRing A]
[NormedSpace 𝕜 A]
[IsScalarTower 𝕜 A A]
[SMulCommClass 𝕜 A A]
(x y : WithLp 1 (Unitization 𝕜 A))

(WithLp.equiv 1 (Unitization 𝕜 A)) (x * y) = (WithLp.equiv 1 (Unitization 𝕜 A)) x * (WithLp.equiv 1 (Unitization 𝕜 A)) y


theorem map.valid {β} [Preorder β] {f : α → β} (f_strict_mono : StrictMono f) {t} (h : Valid t) :
    Valid (map f t)

{α : Type u_1}
[Preorder α]
{β : Type u_2}
[Preorder β]
{f : α → β}
(f_strict_mono : StrictMono f)
{t : Ordnode α}
(h : t.Valid)


theorem mul_add_right_left : IsRelPrime (z * y + x) y

{R : Type u_1}
[CommRing R]
{x y : R}
(h : IsRelPrime x y)
(z : R)


/-- If `P` holds for units and powers of primes,
and `P x ∧ P y` for coprime `x, y` implies `P (x * y)`,
then `P` holds on a product of powers of distinct primes. -/
-- @[elab_as_elim] Porting note: commented out
theorem induction_on_prime_power {P : α → Prop} (s : Finset α) (i : α → ℕ)
    (is_prime : ∀ p ∈ s, Prime p) (is_coprime : ∀ᵉ (p ∈ s) (q ∈ s), p ∣ q → p = q)
    (h1 : ∀ {x}, IsUnit x → P x) (hpr : ∀ {p} (i : ℕ), Prime p → P (p ^ i))
    (hcp : ∀ {x y}, IsRelPrime x y → P x → P y → P (x * y)) :
    P (∏ p ∈ s, p ^ i p)

(is_coprime : ∀ p ∈ s, ∀ q ∈ s, p ∣ q → p = q)

(hpr : ∀ {p : α} (i : ℕ), Prime p → P (p ^ i))

(hcp : ∀ {x y : α}, IsRelPrime x y → P x → P y → P (x * y))


/-- Urysohn's lemma: if `s` and `t` are two disjoint sets in a regular locally compact topological
space `X`, with `s` compact and `t` closed, then there exists a continuous compactly supported
function `f : X → ℝ` such that

* `f` equals one on `s`;
* `f` equals zero on `t`;
* `0 ≤ f x ≤ 1` for all `x`.

Moreover, if `s` is Gδ, one can ensure that `f ⁻¹ {1}` is exactly `s`.
-/
theorem exists_continuous_one_zero_of_isCompact_of_isGδ [RegularSpace X] [LocallyCompactSpace X]
    {s t : Set X} (hs : IsCompact s) (h's : IsGδ s) (ht : IsClosed t) (hd : Disjoint s t) :
    ∃ f : C(X, ℝ), s = f ⁻¹' {1} ∧ EqOn f 0 t ∧ HasCompactSupport f
      ∧ ∀ x, f x ∈ Icc (0 : ℝ) 1

{X : Type u_1}
[TopologicalSpace X]
[RegularSpace X]
[LocallyCompactSpace X]
{s t : Set X}
(hs : IsCompact s)
(h's : IsGδ s)
(ht : IsClosed t)
(hd : Disjoint s t)

∃ f, s = ⇑f ⁻¹' {1} ∧ Set.EqOn (⇑f) 0 t ∧ HasCompactSupport ⇑f ∧ ∀ (x : X), f x ∈ Set.Icc 0 1


nonrec theorem summable_nat_add_iff {f : ℕ → ℝ≥0} (k : ℕ) :
    (Summable fun i => f (i + k)) ↔ Summable f


@[simp]
lemma shiftLeft'_false : ∀ n, shiftLeft' false m n = m <<< n


lemma egauge_ball_le_of_one_lt_norm (hc : 1 < ‖c‖) (h₀ : r ≠ 0 ∨ x ≠ 0) :
    egauge 𝕜 (ball 0 r) x ≤ ‖c‖₊ * ‖x‖₊ / r

{𝕜 : Type u_1}
[NormedField 𝕜]
{E : Type u_3}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{c : 𝕜}
{x : E}
{r : ℝ≥0}
(hc : 1 < ‖c‖)
(h₀ : r ≠ 0 ∨ x ≠ 0)

egauge 𝕜 (Metric.ball 0 ↑r) x ≤ ↑‖c‖₊ * ↑‖x‖₊ / ↑r


/-- An induction lemma for polynomials. It takes a natural number `N` as a parameter, that is
required to be at least as big as the `nat_degree` of the polynomial.  This is useful to prove
results where you want to change each term in a polynomial to something else depending on the
`nat_degree` of the polynomial itself and not on the specific `nat_degree` of each term. -/
theorem induction_with_natDegree_le (P : R[X] → Prop) (N : ℕ) (P_0 : P 0)
    (P_C_mul_pow : ∀ n : ℕ, ∀ r : R, r ≠ 0 → n ≤ N → P (C r * X ^ n))
    (P_C_add : ∀ f g : R[X], f.natDegree < g.natDegree → g.natDegree ≤ N → P f → P g → P (f + g)) :
    ∀ f : R[X], f.natDegree ≤ N → P f

(P_C_mul_pow : ∀ (n : ℕ) (r : R), r ≠ 0 → n ≤ N → P (Polynomial.C r * Polynomial.X ^ n))

(P_C_add : ∀ (f g : R[X]), f.natDegree < g.natDegree → g.natDegree ≤ N → P f → P g → P (f + g))


/--
`M.comap f` pulls back the alphabet of `M` along `f`. In other words, it applies `f` to the input
before passing it to `M`.
-/
@[simps]
def comap (f : α' → α) (M : DFA α σ) : DFA α' σ

{α : Type u}
{σ : Type v}
{α' : Type u_1}
(f : α' → α)
(M : DFA α σ)


lemma fin3_def (P : Fin 3 → R) : ![P x, P y, P z] = P


theorem gcd_dvd_dot_left (xs ys : IntList) : (xs.gcd : Int) ∣ dot xs ys


/-- On open sets, `AnalyticOn` and `AnalyticWithinOn` coincide -/
@[simp] lemma IsOpen.analyticWithinOn_iff_analyticOn {f : E → F} {s : Set E} (hs : IsOpen s) :
    AnalyticWithinOn 𝕜 f s ↔ AnalyticOn 𝕜 f s

{𝕜 : Type u_2}
[NontriviallyNormedField 𝕜]
{E : Type u_3}
{F : Type u_4}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{f : E → F}
{s : Set E}
(hs : IsOpen s)


theorem all_map (f : α → β) (l : List α) (p : β → Bool) : (l.map f).all p = l.all (p ∘ f)

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


theorem a_one_pow_n : (a 1 : QuaternionGroup n) ^ (2 * n) = 1


theorem star_star_mul (x y : R) : star (star x * y) = star y * x

{R : Type u}
[Mul R]
[StarMul R]
(x y : R)


theorem EquitableOn.le (h : EquitableOn (s : Set α) f) (ha : a ∈ s) :
    (∑ i ∈ s, f i) / s.card ≤ f a

{α : Type u_1}
{s : Finset α}
{f : α → ℕ}
{a : α}
(h : (↑s).EquitableOn f)
(ha : a ∈ s)


theorem measure_ne_top (μ : Measure α) [IsFiniteMeasure μ] (s : Set α) : μ s ≠ ∞

{α : Type u_1}
{m0 : MeasurableSpace α}
(μ : MeasureTheory.Measure α)
[MeasureTheory.IsFiniteMeasure μ]
(s : Set α)


@[simp]
theorem iterate_derivative_natCast_mul {n k : ℕ} {f : R[X]} :
    derivative^[k] ((n : R[X]) * f) = n * derivative^[k] f

{R : Type u}
[Semiring R]
{n k : ℕ}
{f : R[X]}

(⇑Polynomial.derivative)^[k] (↑n * f) = ↑n * (⇑Polynomial.derivative)^[k] f


/-- An algebra iso `A ≃ₐ[R] B` can equivalently be viewed as an algebra iso `Aᵐᵒᵖ ≃ₐ[R] Bᵐᵒᵖ`.
This is the action of the (fully faithful) `ᵐᵒᵖ`-functor on morphisms. -/
@[simps!]
def op : (A ≃ₐ[R] B) ≃ Aᵐᵒᵖ ≃ₐ[R] Bᵐᵒᵖ

{R : Type u_1}
{A : Type u_3}
{B : Type u_4}
[CommSemiring R]
[Semiring A]
[Semiring B]
[Algebra R A]
[Algebra R B]
(f : A ≃ₐ[R] B)

∀ (a : Aᵐᵒᵖ), (AlgEquiv.op f) a = MulOpposite.op (f (MulOpposite.unop a))


@[simp]
theorem grade_eq_grade_iff : grade 𝕆 a = grade 𝕆 b ↔ a = b

{𝕆 : Type u_1}
{α : Type u_3}
[Preorder 𝕆]
[LinearOrder α]
[GradeOrder 𝕆 α]
{a b : α}


theorem add_le_add {a b c d : Nat} (h₁ : a ≤ b) (h₂ : c ≤ d) : a + c ≤ b + d


theorem iff_of_isAffine [IsAffine X] [IsAffine Y] :
    P f ↔ Q (f.app ⊤)

{P : CategoryTheory.MorphismProperty AlgebraicGeometry.Scheme}

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

P f ↔ Q (AlgebraicGeometry.Scheme.Hom.app f ⊤)


@[simp] theorem getLsb_signExtend (x  : BitVec w) {v i : Nat} :
    (x.signExtend v).getLsb i = (decide (i < v) && if i < w then x.getLsb i else x.msb)

(BitVec.signExtend v x).getLsb i = (decide (i < v) && if i < w then x.getLsb i else x.msb)


@[csimp] theorem all_eq_allTR : @all = @allTR


protected theorem map_zero (f : A →A[R] B) : f (0 : A) = 0

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


@[to_additive]
theorem eventuallyEq_prod {X M : Type*} [CommMonoid M] {s : Finset ι} {l : Filter X}
    {f g : ι → X → M} (hs : ∀ i ∈ s, f i =ᶠ[l] g i) : ∏ i ∈ s, f i =ᶠ[l] ∏ i ∈ s, g i

{ι : Type u_1}
{X : Type u_6}
{M : Type u_7}
[CommMonoid M]
{s : Finset ι}
{l : Filter X}
{f g : ι → X → M}
(hs : ∀ i ∈ s, f i =ᶠ[l] g i)


theorem ofReal_nsmul {x : ℝ} {n : ℕ} : ENNReal.ofReal (n • x) = n • ENNReal.ofReal x


theorem count_succ_eq_count_iff {n : ℕ} : count p (n + 1) = count p n ↔ ¬p n

{p : ℕ → Prop}
[DecidablePred p]
{n : ℕ}

Nat.count p (n + 1) = Nat.count p n ↔ ¬p n


@[simp]
theorem isOrtho_orthogonal_right (U : Submodule 𝕜 E) : U ⟂ Uᗮ

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


theorem withDensity_smul (r : ℝ≥0∞) {f : α → ℝ≥0∞} (hf : Measurable f) :
    μ.withDensity (r • f) = r • μ.withDensity f

{α : Type u_1}
{m0 : MeasurableSpace α}
{μ : MeasureTheory.Measure α}
(r : ℝ≥0∞)
{f : α → ℝ≥0∞}
(hf : Measurable f)


@[simp]
theorem augmentTruncate_inv_f_succ (C : ChainComplex V ℕ) (i : ℕ) :
    (augmentTruncate C).inv.f (i + 1) = 𝟙 (C.X (i + 1))

C.augmentTruncate.inv.f (i + 1) = 𝟙 (C.X (i + 1))


theorem norm_mkPiAlgebraFin_le_of_pos (hn : 0 < n) :
    ‖ContinuousMultilinearMap.mkPiAlgebraFin 𝕜 n A‖ ≤ 1

{𝕜 : Type u}
[NontriviallyNormedField 𝕜]
{n : ℕ}
{A : Type u_1}
[NormedRing A]
[NormedAlgebra 𝕜 A]
(hn : 0 < n)


theorem ContinuousWithinAt.preimage_mem_nhdsWithin {f : α → β} {x : α} {s : Set α} {t : Set β}
    (h : ContinuousWithinAt f s x) (ht : t ∈ 𝓝 (f x)) : f ⁻¹' t ∈ 𝓝[s] x

{α : Type u_1}
{β : Type u_2}
[TopologicalSpace α]
[TopologicalSpace β]
{f : α → β}
{x : α}
{s : Set α}
{t : Set β}
(h : ContinuousWithinAt f s x)
(ht : t ∈ 𝓝 (f x))


/-- Let `X` be a topological space, `𝔖` a covering of `X` by compact subsets,
`α` a uniform space, `F : ι → (X → α)` a family equicontinuous on each `K ∈ 𝔖`, and `ℱ` a filter
on `ι`. Then, `F` tends to `f : X → α` along `ℱ` *uniformly on each `K ∈ 𝔖`* iff it tends to `f`
*pointwise* along `ℱ`.

This is a specialization of `EquicontinuousOn.tendsto_uniformOnFun_iff_pi'` to the case
where `𝔖` covers `X`. -/
theorem EquicontinuousOn.tendsto_uniformOnFun_iff_pi
    {𝔖 : Set (Set X)} (𝔖_compact : ∀ K ∈ 𝔖, IsCompact K) (𝔖_covers : ⋃₀ 𝔖 = univ)
    (F_eqcont : ∀ K ∈ 𝔖, EquicontinuousOn F K) (ℱ : Filter ι) (f : X → α) :
    Tendsto (UniformOnFun.ofFun 𝔖 ∘ F) ℱ (𝓝 <| UniformOnFun.ofFun 𝔖 f) ↔
    Tendsto F ℱ (𝓝 f)

Filter.Tendsto (⇑(UniformOnFun.ofFun 𝔖) ∘ F) ℱ (𝓝 ((UniformOnFun.ofFun 𝔖) f)) ↔ Filter.Tendsto F ℱ (𝓝 f)


theorem inl_injective : Function.Injective (inl R M M₂)

{R : Type u}
{M : Type v}
{M₂ : Type w}
[Semiring R]
[AddCommMonoid M]
[AddCommMonoid M₂]
[Module R M]
[Module R M₂]

Function.Injective ⇑(LinearMap.inl R M M₂)


/-- A cone for a functor `F : J ⥤ HomologicalComplex C c` which is given in degree `n` by
the limit `F ⋙ eval C c n`. -/
@[simps]
noncomputable def coneOfHasLimitEval : Cone F

[∀ (n : ι), CategoryTheory.Limits.HasLimit (F ⋙ HomologicalComplex.eval C c n)]

((HomologicalComplex.coneOfHasLimitEval F).π.app j).f n =
  CategoryTheory.Limits.limit.π (F ⋙ HomologicalComplex.eval C c n) j


/-- The algebra structure which will be the apex of the new limit cone for `D`. -/
@[simps]
def conePoint : Algebra T

(D : CategoryTheory.Functor J T.Algebra)

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

(CategoryTheory.Monad.ForgetCreatesLimits.conePoint D c t).a =
  t.lift (CategoryTheory.Monad.ForgetCreatesLimits.newCone D c)


/-- A recapitulation of the definition of multiplicative that is simpler for proofs -/
theorem iff_ne_zero [MonoidWithZero R] {f : ArithmeticFunction R} :
    IsMultiplicative f ↔
      f 1 = 1 ∧ ∀ {m n : ℕ}, m ≠ 0 → n ≠ 0 → m.Coprime n → f (m * n) = f m * f n

{R : Type u_1}
[MonoidWithZero R]
{f : ArithmeticFunction R}

f.IsMultiplicative ↔ f 1 = 1 ∧ ∀ {m n : ℕ}, m ≠ 0 → n ≠ 0 → m.Coprime n → f (m * n) = f m * f n


theorem IsRelPrime.prod_left : (∀ i ∈ t, IsRelPrime (s i) x) → IsRelPrime (∏ i ∈ t, s i) x

{α : Type u_2}
{I : Type u_1}
[CommMonoid α]
[DecompositionMonoid α]
{x : α}
{s : I → α}
{t : Finset I}


@[simp]
theorem ae_eq_bot : ae μ = ⊥ ↔ μ = 0

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


@[simp] theorem and_iff_left_iff_imp  : ((a ∧ b) ↔ a) ↔ (a → b)


theorem Martingale.ae_not_tendsto_atTop_atTop [IsFiniteMeasure μ] (hf : Martingale f ℱ μ)
    (hbdd : ∀ᵐ ω ∂μ, ∀ i, |f (i + 1) ω - f i ω| ≤ R) :
    ∀ᵐ ω ∂μ, ¬Tendsto (fun n => f n ω) atTop atTop

{f : ℕ → Ω → ℝ}

(hbdd : ∀ᵐ (ω : Ω) ∂μ, ∀ (i : ℕ), |f (i + 1) ω - f i ω| ≤ ↑R)

∀ᵐ (ω : Ω) ∂μ, ¬Filter.Tendsto (fun n => f n ω) Filter.atTop Filter.atTop


theorem LineDifferentiableWithinAt.congr (h : LineDifferentiableWithinAt 𝕜 f s x v)
    (ht : ∀ x ∈ s, f₁ x = f x) (hx : f₁ x = f x) :
    LineDifferentiableWithinAt 𝕜 f₁ s x v


theorem ofFractionRing_mk' (x : K[X]) (y : K[X]⁰) :
    -- Porting note: I gave explicitly the argument `(FractionRing K[X])`
    ofFractionRing (IsLocalization.mk' (FractionRing K[X]) x y) =
      IsLocalization.mk' (RatFunc K) x y

{K : Type u}
[CommRing K]
[IsDomain K]
(x : K[X])
(y : ↥K[X]⁰)

{ toFractionRing := IsLocalization.mk' (FractionRing K[X]) x y } = IsLocalization.mk' (RatFunc K) x y


theorem Homeomorph.contDiff_unitBall : ContDiff ℝ n fun x : E => (unitBall x : E)

{n : ℕ∞}
{E : Type u_1}
[NormedAddCommGroup E]
[InnerProductSpace ℝ E]

ContDiff ℝ n fun x => ↑(Homeomorph.unitBall x)


@[simp]
theorem vadd_apply (f : P1 →ᵃ[k] V2) (g : P1 →ᵃ[k] P2) (p : P1) : (f +ᵥ g) p = f p +ᵥ g p

{k : Type u_1}
{V1 : Type u_2}
{P1 : Type u_3}
{V2 : Type u_4}
{P2 : Type u_5}
[Ring k]
[AddCommGroup V1]
[Module k V1]
[AffineSpace V1 P1]
[AddCommGroup V2]
[Module k V2]
[AffineSpace V2 P2]
(f : P1 →ᵃ[k] V2)
(g : P1 →ᵃ[k] P2)
(p : P1)


theorem Ioc_subset_closure_interior (a b : α) : Ioc a b ⊆ closure (interior (Ioc a b))

{α : Type u_1}
[TopologicalSpace α]
[LinearOrder α]
[OrderTopology α]
[DenselyOrdered α]
(a b : α)

Set.Ioc a b ⊆ closure (interior (Set.Ioc a b))


/-- `(c • ·)` is a proper map. -/
@[to_additive "`(c +ᵥ ·)` is a proper map."]
theorem isProperMap_smul {M : Type*} (c : M) (X : Type*) [SMul M X] [TopologicalSpace X]
    [h : ProperConstSMul M X] : IsProperMap ((c • ·) : X → X)

{M : Type u_1}
(c : M)
(X : Type u_2)
[SMul M X]
[TopologicalSpace X]
[h : ProperConstSMul M X]


theorem induction_on_all_ex {P : ∀ {m}, L.BoundedFormula α m → Prop} (φ : L.BoundedFormula α n)
    (hqf : ∀ {m} {ψ : L.BoundedFormula α m}, IsQF ψ → P ψ)
    (hall : ∀ {m} {ψ : L.BoundedFormula α (m + 1)}, P ψ → P ψ.all)
    (hex : ∀ {m} {φ : L.BoundedFormula α (m + 1)}, P φ → P φ.ex)
    (hse : ∀ {m} {φ₁ φ₂ : L.BoundedFormula α m},
      Theory.SemanticallyEquivalent ∅ φ₁ φ₂ → (P φ₁ ↔ P φ₂)) :
    P φ

{P : {m : ℕ} → L.BoundedFormula α m → Prop}

(hqf : ∀ {m : ℕ} {ψ : L.BoundedFormula α m}, ψ.IsQF → P ψ)

(hall : ∀ {m : ℕ} {ψ : L.BoundedFormula α (m + 1)}, P ψ → P ψ.all)

(hex : ∀ {m : ℕ} {φ : L.BoundedFormula α (m + 1)}, P φ → P φ.ex)

(hse : ∀ {m : ℕ} {φ₁ φ₂ : L.BoundedFormula α m}, ∅.SemanticallyEquivalent φ₁ φ₂ → (P φ₁ ↔ P φ₂))


@[simp]
theorem coeff_neg (p : R[X]) (n : ℕ) : coeff (-p) n = -coeff p n

{R : Type u}
[Ring R]
(p : R[X])
(n : ℕ)


theorem zpow_mem {x : K} (hx : x ∈ s) (n : ℤ) : x ^ n ∈ s

{K : Type u}
[DivisionRing K]
(s : Subfield K)
{x : K}
(hx : x ∈ s)
(n : ℤ)


@[to_additive (attr := simp)]
theorem curry_mulSingle [DecidableEq α] [∀ a, DecidableEq (β a)] [∀ a b, One (γ a b)]
    (i : Σ a, β a) (x : γ i.1 i.2) :
    Sigma.curry (Pi.mulSingle i x) = Pi.mulSingle i.1 (Pi.mulSingle i.2 x)

{α : Type u_3}
{β : α → Type u_4}
{γ : (a : α) → β a → Type u_5}
[DecidableEq α]
[(a : α) → DecidableEq (β a)]
[(a : α) → (b : β a) → One (γ a b)]
(i : (a : α) × β a)
(x : γ i.fst i.snd)

Sigma.curry (Pi.mulSingle i x) = Pi.mulSingle i.fst (Pi.mulSingle i.snd x)


theorem Nat.pow_imp_self_of_one_lt {M} [Monoid M] (k : ℕ) (hk : 1 < k)
    (P : M → Prop) (hmul : ∀ x y, P x → P (x * y) ∨ P (y * x))
    (hpow : ∀ x, P (x ^ k) → P x) : ∀ n x, P (x ^ n) → P x

(hmul : ∀ (x y : M), P x → P (x * y) ∨ P (y * x))


@[simp]
theorem polar_neg_left (x y : M) : polar Q (-x) y = -polar Q x y

{R : Type u_3}
{M : Type u_4}
{N : Type u_5}
[CommRing R]
[AddCommGroup M]
[AddCommGroup N]
[Module R M]
[Module R N]
(Q : QuadraticMap R M N)
(x y : M)

QuadraticMap.polar (⇑Q) (-x) y = -QuadraticMap.polar (⇑Q) x y


theorem Filter.EventuallyEq.gradient_eq (hL : f₁ =ᶠ[𝓝 x] f) : ∇ f₁ x = ∇ f x

{𝕜 : Type u_1}
{F : Type u_2}
[RCLike 𝕜]
[NormedAddCommGroup F]
[InnerProductSpace 𝕜 F]
[CompleteSpace F]
{f : F → 𝕜}
{x : F}
{f₁ : F → 𝕜}
(hL : f₁ =ᶠ[𝓝 x] f)


@[simp] theorem IsNilpotent.zero [MonoidWithZero R] : IsNilpotent (0 : R)


lemma adapted_densityProcess (κ : Kernel α (γ × β)) (ν : Kernel α γ) (a : α)
    {s : Set β} (hs : MeasurableSet s) :
    Adapted (countableFiltration γ) (fun n x ↦ densityProcess κ ν n a x s)

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

MeasureTheory.Adapted (ProbabilityTheory.countableFiltration γ) fun n x => κ.densityProcess ν n a x s


theorem sin_eq_zero_iff_cos_eq {z : ℂ} : sin z = 0 ↔ cos z = 1 ∨ cos z = -1

Complex.sin z = 0 ↔ Complex.cos z = 1 ∨ Complex.cos z = -1


/-- This is indeed an equivalence relation -/
private theorem equivalence_isometryRel : Equivalence IsometryRel


/-- A subalgebra `S` of `A / R` determines a subring `S.op` of the opposite ring `Aᵐᵒᵖ / R`. -/
@[simps]
def opEquiv : Subalgebra R A ≃o Subalgebra R Aᵐᵒᵖ

{R : Type u_2}
{A : Type u_3}
[CommSemiring R]
[Semiring A]
[Algebra R A]
(S : Subalgebra R A)


theorem Antiperiodic.add [AddGroup α] [InvolutiveNeg β] (h1 : Antiperiodic f c₁)
    (h2 : Antiperiodic f c₂) : Periodic f (c₁ + c₂)

{α : Type u_1}
{β : Type u_2}
{f : α → β}
{c₁ c₂ : α}
[AddGroup α]
[InvolutiveNeg β]
(h1 : Function.Antiperiodic f c₁)
(h2 : Function.Antiperiodic f c₂)


@[simp]
theorem symm_swap (a b : α) : (swap a b).symm = swap a b

{α : Sort u_1}
[DecidableEq α]
(a b : α)

Equiv.symm (Equiv.swap a b) = Equiv.swap a b


@[simp]
theorem isInitialMul_inv (X : C) [HasBinaryProduct I X] (hI : IsInitial I) :
    (isInitialMul X hI).inv = hI.to _

(hI : CategoryTheory.Limits.IsInitial I)

(CategoryTheory.Limits.isInitialMul X hI).inv = hI.to (I ⨯ X)


theorem nhdset_of_mem_uniformity {d : Set (α × α)} (s : Set (α × α)) (hd : d ∈ 𝓤 α) :
    ∃ t : Set (α × α), IsOpen t ∧ s ⊆ t ∧
      t ⊆ { p | ∃ x y, (p.1, x) ∈ d ∧ (x, y) ∈ s ∧ (y, p.2) ∈ d }

{α : Type ua}
[UniformSpace α]
{d : Set (α × α)}
(s : Set (α × α))
(hd : d ∈ 𝓤 α)

∃ t, IsOpen t ∧ s ⊆ t ∧ t ⊆ {p | ∃ x y, (p.1, x) ∈ d ∧ (x, y) ∈ s ∧ (y, p.2) ∈ d}


/-- The `<` order on subspaces is the same as that on the corresponding sets. -/
theorem lt_def (s1 s2 : AffineSubspace k P) : s1 < s2 ↔ (s1 : Set P) ⊂ s2

{k : Type u_1}
{V : Type u_2}
{P : Type u_3}
[Ring k]
[AddCommGroup V]
[Module k V]
[S : AffineSpace V P]
(s1 s2 : AffineSubspace k P)


@[simp]
lemma toNNReal_algebraMap (r : ℝ≥0) :
    (algebraMap ℝ C(X, ℝ) r).toNNReal = algebraMap ℝ≥0 C(X, ℝ≥0) r

{X : Type u_1}
[TopologicalSpace X]
(r : NNReal)

((algebraMap ℝ C(X, ℝ)) ↑r).toNNReal = (algebraMap NNReal C(X, NNReal)) r


theorem _root_.MeasurableEmbedding.integrableOn_map_iff [MeasurableSpace β] {e : α → β}
    (he : MeasurableEmbedding e) {f : β → E} {μ : Measure α} {s : Set β} :
    IntegrableOn f s (μ.map e) ↔ IntegrableOn (f ∘ e) (e ⁻¹' s) μ

{α : Type u_1}
{β : Type u_2}
{E : Type u_3}
[MeasurableSpace α]
[NormedAddCommGroup E]
[MeasurableSpace β]
{e : α → β}
(he : MeasurableEmbedding e)
{f : β → E}
{μ : MeasureTheory.Measure α}
{s : Set β}

MeasureTheory.IntegrableOn f s (MeasureTheory.Measure.map e μ) ↔ MeasureTheory.IntegrableOn (f ∘ e) (e ⁻¹' s) μ


theorem Measure.exists_isOpen_measure_lt_top [TopologicalSpace α] (μ : Measure α)
    [IsLocallyFiniteMeasure μ] (x : α) : ∃ s : Set α, x ∈ s ∧ IsOpen s ∧ μ s < ∞


@[to_additive]
theorem Filter.EventuallyEq.mulIndicator_one [One β] {l : Filter α} {f : α → β} {s : Set α}
    (hf : f =ᶠ[l] 1) : s.mulIndicator f =ᶠ[l] 1

{α : Type u_1}
{β : Type u_2}
[Zero β]
{l : Filter α}
{f : α → β}
{s : Set α}
(hf : f =ᶠ[l] 0)


/-- A functor `F` commutes with the shift by a monoid `A` if it is equipped with
commutation isomorphisms with the shifts by all `a : A`, and these isomorphisms
satisfy coherence properties with respect to `0 : A` and the addition in `A`. -/
class CommShift where
  iso (a : A) : shiftFunctor C a ⋙ F ≅ F ⋙ shiftFunctor D a
  zero : iso 0 = CommShift.isoZero F A := by aesop_cat
  add (a b : A) : iso (a + b) = CommShift.isoAdd (iso a) (iso b) := by aesop_cat

{C : Type u_1}
{D : Type u_2}
[CategoryTheory.Category.{u_6, u_1} C]
[CategoryTheory.Category.{u_7, u_2} D]
{F : CategoryTheory.Functor C D}
{A : Type u_4}
[AddMonoid A]
[CategoryTheory.HasShift C A]
[CategoryTheory.HasShift D A]
[self : F.CommShift A]
(a b : A)

CategoryTheory.Functor.CommShift.iso (a + b) =
  CategoryTheory.Functor.CommShift.isoAdd (CategoryTheory.Functor.CommShift.iso a)
    (CategoryTheory.Functor.CommShift.iso b)


@[simp] theorem prefix_nil : l <+: [] ↔ l = []


theorem isQF_bot : IsQF (⊥ : L.BoundedFormula α n)

{L : FirstOrder.Language}
{α : Type u'}
{n : ℕ}


@[simp, norm_cast]
theorem coe_sUnion (x : ZFSet.{u}) : ↑(⋃₀ x : ZFSet) = ⋃₀ (x : Class.{u})

↑(⋃₀ x) = ⋃₀ ↑x


protected theorem two_mul (n) : 2 * n = n + n


theorem Measurable.subtype_map {f : α → β} {p : α → Prop} {q : β → Prop} (hf : Measurable f)
    (hpq : ∀ x, p x → q (f x)) : Measurable (Subtype.map f hpq)

{α : Type u_1}
{β : Type u_2}
{m : MeasurableSpace α}
{mβ : MeasurableSpace β}
{f : α → β}
{p : α → Prop}
{q : β → Prop}
(hf : Measurable f)
(hpq : ∀ (x : α), p x → q (f x))


@[to_additive]
lemma exists_smul_eq (x y : α) : ∃ m : M, m • x = y

(M : Type u_1)
{α : Type u_7}
[SMul M α]
[MulAction.IsPretransitive M α]
(x y : α)


protected theorem adapted (h : ProgMeasurable f u) : Adapted f u

{Ω : Type u_1}
{β : Type u_2}
{ι : Type u_3}
{m : MeasurableSpace Ω}
[TopologicalSpace β]
[Preorder ι]
{u : ι → Ω → β}
{f : MeasureTheory.Filtration ι m}
[MeasurableSpace ι]
(h : MeasureTheory.ProgMeasurable f u)


@[to_additive FreeAddGroup.equivalence_join_red]
theorem equivalence_join_red : Equivalence (Join (@Red α))


theorem lt_of_lt_of_le' : b < c → a ≤ b → a < c


@[simp]
theorem typein_one_out (x : (1 : Ordinal).out.α) :
    @typein _ (· < ·) (isWellOrder_out_lt _) x = 0

Ordinal.typein (fun x x_1 => x < x_1) x = 0


/-- A simple general sufficient condition for bounding `levyProkhorovEDist` from above. -/
lemma levyProkhorovEDist_le_of_forall (μ ν : Measure Ω) (δ : ℝ≥0∞)
    (h : ∀ ε B, δ < ε → ε < ∞ → MeasurableSet B →
        μ B ≤ ν (thickening ε.toReal B) + ε ∧ ν B ≤ μ (thickening ε.toReal B) + ε) :
    levyProkhorovEDist μ ν ≤ δ

(h :
  ∀ (ε : ℝ≥0∞) (B : Set Ω),
    δ < ε →
      ε < ⊤ → MeasurableSet B → μ B ≤ ν (Metric.thickening ε.toReal B) + ε ∧ ν B ≤ μ (Metric.thickening ε.toReal B) + ε)

MeasureTheory.levyProkhorovEDist μ ν ≤ δ


theorem untop_orderTop_of_ne_zero {x : HahnSeries Γ R} (hx : x ≠ 0) :
    WithTop.untop x.orderTop (ne_zero_iff_orderTop.mp hx) =
      x.isWF_support.min (support_nonempty_iff.2 hx)

{Γ : Type u_1}
{R : Type u_2}
[PartialOrder Γ]
[Zero R]
{x : HahnSeries Γ R}
(hx : x ≠ 0)


@[simp]
theorem cast_mul' (a b : ZMod n) : (cast (a * b : ZMod n) : R) = cast a * cast b

{n : ℕ}
{R : Type u_1}
[Ring R]
[CharP R n]
(a b : ZMod n)


theorem fg_of_fg_toSubmodule {S : Subalgebra R A} : S.toSubmodule.FG → S.FG

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


/-- Functor translating a functor into the category of monoid objects
to a monoid object in the functor category
-/
@[simps]
def inverse : (C ⥤ Mon_ D) ⥤ Mon_ (C ⥤ D)

{C : Type u₁}
[CategoryTheory.Category.{v₁, u₁} C]
{D : Type u₂}
[CategoryTheory.Category.{v₂, u₂} D]
[CategoryTheory.MonoidalCategory D]

∀ {X Y : C ⥤ Mon_ D} (α : X ⟶ Y) (X_1 : C),
  (CategoryTheory.Monoidal.MonFunctorCategoryEquivalence.inverse.map α).hom.app X_1 = (α.app X_1).hom


@[to_additive (attr := simp) coe_prodMap]
theorem coe_prodMap : ⇑(prodMap f g) = Prod.map f g

{M : Type u_5}
{N : Type u_6}
[MulOneClass M]
[MulOneClass N]
{M' : Type u_8}
{N' : Type u_9}
[MulOneClass M']
[MulOneClass N']
(f : M →* M')
(g : N →* N')


/-- Sections of `F ⋙ yoneda.obj X` identify to natural
transformations `(const J).obj X ⟶ F`. -/
@[simps]
def compYonedaSectionsEquiv (F : J ⥤ Cᵒᵖ) (X : C) :
    (F ⋙ yoneda.obj X).sections ≃ ((const J).obj (op X) ⟶ F)

(τ : (CategoryTheory.Functor.const J).obj (Opposite.op X) ⟶ F)

↑((CategoryTheory.Limits.compYonedaSectionsEquiv F X).symm τ) j = (τ.app j).unop


@[simp]
theorem round_nat_add (x : α) (y : ℕ) : round ((y : α) + x) = y + round x

{α : Type u_2}
[LinearOrderedRing α]
[FloorRing α]
(x : α)
(y : ℕ)


theorem inv_congr {R} [DivisionRing R] {a a' b : R} (_ : a = a')
    (_ : a'⁻¹ = b) : (a⁻¹ : R) = b

{R : Type u_2}
[DivisionRing R]
{a a' b : R}


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

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


@[simp]
lemma inv_atTop₀ : (atTop : Filter 𝕜)⁻¹ = 𝓝[>] 0

{𝕜 : Type u_1}
[LinearOrderedField 𝕜]
[TopologicalSpace 𝕜]
[OrderTopology 𝕜]


/-- If the unit of an adjunction is an isomorphism, then its inverse on the image of L is given
by L whiskered with the counit. -/
@[simp]
theorem inv_map_unit {X : C} [IsIso (h.unit.app X)] :
    inv (L.map (h.unit.app X)) = h.counit.app (L.obj X)

{C : Type u₁}
[CategoryTheory.Category.{v₁, u₁} C]
{D : Type u₂}
[CategoryTheory.Category.{v₂, u₂} D]
{L : C ⥤ D}
{R : D ⥤ C}
(h : L ⊣ R)
{X : C}
[CategoryTheory.IsIso (h.unit.app X)]

CategoryTheory.inv (L.map (h.unit.app X)) = h.counit.app (L.obj X)


@[to_additive]
theorem mul_div_assoc (a b c : G) : a * b / c = a * (b / c)

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


theorem preimage_coe_mem_nhds_subtype {s t : Set α} {a : s} : (↑) ⁻¹' t ∈ 𝓝 a ↔ t ∈ 𝓝[s] ↑a

{α : Type u_1}
[TopologicalSpace α]
{s t : Set α}
{a : ↑s}


@[simp, nolint simpNF]
theorem homEquiv_naturality_right (f : F.obj X ⟶ Y) (g : Y ⟶ Y') :
    (adj.homEquiv X Y') (f ≫ g) = (adj.homEquiv X Y) f ≫ G.map g

{C : Type u₁}
[CategoryTheory.Category.{v₁, u₁} C]
{D : Type u₂}
[CategoryTheory.Category.{v₂, u₂} D]
{F : CategoryTheory.Functor C D}
{G : CategoryTheory.Functor D C}
(adj : F ⊣ G)
{X : C}
{Y Y' : D}
(f : F.obj X ⟶ Y)
(g : Y ⟶ Y')

(adj.homEquiv X Y') (CategoryTheory.CategoryStruct.comp f g) =
  CategoryTheory.CategoryStruct.comp ((adj.homEquiv X Y) f) (G.map g)


@[to_additive]
theorem ne_one_of_mem_sphere (hr : r ≠ 0) (x : sphere (1 : E) r) : (x : E) ≠ 1

{E : Type u_6}
[SeminormedGroup E]
{r : ℝ}
(hr : r ≠ 0)
(x : ↑(Metric.sphere 1 r))


@[simp] lemma mem_iInf {f : ι → Sublattice α} : a ∈ ⨅ i, f i ↔ ∀ i, a ∈ f i

{ι : Sort u_1}
{α : Type u_2}
[Lattice α]
{a : α}
{f : ι → Sublattice α}


theorem mul_power {a b c : Cardinal} : (a * b) ^ c = a ^ c * b ^ c


lemma eventually_atTop_le {b : ℝ} (hb : b ∈ Set.Ioo 0 1) (hf : GrowsPolynomially f) :
    ∃ c > 0, ∀ᶠ x in atTop, ∀ u ∈ Set.Icc (b * x) x, f u ≤ c * f x

(hf : AkraBazziRecurrence.GrowsPolynomially f)

∃ c > 0, ∀ᶠ (x : ℝ) in Filter.atTop, ∀ u ∈ Set.Icc (b * x) x, f u ≤ c * f x


/-- A tensor product of symmetric bilinear forms is symmetric. -/
lemma _root_.LinearMap.IsSymm.tmul {B₁ : BilinMap A M₁ A} {B₂ : BilinMap R M₂ R}
    (hB₁ : B₁.IsSymm) (hB₂ : B₂.IsSymm) : (B₁.tmul B₂).IsSymm

{R : Type uR}
{A : Type uA}
{M₁ : Type uM₁}
{M₂ : Type uM₂}
[CommSemiring R]
[CommSemiring A]
[AddCommMonoid M₁]
[AddCommMonoid M₂]
[Algebra R A]
[Module R M₁]
[Module A M₁]
[SMulCommClass R A M₁]
[IsScalarTower R A M₁]
[Module R M₂]
{B₁ : LinearMap.BilinMap A M₁ A}
{B₂ : LinearMap.BilinMap R M₂ R}
(hB₁ : LinearMap.IsSymm B₁)
(hB₂ : LinearMap.IsSymm B₂)


@[simp]
theorem smul_eq_zero : c • x = 0 ↔ c = 0 ∨ x = 0

{R : Type u_2}
{M : Type u_5}
[Zero R]
[Zero M]
[SMulWithZero R M]
[NoZeroSMulDivisors R M]
{c : R}
{x : M}


/-- A monoid homomorphism `f : M →* N` such that `f x` commutes with `f y` for all `x, y` defines
a monoid homomorphism to `Nᵐᵒᵖ`. -/
@[to_additive (attr := simps (config := .asFn))
      "An additive monoid homomorphism `f : M →+ N` such that `f x` additively commutes
      with `f y` for all `x, y` defines an additive monoid homomorphism to `Sᵃᵒᵖ`."]
def MonoidHom.toOpposite {M N : Type*} [MulOneClass M] [MulOneClass N] (f : M →* N)
    (hf : ∀ x y, Commute (f x) (f y)) : M →* Nᵐᵒᵖ

(hf : ∀ (x y : M), AddCommute (f x) (f y))

⇑(f.toOpposite hf) = AddOpposite.op ∘ ⇑f


/-- If `‖pₙ‖ rⁿ` is bounded in `n`, then the radius of `p` is at least `r`. -/
theorem le_radius_of_bound_nnreal (C : ℝ≥0) {r : ℝ≥0} (h : ∀ n : ℕ, ‖p n‖₊ * r ^ n ≤ C) :
    (r : ℝ≥0∞) ≤ p.radius

{𝕜 : Type u_1}
{E : Type u_2}
{F : Type u_3}
[NontriviallyNormedField 𝕜]
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
(p : FormalMultilinearSeries 𝕜 E F)
(C : ℝ≥0)
{r : ℝ≥0}
(h : ∀ (n : ℕ), ‖p n‖₊ * r ^ n ≤ C)


@[simp]
theorem toMatrix_self [DecidableEq ι] : b.toMatrix b = (1 : Matrix ι ι k)

{ι : Type u₁}
{k : Type u₂}
{V : Type u₃}
{P : Type u₄}
[AddCommGroup V]
[AffineSpace V P]
[Ring k]
[Module k V]
(b : AffineBasis ι k P)
[DecidableEq ι]


@[to_additive (attr := simp)]
theorem self_eq_mul_left : b = a * b ↔ a = 1

{M : Type u}
[RightCancelMonoid M]
{a b : M}


lemma epi_iff_locallySurjective_on_compHaus : Epi f ↔
    ∀ (S : CompHaus) (y : Y.val.obj ⟨S⟩),
      (∃ (S' : CompHaus) (φ : S' ⟶ S) (_ : Function.Surjective φ) (x : X.val.obj ⟨S'⟩),
        f.val.app ⟨S'⟩ x = Y.val.map ⟨φ⟩ y)

(R : Type (u + 1))
[Ring R]
{X Y : CondensedMod R}
(f : X ⟶ Y)

CategoryTheory.Epi f ↔
  ∀ (S : CompHaus) (y : ↑(Y.val.obj (Opposite.op S))),
    ∃ S' φ, ∃ (_ : Function.Surjective ⇑φ), ∃ x, (f.val.app (Opposite.op S')) x = (Y.val.map (Opposite.op φ)) y


nonrec theorem inv_zero {R} [DivisionRing R] : (0 : R)⁻¹ = 0


theorem HasColimit.mk {F : J ⥤ C} (d : ColimitCocone F) : HasColimit F

(d : CategoryTheory.Limits.ColimitCocone F)


theorem setBlack_idem {t : RBNode α} : t.setBlack.setBlack = t.setBlack


@[simp]
theorem seq_assoc (x : Filter α) (g : Filter (α → β)) (h : Filter (β → γ)) :
    seq h (seq g x) = seq (seq (map (· ∘ ·) h) g) x

{α : Type u}
{β : Type v}
{γ : Type w}
(x : Filter α)
(g : Filter (α → β))
(h : Filter (β → γ))

h.seq (g.seq x) = ((Filter.map (fun x x_1 => x ∘ x_1) h).seq g).seq x


/-- Auxiliary construction for `Orientation.rightAngleRotation`, rotation by 90 degrees in an
oriented real inner product space of dimension 2. -/
irreducible_def rightAngleRotationAux₁ : E →ₗ[ℝ] E

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

o.rightAngleRotationAux₁ =
  let to_dual := (InnerProductSpace.toDual ℝ E).toLinearEquiv ≪≫ₗ LinearMap.toContinuousLinearMap.symm;
  ↑to_dual.symm ∘ₗ o.areaForm


theorem Memℒp.of_le {f : α → E} {g : α → F} (hg : Memℒp g p μ) (hf : AEStronglyMeasurable f μ)
    (hfg : ∀ᵐ x ∂μ, ‖f x‖ ≤ ‖g x‖) : Memℒp f p μ

(hf : MeasureTheory.AEStronglyMeasurable f μ)


theorem rank_fin_fun (n : ℕ) : Module.rank R (Fin n → R) = n

{R : Type u}
[Ring R]
[StrongRankCondition R]
(n : ℕ)


theorem isUnitSMul_apply {v : Basis ι R M} {w : ι → R} (hw : ∀ i, IsUnit (w i)) (i : ι) :
    v.isUnitSMul hw i = w i • v i

{ι : Type u_1}
{R : Type u_3}
{M : Type u_6}
[Ring R]
[AddCommGroup M]
[Module R M]
{v : Basis ι R M}
{w : ι → R}
(hw : ∀ (i : ι), IsUnit (w i))
(i : ι)


theorem DifferentiableWithinAt.cpow (hf : DifferentiableWithinAt ℂ f s x)
    (hg : DifferentiableWithinAt ℂ g s x) (h0 : f x ∈ slitPlane) :
    DifferentiableWithinAt ℂ (fun x => f x ^ g x) s x

{E : Type u_1}
[NormedAddCommGroup E]
[NormedSpace ℂ E]
{f g : E → ℂ}
{x : E}
{s : Set E}
(hf : DifferentiableWithinAt ℂ f s x)
(hg : DifferentiableWithinAt ℂ g s x)
(h0 : f x ∈ Complex.slitPlane)


lemma coeSubgraph_restrict_eq {H : G.Subgraph} (H' : G.Subgraph) :
    Subgraph.coeSubgraph (H.restrict H') = H ⊓ H'

{V : Type u}
{G : SimpleGraph V}
{H : G.Subgraph}
(H' : G.Subgraph)

SimpleGraph.Subgraph.coeSubgraph (SimpleGraph.Subgraph.restrict H') = H ⊓ H'


theorem FamilyOfElements.Compatible.to_sieveCompatible {x : FamilyOfElements P (S : Presieve X)}
    (t : x.Compatible) : x.SieveCompatible

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

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


@[to_additive]
theorem prod_Ioi_zero {M : Type*} [CommMonoid M] {n : ℕ} {v : Fin n.succ → M} :
    ∏ i ∈ Ioi 0, v i = ∏ j : Fin n, v j.succ

{M : Type u_3}
[AddCommMonoid M]
{n : ℕ}
{v : Fin n.succ → M}

∑ i ∈ Finset.Ioi 0, v i = ∑ j : Fin n, v j.succ


theorem single_apply {a a' : G} {b : k} [Decidable (a = a')] :
    single a b a' = if a = a' then b else 0

{k : Type u₁}
{G : Type u₂}
[Semiring k]
{a a' : G}
{b : k}
[Decidable (a = a')]

(AddMonoidAlgebra.single a b) a' = if a = a' then b else 0


theorem AntivaryOn.dual : AntivaryOn f g s → AntivaryOn (toDual ∘ f) (toDual ∘ g) s

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

AntivaryOn f g s → AntivaryOn (⇑OrderDual.toDual ∘ f) (⇑OrderDual.toDual ∘ g) s


theorem IsCycleOn.range_zpow (h : f.IsCycleOn s) (ha : a ∈ s) :
    Set.range (fun n => (f ^ n) a : ℤ → α) = s

{α : Type u_2}
{f : Equiv.Perm α}
{s : Set α}
{a : α}
(h : f.IsCycleOn s)
(ha : a ∈ s)


/-- **Rearrangement Inequality**: Pointwise scalar multiplication of `f` and `g` is minimized when
`f` and `g` antivary together. Stated by permuting the entries of `g`. -/
theorem Antivary.sum_smul_le_sum_smul_comp_perm (hfg : Antivary f g) :
    ∑ i, f i • g i ≤ ∑ i, f i • g (σ i)

{ι : Type u_1}
{α : Type u_2}
{β : Type u_3}
[LinearOrderedRing α]
[LinearOrderedAddCommGroup β]
[Module α β]
[OrderedSMul α β]
{σ : Equiv.Perm ι}
{f : ι → α}
{g : ι → β}
[Fintype ι]
(hfg : Antivary f g)

∑ i : ι, f i • g i ≤ ∑ i : ι, f i • g (σ i)


@[simp]
theorem LinearMap.mkContinuousOfExistsBound_apply (h : ∃ C, ∀ x, ‖f x‖ ≤ C * ‖x‖) (x : E) :
    f.mkContinuousOfExistsBound h x = f x

{𝕜 : Type u_1}
{𝕜₂ : Type u_2}
{E : Type u_3}
{F : Type u_4}
[Ring 𝕜]
[Ring 𝕜₂]
[SeminormedAddCommGroup E]
[SeminormedAddCommGroup F]
[Module 𝕜 E]
[Module 𝕜₂ F]
{σ : 𝕜 →+* 𝕜₂}
(f : E →ₛₗ[σ] F)
(h : ∃ C, ∀ (x : E), ‖f x‖ ≤ C * ‖x‖)
(x : E)


theorem image_compl_subset {f : α → β} {s : Set α} (H : Injective f) : f '' sᶜ ⊆ (f '' s)ᶜ

{α : Type u_1}
{β : Type u_2}
{f : α → β}
{s : Set α}
(H : Function.Injective f)


theorem Unique.bijective {A B} [Unique A] [Unique B] {f : A → B} : Function.Bijective f

{A : Sort u_2}
{B : Sort u_3}
[Unique A]
[Unique B]
{f : A → B}


lemma Exact.map_of_preservesRightHomologyOf (h : S.Exact) (F : C ⥤ D)
    [F.PreservesZeroMorphisms] [F.PreservesRightHomologyOf S]
    [(S.map F).HasHomology] : (S.map F).Exact


theorem disjoint_of_subset_left {s t u : Multiset α} (h : s ⊆ u) (d : Disjoint u t) : Disjoint s t

{α : Type u_1}
{s t u : Multiset α}
(h : s ⊆ u)
(d : u.Disjoint t)


@[simp]
nonrec theorem mul_zero {α : Type} [Ring α] (x : Holor α ds₁) : x ⊗ (0 : Holor α ds₂) = 0

{ds₁ ds₂ : List ℕ}
{α : Type}
[Ring α]
(x : Holor α ds₁)


@[to_additive (attr := simp)]
theorem coeSubtype : ⇑ H.subtype = ((↑) : H → G)

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


theorem sum_filter_count_eq_countP [DecidableEq α] (p : α → Prop) [DecidablePred p] (l : List α) :
    ∑ x ∈ l.toFinset.filter p, l.count x = l.countP p

{α : Type u_3}
[DecidableEq α]
(p : α → Prop)
[DecidablePred p]
(l : List α)

∑ x ∈ Finset.filter p l.toFinset, List.count x l = List.countP (fun b => decide (p b)) l


@[mono]
theorem sigma_mono (hs : s₁ ⊆ s₂) (ht : ∀ i, t₁ i ⊆ t₂ i) : s₁.sigma t₁ ⊆ s₂.sigma t₂

{ι : Type u_1}
{α : ι → Type u_2}
{s₁ s₂ : Finset ι}
{t₁ t₂ : (i : ι) → Finset (α i)}
(hs : s₁ ⊆ s₂)
(ht : ∀ (i : ι), t₁ i ⊆ t₂ i)


theorem binaryCofan_isColimit_iff {X Y : TopCat} (c : BinaryCofan X Y) :
    Nonempty (IsColimit c) ↔
      OpenEmbedding c.inl ∧ OpenEmbedding c.inr ∧ IsCompl (Set.range c.inl) (Set.range c.inr)

(c : CategoryTheory.Limits.BinaryCofan X Y)

Nonempty (CategoryTheory.Limits.IsColimit c) ↔
  OpenEmbedding ⇑c.inl ∧ OpenEmbedding ⇑c.inr ∧ IsCompl (Set.range ⇑c.inl) (Set.range ⇑c.inr)


/-- A subgroup is closed under inverse. -/
@[to_additive "An `AddSubgroup` is closed under inverse."]
protected theorem inv_mem {x : G} : x ∈ H → x⁻¹ ∈ H

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

x ∈ H → x⁻¹ ∈ H


theorem memℒp_top (f : α →ₛ E) (μ : Measure α) : Memℒp f ∞ μ

{α : Type u_1}
{E : Type u_4}
[MeasurableSpace α]
[NormedAddCommGroup E]
(f : MeasureTheory.SimpleFunc α E)
(μ : MeasureTheory.Measure α)


theorem choose_le_succ (a c : ℕ) : choose a c ≤ choose a.succ c


@[to_additive]
theorem Multipliable.nat_tprod_vanishing {f : ℕ → G} (hf : Multipliable f) ⦃e : Set G⦄
    (he : e ∈ 𝓝 1) : ∃ N : ℕ, ∀ t ⊆ {n | N ≤ n}, (∏' n : t, f n) ∈ e

{G : Type u_2}
[AddCommGroup G]
[TopologicalSpace G]
[TopologicalAddGroup G]
{f : ℕ → G}
(hf : Summable f)
⦃e : Set G⦄
(he : e ∈ 𝓝 0)

∃ N, ∀ t ⊆ {n | N ≤ n}, ∑' (n : ↑t), f ↑n ∈ e


/-- An order embedding `f` from `Fin k` to a finset of cardinality `k` has to coincide with
the increasing bijection `orderEmbOfFin s h`. -/
theorem orderEmbOfFin_unique' {s : Finset α} {k : ℕ} (h : s.card = k) {f : Fin k ↪o α}
    (hfs : ∀ x, f x ∈ s) : f = s.orderEmbOfFin h

{α : Type u_1}
[LinearOrder α]
{s : Finset α}
{k : ℕ}
(h : s.card = k)
{f : Fin k ↪o α}
(hfs : ∀ (x : Fin k), f x ∈ s)


lemma _root_.zsmul_eq_mul' (a : α) (n : ℤ) : n • a = a * n

{α : Type u_3}
[NonAssocRing α]
(a : α)
(n : ℤ)


@[simp]
theorem intervalIntegrable_inv (h : ∀ x : ℝ, x ∈ [[a, b]] → f x ≠ 0)
    (hf : ContinuousOn f [[a, b]]) : IntervalIntegrable (fun x => (f x)⁻¹) μ a b


@[simp] theorem not_or_self : ∀ (x : Bool), (!x || x) = true


theorem comp_fderivWithin {f : G → E} {s : Set G} {x : G} (hxs : UniqueDiffWithinAt 𝕜 s x) :
    fderivWithin 𝕜 (iso ∘ f) s x = (iso : E →L[𝕜] F).comp (fderivWithin 𝕜 f s x)

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{F : Type u_3}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{G : Type u_4}
[NormedAddCommGroup G]
[NormedSpace 𝕜 G]
(iso : E ≃ₗᵢ[𝕜] F)
{f : G → E}
{s : Set G}
{x : G}
(hxs : UniqueDiffWithinAt 𝕜 s x)

fderivWithin 𝕜 (⇑iso ∘ f) s x =
  (↑{ toLinearEquiv := iso.toLinearEquiv, continuous_toFun := ⋯, continuous_invFun := ⋯ }).comp (fderivWithin 𝕜 f s x)


theorem transitive_of_trans (r : α → α → Prop) [IsTrans α r] : Transitive r

{α : Type u}
(r : α → α → Prop)
[IsTrans α r]


lemma homologySequence_epi_shift_map_mor₂_iff :
    Epi ((F.shift n₀).map T.mor₂) ↔ F.homologySequenceδ T n₀ n₁ h = 0

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

(T : CategoryTheory.Pretriangulated.Triangle C)

(hT : T ∈ CategoryTheory.Pretriangulated.distinguishedTriangles)

CategoryTheory.Epi ((F.shift n₀).map T.mor₂) ↔ F.homologySequenceδ T n₀ n₁ h = 0


@[simp]
theorem totalDegree_monomial (s : σ →₀ ℕ) {c : R} (hc : c ≠ 0) :
    (monomial s c : MvPolynomial σ R).totalDegree = s.sum fun _ e => e

{R : Type u}
{σ : Type u_1}
[CommSemiring R]
(s : σ →₀ ℕ)
{c : R}
(hc : c ≠ 0)

((MvPolynomial.monomial s) c).totalDegree = s.sum fun x e => e


lemma Even.pow_of_ne_zero (ha : Even a) : ∀ {n : ℕ}, n ≠ 0 → Even (a ^ n)

{α : Type u_2}
[Semiring α]
{a : α}
(ha : Even a)
{n : ℕ}


@[simp]
theorem zero_ne_bot : (0 : EReal) ≠ ⊥


@[to_additive (attr := simp)]
theorem lift_comp_of' (f : AssocQuotient α →ₙ* β) : lift (f.comp of) = f

{α : Type u}
[Mul α]
{β : Type v}
[Semigroup β]
(f : Magma.AssocQuotient α →ₙ* β)

Magma.AssocQuotient.lift (f.comp Magma.AssocQuotient.of) = f


@[to_additive]
theorem le_div_iff_mul_le : a ≤ c / b ↔ a * b ≤ c

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


/--
Implementation of the functor `PresheafOfModules R ⥤ Cᵒᵖ ⥤ ModuleCat (R.obj X)`
when `X` is initial.

The functor is implemented as, on object level `M ↦ (c ↦ M(c))` where the `R(X)`-module structure
on `M(c)` is given by restriction of scalars along the unique morphism `R(c) ⟶ R(X)`; and on
morphism level `(f : M ⟶ N) ↦ (c ↦ f(c))`.
-/
@[simps]
noncomputable def forgetToPresheafModuleCatObj
    (X : Cᵒᵖ) (hX : Limits.IsInitial X) (M : PresheafOfModules.{v} R) :
    Cᵒᵖ ⥤ ModuleCat (R.1.obj X)

(hX : CategoryTheory.Limits.IsInitial X)

(x : ↑((fun c => (ModuleCat.restrictScalars (R.map (hX.to c))).obj (M.obj c)) c₁))

((PresheafOfModules.forgetToPresheafModuleCatObj X hX M).map f) x = (M.presheaf.map f) x


@[simp, norm_cast]
theorem dvd_to_int (m n : ZNum) : (m : ℤ) ∣ n ↔ m ∣ n

↑m ∣ ↑n ↔ m ∣ n


@[simp]
theorem coe_mk {f h h₀ h₁ h₂ h₃ h₄ h₅ h₆} :
    (⟨⟨⟨⟨⟨f, h⟩, h₀⟩, h₁, h₂⟩, h₃, h₄, h₅⟩, h₆⟩ : A ≃ₐc[R] B) = f

{h : ∀ (x y : A), f (x + y) = f x + f y}

{h₀ :
  ∀ (m : R) (x : A),
    { toFun := f, map_add' := h }.toFun (m • x) = (RingHom.id R) m • { toFun := f, map_add' := h }.toFun x}

{h₁ : Coalgebra.counit ∘ₗ { toFun := f, map_add' := h, map_smul' := h₀ } = Coalgebra.counit}

{h₂ :
  TensorProduct.map { toFun := f, map_add' := h, map_smul' := h₀ } { toFun := f, map_add' := h, map_smul' := h₀ } ∘ₗ
      Coalgebra.comul =
    Coalgebra.comul ∘ₗ { toFun := f, map_add' := h, map_smul' := h₀ }}

{h₄ :
  Function.LeftInverse h₃ { toFun := f, map_add' := h, map_smul' := h₀, counit_comp := h₁, map_comp_comul := h₂ }.toFun}

{h₅ :
  Function.RightInverse h₃
    { toFun := f, map_add' := h, map_smul' := h₀, counit_comp := h₁, map_comp_comul := h₂ }.toFun}

{h₆ :
  ∀ (x y : A),
    { toFun := f, map_add' := h, map_smul' := h₀, counit_comp := h₁, map_comp_comul := h₂, invFun := h₃, left_inv := h₄,
            right_inv := h₅ }.toFun
        (x * y) =
      { toFun := f, map_add' := h, map_smul' := h₀, counit_comp := h₁, map_comp_comul := h₂, invFun := h₃,
              left_inv := h₄, right_inv := h₅ }.toFun
          x *
        { toFun := f, map_add' := h, map_smul' := h₀, counit_comp := h₁, map_comp_comul := h₂, invFun := h₃,
              left_inv := h₄, right_inv := h₅ }.toFun
          y}

⇑{ toFun := f, map_add' := h, map_smul' := h₀, counit_comp := h₁, map_comp_comul := h₂, invFun := h₃, left_inv := h₄,
      right_inv := h₅, map_mul' := h₆ } =
  f


@[simp]
theorem coe_back (x : X) : ActionCategory.back (x : ActionCategory M X) = x

{M : Type u_1}
[Monoid M]
{X : Type u}
[MulAction M X]
(x : X)

CategoryTheory.ActionCategory.back ⟨(), x⟩ = x


/-- Construct a unit from limits of units and their inverses. -/
@[to_additive (attr := simps)
  "Construct an additive unit from limits of additive units and their negatives."]
def Filter.Tendsto.units [TopologicalSpace N] [Monoid N] [ContinuousMul N] [T2Space N]
    {f : ι → Nˣ} {r₁ r₂ : N} {l : Filter ι} [l.NeBot] (h₁ : Tendsto (fun x => ↑(f x)) l (𝓝 r₁))
    (h₂ : Tendsto (fun x => ↑(f x)⁻¹) l (𝓝 r₂)) : Nˣ

(h₁ : Filter.Tendsto (fun x => ↑(f x)) l (𝓝 r₁))

(h₂ : Filter.Tendsto (fun x => ↑(f x)⁻¹) l (𝓝 r₂))


/-- A morphism of bimodule objects. -/
@[ext]
structure Hom (M N : Bimod A B) where
  hom : M.X ⟶ N.X
  left_act_hom : M.actLeft ≫ hom = (A.X ◁ hom) ≫ N.actLeft := by aesop_cat
  right_act_hom : M.actRight ≫ hom = (hom ▷ B.X) ≫ N.actRight := by aesop_cat

{C : Type u₁}
[CategoryTheory.Category.{v₁, u₁} C]
[CategoryTheory.MonoidalCategory C]
{A B : Mon_ C}
{M N : Bimod A B}
(self : M.Hom N)

M.actRight ≫ self.hom = self.hom ▷ B.X ≫ N.actRight


theorem hom_inv_id : hom P ≫ inv P = 𝟙 _

Bimod.LeftUnitorBimod.hom P ≫ Bimod.LeftUnitorBimod.inv P = 𝟙 (Bimod.TensorBimod.X (Bimod.regular R) P)


theorem get_set_eq (a : Array α) (i : Fin a.size) (v : α) :
    (a.set i v)[i.1] = v

{α : Type u_1}
(a : Array α)
(i : Fin a.size)
(v : α)


/-- If we view `M` as a submodule of `N` via the injective linear map `i : M ↪ N`, then a submodule
between `M` and `N` is a submodule `N'` of `N`. To prove Baer's criterion, we need to consider
pairs of `(N', f')` such that `M ≤ N' ≤ N` and `f'` extends `f`. -/
structure ExtensionOf extends LinearPMap R N Q where
  le : LinearMap.range i ≤ domain
  is_extension : ∀ m : M, f m = toLinearPMap ⟨i m, le ⟨m, rfl⟩⟩

{R : Type u}
[Ring R]
{Q : Type v}
[AddCommGroup Q]
[Module R Q]
{M : Type u_1}
{N : Type u_2}
[AddCommGroup M]
[AddCommGroup N]
[Module R M]
[Module R N]
{i : M →ₗ[R] N}
{f : M →ₗ[R] Q}
(self : Module.Baer.ExtensionOf i f)
(m : M)


theorem ofBoolRing_inj {a b : AsBoolRing α} : ofBoolRing a = ofBoolRing b ↔ a = b


/-- The product of `f y` over `y ∈ Set.range g` equals the product of `f (g i)` over all `i`
provided that `g` is injective. -/
@[to_additive
      "The sum of `f y` over `y ∈ Set.range g` equals the sum of `f (g i)` over all `i`
      provided that `g` is injective."]
theorem finprod_mem_range {g : β → α} (hg : Injective g) : ∏ᶠ i ∈ range g, f i = ∏ᶠ j, f (g j)

{α : Type u_1}
{β : Type u_2}
{M : Type u_5}
[CommMonoid M]
{f : α → M}
{g : β → α}
(hg : Function.Injective g)

∏ᶠ (i : α) (_ : i ∈ Set.range g), f i = ∏ᶠ (j : β), f (g j)


theorem degree_eq_one_of_irreducible [IsAlgClosed k] {p : k[X]} (hp : Irreducible p) :
    p.degree = 1

(k : Type u)
[Field k]
[IsAlgClosed k]
{p : k[X]}
(hp : Irreducible p)


{R : Type r}
[CommRing R]
(W : WeierstrassCurve R)


/-- A functor which maps objects to objects satisfying a certain property induces a lift through
    the full subcategory of objects satisfying that property. -/
@[simps]
def FullSubcategory.lift (F : C ⥤ D) (hF : ∀ X, P (F.obj X)) : C ⥤ FullSubcategory P

{C : Type u₁}
[CategoryTheory.Category.{v, u₁} C]
{D : Type u₂}
[CategoryTheory.Category.{v₂, u₂} D]
(P : D → Prop)
(F : CategoryTheory.Functor C D)
(hF : ∀ (X : C), P (F.obj X))
(X : C)

((CategoryTheory.FullSubcategory.lift P F hF).obj X).obj = F.obj X


theorem isConj_of_support_equiv
    (f : { x // x ∈ (σ.support : Set α) } ≃ { x // x ∈ (τ.support : Set α) })
    (hf : ∀ (x : α) (hx : x ∈ (σ.support : Set α)),
      (f ⟨σ x, apply_mem_support.2 hx⟩ : α) = τ ↑(f ⟨x, hx⟩)) :
    IsConj σ τ

(f : { x // x ∈ ↑σ.support } ≃ { x // x ∈ ↑τ.support })

(hf : ∀ (x : α) (hx : x ∈ ↑σ.support), ↑(f ⟨σ x, ⋯⟩) = τ ↑(f ⟨x, hx⟩))


theorem option_guard {p : α → β → Prop} [∀ a b, Decidable (p a b)] (hp : PrimrecRel p) {f : α → β}
    (hf : Primrec f) : Primrec fun a => Option.guard (p a) (f a)

{α : Type u_1}
{β : Type u_2}
[Primcodable α]
[Primcodable β]
{p : α → β → Prop}
[(a : α) → (b : β) → Decidable (p a b)]
(hp : PrimrecRel p)
{f : α → β}
(hf : Primrec f)


/-- Precompose a partial homeomorphism with a homeomorphism.
We modify the source and target to have better definitional behavior. -/
@[simps! (config := .asFn)]
def transPartialHomeomorph (e : X ≃ₜ Y) (f' : PartialHomeomorph Y Z) : PartialHomeomorph X Z

{X : Type u_1}
{Y : Type u_3}
{Z : Type u_5}
[TopologicalSpace X]
[TopologicalSpace Y]
[TopologicalSpace Z]
(e : X ≃ₜ Y)
(f' : PartialHomeomorph Y Z)

↑(e.transPartialHomeomorph f').symm = ⇑e.symm ∘ ↑f'.symm


theorem IsCompl.bihimp_eq_bot {a b : α} (h : IsCompl a b) : a ⇔ b = ⊥

{α : Type u_2}
[HeytingAlgebra α]
{a b : α}
(h : IsCompl a b)


private lemma exp_lt_aux {t : ℝ} (ht : 0 < t) : rexp (-π * t) < 1


lemma uncurry_obj_curry_obj (F : B × C ⥤ D) : uncurry.obj (curry.obj F) = F

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

CategoryTheory.uncurry.obj (CategoryTheory.curry.obj F) = F


@[to_additive (attr := simp) top_prod_top]
theorem top_prod_top : (⊤ : Submonoid M).prod (⊤ : Submonoid N) = ⊤

{M : Type u_1}
{N : Type u_2}
[MulOneClass M]
[MulOneClass N]


@[simp, rclike_simps]
theorem normSq_to_real {x : ℝ} : normSq x = x * x


@[simp] theorem indexOf_nil [BEq α] : ([] : List α).indexOf x = 0


@[simp]
theorem grade_ofDual [GradeOrder 𝕆 α] (a : αᵒᵈ) : grade 𝕆 (ofDual a) = ofDual (grade 𝕆ᵒᵈ a)

{𝕆 : Type u_1}
{α : Type u_3}
[Preorder 𝕆]
[Preorder α]
[GradeOrder 𝕆 α]
(a : αᵒᵈ)

grade 𝕆 (OrderDual.ofDual a) = OrderDual.ofDual (grade 𝕆ᵒᵈ a)


/-- See note [partially-applied ext lemmas]. -/
@[ext]
theorem hom_ext {g₁ g₂ : UniversalEnvelopingAlgebra R L →ₐ[R] A}
    (h :
      (g₁ : UniversalEnvelopingAlgebra R L →ₗ⁅R⁆ A).comp (ι R) =
        (g₂ : UniversalEnvelopingAlgebra R L →ₗ⁅R⁆ A).comp (ι R)) :
    g₁ = g₂

(h : g₁.toLieHom.comp (UniversalEnvelopingAlgebra.ι R) = g₂.toLieHom.comp (UniversalEnvelopingAlgebra.ι R))


theorem eqOn_Icc_of_ae_eq [DenselyOrdered X] {a b : X} (hne : a ≠ b) {f g : X → Y}
    (hfg : f =ᵐ[μ.restrict (Icc a b)] g) (hf : ContinuousOn f (Icc a b))
    (hg : ContinuousOn g (Icc a b)) : EqOn f g (Icc a b)

(hfg : f =ᵐ[μ.restrict (Set.Icc a b)] g)


theorem Module.finite_of_finrank_eq_succ {n : ℕ}
    (hn : finrank R M = n.succ) : Module.Finite R M

(hn : FiniteDimensional.finrank R M = n.succ)


@[simp]
theorem X_ne_zero [Nontrivial R] (s : σ) :
    X (R := R) s ≠ 0

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


theorem AlgebraicIndependent.to_subtype_range {ι} {f : ι → A} (hf : AlgebraicIndependent R f) :
    AlgebraicIndependent R ((↑) : range f → A)

{R : Type u_3}
{A : Type u_5}
[CommRing R]
[CommRing A]
[Algebra R A]
{ι : Type u_9}
{f : ι → A}
(hf : AlgebraicIndependent R f)


theorem fourierIntegral_continuousLinearMap_apply
    {f : V → (F →L[ℝ] E)} {a : F} {w : W} (he : Continuous e) (hf : Integrable f μ) :
    fourierIntegral e μ L.toLinearMap₂ f w a =
      fourierIntegral e μ L.toLinearMap₂ (fun x ↦ f x a) w

{𝕜 : Type u_1}
{E : Type u_3}
{F : Type u_4}
{V : Type u_5}
{W : Type u_6}
[NontriviallyNormedField 𝕜]
[NormedAddCommGroup V]
[NormedSpace 𝕜 V]
[MeasurableSpace V]
[BorelSpace V]
[NormedAddCommGroup W]
[NormedSpace 𝕜 W]
{e : AddChar 𝕜 ↥𝕊}
{μ : MeasureTheory.Measure V}
{L : V →L[𝕜] W →L[𝕜] 𝕜}
[NormedAddCommGroup F]
[NormedSpace ℝ F]
[NormedAddCommGroup E]
[NormedSpace ℂ E]
{f : V → F →L[ℝ] E}
{a : F}
{w : W}
(he : Continuous ⇑e)
(hf : MeasureTheory.Integrable f μ)

(VectorFourier.fourierIntegral e μ L.toLinearMap₂ f w) a =
  VectorFourier.fourierIntegral e μ L.toLinearMap₂ (fun x => (f x) a) w


/-- The equivalence `Karoubi (CochainComplex C α) ≌ CochainComplex (Karoubi C) α`. -/
@[simps!]
def karoubiCochainComplexEquivalence :
    Karoubi (CochainComplex C α) ≌ CochainComplex (Karoubi C) α

(C : Type u_1)
[CategoryTheory.Category.{u_4, u_1} C]
[CategoryTheory.Preadditive C]
(α : Type u_3)
[AddRightCancelSemigroup α]
[One α]

(CategoryTheory.Idempotents.karoubiCochainComplexEquivalence C α).counitIso.inv = CategoryTheory.eqToHom ⋯


/-- An equivalence of the index set defines an equivalence between the spaces of continuous
multilinear maps. This is the forward map of this equivalence. -/
@[simps! toMultilinearMap apply]
nonrec def domDomCongr {ι' : Type*} (e : ι ≃ ι')
    (f : ContinuousMultilinearMap R (fun _ : ι => M₂) M₃) :
    ContinuousMultilinearMap R (fun _ : ι' => M₂) M₃

(f : ContinuousMultilinearMap R (fun x => M₂) M₃)

(ContinuousMultilinearMap.domDomCongr e f).toMultilinearMap = MultilinearMap.domDomCongr e f.toMultilinearMap


@[simp]
theorem one_le_ofNat : 1 ≤ (no_index (OfNat.ofNat n : α))

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


theorem subtypePermOfFintype_one (p : α → Prop) [Finite { x // p x }]
    (h : ∀ x, p x → p ((1 : Perm α) x)) : @subtypePermOfFintype α 1 p _ h = 1

{α : Type u}
(p : α → Prop)
[Finite { x // p x }]
(h : ∀ (x : α), p x → p (1 x))


{a b c : CategoryTheory.FreeBicategory B}

CategoryTheory.FreeBicategory.Hom.comp f g = CategoryTheory.CategoryStruct.comp f g


@[simp (default + 1)] -- otherwise `simp` doesn't use `forall_image₂_iff`
lemma sup'_image₂_le {g : γ → δ} {a : δ} (h : (image₂ f s t).Nonempty) :
    sup' (image₂ f s t) h g ≤ a ↔ ∀ x ∈ s, ∀ y ∈ t, g (f x y) ≤ a

{α : Type u_1}
{β : Type u_3}
{γ : Type u_5}
{δ : Type u_7}
[DecidableEq γ]
{f : α → β → γ}
{s : Finset α}
{t : Finset β}
[SemilatticeSup δ]
{g : γ → δ}
{a : δ}
(h : (Finset.image₂ f s t).Nonempty)

(Finset.image₂ f s t).sup' h g ≤ a ↔ ∀ x ∈ s, ∀ y ∈ t, g (f x y) ≤ a


theorem Monic.mul_right_eq_zero_iff (h : Monic p) {q : R[X]} : p * q = 0 ↔ q = 0

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


theorem monotone_comap : Monotone (MeasurableSpace.comap g)

{α : Type u_1}
{β : Type u_2}
{g : β → α}


@[simp]
theorem preimage_Ici {a : α} : (Nat.cast : ℕ → α) ⁻¹' Set.Ici a = Set.Ici ⌈a⌉₊

{α : Type u_2}
[LinearOrderedSemiring α]
[FloorSemiring α]
{a : α}


/-- If `M` is a `CanonicallyOrderedAddCommMonoid`, then `weight f` is zero iff `f=0. -/
theorem weight_eq_zero_iff_eq_zero
    (w : σ → M) [NonTorsionWeight w] {f : σ →₀ ℕ} :
    weight w f = 0 ↔ f = 0

{σ : Type u_1}
{M : Type u_3}
[CanonicallyOrderedAddCommMonoid M]
(w : σ → M)
[Finsupp.NonTorsionWeight w]
{f : σ →₀ ℕ}


/-- The radius of convergence of `p.changeOrigin x` is at least `p.radius - ‖x‖`. In other words,
`p.changeOrigin x` is well defined on the largest ball contained in the original ball of
convergence. -/
theorem changeOrigin_radius : p.radius - ‖x‖₊ ≤ (p.changeOrigin x).radius

{𝕜 : Type u_1}
{E : Type u_2}
{F : Type u_3}
[NontriviallyNormedField 𝕜]
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
(p : FormalMultilinearSeries 𝕜 E F)
{x : E}

p.radius - ↑‖x‖₊ ≤ (p.changeOrigin x).radius


/-- Forget that a function is finitely supported.

This is the linear version of `Finsupp.toFun`. -/
@[simps]
def lcoeFun : (α →₀ M) →ₗ[R] α → M

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

∀ (a : α →₀ M) (a_1 : α), Finsupp.lcoeFun a a_1 = a a_1


@[to_additive]
theorem mul_subset_closure (hs : s ⊆ u) (ht : t ⊆ u) : s * t ⊆ Submonoid.closure u

{M : Type u_3}
[AddMonoid M]
{s t u : Set M}
(hs : s ⊆ u)
(ht : t ⊆ u)


protected theorem uniformContinuous (h : α ≃ᵤ β) : UniformContinuous h

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