/-- If `η` is an oplax natural transformation between `F` and `G`, we have a 1-morphism
`η.app a : F.obj a ⟶ G.obj a` for each object `a : B`. We also have a 2-morphism
`η.naturality f : F.map f ≫ app b ⟶ app a ≫ G.map f` for each 1-morphism `f : a ⟶ b`.
These 2-morphisms satisfies the naturality condition, and preserve the identities and
the compositions modulo some adjustments of domains and codomains of 2-morphisms.
-/
structure OplaxNatTrans (F G : OplaxFunctor B C) where
  app (a : B) : F.obj a ⟶ G.obj a
  naturality {a b : B} (f : a ⟶ b) : F.map f ≫ app b ⟶ app a ≫ G.map f
  naturality_naturality :
    ∀ {a b : B} {f g : a ⟶ b} (η : f ⟶ g),
      F.map₂ η ▷ app b ≫ naturality g = naturality f ≫ app a ◁ G.map₂ η := by
    aesop_cat
  naturality_id :
    ∀ a : B,
      naturality (𝟙 a) ≫ app a ◁ G.mapId a =
        F.mapId a ▷ app a ≫ (λ_ (app a)).hom ≫ (ρ_ (app a)).inv := by
    aesop_cat
  naturality_comp :
    ∀ {a b c : B} (f : a ⟶ b) (g : b ⟶ c),
      naturality (f ≫ g) ≫ app a ◁ G.mapComp f g =
        F.mapComp f g ▷ app c ≫
          (α_ _ _ _).hom ≫
            F.map f ◁ naturality g ≫ (α_ _ _ _).inv ≫ naturality f ▷ G.map g ≫ (α_ _ _ _).hom := by
    aesop_cat

(self : CategoryTheory.OplaxNatTrans F G)

CategoryTheory.CategoryStruct.comp (self.naturality (CategoryTheory.CategoryStruct.id a))
    (CategoryTheory.Bicategory.whiskerLeft (self.app a) (G.mapId a)) =
  CategoryTheory.CategoryStruct.comp (CategoryTheory.Bicategory.whiskerRight (F.mapId a) (self.app a))
    (CategoryTheory.CategoryStruct.comp (CategoryTheory.Bicategory.leftUnitor (self.app a)).hom
      (CategoryTheory.Bicategory.rightUnitor (self.app a)).inv)


@[reassoc]
theorem prod.associator_naturality [HasBinaryProducts C] {X₁ X₂ X₃ Y₁ Y₂ Y₃ : C} (f₁ : X₁ ⟶ Y₁)
    (f₂ : X₂ ⟶ Y₂) (f₃ : X₃ ⟶ Y₃) :
    prod.map (prod.map f₁ f₂) f₃ ≫ (prod.associator Y₁ Y₂ Y₃).hom =
      (prod.associator X₁ X₂ X₃).hom ≫ prod.map f₁ (prod.map f₂ f₃)

CategoryTheory.Limits.prod.map (CategoryTheory.Limits.prod.map f₁ f₂) f₃ ≫
    (CategoryTheory.Limits.prod.associator Y₁ Y₂ Y₃).hom =
  (CategoryTheory.Limits.prod.associator X₁ X₂ X₃).hom ≫
    CategoryTheory.Limits.prod.map f₁ (CategoryTheory.Limits.prod.map f₂ f₃)


/-- When applying the inverse of `lpMeasToLpTrimLie` (which takes a function in the Lp space of
the sub-sigma algebra and returns its version in the larger Lp space) to an indicator of the
sub-sigma-algebra, we obtain an indicator in the Lp space of the larger sigma-algebra. -/
theorem lpMeasToLpTrimLie_symm_indicator [one_le_p : Fact (1 ≤ p)] [NormedSpace ℝ F] {hm : m ≤ m0}
    {s : Set α} {μ : Measure α} (hs : MeasurableSet[m] s) (hμs : μ.trim hm s ≠ ∞) (c : F) :
    ((lpMeasToLpTrimLie F ℝ p μ hm).symm (indicatorConstLp p hs hμs c) : Lp F p μ) =
      indicatorConstLp p (hm s hs) ((le_trim hm).trans_lt hμs.lt_top).ne c

{α : Type u_1}
{F : Type u_3}
{p : ℝ≥0∞}
[NormedAddCommGroup F]
{m m0 : MeasurableSpace α}
[one_le_p : Fact (1 ≤ p)]
[NormedSpace ℝ F]
{hm : m ≤ m0}
{s : Set α}
{μ : MeasureTheory.Measure α}
(hs : MeasurableSet s)
(hμs : (μ.trim hm) s ≠ ⊤)
(c : F)

↑((MeasureTheory.lpMeasToLpTrimLie F ℝ p μ hm).symm (MeasureTheory.indicatorConstLp p hs hμs c)) =
  MeasureTheory.indicatorConstLp p ⋯ ⋯ c


@[simp]
theorem Dart.symm_involutive : Function.Involutive (Dart.symm : G.Dart → G.Dart)


@[fun_prop]
protected theorem HasFDerivWithinAt.iterate {f : E → E} {f' : E →L[𝕜] E}
    (hf : HasFDerivWithinAt f f' s x) (hx : f x = x) (hs : MapsTo f s s) (n : ℕ) :
    HasFDerivWithinAt f^[n] (f' ^ n) s x

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{x : E}
{s : Set E}
{f : E → E}
{f' : E →L[𝕜] E}
(hf : HasFDerivWithinAt f f' s x)
(hx : f x = x)
(hs : Set.MapsTo f s s)
(n : ℕ)


lemma smul_fin3_ext {R : Type u} [CommRing R] (P : Fin 3 → R) (u : Rˣ) :
    (u • P) x = u * P x ∧ (u • P) y = u * P y ∧ (u • P) z = u * P z

(u • P) 0 = ↑u * P 0 ∧ (u • P) 1 = ↑u * P 1 ∧ (u • P) 2 = ↑u * P 2


/-- If a function admits a power series expansion, then it is exponentially close to the partial
sums of this power series on strict subdisks of the disk of convergence. -/
theorem HasFPowerSeriesOnBall.uniform_geometric_approx {r' : ℝ≥0}
    (hf : HasFPowerSeriesOnBall f p x r) (h : (r' : ℝ≥0∞) < r) :
    ∃ a ∈ Ioo (0 : ℝ) 1,
      ∃ C > 0, ∀ y ∈ Metric.ball (0 : E) r', ∀ n, ‖f (x + y) - p.partialSum n y‖ ≤ C * a ^ n

{𝕜 : Type u_1}
{E : Type u_2}
{F : Type u_3}
[NontriviallyNormedField 𝕜]
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{f : E → F}
{p : FormalMultilinearSeries 𝕜 E F}
{x : E}
{r : ℝ≥0∞}
{r' : ℝ≥0}
(hf : HasFPowerSeriesOnBall f p x r)
(h : ↑r' < r)

∃ a ∈ Set.Ioo 0 1, ∃ C > 0, ∀ y ∈ Metric.ball 0 ↑r', ∀ (n : ℕ), ‖f (x + y) - p.partialSum n y‖ ≤ C * a ^ n


@[simp]
theorem coe_castAddMonoidHom [AddMonoidWithOne α] : (castAddMonoidHom α : ℕ → α) = Nat.cast


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

(a : BoundedLatticeHom ↑X.toLat ↑Y.toLat)

BddLat.dual.map a = BoundedLatticeHom.dual a


theorem gt_of_neg_of_infinitesimal {x : ℝ*} (hi : Infinitesimal x) (r : ℝ) (hr : r < 0) : ↑r < x

{x : ℝ*}
(hi : x.Infinitesimal)
(r : ℝ)
(hr : r < 0)


theorem drop_succ (n : ℕ) (s : Stream' α) : drop (succ n) s = drop n (tail s)

Stream'.drop n.succ s = Stream'.drop n s.tail


/-- The supremum of a family of commutative additive submonoids is equal to the range of
`DFinsupp.sumAddHom`; that is, every element in the `iSup` can be produced from taking a finite
number of non-zero elements of `S i`, coercing them to `γ`, and summing them. -/
theorem _root_.AddSubmonoid.iSup_eq_mrange_dfinsupp_sumAddHom
    [AddCommMonoid γ] (S : ι → AddSubmonoid γ) :
    iSup S = AddMonoidHom.mrange (DFinsupp.sumAddHom fun i => (S i).subtype)

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


lemma eq_of_mapsTo_reflection_of_mem [NoZeroSMulDivisors ℤ M] {Φ : Set M} (hΦ : Φ.Finite)
    (hfx : f x = 2) (hgy : g y = 2) (hgx : g x = 2) (hfy : f y = 2)
    (hxfΦ : MapsTo (preReflection x f) Φ Φ)
    (hygΦ : MapsTo (preReflection y g) Φ Φ)
    (hyΦ : y ∈ Φ) :
    x = y

(hxfΦ : Set.MapsTo (⇑(Module.preReflection x f)) Φ Φ)

(hygΦ : Set.MapsTo (⇑(Module.preReflection y g)) Φ Φ)


@[simp]
theorem toTensorAlgebra_gOne :
    TensorPower.toTensorAlgebra (@GradedMonoid.GOne.one _ (fun n => ⨂[R]^n M) _ _) = 1

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

TensorPower.toTensorAlgebra GradedMonoid.GOne.one = 1


/-- If two measures coincide locally, then a set is everywhere positive for the former iff it is
everywhere positive for the latter. -/
lemma isEverywherePos_iff_of_forall_exists_nhds_eq (h : ∀ x ∈ s, ∃ t ∈ 𝓝 x, ∀ u ⊆ t, ν u = μ u) :
    IsEverywherePos ν s ↔ IsEverywherePos μ s

ν.IsEverywherePos s ↔ μ.IsEverywherePos s


theorem disjSum_strictMono_right (s : Multiset α) :
    StrictMono (s.disjSum : Multiset β → Multiset (α ⊕ β))

{α : Type u_1}
{β : Type u_2}
(s : Multiset α)


theorem isOpen_iff_generate_intervals [t : OrderTopology α] {s : Set α} :
    IsOpen s ↔ GenerateOpen { s | ∃ a, s = Ioi a ∨ s = Iio a } s

{α : Type u}
[TopologicalSpace α]
[Preorder α]
[t : OrderTopology α]
{s : Set α}

IsOpen s ↔ TopologicalSpace.GenerateOpen {s | ∃ a, s = Set.Ioi a ∨ s = Set.Iio a} s


@[simp]
theorem connectedComponentEquiv_symm (φ : G ≃g G') :
    φ.symm.connectedComponentEquiv = φ.connectedComponentEquiv.symm

{V : Type u}
{V' : Type v}
{G : SimpleGraph V}
{G' : SimpleGraph V'}
(φ : G ≃g G')


@[simp, norm_cast]
theorem coe_inf : ∀ s t : Interval α, (↑(s ⊓ t) : Set α) = ↑s ∩ ↑t

{α : Type u_1}
[Lattice α]
[DecidableRel fun x x_1 => x ≤ x_1]
(s t : Interval α)


theorem gauge_lt_one_iff_mem_interior (hc : Convex ℝ s) (hs₀ : s ∈ 𝓝 0) :
    gauge s x < 1 ↔ x ∈ interior s

{E : Type u_2}
[AddCommGroup E]
[Module ℝ E]
{s : Set E}
{x : E}
[TopologicalSpace E]
[TopologicalAddGroup E]
[ContinuousSMul ℝ E]
(hc : Convex ℝ s)
(hs₀ : s ∈ 𝓝 0)


theorem nat_rawCast_0 : (Nat.rawCast 0 : R) = 0


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

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

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


/-- A function `f` on `Fin (n + 1)` is strictly monotone if and only if `f i < f (i + 1)`
for all `i`. -/
lemma strictMono_iff_lt_succ : StrictMono f ↔ ∀ i : Fin n, f (castSucc i) < f i.succ

{n : ℕ}
{α : Type u_1}
[Preorder α]
{f : Fin (n + 1) → α}

StrictMono f ↔ ∀ (i : Fin n), f i.castSucc < f i.succ


/-- A subring is closed under subtraction -/
protected theorem sub_mem {x y : R} (hx : x ∈ s) (hy : y ∈ s) : x - y ∈ s

{R : Type u}
[Ring R]
(s : Subring R)
{x y : R}
(hx : x ∈ s)
(hy : y ∈ s)


/-- The product of generated σ-algebras is the one generated by rectangles, if both generating sets
  are countably spanning. -/
theorem generateFrom_prod_eq {α β} {C : Set (Set α)} {D : Set (Set β)} (hC : IsCountablySpanning C)
    (hD : IsCountablySpanning D) :
    @Prod.instMeasurableSpace _ _ (generateFrom C) (generateFrom D) =
      generateFrom (image2 (· ×ˢ ·) C D)

{α : Type u_7}
{β : Type u_8}
{C : Set (Set α)}
{D : Set (Set β)}
(hC : IsCountablySpanning C)
(hD : IsCountablySpanning D)

Prod.instMeasurableSpace = MeasurableSpace.generateFrom (Set.image2 (fun x x_1 => x ×ˢ x_1) C D)


theorem comp_lift_apply (x : L) : lift i (f.comp i) p x = f x

{K : Type u_1}
{L : Type u_2}
{M : Type u_3}
[CommRing K]
[CommRing L]
[CommRing M]
(i : K →+* L)
(f : L →+* M)
(p : ℕ)
[ExpChar K p]
[ExpChar L p]
[ExpChar M p]
[PerfectRing M p]
[IsPRadical i p]
(x : L)

(PerfectRing.lift i (f.comp i) p) x = f x


@[to_additive]
theorem smul_ae_eq_of_ae_eq {G α : Type*} [Group G] [MulAction G α] [MeasurableSpace α]
    {s t : Set α} {μ : Measure α} (g : G)
    (h_qmp : QuasiMeasurePreserving (g⁻¹ • · : α → α) μ μ)
    (h_ae_eq : s =ᵐ[μ] t) : (g • s : Set α) =ᵐ[μ] (g • t : Set α)

(h_qmp : MeasureTheory.Measure.QuasiMeasurePreserving (fun x => -g +ᵥ x) μ μ)


@[simp]
theorem kerase_of_not_mem_keys {a} {l : List (Sigma β)} (h : a ∉ l.keys) : kerase a l = l

{α : Type u}
{β : α → Type v}
[DecidableEq α]
{a : α}
{l : List (Sigma β)}
(h : a ∉ l.keys)


theorem prod_symm [Module R₁ M₂] [Module R₁ M₃] [Module R₁ M₄] (e : M₁ ≃L[R₁] M₂)
    (e' : M₃ ≃L[R₁] M₄) : (e.prod e').symm = e.symm.prod e'.symm

{R₁ : Type u_1}
[Semiring R₁]
{M₁ : Type u_4}
[TopologicalSpace M₁]
[AddCommMonoid M₁]
{M₂ : Type u_6}
[TopologicalSpace M₂]
[AddCommMonoid M₂]
{M₃ : Type u_7}
[TopologicalSpace M₃]
[AddCommMonoid M₃]
{M₄ : Type u_8}
[TopologicalSpace M₄]
[AddCommMonoid M₄]
[Module R₁ M₁]
[Module R₁ M₂]
[Module R₁ M₃]
[Module R₁ M₄]
(e : M₁ ≃L[R₁] M₂)
(e' : M₃ ≃L[R₁] M₄)


@[simp]
theorem toIcoMod_sub_zsmul (a b : α) (m : ℤ) : toIcoMod hp a (b - m • p) = toIcoMod hp a b

{α : Type u_1}
[LinearOrderedAddCommGroup α]
[hα : Archimedean α]
{p : α}
(hp : 0 < p)
(a b : α)
(m : ℤ)


@[simp]
theorem trans_refl (h : M ≃ₘ^n⟮I, I'⟯ M') : h.trans (Diffeomorph.refl I' M' n) = h

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{E' : Type u_3}
[NormedAddCommGroup E']
[NormedSpace 𝕜 E']
{H : Type u_5}
[TopologicalSpace H]
{H' : Type u_6}
[TopologicalSpace H']
{I : ModelWithCorners 𝕜 E H}
{I' : ModelWithCorners 𝕜 E' H'}
{M : Type u_9}
[TopologicalSpace M]
[ChartedSpace H M]
{M' : Type u_10}
[TopologicalSpace M']
[ChartedSpace H' M']
{n : ℕ∞}
(h : M ≃ₘ^n⟮I, I'⟯ M')


@[simp] theorem replicate_one : replicate 1 a = [a]

∀ {α : Type u_1} {a : α}, List.replicate 1 a = [a]


/-- A triangle `(X,Y,Z,f,g,h)` in `C` is defined by the morphisms `f : X ⟶ Y`, `g : Y ⟶ Z`
and `h : Z ⟶ X⟦1⟧`.
-/
@[simps]
def Triangle.mk {X Y Z : C} (f : X ⟶ Y) (g : Y ⟶ Z) (h : Z ⟶ X⟦(1 : ℤ)⟧) : Triangle C

(h : Z ⟶ (CategoryTheory.shiftFunctor C 1).obj X)

(CategoryTheory.Pretriangulated.Triangle.mk f g h).obj₂ = Y


@[simp, deprecated coe_lt_top "Don't mix Option and WithTop" (since := "2024-05-27")]
theorem some_lt_none (a : α) : @LT.lt (WithTop α) _ (Option.some a) none


theorem set_walk_length_zero_eq_of_ne {u v : V} (h : u ≠ v) :
    {p : G.Walk u v | p.length = 0} = ∅

{V : Type u}
(G : SimpleGraph V)
{u v : V}
(h : u ≠ v)


/-- If `a` is a fundamental solution, then `(a^m).y < (a^n).y` if and only if `m < n`. -/
theorem zpow_y_lt_iff_lt {a : Solution₁ d} (h : IsFundamental a) (m n : ℤ) :
    (a ^ m).y < (a ^ n).y ↔ m < n

{d : ℤ}
{a : Pell.Solution₁ d}
(h : Pell.IsFundamental a)
(m n : ℤ)


theorem eq_iff_le_not_lt [PartialOrder α] {a b : α} : a = b ↔ a ≤ b ∧ ¬a < b

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


theorem setToL1S_const [IsFiniteMeasure μ] {T : Set α → E →L[ℝ] F}
    (h_zero : ∀ s, MeasurableSet s → μ s = 0 → T s = 0) (h_add : FinMeasAdditive μ T) (x : E) :
    setToL1S T (simpleFunc.indicatorConst 1 MeasurableSet.univ (measure_ne_top μ _) x) = T univ x

(h_zero : ∀ (s : Set α), MeasurableSet s → μ s = 0 → T s = 0)

(h_add : MeasureTheory.FinMeasAdditive μ T)

MeasureTheory.L1.SimpleFunc.setToL1S T (MeasureTheory.Lp.simpleFunc.indicatorConst 1 ⋯ ⋯ x) = (T Set.univ) x


/-- Note: if you want to conclude `x ≤ √y`, then use `Real.le_sqrt_of_sq_le`.
If you have `x > 0`, consider using `Real.le_sqrt'` -/
theorem le_sqrt (hx : 0 ≤ x) (hy : 0 ≤ y) : x ≤ √y ↔ x ^ 2 ≤ y


theorem toFinset_sum_count_eq (s : Multiset α) : ∑ a in s.toFinset, s.count a = card s

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

∑ a ∈ s.toFinset, Multiset.count a s = Multiset.card s


/-- The map operation for `Part` just maps the value and maintains the same domain. -/
@[simps]
def map (f : α → β) (o : Part α) : Part β

{α : Type u_1}
{β : Type u_2}
(f : α → β)
(o : Part α)

∀ (a : o.Dom), (Part.map f o).get a = (f ∘ o.get) a


@[simp] theorem map_map (g : β → γ) (f : α → β) (l : List α) :
  map g (map f l) = map (g ∘ f) l

{β : Type u_1}
{γ : Type u_2}
{α : Type u_3}
(g : β → γ)
(f : α → β)
(l : List α)

List.map g (List.map f l) = List.map (g ∘ f) l


/-- Build an isomorphism in the category `CommGrp` from a `MulEquiv`
between `CommGroup`s. -/
@[to_additive (attr := simps)]
def MulEquiv.toCommGrpIso {X Y : CommGrp} (e : X ≃* Y) : X ≅ Y


@[to_additive (attr := simp 1001) mem_sphere_iff_norm]
-- Porting note: increase priority so the left-hand side doesn't reduce
theorem mem_sphere_iff_norm' : b ∈ sphere a r ↔ ‖b / a‖ = r

{E : Type u_6}
[SeminormedGroup E]
{a b : E}
{r : ℝ}


lemma _root_.AntitoneOn.mapsTo_uIcc (hf : AntitoneOn f (uIcc a b)) :
    MapsTo f (uIcc a b) (uIcc (f a) (f b))

{α : Type u_1}
{β : Type u_2}
[LinearOrder α]
[Lattice β]
{f : α → β}
{a b : α}
(hf : AntitoneOn f (Set.uIcc a b))

Set.MapsTo f (Set.uIcc a b) (Set.uIcc (f a) (f b))


/-- If `α` and `β` are two equal natural transformations, then the functors of coalgebras induced by
them are isomorphic.
We define it like this as opposed to using `eq_to_iso` so that the components are nicer to prove
lemmas about.
-/
-- Porting note: removed @[simps (config := { rhsMd := semireducible })] and replaced with
@[simps!]
def functorOfNatTransEq {F G : C ⥤ C} {α β : F ⟶ G} (h : α = β) :
    functorOfNatTrans α ≅ functorOfNatTrans β

(X : CategoryTheory.Endofunctor.Coalgebra F)

((CategoryTheory.Endofunctor.Coalgebra.functorOfNatTransEq h).hom.app X).f = CategoryTheory.CategoryStruct.id X.V


/--
A monoidal functor is a lax monoidal functor for which the tensorator and unitor are isomorphisms.

See <https://stacks.math.columbia.edu/tag/0FFL>.
-/
structure MonoidalFunctor extends LaxMonoidalFunctor.{v₁, v₂} C D where
  ε_isIso : IsIso ε := by infer_instance
  μ_isIso : ∀ X Y : C, IsIso (μ X Y) := by infer_instance

(self : CategoryTheory.MonoidalFunctor C D)


@[reassoc (attr := simp, nolint simpNF)]
theorem obj_μ_app (m₁ m₂ m₃ : M) (X : C) :
    (F.obj m₃).map ((F.μ m₁ m₂).app X) =
      (F.μ m₂ m₃).app ((F.obj m₁).obj X) ≫
        (F.μ m₁ (m₂ ⊗ m₃)).app X ≫
          (F.map (α_ m₁ m₂ m₃).inv).app X ≫ (F.μIso (m₁ ⊗ m₂) m₃).inv.app X

(F : CategoryTheory.MonoidalFunctor M (CategoryTheory.Functor C C))

(F.obj m₃).map ((F.μ m₁ m₂).app X) =
  CategoryTheory.CategoryStruct.comp ((F.μ m₂ m₃).app ((F.obj m₁).obj X))
    (CategoryTheory.CategoryStruct.comp ((F.μ m₁ (CategoryTheory.MonoidalCategory.tensorObj m₂ m₃)).app X)
      (CategoryTheory.CategoryStruct.comp ((F.map (CategoryTheory.MonoidalCategory.associator m₁ m₂ m₃).inv).app X)
        ((F.μIso (CategoryTheory.MonoidalCategory.tensorObj m₁ m₂) m₃).inv.app X)))


@[simp]
theorem smul_mk (c : 𝕜) (f : α → γ) (hf : AEStronglyMeasurable f μ) :
    c • (mk f hf : α →ₘ[μ] γ) = mk (c • f) (hf.const_smul _)

(hf : MeasureTheory.AEStronglyMeasurable f μ)

c • MeasureTheory.AEEqFun.mk f hf = MeasureTheory.AEEqFun.mk (c • f) ⋯


theorem Monotone.le_map_iSup [CompleteLattice β] {f : α → β} (hf : Monotone f) :
    ⨆ i, f (s i) ≤ f (iSup s)

{α : Type u_1}
{β : Type u_2}
{ι : Sort u_5}
[CompleteLattice α]
{s : ι → α}
[CompleteLattice β]
{f : α → β}
(hf : Monotone f)


theorem Ico_eq_Ico_iff (h : a₁ < b₁ ∨ a₂ < b₂) : Ico a₁ b₁ = Ico a₂ b₂ ↔ a₁ = a₂ ∧ b₁ = b₂

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

Set.Ico a₁ b₁ = Set.Ico a₂ b₂ ↔ a₁ = a₂ ∧ b₁ = b₂


theorem commutator_centralizer_commutator_le_center :
    ⁅centralizer (commutator G : Set G), centralizer (commutator G)⁆ ≤ Subgroup.center G

⁅Subgroup.centralizer ↑(commutator G), Subgroup.centralizer ↑(commutator G)⁆ ≤ Subgroup.center G


theorem Filter.Tendsto.ennrpow_const {α : Type*} {f : Filter α} {m : α → ℝ≥0∞} {a : ℝ≥0∞} (r : ℝ)
    (hm : Tendsto m f (𝓝 a)) : Tendsto (fun x => m x ^ r) f (𝓝 (a ^ r))

{α : Type u_1}
{f : Filter α}
{m : α → ℝ≥0∞}
{a : ℝ≥0∞}
(r : ℝ)
(hm : Filter.Tendsto m f (𝓝 a))

Filter.Tendsto (fun x => m x ^ r) f (𝓝 (a ^ r))


theorem isTorsionBySet_quotient_iff (N : Submodule R M) (s : Set R) :
    IsTorsionBySet R (M⧸N) s ↔ ∀ x, ∀ r ∈ s, r • x ∈ N

{R : Type u_1}
{M : Type u_2}
[CommRing R]
[AddCommGroup M]
[Module R M]
(N : Submodule R M)
(s : Set R)

Module.IsTorsionBySet R (M ⧸ N) s ↔ ∀ (x : M), ∀ r ∈ s, r • x ∈ N


/-- A type `α` is uncountable if it is not countable. -/
@[mk_iff uncountable_iff_not_countable]
class Uncountable (α : Sort*) : Prop where
  /-- A type `α` is uncountable if it is not countable. -/
  not_countable : ¬Countable α


theorem head_succ' (n m : ℕ) (x : ∀ n, CofixA F n) (Hconsistent : AllAgree x) :
    head' (x (succ n)) = head' (x (succ m))

(x : (n : ℕ) → PFunctor.Approx.CofixA F n)

(Hconsistent : PFunctor.Approx.AllAgree x)

PFunctor.Approx.head' (x n.succ) = PFunctor.Approx.head' (x m.succ)


theorem sle_eq_carry (x y : BitVec w) :
    x.sle y = !((x.msb == y.msb).xor (carry w y (~~~x) true))

x.sle y = !(x.msb == y.msb).xor (BitVec.carry w y (~~~x) true)


protected theorem hasFPowerSeriesOnBall (f : E →L[𝕜] F) (x : E) :
    HasFPowerSeriesOnBall f (f.fpowerSeries x) x ∞

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{F : Type u_3}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
(f : E →L[𝕜] F)
(x : E)

HasFPowerSeriesOnBall (⇑f) (f.fpowerSeries x) x ⊤


/-- The underlying function of a `Poly` is a polynomial -/
protected theorem isPoly (f : Poly α) : IsPoly f


theorem quasiSeparatedSpace_iff_quasiSeparated (X : Scheme) :
    QuasiSeparatedSpace X ↔ QuasiSeparated (terminal.from X)

QuasiSeparatedSpace ↑↑X.toPresheafedSpace ↔ AlgebraicGeometry.QuasiSeparated (CategoryTheory.Limits.terminal.from X)


@[simp]
theorem closure_diff_frontier (s : Set X) : closure s \ frontier s = interior s

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


@[to_additive (attr := simp)]
theorem mem_top (x : M) : x ∈ (⊤ : Subsemigroup M)


@[simp, norm_cast]
theorem coe_one : ((1 : MvPolynomial σ R) : MvPowerSeries σ R) = 1

{σ : Type u_1}
{R : Type u_2}
[CommSemiring R]


/-- The type of frame homomorphisms from `α` to `β`. They preserve finite meets and arbitrary joins.
-/
structure FrameHom (α β : Type*) [CompleteLattice α] [CompleteLattice β] extends
  InfTopHom α β where
  /-- The proposition that frame homomorphisms commute with arbitrary suprema/joins. -/
  map_sSup' (s : Set α) : toFun (sSup s) = sSup (toFun '' s)

{α : Type u_8}
{β : Type u_9}
[CompleteLattice α]
[CompleteLattice β]
(self : FrameHom α β)
(s : Set α)

self.toFun (sSup s) = sSup (self.toFun '' s)


/-- The type of sections which generate a sheaf of modules. -/
structure GeneratingSections where
  /-- the index type for the sections -/
  I : Type u
  /-- a family of sections which generate the sheaf of modules -/
  s : I → M.sections
  epi : Epi (M.freeHomEquiv.symm s) := by infer_instance

{J : CategoryTheory.GrothendieckTopology C}

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


/-- Exposed points exactly correspond to exposed singletons. -/
theorem mem_exposedPoints_iff_exposed_singleton : x ∈ A.exposedPoints 𝕜 ↔ IsExposed 𝕜 A {x}

{𝕜 : Type u_1}
{E : Type u_2}
[TopologicalSpace 𝕜]
[OrderedRing 𝕜]
[AddCommMonoid E]
[TopologicalSpace E]
[Module 𝕜 E]
{A : Set E}
{x : E}

x ∈ Set.exposedPoints 𝕜 A ↔ IsExposed 𝕜 A {x}


theorem eval₂Hom_eq_zero (f : R →+* S₂) (g : σ → S₂) (φ : MvPolynomial σ R)
    (h : ∀ d, φ.coeff d ≠ 0 → ∃ i ∈ d.support, g i = 0) : eval₂Hom f g φ = 0

(h : ∀ (d : σ →₀ ℕ), MvPolynomial.coeff d φ ≠ 0 → ∃ i ∈ d.support, g i = 0)


theorem not_mem_of_not_mem_closure {P : M} (hP : P ∉ closure L s) : P ∉ s

(hP : P ∉ (FirstOrder.Language.Substructure.closure L).toFun s)


theorem isCoprime_mul_unit_left : IsCoprime (x * y) (x * z) ↔ IsCoprime y z

{R : Type u_1}
[CommSemiring R]
{x : R}
(hu : IsUnit x)
(y z : R)


/-- Given an exact sequence `0 → M → N → P → 0` of `R`-modules, `Supp N = Supp M ∪ Supp P`. -/
lemma Module.support_of_exact (h : Function.Exact f g)
    (hf : Function.Injective f) (hg : Function.Surjective g) :
    Module.support R N = Module.support R M ∪ Module.support R P

{R : Type u_1}
{M : Type u_2}
[CommRing R]
[AddCommGroup M]
[Module R M]
{N : Type u_3}
{P : Type u_4}
[AddCommGroup N]
[Module R N]
[AddCommGroup P]
[Module R P]
{f : M →ₗ[R] N}
{g : N →ₗ[R] P}
(h : Function.Exact ⇑f ⇑g)
(hf : Function.Injective ⇑f)
(hg : Function.Surjective ⇑g)


@[to_additive]
theorem Submonoid.isSubmonoid (S : Submonoid M) : IsSubmonoid (S : Set M)

{M : Type u_1}
[AddMonoid M]
(S : AddSubmonoid M)


lemma vComp_iff_of_equivalences (eL : C₂ ≌ C₃) (eR : D₂ ≌ D₃)
    (w' : H₂ ⋙ eR.functor ≅ eL.functor ⋙ H₃) :
    (w.vComp w'.hom).GuitartExact ↔ w.GuitartExact

(w : CategoryTheory.TwoSquare H₁ L₁ R₁ H₂)

(w' : H₂.comp eR.functor ≅ eL.functor.comp H₃)


theorem Sbtw.left_ne {x y z : P} (h : Sbtw R x y z) : x ≠ y

{R : Type u_1}
{V : Type u_2}
{P : Type u_4}
[OrderedRing R]
[AddCommGroup V]
[Module R V]
[AddTorsor V P]
{x y z : P}
(h : Sbtw R x y z)


@[to_additive] -- `simp` can prove this
theorem mem_sphere_one_iff_norm : a ∈ sphere (1 : E) r ↔ ‖a‖ = r

{E : Type u_6}
[SeminormedAddGroup E]
{a : E}
{r : ℝ}


/-- Note this also holds for `z = 0`, but we do not need this case for `sin_pi_mul_eq`.  -/
theorem integral_cos_mul_cos_pow (hn : 2 ≤ n) (hz : z ≠ 0) :
    (((1 : ℂ) - (4 : ℂ) * z ^ 2 / (n : ℂ) ^ 2) *
      ∫ x in (0 : ℝ)..π / 2, Complex.cos (2 * z * x) * (cos x : ℂ) ^ n) =
      (n - 1 : ℂ) / n *
        ∫ x in (0 : ℝ)..π / 2, Complex.cos (2 * z * x) * (cos x : ℂ) ^ (n - 2)

(1 - 4 * z ^ 2 / ↑n ^ 2) * ∫ (x : ℝ) in 0 ..π / 2, Complex.cos (2 * z * ↑x) * ↑(Real.cos x) ^ n =
  (↑n - 1) / ↑n * ∫ (x : ℝ) in 0 ..π / 2, Complex.cos (2 * z * ↑x) * ↑(Real.cos x) ^ (n - 2)


/-- One half of the equivalence between `C` and `AsSmall C`. -/
@[simps]
def AsSmall.up : C ⥤ AsSmall C

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

∀ {X Y : C} (f : X ⟶ Y), (CategoryTheory.AsSmall.up.map f).down = f


theorem WellFounded.isSupFiniteCompact (h : WellFounded ((· > ·) : α → α → Prop)) :
    IsSupFiniteCompact α

(α : Type u_2)
[CompleteLattice α]
(h : WellFounded fun x x_1 => x > x_1)


@[to_additive]
theorem Finite.smul : s.Finite → t.Finite → (s • t).Finite

{α : Type u_2}
{β : Type u_3}
[VAdd α β]
{s : Set α}
{t : Set β}


@[simp] theorem isSuffixOf_replicate {a : α} :
    isSuffixOf l (replicate n a) = (decide (l.length ≤ n) && l.all (· == a))

{α : Type u_1}
[BEq α]
{l : List α}
{n : Nat}
{a : α}

l.isSuffixOf (List.replicate n a) = (decide (l.length ≤ n) && l.all fun x => x == a)


theorem coprodᵢ_neBot_iff' :
    NeBot (Filter.coprodᵢ f) ↔ (∀ i, Nonempty (α i)) ∧ ∃ d, NeBot (f d)

{ι : Type u_1}
{α : ι → Type u_2}
{f : (i : ι) → Filter (α i)}

(Filter.coprodᵢ f).NeBot ↔ (∀ (i : ι), Nonempty (α i)) ∧ ∃ d, (f d).NeBot


theorem to_quotientMap (hcl : IsClosedMap f) (hcont : Continuous f)
    (hsurj : Surjective f) : QuotientMap f

{X : Type u_1}
{Y : Type u_2}
{f : X → Y}
[TopologicalSpace X]
[TopologicalSpace Y]
(hcl : IsClosedMap f)
(hcont : Continuous f)
(hsurj : Function.Surjective f)


lemma OpenEmbedding.functor_isContinuous (h : OpenEmbedding f) :
    h.isOpenMap.functor.IsContinuous (Opens.grothendieckTopology X)
      (Opens.grothendieckTopology Y)

{X Y : TopCat}
{f : X ⟶ Y}
(h : OpenEmbedding ⇑f)

⋯.functor.IsContinuous (Opens.grothendieckTopology ↑X) (Opens.grothendieckTopology ↑Y)


@[to_additive]
theorem swap_map (f : M →* M') (g : N →* N') (x : M ∗ N) :
    swap M' N' (map f g x) = map g f (swap M N x)

{M : Type u_1}
{N : Type u_2}
{M' : Type u_3}
{N' : Type u_4}
[MulOneClass M]
[MulOneClass N]
[MulOneClass M']
[MulOneClass N']
(f : M →* M')
(g : N →* N')
(x : Monoid.Coprod M N)

(Monoid.Coprod.swap M' N') ((Monoid.Coprod.map f g) x) = (Monoid.Coprod.map g f) ((Monoid.Coprod.swap M N) x)


@[simp]
theorem reduceOption_nil : @reduceOption α [] = []


theorem exists₅_congr {p q : ∀ a b c d, ε a b c d → Prop}
    (h : ∀ a b c d e, p a b c d e ↔ q a b c d e) :
    (∃ a b c d e, p a b c d e) ↔ ∃ a b c d e, q a b c d e

{δ : (a : α) → (b : β a) → γ a b → Sort u_4}

{ε : (a : α) → (b : β a) → (c : γ a b) → δ a b c → Sort u_5}

{p q : (a : α) → (b : β a) → (c : γ a b) → (d : δ a b c) → ε a b c d → Prop}

(h : ∀ (a : α) (b : β a) (c : γ a b) (d : δ a b c) (e : ε a b c d), p a b c d e ↔ q a b c d e)


{V : Type u_1}
{G : SimpleGraph V}
{v : V}


/-- Given a continuous function `f`, we can define a `Homotopy f f` by `F (t, x) = f x`
-/
@[simps]
def refl (f : C(X, Y)) : Homotopy f f

{X : Type u}
{Y : Type v}
[TopologicalSpace X]
[TopologicalSpace Y]
(f : C(X, Y))
(x : ↑I × X)

(ContinuousMap.Homotopy.refl f) x = f x.2


theorem _root_.IsLocalization.AtPrime.prime_unique_of_minimal {S} [CommSemiring S] [Algebra R S]
    [IsLocalization.AtPrime S I] {J K : Ideal S} [J.IsPrime] [K.IsPrime] : J = K

{R : Type u_1}
[CommSemiring R]
{I : Ideal R}
[hI : I.IsPrime]
(hMin : I ∈ minimalPrimes R)
{S : Type u_2}
[CommSemiring S]
[Algebra R S]
[IsLocalization.AtPrime S I]
{J K : Ideal S}
[J.IsPrime]
[K.IsPrime]


/-- The canonical isomorphism `(F.postcomp G).postcomp G' ≅ F.postcomp (G ⋙ G')`. -/
@[simps!]
def postcompPostcompIso (G : D ⥤ E) (G' : E ⥤ E') [G.CommShift A] [G'.CommShift A] :
    (F.postcomp G).postcomp G' ≅ F.postcomp (G ⋙ G')

(F : CategoryTheory.SingleFunctors C D A)

∀ (x : C), ((F.postcompPostcompIso G G').inv.hom a).app x = 𝟙 (G'.obj (G.obj ((F.functor a).obj x)))


theorem center_le_centralizer (s) : center R A ≤ centralizer R s

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

Subalgebra.center R A ≤ Subalgebra.centralizer R s


@[simp, norm_cast] lemma coe_inj {r₁ r₂ : ℝ≥0} : (r₁ : ℝ) = r₂ ↔ r₁ = r₂

↑r₁ = ↑r₂ ↔ r₁ = r₂


/-- The preimage of a compact set under a closed embedding is a compact set. -/
theorem ClosedEmbedding.isCompact_preimage {f : X → Y} (hf : ClosedEmbedding f)
    {K : Set Y} (hK : IsCompact K) : IsCompact (f ⁻¹' K)

{X : Type u}
{Y : Type v}
[TopologicalSpace X]
[TopologicalSpace Y]
{f : X → Y}
(hf : ClosedEmbedding f)
{K : Set Y}
(hK : IsCompact K)


theorem of_eq {f g : α →. σ} (hf : Partrec f) (H : ∀ n, f n = g n) : Partrec g

{α : Type u_1}
{σ : Type u_4}
[Primcodable α]
[Primcodable σ]
{f g : α →. σ}
(hf : Partrec f)
(H : ∀ (n : α), f n = g n)


@[simp] theorem Rat.comap_cast_atBot [LinearOrderedField R] [Archimedean R] :
    comap ((↑) : ℚ → R) atBot = atBot

{R : Type u_2}
[LinearOrderedField R]
[Archimedean R]

Filter.comap Rat.cast Filter.atBot = Filter.atBot


/-- If `b` and `b'` are `ℚ`-bases of a number field `K` such that
`∀ i j, IsIntegral ℤ (b.toMatrix b' i j)` and `∀ i j, IsIntegral ℤ (b'.toMatrix b i j)` then
`discr ℚ b = discr ℚ b'`. -/
theorem Algebra.discr_eq_discr_of_toMatrix_coeff_isIntegral [NumberField K]
    {b : Basis ι ℚ K} {b' : Basis ι' ℚ K} (h : ∀ i j, IsIntegral ℤ (b.toMatrix b' i j))
    (h' : ∀ i j, IsIntegral ℤ (b'.toMatrix b i j)) : discr ℚ b = discr ℚ b'

(h : ∀ (i : ι) (j : ι'), IsIntegral ℤ (b.toMatrix (⇑b') i j))

(h' : ∀ (i : ι') (j : ι), IsIntegral ℤ (b'.toMatrix (⇑b) i j))

Algebra.discr ℚ ⇑b = Algebra.discr ℚ ⇑b'


/-- A ring iso `α ≃+* β` can equivalently be viewed as a ring iso `αᵐᵒᵖ ≃+* βᵐᵒᵖ`. -/
@[simps! symm_apply_apply symm_apply_symm_apply apply_apply apply_symm_apply]
protected def op {α β} [Add α] [Mul α] [Add β] [Mul β] :
    α ≃+* β ≃ (αᵐᵒᵖ ≃+* βᵐᵒᵖ)

{α : Type u_7}
{β : Type u_8}
[Add α]
[Mul α]
[Add β]
[Mul β]
(f : αᵐᵒᵖ ≃+* βᵐᵒᵖ)

∀ (a : α), (RingEquiv.op.symm f) a = MulOpposite.unop (f (MulOpposite.op a))


lemma sign_mul_inv_abs' (a : EReal) : (sign a) * ((a.abs⁻¹ : ℝ≥0∞) : EReal) = a⁻¹


@[simp]
lemma map_c₄ : (W.map φ).c₄ = φ W.c₄

{R : Type u}
[CommRing R]
(W : WeierstrassCurve R)
{A : Type v}
[CommRing A]
(φ : R →+* A)


protected theorem pow_dvd_pow {m n : Nat} (a : Nat) (h : m ≤ n) : a ^ m ∣ a ^ n


theorem tendsto_atBot_add_const_right (C : β) (hf : Tendsto f l atBot) :
    Tendsto (fun x => f x + C) l atBot

{α : Type u_3}
{β : Type u_4}
[OrderedAddCommGroup β]
(l : Filter α)
{f : α → β}
(C : β)
(hf : Filter.Tendsto f l Filter.atBot)

Filter.Tendsto (fun x => f x + C) l Filter.atBot


theorem pairwise_middle {R : α → α → Prop} (s : ∀ {x y}, R x y → R y x) {a : α} {l₁ l₂ : List α} :
    Pairwise R (l₁ ++ a :: l₂) ↔ Pairwise R (a :: (l₁ ++ l₂))

{α : Type u_1}
{R : α → α → Prop}
(s : ∀ {x y : α}, R x y → R y x)
{a : α}
{l₁ l₂ : List α}

List.Pairwise R (l₁ ++ a :: l₂) ↔ List.Pairwise R (a :: (l₁ ++ l₂))


lemma le_def [PartialOrder R] (f g : C(X, R)₀) : f ≤ g ↔ ∀ x, f x ≤ g x

{X : Type u_1}
{R : Type u_3}
[Zero X]
[Zero R]
[TopologicalSpace X]
[TopologicalSpace R]
[PartialOrder R]
(f g : ContinuousMapZero X R)


/-- `LinearMap.snd` as an isometry, when the first space has the zero quadratic form. -/
@[simps!]
def Isometry.snd (Q₂ : QuadraticMap R M₂ P) : ((0 : QuadraticMap R M₁ P).prod Q₂) →qᵢ Q₂

{R : Type u_2}
(M₁ : Type u_3)
{M₂ : Type u_4}
{P : Type u_7}
[CommSemiring R]
[AddCommMonoid M₁]
[AddCommMonoid M₂]
[AddCommMonoid P]
[Module R M₁]
[Module R M₂]
[Module R P]
(Q₂ : QuadraticMap R M₂ P)
(self : M₁ × M₂)

(QuadraticMap.Isometry.snd M₁ Q₂) self = self.2


/-- If a function `f` tends to infinity along a filter,
then `f` multiplied by a negative constant (on the left) tends to negative infinity. -/
theorem Tendsto.const_mul_atTop_of_neg (hr : r < 0) (hf : Tendsto f l atTop) :
    Tendsto (fun x => r * f x) l atBot

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

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


theorem all_semanticallyEquivalent_not_ex_not (φ : L.BoundedFormula α (n + 1)) :
    T.SemanticallyEquivalent φ.all φ.not.ex.not

{L : FirstOrder.Language}
{T : L.Theory}
{α : Type w}
{n : ℕ}
(φ : L.BoundedFormula α (n + 1))


theorem convex_halfspace_im_le (r : ℝ) : Convex ℝ { c : ℂ | c.im ≤ r }


theorem zorn_nonempty_partialOrder [Nonempty α]
    (h : ∀ c : Set α, IsChain (· ≤ ·) c → c.Nonempty → BddAbove c) : ∃ m : α, ∀ a, m ≤ a → a = m

(h : ∀ (c : Set α), IsChain (fun x x_1 => x ≤ x_1) c → c.Nonempty → BddAbove c)


theorem all_singleton {P : α → Prop} {x : α} : All P (singleton x) ↔ P x


theorem Int.natCast_pow_pred (b p : ℕ) (w : 0 < b) : ((b ^ p - 1 : ℕ) : ℤ) = (b : ℤ) ^ p - 1


@[to_additive]
protected theorem left_comm (h : Commute a b) (c) : a * (b * c) = b * (a * c)

{S : Type u_3}
[Semigroup S]
{a b : S}
(h : Commute a b)
(c : S)


@[simp]
theorem coe_finset_sum (I : Finset ι) (κ : ι → Kernel α β) : ⇑(∑ i ∈ I, κ i) = ∑ i ∈ I, ⇑(κ i)

{α : Type u_1}
{β : Type u_2}
{ι : Type u_3}
{mα : MeasurableSpace α}
{mβ : MeasurableSpace β}
(I : Finset ι)
(κ : ι → ProbabilityTheory.Kernel α β)


@[simp]
theorem map_PInfty_f {D : Type*} [Category D] [Preadditive D] (G : C ⥤ D) [G.Additive]
    (X : SimplicialObject C) (n : ℕ) :
    (PInfty : K[((whiskering C D).obj G).obj X] ⟶ _).f n =
      G.map ((PInfty : AlternatingFaceMapComplex.obj X ⟶ _).f n)

{C : Type u_1}
[CategoryTheory.Category.{u_4, u_1} C]
[CategoryTheory.Preadditive C]
{D : Type u_2}
[CategoryTheory.Category.{u_3, u_2} D]
[CategoryTheory.Preadditive D]
(G : C ⥤ D)
[G.Additive]
(X : CategoryTheory.SimplicialObject C)
(n : ℕ)

AlgebraicTopology.DoldKan.PInfty.f n = G.map (AlgebraicTopology.DoldKan.PInfty.f n)


@[simp]
theorem trans_toHomotopyEquiv (h₀ : X ≃ₜ Y) (h₁ : Y ≃ₜ Z) :
    (h₀.trans h₁).toHomotopyEquiv = h₀.toHomotopyEquiv.trans h₁.toHomotopyEquiv

{X : Type u}
{Y : Type v}
{Z : Type w}
[TopologicalSpace X]
[TopologicalSpace Y]
[TopologicalSpace Z]
(h₀ : X ≃ₜ Y)
(h₁ : Y ≃ₜ Z)


theorem self_mem_ae_restrict {s} (hs : MeasurableSet s) : s ∈ ae (μ.restrict s)

{α : Type u_2}
{m0 : MeasurableSpace α}
{μ : MeasureTheory.Measure α}
{s : Set α}
(hs : MeasurableSet s)


lemma add_projection_respects_measure (t : ℝ) {U : Set (AddCircle T)} (meas_U : MeasurableSet U) :
    volume U = volume (QuotientAddGroup.mk ⁻¹' U ∩ (Ioc t (t + T)))

(T : ℝ)
[hT : Fact (0 < T)]
(t : ℝ)
{U : Set (AddCircle T)}
(meas_U : MeasurableSet U)

MeasureTheory.volume U = MeasureTheory.volume (QuotientAddGroup.mk ⁻¹' U ∩ Set.Ioc t (t + T))


/-- Construct a pseudofunctor from an oplax functor whose `mapId` and `mapComp` are isomorphisms. -/
@[simps]
def mkOfOplax (F : OplaxFunctor B C) (F' : F.PseudoCore) : Pseudofunctor B C

{B : Type u₁}
[CategoryTheory.Bicategory B]
{C : Type u₂}
[CategoryTheory.Bicategory C]
(F : CategoryTheory.OplaxFunctor B C)
(F' : F.PseudoCore)

∀ {a b c : B} (f : a ⟶ b) (g : b ⟶ c), (CategoryTheory.Pseudofunctor.mkOfOplax F F').mapComp f g = F'.mapCompIso f g


@[simp] theorem mul_eq (x y : BitVec w)                   : BitVec.mul x y = x * y


@[simp]
theorem coe_toHom {f : M ↪[L] N} : (f.toHom : M → N) = f

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


@[simp]
theorem filter_apply_neg {a : α} (h : ¬p a) : f.filter p a = 0

{α : Type u_1}
{M : Type u_5}
[Zero M]
(p : α → Prop)
[DecidablePred p]
(f : α →₀ M)
{a : α}
(h : ¬p a)


@[simp]
theorem coe_mk (s : Set α) (h) : (mk s h : Set α) = s

{α : Type u_2}
[TopologicalSpace α]
(s : Set α)
(h : IsClosed s)


theorem order_eq_zero_iff (hp : p ≠ 0) : p.order = 0 ↔ p 0 ≠ 0

{𝕜 : Type u}
{E : Type v}
{F : Type w}
[Ring 𝕜]
[AddCommGroup E]
[Module 𝕜 E]
[TopologicalSpace E]
[TopologicalAddGroup E]
[ContinuousConstSMul 𝕜 E]
[AddCommGroup F]
[Module 𝕜 F]
[TopologicalSpace F]
[TopologicalAddGroup F]
[ContinuousConstSMul 𝕜 F]
{p : FormalMultilinearSeries 𝕜 E F}
(hp : p ≠ 0)


@[simp]
theorem apply_of_ne (h : ¬(i = i' ∧ j = j')) : stdBasisMatrix i j c i' j' = 0

{m : Type u_2}
{n : Type u_3}
{α : Type u_5}
[DecidableEq m]
[DecidableEq n]
[Semiring α]
(i : m)
(j : n)
(c : α)
(i' : m)
(j' : n)
(h : ¬(i = i' ∧ j = j'))


theorem finrank_add_finrank_orthogonal (b₁ : B.IsRefl) (W : Submodule K V) :
    finrank K W + finrank K (B.orthogonal W) =
      finrank K V + finrank K (W ⊓ B.orthogonal ⊤ : Subspace K V)

{V : Type u_5}
{K : Type u_6}
[Field K]
[AddCommGroup V]
[Module K V]
[FiniteDimensional K V]
{B : LinearMap.BilinForm K V}
(b₁ : B.IsRefl)
(W : Submodule K V)

FiniteDimensional.finrank K ↥W + FiniteDimensional.finrank K ↥(B.orthogonal W) =
  FiniteDimensional.finrank K V + FiniteDimensional.finrank K ↥(W ⊓ B.orthogonal ⊤)


theorem prod_ofPNatList (l : List ℕ+) (h) : (ofPNatList l h).prod = l.prod

(PrimeMultiset.ofPNatList l h).prod = l.prod


lemma empty_mem_countableGeneratingSet [MeasurableSpace α] [CountablyGenerated α] :
    ∅ ∈ countableGeneratingSet α

{α : Type u_1}
[MeasurableSpace α]
[MeasurableSpace.CountablyGenerated α]

∅ ∈ MeasurableSpace.countableGeneratingSet α


theorem sup_id_set_eq_sUnion (s : Finset (Set α)) : s.sup id = ⋃₀ ↑s


/-- The exponents of the Cantor normal form are decreasing. -/
theorem CNF_sorted (b o : Ordinal) : ((CNF b o).map Prod.fst).Sorted (· > ·)

List.Sorted (fun x x_1 => x > x_1) (List.map Prod.fst (Ordinal.CNF b o))


/-- Given two commutative squares
```
a --φ--> b --ψ--> c
|        |        |
v        v        v
R --f--> S --g--> T
```
such that `φ ≫ ψ` and `ψ` are strongly cartesian, then so is `φ`. -/
protected lemma of_comp [IsStronglyCartesian p g ψ] [IsStronglyCartesian p (f ≫ g) (φ ≫ ψ)]
    [IsHomLift p f φ] : IsStronglyCartesian p f φ

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


@[fun_prop]
theorem hasFDerivAt_list_prod' [Fintype ι] {l : List ι} {x : ι → 𝔸'} :
    HasFDerivAt (𝕜 := 𝕜) (fun x ↦ (l.map x).prod)
      (∑ i : Fin l.length, ((l.take i).map x).prod •
        smulRight (proj (l.get i)) ((l.drop (.succ i)).map x).prod) x

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{ι : Type u_6}
{𝔸' : Type u_8}
[NormedCommRing 𝔸']
[NormedAlgebra 𝕜 𝔸']
[Fintype ι]
{l : List ι}
{x : ι → 𝔸'}

HasFDerivAt (fun x => (List.map x l).prod)
  (∑ i : Fin l.length,
    (List.map x (List.take (↑i) l)).prod •
      (ContinuousLinearMap.proj (l.get i)).smulRight (List.map x (List.drop (↑i).succ l)).prod)
  x


@[to_additive]
theorem _root_.Fintype.prod_eq_prod_compl_mul [DecidableEq α] [Fintype α] (a : α) (f : α → β) :
    ∏ i, f i = (∏ i ∈ {a}ᶜ, f i) * f a

{α : Type u_3}
{β : Type u_4}
[CommMonoid β]
[DecidableEq α]
[Fintype α]
(a : α)
(f : α → β)


theorem closure_inter_open_nonempty_iff (h : IsOpen t) :
    (closure s ∩ t).Nonempty ↔ (s ∩ t).Nonempty

{X : Type u}
{s t : Set X}
[TopologicalSpace X]
(h : IsOpen t)


lemma Presheaf.IsSheaf.hom (hG : Presheaf.IsSheaf J G) :
    Presheaf.IsSheaf J (presheafHom F G)

{J : CategoryTheory.GrothendieckTopology C}

(hG : CategoryTheory.Presheaf.IsSheaf J G)

CategoryTheory.Presheaf.IsSheaf J (CategoryTheory.presheafHom F G)


/-- A factorisation of a morphism `f = e ≫ m`, with `m` monic. -/
structure MonoFactorisation (f : X ⟶ Y) where
  I : C -- Porting note: violates naming conventions but can't think a better replacement
  m : I ⟶ Y
  [m_mono : Mono m]
  e : X ⟶ I
  fac : e ≫ m = f := by aesop_cat

(self : CategoryTheory.Limits.MonoFactorisation f)


theorem C_zero : C (0 : R) = (0 : HahnSeries Γ R)

{Γ : Type u_1}
{R : Type u_3}
[OrderedCancelAddCommMonoid Γ]
[NonAssocSemiring R]


@[to_additive (attr := simp)]
theorem lift_comp_of : lift f ∘ of = f

{α : Type u}
{β : Type v}
[AddSemigroup β]
(f : α → β)

⇑(FreeAddSemigroup.lift f) ∘ FreeAddSemigroup.of = f


theorem sbtw_iff_mem_image_Ioo_and_ne [NoZeroSMulDivisors R V] {x y z : P} :
    Sbtw R x y z ↔ y ∈ lineMap x z '' Set.Ioo (0 : R) 1 ∧ x ≠ z

{R : Type u_1}
{V : Type u_2}
{P : Type u_4}
[OrderedRing R]
[AddCommGroup V]
[Module R V]
[AddTorsor V P]
[NoZeroSMulDivisors R V]
{x y z : P}

Sbtw R x y z ↔ y ∈ ⇑(AffineMap.lineMap x z) '' Set.Ioo 0 1 ∧ x ≠ z


theorem ofFunction_apply (s : Set α) :
    OuterMeasure.ofFunction m m_empty s = ⨅ (t : ℕ → Set α) (_ : s ⊆ iUnion t), ∑' n, m (t n)

{α : Type u_1}
(m : Set α → ℝ≥0∞)
(m_empty : m ∅ = 0)
(s : Set α)

(MeasureTheory.OuterMeasure.ofFunction m m_empty) s = ⨅ t, ⨅ (_ : s ⊆ Set.iUnion t), ∑' (n : ℕ), m (t n)


lemma absolutelyContinuous_smul {c : ℝ≥0∞} (hc : c ≠ 0) : μ ≪ c • μ

{α : Type u_1}
{m0 : MeasurableSpace α}
{μ : MeasureTheory.Measure α}
{c : ENNReal}
(hc : c ≠ 0)


/-- In a nontrivial topological vector space over a complete nontrivially normed field, any nonempty
open set has cardinality at least continuum. -/
theorem continuum_le_cardinal_of_isOpen
    {E : Type*} (𝕜 : Type*) [NontriviallyNormedField 𝕜] [CompleteSpace 𝕜] [AddCommGroup E]
    [Module 𝕜 E] [Nontrivial E] [TopologicalSpace E] [ContinuousAdd E] [ContinuousSMul 𝕜 E]
    {s : Set E} (hs : IsOpen s) (h's : s.Nonempty) : 𝔠 ≤ #s

{E : Type u_1}
(𝕜 : Type u_2)
[NontriviallyNormedField 𝕜]
[CompleteSpace 𝕜]
[AddCommGroup E]
[Module 𝕜 E]
[Nontrivial E]
[TopologicalSpace E]
[ContinuousAdd E]
[ContinuousSMul 𝕜 E]
{s : Set E}
(hs : IsOpen s)
(h's : s.Nonempty)


/-- Fixing subgroup of iUnion is intersection -/
theorem fixingSubgroup_iUnion {ι : Sort*} {s : ι → Set α} :
    fixingSubgroup M (⋃ i, s i) = ⨅ i, fixingSubgroup M (s i)

(M : Type u_1)
(α : Type u_2)
[Group M]
[MulAction M α]
{ι : Sort u_3}
{s : ι → Set α}


/-- The interior and boundary of a manifold `M` are disjoint. -/
lemma disjoint_interior_boundary : Disjoint (I.interior M) (I.boundary M)

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


/-- `map_cocone` commutes with `precompose`. In particular, for `F : J ⥤ C`, given a cocone
`c : Cocone F`, a natural transformation `α : F ⟶ G` and a functor `H : C ⥤ D`, we have two obvious
ways of producing a cocone over `G ⋙ H`, and they are both isomorphic.
-/
@[simps!]
def mapCoconePrecompose {α : F ⟶ G} {c} :
    mapCocone H ((Cocones.precompose α).obj c) ≅
      (Cocones.precompose (whiskerRight α H : _)).obj (mapCocone H c)

{J : Type u₁}
[CategoryTheory.Category.{v₁, u₁} J]
{C : Type u₃}
[CategoryTheory.Category.{v₃, u₃} C]
{D : Type u₄}
[CategoryTheory.Category.{v₄, u₄} D]
(H : C ⥤ D)
{F G : J ⥤ C}
{α : F ⟶ G}
{c : CategoryTheory.Limits.Cocone G}

H.mapCoconePrecompose.inv.hom = 𝟙 (H.obj c.pt)


/-- Pointwise inversion of submonoids as an order isomorphism. -/
@[to_additive (attr := simps!) "Pointwise negation of additive submonoids as an order isomorphism"]
def invOrderIso : Submonoid G ≃o Submonoid G

∀ (a : AddSubmonoid G), ↑((RelIso.symm AddSubmonoid.negOrderIso) a) = -↑a


@[simp]
theorem condexpL1_measure_zero (hm : m ≤ m0) : condexpL1 hm (0 : Measure α) f = 0

{α : Type u_1}
{F' : Type u_4}
[NormedAddCommGroup F']
[NormedSpace ℝ F']
[CompleteSpace F']
{m m0 : MeasurableSpace α}
{f : α → F'}
(hm : m ≤ m0)


@[simp]
theorem Differentiable.sinh (hc : Differentiable ℝ f) : Differentiable ℝ fun x => Real.sinh (f x)

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


theorem mk_mem_sym2_iff {xs : List α} {a b : α} :
    s(a, b) ∈ xs.sym2 ↔ a ∈ xs ∧ b ∈ xs


theorem Prime.le_or_le {p : Associates α} (hp : Prime p) {a b : Associates α} (h : p ≤ a * b) :
    p ≤ a ∨ p ≤ b

{α : Type u_1}
[CommMonoidWithZero α]
{p : Associates α}
(hp : Prime p)
{a b : Associates α}
(h : p ≤ a * b)


theorem liftMonoidWithZeroHom_apply_div {L : Type*} [CommGroupWithZero L]
    (φ : MonoidWithZeroHom K[X] L) (hφ : K[X]⁰ ≤ L⁰.comap φ) (p q : K[X]) :
    liftMonoidWithZeroHom φ hφ (algebraMap _ _ p / algebraMap _ _ q) = φ p / φ q

{K : Type u}
[CommRing K]
[IsDomain K]
{L : Type u_1}
[CommGroupWithZero L]
(φ : K[X] →*₀ L)
(hφ : K[X]⁰ ≤ Submonoid.comap φ L⁰)
(p q : K[X])

(RatFunc.liftMonoidWithZeroHom φ hφ) ((algebraMap K[X] (RatFunc K)) p / (algebraMap K[X] (RatFunc K)) q) = φ p / φ q


theorem IsMittagLeffler.subset_image_eventualRange (h : F.IsMittagLeffler) (f : j ⟶ i) :
    F.eventualRange i ⊆ F.map f '' F.eventualRange j

{J : Type u}
[CategoryTheory.Category.{u_1, u} J]
(F : J ⥤ Type v)
{i j : J}
(h : F.IsMittagLeffler)
(f : j ⟶ i)


theorem eq_bot_or_bot_lt (a : α) : a = ⊥ ∨ ⊥ < a

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


theorem ae_withDensity_iff' {p : α → Prop} {f : α → ℝ≥0∞} (hf : AEMeasurable f μ) :
    (∀ᵐ x ∂μ.withDensity f, p x) ↔ ∀ᵐ x ∂μ, f x ≠ 0 → p x

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

(∀ᵐ (x : α) ∂μ.withDensity f, p x) ↔ ∀ᵐ (x : α) ∂μ, f x ≠ 0 → p x


theorem le_radius_of_tendsto (p : FormalMultilinearSeries 𝕜 E F) {l : ℝ}
    (h : Tendsto (fun n => ‖p n‖ * (r : ℝ) ^ n) atTop (𝓝 l)) : ↑r ≤ p.radius

(h : Filter.Tendsto (fun n => ‖p n‖ * ↑r ^ n) Filter.atTop (𝓝 l))


@[simp]
theorem Ico_succ_right (a b : α) : Ico a (succ b) = Icc a b

{α : Type u_1}
[Preorder α]
[SuccOrder α]
[NoMaxOrder α]
(a b : α)


@[to_additive (attr := simp)]
theorem mulEquivOfQuotient_apply (x) : mulEquivOfQuotient f x = (monoidOf S).lift f.map_units x

{M : Type u_1}
[CommMonoid M]
{S : Submonoid M}
{N : Type u_2}
[CommMonoid N]
{f : S.LocalizationMap N}
(x : Localization S)

(Localization.mulEquivOfQuotient f) x = ((Localization.monoidOf S).lift ⋯) x


/-- Pointwise inequality to control `x ^ k * f` in terms of `1 / (1 + x) ^ l` if one controls both
`f` (with a bound `C₁`) and `x ^ (k + l) * f` (with a bound `C₂`). This will be used to check
integrability of `x ^ k * f x` when `f` is a Schwartz function, and to control explicitly its
integral in terms of suitable seminorms of `f`. -/
lemma pow_mul_le_of_le_of_pow_mul_le {C₁ C₂ : ℝ} {k l : ℕ} {x f : ℝ} (hx : 0 ≤ x) (hf : 0 ≤ f)
    (h₁ : f ≤ C₁) (h₂ : x ^ (k + l) * f ≤ C₂) :
    x ^ k * f ≤ 2 ^ l * (C₁ + C₂) * (1 + x) ^ (- (l : ℝ))


@[trans]
lemma Derives.trans {u v w : List (Symbol T g.NT)} (huv : g.Derives u v) (hvw : g.Derives v w) :
    g.Derives u w

{T : Type uT}
{g : ContextFreeGrammar T}
{u v w : List (Symbol T g.NT)}
(huv : g.Derives u v)
(hvw : g.Derives v w)


@[simp]
theorem spanNorm_singleton {r : S} : spanNorm R (span ({r} : Set S)) = span {Algebra.norm R r}

(R : Type u_1)
[CommRing R]
{S : Type u_2}
[CommRing S]
[Algebra R S]
{r : S}

Ideal.spanNorm R (Ideal.span {r}) = Ideal.span {(Algebra.norm R) r}


@[mono]
theorem monotone_principal : Monotone (𝓟 : Set α → Filter α)


/-- If the angle between two vectors is nonzero, the vectors are not equal. -/
theorem ne_of_oangle_ne_zero {x y : V} (h : o.oangle x y ≠ 0) : x ≠ y

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


theorem Antiperiodic.sub_eq [AddGroup α] [InvolutiveNeg β] (h : Antiperiodic f c) (x : α) :
    f (x - c) = -f x

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


@[simp]
theorem sin_neg : sin (-x) = -sin x


lemma denseRange_ratCast : DenseRange (fun r : ℚ ↦ ((r : ℝ) : EReal))


theorem Reaches₀.head {σ} {f : σ → Option σ} {a b c : σ} (h : b ∈ f a) (h₂ : Reaches₀ f b c) :
    Reaches₀ f a c

{σ : Type u_1}
{f : σ → Option σ}
{a b c : σ}
(h : b ∈ f a)
(h₂ : Turing.Reaches₀ f b c)


theorem btw_refl_left (a b : α) : btw a a b

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


@[to_additive (attr := simp)]
theorem Prime.prod_divisors {α : Type*} [CommMonoid α] {p : ℕ} {f : ℕ → α} (h : p.Prime) :
    ∏ x ∈ p.divisors, f x = f p * f 1

{α : Type u_1}
[CommMonoid α]
{p : ℕ}
{f : ℕ → α}
(h : Nat.Prime p)


@[to_additive]
theorem isCompact_range [TopologicalSpace β] (h : HasCompactMulSupport f)
    (hf : Continuous f) : IsCompact (range f)

{α : Type u_2}
{β : Type u_4}
[TopologicalSpace α]
[Zero β]
{f : α → β}
[TopologicalSpace β]
(h : HasCompactSupport f)
(hf : Continuous f)


lemma lt_smul_of_one_lt_left [SMulPosStrictMono α β] (hb : 0 < b) (h : 1 < a) : b < a • b

{α : Type u_1}
{β : Type u_2}
{a : α}
{b : β}
[Monoid α]
[Zero β]
[MulAction α β]
[Preorder α]
[Preorder β]
[SMulPosStrictMono α β]
(hb : 0 < b)
(h : 1 < a)


@[simp]
theorem bihimp_inf_sup : a ⇔ b ⊓ (a ⊔ b) = a ⊓ b

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


@[to_additive sub_lt_sub_iff]
theorem div_lt_div_iff' : a / b < c / d ↔ a * d < c * b

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


theorem eq_zero_iff_equiv_zero (f : PadicSeq p) : mk f = 0 ↔ f ≈ 0

{p : ℕ}
[hp : Fact (Nat.Prime p)]
(f : PadicSeq p)


/-- The shift by zero is naturally isomorphic to the identity. -/
@[simps!]
def shiftZero : shiftFunctor C (0 : S) ≅ 𝟭 (DifferentialObject S C)

(X : CategoryTheory.DifferentialObject S C)

((CategoryTheory.DifferentialObject.shiftZero C).hom.app X).f = (CategoryTheory.shiftFunctorZero C S).hom.app X.obj


@[simp]
theorem inv_inv_of_invertible [Invertible A] : A⁻¹⁻¹ = A

{n : Type u'}
{α : Type v}
[Fintype n]
[DecidableEq n]
[CommRing α]
(A : Matrix n n α)
[Invertible A]


@[simp]
theorem bidirectionalRec_nil {motive : List α → Sort*}
    (nil : motive []) (singleton : ∀ a : α, motive [a])
    (cons_append : ∀ (a : α) (l : List α) (b : α), motive l → motive (a :: (l ++ [b]))) :
    bidirectionalRec nil singleton cons_append [] = nil

(cons_append : (a : α) → (l : List α) → (b : α) → motive l → motive (a :: (l ++ [b])))

List.bidirectionalRec nil singleton cons_append [] = nil


@[simp, mfld_simps]
theorem localTrivAsPartialEquiv_coe : ⇑(Z.localTrivAsPartialEquiv i) = Z.localTriv i

{ι : Type u_1}
{B : Type u_2}
{F : Type u_3}
[TopologicalSpace B]
[TopologicalSpace F]
(Z : FiberBundleCore ι B F)
(i : ι)

↑(Z.localTrivAsPartialEquiv i) = ↑(Z.localTriv i)


/-- The equivalence of functor categories induced by `leftOp` and `rightOp`.
-/
@[simps!]
def leftOpRightOpEquiv : (Cᵒᵖ ⥤ D)ᵒᵖ ≌ C ⥤ Dᵒᵖ

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

∀ (X_1 : C),
  ((CategoryTheory.Functor.leftOpRightOpEquiv C D).counitIso.hom.app X).app X_1 =
    CategoryTheory.CategoryStruct.id (X.obj X_1)


@[to_additive (attr := simp)]
theorem lift_inl_inr : lift (inl : M →* M ∗ N) inr = .id _

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

AddMonoid.Coprod.lift AddMonoid.Coprod.inl AddMonoid.Coprod.inr = AddMonoidHom.id (AddMonoid.Coprod M N)


@[simp, mfld_simps]
theorem localTriv_symm_apply {b : B} (hb : b ∈ Z.baseSet i) (v : F) :
    (Z.localTriv i).symm b v = Z.coordChange i (Z.indexAt b) b v

{R : Type u_1}
{B : Type u_2}
{F : Type u_3}
[NontriviallyNormedField R]
[NormedAddCommGroup F]
[NormedSpace R F]
[TopologicalSpace B]
{ι : Type u_5}
(Z : VectorBundleCore R B F ι)
(i : ι)
{b : B}
(hb : b ∈ Z.baseSet i)
(v : F)

(Z.localTriv i).symm b v = (Z.coordChange i (Z.indexAt b) b) v


/-- The canonical `RightHomologyData` of a short complex `S` in an abelian category, for
which the `H` field is `Abelian.image (kernel.ι S.g ≫ cokernel.π S.f)`. -/
@[simps]
noncomputable def ofAbelian : S.RightHomologyData

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

(CategoryTheory.ShortComplex.RightHomologyData.ofAbelian S).H =
  CategoryTheory.Abelian.image
    (CategoryTheory.CategoryStruct.comp (CategoryTheory.Limits.kernel.ι S.g) (CategoryTheory.Limits.cokernel.π S.f))


/-- The assignment `x ↦ diracProba x` is continuous `X → ProbabilityMeasure X`. -/
lemma continuous_diracProba : Continuous (fun (x : X) ↦ diracProba x)

{X : Type u_1}
[MeasurableSpace X]
[TopologicalSpace X]
[OpensMeasurableSpace X]

Continuous fun x => MeasureTheory.diracProba x


@[simp]
theorem reverse_reverse {u v : V} (p : G.Walk u v) : p.reverse.reverse = p

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


/-- A filter lies below the neighborhood filter at `x` iff it contains every open set around `x`. -/
theorem le_nhds_iff {f} : f ≤ 𝓝 x ↔ ∀ s : Set X, x ∈ s → IsOpen s → s ∈ f

{X : Type u}
{x : X}
[TopologicalSpace X]
{f : Filter X}

f ≤ 𝓝 x ↔ ∀ (s : Set X), x ∈ s → IsOpen s → s ∈ f


/-- **Isosceles Triangle Theorem**: Pons asinorum, angle-at-point form. -/
theorem angle_eq_angle_of_dist_eq {p1 p2 p3 : P} (h : dist p1 p2 = dist p1 p3) :
    ∠ p1 p2 p3 = ∠ p1 p3 p2

{V : Type u_1}
{P : Type u_2}
[NormedAddCommGroup V]
[InnerProductSpace ℝ V]
[MetricSpace P]
[NormedAddTorsor V P]
{p1 p2 p3 : P}
(h : dist p1 p2 = dist p1 p3)

EuclideanGeometry.angle p1 p2 p3 = EuclideanGeometry.angle p1 p3 p2


protected theorem Countable.preimage {s : Set β} (hs : s.Countable) {f : α → β} (hf : Injective f) :
    (f ⁻¹' s).Countable

{α : Type u}
{β : Type v}
{s : Set β}
(hs : s.Countable)
{f : α → β}
(hf : Function.Injective f)


theorem add_pred_div_lt {b n : ℕ} (hb : 1 < b) (hn : 2 ≤ n) : (n + b - 1) / b < n


@[simp]
theorem minFac_eq_two_iff (n : ℕ) : minFac n = 2 ↔ 2 ∣ n


@[simp, norm_cast]
theorem coe_top [BoundedOrder α] : ((⊤ : NonemptyInterval α) : Set α) = univ

{α : Type u_1}
[PartialOrder α]
[BoundedOrder α]


theorem lt_rank_of_lt_finrank {n : ℕ} (h : n < finrank R M) : ↑n < Module.rank R M

{R : Type u}
{M : Type v}
[Ring R]
[AddCommGroup M]
[Module R M]
{n : ℕ}
(h : n < FiniteDimensional.finrank R M)


@[to_additive (attr := simp) prodProdProdComm_toEquiv]
theorem prodProdProdComm_toEquiv :
    (prodProdProdComm M N M' N' : _ ≃ _) = Equiv.prodProdProdComm M N M' N'

(M : Type u_5)
(N : Type u_6)
[MulOneClass M]
[MulOneClass N]
(M' : Type u_8)
(N' : Type u_9)
[MulOneClass M']
[MulOneClass N']

↑(MulEquiv.prodProdProdComm M N M' N') = Equiv.prodProdProdComm M N M' N'


@[simp]
theorem coeSubmodule_eq_top_iff : (N : Submodule R M) = ⊤ ↔ N = ⊤

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

↑N = ⊤ ↔ N = ⊤


theorem isConj_comm {g h : α} : IsConj g h ↔ IsConj h g


theorem Coprime.gcd_mul (k : ℕ+) {m n : ℕ+} (h : m.Coprime n) :
    k.gcd (m * n) = k.gcd m * k.gcd n


theorem closedBall_iSup {ι : Sort*} {p : ι → Seminorm 𝕜 E} (hp : BddAbove (range p)) (e : E)
    {r : ℝ} (hr : 0 < r) : closedBall (⨆ i, p i) e r = ⋂ i, closedBall (p i) e r

{𝕜 : Type u_3}
{E : Type u_7}
[NormedField 𝕜]
[AddCommGroup E]
[Module 𝕜 E]
{ι : Sort u_13}
{p : ι → Seminorm 𝕜 E}
(hp : BddAbove (Set.range p))
(e : E)
{r : ℝ}
(hr : 0 < r)

(⨆ i, p i).closedBall e r = ⋂ i, (p i).closedBall e r


theorem dist_triangle4_right (x₁ y₁ x₂ y₂ : α) :
    dist x₁ y₁ ≤ dist x₁ x₂ + dist y₁ y₂ + dist x₂ y₂

{α : Type u}
[PseudoMetricSpace α]
(x₁ y₁ x₂ y₂ : α)


theorem integral_exp_neg_mul_rpow {p b : ℝ} (hp : 0 < p) (hb : 0 < b) :
    ∫ x in Ioi (0 : ℝ), exp (- b * x ^ p) = b ^ (- 1 / p) * Gamma (1 / p + 1)

∫ (x : ℝ) in Set.Ioi 0, rexp (-b * x ^ p) = b ^ (-1 / p) * Real.Gamma (1 / p + 1)


@[simp]
theorem left_inv_of_invOfMemRange : f (f.invOfMemRange b) = b

{α : Type u_1}
{β : Type u_2}
[Fintype α]
[DecidableEq β]
(f : α ↪ β)
(b : ↑(Set.range ⇑f))


@[reassoc]
lemma v_comp_XIsoOfEq_hom
    (γ : Cochain F G n) (p q q' : ℤ) (hpq : p + n = q) (hq' : q = q') :
    γ.v p q hpq ≫ (HomologicalComplex.XIsoOfEq G hq').hom = γ.v p q' (by rw [← hq', hpq])

(γ : CochainComplex.HomComplex.Cochain F G n)

γ.v p q hpq ≫ (HomologicalComplex.XIsoOfEq G hq').hom = γ.v p q' ⋯


/-- The product of a strictly antitone function and an antitone function is strictly antitone. -/
@[to_additive add_antitone "The sum of a strictly antitone function and an antitone function is
strictly antitone."]
theorem StrictAnti.mul_antitone' (hf : StrictAnti f) (hg : Antitone g) :
    StrictAnti fun x => f x * g x

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

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


theorem zero_lt_of_lt : {a b : Nat} → a < b → 0 < b


@[to_additive (attr := simp)]
theorem range_subtype (s : Submonoid M) : mrange s.subtype = s

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


@[to_additive]
theorem mrangeRestrict_mker (f : M →* N) : mker (mrangeRestrict f) = mker f

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

AddMonoidHom.mker f.mrangeRestrict = AddMonoidHom.mker f


@[simp]
lemma homEquiv_symm_apply (g : L₂.obj X ⟶ L₂.obj Y) :
    (homEquiv W L₁ L₂).symm g = homEquiv W L₂ L₁ g

(CategoryTheory.Localization.homEquiv W L₁ L₂).symm g = (CategoryTheory.Localization.homEquiv W L₂ L₁) g


@[to_additive]
nonrec theorem ContMDiffAt.mul (hf : ContMDiffAt I' I n f x) (hg : ContMDiffAt I' I n g x) :
    ContMDiffAt I' I n (f * g) x

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{H : Type u_2}
[TopologicalSpace H]
{E : Type u_3}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{I : ModelWithCorners 𝕜 E H}
{G : Type u_4}
[Mul G]
[TopologicalSpace G]
[ChartedSpace H G]
[SmoothMul I G]
{E' : Type u_5}
[NormedAddCommGroup E']
[NormedSpace 𝕜 E']
{H' : Type u_6}
[TopologicalSpace H']
{I' : ModelWithCorners 𝕜 E' H'}
{M : Type u_7}
[TopologicalSpace M]
[ChartedSpace H' M]
{f g : M → G}
{x : M}
{n : ℕ∞}
(hf : ContMDiffAt I' I n f x)
(hg : ContMDiffAt I' I n g x)


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

{M : Type u_1}
[AddMonoid M]
{a : M}
{u : AddUnits M}
(h : AddCommute a ↑u)
(m : ℤ)


/-- Functors from `Discrete PUnit` are equivalent to the category itself. -/
@[simps]
def equiv : Discrete PUnit.{w + 1} ⥤ C ≌ C

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

∀ {X Y : CategoryTheory.Functor (CategoryTheory.Discrete PUnit.{w + 1}) C} (θ : X ⟶ Y),
  CategoryTheory.Functor.equiv.functor.map θ = θ.app { as := PUnit.unit }


@[to_additive]
theorem ContMDiffOn.div_const (hf : ContMDiffOn I' I n f s) :
    ContMDiffOn I' I n (fun x ↦ f x / c) s

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{H : Type u_2}
[TopologicalSpace H]
{E : Type u_3}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{I : ModelWithCorners 𝕜 E H}
{G : Type u_4}
[SubNegMonoid G]
[TopologicalSpace G]
[ChartedSpace H G]
[SmoothAdd I G]
{E' : Type u_5}
[NormedAddCommGroup E']
[NormedSpace 𝕜 E']
{H' : Type u_6}
[TopologicalSpace H']
{I' : ModelWithCorners 𝕜 E' H'}
{M : Type u_7}
[TopologicalSpace M]
[ChartedSpace H' M]
{f : M → G}
{s : Set M}
{n : ℕ∞}
(c : G)
(hf : ContMDiffOn I' I n f s)


theorem subtypeRestr_def : e.subtypeRestr hs = (s.partialHomeomorphSubtypeCoe hs).trans e

{X : Type u_1}
{Y : Type u_3}
[TopologicalSpace X]
[TopologicalSpace Y]
(e : PartialHomeomorph X Y)
{s : TopologicalSpace.Opens X}
(hs : Nonempty ↥s)


theorem map_id_eq : map (𝟙 F) = 𝟙 (Cat.of <| Grothendieck <| F)

{F : CategoryTheory.Functor C CategoryTheory.Cat}

CategoryTheory.Grothendieck.map (CategoryTheory.CategoryStruct.id F) =
  CategoryTheory.CategoryStruct.id (CategoryTheory.Cat.of (CategoryTheory.Grothendieck F))


theorem innerSL_norm [Nontrivial E] : ‖(innerSL 𝕜 : E →L⋆[𝕜] E →L[𝕜] 𝕜)‖ = 1

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


/-- A morphism of triangles `(X,Y,Z,f,g,h) ⟶ (X',Y',Z',f',g',h')` in `C` is a triple of morphisms
`a : X ⟶ X'`, `b : Y ⟶ Y'`, `c : Z ⟶ Z'` such that
`a ≫ f' = f ≫ b`, `b ≫ g' = g ≫ c`, and `a⟦1⟧' ≫ h = h' ≫ c`.
In other words, we have a commutative diagram:
```
     f      g      h
  X  ───> Y  ───> Z  ───> X⟦1⟧
  │       │       │        │
  │a      │b      │c       │a⟦1⟧'
  V       V       V        V
  X' ───> Y' ───> Z' ───> X'⟦1⟧
     f'     g'     h'
```
See <https://stacks.math.columbia.edu/tag/0144>.
-/
@[ext]
structure TriangleMorphism (T₁ : Triangle C) (T₂ : Triangle C) where
  /-- the first morphism in a triangle morphism -/
  hom₁ : T₁.obj₁ ⟶ T₂.obj₁
  /-- the second morphism in a triangle morphism -/
  hom₂ : T₁.obj₂ ⟶ T₂.obj₂
  /-- the third morphism in a triangle morphism -/
  hom₃ : T₁.obj₃ ⟶ T₂.obj₃
  /-- the first commutative square of a triangle morphism -/
  comm₁ : T₁.mor₁ ≫ hom₂ = hom₁ ≫ T₂.mor₁ := by aesop_cat
  /-- the second commutative square of a triangle morphism -/
  comm₂ : T₁.mor₂ ≫ hom₃ = hom₂ ≫ T₂.mor₂ := by aesop_cat
  /-- the third commutative square of a triangle morphism -/
  comm₃ : T₁.mor₃ ≫ hom₁⟦1⟧' = hom₃ ≫ T₂.mor₃ := by aesop_cat

{T₁ T₂ : CategoryTheory.Pretriangulated.Triangle C}

(self : CategoryTheory.Pretriangulated.TriangleMorphism T₁ T₂)

T₁.mor₃ ≫ (CategoryTheory.shiftFunctor C 1).map self.hom₁ = self.hom₃ ≫ T₂.mor₃


@[simp]
theorem monomial_left_inj {s t : σ →₀ ℕ} {r : R} (hr : r ≠ 0) :
    monomial s r = monomial t r ↔ s = t

{R : Type u}
{σ : Type u_1}
[CommSemiring R]
{s t : σ →₀ ℕ}
{r : R}
(hr : r ≠ 0)

(MvPolynomial.monomial s) r = (MvPolynomial.monomial t) r ↔ s = t


@[simp]
theorem comp_eq_comp : Coalgebra.Hom.comp f g = f ≫ g

{V₀ V₁ V₂ : CategoryTheory.Endofunctor.Coalgebra F}

CategoryTheory.Endofunctor.Coalgebra.Hom.comp f g = CategoryTheory.CategoryStruct.comp f g


/-- Relationship between the Fibonacci Sequence, Golden Ratio and its exponents --/
theorem fib_golden_exp' (n : ℕ) : φ * Nat.fib (n + 1) + Nat.fib n = φ ^ (n + 1)

φ * ↑(Nat.fib (n + 1)) + ↑(Nat.fib n) = φ ^ (n + 1)


theorem exists_of_mem_bind {b : β} {l : List α} {f : α → List β} :
    b ∈ List.bind l f → ∃ a, a ∈ l ∧ b ∈ f a

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


@[simp]
theorem codisjoint_map_orderIso_iff [SemilatticeSup α] [OrderTop α] [SemilatticeSup β] [OrderTop β]
    {a b : α} (f : α ≃o β) : Codisjoint (f a) (f b) ↔ Codisjoint a b

{α : Type u_2}
{β : Type u_3}
[SemilatticeSup α]
[OrderTop α]
[SemilatticeSup β]
[OrderTop β]
{a b : α}
(f : α ≃o β)


theorem IsBigOWith.rpow (h : IsBigOWith c l f g) (hc : 0 ≤ c) (hr : 0 ≤ r) (hg : 0 ≤ᶠ[l] g) :
    IsBigOWith (c ^ r) l (fun x => f x ^ r) fun x => g x ^ r

{α : Type u_1}
{r c : ℝ}
{l : Filter α}
{f g : α → ℝ}
(h : Asymptotics.IsBigOWith c l f g)
(hc : 0 ≤ c)
(hr : 0 ≤ r)
(hg : 0 ≤ᶠ[l] g)

Asymptotics.IsBigOWith (c ^ r) l (fun x => f x ^ r) fun x => g x ^ r


@[to_additive]
theorem HasProd.sigma {γ : β → Type*} {f : (Σ b : β, γ b) → α} {g : β → α} {a : α}
    (ha : HasProd f a) (hf : ∀ b, HasProd (fun c ↦ f ⟨b, c⟩) (g b)) : HasProd g a

(hf : ∀ (b : β), HasSum (fun c => f ⟨b, c⟩) (g b))


theorem Iio_subset_Iic_union_Ioo : Iio b ⊆ Iic a ∪ Ioo a b

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


theorem MDifferentiableOn.prod_mk {f : M → M'} {g : M → M''} (hf : MDifferentiableOn I I' f s)
    (hg : MDifferentiableOn I I'' g s) :
    MDifferentiableOn I (I'.prod I'') (fun x => (f x, g x)) s

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{H : Type u_3}
[TopologicalSpace H]
{I : ModelWithCorners 𝕜 E H}
{M : Type u_4}
[TopologicalSpace M]
[ChartedSpace H M]
{E' : Type u_5}
[NormedAddCommGroup E']
[NormedSpace 𝕜 E']
{H' : Type u_6}
[TopologicalSpace H']
{I' : ModelWithCorners 𝕜 E' H'}
{M' : Type u_7}
[TopologicalSpace M']
[ChartedSpace H' M']
{E'' : Type u_8}
[NormedAddCommGroup E'']
[NormedSpace 𝕜 E'']
{H'' : Type u_9}
[TopologicalSpace H'']
{I'' : ModelWithCorners 𝕜 E'' H''}
{M'' : Type u_10}
[TopologicalSpace M'']
[ChartedSpace H'' M'']
{s : Set M}
{f : M → M'}
{g : M → M''}
(hf : MDifferentiableOn I I' f s)
(hg : MDifferentiableOn I I'' g s)


/-- If there is a primitive `n`-th root of unity in `K`, then `cyclotomic' n K` comes from a
monic polynomial with integer coefficients. -/
theorem int_coeff_of_cyclotomic' {K : Type*} [CommRing K] [IsDomain K] {ζ : K} {n : ℕ}
    (h : IsPrimitiveRoot ζ n) : ∃ P : ℤ[X], map (Int.castRingHom K) P =
      cyclotomic' n K ∧ P.degree = (cyclotomic' n K).degree ∧ P.Monic

{K : Type u_2}
[CommRing K]
[IsDomain K]
{ζ : K}
{n : ℕ}
(h : IsPrimitiveRoot ζ n)

∃ P,
  Polynomial.map (Int.castRingHom K) P = Polynomial.cyclotomic' n K ∧
    P.degree = (Polynomial.cyclotomic' n K).degree ∧ P.Monic


theorem ofFractionRing_one : (ofFractionRing 1 : RatFunc K) = 1


@[simp]
theorem Quotient.out_inj {s : Setoid α} {x y : Quotient s} : x.out = y.out ↔ x = y

{α : Sort u_1}
{s : Setoid α}
{x y : Quotient s}


theorem comp_aemeasurable {γ : Type*} {_ : MeasurableSpace γ} {_ : MeasurableSpace α} {f : γ → α}
    {μ : Measure γ} (hg : AEStronglyMeasurable g (Measure.map f μ)) (hf : AEMeasurable f μ) :
    AEStronglyMeasurable (g ∘ f) μ

{α : Type u_1}
{β : Type u_2}
[TopologicalSpace β]
{g : α → β}
{γ : Type u_5}

∀ {x : MeasurableSpace γ} {x_1 : MeasurableSpace α} {f : γ → α} {μ : MeasureTheory.Measure γ},
  MeasureTheory.AEStronglyMeasurable g (MeasureTheory.Measure.map f μ) →
    AEMeasurable f μ → MeasureTheory.AEStronglyMeasurable (g ∘ f) μ


@[simp]
theorem prod_comap_inr : (prod p q).comap (inr R M M₂) = q

{R : Type u}
{M : Type v}
{M₂ : Type w}
[Semiring R]
[AddCommMonoid M]
[AddCommMonoid M₂]
[Module R M]
[Module R M₂]
(p : Submodule R M)
(q : Submodule R M₂)

Submodule.comap (LinearMap.inr R M M₂) (p.prod q) = q


theorem filter_pos_add_filter_neg [∀ i, AddZeroClass (β i)] (f : Π₀ i, β i) (p : ι → Prop)
    [DecidablePred p] : (f.filter p + f.filter fun i => ¬p i) = f

{ι : Type u}
{β : ι → Type v}
[(i : ι) → AddZeroClass (β i)]
(f : Π₀ (i : ι), β i)
(p : ι → Prop)
[DecidablePred p]

DFinsupp.filter p f + DFinsupp.filter (fun i => ¬p i) f = f


/-- The forgetful functor from monoid objects to the ambient category. -/
@[simps]
def forget : Mon_ C ⥤ C

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

∀ {X Y : Mon_ C} (f : X ⟶ Y), (Mon_.forget C).map f = f.hom


@[to_additive]
theorem Multiset.prod_toEnumFinset {β : Type*} [CommMonoid β] (m : Multiset α) (f : α → ℕ → β) :
    ∏ x ∈ m.toEnumFinset, f x.1 x.2 = ∏ x : m, f x x.2

{α : Type u_1}
[DecidableEq α]
{β : Type u_2}
[CommMonoid β]
(m : Multiset α)
(f : α → ℕ → β)

∏ x ∈ m.toEnumFinset, f x.1 x.2 = ∏ x : m.ToType, f x.fst ↑x.snd


theorem core_id (s : Set α) : core (@Eq α) s = s


@[elab_as_elim]
theorem cycle_induction_on [Finite β] (P : Perm β → Prop) (σ : Perm β) (base_one : P 1)
    (base_cycles : ∀ σ : Perm β, σ.IsCycle → P σ)
    (induction_disjoint : ∀ σ τ : Perm β,
      Disjoint σ τ → IsCycle σ → P σ → P τ → P (σ * τ)) : P σ

(base_cycles : ∀ (σ : Equiv.Perm β), σ.IsCycle → P σ)

(induction_disjoint : ∀ (σ τ : Equiv.Perm β), σ.Disjoint τ → σ.IsCycle → P σ → P τ → P (σ * τ))


@[simp]
theorem funInvIdAssoc_inv_app (e : C ≌ D) (F : C ⥤ E) (X : C) :
    (funInvIdAssoc e F).inv.app X = F.map (e.unit.app X)

{C : Type u₁}
[CategoryTheory.Category.{v₁, u₁} C]
{D : Type u₂}
[CategoryTheory.Category.{v₂, u₂} D]
{E : Type u₃}
[CategoryTheory.Category.{v₃, u₃} E]
(e : C ≌ D)
(F : CategoryTheory.Functor C E)
(X : C)

(e.funInvIdAssoc F).inv.app X = F.map (e.unit.app X)


theorem abv_pos_of_not_limZero {f : CauSeq β abv} (hf : ¬LimZero f) :
    ∃ K > 0, ∃ i, ∀ j ≥ i, K ≤ abv (f j)

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


@[simp, norm_cast]
theorem cast_pow (q : ℚ) (k : ℕ) : ↑(q ^ k) = (q : α) ^ k

{α : Type u_3}
[DivisionRing α]
[CharZero α]
(q : ℚ)
(k : ℕ)


theorem finset_prod_mk {p : Finset β} {f : β → α} :
    (∏ i ∈ p, Associates.mk (f i)) = Associates.mk (∏ i ∈ p, f i)

{α : Type u_1}
{β : Type u_2}
[CommMonoid α]
{p : Finset β}
{f : β → α}

∏ i ∈ p, Associates.mk (f i) = Associates.mk (∏ i ∈ p, f i)


@[ext]
theorem leftDistributor_ext_left {J : Type} [Fintype J] {X Y : C} {f : J → C} {g h : X ⊗ ⨁ f ⟶ Y}
    (w : ∀ j, (X ◁ biproduct.ι f j) ≫ g = (X ◁ biproduct.ι f j) ≫ h) : g = h

{g h : CategoryTheory.MonoidalCategory.tensorObj X (⨁ f) ⟶ Y}

(w :
  ∀ (j : J),
    CategoryTheory.CategoryStruct.comp
        (CategoryTheory.MonoidalCategory.whiskerLeft X (CategoryTheory.Limits.biproduct.ι f j)) g =
      CategoryTheory.CategoryStruct.comp
        (CategoryTheory.MonoidalCategory.whiskerLeft X (CategoryTheory.Limits.biproduct.ι f j)) h)


theorem eq_thinkN {s : Computation α} {a n} (h : Results s a n) : s = thinkN (pure a) n

{α : Type u}
{s : Computation α}
{a : α}
{n : ℕ}
(h : s.Results a n)


@[simp]
theorem subtypeDomain_zero [∀ i, Zero (β i)] {p : ι → Prop} [DecidablePred p] :
    subtypeDomain p (0 : Π₀ i, β i) = 0

{ι : Type u}
{β : ι → Type v}
[(i : ι) → Zero (β i)]
{p : ι → Prop}
[DecidablePred p]


@[simp]
theorem comp_right_inj (h : M ≃[L] N) (f g : N ≃[L] P) : f.comp h = g.comp h ↔ f = g

{L : FirstOrder.Language}
{M : Type w}
{N : Type w'}
[L.Structure M]
[L.Structure N]
{P : Type u_1}
[L.Structure P]
(h : L.Equiv M N)
(f g : L.Equiv N P)


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

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


@[reassoc (attr := simp)]
theorem pullbackDiagonalMapIdIso_hom_snd :
    (pullbackDiagonalMapIdIso f g i).hom ≫ pullback.snd _ _ =
      pullback.snd _ _ ≫ pullback.snd _ _

[CategoryTheory.Limits.HasPullback (f ≫ i) (g ≫ i)]

[CategoryTheory.Limits.HasPullback (CategoryTheory.Limits.pullback.diagonal i)
    (CategoryTheory.Limits.pullback.map (f ≫ i) (g ≫ i) i i f g (𝟙 S) ⋯ ⋯)]

(CategoryTheory.Limits.pullbackDiagonalMapIdIso f g i).hom ≫ CategoryTheory.Limits.pullback.snd f g =
  CategoryTheory.Limits.pullback.snd (CategoryTheory.Limits.pullback.diagonal i)
      (CategoryTheory.Limits.pullback.map (f ≫ i) (g ≫ i) i i f g (𝟙 S) ⋯ ⋯) ≫
    CategoryTheory.Limits.pullback.snd (f ≫ i) (g ≫ i)


/-- The normalized Moore complex functor, on objects.
-/
@[simps!]
def obj (X : SimplicialObject C) : ChainComplex C ℕ

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

(AlgebraicTopology.NormalizedMooreComplex.obj X).X n =
  CategoryTheory.Subobject.underlying.obj (AlgebraicTopology.NormalizedMooreComplex.objX X n)


theorem add [Add β] [ContinuousAdd β] (hf : AEStronglyMeasurable' m f μ)
    (hg : AEStronglyMeasurable' m g μ) : AEStronglyMeasurable' m (f + g) μ

(hf : MeasureTheory.AEStronglyMeasurable' m f μ)

(hg : MeasureTheory.AEStronglyMeasurable' m g μ)

MeasureTheory.AEStronglyMeasurable' m (f + g) μ


@[simp]
theorem norm_algebraMap_nnreal (x : ℝ≥0) : ‖algebraMap ℝ≥0 𝕜' x‖ = x

(𝕜' : Type u_2)
[SeminormedRing 𝕜']
[NormOneClass 𝕜']
[NormedAlgebra ℝ 𝕜']
(x : ℝ≥0)


/-- A variant of the second fundamental theorem of calculus (FTC-2): If a sequence of functions
between real or complex normed spaces are differentiable on a ball centered at `x`, they
form a Cauchy sequence _at_ `x`, and their derivatives are Cauchy uniformly on the ball, then the
functions form a uniform Cauchy sequence on the ball.

NOTE: The fact that we work on a ball is typically all that is necessary to work with power series
and Dirichlet series (our primary use case). However, this can be generalized by replacing the ball
with any connected, bounded, open set and replacing uniform convergence with local uniform
convergence. See `cauchy_map_of_uniformCauchySeqOn_fderiv`.
-/
theorem uniformCauchySeqOn_ball_of_fderiv {r : ℝ} (hf' : UniformCauchySeqOn f' l (Metric.ball x r))
    (hf : ∀ n : ι, ∀ y : E, y ∈ Metric.ball x r → HasFDerivAt (f n) (f' n y) y)
    (hfg : Cauchy (map (fun n => f n x) l)) : UniformCauchySeqOn f l (Metric.ball x r)

(hf : ∀ (n : ι), ∀ y ∈ Metric.ball x r, HasFDerivAt (f n) (f' n y) y)

(hfg : Cauchy (Filter.map (fun n => f n x) l))


theorem HasDerivAtFilter.hasGradientAtFilter' (h : HasDerivAtFilter g g' u L') :
    HasGradientAtFilter g g' u L'

{g : ℝ → ℝ}
{g' u : ℝ}
{L' : Filter ℝ}
(h : HasDerivAtFilter g g' u L')


@[simp] theorem zip_replicate {a : α} {b : β} {m n : Nat} :
    zip (replicate m a) (replicate n b) = replicate (min m n) (a, b)

{α : Type u_1}
{β : Type u_2}
{a : α}
{b : β}
{m n : Nat}

(List.replicate m a).zip (List.replicate n b) = List.replicate (min m n) (a, b)


protected theorem bijective (e : α ≃o β) : Function.Bijective e

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


/-- The composition of a partial homeomorphism from `H` to `M` and its inverse belongs to
the `C^n` groupoid. -/
theorem symm_trans_mem_contDiffGroupoid (e : PartialHomeomorph M H) :
    e.symm.trans e ∈ contDiffGroupoid n I

(n : ℕ∞)
{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{H : Type u_3}
[TopologicalSpace H]
(I : ModelWithCorners 𝕜 E H)
{M : Type u_4}
[TopologicalSpace M]
(e : PartialHomeomorph M H)


/-- **Strong law of large numbers**, almost sure version: if `X n` is a sequence of independent
identically distributed integrable real-valued random variables, then `∑ i ∈ range n, X i / n`
converges almost surely to `𝔼[X 0]`. We give here the strong version, due to Etemadi, that only
requires pairwise independence. Superseded by `strong_law_ae`, which works for random variables
taking values in any Banach space. -/
theorem strong_law_ae_real (X : ℕ → Ω → ℝ) (hint : Integrable (X 0))
    (hindep : Pairwise fun i j => IndepFun (X i) (X j)) (hident : ∀ i, IdentDistrib (X i) (X 0)) :
    ∀ᵐ ω, Tendsto (fun n : ℕ => (∑ i ∈ range n, X i ω) / n) atTop (𝓝 𝔼[X 0])

(X : ℕ → Ω → ℝ)

(hint : MeasureTheory.Integrable (X 0) ℙ)

(hindep : Pairwise fun i j => ProbabilityTheory.IndepFun (X i) (X j) ℙ)

(hident : ∀ (i : ℕ), ProbabilityTheory.IdentDistrib (X i) (X 0) ℙ ℙ)

∀ᵐ (ω : Ω), Filter.Tendsto (fun n => (∑ i ∈ Finset.range n, X i ω) / ↑n) Filter.atTop (𝓝 (∫ (a : Ω), X 0 a))


theorem grundyValue_eq_mex_right :
    ∀ (G : PGame) [G.Impartial],
      grundyValue G = Ordinal.mex.{u, u} fun i => grundyValue (G.moveRight i)

G.grundyValue = Ordinal.mex fun i => (G.moveRight i).grundyValue


theorem vanishingIdeal_anti_mono {A B : Set (σ → k)} (h : A ≤ B) :
    vanishingIdeal B ≤ vanishingIdeal A

{k : Type u_1}
[Field k]
{σ : Type u_2}
{A B : Set (σ → k)}
(h : A ≤ B)

MvPolynomial.vanishingIdeal B ≤ MvPolynomial.vanishingIdeal A


/-- Given a multiequalizer diagram `I : MulticospanIndex (Type u)` in the category of
types and `c` a multifork for `I`, this is the canonical map `c.pt → I.sections`. -/
@[simps]
def toSections (x : c.pt) : I.sections

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


@[fun_prop]
protected theorem Continuous.abs (h : Continuous f) : Continuous fun x => |f x|

{α : Type u_1}
{G : Type u_2}
[TopologicalSpace G]
[LinearOrderedAddCommGroup G]
[OrderTopology G]
{f : α → G}
[TopologicalSpace α]
(h : Continuous f)


@[simp, norm_cast]
lemma ofReal_nonneg {x : ℝ} : 0 ≤ (x : K) ↔ 0 ≤ x

0 ≤ ↑x ↔ 0 ≤ x


@[to_additive (attr := elab_as_elim)]
protected theorem cases_on {P : WithOne α → Prop} : ∀ x : WithOne α, P 1 → (∀ a : α, P a) → P x

{α : Type u}
{P : WithZero α → Prop}
(x : WithZero α)


@[simp]
theorem addVal_uniformizer {ϖ : R} (hϖ : Irreducible ϖ) : addVal R ϖ = 1

{R : Type u_1}
[CommRing R]
[IsDomain R]
[DiscreteValuationRing R]
{ϖ : R}
(hϖ : Irreducible ϖ)


/-- The duality equivalence `(WidePullbackShape J)ᵒᵖ ≌ WidePushoutShape J` -/
@[simps]
def widePullbackShapeOpEquiv : (WidePullbackShape J)ᵒᵖ ≌ WidePushoutShape J

(CategoryTheory.Limits.widePullbackShapeOpEquiv J).counitIso = CategoryTheory.Limits.widePushoutShapeUnopOp J


@[to_additive]
protected theorem Tendsto.inv_inv : Tendsto m f₁ f₂ → Tendsto m f₁⁻¹ f₂⁻¹

{F : Type u_1}
{α : Type u_2}
{β : Type u_3}
[Group α]
[DivisionMonoid β]
[FunLike F α β]
[MonoidHomClass F α β]
(m : F)
{f₁ : Filter α}
{f₂ : Filter β}

Filter.Tendsto (⇑m) f₁ f₂ → Filter.Tendsto (⇑m) f₁⁻¹ f₂⁻¹


theorem hasLimit_of_hasColimit_op (F : J ⥤ C) [HasColimit F.op] : HasLimit F

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


lemma _root_.spectrumRestricts_iff :
    SpectrumRestricts a f ↔ (spectrum S a).RightInvOn f (algebraMap R S) ∧
      Function.LeftInverse f (algebraMap R S)

{R : Type u_3}
{S : Type u_4}
{A : Type u_5}
[Semifield R]
[Semifield S]
[Ring A]
[Algebra R S]
[Algebra R A]
[Algebra S A]
{a : A}
{f : S → R}

SpectrumRestricts a f ↔ Set.RightInvOn f (⇑(algebraMap R S)) (spectrum S a) ∧ Function.LeftInverse f ⇑(algebraMap R S)


@[simp] lemma subtype_univ [Fintype α] (p : α → Prop) [DecidablePred p] [Fintype {a // p a}] :
    univ.subtype p = univ

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

Finset.subtype p Finset.univ = Finset.univ


/-- If `fs i → f` in `L1`, then `setToL1 hT (fs i) → setToL1 hT f`. -/
theorem tendsto_setToL1 (hT : DominatedFinMeasAdditive μ T C) (f : α →₁[μ] E) {ι}
    (fs : ι → α →₁[μ] E) {l : Filter ι} (hfs : Tendsto fs l (𝓝 f)) :
    Tendsto (fun i => setToL1 hT (fs i)) l (𝓝 <| setToL1 hT f)

(hT : MeasureTheory.DominatedFinMeasAdditive μ T C)

Filter.Tendsto (fun i => (MeasureTheory.L1.setToL1 hT) (fs i)) l (𝓝 ((MeasureTheory.L1.setToL1 hT) f))


@[simp]
theorem zero_left [MulZeroClass G₀] (a : G₀) : Commute 0 a

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


@[simp]
theorem comp_apply (p : Seminorm 𝕜₂ E₂) (f : E →ₛₗ[σ₁₂] E₂) (x : E) : (p.comp f) x = p (f x)

{𝕜 : Type u_3}
{𝕜₂ : Type u_4}
{E : Type u_7}
{E₂ : Type u_8}
[SeminormedRing 𝕜]
[SeminormedRing 𝕜₂]
{σ₁₂ : 𝕜 →+* 𝕜₂}
[RingHomIsometric σ₁₂]
[AddCommGroup E]
[AddCommGroup E₂]
[Module 𝕜 E]
[Module 𝕜₂ E₂]
(p : Seminorm 𝕜₂ E₂)
(f : E →ₛₗ[σ₁₂] E₂)
(x : E)


theorem sum_powerset_neg_one_pow_card_of_nonempty {α : Type*} {x : Finset α} (h0 : x.Nonempty) :
    (∑ m ∈ x.powerset, (-1 : ℤ) ^ m.card) = 0

{α : Type u_2}
{x : Finset α}
(h0 : x.Nonempty)


/-- Class `LipschitzAdd M` says that the addition `(+) : X × X → X` is Lipschitz jointly in
the two arguments. -/
class LipschitzAdd [AddMonoid β] : Prop where
  lipschitz_add : ∃ C, LipschitzWith C fun p : β × β => p.1 + p.2

{β : Type u_2}
[PseudoMetricSpace β]
[AddMonoid β]
[self : LipschitzAdd β]


/-- A CHSH tuple in a *-monoid consists of 4 self-adjoint involutions `A₀ A₁ B₀ B₁` such that
the `Aᵢ` commute with the `Bⱼ`.

The physical interpretation is that `A₀` and `A₁` are a pair of boolean observables which
are spacelike separated from another pair `B₀` and `B₁` of boolean observables.
-/
--@[nolint has_nonempty_instance] Porting note(#5171): linter not ported yet
structure IsCHSHTuple {R} [Monoid R] [StarMul R] (A₀ A₁ B₀ B₁ : R) : Prop where
  A₀_inv : A₀ ^ 2 = 1
  A₁_inv : A₁ ^ 2 = 1
  B₀_inv : B₀ ^ 2 = 1
  B₁_inv : B₁ ^ 2 = 1
  A₀_sa : star A₀ = A₀
  A₁_sa : star A₁ = A₁
  B₀_sa : star B₀ = B₀
  B₁_sa : star B₁ = B₁
  A₀B₀_commutes : A₀ * B₀ = B₀ * A₀
  A₀B₁_commutes : A₀ * B₁ = B₁ * A₀
  A₁B₀_commutes : A₁ * B₀ = B₀ * A₁
  A₁B₁_commutes : A₁ * B₁ = B₁ * A₁

{R : Type u_1}
[Monoid R]
[StarMul R]
{A₀ A₁ B₀ B₁ : R}
(self : IsCHSHTuple A₀ A₁ B₀ B₁)


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

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

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


theorem vsub_subset_vsub_left : t₁ ⊆ t₂ → s -ᵥ t₁ ⊆ s -ᵥ t₂

{α : Type u_2}
{β : Type u_3}
[VSub α β]
[DecidableEq α]
{s t₁ t₂ : Finset β}

t₁ ⊆ t₂ → s -ᵥ t₁ ⊆ s -ᵥ t₂


@[simp] theorem associator_hom_apply_2_2 {X Y Z : Type u} {x} :
    (((α_ X Y Z).hom : (X ⊗ Y) ⊗ Z → X ⊗ Y ⊗ Z) x).2.2 = x.2


theorem ker_comp (f : M →ₛₗ[τ₁₂] M₂) (g : M₂ →ₛₗ[τ₂₃] M₃) :
    ker (g.comp f : M →ₛₗ[τ₁₃] M₃) = comap f (ker g)

{R : Type u_1}
{R₂ : Type u_3}
{R₃ : Type u_4}
{M : Type u_6}
{M₂ : Type u_8}
{M₃ : Type u_9}
[Semiring R]
[Semiring R₂]
[Semiring R₃]
[AddCommMonoid M]
[AddCommMonoid M₂]
[AddCommMonoid M₃]
[Module R M]
[Module R₂ M₂]
[Module R₃ M₃]
{τ₁₂ : R →+* R₂}
{τ₂₃ : R₂ →+* R₃}
{τ₁₃ : R →+* R₃}
[RingHomCompTriple τ₁₂ τ₂₃ τ₁₃]
(f : M →ₛₗ[τ₁₂] M₂)
(g : M₂ →ₛₗ[τ₂₃] M₃)

LinearMap.ker (g.comp f) = Submodule.comap f (LinearMap.ker g)


@[simp]
theorem Ico_succ_singleton : Ico a (a + 1) = {a}


@[simp]
theorem isOrtho_span {s t : Set E} :
    span 𝕜 s ⟂ span 𝕜 t ↔ ∀ ⦃u⦄, u ∈ s → ∀ ⦃v⦄, v ∈ t → ⟪u, v⟫ = 0

{𝕜 : Type u_1}
{E : Type u_2}
[RCLike 𝕜]
[NormedAddCommGroup E]
[InnerProductSpace 𝕜 E]
{s t : Set E}

Submodule.span 𝕜 s ⟂ Submodule.span 𝕜 t ↔ ∀ ⦃u : E⦄, u ∈ s → ∀ ⦃v : E⦄, v ∈ t → ⟪u, v⟫_𝕜 = 0


theorem contSupp_fix (f k) : contSupp (Cont'.fix f k) = codeSupp f (Cont'.fix f k)

(f : Turing.ToPartrec.Code)
(k : Turing.PartrecToTM2.Cont')

Turing.PartrecToTM2.contSupp (Turing.PartrecToTM2.Cont'.fix f k) =
  Turing.PartrecToTM2.codeSupp f (Turing.PartrecToTM2.Cont'.fix f k)


theorem sup_iInf_eq_top {s : Finset ι} {J : ι → Ideal R} (h : ∀ i, i ∈ s → I ⊔ J i = ⊤) :
    (I ⊔ ⨅ i ∈ s, J i) = ⊤

{R : Type u}
{ι : Type u_1}
[CommSemiring R]
{I : Ideal R}
{s : Finset ι}
{J : ι → Ideal R}
(h : ∀ i ∈ s, I ⊔ J i = ⊤)


theorem coe_extChartAt_transDiffeomorph_symm (x : M) :
    ⇑(extChartAt (I.transDiffeomorph e) x).symm = (extChartAt I x).symm ∘ e.symm

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{E' : Type u_3}
[NormedAddCommGroup E']
[NormedSpace 𝕜 E']
{H : Type u_5}
[TopologicalSpace H]
(I : ModelWithCorners 𝕜 E H)
{M : Type u_9}
[TopologicalSpace M]
[ChartedSpace H M]
(e : E ≃ₘ⟮𝓘(𝕜, E), 𝓘(𝕜, E')⟯ E')
(x : M)

↑(extChartAt (I.transDiffeomorph e) x).symm = ↑(extChartAt I x).symm ∘ ⇑e.symm


theorem liftPropOn_symm_of_mem_maximalAtlas [HasGroupoid M G] (hG : G.LocalInvariantProp G Q)
    (hQ : ∀ y, Q id univ y) (he : e ∈ maximalAtlas M G) : LiftPropOn Q e.symm e.target

(he : e ∈ StructureGroupoid.maximalAtlas M G)

ChartedSpace.LiftPropOn Q (↑e.symm) e.target


/-- `E.mkSol` indeed gives solutions to `E`. -/
theorem is_sol_mkSol (init : Fin E.order → α) : E.IsSolution (E.mkSol init)

{α : Type u_1}
[CommSemiring α]
(E : LinearRecurrence α)
(init : Fin E.order → α)


@[simp]
lemma ofHom_v_comp_d (φ : F ⟶ G) (p q q' : ℤ) (hpq : p + 0 = q) :
    (ofHom φ).v p q hpq ≫ G.d q q' = φ.f p ≫ G.d p q'

{C : Type u}
[CategoryTheory.Category.{v, u} C]
[CategoryTheory.Preadditive C]
{F G : CochainComplex C ℤ}
(φ : F ⟶ G)
(p q q' : ℤ)
(hpq : p + 0 = q)

(CochainComplex.HomComplex.Cochain.ofHom φ).v p q hpq ≫ G.d q q' = φ.f p ≫ G.d p q'


/-- A homology data for a short complex consists of two compatible left and
right homology data -/
structure HomologyData where
  /-- a left homology data -/
  left : S.LeftHomologyData
  /-- a right homology data -/
  right : S.RightHomologyData
  /-- the compatibility isomorphism relating the two dual notions of
    `LeftHomologyData` and `RightHomologyData`  -/
  iso : left.H ≅ right.H
  /-- the pentagon relation expressing the compatibility of the left
  and right homology data -/
  comm : left.π ≫ iso.hom ≫ right.ι = left.i ≫ right.p := by aesop_cat

CategoryTheory.CategoryStruct.comp self.left.π (CategoryTheory.CategoryStruct.comp self.iso.hom self.right.ι) =
  CategoryTheory.CategoryStruct.comp self.left.i self.right.p


theorem log_zpow {b : ℕ} (hb : 1 < b) (z : ℤ) : log b ((b : R) ^ z : R) = z

{R : Type u_1}
[LinearOrderedSemifield R]
[FloorSemiring R]
{b : ℕ}
(hb : 1 < b)
(z : ℤ)


protected theorem dvd_mul_left (a b : Int) : b ∣ a * b


protected lemma ContinuousWithinAt.partialSups (hf : ∀ k ≤ n, ContinuousWithinAt (f k) s x) :
    ContinuousWithinAt (partialSups f n) s x

ContinuousWithinAt ((partialSups f) n) s x


theorem dvd_lcm_right (m n : Nat) : n ∣ lcm m n


/-- If `s` is a bounded set, then for small enough `r`, the set `{x} + r • s` is contained in any
fixed neighborhood of `x`. -/
theorem eventually_singleton_add_smul_subset {x : E} {s : Set E} (hs : Bornology.IsBounded s)
    {u : Set E} (hu : u ∈ 𝓝 x) : ∀ᶠ r in 𝓝 (0 : 𝕜), {x} + r • s ⊆ u

{𝕜 : Type u_1}
{E : Type u_2}
[NormedField 𝕜]
[SeminormedAddCommGroup E]
[NormedSpace 𝕜 E]
{x : E}
{s : Set E}
(hs : Bornology.IsBounded s)
{u : Set E}
(hu : u ∈ 𝓝 x)


@[to_additive (attr := simp)]
theorem quotientQuotientEquivQuotientAux_mk (x : G ⧸ N) :
    quotientQuotientEquivQuotientAux N M h x = QuotientGroup.map N M (MonoidHom.id G) h x

{G : Type u}
[Group G]
(N : Subgroup G)
[nN : N.Normal]
(M : Subgroup G)
[nM : M.Normal]
(h : N ≤ M)
(x : G ⧸ N)

(QuotientGroup.quotientQuotientEquivQuotientAux N M h) ↑x = (QuotientGroup.map N M (MonoidHom.id G) h) x


protected theorem Infinite.image2_right (ht : t.Infinite) (ha : a ∈ s) (hf : InjOn (f a) t) :
    (image2 f s t).Infinite

{α : Type u}
{β : Type v}
{γ : Type x}
{f : α → β → γ}
{s : Set α}
{t : Set β}
{a : α}
(ht : t.Infinite)
(ha : a ∈ s)
(hf : Set.InjOn (f a) t)


theorem unzip_zip_left :
    ∀ {l₁ : List α} {l₂ : List β}, length l₁ ≤ length l₂ → (unzip (zip l₁ l₂)).1 = l₁

{α : Type u}
{β : Type u_1}
{l₁ : List α}
{l₂ : List β}

l₁.length ≤ l₂.length → (l₁.zip l₂).unzip.1 = l₁


theorem Basis'.encard_eq_encard (hI : M.Basis' I X) (hJ : M.Basis' J X) : I.encard = J.encard

{α : Type u_1}
{M : Matroid α}
{I X J : Set α}
(hI : M.Basis' I X)
(hJ : M.Basis' J X)


theorem inf_sdiff_left (hs : s.Nonempty) (f : ι → α) (a : α) :
    (s.inf fun b => a \ f b) = a \ s.sup f

{α : Type u_2}
{ι : Type u_5}
[BooleanAlgebra α]
{s : Finset ι}
(hs : s.Nonempty)
(f : ι → α)
(a : α)


@[simp] lemma unop_hom_associator (X Y Z : Cᵒᵖ) :
    (α_ X Y Z).hom.unop = (α_ (unop X) (unop Y) (unop Z)).inv

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

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


lemma injective_comapSubmodule : Injective (comapSubmodule R M a)

(R : Type u_2)
{A : Type u_3}
(M : Type u_1)
[CommSemiring R]
[Semiring A]
(a : A)
[Algebra R A]
[AddCommMonoid M]
[Module A M]
[Module R M]
[IsScalarTower R A M]

Function.Injective ⇑(Module.AEval.comapSubmodule R M a)


protected lemma one [DecidableEq n] : PosSemidef (1 : Matrix n n R)

{n : Type u_2}
{R : Type u_3}
[Fintype n]
[CommRing R]
[PartialOrder R]
[StarRing R]
[StarOrderedRing R]
[DecidableEq n]


theorem derivWithin_zero_of_not_differentiableWithinAt (h : ¬DifferentiableWithinAt 𝕜 f s x) :
    derivWithin f s x = 0

{𝕜 : Type u}
[NontriviallyNormedField 𝕜]
{F : Type v}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{f : 𝕜 → F}
{x : 𝕜}
{s : Set 𝕜}
(h : ¬DifferentiableWithinAt 𝕜 f s x)


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

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

Function.Injective ⇑(AddMonoidAlgebra.of k G)


protected theorem zeroSection (e : Trivialization F (π F E)) [e.IsLinear R] {x : B}
    (hx : x ∈ e.baseSet) : e (zeroSection F E x) = (x, 0)

[TopologicalSpace (Bundle.TotalSpace F E)]

(e : Trivialization F Bundle.TotalSpace.proj)


/-- The canonical finitely-supported approximations to an element `f` of `lp` converge to it, in the
`lp` topology. -/
protected theorem hasSum_single [Fact (1 ≤ p)] (hp : p ≠ ⊤) (f : lp E p) :
    HasSum (fun i : α => lp.single p i (f i : E i)) f

{α : Type u_1}
{E : α → Type u_2}
{p : ℝ≥0∞}
[(i : α) → NormedAddCommGroup (E i)]
[DecidableEq α]
[Fact (1 ≤ p)]
(hp : p ≠ ⊤)
(f : ↥(lp E p))

HasSum (fun i => lp.single p i (↑f i)) f


theorem Perm.kunion_right {l₁ l₂ : List (Sigma β)} (p : l₁ ~ l₂) (l) :
    kunion l₁ l ~ kunion l₂ l

{α : Type u}
{β : α → Type v}
[DecidableEq α]
{l₁ l₂ : List (Sigma β)}
(p : l₁.Perm l₂)
(l : List (Sigma β))


theorem lt_top_of_mul_ne_top_right (h : a * b ≠ ∞) (ha : a ≠ 0) : b < ∞

{a b : ℝ≥0∞}
(h : a * b ≠ ⊤)
(ha : a ≠ 0)


@[to_additive]
theorem inv_inv_div_inv : (a⁻¹ / b⁻¹)⁻¹ = a / b

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


lemma nonpos_iff_exists_ofReal : z ≤ 0 ↔ ∃ x ≤ (0 : ℝ), x = z


@[simp]
theorem comp_coeff_zero' (q : FormalMultilinearSeries 𝕜 F G) (p : FormalMultilinearSeries 𝕜 E F)
    (v : Fin 0 → E) : (q.comp p) 0 v = q 0 fun _i => 0

{𝕜 : Type u_1}
{E : Type u_2}
{F : Type u_3}
{G : Type u_4}
[CommRing 𝕜]
[AddCommGroup E]
[AddCommGroup F]
[AddCommGroup G]
[Module 𝕜 E]
[Module 𝕜 F]
[Module 𝕜 G]
[TopologicalSpace E]
[TopologicalSpace F]
[TopologicalSpace G]
[TopologicalAddGroup E]
[ContinuousConstSMul 𝕜 E]
[TopologicalAddGroup F]
[ContinuousConstSMul 𝕜 F]
[TopologicalAddGroup G]
[ContinuousConstSMul 𝕜 G]
(q : FormalMultilinearSeries 𝕜 F G)
(p : FormalMultilinearSeries 𝕜 E F)
(v : Fin 0 → E)


theorem image_preimage_is_empty (j : Discrete ι) (h : i ≠ j) (U : Opens (F.obj i)) :
    (Opens.map (colimit.ι (F ⋙ SheafedSpace.forgetToPresheafedSpace) j).base).obj
        ((Opens.map (preservesColimitIso SheafedSpace.forgetToPresheafedSpace F).inv.base).obj
          ((sigma_ι_openEmbedding F i).isOpenMap.functor.obj U)) =
      ⊥

(F : CategoryTheory.Discrete ι ⥤ AlgebraicGeometry.SheafedSpace C)

(U : TopologicalSpace.Opens ↑↑(F.obj i).toPresheafedSpace)

(TopologicalSpace.Opens.map
        (CategoryTheory.Limits.colimit.ι (F ⋙ AlgebraicGeometry.SheafedSpace.forgetToPresheafedSpace) j).base).obj
    ((TopologicalSpace.Opens.map
          (CategoryTheory.preservesColimitIso AlgebraicGeometry.SheafedSpace.forgetToPresheafedSpace F).inv.base).obj
      (⋯.functor.obj U)) =
  ⊥


theorem gcd_dvd_dot_left (xs ys : Coeffs) : (gcd xs : Int) ∣ dot xs ys


theorem IsPrenex.relabel {m : ℕ} {φ : L.BoundedFormula α m} (h : φ.IsPrenex)
    (f : α → β ⊕ (Fin n)) : (φ.relabel f).IsPrenex

{L : FirstOrder.Language}
{α : Type u'}
{β : Type v'}
{n m : ℕ}
{φ : L.BoundedFormula α m}
(h : φ.IsPrenex)
(f : α → β ⊕ Fin n)


@[simp]
theorem mkPiAlgebra_apply (m : ι → A) : ContinuousMultilinearMap.mkPiAlgebra R ι A m = ∏ i, m i

(R : Type u)
(ι : Type v)
(A : Type u_1)
[Fintype ι]
[CommSemiring R]
[CommSemiring A]
[Algebra R A]
[TopologicalSpace A]
[ContinuousMul A]
(m : ι → A)

(ContinuousMultilinearMap.mkPiAlgebra R ι A) m = ∏ i : ι, m i


@[simp]
theorem ofLeftInverse'_apply {g : B → A} {f : F} (h : Function.LeftInverse g f) (x : A) :
    ofLeftInverse' h x = f x

{F : Type v'}
{R : Type u}
{A : Type v}
{B : Type w}
[CommSemiring R]
[NonUnitalSemiring A]
[Module R A]
[Star A]
[NonUnitalSemiring B]
[Module R B]
[Star B]
[FunLike F A B]
[NonUnitalAlgHomClass F R A B]
[NonUnitalStarAlgHomClass F R A B]
{g : B → A}
{f : F}
(h : Function.LeftInverse g ⇑f)
(x : A)

↑((StarAlgEquiv.ofLeftInverse' h) x) = f x


protected theorem continuousAt {x} : ContinuousAt e x

{𝕜 : 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₂]
(e : P ≃ᵃⁱ[𝕜] P₂)
{x : P}


theorem measurable_lintegral {f : α → ℝ≥0∞} (hf : Measurable f) :
    Measurable fun μ : Measure α => ∫⁻ x, f x ∂μ

{α : Type u_1}
[MeasurableSpace α]
{f : α → ℝ≥0∞}
(hf : Measurable f)


/-- `C` is filtered if and only if for every functor `F : J ⥤ C` from a finite category there is
    some `X : C` such that `lim Hom(F·, X)` is nonempty.

    Lemma 3.1.2 of [Kashiwara2006] -/
theorem IsFiltered.iff_nonempty_limit : IsFiltered C ↔
    ∀ {J : Type v} [SmallCategory J] [FinCategory J] (F : J ⥤ C),
      ∃ (X : C), Nonempty (limit (F.op ⋙ yoneda.obj X))

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

CategoryTheory.IsFiltered C ↔
  ∀ {J : Type v} [inst : CategoryTheory.SmallCategory J] [inst_1 : CategoryTheory.FinCategory J] (F : J ⥤ C),
    ∃ X, Nonempty (CategoryTheory.Limits.limit (F.op ⋙ CategoryTheory.yoneda.obj X))


@[to_additive (attr := simp)] theorem snd_apply_inr (x : N) : snd (inr x : M ∗ N) = x

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

AddMonoid.Coprod.snd (AddMonoid.Coprod.inr x) = x


@[simp]
theorem ofHamming_add [∀ i, Add (β i)] {x y : Hamming β} :
    ofHamming (x + y) = ofHamming x + ofHamming y

{ι : Type u_2}
{β : ι → Type u_3}
[(i : ι) → Add (β i)]
{x y : Hamming β}

Hamming.ofHamming (x + y) = Hamming.ofHamming x + Hamming.ofHamming y


theorem LinearIsometry.extend_apply (L : S →ₗᵢ[𝕜] V) (s : S) : L.extend s = L s

{𝕜 : Type u_3}
[RCLike 𝕜]
{V : Type u_8}
[NormedAddCommGroup V]
[InnerProductSpace 𝕜 V]
[FiniteDimensional 𝕜 V]
{S : Submodule 𝕜 V}
(L : ↥S →ₗᵢ[𝕜] V)
(s : ↥S)


@[simp]
theorem map_zero_right (f : M →ₗ[R] P) : map f (0 : N →ₗ[R] Q) = 0

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


@[simp, norm_cast]
theorem coeComplex_imJ (z : ℂ) : (z : ℍ).imJ = 0


@[to_additive]
theorem ciSup_mul (hf : BddAbove (range f)) (a : G) : (⨆ i, f i) * a = ⨆ i, f i * a

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


@[simp]
theorem gcd_zero_right (i : ℤ) : gcd i 0 = natAbs i


@[simp]
theorem Pi.compl_apply [∀ i, HasCompl (π i)] (x : ∀ i, π i) (i : ι) :
    xᶜ i = (x i)ᶜ

{ι : Type u_1}
{π : ι → Type u_4}
[(i : ι) → HasCompl (π i)]
(x : (i : ι) → π i)
(i : ι)


/-- Multiplication by a `u : Mˣ` on the left doesn't affect `IsUnit`. -/
@[to_additive (attr := simp)
"Addition of a `u : AddUnits M` on the left doesn't affect `IsAddUnit`."]
theorem Units.isUnit_units_mul {M : Type*} [Monoid M] (u : Mˣ) (a : M) :
    IsUnit (↑u * a) ↔ IsUnit a

{M : Type u_3}
[Monoid M]
(u : Mˣ)
(a : M)


lemma map_adj_apply {G : SimpleGraph V} {f : V ↪ W} {a b : V} :
    (G.map f).Adj (f a) (f b) ↔ G.Adj a b

{V : Type u_1}
{W : Type u_2}
{G : SimpleGraph V}
{f : V ↪ W}
{a b : V}

(SimpleGraph.map f G).Adj (f a) (f b) ↔ G.Adj a b


lemma pos_of_smul_pos_right [SMulPosReflectLT α β] (h : 0 < a • b) (hb : 0 ≤ b) : 0 < a

{α : Type u_1}
{β : Type u_2}
{a : α}
{b : β}
[Zero α]
[Zero β]
[SMulWithZero α β]
[Preorder α]
[Preorder β]
[SMulPosReflectLT α β]
(h : 0 < a • b)
(hb : 0 ≤ b)


@[ext 1001]
theorem biproduct.hom_ext {f : J → C} [HasBiproduct f] {Z : C} (g h : Z ⟶ ⨁ f)
    (w : ∀ j, g ≫ biproduct.π f j = h ≫ biproduct.π f j) : g = h

(w : ∀ (j : J), g ≫ CategoryTheory.Limits.biproduct.π f j = h ≫ CategoryTheory.Limits.biproduct.π f j)


theorem WF.mapVal {α β γ} {f : α → β → γ} [BEq α] [Hashable α]
    {m : Imp α β} (H : WF m) : WF (mapVal f m)

{α : Type u_1}
{β : Type u_2}
{γ : Type u_3}
{f : α → β → γ}
[BEq α]
[Hashable α]
{m : Batteries.HashMap.Imp α β}
(H : m.WF)


theorem union_val_nd (s t : Finset α) : (s ∪ t).1 = ndunion s.1 t.1

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


theorem mul_X_add_natCast_comp {n : ℕ} :
    (p * (X + (n : R[X]))).comp q = p.comp q * (q + n)

{R : Type u}
[Semiring R]
{p q : R[X]}
{n : ℕ}

(p * (Polynomial.X + ↑n)).comp q = p.comp q * (q + ↑n)


@[simp] theorem _root_.LinearIsometryEquiv.piLpCurry_symm_apply
    (f : PiLp p (fun i => PiLp p (α i))) :
    (_root_.LinearIsometryEquiv.piLpCurry 𝕜 p α).symm f =
      (WithLp.equiv _ _).symm (Sigma.uncurry fun i j => f i j)

[(i : ι) → (k : κ i) → SeminormedAddCommGroup (α i k)]

[(i : ι) → (k : κ i) → Module 𝕜 (α i k)]

(LinearIsometryEquiv.piLpCurry 𝕜 p α).symm f =
  (WithLp.equiv p ((x : Sigma κ) → α x.fst x.snd)).symm (Sigma.uncurry fun i j => f i j)


protected theorem le_of_sub_eq_zero : ∀ {n m}, n - m = 0 → n ≤ m


theorem Bounded.dual_iff {t : Ordnode α} {o₁ o₂} :
    Bounded t o₁ o₂ ↔ @Bounded αᵒᵈ _ (.dual t) o₂ o₁

{α : Type u_1}
[Preorder α]
{t : Ordnode α}
{o₁ : WithBot α}
{o₂ : WithTop α}


@[simp]
theorem add_toProd (a b : 𝓜(𝕜, A)) : (a + b).toProd = a.toProd + b.toProd

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


theorem algebraMap₀_one : (algebraMap₀ 1 : (⨂[R]^0) M) = ₜ1

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

TensorPower.algebraMap₀ 1 = GradedMonoid.GOne.one


theorem mem_support_not_mem_vars_zero {f : MvPolynomial σ R} {x : σ →₀ ℕ} (H : x ∈ f.support)
    {v : σ} (h : v ∉ vars f) : x v = 0

{R : Type u}
{σ : Type u_1}
[CommSemiring R]
{f : MvPolynomial σ R}
{x : σ →₀ ℕ}
(H : x ∈ f.support)
{v : σ}
(h : v ∉ f.vars)


protected theorem Decidable.forall_or_left {q : Prop} {p : α → Prop} [Decidable q] :
    (∀ x, q ∨ p x) ↔ q ∨ ∀ x, p x

{α : Sort u_1}
{q : Prop}
{p : α → Prop}
[Decidable q]

(∀ (x : α), q ∨ p x) ↔ q ∨ ∀ (x : α), p x


theorem basicOpen_mul_le_left (f g : R) : basicOpen (f * g) ≤ basicOpen f

PrimeSpectrum.basicOpen (f * g) ≤ PrimeSpectrum.basicOpen f


/-- The identity lax monoidal functor. -/
@[simps]
def id : OplaxMonoidalFunctor.{v₁, v₁} C C

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

(CategoryTheory.OplaxMonoidalFunctor.id C).η = 𝟙 ((𝟭 C).obj (𝟙_ C))


@[simp]
theorem moveLeft_neg' {x : PGame} (i) : (-x).moveLeft i = -x.moveRight (toLeftMovesNeg.symm i)

{x : SetTheory.PGame}
(i : (-x).LeftMoves)

(-x).moveLeft i = -x.moveRight (SetTheory.PGame.toLeftMovesNeg.symm i)


theorem toZModPow_eq_iff_ext {R : Type*} [NonAssocSemiring R] {g g' : R →+* ℤ_[p]} :
    (∀ n, (toZModPow n).comp g = (toZModPow n).comp g') ↔ g = g'

{p : ℕ}
[hp_prime : Fact (Nat.Prime p)]
{R : Type u_1}
[NonAssocSemiring R]
{g g' : R →+* ℤ_[p]}

(∀ (n : ℕ), (PadicInt.toZModPow n).comp g = (PadicInt.toZModPow n).comp g') ↔ g = g'


lemma nnqsmul_nonneg (q : ℚ≥0) (ha : 0 ≤ a) : 0 ≤ q • a

{α : Type u_1}
[LinearOrderedSemifield α]
{a : α}
(q : ℚ≥0)
(ha : 0 ≤ a)


@[to_additive (attr := simp)]
theorem image_mul_right : (· * b) '' t = (· * b⁻¹) ⁻¹' t

{α : Type u_2}
[AddGroup α]
{t : Set α}
{b : α}

(fun x => x + b) '' t = (fun x => x + -b) ⁻¹' t


lemma apply_le_nndist_zero {X : Type*} [TopologicalSpace X] (f : X →ᵇ ℝ≥0) (x : X) :
    f x ≤ nndist 0 f

{X : Type u_1}
[TopologicalSpace X]
(f : X →ᵇ ℝ≥0)
(x : X)


private theorem disjUnion_filter_pairs_eq_pairs (k : ℕ) :
    disjUnion (filter (fun t ↦ card t.fst < k) (pairs σ k))
    (filter (fun t ↦ card t.fst = k) (pairs σ k)) (disjoint_filter_pairs_lt_filter_pairs_eq σ k) =
    pairs σ k

(σ : Type u_1)
[Fintype σ]
[DecidableEq σ]
(k : ℕ)

(Finset.filter (fun t => t.1.card < k) (MvPolynomial.NewtonIdentities.pairs σ k)).disjUnion
    (Finset.filter (fun t => t.1.card = k) (MvPolynomial.NewtonIdentities.pairs σ k)) ⋯ =
  MvPolynomial.NewtonIdentities.pairs σ k


lemma preadditiveCoyoneda_homologySequenceδ_apply
    (A : Cᵒᵖ) (T : Triangle C) (n₀ n₁ : ℤ) (h : n₀ + 1 = n₁) (x : A.unop ⟶ T.obj₃⟦n₀⟧) :
    (preadditiveCoyoneda.obj A).homologySequenceδ T n₀ n₁ h x =
      x ≫ T.mor₃⟦n₀⟧' ≫ (shiftFunctorAdd' C 1 n₀ n₁ (by omega)).inv.app _

(T : CategoryTheory.Pretriangulated.Triangle C)

(x : Opposite.unop A ⟶ (CategoryTheory.shiftFunctor C n₀).obj T.obj₃)

((CategoryTheory.preadditiveCoyoneda.obj A).homologySequenceδ T n₀ n₁ h) x =
  CategoryTheory.CategoryStruct.comp x
    (CategoryTheory.CategoryStruct.comp ((CategoryTheory.shiftFunctor C n₀).map T.mor₃)
      ((CategoryTheory.shiftFunctorAdd' C 1 n₀ n₁ ⋯).inv.app T.obj₁))


theorem of_eval₂ (f : Polynomial (FixedPoints.subfield G F))
    (hf : Polynomial.eval₂ (Subfield.subtype <| FixedPoints.subfield G F) x f = 0) :
    minpoly G F x ∣ f

(f : Polynomial ↥(FixedPoints.subfield G F))

(hf : Polynomial.eval₂ (FixedPoints.subfield G F).subtype x f = 0)


/-- the coercion `Opens α → Set α` applied to a pair is the same as taking the first component -/
@[simp]
theorem coe_mk {U : Set α} {hU : IsOpen U} : ↑(⟨U, hU⟩ : Opens α) = U

{α : Type u_2}
[TopologicalSpace α]
{U : Set α}
{hU : IsOpen U}


/-- Multiplicative equivalence between additive endomorphisms of an `AddZeroClass` `A`
and multiplicative endomorphisms of `Multiplicative A`. -/
@[simps!] def addMonoidEndToMultiplicative (A : Type*) [AddZeroClass A] :
    AddMonoid.End A ≃* Monoid.End (Multiplicative A)

(A : Type u_3)
[AddZeroClass A]
(f : A →+ A)
(a : Multiplicative A)

((addMonoidEndToMultiplicative A) f) a = Multiplicative.ofAdd (f (Multiplicative.toAdd a))


@[simp]
lemma Basis.baseChange_apply (b : Basis ι R M) (i) :
    b.baseChange S i = 1 ⊗ₜ b i

{R : Type u_1}
(S : Type u_2)
{M : Type u_3}
{ι : Type u_5}
[CommSemiring R]
[Semiring S]
[Algebra R S]
[AddCommMonoid M]
[Module R M]
(b : Basis ι R M)
(i : ι)


theorem elim_map {f₁ : α → β} {f₂ : β → ε} {g₁ : γ → δ} {g₂ : δ → ε} {x} :
    Sum.elim f₂ g₂ (Sum.map f₁ g₁ x) = Sum.elim (f₂ ∘ f₁) (g₂ ∘ g₁) x

{α : Type u_1}
{β : Type u_2}
{ε : Sort u_3}
{γ : Type u_4}
{δ : Type u_5}
{f₁ : α → β}
{f₂ : β → ε}
{g₁ : γ → δ}
{g₂ : δ → ε}
{x : α ⊕ γ}