/-- The category of single and double intersections of the `U i` maps into the category
of open sets below some `U i`.
-/
@[simps]
def pairwiseToOpensLeCover : Pairwise ι ⥤ OpensLeCover U

{X : TopCat}
{ι : Type w}
(U : ι → TopologicalSpace.Opens ↑X)
{V W : CategoryTheory.Pairwise ι}
(i : V ⟶ W)

(TopCat.Presheaf.SheafCondition.pairwiseToOpensLeCover U).map i =
  TopCat.Presheaf.SheafCondition.pairwiseToOpensLeCoverMap U i


theorem ContDiffOn.exp {n} (hf : ContDiffOn ℝ n f s) : ContDiffOn ℝ n (fun x => Real.exp (f x)) s

{E : Type u_1}
[NormedAddCommGroup E]
[NormedSpace ℝ E]
{f : E → ℝ}
{s : Set E}
{n : ℕ∞}
(hf : ContDiffOn ℝ n f s)


@[simp]
theorem nearestPt_zero (e : ℕ → α) : nearestPt e 0 = const α (e 0)

{α : Type u_1}
[MeasurableSpace α]
[PseudoEMetricSpace α]
[OpensMeasurableSpace α]
(e : ℕ → α)

MeasureTheory.SimpleFunc.nearestPt e 0 = MeasureTheory.SimpleFunc.const α (e 0)


/-- If `α` is a linear succ order, `β` is a preorder, and `f : α → β` is an antitone function, then
the intervals `Set.Ioo (f (Order.succ n)) (f n)` are pairwise disjoint. -/
theorem pairwise_disjoint_on_Ioo_succ [SuccOrder α] [Preorder β] {f : α → β} (hf : Antitone f) :
    Pairwise (Disjoint on fun n => Ioo (f (succ n)) (f n))

{α : Type u_1}
{β : Type u_2}
[LinearOrder α]
[SuccOrder α]
[Preorder β]
{f : α → β}
(hf : Antitone f)

Pairwise (Disjoint on fun n => Set.Ioo (f (Order.succ n)) (f n))


theorem thickenedIndicatorAux_mono {δ₁ δ₂ : ℝ} (hle : δ₁ ≤ δ₂) (E : Set α) :
    thickenedIndicatorAux δ₁ E ≤ thickenedIndicatorAux δ₂ E

{α : Type u_1}
[PseudoEMetricSpace α]
{δ₁ δ₂ : ℝ}
(hle : δ₁ ≤ δ₂)
(E : Set α)


theorem StrictConcaveOn.concaveOn {s : Set E} {f : E → β} (hf : StrictConcaveOn 𝕜 s f) :
    ConcaveOn 𝕜 s f

{𝕜 : Type u_1}
{E : Type u_2}
{β : Type u_5}
[OrderedSemiring 𝕜]
[AddCommMonoid E]
[OrderedAddCommMonoid β]
[Module 𝕜 E]
[Module 𝕜 β]
{s : Set E}
{f : E → β}
(hf : StrictConcaveOn 𝕜 s f)


@[to_additive]
theorem finprod_mem_inv_distrib [DivisionCommMonoid G] (f : α → G) (hs : s.Finite) :
    (∏ᶠ x ∈ s, (f x)⁻¹) = (∏ᶠ x ∈ s, f x)⁻¹

{α : Type u_1}
{G : Type u_4}
{s : Set α}
[DivisionCommMonoid G]
(f : α → G)
(hs : s.Finite)

∏ᶠ (x : α) (_ : x ∈ s), (f x)⁻¹ = (∏ᶠ (x : α) (_ : x ∈ s), f x)⁻¹


@[to_additive]
theorem Subsingleton.eq_one [One α] [Subsingleton α] (a : α) : a = 1

{α : Type u_1}
[One α]
[Subsingleton α]
(a : α)


/-- Left invariant Borel measures on a measurable group are unique (up to a scalar). -/
@[to_additive
" Left invariant Borel measures on an additive measurable group are unique (up to a scalar). "]
theorem measure_eq_div_smul (h2s : ν' s ≠ 0) (h3s : ν' s ≠ ∞) :
    μ' = (μ' s / ν' s) • ν'

{G : Type u_1}
[MeasurableSpace G]
[AddGroup G]
[MeasurableAdd₂ G]
{s : Set G}
[MeasurableNeg G]
(μ' ν' : MeasureTheory.Measure G)
[MeasureTheory.SigmaFinite μ']
[MeasureTheory.SigmaFinite ν']
[μ'.IsAddLeftInvariant]
[ν'.IsAddLeftInvariant]
(h2s : ν' s ≠ 0)
(h3s : ν' s ≠ ⊤)


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

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

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


theorem tendsto_finset_preimage_atTop_atTop {f : α → β} (hf : Function.Injective f) :
    Tendsto (fun s : Finset β => s.preimage f (hf.injOn)) atTop atTop

{α : Type u_3}
{β : Type u_4}
{f : α → β}
(hf : Function.Injective f)

Filter.Tendsto (fun s => s.preimage f ⋯) Filter.atTop Filter.atTop


@[simp]
lemma nnnorm_id [Nontrivial E] : ‖id 𝕜 E‖₊ = 1

{𝕜 : Type u_1}
{E : Type u_4}
[NormedAddCommGroup E]
[NontriviallyNormedField 𝕜]
[NormedSpace 𝕜 E]
[Nontrivial E]


lemma sq_sub_sq (a b : R) : a ^ 2 - b ^ 2 = (a + b) * (a - b)


/-- An affine combination over `s.filter pred` equals one over `s` if all the weights at indices
in `s` not satisfying `pred` are zero. -/
theorem affineCombination_filter_of_ne (w : ι → k) (p : ι → P) {pred : ι → Prop}
    [DecidablePred pred] (h : ∀ i ∈ s, w i ≠ 0 → pred i) :
    (s.filter pred).affineCombination k p w = s.affineCombination k p w

{k : Type u_1}
{V : Type u_2}
{P : Type u_3}
[Ring k]
[AddCommGroup V]
[Module k V]
[S : AffineSpace V P]
{ι : Type u_4}
(s : Finset ι)
(w : ι → k)
(p : ι → P)
{pred : ι → Prop}
[DecidablePred pred]
(h : ∀ i ∈ s, w i ≠ 0 → pred i)

(Finset.affineCombination k (Finset.filter pred s) p) w = (Finset.affineCombination k s p) w


lemma iInf_coe_lt_top : ⨅ i, (f i : ℕ∞) < ⊤ ↔ Nonempty ι


theorem ascFactorial_eq_factorial_mul_choose (n k : ℕ) :
    (n + 1).ascFactorial k = k ! * (n + k).choose k


theorem add_dioph : DiophFn fun v => f v + g v

{α : Type}
{f g : (α → ℕ) → ℕ}
(df : Dioph.DiophFn f)
(dg : Dioph.DiophFn g)


theorem _root_.MulAut.conjNormal_val {H : Subgroup G} [H.Normal] {h : H} :
    MulAut.conjNormal ↑h = MulAut.conj h

{G : Type u_3}
[Group G]
{H : Subgroup G}
[H.Normal]
{h : ↥H}


/-- The empty set is cospherical. -/
theorem cospherical_empty [Nonempty P] : Cospherical (∅ : Set P)

{P : Type u_2}
[MetricSpace P]
[Nonempty P]


theorem foldl_induction
    {as : Array α} (motive : Nat → β → Prop) {init : β} (h0 : motive 0 init) {f : β → α → β}
    (hf : ∀ i : Fin as.size, ∀ b, motive i.1 b → motive (i.1 + 1) (f b as[i])) :
    motive as.size (as.foldl f init)

{f : β → α → β}

(hf : ∀ (i : Fin as.size) (b : β), motive (↑i) b → motive (↑i + 1) (f b as[i]))

motive as.size (Array.foldlM.loop f as as.size ⋯ i j b)


@[simp]
theorem bihimp_le_iff_right : a ⇔ b ≤ b ↔ Codisjoint a b

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


theorem associatesNonZeroDivisorsEquivIsPrincipal_coe (x : Associates R⁰) :
    (associatesNonZeroDivisorsEquivIsPrincipal R x : Ideal R) =
      (associatesEquivIsPrincipal R (associatesNonZeroDivisorsEquiv.symm x))

{R : Type u_1}
[CommRing R]
[IsDomain R]
(x : Associates ↥(nonZeroDivisors R))

↑↑((Ideal.associatesNonZeroDivisorsEquivIsPrincipal R) x) =
  ↑((Ideal.associatesEquivIsPrincipal R) ↑(associatesNonZeroDivisorsEquiv.symm x))


theorem includeLeftRingHom_comp_algebraMap :
    (includeLeftRingHom.comp (algebraMap R A) : R →+* A ⊗[R] B) =
      includeRight.toRingHom.comp (algebraMap R B)

{R : Type uR}
{A : Type uA}
{B : Type uB}
[CommSemiring R]
[Semiring A]
[Algebra R A]
[Semiring B]
[Algebra R B]

Algebra.TensorProduct.includeLeftRingHom.comp (algebraMap R A) =
  Algebra.TensorProduct.includeRight.comp (algebraMap R B)


lemma discrim_eq_sq_of_quadratic_eq_zero {x : R} (h : a * x * x + b * x + c = 0) :
    discrim a b c = (2 * a * x + b) ^ 2

{R : Type u_1}
[CommRing R]
{a b c x : R}
(h : a * x * x + b * x + c = 0)


@[simp]
theorem coe_forget_to_semilatInf (X : BddLat) :
    ↥((forget₂ BddLat SemilatInfCat).obj X) = ↥X

((CategoryTheory.forget₂ BddLat SemilatInfCat).obj X).X = ↑X.toLat


@[to_additive]
lemma div_subset_range {s t : Set β} (hs : s ⊆ range m) (ht : t ⊆ range m) : s / t ⊆ range m

{F : Type u_1}
{α : Type u_2}
{β : Type u_3}
[AddGroup α]
[SubtractionMonoid β]
[FunLike F α β]
[AddMonoidHomClass F α β]
(m : F)
{s t : Set β}
(hs : s ⊆ Set.range ⇑m)
(ht : t ⊆ Set.range ⇑m)


@[local simp] protected theorem mul_neg (a b : Int) : a * -b = -(a * b)


theorem OrderEmbedding.image_Iic (e : α ↪o β) (he : IsLowerSet (range e)) (a : α) :
    e '' Iic a = Iic (e a)

{α : Type u_1}
{β : Type u_2}
[Preorder α]
[Preorder β]
(e : α ↪o β)
(he : IsLowerSet (Set.range ⇑e))
(a : α)


theorem mdifferentiable_chart (x : M) : (chartAt H x).MDifferentiable I I

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

PartialHomeomorph.MDifferentiable I I (chartAt H x)


@[to_additive]
theorem one_div_mul_one_div_rev : 1 / a * (1 / b) = 1 / (b * a)

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


theorem ofNat_val_mul {x y : Fin n} :
    (((x * y : Fin n)) : Int) = ((x : Int) * (y : Int)) % n


/-- The colimit of a functor into a complete lattice is the supremum of the objects in the image.
-/
theorem colimit_eq_iSup (F : J ⥤ α) : colimit F = iSup F.obj

{α : Type u}
[CompleteLattice α]
{J : Type u}
[CategoryTheory.SmallCategory J]
(F : J ⥤ α)

CategoryTheory.Limits.colimit F = iSup F.obj


theorem IsBigO.prod_left_snd : (fun x => (f' x, g' x)) =O[l] k' → g' =O[l] k'

{α : Type u_1}
{E' : Type u_6}
{F' : Type u_7}
{G' : Type u_8}
[SeminormedAddCommGroup E']
[SeminormedAddCommGroup F']
[SeminormedAddCommGroup G']
{f' : α → E'}
{g' : α → F'}
{k' : α → G'}
{l : Filter α}


theorem invOf_mul_eq_iff_eq_mul_left : ⅟c * a = b ↔ a = c * b

{α : Type u}
[Monoid α]
{a b c : α}
[Invertible c]


theorem coe_copy (f : Ω^ N X x) {g : (I^N) → X} (h : g = f) : ⇑(copy f g h) = g

{N : Type u_1}
{X : Type u_2}
[TopologicalSpace X]
{x : X}
(f : ↑(Ω^ N X x))
{g : (N → ↑I) → X}
(h : g = ⇑f)


theorem intCast_def [Ring k] [MulOneClass G] (z : ℤ) :
    (z : MonoidAlgebra k G) = single (1 : G) (z : k)

{k : Type u₁}
{G : Type u₂}
[Ring k]
[MulOneClass G]
(z : ℤ)


@[simp]
theorem coe_toMonoidWithZeroHom : ⇑abv.toMonoidWithZeroHom = abv

{R : Type u_5}
{S : Type u_6}
[Semiring R]
[OrderedRing S]
(abv : AbsoluteValue R S)
[IsDomain S]
[Nontrivial R]


theorem Adapted.upcrossingStrat_adapted (hf : Adapted ℱ f) :
    Adapted ℱ (upcrossingStrat a b f N)

{Ω : Type u_1}
{m0 : MeasurableSpace Ω}
{a b : ℝ}
{f : ℕ → Ω → ℝ}
{N : ℕ}
{ℱ : MeasureTheory.Filtration ℕ m0}
(hf : MeasureTheory.Adapted ℱ f)

MeasureTheory.Adapted ℱ (MeasureTheory.upcrossingStrat a b f N)


@[simp]
theorem eLpNormEssSup_zero : eLpNormEssSup (0 : α → F) μ = 0

{α : Type u_1}
{F : Type u_3}
{m0 : MeasurableSpace α}
{μ : MeasureTheory.Measure α}
[NormedAddCommGroup F]


theorem le_of_opNNNorm_le {C : ℝ≥0} (h : ‖f‖₊ ≤ C) : ‖f m‖₊ ≤ C * ∏ i, ‖m i‖₊

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

‖f m‖₊ ≤ C * ∏ i : ι, ‖m i‖₊


theorem Algebra.IsSeparable.isIntegral [Algebra.IsSeparable F K] : ∀ x : K, IsIntegral F x

(F : Type u_1)
{K : Type u_2}
[CommRing F]
[Ring K]
[Algebra F K]
[Algebra.IsSeparable F K]
(x : K)


theorem fuzzy_zero_iff_lf : G ‖ 0 ↔ G ⧏ 0


@[simp]
theorem limit.cone_x {F : J ⥤ C} [HasLimit F] : (limit.cone F).pt = limit F

{J : Type u₁}
[CategoryTheory.Category.{v₁, u₁} J]
{C : Type u}
[CategoryTheory.Category.{v, u} C]
{F : J ⥤ C}
[CategoryTheory.Limits.HasLimit F]

(CategoryTheory.Limits.limit.cone F).pt = CategoryTheory.Limits.limit F


theorem log_pow {x : ℝ≥0∞} {n : ℕ} : log (x ^ n) = n * log x


@[simp]
theorem ofFinsupp_eq_one {a} : (⟨a⟩ : R[X]) = 1 ↔ a = 1


@[simp]
theorem apply_symm_apply (c : M₂) : e (e.symm c) = c

{R : Type u_1}
{S : Type u_7}
{M : Type u_8}
{M₂ : Type u_10}
[Semiring R]
[Semiring S]
[AddCommMonoid M]
[AddCommMonoid M₂]
{module_M : Module R M}
{module_S_M₂ : Module S M₂}
{σ : R →+* S}
{σ' : S →+* R}
{re₁ : RingHomInvPair σ σ'}
{re₂ : RingHomInvPair σ' σ}
(e : M ≃ₛₗ[σ] M₂)
(c : M₂)


@[simp]
nonrec theorem lcm_eq_zero_iff [Nontrivial α] (s : Multiset α) : s.lcm = 0 ↔ (0 : α) ∈ s

{α : Type u_1}
[CancelCommMonoidWithZero α]
[NormalizedGCDMonoid α]
[Nontrivial α]
(s : Multiset α)


theorem LineDifferentiableWithinAt.mono (h : LineDifferentiableWithinAt 𝕜 f t x v) (st : s ⊆ t) :
    LineDifferentiableWithinAt 𝕜 f s x v


theorem not_le_zero_iff {z : ℂ} : ¬z ≤ 0 ↔ 0 < z.re ∨ z.im ≠ 0


@[to_additive (attr := simp)]
theorem toList_ofList (l : List α) : toList (ofList l) = l

FreeAddMonoid.toList (FreeAddMonoid.ofList l) = l


theorem Set.Countable.isGδ_compl {s : Set X} [T1Space X] (hs : s.Countable) : IsGδ sᶜ

{X : Type u_1}
[TopologicalSpace X]
{s : Set X}
[T1Space X]
(hs : s.Countable)


theorem getElem?_append_right : ∀ {l₁ l₂ : List α} {n : Nat}, l₁.length ≤ n →
  (l₁ ++ l₂)[n]? = l₂[n - l₁.length]?

{α : Type u_1}
{l₁ l₂ : List α}
{n : Nat}


@[simp]
lemma dualSubmoduleParing_spec {N : Submodule R M} (x : B.dualSubmodule N) (y : N) :
    algebraMap R S (B.dualSubmoduleParing x y) = B x y

{R : Type u_1}
{S : Type u_3}
{M : Type u_2}
[CommRing R]
[Field S]
[AddCommGroup M]
[Algebra R S]
[Module R M]
[Module S M]
[IsScalarTower R S M]
(B : LinearMap.BilinForm S M)
{N : Submodule R M}
(x : ↥(B.dualSubmodule N))
(y : ↥N)

(algebraMap R S) (B.dualSubmoduleParing x y) = (B ↑x) ↑y


theorem laurent_laurent : laurent r (laurent s f) = laurent (r + s) f

{R : Type u}
[CommRing R]
[hdomain : IsDomain R]
(r s : R)
(f : RatFunc R)

(RatFunc.laurent r) ((RatFunc.laurent s) f) = (RatFunc.laurent (r + s)) f


theorem lt_of_lt_of_eq {a b c : α} [LT α] (h₁ : a < b) (h₂ : b = c) : a < c

{α : Type u}
{a b c : α}
[LT α]
(h₁ : a < b)
(h₂ : b = c)


/-- The category of cocones on `F` is just the comma category `(F ↓ Δ)`, where `Δ` is the constant
    functor. -/
@[simps! (config := { notRecursive := [`PLift, `ULift] })]
def Cocone.equivStructuredArrow (F : J ⥤ C) : Cocone F ≌ StructuredArrow F (const J)

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

((CategoryTheory.Limits.Cocone.equivStructuredArrow F).functor.obj c).right = c.pt


/-- This property implies `IsRatCondKernelCDF`. The measurability, integrability and integral
conditions are the same, but the limit properties of `IsRatCondKernelCDF` are replaced by
limits of integrals. -/
structure IsRatCondKernelCDFAux (f : α × β → ℚ → ℝ) (κ : Kernel α (β × ℝ)) (ν : Kernel α β) :
    Prop :=
  measurable : Measurable f
  mono' (a : α) {q r : ℚ} (_hqr : q ≤ r) : ∀ᵐ c ∂(ν a), f (a, c) q ≤ f (a, c) r
  nonneg' (a : α) (q : ℚ) : ∀ᵐ c ∂(ν a), 0 ≤ f (a, c) q
  le_one' (a : α) (q : ℚ) : ∀ᵐ c ∂(ν a), f (a, c) q ≤ 1
  /- Same as `Tendsto (fun q : ℚ ↦ ∫ c, f (a, c) q ∂(ν a)) atBot (𝓝 0)` but slightly easier
  to prove in the current applications of this definition (some integral convergence lemmas
  currently apply only to `ℕ`, not `ℚ`) -/
  tendsto_integral_of_antitone (a : α) (seq : ℕ → ℚ) (_hs : Antitone seq)
    (_hs_tendsto : Tendsto seq atTop atBot) :
    Tendsto (fun m ↦ ∫ c, f (a, c) (seq m) ∂(ν a)) atTop (𝓝 0)
  /- Same as `Tendsto (fun q : ℚ ↦ ∫ c, f (a, c) q ∂(ν a)) atTop (𝓝 (ν a univ).toReal)` but
  slightly easier to prove in the current applications of this definition (some integral convergence
  lemmas currently apply only to `ℕ`, not `ℚ`) -/
  tendsto_integral_of_monotone (a : α) (seq : ℕ → ℚ) (_hs : Monotone seq)
    (_hs_tendsto : Tendsto seq atTop atTop) :
    Tendsto (fun m ↦ ∫ c, f (a, c) (seq m) ∂(ν a)) atTop (𝓝 (ν a univ).toReal)
  integrable (a : α) (q : ℚ) : Integrable (fun c ↦ f (a, c) q) (ν a)
  setIntegral (a : α) {A : Set β} (_hA : MeasurableSet A) (q : ℚ) :
    ∫ c in A, f (a, c) q ∂(ν a) = (κ a (A ×ˢ Iic ↑q)).toReal

{f : α × β → ℚ → ℝ}

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

(self : ProbabilityTheory.IsRatCondKernelCDFAux f κ ν)

(_hs_tendsto : Filter.Tendsto seq Filter.atTop Filter.atBot)

Filter.Tendsto (fun m => ∫ (c : β), f (a, c) (seq m) ∂ν a) Filter.atTop (𝓝 0)


lemma eq_neg_one_or_eq_zero_or_eq_one_of_eq_smul (k : K) (h : (β : H → K) = k • α) :
    k = -1 ∨ k = 0 ∨ k = 1

{K : Type u_1}
{L : Type u_2}
[Field K]
[CharZero K]
[LieRing L]
[LieAlgebra K L]
[LieAlgebra.IsKilling K L]
[FiniteDimensional K L]
{H : LieSubalgebra K L}
[H.IsCartanSubalgebra]
[LieModule.IsTriangularizable K (↥H) L]
(α β : LieModule.Weight K (↥H) L)
(hα : α.IsNonZero)
(k : K)
(h : ⇑β = k • ⇑α)


@[to_additive]
theorem coe_smul {α M : Type*} [MulOneClass M] [SMul α M] [IsScalarTower α M M] (c : Con M)
    (a : α) (x : M) : (↑(a • x) : c.Quotient) = a • (x : c.Quotient)

{α : Type u_4}
{M : Type u_5}
[MulOneClass M]
[SMul α M]
[IsScalarTower α M M]
(c : Con M)
(a : α)
(x : M)


theorem irreducible_of_mem_factorSet {p : Associates α} {s : FactorSet α} (h : p ∈ s) :
    Irreducible p

{α : Type u_1}
[CancelCommMonoidWithZero α]
{p : Associates α}
{s : Associates.FactorSet α}
(h : p ∈ s)


@[simp]
theorem IsReal.coe_embedding_apply {φ : K →+* ℂ} (hφ : IsReal φ) (x : K) :
    (hφ.embedding x : ℂ) = φ x

(hφ : NumberField.ComplexEmbedding.IsReal φ)


@[simp] theorem count_replicate_self (a : α) (n : Nat) : count a (replicate n a) = n

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


/-- A simplicial object that is isomorphic to a split simplicial object is split. -/
@[simps]
def ofIso (e : X ≅ Y) : Splitting Y

{X Y : CategoryTheory.SimplicialObject C}


theorem max_lt_max (h₁ : a < c) (h₂ : b < d) : max a b < max c d

{α : Type u}
[LinearOrder α]
{a b c d : α}
(h₁ : a < c)
(h₂ : b < d)


lemma IsRatCondKernelCDFAux.measurable_right (hf : IsRatCondKernelCDFAux f κ ν) (a : α) (q : ℚ) :
    Measurable (fun t ↦ f (a, t) q)

{f : α × β → ℚ → ℝ}

(hf : ProbabilityTheory.IsRatCondKernelCDFAux f κ ν)


theorem toLinearPMap_domain (g : Submodule R (E × F)) :
    g.toLinearPMap.domain = g.map (LinearMap.fst R E F)

{R : Type u_1}
[Ring R]
{E : Type u_2}
[AddCommGroup E]
[Module R E]
{F : Type u_3}
[AddCommGroup F]
[Module R F]
(g : Submodule R (E × F))

g.toLinearPMap.domain = Submodule.map (LinearMap.fst R E F) g


@[simp]
lemma binaryProductIso_hom_comp_fst :
    (binaryProductIso F G).hom ≫ prod.fst = Limits.prod.fst

(F G : CategoryTheory.Functor C (Type w))

CategoryTheory.CategoryStruct.comp (CategoryTheory.FunctorToTypes.binaryProductIso F G).hom
    CategoryTheory.FunctorToTypes.prod.fst =
  CategoryTheory.Limits.prod.fst


/-- **First moment method**. The maximum of an integrable function is greater than its mean, while
avoiding a null set. -/
theorem exists_not_mem_null_average_le (hμ : μ ≠ 0) (hf : Integrable f μ) (hN : μ N = 0) :
    ∃ x, x ∉ N ∧ ⨍ a, f a ∂μ ≤ f x

{α : Type u_1}
{m0 : MeasurableSpace α}
{μ : MeasureTheory.Measure α}
{N : Set α}
{f : α → ℝ}
[MeasureTheory.IsFiniteMeasure μ]
(hμ : μ ≠ 0)
(hf : MeasureTheory.Integrable f μ)
(hN : μ N = 0)


/-- Local homeomorphism between a real (semi)normed space and the unit ball.
See also `Homeomorph.unitBall`. -/
@[simps (config := .lemmasOnly)]
def PartialHomeomorph.univUnitBall : PartialHomeomorph E E

{E : Type u_1}
[SeminormedAddCommGroup E]
[NormedSpace ℝ E]

PartialHomeomorph.univUnitBall.target = Metric.ball 0 1


theorem mem_support_filter_iff {a : α} : a ∈ (p.filter s h).support ↔ a ∈ s ∧ a ∈ p.support

{α : Type u_1}
{p : PMF α}
{s : Set α}
(h : ∃ a ∈ s, a ∈ p.support)
{a : α}


/-- Two `AlgHom`s out of a direct sum are equal if they agree on the generators.

See note [partially-applied ext lemmas]. -/
@[ext]
theorem algHom_ext' ⦃f g : (⨁ i, A i) →ₐ[R] B⦄
    (h : ∀ i, f.toLinearMap.comp (lof _ _ A i) = g.toLinearMap.comp (lof _ _ A i)) : f = g

⦃f g : (DirectSum ι fun i => A i) →ₐ[R] B⦄

(h : ∀ (i : ι), f.toLinearMap ∘ₗ DirectSum.lof R ι A i = g.toLinearMap ∘ₗ DirectSum.lof R ι A i)


/-- The coercion `LevyProkhorov (ProbabilityMeasure Ω) → ProbabilityMeasure Ω` is continuous. -/
lemma LevyProkhorov.continuous_toProbabilityMeasure :
    Continuous (LevyProkhorov.toProbabilityMeasure (Ω := Ω))

{Ω : Type u_2}
[MeasurableSpace Ω]
[PseudoMetricSpace Ω]
[OpensMeasurableSpace Ω]


lemma compProd_add_left (μ κ : Kernel α β) (η : Kernel (α × β) γ)
    [IsSFiniteKernel μ] [IsSFiniteKernel κ] [IsSFiniteKernel η] :
    (μ + κ) ⊗ₖ η = μ ⊗ₖ η + κ ⊗ₖ η

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

(μ + κ).compProd η = μ.compProd η + κ.compProd η


theorem leadingCoeff_mul_monic {p q : R[X]} (hq : Monic q) :
    leadingCoeff (p * q) = leadingCoeff p

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


@[simp] theorem not_concat (x : BitVec w) (b : Bool) : ~~~(concat x b) = concat (~~~x) !b


@[simp]
theorem mul_cancel_left_mem_nonZeroDivisors {x y r : R'} (hr : r ∈ R'⁰) :
    r * x = r * y ↔ x = y

{R' : Type u_6}
[CommRing R']
{x y r : R'}
(hr : r ∈ R'⁰)


@[simp]
theorem sum_obj_inl (F : A ⥤ B) (G : C ⥤ D) (a : A) : (F.sum G).obj (inl a) = inl (F.obj a)

{A : Type u₁}
[CategoryTheory.Category.{v₁, u₁} A]
{B : Type u₁}
[CategoryTheory.Category.{v₁, u₁} B]
{C : Type u₁}
[CategoryTheory.Category.{v₁, u₁} C]
{D : Type u₁}
[CategoryTheory.Category.{v₁, u₁} D]
(F : CategoryTheory.Functor A B)
(G : CategoryTheory.Functor C D)
(a : A)

(F.sum G).obj (Sum.inl a) = Sum.inl (F.obj a)


@[simp]
theorem sheafificationWhiskerLeftIso_hom_app (P : Cᵒᵖ ⥤ D) (F : D ⥤ E)
    [∀ (F : D ⥤ E) (X : C), PreservesColimitsOfShape (J.Cover X)ᵒᵖ F]
    [∀ (F : D ⥤ E) (X : C) (W : J.Cover X) (P : Cᵒᵖ ⥤ D),
        PreservesLimit (W.index P).multicospan F] :
    (sheafificationWhiskerLeftIso J P).hom.app F = (J.sheafifyCompIso F P).hom

(J : CategoryTheory.GrothendieckTopology C)

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

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

[∀ (α β : Type (max v u)) (fst snd : β → α),
    CategoryTheory.Limits.HasLimitsOfShape (CategoryTheory.Limits.WalkingMulticospan fst snd) D]

[∀ (α β : Type (max v u)) (fst snd : β → α),
    CategoryTheory.Limits.HasLimitsOfShape (CategoryTheory.Limits.WalkingMulticospan fst snd) E]

[∀ (X : C), CategoryTheory.Limits.HasColimitsOfShape (J.Cover X)ᵒᵖ D]

[∀ (X : C), CategoryTheory.Limits.HasColimitsOfShape (J.Cover X)ᵒᵖ E]

[(F : CategoryTheory.Functor D E) → (X : C) → CategoryTheory.Limits.PreservesColimitsOfShape (J.Cover X)ᵒᵖ F]

[(F : CategoryTheory.Functor D E) →
    (X : C) →
      (W : J.Cover X) →
        (P : CategoryTheory.Functor Cᵒᵖ D) → CategoryTheory.Limits.PreservesLimit (W.index P).multicospan F]

(J.sheafificationWhiskerLeftIso P).hom.app F = (J.sheafifyCompIso F P).hom


theorem HasFDerivAt.rpow (hf : HasFDerivAt f f' x) (hg : HasFDerivAt g g' x) (h : 0 < f x) :
    HasFDerivAt (fun x => f x ^ g x)
      ((g x * f x ^ (g x - 1)) • f' + (f x ^ g x * Real.log (f x)) • g') x

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


theorem Perm.union {l₁ l₂ t₁ t₂ : List α} (p₁ : l₁ ~ l₂) (p₂ : t₁ ~ t₂) : l₁ ∪ t₁ ~ l₂ ∪ t₂

{α : Type u_1}
[DecidableEq α]
{l₁ l₂ t₁ t₂ : List α}
(p₁ : l₁ ~ l₂)
(p₂ : t₁ ~ t₂)

l₁ ∪ t₁ ~ l₂ ∪ t₂


theorem uniformEquicontinuous_finite [Finite ι] {F : ι → β → α} :
    UniformEquicontinuous F ↔ ∀ i, UniformContinuous (F i)

{ι : Type u_1}
{α : Type u_7}
{β : Type u_9}
[uα : UniformSpace α]
[uβ : UniformSpace β]
[Finite ι]
{F : ι → β → α}

UniformEquicontinuous F ↔ ∀ (i : ι), UniformContinuous (F i)


/-- The cartesian product of two alternating maps, as an alternating map. -/
@[simps!]
def prod (f : M [⋀^ι]→ₗ[R] N) (g : M [⋀^ι]→ₗ[R] P) : M [⋀^ι]→ₗ[R] (N × P)

{R : Type u_1}
[Semiring R]
{M : Type u_2}
[AddCommMonoid M]
[Module R M]
{N : Type u_3}
[AddCommMonoid N]
[Module R N]
{P : Type u_4}
[AddCommMonoid P]
[Module R P]
{ι : Type u_7}
(f : M [⋀^ι]→ₗ[R] N)
(g : M [⋀^ι]→ₗ[R] P)
(m : (i : ι) → (fun x => M) i)


@[reassoc]
theorem preserves_cokernel_iso_comp_cokernel_map {X' Y' : C} (g : X' ⟶ Y') [HasCokernel g]
    [HasCokernel (G.map g)] [PreservesColimit (parallelPair g 0) G] (p : X ⟶ X') (q : Y ⟶ Y')
    (hpq : f ≫ q = p ≫ g) :
    (PreservesCokernel.iso G _).hom ≫
        cokernel.map (G.map f) (G.map g) (G.map p) (G.map q)
          (by rw [← G.map_comp, hpq, G.map_comp]) =
      G.map (cokernel.map f g p q hpq) ≫ (PreservesCokernel.iso G _).hom

[CategoryTheory.Limits.PreservesColimit (CategoryTheory.Limits.parallelPair f 0) G]

[CategoryTheory.Limits.PreservesColimit (CategoryTheory.Limits.parallelPair g 0) G]

(CategoryTheory.Limits.PreservesCokernel.iso G f).hom ≫
    CategoryTheory.Limits.cokernel.map (G.map f) (G.map g) (G.map p) (G.map q) ⋯ =
  G.map (CategoryTheory.Limits.cokernel.map f g p q hpq) ≫ (CategoryTheory.Limits.PreservesCokernel.iso G g).hom


/-- The natural map from a Lie module to the derivations taking values in it. -/
@[simps!]
def inner : M →ₗ[R] LieDerivation R L M

(R : Type u_1)
(L : Type u_2)
(M : Type u_3)
[CommRing R]
[LieRing L]
[LieAlgebra R L]
[AddCommGroup M]
[Module R M]
[LieRingModule L M]
[LieModule R L M]
(m : M)

∀ (m_1 : L), ((LieDerivation.inner R L M) m) m_1 = ⁅m_1, m⁆


/-- When `f` is an isomorphism, the kernel of `f ≫ g` is isomorphic to the kernel of `g`.
-/
@[simps]
def kernelIsIsoComp {X Y Z : C} (f : X ⟶ Y) (g : Y ⟶ Z) [IsIso f] [HasKernel g] :
    kernel (f ≫ g) ≅ kernel g

(CategoryTheory.Limits.kernelIsIsoComp f g).inv =
  CategoryTheory.Limits.kernel.lift (f ≫ g) (CategoryTheory.Limits.kernel.ι g ≫ CategoryTheory.inv f) ⋯


theorem zero_addString_byteIdx (s : String) : ((0 : Pos) + s).byteIdx = s.utf8ByteSize


theorem SSameSide.wSameSide {s : AffineSubspace R P} {x y : P} (h : s.SSameSide x y) :
    s.WSameSide x y

{R : Type u_1}
{V : Type u_2}
{P : Type u_4}
[StrictOrderedCommRing R]
[AddCommGroup V]
[Module R V]
[AddTorsor V P]
{s : AffineSubspace R P}
{x y : P}
(h : s.SSameSide x y)


theorem mono_of_epi_of_mono_of_mono' (hR₁ : R₁.map' 0 2 = 0)
    (hR₁' : (mk₂ (R₁.map' 1 2) (R₁.map' 2 3)).Exact)
    (hR₂ : (mk₂ (R₂.map' 0 1) (R₂.map' 1 2)).Exact)
    (h₀ : Epi (app' φ 0)) (h₁ : Mono (app' φ 1)) (h₃ : Mono (app' φ 3)) :
    Mono (app' φ 2)

{R₁ R₂ : CategoryTheory.ComposableArrows C 3}

(hR₁' : (CategoryTheory.ComposableArrows.mk₂ (R₁.map' 1 2 ⋯ ⋯) (R₁.map' 2 3 ⋯ ⋯)).Exact)

(hR₂ : (CategoryTheory.ComposableArrows.mk₂ (R₂.map' 0 1 ⋯ ⋯) (R₂.map' 1 2 ⋯ ⋯)).Exact)

(h₀ : CategoryTheory.Epi (CategoryTheory.ComposableArrows.app' φ 0 ⋯))

(h₁ : CategoryTheory.Mono (CategoryTheory.ComposableArrows.app' φ 1 ⋯))

(h₃ : CategoryTheory.Mono (CategoryTheory.ComposableArrows.app' φ 3 ⋯))

CategoryTheory.Mono (CategoryTheory.ComposableArrows.app' φ 2 ⋯)


lemma natDegree_preΨ'_le (n : ℕ) : (W.preΨ' n).natDegree ≤ (n ^ 2 - if Even n then 4 else 1) / 2

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


@[simp, mono]
theorem coeSubmodule_le_coeSubmodule {I J : Ideal R} :
    coeSubmodule K I ≤ coeSubmodule K J ↔ I ≤ J

{R : Type u_1}
[CommRing R]
{K : Type u_5}
[CommRing K]
[Algebra R K]
[IsFractionRing R K]
{I J : Ideal R}

IsLocalization.coeSubmodule K I ≤ IsLocalization.coeSubmodule K J ↔ I ≤ J


@[simp]
protected theorem map_pow (f : Π i, s i →ₗ[R] s i) (n : ℕ) :
    map (f ^ n) = map f ^ n

{ι : Type u_1}
{R : Type u_4}
[CommSemiring R]
{s : ι → Type u_7}
[(i : ι) → AddCommMonoid (s i)]
[(i : ι) → Module R (s i)]
(f : (i : ι) → s i →ₗ[R] s i)
(n : ℕ)

PiTensorProduct.map (f ^ n) = PiTensorProduct.map f ^ n


@[to_additive]
theorem eq_prod_range_div' {M : Type*} [CommGroup M] (f : ℕ → M) (n : ℕ) :
    f n = ∏ i ∈ range (n + 1), if i = 0 then f 0 else f i / f (i - 1)

{M : Type u_6}
[AddCommGroup M]
(f : ℕ → M)
(n : ℕ)

f n = ∑ i ∈ Finset.range (n + 1), if i = 0 then f 0 else f i - f (i - 1)


@[simp (high)]
theorem coe_id (V : SemiNormedGrp) : (𝟙 V : V → V) = id


/-- Construct a cocone for the empty diagram given an object. -/
@[simps]
def asEmptyCocone (X : C) : Cocone (Functor.empty.{0} C)

(X_1 : CategoryTheory.Discrete PEmpty.{1})

(CategoryTheory.Limits.asEmptyCocone X).ι.app X_1 = id (CategoryTheory.Discrete.casesOn X_1 fun as => ⋯.elim)


/-- If `f` is a left-inverse of `g` then `map f` is a left-inverse of `map g`. -/
theorem map_leftInverse {f : R →+* S₁} {g : S₁ →+* R} (hf : Function.LeftInverse f g) :
    Function.LeftInverse (map f : MvPolynomial σ R → MvPolynomial σ S₁) (map g)

{R : Type u}
{S₁ : Type v}
{σ : Type u_1}
[CommSemiring R]
[CommSemiring S₁]
{f : R →+* S₁}
{g : S₁ →+* R}
(hf : Function.LeftInverse ⇑f ⇑g)

Function.LeftInverse ⇑(MvPolynomial.map f) ⇑(MvPolynomial.map g)


@[to_additive]
theorem SeminormedGroup.uniformCauchySeqOnFilter_iff_tendstoUniformlyOnFilter_one {f : ι → κ → G}
    {l : Filter ι} {l' : Filter κ} :
    UniformCauchySeqOnFilter f l l' ↔
      TendstoUniformlyOnFilter (fun n : ι × ι => fun z => f n.fst z / f n.snd z) 1 (l ×ˢ l) l'

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

UniformCauchySeqOnFilter f l l' ↔ TendstoUniformlyOnFilter (fun n z => f n.1 z / f n.2 z) 1 (l ×ˢ l) l'


lemma strictAnti_eulerMascheroniSeq' : StrictAnti eulerMascheroniSeq'


@[simp, fun_prop]
theorem Differentiable.inv' (hf : Differentiable 𝕜 h) (hz : ∀ x, h x ≠ 0) :
    Differentiable 𝕜 fun x => (h x)⁻¹

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{R : Type u_6}
[NormedDivisionRing R]
[NormedAlgebra 𝕜 R]
[CompleteSpace R]
{h : E → R}
(hf : Differentiable 𝕜 h)
(hz : ∀ (x : E), h x ≠ 0)


theorem Monovary.comp_monotone_left (h : Monovary f g) (hf : Monotone f') : Monovary (f' ∘ f) g

{ι : Type u_1}
{α : Type u_3}
{β : Type u_4}
{γ : Type u_5}
[Preorder α]
[Preorder β]
[Preorder γ]
{f : ι → α}
{f' : α → γ}
{g : ι → β}
(h : Monovary f g)
(hf : Monotone f')


lemma generateFrom_iUnion_memPartition (t : ℕ → Set α) :
    generateFrom (⋃ n, memPartition t n) = generateFrom (range t)

MeasurableSpace.generateFrom (⋃ n, memPartition t n) = MeasurableSpace.generateFrom (Set.range t)


@[simp]
theorem selfZPow_neg_natCast (d : ℕ) : selfZPow x B (-d) = mk' _ (1 : R) (Submonoid.pow x d)

{R : Type u_1}
[CommRing R]
(x : R)
(B : Type u_2)
[CommRing B]
[Algebra R B]
[IsLocalization.Away x B]
(d : ℕ)

selfZPow x B (-↑d) = IsLocalization.mk' B 1 (Submonoid.pow x d)


theorem sub_limZero {f g : CauSeq β abv} (hf : LimZero f) (hg : LimZero g) : LimZero (f - g)

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


@[simp, norm_cast]
theorem coe_inj : (f : Filter α) = g ↔ f = g


@[to_additive]
theorem index_eq_card : H.index = Nat.card (G ⧸ H)

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


protected theorem ge [LE α] {x y : α} (h : x ≤ y) : y ≥ x

{α : Type u_2}
[LE α]
{x y : α}
(h : x ≤ y)


@[simp]
lemma domDomRestrict_apply (f : MultilinearMap R M₁ M₂) (P : ι → Prop)
    [DecidablePred P] (x : (i : {a // P a}) → M₁ i) (z : (i : {a // ¬ P a}) → M₁ i) :
    f.domDomRestrict P z x = f (fun j => if h : P j then x ⟨j, h⟩ else z ⟨j, h⟩)

{R : Type uR}
{ι : Type uι}
{M₁ : ι → Type v₁}
{M₂ : Type v₂}
[Semiring R]
[(i : ι) → AddCommMonoid (M₁ i)]
[AddCommMonoid M₂]
[(i : ι) → Module R (M₁ i)]
[Module R M₂]
(f : MultilinearMap R M₁ M₂)
(P : ι → Prop)
[DecidablePred P]
(x : (i : { a // P a }) → M₁ ↑i)
(z : (i : { a // ¬P a }) → M₁ ↑i)

(f.domDomRestrict P z) x = f fun j => if h : P j then x ⟨j, h⟩ else z ⟨j, h⟩


@[simp] protected theorem min_self_assoc {m n : Nat} : min m (min m n) = min m n


@[to_additive (attr := simp)]
theorem OneHom.one_apply [One M] [One N] (x : M) : (1 : OneHom M N) x = 1

{M : Type u_4}
{N : Type u_5}
[One M]
[One N]
(x : M)


/-- A space is totally disconnected if all of its connected components are singletons. -/
@[mk_iff]
class TotallyDisconnectedSpace (α : Type u) [TopologicalSpace α] : Prop where
  /-- The universal set `Set.univ` in a totally disconnected space is totally disconnected. -/
  isTotallyDisconnected_univ : IsTotallyDisconnected (univ : Set α)

{α : Type u}
[TopologicalSpace α]
[self : TotallyDisconnectedSpace α]


@[simp] protected theorem pred_succ (n : Nat) : pred n.succ = n


theorem basicOpen_of_isUnit {U : Opens X} {f : X.presheaf.obj (op U)} (hf : IsUnit f) :
    X.basicOpen f = U

{U : TopologicalSpace.Opens ↑↑X.toPresheafedSpace}


/-- The obvious functor `(J ⥤ ShortComplex C) ⥤ ShortComplex (J ⥤ C)`. -/
@[simps]
def inverse : (J ⥤ ShortComplex C) ⥤ ShortComplex (J ⥤ C)

∀ {X Y : CategoryTheory.Functor J (CategoryTheory.ShortComplex C)} (φ : X ⟶ Y),
  ((CategoryTheory.ShortComplex.FunctorEquivalence.inverse J C).map φ).τ₂ =
    CategoryTheory.whiskerRight φ CategoryTheory.ShortComplex.π₂


@[simp]
theorem cosh_sub_sinh : cosh x - sinh x = exp (-x)

Complex.cosh x - Complex.sinh x = Complex.exp (-x)


theorem fiber_nonempty_iff_mem_image (f : α → β) (s : Finset α) (y : β) :
    (s.filter fun x => f x = y).Nonempty ↔ y ∈ s.image f

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

(Finset.filter (fun x => f x = y) s).Nonempty ↔ y ∈ Finset.image f s


/-- If a family is affinely independent, a point in the family is in
the span of some of the points given by a subset of the index type if
and only if that point's index is in the subset, if the underlying
ring is nontrivial. -/
@[simp]
protected theorem AffineIndependent.mem_affineSpan_iff [Nontrivial k] {p : ι → P}
    (ha : AffineIndependent k p) (i : ι) (s : Set ι) : p i ∈ affineSpan k (p '' s) ↔ i ∈ s

{k : Type u_1}
{V : Type u_2}
{P : Type u_3}
[Ring k]
[AddCommGroup V]
[Module k V]
[AffineSpace V P]
{ι : Type u_4}
[Nontrivial k]
{p : ι → P}
(ha : AffineIndependent k p)
(i : ι)
(s : Set ι)


/-- Auxiliary lemma in order to state `transferSylow_eq_pow`. -/
theorem transferSylow_eq_pow_aux (g : G) (hg : g ∈ P) (k : ℕ) (g₀ : G)
    (h : g₀⁻¹ * g ^ k * g₀ ∈ P) : g₀⁻¹ * g ^ k * g₀ = g ^ k

(hP : (↑P).normalizer ≤ Subgroup.centralizer ↑P)


@[simp]
theorem inv_apply_self (e : r ≃r r) (x) : e⁻¹ (e x) = x

{α : Type u_1}
{r : α → α → Prop}
(e : r ≃r r)
(x : α)


@[simp]
theorem curry_uncurry {n} (f : Function.OfArity α β n) :
    curry (uncurry f) = f

{α β : Type u}
{n : ℕ}
(f : Function.OfArity α β n)


@[to_additive (attr := simp)]
lemma piFinset_inv [∀ i, Inv (α i)] (s : ∀ i, Finset (α i)) :
    piFinset (fun i ↦ (s i)⁻¹) = (piFinset s)⁻¹

{ι : Type u_5}
{α : ι → Type u_6}
[Fintype ι]
[DecidableEq ι]
[(i : ι) → DecidableEq (α i)]
[(i : ι) → Neg (α i)]
(s : (i : ι) → Finset (α i))

(Fintype.piFinset fun i => -s i) = -Fintype.piFinset s


@[simp] theorem iff_self_and : (p ↔ p ∧ q) ↔ (p → q)


theorem affineIndependent_equiv {ι' : Type*} (e : ι ≃ ι') {p : ι' → P} :
    AffineIndependent k (p ∘ e) ↔ AffineIndependent k p

{k : Type u_1}
{V : Type u_2}
{P : Type u_3}
[Ring k]
[AddCommGroup V]
[Module k V]
[AffineSpace V P]
{ι : Type u_4}
{ι' : Type u_5}
(e : ι ≃ ι')
{p : ι' → P}

AffineIndependent k (p ∘ ⇑e) ↔ AffineIndependent k p


theorem compl_injective : Function.Injective (compl : α → α)


/-- **Equational criterion for flatness**
[Stacks 00HK](https://stacks.math.columbia.edu/tag/00HK), forward direction, alternate form.

Let $M$ be a flat module. Let $R^\iota$ be a finite free module, let $f \in R^{\iota}$ be an
element, and let $x \colon R^{\iota} \to M$ be a homomorphism such that $x(f) = 0$. Then there
exist a finite free module $R^\kappa$ and homomorphisms $a \colon R^{\iota} \to R^{\kappa}$ and
$y \colon R^{\kappa} \to M$ such that $x = y \circ a$ and $a(f) = 0$. -/
theorem exists_factorization_of_apply_eq_zero [Flat R M] {ι : Type u} [_root_.Finite ι]
    {f : ι →₀ R} {x : (ι →₀ R) →ₗ[R] M} (h : x f = 0) :
    ∃ (κ : Type u) (_ : Fintype κ) (a : (ι →₀ R) →ₗ[R] (κ →₀ R)) (y : (κ →₀ R) →ₗ[R] M),
      x = y ∘ₗ a ∧ a f = 0

{R M : Type u}
[CommRing R]
[AddCommGroup M]
[Module R M]
[Module.Flat R M]
{ι : Type u}
[Finite ι]
{f : ι →₀ R}
{x : (ι →₀ R) →ₗ[R] M}
(h : x f = 0)


@[to_additive]
theorem mk_surjective : Function.Surjective <| @mk _ _ s

{α : Type u_1}
[Group α]
{s : Subgroup α}


@[reassoc (attr := simp)]
lemma π_comp_hom (K₁ K₂ : Multicofork I) (f : K₁ ⟶ K₂) (b : I.R) : K₁.π b ≫ f.hom = K₂.π b

{I : CategoryTheory.Limits.MultispanIndex C}

(K₁ K₂ : CategoryTheory.Limits.Multicofork I)

CategoryTheory.CategoryStruct.comp (K₁.π b) f.hom = K₂.π b


theorem coeFnAddMonoidHom_injective : Function.Injective (coeFnAddMonoidHom 𝕜 E)

(𝕜 : Type u_3)
(E : Type u_7)
[SeminormedRing 𝕜]
[AddGroup E]
[SMul 𝕜 E]

Function.Injective ⇑(Seminorm.coeFnAddMonoidHom 𝕜 E)


theorem image2_lowerBounds_upperBounds_subset_lowerBounds_image2 :
    image2 f (lowerBounds s) (upperBounds t) ⊆ lowerBounds (image2 f s t)

{f : α → β → γ}

(h₀ : ∀ (b : β), Monotone (Function.swap f b))

Set.image2 f (lowerBounds s) (upperBounds t) ⊆ lowerBounds (Set.image2 f s t)


theorem isOpenMap_sum {f : X ⊕ Y → Z} :
    IsOpenMap f ↔ (IsOpenMap fun a => f (inl a)) ∧ IsOpenMap fun b => f (inr b)

{X : Type u}
{Y : Type v}
{Z : Type u_1}
[TopologicalSpace X]
[TopologicalSpace Y]
[TopologicalSpace Z]
{f : X ⊕ Y → Z}

IsOpenMap f ↔ (IsOpenMap fun a => f (Sum.inl a)) ∧ IsOpenMap fun b => f (Sum.inr b)


@[to_additive]
theorem rangeRestrict_surjective (f : G →* N) : Function.Surjective f.rangeRestrict

{G : Type u_1}
[AddGroup G]
{N : Type u_5}
[AddGroup N]
(f : G →+ N)


@[reassoc (attr := simp)]
lemma pOpcycles_opcyclesIsoSc'_inv :
    (K.sc' i j k).pOpcycles ≫ (K.opcyclesIsoSc' i j k hi hk).inv = K.pOpcycles j


lemma finset_sup_nhds_apply [SemilatticeSup L] [OrderBot L] [ContinuousSup L]
    (hs : ∀ i ∈ s, Tendsto (f i) l (𝓝 (g i))) :
    Tendsto (fun a ↦ s.sup (f · a)) l (𝓝 (s.sup g))

(hs : ∀ i ∈ s, Filter.Tendsto (f i) l (𝓝 (g i)))

Filter.Tendsto (fun a => s.sup fun x => f x a) l (𝓝 (s.sup g))


/-- An n-ary version of `Set.mul_mem_mul`. -/
@[to_additive " An n-ary version of `Set.add_mem_add`. "]
theorem finset_prod_mem_finset_prod (t : Finset ι) (f : ι → Set α) (g : ι → α)
    (hg : ∀ i ∈ t, g i ∈ f i) : (∏ i ∈ t, g i) ∈ ∏ i ∈ t, f i

{ι : Type u_1}
{α : Type u_2}
[AddCommMonoid α]
(t : Finset ι)
(f : ι → Set α)
(g : ι → α)
(hg : ∀ i ∈ t, g i ∈ f i)


@[simp]
theorem coe_copy (f : CentroidHom α) (f' : α → α) (h : f' = f) : ⇑(f.copy f' h) = f'

{α : Type u_5}
[NonUnitalNonAssocSemiring α]
(f : CentroidHom α)
(f' : α → α)
(h : f' = ⇑f)


theorem toCotangent_surjective : Function.Surjective I.toCotangent


@[simp] protected theorem not_lt {a b : Fin n} : ¬ a < b ↔ b ≤ a


@[simp]
theorem squarefree_natAbs {n : ℤ} : Squarefree n.natAbs ↔ Squarefree n


@[simp]
theorem map_Ici (f : α ≃o β) (a : α) : map f (Ici a) = Ici (f a)

{α : Type u_1}
{β : Type u_2}
[Preorder α]
[Preorder β]
(f : α ≃o β)
(a : α)

(UpperSet.map f) (UpperSet.Ici a) = UpperSet.Ici (f a)


theorem sigma_preimage_mk_of_subset {β : α → Type*} [DecidableEq α] (s : Finset (Σa, β a))
    {t : Finset α} (ht : s.image Sigma.fst ⊆ t) :
    (t.sigma fun a => s.preimage (Sigma.mk a) sigma_mk_injective.injOn) = s

{α : Type u}
{β : α → Type u_1}
[DecidableEq α]
(s : Finset ((a : α) × β a))
{t : Finset α}
(ht : Finset.image Sigma.fst s ⊆ t)

(t.sigma fun a => s.preimage (Sigma.mk a) ⋯) = s


theorem chart_target_mem_nhds (x : M) : (chartAt H x).target ∈ 𝓝 (chartAt H x x)

(H : Type u)
{M : Type u_2}
[TopologicalSpace H]
[TopologicalSpace M]
[ChartedSpace H M]
(x : M)

(chartAt H x).target ∈ 𝓝 (↑(chartAt H x) x)


/-- Evaluation of a continuous map `f` at a point `x` is continuous in `f`.

Porting note: merged `continuous_eval_const` with `continuous_eval_const'` removing unneeded
assumptions. -/
@[continuity]
theorem continuous_eval_const (a : X) : Continuous fun f : C(X, Y) => f a

{X : Type u_2}
{Y : Type u_3}
[TopologicalSpace X]
[TopologicalSpace Y]
(a : X)


@[to_additive]
theorem finprod_of_isEmpty [IsEmpty α] (f : α → M) : ∏ᶠ i, f i = 1

{M : Type u_2}
{α : Sort u_4}
[AddCommMonoid M]
[IsEmpty α]
(f : α → M)


/-- Let `m` be a sub-σ-algebra of `m0`, `f` an `m0`-measurable function and `g` an `m`-measurable
function, such that their integrals coincide on `m`-measurable sets with finite measure.
Then `∫⁻ x in s, ‖g x‖₊ ∂μ ≤ ∫⁻ x in s, ‖f x‖₊ ∂μ` on all `m`-measurable sets with finite
measure. -/
theorem lintegral_nnnorm_le_of_forall_fin_meas_integral_eq (hm : m ≤ m0) {f g : α → ℝ}
    (hf : StronglyMeasurable f) (hfi : IntegrableOn f s μ) (hg : StronglyMeasurable[m] g)
    (hgi : IntegrableOn g s μ)
    (hgf : ∀ t, MeasurableSet[m] t → μ t < ∞ → ∫ x in t, g x ∂μ = ∫ x in t, f x ∂μ)
    (hs : MeasurableSet[m] s) (hμs : μ s ≠ ∞) : (∫⁻ x in s, ‖g x‖₊ ∂μ) ≤ ∫⁻ x in s, ‖f x‖₊ ∂μ

(hf : MeasureTheory.StronglyMeasurable f)

(hfi : MeasureTheory.IntegrableOn f s μ)

(hg : MeasureTheory.StronglyMeasurable g)

(hgi : MeasureTheory.IntegrableOn g s μ)

(hgf : ∀ (t : Set α), MeasurableSet t → μ t < ⊤ → ∫ (x : α) in t, g x ∂μ = ∫ (x : α) in t, f x ∂μ)

∫⁻ (x : α) in s, ↑‖g x‖₊ ∂μ ≤ ∫⁻ (x : α) in s, ↑‖f x‖₊ ∂μ


theorem idealRange_eq_lieSpan_range : f.idealRange = LieSubmodule.lieSpan R L' f.range

{R : Type u}
{L : Type v}
{L' : Type w₂}
[CommRing R]
[LieRing L]
[LieAlgebra R L]
[LieRing L']
[LieAlgebra R L']
(f : L →ₗ⁅R⁆ L')

f.idealRange = LieSubmodule.lieSpan R L' ↑f.range


@[simp]
theorem coe_prodCongr (h₁ : X ≃ₜ X') (h₂ : Y ≃ₜ Y') : ⇑(h₁.prodCongr h₂) = Prod.map h₁ h₂

{X : Type u_1}
{Y : Type u_2}
[TopologicalSpace X]
[TopologicalSpace Y]
{X' : Type u_4}
{Y' : Type u_5}
[TopologicalSpace X']
[TopologicalSpace Y']
(h₁ : X ≃ₜ X')
(h₂ : Y ≃ₜ Y')


@[simp]
protected theorem coe_reindex (b : OrthonormalBasis ι 𝕜 E) (e : ι ≃ ι') :
    ⇑(b.reindex e) = b ∘ e.symm

{ι : Type u_1}
{ι' : Type u_2}
{𝕜 : Type u_3}
[RCLike 𝕜]
{E : Type u_4}
[NormedAddCommGroup E]
[InnerProductSpace 𝕜 E]
[Fintype ι]
[Fintype ι']
(b : OrthonormalBasis ι 𝕜 E)
(e : ι ≃ ι')


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

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


protected theorem IsGreatest.insert [LinearOrder γ] (a) {b} {s : Set γ} (hs : IsGreatest s b) :
    IsGreatest (insert a s) (max a b)

{γ : Type w}
[LinearOrder γ]
(a : γ)
{b : γ}
{s : Set γ}
(hs : IsGreatest s b)


/-- **Taylor's theorem** with a polynomial bound on the remainder

We assume that `f` is `n+1`-times continuously differentiable on the closed set `Icc a b`.
The difference of `f` and its `n`-th Taylor polynomial can be estimated by
`C * (x - a)^(n+1) / n!` where `C` is a bound for the `n+1`-th iterated derivative of `f`. -/
theorem taylor_mean_remainder_bound {f : ℝ → E} {a b C x : ℝ} {n : ℕ} (hab : a ≤ b)
    (hf : ContDiffOn ℝ (n + 1) f (Icc a b)) (hx : x ∈ Icc a b)
    (hC : ∀ y ∈ Icc a b, ‖iteratedDerivWithin (n + 1) f (Icc a b) y‖ ≤ C) :
    ‖f x - taylorWithinEval f n (Icc a b) a x‖ ≤ C * (x - a) ^ (n + 1) / n !

(hf : ContDiffOn ℝ (↑n + 1) f (Set.Icc a b))

(hC : ∀ y ∈ Set.Icc a b, ‖iteratedDerivWithin (n + 1) f (Set.Icc a b) y‖ ≤ C)

‖f x - taylorWithinEval f n (Set.Icc a b) a x‖ ≤ C * (x - a) ^ (n + 1) / ↑n !


theorem invOn_arg_expMapCircle : InvOn (arg ∘ (↑)) expMapCircle (Ioc (-π) π) univ

Set.InvOn (Complex.arg ∘ Subtype.val) (⇑expMapCircle) (Set.Ioc (-π) π) Set.univ


@[simp]
theorem neg_def {xl xr xL xR} : -mk xl xr xL xR = mk xr xl (fun j => -xR j) fun i => -xL i

{xl xr : Type u_1}
{xL : xl → SetTheory.PGame}
{xR : xr → SetTheory.PGame}

-SetTheory.PGame.mk xl xr xL xR = SetTheory.PGame.mk xr xl (fun j => -xR j) fun i => -xL i


@[simp]
theorem preimage_coe_Ioc : (some : α → WithTop α) ⁻¹' Ioc a b = Ioc a b

WithTop.some ⁻¹' Set.Ioc ↑a ↑b = Set.Ioc a b


@[mfld_simps]
theorem prod_inter_prod : s₁ ×ˢ t₁ ∩ s₂ ×ˢ t₂ = (s₁ ∩ s₂) ×ˢ (t₁ ∩ t₂)

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


/-- If `s ⊆ t` modulo a set of measure `0`, then `μ s ≤ μ t`. -/
@[mono]
theorem measure_mono_ae (H : s ≤ᵐ[μ] t) : μ s ≤ μ t

{α : Type u_1}
{F : Type u_3}
[FunLike F (Set α) ℝ≥0∞]
[MeasureTheory.OuterMeasureClass F α]
{μ : F}
{s t : Set α}
(H : s ≤ᵐ[μ] t)


@[ext] lemma ext (f g : AddChar A M) (h : ∀ x : A, f x = g x) : f = g

{A : Type u_1}
{M : Type u_3}
[AddMonoid A]
[Monoid M]
(f g : AddChar A M)
(h : ∀ (x : A), f x = g x)


theorem isUnit_primPart_C (r : R) : IsUnit (C r).primPart

{R : Type u_1}
[CommRing R]
[IsDomain R]
[NormalizedGCDMonoid R]
(r : R)


@[simp]
theorem iSup_iSup_eq_left {b : β} {f : ∀ x : β, x = b → α} : ⨆ x, ⨆ h : x = b, f x h = f b rfl

{α : Type u_1}
{β : Type u_2}
[CompleteLattice α]
{b : β}
{f : (x : β) → x = b → α}


lemma IsAbsoluteValue.abv_sum [Semiring R] [OrderedSemiring S] (abv : R → S) [IsAbsoluteValue abv]
    (f : ι → R) (s : Finset ι) : abv (∑ i ∈ s, f i) ≤ ∑ i ∈ s, abv (f i)

{ι : Type u_1}
{R : Type u_2}
{S : Type u_3}
[Semiring R]
[OrderedSemiring S]
(abv : R → S)
[IsAbsoluteValue abv]
(f : ι → R)
(s : Finset ι)


@[simp]
theorem bmod_add_cancel (x : Int) (n : Nat) : Int.bmod (x + n) n = Int.bmod x n


/-- The annihilator of a semisimple module over a commutative ring is a radical ideal. -/
theorem annihilator_isRadical (R) [CommRing R] [Module R M] [IsSemisimpleModule R M] :
    (Module.annihilator R M).IsRadical

(M : Type u_4)
[AddCommGroup M]
(R : Type u_6)
[CommRing R]
[Module R M]
[IsSemisimpleModule R M]


@[simp] lemma rangeInr_apply_inr (α : Type*) {β : Type*} (x : β) :
    (rangeInr α β) ⟨.inr x, mem_range_self _⟩ = x

(Equiv.Set.rangeInr α β) ⟨Sum.inr x, ⋯⟩ = x


theorem set_eq_take_cons_drop (a : α) {n l} (h : n < length l) :
    set l n a = take n l ++ a :: drop (n + 1) l

{α : Type u_1}
(a : α)
{n : Nat}
{l : List α}
(h : n < l.length)

l.set n a = List.take n l ++ a :: List.drop (n + 1) l


/-- The Chu-Vandermonde identity for binomial rings -/
theorem add_choose_eq [Ring R] [BinomialRing R] {r s : R} (k : ℕ) (h : Commute r s) :
    choose (r + s) k =
      ∑ ij ∈ antidiagonal k, choose r ij.1 * choose s ij.2

{R : Type u_1}
[Ring R]
[BinomialRing R]
{r s : R}
(k : ℕ)
(h : Commute r s)

Ring.choose (r + s) k = ∑ ij ∈ Finset.antidiagonal k, Ring.choose r ij.1 * Ring.choose s ij.2


theorem mem_of_get_eq {n : ℕ} {s : Stream' α} {a : α} : a = get s n → a ∈ s

{α : Type u}
{n : ℕ}
{s : Stream' α}
{a : α}


@[to_additive (attr := simp 1100)]
theorem closedBall_div_singleton : closedBall x δ / {y} = closedBall (x / y) δ

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

Metric.closedBall x δ - {y} = Metric.closedBall (x - y) δ


theorem const_add (f₁ f₂ g₁ g₂ : R) (U hu₁ hu₂) :
    const R f₁ g₁ U hu₁ + const R f₂ g₂ U hu₂ =
      const R (f₁ * g₂ + f₂ * g₁) (g₁ * g₂) U fun x hx =>
        Submonoid.mul_mem _ (hu₁ x hx) (hu₂ x hx)

(U : TopologicalSpace.Opens ↑(AlgebraicGeometry.PrimeSpectrum.Top R))

(hu₁ : ∀ x ∈ U, g₁ ∈ x.asIdeal.primeCompl)

(hu₂ : ∀ x ∈ U, g₂ ∈ x.asIdeal.primeCompl)

AlgebraicGeometry.StructureSheaf.const R f₁ g₁ U hu₁ + AlgebraicGeometry.StructureSheaf.const R f₂ g₂ U hu₂ =
  AlgebraicGeometry.StructureSheaf.const R (f₁ * g₂ + f₂ * g₁) (g₁ * g₂) U ⋯


/-- To every `S : J.Cover X` and presheaf `P`, associate a `MulticospanIndex`. -/
@[simps]
def index {D : Type u₁} [Category.{v₁} D] (S : J.Cover X) (P : Cᵒᵖ ⥤ D) :
    Limits.MulticospanIndex D

{J : CategoryTheory.GrothendieckTopology C}


@[simp] lemma comp_id (f : α →*₀ β) : f.comp (id α) = f

{α : Type u_2}
{β : Type u_3}
[MulZeroOneClass α]
[MulZeroOneClass β]
(f : α →*₀ β)


theorem not_and_eq : (¬ (p ∧ q)) = (p → ¬ q)


theorem mk_le_mk_of_comm {B A₁ A₂ : C} {f₁ : A₁ ⟶ B} {f₂ : A₂ ⟶ B} [Mono f₁] [Mono f₂] (g : A₁ ⟶ A₂)
    (w : g ≫ f₂ = f₁) : mk f₁ ≤ mk f₂

(w : CategoryTheory.CategoryStruct.comp g f₂ = f₁)

CategoryTheory.Subobject.mk f₁ ≤ CategoryTheory.Subobject.mk f₂


theorem inf'_mul_le_mul_inf'_of_nonneg (s : Finset ι) (H : s.Nonempty) (ha : ∀ i ∈ s, 0 ≤ a i)
    (hb : ∀ i ∈ s, 0 ≤ b i) : s.inf' H a * s.inf' H b ≤ s.inf' H (a * b)

{ι : Type u_1}
{R : Type u_2}
[LinearOrderedSemiring R]
{a b : ι → R}
(s : Finset ι)
(H : s.Nonempty)
(ha : ∀ i ∈ s, 0 ≤ a i)
(hb : ∀ i ∈ s, 0 ≤ b i)


@[to_additive Ico_add_Ioc_subset]
theorem Ico_mul_Ioc_subset' (a b c d : α) : Ico a b * Ioc c d ⊆ Ioo (a * c) (b * d)

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

[CovariantClass α α (Function.swap HMul.hMul) LT.lt]

Set.Ico a b * Set.Ioc c d ⊆ Set.Ioo (a * c) (b * d)


@[simp]
theorem blockDiag_zero : blockDiag (0 : Matrix (m × o) (n × o) α) = 0

{m : Type u_2}
{n : Type u_3}
{o : Type u_4}
{α : Type u_12}
[Zero α]


@[reassoc (attr := simp)]
lemma cyclesIsoSc'_hom_iCycles :
    (K.cyclesIsoSc' i j k hi hk).hom ≫ (K.sc' i j k).iCycles = K.iCycles j


theorem mem_of_mem_erase {a b : α} {s : Multiset α} : a ∈ s.erase b → a ∈ s

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


theorem IsAdjointPair.add (h : IsAdjointPair B B' f g) (h' : IsAdjointPair B B' f' g') :
    IsAdjointPair B B' (f + f') (g + g')

{R : Type u_1}
{M : Type u_2}
[CommSemiring R]
[AddCommMonoid M]
[Module R M]
{B : LinearMap.BilinForm R M}
{M' : Type u_9}
[AddCommMonoid M']
[Module R M']
{B' : LinearMap.BilinForm R M'}
{f f' : M →ₗ[R] M'}
{g g' : M' →ₗ[R] M}
(h : B.IsAdjointPair B' f g)
(h' : B.IsAdjointPair B' f' g')


theorem isPullback_of_cofan_isVanKampen [HasInitial C] {ι : Type*} {X : ι → C}
    {c : Cofan X} (hc : IsVanKampenColimit c) (i j : ι) [DecidableEq ι] :
    IsPullback (P := (if j = i then X i else ⊥_ C))
      (if h : j = i then eqToHom (if_pos h) else eqToHom (if_neg h) ≫ initial.to (X i))
      (if h : j = i then eqToHom ((if_pos h).trans (congr_arg X h.symm))
        else eqToHom (if_neg h) ≫ initial.to (X j))
      (Cofan.inj c i) (Cofan.inj c j)

(hc : CategoryTheory.IsVanKampenColimit c)

CategoryTheory.IsPullback
  (if h : j = i then CategoryTheory.eqToHom ⋯
  else CategoryTheory.CategoryStruct.comp (CategoryTheory.eqToHom ⋯) (CategoryTheory.Limits.initial.to (X i)))
  (if h : j = i then CategoryTheory.eqToHom ⋯
  else CategoryTheory.CategoryStruct.comp (CategoryTheory.eqToHom ⋯) (CategoryTheory.Limits.initial.to (X j)))
  (c.inj i) (c.inj j)


theorem iSup_rayleigh_eq_iSup_rayleigh_sphere {r : ℝ} (hr : 0 < r) :
    ⨆ x : { x : E // x ≠ 0 }, rayleighQuotient T x =
      ⨆ x : sphere (0 : E) r, rayleighQuotient T x

{𝕜 : Type u_1}
[RCLike 𝕜]
{E : Type u_2}
[NormedAddCommGroup E]
[InnerProductSpace 𝕜 E]
(T : E →L[𝕜] E)
{r : ℝ}
(hr : 0 < r)

⨆ x, T.rayleighQuotient ↑x = ⨆ x, T.rayleighQuotient ↑x


theorem rpow_le_rpow_iff (hx : 0 ≤ x) (hy : 0 ≤ y) (hz : 0 < z) : x ^ z ≤ y ^ z ↔ x ≤ y


theorem left_triangle_hom (e : a ≌ b) :
    leftZigzag e.unit.hom e.counit.hom = (λ_ e.hom).hom ≫ (ρ_ e.hom).inv

(e : CategoryTheory.Bicategory.Equivalence a b)

CategoryTheory.Bicategory.leftZigzag e.unit.hom e.counit.hom =
  CategoryTheory.CategoryStruct.comp (CategoryTheory.Bicategory.leftUnitor e.hom).hom
    (CategoryTheory.Bicategory.rightUnitor e.hom).inv


lemma odd_iff_exists_bit1 : Odd a ↔ ∃ b, a = 2 * b + 1


theorem functor_map_eq_iff [h : Congruence r] {X Y : C} (f f' : X ⟶ Y) :
    (functor r).map f = (functor r).map f' ↔ r f f'

{C : Type u_1}
[CategoryTheory.Category.{u_2, u_1} C]
(r : HomRel C)
[h : CategoryTheory.Congruence r]
{X Y : C}
(f f' : X ⟶ Y)

(CategoryTheory.Quotient.functor r).map f = (CategoryTheory.Quotient.functor r).map f' ↔ r f f'


theorem drop_take : ∀ t : HolorIndex (ds₁ ++ ds₂ ++ ds₃), t.assocRight.drop.take = t.take.drop

{ds₁ ds₂ ds₃ : List ℕ}
(t : HolorIndex (ds₁ ++ ds₂ ++ ds₃))


theorem IsCompactOperator.isCompact_closure_image_of_isVonNBounded [T2Space M₂] {f : M₁ →ₛₗ[σ₁₂] M₂}
    (hf : IsCompactOperator f) {S : Set M₁} (hS : IsVonNBounded 𝕜₁ S) :
    IsCompact (closure <| f '' S)

{𝕜₁ : Type u_1}
{𝕜₂ : Type u_2}
[NontriviallyNormedField 𝕜₁]
[SeminormedRing 𝕜₂]
{σ₁₂ : 𝕜₁ →+* 𝕜₂}
{M₁ : Type u_3}
{M₂ : Type u_4}
[TopologicalSpace M₁]
[AddCommMonoid M₁]
[TopologicalSpace M₂]
[AddCommMonoid M₂]
[Module 𝕜₁ M₁]
[Module 𝕜₂ M₂]
[ContinuousConstSMul 𝕜₂ M₂]
[T2Space M₂]
{f : M₁ →ₛₗ[σ₁₂] M₂}
(hf : IsCompactOperator ⇑f)
{S : Set M₁}
(hS : Bornology.IsVonNBounded 𝕜₁ S)


@[simp]
theorem dualDistrib_apply (f : Dual A M) (g : Dual R N) (m : M) (n : N) :
    dualDistrib R A M N (f ⊗ₜ g) (m ⊗ₜ n) = g n • f m

{R : Type u_1}
(A : Type u_2)
{M : Type u_3}
{N : Type u_4}
[CommSemiring R]
[CommSemiring A]
[Algebra R A]
[AddCommMonoid M]
[AddCommMonoid N]
[Module R M]
[Module A M]
[Module R N]
[IsScalarTower R A M]
(f : Module.Dual A M)
(g : Module.Dual R N)
(m : M)
(n : N)

((TensorProduct.AlgebraTensorModule.dualDistrib R A M N) (f ⊗ₜ[R] g)) (m ⊗ₜ[R] n) = g n • f m


theorem to_nhds_mono {u₁ u₂ : UniformSpace α} (h : u₁ ≤ u₂) (a : α) :
    @nhds _ (@UniformSpace.toTopologicalSpace _ u₁) a ≤
      @nhds _ (@UniformSpace.toTopologicalSpace _ u₂) a

{α : Type ua}
{u₁ u₂ : UniformSpace α}
(h : u₁ ≤ u₂)
(a : α)


@[to_additive]
theorem SemiconjBy.function_semiconj_mul_left (h : SemiconjBy a b c) :
    Function.Semiconj (a * ·) (b * ·) (c * ·)

{G : Type u_3}
[Semigroup G]
{a b c : G}
(h : SemiconjBy a b c)

Function.Semiconj (fun x => a * x) (fun x => b * x) fun x => c * x


theorem IsPrecomplete.prec (_ : IsPrecomplete I M) {f : ℕ → M} :
    (∀ {m n}, m ≤ n → f m ≡ f n [SMOD (I ^ m • ⊤ : Submodule R M)]) →
      ∃ L : M, ∀ n, f n ≡ L [SMOD (I ^ n • ⊤ : Submodule R M)]

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

IsPrecomplete I M →
  ∀ {f : ℕ → M}, (∀ {m n : ℕ}, m ≤ n → f m ≡ f n [SMOD I ^ m • ⊤]) → ∃ L, ∀ (n : ℕ), f n ≡ L [SMOD I ^ n • ⊤]


/-- In a normed ring, the coercion from `Rˣ` (equipped with the induced topology from the
embedding in `R × R`) to `R` is an open map. -/
theorem isOpenMap_val : IsOpenMap (val : Rˣ → R)

{R : Type u_1}
[NormedRing R]
[CompleteSpace R]


/-- The `n`-smooth numbers agree with the `primesBelow n`-factored numbers. -/
lemma smmoothNumbers_eq_factoredNumbers_primesBelow (n : ℕ) :
    smoothNumbers n = factoredNumbers n.primesBelow

n.smoothNumbers = Nat.factoredNumbers n.primesBelow


/-- The empty set in a vector space is ample. -/
@[simp]
theorem ampleSet_empty : AmpleSet (∅ : Set F)

{F : Type u_1}
[AddCommGroup F]
[Module ℝ F]
[TopologicalSpace F]


/-- A graph is strongly regular with parameters `n k ℓ μ` if
 * its vertex set has cardinality `n`
 * it is regular with degree `k`
 * every pair of adjacent vertices has `ℓ` common neighbors
 * every pair of nonadjacent vertices has `μ` common neighbors
-/
structure IsSRGWith (n k ℓ μ : ℕ) : Prop where
  card : Fintype.card V = n
  regular : G.IsRegularOfDegree k
  of_adj : ∀ v w : V, G.Adj v w → Fintype.card (G.commonNeighbors v w) = ℓ
  of_not_adj : Pairwise fun v w => ¬G.Adj v w → Fintype.card (G.commonNeighbors v w) = μ

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

G.Adj v w → Fintype.card ↑(G.commonNeighbors v w) = ℓ


@[simp]
theorem coe_set_mk (S : NonUnitalSubsemiring R) (h) :
    ((⟨S, h⟩ : NonUnitalSubring R) : Set R) = S

(h : ∀ {x : R}, x ∈ S.carrier → -x ∈ S.carrier)

↑{ toNonUnitalSubsemiring := S, neg_mem' := h } = ↑S


@[simp]
theorem translate_pow (x : ℝ) (n : ℕ) :
    translate (Multiplicative.ofAdd x) ^ n = translate (Multiplicative.ofAdd <| ↑n * x)

CircleDeg1Lift.translate (Multiplicative.ofAdd x) ^ n = CircleDeg1Lift.translate (Multiplicative.ofAdd (↑n * x))


/-- Constructor for isomorphisms in `ComposableArrows C 1`. -/
@[simps!]
def isoMk₁ {F G : ComposableArrows C 1}
    (left : F.obj' 0 ≅ G.obj' 0) (right : F.obj' 1 ≅ G.obj' 1)
    (w : F.map' 0 1 ≫ right.hom = left.hom ≫ G.map' 0 1 := by aesop_cat) :
    F ≅ G

{F G : CategoryTheory.ComposableArrows C 1}

(w :
  CategoryTheory.CategoryStruct.comp (F.map' 0 1 ⋯ ⋯) right.hom =
    CategoryTheory.CategoryStruct.comp left.hom (G.map' 0 1 ⋯ ⋯) := by
  aesop_cat)

(CategoryTheory.ComposableArrows.isoMk₁ left right w).hom.app i =
  match i with
  | ⟨0, isLt⟩ => left.hom
  | ⟨1, isLt⟩ => right.hom


theorem exists_pos_mul_lt {a : α} (h : 0 < a) (b : α) : ∃ c : α, 0 < c ∧ b * c < a

{α : Type u_2}
[LinearOrderedSemifield α]
{a : α}
(h : 0 < a)
(b : α)


protected theorem casesNil_append1 {β : TypeVec 0 → Sort*} (f : β Fin2.elim0) :
    TypeVec.casesNil f Fin2.elim0 = f

{β : TypeVec.{u_2} 0 → Sort u_1}
(f : β Fin2.elim0)


/-- A `GroupFilterBasis` on a group is a `FilterBasis` satisfying some additional axioms.
  Example : if `G` is a topological group then the neighbourhoods of the identity are a
  `GroupFilterBasis`. Conversely given a `GroupFilterBasis` one can define a topology
  compatible with the group structure on `G`. -/
class GroupFilterBasis (G : Type u) [Group G] extends FilterBasis G where
  one' : ∀ {U}, U ∈ sets → (1 : G) ∈ U
  mul' : ∀ {U}, U ∈ sets → ∃ V ∈ sets, V * V ⊆ U
  inv' : ∀ {U}, U ∈ sets → ∃ V ∈ sets, V ⊆ (fun x ↦ x⁻¹) ⁻¹' U
  conj' : ∀ x₀, ∀ {U}, U ∈ sets → ∃ V ∈ sets, V ⊆ (fun x ↦ x₀ * x * x₀⁻¹) ⁻¹' U

{G : Type u}
[Group G]
[self : GroupFilterBasis G]
{U : Set G}

U ∈ GroupFilterBasis.toFilterBasis.sets → ∃ V ∈ GroupFilterBasis.toFilterBasis.sets, V ⊆ (fun x => x⁻¹) ⁻¹' U


@[to_additive (attr := simp)]
theorem coe_inclusion {H K : S} {h : H ≤ K} (a : H) : (inclusion h a : G) = a

{G : Type u_1}
[Group G]
{S : Type u_6}
[SetLike S G]
[SubgroupClass S G]
{H K : S}
{h : H ≤ K}
(a : ↥H)


@[to_additive]
theorem haarMeasure_closure_self {K₀ : PositiveCompacts G} : haarMeasure K₀ (closure K₀) = 1

{K₀ : TopologicalSpace.PositiveCompacts G}

(MeasureTheory.Measure.addHaarMeasure K₀) (closure ↑K₀) = 1


@[to_additive]
theorem IsOfFinOrder.zpow (h : IsOfFinOrder x) {i : ℤ} : IsOfFinOrder (x ^ i)

{G : Type u_1}
[AddGroup G]
{x : G}
(h : IsOfFinAddOrder x)
{i : ℤ}


theorem Filter.HasBasis.equicontinuousAt_iff_right {p : κ → Prop} {s : κ → Set (α × α)}
    {F : ι → X → α} {x₀ : X} (hα : (𝓤 α).HasBasis p s) :
    EquicontinuousAt F x₀ ↔ ∀ k, p k → ∀ᶠ x in 𝓝 x₀, ∀ i, (F i x₀, F i x) ∈ s k

{ι : Type u_1}
{κ : Type u_2}
{X : Type u_3}
{α : Type u_7}
[tX : TopologicalSpace X]
[uα : UniformSpace α]
{p : κ → Prop}
{s : κ → Set (α × α)}
{F : ι → X → α}
{x₀ : X}
(hα : (uniformity α).HasBasis p s)

EquicontinuousAt F x₀ ↔ ∀ (k : κ), p k → ∀ᶠ (x : X) in nhds x₀, ∀ (i : ι), (F i x₀, F i x) ∈ s k


/-- Distance between the images of two points under an inversion. -/
theorem dist_inversion_inversion (hx : x ≠ c) (hy : y ≠ c) (R : ℝ) :
    dist (inversion c R x) (inversion c R y) = R ^ 2 / (dist x c * dist y c) * dist x y

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

dist (EuclideanGeometry.inversion c R x) (EuclideanGeometry.inversion c R y) = R ^ 2 / (dist x c * dist y c) * dist x y


theorem IsUnit.mk0 (x : G₀) (hx : x ≠ 0) : IsUnit x

{G₀ : Type u_3}
[GroupWithZero G₀]
(x : G₀)
(hx : x ≠ 0)


theorem mdifferentiableAt_iff_of_mem_source {x' : M} {y : M'}
    (hx : x' ∈ (chartAt H x).source) (hy : f x' ∈ (chartAt H' y).source) :
    MDifferentiableAt I I' f x' ↔
      ContinuousAt f x' ∧
        DifferentiableWithinAt 𝕜 (extChartAt I' y ∘ f ∘ (extChartAt I x).symm) (Set.range I)
          ((extChartAt I x) x')

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{H : Type u_3}
[TopologicalSpace H]
{I : ModelWithCorners 𝕜 E H}
{M : Type u_4}
[TopologicalSpace M]
[ChartedSpace H M]
{E' : Type u_5}
[NormedAddCommGroup E']
[NormedSpace 𝕜 E']
{H' : Type u_6}
[TopologicalSpace H']
{I' : ModelWithCorners 𝕜 E' H'}
{M' : Type u_7}
[TopologicalSpace M']
[ChartedSpace H' M']
{f : M → M'}
{x : M}
[Is : SmoothManifoldWithCorners I M]
[I's : SmoothManifoldWithCorners I' M']
{x' : M}
{y : M'}
(hx : x' ∈ (chartAt H x).source)
(hy : f x' ∈ (chartAt H' y).source)

MDifferentiableAt I I' f x' ↔
  ContinuousAt f x' ∧
    DifferentiableWithinAt 𝕜 (↑(extChartAt I' y) ∘ f ∘ ↑(extChartAt I x).symm) (Set.range ↑I) (↑(extChartAt I x) x')


@[simp]
theorem not_isCycle_one : ¬(1 : Perm α).IsCycle


theorem integral_comp_mul_sub (hc : c ≠ 0) (d) :
    (∫ x in a..b, f (c * x - d)) = c⁻¹ • ∫ x in c * a - d..c * b - d, f x

{E : Type u_3}
[NormedAddCommGroup E]
[NormedSpace ℝ E]
{a b c : ℝ}
(f : ℝ → E)
(hc : c ≠ 0)
(d : ℝ)

∫ (x : ℝ) in a..b, f (c * x - d) = c⁻¹ • ∫ (x : ℝ) in c * a - d..c * b - d, f x


/-- A pseudofunctor `F` between bicategories `B` and `C` consists of a function between objects
`F.obj`, a function between 1-morphisms `F.map`, and a function between 2-morphisms `F.map₂`.

Unlike functors between categories, `F.map` do not need to strictly commute with the compositions,
and do not need to strictly preserve the identity. Instead, there are specified 2-isomorphisms
`F.map (𝟙 a) ≅ 𝟙 (F.obj a)` and `F.map (f ≫ g) ≅ F.map f ≫ F.map g`.

`F.map₂` strictly commute with compositions and preserve the identity. They also preserve the
associator, the left unitor, and the right unitor modulo some adjustments of domains and codomains
of 2-morphisms.
-/
structure Pseudofunctor (B : Type u₁) [Bicategory.{w₁, v₁} B] (C : Type u₂)
    [Bicategory.{w₂, v₂} C] extends PrelaxFunctor B C where
  mapId (a : B) : map (𝟙 a) ≅ 𝟙 (obj a)
  mapComp {a b c : B} (f : a ⟶ b) (g : b ⟶ c) : map (f ≫ g) ≅ map f ≫ map g
  map₂_whisker_left :
    ∀ {a b c : B} (f : a ⟶ b) {g h : b ⟶ c} (η : g ⟶ h),
      map₂ (f ◁ η) = (mapComp f g).hom ≫ map f ◁ map₂ η ≫ (mapComp f h).inv := by
    aesop_cat
  map₂_whisker_right :
    ∀ {a b c : B} {f g : a ⟶ b} (η : f ⟶ g) (h : b ⟶ c),
      map₂ (η ▷ h) = (mapComp f h).hom ≫ map₂ η ▷ map h ≫ (mapComp g h).inv := by
    aesop_cat
  map₂_associator :
    ∀ {a b c d : B} (f : a ⟶ b) (g : b ⟶ c) (h : c ⟶ d),
      map₂ (α_ f g h).hom = (mapComp (f ≫ g) h).hom ≫ (mapComp f g).hom ▷ map h ≫
      (α_ (map f) (map g) (map h)).hom ≫ map f ◁ (mapComp g h).inv ≫
      (mapComp f (g ≫ h)).inv := by
    aesop_cat
  map₂_left_unitor :
    ∀ {a b : B} (f : a ⟶ b),
      map₂ (λ_ f).hom = (mapComp (𝟙 a) f).hom ≫ (mapId a).hom ▷ map f ≫ (λ_ (map f)).hom := by
    aesop_cat
  map₂_right_unitor :
    ∀ {a b : B} (f : a ⟶ b),
      map₂ (ρ_ f).hom = (mapComp f (𝟙 b)).hom ≫ map f ◁ (mapId b).hom ≫ (ρ_ (map f)).hom := by
    aesop_cat

(self : CategoryTheory.Pseudofunctor B C)

self.map₂ (CategoryTheory.Bicategory.leftUnitor f).hom =
  CategoryTheory.CategoryStruct.comp (self.mapComp (CategoryTheory.CategoryStruct.id a) f).hom
    (CategoryTheory.CategoryStruct.comp (CategoryTheory.Bicategory.whiskerRight (self.mapId a).hom (self.map f))
      (CategoryTheory.Bicategory.leftUnitor (self.map f)).hom)


lemma transpose_invOf [Invertible A] [Invertible Aᵀ] : (⅟A)ᵀ = ⅟(Aᵀ)

{n : Type u_2}
{α : Type u_3}
[Fintype n]
[DecidableEq n]
[CommSemiring α]
(A : Matrix n n α)
[Invertible A]
[Invertible Aᵀ]


theorem next_stop : ∀ {s}, Valid s → s.next ⟨s.bsize⟩ = ⟨s.bsize⟩

s.Valid → s.next { byteIdx := s.bsize } = { byteIdx := s.bsize }


@[simp] lemma mod_two_ne_one : ¬n % 2 = 1 ↔ n % 2 = 0


@[simp]
theorem card_zmod (n : ℕ) : Nat.card (ZMod n) = n


lemma algebraMap_def' (r : R) : algebraMap R (𝒜 ᵍ⊗[R] ℬ) r = 1 ᵍ⊗ₜ[R] algebraMap R B r

{R : Type u_1}
{ι : Type u_2}
{A : Type u_3}
{B : Type u_4}
[CommSemiring ι]
[Module ι (Additive ℤˣ)]
[DecidableEq ι]
[CommRing R]
[Ring A]
[Ring B]
[Algebra R A]
[Algebra R B]
(𝒜 : ι → Submodule R A)
(ℬ : ι → Submodule R B)
[GradedAlgebra 𝒜]
[GradedAlgebra ℬ]
(r : R)

(algebraMap R (𝒜 ᵍ⊗[R] ℬ)) r = 1 ᵍ⊗ₜ[R] (algebraMap R B) r


theorem coe_le_maximum_iff : a ≤ l.maximum ↔ ∃ b, b ∈ l ∧ a ≤ b

{α : Type u_1}
[LinearOrder α]
{l : List α}
{a : α}


theorem ceil_le_floor_add_one (a : α) : ⌈a⌉₊ ≤ ⌊a⌋₊ + 1

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

⌈a⌉₊ ≤ ⌊a⌋₊ + 1


@[simp]
theorem volume_preimage_mul_right {a : ℝ} (h : a ≠ 0) (s : Set ℝ) :
    volume ((· * a) ⁻¹' s) = ENNReal.ofReal (abs a⁻¹) * volume s

MeasureTheory.volume ((fun x => x * a) ⁻¹' s) = ENNReal.ofReal |a⁻¹| * MeasureTheory.volume s


/-- If a T2 group acts properly on a topological space, then this topological space is T2. -/
@[to_additive "If a T2 group acts properly on a topological space,
then this topological space is T2."]
theorem t2Space_of_properSMul_of_t2Group [h_proper : ProperSMul G X] [T2Space G] : T2Space X

{G : Type u_1}
{X : Type u_2}
[AddGroup G]
[AddAction G X]
[TopologicalSpace G]
[TopologicalSpace X]
[h_proper : ProperVAdd G X]
[T2Space G]


theorem Integrable.integrableOn (h : Integrable f μ) : IntegrableOn f s μ

{α : Type u_1}
{E : Type u_3}
[MeasurableSpace α]
[NormedAddCommGroup E]
{f : α → E}
{s : Set α}
{μ : MeasureTheory.Measure α}
(h : MeasureTheory.Integrable f μ)


theorem Trunc.finChoice_eq {ι : Type*} [DecidableEq ι] [Fintype ι] {α : ι → Type*}
    (f : ∀ i, α i) : (Trunc.finChoice fun i => Trunc.mk (f i)) = Trunc.mk f

{ι : Type u_1}
[DecidableEq ι]
[Fintype ι]
{α : ι → Type u_2}
(f : (i : ι) → α i)


theorem mk_injective [Monoid α] [Unique (Units α)] : Function.Injective (@Associates.mk α _)


theorem limsup_preimage_iterate_ae_eq {f : α → α} (hf : QuasiMeasurePreserving f μ μ)
    (hs : f ⁻¹' s =ᵐ[μ] s) : limsup (α := Set α) (fun n => (preimage f)^[n] s) atTop =ᵐ[μ] s

(hf : MeasureTheory.Measure.QuasiMeasurePreserving f μ μ)

Filter.limsup (fun n => (Set.preimage f)^[n] s) Filter.atTop =ᵐ[μ] s


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

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


/-- The cokernel of `f.op` is the opposite of `kernel f`. -/
@[simps]
def cokernelOpUnop : (cokernel f.op).unop ≅ kernel f

{C : Type u_1}
[CategoryTheory.Category.{u_2, u_1} C]
[CategoryTheory.Abelian C]
{X Y : C}
(f : X ⟶ Y)

(CategoryTheory.cokernelOpUnop f).inv =
  (CategoryTheory.Limits.cokernel.desc f.op (CategoryTheory.Limits.kernel.ι f).op ⋯).unop


theorem getElem?_ge
    (a : Array α) {i : Nat} (h : i ≥ a.size) : a[i]? = none

{α : Type u_1}
(a : Array α)
{i : Nat}
(h : i ≥ a.size)


/-- Structure containing the minimal axioms required to check that an order is a frame. Do NOT use,
except for implementing `Order.Frame` via `Order.Frame.ofMinimalAxioms`.

This structure omits the `himp`, `compl` fields, which can be recovered using
`Order.Frame.ofMinimalAxioms`. -/
class Order.Frame.MinimalAxioms (α : Type u) extends CompleteLattice α where
  inf_sSup_le_iSup_inf (a : α) (s : Set α) : a ⊓ sSup s ≤ ⨆ b ∈ s, a ⊓ b

{α : Type u}
[self : Order.Frame.MinimalAxioms α]
(a : α)
(s : Set α)


@[simp]
theorem fst_map (x : P α) (f : α → β) : (P.map f x).1 = x.1

{P : PFunctor.{u}}
{α : Type v₁}
{β : Type v₂}
(x : ↑P α)
(f : α → β)


/-- The functor `(F ⋙ L, R) ⥤ (L, R)` -/
@[simps]
def preRight (L : A ⥤ T) (F : C ⥤ B) (R : B ⥤ T) : Comma L (F ⋙ R) ⥤ Comma L R

{A : Type u₁}
[CategoryTheory.Category.{v₁, u₁} A]
{B : Type u₂}
[CategoryTheory.Category.{v₂, u₂} B]
{T : Type u₃}
[CategoryTheory.Category.{v₃, u₃} T]
{C : Type u₄}
[CategoryTheory.Category.{v₄, u₄} C]
(L : CategoryTheory.Functor A T)
(F : CategoryTheory.Functor C B)
(R : CategoryTheory.Functor B T)

∀ {X Y : CategoryTheory.Comma L (F.comp R)} (f : X ⟶ Y),
  ((CategoryTheory.Comma.preRight L F R).map f).right = F.map f.right


theorem Fix.dest_mk (x : F (append1 α (Fix F α))) : Fix.dest (Fix.mk x) = x

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


@[to_additive (attr := simp)]
theorem lift.mk : lift f (mk L) = List.prod (L.map fun x => cond x.2 (f x.1) (f x.1)⁻¹)

{α : Type u}
{L : List (α × Bool)}
{β : Type v}
[AddGroup β]
{f : α → β}

(FreeAddGroup.lift f) (FreeAddGroup.mk L) = (List.map (fun x => bif x.2 then f x.1 else -f x.1) L).sum


@[simp]
theorem independent_empty (t : Empty → α) : Independent t

{α : Type u_1}
[CompleteLattice α]
(t : Empty → α)


/-- The canonical map `Φ.RightResolution X₂ → Φ.op.LeftResolution (Opposite.op X₂)`. -/
@[simps]
def RightResolution.op {X₂ : C₂} (L : Φ.RightResolution X₂) :
    Φ.op.LeftResolution (Opposite.op X₂)

{W₁ : CategoryTheory.MorphismProperty C₁}

{W₂ : CategoryTheory.MorphismProperty C₂}

{Φ : CategoryTheory.LocalizerMorphism W₁ W₂}


/-- A bicategory structure on the oplax functors between bicategories. -/
-- Porting note: verified that projections are correct and changed @[simps] to @[simps!]
@[simps!]
instance OplaxFunctor.bicategory : Bicategory (OplaxFunctor B C)

(B : Type u₁)
[CategoryTheory.Bicategory B]
(C : Type u₂)
[CategoryTheory.Bicategory C]
{F G : CategoryTheory.OplaxFunctor B C}
(η : F ⟶ G)
(a : B)

(CategoryTheory.Bicategory.rightUnitor η).hom.app a = (CategoryTheory.Bicategory.rightUnitor (η.app a)).hom


/-- The addition of two nonsingular affine points in `W` on a sloped line is nonsingular. -/
lemma nonsingular_add {x₁ x₂ y₁ y₂ : F} (h₁ : W.Nonsingular x₁ y₁) (h₂ : W.Nonsingular x₂ y₂)
    (hxy : x₁ = x₂ → y₁ ≠ W.negY x₂ y₂) :
    W.Nonsingular (W.addX x₁ x₂ <| W.slope x₁ x₂ y₁ y₂) (W.addY x₁ x₂ y₁ <| W.slope x₁ x₂ y₁ y₂)

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

W.Nonsingular (W.addX x₁ x₂ (W.slope x₁ x₂ y₁ y₂)) (W.addY x₁ x₂ y₁ (W.slope x₁ x₂ y₁ y₂))


theorem nnnorm_eq_sup_normAtPlace (x : E K) :
    ‖x‖₊ = univ.sup fun w ↦ ⟨normAtPlace w x, normAtPlace_nonneg w x⟩

(x : ({ w // w.IsReal } → ℝ) × ({ w // w.IsComplex } → ℂ))

‖x‖₊ = Finset.univ.sup fun w => ⟨(NumberField.mixedEmbedding.normAtPlace w) x, ⋯⟩


/-- Isomorphic monads give equivalent categories of algebras. Furthermore, they are equivalent as
categories over `C`, that is, we have `algebraEquivOfIsoMonads h ⋙ forget = forget`.
-/
@[simps]
def algebraEquivOfIsoMonads {T₁ T₂ : Monad C} (h : T₁ ≅ T₂) : Algebra T₁ ≌ Algebra T₂

{C : Type u₁}
[CategoryTheory.Category.{v₁, u₁} C]
{T₁ T₂ : CategoryTheory.Monad C}
(h : T₁ ≅ T₂)

(CategoryTheory.Monad.algebraEquivOfIsoMonads h).inverse = CategoryTheory.Monad.algebraFunctorOfMonadHom h.hom


/-- The functor that restricts to open subschemes and then takes global section is
isomorphic to the structure sheaf. -/
@[simps!]
def Scheme.restrictFunctorΓ : X.restrictFunctor.op ⋙ (Over.forget X).op ⋙ Scheme.Γ ≅ X.presheaf

∀ (X_1 : X.Opensᵒᵖ), AlgebraicGeometry.Scheme.restrictFunctorΓ.inv.app X_1 = X.presheaf.map (CategoryTheory.eqToHom ⋯)


/--
Equivalent precoherent categories give equivalent coherent toposes.
-/
@[simps!]
def sheafCongrPrecoherent : haveI := e.precoherent
    Sheaf (coherentTopology C) A ≌ Sheaf (coherentTopology D) A

(F : CategoryTheory.Sheaf (CategoryTheory.coherentTopology D) A)

((e.sheafCongrPrecoherent A).inverse.obj F).val.obj X = F.val.obj (Opposite.op (e.functor.obj (Opposite.unop X)))


theorem eq_of_eqOn_sdense {s : Set R} (hs : closure s = ⊤) {f g : F}
    (h : s.EqOn (f : R → S) (g : R → S)) : f = g

(hs : NonUnitalSubsemiring.closure s = ⊤)


/-- Continuity from above: the measure of the intersection of a sequence of
measurable sets is the infimum of the measures of the partial intersections. -/
theorem measure_iInter_eq_iInf' {α ι : Type*} [MeasurableSpace α] {μ : Measure α}
    [Countable ι] [Preorder ι] [IsDirected ι (· ≤ ·)]
    {f : ι → Set α} (h : ∀ i, MeasurableSet (f i)) (hfin : ∃ i, μ (f i) ≠ ∞) :
    μ (⋂ i, f i) = ⨅ i, μ (⋂ j ≤ i, f j)

{α : Type u_8}
{ι : Type u_9}
[MeasurableSpace α]
{μ : MeasureTheory.Measure α}
[Countable ι]
[Preorder ι]
[IsDirected ι fun x x_1 => x ≤ x_1]
{f : ι → Set α}
(h : ∀ (i : ι), MeasurableSet (f i))
(hfin : ∃ i, μ (f i) ≠ ⊤)

μ (⋂ i, f i) = ⨅ i, μ (⋂ j, ⋂ (_ : j ≤ i), f j)


/-- A set `s` is Lindelöf if for every family of closed sets whose intersection avoids `s`,
there exists a countable subfamily whose intersection avoids `s`. -/
theorem isLindelof_of_countable_subfamily_closed
    (h :
      ∀ {ι : Type u} (t : ι → Set X), (∀ i, IsClosed (t i)) → (s ∩ ⋂ i, t i) = ∅ →
        ∃ u : Set ι, u.Countable ∧ (s ∩ ⋂ i ∈ u, t i) = ∅) :
    IsLindelof s

(h :
  ∀ {ι : Type u} (t : ι → Set X),
    (∀ (i : ι), IsClosed (t i)) → s ∩ ⋂ i, t i = ∅ → ∃ u, u.Countable ∧ s ∩ ⋂ i ∈ u, t i = ∅)


/-- A version of `num_div_dvd` with the LHS in simp normal form -/
@[simp]
theorem num_div_dvd' (p : K[X]) {q : K[X]} (hq : q ≠ 0) :
    C (q / gcd p q).leadingCoeff⁻¹ * (p / gcd p q) ∣ p

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

Polynomial.C (q / gcd p q).leadingCoeff⁻¹ * (p / gcd p q) ∣ p


theorem IntegrableOn.mono_set (h : IntegrableOn f t μ) (hst : s ⊆ t) : IntegrableOn f s μ

{α : Type u_1}
{E : Type u_3}
[MeasurableSpace α]
[NormedAddCommGroup E]
{f : α → E}
{s t : Set α}
{μ : MeasureTheory.Measure α}
(h : MeasureTheory.IntegrableOn f t μ)
(hst : s ⊆ t)


@[simp]
theorem CompositionAsSet.toComposition_length (c : CompositionAsSet n) :
    c.toComposition.length = c.length


@[simp]
theorem map_involutive_iff {f : α → α} :
    Involutive (map f) ↔ Involutive f

Function.Involutive (List.map f) ↔ Function.Involutive f


lemma stieltjesOfMeasurableRat_ae_eq (hf : IsRatCondKernelCDF f κ ν) (a : α) (q : ℚ) :
    (fun b ↦ stieltjesOfMeasurableRat f hf.measurable (a, b) q) =ᵐ[ν a] fun b ↦ f (a, b) q

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

{f : α × β → ℚ → ℝ}

(hf : ProbabilityTheory.IsRatCondKernelCDF f κ ν)

(fun b => ↑(ProbabilityTheory.stieltjesOfMeasurableRat f ⋯ (a, b)) ↑q) =ᵐ[ν a] fun b => f (a, b) q


@[to_additive]
theorem isPWO_support_smulAntidiagonal {hs : s.IsPWO} {ht : t.IsPWO} :
    { a | (SMulAntidiagonal hs ht a).Nonempty }.IsPWO

{G : Type u_1}
{P : Type u_2}
[PartialOrder G]
[PartialOrder P]
[SMul G P]
[IsOrderedCancelSMul G P]
{s : Set G}
{t : Set P}
{hs : s.IsPWO}
{ht : t.IsPWO}

{a | (Finset.SMulAntidiagonal hs ht a).Nonempty}.IsPWO


theorem bind_eq_some : x.bind f = some b ↔ ∃ a, x = some a ∧ f a = some b

∀ {α : Type u_1} {b : α} {α_1 : Type u_2} {x : Option α_1} {f : α_1 → Option α},
  x.bind f = some b ↔ ∃ a, x = some a ∧ f a = some b


@[simp]
theorem associator_map_inl_inr {X Y : D} (f : inl (inr X) ⟶ inl (inr Y)) :
    (associator C D E).map f = f

(f : Sum.inl (Sum.inr X) ⟶ Sum.inl (Sum.inr Y))

(CategoryTheory.sum.associator C D E).map f = f


/-- The natural isomorphism expressing that functors `Karoubi C ⥤ Karoubi D` obtained
using `functorExtension₂` actually extends the original functors `C ⥤ D`. -/
@[simps!]
def functorExtension₂CompWhiskeringLeftToKaroubiIso :
    functorExtension₂ C D ⋙ (whiskeringLeft C (Karoubi C) (Karoubi D)).obj (toKaroubi C) ≅
      (whiskeringRight C D (Karoubi D)).obj (toKaroubi D)

(C : Type u_1)
(D : Type u_2)
[CategoryTheory.Category.{u_4, u_1} C]
[CategoryTheory.Category.{u_5, u_2} D]
(X : CategoryTheory.Functor C D)

∀ (X_1 : C),
  (((CategoryTheory.Idempotents.functorExtension₂CompWhiskeringLeftToKaroubiIso C D).inv.app X).app X_1).f =
    CategoryTheory.CategoryStruct.id (X.obj X_1)


theorem geom_sum₂_eq_one : multiplicity (↑p) (∑ i ∈ range p, x ^ i * y ^ (p - 1 - i)) = 1

{R : Type u_1}
[CommRing R]
{x y : R}
{p : ℕ}
[IsDomain R]
[DecidableRel fun x x_1 => x ∣ x_1]
(hp : Prime ↑p)
(hp1 : Odd p)
(hxy : ↑p ∣ x - y)
(hx : ¬↑p ∣ x)

multiplicity (↑p) (∑ i ∈ Finset.range p, x ^ i * y ^ (p - 1 - i)) = 1


@[simp]
theorem coe_toSubsemiring (s : Subring R) : (s.toSubsemiring : Set R) = s


/-- The power series expansion of `Real.cos`. -/
theorem Real.hasSum_cos (r : ℝ) :
    HasSum (fun n : ℕ => (-1) ^ n * r ^ (2 * n) / ↑(2 * n)!) (Real.cos r)


@[simp]
theorem nndist_lineMap_lineMap (p₁ p₂ : P) (c₁ c₂ : 𝕜) :
    nndist (lineMap p₁ p₂ c₁) (lineMap p₁ p₂ c₂) = nndist c₁ c₂ * nndist p₁ p₂

{V : Type u_2}
{P : Type u_3}
[SeminormedAddCommGroup V]
[PseudoMetricSpace P]
[NormedAddTorsor V P]
{𝕜 : Type u_6}
[NormedField 𝕜]
[NormedSpace 𝕜 V]
(p₁ p₂ : P)
(c₁ c₂ : 𝕜)

nndist ((AffineMap.lineMap p₁ p₂) c₁) ((AffineMap.lineMap p₁ p₂) c₂) = nndist c₁ c₂ * nndist p₁ p₂


theorem flip_iff : IsPullback fst snd f g ↔ IsPullback snd fst g f

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

CategoryTheory.IsPullback fst snd f g ↔ CategoryTheory.IsPullback snd fst g f


/-- Given any distinguished triangle `T`, then we know `T.rotate` is also distinguished.
-/
theorem rot_of_distTriang (T : Triangle C) (H : T ∈ distTriang C) : T.rotate ∈ distTriang C

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

(T : CategoryTheory.Pretriangulated.Triangle C)

(H : T ∈ CategoryTheory.Pretriangulated.distinguishedTriangles)


@[simp]
theorem star_preimage [Star α] : Star.star ⁻¹' s = s⋆


theorem y_eq_zero_of_not_mem_ball {D : ℝ} {x : E} (Dpos : 0 < D) (hx : x ∉ ball (0 : E) (1 + D)) :
    y D x = 0

{E : Type u_1}
[NormedAddCommGroup E]
[NormedSpace ℝ E]
[FiniteDimensional ℝ E]
[MeasurableSpace E]
[BorelSpace E]
{D : ℝ}
{x : E}
(Dpos : 0 < D)
(hx : x ∉ Metric.ball 0 (1 + D))


@[simp]
theorem edges_concat {u v w : V} (p : G.Walk u v) (h : G.Adj v w) :
    (p.concat h).edges = p.edges.concat s(v, w)

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


@[to_additive (attr := simp)]
lemma stabilizer_singleton (b : α) : stabilizer G ({b} : Set α) = stabilizer G b

{G : Type u_1}
{α : Type u_3}
[Group G]
[MulAction G α]
(b : α)

MulAction.stabilizer G {b} = MulAction.stabilizer G b


@[simp]
theorem orderTop_zero : orderTop (0 : HahnSeries Γ R) = ⊤

{Γ : Type u_1}
{R : Type u_2}
[PartialOrder Γ]
[Zero R]


/-- Given a map `r : I₁ × I₂ × I₃ → J`, a `BifunctorComp₂₃IndexData r` consists of the data
of a type `I₂₃`, maps `p : I₂ × I₃ → I₂₃` and `q : I₁ × I₂₃ → J`, such that `r` is obtained
by composition of `p` and `q`. -/
structure BifunctorComp₂₃IndexData :=
  /-- an auxiliary type -/
  I₂₃ : Type*
  /-- a map `I₂ × I₃ → I₂₃` -/
  p : I₂ × I₃ → I₂₃
  /-- a map `I₁ × I₂₃ → J` -/
  q : I₁ × I₂₃ → J
  hpq (i : I₁ × I₂ × I₃) : q ⟨i.1, p i.2⟩ = r i

(self : CategoryTheory.GradedObject.BifunctorComp₂₃IndexData r)


@[simp]
theorem coe_to_linearEquiv (e : M ≃ₗ⁅R,L⁆ N) : ((e : M ≃ₗ[R] N) : M → N) = e

{R : Type u}
{L : Type v}
{M : Type w}
{N : Type w₁}
[CommRing R]
[LieRing L]
[AddCommGroup M]
[AddCommGroup N]
[Module R M]
[Module R N]
[LieRingModule L M]
[LieRingModule L N]
(e : M ≃ₗ⁅R,L⁆ N)


protected theorem neg_mem {R : Type u} {A : Type v} [CommRing R] [Ring A] [Algebra R A]
    (S : Subalgebra R A) {x : A} (hx : x ∈ S) : -x ∈ S


/-- If `f` is a partial homeomorphism defined on a neighbourhood of `f.symm a`, and `f` has an
invertible derivative `f'` at `f.symm a`, then `f.symm` has the derivative `f'⁻¹` at `a`.

This is one of the easy parts of the inverse function theorem: it assumes that we already have
an inverse function. -/
theorem PartialHomeomorph.hasFDerivAt_symm (f : PartialHomeomorph E F) {f' : E ≃L[𝕜] F} {a : F}
    (ha : a ∈ f.target) (htff' : HasFDerivAt f (f' : E →L[𝕜] F) (f.symm a)) :
    HasFDerivAt f.symm (f'.symm : F →L[𝕜] E) a

(htff' : HasFDerivAt (↑f) (↑f') (↑f.symm a))


theorem preimage_iterate_ae_eq {s : Set α} {f : α → α} (hf : QuasiMeasurePreserving f μ μ) (k : ℕ)
    (hs : f ⁻¹' s =ᵐ[μ] s) : f^[k] ⁻¹' s =ᵐ[μ] s

(hf : MeasureTheory.Measure.QuasiMeasurePreserving f μ μ)


theorem diam_pos_iff : 0 < diam s ↔ s.Nontrivial

{γ : Type w}
[EMetricSpace γ]
{s : Set γ}


theorem iSup_true {s : True → α} : iSup s = s trivial

{α : Type u_1}
[CompleteLattice α]
{s : True → α}


theorem Base.eq_of_subset_base (hB₁ : M.Base B₁) (hB₂ : M.Base B₂) (hB₁B₂ : B₁ ⊆ B₂) :
    B₁ = B₂

{α : Type u_1}
{M : Matroid α}
{B₁ B₂ : Set α}
(hB₁ : M.Base B₁)
(hB₂ : M.Base B₂)
(hB₁B₂ : B₁ ⊆ B₂)


/-- A triangulated subcategory of a pretriangulated category `C` consists of
a predicate `P : C → Prop` which contains a zero object, is stable by shifts, and such that
if `X₁ ⟶ X₂ ⟶ X₃ ⟶ X₁⟦1⟧` is a distinguished triangle such that if `X₁` and `X₃` satisfy
`P` then `X₂` is isomorphic to an object satisfying `P`. -/
structure Subcategory where
  /-- the underlying predicate on objects of a triangulated subcategory -/
  P : C → Prop
  zero' : ∃ (Z : C) (_ : IsZero Z), P Z
  shift (X : C) (n : ℤ) : P X → P (X⟦n⟧)
  ext₂' (T : Triangle C) (_ : T ∈ distTriang C) : P T.obj₁ → P T.obj₃ → isoClosure P T.obj₂

(self : CategoryTheory.Triangulated.Subcategory C)

∃ Z, ∃ (_ : CategoryTheory.Limits.IsZero Z), self.P Z


/-- Given a point on a sphere and a point not outside it, the inner product between the
difference of those points and the radius vector is positive unless the points are equal. -/
theorem inner_pos_or_eq_of_dist_le_radius {s : Sphere P} {p₁ p₂ : P} (hp₁ : p₁ ∈ s)
    (hp₂ : dist p₂ s.center ≤ s.radius) : 0 < ⟪p₁ -ᵥ p₂, p₁ -ᵥ s.center⟫ ∨ p₁ = p₂

{V : Type u_1}
{P : Type u_2}
[NormedAddCommGroup V]
[InnerProductSpace ℝ V]
[MetricSpace P]
[NormedAddTorsor V P]
{s : EuclideanGeometry.Sphere P}
{p₁ p₂ : P}
(hp₁ : p₁ ∈ s)
(hp₂ : dist p₂ s.center ≤ s.radius)

0 < ⟪p₁ -ᵥ p₂, p₁ -ᵥ s.center⟫_ℝ ∨ p₁ = p₂


theorem mkMetric_smul (m : ℝ≥0∞ → ℝ≥0∞) {c : ℝ≥0∞} (hc : c ≠ ∞) (hc' : c ≠ 0) :
    (mkMetric (c • m) : OuterMeasure X) = c • mkMetric m

{X : Type u_2}
[EMetricSpace X]
(m : ℝ≥0∞ → ℝ≥0∞)
{c : ℝ≥0∞}
(hc : c ≠ ⊤)
(hc' : c ≠ 0)

MeasureTheory.OuterMeasure.mkMetric (c • m) = c • MeasureTheory.OuterMeasure.mkMetric m


theorem restrict_congr_meas (hs : MeasurableSet s) :
    μ.restrict s = ν.restrict s ↔ ∀ t ⊆ s, MeasurableSet t → μ t = ν t

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


theorem toEnd_comp_subtype_mem (m : M) (hm : m ∈ (N : Submodule R M)) :
    (toEnd R L M x).comp (N : Submodule R M).subtype ⟨m, hm⟩ ∈ (N : Submodule R M)

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

((LieModule.toEnd R L M) x ∘ₗ (↑N).subtype) ⟨m, hm⟩ ∈ ↑N


@[to_additive]
theorem mem_center_iff {z : M} : z ∈ center M ↔ ∀ g, g * z = z * g

z ∈ Submonoid.center M ↔ ∀ (g : M), g * z = z * g


theorem mem_lift {s : Set β} {t : Set α} (ht : t ∈ f) (hs : s ∈ g t) : s ∈ f.lift g

{α : Type u_1}
{β : Type u_2}
{f : Filter α}
{g : Set α → Filter β}
{s : Set β}
{t : Set α}
(ht : t ∈ f)
(hs : s ∈ g t)


theorem closedEmbedding {α : Type*} {β : Type*} [EMetricSpace α] [EMetricSpace β] {K : ℝ≥0}
    {f : α → β} [CompleteSpace α] (hf : AntilipschitzWith K f) (hfc : UniformContinuous f) :
    ClosedEmbedding f

{α : Type u_4}
{β : Type u_5}
[EMetricSpace α]
[EMetricSpace β]
{K : ℝ≥0}
{f : α → β}
[CompleteSpace α]
(hf : AntilipschitzWith K f)
(hfc : UniformContinuous f)


@[simp]
theorem prodComm_symm : (prodComm I J M N n).symm = prodComm J I N M n

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

(Diffeomorph.prodComm I J M N n).symm = Diffeomorph.prodComm J I N M n


@[to_additive (attr := simp)]
theorem mk_one : ((1 : G) : Q) = 1

{G : Type u}
[AddGroup G]
(N : AddSubgroup G)
[nN : N.Normal]


@[simp] lemma to_Lawson_symm_eq : (@toLawson α).symm = ofLawson


@[simp, nolint simpNF] -- Porting note (#10959): simp cannot prove this
theorem familyOfBFamily'_enum {ι : Type u} (r : ι → ι → Prop) [IsWellOrder ι r] {o}
    (ho : type r = o) (f : ∀ a < o, α) (i hi) :
    familyOfBFamily' r ho f (enum r i (by rwa [ho])) = f i hi

{α : Type u_1}
{ι : Type u}
(r : ι → ι → Prop)
[IsWellOrder ι r]
{o : Ordinal.{u}}
(ho : Ordinal.type r = o)
(f : (a : Ordinal.{u}) → a < o → α)
(i : Ordinal.{u})
(hi : i < o)

Ordinal.familyOfBFamily' r ho f (Ordinal.enum r i ⋯) = f i hi


@[to_additive]
theorem mulSingle_strictMono : StrictMono (Pi.mulSingle i : f i → ∀ i, f i)

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


/-- Ring homomorphisms preserve additive inverses. -/
theorem map_neg (hf : IsRingHom f) : f (-x) = -f x

{α : Type u}
{β : Type v}
[Ring α]
[Ring β]
{f : α → β}
{x : α}
(hf : IsRingHom f)


/-- A strong mono category is a category in which every monomorphism is strong. -/
class StrongMonoCategory : Prop where
  /-- A strong mono category is a category in which every monomorphism is strong. -/
  strongMono_of_mono : ∀ {X Y : C} (f : X ⟶ Y) [Mono f], StrongMono f

[self : CategoryTheory.StrongMonoCategory C]


protected theorem max_le {a b c : Nat} : max a b ≤ c ↔ a ≤ c ∧ b ≤ c


/-- The functor `HomologicalComplex (Karoubi C) c ⥤ Karoubi (HomologicalComplex C c)`,
on objects -/
@[simps]
def obj (K : HomologicalComplex (Karoubi C) c) : Karoubi (HomologicalComplex C c)

(K : HomologicalComplex (CategoryTheory.Idempotents.Karoubi C) c)

(CategoryTheory.Idempotents.KaroubiHomologicalComplexEquivalence.Inverse.obj K).X.X n = (K.X n).X


@[simp]
lemma nsmul_eq_nsmul (n : ℕ) (x : X[S⁻¹]) :
    letI inst := OreLocalization.instModuleOfIsScalarTower (R₀ := ℕ) (R := R) (X := X) (S := S)
    HSMul.hSMul (self := @instHSMul _ _ inst.toSMul) n x = n • x

{R : Type u_1}
[Semiring R]
{S : Submonoid R}
[OreLocalization.OreSet S]
{X : Type u_2}
[AddCommMonoid X]
[Module R X]
(n : ℕ)
(x : OreLocalization S X)


/-- The cosine of the angle between three points is 0 if and only if the angle is π / 2. -/
nonrec theorem cos_eq_zero_iff_angle_eq_pi_div_two {p₁ p₂ p₃ : P} :
    Real.cos (∠ p₁ p₂ p₃) = 0 ↔ ∠ p₁ p₂ p₃ = π / 2

{V : Type u_1}
{P : Type u_2}
[NormedAddCommGroup V]
[InnerProductSpace ℝ V]
[MetricSpace P]
[NormedAddTorsor V P]
{p₁ p₂ p₃ : P}

Real.cos (EuclideanGeometry.angle p₁ p₂ p₃) = 0 ↔ EuclideanGeometry.angle p₁ p₂ p₃ = π / 2


lemma isUnit_cfc_iff (hf : ContinuousOn f (spectrum R a) := by cfc_cont_tac)
    (ha : p a := by cfc_tac) : IsUnit (cfc f a) ↔ ∀ x ∈ spectrum R a, f x ≠ 0


@[simp]
theorem total_single (c : R) (a : α) : Finsupp.total α M R v (single a c) = c • v a

{α : Type u_1}
{M : Type u_2}
(R : Type u_5)
[Semiring R]
[AddCommMonoid M]
[Module R M]
{v : α → M}
(c : R)
(a : α)

(Finsupp.total α M R v) (Finsupp.single a c) = c • v a


@[simp]
theorem dualAnnihilator_bot : (⊥ : Submodule R M).dualAnnihilator = ⊤

{R : Type u}
{M : Type v}
[CommSemiring R]
[AddCommMonoid M]
[Module R M]


@[simp]
theorem adjoin_zero : F⟮(0 : E)⟯ = ⊥

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


theorem HasDerivAt.comp_hasDerivWithinAt (hh₂ : HasDerivAt h₂ h₂' (h x))
    (hh : HasDerivWithinAt h h' s x) : HasDerivWithinAt (h₂ ∘ h) (h₂' * h') s x

{𝕜 : Type u}
[NontriviallyNormedField 𝕜]
(x : 𝕜)
{s : Set 𝕜}
{𝕜' : Type u_1}
[NontriviallyNormedField 𝕜']
[NormedAlgebra 𝕜 𝕜']
{h : 𝕜 → 𝕜'}
{h₂ : 𝕜' → 𝕜'}
{h' h₂' : 𝕜'}
(hh₂ : HasDerivAt h₂ h₂' (h x))
(hh : HasDerivWithinAt h h' s x)


@[to_additive]
protected theorem inv_le_inv (hf : f ≤ g) : f⁻¹ ≤ g⁻¹

{α : Type u_2}
[Inv α]
{f g : Filter α}
(hf : f ≤ g)


theorem max_bot_left [OrderBot α] (a : α) : max ⊥ a = a

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


/-- To match `one_mul_eq_id`. -/
theorem zero_mul_eq_const : ((0 : M₀) * ·) = Function.const _ 0


/-- A linear equivalence between `Dual M ⊗ Dual N` and `Dual (M ⊗ N)` given bases for `M` and `N`.
It sends `f ⊗ g` to the composition of `TensorProduct.map f g` with the natural
isomorphism `R ⊗ R ≃ R`.
-/
@[simps!]
noncomputable def dualDistribEquivOfBasis (b : Basis ι R M) (c : Basis κ R N) :
    Dual R M ⊗[R] Dual R N ≃ₗ[R] Dual R (M ⊗[R] N)

(a : Module.Dual R (TensorProduct R M N))

(TensorProduct.dualDistribEquivOfBasis b c).symm a =
  ∑ x : ι, ∑ x_1 : κ, a (b x ⊗ₜ[R] c x_1) • b.coord x ⊗ₜ[R] c.coord x_1


theorem mk_emptyCollection_iff {α : Type u} {s : Set α} : #s = 0 ↔ s = ∅


@[to_additive (attr := simp)]
theorem coe_mulRight (a : G) : ⇑(Equiv.mulRight a) = fun x => x * a


/-- A functor defines a morphism of vertex group. -/
@[simps]
def CategoryTheory.Functor.mapVertexGroup {D : Type v} [Groupoid D] (φ : C ⥤ D) (c : C) :
    (c ⟶ c) →* (φ.obj c ⟶ φ.obj c)

{C : Type u}
[CategoryTheory.Groupoid C]
{D : Type v}
[CategoryTheory.Groupoid D]
(φ : CategoryTheory.Functor C D)
(c : C)

∀ (a : c ⟶ c), (CategoryTheory.Groupoid.CategoryTheory.Functor.mapVertexGroup φ c) a = φ.map a


@[simp]
theorem whiskerLeft_eqToHom {a b c : B} (f : a ⟶ b) {g h : b ⟶ c} (η : g = h) :
    f ◁ eqToHom η = eqToHom (congr_arg₂ (· ≫ ·) rfl η)

{B : Type u}
[CategoryTheory.Bicategory B]
{a b c : B}
(f : a ⟶ b)
{g h : b ⟶ c}
(η : g = h)

CategoryTheory.Bicategory.whiskerLeft f (CategoryTheory.eqToHom η) = CategoryTheory.eqToHom ⋯


@[simp]
theorem card_disjSum : (s.disjSum t).card = s.card + t.card

{α : Type u_1}
{β : Type u_2}
(s : Finset α)
(t : Finset β)


theorem bind_pure_comp : bind p (pure ∘ f) = map f p

{α : Type u_1}
{β : Type u_2}
(f : α → β)
(p : PMF α)


/-- `Matrix.transpose` as an `AlgEquiv` to the opposite ring -/
@[simps]
def transposeAlgEquiv [CommSemiring R] [CommSemiring α] [Fintype m] [DecidableEq m] [Algebra R α] :
    Matrix m m α ≃ₐ[R] (Matrix m m α)ᵐᵒᵖ

(m : Type u_2)
(R : Type u_7)
(α : Type v)
[CommSemiring R]
[CommSemiring α]
[Fintype m]
[DecidableEq m]
[Algebra R α]
(M : Matrix m m α)

(Matrix.transposeAlgEquiv m R α) M = MulOpposite.op Mᵀ


theorem map_mul (f₁ f₂ : Π i, s i →ₗ[R] s i) :
    map (fun i ↦ f₁ i * f₂ i) = map f₁ * map f₂

{ι : Type u_1}
{R : Type u_4}
[CommSemiring R]
{s : ι → Type u_7}
[(i : ι) → AddCommMonoid (s i)]
[(i : ι) → Module R (s i)]
(f₁ f₂ : (i : ι) → s i →ₗ[R] s i)

(PiTensorProduct.map fun i => f₁ i * f₂ i) = PiTensorProduct.map f₁ * PiTensorProduct.map f₂


@[to_additive]
theorem nullMeasurableSet_smul (h : IsFundamentalDomain G s μ) (g : G) :
    NullMeasurableSet (g • s) μ

[MeasureTheory.SMulInvariantMeasure G α μ]

(h : MeasureTheory.IsFundamentalDomain G s μ)

MeasureTheory.NullMeasurableSet (g • s) μ


theorem Ioo_mem_nhdsWithin_Iio' (H : a < b) : Ioo a b ∈ 𝓝[<] b

{α : Type u}
[TopologicalSpace α]
[LinearOrder α]
[ClosedIicTopology α]
{a b : α}
(H : a < b)


theorem disjoint_compl_right : Disjoint a aᶜ

{α : Type u_2}
[HeytingAlgebra α]
{a : α}


/-- A preadditive category with finite coproducts has finite biproducts. -/
theorem HasFiniteBiproducts.of_hasFiniteCoproducts [HasFiniteCoproducts C] :
    HasFiniteBiproducts C


theorem comp {f : X → Y} {g : Y → Z} (x : X) (hg : ConformalAt g (f x)) (hf : ConformalAt f x) :
    ConformalAt (g ∘ f) x

{X : Type u_1}
{Y : Type u_2}
{Z : Type u_3}
[NormedAddCommGroup X]
[NormedAddCommGroup Y]
[NormedAddCommGroup Z]
[NormedSpace ℝ X]
[NormedSpace ℝ Y]
[NormedSpace ℝ Z]
{f : X → Y}
{g : Y → Z}
(x : X)
(hg : ConformalAt g (f x))
(hf : ConformalAt f x)


theorem take_left' {l₁ l₂ : List α} {n} (h : length l₁ = n) : take n (l₁ ++ l₂) = l₁

{α : Type u_1}
{l₁ l₂ : List α}
{n : Nat}
(h : l₁.length = n)


@[simp] theorem col_zero [Zero α] : col ι (0 : m → α) = 0

{m : Type u_2}
{α : Type v}
{ι : Type u_6}
[Zero α]


@[simp]
theorem rightHom_eq_right : (rightHom : N ⋊[φ] G → G) = right

{N : Type u_1}
{G : Type u_2}
[Group N]
[Group G]
{φ : G →* MulAut N}


theorem setIntegral_eq_zero_of_ae_eq_zero (ht_eq : ∀ᵐ x ∂μ, x ∈ t → f x = 0) :
    ∫ x in t, f x ∂μ = 0

(ht_eq : ∀ᵐ (x : X) ∂μ, x ∈ t → f x = 0)


/-- See also `Module.End.natCast_def`. -/
@[simp]
theorem _root_.Module.End.natCast_apply (n : ℕ) (m : M) : (↑n : Module.End R M) m = n • m

{R : Type u_1}
{M : Type u_5}
[Semiring R]
[AddCommMonoid M]
[Module R M]
(n : ℕ)
(m : M)


@[simp]
theorem Polynomial.algebraMap_pi_self_eq_eval :
    (algebraMap R'[X] (R' → R') : R'[X] → R' → R') = fun p z => eval z p

⇑(algebraMap R'[X] (R' → R')) = fun p z => Polynomial.eval z p


@[simp]
theorem isSuccLimit_of_dense [DenselyOrdered α] (a : α) : IsSuccLimit a

{α : Type u_1}
[LT α]
[DenselyOrdered α]
(a : α)


@[simp]
theorem pointwise_smul_le_pointwise_smul_iff {a : M} {S T : Ideal R} : a • S ≤ a • T ↔ S ≤ T

{M : Type u_1}
{R : Type u_2}
[Group M]
[CommRing R]
[MulSemiringAction M R]
{a : M}
{S T : Ideal R}


theorem aemeasurable_lineDeriv [MeasurableSpace F] [BorelSpace F]
    (hf : Continuous f) (μ : Measure E) :
    AEMeasurable (fun x ↦ lineDeriv 𝕜 f x v) μ

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
[LocallyCompactSpace 𝕜]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
[MeasurableSpace E]
[OpensMeasurableSpace E]
{F : Type u_3}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
[CompleteSpace F]
{f : E → F}
{v : E}
[MeasurableSpace F]
[BorelSpace F]
(hf : Continuous f)
(μ : MeasureTheory.Measure E)

AEMeasurable (fun x => lineDeriv 𝕜 f x v) μ


theorem ContDiffWithinAt.prod_map {s : Set E} {t : Set E'} {f : E → F} {g : E' → F'} {x : E}
    {y : E'} (hf : ContDiffWithinAt 𝕜 n f s x) (hg : ContDiffWithinAt 𝕜 n g t y) :
    ContDiffWithinAt 𝕜 n (Prod.map f g) (s ×ˢ t) (x, y)

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type uE}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{F : Type uF}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{n : ℕ∞}
{E' : Type u_3}
[NormedAddCommGroup E']
[NormedSpace 𝕜 E']
{F' : Type u_4}
[NormedAddCommGroup F']
[NormedSpace 𝕜 F']
{s : Set E}
{t : Set E'}
{f : E → F}
{g : E' → F'}
{x : E}
{y : E'}
(hf : ContDiffWithinAt 𝕜 n f s x)
(hg : ContDiffWithinAt 𝕜 n g t y)


@[simp]
theorem nonempty_closedBall : (closedBall x ε).Nonempty ↔ 0 ≤ ε

{α : Type u}
[PseudoMetricSpace α]
{x : α}
{ε : ℝ}

(Metric.closedBall x ε).Nonempty ↔ 0 ≤ ε


private lemma ite_ne_zero_of_ne_zero_of_pos [Preorder α] (ha : a ≠ 0) (hb : 0 < b) :
    ite p a b ≠ 0

{α : Type u_1}
[Zero α]
(p : Prop)
[Decidable p]
{a b : α}
[Preorder α]
(ha : a ≠ 0)
(hb : 0 < b)


theorem isLUB_of_l_image [Preorder α] [Preorder β] (gi : GaloisCoinsertion l u) {s : Set α} {a : β}
    (hs : IsLUB (l '' s) a) : IsLUB s (u a)

{α : Type u}
{β : Type v}
{l : α → β}
{u : β → α}
[Preorder α]
[Preorder β]
(gi : GaloisCoinsertion l u)
{s : Set α}
{a : β}
(hs : IsLUB (l '' s) a)


theorem subset_sUnion_of_subset {s : Set α} (t : Set (Set α)) (u : Set α) (h₁ : s ⊆ u)
    (h₂ : u ∈ t) : s ⊆ ⋃₀t

{α : Type u_1}
{s : Set α}
(t : Set (Set α))
(u : Set α)
(h₁ : s ⊆ u)
(h₂ : u ∈ t)


/-- `n.ascFactorial k = (n + k - 1)! / (n - 1)!` for `n > 0` but without ℕ-division. See
`Nat.ascFactorial_eq_div` for the version with ℕ-division. Consider using
`factorial_mul_ascFactorial` to avoid complications of ℕ-subtraction. -/
theorem factorial_mul_ascFactorial' (n k : ℕ) (h : 0 < n) :
    (n - 1) ! * n.ascFactorial k = (n + k - 1)!

(n - 1).factorial * n.ascFactorial k = (n + k - 1).factorial


theorem _root_.eq_of_fderiv_eq
    {E : Type*} [NormedAddCommGroup E] [NormedSpace 𝕜 E] {f g : E → G}
    (hf : Differentiable 𝕜 f) (hg : Differentiable 𝕜 g)
    (hf' : ∀ x, fderiv 𝕜 f x = fderiv 𝕜 g x) (x : E) (hfgx : f x = g x) : f = g

(hf' : ∀ (x : E), fderiv 𝕜 f x = fderiv 𝕜 g x)


theorem add_apply (v w : VectorMeasure α M) (i : Set α) : (v + w) i = v i + w i

{α : Type u_1}
{m : MeasurableSpace α}
{M : Type u_3}
[AddCommMonoid M]
[TopologicalSpace M]
[ContinuousAdd M]
(v w : MeasureTheory.VectorMeasure α M)
(i : Set α)


@[to_additive]
theorem setLIntegral_eq_tsum' (h : IsFundamentalDomain G s μ) (f : α → ℝ≥0∞) (t : Set α) :
    ∫⁻ x in t, f x ∂μ = ∑' g : G, ∫⁻ x in g • t ∩ s, f (g⁻¹ • x) ∂μ

[MeasureTheory.VAddInvariantMeasure G α μ]

(h : MeasureTheory.IsAddFundamentalDomain G s μ)

(f : α → ℝ≥0∞)

∫⁻ (x : α) in t, f x ∂μ = ∑' (g : G), ∫⁻ (x : α) in (g +ᵥ t) ∩ s, f (-g +ᵥ x) ∂μ


/-- The `nonunits` in a complete normed ring are contained in the complement of the ball of radius
`1` centered at `1 : R`. -/
theorem subset_compl_ball : nonunits R ⊆ (Metric.ball (1 : R) 1)ᶜ

{R : Type u_1}
[NormedRing R]
[CompleteSpace R]


/-- If `n` is even and `a` is even, then `n % a` is even. -/
lemma Even.mod_even (hn : Even n) (ha : Even a) : Even (n % a)


theorem isCauSeq_re (f : CauSeq ℂ Complex.abs) : IsCauSeq abs' fun n => (f n).re


/-- The following statements are equivalent:

0. `s` is a neighborhood of `a` within `(a, +∞)`;
1. `s` is a neighborhood of `a` within `(a, b]`;
2. `s` is a neighborhood of `a` within `(a, b)`;
3. `s` includes `(a, u)` for some `u ∈ (a, b]`;
4. `s` includes `(a, u)` for some `u > a`.
-/
theorem TFAE_mem_nhdsWithin_Ioi {a b : α} (hab : a < b) (s : Set α) :
    TFAE [s ∈ 𝓝[>] a,
      s ∈ 𝓝[Ioc a b] a,
      s ∈ 𝓝[Ioo a b] a,
      ∃ u ∈ Ioc a b, Ioo a u ⊆ s,
      ∃ u ∈ Ioi a, Ioo a u ⊆ s]

{α : Type u_1}
[TopologicalSpace α]
[LinearOrder α]
[OrderTopology α]
{a b : α}
(hab : a < b)
(s : Set α)

[s ∈ 𝓝[>] a, s ∈ 𝓝[Set.Ioc a b] a, s ∈ 𝓝[Set.Ioo a b] a, ∃ u ∈ Set.Ioc a b, Set.Ioo a u ⊆ s,
    ∃ u ∈ Set.Ioi a, Set.Ioo a u ⊆ s].TFAE


lemma not_boundaryGE_next [e.IsRelIff] {j k : ι} (hk : c.Rel j k) :
    ¬ e.BoundaryGE k

{ι : Type u_1}
{ι' : Type u_2}
{c : ComplexShape ι}
{c' : ComplexShape ι'}
(e : c.Embedding c')
[e.IsRelIff]
{j k : ι}
(hk : c.Rel j k)


theorem Nodup.erase_eq_filter [DecidableEq α] {l} (d : Nodup l) (a : α) :
    l.erase a = l.filter (· ≠ a)

{α : Type u}
[DecidableEq α]
{l : List α}
(d : l.Nodup)
(a : α)

l.erase a = List.filter (fun x => decide (x ≠ a)) l


@[simp]
theorem comap_exp_nhds_zero : comap exp (𝓝 0) = comap re atBot

Filter.comap Complex.exp (𝓝 0) = Filter.comap Complex.re Filter.atBot


/-- Build an isomorphism in the category `HopfAlgebraCat R` from a
`BialgEquiv`. -/
@[simps]
def toHopfAlgebraCatIso (e : X ≃ₐc[R] Y) : HopfAlgebraCat.of R X ≅ HopfAlgebraCat.of R Y

{R : Type u}
[CommRing R]
{X Y : Type v}
[Ring X]
[Ring Y]
[HopfAlgebra R X]
[HopfAlgebra R Y]
(e : X ≃ₐc[R] Y)


@[simp]
theorem cons_sigma : (a ::ₘ s).sigma t = (t a).map (Sigma.mk a) + s.sigma t

{α : Type u_1}
{σ : α → Type u_4}
(a : α)
(s : Multiset α)
(t : (a : α) → Multiset (σ a))

(a ::ₘ s).sigma t = Multiset.map (Sigma.mk a) (t a) + s.sigma t


theorem ssubset_of_subset_of_ssubset [IsTrans α (· ⊆ ·)] (h₁ : a ⊆ b) (h₂ : b ⊂ c) : a ⊂ c

[IsNonstrictStrictOrder α (fun x x_1 => x ⊆ x_1) fun x x_1 => x ⊂ x_1]


theorem contMDiff_model : ContMDiff I 𝓘(𝕜, E) n I

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{H : Type u_3}
[TopologicalSpace H]
{I : ModelWithCorners 𝕜 E H}
{n : ℕ∞}


/-- Computing the `MultilinearMap.alternatization` of the `MultilinearMap.domCoprod` is the same
as computing the `AlternatingMap.domCoprod` of the `MultilinearMap.alternatization`s.
-/
theorem MultilinearMap.domCoprod_alternization [DecidableEq ιa] [DecidableEq ιb]
    (a : MultilinearMap R' (fun _ : ιa => Mᵢ) N₁) (b : MultilinearMap R' (fun _ : ιb => Mᵢ) N₂) :
    MultilinearMap.alternatization (MultilinearMap.domCoprod a b) =
      a.alternatization.domCoprod (MultilinearMap.alternatization b)

(a : MultilinearMap R' (fun x => Mᵢ) N₁)

(b : MultilinearMap R' (fun x => Mᵢ) N₂)

MultilinearMap.alternatization (a.domCoprod b) =
  (MultilinearMap.alternatization a).domCoprod (MultilinearMap.alternatization b)


@[simp]
theorem mass_zero_iff (μ : FiniteMeasure Ω) : μ.mass = 0 ↔ μ = 0

{Ω : Type u_1}
[MeasurableSpace Ω]
(μ : MeasureTheory.FiniteMeasure Ω)


theorem denseRange_coe₂ :
    DenseRange fun x : α × β => ((x.1 : Completion α), (x.2 : Completion β))

{α : Type u_1}
[UniformSpace α]
{β : Type u_2}
[UniformSpace β]


theorem hasDerivAt_of_tendstoLocallyUniformlyOn [NeBot l] {s : Set 𝕜} (hs : IsOpen s)
    (hf' : TendstoLocallyUniformlyOn f' g' l s)
    (hf : ∀ᶠ n in l, ∀ x ∈ s, HasDerivAt (f n) (f' n x) x)
    (hfg : ∀ x ∈ s, Tendsto (fun n => f n x) l (𝓝 (g x))) (hx : x ∈ s) : HasDerivAt g (g' x) x

(hf : ∀ᶠ (n : ι) in l, ∀ x ∈ s, HasDerivAt (f n) (f' n x) x)

(hfg : ∀ x ∈ s, Filter.Tendsto (fun n => f n x) l (𝓝 (g x)))


/-- If `f : ℝ → ℝ` is convex on `S` and differentiable at `x ∈ S`, then the slope of any secant
line with left endpoint at `x` is bounded below by the derivative of `f` at `x`. -/
lemma le_slope_of_hasDerivAt (hfc : ConvexOn ℝ S f) (hx : x ∈ S) (hy : y ∈ S) (hxy : x < y)
    (ha : HasDerivAt f f' x) :
    f' ≤ slope f x y

{S : Set ℝ}
{f : ℝ → ℝ}
{x y f' : ℝ}
(hfc : ConvexOn ℝ S f)
(hx : x ∈ S)
(hy : y ∈ S)
(hxy : x < y)
(ha : HasDerivAt f f' x)


@[simp]
theorem preimage_coe_Ici : (some : α → WithTop α) ⁻¹' Ici a = Ici a


theorem proj_map_nth {ι : Type*} {Γ : ι → Type*} [∀ i, Inhabited (Γ i)] (i : ι) (L n) :
    (ListBlank.map (@proj ι Γ _ i) L).nth n = L.nth n i

{ι : Type u_1}
{Γ : ι → Type u_2}
[(i : ι) → Inhabited (Γ i)]
(i : ι)
(L : Turing.ListBlank ((i : ι) → Γ i))
(n : ℕ)

(Turing.ListBlank.map (Turing.proj i) L).nth n = L.nth n i


@[simp]
-- Porting note: had to add an extra coercion arrow on the right hand side.
theorem coe_quotQuotEquivQuotSupₐ : ⇑(quotQuotEquivQuotSupₐ R I J) = ⇑(quotQuotEquivQuotSup I J)

(R : Type u)
{A : Type u_1}
[CommSemiring R]
[CommRing A]
[Algebra R A]
(I J : Ideal A)

⇑(DoubleQuot.quotQuotEquivQuotSupₐ R I J) = ⇑(DoubleQuot.quotQuotEquivQuotSup I J)