/-- A monotone function continuous at the supremum of a nonempty set sends this supremum to
the supremum of the image of this set. -/
theorem Monotone.map_sSup_of_continuousAt' {f : α → β} {A : Set α} (Cf : ContinuousAt f (sSup A))
    (Mf : Monotone f) (A_nonemp : A.Nonempty) (A_bdd : BddAbove A := by bddDefault) :
    f (sSup A) = sSup (f '' A)

{α : Type u_1}
{β : Type u_2}
[ConditionallyCompleteLinearOrder α]
[TopologicalSpace α]
[OrderTopology α]
[ConditionallyCompleteLinearOrder β]
[TopologicalSpace β]
[OrderClosedTopology β]
{f : α → β}
{A : Set α}
(Cf : ContinuousAt f (sSup A))
(Mf : Monotone f)
(A_nonemp : A.Nonempty)
(A_bdd : BddAbove A := by bddDefault)


@[reassoc]
theorem lift_π (j : J) : lift f fs w ≫ π arrows j = fs _

[CategoryTheory.Limits.HasWidePullback B objs arrows]

CategoryTheory.Limits.WidePullback.lift f fs w ≫ CategoryTheory.Limits.WidePullback.π arrows j = fs j


@[to_additive (attr := simp)]
theorem prod_mul [∀ i, AddCommMonoid (β i)] [∀ (i) (x : β i), Decidable (x ≠ 0)] [CommMonoid γ]
    {f : Π₀ i, β i} {h₁ h₂ : ∀ i, β i → γ} :
    (f.prod fun i b => h₁ i b * h₂ i b) = f.prod h₁ * f.prod h₂

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


/-- A finite coproduct in the category of a `SemilatticeSup` with `OrderBot` is the same as the
supremum.
-/
theorem finite_coproduct_eq_finset_sup [SemilatticeSup α] [OrderBot α] {ι : Type u} [Fintype ι]
    (f : ι → α) : ∐ f = Fintype.elems.sup f

{α : Type u}
[SemilatticeSup α]
[OrderBot α]
{ι : Type u}
[Fintype ι]
(f : ι → α)


/-- For integrally closed domains, the minimal polynomial over the ring is the same as the minimal
polynomial over the fraction field. Compared to `minpoly.isIntegrallyClosed_eq_field_fractions`,
this version is useful if the element is in a ring that is already a `K`-algebra. -/
theorem isIntegrallyClosed_eq_field_fractions' [IsDomain S] [Algebra K S] [IsScalarTower R K S]
    {s : S} (hs : IsIntegral R s) : minpoly K s = (minpoly R s).map (algebraMap R K)

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

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


@[to_additive]
theorem lt_mul_of_lt_mul_right [CovariantClass α α (swap (· * ·)) (· ≤ ·)] {a b c d : α}
    (h : a < b * c) (hle : b ≤ d) :
    a < d * c

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


theorem ker_prod_ker_le_ker_coprod [ContinuousAdd M₃] (f : M →L[R] M₃) (g : M₂ →L[R] M₃) :
    (LinearMap.ker f).prod (LinearMap.ker g) ≤ LinearMap.ker (f.coprod g)

{R : Type u_1}
[Ring R]
{M : Type u_4}
[TopologicalSpace M]
[AddCommGroup M]
{M₂ : Type u_5}
[TopologicalSpace M₂]
[AddCommGroup M₂]
{M₃ : Type u_6}
[TopologicalSpace M₃]
[AddCommGroup M₃]
[Module R M]
[Module R M₂]
[Module R M₃]
[ContinuousAdd M₃]
(f : M →L[R] M₃)
(g : M₂ →L[R] M₃)


∀ {β : Type u_1} {b : β} {α : Type u_2} {a : α}, Sum.inr b ≠ Sum.inl a


/-- If `f` tends to infinity along a nontrivial filter `l`, then
`x ↦ f x * r` tends to infinity if and only if `0 < r. `-/
lemma tendsto_div_const_atTop_iff_pos [NeBot l] (h : Tendsto f l atTop) :
    Tendsto (fun x ↦ f x / r) l atTop ↔ 0 < r

{α : Type u_3}
{β : Type u_4}
[LinearOrderedSemifield α]
{l : Filter β}
{f : β → α}
{r : α}
[l.NeBot]
(h : Filter.Tendsto f l Filter.atTop)

Filter.Tendsto (fun x => f x / r) l Filter.atTop ↔ 0 < r


theorem integral_smul (c : 𝕜) {f : α →ₛ E} (hf : Integrable f μ) :
    integral μ (c • f) = c • integral μ f

{α : Type u_1}
{E : Type u_2}
{𝕜 : Type u_4}
[NormedAddCommGroup E]
{m : MeasurableSpace α}
{μ : MeasureTheory.Measure α}
[NormedField 𝕜]
[NormedSpace 𝕜 E]
[NormedSpace ℝ E]
[SMulCommClass ℝ 𝕜 E]
(c : 𝕜)
{f : MeasureTheory.SimpleFunc α E}
(hf : MeasureTheory.Integrable (↑f) μ)

MeasureTheory.SimpleFunc.integral μ (c • f) = c • MeasureTheory.SimpleFunc.integral μ f


@[to_additive]
theorem ContinuousInv.of_nhds_one {G : Type*} [Group G] [TopologicalSpace G]
    (hinv : Tendsto (fun x : G => x⁻¹) (𝓝 1) (𝓝 1))
    (hleft : ∀ x₀ : G, 𝓝 x₀ = map (fun x : G => x₀ * x) (𝓝 1))
    (hconj : ∀ x₀ : G, Tendsto (fun x : G => x₀ * x * x₀⁻¹) (𝓝 1) (𝓝 1)) : ContinuousInv G

(hinv : Filter.Tendsto (fun x => x⁻¹) (𝓝 1) (𝓝 1))

(hleft : ∀ (x₀ : G), 𝓝 x₀ = Filter.map (fun x => x₀ * x) (𝓝 1))

(hconj : ∀ (x₀ : G), Filter.Tendsto (fun x => x₀ * x * x₀⁻¹) (𝓝 1) (𝓝 1))


@[simp]
theorem Iic_union_Ioo_eq_Iio (h : a < b) : Iic a ∪ Ioo a b = Iio b

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


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


theorem Summable.mul_of_nonneg {f : ι → ℝ} {g : ι' → ℝ} (hf : Summable f) (hg : Summable g)
    (hf' : 0 ≤ f) (hg' : 0 ≤ g) : Summable fun x : ι × ι' => f x.1 * g x.2

{ι : Type u_2}
{ι' : Type u_3}
{f : ι → ℝ}
{g : ι' → ℝ}
(hf : Summable f)
(hg : Summable g)
(hf' : 0 ≤ f)
(hg' : 0 ≤ g)


/-- `IsRefl X r` means the binary relation `r` on `X` is reflexive. -/
class IsRefl (α : Sort u) (r : α → α → Prop) : Prop where
  refl : ∀ a, r a a

{α : Sort u}
{r : α → α → Prop}
[self : IsRefl α r]
(a : α)


theorem setIntegral_prod_mul {L : Type*} [RCLike L] (f : α → L) (g : β → L) (s : Set α)
    (t : Set β) :
    ∫ z in s ×ˢ t, f z.1 * g z.2 ∂μ.prod ν = (∫ x in s, f x ∂μ) * ∫ y in t, g y ∂ν

{α : Type u_1}
{β : Type u_3}
[MeasurableSpace α]
[MeasurableSpace β]
{μ : MeasureTheory.Measure α}
{ν : MeasureTheory.Measure β}
[MeasureTheory.SFinite ν]
[MeasureTheory.SFinite μ]
{L : Type u_8}
[RCLike L]
(f : α → L)
(g : β → L)
(s : Set α)
(t : Set β)

∫ (z : α × β) in s ×ˢ t, f z.1 * g z.2 ∂μ.prod ν = (∫ (x : α) in s, f x ∂μ) * ∫ (y : β) in t, g y ∂ν


lemma at_units {R : Type*} [CommSemiring R] (S : Submonoid R)
    (hS : S ≤ IsUnit.submonoid R) : IsLocalization S R

{R : Type u_4}
[CommSemiring R]
(S : Submonoid R)
(hS : S ≤ IsUnit.submonoid R)


/-- A `JordanHolderLattice` is the class for which the Jordan Hölder theorem is proved. A
Jordan Hölder lattice is a lattice equipped with a notion of maximality, `IsMaximal`, and a notion
of isomorphism of pairs `Iso`. In the example of subgroups of a group, `IsMaximal H K` means that
`H` is a maximal normal subgroup of `K`, and `Iso (H₁, K₁) (H₂, K₂)` means that the quotient
`H₁ / K₁` is isomorphic to the quotient `H₂ / K₂`. `Iso` must be symmetric and transitive and must
satisfy the second isomorphism theorem `Iso (H, H ⊔ K) (H ⊓ K, K)`.
Examples include `Subgroup G` if `G` is a group, and `Submodule R M` if `M` is an `R`-module.
-/
class JordanHolderLattice (X : Type u) [Lattice X] where
  IsMaximal : X → X → Prop
  lt_of_isMaximal : ∀ {x y}, IsMaximal x y → x < y
  sup_eq_of_isMaximal : ∀ {x y z}, IsMaximal x z → IsMaximal y z → x ≠ y → x ⊔ y = z
  isMaximal_inf_left_of_isMaximal_sup :
    ∀ {x y}, IsMaximal x (x ⊔ y) → IsMaximal y (x ⊔ y) → IsMaximal (x ⊓ y) x
  Iso : X × X → X × X → Prop
  iso_symm : ∀ {x y}, Iso x y → Iso y x
  iso_trans : ∀ {x y z}, Iso x y → Iso y z → Iso x z
  second_iso : ∀ {x y}, IsMaximal x (x ⊔ y) → Iso (x, x ⊔ y) (x ⊓ y, y)

{X : Type u}
[Lattice X]
[self : JordanHolderLattice X]
{x y : X}

JordanHolderLattice.IsMaximal x (x ⊔ y) →
  JordanHolderLattice.IsMaximal y (x ⊔ y) → JordanHolderLattice.IsMaximal (x ⊓ y) x


@[to_additive (attr := simp)]
theorem coe_mrange (f : F) : (mrange f : Set N) = Set.range f

{M : Type u_1}
{N : Type u_2}
[MulOneClass M]
[MulOneClass N]
{F : Type u_5}
[FunLike F M N]
[mc : MonoidHomClass F M N]
(f : F)


@[simp]
theorem proj_equiv₁' (f : Fin n → α) : graph.proj ∘ graphEquiv₁ f = f

{n : ℕ}
{α : Type u_1}
[LinearOrder α]
(f : Fin n → α)

Tuple.graph.proj ∘ ⇑(Tuple.graphEquiv₁ f) = f


/-- Rotating the points in an oriented angle does not change the sign of that angle. -/
theorem oangle_rotate_sign (p₁ p₂ p₃ : P) : (∡ p₂ p₃ p₁).sign = (∡ p₁ p₂ p₃).sign

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


lemma natCast_mono (hbn : b ≤ n) (hab : a ≤ b) : (a : Fin (n + 1)) ≤ b


theorem IsLUB.inter_Ici_of_mem [LinearOrder γ] {s : Set γ} {a b : γ} (ha : IsLUB s a) (hb : b ∈ s) :
    IsLUB (s ∩ Ici b) a

{γ : Type w}
[LinearOrder γ]
{s : Set γ}
{a b : γ}
(ha : IsLUB s a)
(hb : b ∈ s)


/-- An `sl₂` triple within a Lie ring `L` is a triple of elements `h`, `e`, `f` obeying relations
which ensure that the Lie subalgebra they generate is equivalent to `sl₂`. -/
structure IsSl2Triple (h e f : L) : Prop where
  h_ne_zero : h ≠ 0
  lie_e_f : ⁅e, f⁆ = h
  lie_h_e_nsmul : ⁅h, e⁆ = 2 • e
  lie_h_f_nsmul : ⁅h, f⁆ = - (2 • f)

{L : Type u_2}
[LieRing L]
{h e f : L}
(self : IsSl2Triple h e f)


theorem Embedding.codRestrict {e : X → Y} (he : Embedding e) (s : Set Y) (hs : ∀ x, e x ∈ s) :
    Embedding (codRestrict e s hs)

{X : Type u}
{Y : Type v}
[TopologicalSpace X]
[TopologicalSpace Y]
{e : X → Y}
(he : Embedding e)
(s : Set Y)
(hs : ∀ (x : X), e x ∈ s)


theorem factorial_inj (hn : 1 < n) : n ! = m ! ↔ n = m


/-- `c.toOver` is a lift of `c` under the forgetful functor. -/
@[simps!]
def Cocone.mapCoconeToOver {F : J ⥤ C} (c : Cocone F) : (Over.forget c.pt).mapCocone c.toOver ≅ c

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

c.mapCoconeToOver.hom.hom = CategoryTheory.CategoryStruct.id c.pt


theorem unique {a b : α} {k : ℕ} (hk : a ^ k ∣ b) (hsucc : ¬a ^ (k + 1) ∣ b) :
    (k : PartENat) = multiplicity a b

{α : Type u_1}
[Monoid α]
[DecidableRel fun x x_1 => x ∣ x_1]
{a b : α}
{k : ℕ}
(hk : a ^ k ∣ b)
(hsucc : ¬a ^ (k + 1) ∣ b)


/-- A slight reformulation of `IsLocalStructomorphWithinAt` when `f` is a partial homeomorph and
  the set we're considering is `f.source`. -/
theorem _root_.PartialHomeomorph.isLocalStructomorphWithinAt_source_iff {G : StructureGroupoid H}
    [ClosedUnderRestriction G] (f : PartialHomeomorph H H) {x : H} :
    G.IsLocalStructomorphWithinAt (⇑f) f.source x ↔
      x ∈ f.source → ∃ e : PartialHomeomorph H H,
      e ∈ G ∧ e.source ⊆ f.source ∧ EqOn f (⇑e) e.source ∧ x ∈ e.source

{H : Type u_1}
[TopologicalSpace H]
{G : StructureGroupoid H}
[ClosedUnderRestriction G]
(f : PartialHomeomorph H H)
{x : H}

G.IsLocalStructomorphWithinAt (↑f) f.source x ↔
  x ∈ f.source → ∃ e ∈ G, e.source ⊆ f.source ∧ Set.EqOn (↑f) (↑e) e.source ∧ x ∈ e.source


@[to_additive]
theorem pairwiseDisjoint_leftCoset_cover_const_of_index_eq (hind : H.index = s.card) :
    Set.PairwiseDisjoint s (g · • (H : Set G))

(hcovers : ⋃ i ∈ s, g i • ↑H = Set.univ)


protected theorem differentiableAt (h : DiffContOnCl 𝕜 f s) (hs : IsOpen s) (hx : x ∈ s) :
    DifferentiableAt 𝕜 f x

{𝕜 : Type u_1}
{E : Type u_2}
{F : Type u_3}
[NontriviallyNormedField 𝕜]
[NormedAddCommGroup E]
[NormedAddCommGroup F]
[NormedSpace 𝕜 E]
[NormedSpace 𝕜 F]
{f : E → F}
{s : Set E}
{x : E}
(h : DiffContOnCl 𝕜 f s)
(hs : IsOpen s)
(hx : x ∈ s)


@[fun_prop]
theorem DifferentiableOn.add_const (hf : DifferentiableOn 𝕜 f s) (c : F) :
    DifferentiableOn 𝕜 (fun y => f y + c) s

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{F : Type u_3}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{f : E → F}
{s : Set E}
(hf : DifferentiableOn 𝕜 f s)
(c : F)


@[simp]
theorem finSepDegree_bot' : finSepDegree F (⊥ : IntermediateField E K) = finSepDegree F E

{F : Type u}
(E : Type v)
[Field F]
[Field E]
[Algebra F E]
(K : Type w)
[Field K]
[Algebra F K]
[Algebra E K]
[IsScalarTower F E K]

Field.finSepDegree F ↥⊥ = Field.finSepDegree F E


@[reassoc (attr := simp)]
lemma Pi.map'_comp_π {f : α → C} {g : β → C} [HasProduct f] [HasProduct g] (p : β → α)
    (q : ∀ (b : β), f (p b) ⟶ g b) (b : β) : Pi.map' p q ≫ Pi.π g b = Pi.π f (p b) ≫ q b

{β : Type w}
{α : Type w₂}
{C : Type u}
[CategoryTheory.Category.{v, u} C]
{f : α → C}
{g : β → C}
[CategoryTheory.Limits.HasProduct f]
[CategoryTheory.Limits.HasProduct g]
(p : β → α)
(q : (b : β) → f (p b) ⟶ g b)
(b : β)

CategoryTheory.Limits.Pi.map' p q ≫ CategoryTheory.Limits.Pi.π g b = CategoryTheory.Limits.Pi.π f (p b) ≫ q b


/-- Given a limit cone over `F ⋙ G` we can construct a limit cone over `G`. -/
@[simps]
def limitConeOfComp (t : LimitCone (F ⋙ G)) : LimitCone G

(t : CategoryTheory.Limits.LimitCone (F.comp G))

(CategoryTheory.Functor.Initial.limitConeOfComp F t).cone = CategoryTheory.Functor.Initial.extendCone.obj t.cone


theorem PosMulReflectLT.toPosMulMono [PosMulReflectLT α] : PosMulMono α

{α : Type u_1}
[Mul α]
[Zero α]
[LinearOrder α]
[PosMulReflectLT α]


@[simp]
theorem toFinset_cons (a : α) (s : Multiset α) : toFinset (a ::ₘ s) = insert a (toFinset s)

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

(a ::ₘ s).toFinset = insert a s.toFinset


theorem not_prime_of_dvd_of_ne {m n : ℕ} (h1 : m ∣ n) (h2 : m ≠ 1) (h3 : m ≠ n) : ¬Prime n


theorem addBottom_modifyNth (f : (∀ k, Option (Γ k)) → ∀ k, Option (Γ k))
    (L : ListBlank (∀ k, Option (Γ k))) (n : ℕ) :
    (addBottom L).modifyNth (fun a ↦ (a.1, f a.2)) n = addBottom (L.modifyNth f n)

(f : ((k : K) → Option (Γ k)) → (k : K) → Option (Γ k))

(L : Turing.ListBlank ((k : K) → Option (Γ k)))

Turing.ListBlank.modifyNth (fun a => (a.1, f a.2)) n (Turing.TM2to1.addBottom L) =
  Turing.TM2to1.addBottom (Turing.ListBlank.modifyNth f n L)


/-- `Polynomial.sum` as a linear map. -/
@[simps]
def lsum {R A M : Type*} [Semiring R] [Semiring A] [AddCommMonoid M] [Module R A] [Module R M]
    (f : ℕ → A →ₗ[R] M) : A[X] →ₗ[R] M

{R : Type u_1}
{A : Type u_2}
{M : Type u_3}
[Semiring R]
[Semiring A]
[AddCommMonoid M]
[Module R A]
[Module R M]
(f : ℕ → A →ₗ[R] M)
(p : A[X])

(Polynomial.lsum f) p = p.sum fun x x_1 => (f x) x_1


@[to_additive]
theorem smoothOn_finset_prod' (h : ∀ i ∈ t, SmoothOn I' I (f i) s) :
    SmoothOn I' I (∏ i ∈ t, f i) s

{ι : Type u_1}
{𝕜 : Type u_2}
[NontriviallyNormedField 𝕜]
{H : Type u_3}
[TopologicalSpace H]
{E : Type u_4}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{I : ModelWithCorners 𝕜 E H}
{G : Type u_5}
[AddCommMonoid G]
[TopologicalSpace G]
[ChartedSpace H G]
[SmoothAdd I G]
{E' : Type u_6}
[NormedAddCommGroup E']
[NormedSpace 𝕜 E']
{H' : Type u_7}
[TopologicalSpace H']
{I' : ModelWithCorners 𝕜 E' H'}
{M : Type u_8}
[TopologicalSpace M]
[ChartedSpace H' M]
{s : Set M}
{t : Finset ι}
{f : ι → M → G}
(h : ∀ i ∈ t, SmoothOn I' I (f i) s)


theorem volume_eq_prod (α β) [MeasureSpace α] [MeasureSpace β] :
    (volume : Measure (α × β)) = (volume : Measure α).prod (volume : Measure β)

(α : Type u_7)
(β : Type u_8)
[MeasureTheory.MeasureSpace α]
[MeasureTheory.MeasureSpace β]

MeasureTheory.volume = MeasureTheory.volume.prod MeasureTheory.volume


theorem isPiSystem_image_Ici (s : Set α) : IsPiSystem (Ici '' s)

{α : Type u_1}
[LinearOrder α]
(s : Set α)


theorem coe_leastOfBdd_eq {P : ℤ → Prop} [DecidablePred P] {b b' : ℤ} (Hb : ∀ z : ℤ, P z → b ≤ z)
    (Hb' : ∀ z : ℤ, P z → b' ≤ z) (Hinh : ∃ z : ℤ, P z) :
    (leastOfBdd b Hb Hinh : ℤ) = leastOfBdd b' Hb' Hinh

{P : ℤ → Prop}
[DecidablePred P]
{b b' : ℤ}
(Hb : ∀ (z : ℤ), P z → b ≤ z)
(Hb' : ∀ (z : ℤ), P z → b' ≤ z)
(Hinh : ∃ z, P z)

↑(b.leastOfBdd Hb Hinh) = ↑(b'.leastOfBdd Hb' Hinh)


/-- A subgroup `S` of a topological group `G` acts on `G` properly discontinuously on the right, if
it is discrete in the sense that `S ∩ K` is finite for all compact `K`. (See also
`DiscreteTopology`.)

If `G` is Hausdorff, this can be combined with `t2Space_of_properlyDiscontinuousSMul_of_t2Space`
to show that the quotient group `G ⧸ S` is Hausdorff. -/
@[to_additive
  "A subgroup `S` of an additive topological group `G` acts on `G` properly discontinuously
  on the right, if it is discrete in the sense that `S ∩ K` is finite for all compact `K`.
  (See also `DiscreteTopology`.)

  If `G` is Hausdorff, this can be combined with `t2Space_of_properlyDiscontinuousVAdd_of_t2Space`
  to show that the quotient group `G ⧸ S` is Hausdorff."]
theorem Subgroup.properlyDiscontinuousSMul_opposite_of_tendsto_cofinite (S : Subgroup G)
    (hS : Tendsto S.subtype cofinite (cocompact G)) : ProperlyDiscontinuousSMul S.op G

(hS : Filter.Tendsto (⇑S.subtype) Filter.cofinite (Filter.cocompact G))


/-- A Priestley space is an ordered topological space such that any two distinct points can be
separated by a clopen upper set. Compactness is often assumed, but we do not include it here. -/
class PriestleySpace (α : Type*) [Preorder α] [TopologicalSpace α] : Prop where
  priestley {x y : α} : ¬x ≤ y → ∃ U : Set α, IsClopen U ∧ IsUpperSet U ∧ x ∈ U ∧ y ∉ U

{α : Type u_2}
[Preorder α]
[TopologicalSpace α]
[self : PriestleySpace α]
{x y : α}

¬x ≤ y → ∃ U, IsClopen U ∧ IsUpperSet U ∧ x ∈ U ∧ y ∉ U


/-- Symmetric statement to `Set.image_image2_antidistrib_left`. -/
theorem image2_image_left_anticomm {f : α' → β → γ} {g : α → α'} {f' : β → α → δ} {g' : δ → γ}
    (h_left_anticomm : ∀ a b, f (g a) b = g' (f' b a)) :
    image2 f (s.image g) t = (image2 f' t s).image g'

{f : α' → β → γ}

{f' : β → α → δ}

(h_left_anticomm : ∀ (a : α) (b : β), f (g a) b = g' (f' b a))

Set.image2 f (g '' s) t = g' '' Set.image2 f' t s


theorem pairwise_pair_of_symmetric (hr : Symmetric r) : Set.Pairwise {a, b} r ↔ a ≠ b → r a b

{α : Type u_1}
{r : α → α → Prop}
{a b : α}
(hr : Symmetric r)


@[simp]
theorem star_apply (f : C(α, β)) (x : α) : star f x = star (f x)

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


theorem aleph_isNormal : IsNormal (ord ∘ aleph)

Ordinal.IsNormal (Cardinal.ord ∘ Cardinal.aleph)


theorem FG.map_of_surjective {N : Type*} [L.Structure N] (h : FG L M) (f : M →[L] N)
    (hs : Function.Surjective f) : FG L N

(h : FirstOrder.Language.Structure.FG L M)


theorem isRegular_aleph_succ (o : Ordinal) : IsRegular (aleph (succ o))


theorem Summable.ofStar (hf : Summable fun b ↦ Star.star (f b)) : Summable f

{α : Type u_1}
{β : Type u_2}
[AddCommMonoid α]
[TopologicalSpace α]
[StarAddMonoid α]
[ContinuousStar α]
{f : β → α}
(hf : Summable fun b => star (f b))


theorem Ideal.homogeneousHull_eq_sInf (I : Ideal A) :
    Ideal.homogeneousHull 𝒜 I = sInf { J : HomogeneousIdeal 𝒜 | I ≤ J.toIdeal }

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

Ideal.homogeneousHull 𝒜 I = sInf {J | I ≤ J.toIdeal}


@[continuity, fun_prop]
theorem continuous_re : Continuous (re : K → ℝ)


/-- A ring is a principal ideal ring if all (left) ideals are principal. -/
@[mk_iff]
class IsPrincipalIdealRing (R : Type u) [Semiring R] : Prop where
  principal : ∀ S : Ideal R, S.IsPrincipal

{R : Type u}
[Semiring R]
[self : IsPrincipalIdealRing R]
(S : Ideal R)


@[simp] theorem Bool.and_eq_true (a b : Bool) : ((a && b) = true) = (a = true ∧ b = true)


@[simp]
theorem frobenius_nnnorm_transpose (A : Matrix m n α) : ‖Aᵀ‖₊ = ‖A‖₊

{m : Type u_3}
{n : Type u_4}
{α : Type u_5}
[Fintype m]
[Fintype n]
[SeminormedAddCommGroup α]
(A : Matrix m n α)

‖Aᵀ‖₊ = ‖A‖₊


/-- Given submodules `p ⊆ M`, `p₂ ⊆ M₂`, `p₃ ⊆ M₃` and maps `f : M → M₂`, `g : M₂ → M₃` inducing
`mapQ f : M ⧸ p → M₂ ⧸ p₂` and `mapQ g : M₂ ⧸ p₂ → M₃ ⧸ p₃` then
`mapQ (g ∘ f) = (mapQ g) ∘ (mapQ f)`. -/
theorem mapQ_comp {R₃ M₃ : Type*} [Ring R₃] [AddCommGroup M₃] [Module R₃ M₃] (p₂ : Submodule R₂ M₂)
    (p₃ : Submodule R₃ M₃) {τ₂₃ : R₂ →+* R₃} {τ₁₃ : R →+* R₃} [RingHomCompTriple τ₁₂ τ₂₃ τ₁₃]
    (f : M →ₛₗ[τ₁₂] M₂) (g : M₂ →ₛₗ[τ₂₃] M₃) (hf : p ≤ p₂.comap f) (hg : p₂ ≤ p₃.comap g)
    (h := hf.trans (comap_mono hg)) :
    p.mapQ p₃ (g.comp f) h = (p₂.mapQ p₃ g hg).comp (p.mapQ p₂ f hf)

(g : M₂ →ₛₗ[τ₂₃] M₃)

(h : p ≤ Submodule.comap f (Submodule.comap g p₃) := ⋯)


/-- The induced map of a ring homomorphism on the ring spectra, as a morphism of sheafed spaces.
-/
@[simps]
def Spec.sheafedSpaceMap {R S : CommRingCat.{u}} (f : R ⟶ S) :
    Spec.sheafedSpaceObj S ⟶ Spec.sheafedSpaceObj R

(AlgebraicGeometry.Spec.sheafedSpaceMap f).base = AlgebraicGeometry.Spec.topMap f


@[deprecated getElem?_scanl_zero (since := "2024-06-12")]
theorem get?_zero_scanl : (scanl f b l).get? 0 = some b

{α : Type u}
{β : Type v}
{f : β → α → β}
{b : β}
{l : List α}


theorem eq_self_iff_true (a : α)  : a = a ↔ True


@[simp] lemma unop_add [Add α] (x y : αᵐᵒᵖ) : unop (x + y) = unop x + unop y

MulOpposite.unop (x + y) = MulOpposite.unop x + MulOpposite.unop y


/-- The composition of braided monoidal functors. -/
@[simps!]
def comp (F : BraidedFunctor C D) (G : BraidedFunctor D E) : BraidedFunctor C E

{C : Type u₁}
[CategoryTheory.Category.{v₁, u₁} C]
[CategoryTheory.MonoidalCategory C]
[CategoryTheory.BraidedCategory C]
{D : Type u₂}
[CategoryTheory.Category.{v₂, u₂} D]
[CategoryTheory.MonoidalCategory D]
[CategoryTheory.BraidedCategory D]
{E : Type u₃}
[CategoryTheory.Category.{v₃, u₃} E]
[CategoryTheory.MonoidalCategory E]
[CategoryTheory.BraidedCategory E]
(F : CategoryTheory.BraidedFunctor C D)
(G : CategoryTheory.BraidedFunctor D E)
(X : C)


theorem measurable_id'' {m mα : MeasurableSpace α} (hm : m ≤ mα) : @Measurable α α mα m id

{α : Type u_1}
{m mα : MeasurableSpace α}
(hm : m ≤ mα)


@[simp, norm_cast] lemma coe_sup (a b : L) : a ⊔ b = (a : α) ⊔ b

{α : Type u_2}
[Lattice α]
{L : Sublattice α}
(a b : ↥L)


/-- If `(x, y)` is a solution with `x` positive, then all its powers with natural exponents
have positive `x`. -/
theorem x_pow_pos {a : Solution₁ d} (hax : 0 < a.x) (n : ℕ) : 0 < (a ^ n).x

{d : ℤ}
{a : Pell.Solution₁ d}
(hax : 0 < a.x)
(n : ℕ)


@[simp]
theorem coe_comp (f : CocompactMap β γ) (g : CocompactMap α β) : ⇑(comp f g) = f ∘ g

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


/-- The group of `S`-units is the group of units of the ring of `S`-integers. -/
@[simps apply_val_coe symm_apply_coe]
def unitEquivUnitsInteger : S.unit K ≃* (S.integer K)ˣ

(S : Set (IsDedekindDomain.HeightOneSpectrum R))


lemma le_egauge_iff : r ≤ egauge 𝕜 s x ↔ ∀ c : 𝕜, x ∈ c • s → r ≤ ‖c‖₊

{𝕜 : Type u_1}
[NNNorm 𝕜]
{E : Type u_2}
[SMul 𝕜 E]
{s : Set E}
{x : E}
{r : ℝ≥0∞}

r ≤ egauge 𝕜 s x ↔ ∀ (c : 𝕜), x ∈ c • s → r ≤ ↑‖c‖₊


@[simp]
theorem preimage_map (f : X ⟶ Y) : F.preimage (F.map f) = f

{C : Type u₁}
[CategoryTheory.Category.{v₁, u₁} C]
{D : Type u₂}
[CategoryTheory.Category.{v₂, u₂} D]
{F : CategoryTheory.Functor C D}
{X Y : C}
[F.Full]
[F.Faithful]
(f : X ⟶ Y)


theorem uniformContinuous_coe : UniformContinuous ((↑) : α → Completion α)


theorem mk_def_of_mem (p : K[X]) {q} (hq : q ∈ K[X]⁰) :
    RatFunc.mk p q = ofFractionRing (IsLocalization.mk' (FractionRing K[X]) p ⟨q, hq⟩)

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

RatFunc.mk p q = { toFractionRing := IsLocalization.mk' (FractionRing K[X]) p ⟨q, hq⟩ }


lemma map_top (f : LatticeHom α β) (h : Surjective f) : Sublattice.map f ⊤ = ⊤

{α : Type u_2}
{β : Type u_3}
[Lattice α]
[Lattice β]
(f : LatticeHom α β)
(h : Function.Surjective ⇑f)


@[simp]
theorem coe_sup (s t : PositiveCompacts α) : (↑(s ⊔ t) : Set α) = ↑s ∪ ↑t

(s t : TopologicalSpace.PositiveCompacts α)


@[simp, nolint simpNF]
theorem inf_eq : a ⊓ b = unit


@[simp]
theorem neg_ball (p : Seminorm 𝕜 E) (r : ℝ) (x : E) : -ball p x r = ball p (-x) r

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


/-- A form of the **equality case of Jensen's equality**.

For a strictly convex function `f` and positive weights `w`, if
`f (∑ i ∈ t, w i • p i) = ∑ i ∈ t, w i • f (p i)`, then the points `p` are all equal.

See also `StrictConvexOn.map_sum_eq_iff`. -/
lemma StrictConvexOn.eq_of_le_map_sum (hf : StrictConvexOn 𝕜 s f) (h₀ : ∀ i ∈ t, 0 < w i)
    (h₁ : ∑ i ∈ t, w i = 1) (hmem : ∀ i ∈ t, p i ∈ s)
    (h_eq : ∑ i ∈ t, w i • f (p i) ≤ f (∑ i ∈ t, w i • p i)) :
    ∀ ⦃j⦄, j ∈ t → ∀ ⦃k⦄, k ∈ t → p j = p k


@[simp]
theorem trans_apply (h₁ : α ≃ᵢ β) (h₂ : β ≃ᵢ γ) (x : α) : h₁.trans h₂ x = h₂ (h₁ x)

{α : Type u}
{β : Type v}
{γ : Type w}
[PseudoEMetricSpace α]
[PseudoEMetricSpace β]
[PseudoEMetricSpace γ]
(h₁ : α ≃ᵢ β)
(h₂ : β ≃ᵢ γ)
(x : α)


/-- If `∀ s ∈ S, n ∣ s` and `S` is not empty, then `IsCyclotomicExtension S A B` implies
`IsCyclotomicExtension (S ∪ {n}) A B`. -/
theorem of_union_of_dvd (h : ∀ s ∈ S, n ∣ s) (hS : S.Nonempty) [H : IsCyclotomicExtension S A B] :
    IsCyclotomicExtension (S ∪ {n}) A B

{n : ℕ+}
{S : Set ℕ+}
(A : Type u)
(B : Type v)
[CommRing A]
[CommRing B]
[Algebra A B]
(h : ∀ s ∈ S, n ∣ s)
(hS : S.Nonempty)
[H : IsCyclotomicExtension S A B]


protected theorem LinearIsometry.isConformalMap (f' : M →ₗᵢ[R] N) :
    IsConformalMap f'.toContinuousLinearMap

{R : Type u_1}
{M : Type u_2}
{N : Type u_3}
[NormedField R]
[SeminormedAddCommGroup M]
[SeminormedAddCommGroup N]
[NormedSpace R M]
[NormedSpace R N]
(f' : M →ₗᵢ[R] N)


protected theorem Set.EquicontinuousWithinAt.continuousWithinAt_of_mem {H : Set <| X → α}
    {S : Set X} {x₀ : X} (h : H.EquicontinuousWithinAt S x₀) {f : X → α} (hf : f ∈ H) :
    ContinuousWithinAt f S x₀

{X : Type u_3}
{α : Type u_7}
[tX : TopologicalSpace X]
[uα : UniformSpace α]
{H : Set (X → α)}
{S : Set X}
{x₀ : X}
(h : H.EquicontinuousWithinAt S x₀)
{f : X → α}
(hf : f ∈ H)


@[simp, mfld_simps]
theorem restr_toPartialEquiv (s : Set X) :
    (e.restr s).toPartialEquiv = e.toPartialEquiv.restr (interior s)

{X : Type u_1}
{Y : Type u_3}
[TopologicalSpace X]
[TopologicalSpace Y]
(e : PartialHomeomorph X Y)
(s : Set X)

(e.restr s).toPartialEquiv = e.restr (interior s)


/-- Conjugation is jointly continuous on `G × G` when both `mul` and `inv` are continuous. -/
@[to_additive
  "Conjugation is jointly continuous on `G × G` when both `add` and `neg` are continuous."]
theorem TopologicalGroup.continuous_conj_prod [ContinuousInv G] :
    Continuous fun g : G × G => g.fst * g.snd * g.fst⁻¹

{G : Type w}
[TopologicalSpace G]
[Neg G]
[Add G]
[ContinuousAdd G]
[ContinuousNeg G]


theorem linearYonedaObjResolution_d_apply {A : Rep k G} (i j : ℕ) (x : (resolution k G).X i ⟶ A) :
    (linearYonedaObjResolution A).d i j x = (resolution k G).d j i ≫ x

(x : (groupCohomology.resolution k G).X i ⟶ A)

((groupCohomology.linearYonedaObjResolution A).d i j) x = (groupCohomology.resolution k G).d j i ≫ x


@[reassoc (attr := simp)]
lemma pushout_inl_inv_inr_of_right_isIso :
    pushout.inl f g ≫ inv (pushout.inr f g) = inv f ≫ g

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

CategoryTheory.Limits.pushout.inl f g ≫ CategoryTheory.inv (CategoryTheory.Limits.pushout.inr f g) =
  CategoryTheory.inv f ≫ g


@[norm_cast] lemma abs_natCast (n : ℕ) : |(n : ℤ)| = n


theorem pair_eq_singleton (a : α) : ({a, a} : Set α) = {a}


theorem integrable_coeFn (f : α →₁[μ] β) : Integrable f μ

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


theorem sum (n : ℕ) : (∑ ν ∈ Finset.range (n + 1), bernsteinPolynomial R n ν) = 1

∑ ν ∈ Finset.range (n + 1), bernsteinPolynomial R n ν = 1


/-- Alternative constructor for `IndObjectPresentation` taking a cocone instead of its defining
    natural transformation. -/
@[simps]
def ofCocone {I : Type v} [SmallCategory I] [IsFiltered I] {F : I ⥤ C}
    (c : Cocone (F ⋙ yoneda)) (hc : IsColimit c) : IndObjectPresentation c.pt

(c : CategoryTheory.Limits.Cocone (F.comp CategoryTheory.yoneda))

(hc : CategoryTheory.Limits.IsColimit c)

(CategoryTheory.Limits.IndObjectPresentation.ofCocone c hc).isColimit = hc


/-- `sectl C Z` is the functor `C ⥤ C × D` given by `X ↦ (X, Z)`. -/
@[simps]
def sectl (C : Type u₁) [Category.{v₁} C] {D : Type u₂} [Category.{v₂} D] (Z : D) : C ⥤ C × D

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

(CategoryTheory.Prod.sectl C Z).obj X = (X, Z)


@[simp]
theorem biproduct.matrix_components (m : ∀ j k, f j ⟶ g k) (j : J) (k : K) :
    biproduct.components (biproduct.matrix m) j k = m j k

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


/-- The type of irreducible closed subsets of a topological space. -/
structure IrreducibleCloseds (α : Type*) [TopologicalSpace α] where
  /-- the carrier set, i.e. the points in this set -/
  carrier : Set α
  is_irreducible' : IsIrreducible carrier
  is_closed' : IsClosed carrier

(self : TopologicalSpace.IrreducibleCloseds α)


/-- The natural functor from `Fintype` to `Profinite`, endowing a finite type with the
discrete topology. -/
@[simps]
def FintypeCat.toProfinite : FintypeCat ⥤ Profinite

∀ {X Y : FintypeCat} (f : X ⟶ Y) (a : ↑X), (FintypeCat.toProfinite.map f) a = f a


/-- If `C` is thin and skeletal, `D ⥤ C` is skeletal.
`CategoryTheory.functor_thin` shows it is thin also.
-/
theorem functor_skeletal [Quiver.IsThin C] (hC : Skeletal C) : Skeletal (D ⥤ C)

{C : Type u₁}
[CategoryTheory.Category.{v₁, u₁} C]
{D : Type u₂}
[CategoryTheory.Category.{v₂, u₂} D]
[Quiver.IsThin C]
(hC : CategoryTheory.Skeletal C)

CategoryTheory.Skeletal (CategoryTheory.Functor D C)


theorem pi_eval_preimage_null {i : ι} {s : Set (α i)} (hs : μ i s = 0) :
    Measure.pi μ (eval i ⁻¹' s) = 0

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

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

(MeasureTheory.Measure.pi μ) (Function.eval i ⁻¹' s) = 0


/--
The category of comonoid objects in a cartesian monoidal category is equivalent
to the category itself, via the forgetful functor.
-/
@[simps] def comonEquiv : Comon_ C ≌ C


theorem infix_insert (a : α) (l : List α) : l <:+: l.insert a

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


theorem linfty_opNNNorm_def (A : Matrix m n α) :
    ‖A‖₊ = (Finset.univ : Finset m).sup fun i : m => ∑ j : n, ‖A i j‖₊

{m : Type u_3}
{n : Type u_4}
{α : Type u_5}
[Fintype m]
[Fintype n]
[SeminormedAddCommGroup α]
(A : Matrix m n α)

‖A‖₊ = Finset.univ.sup fun i => ∑ j : n, ‖A i j‖₊


/-- Twice a base angle of an isosceles triangle with apex at the center of a circle, plus twice
the angle at the apex of a triangle with the same base but apex on the circle, equals `π`. -/
theorem two_zsmul_oangle_center_add_two_zsmul_oangle_eq_pi {s : Sphere P} {p₁ p₂ p₃ : P}
    (hp₁ : p₁ ∈ s) (hp₂ : p₂ ∈ s) (hp₃ : p₃ ∈ s) (hp₂p₁ : p₂ ≠ p₁) (hp₂p₃ : p₂ ≠ p₃)
    (hp₁p₃ : p₁ ≠ p₃) : (2 : ℤ) • ∡ p₃ p₁ s.center + (2 : ℤ) • ∡ p₁ p₂ p₃ = π

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

2 • ∡ p₃ p₁ s.center + 2 • ∡ p₁ p₂ p₃ = ↑π


theorem birthday_moveRight_lt {x : PGame} (i : x.RightMoves) :
    (x.moveRight i).birthday < x.birthday

{x : SetTheory.PGame}
(i : x.RightMoves)


/-- Change a cone on `F : Jᵒᵖ ⥤ Cᵒᵖ` into a cocone on `F.unop : J ⥤ C`. -/
@[simps]
def coconeUnopOfCone (c : Cone F) : Cocone F.unop

{J : Type u₁}
[CategoryTheory.Category.{v₁, u₁} J]
{C : Type u₃}
[CategoryTheory.Category.{v₃, u₃} C]
{F : Jᵒᵖ ⥤ Cᵒᵖ}
(c : CategoryTheory.Limits.Cone F)

(CategoryTheory.Limits.coconeUnopOfCone c).ι = CategoryTheory.NatTrans.unop c.π


theorem restrictScalars.smul_def' {R : Type u₁} {S : Type u₂} [Ring R] [Ring S] (f : R →+* S)
    {M : ModuleCat.{v} S} (r : R) (m : M) :
    -- Porting note: clumsy way to coerce
    let m' : (restrictScalars f).obj M := m
    (r • m' : (restrictScalars f).obj M) = (f r • m : M)

{R : Type u₁}
{S : Type u₂}
[Ring R]
[Ring S]
(f : R →+* S)
{M : ModuleCat S}
(r : R)
(m : ↑M)


lemma count_join [BEq α] (L : List (List α)) (a : α) : L.join.count a = (L.map (count a)).sum

{α : Type u_2}
[BEq α]
(L : List (List α))
(a : α)

List.count a L.join = (List.map (List.count a) L).sum


theorem one_eq_pi_single {i j} : (1 : Matrix n n α) i j = Pi.single (f := fun _ => α) i 1 j

{n : Type u_3}
{α : Type v}
[DecidableEq n]
[Zero α]
[One α]
{i j : n}


@[simp]
theorem cycleFactorsFinset_eq_singleton_self_iff {f : Perm α} :
    f.cycleFactorsFinset = {f} ↔ f.IsCycle

{α : Type u_2}
[DecidableEq α]
[Fintype α]
{f : Equiv.Perm α}


/-- Binary strict **rearrangement inequality**. -/
lemma smul_add_smul_lt_smul_add_smul [PosSMulStrictMono α β]
    {b₁ b₂ : α} {a d : β} (hab : b₁ < b₂) (hcd : a < d) :
    b₁ • d + b₂ • a < b₁ • a + b₂ • d

{α : Type u_1}
{β : Type u_2}
[OrderedRing α]
[OrderedAddCommGroup β]
[Module α β]
[PosSMulStrictMono α β]
{b₁ b₂ : α}
{a d : β}
(hab : b₁ < b₂)
(hcd : a < d)


@[to_additive]
theorem Nonempty.div : s.Nonempty → t.Nonempty → (s / t).Nonempty

s.Nonempty → t.Nonempty → (s - t).Nonempty


lemma IsPullback.unop {sq : Square Cᵒᵖ} (h : sq.IsPullback) : sq.unop.IsPushout

{C : Type u}
[CategoryTheory.Category.{v, u} C]
{sq : CategoryTheory.Square Cᵒᵖ}
(h : sq.IsPullback)


@[simp]
theorem floor_eq_zero_iff : ⌊a⌋ = 0 ↔ a ∈ Ico (0 : α) 1

{α : Type u_2}
[LinearOrderedRing α]
[FloorRing α]
{a : α}


@[instance]
theorem atBot_neBot [Nonempty α] [SemilatticeInf α] : NeBot (atBot : Filter α)

{α : Type u_3}
[Nonempty α]
[SemilatticeInf α]


theorem leftInverse_surjInv (hf : Bijective f) : LeftInverse (surjInv hf.2) f

{α : Sort u}
{β : Sort v}
{f : α → β}
(hf : Function.Bijective f)

Function.LeftInverse (Function.surjInv ⋯) f


/-- For square matrices the usual `continuous_mul` can be used. -/
@[continuity]
theorem Continuous.matrix_mul [Fintype n] [Mul R] [AddCommMonoid R] [ContinuousAdd R]
    [ContinuousMul R] {A : X → Matrix m n R} {B : X → Matrix n p R} (hA : Continuous A)
    (hB : Continuous B) : Continuous fun x => A x * B x

{X : Type u_1}
{m : Type u_4}
{n : Type u_5}
{p : Type u_6}
{R : Type u_8}
[TopologicalSpace X]
[TopologicalSpace R]
[Fintype n]
[Mul R]
[AddCommMonoid R]
[ContinuousAdd R]
[ContinuousMul R]
{A : X → Matrix m n R}
{B : X → Matrix n p R}
(hA : Continuous A)
(hB : Continuous B)


@[simp]
theorem splitUpper_eq_self : I.splitUpper i x = I ↔ x ≤ I.lower i

{ι : Type u_1}
{I : BoxIntegral.Box ι}
{i : ι}
{x : ℝ}


theorem log_nonpos_iff' (hx : 0 ≤ x) : log x ≤ 0 ↔ x ≤ 1


theorem eq_trivialization (e : Trivialization F (π F (Bundle.Trivial B F)))
    [i : MemTrivializationAtlas e] : e = trivialization B F

(e : Trivialization F Bundle.TotalSpace.proj)


@[fun_prop]
theorem continuousOn_const {s : Set α} {c : β} : ContinuousOn (fun _ => c) s

{α : Type u_1}
{β : Type u_2}
[TopologicalSpace α]
[TopologicalSpace β]
{s : Set α}
{c : β}


@[simp, norm_cast]
theorem coe_subset (x y : ZFSet.{u}) : (x : Class.{u}) ⊆ y ↔ x ⊆ y

↑x ⊆ ↑y ↔ x ⊆ y


theorem isOpen_induced_eq {s : Set α} :
    IsOpen[induced f t] s ↔ s ∈ preimage f '' { s | IsOpen s }

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

IsOpen s ↔ s ∈ Set.preimage f '' {s | IsOpen s}


/-- `(⇑)` is an `AddMonoidHom`. -/
@[simps]
def coeFnAddMonoidHom : VectorMeasure α M →+ Set α → M

(self : MeasureTheory.VectorMeasure α M)

∀ (a : Set α), MeasureTheory.VectorMeasure.coeFnAddMonoidHom self a = ↑self a


/--
Assume that we have a diagram of categories
```
C₁ ⥤ D₁
‖     ‖
v     v
C₂ ⥤ D₂
‖     ‖
v     v
C₃ ⥤ D₃
```
with functors `F₁₂ : C₁ ⥤ C₂`, `F₂₃ : C₂ ⥤ C₃` and `F₁₃ : C₁ ⥤ C₃` on the first
column that are related by a natural transformation `α : F₁₃ ⟶ F₁₂ ⋙ F₂₃`
and similarly `β : G₁₂ ⋙ G₂₃ ⟶ G₁₃` on the second column. Assume that we have
natural transformations
`e₁₂ : F₁₂ ⋙ L₂ ⟶ L₁ ⋙ G₁₂` (top square), `e₂₃ : F₂₃ ⋙ L₃ ⟶ L₂ ⋙ G₂₃` (bottom square),
and `e₁₃ : F₁₃ ⋙ L₃ ⟶ L₁ ⋙ G₁₃` (outer square), where the horizontal functors
are denoted `L₁`, `L₂` and `L₃`. Assume that `e₁₃` is determined by the other
natural transformations `α`, `e₂₃`, `e₁₂` and `β`. Then, if all these categories
are equipped with a shift by an additive monoid `A`, and all these functors commute with
these shifts, then the natural transformation `e₁₃` of the outer square commutes with the
shift if all `α`, `e₂₃`, `e₁₂` and `β` do. -/
lemma NatTrans.CommShift.verticalComposition {C₁ C₂ C₃ D₁ D₂ D₃ : Type*}
    [Category C₁] [Category C₂] [Category C₃] [Category D₁] [Category D₂] [Category D₃]
    {F₁₂ : C₁ ⥤ C₂} {F₂₃ : C₂ ⥤ C₃} {F₁₃ : C₁ ⥤ C₃} (α : F₁₃ ⟶ F₁₂ ⋙ F₂₃)
    {G₁₂ : D₁ ⥤ D₂} {G₂₃ : D₂ ⥤ D₃} {G₁₃ : D₁ ⥤ D₃} (β : G₁₂ ⋙ G₂₃ ⟶ G₁₃)
    {L₁ : C₁ ⥤ D₁} {L₂ : C₂ ⥤ D₂} {L₃ : C₃ ⥤ D₃}
    (e₁₂ : F₁₂ ⋙ L₂ ⟶ L₁ ⋙ G₁₂) (e₂₃ : F₂₃ ⋙ L₃ ⟶ L₂ ⋙ G₂₃) (e₁₃ : F₁₃ ⋙ L₃ ⟶ L₁ ⋙ G₁₃)
    (A : Type*) [AddMonoid A] [HasShift C₁ A] [HasShift C₂ A] [HasShift C₃ A]
    [HasShift D₁ A] [HasShift D₂ A] [HasShift D₃ A]
    [F₁₂.CommShift A] [F₂₃.CommShift A] [F₁₃.CommShift A] [CommShift α A]
    [G₁₂.CommShift A] [G₂₃.CommShift A] [G₁₃.CommShift A] [CommShift β A]
    [L₁.CommShift A] [L₂.CommShift A] [L₃.CommShift A]
    [CommShift e₁₂ A] [CommShift e₂₃ A]
    (h₁₃ : e₁₃ = CategoryTheory.whiskerRight α L₃ ≫ (Functor.associator _ _ _).hom ≫
      CategoryTheory.whiskerLeft F₁₂ e₂₃ ≫ (Functor.associator _ _ _).inv ≫
        CategoryTheory.whiskerRight e₁₂ G₂₃ ≫ (Functor.associator _ _ _).hom ≫
          CategoryTheory.whiskerLeft L₁ β) : CommShift e₁₃ A

(h₁₃ :
  e₁₃ =
    CategoryTheory.CategoryStruct.comp (CategoryTheory.whiskerRight α L₃)
      (CategoryTheory.CategoryStruct.comp (F₁₂.associator F₂₃ L₃).hom
        (CategoryTheory.CategoryStruct.comp (CategoryTheory.whiskerLeft F₁₂ e₂₃)
          (CategoryTheory.CategoryStruct.comp (F₁₂.associator L₂ G₂₃).inv
            (CategoryTheory.CategoryStruct.comp (CategoryTheory.whiskerRight e₁₂ G₂₃)
              (CategoryTheory.CategoryStruct.comp (L₁.associator G₁₂ G₂₃).hom (CategoryTheory.whiskerLeft L₁ β)))))))


@[to_additive]
theorem mulIndicator_const_preimage_eq_union (U : Set α) (s : Set M) (a : M) [Decidable (a ∈ s)]
    [Decidable ((1 : M) ∈ s)] : (U.mulIndicator fun _ => a) ⁻¹' s =
      (if a ∈ s then U else ∅) ∪ if (1 : M) ∈ s then Uᶜ else ∅

{α : Type u_1}
{M : Type u_4}
[One M]
(U : Set α)
(s : Set M)
(a : M)
[Decidable (a ∈ s)]
[Decidable (1 ∈ s)]

(U.mulIndicator fun x => a) ⁻¹' s = (if a ∈ s then U else ∅) ∪ if 1 ∈ s then Uᶜ else ∅


theorem prod_single [CommSemiring k] [AddCommMonoid G] {s : Finset ι} {a : ι → G} {b : ι → k} :
    (∏ i ∈ s, single (a i) (b i)) = single (∑ i ∈ s, a i) (∏ i ∈ s, b i)

{k : Type u₁}
{G : Type u₂}
{ι : Type ui}
[CommSemiring k]
[AddCommMonoid G]
{s : Finset ι}
{a : ι → G}
{b : ι → k}

∏ i ∈ s, AddMonoidAlgebra.single (a i) (b i) = AddMonoidAlgebra.single (∑ i ∈ s, a i) (∏ i ∈ s, b i)


theorem image_sigmaMk_preimage_sigmaMap {β : ι' → Type*} {f : ι → ι'} (hf : Function.Injective f)
    (g : ∀ i, α i → β (f i)) (i : ι) (s : Set (β (f i))) :
    Sigma.mk i '' (g i ⁻¹' s) = Sigma.map f g ⁻¹' (Sigma.mk (f i) '' s)

{ι : Type u_1}
{ι' : Type u_2}
{α : ι → Type u_3}
{β : ι' → Type u_5}
{f : ι → ι'}
(hf : Function.Injective f)
(g : (i : ι) → α i → β (f i))
(i : ι)
(s : Set (β (f i)))


theorem mem_supported : p ∈ supported R s ↔ ↑p.vars ⊆ s

{σ : Type u_1}
{R : Type u}
[CommSemiring R]
{p : MvPolynomial σ R}
{s : Set σ}

p ∈ MvPolynomial.supported R s ↔ ↑p.vars ⊆ s


theorem tendsto_atTop_zero_of_tsum_ne_top {f : ℕ → ℝ≥0∞} (hf : ∑' x, f x ≠ ∞) :
    Tendsto f atTop (𝓝 0)

{f : ℕ → ℝ≥0∞}
(hf : ∑' (x : ℕ), f x ≠ ⊤)


/-- The alternating coface map complex, as a functor -/
@[simps]
def alternatingCofaceMapComplex : CosimplicialObject C ⥤ CochainComplex C ℕ

(X : CategoryTheory.CosimplicialObject C)

(AlgebraicTopology.alternatingCofaceMapComplex C).obj X = AlgebraicTopology.AlternatingCofaceMapComplex.obj X


@[to_additive exists_nhds_half_neg]
theorem exists_nhds_split_inv {s : Set G} (hs : s ∈ 𝓝 (1 : G)) :
    ∃ V ∈ 𝓝 (1 : G), ∀ v ∈ V, ∀ w ∈ V, v / w ∈ s

{G : Type w}
[TopologicalSpace G]
[Group G]
[TopologicalGroup G]
{s : Set G}
(hs : s ∈ 𝓝 1)


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


theorem Functor.Final.exists_coeq [IsFilteredOrEmpty C] [Final F] {d : D} {c : C}
    (s s' : d ⟶ F.obj c) : ∃ (c' : C) (t : c ⟶ c'), s ≫ F.map t = s' ≫ F.map t

{C : Type v₁}
[CategoryTheory.Category.{v₁, v₁} C]
{D : Type u₂}
[CategoryTheory.Category.{v₁, u₂} D]
(F : CategoryTheory.Functor C D)
[CategoryTheory.IsFilteredOrEmpty C]
[F.Final]
{d : D}
{c : C}
(s s' : d ⟶ F.obj c)

∃ c' t, CategoryTheory.CategoryStruct.comp s (F.map t) = CategoryTheory.CategoryStruct.comp s' (F.map t)


/-- If `x ^ n = 1`, then `x ^ m` is the same as `x ^ (m % n)` -/
@[to_additive nsmul_eq_mod_nsmul "If `n • x = 0`, then `m • x` is the same as `(m % n) • x`"]
lemma pow_eq_pow_mod (m : ℕ) (ha : a ^ n = 1) : a ^ m = a ^ (m % n)

{M : Type u_4}
[AddMonoid M]
{a : M}
{n : ℕ}
(m : ℕ)
(ha : n • a = 0)


theorem bounded_ge_Ioc [Preorder α] (a b : α) : Bounded (· ≥ ·) (Ioc a b)

Set.Bounded (fun x x_1 => x ≥ x_1) (Set.Ioc a b)


theorem disjoint_left_comm : Disjoint a (b ⊓ c) ↔ Disjoint b (a ⊓ c)

{α : Type u_1}
[SemilatticeInf α]
[OrderBot α]
{a b c : α}


theorem CountablySeparated.subtype_iff [MeasurableSpace α] {s : Set α} :
    CountablySeparated s ↔ HasCountableSeparatingOn α MeasurableSet s

{α : Type u_1}
[MeasurableSpace α]
{s : Set α}

MeasurableSpace.CountablySeparated ↑s ↔ HasCountableSeparatingOn α MeasurableSet s


theorem nhdsWithin_coe_image (s : Set X) (x : X) :
    𝓝[(↑) '' s] (x : OnePoint X) = map (↑) (𝓝[s] x)

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

𝓝[OnePoint.some '' s] ↑x = Filter.map OnePoint.some (𝓝[s] x)


/-- A more general version of `finprod_mem_union'` that requires `s ∩ mulSupport f` and
`t ∩ mulSupport f` rather than `s` and `t` to be disjoint -/
@[to_additive
      "A more general version of `finsum_mem_union'` that requires `s ∩ support f` and
      `t ∩ support f` rather than `s` and `t` to be disjoint"]
theorem finprod_mem_union'' (hst : Disjoint (s ∩ mulSupport f) (t ∩ mulSupport f))
    (hs : (s ∩ mulSupport f).Finite) (ht : (t ∩ mulSupport f).Finite) :
    ∏ᶠ i ∈ s ∪ t, f i = (∏ᶠ i ∈ s, f i) * ∏ᶠ i ∈ t, f i

(hst : Disjoint (s ∩ Function.support f) (t ∩ Function.support f))

∑ᶠ (i : α) (_ : i ∈ s ∪ t), f i = ∑ᶠ (i : α) (_ : i ∈ s), f i + ∑ᶠ (i : α) (_ : i ∈ t), f i


theorem restrict_iUnion_apply_eq_iSup [Countable ι] {s : ι → Set α} (hd : Directed (· ⊆ ·) s)
    {t : Set α} (ht : MeasurableSet t) : μ.restrict (⋃ i, s i) t = ⨆ i, μ.restrict (s i) t

(hd : Directed (fun x x_1 => x ⊆ x_1) s)

(μ.restrict (⋃ i, s i)) t = ⨆ i, (μ.restrict (s i)) t


theorem ball_mem_nhds (x : α) {ε : ℝ≥0∞} (ε0 : 0 < ε) : ball x ε ∈ 𝓝 x

{α : Type u}
[PseudoEMetricSpace α]
(x : α)
{ε : ℝ≥0∞}
(ε0 : 0 < ε)


theorem induction_on_adjoin_finset (S : Finset E) (P : IntermediateField F E → Prop) (base : P ⊥)
    (ih : ∀ (K : IntermediateField F E), ∀ x ∈ S, P K → P (K⟮x⟯.restrictScalars F)) :
    P (adjoin F S)

(ih : ∀ (K : IntermediateField F E), ∀ x ∈ S, P K → P (IntermediateField.restrictScalars F (↥K)⟮x⟯))


@[simp]
theorem tensor_hom {W X Y Z : Action V G} (f : W ⟶ X) (g : Y ⟶ Z) : (f ⊗ g).hom = f.hom ⊗ g.hom

{V : Type (u + 1)}
[CategoryTheory.LargeCategory V]
{G : MonCat}
[CategoryTheory.MonoidalCategory V]
{W X Y Z : Action V G}
(f : W ⟶ X)
(g : Y ⟶ Z)

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


theorem proj_surjOn_baseSet [Nonempty F] : Set.SurjOn proj e.source e.baseSet

{B : Type u_2}
{F : Type u_3}
{Z : Type u_5}
[TopologicalSpace B]
[TopologicalSpace F]
{proj : Z → B}
(e : Pretrivialization F proj)
[Nonempty F]


@[simp] theorem ofNat_den : (OfNat.ofNat n : Rat).den = 1


theorem Disjoint.le_of_codisjoint (hab : Disjoint a b) (hbc : Codisjoint b c) : a ≤ c

{α : Type u_1}
[DistribLattice α]
[BoundedOrder α]
{a b c : α}
(hab : Disjoint a b)
(hbc : Codisjoint b c)


lemma exact₁ (S : ComposableArrows C 1) : S.Exact

(S : CategoryTheory.ComposableArrows C 1)


/-- If `K / E / F` is a field extension tower, such that `E / F` is algebraic and `K / E`
is separable, then `E` adjoin `separableClosure F K` is equal to `K`. It is a special case of
`separableClosure.adjoin_eq_of_isAlgebraic`, and is an intermediate result used to prove it. -/
lemma adjoin_eq_of_isAlgebraic_of_isSeparable [Algebra.IsAlgebraic F E]
    [Algebra.IsSeparable E K] : adjoin E (separableClosure F K : Set K) = ⊤

{F : Type u}
{E : Type v}
[Field F]
[Field E]
[Algebra F E]
(K : Type w)
[Field K]
[Algebra F K]
[Algebra E K]
[IsScalarTower F E K]
[Algebra.IsAlgebraic F E]
[Algebra.IsSeparable E K]

IntermediateField.adjoin E ↑(separableClosure F K) = ⊤


theorem bddAbove_iff_small {s : Set Ordinal.{u}} : BddAbove s ↔ Small.{u} s


@[simp]
theorem whiskerLeft_twice (F : B ⥤ C) (G : C ⥤ D) {H K : D ⥤ E} (α : H ⟶ K) :
    whiskerLeft F (whiskerLeft G α) = whiskerLeft (F ⋙ G) α

{C : Type u₁}
[CategoryTheory.Category.{v₁, u₁} C]
{D : Type u₂}
[CategoryTheory.Category.{v₂, u₂} D]
{E : Type u₃}
[CategoryTheory.Category.{v₃, u₃} E]
{B : Type u₄}
[CategoryTheory.Category.{v₄, u₄} B]
(F : CategoryTheory.Functor B C)
(G : CategoryTheory.Functor C D)
{H K : CategoryTheory.Functor D E}
(α : H ⟶ K)

CategoryTheory.whiskerLeft F (CategoryTheory.whiskerLeft G α) = CategoryTheory.whiskerLeft (F.comp G) α


/-- A set in a σ-finite space has zero measure if and only if its intersection with
all members of the countable family of finite measure spanning sets has zero measure. -/
theorem forall_measure_inter_spanningSets_eq_zero [MeasurableSpace α] {μ : Measure α}
    [SigmaFinite μ] (s : Set α) : (∀ n, μ (s ∩ spanningSets μ n) = 0) ↔ μ s = 0

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

(∀ (n : ℕ), μ (s ∩ MeasureTheory.spanningSets μ n) = 0) ↔ μ s = 0


@[fun_prop]
theorem IsBoundedLinearMap.differentiableOn (h : IsBoundedLinearMap 𝕜 f) : DifferentiableOn 𝕜 f s

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{F : Type u_3}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{f : E → F}
{s : Set E}
(h : IsBoundedLinearMap 𝕜 f)


theorem natDegree_sub_eq_left_of_natDegree_lt (h : natDegree q < natDegree p) :
    natDegree (p - q) = natDegree p

{R : Type u}
[Ring R]
{p q : R[X]}
(h : q.natDegree < p.natDegree)


theorem sigma_zero_apply (n : ℕ) : σ 0 n = (divisors n).card

(ArithmeticFunction.sigma 0) n = n.divisors.card


theorem num_dvd (a) {b : ℤ} (b0 : b ≠ 0) : (a /. b).num ∣ a


theorem comp_right_triangle_aux (adj₁ : f₁ ⊣ g₁) (adj₂ : f₂ ⊣ g₂) :
    rightZigzag (compUnit adj₁ adj₂) (compCounit adj₁ adj₂) = (ρ_ _).hom ≫ (λ_ _).inv

(adj₁ : CategoryTheory.Bicategory.Adjunction f₁ g₁)

(adj₂ : CategoryTheory.Bicategory.Adjunction f₂ g₂)

CategoryTheory.Bicategory.rightZigzag (adj₁.compUnit adj₂) (adj₁.compCounit adj₂) =
  CategoryTheory.CategoryStruct.comp
    (CategoryTheory.Bicategory.rightUnitor (CategoryTheory.CategoryStruct.comp g₂ g₁)).hom
    (CategoryTheory.Bicategory.leftUnitor (CategoryTheory.CategoryStruct.comp g₂ g₁)).inv


lemma Indep.insert_indep_iff_of_not_mem (hI : M.Indep I) (heI : e ∉ I) :
    M.Indep (insert e I) ↔ e ∈ M.E \ M.closure I

{α : Type u_2}
{M : Matroid α}
{e : α}
{I : Set α}
(hI : M.Indep I)
(heI : e ∉ I)


theorem int_cyclotomic_unique {n : ℕ} {P : ℤ[X]} (h : map (Int.castRingHom ℂ) P = cyclotomic' n ℂ) :
    P = cyclotomic n ℤ

(h : Polynomial.map (Int.castRingHom ℂ) P = Polynomial.cyclotomic' n ℂ)


lemma apply_single [AddCommMonoid N] [AddCommMonoid P]
    {F : Type*} [FunLike F N P] [AddMonoidHomClass F N P] (e : F)
    (a : α) (n : N) (b : α) :
    e ((single a n) b) = single a (e n) b

{α : Type u_1}
{N : Type u_7}
{P : Type u_8}
[AddCommMonoid N]
[AddCommMonoid P]
{F : Type u_13}
[FunLike F N P]
[AddMonoidHomClass F N P]
(e : F)
(a : α)
(n : N)
(b : α)

e ((Finsupp.single a n) b) = (Finsupp.single a (e n)) b


@[simp]
theorem bddBelow_upperClosure : BddBelow (upperClosure s : Set α) ↔ BddBelow s


/-- The colimit cocone for `F : J ⥤ C` lifts to a cocone in `Over (colimit F)` with cone point
    `𝟙 (colimit F)`. This is automatically also a colimit cocone. -/
@[simps]
noncomputable def colimit.toOver (F : J ⥤ C) [HasColimit F] :
    Cocone (colimit.toCostructuredArrow F ⋙ CostructuredArrow.toOver _ _)

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

(CategoryTheory.Limits.colimit.toOver F).pt =
  CategoryTheory.Over.mk (CategoryTheory.CategoryStruct.id (CategoryTheory.Limits.colimit F))


theorem continuousWithinAt_of_not_mem_closure {f : α → β} {s : Set α} {x : α} (hx : x ∉ closure s) :
    ContinuousWithinAt f s x

{α : Type u_1}
{β : Type u_2}
[TopologicalSpace α]
[TopologicalSpace β]
{f : α → β}
{s : Set α}
{x : α}
(hx : x ∉ closure s)


@[simp]
theorem toList_nil : toList (nil : WSeq α) = Computation.pure []

Stream'.WSeq.nil.toList = Computation.pure []


@[simp]
theorem none_toOption [Decidable (@none α).Dom] : (none : Part α).toOption = Option.none

{α : Type u_1}
[Decidable Part.none.Dom]


@[rclike_simps, norm_cast]
theorem ofReal_inv (r : ℝ) : ((r⁻¹ : ℝ) : K) = (r : K)⁻¹

↑r⁻¹ = (↑r)⁻¹


@[simp]
theorem supIrred_ofDual {a : αᵒᵈ} : SupIrred (ofDual a) ↔ InfIrred a

{α : Type u_2}
[SemilatticeSup α]
{a : αᵒᵈ}

SupIrred (OrderDual.ofDual a) ↔ InfIrred a


/-- A binary bicone for a pair of objects `P Q : C` consists of the cone point `X`,
maps from `X` to both `P` and `Q`, and maps from both `P` and `Q` to `X`,
so that `inl ≫ fst = 𝟙 P`, `inl ≫ snd = 0`, `inr ≫ fst = 0`, and `inr ≫ snd = 𝟙 Q`
-/
-- @[nolint has_nonempty_instance] Porting note (#5171): removed
structure BinaryBicone (P Q : C) where
  pt : C
  fst : pt ⟶ P
  snd : pt ⟶ Q
  inl : P ⟶ pt
  inr : Q ⟶ pt
  inl_fst : inl ≫ fst = 𝟙 P := by aesop
  inl_snd : inl ≫ snd = 0 := by aesop
  inr_fst : inr ≫ fst = 0 := by aesop
  inr_snd : inr ≫ snd = 𝟙 Q := by aesop

(self : CategoryTheory.Limits.BinaryBicone P Q)


theorem add_le_iff_le_sub (a b c : Int) : a + b ≤ c ↔ a ≤ c - b


theorem essSup_const_bot : essSup (fun _ : α => (⊥ : β)) μ = (⊥ : β)

{α : Type u_1}
{β : Type u_2}
{m : MeasurableSpace α}
{μ : MeasureTheory.Measure α}
[CompleteLattice β]


/-- The equivalence, given by swapping factors, between `C × D` and `D × C`.
-/
@[simps!]
def braiding : C × D ≌ D × C

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

(CategoryTheory.Prod.braiding C D).unitIso.inv.app X =
  (CategoryTheory.CategoryStruct.id X.1, CategoryTheory.CategoryStruct.id X.2)


@[simp]
theorem one_eq_top : (1 : Ideal R) = ⊤


theorem inv_adjugate (A : Matrix n n α) (h : IsUnit A.det) : (adjugate A)⁻¹ = h.unit⁻¹ • A

{n : Type u'}
{α : Type v}
[Fintype n]
[DecidableEq n]
[CommRing α]
(A : Matrix n n α)
(h : IsUnit A.det)


@[simps]
def Triangle.isoMk (A B : Triangle C)
    (iso₁ : A.obj₁ ≅ B.obj₁) (iso₂ : A.obj₂ ≅ B.obj₂) (iso₃ : A.obj₃ ≅ B.obj₃)
    (comm₁ : A.mor₁ ≫ iso₂.hom = iso₁.hom ≫ B.mor₁ := by aesop_cat)
    (comm₂ : A.mor₂ ≫ iso₃.hom = iso₂.hom ≫ B.mor₂ := by aesop_cat)
    (comm₃ : A.mor₃ ≫ iso₁.hom⟦1⟧' = iso₃.hom ≫ B.mor₃ := by aesop_cat) : A ≅ B

(A B : CategoryTheory.Pretriangulated.Triangle C)

(comm₃ : A.mor₃ ≫ (CategoryTheory.shiftFunctor C 1).map iso₁.hom = iso₃.hom ≫ B.mor₃ := by aesop_cat)

(A.isoMk B iso₁ iso₂ iso₃ comm₁ comm₂ comm₃).hom = A.homMk B iso₁.hom iso₂.hom iso₃.hom comm₁ comm₂ comm₃


@[simp]
theorem to_linearEquiv_mk (f : L₁ →ₗ⁅R⁆ L₂) (g h₁ h₂) :
    (mk f g h₁ h₂ : L₁ ≃ₗ[R] L₂) =
      { f with
        invFun := g
        left_inv := h₁
        right_inv := h₂ }

(h₁ : Function.LeftInverse g (↑f).toFun)

(h₂ : Function.RightInverse g (↑f).toFun)

{ toLieHom := f, invFun := g, left_inv := h₁, right_inv := h₂ }.toLinearEquiv =
  { toLinearMap := ↑f, invFun := g, left_inv := h₁, right_inv := h₂ }


theorem Prime.isPrimePow {p : R} (hp : Prime p) : IsPrimePow p

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


theorem pairwise_disjoint_mono [SemilatticeInf α] [OrderBot α] (hs : Pairwise (Disjoint on f))
    (h : g ≤ f) : Pairwise (Disjoint on g)

{α : Type u_1}
{ι : Type u_4}
{f g : ι → α}
[SemilatticeInf α]
[OrderBot α]
(hs : Pairwise (Disjoint on f))
(h : g ≤ f)


theorem iSup_lt {ι} {f : ι → Cardinal} {c : Cardinal} (hι : #ι < c.ord.cof) :
    (∀ i, f i < c) → iSup f < c

{ι : Type u_2}
{f : ι → Cardinal.{u_2}}
{c : Cardinal.{u_2}}
(hι : #ι < c.ord.cof)


@[simp]
theorem map_comp_rTensor (f : M →ₗ[R] P) (g : N →ₗ[R] Q) (f' : S →ₗ[R] M) :
    (map f g).comp (f'.rTensor _) = map (f.comp f') g

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

TensorProduct.map f g ∘ₗ LinearMap.rTensor N f' = TensorProduct.map (f ∘ₗ f') g


/-- Rewrite for `InterpStrip` when `0 < sSupNormIm f 0` and `0 < sSupNormIm f 1`. -/
lemma interpStrip_eq_of_pos (z : ℂ) (h0 : 0 < sSupNormIm f 0) (h1 : 0 < sSupNormIm f 1) :
    interpStrip f z = (sSupNormIm f 0) ^ (1 - z) * (sSupNormIm f 1) ^ z

(h0 : 0 < Complex.HadamardThreeLines.sSupNormIm f 0)

(h1 : 0 < Complex.HadamardThreeLines.sSupNormIm f 1)

Complex.HadamardThreeLines.interpStrip f z =
  ↑(Complex.HadamardThreeLines.sSupNormIm f 0) ^ (1 - z) * ↑(Complex.HadamardThreeLines.sSupNormIm f 1) ^ z


lemma not_even_two_mul_add_one (n : ℤ) : ¬ Even (2 * n + 1)


@[simp]
theorem boxProd_adj {x y : α × β} :
    (G □ H).Adj x y ↔ G.Adj x.1 y.1 ∧ x.2 = y.2 ∨ H.Adj x.2 y.2 ∧ x.1 = y.1

{α : Type u_1}
{β : Type u_2}
{G : SimpleGraph α}
{H : SimpleGraph β}
{x y : α × β}


@[simp] theorem singleton_perm {a : α} {l : List α} : [a] ~ l ↔ [a] = l


@[simp] theorem coe_toEquiv (h : α ≃ᵢ β) : ⇑h.toEquiv = h

{α : Type u}
{β : Type v}
[PseudoEMetricSpace α]
[PseudoEMetricSpace β]
(h : α ≃ᵢ β)


theorem Surjective.image_preimage (hf : Surjective f) (s : Set β) : f '' (f ⁻¹' s) = s

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


lemma smash_succ_natAdd {p q : RelSeries r} (h : p.last = q.head) (i : Fin q.length) :
    smash p q h (i.natAdd p.length).succ = q i.succ

{α : Type u_1}
{r : Rel α α}
{p q : RelSeries r}
(h : p.last = q.head)
(i : Fin q.length)

(p.smash q h).toFun (Fin.natAdd p.length i).succ = q.toFun i.succ


theorem multiset_sum_sum [Zero M] [AddCommMonoid N] {f : α →₀ M} {h : α → M → Multiset N} :
    Multiset.sum (f.sum h) = f.sum fun a b => Multiset.sum (h a b)

{α : Type u_1}
{M : Type u_8}
{N : Type u_10}
[Zero M]
[AddCommMonoid N]
{f : α →₀ M}
{h : α → M → Multiset N}

(f.sum h).sum = f.sum fun a b => (h a b).sum


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

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


@[to_additive (attr := simp, norm_cast)]
theorem coe_sInf (S : Set (Submonoid M)) : ((sInf S : Submonoid M) : Set M) = ⋂ s ∈ S, ↑s

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


/-- A monoid object as a module over itself. -/
@[simps]
def regular : Mod_ A

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


@[simp] lemma comap_nhdsWithin_range {α β} [TopologicalSpace β] (f : α → β) (y : β) :
    comap f (𝓝[range f] y) = comap f (𝓝 y)

{α : Type u_5}
{β : Type u_6}
[TopologicalSpace β]
(f : α → β)
(y : β)

Filter.comap f (𝓝[Set.range f] y) = Filter.comap f (𝓝 y)


@[to_additive]
theorem closure_mul_le (S T : Set M) : closure (S * T) ≤ closure S ⊔ closure T

{M : Type u_3}
[AddMonoid M]
(S T : Set M)

AddSubmonoid.closure (S + T) ≤ AddSubmonoid.closure S ⊔ AddSubmonoid.closure T


@[to_additive]
theorem inv_mul_of_eq {a : α} (h : ↑u = a) : ↑u⁻¹ * a = 1

{α : Type u}
[AddMonoid α]
{u : AddUnits α}
{a : α}
(h : ↑u = a)


lemma natDegree_norm_ne_one [IsDomain R] (x : W.CoordinateRing) :
    (Algebra.norm R[X] x).natDegree ≠ 1

{R : Type u}
[CommRing R]
{W : WeierstrassCurve.Affine R}
[IsDomain R]
(x : W.CoordinateRing)


@[simp]
theorem ofNat'_zero : Num.ofNat' 0 = 0


@[aesop unsafe 5% (rule_sets := [Matroid])]
private theorem diff_subset_ground (hX : X ⊆ M.E) : X \ Y ⊆ M.E

{α : Type u_1}
{M : Matroid α}
{X Y : Set α}
(hX : X ⊆ M.E)


@[simp]
theorem mem_toNonUnitalSubsemiring {S : NonUnitalSubalgebra R A} {x} :
    x ∈ S.toNonUnitalSubsemiring ↔ x ∈ S

{R : Type u}
{A : Type v}
[CommSemiring R]
[NonUnitalNonAssocSemiring A]
[Module R A]
{S : NonUnitalSubalgebra R A}
{x : A}


@[mono]
theorem map_mono : Monotone (map m)


theorem unitsSMul_cancels_iff (u : ℤˣ) (w : NormalWord d) :
    Cancels (-u) (unitsSMul φ u w) ↔ ¬ Cancels u w

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

HNNExtension.NormalWord.Cancels (-u) (HNNExtension.NormalWord.unitsSMul φ u w) ↔ ¬HNNExtension.NormalWord.Cancels u w


lemma AnalyticWithinAt.mono {f : E → F} {s t : Set E} {x : E} (h : AnalyticWithinAt 𝕜 f t x)
    (hs : s ⊆ t) : AnalyticWithinAt 𝕜 f s x

{𝕜 : Type u_2}
[NontriviallyNormedField 𝕜]
{E : Type u_3}
{F : Type u_4}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{f : E → F}
{s t : Set E}
{x : E}
(h : AnalyticWithinAt 𝕜 f t x)
(hs : s ⊆ t)


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


theorem invFunOn_mem (h : ∃ a ∈ s, f a = b) : invFunOn f s b ∈ s

{α : Type u_1}
{β : Type u_2}
[Nonempty α]
{s : Set α}
{f : α → β}
{b : β}
(h : ∃ a ∈ s, f a = b)


theorem map_map_permutationsAux2 {α'} (g : α → α') (t : α) (ts ys : List α) :
    map (map g) (permutationsAux2 t ts [] ys id).2 =
      (permutationsAux2 (g t) (map g ts) [] (map g ys) id).2

{α : Type u_1}
{α' : Type u_3}
(g : α → α')
(t : α)
(ts ys : List α)

List.map (List.map g) (List.permutationsAux2 t ts [] ys id).2 =
  (List.permutationsAux2 (g t) (List.map g ts) [] (List.map g ys) id).2


@[simp]
theorem kstar_mul_kstar (a : α) : a∗ * a∗ = a∗

{α : Type u_1}
[KleeneAlgebra α]
(a : α)


theorem mk_eq_bot_iff_zero {f : X ⟶ Y} [Mono f] : Subobject.mk f = ⊥ ↔ f = 0

CategoryTheory.Subobject.mk f = ⊥ ↔ f = 0


@[to_additive]
theorem lt_mul_of_lt_of_one_lt [CovariantClass α α (· * ·) (· < ·)] {a b c : α} (hbc : b < c)
    (ha : 1 < a) :
    b < c * a

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


@[simp]
theorem mem_singleton {a b : α} : b ∈ ({a} : Finset α) ↔ b = a


/-- Characterization of continuous functions (at a point) into a fiber bundle. -/
theorem continuousAt_totalSpace (f : X → TotalSpace F E) {x₀ : X} :
    ContinuousAt f x₀ ↔
      ContinuousAt (fun x => (f x).proj) x₀ ∧
        ContinuousAt (fun x => ((trivializationAt F E (f x₀).proj) (f x)).2) x₀

[TopologicalSpace (Bundle.TotalSpace F E)]

ContinuousAt f x₀ ↔
  ContinuousAt (fun x => (f x).proj) x₀ ∧ ContinuousAt (fun x => (↑(trivializationAt F E (f x₀).proj) (f x)).2) x₀


lemma comapRight_compProd_id_prod {δ : Type*} {mδ : MeasurableSpace δ}
    (κ : Kernel α β) [IsSFiniteKernel κ] (η : Kernel (α × β) γ) [IsSFiniteKernel η]
    {f : δ → γ} (hf : MeasurableEmbedding f) :
    comapRight (κ ⊗ₖ η) (MeasurableEmbedding.id.prod_mk hf) = κ ⊗ₖ (comapRight η hf)

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

(κ.compProd η).comapRight ⋯ = κ.compProd (η.comapRight hf)


/-- The `vectorSpan` of two points is the span of their difference (reversed). -/
theorem vectorSpan_pair_rev (p₁ p₂ : P) : vectorSpan k ({p₁, p₂} : Set P) = k ∙ p₂ -ᵥ p₁

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

vectorSpan k {p₁, p₂} = Submodule.span k {p₂ -ᵥ p₁}


/-- The canonical isomorphism relating `(Cospan f g).op` and `Span f.op g.op` -/
@[simps!]
def opCospan {X Y Z : C} (f : X ⟶ Z) (g : Y ⟶ Z) :
    (cospan f g).op ≅ walkingCospanOpEquiv.functor ⋙ span f.op g.op

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

∀ (X_1 : CategoryTheory.Limits.WalkingCospanᵒᵖ),
  (CategoryTheory.Limits.opCospan f g).inv.app X_1 =
    (Option.rec (CategoryTheory.Iso.refl (Opposite.op Z))
        (fun val =>
          CategoryTheory.Limits.WalkingPair.rec (CategoryTheory.Iso.refl (Opposite.op X))
            (CategoryTheory.Iso.refl (Opposite.op Y)) val)
        (Opposite.unop X_1)).hom


/-- A `Prop`-valued mixin for power-associative multiplication in the non-unital setting. -/
class PNatPowAssoc (M : Type*) [Mul M] [Pow M ℕ+] : Prop where
  /-- Multiplication is power-associative. -/
  protected ppow_add : ∀ (k n : ℕ+) (x : M), x ^ (k + n) = x ^ k * x ^ n
  /-- Exponent one is identity. -/
  protected ppow_one : ∀ (x : M), x ^ (1 : ℕ+) = x

{M : Type u_2}
[Mul M]
[Pow M ℕ+]
[self : PNatPowAssoc M]
(x : M)


theorem inf_right_comm (a b c : α) : a ⊓ b ⊓ c = a ⊓ c ⊓ b

{α : Type u}
[SemilatticeInf α]
(a b c : α)


theorem tmul_ite (x₁ : M) (x₂ : N) (P : Prop) [Decidable P] :
    (x₁ ⊗ₜ[R] if P then x₂ else 0) = if P then x₁ ⊗ₜ x₂ else 0

{R : Type u_1}
[CommSemiring R]
{M : Type u_4}
{N : Type u_5}
[AddCommMonoid M]
[AddCommMonoid N]
[Module R M]
[Module R N]
(x₁ : M)
(x₂ : N)
(P : Prop)
[Decidable P]

(x₁ ⊗ₜ[R] if P then x₂ else 0) = if P then x₁ ⊗ₜ[R] x₂ else 0


theorem bliminf_sup_le_and : bliminf u f p ⊔ bliminf u f q ≤ bliminf u f fun x => p x ∧ q x

{α : Type u_1}
{β : Type u_2}
[CompleteLattice α]
{f : Filter β}
{p q : β → Prop}
{u : β → α}

Filter.bliminf u f p ⊔ Filter.bliminf u f q ≤ Filter.bliminf u f fun x => p x ∧ q x


theorem exists_fixed : ∃ f : v.FunSpace, f.next = f

{E : Type u_1}
[NormedAddCommGroup E]
[NormedSpace ℝ E]
(v : PicardLindelof E)
[CompleteSpace E]


@[simp]
theorem extend_apply (f : α ↪ δ) (g : α →ᵇ β) (h : δ →ᵇ β) (x : α) : extend f g h (f x) = g x

{α : Type u}
{β : Type v}
[TopologicalSpace α]
[PseudoMetricSpace β]
{δ : Type u_2}
[TopologicalSpace δ]
[DiscreteTopology δ]
(f : α ↪ δ)
(g : BoundedContinuousFunction α β)
(h : BoundedContinuousFunction δ β)
(x : α)

(BoundedContinuousFunction.extend f g h) (f x) = g x


lemma measurable_of_measurable_exp {α : Type*} {_ : MeasurableSpace α} {f : α → ℝ}
    (hf : Measurable (fun x ↦ exp (f x))) :
    Measurable f

∀ {x : MeasurableSpace α} {f : α → ℝ}, (Measurable fun x => Real.exp (f x)) → Measurable f


theorem cast_cast_zmod_of_le {m n : ℕ} [hm : NeZero m] (h : m ≤ n) (a : ZMod m) :
    (cast (cast a : ZMod n) : ZMod m) = a


theorem Monic.of_mul_monic_left (hp : p.Monic) (hpq : (p * q).Monic) : q.Monic

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


/-- To show that a statement `P` holds for all open subsets of all schemes, it suffices to show that
1. In any scheme `X`, if `P` holds for an open cover of `U`, then `P` holds for `U`.
2. For an open immerison `f : X ⟶ Y`, if `P` holds for the entire space of `X`, then `P` holds for
  the image of `f`.
3. `P` holds for the entire space of an affine scheme.
-/
@[elab_as_elim]
theorem reduce_to_affine_global (P : ∀ {X : Scheme} (_ : X.Opens), Prop)
    {X : Scheme} (U : X.Opens)
    (h₁ : ∀ (X : Scheme) (U : X.Opens),
      (∀ x : U, ∃ (V : _) (_ : x.1 ∈ V) (_ : V ⟶ U), P V) → P U)
    (h₂ : ∀ (X Y) (f : X ⟶ Y) [hf : IsOpenImmersion f],
      ∃ (U : Set X) (V : Set Y) (hU : U = ⊤) (hV : V = Set.range f.1.base),
        P ⟨U, hU.symm ▸ isOpen_univ⟩ → P ⟨V, hV.symm ▸ hf.base_open.isOpen_range⟩)
    (h₃ : ∀ R : CommRingCat, P (X := Spec R) ⊤) : P U

(P : {X : AlgebraicGeometry.Scheme} → X.Opens → Prop)

(h₁ : ∀ (X : AlgebraicGeometry.Scheme) (U : X.Opens), (∀ (x : ↥U), ∃ V, ∃ (_ : ↑x ∈ V), ∃ x, P V) → P U)

(h₂ :
  ∀ (X Y : AlgebraicGeometry.Scheme) (f : X ⟶ Y) [hf : AlgebraicGeometry.IsOpenImmersion f],
    ∃ U V,
      ∃ (hU : U = ⊤) (hV : V = Set.range ⇑f.val.base),
        P { carrier := U, is_open' := ⋯ } → P { carrier := V, is_open' := ⋯ })


lemma minpolyDiv_eval_eq_zero_of_ne_of_aeval_eq_zero [IsDomain S]
    {y} (hxy : y ≠ x) (hy : aeval y (minpoly R x) = 0) : (minpolyDiv R x).eval y = 0

(hy : (Polynomial.aeval y) (minpoly R x) = 0)


theorem concat_get_prefix {x y : List α} (h : x <+: y) (hl : x.length < y.length) :
    x ++ [y.get ⟨x.length, hl⟩] <+: y

{α : Type u_1}
{x y : List α}
(h : x <+: y)
(hl : x.length < y.length)


/-- The Dold-Kan equivalence `Karoubi (SimplicialObject C) ≌ Karoubi (ChainComplex C ℕ)`
for additive categories. -/
@[simps]
def equivalence : Karoubi (SimplicialObject C) ≌ Karoubi (ChainComplex C ℕ)


theorem sdiff_union_sdiff_cancel (hts : t ⊆ s) (hut : u ⊆ t) : s \ t ∪ t \ u = s \ u

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


theorem norm_sub_le_of_mem_A {r x : ℝ} (hr : 0 < r) (ε : ℝ) {L₁ L₂ : F} (h₁ : x ∈ A f L₁ r ε)
    (h₂ : x ∈ A f L₂ r ε) : ‖L₁ - L₂‖ ≤ 4 * ε

(h₁ : x ∈ RightDerivMeasurableAux.A f L₁ r ε)

(h₂ : x ∈ RightDerivMeasurableAux.A f L₂ r ε)

‖L₁ - L₂‖ ≤ 4 * ε


/-- The bijection of `Cotrident.IsColimit.homIso` is natural in `Z`. -/
theorem Cotrident.IsColimit.homIso_natural [Nonempty J] {t : Cotrident f} {Z Z' : C} (q : Z ⟶ Z')
    (ht : IsColimit t) (k : t.pt ⟶ Z) :
    (Cotrident.IsColimit.homIso ht _ (k ≫ q) : Y ⟶ Z') =
      (Cotrident.IsColimit.homIso ht _ k : Y ⟶ Z) ≫ q

(ht : CategoryTheory.Limits.IsColimit t)

↑((CategoryTheory.Limits.Cotrident.IsColimit.homIso ht Z') (CategoryTheory.CategoryStruct.comp k q)) =
  CategoryTheory.CategoryStruct.comp (↑((CategoryTheory.Limits.Cotrident.IsColimit.homIso ht Z) k)) q


theorem bounded_le_Ioo [Preorder α] (a b : α) : Bounded (· ≤ ·) (Ioo a b)

Set.Bounded (fun x x_1 => x ≤ x_1) (Set.Ioo a b)


theorem approx_le_lim (c : CU P) (x : X) (n : ℕ) : c.approx n x ≤ c.lim x

{X : Type u_1}
[TopologicalSpace X]
{P : Set X → Prop}
(c : Urysohns.CU P)
(x : X)
(n : ℕ)


theorem epi_comp {X Y Z : C} (f : X ⟶ Y) [Epi f] (g : Y ⟶ Z) [Epi g] : Epi (f ≫ g)

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

CategoryTheory.Epi (CategoryTheory.CategoryStruct.comp f g)


@[simp]
theorem constantsVarsEquivLeft_apply (t : L[[γ]].Term (α ⊕ β)) :
    constantsVarsEquivLeft t = (constantsToVars t).relabel (Equiv.sumAssoc _ _ _).symm

{L : FirstOrder.Language}
{α : Type u'}
{β : Type v'}
{γ : Type u_3}
(t : (L.withConstants γ).Term (α ⊕ β))

FirstOrder.Language.Term.constantsVarsEquivLeft t =
  FirstOrder.Language.Term.relabel (⇑(Equiv.sumAssoc γ α β).symm) t.constantsToVars


/-- A more general version of `finprod_mem_mul_diff` that requires `t ∩ mulSupport f` rather than
`t` to be finite. -/
@[to_additive
      "A more general version of `finsum_mem_add_diff` that requires `t ∩ support f` rather
      than `t` to be finite."]
theorem finprod_mem_mul_diff' (hst : s ⊆ t) (ht : (t ∩ mulSupport f).Finite) :
    ((∏ᶠ i ∈ s, f i) * ∏ᶠ i ∈ t \ s, f i) = ∏ᶠ i ∈ t, f i

{α : Type u_1}
{M : Type u_5}
[AddCommMonoid M]
{f : α → M}
{s t : Set α}
(hst : s ⊆ t)
(ht : (t ∩ Function.support f).Finite)

∑ᶠ (i : α) (_ : i ∈ s), f i + ∑ᶠ (i : α) (_ : i ∈ t \ s), f i = ∑ᶠ (i : α) (_ : i ∈ t), f i


theorem isSolvable (α : solvableByRad F E) : IsSolvable (minpoly F α).Gal

{F : Type u_1}
[Field F]
{E : Type u_2}
[Field E]
[Algebra F E]
(α : ↥(solvableByRad F E))


/-- A oplax monoidal functor is a functor `F : C ⥤ D` between monoidal categories,
equipped with morphisms `η : F.obj (𝟙_ C) ⟶ 𝟙 _D` and `δ X Y : F.obj (X ⊗ Y) ⟶ F.obj X ⊗ F.obj Y`,
satisfying the appropriate coherences. -/
structure OplaxMonoidalFunctor extends C ⥤ D where
  /-- counit morphism -/
  η : obj (𝟙_ C) ⟶ 𝟙_ D
  /-- cotensorator -/
  δ : ∀ X Y : C, obj (X ⊗ Y) ⟶ obj X ⊗ obj Y
  δ_natural_left :
    ∀ {X Y : C} (f : X ⟶ Y) (X' : C),
      δ X X' ≫ map f ▷ obj X' = map (f ▷ X') ≫ δ Y X' := by
    aesop_cat
  δ_natural_right :
    ∀ {X Y : C} (X' : C) (f : X ⟶ Y) ,
      δ X' X ≫ obj X' ◁ map f = map (X' ◁ f) ≫ δ X' Y := by
    aesop_cat
  /-- associativity of the tensorator -/
  associativity :
    ∀ X Y Z : C,
      δ (X ⊗ Y) Z ≫ δ X Y ▷ obj Z ≫ (α_ (obj X) (obj Y) (obj Z)).hom =
        map (α_ X Y Z).hom ≫ δ X (Y ⊗ Z) ≫ obj X ◁ δ Y Z := by
    aesop_cat
  -- unitality
  left_unitality : ∀ X : C, (λ_ (obj X)).inv = map (λ_ X).inv ≫ δ (𝟙_ C) X ≫ η ▷ obj X := by
    aesop_cat
  right_unitality : ∀ X : C, (ρ_ (obj X)).inv = map (ρ_ X).inv ≫ δ X (𝟙_ C) ≫ obj X ◁ η := by
    aesop_cat

(self : CategoryTheory.OplaxMonoidalFunctor C D)

self.δ X X' ≫ CategoryTheory.MonoidalCategory.whiskerRight (self.map f) (self.obj X') =
  self.map (CategoryTheory.MonoidalCategory.whiskerRight f X') ≫ self.δ Y X'


theorem take : ∀ {s}, Valid s → ∀ n, Valid (s.take n)


@[fun_prop]
protected theorem DifferentiableOn.fst (h : DifferentiableOn 𝕜 f₂ s) :
    DifferentiableOn 𝕜 (fun x => (f₂ x).1) s

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{F : Type u_3}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{G : Type u_4}
[NormedAddCommGroup G]
[NormedSpace 𝕜 G]
{s : Set E}
{f₂ : E → F × G}
(h : DifferentiableOn 𝕜 f₂ s)


/-- The equivalence between `C` and its monoidal opposite's monoidal opposite. -/
@[simps!] def MonoidalOpposite.mopMopEquivalence : Cᴹᵒᵖᴹᵒᵖ ≌ C

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

((CategoryTheory.MonoidalOpposite.mopMopEquivalence C).unitIso.inv.app X).unmop.unmop = (𝟙 X.unmop).unmop


/-- By definition, if `x` is invertible then `inverse x = x⁻¹`. -/
@[simp]
theorem inverse_unit (u : M₀ˣ) : inverse (u : M₀) = (u⁻¹ : M₀ˣ)

{M₀ : Type u_2}
[MonoidWithZero M₀]
(u : M₀ˣ)


theorem coe_algEquivOfEq {p q : K[X]} (hp : p ≠ 0) (h_eq : p = q) :
    (algEquivOfEq hp h_eq).toFun = liftHom p (root q) (by rw [h_eq, aeval_eq, mk_self])

{K : Type u_1}
[Field K]
{p q : K[X]}
(hp : p ≠ 0)
(h_eq : p = q)

(AdjoinRoot.algEquivOfEq hp h_eq).toFun = ⇑(AdjoinRoot.liftHom p (AdjoinRoot.root q) ⋯)


/-- When `f` is an epimorphism, the cokernel of `f ≫ g` is isomorphic to the cokernel of `g`.
-/
@[simps]
def cokernelEpiComp {X Y Z : C} (f : X ⟶ Y) (g : Y ⟶ Z) [Epi f] [HasCokernel g] :
    cokernel (f ≫ g) ≅ cokernel g

(CategoryTheory.Limits.cokernelEpiComp f g).inv =
  CategoryTheory.Limits.cokernel.desc g (CategoryTheory.Limits.cokernel.π (f ≫ g)) ⋯


lemma mul_div_cancel₀ (a : G₀) (hb : b ≠ 0) : b * (a / b) = a

{G₀ : Type u_3}
[CommGroupWithZero G₀]
{b : G₀}
(a : G₀)
(hb : b ≠ 0)


@[to_additive (attr := simp)]
theorem inv_involutive : Function.Involutive (Inv.inv : G → G)


@[to_additive] lemma eq_bot_iff_card : H = ⊥ ↔ Nat.card H = 1

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


@[simp, nolint simpNF] -- Porting note: linter claims that LHS doesn't simplify. It does.
theorem tendsto_comp_val_Ici_atTop [SemilatticeSup α] {a : α} {f : α → β} {l : Filter β} :
    Tendsto (fun x : Ici a => f x) atTop l ↔ Tendsto f atTop l

{α : Type u_3}
{β : Type u_4}
[SemilatticeSup α]
{a : α}
{f : α → β}
{l : Filter β}

Filter.Tendsto (fun x => f ↑x) Filter.atTop l ↔ Filter.Tendsto f Filter.atTop l


@[simp]
theorem support_onFinset_subset {s : Finset α} {f : α → M} {hf} :
    (onFinset s f hf).support ⊆ s

{α : Type u_1}
{M : Type u_5}
[Zero M]
{s : Finset α}
{f : α → M}
{hf : ∀ (a : α), f a ≠ 0 → a ∈ s}


theorem toEquiv_injective : Injective (toEquiv : r ≃r s → α ≃ β)

{α : Type u_1}
{β : Type u_2}
{r : α → α → Prop}
{s : β → β → Prop}


/-- A ring hom `α →+* β` can equivalently be viewed as a ring hom `αᵐᵒᵖ →+* βᵐᵒᵖ`. This is the
action of the (fully faithful) `ᵐᵒᵖ`-functor on morphisms. -/
@[simps!]
def RingHom.op {α β} [NonAssocSemiring α] [NonAssocSemiring β] :
    (α →+* β) ≃ (αᵐᵒᵖ →+* βᵐᵒᵖ)

{α : Type u_2}
{β : Type u_3}
[NonAssocSemiring α]
[NonAssocSemiring β]
(f : α →+* β)

∀ (a : αᵐᵒᵖ), (RingHom.op f) a = MulOpposite.op (f (MulOpposite.unop a))


theorem image₂_comm {g : β → α → γ} (h_comm : ∀ a b, f a b = g b a) : image₂ f s t = image₂ g t s

{f : α → β → γ}

{g : β → α → γ}

(h_comm : ∀ (a : α) (b : β), f a b = g b a)

Finset.image₂ f s t = Finset.image₂ g t s


protected theorem eq_neg_of_eq_neg {a b : Int} (h : a = -b) : b = -a


lemma piecewise_le_piecewise' (hf : ∀ x ∈ s, f x ≤ f' x) (hg : ∀ x ∉ s, g x ≤ g' x) :
    s.piecewise f g ≤ s.piecewise f' g'

{ι : Type u_1}
(s : Finset ι)
[(j : ι) → Decidable (j ∈ s)]
{π : ι → Type u_3}
{f g f' g' : (i : ι) → π i}
[(i : ι) → Preorder (π i)]
(hf : ∀ x ∈ s, f x ≤ f' x)
(hg : ∀ x ∉ s, g x ≤ g' x)


@[simp]
theorem inducedOrderRingIso_symm : (inducedOrderRingIso β γ).symm = inducedOrderRingIso γ β

(LinearOrderedField.inducedOrderRingIso β γ).symm = LinearOrderedField.inducedOrderRingIso γ β


protected theorem trans {s t u : Subtype p} (h₁ : s ≈ t) (h₂ : t ≈ u) : s ≈ u

{α : Sort u_1}
{p : α → Prop}
[Setoid α]
{s t u : Subtype p}
(h₁ : s ≈ t)
(h₂ : t ≈ u)


lemma _root_.MeasurableEmbedding.rnDeriv_map (hf : MeasurableEmbedding f)
    (μ ν : Measure α) [SigmaFinite μ] [SigmaFinite ν] :
    (fun x ↦ (μ.map f).rnDeriv (ν.map f) (f x)) =ᵐ[ν] μ.rnDeriv ν

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

(fun x => (MeasureTheory.Measure.map f μ).rnDeriv (MeasureTheory.Measure.map f ν) (f x)) =ᵐ[ν] μ.rnDeriv ν


lemma ne_zero_of_eq_one [One α] [NeZero (1 : α)] {a : α} (h : a = 1) : a ≠ 0

{α : Type u_2}
[Zero α]
[One α]
[NeZero 1]
{a : α}
(h : a = 1)


theorem reverse_natDegree (f : R[X]) : f.reverse.natDegree = f.natDegree - f.natTrailingDegree

{R : Type u_1}
[Semiring R]
(f : Polynomial R)


@[simp]
theorem card_mk {m nodup} : (⟨m, nodup⟩ : Finset α).card = Multiset.card m

{α : Type u_1}
{m : Multiset α}
{nodup : m.Nodup}

{ val := m, nodup := nodup }.card = Multiset.card m


theorem le_csSup_image {s : Set α} {c : α} (hcs : c ∈ s) (h_bdd : BddAbove s) :
    f c ≤ sSup (f '' s)

{α : Type u_1}
{β : Type u_2}
[Preorder α]
[ConditionallyCompleteLattice β]
{f : α → β}
(h_mono : Monotone f)
{s : Set α}
{c : α}
(hcs : c ∈ s)
(h_bdd : BddAbove s)


theorem ker_eq_bot (coercive : IsCoercive B) : ker B♯ = ⊥

{V : Type u}
[NormedAddCommGroup V]
[InnerProductSpace ℝ V]
[CompleteSpace V]
{B : V →L[ℝ] V →L[ℝ] ℝ}
(coercive : IsCoercive B)

LinearMap.ker (InnerProductSpace.continuousLinearMapOfBilin B) = ⊥


/-- An ordered cancellative monoid injects into its localization by sending `a` to `a / b`. -/
@[to_additive (attr := simps!) "An ordered cancellative monoid injects into its localization by
sending `a` to `a - b`."]
def mkOrderEmbedding (b : s) : α ↪o Localization s

{α : Type u_1}
[OrderedCancelCommMonoid α]
{s : Submonoid α}
(b : ↥s)
(a : α)

(Localization.mkOrderEmbedding b) a = (Localization.monoidOf s).mk' a b


theorem linearIndependent_iff_injective_total :
    LinearIndependent R v ↔ Function.Injective (Finsupp.total ι M R v)

{ι : Type u'}
{R : Type u_2}
{M : Type u_4}
{v : ι → M}
[Ring R]
[AddCommGroup M]
[Module R M]

LinearIndependent R v ↔ Function.Injective ⇑(Finsupp.total ι M R v)


/-- This property of an element `a : α` in a well-ordered type holds iff `a` is a
limit element, i.e. it is not a successor and it is not the smallest element of `α`. -/
class IsWellOrderLimitElement (a : α) : Prop where
  not_bot : ∃ (b : α), b < a
  not_succ (b : α) (hb : b < a) : ∃ (c : α), b < c ∧ c < a

{α : Type u_1}
[LinearOrder α]
{a : α}
[self : IsWellOrderLimitElement a]
(b : α)
(hb : b < a)


/-- Morphisms between two direct sums over a hom orthogonal family `s : ι → C`
are equivalent to block diagonal matrices,
with blocks indexed by `ι`,
and matrix entries in `i`-th block living in the endomorphisms of `s i`. -/
@[simps]
noncomputable def matrixDecomposition (o : HomOrthogonal s) {α β : Type} [Finite α] [Finite β]
    {f : α → ι} {g : β → ι} :
    ((⨁ fun a => s (f a)) ⟶ ⨁ fun b => s (g b)) ≃
      ∀ i : ι, Matrix (g ⁻¹' {i}) (f ⁻¹' {i}) (End (s i))

(z : (⨁ fun a => s (f a)) ⟶ ⨁ fun b => s (g b))

o.matrixDecomposition z i j k =
  CategoryTheory.CategoryStruct.comp (CategoryTheory.eqToHom ⋯)
    (CategoryTheory.CategoryStruct.comp (CategoryTheory.Limits.biproduct.components z ↑k ↑j) (CategoryTheory.eqToHom ⋯))


theorem sum_int_mod (s : Multiset ℤ) (n : ℤ) : s.sum % n = (s.map (· % n)).sum % n

s.sum % n = (Multiset.map (fun x => x % n) s).sum % n


@[simp]
theorem toMultiset_single (a : α) (n : ℕ) :
    toMultiset (DFinsupp.single a n) = Multiset.replicate n a

{α : Type u_1}
[DecidableEq α]
(a : α)
(n : ℕ)

DFinsupp.toMultiset (DFinsupp.single a n) = Multiset.replicate n a


theorem uniformity_basis_dist_pow_of_lt_one {α : Type*} [PseudoMetricSpace α] {r : ℝ} (h₀ : 0 < r)
    (h₁ : r < 1) :
    (uniformity α).HasBasis (fun _ : ℕ ↦ True) fun k ↦ { p : α × α | dist p.1 p.2 < r ^ k }

{α : Type u_4}
[PseudoMetricSpace α]
{r : ℝ}
(h₀ : 0 < r)
(h₁ : r < 1)

(uniformity α).HasBasis (fun x => True) fun k => {p | dist p.1 p.2 < r ^ k}


@[simp]
theorem snd_add [Add R] [Add M] (x₁ x₂ : tsze R M) : (x₁ + x₂).snd = x₁.snd + x₂.snd

{R : Type u}
{M : Type v}
[Add R]
[Add M]
(x₁ x₂ : tsze R M)


/-- Given a morphism of cochain complexes `φ`, this is the short complex
given by `(triangle φ).rotate`. -/
@[simps]
noncomputable def triangleRotateShortComplex : ShortComplex (CochainComplex C ℤ)

(CochainComplex.mappingCone.triangleRotateShortComplex φ).X₃ = (CochainComplex.mappingCone.triangle φ).rotate.obj₃


@[simp]
theorem inr_sub [AddGroup R] [AddGroup A] (m₁ m₂ : A) : (↑(m₁ - m₂) : Unitization R A) = m₁ - m₂

(R : Type u_3)
{A : Type u_4}
[AddGroup R]
[AddGroup A]
(m₁ m₂ : A)


theorem sin_eq_one_iff {x : ℂ} : sin x = 1 ↔ ∃ k : ℤ, π / 2 + k * (2 * π) = x

Complex.sin x = 1 ↔ ∃ k, ↑Real.pi / 2 + ↑k * (2 * ↑Real.pi) = x


lemma Disjoint.eq_iff (hab : Disjoint a b) : a = b ↔ a = ⊥ ∧ b = ⊥

{α : Type u_1}
[PartialOrder α]
[OrderBot α]
{a b : α}
(hab : Disjoint a b)


theorem hasStrictDerivAt_iff_hasStrictFDerivAt :
    HasStrictDerivAt f f' x ↔ HasStrictFDerivAt f (smulRight (1 : 𝕜 →L[𝕜] 𝕜) f') x

{𝕜 : Type u}
[NontriviallyNormedField 𝕜]
{F : Type v}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{f : 𝕜 → F}
{f' : F}
{x : 𝕜}

HasStrictDerivAt f f' x ↔ HasStrictFDerivAt f (ContinuousLinearMap.smulRight 1 f') x


protected theorem nonpos_of_ge {a b : α} (h : b ≤ a) : variationOnFromTo f s a b ≤ 0

{α : Type u_1}
[LinearOrder α]
{E : Type u_2}
[PseudoEMetricSpace E]
(f : α → E)
(s : Set α)
{a b : α}
(h : b ≤ a)


theorem Normal.isIntegral (_ : Normal F K) (x : K) : IsIntegral F x

{F : Type u_1}
{K : Type u_2}
[Field F]
[Field K]
[Algebra F K]


@[to_additive (attr := gcongr) neg_le_neg]
theorem inv_le_inv' : a ≤ b → b⁻¹ ≤ a⁻¹

{α : Type u}
[OrderedAddCommGroup α]
{a b : α}


theorem tendsto_pow_atTop_nhdsWithin_zero_of_lt_one {𝕜 : Type*} [LinearOrderedField 𝕜]
    [Archimedean 𝕜] [TopologicalSpace 𝕜] [OrderTopology 𝕜] {r : 𝕜} (h₁ : 0 < r) (h₂ : r < 1) :
    Tendsto (fun n : ℕ ↦ r ^ n) atTop (𝓝[>] 0)

{𝕜 : Type u_4}
[LinearOrderedField 𝕜]
[Archimedean 𝕜]
[TopologicalSpace 𝕜]
[OrderTopology 𝕜]
{r : 𝕜}
(h₁ : 0 < r)
(h₂ : r < 1)

Filter.Tendsto (fun n => r ^ n) Filter.atTop (𝓝[>] 0)


@[simp]
lemma map'_comp (f : α →* β) (g : β →* γ) : map' (g.comp f) = (map' g).comp (map' f)

{α : Type u_1}
{β : Type u_2}
{γ : Type u_3}
[MulOneClass α]
[MulOneClass β]
[MulOneClass γ]
(f : α →* β)
(g : β →* γ)

WithZero.map' (g.comp f) = (WithZero.map' g).comp (WithZero.map' f)


@[to_additive (attr := simp)]
theorem coe_fst : ⇑(fst M N) = Prod.fst

{M : Type u_5}
{N : Type u_6}
[Mul M]
[Mul N]


theorem abs_exp_sub_one_sub_id_le {x : ℝ} (hx : |x| ≤ 1) : |exp x - 1 - x| ≤ x ^ 2


@[to_additive]
theorem inv_mem_Ico_iff : a⁻¹ ∈ Set.Ico c d ↔ a ∈ Set.Ioc d⁻¹ c⁻¹

{α : Type u_1}
[OrderedAddCommGroup α]
{a c d : α}

-a ∈ Set.Ico c d ↔ a ∈ Set.Ioc (-d) (-c)


@[simp]
theorem implicitToPartialHomeomorphOfComplemented_fst (hf : HasStrictFDerivAt f f' a)
    (hf' : range f' = ⊤) (hker : (ker f').ClosedComplemented) (x : E) :
    (hf.implicitToPartialHomeomorphOfComplemented f f' hf' hker x).fst = f x

(hker : (LinearMap.ker f').ClosedComplemented)

(↑(HasStrictFDerivAt.implicitToPartialHomeomorphOfComplemented f f' hf hf' hker) x).1 = f x


theorem infsep_of_fintype [Decidable s.Nontrivial] [DecidableEq α] [Fintype s] : s.infsep =
    if hs : s.Nontrivial then s.offDiag.toFinset.inf' (by simpa) (uncurry dist) else 0

{α : Type u_1}
[PseudoMetricSpace α]
{s : Set α}
[Decidable s.Nontrivial]
[DecidableEq α]
[Fintype ↑s]

s.infsep = if hs : s.Nontrivial then s.offDiag.toFinset.inf' ⋯ (Function.uncurry dist) else 0


theorem Memℒp.right_of_add_measure {f : α → E} (h : Memℒp f p (μ + ν)) : Memℒp f p ν

{α : Type u_1}
{E : Type u_2}
{m0 : MeasurableSpace α}
{p : ℝ≥0∞}
{μ ν : MeasureTheory.Measure α}
[NormedAddCommGroup E]
{f : α → E}
(h : MeasureTheory.Memℒp f p (μ + ν))


theorem iteratedFDeriv_eq (n : ℕ) :
    iteratedFDeriv 𝕜 n f = f.iteratedFDeriv n

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{F : Type v}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{ι : Type u_2}
{E : ι → Type u_3}
[(i : ι) → NormedAddCommGroup (E i)]
[(i : ι) → NormedSpace 𝕜 (E i)]
[Fintype ι]
(f : ContinuousMultilinearMap 𝕜 E F)
(n : ℕ)

iteratedFDeriv 𝕜 n ⇑f = f.iteratedFDeriv n


theorem coe_sub (x y : 𝕜) : (↑(x - y) : AddCircle p) = (x : AddCircle p) - (y : AddCircle p)

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


@[simp]
theorem coe_compl (s : LowerSet α) : (s.compl : Set α) = (↑s)ᶜ


theorem iInf_neBot_iff_of_directed {f : ι → Filter α} [Nonempty α] (hd : Directed (· ≥ ·) f) :
    NeBot (iInf f) ↔ ∀ i, NeBot (f i)

(hd : Directed (fun x x_1 => x ≥ x_1) f)


theorem eq_top_iff' (A : NonUnitalSubsemiring R) : A = ⊤ ↔ ∀ x : R, x ∈ A

{R : Type u}
[NonUnitalNonAssocSemiring R]
(A : NonUnitalSubsemiring R)


protected theorem lt_add_of_pos_right (a : Int) {b : Int} (h : 0 < b) : a < a + b


theorem congr_hom {C D : HomologicalComplex V c} {f g : C ⟶ D} (w : f = g) (i : ι) :
    f.f i = g.f i


@[to_additive (attr := simp)]
theorem empty_pow {n : ℕ} (hn : n ≠ 0) : (∅ : Set α) ^ n = ∅

{α : Type u_2}
[AddMonoid α]
{n : ℕ}
(hn : n ≠ 0)


theorem edist_le_pi_edist [∀ b, EDist (π b)] (f g : ∀ b, π b) (b : β) :
    edist (f b) (g b) ≤ edist f g

{β : Type v}
{π : β → Type u_2}
[Fintype β]
[(b : β) → EDist (π b)]
(f g : (b : β) → π b)
(b : β)


theorem uniformly_extend_unique {g : α → γ} (hg : ∀ b, g (e b) = f b) (hc : Continuous g) : ψ = g

{α : Type u_1}
{β : Type u_2}
{γ : Type u_3}
[UniformSpace α]
[UniformSpace β]
[UniformSpace γ]
{e : β → α}
(h_e : UniformInducing e)
(h_dense : DenseRange e)
{f : β → γ}
[T0Space γ]
{g : α → γ}
(hg : ∀ (b : β), g (e b) = f b)
(hc : Continuous g)


theorem toLowerSet_injective : Injective (toLowerSet : Ideal P → LowerSet P)


theorem prob_add_prob_compl [IsProbabilityMeasure μ] (h : MeasurableSet s) : μ s + μ sᶜ = 1

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


protected theorem sub_le_of_sub_le {a b c : Int} (h : a - b ≤ c) : a - c ≤ b


theorem const_smul {R : Type*} [Semiring R] [Module R F] [SMulCommClass 𝕜 R F]
    [ContinuousConstSMul R F] (hf : DiffContOnCl 𝕜 f s) (c : R) : DiffContOnCl 𝕜 (c • f) s

{𝕜 : Type u_1}
{E : Type u_2}
{F : Type u_3}
[NontriviallyNormedField 𝕜]
[NormedAddCommGroup E]
[NormedAddCommGroup F]
[NormedSpace 𝕜 E]
[NormedSpace 𝕜 F]
{f : E → F}
{s : Set E}
{R : Type u_5}
[Semiring R]
[Module R F]
[SMulCommClass 𝕜 R F]
[ContinuousConstSMul R F]
(hf : DiffContOnCl 𝕜 f s)
(c : R)


theorem t0Space_iff_uniformity' :
    T0Space α ↔ Pairwise fun x y ↦ ∃ r ∈ 𝓤 α, (x, y) ∉ r

T0Space α ↔ Pairwise fun x y => ∃ r ∈ 𝓤 α, (x, y) ∉ r


@[simp]
theorem eqToHom_left {X Y : CostructuredArrow S T} (h : X = Y) :
    (eqToHom h).left = eqToHom (by rw [h])

{X Y : CategoryTheory.CostructuredArrow S T}

(CategoryTheory.eqToHom h).left = CategoryTheory.eqToHom ⋯


@[simp, norm_cast]
theorem coe_lt_coe {x y : ℝ} : (x : ℝ*) < y ↔ x < y


theorem log2_self_le (h : n ≠ 0) : 2 ^ n.log2 ≤ n


theorem iteratedDerivWithin_add (hf : ContDiffOn 𝕜 n f s) (hg : ContDiffOn 𝕜 n g s) :
    iteratedDerivWithin n (f + g) s x =
      iteratedDerivWithin n f s x + iteratedDerivWithin n g s x

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{F : Type u_2}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{n : ℕ}
{x : 𝕜}
{s : Set 𝕜}
(hx : x ∈ s)
(h : UniqueDiffOn 𝕜 s)
{f g : 𝕜 → F}
(hf : ContDiffOn 𝕜 (↑n) f s)
(hg : ContDiffOn 𝕜 (↑n) g s)


theorem mem_closed_iff_sup (hs : IsClosed s) :
    a ∈ s ↔ ∃ (ι : Type u) (_hι : Nonempty ι) (f : ι → Ordinal),
      (∀ i, f i ∈ s) ∧ sup.{u, u} f = a

{s : Set Ordinal.{u}}
{a : Ordinal.{u}}
(hs : IsClosed s)

a ∈ s ↔ ∃ ι, ∃ (_ : Nonempty ι), ∃ f, (∀ (i : ι), f i ∈ s) ∧ Ordinal.sup f = a


@[simp]
theorem comap_id : S.comap (ContinuousMap.id X) = S

{X : Type u_2}
[TopologicalSpace X]
(S : DiscreteQuotient X)

DiscreteQuotient.comap (ContinuousMap.id X) S = S


theorem associatedPrimes.eq_empty_of_subsingleton [Subsingleton M] : associatedPrimes R M = ∅

{R : Type u_1}
[CommRing R]
{M : Type u_2}
[AddCommGroup M]
[Module R M]
[Subsingleton M]


/-- Given a function `f : E → F` and a formal multilinear series `p`, we say that `f` has `p` as
a power series on the ball of radius `r > 0` around `x` if `f (x + y) = ∑' pₙ yⁿ` for all `‖y‖ < r`.
-/
structure HasFPowerSeriesOnBall (f : E → F) (p : FormalMultilinearSeries 𝕜 E F) (x : E) (r : ℝ≥0∞) :
    Prop where
  r_le : r ≤ p.radius
  r_pos : 0 < r
  hasSum :
    ∀ {y}, y ∈ EMetric.ball (0 : E) r → HasSum (fun n : ℕ => p n fun _ : Fin n => y) (f (x + y))

{𝕜 : 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∞}
(self : HasFPowerSeriesOnBall f p x r)


@[to_additive (attr := simp)]
theorem mrange_snd : mrange (snd M N) = ⊤

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

AddMonoidHom.mrange (AddMonoidHom.snd M N) = ⊤


theorem Unbounded.rel_mono {r' : α → α → Prop} (hr : r' ≤ r) (h : Unbounded r s) : Unbounded r' s

{α : Type u_1}
{r : α → α → Prop}
{s : Set α}
{r' : α → α → Prop}
(hr : r' ≤ r)
(h : Set.Unbounded r s)


lemma hasSum_nat_sinKernel (a : ℝ) {t : ℝ} (ht : 0 < t) :
    HasSum (fun n : ℕ ↦ 2 * n * Real.sin (2 * π * a * n) * rexp (-π * n ^ 2 * t))
    (sinKernel ↑a t)

HasSum (fun n => 2 * ↑n * Real.sin (2 * π * a * ↑n) * rexp (-π * ↑n ^ 2 * t)) (HurwitzZeta.sinKernel (↑a) t)


/-- The `MulEquiv` that takes an automorphism `f` to the element `k : (ZMod n)ˣ` such that
  `f μ = μ ^ k` for any root of unity `μ`. A strengthening of `IsPrimitiveRoot.autToPow`. -/
@[simps]
noncomputable def autEquivPow : (L ≃ₐ[K] L) ≃* (ZMod n)ˣ

(h : Irreducible (Polynomial.cyclotomic (↑n) K))

∀ (a : L ≃ₐ[K] L), (IsCyclotomicExtension.autEquivPow L h) a = (↑(IsPrimitiveRoot.autToPow K ⋯)).toFun a


theorem RelIso.maximals_preimage_eq (f : r ≃r s) (y : Set β) :
    maximals r (f ⁻¹' y) = f ⁻¹' (maximals s y)

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

maximals r (⇑f ⁻¹' y) = ⇑f ⁻¹' maximals s y


@[simp]
theorem realize_rel₁ {R : L.Relations 1} {t : L.Term _} :
    (R.boundedFormula₁ t).Realize v xs ↔ RelMap R ![t.realize (Sum.elim v xs)]

{L : FirstOrder.Language}
{M : Type w}
[L.Structure M]
{α : Type u'}
{l : ℕ}
{v : α → M}
{xs : Fin l → M}
{R : L.Relations 1}
{t : L.Term (α ⊕ Fin l)}

(R.boundedFormula₁ t).Realize v xs ↔
  FirstOrder.Language.Structure.RelMap R ![FirstOrder.Language.Term.realize (Sum.elim v xs) t]


/-- `WithLp.equiv` as a continuous linear equivalence. -/
@[simps! (config := .asFn) apply symm_apply]
protected def continuousLinearEquiv : PiLp p β ≃L[𝕜] ∀ i, β i

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

⇑(PiLp.continuousLinearEquiv p 𝕜 β).symm = ⇑(WithLp.equiv p ((i : ι) → β i)).symm


theorem martingalePart_bdd_difference {R : ℝ≥0} {f : ℕ → Ω → ℝ} (ℱ : Filtration ℕ m0)
    (hbdd : ∀ᵐ ω ∂μ, ∀ i, |f (i + 1) ω - f i ω| ≤ R) :
    ∀ᵐ ω ∂μ, ∀ i, |martingalePart f ℱ μ (i + 1) ω - martingalePart f ℱ μ i ω| ≤ ↑(2 * R)

{f : ℕ → Ω → ℝ}

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

∀ᵐ (ω : Ω) ∂μ,
  ∀ (i : ℕ), |MeasureTheory.martingalePart f ℱ μ (i + 1) ω - MeasureTheory.martingalePart f ℱ μ i ω| ≤ ↑(2 * R)


@[simp]
theorem Ioc_union_Ici_eq_Ioi (h : a < b) : Ioc a b ∪ Ici b = Ioi a

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


@[simp]
theorem det_one : det (1 : Matrix n n R) = 1

{n : Type u_2}
[DecidableEq n]
[Fintype n]
{R : Type v}
[CommRing R]


@[simp]
theorem trailingDegree_X : trailingDegree (X : R[X]) = 1

{R : Type u}
[Semiring R]
[Nontrivial R]


theorem norm_lt_one_iff_dvd (x : ℤ_[p]) : ‖x‖ < 1 ↔ ↑p ∣ x

{p : ℕ}
[hp : Fact (Nat.Prime p)]
(x : ℤ_[p])

‖x‖ < 1 ↔ ↑p ∣ x


/-- A finite dimensional space has zero `finrank` iff it is a subsingleton.
This is the `finrank` version of `rank_zero_iff`. -/
theorem FiniteDimensional.finrank_zero_iff [NoZeroSMulDivisors R M] :
    finrank R M = 0 ↔ Subsingleton M

{R : Type u}
{M : Type v}
[Ring R]
[AddCommGroup M]
[Module R M]
[Nontrivial R]
[StrongRankCondition R]
[Module.Finite R M]
[NoZeroSMulDivisors R M]

FiniteDimensional.finrank R M = 0 ↔ Subsingleton M


/-- Equivalence of categories is symmetric. -/
@[symm, simps]
def symm (e : C ≌ D) : D ≌ C

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


@[to_additive (attr := simp)]
theorem threeGPFree_singleton (a : α) : ThreeGPFree ({a} : Set α)


theorem strictMonoOn_arcsin : StrictMonoOn arcsin (Icc (-1) 1)

StrictMonoOn Real.arcsin (Set.Icc (-1) 1)


theorem antisymmRel_swap : AntisymmRel (swap r) = AntisymmRel r

AntisymmRel (Function.swap r) = AntisymmRel r


/-- The diameter of a ball of radius `r` is at most `2 r`. -/
theorem diam_ball {r : ℝ} (h : 0 ≤ r) : diam (ball x r) ≤ 2 * r

{α : Type u}
[PseudoMetricSpace α]
{x : α}
{r : ℝ}
(h : 0 ≤ r)


private lemma toAffine_negAddY_of_eq {P : Fin 3 → F} {n d : F} (hPz : P z ≠ 0) (hd : d ≠ 0) :
    W.toAffine.negAddY (P x / P z ^ 2) (P x / P z ^ 2) (P y / P z ^ 3) (-n / (P z * d)) =
      (-n * (n ^ 2 - W.a₁ * n * P z * d - W.a₂ * P z ^ 2 * d ^ 2 - 2 * P x * d ^ 2 - P x * d ^ 2)
        + P y * d ^ 3) / (P z * d) ^ 3

{F : Type v}
[Field F]
{W : WeierstrassCurve.Jacobian F}
{P : Fin 3 → F}
{n d : F}
(hPz : P z ≠ 0)
(hd : d ≠ 0)


@[simp, norm_cast]
theorem ofReal_exp (x : ℝ) : (Real.exp x : ℂ) = exp x


@[simp]
theorem nonempty_plift {α} : Nonempty (PLift α) ↔ Nonempty α


theorem apply_update {ι : Sort*} [DecidableEq ι] {α β : ι → Sort*} (f : ∀ i, α i → β i)
    (g : ∀ i, α i) (i : ι) (v : α i) (j : ι) :
    f j (update g i v j) = update (fun k ↦ f k (g k)) i (f i v) j

{ι : Sort u_1}
[DecidableEq ι]
{α : ι → Sort u_2}
{β : ι → Sort u_3}
(f : (i : ι) → α i → β i)
(g : (i : ι) → α i)
(i : ι)
(v : α i)
(j : ι)

f j (Function.update g i v j) = Function.update (fun k => f k (g k)) i (f i v) j


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


@[simp]
theorem div2_bit0 (n) : div2 (2 * n) = n


@[simp]
theorem hasFDerivAt_pi' :
    HasFDerivAt Φ Φ' x ↔ ∀ i, HasFDerivAt (fun x => Φ x i) ((proj i).comp Φ') x

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{x : E}
{ι : Type u_6}
[Fintype ι]
{F' : ι → Type u_7}
[(i : ι) → NormedAddCommGroup (F' i)]
[(i : ι) → NormedSpace 𝕜 (F' i)]
{Φ : E → (i : ι) → F' i}
{Φ' : E →L[𝕜] (i : ι) → F' i}

HasFDerivAt Φ Φ' x ↔ ∀ (i : ι), HasFDerivAt (fun x => Φ x i) ((ContinuousLinearMap.proj i).comp Φ') x


/-- A map `f : α → β` is called a *measurable embedding* if it is injective, measurable, and sends
measurable sets to measurable sets. The latter assumption can be replaced with “`f` has measurable
inverse `g : Set.range f → α`”, see `MeasurableEmbedding.measurable_rangeSplitting`,
`MeasurableEmbedding.of_measurable_inverse_range`, and
`MeasurableEmbedding.of_measurable_inverse`.

One more interpretation: `f` is a measurable embedding if it defines a measurable equivalence to its
range and the range is a measurable set. One implication is formalized as
`MeasurableEmbedding.equivRange`; the other one follows from
`MeasurableEquiv.measurableEmbedding`, `MeasurableEmbedding.subtype_coe`, and
`MeasurableEmbedding.comp`. -/
structure MeasurableEmbedding [MeasurableSpace α] [MeasurableSpace β] (f : α → β) : Prop where
  /-- A measurable embedding is injective. -/
  protected injective : Injective f
  /-- A measurable embedding is a measurable function. -/
  protected measurable : Measurable f
  /-- The image of a measurable set under a measurable embedding is a measurable set. -/
  protected measurableSet_image' : ∀ ⦃s⦄, MeasurableSet s → MeasurableSet (f '' s)

{α : Type u_1}
{β : Type u_2}
[MeasurableSpace α]
[MeasurableSpace β]
{f : α → β}
(self : MeasurableEmbedding f)
⦃s : Set α⦄


theorem lt_mul_of_one_lt_of_lt_of_nonneg [MulPosMono α] (ha : 1 ≤ a) (h : b < c) (hc : 0 ≤ c) :
    b < a * c

{α : Type u_1}
{a b c : α}
[MulOneClass α]
[Zero α]
[Preorder α]
[MulPosMono α]
(ha : 1 ≤ a)
(h : b < c)
(hc : 0 ≤ c)


/-- Given a morphism of presheaves of commutative rings `φ : S ⟶ F.op ⋙ R`,
this is the type of relative `φ`-derivation of a presheaf of `R`-modules `M`. -/
@[ext]
structure Derivation where
  /-- the underlying additive map `R.obj X →+ M.obj X` of a derivation -/
  d {X : Dᵒᵖ} : R.obj X →+ M.obj X
  d_mul {X : Dᵒᵖ} (a b : R.obj X) : d (a * b) = a • d b + b • d a := by aesop_cat
  d_map {X Y : Dᵒᵖ} (f : X ⟶ Y) (x : R.obj X) :
    d (R.map f x) = M.map f (d x) := by aesop_cat
  d_app {X : Cᵒᵖ} (a : S.obj X) : d (φ.app X a) = 0 := by aesop_cat

{M : PresheafOfModules (R ⋙ CategoryTheory.forget₂ CommRingCat RingCat)}


/-- A set `s` is closed iff for every point `x`, if there is a point `y` close to `x` that belongs
to `s` then `x` is in `s`. -/
theorem isClosed_iff_frequently : IsClosed s ↔ ∀ x, (∃ᶠ y in 𝓝 x, y ∈ s) → x ∈ s

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

IsClosed s ↔ ∀ (x : X), (∃ᶠ (y : X) in 𝓝 x, y ∈ s) → x ∈ s


@[to_additive]
lemma smul_left_cancel {a : α} (ha : IsUnit a) {x y : β} : a • x = a • y ↔ x = y

{α : Type u_1}
{β : Type u_2}
[Monoid α]
[MulAction α β]
{a : α}
(ha : IsUnit a)
{x y : β}


theorem disjoint_singleton : Disjoint ({a} : Finset α) {b} ↔ a ≠ b


theorem prop : ∀ a : Regular α, IsRegular a.val

{α : Type u_1}
[HeytingAlgebra α]
(a : Heyting.Regular α)


theorem fastGrowing_limit (o) {f} (h : fundamentalSequence o = Sum.inr f) :
    fastGrowing o = fun i => fastGrowing (f i) i

(o : ONote)
{f : ℕ → ONote}
(h : o.fundamentalSequence = Sum.inr f)

o.fastGrowing = fun i => (f i).fastGrowing i


/-- Shows `piToPiTop` is an isomorphism, whose inverse is precisely the pi product
of the induced projections. This shows that `fundamentalGroupoidFunctor` preserves products.
-/
@[simps]
def piIso : CategoryTheory.Grpd.of (∀ i : I, πₓ (X i)) ≅ πₓ (TopCat.of (∀ i, X i))

(FundamentalGroupoidFunctor.piIso X).inv = CategoryTheory.Functor.pi' (FundamentalGroupoidFunctor.proj X)


@[to_additive AntilipschitzWith.le_mul_nnnorm]
theorem AntilipschitzWith.le_mul_nnnorm' {f : E → F} {K : ℝ≥0} (h : AntilipschitzWith K f)
    (hf : f 1 = 1) (x) : ‖x‖₊ ≤ K * ‖f x‖₊

{E : Type u_3}
{F : Type u_4}
[SeminormedGroup E]
[SeminormedGroup F]
{f : E → F}
{K : ℝ≥0}
(h : AntilipschitzWith K f)
(hf : f 1 = 1)
(x : E)

‖x‖₊ ≤ K * ‖f x‖₊


/-- The `S`-finrank of `M ⊗[R] M'` is `(finrank S M) * (finrank R M')`. -/
@[simp]
theorem FiniteDimensional.finrank_tensorProduct :
    finrank R (M ⊗[S] M') = finrank R M * finrank S M'

{R S : Type u}
{M : Type v}
{M' : Type v'}
[Ring R]
[CommRing S]
[AddCommGroup M]
[AddCommGroup M']
[StrongRankCondition R]
[StrongRankCondition S]
[Module S M]
[Module S M']
[Module.Free S M']
[Algebra S R]
[Module R M]
[IsScalarTower S R M]
[Module.Free R M]

FiniteDimensional.finrank R (TensorProduct S M M') = FiniteDimensional.finrank R M * FiniteDimensional.finrank S M'


/-- Two orthonormal bases with opposite orientations determine opposite "determinant"
top-dimensional forms on `E`. -/
theorem det_eq_neg_det_of_opposite_orientation (h : e.toBasis.orientation ≠ f.toBasis.orientation) :
    e.toBasis.det = -f.toBasis.det


@[simp] lemma tensorUnit_obj : (𝟙_ (FGModuleCat R)).obj = 𝟙_ (ModuleCat R)


theorem dualPairing_eq (W : Subspace K V₁) :
    W.dualPairing = W.quotAnnihilatorEquiv.toLinearMap

{K : Type uK}
[Field K]
{V₁ : Type uV₁}
[AddCommGroup V₁]
[Module K V₁]
(W : Subspace K V₁)

Submodule.dualPairing W = ↑W.quotAnnihilatorEquiv


theorem EventuallyEq.congr_left {l : Filter α} {f g h : α → β} (H : f =ᶠ[l] g) :
    f =ᶠ[l] h ↔ g =ᶠ[l] h

{α : Type u}
{β : Type v}
{l : Filter α}
{f g h : α → β}
(H : f =ᶠ[l] g)


@[reassoc (attr := simp)]
lemma leftDerivedZeroIsoSelf_inv_hom_id_app (X : C) :
    F.leftDerivedZeroIsoSelf.inv.app X ≫ F.fromLeftDerivedZero.app X = 𝟙 _

CategoryTheory.CategoryStruct.comp (F.leftDerivedZeroIsoSelf.inv.app X) (F.fromLeftDerivedZero.app X) =
  CategoryTheory.CategoryStruct.id (F.obj X)


/-- To prove two algebra structures on a fixed `[CommSemiring R] [Semiring A]` agree,
it suffices to check the `algebraMap`s agree.
-/
@[ext]
theorem algebra_ext {R : Type*} [CommSemiring R] {A : Type*} [Semiring A] (P Q : Algebra R A)
    (h : ∀ r : R, (haveI := P; algebraMap R A r) = haveI := Q; algebraMap R A r) :
    P = Q

(h : ∀ (r : R), (algebraMap R A) r = (algebraMap R A) r)


lemma closure_def (M : Matroid α) (X : Set α) : M.closure X = ⋂₀ {F | M.Flat F ∧ X ∩ M.E ⊆ F}

{α : Type u_2}
(M : Matroid α)
(X : Set α)


theorem disjoint_right_comm : Disjoint (a ⊓ b) c ↔ Disjoint (a ⊓ c) b

{α : Type u_1}
[SemilatticeInf α]
[OrderBot α]
{a b c : α}


theorem Fmla.subsumes_right (f f₁ f₂ : Fmla) (H : f.subsumes (f₁.and f₂)) : f.subsumes f₂

(f f₁ f₂ : Sat.Fmla)
(H : f.subsumes (f₁.and f₂))


theorem IsIntegral.mem_range_algHom_of_minpoly_splits (f : K →ₐ[R] L) : x ∈ f.range

(h : Polynomial.Splits (algebraMap R K) (minpoly R x))


theorem neighborSet_subset (G' : Subgraph G) (v : V) : G'.neighborSet v ⊆ G.neighborSet v

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


theorem Ico_filter_le_left {a b : α} [DecidablePred (· ≤ a)] (hab : a < b) :
    ((Ico a b).filter fun x => x ≤ a) = {a}

{α : Type u_1}
[PartialOrder α]
[LocallyFiniteOrder α]
{a b : α}
[DecidablePred fun x => x ≤ a]
(hab : a < b)

Multiset.filter (fun x => x ≤ a) (Multiset.Ico a b) = {a}


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

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

⨆ i, ⨆ j, f (s i j) ≤ f (⨆ i, ⨆ j, s i j)


@[simp]
theorem coe_contLinear_eq_linear (f : P →ᴬ[R] Q) :
    (f.contLinear : V →ₗ[R] W) = (f : P →ᵃ[R] Q).linear

{R : Type u_2}
{V : Type u_3}
{W : Type u_4}
{P : Type u_6}
{Q : Type u_7}
[NormedAddCommGroup V]
[MetricSpace P]
[NormedAddTorsor V P]
[NormedAddCommGroup W]
[MetricSpace Q]
[NormedAddTorsor W Q]
[NormedField R]
[NormedSpace R V]
[NormedSpace R W]
(f : P →ᴬ[R] Q)


@[to_additive IsUpperSet.thickening]
protected theorem IsUpperSet.thickening' (hs : IsUpperSet s) (ε : ℝ) :
    IsUpperSet (thickening ε s)

{α : Type u_1}
[NormedOrderedGroup α]
{s : Set α}
(hs : IsUpperSet s)
(ε : ℝ)


@[simp]
theorem mapRange.addEquiv_symm (f : M ≃+ N) :
    ((mapRange.addEquiv f).symm : (α →₀ _) ≃+ _) = mapRange.addEquiv f.symm

{α : Type u_1}
{M : Type u_5}
{N : Type u_7}
[AddCommMonoid M]
[AddCommMonoid N]
(f : M ≃+ N)

(Finsupp.mapRange.addEquiv f).symm = Finsupp.mapRange.addEquiv f.symm


theorem arg_mul_cos_add_sin_mul_I_eq_toIocMod {r : ℝ} (hr : 0 < r) (θ : ℝ) :
    arg (r * (cos θ + sin θ * I)) = toIocMod Real.two_pi_pos (-π) θ

(↑r * (Complex.cos ↑θ + Complex.sin ↑θ * Complex.I)).arg = toIocMod Real.two_pi_pos (-π) θ


theorem memℒp_iff_integrable {f : α →ₛ E} (hp_pos : p ≠ 0) (hp_ne_top : p ≠ ∞) :
    Memℒp f p μ ↔ Integrable f μ

{α : Type u_1}
{E : Type u_4}
[MeasurableSpace α]
[NormedAddCommGroup E]
{μ : MeasureTheory.Measure α}
{p : ℝ≥0∞}
{f : MeasureTheory.SimpleFunc α E}
(hp_pos : p ≠ 0)
(hp_ne_top : p ≠ ⊤)

MeasureTheory.Memℒp (↑f) p μ ↔ MeasureTheory.Integrable (↑f) μ


@[simp]
theorem lowerBounds_empty : lowerBounds (∅ : Set α) = univ


@[to_additive]
theorem prod_le_tprod {f : ι → α} (s : Finset ι) (hs : ∀ i, i ∉ s → 1 ≤ f i) (hf : Multipliable f) :
    ∏ i ∈ s, f i ≤ ∏' i, f i

{ι : Type u_1}
{α : Type u_3}
[OrderedCommMonoid α]
[TopologicalSpace α]
[OrderClosedTopology α]
{f : ι → α}
(s : Finset ι)
(hs : ∀ i ∉ s, 1 ≤ f i)
(hf : Multipliable f)