/--
To show `P` is a sheaf for the binding of `U` with `B`, it suffices to show that `P` is a sheaf for
`U`, that `P` is a sheaf for each sieve in `B`, and that it is separated for any pullback of any
sieve in `B`.

This is mostly an auxiliary lemma to show `isSheafFor_trans`.
Adapted from [Elephant], Lemma C2.1.7(i) with suggestions as mentioned in
https://math.stackexchange.com/a/358709/
-/
theorem isSheafFor_bind (P : Cᵒᵖ ⥤ Type v) (U : Sieve X) (B : ∀ ⦃Y⦄ ⦃f : Y ⟶ X⦄, U f → Sieve Y)
    (hU : Presieve.IsSheafFor P (U : Presieve X))
    (hB : ∀ ⦃Y⦄ ⦃f : Y ⟶ X⦄ (hf : U f), Presieve.IsSheafFor P (B hf : Presieve Y))
    (hB' : ∀ ⦃Y⦄ ⦃f : Y ⟶ X⦄ (h : U f) ⦃Z⦄ (g : Z ⟶ Y),
      Presieve.IsSeparatedFor P (((B h).pullback g) : Presieve Z)) :
    Presieve.IsSheafFor P (Sieve.bind (U : Presieve X) B : Presieve X)

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

(B : ⦃Y : C⦄ → ⦃f : Y ⟶ X⦄ → U.arrows f → CategoryTheory.Sieve Y)

(hU : CategoryTheory.Presieve.IsSheafFor P U.arrows)

(hB : ∀ ⦃Y : C⦄ ⦃f : Y ⟶ X⦄ (hf : U.arrows f), CategoryTheory.Presieve.IsSheafFor P (B hf).arrows)

(hB' :
  ∀ ⦃Y : C⦄ ⦃f : Y ⟶ X⦄ (h : U.arrows f) ⦃Z : C⦄ (g : Z ⟶ Y),
    CategoryTheory.Presieve.IsSeparatedFor P (CategoryTheory.Sieve.pullback g (B h)).arrows)

CategoryTheory.Presieve.IsSheafFor P (CategoryTheory.Sieve.bind U.arrows B).arrows


@[ext]
lemma ext' {F G : LaxBraidedFunctor C D} {α β : F ⟶ G} (w : ∀ X : C, α.app X = β.app X) : α = β

{F G : CategoryTheory.LaxBraidedFunctor C D}


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

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


/-- A partial diffeomorphism on `s` is a function `f : M → N` such that `f` restricts to a
diffeomorphism `s → t` between open subsets of `M` and `N`, respectively.
This is an auxiliary definition and should not be used outside of this file. -/
structure PartialDiffeomorph extends PartialEquiv M N where
  open_source : IsOpen source
  open_target : IsOpen target
  contMDiffOn_toFun : ContMDiffOn I J n toFun source
  contMDiffOn_invFun : ContMDiffOn J I n invFun target

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


theorem wrepr_equiv {α : TypeVec n} (x : q.P.W α) : WEquiv (wrepr x) x

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


@[simp] theorem min_none_some [Min α] {b : α} : min none (some b) = some b


/-- The obvious free sheaf of modules of rank `1`. -/
@[simps]
def unit : SheafOfModules R

{J : CategoryTheory.GrothendieckTopology C}

[J.HasSheafCompose (CategoryTheory.forget₂ RingCat AddCommGrp)]

(SheafOfModules.unit R).val = PresheafOfModules.unit R.val


∀ {α α_1 : Type u_1} {f : α → α_1}, f <$> none = none


/-- If `s` is closed, being locally integrable on `s` wrt `μ` is equivalent to being locally
integrable with respect to `μ.restrict s`. For the one-way implication without assuming `s` closed,
see `locallyIntegrableOn_of_locallyIntegrable_restrict`. -/
theorem locallyIntegrableOn_iff_locallyIntegrable_restrict [OpensMeasurableSpace X]
    (hs : IsClosed s) : LocallyIntegrableOn f s μ ↔ LocallyIntegrable f (μ.restrict s)

{X : Type u_1}
{E : Type u_3}
[MeasurableSpace X]
[TopologicalSpace X]
[NormedAddCommGroup E]
{f : X → E}
{μ : MeasureTheory.Measure X}
{s : Set X}
[OpensMeasurableSpace X]
(hs : IsClosed s)

MeasureTheory.LocallyIntegrableOn f s μ ↔ MeasureTheory.LocallyIntegrable f (μ.restrict s)


theorem nhds_bot_basis_Iic [TopologicalSpace α] [LinearOrder α] [OrderBot α] [OrderTopology α]
    [Nontrivial α] [DenselyOrdered α] : (𝓝 ⊥).HasBasis (fun a : α => ⊥ < a) Iic

{α : Type u}
[TopologicalSpace α]
[LinearOrder α]
[OrderBot α]
[OrderTopology α]
[Nontrivial α]
[DenselyOrdered α]


theorem coeffIntegerNormalization_of_not_mem_support (p : S[X]) (i : ℕ) (h : coeff p i = 0) :
    coeffIntegerNormalization M p i = 0

{R : Type u_1}
[CommRing R]
(M : Submonoid R)
{S : Type u_2}
[CommRing S]
[Algebra R S]
[IsLocalization M S]
(p : S[X])
(i : ℕ)
(h : p.coeff i = 0)

IsLocalization.coeffIntegerNormalization M p i = 0


@[simp] theorem mem_range {x : α} : x ∈ range f ↔ ∃ y, f y = x

{α : Type u}
{ι : Sort u_1}
{f : ι → α}
{x : α}


theorem le_toDual_iff {a : WithBot αᵒᵈ} {b : WithTop α} :
    a ≤ WithTop.toDual b ↔ b ≤ WithBot.ofDual a

{α : Type u_1}
[LE α]
{a : WithBot αᵒᵈ}
{b : WithTop α}


theorem DvdNotUnit.isUnit_of_irreducible_right [CommMonoidWithZero α] {p q : α}
    (h : DvdNotUnit p q) (hq : Irreducible q) : IsUnit p

{α : Type u_1}
[CommMonoidWithZero α]
{p q : α}
(h : DvdNotUnit p q)
(hq : Irreducible q)


lemma IsEquipartition.card_interedges_sparsePairs_le' (hP : P.IsEquipartition)
    (hε : 0 ≤ ε) :
    ((P.sparsePairs G ε).biUnion fun (U, V) ↦ G.interedges U V).card ≤
      ε * (A.card + P.parts.card) ^ 2

{α : Type u_1}
{𝕜 : Type u_2}
[LinearOrderedField 𝕜]
[DecidableEq α]
{A : Finset α}
{P : Finpartition A}
{G : SimpleGraph α}
[DecidableRel G.Adj]
{ε : 𝕜}
(hP : P.IsEquipartition)
(hε : 0 ≤ ε)

↑((P.sparsePairs G ε).biUnion fun x =>
        match x with
        | (U, V) => G.interedges U V).card ≤
  ε * (↑A.card + ↑P.parts.card) ^ 2


theorem Gamma_is_cong_sub (N : ℕ+) : IsCongruenceSubgroup (Gamma N)


lemma MonovaryOn.div_right₀ (hg₁ : ∀ i ∈ s, 0 ≤ g₁ i) (hg₂ : ∀ i ∈ s, 0 < g₂ i)
    (h₁ : MonovaryOn f g₁ s) (h₂ : AntivaryOn f g₂ s) : MonovaryOn f (g₁ / g₂) s

{ι : Type u_1}
{α : Type u_2}
{β : Type u_3}
[LinearOrderedSemifield α]
[LinearOrderedSemifield β]
{s : Set ι}
{f : ι → α}
{g₁ g₂ : ι → β}
(hg₁ : ∀ i ∈ s, 0 ≤ g₁ i)
(hg₂ : ∀ i ∈ s, 0 < g₂ i)
(h₁ : MonovaryOn f g₁ s)
(h₂ : AntivaryOn f g₂ s)


/-- Given `Finite α`, `equivFunOnFinite` is the `Equiv` between `α →₀ β` and `α → β`.
  (All functions on a finite type are finitely supported.) -/
@[simps]
def equivFunOnFinite [Finite α] : (α →₀ M) ≃ (α → M)

{α : Type u_1}
{M : Type u_5}
[Zero M]
[Finite α]
(f : α → M)

(Finsupp.equivFunOnFinite.symm f).support = ⋯.toFinset


theorem hasPullback_assoc_symm [HasPullback f₁ (g₃ ≫ f₂)] : HasPullback (g₂ ≫ f₃) f₄

[CategoryTheory.Limits.HasPullback f₁ (CategoryTheory.Limits.pullback.fst f₃ f₄ ≫ f₂)]

CategoryTheory.Limits.HasPullback (CategoryTheory.Limits.pullback.snd f₁ f₂ ≫ f₃) f₄


/-- Integrability in the change of variable formula for differentiable functions: if a
function `f` is injective and differentiable on a measurable set `s`, then a function
`g : E → F` is integrable on `f '' s` if and only if `|(f' x).det| • g ∘ f` is
integrable on `s`. -/
theorem integrableOn_image_iff_integrableOn_abs_det_fderiv_smul (hs : MeasurableSet s)
    (hf' : ∀ x ∈ s, HasFDerivWithinAt f (f' x) s x) (hf : InjOn f s) (g : E → F) :
    IntegrableOn g (f '' s) μ ↔ IntegrableOn (fun x => |(f' x).det| • g (f x)) s μ

MeasureTheory.IntegrableOn g (f '' s) μ ↔ MeasureTheory.IntegrableOn (fun x => |(f' x).det| • g (f x)) s μ


/-- The difference between two points (reversed) lies in their `vectorSpan`. -/
theorem vsub_rev_mem_vectorSpan_pair (p₁ p₂ : P) : p₂ -ᵥ p₁ ∈ vectorSpan k ({p₁, p₂} : Set P)

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


@[to_additive]
lemma isOpenMap_div_right (a : G) : IsOpenMap (· / a)

{G : Type w}
[AddGroup G]
[TopologicalSpace G]
[TopologicalAddGroup G]
(a : G)


/-- The function `expNegInvGlue` is smooth. -/
protected theorem contDiff {n} : ContDiff ℝ n expNegInvGlue


{𝕜 : Type u_1}
{V : Type u_2}
{V₂ : Type u_5}
{P : Type u_10}
{P₂ : Type u_11}
[NormedField 𝕜]
[SeminormedAddCommGroup V]
[NormedSpace 𝕜 V]
[PseudoMetricSpace P]
[NormedAddTorsor V P]
[SeminormedAddCommGroup V₂]
[NormedSpace 𝕜 V₂]
[PseudoMetricSpace P₂]
[NormedAddTorsor V₂ P₂]
(f : P →ᵃⁱ[𝕜] P₂)


/-- For integrally closed domains, the minimal polynomial over the ring is the same as the minimal
polynomial over the fraction field. See `minpoly.isIntegrallyClosed_eq_field_fractions'` if
`S` is already a `K`-algebra. -/
theorem isIntegrallyClosed_eq_field_fractions [IsDomain S] {s : S} (hs : IsIntegral R s) :
    minpoly K (algebraMap S L s) = (minpoly R s).map (algebraMap R K)

{R : Type u_1}
{S : Type u_2}
[CommRing R]
[CommRing S]
[IsDomain R]
[Algebra R S]
(K : Type u_3)
(L : Type u_4)
[Field K]
[Algebra R K]
[IsFractionRing R K]
[CommRing L]
[Nontrivial L]
[Algebra R L]
[Algebra S L]
[Algebra K L]
[IsScalarTower R K L]
[IsScalarTower R S L]
[IsIntegrallyClosed R]
[IsDomain S]
{s : S}
(hs : IsIntegral R s)

minpoly K ((algebraMap S L) s) = Polynomial.map (algebraMap R K) (minpoly R s)


theorem infiniteNeg_mul_infinitePos {x y : ℝ*} :
    InfiniteNeg x → InfinitePos y → InfiniteNeg (x * y)

x.InfiniteNeg → y.InfinitePos → (x * y).InfiniteNeg


/-- In a topological semiring, the right-multiplication `AddMonoidHom` is continuous. -/
theorem mulRight_continuous (x : α) : Continuous (AddMonoidHom.mulRight x)

{α : Type u_1}
[TopologicalSpace α]
[NonUnitalNonAssocRing α]
[TopologicalRing α]
(x : α)


@[simp]
theorem seq_some {α β} {a : α} {f : α → β} : some f <*> some a = some (f a)

(Seq.seq (some f) fun x => some a) = some (f a)


theorem fderivWithin_const_sub (hxs : UniqueDiffWithinAt 𝕜 s x) (c : F) :
    fderivWithin 𝕜 (fun y => c - f y) s x = -fderivWithin 𝕜 f 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}
(hxs : UniqueDiffWithinAt 𝕜 s x)
(c : F)


@[simp]
theorem nodup_singleton : ∀ a : α, Nodup ({a} : Multiset α)


lemma ε_add (p q : I) : c.ε (p + q) = c.ε p * c.ε q

{I : Type u_4}
[AddMonoid I]
(c : ComplexShape I)
[c.TensorSigns]
(p q : I)


@[simp, norm_cast] lemma cast_le : (p : K) ≤ q ↔ p ≤ q

{K : Type u_5}
[LinearOrderedSemifield K]
{p q : ℚ≥0}

↑p ≤ ↑q ↔ p ≤ q


@[simp]
lemma fromRows_mulVec (A₁ : Matrix m₁ n R) (A₂ : Matrix m₂ n R) (v : n → R) :
    fromRows A₁ A₂ *ᵥ v = Sum.elim (A₁ *ᵥ v) (A₂ *ᵥ v)

{R : Type u_1}
{m₁ : Type u_3}
{m₂ : Type u_4}
{n : Type u_5}
[Fintype n]
[Semiring R]
(A₁ : Matrix m₁ n R)
(A₂ : Matrix m₂ n R)
(v : n → R)

(A₁.fromRows A₂).mulVec v = Sum.elim (A₁.mulVec v) (A₂.mulVec v)


@[simp]
theorem intCast_def [IntCast M] (n : ℤ) : ((fun _ ↦ n : α → M) : Germ l M) = n

{α : Type u_1}
{l : Filter α}
{M : Type u_5}
[IntCast M]
(n : ℤ)


@[simp]
theorem equiv_add : WithLp.equiv p V (x + y) = WithLp.equiv p V x + WithLp.equiv p V y

(p : ℝ≥0∞)
{V : Type uV}
[AddCommGroup V]
(x y : WithLp p V)

(WithLp.equiv p V) (x + y) = (WithLp.equiv p V) x + (WithLp.equiv p V) y


lemma W_adj_unit_app (X : D) : W (· ∈ Set.range F.obj) (adj.unit.app X)

{C : Type u_1}
{D : Type u_2}
[CategoryTheory.Category.{u_4, u_1} C]
[CategoryTheory.Category.{u_3, u_2} D]
{F : CategoryTheory.Functor C D}
{G : CategoryTheory.Functor D C}
(adj : G ⊣ F)
[F.Full]
[F.Faithful]
(X : D)

CategoryTheory.Localization.LeftBousfield.W (fun x => x ∈ Set.range F.obj) (adj.unit.app X)


lemma cases (α : W.RightFraction X Y) :
    ∃ (X' : C) (s : X' ⟶ X) (hs : W s) (f : X' ⟶ Y) , α = RightFraction.mk s hs f

{C : Type u_1}
[CategoryTheory.Category.{u_3, u_1} C]
{W : CategoryTheory.MorphismProperty C}
{X Y : C}
(α : W.RightFraction X Y)

∃ X' s, ∃ (hs : W s), ∃ f, α = CategoryTheory.MorphismProperty.RightFraction.mk s hs f


@[simp]
theorem image_id (s : Set α) : image (@Eq α) s = s


theorem norm_comp_le (g : W₂ →ᴬ[𝕜] V) : ‖f.comp g‖ ≤ ‖f‖ * ‖g‖ + ‖f 0‖

{𝕜 : Type u_1}
{V : Type u_3}
{W : Type u_4}
{W₂ : Type u_5}
[NormedAddCommGroup V]
[NormedAddCommGroup W]
[NormedAddCommGroup W₂]
[NontriviallyNormedField 𝕜]
[NormedSpace 𝕜 V]
[NormedSpace 𝕜 W]
[NormedSpace 𝕜 W₂]
(f : V →ᴬ[𝕜] W)
(g : W₂ →ᴬ[𝕜] V)


theorem primorial_add_le {m n : ℕ} (h : n ≤ m) : (m + n)# ≤ m# * choose (m + n) m


@[simp]
theorem liftRel_nil (R : α → β → Prop) : LiftRel R nil nil

{α : Type u}
{β : Type v}
(R : α → β → Prop)

Stream'.WSeq.LiftRel R Stream'.WSeq.nil Stream'.WSeq.nil


lemma IsLowerSet.lowerBounds_subset (hs : IsLowerSet s) : s.Nonempty → lowerBounds s ⊆ s

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


protected theorem IsPath.of_map {f : G →g G'} (hp : (p.map f).IsPath) : p.IsPath

(hp : (SimpleGraph.Walk.map f p).IsPath)


@[simp 1100]
theorem wideEqualizer.trident_π_app_zero :
    (wideEqualizer.trident f).π.app zero = wideEqualizer.ι f

(CategoryTheory.Limits.wideEqualizer.trident f).π.app CategoryTheory.Limits.WalkingParallelFamily.zero =
  CategoryTheory.Limits.wideEqualizer.ι f


@[to_additive]
theorem reduce.not {p : Prop} :
    ∀ {L₁ L₂ L₃ : List (α × Bool)} {x b}, reduce L₁ = L₂ ++ (x, b) :: (x, !b) :: L₃ → p

{α : Type u}
[DecidableEq α]
{p : Prop}
{L₁ L₂ L₃ : List (α × Bool)}
{x : α}
{b : Bool}

FreeGroup.reduce L₁ = L₂ ++ (x, b) :: (x, !b) :: L₃ → p


/-- The right inclusion `G ⟶ homotopyCofiber φ`. -/
@[simps!]
noncomputable def inr : G ⟶ homotopyCofiber φ

(HomologicalComplex.homotopyCofiber.inr φ).f i = HomologicalComplex.homotopyCofiber.inrX φ i


/-- Every set open in the upper topology is a upper set. -/
theorem isUpperSet_of_isOpen (h : IsOpen s) : IsUpperSet s

{α : Type u_1}
[Preorder α]
[TopologicalSpace α]
[Topology.IsUpper α]
{s : Set α}
(h : IsOpen s)


/-- like `coe_le_one`, but with the inequality in `Ioc (0:α) 1`. -/
theorem le_one {t : Ioc (0 : α) 1} : t ≤ 1

{α : Type u_1}
[StrictOrderedSemiring α]
{t : ↑(Set.Ioc 0 1)}


@[simp]
theorem exp_eq_one_iff : exp x = 1 ↔ x = 0


theorem Nodup.not_mem (h : Nodup (a ::ₘ s)) : a ∉ s

{α : Type u_1}
{s : Multiset α}
{a : α}
(h : (a ::ₘ s).Nodup)


theorem lsub_lt_ord_lift_of_isRegular {ι} {f : ι → Ordinal} {c} (hc : IsRegular c)
    (hι : Cardinal.lift.{v, u} #ι < c) : (∀ i, f i < c.ord) → Ordinal.lsub.{u, v} f < c.ord

{ι : Type u}
{f : ι → Ordinal.{max u v}}
{c : Cardinal.{max u v}}
(hc : c.IsRegular)
(hι : Cardinal.lift.{v, u} #ι < c)

(∀ (i : ι), f i < c.ord) → Ordinal.lsub f < c.ord


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

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


@[reassoc (attr := simp)]
theorem OplaxMonoidalFunctor.δ_natural (F : OplaxMonoidalFunctor C D) {X Y X' Y' : C}
    (f : X ⟶ Y) (g : X' ⟶ Y') :
      F.δ X X' ≫ (F.map f ⊗ F.map g) = F.map (f ⊗ g) ≫ F.δ Y Y'

(F : CategoryTheory.OplaxMonoidalFunctor C D)

F.δ X X' ≫ CategoryTheory.MonoidalCategory.tensorHom (F.map f) (F.map g) =
  F.map (CategoryTheory.MonoidalCategory.tensorHom f g) ≫ F.δ Y Y'


@[simp]
theorem quot_out [Monoid α] (a : Associates α) : Associates.mk (Quot.out a) = a

{α : Type u_1}
[Monoid α]
(a : Associates α)


@[to_additive]
theorem pairwiseDisjoint_smul_iff {s : Set α} {t : Finset α} :
    s.PairwiseDisjoint (· • t) ↔ (s ×ˢ t : Set (α × α)).InjOn fun p => p.1 * p.2

{α : Type u_2}
[Add α]
[IsLeftCancelAdd α]
[DecidableEq α]
{s : Set α}
{t : Finset α}

(s.PairwiseDisjoint fun x => x +ᵥ t) ↔ Set.InjOn (fun p => p.1 + p.2) (s ×ˢ ↑t)


theorem map_fst_darts {u v : V} (p : G.Walk u v) : p.darts.map (·.fst) = p.support.dropLast

{V : Type u}
{G : SimpleGraph V}
{u v : V}
(p : G.Walk u v)

List.map (fun x => x.toProd.1) p.darts = p.support.dropLast


theorem isDetecting_op_iff (𝒢 : Set C) : IsDetecting 𝒢.op ↔ IsCodetecting 𝒢

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

CategoryTheory.IsDetecting 𝒢.op ↔ CategoryTheory.IsCodetecting 𝒢


/-- A locally compact normed vector space is proper. -/
lemma ProperSpace.of_locallyCompactSpace (𝕜 : Type*) [NontriviallyNormedField 𝕜]
    {E : Type*} [SeminormedAddCommGroup E] [NormedSpace 𝕜 E] [LocallyCompactSpace E] :
    ProperSpace E

(𝕜 : Type u_1)
[NontriviallyNormedField 𝕜]
{E : Type u_2}
[SeminormedAddCommGroup E]
[NormedSpace 𝕜 E]
[LocallyCompactSpace E]


protected theorem Balanced.setBlack : t.Balanced c n → ∃ n', (setBlack t).Balanced black n'

∀ {α : Type u_1} {t : Batteries.RBNode α} {c : Batteries.RBColor} {n : Nat},
  t.Balanced c n → ∃ n', t.setBlack.Balanced Batteries.RBColor.black n'


@[to_additive]
lemma ite_lt_one [LT α] (ha : a < 1) (hb : b < 1) : ite p a b < 1

{α : Type u_2}
[Zero α]
{p : Prop}
[Decidable p]
{a b : α}
[LT α]
(ha : a < 0)
(hb : b < 0)


/-- Construct a modification isomorphism between oplax natural transformations
by giving object level isomorphisms, and checking naturality only in the forward direction.
-/
@[simps]
def ModificationIso.ofComponents (app : ∀ a, η.app a ≅ θ.app a)
    (naturality :
      ∀ {a b} (f : a ⟶ b),
        F.map f ◁ (app b).hom ≫ θ.naturality f = η.naturality f ≫ (app a).hom ▷ G.map f) :
    η ≅ θ

(naturality :
  ∀ {a b : B} (f : a ⟶ b),
    CategoryTheory.CategoryStruct.comp (CategoryTheory.Bicategory.whiskerLeft (F.map f) (app b).hom) (θ.naturality f) =
      CategoryTheory.CategoryStruct.comp (η.naturality f)
        (CategoryTheory.Bicategory.whiskerRight (app a).hom (G.map f)))

(CategoryTheory.OplaxNatTrans.ModificationIso.ofComponents app naturality).hom.app a = (app a).hom


@[simp]
theorem not_inl_lt_inr [LT α] [LT β] {a : α} {b : β} : ¬inl b < inr a

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


@[simp]
theorem map_of_not_aemeasurable {f : α → β} {μ : Measure α} (hf : ¬AEMeasurable f μ) :
    μ.map f = 0

{α : Type u_1}
{β : Type u_2}
{m0 : MeasurableSpace α}
[MeasurableSpace β]
{f : α → β}
{μ : MeasureTheory.Measure α}
(hf : ¬AEMeasurable f μ)


@[simp] theorem perpBisector_self (p : P) : perpBisector p p = ⊤

{V : Type u_1}
{P : Type u_2}
[NormedAddCommGroup V]
[InnerProductSpace ℝ V]
[MetricSpace P]
[NormedAddTorsor V P]
(p : P)


@[gcongr]
theorem zpow_le_of_le (ha : 1 ≤ a) (h : m ≤ n) : a ^ m ≤ a ^ n

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


theorem comap_map_eq_self {f : F} {p : Submodule R M} (h : LinearMap.ker f ≤ p) :
    comap f (map f p) = p

{R : Type u_1}
{R₂ : Type u_2}
{M : Type u_4}
{M₂ : Type u_5}
[Semiring R]
[Semiring R₂]
[AddCommGroup M]
[Module R M]
[AddCommGroup M₂]
[Module R₂ M₂]
{τ₁₂ : R →+* R₂}
[RingHomSurjective τ₁₂]
{F : Type u_8}
[FunLike F M M₂]
[SemilinearMapClass F τ₁₂ M M₂]
{f : F}
{p : Submodule R M}
(h : LinearMap.ker f ≤ p)

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


theorem degree_modByMonic_le (p : R[X]) {q : R[X]} (hq : Monic q) : degree (p %ₘ q) ≤ degree q

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


theorem hasLineDerivWithinAt_zero : HasLineDerivWithinAt 𝕜 f 0 s x 0

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{F : Type u_2}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{E : Type u_3}
[AddCommGroup E]
[Module 𝕜 E]
{f : E → F}
{s : Set E}
{x : E}


@[to_additive]
theorem le_iff_forall_one_lt_lt_mul : a ≤ b ↔ ∀ ε, 1 < ε → a < b * ε

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


@[simp]
theorem image_const_sub_Ici : (fun x => a - x) '' Ici b = Iic (a - b)

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

(fun x => a - x) '' Set.Ici b = Set.Iic (a - b)


@[simp, norm_cast]
theorem coe_natCast (n : ℕ) : ⇑(n : SlashInvariantForm Γ 0) = n


theorem sized_iUnion₂ {f : ∀ i, κ i → Set (Finset α)} :
    (⋃ (i) (j), f i j).Sized r ↔ ∀ i j, (f i j).Sized r

{α : Type u_1}
{ι : Sort u_2}
{κ : ι → Sort u_3}
{r : ℕ}
{f : (i : ι) → κ i → Set (Finset α)}

Set.Sized r (⋃ i, ⋃ j, f i j) ↔ ∀ (i : ι) (j : κ i), Set.Sized r (f i j)


theorem Icc_inr_inr : Icc (inr b₁ : α ⊕ β) (inr b₂) = (Icc b₁ b₂).map Embedding.inr

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

Finset.Icc (Sum.inr b₁) (Sum.inr b₂) = Finset.map Function.Embedding.inr (Finset.Icc b₁ b₂)


/-- If `S` a finite-dimensional ring extension of a PID `R` which is free as an `R`-module,
then any nonzero `S`-ideal `I` is free as an `R`-submodule of `S`, and we can
find a basis for `S` and `I` such that the inclusion map is a square diagonal
matrix.
-/
@[simp]
theorem Ideal.selfBasis_def (b : Basis ι R S) (I : Ideal S) (hI : I ≠ ⊥) :
    ∀ i, (Ideal.selfBasis b I hI i : S) = Ideal.smithCoeffs b I hI i • Ideal.ringBasis b I hI i

{ι : Type u_1}
{R : Type u_2}
[CommRing R]
[IsDomain R]
[IsPrincipalIdealRing R]
{S : Type u_4}
[CommRing S]
[IsDomain S]
[Algebra R S]
[Finite ι]
(b : Basis ι R S)
(I : Ideal S)
(hI : I ≠ ⊥)
(i : ι)

↑((Ideal.selfBasis b I hI) i) = Ideal.smithCoeffs b I hI i • (Ideal.ringBasis b I hI) i


theorem _root_.MeasureTheory.AEStronglyMeasurable.ae_integrable_condDistrib_map_iff
    (hY : AEMeasurable Y μ) (hf : AEStronglyMeasurable f (μ.map fun a => (X a, Y a))) :
    (∀ᵐ a ∂μ.map X, Integrable (fun ω => f (a, ω)) (condDistrib Y X μ a)) ∧
      Integrable (fun a => ∫ ω, ‖f (a, ω)‖ ∂condDistrib Y X μ a) (μ.map X) ↔
    Integrable f (μ.map fun a => (X a, Y a))

(hf : MeasureTheory.AEStronglyMeasurable f (MeasureTheory.Measure.map (fun a => (X a, Y a)) μ))

(∀ᵐ (a : β) ∂MeasureTheory.Measure.map X μ,
      MeasureTheory.Integrable (fun ω => f (a, ω)) ((ProbabilityTheory.condDistrib Y X μ) a)) ∧
    MeasureTheory.Integrable (fun a => ∫ (ω : Ω), ‖f (a, ω)‖ ∂(ProbabilityTheory.condDistrib Y X μ) a)
      (MeasureTheory.Measure.map X μ) ↔
  MeasureTheory.Integrable f (MeasureTheory.Measure.map (fun a => (X a, Y a)) μ)


@[elab_as_elim]
theorem induction_on₃ {p : Completion α → Completion β → Completion γ → Prop} (a : Completion α)
    (b : Completion β) (c : Completion γ)
    (hp : IsClosed { x : Completion α × Completion β × Completion γ | p x.1 x.2.1 x.2.2 })
    (ih : ∀ (a : α) (b : β) (c : γ), p a b c) : p a b c

{p : UniformSpace.Completion α → UniformSpace.Completion β → UniformSpace.Completion γ → Prop}

(ih : ∀ (a : α) (b : β) (c : γ), p (↑α a) (↑β b) (↑γ c))


/-- The union of finitely many Gδ sets is a Gδ set, bounded indexed union version. -/
theorem IsGδ.iUnion [Finite ι'] {f : ι' → Set X} (h : ∀ i, IsGδ (f i)) : IsGδ (⋃ i, f i)

{X : Type u_1}
{ι' : Sort u_4}
[TopologicalSpace X]
[Finite ι']
{f : ι' → Set X}
(h : ∀ (i : ι'), IsGδ (f i))


@[simp]
theorem Finset.interior_iInter {ι : Type*} (s : Finset ι) (f : ι → Set X) :
    interior (⋂ i ∈ s, f i) = ⋂ i ∈ s, interior (f i)

{X : Type u}
[TopologicalSpace X]
{ι : Type u_3}
(s : Finset ι)
(f : ι → Set X)


theorem filter_mono_ae (h : f ⊓ (ae μ) ≤ g) (hg : μ.FiniteAtFilter g) : μ.FiniteAtFilter f

{α : Type u_1}
{m0 : MeasurableSpace α}
{μ : MeasureTheory.Measure α}
{f g : Filter α}
(h : f ⊓ MeasureTheory.ae μ ≤ g)
(hg : μ.FiniteAtFilter g)


/-- An open map `f : X ⟶ Y` induces a functor `OpenNhds x ⥤ OpenNhds (f x)`. -/
@[simps]
def functorNhds (h : IsOpenMap f) (x : X) : OpenNhds x ⥤ OpenNhds (f x)

{X Y : TopCat}
{f : X ⟶ Y}
(h : IsOpenMap ⇑f)
(x : ↑X)

∀ {X_1 Y_1 : TopologicalSpace.OpenNhds x} (i : X_1 ⟶ Y_1), (h.functorNhds x).map i = h.functor.map i


protected theorem sub_lt_left_of_lt_add {n k m : Nat} (H : n ≤ k) (h : k < n + m) : k - n < m


theorem inf_lt_inf_of_lt_of_sup_le_sup (hxy : x < y) (hinf : y ⊔ z ≤ x ⊔ z) : x ⊓ z < y ⊓ z

{α : Type u_1}
[Lattice α]
[IsModularLattice α]
{x y z : α}
(hxy : x < y)
(hinf : y ⊔ z ≤ x ⊔ z)


/-- **Darboux's theorem**: if `a ≤ b` and `f' a ≤ m ≤ f' b`, then `f' c = m` for some
`c ∈ [a, b]`. -/
theorem exists_hasDerivWithinAt_eq_of_ge_of_le (hab : a ≤ b)
    (hf : ∀ x ∈ Icc a b, HasDerivWithinAt f (f' x) (Icc a b) x) {m : ℝ} (hma : f' a ≤ m)
    (hmb : m ≤ f' b) : m ∈ f' '' Icc a b

(hf : ∀ x ∈ Set.Icc a b, HasDerivWithinAt f (f' x) (Set.Icc a b) x)


lemma Algebra.norm_one_add_smul {A B} [CommRing A] [CommRing B] [Algebra A B]
    [Module.Free A B] [Module.Finite A B] (a : A) (x : B) :
    ∃ r : A, Algebra.norm A (1 + a • x) = 1 + Algebra.trace A B x * a + r * a ^ 2

{A : Type u_1}
{B : Type u_2}
[CommRing A]
[CommRing B]
[Algebra A B]
[Module.Free A B]
[Module.Finite A B]
(a : A)
(x : B)

∃ r, (Algebra.norm A) (1 + a • x) = 1 + (Algebra.trace A B) x * a + r * a ^ 2


/-- The associator isomorphism can be passed through a map by swapping the order. -/
@[reassoc]
theorem biprod.associator_inv_natural {U V W X Y Z : C} (f : U ⟶ X) (g : V ⟶ Y) (h : W ⟶ Z) :
    biprod.map f (biprod.map g h) ≫ (biprod.associator _ _ _).inv
      = (biprod.associator _ _ _).inv ≫ biprod.map (biprod.map f g) h

CategoryTheory.Limits.biprod.map f (CategoryTheory.Limits.biprod.map g h) ≫
    (CategoryTheory.Limits.biprod.associator X Y Z).inv =
  (CategoryTheory.Limits.biprod.associator U V W).inv ≫
    CategoryTheory.Limits.biprod.map (CategoryTheory.Limits.biprod.map f g) h


lemma mono_f (s : S.Splitting) : Mono S.f

{C : Type u_1}
[CategoryTheory.Category.{u_3, u_1} C]
[CategoryTheory.Preadditive C]
{S : CategoryTheory.ShortComplex C}
(s : S.Splitting)


theorem div_eq_quo_add_rem_div (f : R[X]) {g : R[X]} (hg : g.Monic) :
    ∃ q r : R[X], r.degree < g.degree ∧
      (algebraMap R[X] K f) / (algebraMap R[X] K g) =
        algebraMap R[X] K q + (algebraMap R[X] K r) / (algebraMap R[X] K g)

{R : Type u_1}
[CommRing R]
[IsDomain R]
(K : Type)
[Field K]
[Algebra (Polynomial R) K]
[IsFractionRing (Polynomial R) K]
(f : Polynomial R)
{g : Polynomial R}
(hg : g.Monic)

∃ q r,
  r.degree < g.degree ∧
    (algebraMap (Polynomial R) K) f / (algebraMap (Polynomial R) K) g =
      (algebraMap (Polynomial R) K) q + (algebraMap (Polynomial R) K) r / (algebraMap (Polynomial R) K) g


theorem IsBigO.const_smul_self (c' : R) : (fun x => c' • f' x) =O[l] f'

{α : Type u_1}
{E' : Type u_6}
{R : Type u_13}
[SeminormedAddCommGroup E']
[SeminormedRing R]
{f' : α → E'}
{l : Filter α}
[Module R E']
[BoundedSMul R E']
(c' : R)


@[simp]
theorem preimage_Iio (e : α ≃o β) (b : β) : e ⁻¹' Iio b = Iio (e.symm b)

{α : Type u_1}
{β : Type u_2}
[Preorder α]
[Preorder β]
(e : α ≃o β)
(b : β)


@[simp]
theorem rTensor_smul_action (r : R) :
    (DistribMulAction.toLinearMap R N r).rTensor M =
      DistribMulAction.toLinearMap R (N ⊗[R] M) r

{R : Type u_1}
[CommSemiring R]
(M : Type u_4)
(N : Type u_5)
[AddCommMonoid M]
[AddCommMonoid N]
[Module R M]
[Module R N]
(r : R)

LinearMap.rTensor M (DistribMulAction.toLinearMap R N r) = DistribMulAction.toLinearMap R (TensorProduct R N M) r


@[to_additive max_sub_sub_right]
theorem max_div_div_right' (a b c : α) : max (a / c) (b / c) = max a b / c

{α : Type u_1}
[LinearOrderedAddCommGroup α]
(a b c : α)


theorem nth_cont_eq_succ_nth_contAux : g.conts n = g.contsAux (n + 1)

{K : Type u_1}
{g : GenContFract K}
{n : ℕ}
[DivisionRing K]


@[simp]
theorem coe_aeval_eq_eval (r : R) : (aeval r : R[X] → R) = eval r

⇑(Polynomial.aeval r) = Polynomial.eval r


theorem Memℒp.eLpNorm_indicator_norm_ge_le (hf : Memℒp f p μ) (hmeas : StronglyMeasurable f) {ε : ℝ}
    (hε : 0 < ε) : ∃ M : ℝ, eLpNorm ({ x | M ≤ ‖f x‖₊ }.indicator f) p μ ≤ ENNReal.ofReal ε

(hmeas : MeasureTheory.StronglyMeasurable f)

∃ M, MeasureTheory.eLpNorm ({x | M ≤ ↑‖f x‖₊}.indicator f) p μ ≤ ENNReal.ofReal ε


@[simp]
theorem IccExtend_right (f : Icc a b → β) : IccExtend h f b = f ⟨b, right_mem_Icc.2 h⟩

{α : Type u_1}
{β : Type u_2}
[LinearOrder α]
{a b : α}
(h : a ≤ b)
(f : ↑(Set.Icc a b) → β)


/-- A Lie (ring) module is trivial iff all brackets vanish. -/
class LieModule.IsTrivial (L : Type v) (M : Type w) [Bracket L M] [Zero M] : Prop where
  trivial : ∀ (x : L) (m : M), ⁅x, m⁆ = 0

{L : Type v}
{M : Type w}
[Bracket L M]
[Zero M]
[self : LieModule.IsTrivial L M]
(x : L)
(m : M)


@[to_additive (attr := simp)]
theorem max_one_div_max_inv_one_eq_self (a : α) : max a 1 / max a⁻¹ 1 = a

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


@[to_additive]
theorem le_tprod' (hf : Multipliable f) (i : ι) : f i ≤ ∏' i, f i

{ι : Type u_1}
{α : Type u_3}
[CanonicallyOrderedAddCommMonoid α]
[TopologicalSpace α]
[OrderClosedTopology α]
{f : ι → α}
(hf : Summable f)
(i : ι)


protected lemma norm (hf : GrowsPolynomially f) : GrowsPolynomially (fun x => ‖f x‖)

(hf : AkraBazziRecurrence.GrowsPolynomially f)

AkraBazziRecurrence.GrowsPolynomially fun x => ‖f x‖


theorem lift_apply (x : L) (n : ℕ) (y : K) (h : i y = x ^ p ^ n) :
    lift i j p x = (iterateFrobeniusEquiv M p n).symm (j y)

{K : Type u_1}
{L : Type u_2}
{M : Type u_3}
[CommRing K]
[CommRing L]
[CommRing M]
(i : K →+* L)
(j : K →+* M)
(p : ℕ)
[ExpChar K p]
[ExpChar L p]
[ExpChar M p]
[PerfectRing M p]
[IsPRadical i p]
(x : L)
(n : ℕ)
(y : K)
(h : i y = x ^ p ^ n)

(PerfectRing.lift i j p) x = (iterateFrobeniusEquiv M p n).symm (j y)


theorem card_sdiff (h : s ⊆ t) : card (t \ s) = t.card - s.card

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


theorem comap_coe_Iio_nhdsWithin_Iio (a : α) : comap ((↑) : Iio a → α) (𝓝[<] a) = atTop

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

Filter.comap Subtype.val (𝓝[<] a) = Filter.atTop


theorem lowerCentralSeries_map_subtype_le (H : Subgroup G) (n : ℕ) :
    (lowerCentralSeries H n).map H.subtype ≤ lowerCentralSeries G n

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

Subgroup.map H.subtype (lowerCentralSeries (↥H) n) ≤ lowerCentralSeries G n


theorem cmp_congr_left' (xy : cmp x y = .eq) : cmp x = cmp y

∀ {x : Sort u_1} {cmp : x → x → Ordering} [inst : Batteries.TransCmp cmp] {x_1 y : x},
  cmp x_1 y = Ordering.eq → cmp x_1 = cmp y


/-- Each element of the group defines an additive monoid isomorphism.

This is a stronger version of `MulAction.toPerm`. -/
@[simps (config := { simpRhs := true })]
def DistribMulAction.toAddEquiv (x : α) : β ≃+ β

{α : Type u}
(β : Type v)
[Group α]
[AddMonoid β]
[DistribMulAction α β]
(x : α)

∀ (a : β), (DistribMulAction.toAddEquiv β x) a = x • a


protected theorem induction (hs : s.WellFoundedOn r) (hx : x ∈ s) {P : α → Prop}
    (hP : ∀ y ∈ s, (∀ z ∈ s, r z y → P z) → P y) : P x


protected theorem continuous (hf : ApproximatesLinearOn f f' s c) : Continuous (s.restrict f)

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{F : Type u_3}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{f : E → F}
{f' : E →L[𝕜] F}
{s : Set E}
{c : ℝ≥0}
(hf : ApproximatesLinearOn f f' s c)


theorem exists_of_le {T S : E →ₗ.[R] F} (h : T ≤ S) (x : T.domain) :
    ∃ y : S.domain, (x : E) = y ∧ T x = S y

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


theorem vector_get {n} : Primrec₂ (@Vector.get α n)


theorem contDiffOn_of_continuousOn_differentiableOn
    (Hcont : ∀ m : ℕ, (m : ℕ∞) ≤ n → ContinuousOn (fun x => iteratedFDerivWithin 𝕜 m f s x) s)
    (Hdiff : ∀ m : ℕ, (m : ℕ∞) < n →
      DifferentiableOn 𝕜 (fun x => iteratedFDerivWithin 𝕜 m f s x) s) :
    ContDiffOn 𝕜 n f s

(Hcont : ∀ (m : ℕ), ↑m ≤ n → ContinuousOn (fun x => iteratedFDerivWithin 𝕜 m f s x) s)

(Hdiff : ∀ (m : ℕ), ↑m < n → DifferentiableOn 𝕜 (fun x => iteratedFDerivWithin 𝕜 m f s x) s)


@[simp]
lemma toNNReal_eq_ofNat {r : ℝ} {n : ℕ} [n.AtLeastTwo] :
    r.toNNReal = no_index (OfNat.ofNat n) ↔ r = OfNat.ofNat n

r.toNNReal = OfNat.ofNat n ↔ r = OfNat.ofNat n


theorem leftInverse_splittingOfFunOnFintypeSurjective [Finite α] (f : M →ₗ[R] α → R)
    (s : Surjective f) : LeftInverse f (splittingOfFunOnFintypeSurjective f s)

{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)

Function.LeftInverse ⇑f ⇑(f.splittingOfFunOnFintypeSurjective s)


lemma IsWellOrderLimitElement.neq_bot [OrderBot α] : a ≠ ⊥

{α : Type u_1}
[LinearOrder α]
(a : α)
[ha : IsWellOrderLimitElement a]
[OrderBot α]


/-- If the evaluation (`evalEval`) of a bivariate polynomial `p : R[X][Y]` at a point (x,y)
is zero, then `Polynomial.evalEval x y` factors through `AdjoinRoot.evalEval`, a ring homomorphism
from `AdjoinRoot p` to `R`. -/
@[simps!] def evalEval : AdjoinRoot p →+* R

{R : Type u_1}
[CommRing R]
{x y : R}
{p : R[X][Y]}
(h : Polynomial.evalEval x y p = 0)

∀ (a : R[X][Y] ⧸ Submodule.toAddSubgroup (Ideal.span {p})),
  (AdjoinRoot.evalEval h) a =
    (QuotientAddGroup.lift (Submodule.toAddSubgroup (Ideal.span {p}))
        ↑(Polynomial.eval₂RingHom (Polynomial.evalRingHom x) y) ⋯)
      a


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

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

MonoidAlgebra.mapDomainAlgHom k A (MonoidHom.id G) = AlgHom.id k (MonoidAlgebra A G)


/-- The **Chevalley–Warning theorem**, finitary version.
Let `(f i)` be a finite family of multivariate polynomials
in finitely many variables (`X s`, `s : σ`) over a finite field of characteristic `p`.
Assume that the sum of the total degrees of the `f i` is less than the cardinality of `σ`.
Then the number of common solutions of the `f i` is divisible by `p`. -/
theorem char_dvd_card_solutions_of_sum_lt {s : Finset ι} {f : ι → MvPolynomial σ K}
    (h : (∑ i ∈ s, (f i).totalDegree) < Fintype.card σ) :
    p ∣ Fintype.card { x : σ → K // ∀ i ∈ s, eval x (f i) = 0 }

(h : ∑ i ∈ s, (f i).totalDegree < Fintype.card σ)

p ∣ Fintype.card { x // ∀ i ∈ s, (MvPolynomial.eval x) (f i) = 0 }


theorem exists_iff_exists_finsupp (P : R[X] → Prop) :
    (∃ p, P p) ↔ ∃ q : R[ℕ], P ⟨q⟩

{R : Type u}
[Semiring R]
(P : R[X] → Prop)


@[simp]
theorem List.finite_toSet (l : List α) : { x | x ∈ l }.Finite


theorem List.card_toFinset : l.toFinset.card = l.dedup.length

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


theorem terminates_of_liftRel {R : α → β → Prop} {s t} :
    LiftRel R s t → (Terminates s ↔ Terminates t)

{α : Type u}
{β : Type v}
{R : α → β → Prop}
{s : Computation α}
{t : Computation β}

Computation.LiftRel R s t → (s.Terminates ↔ t.Terminates)


theorem st_mul {x y : ℝ*} (hx : ¬Infinite x) (hy : ¬Infinite y) : st (x * y) = st x * st y

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


theorem cast_injective [CharZero α] : Function.Injective ((↑) : ℚ → α)

{α : Type u_3}
[DivisionRing α]
[CharZero α]


theorem fdiv_eq_ediv : ∀ (a : Int) {b : Int}, 0 ≤ b → fdiv a b = a / b


/-- **Kummer's Theorem**

The `p`-adic valuation of `(n + k).choose k` is the number of carries when `k` and `n` are added
in base `p`. This sum is expressed over the finset `Ico 1 b` where `b` is any bound greater than
`log p (n + k)`. -/
theorem padicValNat_choose' {n k b : ℕ} [hp : Fact p.Prime] (hnb : log p (n + k) < b) :
    padicValNat p (choose (n + k) k) =
    ((Finset.Ico 1 b).filter fun i => p ^ i ≤ k % p ^ i + n % p ^ i).card

{p n k b : ℕ}
[hp : Fact (Nat.Prime p)]
(hnb : Nat.log p (n + k) < b)

padicValNat p ((n + k).choose k) = (Finset.filter (fun i => p ^ i ≤ k % p ^ i + n % p ^ i) (Finset.Ico 1 b)).card


@[simp]
theorem Ioi_pred (a : α) : Ioi (pred a) = Ici a

{α : Type u_1}
[Preorder α]
[PredOrder α]
[NoMinOrder α]
(a : α)


@[simp]
theorem smul_apply {_m : MeasurableSpace α} (c : R) (μ : Measure α) (s : Set α) :
    (c • μ) s = c • μ s

{α : Type u_1}
{R : Type u_6}
[SMul R ENNReal]
[IsScalarTower R ENNReal ENNReal]
{_m : MeasurableSpace α}
(c : R)
(μ : MeasureTheory.Measure α)
(s : Set α)


/-- If the measurable space generated by `S` separates points,
then this is witnessed by sets in `S`. -/
theorem separating_of_generateFrom (S : Set (Set α))
    [h : @SeparatesPoints α (generateFrom S)] :
    ∀ x y : α, (∀ s ∈ S, x ∈ s ↔ y ∈ s) → x = y

{α : Type u_1}
(S : Set (Set α))
[h : MeasurableSpace.SeparatesPoints α]
(x y : α)


/--
The continuous functions from `α` to `β` are the same as the plain functions when `α` is discrete.
-/
@[simps]
def equivFnOfDiscrete [DiscreteTopology α] : C(α, β) ≃ (α → β)

(α : Type u_1)
(β : Type u_2)
[TopologicalSpace α]
[TopologicalSpace β]
[DiscreteTopology α]
(f : C(α, β))
(a : α)

(ContinuousMap.equivFnOfDiscrete α β) f a = f a


theorem essentiallySmallSelf : EssentiallySmall.{max w v u} C

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

CategoryTheory.EssentiallySmall.{max w v u, v, u} C


/-- The functor `Γ₀ : ChainComplex C ℕ ⥤ SimplicialObject C`, which is
the inverse functor of the Dold-Kan equivalence when `C` is an abelian
category, or more generally a pseudoabelian category. -/
@[simps!]
def Γ₀ : ChainComplex C ℕ ⥤ SimplicialObject C

(AlgebraicTopology.DoldKan.Γ₀.obj X).obj Δ = AlgebraicTopology.DoldKan.Γ₀.Obj.obj₂ X Δ


theorem eLpNorm_eq_eLpNorm' (hp_ne_zero : p ≠ 0) (hp_ne_top : p ≠ ∞) {f : α → F} :
    eLpNorm f p μ = eLpNorm' f (ENNReal.toReal p) μ

{α : Type u_1}
{F : Type u_3}
{m0 : MeasurableSpace α}
{p : ℝ≥0∞}
{μ : MeasureTheory.Measure α}
[NormedAddCommGroup F]
(hp_ne_zero : p ≠ 0)
(hp_ne_top : p ≠ ⊤)
{f : α → F}

MeasureTheory.eLpNorm f p μ = MeasureTheory.eLpNorm' f p.toReal μ


@[trans]
theorem LiftRel.trans [IsTrans α r] [IsTrans β s] :
    ∀ {a b c}, LiftRel r s a b → LiftRel r s b c → LiftRel r s a c

{α : Type u_1}
{β : Type u_2}
(r : α → α → Prop)
(s : β → β → Prop)
[IsTrans α r]
[IsTrans β s]
{a b c : α ⊕ β}

Sum.LiftRel r s a b → Sum.LiftRel r s b c → Sum.LiftRel r s a c


@[to_additive (attr := simp)]
theorem mul_toGerm (f g : α →ₘ[μ] γ) : (f * g).toGerm = f.toGerm * g.toGerm

{α : Type u_1}
{γ : Type u_3}
[MeasurableSpace α]
{μ : MeasureTheory.Measure α}
[TopologicalSpace γ]
[Mul γ]
[ContinuousMul γ]
(f g : α →ₘ[μ] γ)


theorem natDegree_pos_of_nextCoeff_ne_zero (h : p.nextCoeff ≠ 0) : 0 < p.natDegree

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


@[simp]
theorem transpose_eq_iff {μ ν : YoungDiagram} : μ.transpose = ν.transpose ↔ μ = ν


@[simp, norm_cast]
theorem coe_mul (x y : R) : (↑(x * y) : c.Quotient) = ↑x * ↑y

{R : Type u_2}
[Add R]
[Mul R]
(c : RingCon R)
(x y : R)


/-- If the union of the kernels `ker f` and `ker g` spans the domain, then the range of
`Prod f g` is equal to the product of `range f` and `range g`. -/
theorem range_prod_eq {f : M →ₗ[R] M₂} {g : M →ₗ[R] M₃} (h : ker f ⊔ ker g = ⊤) :
    range (prod f g) = (range f).prod (range g)

(h : LinearMap.ker f ⊔ LinearMap.ker g = ⊤)

LinearMap.range (f.prod g) = (LinearMap.range f).prod (LinearMap.range g)


/-- The hard part of the Lusin separation theorem saying that two disjoint analytic sets are
contained in disjoint Borel sets (see the full statement in `AnalyticSet.measurablySeparable`).
Here, we prove this when our analytic sets are the ranges of functions from `ℕ → ℕ`.
-/
theorem measurablySeparable_range_of_disjoint [T2Space α] [MeasurableSpace α]
    [OpensMeasurableSpace α] {f g : (ℕ → ℕ) → α} (hf : Continuous f) (hg : Continuous g)
    (h : Disjoint (range f) (range g)) : MeasurablySeparable (range f) (range g)

(h : Disjoint (Set.range f) (Set.range g))

MeasureTheory.MeasurablySeparable (Set.range f) (Set.range g)


/-- If `f` is a smooth partition of unity on a set `s : Set M` subordinate to a family of open sets
`U : ι → Set M` and `g : ι → M → F` is a family of functions such that `g i` is $C^n$ smooth on
`U i`, then the sum `fun x ↦ ∑ᶠ i, f i x • g i x` is $C^n$ smooth on the whole manifold. -/
theorem IsSubordinate.contMDiff_finsum_smul {g : ι → M → F} (hf : f.IsSubordinate U)
    (ho : ∀ i, IsOpen (U i)) (hg : ∀ i, ContMDiffOn I 𝓘(ℝ, F) n (g i) (U i)) :
    ContMDiff I 𝓘(ℝ, F) n fun x => ∑ᶠ i, f i x • g i x

(hg : ∀ (i : ι), ContMDiffOn I 𝓘(ℝ, F) n (g i) (U i))

ContMDiff I 𝓘(ℝ, F) n fun x => ∑ᶠ (i : ι), (f i) x • g i x


theorem symm_image_image (e : P₁ ≃ᵃL[k] P₂) (s : Set P₁) : e.symm '' (e '' s) = s

{k : Type u_1}
{P₁ : Type u_2}
{P₂ : Type u_3}
{V₁ : Type u_6}
{V₂ : Type u_7}
[Ring k]
[AddCommGroup V₁]
[Module k V₁]
[AddTorsor V₁ P₁]
[AddCommGroup V₂]
[Module k V₂]
[AddTorsor V₂ P₂]
[TopologicalSpace P₁]
[TopologicalSpace P₂]
(e : P₁ ≃ᵃL[k] P₂)
(s : Set P₁)


@[simp]
theorem toMatrix'_comp (Q : QuadraticMap R (m → R) R) (f : (n → R) →ₗ[R] m → R) :
    (Q.comp f).toMatrix' = (LinearMap.toMatrix' f)ᵀ * Q.toMatrix' * (LinearMap.toMatrix' f)

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

(Q.comp f).toMatrix' = (LinearMap.toMatrix' f).transpose * Q.toMatrix' * LinearMap.toMatrix' f


@[simp, norm_cast]
theorem cast_one [Zero α] [One α] [Add α] [Neg α] : ((1 : ZNum) : α) = 1

{α : Type u_1}
[Zero α]
[One α]
[Add α]
[Neg α]


theorem rename_bind₁ {υ : Type*} (f : σ → MvPolynomial τ R) (g : τ → υ) (φ : MvPolynomial σ R) :
    rename g (bind₁ f φ) = bind₁ (fun i => rename g <| f i) φ

{σ : Type u_1}
{τ : Type u_2}
{R : Type u_3}
[CommSemiring R]
{υ : Type u_6}
(f : σ → MvPolynomial τ R)
(g : τ → υ)
(φ : MvPolynomial σ R)

(MvPolynomial.rename g) ((MvPolynomial.bind₁ f) φ) = (MvPolynomial.bind₁ fun i => (MvPolynomial.rename g) (f i)) φ


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

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


/-- Functor composition induces a functor on truncated cosimplicial objects. -/
@[simps!]
def whiskering {n} (D : Type*) [Category D] : (C ⥤ D) ⥤ Truncated C n ⥤ Truncated D n

(C : Type u)
[CategoryTheory.Category.{v, u} C]
{n : ℕ}
(D : Type u_1)
[CategoryTheory.Category.{u_2, u_1} D]

∀ {X Y : C ⥤ D} (τ : X ⟶ Y) (F : SimplexCategory.Truncated n ⥤ C) (c : SimplexCategory.Truncated n),
  (((CategoryTheory.CosimplicialObject.Truncated.whiskering C D).map τ).app F).app c = τ.app (F.obj c)


@[simp] theorem antitoneOn_univ : AntitoneOn f Set.univ ↔ Antitone f

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


theorem cot_eq_cos_div_sin : cot x = cos x / sin x


theorem cos_nat_mul_two_pi_sub_pi (n : ℕ) : cos (n * (2 * π) - π) = -1

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


theorem mkOfClosure_sets {s : Set (Set α)} {hs : (generate s).sets = s} :
    Filter.mkOfClosure s hs = generate s

{α : Type u}
{s : Set (Set α)}
{hs : (Filter.generate s).sets = s}

Filter.mkOfClosure s hs = Filter.generate s


/-- A generalization of **Sylow's first theorem**.
  Every `p`-subgroup is contained in a Sylow `p`-subgroup. -/
theorem IsPGroup.exists_le_sylow {P : Subgroup G} (hP : IsPGroup p P) : ∃ Q : Sylow p G, P ≤ Q

{p : ℕ}
{G : Type u_1}
[Group G]
{P : Subgroup G}
(hP : IsPGroup p ↥P)


theorem sub_nfBelow : ∀ {o₁ o₂ b}, NFBelow o₁ b → NF o₂ → NFBelow (o₁ - o₂) b

o₁.NFBelow b → o₂.NF → (o₁ - o₂).NFBelow b


theorem sup_mem_sups : a ∈ s → b ∈ t → a ⊔ b ∈ s ⊻ t

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


theorem le_antisymm {f g : CauSeq α abs} (fg : f ≤ g) (gf : g ≤ f) : f ≈ g

{α : Type u_1}
[LinearOrderedField α]
{f g : CauSeq α abs}
(fg : f ≤ g)
(gf : g ≤ f)


@[simp]
theorem mem_sym_iff {m : Sym α n} : m ∈ s.sym n ↔ ∀ a ∈ m, a ∈ s

{α : Type u_1}
[DecidableEq α]
{s : Finset α}
{n : ℕ}
{m : Sym α n}


theorem exists_irreducible_factor {a : α} (ha : ¬IsUnit a) (ha0 : a ≠ 0) :
    ∃ i, Irreducible i ∧ i ∣ a

{α : Type u_1}
[CommMonoidWithZero α]
[WfDvdMonoid α]
{a : α}
(ha : ¬IsUnit a)
(ha0 : a ≠ 0)


protected theorem max (hf : LipschitzWith Kf f) (hg : LipschitzWith Kg g) :
    LipschitzWith (max Kf Kg) fun x => max (f x) (g x)

{α : Type u}
[PseudoEMetricSpace α]
{f g : α → ℝ}
{Kf Kg : ℝ≥0}
(hf : LipschitzWith Kf f)
(hg : LipschitzWith Kg g)


@[simp] theorem xor_self (a : Prop) : Xor' a a = False


theorem sq_add_sq_of_nat_prime_of_not_irreducible (p : ℕ) [hp : Fact p.Prime]
    (hpi : ¬Irreducible (p : ℤ[i])) : ∃ a b, a ^ 2 + b ^ 2 = p

(p : ℕ)
[hp : Fact (Nat.Prime p)]
(hpi : ¬Irreducible ↑p)


/-- Given a functor `F` and a collection of limit cones for each diagram `X ↦ F X k`, we can stitch
them together to give a cone for the diagram `F`.
`combinedIsLimit` shows that the new cone is limiting, and `evalCombined` shows it is
(essentially) made up of the original cones.
-/
@[simps]
def combineCones (F : J ⥤ K ⥤ C) (c : ∀ k : K, LimitCone (F.flip.obj k)) : Cone F

(c : (k : K) → CategoryTheory.Limits.LimitCone (F.flip.obj k))

(CategoryTheory.Limits.combineCones F c).pt.map f =
  (c k₂).isLimit.lift { pt := (c k₁).cone.pt, π := (c k₁).cone.π ≫ F.flip.map f }


@[to_additive]
lemma HasProd.congr_fun (hf : HasProd f a) (h : ∀ x : β, g x = f x) : HasProd g a

{α : Type u_1}
{β : Type u_2}
[AddCommMonoid α]
[TopologicalSpace α]
{f g : β → α}
{a : α}
(hf : HasSum f a)
(h : ∀ (x : β), g x = f x)


@[to_additive (attr := simp)]
theorem ofList_symm : (@ofList α).symm = toList


protected theorem sub_eq_of_eq_add {a b c : Nat} (h : a = c + b) : a - b = c


theorem coe_period : (p : AddCircle p) = 0

{𝕜 : Type u_1}
[LinearOrderedAddCommGroup 𝕜]
(p : 𝕜)


/-- A constructor for morphisms in `ShortComplex C` when the commutativity conditions
are not obvious. -/
@[simps]
def homMk {S₁ S₂ : ShortComplex C} (τ₁ : S₁.X₁ ⟶ S₂.X₁) (τ₂ : S₁.X₂ ⟶ S₂.X₂)
    (τ₃ : S₁.X₃ ⟶ S₂.X₃) (comm₁₂ : τ₁ ≫ S₂.f = S₁.f ≫ τ₂)
    (comm₂₃ : τ₂ ≫ S₂.g = S₁.g ≫ τ₃) : S₁ ⟶ S₂

(comm₁₂ : CategoryTheory.CategoryStruct.comp τ₁ S₂.f = CategoryTheory.CategoryStruct.comp S₁.f τ₂)

(comm₂₃ : CategoryTheory.CategoryStruct.comp τ₂ S₂.g = CategoryTheory.CategoryStruct.comp S₁.g τ₃)

(CategoryTheory.ShortComplex.homMk τ₁ τ₂ τ₃ comm₁₂ comm₂₃).τ₂ = τ₂


@[to_additive]
theorem apply_eq_iff_symm_apply (e : M ≃* N) {x : M} {y : N} : e x = y ↔ x = e.symm y

{M : Type u_6}
{N : Type u_7}
[Mul M]
[Mul N]
(e : M ≃* N)
{x : M}
{y : N}


/-- An increasing union distributes over finite intersection. -/
theorem iUnion_iInter_of_monotone {ι ι' α : Type*} [Finite ι] [Preorder ι'] [IsDirected ι' (· ≤ ·)]
    [Nonempty ι'] {s : ι → ι' → Set α} (hs : ∀ i, Monotone (s i)) :
    ⋃ j : ι', ⋂ i : ι, s i j = ⋂ i : ι, ⋃ j : ι', s i j

{ι : Type u_1}
{ι' : Type u_2}
{α : Type u_3}
[Finite ι]
[Preorder ι']
[IsDirected ι' fun x x_1 => x ≤ x_1]
[Nonempty ι']
{s : ι → ι' → Set α}
(hs : ∀ (i : ι), Monotone (s i))


/-- Product of a list of elements in a subgroup is in the subgroup. -/
@[to_additive "Sum of a list of elements in an `AddSubgroup` is in the `AddSubgroup`."]
protected theorem list_prod_mem {l : List G} : (∀ x ∈ l, x ∈ K) → l.prod ∈ K

{G : Type u_1}
[AddGroup G]
(K : AddSubgroup G)
{l : List G}


/-- Let `t i` be a countable covering of `α` by measurable sets. Let `f i : t i → β` be a family of
functions that agree on the intersections `t i ∩ t j`. Then the function `Set.liftCover t f _ _`,
defined as `f i ⟨x, hx⟩` for `hx : x ∈ t i`, is measurable. -/
theorem measurable_liftCover [Countable ι] (t : ι → Set α) (htm : ∀ i, MeasurableSet (t i))
    (f : ∀ i, t i → β) (hfm : ∀ i, Measurable (f i))
    (hf : ∀ (i j) (x : α) (hxi : x ∈ t i) (hxj : x ∈ t j), f i ⟨x, hxi⟩ = f j ⟨x, hxj⟩)
    (htU : ⋃ i, t i = univ) :
    Measurable (liftCover t f hf htU)

(hf : ∀ (i j : ι) (x : α) (hxi : x ∈ t i) (hxj : x ∈ t j), f i ⟨x, hxi⟩ = f j ⟨x, hxj⟩)


@[to_additive (attr := simp)]
lemma map_comp_div [Group G] [DivisionMonoid H] [MonoidHomClass F G H] (f : F) (g h : ι → G) :
    f ∘ (g / h) = f ∘ g / f ∘ h

{ι : Type u_1}
{G : Type u_7}
{H : Type u_8}
{F : Type u_9}
[FunLike F G H]
[Group G]
[DivisionMonoid H]
[MonoidHomClass F G H]
(f : F)
(g h : ι → G)


/--
A (Grothendieck) pretopology on `C` consists of a collection of families of morphisms with a fixed
target `X` for every object `X` in `C`, called "coverings" of `X`, which satisfies the following
three axioms:
1. Every family consisting of a single isomorphism is a covering family.
2. The collection of covering families is stable under pullback.
3. Given a covering family, and a covering family on each domain of the former, the composition
   is a covering family.

In some sense, a pretopology can be seen as Grothendieck topology with weaker saturation conditions,
in that each covering is not necessarily downward closed.

See: https://ncatlab.org/nlab/show/Grothendieck+pretopology, or
https://stacks.math.columbia.edu/tag/00VH, or [MM92] Chapter III, Section 2, Definition 2.
Note that Stacks calls a category together with a pretopology a site, and [MM92] calls this
a basis for a topology.
-/
@[ext]
structure Pretopology where
  coverings : ∀ X : C, Set (Presieve X)
  has_isos : ∀ ⦃X Y⦄ (f : Y ⟶ X) [IsIso f], Presieve.singleton f ∈ coverings X
  pullbacks : ∀ ⦃X Y⦄ (f : Y ⟶ X) (S), S ∈ coverings X → pullbackArrows f S ∈ coverings Y
  transitive :
    ∀ ⦃X : C⦄ (S : Presieve X) (Ti : ∀ ⦃Y⦄ (f : Y ⟶ X), S f → Presieve Y),
      S ∈ coverings X → (∀ ⦃Y⦄ (f) (H : S f), Ti f H ∈ coverings Y) → S.bind Ti ∈ coverings X

{C : Type u}
[CategoryTheory.Category.{v, u} C]
[CategoryTheory.Limits.HasPullbacks C]
(self : CategoryTheory.Pretopology C)
⦃X Y : C⦄
(f : Y ⟶ X)
[CategoryTheory.IsIso f]

CategoryTheory.Presieve.singleton f ∈ self.coverings X


@[to_additive (attr := simp)]
theorem comp_inv (φ : G →* H) (ψ : M →* G) : φ.comp ψ⁻¹ = (φ.comp ψ)⁻¹

{M : Type u_3}
{G : Type u_6}
{H : Type u_7}
[MulOneClass M]
[CommGroup G]
[CommGroup H]
(φ : G →* H)
(ψ : M →* G)


theorem add_mul_left_right_iff : IsRelPrime x (y + x * z) ↔ IsRelPrime x y


/-- The product of elements of a submonoid of a `CommMonoid` indexed by a `Finset` is an element
of the submonoid. -/
@[to_additive
      "The sum of elements of an `AddSubmonoid` of an `AddCommMonoid` indexed by
      a `Finset` is an element of the `AddSubmonoid`."]
theorem finset_prod_mem {M A} [CommMonoid M] {s : Set M} (hs : IsSubmonoid s) (f : A → M) :
    ∀ t : Finset A, (∀ b ∈ t, f b ∈ s) → (∏ b ∈ t, f b) ∈ s

{M : Type u_3}
{A : Type u_4}
[AddCommMonoid M]
{s : Set M}
(hs : IsAddSubmonoid s)
(f : A → M)
(t : Finset A)


/-- The integral of `f (R • x)` with respect to an additive Haar measure is a multiple of the
integral of `f`. The formula we give works even when `f` is not integrable or `R = 0`
thanks to the convention that a non-integrable function has integral zero. -/
theorem integral_comp_smul (f : E → F) (R : ℝ) :
    ∫ x, f (R • x) ∂μ = |(R ^ finrank ℝ E)⁻¹| • ∫ x, f x ∂μ

{E : Type u_1}
[NormedAddCommGroup E]
[NormedSpace ℝ E]
[MeasurableSpace E]
[BorelSpace E]
[FiniteDimensional ℝ E]
(μ : MeasureTheory.Measure E)
[μ.IsAddHaarMeasure]
{F : Type u_2}
[NormedAddCommGroup F]
[NormedSpace ℝ F]
(f : E → F)
(R : ℝ)

∫ (x : E), f (R • x) ∂μ = |(R ^ FiniteDimensional.finrank ℝ E)⁻¹| • ∫ (x : E), f x ∂μ


theorem Ideal.IsHomogeneous.toIdeal_homogeneousHull_eq_self (h : I.IsHomogeneous 𝒜) :
    (Ideal.homogeneousHull 𝒜 I).toIdeal = I

{ι : Type u_1}
{σ : Type u_2}
{A : Type u_4}
[Semiring A]
[DecidableEq ι]
[AddMonoid ι]
[SetLike σ A]
[AddSubmonoidClass σ A]
{𝒜 : ι → σ}
[GradedRing 𝒜]
{I : Ideal A}
(h : Ideal.IsHomogeneous 𝒜 I)


/--
If `g` and `h` commute, then `g` fixes `h • x` iff `g` fixes `x`.
This is equivalent to say that the set `fixedBy α g` is fixed by `h`.
-/
@[to_additive "If `g` and `h` commute, then `g` fixes `h +ᵥ x` iff `g` fixes `x`.
This is equivalent to say that the set `fixedBy α g` is fixed by `h`.
"]
theorem fixedBy_mem_fixedBy_of_commute {g h : G} (comm : Commute g h) :
    (fixedBy α g) ∈ fixedBy (Set α) h

{α : Type u_1}
{G : Type u_2}
[AddGroup G]
[AddAction G α]
{g h : G}
(comm : AddCommute g h)

AddAction.fixedBy α g ∈ AddAction.fixedBy (Set α) h


theorem adjoin_eq_of_le (S : Subalgebra R A) (h₁ : s ⊆ S) (h₂ : S ≤ adjoin R s) : adjoin R s = S

{R : Type uR}
{A : Type uA}
[CommSemiring R]
[Semiring A]
[Algebra R A]
{s : Set A}
(S : Subalgebra R A)
(h₁ : s ⊆ ↑S)
(h₂ : S ≤ Algebra.adjoin R s)


theorem fderiv_snd : fderiv 𝕜 Prod.snd p = snd 𝕜 E F

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{F : Type u_3}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{p : E × F}

fderiv 𝕜 Prod.snd p = ContinuousLinearMap.snd 𝕜 E F


protected theorem mul_sub_left_distrib (n m k : Nat) : n * (m - k) = n * m - n * k


@[simp]
theorem reflect_monomial (N n : ℕ) : reflect N ((X : R[X]) ^ n) = X ^ revAt N n

Polynomial.reflect N (Polynomial.X ^ n) = Polynomial.X ^ (Polynomial.revAt N) n


@[simp]
theorem realize_exs {φ : L.BoundedFormula α n} {v : α → M} :
    φ.exs.Realize v ↔ ∃ xs : Fin n → M, φ.Realize v xs

{L : FirstOrder.Language}
{M : Type w}
[L.Structure M]
{α : Type u'}
{n : ℕ}
{φ : L.BoundedFormula α n}
{v : α → M}


lemma coborder_eq_univ_iff :
    coborder s = univ ↔ IsClosed s

{X : Type u_1}
[TopologicalSpace X]
{s : Set X}


@[simp]
theorem join₁_rename (f : σ → MvPolynomial τ R) (φ : MvPolynomial σ R) :
    join₁ (rename f φ) = bind₁ f φ

{σ : Type u_1}
{τ : Type u_2}
{R : Type u_3}
[CommSemiring R]
(f : σ → MvPolynomial τ R)
(φ : MvPolynomial σ R)

MvPolynomial.join₁ ((MvPolynomial.rename f) φ) = (MvPolynomial.bind₁ f) φ


theorem eq_of_uniformity {α : Type*} [UniformSpace α] [T0Space α] {x y : α}
    (h : ∀ {V}, V ∈ 𝓤 α → (x, y) ∈ V) : x = y

(h : ∀ {V : Set (α × α)}, V ∈ 𝓤 α → (x, y) ∈ V)


@[gcongr]
theorem toReal_strict_mono (hb : b ≠ ∞) (h : a < b) : a.toReal < b.toReal


theorem mul_le_left {x y : I} : x * y ≤ x


@[simp]
theorem mk'_spec' (x) (y : M) : algebraMap R S y * mk' S x y = algebraMap R S x

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

(algebraMap R S) ↑y * IsLocalization.mk' S x y = (algebraMap R S) x


theorem isComplete_map_iff' [SemilinearIsometryClass 𝓕 σ₁₂ E E₂] (f : 𝓕) [RingHomSurjective σ₁₂]
    {p : Submodule R E} : IsComplete (p.map f : Set E₂) ↔ IsComplete (p : Set E)

{R : Type u_1}
{R₂ : Type u_2}
{E : Type u_5}
{E₂ : Type u_6}
{𝓕 : Type u_10}
[Semiring R]
[Semiring R₂]
{σ₁₂ : R →+* R₂}
[SeminormedAddCommGroup E]
[SeminormedAddCommGroup E₂]
[Module R E]
[Module R₂ E₂]
[FunLike 𝓕 E E₂]
[SemilinearIsometryClass 𝓕 σ₁₂ E E₂]
(f : 𝓕)
[RingHomSurjective σ₁₂]
{p : Submodule R E}

IsComplete ↑(Submodule.map f p) ↔ IsComplete ↑p


/-- A typeclass for subrings invariant under a `MulSemiringAction`. -/
class IsInvariantSubfield (S : Subfield F) : Prop where
  smul_mem : ∀ (m : M) {x : F}, x ∈ S → m • x ∈ S

{M : Type u}
[Monoid M]
{F : Type v}
[Field F]
[MulSemiringAction M F]
{S : Subfield F}
[self : IsInvariantSubfield M S]
(m : M)
{x : F}


/-- A continuous linear image of a bounded set is bounded. -/
theorem IsVonNBounded.image {σ : 𝕜₁ →+* 𝕜₂} [RingHomSurjective σ] [RingHomIsometric σ] {s : Set E}
    (hs : IsVonNBounded 𝕜₁ s) (f : E →SL[σ] F) : IsVonNBounded 𝕜₂ (f '' s)

{E : Type u_3}
{F : Type u_5}
{𝕜₁ : Type u_7}
{𝕜₂ : Type u_8}
[NormedDivisionRing 𝕜₁]
[NormedDivisionRing 𝕜₂]
[AddCommGroup E]
[Module 𝕜₁ E]
[AddCommGroup F]
[Module 𝕜₂ F]
[TopologicalSpace E]
[TopologicalSpace F]
{σ : 𝕜₁ →+* 𝕜₂}
[RingHomSurjective σ]
[RingHomIsometric σ]
{s : Set E}
(hs : Bornology.IsVonNBounded 𝕜₁ s)
(f : E →SL[σ] F)


theorem filterMap_filterMap (f : α → Option β) (g : β → Option γ) (s : Multiset α) :
    filterMap g (filterMap f s) = filterMap (fun x => (f x).bind g) s

{α : Type u_1}
{β : Type v}
{γ : Type u_2}
(f : α → Option β)
(g : β → Option γ)
(s : Multiset α)

Multiset.filterMap g (Multiset.filterMap f s) = Multiset.filterMap (fun x => (f x).bind g) s


@[simp]
theorem mem_divisors {m : ℕ} : n ∈ divisors m ↔ n ∣ m ∧ m ≠ 0


/-- An antitone function continuous at the infimum of a nonempty set sends this infimum to
the supremum of the image of this set. -/
theorem Antitone.map_sInf_of_continuousAt' {f : α → β} {A : Set α} (Cf : ContinuousAt f (sInf A))
    (Af : Antitone f) (A_nonemp : A.Nonempty) (A_bdd : BddBelow A := by bddDefault) :
    f (sInf A) = sSup (f '' A)

{α : Type u_1}
{β : Type u_2}
[ConditionallyCompleteLinearOrder α]
[TopologicalSpace α]
[OrderTopology α]
[ConditionallyCompleteLinearOrder β]
[TopologicalSpace β]
[OrderClosedTopology β]
{f : α → β}
{A : Set α}
(Cf : ContinuousAt f (sInf A))
(Af : Antitone f)
(A_nonemp : A.Nonempty)
(A_bdd : BddBelow A := by bddDefault)


theorem IsClopenable.compl [TopologicalSpace α] {s : Set α} (hs : IsClopenable s) :
    IsClopenable sᶜ

{α : Type u_1}
[TopologicalSpace α]
{s : Set α}
(hs : PolishSpace.IsClopenable s)


theorem ext_on_codisjoint {f g : F} {S T : Submodule R M} (hST : Codisjoint S T)
    (hS : Set.EqOn f g S) (hT : Set.EqOn f g T) : f = g

{R : Type u_1}
{R₂ : Type u_2}
{M : Type u_3}
{M₂ : Type u_4}
[Semiring R]
[Semiring R₂]
[AddCommMonoid M]
[AddCommMonoid M₂]
[Module R M]
[Module R₂ M₂]
{τ₁₂ : R →+* R₂}
{F : Type u_5}
[FunLike F M M₂]
[SemilinearMapClass F τ₁₂ M M₂]
{f g : F}
{S T : Submodule R M}
(hST : Codisjoint S T)
(hS : Set.EqOn ⇑f ⇑g ↑S)
(hT : Set.EqOn ⇑f ⇑g ↑T)


theorem Iso.conj_ρ {V W : FDRep k G} (i : V ≅ W) (g : G) :
    W.ρ g = (FDRep.isoToLinearEquiv i).conj (V.ρ g)

{k G : Type u}
[Field k]
[Monoid G]
{V W : FDRep k G}
(i : V ≅ W)
(g : G)


/-- Forgetting that maps are total and making them total again by adding a point is the same as just
adding a point. -/
@[simps!]
noncomputable def typeToPartialFunIsoPartialFunToPointed :
    typeToPartialFun ⋙ partialFunToPointed ≅ typeToPointed

(X : Type u_3)
(a : (typeToPointed.obj X).X)

(typeToPartialFunIsoPartialFunToPointed.inv.app X).toFun a = a


theorem toLinearMap_injective {f g : M →ₑ+[σ.toMonoidHom] M₂}
    (h : (f : M →ₛₗ[σ] M₂) = (g : M →ₛₗ[σ] M₂)) :
    f = g

{R : Type u_1}
{S : Type u_6}
{M : Type u_9}
{M₂ : Type u_11}
[AddCommMonoid M]
[AddCommMonoid M₂]
[Semiring R]
[Module R M]
[Semiring S]
[Module S M₂]
{σ : R →+* S}
{f g : M →ₑ+[↑σ] M₂}
(h : ↑f = ↑g)


@[reassoc (attr := simp)]
lemma π_mapOfIsColimit {cc : CokernelCofork f} (hf : IsColimit cc) (cc' : CokernelCofork f')
    (φ : Arrow.mk f ⟶ Arrow.mk f') :
    cc.π ≫ mapOfIsColimit hf cc' φ = φ.right ≫ cc'.π

{cc : CategoryTheory.Limits.CokernelCofork f}

(hf : CategoryTheory.Limits.IsColimit cc)

(cc' : CategoryTheory.Limits.CokernelCofork f')

(φ : CategoryTheory.Arrow.mk f ⟶ CategoryTheory.Arrow.mk f')

CategoryTheory.Limits.Cofork.π cc ≫ CategoryTheory.Limits.CokernelCofork.mapOfIsColimit hf cc' φ =
  φ.right ≫ CategoryTheory.Limits.Cofork.π cc'


/-- The equivalence between the category of elements `F.Elements`
    and the comma category `(*, F)`. -/
@[simps! functor_obj functor_map inverse_obj inverse_map unitIso_hom
  unitIso_inv counitIso_hom counitIso_inv]
def structuredArrowEquivalence : F.Elements ≌ StructuredArrow PUnit F

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

(CategoryTheory.CategoryOfElements.structuredArrowEquivalence F).counitIso.hom =
  { app := fun X => (CategoryTheory.StructuredArrow.isoMk (CategoryTheory.Iso.refl X.right) ⋯).hom, naturality := ⋯ }


@[simp]
theorem realize_iff : (φ.iff ψ).Realize v ↔ (φ.Realize v ↔ ψ.Realize v)

{L : FirstOrder.Language}
{M : Type w}
[L.Structure M]
{α : Type u'}
{φ ψ : L.Formula α}
{v : α → M}


theorem next_of_valid (cs : List Char) (c : Char) (cs' : List Char) :
    next ⟨cs ++ c :: cs'⟩ ⟨utf8Len cs⟩ = ⟨utf8Len cs + c.utf8Size⟩

{ data := cs ++ c :: cs' }.next { byteIdx := String.utf8Len cs } = { byteIdx := String.utf8Len cs + c.utf8Size }


@[simp]
theorem swap_comp_bipointedToPointedFst :
    Bipointed.swap ⋙ bipointedToPointedFst = bipointedToPointedSnd


@[simp]
theorem tripolar_eq_polar (s : Set E) : B.polar (B.flip.polar (B.polar s)) = B.polar s

{𝕜 : Type u_1}
{E : Type u_2}
{F : Type u_3}
[NormedCommRing 𝕜]
[AddCommMonoid E]
[AddCommMonoid F]
[Module 𝕜 E]
[Module 𝕜 F]
(B : E →ₗ[𝕜] F →ₗ[𝕜] 𝕜)
(s : Set E)


@[simp]
theorem toNNRat_zero : toNNRat 0 = 0


@[to_additive]
theorem prod_sum_index {ι₁ : Type u₁} [DecidableEq ι₁] {β₁ : ι₁ → Type v₁} [∀ i₁, Zero (β₁ i₁)]
    [∀ (i) (x : β₁ i), Decidable (x ≠ 0)] [∀ i, AddCommMonoid (β i)]
    [∀ (i) (x : β i), Decidable (x ≠ 0)] [CommMonoid γ] {f : Π₀ i₁, β₁ i₁}
    {g : ∀ i₁, β₁ i₁ → Π₀ i, β i} {h : ∀ i, β i → γ} (h_zero : ∀ i, h i 0 = 1)
    (h_add : ∀ i b₁ b₂, h i (b₁ + b₂) = h i b₁ * h i b₂) :
    (f.sum g).prod h = f.prod fun i b => (g i b).prod h

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

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

{g : (i₁ : ι₁) → β₁ i₁ → Π₀ (i : ι), β i}

(h_add : ∀ (i : ι) (b₁ b₂ : β i), h i (b₁ + b₂) = h i b₁ + h i b₂)

(f.sum g).sum h = f.sum fun i b => (g i b).sum h


/-- Extensionality of the `IsAdjoinRoot` structure itself. See `IsAdjoinRootMonic.ext_elem`
for extensionality of the ring elements. -/
@[ext]
theorem ext (h h' : IsAdjoinRoot S f) (eq : h.root = h'.root) : h = h'

{R : Type u}
{S : Type v}
[CommRing R]
[Ring S]
{f : R[X]}
[Algebra R S]
(h h' : IsAdjoinRoot S f)
(eq : h.root = h'.root)


@[to_additive]
theorem nhds_one_symm : comap Inv.inv (𝓝 (1 : G)) = 𝓝 (1 : G)

(G : Type w)
[TopologicalSpace G]
[Group G]
[TopologicalGroup G]


@[simp]
theorem _root_.AffineEquiv.sSameSide_map_iff {s : AffineSubspace R P} {x y : P} (f : P ≃ᵃ[R] P') :
    (s.map ↑f).SSameSide (f x) (f y) ↔ s.SSameSide x y

{R : Type u_1}
{V : Type u_2}
{V' : Type u_3}
{P : Type u_4}
{P' : Type u_5}
[StrictOrderedCommRing R]
[AddCommGroup V]
[Module R V]
[AddTorsor V P]
[AddCommGroup V']
[Module R V']
[AddTorsor V' P']
{s : AffineSubspace R P}
{x y : P}
(f : P ≃ᵃ[R] P')

(AffineSubspace.map (↑f) s).SSameSide (f x) (f y) ↔ s.SSameSide x y


@[simp]
theorem coe_const' : (const' : Y → C(X, Y)) = const X

{X : Type u_2}
{Y : Type u_3}
[TopologicalSpace X]
[TopologicalSpace Y]

⇑ContinuousMap.const' = ContinuousMap.const X


/-- The top subsemigroup is isomorphic to the semigroup. -/
@[to_additive (attr := simps)
  "The top additive subsemigroup is isomorphic to the additive semigroup."]
def topEquiv : (⊤ : Subsemigroup M) ≃* M


/-- A homeomorphism of spaces gives an equivalence of categories of presheaves. -/
@[simps!]
def presheafEquivOfIso {X Y : TopCat} (H : X ≅ Y) : X.Presheaf C ≌ Y.Presheaf C

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

∀ (X_1 : (TopologicalSpace.Opens ↑X)ᵒᵖ ⥤ C) (X_2 : (TopologicalSpace.Opens ↑X)ᵒᵖ),
  ((TopCat.Presheaf.presheafEquivOfIso C H).unitIso.hom.app X_1).app X_2 =
    X_1.map ((TopologicalSpace.Opens.mapMapIso H).symm.op.unit.app X_2) ≫
      X_1.map
          ((TopologicalSpace.Opens.map H.hom).map
              ((TopologicalSpace.Opens.mapMapIso H).symm.op.counitInv.app
                  (Opposite.op ((TopologicalSpace.Opens.map H.inv).obj (Opposite.unop X_2)))).unop).op ≫
        X_1.map
          ((TopologicalSpace.Opens.mapMapIso H).symm.op.unitInv.app
            (Opposite.op
              ((TopologicalSpace.Opens.map H.hom).obj ((TopologicalSpace.Opens.map H.inv).obj (Opposite.unop X_2)))))


@[to_additive]
theorem continuousOn_zpow {s : Set G} (z : ℤ) : ContinuousOn (fun x => x ^ z) s

{G : Type w}
[TopologicalSpace G]
[AddGroup G]
[TopologicalAddGroup G]
{s : Set G}
(z : ℤ)


theorem roots_eq_zero_iff [IsSepClosed k] {p : k[X]} (hsep : p.Separable) :
    p.roots = 0 ↔ p = Polynomial.C (p.coeff 0)

{k : Type u}
[Field k]
[IsSepClosed k]
{p : k[X]}
(hsep : p.Separable)


theorem gcd_b_eq : b = gcdB' a b * gcd a b


protected theorem compare_ne_gt {a b : Nat} : compare a b ≠ .gt ↔ a ≤ b


lemma neg_gcd [NormalizedGCDMonoid α] {a b : α} : gcd (-a) b = gcd a b

{α : Type u_1}
[CancelCommMonoidWithZero α]
[HasDistribNeg α]
[NormalizedGCDMonoid α]
{a b : α}


/-- An ideal equals its Jacobson radical iff it is the intersection of a set of maximal ideals.
Allowing the set to include ⊤ is equivalent, and is included only to simplify some proofs. -/
theorem eq_jacobson_iff_sInf_maximal :
    I.jacobson = I ↔ ∃ M : Set (Ideal R), (∀ J ∈ M, IsMaximal J ∨ J = ⊤) ∧ I = sInf M

I.jacobson = I ↔ ∃ M, (∀ J ∈ M, J.IsMaximal ∨ J = ⊤) ∧ I = sInf M


@[simp]
lemma comapRight_id (κ : Kernel α β) : comapRight κ MeasurableEmbedding.id = κ

{α : Type u_1}
{β : Type u_2}
{mα : MeasurableSpace α}
{mβ : MeasurableSpace β}
(κ : ProbabilityTheory.Kernel α β)


theorem rightMoves_mul :
    ∀ x y : PGame.{u},
      (x * y).RightMoves = (x.LeftMoves × y.RightMoves ⊕ x.RightMoves × y.LeftMoves)


/-- Write out `B x y` as a sum over `B (b i) (b j)` if `b` is a basis.

Version for semi-bilinear maps, see `sum_repr_mul_repr_mul` for the bilinear version. -/
theorem sum_repr_mul_repr_mulₛₗ {B : M →ₛₗ[ρ₁₂] N →ₛₗ[σ₁₂] P} (x y) :
    ((b₁.repr x).sum fun i xi => (b₂.repr y).sum fun j yj => ρ₁₂ xi • σ₁₂ yj • B (b₁ i) (b₂ j)) =
      B x y

{ι₁ : Type u_1}
{ι₂ : Type u_2}
{R : Type u_3}
{R₂ : Type u_4}
{S : Type u_5}
{S₂ : Type u_6}
{M : Type u_7}
{N : Type u_8}
{P : Type u_9}
[Semiring R]
[Semiring S]
[Semiring R₂]
[Semiring S₂]
[AddCommMonoid M]
[AddCommMonoid N]
[AddCommMonoid P]
[Module R M]
[Module S N]
[Module R₂ P]
[Module S₂ P]
[SMulCommClass S₂ R₂ P]
{ρ₁₂ : R →+* R₂}
{σ₁₂ : S →+* S₂}
(b₁ : Basis ι₁ R M)
(b₂ : Basis ι₂ S N)
{B : M →ₛₗ[ρ₁₂] N →ₛₗ[σ₁₂] P}
(x : M)
(y : N)

((b₁.repr x).sum fun i xi => (b₂.repr y).sum fun j yj => ρ₁₂ xi • σ₁₂ yj • (B (b₁ i)) (b₂ j)) = (B x) y


theorem join_ne_none : x.join ≠ none ↔ ∃ z, x = some (some z)

∀ {α : Type u_1} {x : Option (Option α)}, x.join ≠ none ↔ ∃ z, x = some (some z)


@[to_additive (attr := simp)]
theorem coprodAssoc_symm_apply_inl (x : M) : (coprodAssoc M N P).symm (inl x) = inl (inl x)

{M : Type u_1}
{N : Type u_2}
{P : Type u_3}
[Monoid M]
[Monoid N]
[Monoid P]
(x : M)

(Monoid.MulEquiv.coprodAssoc M N P).symm (Monoid.Coprod.inl x) = Monoid.Coprod.inl (Monoid.Coprod.inl x)


@[simp]
theorem coe_equivMapOfInjective_apply (f : R →+* S) (hf : Function.Injective f) (x : s) :
    (equivMapOfInjective s f hf x : S) = f x

{R : Type u}
{S : Type v}
[NonAssocSemiring R]
[NonAssocSemiring S]
(s : Subsemiring R)
(f : R →+* S)
(hf : Function.Injective ⇑f)
(x : ↥s)

↑((s.equivMapOfInjective f hf) x) = f ↑x


/-- If a sequence of peak functions `φᵢ` converges uniformly to zero away from a point `x₀` and its
integral on some finite-measure neighborhood of `x₀` converges to `1`, and `g` is integrable and
has a limit `a` at `x₀`, then `∫ φᵢ • g` converges to `a`. -/
theorem tendsto_integral_peak_smul_of_integrable_of_tendsto
    {t : Set α} (ht : MeasurableSet t) (h'ts : t ∈ 𝓝 x₀)
    (h't : μ t ≠ ∞) (hnφ : ∀ᶠ i in l, ∀ x, 0 ≤ φ i x)
    (hlφ : ∀ u : Set α, IsOpen u → x₀ ∈ u → TendstoUniformlyOn φ 0 l uᶜ)
    (hiφ : Tendsto (fun i ↦ ∫ x in t, φ i x ∂μ) l (𝓝 1))
    (h'iφ : ∀ᶠ i in l, AEStronglyMeasurable (φ i) μ)
    (hmg : Integrable g μ) (hcg : Tendsto g (𝓝 x₀) (𝓝 a)) :
    Tendsto (fun i : ι ↦ ∫ x, φ i x • g x ∂μ) l (𝓝 a)

{φ : ι → α → ℝ}

(hnφ : ∀ᶠ (i : ι) in l, ∀ (x : α), 0 ≤ φ i x)

(hlφ : ∀ (u : Set α), IsOpen u → x₀ ∈ u → TendstoUniformlyOn φ 0 l uᶜ)

(hiφ : Filter.Tendsto (fun i => ∫ (x : α) in t, φ i x ∂μ) l (𝓝 1))

(h'iφ : ∀ᶠ (i : ι) in l, MeasureTheory.AEStronglyMeasurable (φ i) μ)

Filter.Tendsto (fun i => ∫ (x : α), φ i x • g x ∂μ) l (𝓝 a)


theorem sep_empty (p : α → Prop) : { x ∈ (∅ : Set α) | p x } = ∅


theorem Antiperiodic.nat_odd_mul_antiperiodic [Semiring α] [InvolutiveNeg β] (h : Antiperiodic f c)
    (n : ℕ) : Antiperiodic f (n * (2 * c) + c)

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

Function.Antiperiodic f (↑n * (2 * c) + c)


@[simp]
theorem zero_oreDiv (s : S) : (0 : X) /ₒ s = 0

{R : Type u_1}
[Monoid R]
{S : Submonoid R}
[OreLocalization.OreSet S]
{X : Type u_2}
[AddMonoid X]
[DistribMulAction R X]
(s : ↥S)


/-- An instance of `VAddAssocClass M N α` states that the additive action of `M` on `α` is
determined by the additive actions of `M` on `N` and `N` on `α`. -/
class VAddAssocClass (M N α : Type*) [VAdd M N] [VAdd N α] [VAdd M α] : Prop where
  /-- Associativity of `+ᵥ` -/
  vadd_assoc : ∀ (x : M) (y : N) (z : α), x +ᵥ y +ᵥ z = x +ᵥ (y +ᵥ z)

{M : Type u_11}
{N : Type u_12}
{α : Type u_13}
[VAdd M N]
[VAdd N α]
[VAdd M α]
[self : VAddAssocClass M N α]
(x : M)
(y : N)
(z : α)


@[simp]
theorem mem_rangeS {f : R →+* S} {y : S} : y ∈ f.rangeS ↔ ∃ x, f x = y

{R : Type u}
{S : Type v}
[NonAssocSemiring R]
[NonAssocSemiring S]
{f : R →+* S}
{y : S}


theorem Ioi_toDual (a : α) : Ioi (toDual a) = (Iio a).map toDual.toEmbedding

{α : Type u_1}
[Preorder α]
[LocallyFiniteOrderBot α]
(a : α)

Finset.Ioi (OrderDual.toDual a) = Finset.map OrderDual.toDual.toEmbedding (Finset.Iio a)


@[simp]
theorem tprod_apply {n : ℕ} (x : Fin n → M) : tprod R M n x = (List.ofFn fun i => ι R (x i)).prod

(R : Type u_1)
[CommSemiring R]
(M : Type u_2)
[AddCommMonoid M]
[Module R M]
{n : ℕ}
(x : Fin n → M)

(TensorAlgebra.tprod R M n) x = (List.ofFn fun i => (TensorAlgebra.ι R) (x i)).prod


theorem dom_dioph {f : (α → ℕ) →. ℕ} (d : DiophPFun f) : Dioph f.Dom

{α : Type u}
{f : (α → ℕ) →. ℕ}
(d : Dioph.DiophPFun f)


@[simp]
theorem rpow_eq_pow (x : ℝ≥0) (y : ℝ) : rpow x y = x ^ y


theorem tsum_measure_le_measure_univ {s : ι → Set α} (hs : ∀ i, NullMeasurableSet (s i) μ)
    (H : Pairwise (AEDisjoint μ on s)) : ∑' i, μ (s i) ≤ μ (univ : Set α)

(hs : ∀ (i : ι), MeasureTheory.NullMeasurableSet (s i) μ)

(H : Pairwise (MeasureTheory.AEDisjoint μ on s))


@[simp]
theorem NormedAddGroupHom.completion_coe' (f : NormedAddGroupHom G H) (g : G) :
    Completion.map f g = f g

{G : Type u_1}
[SeminormedAddCommGroup G]
{H : Type u_2}
[SeminormedAddCommGroup H]
(f : NormedAddGroupHom G H)
(g : G)

UniformSpace.Completion.map (⇑f) (↑G g) = ↑H (f g)


@[simp]
theorem sr_mul_r (i j : ZMod n) : sr i * r j = sr (i + j)

DihedralGroup.sr i * DihedralGroup.r j = DihedralGroup.sr (i + j)


/-- A minimal polynomial is not a unit. -/
theorem not_isUnit [Nontrivial B] : ¬IsUnit (minpoly A x)

(A : Type u_1)
{B : Type u_2}
[CommRing A]
[Ring B]
[Algebra A B]
(x : B)
[Nontrivial B]


theorem injective_iff_projective_op {J : C} : Injective J ↔ Projective (op J)

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

CategoryTheory.Injective J ↔ CategoryTheory.Projective (Opposite.op J)


@[simp, norm_cast]
theorem coe_inf (μ ν : YoungDiagram) : ↑(μ ⊓ ν) = (μ ∩ ν : Set (ℕ × ℕ))

↑(μ ⊓ ν) = ↑μ ∩ ↑ν


theorem sin_add_pi_div_two (x : ℂ) : sin (x + π / 2) = cos x

Complex.sin (x + ↑Real.pi / 2) = Complex.cos x


@[simp]
theorem coe_codRestrict (f : F) (S : NonUnitalSubalgebra R B) (hf : ∀ x, f x ∈ S) (x : A) :
    ↑(NonUnitalAlgHom.codRestrict f S hf x) = f x

{F : Type v'}
{R : Type u}
{A : Type v}
{B : Type w}
[CommSemiring R]
[NonUnitalNonAssocSemiring A]
[Module R A]
[NonUnitalNonAssocSemiring B]
[Module R B]
[FunLike F A B]
[NonUnitalAlgHomClass F R A B]
(f : F)
(S : NonUnitalSubalgebra R B)
(hf : ∀ (x : A), f x ∈ S)
(x : A)

↑((NonUnitalAlgHom.codRestrict f S hf) x) = f x


/-- In the space `ι → ℝ`, the Hausdorff measure coincides exactly with the Lebesgue measure. -/
@[simp]
theorem hausdorffMeasure_pi_real {ι : Type*} [Fintype ι] :
    (μH[Fintype.card ι] : Measure (ι → ℝ)) = volume

μH[↑(Fintype.card ι)] = MeasureTheory.volume


theorem lift_two_power (a : Cardinal) : lift.{v} (2 ^ a) = 2 ^ lift.{v} a

Cardinal.lift.{v, u_1} (2 ^ a) = 2 ^ Cardinal.lift.{v, u_1} a


theorem ContDiff.iteratedFDeriv_right {i : ℕ} (hf : ContDiff 𝕜 n f)
    (hmn : (m + i : ℕ∞) ≤ n) : ContDiff 𝕜 m (iteratedFDeriv 𝕜 i f)

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


@[simp]
theorem rightZigzagIso_inv : (rightZigzagIso η ε).inv = leftZigzag ε.inv η.inv

(η : CategoryTheory.CategoryStruct.id a ≅ CategoryTheory.CategoryStruct.comp f g)

(ε : CategoryTheory.CategoryStruct.comp g f ≅ CategoryTheory.CategoryStruct.id b)

(CategoryTheory.Bicategory.rightZigzagIso η ε).inv = CategoryTheory.Bicategory.leftZigzag ε.inv η.inv


@[to_additive (attr := simp)]
theorem empty_div : ∅ / s = ∅


theorem FactorSet.unique [Nontrivial α] {p q : FactorSet α} (h : p.prod = q.prod) : p = q

{α : Type u_1}
[CancelCommMonoidWithZero α]
[UniqueFactorizationMonoid α]
[Nontrivial α]
{p q : Associates.FactorSet α}
(h : p.prod = q.prod)


theorem invariants_le (f : α → α) : invariants f ≤ ‹MeasurableSpace α›

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


/-- In a metric space, the minimal edistance to a nonempty set is finite. -/
theorem infEdist_ne_top (h : s.Nonempty) : infEdist x s ≠ ⊤

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


/-- Deprecated. Use `map_continuousAt` instead. -/
protected theorem continuousAt (f : C(α, β)) (x : α) : ContinuousAt f x

{α : Type u_1}
{β : Type u_2}
[TopologicalSpace α]
[TopologicalSpace β]
(f : C(α, β))
(x : α)


@[to_additive (attr := simp)]
theorem conj_iff {a x y b : G} :
    SemiconjBy (b * a * b⁻¹) (b * x * b⁻¹) (b * y * b⁻¹) ↔ SemiconjBy a x y


@[to_additive (attr := simp)]
theorem prod_ite_mem [DecidableEq α] (s t : Finset α) (f : α → β) :
    ∏ i ∈ s, (if i ∈ t then f i else 1) = ∏ i ∈ s ∩ t, f i

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

(∑ i ∈ s, if i ∈ t then f i else 0) = ∑ i ∈ s ∩ t, f i


theorem isUnit_leadingCoeff_mul_right_eq_zero_iff (h : IsUnit p.leadingCoeff) {q : R[X]} :
    p * q = 0 ↔ q = 0

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


@[simp]
theorem isReal_of_mk_isReal {φ : K →+* ℂ} (h : IsReal (mk φ)) :
    ComplexEmbedding.IsReal φ

(h : (NumberField.InfinitePlace.mk φ).IsReal)


theorem HasMFDerivWithinAt.mul (hp : HasMFDerivWithinAt I 𝓘(𝕜, F') p s z p')
    (hq : HasMFDerivWithinAt I 𝓘(𝕜, F') q s z q') :
    HasMFDerivWithinAt I 𝓘(𝕜, F') (p * q) s z (p z • q' + q z • p' : E →L[𝕜] F')

HasMFDerivWithinAt I 𝓘(𝕜, F') (p * q) s z (p z • q' + q z • p')


theorem codRestrict_ker {f : M →ₗ[S] M} (h : IsProj m f) : ker h.codRestrict = ker f

{S : Type u_5}
[Semiring S]
{M : Type u_6}
[AddCommMonoid M]
[Module S M]
{m : Submodule S M}
{f : M →ₗ[S] M}
(h : LinearMap.IsProj m f)

LinearMap.ker h.codRestrict = LinearMap.ker f


/-- Translating a function by right-multiplication does not change its Lebesgue integral
with respect to a right-invariant measure. -/
@[to_additive
      "Translating a function by right-addition does not change its Lebesgue integral with
      respect to a right-invariant measure."]
theorem lintegral_mul_right_eq_self [IsMulRightInvariant μ] (f : G → ℝ≥0∞) (g : G) :
    (∫⁻ x, f (x * g) ∂μ) = ∫⁻ x, f x ∂μ

{G : Type u_1}
[MeasurableSpace G]
{μ : MeasureTheory.Measure G}
[AddGroup G]
[MeasurableAdd G]
[μ.IsAddRightInvariant]
(f : G → ENNReal)
(g : G)

∫⁻ (x : G), f (x + g) ∂μ = ∫⁻ (x : G), f x ∂μ


@[simp]
theorem mem_top : J ∈ (⊤ : Prepartition I) ↔ J = I

{ι : Type u_1}
{I J : BoxIntegral.Box ι}


theorem Trivialization.contMDiffAt_iff {f : M → TotalSpace F E} {x₀ : M} (he : f x₀ ∈ e.source) :
    ContMDiffAt IM (IB.prod 𝓘(𝕜, F)) n f x₀ ↔
      ContMDiffAt IM IB n (fun x => (f x).proj) x₀ ∧
      ContMDiffAt IM 𝓘(𝕜, F) n (fun x ↦ (e (f x)).2) x₀

[TopologicalSpace (Bundle.TotalSpace F E)]

{e : Trivialization F Bundle.TotalSpace.proj}

ContMDiffAt IM (IB.prod 𝓘(𝕜, F)) n f x₀ ↔
  ContMDiffAt IM IB n (fun x => (f x).proj) x₀ ∧ ContMDiffAt IM 𝓘(𝕜, F) n (fun x => (↑e (f x)).2) x₀


theorem Integrable.re (hf : Integrable f μ) : Integrable (fun x => RCLike.re (f x)) μ

{α : Type u_1}
{m : MeasurableSpace α}
{μ : MeasureTheory.Measure α}
{𝕜 : Type u_5}
[RCLike 𝕜]
{f : α → 𝕜}
(hf : MeasureTheory.Integrable f μ)

MeasureTheory.Integrable (fun x => RCLike.re (f x)) μ


@[simp]
theorem LieSubalgebra.topEquiv_apply (x : (⊤ : LieSubalgebra R L)) : LieSubalgebra.topEquiv x = x

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


theorem degree_eq_weight_one :
    degree (σ := σ) = weight 1


theorem orderEmbOfCardLe_mem (s : Finset α) {k : ℕ} (h : k ≤ s.card) (a) :
    orderEmbOfCardLe s h a ∈ s

{α : Type u_1}
[LinearOrder α]
(s : Finset α)
{k : ℕ}
(h : k ≤ s.card)
(a : Fin k)


/-- The fourth cosimplicial identity -/
@[reassoc]
theorem δ_comp_σ_of_gt {n} {i : Fin (n + 2)} {j : Fin (n + 1)} (H : Fin.castSucc j < i) :
    X.δ i.succ ≫ X.σ (Fin.castSucc j) = X.σ j ≫ X.δ i

(X : CategoryTheory.CosimplicialObject C)

X.δ i.succ ≫ X.σ j.castSucc = X.σ j ≫ X.δ i


theorem Antitone.strictAnti_of_injective (h₁ : Antitone f) (h₂ : Injective f) : StrictAnti f

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


/-- The inversion with center `c` and radius `R` maps a sphere passing through the center to a
hyperplane. -/
theorem inversion_mem_perpBisector_inversion_iff' (hR : R ≠ 0) (hy : y ≠ c) :
    inversion c R x ∈ perpBisector c (inversion c R y) ↔ dist x y = dist y c ∧ x ≠ c

{V : Type u_1}
{P : Type u_2}
[NormedAddCommGroup V]
[InnerProductSpace ℝ V]
[MetricSpace P]
[NormedAddTorsor V P]
{c x y : P}
{R : ℝ}
(hR : R ≠ 0)
(hy : y ≠ c)

EuclideanGeometry.inversion c R x ∈ AffineSubspace.perpBisector c (EuclideanGeometry.inversion c R y) ↔
  dist x y = dist y c ∧ x ≠ c


@[simp] theorem infinitesimal_neg {x : ℝ*} : Infinitesimal (-x) ↔ Infinitesimal x


@[reassoc (attr := simp)]
theorem coconePointUniqueUpToIso_hom_desc {r s t : Cocone F} (P : IsColimit s) (Q : IsColimit t) :
    (coconePointUniqueUpToIso P Q).hom ≫ Q.desc r = P.desc r

{r s t : CategoryTheory.Limits.Cocone F}

(P.coconePointUniqueUpToIso Q).hom ≫ Q.desc r = P.desc r


nonrec theorem exists_pos_lt_subset_ball {R : ℝ} {s : Set E} {x : E} (hR : 0 < R) (hs : IsClosed s)
    (h : s ⊆ ball x R) : ∃ r ∈ Ioo 0 R, s ⊆ ball x r

{E : Type u_1}
[AddCommGroup E]
[TopologicalSpace E]
[TopologicalAddGroup E]
[T2Space E]
[Module ℝ E]
[ContinuousSMul ℝ E]
[FiniteDimensional ℝ E]
{R : ℝ}
{s : Set E}
{x : E}
(hR : 0 < R)
(hs : IsClosed s)
(h : s ⊆ Euclidean.ball x R)

∃ r ∈ Set.Ioo 0 R, s ⊆ Euclidean.ball x r


private theorem tmulSymm_apply (a : ι ⊕ ι₂ → M) :
    tmulSymm (⨂ₜ[R] i, a i) = (⨂ₜ[R] i, a (Sum.inl i)) ⊗ₜ[R] ⨂ₜ[R] i, a (Sum.inr i)

{ι : Type u_1}
{ι₂ : Type u_2}
{R : Type u_4}
[CommSemiring R]
{M : Type u_8}
[AddCommMonoid M]
[Module R M]
(a : ι ⊕ ι₂ → M)

PiTensorProduct.tmulSymm ((PiTensorProduct.tprod R) fun i => a i) =
  ((PiTensorProduct.tprod R) fun i => a (Sum.inl i)) ⊗ₜ[R] (PiTensorProduct.tprod R) fun i => a (Sum.inr i)


/-- Given a basis, the `i`th element of the dual basis evaluates to 1 on the `i`th element of the
basis. -/
theorem mk_coord_apply_eq (i : ι) : (Basis.mk hli hsp).coord i (v i) = 1

{hsp : ⊤ ≤ Submodule.span R (Set.range v)}


private theorem gosper_catalan_sub_eq_central_binom_div (n : ℕ) : gosperCatalan (n + 1) (n + 1) -
    gosperCatalan (n + 1) 0 = Nat.centralBinom (n + 1) / (n + 2)

gosperCatalan (n + 1) (n + 1) - gosperCatalan (n + 1) 0 = ↑(n + 1).centralBinom / (↑n + 2)


lemma codomain_eq (f : R ⟶ S) (φ : a ⟶ b) [p.IsHomLift f φ] : p.obj b = S

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


theorem degreeOf_coeff_finSuccEquiv (p : MvPolynomial (Fin (n + 1)) R) (j : Fin n) (i : ℕ) :
    degreeOf j (Polynomial.coeff (finSuccEquiv R n p) i) ≤ degreeOf j.succ p

{R : Type u}
[CommSemiring R]
{n : ℕ}
(p : MvPolynomial (Fin (n + 1)) R)
(j : Fin n)
(i : ℕ)

MvPolynomial.degreeOf j (((MvPolynomial.finSuccEquiv R n) p).coeff i) ≤ MvPolynomial.degreeOf j.succ p


theorem append_right_nil {α : Type*} (u : Fin m → α) (v : Fin n → α) (hv : n = 0) :
    append u v = u ∘ Fin.cast (by rw [hv, Nat.add_zero])

{m n : ℕ}
{α : Type u_1}
(u : Fin m → α)
(v : Fin n → α)
(hv : n = 0)


@[to_additive (attr := simp)]
theorem mk_smul_mk_aeeqFun (c : M) (f : α → β) (hf : AEStronglyMeasurable f μ) :
    mk c • AEEqFun.mk f hf = AEEqFun.mk (f <| c • ·)
      (hf.comp_measurePreserving (measurePreserving_smul _ _))

[MeasureTheory.VAddInvariantMeasure M α μ]

(hf : MeasureTheory.AEStronglyMeasurable f μ)

DomAddAct.mk c +ᵥ MeasureTheory.AEEqFun.mk f hf = MeasureTheory.AEEqFun.mk (fun x => f (c +ᵥ x)) ⋯


/-- The connected component of a point is always a subset of the intersection of all its clopen
neighbourhoods. -/
theorem connectedComponent_subset_iInter_isClopen {x : α} :
    connectedComponent x ⊆ ⋂ Z : { Z : Set α // IsClopen Z ∧ x ∈ Z }, Z

{α : Type u}
[TopologicalSpace α]
{x : α}


@[simp]
theorem symm_comp_self (h : X ≃ₜ Y) : h.symm ∘ h = id

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


@[to_additive (attr := simp)]
theorem div_div_cancel_left (a b : G) : a / b / a = b⁻¹


lemma ContinuousOn.finset_sup_apply (hs : ∀ i ∈ s, ContinuousOn (f i) t) :
    ContinuousOn (fun a ↦ s.sup (f · a)) t

{L : Type u_1}
{X : Type u_2}
[TopologicalSpace L]
[TopologicalSpace X]
{ι : Type u_3}
[SemilatticeSup L]
[OrderBot L]
[ContinuousSup L]
{s : Finset ι}
{f : ι → X → L}
{t : Set X}
(hs : ∀ i ∈ s, ContinuousOn (f i) t)

ContinuousOn (fun a => s.sup fun x => f x a) t


@[reassoc (attr := simp)]
lemma rightHomologyι_naturality' :
    rightHomologyMap' φ h₁ h₂ ≫ h₂.ι = h₁.ι ≫ opcyclesMap' φ h₁ h₂

CategoryTheory.CategoryStruct.comp (CategoryTheory.ShortComplex.rightHomologyMap' φ h₁ h₂) h₂.ι =
  CategoryTheory.CategoryStruct.comp h₁.ι (CategoryTheory.ShortComplex.opcyclesMap' φ h₁ h₂)


theorem fourierCoeffOn.const_mul {a b : ℝ} (f : ℝ → ℂ) (c : ℂ) (n : ℤ) (hab : a < b) :
    fourierCoeffOn hab (fun x => c * f x) n = c * fourierCoeffOn hab f n


@[simp]
theorem imCLM_coe : (imCLM : ℂ →ₗ[ℝ] ℝ) = imLm


theorem map_sub₂ (f : M' →ₛₗ[ρ₁₂] N →ₛₗ[σ₁₂] P') (x y z) : f (x - y) z = f x z - f y z

{R : Type u_1}
[Semiring R]
{S : Type u_2}
[Semiring S]
{R₂ : Type u_3}
[Semiring R₂]
{S₂ : Type u_4}
[Semiring S₂]
{N : Type u_6}
{M' : Type u_13}
{P' : Type u_15}
[AddCommMonoid N]
[AddCommGroup M']
[AddCommGroup P']
[Module S N]
[Module R M']
[Module R₂ P']
[Module S₂ P']
[SMulCommClass S₂ R₂ P']
{ρ₁₂ : R →+* R₂}
{σ₁₂ : S →+* S₂}
(f : M' →ₛₗ[ρ₁₂] N →ₛₗ[σ₁₂] P')
(x y : M')
(z : N)


@[simp]
theorem toLeftMovesNim_symm_lt {o : Ordinal} (i : (nim o).LeftMoves) :
    ↑(toLeftMovesNim.symm i) < o

{o : Ordinal.{u_1}}
(i : (SetTheory.PGame.nim o).LeftMoves)

↑(SetTheory.PGame.toLeftMovesNim.symm i) < o


theorem mem_range_encode : PrimrecPred (fun n => n ∈ Set.range (encode : α → ℕ))

PrimrecPred fun n => n ∈ Set.range Encodable.encode


@[to_additive (attr := refl)]
theorem Red.refl : Red L L


/-- If a measure is inner regular (using closed or compact sets) for open sets, then every
measurable set of finite measure can be approximated by a (closed or compact) subset. -/
theorem measurableSet_of_isOpen [OuterRegular μ] (H : InnerRegularWRT μ p IsOpen)
    (hd : ∀ ⦃s U⦄, p s → IsOpen U → p (s \ U)) :
    InnerRegularWRT μ p fun s => MeasurableSet s ∧ μ s ≠ ∞

(hd : ∀ ⦃s U : Set α⦄, p s → IsOpen U → p (s \ U))

μ.InnerRegularWRT p fun s => MeasurableSet s ∧ μ s ≠ ⊤


/-- Let `u₁`, `u₂` be two uniform structures on `γ` and `𝔖₁ 𝔖₂ : Set (Set α)`. If `u₁ ≤ u₂` and
`𝔖₂ ⊆ 𝔖₁` then `𝒱(α, γ, 𝔖₁, u₁) ≤ 𝒱(α, γ, 𝔖₂, u₂)`. -/
protected theorem mono ⦃u₁ u₂ : UniformSpace γ⦄ (hu : u₁ ≤ u₂) ⦃𝔖₁ 𝔖₂ : Set (Set α)⦄
    (h𝔖 : 𝔖₂ ⊆ 𝔖₁) : 𝒱(α, γ, 𝔖₁, u₁) ≤ 𝒱(α, γ, 𝔖₂, u₂)

{α : Type u_1}
{γ : Type u_3}
⦃u₁ u₂ : UniformSpace γ⦄
(hu : u₁ ≤ u₂)
⦃𝔖₁ 𝔖₂ : Set (Set α)⦄
(h𝔖 : 𝔖₂ ⊆ 𝔖₁)

UniformOnFun.uniformSpace α γ 𝔖₁ ≤ UniformOnFun.uniformSpace α γ 𝔖₂


/-- Final functors preserve filteredness.

This can be seen as a generalization of `IsFiltered.of_right_adjoint` (which states that right
adjoints preserve filteredness), as right adjoints are always final, see `final_of_adjunction`.
-/
theorem IsFilteredOrEmpty.of_final (F : C ⥤ D) [Final F] [IsFilteredOrEmpty C] :
    IsFilteredOrEmpty D

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


theorem Nonneg.add {a b : ℤ√d} (ha : Nonneg a) (hb : Nonneg b) : Nonneg (a + b)

{d : ℕ}
{a b : ℤ√↑d}
(ha : a.Nonneg)
(hb : b.Nonneg)


@[simp]
theorem pow_mulLeft (a : A) (n : ℕ) : mulLeft R a ^ n = mulLeft R (a ^ n)

{R : Type u_1}
{A : Type u_2}
[CommSemiring R]
[Semiring A]
[Algebra R A]
(a : A)
(n : ℕ)

LinearMap.mulLeft R a ^ n = LinearMap.mulLeft R (a ^ n)


theorem union_subset_left (h : s ∪ t ⊆ u) : s ⊆ u

{α : Type u_1}
[DecidableEq α]
{s t u : Finset α}
(h : s ∪ t ⊆ u)


theorem factors_pow_count_prod [DecidableEq α] {x : α} (hx : x ≠ 0) :
    (∏ p ∈ (factors x).toFinset, p ^ (factors x).count p) ~ᵤ x

{α : Type u_1}
[CancelCommMonoidWithZero α]
[UniqueFactorizationMonoid α]
[DecidableEq α]
{x : α}
(hx : x ≠ 0)

∏ p ∈ (UniqueFactorizationMonoid.factors x).toFinset, p ^ Multiset.count p (UniqueFactorizationMonoid.factors x) ~ᵤ x


/-- The $L^1$ norm is less than the $L^\infty$ norm scaled by the cardinality. -/
@[to_additive Pi.sum_norm_apply_le_norm "The $L^1$ norm is less than the $L^\\infty$ norm scaled by
the cardinality."]
lemma Pi.sum_norm_apply_le_norm' : ∑ i, ‖f i‖ ≤ Fintype.card ι • ‖f‖

{ι : Type u_1}
{π : ι → Type u_4}
[Fintype ι]
[(i : ι) → SeminormedAddGroup (π i)]
(f : (i : ι) → π i)


@[continuity]
theorem continuous_symm : Continuous (symm : Path x y → Path y x)

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


lemma toNNReal_mul_add_neg_mul_add_mul_neg_eq (f g : C(X, ℝ)) :
    (f * g).toNNReal + (-f).toNNReal * g.toNNReal + f.toNNReal * (-g).toNNReal =
      (-(f * g)).toNNReal + f.toNNReal * g.toNNReal + (-f).toNNReal * (-g).toNNReal

{X : Type u_1}
[TopologicalSpace X]
(f g : C(X, ℝ))


theorem iInf_lt_succ (u : ℕ → α) (n : ℕ) : ⨅ k < n + 1, u k = (⨅ k < n, u k) ⊓ u n

{α : Type u_1}
[CompleteLattice α]
(u : ℕ → α)
(n : ℕ)


@[simp]
theorem support_bindOnSupport :
    (p.bindOnSupport f).support = ⋃ (a : α) (h : a ∈ p.support), (f a h).support

{α : Type u_1}
{β : Type u_2}
{p : PMF α}
(f : (a : α) → a ∈ p.support → PMF β)

(p.bindOnSupport f).support = ⋃ a, ⋃ (h : a ∈ p.support), (f a h).support


theorem not_isBot_iff_ne_bot : ¬IsBot a ↔ a ≠ ⊥

{α : Type u}
[PartialOrder α]
[OrderBot α]
{a : α}


protected theorem isEmpty (e : α ≃ β) [IsEmpty β] : IsEmpty α

{α : Sort u_1}
{β : Sort u_2}
(e : α ≃ β)
[IsEmpty β]


theorem dvd_of_mul_left_dvd (h : a * b ∣ c) : b ∣ c

{α : Type u_1}
[CommSemigroup α]
{a b c : α}
(h : a * b ∣ c)


private theorem one_sub_le_m_div_m_add_one_sq [Nonempty α]
    (hPα : P.parts.card * 16 ^ P.parts.card ≤ card α) (hPε : ↑100 ≤ ↑4 ^ P.parts.card * ε ^ 5) :
    ↑1 - ε ^ 5 / ↑50 ≤ (m / (m + 1 : ℝ)) ^ 2

(hPα : P.parts.card * 16 ^ P.parts.card ≤ Fintype.card α)

1 - ε ^ 5 / 50 ≤
  (↑(Fintype.card α / SzemerediRegularity.stepBound P.parts.card) /
      (↑(Fintype.card α / SzemerediRegularity.stepBound P.parts.card) + 1)) ^
    2


theorem nsmul_eq_self : ∀ {n : ℕ} (_ : n ≠ 0) (a : α), n • a = a


/-- The commutator of a finite direct product is contained in the direct product of the commutators.
-/
theorem commutator_pi_pi_of_finite {η : Type*} [Finite η] {Gs : η → Type*} [∀ i, Group (Gs i)]
    (H K : ∀ i, Subgroup (Gs i)) : ⁅Subgroup.pi Set.univ H, Subgroup.pi Set.univ K⁆ =
    Subgroup.pi Set.univ fun i => ⁅H i, K i⁆

{η : Type u_4}
[Finite η]
{Gs : η → Type u_5}
[(i : η) → Group (Gs i)]
(H K : (i : η) → Subgroup (Gs i))


/-- Predicate on the triangle indices for the explicit triangles to be edge-disjoint. -/
class ExplicitDisjoint (t : Finset (α × β × γ)) : Prop where
  inj₀ : ∀ ⦃a b c a'⦄, (a, b, c) ∈ t → (a', b, c) ∈ t → a = a'
  inj₁ : ∀ ⦃a b c b'⦄, (a, b, c) ∈ t → (a, b', c) ∈ t → b = b'
  inj₂ : ∀ ⦃a b c c'⦄, (a, b, c) ∈ t → (a, b, c') ∈ t → c = c'

[self : SimpleGraph.TripartiteFromTriangles.ExplicitDisjoint t]


theorem IsPreirreducible.preimage (ht : IsPreirreducible t) {f : Y → X}
    (hf : OpenEmbedding f) : IsPreirreducible (f ⁻¹' t)

{X : Type u_1}
{Y : Type u_2}
[TopologicalSpace X]
[TopologicalSpace Y]
{t : Set X}
(ht : IsPreirreducible t)
{f : Y → X}
(hf : OpenEmbedding f)


@[simp]
theorem comp_id (f : C_c(γ, δ)) : f.comp (CocompactMap.id γ) = f

{γ : Type u_4}
{δ : Type u_5}
[TopologicalSpace γ]
[TopologicalSpace δ]
[Zero δ]
(f : γ →C_c δ)


@[simp]
theorem inv_top : (⊤ : Rel α β).inv = (⊤ : Rel β α)


@[simp, norm_cast]
theorem sqrt_natCast (n : ℕ) : Rat.sqrt (n : ℚ) = Nat.sqrt n


/-- In a C⋆-algebra, the spectral radius of a self-adjoint element is equal to its norm.
See `IsSelfAdjoint.toReal_spectralRadius_eq_norm` for a version involving
`spectralRadius ℝ a`. -/
lemma IsSelfAdjoint.toReal_spectralRadius_complex_eq_norm {a : A} (ha : IsSelfAdjoint a) :
    (spectralRadius ℂ a).toReal = ‖a‖

{A : Type u_1}
[NormedRing A]
[NormedAlgebra ℂ A]
[CompleteSpace A]
[StarRing A]
[CstarRing A]
{a : A}
(ha : IsSelfAdjoint a)


/-- This is a mixin class for non-unital normed algebras which states that the left-regular
representation of the algebra on itself is isometric. Every unital normed algebra with `‖1‖ = 1` is
a regular normed algebra (see `NormedAlgebra.instRegularNormedAlgebra`). In addition, so is every
C⋆-algebra, non-unital included (see `CstarRing.instRegularNormedAlgebra`), but there are yet other
examples. Any algebra with an approximate identity (e.g., $$L^1$$) is also regular.

This is a useful class because it gives rise to a nice norm on the unitization; in particular it is
a C⋆-norm when the norm on `A` is a C⋆-norm. -/
class _root_.RegularNormedAlgebra : Prop :=
  /-- The left regular representation of the algebra on itself is an isometry. -/
  isometry_mul' : Isometry (mul 𝕜 𝕜')

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{𝕜' : Type u_3}
[NonUnitalSeminormedRing 𝕜']
[NormedSpace 𝕜 𝕜']
[IsScalarTower 𝕜 𝕜' 𝕜']
[SMulCommClass 𝕜 𝕜' 𝕜']
[self : RegularNormedAlgebra 𝕜 𝕜']

Isometry ⇑(ContinuousLinearMap.mul 𝕜 𝕜')


/-- The negation of an element `a` of a semigroup with a distributive negation divides another
element `b` iff `a` divides `b`. -/
@[simp]
theorem neg_dvd : -a ∣ b ↔ a ∣ b

{α : Type u_1}
[Semigroup α]
[HasDistribNeg α]
{a b : α}


/-- The natural isomorphism `RF ≅ RF'` on right derived functors that is
induced by a natural isomorphism `F ≅ F'`.  -/
@[simps]
noncomputable def rightDerivedNatIso (τ : F ≅ F') :
    RF ≅ RF'

{C : Type u_1}
{D : Type u_2}
{H : Type u_3}
[CategoryTheory.Category.{u_4, u_1} C]
[CategoryTheory.Category.{u_5, u_2} D]
[CategoryTheory.Category.{u_6, u_3} H]
(RF RF' : CategoryTheory.Functor D H)
{F F' : CategoryTheory.Functor C H}
{L : CategoryTheory.Functor C D}
(α : F ⟶ L.comp RF)
(α' : F' ⟶ L.comp RF')
(W : CategoryTheory.MorphismProperty C)
[L.IsLocalization W]
[RF.IsRightDerivedFunctor α W]
[RF'.IsRightDerivedFunctor α' W]
(τ : F ≅ F')

(RF.rightDerivedNatIso RF' α α' W τ).hom = RF.rightDerivedNatTrans RF' α α' W τ.hom


@[simp] theorem not_isSome : isSome a = false ↔ a.isNone = true

∀ {α : Type u_1} {a : Option α}, a.isSome = false ↔ a.isNone = true


theorem val_lt_of_le (i : Fin b) (h : b ≤ n) : i.val < n


theorem not_mem_commonNeighbors_right (v w : V) : w ∉ G.commonNeighbors v w

{V : Type u}
(G : SimpleGraph V)
(v w : V)


@[simp]
theorem lift_succ (a) : lift.{v, u} (succ a) = succ (lift.{v, u} a)

Cardinal.lift.{v, u} (Order.succ a) = Order.succ (Cardinal.lift.{v, u} a)


theorem AddMonoidHom.extension_coe [CompleteSpace β] [T0Space β] (f : α →+ β)
    (hf : Continuous f) (a : α) : f.extension hf a = f a

{α : Type u_3}
{β : Type u_4}
[UniformSpace α]
[AddGroup α]
[UniformAddGroup α]
[UniformSpace β]
[AddGroup β]
[UniformAddGroup β]
[CompleteSpace β]
[T0Space β]
(f : α →+ β)
(hf : Continuous ⇑f)
(a : α)


@[simp] theorem LinearMap.comp_id_fgModuleCat
    {R} [Ring R] {G : FGModuleCat.{u} R} {H : Type u} [AddCommGroup H] [Module R H]
    (f : G →ₗ[R] H) : f.comp (𝟙 G) = f

{R : Type u}
[Ring R]
{G : FGModuleCat R}
{H : Type u}
[AddCommGroup H]
[Module R H]
(f : ↑G →ₗ[R] H)


@[simp]
theorem nonempty_Prop {p : Prop} : Nonempty p ↔ p


@[simps]
instance right (f g : a ⟶ b) [BicategoricalCoherence f g] :
    BicategoricalCoherence (f ≫ 𝟙 b) g


lemma natDegree_ΨSq_le (n : ℤ) : (W.ΨSq n).natDegree ≤ n.natAbs ^ 2 - 1

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


theorem cast_add_one (n : ℕ) : ((n + 1 : ℕ) : R) = n + 1

{R : Type u_1}
[AddMonoidWithOne R]
(n : ℕ)


lemma antitone_div_right_of_nonpos {b : EReal} (h : b ≤ 0) : Antitone fun a ↦ a / b


lemma iSup_iInf_le [CompleteLattice α] {f : ∀ a, κ a → α} :
    ⨆ a, ⨅ b, f a b ≤ ⨅ g : ∀ a, κ a, ⨆ a, f a (g a)

{α : Type u}
{ι : Sort w}
{κ : ι → Sort w'}
[CompleteLattice α]
{f : (a : ι) → κ a → α}


lemma congr_φK {γ₁ γ₂ : LeftHomologyMapData φ h₁ h₂} (eq : γ₁ = γ₂) : γ₁.φK = γ₂.φK

{γ₁ γ₂ : CategoryTheory.ShortComplex.LeftHomologyMapData φ h₁ h₂}

γ₁.φK = γ₂.φK


theorem right_distrib [Mul R] [Add R] [RightDistribClass R] (a b c : R) :
    (a + b) * c = a * c + b * c

{R : Type x}
[Mul R]
[Add R]
[RightDistribClass R]
(a b c : R)


@[simp]
theorem mapEquiv_apply (g : P ≃ₐ[R] P') (I : FractionalIdeal S P) : mapEquiv g I = map (↑g) I

{R : Type u_1}
[CommRing R]
{S : Submonoid R}
{P : Type u_2}
[CommRing P]
[Algebra R P]
{P' : Type u_3}
[CommRing P']
[Algebra R P']
(g : P ≃ₐ[R] P')
(I : FractionalIdeal S P)

(FractionalIdeal.mapEquiv g) I = FractionalIdeal.map (↑g) I


/-- See also `Finset.prod_bij`. -/
@[to_additive "See also `Finset.sum_bij`."]
theorem finprod_mem_eq_of_bijOn {s : Set α} {t : Set β} {f : α → M} {g : β → M} (e : α → β)
    (he₀ : s.BijOn e t) (he₁ : ∀ x ∈ s, f x = g (e x)) : ∏ᶠ i ∈ s, f i = ∏ᶠ j ∈ t, g j

{α : Type u_1}
{β : Type u_2}
{M : Type u_5}
[AddCommMonoid M]
{s : Set α}
{t : Set β}
{f : α → M}
{g : β → M}
(e : α → β)
(he₀ : Set.BijOn e s t)
(he₁ : ∀ x ∈ s, f x = g (e x))

∑ᶠ (i : α) (_ : i ∈ s), f i = ∑ᶠ (j : β) (_ : j ∈ t), g j


theorem representable_of_natIso (F : Cᵒᵖ ⥤ Type v₁) {G} (i : F ≅ G) [F.Representable] :
    G.Representable

(F : CategoryTheory.Functor Cᵒᵖ (Type v₁))

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


theorem range_nonempty [h : Nonempty ι] (f : ι → α) : (range f).Nonempty

{α : Type u_1}
{ι : Sort u_4}
[h : Nonempty ι]
(f : ι → α)


theorem infinite_iff_in_eventualRange {K : (Finset V)ᵒᵖ} (C : G.componentComplFunctor.obj K) :
    C.supp.Infinite ↔ C ∈ G.componentComplFunctor.eventualRange K

{V : Type u}
(G : SimpleGraph V)
{K : (Finset V)ᵒᵖ}
(C : G.componentComplFunctor.obj K)

(SimpleGraph.ComponentCompl.supp C).Infinite ↔ C ∈ G.componentComplFunctor.eventualRange K


/-- Given `I : MulticospanIndex (Type u)`, this is a type which identifies
to the sections of the functor `I.multicospan`. -/
@[ext]
structure MulticospanIndex.sections where
  /-- The data of an element in `I.left i` for each `i : I.L`. -/
  val (i : I.L) : I.left i
  property (r : I.R) : I.fst r (val _) = I.snd r (val _)

{I : CategoryTheory.Limits.MulticospanIndex (Type u)}

I.fst r (self.val (I.fstTo r)) = I.snd r (self.val (I.sndTo r))


/-- If `f` commutes with `g` and `g'`, then it commutes with `g ∘ g'`. -/
theorem comp_right (h : Commute f g) (h' : Commute f g') : Commute f (g ∘ g')

{α : Type u_1}
{f g g' : α → α}
(h : Function.Commute f g)
(h' : Function.Commute f g')


theorem eq_bot_of_top_isCompl (h : IsCompl ⊤ x) : x = ⊥

{α : Type u_1}
[Lattice α]
[BoundedOrder α]
{x : α}
(h : IsCompl ⊤ x)


/-- The (colimit) cocone for `F : J ⥤ PresheafOfModules.{v} R` that is constructed from
the colimit of `F ⋙ evaluation R X` for all `X`. -/
@[simps]
noncomputable def colimitCocone : Cocone F

[{X Y : Cᵒᵖ} →
    (f : X ⟶ Y) →
      CategoryTheory.Limits.PreservesColimit (F ⋙ PresheafOfModules.evaluation R Y)
        (ModuleCat.restrictScalars (R.map f))]

[∀ (X : Cᵒᵖ), CategoryTheory.Limits.HasColimit (F ⋙ PresheafOfModules.evaluation R X)]

(PresheafOfModules.colimitCocone F).pt = (PresheafOfModules.colimitBundledCore F).toPresheafOfModules


/-- Given a monoid homomorphism `f`, the induced homomorphism on the quotient by `f`'s kernel has
    the same image as `f`. -/
@[to_additive (attr := simp) "Given an `AddMonoid` homomorphism `f`, the induced homomorphism
on the quotient by `f`'s kernel has the same image as `f`."]
theorem kerLift_range_eq : MonoidHom.mrange (kerLift f) = MonoidHom.mrange f

{M : Type u_1}
{P : Type u_3}
[MulOneClass M]
[MulOneClass P]
{f : M →* P}

MonoidHom.mrange (Con.kerLift f) = MonoidHom.mrange f


theorem SameCycle.equivalence : Equivalence (SameCycle f)


@[simp]
theorem coe_comp (f : InfTopHom β γ) (g : InfTopHom α β) : (f.comp g : α → γ) = f ∘ g

{α : Type u_3}
{β : Type u_4}
{γ : Type u_5}
[Inf α]
[Top α]
[Inf β]
[Top β]
[Inf γ]
[Top γ]
(f : InfTopHom β γ)
(g : InfTopHom α β)


@[simp]
theorem comp_id (f : sSupHom α β) : f.comp (sSupHom.id α) = f

{α : Type u_2}
{β : Type u_3}
[SupSet α]
[SupSet β]
(f : sSupHom α β)


@[gcongr] theorem rpow_lt_rpow {x y : ℝ≥0∞} {z : ℝ} (h₁ : x < y) (h₂ : 0 < z) : x ^ z < y ^ z


theorem zpow_strictMono (hx : 1 < a) : StrictMono (a ^ · : ℤ → α)

{α : Type u_1}
[LinearOrderedSemifield α]
{a : α}
(hx : 1 < a)


theorem degree_pos_of_aeval_root [Algebra R S] {p : R[X]} (hp : p ≠ 0) {z : S} (hz : aeval z p = 0)
    (inj : ∀ x : R, algebraMap R S x = 0 → x = 0) : 0 < p.degree

(inj : ∀ (x : R), (algebraMap R S) x = 0 → x = 0)


@[simp]
theorem nonempty_neLocus_iff {f g : Π₀ a, N a} : (f.neLocus g).Nonempty ↔ f ≠ g

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


protected theorem pow_succ (b : Int) (e : Nat) : b ^ (e+1) = (b ^ e) * b


/-- The injection into a pi group at different indices commutes.

For injections of commuting elements at the same index, see `Commute.map` -/
@[to_additive
      "The injection into an additive pi group at different indices commutes.

      For injections of commuting elements at the same index, see `AddCommute.map`"]
theorem Pi.mulSingle_commute [∀ i, MulOneClass <| f i] :
    Pairwise fun i j => ∀ (x : f i) (y : f j), Commute (mulSingle i x) (mulSingle j y)

{I : Type u}
{f : I → Type v}
[DecidableEq I]
[(i : I) → MulOneClass (f i)]

Pairwise fun i j => ∀ (x : f i) (y : f j), Commute (Pi.mulSingle i x) (Pi.mulSingle j y)


theorem inner_re_zero_right (x : E) : re ⟪x, 0⟫ = 0

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


@[simp] theorem piCurry_symm_apply {β : α → Type*} (γ : ∀ a, β a → Type*) (f : ∀ a b, γ a b) :
    (piCurry γ).symm f = Sigma.uncurry f

{α : Type u_3}
{β : α → Type u_1}
(γ : (a : α) → β a → Type u_2)
(f : (a : α) → (b : β a) → γ a b)

(Equiv.piCurry γ).symm f = Sigma.uncurry f


/-- The type of reduced words. A reduced word cannot contain a letter `1`, and no two adjacent
letters can come from the same summand. -/
@[ext]
structure Word where
  /-- A `Word` is a `List (Σ i, M i)`, such that `1` is not in the list, and no
  two adjacent letters are from the same summand -/
  toList : List (Σi, M i)
  /-- A reduced word does not contain `1` -/
  ne_one : ∀ l ∈ toList, Sigma.snd l ≠ 1
  /-- Adjacent letters are not from the same summand. -/
  chain_ne : toList.Chain' fun l l' => Sigma.fst l ≠ Sigma.fst l'

{ι : Type u_1}
{M : ι → Type u_2}
[(i : ι) → Monoid (M i)]
(self : Monoid.CoprodI.Word M)

List.Chain' (fun l l' => l.fst ≠ l'.fst) self.toList


lemma measure_cylinder (h : IsProjectiveLimit μ P)
    (I : Finset ι) {s : Set (∀ i : I, α i)} (hs : MeasurableSet s) :
    μ (cylinder I s) = P I s

{P : (J : Finset ι) → MeasureTheory.Measure ((j : { x // x ∈ J }) → α ↑j)}

{μ : MeasureTheory.Measure ((i : ι) → α i)}

(h : MeasureTheory.IsProjectiveLimit μ P)

μ (MeasureTheory.cylinder I s) = (P I) s


theorem succ_lt_succ_iff_of_not_isMax (ha : ¬IsMax a) (hb : ¬IsMax b) :
    succ a < succ b ↔ a < b

{α : Type u_1}
[Preorder α]
[SuccOrder α]
{a b : α}
(ha : ¬IsMax a)
(hb : ¬IsMax b)


@[simp]
theorem isAdjointPair_toLinearMap₂' :
    LinearMap.IsAdjointPair (Matrix.toLinearMap₂' R J) (Matrix.toLinearMap₂' R J')
        (Matrix.toLin' A) (Matrix.toLin' A') ↔
      Matrix.IsAdjointPair J J' A A'

{R : Type u_1}
{n : Type u_12}
{n' : Type u_14}
[CommRing R]
[Fintype n]
[Fintype n']
(J : Matrix n n R)
(J' : Matrix n' n' R)
(A : Matrix n' n R)
(A' : Matrix n n' R)
[DecidableEq n]
[DecidableEq n']

((Matrix.toLinearMap₂' R) J).IsAdjointPair ((Matrix.toLinearMap₂' R) J') (Matrix.toLin' A) (Matrix.toLin' A') ↔
  J.IsAdjointPair J' A A'