theorem symmₗ_linearMapAt (e : Trivialization F (π F E)) [e.IsLinear R] {b : B} (hb : b ∈ e.baseSet)
    (y : E b) : e.symmₗ R b (e.linearMapAt R b y) = y

[TopologicalSpace (Bundle.TotalSpace F E)]

(e : Trivialization F Bundle.TotalSpace.proj)

(Trivialization.symmₗ R e b) ((Trivialization.linearMapAt R e b) y) = y


theorem setToSimpleFunc_smul_real (T : Set α → E →L[ℝ] F) (h_add : FinMeasAdditive μ T) (c : ℝ)
    {f : α →ₛ E} (hf : Integrable f μ) : setToSimpleFunc T (c • f) = c • setToSimpleFunc T f

(h_add : MeasureTheory.FinMeasAdditive μ T)

MeasureTheory.SimpleFunc.setToSimpleFunc T (c • f) = c • MeasureTheory.SimpleFunc.setToSimpleFunc T f


/-- If `(fixedBy α g)ᶜ ⊆ s`, then `g` cannot move a point of `s` outside of `s`. -/
@[to_additive "If `(fixedBy α g)ᶜ ⊆ s`, then `g` cannot move a point of `s` outside of `s`."]
theorem set_mem_fixedBy_of_movedBy_subset {s : Set α} {g : G} (s_subset : (fixedBy α g)ᶜ ⊆ s) :
    s ∈ fixedBy (Set α) g

(s_subset : (MulAction.fixedBy α g)ᶜ ⊆ s)


/-- An extremally disconnected topological space is a space
in which the closure of every open set is open. -/
class ExtremallyDisconnected : Prop where
  /-- The closure of every open set is open. -/
  open_closure : ∀ U : Set X, IsOpen U → IsOpen (closure U)

{X : Type u}
[TopologicalSpace X]
[self : ExtremallyDisconnected X]
(U : Set X)


@[simp]
theorem coe_carrier_toSubmonoid (s : Subsemiring R) : (s.toSubmonoid.carrier : Set R) = s

{R : Type u}
[NonAssocSemiring R]
(s : Subsemiring R)


protected theorem continuousAt {x} : ContinuousAt e x

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


/-- The functor from augmented objects to arrows. -/
@[simps]
def toArrow : Augmented C ⥤ Arrow C

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

∀ {X Y : CategoryTheory.SimplicialObject.Augmented C} (η : X ⟶ Y),
  (CategoryTheory.SimplicialObject.Augmented.toArrow.map η).left =
    (CategoryTheory.SimplicialObject.Augmented.drop.map η).app (Opposite.op (SimplexCategory.mk 0))


protected lemma IsPreirreducible.subsingleton [T2Space X] {S : Set X} (h : IsPreirreducible S) :
    S.Subsingleton

{X : Type u_1}
[TopologicalSpace X]
[T2Space X]
{S : Set X}
(h : IsPreirreducible S)


lemma isLittleO_smoothingFn_one : ε =o[atTop] (fun _ => (1 : ℝ))

AkraBazziRecurrence.smoothingFn =o[Filter.atTop] fun x => 1


lemma nonsingularLift_zero [Nontrivial R] : W'.NonsingularLift ⟦![1, 1, 0]⟧

{R : Type u}
[CommRing R]
{W' : WeierstrassCurve.Jacobian R}
[Nontrivial R]


theorem HasLineDerivWithinAt.hasLineDerivAt'
    (h : HasLineDerivWithinAt 𝕜 f f' s x v) (hs : ∀ᶠ t : 𝕜 in 𝓝 0, x + t • v ∈ s) :
    HasLineDerivAt 𝕜 f f' x v

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{F : Type u_2}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{E : Type u_3}
[AddCommGroup E]
[Module 𝕜 E]
{f : E → F}
{f' : F}
{s : Set E}
{x v : E}
(h : HasLineDerivWithinAt 𝕜 f f' s x v)
(hs : ∀ᶠ (t : 𝕜) in 𝓝 0, x + t • v ∈ s)


theorem image_subset {α β} (e : α ≃ β) (s t : Set α) : e '' s ⊆ e '' t ↔ s ⊆ t

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


@[to_additive]
theorem prod_sdiff [DecidableEq α] (h : s₁ ⊆ s₂) :
    (∏ x ∈ s₂ \ s₁, f x) * ∏ x ∈ s₁, f x = ∏ x ∈ s₂, f x

{α : Type u_3}
{β : Type u_4}
{s₁ s₂ : Finset α}
{f : α → β}
[CommMonoid β]
[DecidableEq α]
(h : s₁ ⊆ s₂)


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

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

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


theorem StructureGroupoid.symm (G : StructureGroupoid H) {e : PartialHomeomorph H H} (he : e ∈ G) :
    e.symm ∈ G

{H : Type u}
[TopologicalSpace H]
(G : StructureGroupoid H)
{e : PartialHomeomorph H H}
(he : e ∈ G)


@[simp]
theorem coeSubtype : ⇑s.subtype = ((↑) : s → R)


theorem IsMinOn.isExtr (h : IsMinOn f s a) : IsExtrOn f s a

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


theorem mem_pi_toList (xs : List α)
    (f : ∀ a, a ∈ xs → β a) : f ∈ pi xs fun x => toList (β x)

{α : Type u_1}
[FinEnum α]
{β : α → Type u_2}
[(a : α) → FinEnum (β a)]
(xs : List α)
(f : (a : α) → a ∈ xs → β a)


theorem of_injective [MulOneClass G] [Nontrivial k] :
    Function.Injective (of k G)

{k : Type u₁}
{G : Type u₂}
[Semiring k]
[MulOneClass G]
[Nontrivial k]

Function.Injective ⇑(MonoidAlgebra.of k G)


@[simp]
theorem coe_fract_self (k : K) : (fract (Basis.singleton ι K) k : K) = Int.fract k

{ι : Type u_2}
{K : Type u_3}
[NormedLinearOrderedField K]
[FloorRing K]
[Fintype ι]
[Unique ι]
(k : K)

Zspan.fract (Basis.singleton ι K) k = Int.fract k


theorem Prepartition.measure_iUnion_toReal [Finite ι] {I : Box ι} (π : Prepartition I)
    (μ : Measure (ι → ℝ)) [IsLocallyFiniteMeasure μ] :
    (μ π.iUnion).toReal = ∑ J ∈ π.boxes, (μ J).toReal

(μ π.iUnion).toReal = ∑ J ∈ π.boxes, (μ ↑J).toReal


/-- There are distinct ordinals smaller than the successor of the domains cardinals
  with equal value -/
theorem exists_lfpApprox_eq_lfpApprox : ∃ a < ord <| succ #α, ∃ b < ord <| succ #α,
    a ≠ b ∧ lfpApprox f x a = lfpApprox f x b

{α : Type u}
[CompleteLattice α]
(f : α →o α)
(x : α)

∃ a < (Order.succ (Cardinal.mk α)).ord,
  ∃ b < (Order.succ (Cardinal.mk α)).ord, a ≠ b ∧ OrdinalApprox.lfpApprox f x a = OrdinalApprox.lfpApprox f x b


theorem ball_inter_range_eq_ball_inter_target :
    ball (extChartAt I c c) f.rOut ∩ range I =
      ball (extChartAt I c c) f.rOut ∩ (extChartAt I c).target

{E : Type uE}
[NormedAddCommGroup E]
[NormedSpace ℝ E]
{H : Type uH}
[TopologicalSpace H]
{I : ModelWithCorners ℝ E H}
{M : Type uM}
[TopologicalSpace M]
[ChartedSpace H M]
{c : M}
(f : SmoothBumpFunction I c)

Metric.ball (↑(extChartAt I c) c) f.rOut ∩ Set.range ↑I =
  Metric.ball (↑(extChartAt I c) c) f.rOut ∩ (extChartAt I c).target


@[simp]
theorem coe_refl : ⇑(refl k P₁) = id

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


theorem setIndependent_iff {α : Type*} [CompleteLattice α] (s : Set α) :
    SetIndependent s ↔ Independent ((↑) : s → α)

{α : Type u_5}
[CompleteLattice α]
(s : Set α)

CompleteLattice.SetIndependent s ↔ CompleteLattice.Independent Subtype.val


/-- **Jordan-Chevalley-Dunford decomposition**: an endomorphism of a finite-dimensional vector space
over a perfect field may be written as a sum of nilpotent and semisimple endomorphisms. Moreover
these nilpotent and semisimple components are polynomial expressions in the original endomorphism.
-/
theorem exists_isNilpotent_isSemisimple [PerfectField K] :
    ∃ᵉ (n ∈ adjoin K {f}) (s ∈ adjoin K {f}), IsNilpotent n ∧ IsSemisimple s ∧ f = n + s

{K : Type u_1}
{V : Type u_2}
[Field K]
[AddCommGroup V]
[Module K V]
[FiniteDimensional K V]
{f : Module.End K V}
[PerfectField K]

∃ n ∈ Algebra.adjoin K {f}, ∃ s ∈ Algebra.adjoin K {f}, IsNilpotent n ∧ s.IsSemisimple ∧ f = n + s


/-- The category of algebras over an additive endofunctor on a preadditive category is preadditive.
-/
@[simps]
instance Endofunctor.algebraPreadditive : Preadditive (Endofunctor.Algebra F)

(A₁ A₂ : CategoryTheory.Endofunctor.Algebra F)


theorem insertNth_eq_iff {p : Fin (n + 1)} {a : α p} {f : ∀ i, α (p.succAbove i)} {g : ∀ j, α j} :
    insertNth p a f = g ↔ a = g p ∧ f = removeNth p g

{n : ℕ}
{α : Fin (n + 1) → Type u}
{p : Fin (n + 1)}
{a : α p}
{f : (i : Fin n) → α (p.succAbove i)}
{g : (j : Fin (n + 1)) → α j}

p.insertNth a f = g ↔ a = g p ∧ f = p.removeNth g


theorem coe_finsetWalkLength_eq (n : ℕ) (u v : V) :
    (G.finsetWalkLength n u v : Set (G.Walk u v)) = {p : G.Walk u v | p.length = n}

{V : Type u}
(G : SimpleGraph V)
[DecidableEq V]
[G.LocallyFinite]
(n : ℕ)
(u v : V)

↑(G.finsetWalkLength n u v) = {p | p.length = n}


/-- The oriented angle between two vectors is `π` if and only if the unoriented angle is `π`. -/
theorem oangle_eq_pi_iff_angle_eq_pi {x y : V} :
    o.oangle x y = π ↔ InnerProductGeometry.angle x y = π

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

o.oangle x y = ↑π ↔ InnerProductGeometry.angle x y = π


@[simp]
lemma inverseImage_iff (P : MorphismProperty D) (F : C ⥤ D) {X Y : C} (f : X ⟶ Y) :
    P.inverseImage F f ↔ P (F.map f)

{C : Type u}
[CategoryTheory.Category.{v, u} C]
{D : Type u_1}
[CategoryTheory.Category.{u_2, u_1} D]
(P : CategoryTheory.MorphismProperty D)
(F : C ⥤ D)
{X Y : C}
(f : X ⟶ Y)


theorem sup_lt_ord_lift {ι} {f : ι → Ordinal} {c : Ordinal} (hι : Cardinal.lift.{v, u} #ι < c.cof)
    (hf : ∀ i, f i < c) : sup.{u, v} f < c

{ι : Type u}
{f : ι → Ordinal.{max u v}}
{c : Ordinal.{max u v}}
(hι : Cardinal.lift.{v, u} #ι < c.cof)
(hf : ∀ (i : ι), f i < c)


theorem StronglyMeasurable.integral_kernel_prod_left'' {f : γ × β → E} (hf : StronglyMeasurable f) :
    StronglyMeasurable fun y => ∫ x, f (x, y) ∂η (a, y)

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

(hf : MeasureTheory.StronglyMeasurable f)

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


theorem AffineMap.restrict.linear_aux {φ : P₁ →ᵃ[k] P₂} {E : AffineSubspace k P₁}
    {F : AffineSubspace k P₂} (hEF : E.map φ ≤ F) : E.direction ≤ F.direction.comap φ.linear

{k : Type u_1}
{V₁ : Type u_2}
{P₁ : Type u_3}
{V₂ : Type u_4}
{P₂ : Type u_5}
[Ring k]
[AddCommGroup V₁]
[AddCommGroup V₂]
[Module k V₁]
[Module k V₂]
[AddTorsor V₁ P₁]
[AddTorsor V₂ P₂]
{φ : P₁ →ᵃ[k] P₂}
{E : AffineSubspace k P₁}
{F : AffineSubspace k P₂}
(hEF : AffineSubspace.map φ E ≤ F)

E.direction ≤ Submodule.comap φ.linear F.direction


theorem IsSRGWith.compl_is_regular (h : G.IsSRGWith n k ℓ μ) :
    Gᶜ.IsRegularOfDegree (n - k - 1)

{V : Type u}
[Fintype V]
[DecidableEq V]
{G : SimpleGraph V}
[DecidableRel G.Adj]
{n k ℓ μ : ℕ}
(h : G.IsSRGWith n k ℓ μ)


lemma compProd_apply [SFinite μ] [IsSFiniteKernel κ] {s : Set (α × β)} (hs : MeasurableSet s) :
    (μ ⊗ₘ κ) s = ∫⁻ a, κ a (Prod.mk a ⁻¹' s) ∂μ

{α : Type u_1}
{β : Type u_2}
{mα : MeasurableSpace α}
{mβ : MeasurableSpace β}
{μ : MeasureTheory.Measure α}
{κ : ProbabilityTheory.Kernel α β}
[MeasureTheory.SFinite μ]
[ProbabilityTheory.IsSFiniteKernel κ]
{s : Set (α × β)}
(hs : MeasurableSet s)

(μ ⊗ₘ κ) s = ∫⁻ (a : α), (κ a) (Prod.mk a ⁻¹' s) ∂μ


@[simp]
theorem bot_arrow {B : C} : (⊥ : Subobject B).arrow = 0


lemma closedBall_prod_same (x : α) (y : β) (r : ℝ) :
    closedBall x r ×ˢ closedBall y r = closedBall (x, y) r

{α : Type u_1}
{β : Type u_2}
[PseudoMetricSpace α]
[PseudoMetricSpace β]
(x : α)
(y : β)
(r : ℝ)

Metric.closedBall x r ×ˢ Metric.closedBall y r = Metric.closedBall (x, y) r


/-- A locally constant function is constant on any preconnected set. -/
theorem apply_eq_of_isPreconnected {f : X → Y} (hf : IsLocallyConstant f) {s : Set X}
    (hs : IsPreconnected s) {x y : X} (hx : x ∈ s) (hy : y ∈ s) : f x = f y

{X : Type u_1}
{Y : Type u_2}
[TopologicalSpace X]
{f : X → Y}
(hf : IsLocallyConstant f)
{s : Set X}
(hs : IsPreconnected s)
{x y : X}
(hx : x ∈ s)
(hy : y ∈ s)


@[simp, mfld_simps]
theorem mfderiv_fst {x : M × M'} :
    mfderiv (I.prod I') I Prod.fst x =
      ContinuousLinearMap.fst 𝕜 (TangentSpace I x.1) (TangentSpace I' x.2)

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{H : Type u_3}
[TopologicalSpace H]
(I : ModelWithCorners 𝕜 E H)
{M : Type u_4}
[TopologicalSpace M]
[ChartedSpace H M]
[SmoothManifoldWithCorners I M]
{E' : Type u_5}
[NormedAddCommGroup E']
[NormedSpace 𝕜 E']
{H' : Type u_6}
[TopologicalSpace H']
(I' : ModelWithCorners 𝕜 E' H')
{M' : Type u_7}
[TopologicalSpace M']
[ChartedSpace H' M']
[SmoothManifoldWithCorners I' M']
{x : M × M'}


protected theorem coe_surjective : Surjective ((↑) : FreeRing α → FreeCommRing α)


@[to_additive]
theorem Equiv.hasProd_iff_of_mulSupport {g : γ → α} (e : mulSupport f ≃ mulSupport g)
    (he : ∀ x : mulSupport f, g (e x) = f x) : HasProd f a ↔ HasProd g a

(e : ↑(Function.mulSupport f) ≃ ↑(Function.mulSupport g))

(he : ∀ (x : ↑(Function.mulSupport f)), g ↑(e x) = f ↑x)


theorem lift_injective_of_ker_le_ideal (I : Ideal R) {f : R →+* S} (H : ∀ a : R, a ∈ I → f a = 0)
    (hI : ker f ≤ I) : Function.Injective (Ideal.Quotient.lift I f H)

{R : Type u}
{S : Type v}
[CommRing R]
[Semiring S]
(I : Ideal R)
{f : R →+* S}
(H : ∀ a ∈ I, f a = 0)
(hI : RingHom.ker f ≤ I)

Function.Injective ⇑(Ideal.Quotient.lift I f H)


protected theorem LinearMap.hasStrictDerivAt : HasStrictDerivAt e (e 1) x

{𝕜 : Type u}
[NontriviallyNormedField 𝕜]
{F : Type v}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{x : 𝕜}
(e : 𝕜 →ₗ[𝕜] F)


@[simp]
theorem nondegenerate_toMatrix_iff {B : BilinForm R₃ M₃} (b : Basis ι R₃ M₃) :
    (BilinForm.toMatrix b B).Nondegenerate ↔ B.Nondegenerate

{R₃ : Type u_7}
{M₃ : Type u_8}
[CommRing R₃]
[AddCommGroup M₃]
[Module R₃ M₃]
{ι : Type u_12}
[DecidableEq ι]
[Fintype ι]
{B : LinearMap.BilinForm R₃ M₃}
(b : Basis ι R₃ M₃)

((BilinForm.toMatrix b) B).Nondegenerate ↔ B.Nondegenerate


/-- For every polynomial `p` in the span of a set `s : Set R[X]`, there exists a polynomial of
  `p' ∈ s` with higher degree. See also `Polynomial.exists_degree_le_of_mem_span_of_finite`. -/
theorem exists_degree_le_of_mem_span {s : Set R[X]} {p : R[X]}
    (hs : s.Nonempty) (hp : p ∈ Submodule.span R s) :
    ∃ p' ∈ s, degree p ≤ degree p'

{R : Type u}
[Semiring R]
{s : Set R[X]}
{p : R[X]}
(hs : s.Nonempty)
(hp : p ∈ Submodule.span R s)


/-- The Grothendieck construction applied to a functor to `Type`
(thought of as a functor to `Cat` by realising a type as a discrete category)
is the same as the 'category of elements' construction.
-/
-- See porting note on grothendieckTypeToCatInverse.
-- We just want to turn off grothendieckTypeToCat_inverse_map_fiber_down_down,
-- so have to list the complement here for `@[simps]`.
@[simps! functor_obj_fst functor_obj_snd functor_map_coe inverse_obj_base inverse_obj_fiber_as
  inverse_map_base unitIso_hom_app_base unitIso_hom_app_fiber unitIso_inv_app_base
  unitIso_inv_app_fiber counitIso_hom_app_coe counitIso_inv_app_coe]
def grothendieckTypeToCat : Grothendieck (G ⋙ typeToCat) ≌ G.Elements

(X : CategoryTheory.Grothendieck (G.comp CategoryTheory.typeToCat))

((CategoryTheory.Grothendieck.grothendieckTypeToCat G).unitIso.hom.app X).fiber = CategoryTheory.eqToHom ⋯


theorem ext_fun {η : Kernel α β} (h : ∀ a f, Measurable f → ∫⁻ b, f b ∂κ a = ∫⁻ b, f b ∂η a) :
    κ = η

(h : ∀ (a : α) (f : β → ℝ≥0∞), Measurable f → ∫⁻ (b : β), f b ∂κ a = ∫⁻ (b : β), f b ∂η a)


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

{α : Type u_1}
[OrderedAddCommGroup α]
(s t : UpperSet α)


theorem ringHom_ext {A : Type*} [Semiring A] {f g : MvPolynomial σ R →+* A}
    (hC : ∀ r, f (C r) = g (C r)) (hX : ∀ i, f (X i) = g (X i)) : f = g

(hC : ∀ (r : R), f (MvPolynomial.C r) = g (MvPolynomial.C r))

(hX : ∀ (i : σ), f (MvPolynomial.X i) = g (MvPolynomial.X i))


@[simp]
theorem rename_id (p : MvPolynomial σ R) : rename id p = p

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


@[to_additive]
theorem inv_eq_of_mul_eq_one_right : a * b = 1 → a⁻¹ = b

{G : Type u_1}
[DivisionMonoid G]
{a b : G}


@[to_additive (attr := simp)]
theorem swap_mem_mulAntidiagonal_aux [CommSemigroup α] {s t : Set α} {a : α} {x : α × α} :
    x.snd ∈ s ∧ x.fst ∈ t ∧ x.snd * x.fst = a
      ↔ x ∈ Set.mulAntidiagonal t s a

{α : Type u_1}
[AddCommSemigroup α]
{s t : Set α}
{a : α}
{x : α × α}

x.2 ∈ s ∧ x.1 ∈ t ∧ x.2 + x.1 = a ↔ x ∈ t.addAntidiagonal s a


lemma _root_.Set.pairwiseDisjoint_filter [DecidableEq β] (f : α → β) (s : Set β) (t : Finset α) :
    s.PairwiseDisjoint fun x ↦ t.filter (f · = x)

{α : Type u_1}
{β : Type u_2}
[DecidableEq β]
(f : α → β)
(s : Set β)
(t : Finset α)

s.PairwiseDisjoint fun x => Finset.filter (fun x_1 => f x_1 = x) t


theorem countable_iUnion {t : ι → Set α} [Countable ι] (ht : ∀ i, (t i).Countable) :
    (⋃ i, t i).Countable

{α : Type u}
{ι : Sort x}
{t : ι → Set α}
[Countable ι]
(ht : ∀ (i : ι), (t i).Countable)


theorem mod_mod_of_dvd (a : Ordinal) {b c : Ordinal} (h : c ∣ b) : a % b % c = a % c

(a : Ordinal.{u_4})
{b c : Ordinal.{u_4}}
(h : c ∣ b)


theorem HasStrictDerivAt.ccos (hf : HasStrictDerivAt f f' x) :
    HasStrictDerivAt (fun x => Complex.cos (f x)) (-Complex.sin (f x) * f') x

{f : ℂ → ℂ}
{f' x : ℂ}
(hf : HasStrictDerivAt f f' x)


@[simp]
theorem mk'_ker : (mk' N).ker = N

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


lemma piFinset_image [∀ a, DecidableEq (δ a)] (f : ∀ a, γ a → δ a) (s : ∀ a, Finset (γ a)) :
    piFinset (fun a ↦ (s a).image (f a)) = (piFinset s).image fun b a ↦ f _ (b a)

{α : Type u_1}
[DecidableEq α]
[Fintype α]
{γ : α → Type u_2}
{δ : α → Type u_3}
[(a : α) → DecidableEq (δ a)]
(f : (a : α) → γ a → δ a)
(s : (a : α) → Finset (γ a))

(Fintype.piFinset fun a => Finset.image (f a) (s a)) = Finset.image (fun b a => f a (b a)) (Fintype.piFinset s)


theorem specializes_iff_nhds : x ⤳ y ↔ 𝓝 x ≤ 𝓝 y

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

x ⤳ y ↔ 𝓝 x ≤ 𝓝 y


theorem Ioc_inl_inl : Ioc (inl a₁ : α ⊕ β) (inl a₂) = (Ioc a₁ a₂).map Embedding.inl

{α : Type u_1}
{β : Type u_2}
[Preorder α]
[Preorder β]
[LocallyFiniteOrder α]
[LocallyFiniteOrder β]
(a₁ a₂ : α)

Finset.Ioc (Sum.inl a₁) (Sum.inl a₂) = Finset.map Function.Embedding.inl (Finset.Ioc a₁ a₂)


theorem cast_injective_of_le {m n : ℕ} [nzm : NeZero m] (h : m ≤ n) :
    Function.Injective (@cast (ZMod n) _ m)


/-- We can define `esymm σ R n` as a sum over explicit monomials -/
theorem esymm_eq_sum_monomial (n : ℕ) :
    esymm σ R n = ∑ t ∈ powersetCard n univ, monomial (∑ i ∈ t, Finsupp.single i 1) 1

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

MvPolynomial.esymm σ R n =
  ∑ t ∈ Finset.powersetCard n Finset.univ, (MvPolynomial.monomial (∑ i ∈ t, Finsupp.single i 1)) 1


/-- The order embedding sending `b` to `b * a`, for some fixed `a`.
See also `OrderIso.mulRight` when working in an ordered group. -/
@[to_additive (attr := simps!)
      "The order embedding sending `b` to `b + a`, for some fixed `a`.
       See also `OrderIso.addRight` when working in an additive ordered group."]
def OrderEmbedding.mulRight {α : Type*} [Mul α] [LinearOrder α]
    [CovariantClass α α (swap (· * ·)) (· < ·)] (m : α) : α ↪o α

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


protected theorem measurableSet_lt_of_countable_range' (hτ : IsStoppingTime f τ)
    (h_countable : (Set.range τ).Countable) (i : ι) :
    MeasurableSet[hτ.measurableSpace] {ω | τ ω < i}

{Ω : Type u_1}
{ι : Type u_3}
{m : MeasurableSpace Ω}
[LinearOrder ι]
{f : MeasureTheory.Filtration ι m}
{τ : Ω → ι}
(hτ : MeasureTheory.IsStoppingTime f τ)
(h_countable : (Set.range τ).Countable)
(i : ι)


theorem gronwallBound_of_K_ne_0 {δ K ε : ℝ} (hK : K ≠ 0) :
    gronwallBound δ K ε = fun x => δ * exp (K * x) + ε / K * (exp (K * x) - 1)

gronwallBound δ K ε = fun x => δ * rexp (K * x) + ε / K * (rexp (K * x) - 1)


@[reassoc]
theorem PreservesPushout.inr_iso_hom :
    pushout.inr _ _ ≫ (PreservesPushout.iso G f g).hom = G.map (pushout.inr _ _)

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

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

CategoryTheory.Limits.pushout.inr (G.map f) (G.map g) ≫ (CategoryTheory.Limits.PreservesPushout.iso G f g).hom =
  G.map (CategoryTheory.Limits.pushout.inr f g)


@[simp, norm_cast]
theorem coe_toRingHom (f : R ≃+* S) : ⇑(f : R →+* S) = f

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


@[simp]
theorem fst_sup (s t : NonemptyInterval α) : (s ⊔ t).fst = s.fst ⊓ t.fst

{α : Type u_1}
[Lattice α]
(s t : NonemptyInterval α)

(s ⊔ t).toProd.1 = s.toProd.1 ⊓ t.toProd.1


theorem continuousOn_of_locally_continuousOn {f : α → β} {s : Set α}
    (h : ∀ x ∈ s, ∃ t, IsOpen t ∧ x ∈ t ∧ ContinuousOn f (s ∩ t)) : ContinuousOn f s


@[simp]
theorem rTensor_add (f g : N →ₗ[R] P) : (f + g).rTensor M = f.rTensor M + g.rTensor M

{R : Type u_1}
[CommSemiring R]
(M : Type u_4)
{N : Type u_5}
{P : Type u_6}
[AddCommMonoid M]
[AddCommMonoid N]
[AddCommMonoid P]
[Module R M]
[Module R N]
[Module R P]
(f g : N →ₗ[R] P)

LinearMap.rTensor M (f + g) = LinearMap.rTensor M f + LinearMap.rTensor M g


@[simp] lemma SpecΓIdentity_hom_app : SpecΓIdentity.hom.app R = (ΓSpecIso R).hom

AlgebraicGeometry.Scheme.SpecΓIdentity.hom.app R = (AlgebraicGeometry.Scheme.ΓSpecIso R).hom


@[simp]
theorem getLsb_rotateRight {x : BitVec w} {r i : Nat} :
    (x.rotateRight r).getLsb i =
      cond (i < w - (r % w))
      (x.getLsb ((r % w) + i))
      (decide (i < w) && x.getLsb (i - (w - (r % w))))

(x.rotateRight r).getLsb i =
  bif decide (i < w - r % w) then x.getLsb (r % w + i) else decide (i < w) && x.getLsb (i - (w - r % w))


/-- If `x^n = 1`, but `x^(n/p) ≠ 1` for all prime factors `p` of `n`,
then `x` has order `n` in `G`. -/
@[to_additive addOrderOf_eq_of_nsmul_and_div_prime_nsmul "If `n * x = 0`, but `n/p * x ≠ 0` for
all prime factors `p` of `n`, then `x` has order `n` in `G`."]
theorem orderOf_eq_of_pow_and_pow_div_prime (hn : 0 < n) (hx : x ^ n = 1)
    (hd : ∀ p : ℕ, p.Prime → p ∣ n → x ^ (n / p) ≠ 1) : orderOf x = n

(hd : ∀ (p : ℕ), Nat.Prime p → p ∣ n → x ^ (n / p) ≠ 1)


theorem lt_of_le_sub_one {a b : Int} (H : a ≤ b - 1) : a < b


/-- The only continuous ring homomorphism from `ℝ` to `ℂ` is the identity. -/
theorem ringHom_eq_ofReal_of_continuous {f : ℝ →+* ℂ} (h : Continuous f) : f = Complex.ofReal


/-- Expressing locally uniform convergence on a set using `dist`. -/
theorem tendstoLocallyUniformlyOn_iff [TopologicalSpace β] {F : ι → β → α} {f : β → α}
    {p : Filter ι} {s : Set β} :
    TendstoLocallyUniformlyOn F f p s ↔
      ∀ ε > 0, ∀ x ∈ s, ∃ t ∈ 𝓝[s] x, ∀ᶠ n in p, ∀ y ∈ t, dist (f y) (F n y) < ε

{α : Type u}
{β : Type v}
{ι : Type u_2}
[PseudoMetricSpace α]
[TopologicalSpace β]
{F : ι → β → α}
{f : β → α}
{p : Filter ι}
{s : Set β}

TendstoLocallyUniformlyOn F f p s ↔ ∀ ε > 0, ∀ x ∈ s, ∃ t ∈ 𝓝[s] x, ∀ᶠ (n : ι) in p, ∀ y ∈ t, dist (f y) (F n y) < ε


theorem equiv_lim (s : CauSeq β abv) : s ≈ const abv (lim s)

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


{α : Type u_1}
[UniformSpace α]
(pkg : AbstractCompletion α)


theorem pow_of_prime (h : IsPrimitiveRoot ζ k) {p : ℕ} (hprime : Nat.Prime p) (hdiv : ¬p ∣ k) :
    IsPrimitiveRoot (ζ ^ p) k

{M : Type u_1}
[CommMonoid M]
{k : ℕ}
{ζ : M}
(h : IsPrimitiveRoot ζ k)
{p : ℕ}
(hprime : Nat.Prime p)
(hdiv : ¬p ∣ k)


theorem le_weight_of_ne_zero (hw : ∀ s, 0 ≤ w s) {s : σ} {f : σ →₀ ℕ} (hs : f s ≠ 0) :
    w s ≤ weight w f

{σ : Type u_1}
{M : Type u_2}
[OrderedAddCommMonoid M]
(w : σ → M)
(hw : ∀ (s : σ), 0 ≤ w s)
{s : σ}
{f : σ →₀ ℕ}
(hs : f s ≠ 0)


theorem eq_of_mem_of_mem (h₁ : J₁ ∈ π) (h₂ : J₂ ∈ π) (hx₁ : x ∈ J₁) (hx₂ : x ∈ J₂) : J₁ = J₂

{ι : Type u_1}
{I J₁ J₂ : BoxIntegral.Box ι}
(π : BoxIntegral.Prepartition I)
{x : ι → ℝ}
(h₁ : J₁ ∈ π)
(h₂ : J₂ ∈ π)
(hx₁ : x ∈ J₁)
(hx₂ : x ∈ J₂)


theorem mul_add_one (n m : Nat) : n * (m + 1) = n * m + n


private theorem ghostComponent_teichmullerFun (r : R) (n : ℕ) :
    ghostComponent n (teichmullerFun p r) = r ^ p ^ n

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

(WittVector.ghostComponent n) (WittVector.teichmullerFun p r) = r ^ p ^ n


theorem lt_iff_re_im : z < w ↔ re z < re w ∧ im z = im w

z < w ↔ RCLike.re z < RCLike.re w ∧ RCLike.im z = RCLike.im w


theorem natDegree_det_X_add_C_le (A B : Matrix n n α) :
    natDegree (det ((X : α[X]) • A.map C + B.map C : Matrix n n α[X])) ≤ Fintype.card n

{n : Type u_1}
{α : Type u_2}
[DecidableEq n]
[Fintype n]
[CommRing α]
(A B : Matrix n n α)

(Polynomial.X • A.map ⇑Polynomial.C + B.map ⇑Polynomial.C).det.natDegree ≤ Fintype.card n


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

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


/-- `R` is integrally closed in `A` iff all integral elements of `A` are also elements of `R`. -/
theorem isIntegrallyClosedIn_iff {R A : Type*} [CommRing R] [CommRing A] [Algebra R A] :
    IsIntegrallyClosedIn R A ↔
      Function.Injective (algebraMap R A) ∧
        ∀ {x : A}, IsIntegral R x → ∃ y, algebraMap R A y = x

{R : Type u_5}
{A : Type u_6}
[CommRing R]
[CommRing A]
[Algebra R A]

IsIntegrallyClosedIn R A ↔
  Function.Injective ⇑(algebraMap R A) ∧ ∀ {x : A}, IsIntegral R x → ∃ y, (algebraMap R A) y = x


@[reassoc] -- Porting note (#10618): simp can prove both versions
theorem biproduct.ι_toSubtype_subtype (j : Subtype p) :
    biproduct.ι f j ≫ biproduct.toSubtype f p = biproduct.ι (Subtype.restrict p f) j

[CategoryTheory.Limits.HasBiproduct (Subtype.restrict p f)]

CategoryTheory.Limits.biproduct.ι f ↑j ≫ CategoryTheory.Limits.biproduct.toSubtype f p =
  CategoryTheory.Limits.biproduct.ι (Subtype.restrict p f) j


@[local simp]
theorem transitionMap_map_one {m n : ℕ} (hmn : m ≤ n) : transitionMap I R hmn 1 = 1

{R : Type u_1}
[CommRing R]
(I : Ideal R)
{m n : ℕ}
(hmn : m ≤ n)

(AdicCompletion.transitionMap I R hmn) 1 = 1


protected theorem coe_neg {R : Type u} {A : Type v} [CommRing R] [Ring A] [Algebra R A]
    {S : NonUnitalSubalgebra R A} (x : S) : (↑(-x) : A) = -↑x

{R : Type u}
{A : Type v}
[CommRing R]
[Ring A]
[Algebra R A]
{S : NonUnitalSubalgebra R A}
(x : ↥S)


@[simp] theorem ofFinite_E {E : Set α} hE Indep indep_empty indep_subset indep_aug subset_ground :
    (IndepMatroid.ofFinite
      (hE : E.Finite) Indep indep_empty indep_subset indep_aug subset_ground).E = E

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

(indep_aug : ∀ ⦃I J : Set α⦄, Indep I → Indep J → I.ncard < J.ncard → ∃ e ∈ J, e ∉ I ∧ Indep (insert e I))

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

(IndepMatroid.ofFinite hE Indep indep_empty indep_subset indep_aug subset_ground).E = E


/-- the equivalence given by multiplication on the left by `t`  -/
@[simps]
noncomputable def unitsSMulEquiv : NormalWord d ≃ NormalWord d

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

(HNNExtension.NormalWord.unitsSMulEquiv φ).symm w = HNNExtension.NormalWord.unitsSMul φ (-1) w


theorem supp_eq {α : TypeVec n} {i} (x : F α) :
    supp x i = { u | ∀ a f, abs ⟨a, f⟩ = x → u ∈ f i '' univ }

{n : ℕ}
{F : TypeVec.{u} n → Type u_1}
[q : MvQPF F]
{α : TypeVec.{u} n}
{i : Fin2 n}
(x : F α)

MvFunctor.supp x i = {u | ∀ (a : (MvQPF.P F).A) (f : (MvQPF.P F).B a ⟹ α), MvQPF.abs ⟨a, f⟩ = x → u ∈ f i '' Set.univ}


theorem finite_dual_iff : Finite K (Dual K V) ↔ Finite K V

(K : Type uK)
{V : Type uV}
[CommRing K]
[AddCommGroup V]
[Module K V]
[Module.Free K V]

Module.Finite K (Module.Dual K V) ↔ Module.Finite K V


/-- `{a}` as an interval. -/
@[simps]
def pure (a : α) : NonemptyInterval α


@[simp] lemma range_two_mul (α) [Semiring α] : Set.range (fun x : α ↦ 2 * x) = {a | Even a}

(Set.range fun x => 2 * x) = {a | Even a}


theorem Equivalence.comap (h : Equivalence r) (f : α → β) : Equivalence (r on f)

{α : Type u_1}
{β : Type u_2}
{r : β → β → Prop}
(h : Equivalence r)
(f : α → β)


/-- **Ruzsa's triangle inequality**. Mul-div-div version. -/
@[to_additive "**Ruzsa's triangle inequality**. Add-sub-sub version."]
theorem ruzsa_triangle_inequality_mul_div_div (A B C : Finset α) :
    (A * C).card * B.card ≤ (A / B).card * (B / C).card

{α : Type u_1}
[AddCommGroup α]
[DecidableEq α]
(A B C : Finset α)

(A + C).card * B.card ≤ (A - B).card * (B - C).card


theorem union_zero :
    characterSpace 𝕜 A ∪ {0} = {φ : WeakDual 𝕜 A | ∀ x y : A, φ (x * y) = φ x * φ y}

(𝕜 : Type u_1)
(A : Type u_2)
[CommSemiring 𝕜]
[TopologicalSpace 𝕜]
[ContinuousAdd 𝕜]
[ContinuousConstSMul 𝕜 𝕜]
[NonUnitalNonAssocSemiring A]
[TopologicalSpace A]
[Module 𝕜 A]

WeakDual.characterSpace 𝕜 A ∪ {0} = {φ | ∀ (x y : A), φ (x * y) = φ x * φ y}


@[to_additive]
theorem image_mulSingle_Icc_left (i : ι) (a : α i) :
    Pi.mulSingle i '' Icc a 1 = Icc (Pi.mulSingle i a) 1

{ι : Type u_1}
{α : ι → Type u_2}
[DecidableEq ι]
[(i : ι) → PartialOrder (α i)]
[(i : ι) → One (α i)]
(i : ι)
(a : α i)

Pi.mulSingle i '' Set.Icc a 1 = Set.Icc (Pi.mulSingle i a) 1


@[simp]
theorem subtypeₗᵢ_toContinuousLinearMap : p.subtypeₗᵢ.toContinuousLinearMap = p.subtypeL

{E : Type u_5}
[SeminormedAddCommGroup E]
{R' : Type u_11}
[Ring R']
[Module R' E]
(p : Submodule R' E)


theorem wittAdd_vars (n : ℕ) : (wittAdd p n).vars ⊆ Finset.univ ×ˢ Finset.range (n + 1)

(p : ℕ)
[hp : Fact (Nat.Prime p)]
(n : ℕ)

(WittVector.wittAdd p n).vars ⊆ Finset.univ ×ˢ Finset.range (n + 1)


@[simp]
theorem isConnected_preimage {s : Set Y} (h : X ≃ₜ Y) :
    IsConnected (h ⁻¹' s) ↔ IsConnected s

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


@[simp]
theorem denom_div (p : K[X]) {q : K[X]} (hq : q ≠ 0) :
    denom (algebraMap _ _ p / algebraMap _ _ q) =
      Polynomial.C (q / gcd p q).leadingCoeff⁻¹ * (q / gcd p q)

{K : Type u}
[Field K]
(p : K[X])
{q : K[X]}
(hq : q ≠ 0)

((algebraMap K[X] (RatFunc K)) p / (algebraMap K[X] (RatFunc K)) q).denom =
  Polynomial.C (q / gcd p q).leadingCoeff⁻¹ * (q / gcd p q)


@[simp]
theorem preimage_ceil_singleton (m : ℤ) : (ceil : α → ℤ) ⁻¹' {m} = Ioc ((m : α) - 1) m

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


theorem le_def {z w : ℂ} : z ≤ w ↔ z.re ≤ w.re ∧ z.im = w.im


theorem ContDiff.comp_contMDiffAt {g : F → F'} {f : M → F} {x : M} (hg : ContDiff 𝕜 n g)
    (hf : ContMDiffAt I 𝓘(𝕜, F) n f x) : ContMDiffAt I 𝓘(𝕜, F') n (g ∘ f) x

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{H : Type u_3}
[TopologicalSpace H]
{I : ModelWithCorners 𝕜 E H}
{M : Type u_4}
[TopologicalSpace M]
[ChartedSpace H M]
{F : Type u_8}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{F' : Type u_11}
[NormedAddCommGroup F']
[NormedSpace 𝕜 F']
{n : ℕ∞}
{g : F → F'}
{f : M → F}
{x : M}
(hg : ContDiff 𝕜 n g)
(hf : ContMDiffAt I 𝓘(𝕜, F) n f x)


@[to_additive]
theorem quasiMeasurePreserving_div_of_right_invariant [IsMulRightInvariant μ] :
    QuasiMeasurePreserving (fun p : G × G => p.1 / p.2) (μ.prod ν) μ

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

MeasureTheory.Measure.QuasiMeasurePreserving (fun p => p.1 / p.2) (μ.prod ν) μ


lemma tendsto_m_density (hκν : fst κ ≤ ν) (a : α) [IsFiniteKernel ν]
    {s : Set β} (hs : MeasurableSet s) :
    ∀ᵐ x ∂(ν a),
      Tendsto (fun n ↦ densityProcess κ ν n a x s) atTop (𝓝 (density κ ν a x s))

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

∀ᵐ (x : γ) ∂ν a, Filter.Tendsto (fun n => κ.densityProcess ν n a x s) Filter.atTop (𝓝 (κ.density ν a x s))


@[simps!]
instance : Category (Augmented C)

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

∀ {X Y Z : CategoryTheory.Comma (CategoryTheory.CosimplicialObject.const C) (𝟭 (CategoryTheory.CosimplicialObject C))}
  (f : X ⟶ Y) (g : Y ⟶ Z), (f ≫ g).left = f.left ≫ g.left


protected theorem All.ins {x : α} {t : RBNode α}
  (h₁ : p x) (h₂ : t.All p) : (ins cmp x t).All p

{α : Type u_1}
{p : α → Prop}
{cmp : α → α → Ordering}
{x : α}
{t : Batteries.RBNode α}
(h₁ : p x)
(h₂ : Batteries.RBNode.All p t)

Batteries.RBNode.All p (Batteries.RBNode.ins cmp x t)


theorem ContinuousLinearMap.dslope_comp {F : Type*} [NormedAddCommGroup F] [NormedSpace 𝕜 F]
    (f : E →L[𝕜] F) (g : 𝕜 → E) (a b : 𝕜) (H : a = b → DifferentiableAt 𝕜 g a) :
    dslope (f ∘ g) a b = f (dslope g a b)

{𝕜 : Type u_1}
{E : Type u_2}
[NontriviallyNormedField 𝕜]
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{F : Type u_3}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
(f : E →L[𝕜] F)
(g : 𝕜 → E)
(a b : 𝕜)
(H : a = b → DifferentiableAt 𝕜 g a)


theorem measurePreserving_sumPiEquivProdPi {π : ι ⊕ ι' → Type*} {_m : ∀ i, MeasurableSpace (π i)}
    (μ : ∀ i, Measure (π i)) [∀ i, SigmaFinite (μ i)] :
    MeasurePreserving (MeasurableEquiv.sumPiEquivProdPi π)
      (Measure.pi μ) ((Measure.pi fun i => μ (.inl i)).prod (Measure.pi fun i => μ (.inr i)))

{_m : (i : ι ⊕ ι') → MeasurableSpace (π i)}

(μ : (i : ι ⊕ ι') → MeasureTheory.Measure (π i))

[∀ (i : ι ⊕ ι'), MeasureTheory.SigmaFinite (μ i)]

MeasureTheory.MeasurePreserving (⇑(MeasurableEquiv.sumPiEquivProdPi π)) (MeasureTheory.Measure.pi μ)
  ((MeasureTheory.Measure.pi fun i => μ (Sum.inl i)).prod (MeasureTheory.Measure.pi fun i => μ (Sum.inr i)))


@[simp, norm_cast]
theorem coe_bracket (x y : L') : (↑⁅x, y⁆ : L) = ⁅(↑x : L), ↑y⁆

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

↑⁅x, y⁆ = ⁅↑x, ↑y⁆


theorem edist_eq_sum {p : ℝ≥0∞} (hp : 0 < p.toReal) (f g : PiLp p β) :
    edist f g = (∑ i, edist (f i) (g i) ^ p.toReal) ^ (1 / p.toReal)

{ι : Type u_2}
{β : ι → Type u_4}
[Fintype ι]
[(i : ι) → EDist (β i)]
{p : ℝ≥0∞}
(hp : 0 < p.toReal)
(f g : PiLp p β)

edist f g = (∑ i : ι, edist (f i) (g i) ^ p.toReal) ^ (1 / p.toReal)


theorem Summable.div_const (h : Summable f) (b : α) : Summable fun i ↦ f i / b

{ι : Type u_1}
{α : Type u_4}
[DivisionSemiring α]
[TopologicalSpace α]
[TopologicalSemiring α]
{f : ι → α}
(h : Summable f)
(b : α)


theorem monomial_one_eq_iff [Nontrivial R] {i j : ℕ} :
    (monomial i 1 : R[X]) = monomial j 1 ↔ i = j

{R : Type u}
[Semiring R]
[Nontrivial R]
{i j : ℕ}

(Polynomial.monomial i) 1 = (Polynomial.monomial j) 1 ↔ i = j


@[to_additive]
theorem continuous_const_smul_iff (c : G) : (Continuous fun x => c • f x) ↔ Continuous f

{α : Type u_2}
{β : Type u_3}
{G : Type u_4}
[TopologicalSpace α]
[AddGroup G]
[AddAction G α]
[ContinuousConstVAdd G α]
[TopologicalSpace β]
{f : β → α}
(c : G)

(Continuous fun x => c +ᵥ f x) ↔ Continuous f


theorem nodup_roots {p : R[X]} (hsep : Separable p) : p.roots.Nodup

{R : Type u}
[CommRing R]
[IsDomain R]
{p : R[X]}
(hsep : p.Separable)


protected theorem iff_injective [Small.{v} R] : Module.Baer R Q ↔ Module.Injective R Q

{R : Type u}
[Ring R]
{Q : Type v}
[AddCommGroup Q]
[Module R Q]
[Small.{v, u} R]


/-- Union of an indexed family of sets `s : ι → Set α` is equal to the union of the unions
of finite subfamilies. This version works for `ι : Sort*`. See also `iUnion_eq_iUnion_finset` for
a version that assumes `ι : Type*` but avoids `PLift`s in the right hand side. -/
theorem iUnion_eq_iUnion_finset' (s : ι' → Set α) :
    ⋃ i, s i = ⋃ t : Finset (PLift ι'), ⋃ i ∈ t, s (PLift.down i)

{α : Type u_2}
{ι' : Sort u_7}
(s : ι' → Set α)


lemma quasiIsoAt_of_comp_right (φ : K ⟶ L) (φ' : L ⟶ M) (i : ι) [K.HasHomology i]
    [L.HasHomology i] [M.HasHomology i]
    [hφ' : QuasiIsoAt φ' i] [hφφ' : QuasiIsoAt (φ ≫ φ') i] :
    QuasiIsoAt φ i


theorem lim_im (f : CauSeq ℂ Complex.abs) : lim (cauSeqIm f) = (lim f).im


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

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


/-- The natural `AddEquiv` from `ℂ` to `ℝ × ℝ`. -/
@[simps! (config := { simpRhs := true }) apply symm_apply_re symm_apply_im]
def equivRealProdAddHom : ℂ ≃+ ℝ × ℝ

(Complex.equivRealProdAddHom.symm p).im = p.2


theorem prime_factors_unique [CancelCommMonoidWithZero α] :
    ∀ {f g : Multiset α},
      (∀ x ∈ f, Prime x) → (∀ x ∈ g, Prime x) → f.prod ~ᵤ g.prod → Multiset.Rel Associated f g

{α : Type u_1}
[CancelCommMonoidWithZero α]
{f g : Multiset α}


theorem Antitone.map_min (hf : Antitone f) : f (min a b) = max (f a) (f b)

{α : Type u}
{β : Type v}
[LinearOrder α]
[LinearOrder β]
{f : α → β}
{a b : α}
(hf : Antitone f)


lemma smul_ite_zero (p : Prop) [Decidable p] (a : M) (b : A) :
    (a • if p then b else 0) = if p then a • b else 0

{M : Type u_1}
{A : Type u_4}
[Zero A]
[SMulZeroClass M A]
(p : Prop)
[Decidable p]
(a : M)
(b : A)


theorem multiset_sum_mul_self (l : Multiset R) :
    l.sum * l.sum = (Multiset.map (fun x => x * x) l).sum

{R : Type u_1}
[CommSemiring R]
[CharP R 2]
(l : Multiset R)


@[simp, measurability]
protected theorem MeasurableSet.symmDiff {s₁ s₂ : Set α} (h₁ : MeasurableSet s₁)
    (h₂ : MeasurableSet s₂) : MeasurableSet (s₁ ∆ s₂)

{α : Type u_1}
{m : MeasurableSpace α}
{s₁ s₂ : Set α}
(h₁ : MeasurableSet s₁)
(h₂ : MeasurableSet s₂)


@[simp]
theorem intervalIntegrable_cos : IntervalIntegrable cos μ a b


/-- If `f : 𝕜 → 𝕜` is strictly concave, then for any three points `x < y < z` the slope of the
secant line of `f` on `[x, y]` is strictly greater than the slope of the secant line of `f` on
`[y, z]`. -/
theorem StrictConcaveOn.slope_anti_adjacent (hf : StrictConcaveOn 𝕜 s f) {x y z : 𝕜} (hx : x ∈ s)
    (hz : z ∈ s) (hxy : x < y) (hyz : y < z) : (f z - f y) / (z - y) < (f y - f x) / (y - x)

{𝕜 : Type u_1}
[LinearOrderedField 𝕜]
{s : Set 𝕜}
{f : 𝕜 → 𝕜}
(hf : StrictConcaveOn 𝕜 s f)
{x y z : 𝕜}
(hx : x ∈ s)
(hz : z ∈ s)
(hxy : x < y)
(hyz : y < z)


theorem rel_symm_apply (e : r ≃r s) {x y} : r x (e.symm y) ↔ s (e x) y

{α : Type u_1}
{β : Type u_2}
{r : α → α → Prop}
{s : β → β → Prop}
(e : r ≃r s)
{x : α}
{y : β}


/-- The function `fun x ↦ r * f x` tends to infinity along a nontrivial filter
if and only if `r > 0` and `f` tends to infinity or `r < 0` and `f` tends to negative infinity. -/
theorem tendsto_const_mul_atTop_iff [NeBot l] :
    Tendsto (fun x => r * f x) l atTop ↔ 0 < r ∧ Tendsto f l atTop ∨ r < 0 ∧ Tendsto f l atBot

{α : Type u_3}
{β : Type u_4}
[LinearOrderedField α]
{l : Filter β}
{f : β → α}
{r : α}
[l.NeBot]

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


/-- If `f` is locally integrable, `f` has a top element, and `f =O[atBot] g`, for some
`g` integrable at `atBot`, then `f` is integrable. -/
theorem LocallyIntegrable.integrable_of_isBigO_atBot [IsMeasurablyGenerated (atBot (α := α))]
    [OrderTop α] (hf : LocallyIntegrable f μ) (ho : f =O[atBot] g)
    (hg : IntegrableAtFilter g atBot μ) : Integrable f μ

(hf : MeasureTheory.LocallyIntegrable f μ)

(hg : MeasureTheory.IntegrableAtFilter g Filter.atBot μ)


/-- `Finmap β` is the type of finite maps over a multiset. It is effectively
  a quotient of `AList β` by permutation of the underlying list. -/
structure Finmap (β : α → Type v) : Type max u v where
  /-- The underlying `Multiset` of a `Finmap` -/
  entries : Multiset (Sigma β)
  /-- There are no duplicate keys in `entries` -/
  nodupKeys : entries.NodupKeys

{α : Type u}
{β : α → Type v}
(self : Finmap β)


theorem final_of_natIso {F F' : C ⥤ D} [Final F] (i : F ≅ F') : Final F'

{C : Type u₁}
[CategoryTheory.Category.{v₁, u₁} C]
{D : Type u₂}
[CategoryTheory.Category.{v₂, u₂} D]
{F F' : CategoryTheory.Functor C D}
[F.Final]
(i : F ≅ F')


theorem l_bot [OrderBot α] {l : α → β} {u : β → α} (gc : GaloisConnection l u) : l ⊥ = ⊥

{α : Type u}
{β : Type v}
[Preorder α]
[PartialOrder β]
[OrderBot β]
[OrderBot α]
{l : α → β}
{u : β → α}
(gc : GaloisConnection l u)


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

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

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


@[simp]
theorem map_tmul (f : M →ₗ[R] P) (g : N →ₗ[R] Q) (m : M) (n : N) : map f g (m ⊗ₜ n) = f m ⊗ₜ g n

{R : Type u_1}
[CommSemiring R]
{M : Type u_4}
{N : Type u_5}
{P : Type u_6}
{Q : Type u_7}
[AddCommMonoid M]
[AddCommMonoid N]
[AddCommMonoid P]
[AddCommMonoid Q]
[Module R M]
[Module R N]
[Module R P]
[Module R Q]
(f : M →ₗ[R] P)
(g : N →ₗ[R] Q)
(m : M)
(n : N)

(TensorProduct.map f g) (m ⊗ₜ[R] n) = f m ⊗ₜ[R] g n


theorem Filter.tendsto_nhds_min_left {l : Filter β} {a : α} (h : Tendsto f l (𝓝[<] a)) :
    Tendsto (fun i => min (f i) a) l (𝓝[<] a)

{α : Type u}
{β : Type v}
[TopologicalSpace α]
[LinearOrder α]
[OrderClosedTopology α]
{f : β → α}
{l : Filter β}
{a : α}
(h : Filter.Tendsto f l (𝓝[<] a))

Filter.Tendsto (fun i => min (f i) a) l (𝓝[<] a)


/--
If `f` and `g` are two maps `P → P'` between presentations,
then the image of `f - g` is in the kernel of `P' → S`.
-/
@[simps! apply_coe]
noncomputable
def Hom.subToKer (f g : Hom P P') : P.Ring →ₗ[R] P'.ker

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

↑((f.subToKer g) c) = f.toAlgHom c - g.toAlgHom c


theorem sup_aeval_range_eq_top_of_coprime (f : M →ₗ[R] M) {p q : R[X]} (hpq : IsCoprime p q) :
    LinearMap.range (aeval f p) ⊔ LinearMap.range (aeval f q) = ⊤

{R : Type u}
{M : Type w}
[CommRing R]
[AddCommGroup M]
[Module R M]
(f : M →ₗ[R] M)
{p q : R[X]}
(hpq : IsCoprime p q)

LinearMap.range ((Polynomial.aeval f) p) ⊔ LinearMap.range ((Polynomial.aeval f) q) = ⊤


theorem Nontrivial.einfsep_exists_of_finite [Finite s] (hs : s.Nontrivial) :
    ∃ x ∈ s, ∃ y ∈ s, x ≠ y ∧ s.einfsep = edist x y

{α : Type u_1}
[EDist α]
{s : Set α}
[Finite ↑s]
(hs : s.Nontrivial)


theorem Iic_subset_Iic_union_Icc : Iic b ⊆ Iic a ∪ Icc a b

{α : Type u_1}
[LinearOrder α]
{a b : α}


@[simp]
theorem toNFA_correct : M.toNFA.accepts = M.accepts

{α : Type u}
{σ : Type v}
(M : εNFA α σ)


theorem det_eq_sum_mul_adjugate_col (A : Matrix n n α) (j : n) :
    det A = ∑ i : n, A i j * adjugate A j i

{n : Type v}
{α : Type w}
[DecidableEq n]
[Fintype n]
[CommRing α]
(A : Matrix n n α)
(j : n)


/-- If `f : 𝕜 → G`, `𝕜 = R` or `𝕜 = ℂ`, is differentiable everywhere and its derivative equal zero,
then it is a constant function. -/
theorem _root_.is_const_of_deriv_eq_zero (hf : Differentiable 𝕜 f) (hf' : ∀ x, deriv f x = 0)
    (x y : 𝕜) : f x = f y

{𝕜 : Type u_3}
{G : Type u_4}
[RCLike 𝕜]
[NormedAddCommGroup G]
[NormedSpace 𝕜 G]
{f : 𝕜 → G}
(hf : Differentiable 𝕜 f)
(hf' : ∀ (x : 𝕜), deriv f x = 0)
(x y : 𝕜)


/-- Dual cone of the convex cone {0} is the total space. -/
@[simp]
theorem innerDualCone_zero : (0 : Set H).innerDualCone = ⊤

{H : Type u_5}
[NormedAddCommGroup H]
[InnerProductSpace ℝ H]


@[simp]
theorem ofEq_apply (L L' : LieSubalgebra R L₁) (h : (L : Set L₁) = L') (x : L) :
    (↑(ofEq L L' h x) : L₁) = x

{R : Type u}
{L₁ : Type v}
[CommRing R]
[LieRing L₁]
[LieAlgebra R L₁]
(L L' : LieSubalgebra R L₁)
(h : ↑L = ↑L')
(x : ↥L)


theorem isNoetherian_of_fg_of_noetherian {R M} [Ring R] [AddCommGroup M] [Module R M]
    (N : Submodule R M) [I : IsNoetherianRing R] (hN : N.FG) : IsNoetherian R N

{R : Type u_1}
{M : Type u_2}
[Ring R]
[AddCommGroup M]
[Module R M]
(N : Submodule R M)
[I : IsNoetherianRing R]
(hN : N.FG)


/-- Gives a recurrence to compute the `n + 1`th value of the sequence of integer and fractional
parts of a value in case of non-termination.
-/
theorem succ_nth_stream_eq_some_iff {ifp_succ_n : IntFractPair K} :
    IntFractPair.stream v (n + 1) = some ifp_succ_n ↔
      ∃ ifp_n : IntFractPair K,
        IntFractPair.stream v n = some ifp_n ∧
          ifp_n.fr ≠ 0 ∧ IntFractPair.of ifp_n.fr⁻¹ = ifp_succ_n

{ifp_succ_n : GenContFract.IntFractPair K}

GenContFract.IntFractPair.stream v (n + 1) = some ifp_succ_n ↔
  ∃ ifp_n,
    GenContFract.IntFractPair.stream v n = some ifp_n ∧
      ifp_n.fr ≠ 0 ∧ GenContFract.IntFractPair.of ifp_n.fr⁻¹ = ifp_succ_n


theorem of_eq : ∀ it, it.1.1 = l.reverseAux r → it.2.1 = utf8Len l → ValidFor l r it

{l r : List Char}
(it : String.Iterator)

it.s.data = l.reverseAux r → it.i.byteIdx = String.utf8Len l → String.Iterator.ValidFor l r it


@[to_additive]
theorem finprod_eq_prod (f : α → M) (hf : (mulSupport f).Finite) :
    ∏ᶠ i : α, f i = ∏ i ∈ hf.toFinset, f i

{α : Type u_1}
{M : Type u_5}
[CommMonoid M]
(f : α → M)
(hf : (Function.mulSupport f).Finite)

∏ᶠ (i : α), f i = ∏ i ∈ hf.toFinset, f i


theorem UInt16.toNat_mul (x y : UInt16) : (x * y).toNat = (x.toNat * y.toNat) % UInt16.size

(x * y).toNat = x.toNat * y.toNat % UInt16.size


@[to_additive]
theorem SeminormedGroup.uniformCauchySeqOn_iff_tendstoUniformlyOn_one {f : ι → κ → G} {s : Set κ}
    {l : Filter ι} :
    UniformCauchySeqOn f l s ↔
      TendstoUniformlyOn (fun n : ι × ι => fun z => f n.fst z / f n.snd z) 1 (l ×ˢ l) s

{ι : Type u_4}
{κ : Type u_5}
{G : Type u_8}
[SeminormedGroup G]
{f : ι → κ → G}
{s : Set κ}
{l : Filter ι}

UniformCauchySeqOn f l s ↔ TendstoUniformlyOn (fun n z => f n.1 z / f n.2 z) 1 (l ×ˢ l) s


lemma LinearEquiv.support_eq (e : M ≃ₗ[R] N) :
    Module.support R M = Module.support R N

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


theorem generate_le_iff (R : Presieve X) (S : Sieve X) : generate R ≤ S ↔ R ≤ S

{C : Type u₁}
[CategoryTheory.Category.{v₁, u₁} C]
{X : C}
(R : CategoryTheory.Presieve X)
(S : CategoryTheory.Sieve X)

CategoryTheory.Sieve.generate R ≤ S ↔ R ≤ S.arrows


@[simp] theorem zero_testBit (i : Nat) : testBit 0 i = false


theorem isCauSeq_norm {f : ℕ → K} (hf : IsCauSeq norm f) : IsCauSeq abs (norm ∘ f)

{K : Type u_1}
[RCLike K]
{f : ℕ → K}
(hf : IsCauSeq norm f)


@[to_additive (attr := simp)]
theorem prod_pi_mulSingle' [DecidableEq α] (a : α) (x : β) (s : Finset α) :
    ∏ a' ∈ s, Pi.mulSingle a x a' = if a ∈ s then x else 1

{α : Type u_3}
{β : Type u_4}
[CommMonoid β]
[DecidableEq α]
(a : α)
(x : β)
(s : Finset α)


theorem outerMeasure_interior_compacts (K : Compacts G) : μ.outerMeasure (interior K) ≤ μ K

{G : Type w}
[TopologicalSpace G]
(μ : MeasureTheory.Content G)
[R1Space G]
(K : TopologicalSpace.Compacts G)

μ.outerMeasure (interior ↑K) ≤ (fun s => ↑(μ.toFun s)) K


/-- See also `leOnePart_eq_one`. -/
@[to_additive "See also `negPart_eq_zero`."]
lemma leOnePart_eq_one' : a⁻ᵐ = 1 ↔ a⁻¹ ≤ 1

{α : Type u_1}
[Lattice α]
[AddGroup α]
{a : α}


/-- The negative of a `C^n`function is `C^n`. -/
theorem ContDiff.neg {f : E → F} (hf : ContDiff 𝕜 n f) : ContDiff 𝕜 n fun x => -f x

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


lemma rotate_distinguished_triangle' (T : Triangle (HomotopyCategory C (ComplexShape.up ℤ)))
    (hT : T ∈ distinguishedTriangles C) : T.rotate ∈ distinguishedTriangles C

(T : CategoryTheory.Pretriangulated.Triangle (HomotopyCategory C (ComplexShape.up ℤ)))

(hT : T ∈ HomotopyCategory.Pretriangulated.distinguishedTriangles C)

T.rotate ∈ HomotopyCategory.Pretriangulated.distinguishedTriangles C


@[simp]
theorem self_symm_conj (f : End Y) : α.conj (α.symm.conj f) = f

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


lemma FilterBasis.ofSets_sets (s : Set (Set α)) :
    (FilterBasis.ofSets s).sets = sInter '' { t | Set.Finite t ∧ t ⊆ s }

(Filter.FilterBasis.ofSets s).sets = Set.sInter '' {t | t.Finite ∧ t ⊆ s}


/-- A family of equivalences `Π a, β₁ a ≃ β₂ a` generates an equivalence between `Σ a, β₁ a` and
`Σ a, β₂ a`. -/
@[simps apply]
def sigmaCongrRight {α} {β₁ β₂ : α → Type*} (F : ∀ a, β₁ a ≃ β₂ a) : (Σ a, β₁ a) ≃ Σ a, β₂ a

{α : Type u_3}
{β₁ : α → Type u_1}
{β₂ : α → Type u_2}
(F : (a : α) → β₁ a ≃ β₂ a)
(a : (a : α) × β₁ a)

(Equiv.sigmaCongrRight F) a = ⟨a.fst, (F a.fst) a.snd⟩


@[simp]
theorem sigmaUncurry_apply [∀ i j, Zero (δ i j)] [DecidableEq ι]
    (f : Π₀ (i) (j), δ i j) (i : ι) (j : α i) :
    sigmaUncurry f ⟨i, j⟩ = f i j

{ι : Type u}
{α : ι → Type u_2}
{δ : (i : ι) → α i → Type v}
[(i : ι) → (j : α i) → Zero (δ i j)]
[DecidableEq ι]
(f : Π₀ (i : ι) (j : α i), δ i j)
(i : ι)
(j : α i)


protected theorem prop_iff {p : Prop} : IsEmpty p ↔ ¬p


/-- The bifunctor `Cᵒᵖ ⥤ C ⥤ SSet.{v}` which sends `K : Cᵒᵖ` and `L : C` to `sHom K.unop L`. -/
@[simps]
noncomputable def sHomFunctor : Cᵒᵖ ⥤ C ⥤ SSet.{v}

(C : Type u)
[CategoryTheory.Category.{v, u} C]
[CategoryTheory.SimplicialCategory C]
(K : Cᵒᵖ)
(L : C)

((CategoryTheory.SimplicialCategory.sHomFunctor C).obj K).obj L =
  CategoryTheory.SimplicialCategory.sHom (Opposite.unop K) L


@[to_additive (attr := simp)] lemma smul_swap : (a • x).swap = a • x.swap

{M : Type u_1}
{α : Type u_5}
{β : Type u_6}
[SMul M α]
[SMul M β]
(a : M)
(x : α × β)


theorem riemannZeta_four : riemannZeta 4 = π ^ 4 / 90


theorem coe_mk_apply (f₁ : α → Option β) (f₂ : β → Option α) (h) (x : α) :
    (PEquiv.mk f₁ f₂ h : α → Option β) x = f₁ x

(h : ∀ (a : α) (b : β), a ∈ f₂ b ↔ b ∈ f₁ a)

{ toFun := f₁, invFun := f₂, inv := h } x = f₁ x


/-- Characterization of equicontinuity for families of functions taking values in a (pseudo) metric
space. -/
theorem equicontinuousAt_iff_right {ι : Type*} [TopologicalSpace β] {F : ι → β → α} {x₀ : β} :
    EquicontinuousAt F x₀ ↔ ∀ ε > 0, ∀ᶠ x in 𝓝 x₀, ∀ i, dist (F i x₀) (F i x) < ε

{α : Type u_1}
{β : Type u_2}
[PseudoMetricSpace α]
{ι : Type u_4}
[TopologicalSpace β]
{F : ι → β → α}
{x₀ : β}

EquicontinuousAt F x₀ ↔ ∀ ε > 0, ∀ᶠ (x : β) in 𝓝 x₀, ∀ (i : ι), dist (F i x₀) (F i x) < ε


theorem encard_exchange (ha : a ∉ s) (hb : b ∈ s) : (insert a (s \ {b})).encard = s.encard

{α : Type u_1}
{s : Set α}
{a b : α}
(ha : a ∉ s)
(hb : b ∈ s)


/-- The universal property of a free group: A function from the generators of `G` to another
group extends in a unique way to a homomorphism from `G`.

Note that since `IsFreeGroup.lift` is expressed as a bijection, it already
expresses the universal property.  -/
theorem unique_lift (f : Generators G → H) : ∃! F : G →* H, ∀ a, F (of a) = f a

{G : Type u_1}
[Group G]
[IsFreeGroup G]
{H : Type u_2}
[Group H]
(f : IsFreeGroup.Generators G → H)

∃! F, ∀ (a : IsFreeGroup.Generators G), F (IsFreeGroup.of a) = f a


@[to_additive]
theorem mk_smul_toLp (c : M) {f : α → E} (hf : Memℒp f p μ) :
    mk c • hf.toLp f =
      (hf.comp_measurePreserving <| measurePreserving_smul c μ).toLp (f <| c • ·)

[MeasureTheory.SMulInvariantMeasure M α μ]

DomMulAct.mk c • MeasureTheory.Memℒp.toLp f hf = MeasureTheory.Memℒp.toLp (fun x => f (c • x)) ⋯


@[simp]
theorem union_toFinmap (s₁ s₂ : AList β) : (toFinmap s₁) ∪ (toFinmap s₂) = toFinmap (s₁ ∪ s₂)

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

⟦s₁⟧ ∪ ⟦s₂⟧ = ⟦s₁ ∪ s₂⟧


@[reassoc (attr := simp)]
lemma ranCounit_app_app_ranAdjunction_unit_app_app (G : D ⥤ H) (X : C) :
    ((L.ranAdjunction H).unit.app G).app (L.obj X) ≫ (L.ranCounit.app (L ⋙ G)).app X = 𝟙 _

[∀ (F : CategoryTheory.Functor C H), L.HasRightKanExtension F]

CategoryTheory.CategoryStruct.comp (((L.ranAdjunction H).unit.app G).app (L.obj X))
    ((L.ranCounit.app (L.comp G)).app X) =
  CategoryTheory.CategoryStruct.id (((CategoryTheory.Functor.id (CategoryTheory.Functor D H)).obj G).obj (L.obj X))


/-- Given Localization maps `f : M →* N, k : P →* Q` for Submonoids `S, T` respectively, if a
`CommMonoid` homomorphism `g : M →* P` induces a `f.map hy k : N →* Q`, then for all `z : N`,
we have `k (g y) * f.map hy k z = k (g x)` where `x : M, y ∈ S` are such that
`z * f y = f x`. -/
@[to_additive
    "Given Localization maps `f : M →+ N, k : P →+ Q` for Submonoids `S, T` respectively if an
`AddCommMonoid` homomorphism `g : M →+ P` induces a `f.map hy k : N →+ Q`, then for all `z : N`,
we have `k (g y) + f.map hy k z = k (g x)` where `x : M, y ∈ S` are such that
`z + f y = f x`."]
theorem map_mul_left (z) : k.toMap (g (f.sec z).2) * f.map hy k z = k.toMap (g (f.sec z).1)

{M : Type u_1}
[CommMonoid M]
{S : Submonoid M}
{N : Type u_2}
[CommMonoid N]
{P : Type u_3}
[CommMonoid P]
(f : S.LocalizationMap N)
{g : M →* P}
{T : Submonoid P}
(hy : ∀ (y : ↥S), g ↑y ∈ T)
{Q : Type u_4}
[CommMonoid Q]
{k : T.LocalizationMap Q}
(z : N)

k.toMap (g ↑(f.sec z).2) * (f.map hy k) z = k.toMap (g (f.sec z).1)


@[simp]
theorem mem_comap {s : Subfield L} {f : K →+* L} {x : K} : x ∈ s.comap f ↔ f x ∈ s

{K : Type u}
{L : Type v}
[DivisionRing K]
[DivisionRing L]
{s : Subfield L}
{f : K →+* L}
{x : K}


@[nontriviality]
theorem contDiffWithinAt_of_subsingleton [Subsingleton F] : ContDiffWithinAt 𝕜 n f s x

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type uE}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{F : Type uF}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{s : Set E}
{f : E → F}
{x : E}
{n : ℕ∞}
[Subsingleton F]


theorem hasDerivWithinAt_inv (x_ne_zero : x ≠ 0) (s : Set 𝕜) :
    HasDerivWithinAt (fun x => x⁻¹) (-(x ^ 2)⁻¹) s x

{𝕜 : Type u}
[NontriviallyNormedField 𝕜]
{x : 𝕜}
(x_ne_zero : x ≠ 0)
(s : Set 𝕜)


@[reassoc (attr := simp)]
theorem image.compIso_inv_comp_image_ι [HasImage f] [IsIso g] :
    (image.compIso f g).inv ≫ image.ι f = image.ι (f ≫ g) ≫ inv g

{C : Type u}
[CategoryTheory.Category.{v, u} C]
{X Y : C}
(f : X ⟶ Y)
{Z : C}
(g : Y ⟶ Z)
[CategoryTheory.Limits.HasEqualizers C]
[CategoryTheory.Limits.HasImage f]
[CategoryTheory.IsIso g]

(CategoryTheory.Limits.image.compIso f g).inv ≫ CategoryTheory.Limits.image.ι f =
  CategoryTheory.Limits.image.ι (f ≫ g) ≫ CategoryTheory.inv g


lemma odd_mul : Odd (m * n) ↔ Odd m ∧ Odd n


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

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


theorem locallyIntegrable_const [IsLocallyFiniteMeasure μ] (c : E) :
    LocallyIntegrable (fun _ => c) μ

MeasureTheory.LocallyIntegrable (fun x => c) μ


theorem StructureGroupoid.LocalInvariantProp.section_spec (hG : LocalInvariantProp G G' P)
    (U : (Opens (TopCat.of M))ᵒᵖ) (f : (hG.sheaf M M').val.obj U) : ChartedSpace.LiftProp P f

(U : (TopologicalSpace.Opens ↑(TopCat.of M))ᵒᵖ)

(f : (StructureGroupoid.LocalInvariantProp.sheaf M M' hG).val.obj U)


@[to_additive]
theorem closure_singleton_one : closure ({1} : Set G) = ⊥


@[to_additive]
lemma prod_sdiff_eq_prod_sdiff_iff :
    ∏ i ∈ s \ t, f i = ∏ i ∈ t \ s, f i ↔ ∏ i ∈ s, f i = ∏ i ∈ t, f i

{ι : Type u_1}
{α : Type u_3}
[DecidableEq ι]
[AddCancelCommMonoid α]
{s t : Finset ι}
{f : ι → α}

∑ i ∈ s \ t, f i = ∑ i ∈ t \ s, f i ↔ ∑ i ∈ s, f i = ∑ i ∈ t, f i


theorem ne_bot_iff_nonempty (U : Opens α) : U ≠ ⊥ ↔ Set.Nonempty (U : Set α)

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


theorem mk_multiset_of_countable (α : Type u) [Countable α] [Nonempty α] : #(Multiset α) = ℵ₀


@[simp] lemma succ_succAbove_zero {n : ℕ} [NeZero n] (i : Fin n) : succAbove i.succ 0 = 0


@[to_additive (attr := simp)]
theorem prod_erase_eq_div {a : α} (h : a ∈ s) :
    ∏ x ∈ s.erase a, f x = (∏ x ∈ s, f x) / f a

{α : Type u_3}
{β : Type u_4}
{s : Finset α}
{f : α → β}
[CommGroup β]
[DecidableEq α]
{a : α}
(h : a ∈ s)


protected theorem IsPWO.insert (h : IsPWO s) (a : α) : IsPWO (insert a s)

{α : Type u_2}
[Preorder α]
{s : Set α}
(h : s.IsPWO)
(a : α)


lemma coeff_single_X_pow [DecidableEq σ] (s s' : σ) (n n' : ℕ) :
    (X (R := R) s ^ n).coeff (Finsupp.single s' n')
    = if s = s' ∧ n = n' ∨ n = 0 ∧ n' = 0 then 1 else 0

{R : Type u}
{σ : Type u_1}
[CommSemiring R]
[DecidableEq σ]
(s s' : σ)
(n n' : ℕ)

MvPolynomial.coeff (Finsupp.single s' n') (MvPolynomial.X s ^ n) = if s = s' ∧ n = n' ∨ n = 0 ∧ n' = 0 then 1 else 0


/-- The ordered scalar product property is when an ordered additive commutative monoid
with a partial order has a scalar multiplication which is compatible with the order. Note that this
is different from `IsOrderedSMul`, which uses `≤`, has no semiring assumption, and has no positivity
constraint on the defining conditions.
-/
class OrderedSMul (R M : Type*) [OrderedSemiring R] [OrderedAddCommMonoid M] [SMulWithZero R M] :
  Prop where
  /-- Scalar multiplication by positive elements preserves the order. -/
  protected smul_lt_smul_of_pos : ∀ {a b : M}, ∀ {c : R}, a < b → 0 < c → c • a < c • b
  /-- If `c • a < c • b` for some positive `c`, then `a < b`. -/
  protected lt_of_smul_lt_smul_of_pos : ∀ {a b : M}, ∀ {c : R}, c • a < c • b → 0 < c → a < b

{R : Type u_1}
{M : Type u_2}
[OrderedSemiring R]
[OrderedAddCommMonoid M]
[SMulWithZero R M]
[self : OrderedSMul R M]
{a b : M}
{c : R}


theorem HasDerivWithinAt.clog {f : ℂ → ℂ} {f' x : ℂ} {s : Set ℂ} (h₁ : HasDerivWithinAt f f' s x)
    (h₂ : f x ∈ slitPlane) : HasDerivWithinAt (fun t => log (f t)) (f' / f x) s x

{f : ℂ → ℂ}
{f' x : ℂ}
{s : Set ℂ}
(h₁ : HasDerivWithinAt f f' s x)
(h₂ : f x ∈ Complex.slitPlane)

HasDerivWithinAt (fun t => Complex.log (f t)) (f' / f x) s x


theorem rpow_mul_exp_neg_mul_rpow_isLittleO_exp_neg (s : ℝ) {b p : ℝ} (hp : 1 < p) (hb : 0 < b) :
    (fun x : ℝ => x ^ s * exp (- b * x ^ p)) =o[atTop] fun x : ℝ => exp (-(1 / 2) * x)

(fun x => x ^ s * rexp (-b * x ^ p)) =o[Filter.atTop] fun x => rexp (-(1 / 2) * x)


@[simp]
theorem nhds_le_nhds_iff [T1Space X] {a b : X} : 𝓝 a ≤ 𝓝 b ↔ a = b

{X : Type u_1}
[TopologicalSpace X]
[T1Space X]
{a b : X}


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

{R : Type u_1}
{S : Type u_2}
{M : Type u_3}
{M₂ : Type u_4}
[CommRing R]
[CommRing S]
[AddCommGroup M]
[AddCommGroup M₂]
[Module R M]
[Module S M₂]
{σ : R →+* S}
{σ' : S →+* R}
[RingHomInvPair σ σ']
[RingHomInvPair σ' σ]
(e : M ≃ₛₗ[σ] M₂)
(rs : List R)

RingTheory.Sequence.IsRegular M rs ↔ RingTheory.Sequence.IsRegular M₂ (List.map (⇑σ) rs)


/-- `x ^ s = o(exp x)` as `x → ∞` for any real `s`. -/
theorem isLittleO_rpow_exp_atTop (s : ℝ) : (fun x : ℝ => x ^ s) =o[atTop] exp


lemma changeLevel_toUnitHom {m : ℕ} (hm : n ∣ m) :
    (changeLevel hm χ).toUnitHom = χ.toUnitHom.comp (ZMod.unitsMap hm)

{R : Type u_1}
[CommMonoidWithZero R]
{n : ℕ}
(χ : DirichletCharacter R n)
{m : ℕ}
(hm : n ∣ m)

MulChar.toUnitHom ((DirichletCharacter.changeLevel hm) χ) = (MulChar.toUnitHom χ).comp (ZMod.unitsMap hm)


theorem uIcc_injective_right (a : α) : Injective fun b => [[b, a]]

{α : Type u_2}
[DistribLattice α]
[LocallyFiniteOrder α]
(a : α)


theorem mem_iff_lt_colLen {μ : YoungDiagram} {i j : ℕ} : (i, j) ∈ μ ↔ i < μ.colLen j


theorem coeff_orderTop_ne {x : HahnSeries Γ R} {g : Γ} (hg : x.orderTop = g) :
    x.coeff g ≠ 0

{Γ : Type u_1}
{R : Type u_2}
[PartialOrder Γ]
[Zero R]
{x : HahnSeries Γ R}
{g : Γ}
(hg : x.orderTop = ↑g)


@[to_additive]
theorem prod_unique {α β : Type*} [CommMonoid β] [Unique α] [Fintype α] (f : α → β) :
    ∏ x : α, f x = f default

{α : Type u_9}
{β : Type u_10}
[AddCommMonoid β]
[Unique α]
[Fintype α]
(f : α → β)


theorem card_eq_three : s.card = 3 ↔ ∃ x y z, x ≠ y ∧ x ≠ z ∧ y ≠ z ∧ s = {x, y, z}

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


@[simp]
theorem Matrix.toLinearMapRight'_mul [Fintype l] [DecidableEq l] (M : Matrix l m R)
    (N : Matrix m n R) :
    Matrix.toLinearMapRight' (M * N) =
      (Matrix.toLinearMapRight' N).comp (Matrix.toLinearMapRight' M)

{R : Type u_1}
[Semiring R]
{l : Type u_2}
{m : Type u_3}
{n : Type u_4}
[Fintype m]
[DecidableEq m]
[Fintype l]
[DecidableEq l]
(M : Matrix l m R)
(N : Matrix m n R)

Matrix.toLinearMapRight' (M * N) = Matrix.toLinearMapRight' N ∘ₗ Matrix.toLinearMapRight' M


@[to_additive]
theorem smul_ball_one : x • ball (1 : E) δ = ball x δ

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


@[simp] -- Porting note: removed `norm_cast`
theorem coe_constrL (v : Basis ι 𝕜 E) (f : ι → F) : (v.constrL f : E →ₗ[𝕜] F) = v.constr 𝕜 f

{𝕜 : Type u}
[hnorm : NontriviallyNormedField 𝕜]
{E : Type v}
[AddCommGroup E]
[Module 𝕜 E]
[TopologicalSpace E]
[TopologicalAddGroup E]
[ContinuousSMul 𝕜 E]
{F : Type w}
[AddCommGroup F]
[Module 𝕜 F]
[TopologicalSpace F]
[TopologicalAddGroup F]
[ContinuousSMul 𝕜 F]
[CompleteSpace 𝕜]
{ι : Type u_1}
[Finite ι]
[T2Space E]
(v : Basis ι 𝕜 E)
(f : ι → F)


theorem liftAux_tprodCoeff (φ : MultilinearMap R s E) (z : R) (f : Π i, s i) :
    liftAux φ (tprodCoeff R z f) = z • φ f

{ι : Type u_1}
{R : Type u_4}
[CommSemiring R]
{s : ι → Type u_7}
[(i : ι) → AddCommMonoid (s i)]
[(i : ι) → Module R (s i)]
{E : Type u_9}
[AddCommMonoid E]
[Module R E]
(φ : MultilinearMap R s E)
(z : R)
(f : (i : ι) → s i)

(PiTensorProduct.liftAux φ) (PiTensorProduct.tprodCoeff R z f) = z • φ f


@[simp] theorem singleton_subperm_iff {α} {l : List α} {a : α} : [a] <+~ l ↔ a ∈ l


@[to_additive sum_le_card_nsmul]
lemma prod_le_pow_card (s : Multiset α) (n : α) (h : ∀ x ∈ s, x ≤ n) : s.prod ≤ n ^ card s

{α : Type u_2}
[OrderedCommMonoid α]
(s : Multiset α)
(n : α)
(h : ∀ x ∈ s, x ≤ n)


@[simp]
theorem measure_singleton (a : ℝ) : f.measure {a} = ofReal (f a - leftLim f a)

f.measure {a} = ENNReal.ofReal (↑f a - Function.leftLim (↑f) a)


theorem apply_mem_neighborSet_iff {v w : V} : f w ∈ G'.neighborSet (f v) ↔ w ∈ G.neighborSet v

{V : Type u_1}
{W : Type u_2}
{G : SimpleGraph V}
{G' : SimpleGraph W}
(f : G ≃g G')
{v w : V}


theorem splittingOfFunOnFintypeSurjective_splits [Finite α] (f : M →ₗ[R] α → R)
    (s : Surjective f) : f.comp (splittingOfFunOnFintypeSurjective f s) = LinearMap.id

{R : Type u_1}
{M : Type u_2}
[Semiring R]
[AddCommMonoid M]
[Module R M]
{α : Type u_4}
[Finite α]
(f : M →ₗ[R] α → R)
(s : Function.Surjective ⇑f)

f ∘ₗ f.splittingOfFunOnFintypeSurjective s = LinearMap.id


theorem induction₂ {p : (Π₀ i, β i) → Prop} (f : Π₀ i, β i) (h0 : p 0)
    (ha : ∀ (i b) (f : Π₀ i, β i), f i = 0 → b ≠ 0 → p f → p (f + single i b)) : p f

(ha : ∀ (i : ι) (b : β i) (f : Π₀ (i : ι), β i), f i = 0 → b ≠ 0 → p f → p (f + DFinsupp.single i b))


@[simp]
theorem iterate_add_minimalPeriod_eq : f^[n + minimalPeriod f x] x = f^[n] x

{α : Type u_1}
{f : α → α}
{x : α}
{n : ℕ}

f^[n + Function.minimalPeriod f x] x = f^[n] x


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


/-- An anti-equivalence between the categories of triangles in `C` and in `Cᵒᵖ`.
A triangle in `Cᵒᵖ` shall be distinguished iff it correspond to a distinguished
triangle in `C` via this equivalence. -/
@[simps]
noncomputable def triangleOpEquivalence :
    (Triangle C)ᵒᵖ ≌ Triangle Cᵒᵖ

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

(CategoryTheory.Pretriangulated.triangleOpEquivalence C).unitIso =
  CategoryTheory.Pretriangulated.TriangleOpEquivalence.unitIso C


@[to_additive (attr := simp)]
theorem ball_div : ball x δ / s = x • thickening δ s⁻¹

{E : Type u_1}
[SeminormedAddCommGroup E]
(δ : ℝ)
(s : Set E)
(x : E)

Metric.ball x δ - s = x +ᵥ Metric.thickening δ (-s)


/-- The minimal distance of a point to a set containing it vanishes. -/
theorem infDist_zero_of_mem (h : x ∈ s) : infDist x s = 0

{α : Type u}
[PseudoMetricSpace α]
{s : Set α}
{x : α}
(h : x ∈ s)


theorem wpRec_eq {α : TypeVec n} {C : Type*}
    (g : ∀ (a : P.A) (f : P.last.B a → P.last.W), P.WPath ⟨a, f⟩ ⟹ α → (P.last.B a → C) → C)
    (a : P.A) (f : P.last.B a → P.last.W) (f' : P.WPath ⟨a, f⟩ ⟹ α) :
    P.wpRec g ⟨a, f⟩ f' = g a f f' fun i => P.wpRec g (f i) (P.wPathDestRight f' i)

(g : (a : P.A) → (f : P.last.B a → P.last.W) → TypeVec.Arrow (P.WPath (WType.mk a f)) α → (P.last.B a → C) → C)

(f' : TypeVec.Arrow (P.WPath (WType.mk a f)) α)

P.wpRec g (WType.mk a f) f' = g a f f' fun i => P.wpRec g (f i) (P.wPathDestRight f' i)


@[simp]
theorem empty_vecAlt1 (α) {h} : vecAlt1 h (![] : Fin 0 → α) = ![]


@[to_additive (attr := simp)]
theorem pure_one : pure 1 = (1 : Filter α)


@[to_additive (attr := simp)]
theorem lift_comp_inl (f : M →* P) (g : N →* P) : (lift f g).comp inl = f

{M : Type u_1}
{N : Type u_2}
{P : Type u_3}
[AddZeroClass M]
[AddZeroClass N]
[AddMonoid P]
(f : M →+ P)
(g : N →+ P)

(AddMonoid.Coprod.lift f g).comp AddMonoid.Coprod.inl = f


theorem neg_mem_ball_zero {r : ℝ} {x : E} : -x ∈ ball p 0 r ↔ x ∈ ball p 0 r

{𝕜 : Type u_3}
{E : Type u_7}
[SeminormedRing 𝕜]
[AddCommGroup E]
[Module 𝕜 E]
(p : Seminorm 𝕜 E)
{r : ℝ}
{x : E}


/-- Left multiplication by a unit of a monoid is a permutation of the underlying type. -/
@[to_additive (attr := simps (config := .asFn) apply)
  "Left addition of an additive unit is a permutation of the underlying type."]
def mulLeft (u : Mˣ) : Equiv.Perm M


@[simp]
theorem continuousMapEval_apply_apply (x : X) (f : C(X, 𝕜)) : continuousMapEval X 𝕜 x f = f x

(X : Type u_1)
(𝕜 : Type u_2)
[TopologicalSpace X]
[CommRing 𝕜]
[TopologicalSpace 𝕜]
[TopologicalRing 𝕜]
[Nontrivial 𝕜]
[NoZeroDivisors 𝕜]
(x : X)
(f : C(X, 𝕜))

((WeakDual.CharacterSpace.continuousMapEval X 𝕜) x) f = f x


/-- See `Polynomial.mul_left_modByMonic` for the other multiplication order. That version, unlike
this one, requires commutativity. -/
@[simp]
lemma self_mul_modByMonic (hq : q.Monic) : (q * p) %ₘ q = 0

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


/-- `OrderDual` as a functor. -/
@[simps]
def dual : PartOrd ⥤ PartOrd


@[simp]
theorem dedup_cons_of_mem {a : α} {l : List α} (h : a ∈ l) : dedup (a :: l) = dedup l

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


theorem unop_tensor_unop {W X Y Z : Cᵒᵖ} (f : W ⟶ X) (g : Y ⟶ Z) :
    f.unop ⊗ g.unop = (f ⊗ g).unop

{C : Type u₁}
[CategoryTheory.Category.{v₁, u₁} C]
[CategoryTheory.MonoidalCategory C]
{W X Y Z : Cᵒᵖ}
(f : W ⟶ X)
(g : Y ⟶ Z)

CategoryTheory.MonoidalCategory.tensorHom f.unop g.unop = (CategoryTheory.MonoidalCategory.tensorHom f g).unop


/-- There is a natural equivalence when swapping the coefficients of a quaternion algebra. -/
@[simps]
def swapEquiv : ℍ[R,c₁,c₂] ≃ₐ[R] ℍ[R, c₂, c₁]

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

((QuaternionAlgebra.swapEquiv c₁ c₂) t).re = t.re


/-- The cochain complex of homomorphisms between two cochain complexes `F` and `G`.
In degree `n : ℤ`, it consists of the abelian group `HomComplex.Cochain F G n`. -/
-- We also constructed the `d_apply` lemma using `@[simps]`
-- until we made `AddCommGrp.coe_of` a simp lemma,
-- after which the simp normal form linter complains.
-- It was not used a simp lemma in Mathlib.
-- Possible solution: higher priority function coercions that remove the `of`?
-- @[simp]
@[simps! X]
def HomComplex : CochainComplex AddCommGrp ℤ

{C : Type u}
[CategoryTheory.Category.{v, u} C]
[CategoryTheory.Preadditive C]
(F G : CochainComplex C ℤ)
(i : ℤ)

(F.HomComplex G).X i = AddCommGrp.of (CochainComplex.HomComplex.Cochain F G i)


theorem mk_coe_def (p : K[X]) (q : K[X]⁰) :
    -- Porting note: filled in `(FractionRing K[X])` that was an underscore.
    RatFunc.mk p q = ofFractionRing (IsLocalization.mk' (FractionRing K[X]) p q)

{K : Type u}
[CommRing K]
[IsDomain K]
(p : K[X])
(q : ↥K[X]⁰)

RatFunc.mk p ↑q = { toFractionRing := IsLocalization.mk' (FractionRing K[X]) p q }


@[to_additive]
theorem mulSupport_update_of_ne_one [DecidableEq α] (f : α → M) (x : α) {y : M} (hy : y ≠ 1) :
    mulSupport (update f x y) = insert x (mulSupport f)

{α : Type u_1}
{M : Type u_5}
[One M]
[DecidableEq α]
(f : α → M)
(x : α)
{y : M}
(hy : y ≠ 1)

Function.mulSupport (Function.update f x y) = insert x (Function.mulSupport f)


/-- An easier to use version of one direction of
`GenContFract.IntFractPair.succ_nth_stream_eq_some_iff`. -/
theorem stream_succ_of_some {p : IntFractPair K} (h : IntFractPair.stream v n = some p)
    (h' : p.fr ≠ 0) : IntFractPair.stream v (n + 1) = some (IntFractPair.of p.fr⁻¹)

(h : GenContFract.IntFractPair.stream v n = some p)

GenContFract.IntFractPair.stream v (n + 1) = some (GenContFract.IntFractPair.of p.fr⁻¹)


@[simp]
theorem lift_quotient_mk'_sigma_mk' {i} (x : G i) : lift L ι G f g Hg ⟦.mk f i x⟧ = (g i) x

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

(Hg : ∀ (i j : ι) (hij : i ≤ j) (x : G i), (g j) ((f i j hij) x) = (g i) x)

(FirstOrder.Language.DirectLimit.lift L ι G f g Hg) ⟦FirstOrder.Language.Structure.Sigma.mk f i x⟧ = (g i) x


@[simp]
theorem nil_toFinset : (@nil α).toFinset = ∅


@[simp]
theorem mk_comp {X Y Z : F C} (f : X ⟶ᵐ Y) (g : Y ⟶ᵐ Z) :
    ⟦f.comp g⟧ = @CategoryStruct.comp (F C) _ _ _ _ ⟦f⟧ ⟦g⟧

{X Y Z : CategoryTheory.FreeMonoidalCategory C}

⟦f.comp g⟧ = CategoryTheory.CategoryStruct.comp ⟦f⟧ ⟦g⟧


@[fun_prop]
theorem DifferentiableWithinAt.smul (hc : DifferentiableWithinAt 𝕜 c s x)
    (hf : DifferentiableWithinAt 𝕜 f s x) : DifferentiableWithinAt 𝕜 (fun y => c y • f y) s x

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{F : Type u_3}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{f : E → F}
{x : E}
{s : Set E}
{𝕜' : Type u_6}
[NontriviallyNormedField 𝕜']
[NormedAlgebra 𝕜 𝕜']
[NormedSpace 𝕜' F]
[IsScalarTower 𝕜 𝕜' F]
{c : E → 𝕜'}
(hc : DifferentiableWithinAt 𝕜 c s x)
(hf : DifferentiableWithinAt 𝕜 f s x)


@[to_additive add_const]
theorem StrictMono.mul_const' (hf : StrictMono f) (c : α) : StrictMono fun x => f x * c

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


/-- The right adjoint of evaluation. -/
@[simps]
def evaluationRightAdjoint (c : C) : D ⥤ C ⥤ D

[∀ (a b : C), CategoryTheory.Limits.HasProductsOfShape (a ⟶ b) D]

∀ {X Y : D} (f : X ⟶ Y) (t : C),
  ((CategoryTheory.evaluationRightAdjoint D c).map f).app t =
    CategoryTheory.Limits.Pi.lift fun g =>
      CategoryTheory.CategoryStruct.comp (CategoryTheory.Limits.Pi.π (fun x => X) g) f


/-- The sign of the angle between two linear combinations of two vectors is the sign of the
determinant of the factors in those combinations multiplied by the sign of the angle between the
two vectors. -/
theorem oangle_sign_smul_add_smul_smul_add_smul (x y : V) (r₁ r₂ r₃ r₄ : ℝ) :
    (o.oangle (r₁ • x + r₂ • y) (r₃ • x + r₄ • y)).sign =
      SignType.sign (r₁ * r₄ - r₂ * r₃) * (o.oangle x y).sign

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


/-- If two functions coincide on a set `s`, then a Taylor series for the first one is as well a
Taylor series for the second one. -/
theorem HasFTaylorSeriesUpToOn.congr (h : HasFTaylorSeriesUpToOn n f p s)
    (h₁ : ∀ x ∈ s, f₁ x = f x) : HasFTaylorSeriesUpToOn n f₁ p s

{𝕜 : Type u}
[NontriviallyNormedField 𝕜]
{E : Type uE}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{F : Type uF}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{s : Set E}
{f f₁ : E → F}
{n : ℕ∞}
{p : E → FormalMultilinearSeries 𝕜 E F}
(h : HasFTaylorSeriesUpToOn n f p s)
(h₁ : ∀ x ∈ s, f₁ x = f x)


theorem deriv_update (x : ι → 𝕜) (i : ι) (y : 𝕜) :
    deriv (Function.update x i) y = Pi.single i (1 : 𝕜)

{𝕜 : Type u_1}
{ι : Type u_2}
[DecidableEq ι]
[Fintype ι]
[NontriviallyNormedField 𝕜]
(x : ι → 𝕜)
(i : ι)
(y : 𝕜)

deriv (Function.update x i) y = Pi.single i 1


theorem const_apply' (a : α) (b : β) : (const α b : α → β) a = b

{α : Type u}
{β : Type v}
[TopologicalSpace α]
[PseudoMetricSpace β]
(a : α)
(b : β)

(BoundedContinuousFunction.const α b) a = b


@[simp]
theorem invUnitsSub_mul_sub (u : Rˣ) : invUnitsSub u * (C R u - X) = 1

PowerSeries.invUnitsSub u * ((PowerSeries.C R) ↑u - PowerSeries.X) = 1


theorem ofNat_val_add {x y : Fin n} :
    (((x + y : Fin n)) : Int) = ((x : Int) + (y : Int)) % n


theorem of_no_dummies (S : Set (α → ℕ)) (p : Poly α) (h : ∀ v, S v ↔ p v = 0) : Dioph S

{α : Type u}
(S : Set (α → ℕ))
(p : Poly α)
(h : ∀ (v : α → ℕ), S v ↔ p v = 0)


/-- Consider a monotone function `u` parameterizing some points of a set `s`. Given `x ∈ s`, then
one can find another monotone function `v` parameterizing the same points as `u`, with `x` added.
In particular, the variation of a function along `u` is bounded by its variation along `v`. -/
theorem add_point (f : α → E) {s : Set α} {x : α} (hx : x ∈ s) (u : ℕ → α) (hu : Monotone u)
    (us : ∀ i, u i ∈ s) (n : ℕ) :
    ∃ (v : ℕ → α) (m : ℕ), Monotone v ∧ (∀ i, v i ∈ s) ∧ x ∈ v '' Iio m ∧
      (∑ i ∈ Finset.range n, edist (f (u (i + 1))) (f (u i))) ≤
        ∑ j ∈ Finset.range m, edist (f (v (j + 1))) (f (v j))

{α : Type u_1}
[LinearOrder α]
{E : Type u_2}
[PseudoEMetricSpace E]
(f : α → E)
{s : Set α}
{x : α}
(hx : x ∈ s)
(u : ℕ → α)
(hu : Monotone u)
(us : ∀ (i : ℕ), u i ∈ s)
(n : ℕ)

∃ v m,
  Monotone v ∧
    (∀ (i : ℕ), v i ∈ s) ∧
      x ∈ v '' Set.Iio m ∧
        ∑ i ∈ Finset.range n, edist (f (u (i + 1))) (f (u i)) ≤ ∑ j ∈ Finset.range m, edist (f (v (j + 1))) (f (v j))


/-- Change a cocone on `F.leftOp : Jᵒᵖ ⥤ C` to a cocone on `F : J ⥤ Cᵒᵖ`. -/
@[simps!]
def coneOfCoconeLeftOp (c : Cocone F.leftOp) : Cone F

(c : CategoryTheory.Limits.Cocone F.leftOp)

(CategoryTheory.Limits.coneOfCoconeLeftOp c).pt = Opposite.op c.pt


/-- If `S` is the localization of `R` away from `r`, we obtain a canonical generator mapping
to the inverse of `r`. -/
@[simps val, simps (config := .lemmasOnly) vars σ]
noncomputable
def localizationAway : Generators R S

{R : Type u}
{S : Type v}
[CommRing R]
[CommRing S]
[Algebra R S]
(r : R)
[IsLocalization.Away r S]

∀ (x : Unit), (Algebra.Generators.localizationAway r).val x = IsLocalization.Away.invSelf r


theorem ite_inter_of_inter_eq (t : Set α) {s₁ s₂ s : Set α} (h : s₁ ∩ s = s₂ ∩ s) :
    t.ite s₁ s₂ ∩ s = s₁ ∩ s

{α : Type u}
(t : Set α)
{s₁ s₂ s : Set α}
(h : s₁ ∩ s = s₂ ∩ s)


/-- The fact that `d` divides `n` when `χ` factors through a Dirichlet character at level `d` -/
lemma dvd {d : ℕ} (h : FactorsThrough χ d) : d ∣ n

{R : Type u_1}
[CommMonoidWithZero R]
{n : ℕ}
{χ : DirichletCharacter R n}
{d : ℕ}
(h : χ.FactorsThrough d)


/-- A group `G` is finitely generated if and only if `R[G]` is of finite type. -/
theorem finiteType_iff_group_fg {G : Type*} [Group G] [CommRing R] [Nontrivial R] :
    FiniteType R (MonoidAlgebra R G) ↔ Group.FG G

{R : Type u_1}
{G : Type u_3}
[Group G]
[CommRing R]
[Nontrivial R]

Algebra.FiniteType R (MonoidAlgebra R G) ↔ Group.FG G


theorem y_nonneg (D : ℝ) (x : E) : 0 ≤ y D x

{E : Type u_1}
[NormedAddCommGroup E]
[NormedSpace ℝ E]
[FiniteDimensional ℝ E]
[MeasurableSpace E]
[BorelSpace E]
(D : ℝ)
(x : E)


theorem τ_apply_fromCoset' (x : B) (hx : x ∈ f.range) :
    τ (fromCoset ⟨x • ↑f.range, ⟨x, rfl⟩⟩) = ∞

{A B : Grp}
(f : A ⟶ B)
(x : ↑B)
(hx : x ∈ MonoidHom.range f)

(Grp.SurjectiveOfEpiAuxs.tau f) (Grp.SurjectiveOfEpiAuxs.XWithInfinity.fromCoset ⟨x • ↑(MonoidHom.range f), ⋯⟩) =
  Grp.SurjectiveOfEpiAuxs.XWithInfinity.infinity


/-- For subgroups generated by a single element, see the simpler `zpow_induction_right`. -/
@[to_additive (attr := elab_as_elim)
  "For additive subgroups generated by a single element, see the simpler
  `zsmul_induction_right`."]
theorem closure_induction_right {p : (x : G) → x ∈ closure s → Prop} (one : p 1 (one_mem _))
    (mul_right : ∀ (x) hx, ∀ y (hy : y ∈ s), p x hx → p (x * y) (mul_mem hx (subset_closure hy)))
    (mul_right_inv : ∀ (x) hx, ∀ y (hy : y ∈ s), p x hx →
      p (x * y⁻¹) (mul_mem hx (inv_mem (subset_closure hy))))
    {x : G} (h : x ∈ closure s) : p x h

{p : (x : G) → x ∈ Subgroup.closure s → Prop}

(mul_right : ∀ (x : G) (hx : x ∈ Subgroup.closure s) (y : G) (hy : y ∈ s), p x hx → p (x * y) ⋯)

(mul_right_inv : ∀ (x : G) (hx : x ∈ Subgroup.closure s) (y : G) (hy : y ∈ s), p x hx → p (x * y⁻¹) ⋯)


theorem scaleRoots_ne_zero {p : R[X]} (hp : p ≠ 0) (s : R) : scaleRoots p s ≠ 0

{R : Type u_1}
[Semiring R]
{p : Polynomial R}
(hp : p ≠ 0)
(s : R)


theorem skeleton_skeletal : Skeletal (Skeleton C)

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


/-- Over any ring `R` satisfying the strong rank condition,
if `b` is a basis for a module `M`,
and `s` is a linearly independent set,
then the cardinality of `s` is bounded by the cardinality of `b`.
-/
theorem linearIndependent_le_basis {ι : Type w} (b : Basis ι R M) {κ : Type w} (v : κ → M)
    (i : LinearIndependent R v) : #κ ≤ #ι

{R : Type u}
{M : Type v}
[Ring R]
[AddCommGroup M]
[Module R M]
[StrongRankCondition R]
{ι : Type w}
(b : Basis ι R M)
{κ : Type w}
(v : κ → M)
(i : LinearIndependent R v)


@[simp] theorem reverse_ins [inst : @OrientedCmp α cmp] {t : RBNode α} :
    (ins cmp x t).reverse = ins (flip cmp) x t.reverse

{α : Type u_1}
{cmp : α → α → Ordering}
{x : α}
[inst : Batteries.OrientedCmp cmp]
{t : Batteries.RBNode α}

(Batteries.RBNode.ins cmp x t).reverse = Batteries.RBNode.ins (flip cmp) x t.reverse


@[simp] theorem one_re : (1 : ℍ[R]).re = 1


protected theorem cons {n m f g} (hf : @Primrec' n f) (hg : @Vec n m g) :
    Vec fun v => f v ::ᵥ g v

{g : Mathlib.Vector ℕ n → Mathlib.Vector ℕ m}


lemma rpow_left_inj (hx : 0 ≤ x) (hy : 0 ≤ y) (hz : z ≠ 0) : x ^ z = y ^ z ↔ x = y

{x y z : ℝ}
(hx : 0 ≤ x)
(hy : 0 ≤ y)
(hz : z ≠ 0)


theorem tendsto_leftLim_within (x : α) : Tendsto f (𝓝[<] x) (𝓝[≥] leftLim f x)

{α : Type u_1}
{β : Type u_2}
[LinearOrder α]
[ConditionallyCompleteLinearOrder β]
[TopologicalSpace β]
[OrderTopology β]
{f : α → β}
(hf : Antitone f)
[TopologicalSpace α]
[OrderTopology α]
(x : α)

Filter.Tendsto f (𝓝[<] x) (𝓝[≥] Function.leftLim f x)


/-- For a symmetric operator `T`, the function `fun x ↦ ⟪T x, x⟫` is real-valued. -/
@[simp]
theorem IsSymmetric.coe_reApplyInnerSelf_apply {T : E →L[𝕜] E} (hT : IsSymmetric (T : E →ₗ[𝕜] E))
    (x : E) : (T.reApplyInnerSelf x : 𝕜) = ⟪T x, x⟫

{𝕜 : Type u_1}
{E : Type u_2}
[RCLike 𝕜]
[NormedAddCommGroup E]
[InnerProductSpace 𝕜 E]
{T : E →L[𝕜] E}
(hT : (↑T).IsSymmetric)
(x : E)


@[simp] theorem add_get [Add α] {a b : Thunk α} : (a + b).get = a.get + b.get


theorem _root_.MeasurableEmbedding.eLpNorm_map_measure {g : β → F} (hf : MeasurableEmbedding f) :
    eLpNorm g p (Measure.map f μ) = eLpNorm (g ∘ f) p μ

{α : Type u_1}
{F : Type u_3}
{m0 : MeasurableSpace α}
{p : ℝ≥0∞}
{μ : MeasureTheory.Measure α}
[NormedAddCommGroup F]
{β : Type u_5}
{mβ : MeasurableSpace β}
{f : α → β}
{g : β → F}
(hf : MeasurableEmbedding f)

MeasureTheory.eLpNorm g p (MeasureTheory.Measure.map f μ) = MeasureTheory.eLpNorm (g ∘ f) p μ


theorem right_subset_compRel {s t : Set (α × α)} (h : idRel ⊆ s) : t ⊆ s ○ t

{α : Type ua}
{s t : Set (α × α)}
(h : idRel ⊆ s)


@[simp]
lemma mk₀_zero (m₀ : M) (hm₀ : m₀ = 0) : mk₀ m₀ hm₀ (0 : X ⟶ Y) = 0

{C : Type u_1}
[CategoryTheory.Category.{u_5, u_1} C]
{M : Type u_4}
[AddMonoid M]
[CategoryTheory.HasShift C M]
(X Y : C)
[CategoryTheory.Preadditive C]
(m₀ : M)
(hm₀ : m₀ = 0)

CategoryTheory.ShiftedHom.mk₀ m₀ hm₀ 0 = 0


@[simp]
theorem blockDiag_add [AddZeroClass α] (M N : Matrix (m × o) (n × o) α) :
    blockDiag (M + N) = blockDiag M + blockDiag N

{m : Type u_2}
{n : Type u_3}
{o : Type u_4}
{α : Type u_12}
[AddZeroClass α]
(M N : Matrix (m × o) (n × o) α)

(M + N).blockDiag = M.blockDiag + N.blockDiag


@[to_additive (attr := simp)]
theorem tail_mul (x y : FreeSemigroup α) : (x * y).2 = x.2 ++ y.1 :: y.2

(x * y).tail = x.tail ++ y.head :: y.tail


theorem support_swap_mul_ge_support_diff (f : Perm α) (x y : α) :
    f.support \ {x, y} ≤ (swap x y * f).support

{α : Type u_1}
[DecidableEq α]
[Fintype α]
(f : Equiv.Perm α)
(x y : α)

f.support \ {x, y} ≤ (Equiv.swap x y * f).support


theorem mem_span_image_iff_total {s : Set α} {x : M} :
    x ∈ span R (v '' s) ↔ ∃ l ∈ supported R R s, Finsupp.total α M R v l = x

{α : Type u_1}
{M : Type u_2}
(R : Type u_5)
[Semiring R]
[AddCommMonoid M]
[Module R M]
{v : α → M}
{s : Set α}
{x : M}

x ∈ Submodule.span R (v '' s) ↔ ∃ l ∈ Finsupp.supported R R s, (Finsupp.total α M R v) l = x


@[simp]
theorem cons_tail : cons (t 0) (tail t) = t

{n : ℕ}
{M : Type u_1}
[Zero M]
(t : Fin (n + 1) →₀ M)


lemma kernImage_union_preimage {s : Set α} {t : Set β} :
    kernImage f (s ∪ f ⁻¹' t) = kernImage f s ∪ t

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

Set.kernImage f (s ∪ f ⁻¹' t) = Set.kernImage f s ∪ t


theorem LocallyConvexSpace.convex_basis_zero [LocallyConvexSpace 𝕜 E] :
    (𝓝 0 : Filter E).HasBasis (fun s => s ∈ (𝓝 0 : Filter E) ∧ Convex 𝕜 s) id

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

(𝓝 0).HasBasis (fun s => s ∈ 𝓝 0 ∧ Convex 𝕜 s) id


lemma sumLexLift_mono (hf₁ : ∀ a b, f₁ a b ⊆ f₁' a b) (hf₂ : ∀ a b, f₂ a b ⊆ f₂' a b)
    (hg₁ : ∀ a b, g₁ a b ⊆ g₁' a b) (hg₂ : ∀ a b, g₂ a b ⊆ g₂' a b) (a : α₁ ⊕ α₂)
    (b : β₁ ⊕ β₂) : sumLexLift f₁ f₂ g₁ g₂ a b ⊆ sumLexLift f₁' f₂' g₁' g₂' a b

(hf₁ : ∀ (a : α₁) (b : β₁), f₁ a b ⊆ f₁' a b)

(hf₂ : ∀ (a : α₂) (b : β₂), f₂ a b ⊆ f₂' a b)

(hg₁ : ∀ (a : α₁) (b : β₂), g₁ a b ⊆ g₁' a b)

(hg₂ : ∀ (a : α₁) (b : β₂), g₂ a b ⊆ g₂' a b)

(a : α₁ ⊕ α₂)

(b : β₁ ⊕ β₂)

Finset.sumLexLift f₁ f₂ g₁ g₂ a b ⊆ Finset.sumLexLift f₁' f₂' g₁' g₂' a b


/-- Combine two equivalences using `PProd` in the codomain and `Prod` in the domain. -/
@[simps! apply symm_apply]
def prodPProd (ea : α₁ ≃ α₂) (eb : β₁ ≃ β₂) :
    α₁ × β₁ ≃ PProd α₂ β₂

{α₁ : Type u_1}
{α₂ : Sort u_2}
{β₁ : Type u_3}
{β₂ : Sort u_4}
(ea : α₁ ≃ α₂)
(eb : β₁ ≃ β₂)

∀ (a : PProd α₂ β₂), (ea.prodPProd eb).symm a = (ea.symm a.fst, eb.symm a.snd)


@[simp]
lemma Algebra.intNorm_eq_zero {x : B} : Algebra.intNorm A B x = 0 ↔ x = 0

[Algebra.IsSeparable (FractionRing A) (FractionRing B)]


@[simp] theorem run_bind [Monad m] (x : StateT σ m α) (f : α → StateT σ m β) (s : σ)
    : (x >>= f).run s = x.run s >>= λ p => (f p.1).run p.2

{m : Type u_1 → Type u_2}
{σ α β : Type u_1}
[Monad m]
(x : StateT σ m α)
(f : α → StateT σ m β)
(s : σ)

(x >>= f).run s = do
  let p ← x.run s
  (f p.fst).run p.snd


/-- If a function has a power series on a ball, then so does its derivative. -/
theorem HasFPowerSeriesOnBall.fderiv [CompleteSpace F] (h : HasFPowerSeriesOnBall f p x r) :
    HasFPowerSeriesOnBall (fderiv 𝕜 f) p.derivSeries x r

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type u}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{F : Type v}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{p : FormalMultilinearSeries 𝕜 E F}
{r : ℝ≥0∞}
{f : E → F}
{x : E}
[CompleteSpace F]
(h : HasFPowerSeriesOnBall f p x r)


/-- **De Moivre's formula** -/
theorem cos_add_sin_mul_I_pow (n : ℕ) (z : ℂ) :
    (cos z + sin z * I) ^ n = cos (↑n * z) + sin (↑n * z) * I

(Complex.cos z + Complex.sin z * Complex.I) ^ n = Complex.cos (↑n * z) + Complex.sin (↑n * z) * Complex.I


/-- The canonical bijection with the sigma type, showing that `WType` is a fixed point of
  the polynomial functor `X ↦ Σ a : α, β a → X`. -/
@[simps]
def equivSigma : WType β ≃ Σa : α, β a → WType β

∀ (a : (a : α) × (β a → WType β)), (WType.equivSigma β).symm a = WType.ofSigma a


@[simp]
theorem upperClosure_iUnion (f : ι → Set α) : upperClosure (⋃ i, f i) = ⨅ i, upperClosure (f i)

{α : Type u_1}
{ι : Sort u_4}
[Preorder α]
(f : ι → Set α)


lemma shiftFunctorZero_hom_app_f (K : CochainComplex C ℤ) (n : ℤ) :
    ((CategoryTheory.shiftFunctorZero (CochainComplex C ℤ) ℤ).hom.app K).f n =
      (K.XIsoOfEq (by dsimp; rw [add_zero])).hom

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

((CategoryTheory.shiftFunctorZero (CochainComplex C ℤ) ℤ).hom.app K).f n = (HomologicalComplex.XIsoOfEq K ⋯).hom


theorem add_left_cancel [IsLeftCancelAdd α] (ha : a ≠ ⊤) (h : a + b = a + c) : b = c

{α : Type u}
[Add α]
{a b c : WithTop α}
[IsLeftCancelAdd α]
(ha : a ≠ ⊤)
(h : a + b = a + c)


theorem comp_apply (x : M₁) : f.comp g x = f (g x)

{R₁ : Type u_2}
{R₂ : Type u_3}
{R₃ : Type u_4}
{M₁ : Type u_10}
{M₂ : Type u_11}
{M₃ : Type u_12}
[Semiring R₁]
[Semiring R₂]
[Semiring R₃]
[AddCommMonoid M₁]
[AddCommMonoid M₂]
[AddCommMonoid M₃]
{module_M₁ : Module R₁ M₁}
{module_M₂ : Module R₂ M₂}
{module_M₃ : Module R₃ M₃}
{σ₁₂ : R₁ →+* R₂}
{σ₂₃ : R₂ →+* R₃}
{σ₁₃ : R₁ →+* R₃}
[RingHomCompTriple σ₁₂ σ₂₃ σ₁₃]
(f : M₂ →ₛₗ[σ₂₃] M₃)
(g : M₁ →ₛₗ[σ₁₂] M₂)
(x : M₁)


theorem Antiperiodic.add_nsmul_eq [AddMonoid α] [AddGroup β] (h : Antiperiodic f c) (n : ℕ) :
    f (x + n • c) = (-1) ^ n • f x

{α : Type u_1}
{β : Type u_2}
{f : α → β}
{c x : α}
[AddMonoid α]
[AddGroup β]
(h : Function.Antiperiodic f c)
(n : ℕ)


@[to_additive]
theorem lintegral_eq_tsum_of_ac (h : IsFundamentalDomain G s μ) (hν : ν ≪ μ) (f : α → ℝ≥0∞) :
    ∫⁻ x, f x ∂ν = ∑' g : G, ∫⁻ x in g • s, f x ∂ν

[MeasureTheory.SMulInvariantMeasure G α μ]

(h : MeasureTheory.IsFundamentalDomain G s μ)

(hν : ν ≪ μ)

(f : α → ℝ≥0∞)

∫⁻ (x : α), f x ∂ν = ∑' (g : G), ∫⁻ (x : α) in g • s, f x ∂ν


theorem admissible_of_one_lt_sumInv_aux :
    ∀ {pqr : List ℕ+} (_ : pqr.Sorted (· ≤ ·)) (_ : pqr.length = 3) (_ : 1 < sumInv pqr),
      Admissible pqr

List.Sorted (fun x x_1 => x ≤ x_1) pqr → pqr.length = 3 → 1 < ADEInequality.sumInv ↑pqr → ADEInequality.Admissible ↑pqr


theorem eq_true_of_and_eq_true_right {a b : Prop} (h : (a ∧ b) = True) : b = True


@[simp]
theorem biproduct.components_matrix (m : ⨁ f ⟶ ⨁ g) :
    (biproduct.matrix fun j k => biproduct.components m j k) = m

(CategoryTheory.Limits.biproduct.matrix fun j k => CategoryTheory.Limits.biproduct.components m j k) = m


theorem mul_left_eq_self₀ : a * b = b ↔ a = 1 ∨ b = 0

{M₀ : Type u_2}
[CancelMonoidWithZero M₀]
{a b : M₀}


@[simp] theorem append_cancel_left_eq (as bs cs : List α) : (as ++ bs = as ++ cs) = (bs = cs)


theorem liftAux_spec (f : X → L) (a b : lib R X) (h : FreeLieAlgebra.Rel R X a b) :
    liftAux R f a = liftAux R f b

(R : Type u)
{X : Type v}
[CommRing R]
{L : Type w}
[LieRing L]
[LieAlgebra R L]
(f : X → L)
(a b : lib R X)
(h : FreeLieAlgebra.Rel R X a b)

(FreeLieAlgebra.liftAux R f) a = (FreeLieAlgebra.liftAux R f) b


theorem iteratedFDeriv_sum {ι : Type*} {f : ι → E → F} {u : Finset ι} {i : ℕ}
    (h : ∀ j ∈ u, ContDiff 𝕜 i (f j)) :
    iteratedFDeriv 𝕜 i (∑ j ∈ u, f j ·) = ∑ j ∈ u, iteratedFDeriv 𝕜 i (f j)

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type uE}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{F : Type uF}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{ι : Type u_3}
{f : ι → E → F}
{u : Finset ι}
{i : ℕ}
(h : ∀ j ∈ u, ContDiff 𝕜 (↑i) (f j))

(iteratedFDeriv 𝕜 i fun x => ∑ j ∈ u, f j x) = ∑ j ∈ u, iteratedFDeriv 𝕜 i (f j)


@[simp]
lemma δ_inl :
    δ (-1) 0 (inl φ) = Cochain.ofHom (φ ≫ inr φ)

CochainComplex.HomComplex.δ (-1) 0 (CochainComplex.mappingCone.inl φ) =
  CochainComplex.HomComplex.Cochain.ofHom (φ ≫ CochainComplex.mappingCone.inr φ)


@[simp]
theorem coe_single (i : ι) (s : Set X) : ⇑(BumpCovering.single i s) = Pi.single i 1

{ι : Type u}
{X : Type v}
[TopologicalSpace X]
(i : ι)
(s : Set X)


@[simp]
theorem BoundedLatticeHom.asBoolRing_comp (g : BoundedLatticeHom β γ) (f : BoundedLatticeHom α β) :
    (g.comp f).asBoolRing = g.asBoolRing.comp f.asBoolRing

{α : Type u_1}
{β : Type u_2}
{γ : Type u_3}
[BooleanAlgebra α]
[BooleanAlgebra β]
[BooleanAlgebra γ]
(g : BoundedLatticeHom β γ)
(f : BoundedLatticeHom α β)


@[to_additive (attr := simp)]
theorem clift_mk :
    clift (mk : FreeMonoid (M ⊕ N) →* M ∗ N) (map_one inl) (map_one inr) (map_mul inl)
      (map_mul inr) = .id _

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

Monoid.Coprod.clift Monoid.Coprod.mk ⋯ ⋯ ⋯ ⋯ = MonoidHom.id (Monoid.Coprod M N)


theorem lift_map_single (F : C ⥤ D) {X Y : C} (f : X ⟶ Y) (r : R) :
    (lift R F).map (single f r) = r • F.map f

(R : Type u_1)
[CommRing R]
{C : Type u}
[CategoryTheory.Category.{v, u} C]
{D : Type u}
[CategoryTheory.Category.{v, u} D]
[CategoryTheory.Preadditive D]
[CategoryTheory.Linear R D]
(F : C ⥤ D)
{X Y : C}
(f : X ⟶ Y)
(r : R)

(CategoryTheory.Free.lift R F).map (Finsupp.single f r) = r • F.map f


@[simp, norm_cast]
theorem coe_imI : (x : ℍ[R]).imI = 0


@[simp]
theorem enumFrom_eq_nil {n : ℕ} {l : List α} : List.enumFrom n l = [] ↔ l = []


@[to_additive (attr := measurability)]
theorem measurable_mabs : Measurable (mabs : α → α)

{α : Type u_1}
[Lattice α]
[AddGroup α]
[MeasurableSpace α]
[MeasurableNeg α]
[MeasurableSup₂ α]


@[simp, norm_cast]
theorem coe_fst [Module R₁ M₂] : ↑(fst R₁ M₁ M₂) = LinearMap.fst R₁ M₁ M₂

{R₁ : Type u_1}
[Semiring R₁]
{M₁ : Type u_4}
[TopologicalSpace M₁]
[AddCommMonoid M₁]
{M₂ : Type u_6}
[TopologicalSpace M₂]
[AddCommMonoid M₂]
[Module R₁ M₁]
[Module R₁ M₂]

↑(ContinuousLinearMap.fst R₁ M₁ M₂) = LinearMap.fst R₁ M₁ M₂


/-- The clifford algebra over `CliffordAlgebraQuaternion.Q c₁ c₂` is isomorphic as an `R`-algebra
to `ℍ[R,c₁,c₂]`. -/
@[simps!]
protected def equiv : CliffordAlgebra (Q c₁ c₂) ≃ₐ[R] ℍ[R,c₁,c₂]

{R : Type u_1}
[CommRing R]
{c₁ c₂ : R}
(a : QuaternionAlgebra R c₁ c₂)

CliffordAlgebraQuaternion.equiv.symm a = CliffordAlgebraQuaternion.ofQuaternion a


/-- The algebra isomorphism between multivariable polynomials in `Option S₁` and
polynomials with coefficients in `MvPolynomial S₁ R`.
-/
@[simps!]
def optionEquivLeft : MvPolynomial (Option S₁) R ≃ₐ[R] Polynomial (MvPolynomial S₁ R)

(R : Type u)
(S₁ : Type v)
[CommSemiring R]
(a : MvPolynomial (Option S₁) R)

(MvPolynomial.optionEquivLeft R S₁) a =
  (MvPolynomial.aeval fun o => o.elim Polynomial.X fun s => Polynomial.C (MvPolynomial.X s)) a


theorem inj_on_of_surj_on_of_ncard_le {t : Set β} (f : ∀ a ∈ s, β) (hf : ∀ a ha, f a ha ∈ t)
    (hsurj : ∀ b ∈ t, ∃ a ha, f a ha = b) (hst : s.ncard ≤ t.ncard) ⦃a₁⦄ (ha₁ : a₁ ∈ s) ⦃a₂⦄
    (ha₂ : a₂ ∈ s) (ha₁a₂ : f a₁ ha₁ = f a₂ ha₂) (hs : s.Finite := by toFinite_tac) :
    a₁ = a₂

(hf : ∀ (a : α) (ha : a ∈ s), f a ha ∈ t)

(hsurj : ∀ b ∈ t, ∃ a, ∃ (ha : a ∈ s), f a ha = b)


@[simp]
theorem filter_True {h} (s : Finset α) : @filter _ (fun _ => True) h s = s

{α : Type u_1}
{h : DecidablePred fun x => True}
(s : Finset α)


/-- `TrivSqZeroExt.snd` as a continuous linear map. -/
@[simps]
def sndCLM [CommSemiring R] [AddCommMonoid M] [Module R M] : tsze R M →L[R] M

(R : Type u_3)
(M : Type u_4)
[TopologicalSpace R]
[TopologicalSpace M]
[CommSemiring R]
[AddCommMonoid M]
[Module R M]
(x : tsze R M)


@[simp]
theorem smul_finset_subset_smul_finset_iff₀ (ha : a ≠ 0) : a • s ⊆ a • t ↔ s ⊆ t

{α : Type u_2}
{β : Type u_3}
[DecidableEq β]
[GroupWithZero α]
[MulAction α β]
{s t : Finset β}
{a : α}
(ha : a ≠ 0)


@[to_additive]
theorem StrictAnti.inv (hf : StrictAnti f) : StrictMono fun x => (f x)⁻¹

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


/-- The identity lax braided monoidal functor. -/
@[simps!]
def id : LaxBraidedFunctor C C

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

(CategoryTheory.LaxBraidedFunctor.id C).obj X = X


lemma IsMatching.sup (hM : M.IsMatching) (hM' : M'.IsMatching)
    (hd : Disjoint M.support M'.support) : (M ⊔ M').IsMatching

{V : Type u_1}
{G : SimpleGraph V}
{M M' : G.Subgraph}
(hM : M.IsMatching)
(hM' : M'.IsMatching)
(hd : Disjoint M.support M'.support)


theorem mem_invariants_iff_comm {X Y : Rep k G} (f : X.V →ₗ[k] Y.V) (g : G) :
    (linHom X.ρ Y.ρ) g f = f ↔ f.comp (X.ρ g) = (Y.ρ g).comp f

{k : Type u}
[CommRing k]
{G : Grp}
{X Y : Rep k ↑G}
(f : ↑X.V →ₗ[k] ↑Y.V)
(g : ↑G)

((X.ρ.linHom Y.ρ) g) f = f ↔ f ∘ₗ X.ρ g = Y.ρ g ∘ₗ f


@[simp]
theorem mk'_eq_bot {l u : ι → ℝ} : mk' l u = ⊥ ↔ ∃ i, u i ≤ l i

BoxIntegral.Box.mk' l u = ⊥ ↔ ∃ i, u i ≤ l i


/-- A binary injective function is injective when only the left argument varies. -/
protected theorem left (hf : Injective2 f) (b : β) : Function.Injective fun a ↦ f a b

{α : Sort u_1}
{β : Sort u_2}
{γ : Sort u_3}
{f : α → β → γ}
(hf : Function.Injective2 f)
(b : β)


theorem Kernel.integral_integral_sub' ⦃f g : β × γ → E⦄ (hf : Integrable f ((κ ⊗ₖ η) a))
    (hg : Integrable g ((κ ⊗ₖ η) a)) :
    ∫ x, ∫ y, (f - g) (x, y) ∂η (a, x) ∂κ a =
      ∫ x, ∫ y, f (x, y) ∂η (a, x) ∂κ a - ∫ x, ∫ y, g (x, y) ∂η (a, x) ∂κ a

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

⦃f g : β × γ → E⦄

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

(hg : MeasureTheory.Integrable g ((κ ⊗ₖ η) a))

∫ (x : β), ∫ (y : γ), (f - g) (x, y) ∂η (a, x) ∂κ a =
  ∫ (x : β), ∫ (y : γ), f (x, y) ∂η (a, x) ∂κ a - ∫ (x : β), ∫ (y : γ), g (x, y) ∂η (a, x) ∂κ a


lemma univ_map_subtype [Fintype α] (p : α → Prop) [DecidablePred p] [Fintype {a // p a}] :
    univ.map (Function.Embedding.subtype p) = univ.filter p

{α : Type u_1}
[Fintype α]
(p : α → Prop)
[DecidablePred p]
[Fintype { a // p a }]

Finset.map (Function.Embedding.subtype p) Finset.univ = Finset.filter p Finset.univ


/-- Another alternative statement of Weierstrass's theorem,
for those who like epsilons, but not bundled continuous functions.

Every real-valued function `ℝ → ℝ` which is continuous on `[a,b]`
can be approximated to within any `ε > 0` on `[a,b]` by some polynomial.
-/
theorem exists_polynomial_near_of_continuousOn (a b : ℝ) (f : ℝ → ℝ)
    (c : ContinuousOn f (Set.Icc a b)) (ε : ℝ) (pos : 0 < ε) :
    ∃ p : ℝ[X], ∀ x ∈ Set.Icc a b, |p.eval x - f x| < ε

∃ p, ∀ x ∈ Set.Icc a b, |Polynomial.eval x p - f x| < ε


@[to_additive]
theorem dist_mulIndicator (s t : Set α) (f : α → E) (x : α) :
    dist (s.mulIndicator f x) (t.mulIndicator f x) = ‖(s ∆ t).mulIndicator f x‖

{α : Type u_3}
{E : Type u_6}
[SeminormedAddGroup E]
(s t : Set α)
(f : α → E)
(x : α)

dist (s.indicator f x) (t.indicator f x) = ‖(symmDiff s t).indicator f x‖


theorem CauchySeq.comp_injective [SemilatticeSup β] [NoMaxOrder β] [Nonempty β] {u : ℕ → α}
    (hu : CauchySeq u) {f : β → ℕ} (hf : Injective f) : CauchySeq (u ∘ f)

{α : Type u}
{β : Type v}
[uniformSpace : UniformSpace α]
[SemilatticeSup β]
[NoMaxOrder β]
[Nonempty β]
{u : ℕ → α}
(hu : CauchySeq u)
{f : β → ℕ}
(hf : Function.Injective f)


@[reassoc, simp]
theorem braiding_tensorUnit_left (X : C) : (β_ (𝟙_ C) X).hom = (λ_ X).hom ≫ (ρ_ X).inv


/-- Canonical isomorphism between polynomials and the subalgebra generated by
  algebraically independent elements. -/
@[simps!]
def AlgebraicIndependent.aevalEquiv (hx : AlgebraicIndependent R x) :
    MvPolynomial ι R ≃ₐ[R] Algebra.adjoin R (range x)

{ι : Type u_1}
{R : Type u_3}
{A : Type u_5}
{x : ι → A}
[CommRing R]
[CommRing A]
[Algebra R A]
(hx : AlgebraicIndependent R x)
(a : MvPolynomial ι R)

↑(hx.aevalEquiv a) = (MvPolynomial.aeval x) a


theorem sinh_log {x : ℝ} (hx : 0 < x) : sinh (log x) = (x - x⁻¹) / 2


theorem rat_div (h : Irrational x) {q : ℚ} (hq : q ≠ 0) : Irrational (q / x)

{x : ℝ}
(h : Irrational x)
{q : ℚ}
(hq : q ≠ 0)


theorem coe_mk (e h₁) : ⇑(⟨e, h₁⟩ : A ≃⋆+* B) = e

(h₁ : ∀ (a : A), e.toFun (star a) = star (e.toFun a))

⇑{ toRingEquiv := e, map_star' := h₁ } = ⇑e


theorem Indep.basis_iff_forall_insert_dep (hI : M.Indep I) (hIX : I ⊆ X) :
    M.Basis I X ↔ ∀ e ∈ X \ I, M.Dep (insert e I)

{α : Type u_1}
{M : Matroid α}
{I X : Set α}
(hI : M.Indep I)
(hIX : I ⊆ X)


/-- If the p-adic valuation of a finite set of positive rationals is greater than a given rational
number, then the p-adic valuation of their sum is also greater than the same rational number. -/
theorem lt_sum_of_lt {p j : ℕ} [hp : Fact (Nat.Prime p)] {F : ℕ → ℚ} {S : Finset ℕ}
    (hS : S.Nonempty) (hF : ∀ i, i ∈ S → padicValRat p (F j) < padicValRat p (F i))
    (hn1 : ∀ i : ℕ, 0 < F i) : padicValRat p (F j) < padicValRat p (∑ i ∈ S, F i)

(hF : ∀ i ∈ S, padicValRat p (F j) < padicValRat p (F i))


@[simp]
theorem insert_symm_apply_inr {α} {s : Set.{u} α} [DecidablePred (· ∈ s)] {a : α} (H : a ∉ s)
    (b : PUnit.{u + 1}) : (Equiv.Set.insert H).symm (Sum.inr b) = ⟨a, Or.inl rfl⟩

{α : Type u}
{s : Set α}
[DecidablePred fun x => x ∈ s]
{a : α}
(H : a ∉ s)
(b : PUnit.{u + 1})

(Equiv.Set.insert H).symm (Sum.inr b) = ⟨a, ⋯⟩


protected theorem iterate {f : α → α} (hf : RightOrdContinuous f) (n : ℕ) :
    RightOrdContinuous f^[n]

{α : Type u}
[Preorder α]
{f : α → α}
(hf : RightOrdContinuous f)
(n : ℕ)


/-- Left-whiskering in the bicategory `BasedCategory` is given by whiskering the underlying functors
and natural transformations. -/
@[simps]
def whiskerLeft {𝒵 : BasedCategory.{v₄, u₄} 𝒮} (F : 𝒳 ⥤ᵇ 𝒴) {G H : 𝒴 ⥤ᵇ 𝒵} (α : G ⟶ H) :
    F ⋙ G ⟶ F ⋙ H

{𝒮 : Type u₁}
[CategoryTheory.Category.{v₁, u₁} 𝒮]
{𝒳 : CategoryTheory.BasedCategory 𝒮}
{𝒴 : CategoryTheory.BasedCategory 𝒮}
{𝒵 : CategoryTheory.BasedCategory 𝒮}
(F : CategoryTheory.BasedFunctor 𝒳 𝒴)
{G H : CategoryTheory.BasedFunctor 𝒴 𝒵}
(α : G ⟶ H)

(CategoryTheory.BasedCategory.whiskerLeft F α).toNatTrans = CategoryTheory.whiskerLeft F.toFunctor α.toNatTrans


/-- To prove something for an `Lp` function a.e. strongly measurable with respect to a
sub-σ-algebra `m` in a normed space, it suffices to show that
* the property holds for (multiples of) characteristic functions which are measurable w.r.t. `m`;
* is closed under addition;
* the set of functions in `Lp` strongly measurable w.r.t. `m` for which the property holds is
  closed.
-/
@[elab_as_elim]
theorem Lp.induction_stronglyMeasurable (hm : m ≤ m0) (hp_ne_top : p ≠ ∞) (P : Lp F p μ → Prop)
    (h_ind : ∀ (c : F) {s : Set α} (hs : MeasurableSet[m] s) (hμs : μ s < ∞),
      P (Lp.simpleFunc.indicatorConst p (hm s hs) hμs.ne c))
    (h_add : ∀ ⦃f g⦄, ∀ hf : Memℒp f p μ, ∀ hg : Memℒp g p μ, StronglyMeasurable[m] f →
      StronglyMeasurable[m] g → Disjoint (Function.support f) (Function.support g) →
        P (hf.toLp f) → P (hg.toLp g) → P (hf.toLp f + hg.toLp g))
    (h_closed : IsClosed {f : lpMeas F ℝ m p μ | P f}) :
    ∀ f : Lp F p μ, AEStronglyMeasurable' m f μ → P f

(h_ind :
  ∀ (c : F) {s : Set α} (hs : MeasurableSet s) (hμs : μ s < ⊤), P ↑(MeasureTheory.Lp.simpleFunc.indicatorConst p ⋯ ⋯ c))

(h_add :
  ∀ ⦃f g : α → F⦄ (hf : MeasureTheory.Memℒp f p μ) (hg : MeasureTheory.Memℒp g p μ),
    MeasureTheory.StronglyMeasurable f →
      MeasureTheory.StronglyMeasurable g →
        Disjoint (Function.support f) (Function.support g) →
          P (MeasureTheory.Memℒp.toLp f hf) →
            P (MeasureTheory.Memℒp.toLp g hg) → P (MeasureTheory.Memℒp.toLp f hf + MeasureTheory.Memℒp.toLp g hg))

MeasureTheory.AEStronglyMeasurable' m (↑↑f) μ → P f


/-- The functor `G ↦ MonoidAlgebra k G`, from the category of magmas to the category of non-unital,
non-associative algebras over `k` is adjoint to the forgetful functor in the other direction. -/
@[simps apply_apply symm_apply]
def liftMagma [Module k A] [IsScalarTower k A A] [SMulCommClass k A A] :
    (G →ₙ* A) ≃ (MonoidAlgebra k G →ₙₐ[k] A)

(k : Type u₁)
{G : Type u₂}
[Semiring k]
[Mul G]
{A : Type u₃}
[NonUnitalNonAssocSemiring A]
[Module k A]
[IsScalarTower k A A]
[SMulCommClass k A A]
(f : G →ₙ* A)
(a : MonoidAlgebra k G)

((MonoidAlgebra.liftMagma k) f) a = Finsupp.sum a fun m t => t • f m


theorem Spec.toPresheafedSpace_obj_op (R : CommRingCat.{u}) :
    Spec.toPresheafedSpace.obj (op R) = (Spec.sheafedSpaceObj R).toPresheafedSpace

AlgebraicGeometry.Spec.toPresheafedSpace.obj (Opposite.op R) =
  (AlgebraicGeometry.Spec.sheafedSpaceObj R).toPresheafedSpace


@[simp]
theorem rotate_eq_singleton_iff {l : List α} {n : ℕ} {x : α} : l.rotate n = [x] ↔ l = [x]

{α : Type u}
{l : List α}
{n : ℕ}
{x : α}


theorem mk_covBy_mk_iff_right : (a, b₁) ⋖ (a, b₂) ↔ b₁ ⋖ b₂

{α : Type u_1}
{β : Type u_2}
[PartialOrder α]
[PartialOrder β]
{a : α}
{b₁ b₂ : β}