/-- If `s` and `t` are compact sets and `n` is an open neighborhood of `s × t`, then there exist
open neighborhoods `u ⊇ s` and `v ⊇ t` such that `u × v ⊆ n`.

See also `IsCompact.nhdsSet_prod_eq`. -/
theorem generalized_tube_lemma (hs : IsCompact s) {t : Set Y} (ht : IsCompact t)
    {n : Set (X × Y)} (hn : IsOpen n) (hp : s ×ˢ t ⊆ n) :
    ∃ (u : Set X) (v : Set Y), IsOpen u ∧ IsOpen v ∧ s ⊆ u ∧ t ⊆ v ∧ u ×ˢ v ⊆ n

{X : Type u}
{Y : Type v}
[TopologicalSpace X]
[TopologicalSpace Y]
{s : Set X}
(hs : IsCompact s)
{t : Set Y}
(ht : IsCompact t)
{n : Set (X × Y)}
(hn : IsOpen n)
(hp : s ×ˢ t ⊆ n)

∃ u v, IsOpen u ∧ IsOpen v ∧ s ⊆ u ∧ t ⊆ v ∧ u ×ˢ v ⊆ n


theorem evalWhiskerRight_cons_of_of
    (α : f ⟶ g) (η : g ⟶ h) {ηs : h ⟶ i} {θ : h ⊗ j ⟶ i ⊗ j}
    (pf_θ : ηs ▷ j = θ) :
    (α ≫ η ≫ ηs) ▷ j = α ▷ j ≫ η ▷ j ≫ θ

{θ : CategoryTheory.MonoidalCategory.tensorObj h j ⟶ CategoryTheory.MonoidalCategory.tensorObj i j}

(pf_θ : CategoryTheory.MonoidalCategory.whiskerRight ηs j = θ)

CategoryTheory.MonoidalCategory.whiskerRight
    (CategoryTheory.CategoryStruct.comp α (CategoryTheory.CategoryStruct.comp η ηs)) j =
  CategoryTheory.CategoryStruct.comp (CategoryTheory.MonoidalCategory.whiskerRight α j)
    (CategoryTheory.CategoryStruct.comp (CategoryTheory.MonoidalCategory.whiskerRight η j) θ)


@[fun_prop]
theorem HasFDerivWithinAt.mul (hc : HasFDerivWithinAt c c' s x) (hd : HasFDerivWithinAt d d' s x) :
    HasFDerivWithinAt (fun y => c y * d y) (c x • d' + d x • c') s x

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{x : E}
{s : Set E}
{𝔸' : Type u_7}
[NormedCommRing 𝔸']
[NormedAlgebra 𝕜 𝔸']
{c d : E → 𝔸'}
{c' d' : E →L[𝕜] 𝔸'}
(hc : HasFDerivWithinAt c c' s x)
(hd : HasFDerivWithinAt d d' s x)


/-- a function `f : α × β → ℚ → ℝ` is called a rational conditional kernel CDF of `κ` with respect
to `ν` if is measurable, if `fun b ↦ f (a, b) x` is `(ν a)`-integrable for all `a : α` and `x : ℝ`
and for all measurable sets `s : Set β`, `∫ b in s, f (a, b) x ∂(ν a) = (κ a (s ×ˢ Iic x)).toReal`.
Also the `ℚ → ℝ` function `f (a, b)` should satisfy the properties of a Sieltjes function for
`(ν a)`-almost all `b : β`. -/
structure IsRatCondKernelCDF (f : α × β → ℚ → ℝ) (κ : Kernel α (β × ℝ)) (ν : Kernel α β) : Prop :=
  measurable : Measurable f
  isRatStieltjesPoint_ae (a : α) : ∀ᵐ b ∂(ν a), IsRatStieltjesPoint f (a, b)
  integrable (a : α) (q : ℚ) : Integrable (fun b ↦ f (a, b) q) (ν a)
  setIntegral (a : α) {s : Set β} (_hs : MeasurableSet s) (q : ℚ) :
    ∫ b in s, f (a, b) q ∂(ν a) = (κ a (s ×ˢ Iic (q : ℝ))).toReal

{f : α × β → ℚ → ℝ}

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

(self : ProbabilityTheory.IsRatCondKernelCDF f κ ν)

MeasureTheory.Integrable (fun b => f (a, b) q) (ν a)


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


theorem normalizeScaleRoots_coeff_mul_leadingCoeff_pow (i : ℕ) (hp : 1 ≤ natDegree p) :
    (normalizeScaleRoots p).coeff i * p.leadingCoeff ^ i =
      p.coeff i * p.leadingCoeff ^ (p.natDegree - 1)

{R : Type u_1}
[CommRing R]
(p : R[X])
(i : ℕ)
(hp : 1 ≤ p.natDegree)


theorem unzip_zip {l₁ : List α} {l₂ : List β} (h : length l₁ = length l₂) :
    unzip (zip l₁ l₂) = (l₁, l₂)

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


theorem uniformEmbedding_addEquiv : UniformEmbedding (addEquiv 𝕜 A)

{𝕜 : Type u_1}
{A : Type u_2}
[NontriviallyNormedField 𝕜]
[NonUnitalNormedRing A]

UniformEmbedding ⇑(Unitization.addEquiv 𝕜 A)


/-- A number field is a field which has characteristic zero and is finite
dimensional over ℚ. -/
class NumberField (K : Type*) [Field K] : Prop where
  [to_charZero : CharZero K]
  [to_finiteDimensional : FiniteDimensional ℚ K]

{K : Type u_1}
[Field K]
[self : NumberField K]


theorem gauge_smul_left [Module α E] [SMulCommClass α ℝ ℝ] [IsScalarTower α ℝ ℝ]
    [IsScalarTower α ℝ E] {s : Set E} (symmetric : ∀ x ∈ s, -x ∈ s) (a : α) :
    gauge (a • s) = |a|⁻¹ • gauge s

{E : Type u_2}
[AddCommGroup E]
[Module ℝ E]
{α : Type u_4}
[LinearOrderedField α]
[MulActionWithZero α ℝ]
[OrderedSMul α ℝ]
[Module α E]
[SMulCommClass α ℝ ℝ]
[IsScalarTower α ℝ ℝ]
[IsScalarTower α ℝ E]
{s : Set E}
(symmetric : ∀ x ∈ s, -x ∈ s)
(a : α)


/-- The set of fixed points of a continuous map is a closed set. -/
theorem isClosed_fixedPoints (hf : Continuous f) : IsClosed (fixedPoints f)

{α : Type u_1}
[TopologicalSpace α]
[T2Space α]
{f : α → α}
(hf : Continuous f)


lemma map_nsmul_piAntidiag (s : Finset ι) (m : ℕ) {n : ℕ} (hn : n ≠ 0) :
    (piAntidiag s m).map
      ⟨(n • ·), fun f g h ↦ funext fun i ↦ mul_right_injective₀ hn (congr_fun h i)⟩ =
        (piAntidiag s (n * m)).filter fun f : ι → ℕ ↦ ∀ i ∈ s, n ∣ f i

{ι : Type u_1}
[DecidableEq ι]
(s : Finset ι)
(m : ℕ)
{n : ℕ}
(hn : n ≠ 0)

Finset.map { toFun := fun x => n • x, inj' := ⋯ } (s.piAntidiag m) =
  Finset.filter (fun f => ∀ i ∈ s, n ∣ f i) (s.piAntidiag (n * m))


theorem toIcoMod_zero_sub_comm (a b : α) : toIcoMod hp 0 (a - b) = p - toIocMod hp 0 (b - a)

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


@[simp] theorem false_and (p : Prop) : (False ∧ p) = False


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

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


@[to_additive (attr := simp)]
theorem kerLift_mk (g : G) : (kerLift φ) g = φ g

{G : Type u}
[Group G]
{H : Type v}
[Group H]
(φ : G →* H)
(g : G)


theorem Filter.HasBasis.specializes_iff {ι} {p : ι → Prop} {s : ι → Set X}
    (h : (𝓝 y).HasBasis p s) : x ⤳ y ↔ ∀ i, p i → x ∈ s i

{X : Type u_1}
[TopologicalSpace X]
{x y : X}
{ι : Sort u_7}
{p : ι → Prop}
{s : ι → Set X}
(h : (𝓝 y).HasBasis p s)


theorem compChangeOfVariables_blocksFun (m M N : ℕ) {i : Σ n, Fin n → ℕ}
    (hi : i ∈ compPartialSumSource m M N) (j : Fin i.1) :
    (compChangeOfVariables m M N i hi).2.blocksFun
        ⟨j, (compChangeOfVariables_length m M N hi).symm ▸ j.2⟩ =
      i.2 j

(hi : i ∈ FormalMultilinearSeries.compPartialSumSource m M N)

(FormalMultilinearSeries.compChangeOfVariables m M N i hi).snd.blocksFun ⟨↑j, ⋯⟩ = i.snd j


@[simp]
theorem pos_real_re : (x • z).re = x * z.re


@[simp]
theorem coe_attach (l : List α) : @Eq (Multiset { x // x ∈ l }) (@attach α l) l.attach


/-- A real uniform random variable `X` with support `s` has expectation
`(λ s)⁻¹ * ∫ x in s, x ∂λ` where `λ` is the Lebesgue measure. -/
theorem integral_eq (huX : IsUniform X s ℙ) :
    ∫ x, X x ∂ℙ = (volume s)⁻¹.toReal * ∫ x in s, x

∀ {x : MeasurableSpace Ω} {ℙ : MeasureTheory.Measure Ω} {X : Ω → ℝ} {s : Set ℝ},
  MeasureTheory.pdf.IsUniform X s ℙ MeasureTheory.volume →
    ∫ (x : Ω), X x ∂ℙ = (MeasureTheory.volume s)⁻¹.toReal * ∫ (x : ℝ) in s, x


@[simp]
theorem coe_dualBasis : ⇑b.dualBasis = b.coord

{R : Type uR}
{M : Type uM}
{ι : Type uι}
[CommRing R]
[AddCommGroup M]
[Module R M]
[DecidableEq ι]
(b : Basis ι R M)
[Finite ι]


theorem Integrable.add_measure {f : α → β} (hμ : Integrable f μ) (hν : Integrable f ν) :
    Integrable f (μ + ν)

{α : Type u_1}
{β : Type u_2}
{m : MeasurableSpace α}
{μ ν : MeasureTheory.Measure α}
[NormedAddCommGroup β]
{f : α → β}
(hμ : MeasureTheory.Integrable f μ)
(hν : MeasureTheory.Integrable f ν)


theorem sq_eq_one_of_sq_le_three {x : ℤ} (h1 : x ^ 2 ≤ 3) (h2 : x ≠ 0) : x ^ 2 = 1


protected theorem tsum_const_smul {R} [SMul R ℝ≥0∞] [IsScalarTower R ℝ≥0∞ ℝ≥0∞] (a : R) :
    ∑' i, a • f i = a • ∑' i, f i

{α : Type u_1}
{f : α → ℝ≥0∞}
{R : Type u_4}
[SMul R ℝ≥0∞]
[IsScalarTower R ℝ≥0∞ ℝ≥0∞]
(a : R)

∑' (i : α), a • f i = a • ∑' (i : α), f i


@[simp]
theorem lift.tmul' (x y) : (lift f).1 (x ⊗ₜ y) = f x y

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

(TensorProduct.lift f).toAddHom (x ⊗ₜ[R] y) = (f x) y


theorem lt_sInf_add_pos {s : Set ℝ} (h : s.Nonempty) {ε : ℝ} (hε : 0 < ε) :
    ∃ a ∈ s, a < sInf s + ε


/-- Rewrite the Fourier integral in a form that allows us to use uniform continuity. -/
theorem fourierIntegral_eq_half_sub_half_period_translate {w : V} (hw : w ≠ 0)
    (hf : Integrable f) :
    ∫ v : V, 𝐞 (-⟪v, w⟫) • f v = (1 / (2 : ℂ)) • ∫ v : V, 𝐞 (-⟪v, w⟫) • (f v - f (v + i w))

(hf : MeasureTheory.Integrable f MeasureTheory.volume)


@[simp] protected theorem sub_self (x : BitVec n) : x - x = 0#n


theorem rightLim_eq (f : StieltjesFunction) (x : ℝ) : Function.rightLim f x = f x


@[elab_as_elim]
lemma induction_structuredArrow (g : StructuredArrow (L.obj X) L) : P g

(P : CategoryTheory.StructuredArrow (L.obj X) L → Prop)

(hP₀ : P (CategoryTheory.StructuredArrow.mk (CategoryTheory.CategoryStruct.id (L.obj X))))

(hP₁ :
  ∀ ⦃Y₁ Y₂ : C⦄ (f : Y₁ ⟶ Y₂) (φ : L.obj X ⟶ L.obj Y₁),
    P (CategoryTheory.StructuredArrow.mk φ) →
      P (CategoryTheory.StructuredArrow.mk (CategoryTheory.CategoryStruct.comp φ (L.map f))))

(hP₂ :
  ∀ ⦃Y₁ Y₂ : C⦄ (w : Y₁ ⟶ Y₂) (hw : W w) (φ : L.obj X ⟶ L.obj Y₂),
    P (CategoryTheory.StructuredArrow.mk φ) →
      P
        (CategoryTheory.StructuredArrow.mk
          (CategoryTheory.CategoryStruct.comp φ (CategoryTheory.Localization.isoOfHom L W w hw).inv)))

(g : CategoryTheory.StructuredArrow (L.obj X) L)


@[simp] theorem toNat_ofBool (b : Bool) : (ofBool b).toNat = b.toNat


@[simp]
theorem succ_pred_of_not_isMin (h : ¬IsMin a) : succ (pred a) = a

{α : Type u_1}
[PartialOrder α]
[SuccOrder α]
[PredOrder α]
{a : α}
(h : ¬IsMin a)


/-- If `f : α → β` has a left-inverse when `α` is nonempty, then `α` is computably equivalent to the
range of `f`.

While awkward, the `Nonempty α` hypothesis on `f_inv` and `hf` allows this to be used when `α` is
empty too. This hypothesis is absent on analogous definitions on stronger `Equiv`s like
`LinearEquiv.ofLeftInverse` and `RingEquiv.ofLeftInverse` as their typeclass assumptions
are already sufficient to ensure non-emptiness. -/
@[simps]
def ofLeftInverse {α β : Sort _} (f : α → β) (f_inv : Nonempty α → β → α)
    (hf : ∀ h : Nonempty α, LeftInverse (f_inv h) f) :
    α ≃ range f

(hf : ∀ (h : Nonempty α), Function.LeftInverse (f_inv h) f)

↑((Equiv.ofLeftInverse f f_inv hf) a) = f a


nonrec theorem IsLocalMaxOn.min (hf : IsLocalMaxOn f s a) (hg : IsLocalMaxOn g s a) :
    IsLocalMaxOn (fun x => min (f x) (g x)) s a

{α : Type u}
{β : Type v}
[TopologicalSpace α]
[LinearOrder β]
{f g : α → β}
{a : α}
{s : Set α}
(hf : IsLocalMaxOn f s a)
(hg : IsLocalMaxOn g s a)


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

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


theorem Decidable.not_imp_comm [Decidable a] [Decidable b] : (¬a → b) ↔ (¬b → a)

{a b : Prop}
[Decidable a]
[Decidable b]

¬a → b ↔ ¬b → a


lemma mk_eq_zero_of_den (f : NumDenSameDeg 𝒜 x) (h : f.den = 0) : mk f = 0

(f : HomogeneousLocalization.NumDenSameDeg 𝒜 x)


/--
Express the value of `sinZeta` at an odd integer `> 1` as a value of the Bernoulli polynomial.

Note that this formula is also correct for `k = 0` (i.e. for the value at `s = 1`), but we do not
prove it in this case, owing to the additional difficulty of working with series that are only
conditionally convergent.
-/
theorem sinZeta_two_mul_nat_add_one (hk : k ≠ 0) (hx : x ∈ Icc 0 1) :
    sinZeta x (2 * k + 1) = (-1) ^ (k + 1) * (2 * π) ^ (2 * k + 1) / 2 / (2 * k + 1)! *
      ((Polynomial.bernoulli (2 * k + 1)).map (algebraMap ℚ ℂ)).eval (x : ℂ)

{k : ℕ}
{x : ℝ}
(hk : k ≠ 0)
(hx : x ∈ Set.Icc 0 1)

HurwitzZeta.sinZeta (↑x) (2 * ↑k + 1) =
  (-1) ^ (k + 1) * (2 * ↑π) ^ (2 * k + 1) / 2 / ↑(2 * k + 1)! *
    Polynomial.eval (↑x) (Polynomial.map (algebraMap ℚ ℂ) (Polynomial.bernoulli (2 * k + 1)))


theorem dist_le_iff_of_nonempty [Nonempty α] : dist f g ≤ C ↔ ∀ x, dist (f x) (g x) ≤ C

{α : Type u_1}
{β : Type u_2}
[TopologicalSpace α]
[CompactSpace α]
[MetricSpace β]
{f g : C(α, β)}
{C : ℝ}
[Nonempty α]

dist f g ≤ C ↔ ∀ (x : α), dist (f x) (g x) ≤ C


@[simp]
theorem nim_grundyValue (o : Ordinal.{u}) : grundyValue (nim o) = o


@[to_additive]
lemma IsPretransitive.of_smul_eq {M N α : Type*} [SMul M α] [SMul N α] [IsPretransitive M α]
    (f : M → N) (hf : ∀ {c : M} {x : α}, f c • x = c • x) : IsPretransitive N α


@[simp]
theorem csSup_empty : (sSup ∅ : α) = ⊥

{α : Type u_1}
[ConditionallyCompleteLinearOrderBot α]


/-- In a normed algebra `𝔸` over `𝕂 = ℝ` or `𝕂 = ℂ`, the series defining the exponential map
has an infinite radius of convergence. -/
theorem expSeries_radius_eq_top : (expSeries 𝕂 𝔸).radius = ∞

(𝕂 : Type u_1)
(𝔸 : Type u_2)
[RCLike 𝕂]
[NormedRing 𝔸]
[NormedAlgebra 𝕂 𝔸]


/-- In a `DivisionCommMonoid`, `Equiv.inv` is a `MulEquiv`. There is a variant of this
`MulEquiv.inv' G : G ≃* Gᵐᵒᵖ` for the non-commutative case. -/
@[to_additive (attr := simps apply)
  "When the `AddGroup` is commutative, `Equiv.neg` is an `AddEquiv`."]
def MulEquiv.inv (G : Type*) [DivisionCommMonoid G] : G ≃* G


@[to_additive]
protected theorem le_mul_iff_one_le_left [MulOneClass α] [i : IsSymmOp α α (· * ·)]
    [CovariantClass α α (· * ·) (· ≤ ·)] {a b : α} (ha : MulLECancellable a) :
    a ≤ b * a ↔ 1 ≤ b

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


protected theorem ContDiffWithinAt.eventually {n : ℕ} (h : ContDiffWithinAt 𝕜 n f s x) :
    ∀ᶠ y in 𝓝[insert x s] x, ContDiffWithinAt 𝕜 n f s y

{𝕜 : Type u}
[NontriviallyNormedField 𝕜]
{E : Type uE}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{F : Type uF}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{s : Set E}
{f : E → F}
{x : E}
{n : ℕ}
(h : ContDiffWithinAt 𝕜 (↑n) f s x)

∀ᶠ (y : E) in 𝓝[insert x s] x, ContDiffWithinAt 𝕜 (↑n) f s y


theorem map_comp (f : α → β) (g : β → γ) : ∀ s : Computation α, map (g ∘ f) s = map g (map f s)

{α : Type u}
{β : Type v}
{γ : Type w}
(f : α → β)
(g : β → γ)
(s : Computation α)

Computation.map (g ∘ f) s = Computation.map g (Computation.map f s)


@[simp]
theorem toIcoMod_add_right' (a b : α) : toIcoMod hp (a + p) b = toIcoMod hp a b + p

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


@[simp] theorem erase_cons_head [LawfulBEq α] (a : α) (l : List α) : (a :: l).erase a = l

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


@[simp]
theorem coe_toNonUnitalSubalgebra (S : NonUnitalStarSubalgebra R A) :
    (↑S.toNonUnitalSubalgebra : Set A) = S

{R : Type u}
{A : Type v}
[CommSemiring R]
[NonUnitalNonAssocSemiring A]
[Module R A]
[Star A]
(S : NonUnitalStarSubalgebra R A)


/-- The natural isomorphism `K.homology i ≅ (K.sc i).homology`
for all homological complexes `K`. -/
@[simps!]
noncomputable def homologyFunctorIso [CategoryWithHomology C] :
    homologyFunctor C c i ≅
      shortComplexFunctor C c i ⋙ ShortComplex.homologyFunctor C

(HomologicalComplex.homologyFunctorIso C c i).inv.app X = 𝟙 (X.homology i)


@[field_simps]
theorem divp_mul_eq_mul_divp (x y : α) (u : αˣ) : x /ₚ u * y = x * y /ₚ u

{α : Type u}
[CommMonoid α]
(x y : α)
(u : αˣ)


theorem Dep.dep_restriction (hX : M.Dep X) (hNM : N ≤r M) (hXE : X ⊆ N.E := by aesop_mat) :
    N.Dep X

{α : Type u_1}
{M : Matroid α}
{X : Set α}
{N : Matroid α}
(hX : M.Dep X)
(hNM : N.Restriction M)
(hXE : X ⊆ N.E := by aesop_mat)


theorem inr_apply (x : B) : inr R A B x = (0, x)

{R : Type u_1}
{A : Type u_2}
{B : Type u_3}
[Monoid R]
[NonUnitalNonAssocSemiring A]
[DistribMulAction R A]
[StarAddMonoid A]
[NonUnitalNonAssocSemiring B]
[DistribMulAction R B]
[StarAddMonoid B]
(x : B)

(NonUnitalStarAlgHom.inr R A B) x = (0, x)


theorem UniformContinuousOn.continuousOn [UniformSpace α] [UniformSpace β] {f : α → β} {s : Set α}
    (h : UniformContinuousOn f s) : ContinuousOn f s

{α : Type ua}
{β : Type ub}
[UniformSpace α]
[UniformSpace β]
{f : α → β}
{s : Set α}
(h : UniformContinuousOn f s)


/-- A presheaf is called an ind-object if it can be written as a filtered colimit of representable
    presheaves. -/
structure IsIndObject (A : Cᵒᵖ ⥤ Type v) : Prop where
  mk' :: nonempty_presentation : Nonempty (IndObjectPresentation A)

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

(self : CategoryTheory.Limits.IsIndObject A)


@[simp]
theorem isCycle_copy {u u'} (p : G.Walk u u) (hu : u = u') :
    (p.copy hu hu).IsCycle ↔ p.IsCycle

{V : Type u}
{G : SimpleGraph V}
{u u' : V}
(p : G.Walk u u)
(hu : u = u')


protected theorem interior (h : e.IsImage s t) : e.IsImage (interior s) (interior t)

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


theorem uncurry_eq (g : Y ⟶ A ⟹ X) : uncurry g = Limits.prod.map (𝟙 A) g ≫ (exp.ev A).app X

CategoryTheory.CartesianClosed.uncurry g =
  CategoryTheory.CategoryStruct.comp (CategoryTheory.Limits.prod.map (CategoryTheory.CategoryStruct.id A) g)
    ((CategoryTheory.exp.ev A).app X)


@[reassoc (attr := simp)]
theorem rightAdjointUniq_hom_counit {F : C ⥤ D} {G G' : D ⥤ C} (adj1 : F ⊣ G) (adj2 : F ⊣ G') :
    whiskerRight (rightAdjointUniq adj1 adj2).hom F ≫ adj2.counit = adj1.counit

{C : Type u_1}
{D : Type u_2}
[CategoryTheory.Category.{u_3, u_1} C]
[CategoryTheory.Category.{u_4, u_2} D]
{F : C ⥤ D}
{G G' : D ⥤ C}
(adj1 : F ⊣ G)
(adj2 : F ⊣ G')

CategoryTheory.whiskerRight (adj1.rightAdjointUniq adj2).hom F ≫ adj2.counit = adj1.counit


theorem commute_map_mul_map_of_isOrtho_of_mem_evenOdd_zero_right
    {i₁ : ZMod 2} (hm₁ : m₁ ∈ evenOdd Q₁ i₁) (hm₂ : m₂ ∈ evenOdd Q₂ 0) :
    Commute (map f₁ m₁) (map f₂ m₂)

(hf : ∀ (x : M₁) (y : M₂), QuadraticMap.IsOrtho Qₙ (f₁ x) (f₂ y))

(hm₁ : m₁ ∈ CliffordAlgebra.evenOdd Q₁ i₁)

(hm₂ : m₂ ∈ CliffordAlgebra.evenOdd Q₂ 0)

Commute ((CliffordAlgebra.map f₁) m₁) ((CliffordAlgebra.map f₂) m₂)


/-- For elements `a` and `b` of a linear order, either `max a b = a` and `b ≤ a`,
    or `max a b = b` and `a < b`.
    Use cases on this lemma to automate linarith in inequalities -/
theorem max_cases (a b : α) : max a b = a ∧ b ≤ a ∨ max a b = b ∧ a < b


@[gcongr] protected theorem pow (m : ℕ) (h : a ≡ b [ZMOD n]) : a ^ m ≡ b ^ m [ZMOD n]

{n a b : ℤ}
(m : ℕ)
(h : a ≡ b [ZMOD n])


@[ext]
lemma FirstObj.ext (z₁ z₂ : FirstObj P X) (h : ∀ i, (Pi.π _ i : FirstObj P X ⟶ _) z₁ =
    (Pi.π _ i : FirstObj P X ⟶ _) z₂) : z₁ = z₂

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

(z₁ z₂ : CategoryTheory.Equalizer.Presieve.Arrows.FirstObj P X)

(h :
  ∀ (i : I),
    CategoryTheory.Limits.Pi.π (fun i => P.obj (Opposite.op (X i))) i z₁ =
      CategoryTheory.Limits.Pi.π (fun i => P.obj (Opposite.op (X i))) i z₂)


@[simp]
theorem toIcoMod_add_left (a b : α) : toIcoMod hp a (p + b) = toIcoMod hp a b

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


theorem bihimp_def [∀ i, GeneralizedHeytingAlgebra (π i)] (a b : ∀ i, π i) :
    a ⇔ b = fun i => a i ⇔ b i

[(i : ι) → GeneralizedHeytingAlgebra (π i)]


nonrec theorem IsLocalMinOn.sub (hf : IsLocalMinOn f s a) (hg : IsLocalMaxOn g s a) :
    IsLocalMinOn (fun x => f x - g x) s a

{α : Type u}
{β : Type v}
[TopologicalSpace α]
[OrderedAddCommGroup β]
{f g : α → β}
{a : α}
{s : Set α}
(hf : IsLocalMinOn f s a)
(hg : IsLocalMaxOn g s a)


/-- A functor `F : C ⥤ D` sends binary bicones for `P` and `Q`
to binary bicones for `G.obj P` and `G.obj Q` functorially. -/
@[simps]
def functoriality : BinaryBicone P Q ⥤ BinaryBicone (F.obj P) (F.obj Q)

(A : CategoryTheory.Limits.BinaryBicone P Q)

((CategoryTheory.Limits.BinaryBicones.functoriality P Q F).obj A).pt = F.obj A.pt


@[simp] theorem USize.toUInt64_toNat (x : USize) : x.toUInt64.toNat = x.toNat


@[grind_norm↓] theorem not_and (p q : Prop) : (¬(p ∧ q)) = (¬p ∨ ¬q)


@[simp] theorem runK_bind_pure (a : α) (f : α → StateCpsT σ m β) (s : σ) (k : β → σ → m γ) : (pure a >>= f).runK s k = (f a).runK s k

{α σ : Type u}
{m : Type u → Type v}
{β γ : Type u}
(a : α)
(f : α → StateCpsT σ m β)
(s : σ)
(k : β → σ → m γ)


@[simp] theorem castSucc_mk (n i : Nat) (h : i < n) : castSucc ⟨i, h⟩ = ⟨i, Nat.lt.step h⟩


theorem deleteEdges_sdiff_eq_of_le {H : SimpleGraph V} (h : H ≤ G) :
    G.deleteEdges (G.edgeSet \ H.edgeSet) = H

{V : Type u}
{G H : SimpleGraph V}
(h : H ≤ G)


@[simp]
theorem Function.Embedding.toEquivRange_apply (a : α) :
    f.toEquivRange a = ⟨f a, Set.mem_range_self a⟩

{α : Type u_1}
{β : Type u_2}
[Fintype α]
[DecidableEq β]
(f : α ↪ β)
(a : α)


theorem sum_apply {α} (t : Finset α) (B : α → BilinForm R M) (v w : M) :
    (∑ i ∈ t, B i) v w = ∑ i ∈ t, B i v w

{R : Type u_1}
{M : Type u_2}
[CommSemiring R]
[AddCommMonoid M]
[Module R M]
{α : Type u_7}
(t : Finset α)
(B : α → LinearMap.BilinForm R M)
(v w : M)

((∑ i ∈ t, B i) v) w = ∑ i ∈ t, ((B i) v) w


@[simp] theorem testBit_succ (x i : Nat) : testBit x (succ i) = testBit (x/2) i


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

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


/-- A morphism of monads is a natural transformation compatible with η and μ. -/
@[ext]
structure MonadHom (T₁ T₂ : Monad C) extends NatTrans (T₁ : C ⥤ C) T₂ where
  app_η : ∀ X, T₁.η.app X ≫ app X = T₂.η.app X := by aesop_cat
  app_μ : ∀ X, T₁.μ.app X ≫ app X = (T₁.map (app X) ≫ app _) ≫ T₂.μ.app X := by
    aesop_cat

{C : Type u₁}
[CategoryTheory.Category.{v₁, u₁} C]
{T₁ T₂ : CategoryTheory.Monad C}
(self : CategoryTheory.MonadHom T₁ T₂)
(X : C)

CategoryTheory.CategoryStruct.comp (T₁.μ.app X) (self.app X) =
  CategoryTheory.CategoryStruct.comp (CategoryTheory.CategoryStruct.comp (T₁.map (self.app X)) (self.app (T₂.obj X)))
    (T₂.μ.app X)


theorem hasFDerivAt_exp_smul_const_of_mem_ball (x : 𝔸) (t : 𝕊)
    (htx : t • x ∈ EMetric.ball (0 : 𝔸) (expSeries 𝕂 𝔸).radius) :
    HasFDerivAt (fun u : 𝕊 => exp 𝕂 (u • x)) (exp 𝕂 (t • x) • (1 : 𝕊 →L[𝕂] 𝕊).smulRight x) t

(htx : t • x ∈ EMetric.ball 0 (NormedSpace.expSeries 𝕂 𝔸).radius)

HasFDerivAt (fun u => NormedSpace.exp 𝕂 (u • x)) (NormedSpace.exp 𝕂 (t • x) • ContinuousLinearMap.smulRight 1 x) t


@[simp]
theorem noetherian_univ_iff : NoetherianSpace (Set.univ : Set α) ↔ NoetherianSpace α

TopologicalSpace.NoetherianSpace ↑Set.univ ↔ TopologicalSpace.NoetherianSpace α


@[simp]
theorem pullback_inter {f : Y ⟶ X} (S R : Sieve X) :
    (S ⊓ R).pullback f = S.pullback f ⊓ R.pullback f

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

CategoryTheory.Sieve.pullback f (S ⊓ R) = CategoryTheory.Sieve.pullback f S ⊓ CategoryTheory.Sieve.pullback f R


theorem Filter.EventuallyEq.iteratedFDerivWithin' (h : f₁ =ᶠ[𝓝[s] x] f) (ht : t ⊆ s) (n : ℕ) :
    iteratedFDerivWithin 𝕜 n f₁ t =ᶠ[𝓝[s] x] iteratedFDerivWithin 𝕜 n f t

{𝕜 : Type u}
[NontriviallyNormedField 𝕜]
{E : Type uE}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{F : Type uF}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{s t : Set E}
{f f₁ : E → F}
{x : E}
(h : f₁ =ᶠ[𝓝[s] x] f)
(ht : t ⊆ s)
(n : ℕ)


theorem vsub_vadd_comm (p₁ p₂ p₃ : P) : (p₁ -ᵥ p₂ : G) +ᵥ p₃ = p₃ -ᵥ p₂ +ᵥ p₁

{G : Type u_1}
{P : Type u_2}
[AddCommGroup G]
[AddTorsor G P]
(p₁ p₂ p₃ : P)


theorem eventually_abs_sub_lt (a : α) {ε : α} (hε : 0 < ε) : ∀ᶠ x in 𝓝 a, |x - a| < ε

{α : Type u_1}
[TopologicalSpace α]
[LinearOrderedAddCommGroup α]
[OrderTopology α]
(a : α)
{ε : α}
(hε : 0 < ε)


@[simp, norm_cast]
theorem intCast_mul_eq_zsmul (x : ℝ) (n : ℤ) : ↑((n : ℝ) * x : ℝ) = n • (↑x : Angle)


theorem Filter.Eventually.self_of_nhdsWithin {p : α → Prop} {s : Set α} {x : α}
    (h : ∀ᶠ y in 𝓝[s] x, p y) (hx : x ∈ s) : p x

{α : Type u_1}
[TopologicalSpace α]
{p : α → Prop}
{s : Set α}
{x : α}
(h : ∀ᶠ (y : α) in 𝓝[s] x, p y)
(hx : x ∈ s)


theorem compRel_assoc {r s t : Set (α × α)} : r ○ s ○ t = r ○ (s ○ t)


private theorem coprime_sq_sub_mul_of_odd_even {m n : ℤ} (h : Int.gcd m n = 1) (hm : m % 2 = 1)
    (hn : n % 2 = 0) : Int.gcd (m ^ 2 - n ^ 2) (2 * m * n) = 1


theorem clog_of_left_le_one {b : ℕ} (hb : b ≤ 1) (r : R) : clog b r = 0

{R : Type u_1}
[LinearOrderedSemifield R]
[FloorSemiring R]
{b : ℕ}
(hb : b ≤ 1)
(r : R)


@[simp]
theorem mk_quaternionAlgebra_of_infinite [Infinite R] : #(ℍ[R,c₁,c₂]) = #R


/-- The inductively defined smallest congruence relation containing a binary relation `r` equals
    the infimum of the set of congruence relations containing `r`. -/
@[to_additive addConGen_eq "The inductively defined smallest additive congruence relation
containing a binary relation `r` equals the infimum of the set of additive congruence relations
containing `r`."]
theorem conGen_eq (r : M → M → Prop) : conGen r = sInf { s : Con M | ∀ x y, r x y → s x y }

{M : Type u_1}
[Add M]
(r : M → M → Prop)

addConGen r = sInf {s | ∀ (x y : M), r x y → s x y}


theorem HasStrictDerivAt.smul_const (hc : HasStrictDerivAt c c' x) (f : F) :
    HasStrictDerivAt (fun y => c y • f) (c' • f) x

{𝕜 : Type u}
[NontriviallyNormedField 𝕜]
{F : Type v}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{x : 𝕜}
{𝕜' : Type u_2}
[NontriviallyNormedField 𝕜']
[NormedAlgebra 𝕜 𝕜']
[NormedSpace 𝕜' F]
[IsScalarTower 𝕜 𝕜' F]
{c : 𝕜 → 𝕜'}
{c' : 𝕜'}
(hc : HasStrictDerivAt c c' x)
(f : F)


@[to_additive (attr := simp)]
lemma inf_inv [SemilatticeInf β] [OrderTop β] (s : Finset α) (f : α → β) :
    inf s⁻¹ f = inf s (f ·⁻¹)

{α : Type u_2}
{β : Type u_3}
[DecidableEq α]
[Neg α]
[SemilatticeInf β]
[OrderTop β]
(s : Finset α)
(f : α → β)


theorem subtype_Ioc_eq : Ioc a b = (Ioc (a : α) b).subtype p

{α : Type u_1}
[Preorder α]
(p : α → Prop)
[DecidablePred p]
[LocallyFiniteOrder α]
(a b : Subtype p)

Finset.Ioc a b = Finset.subtype p (Finset.Ioc ↑a ↑b)


@[simp]
theorem preimage_Iic : ((↑) : ℤ → α) ⁻¹' Set.Iic a = Set.Iic ⌊a⌋

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


@[to_additive (attr := simp)]
theorem traverse_pure (x) : traverse F (pure x : FreeSemigroup α) = pure <$> F x

{α β : Type u}
{m : Type u → Type u}
[Applicative m]
(F : α → m β)
(x : α)


theorem inf_covBy_of_covBy_sup_of_covBy_sup_right : a ⋖ a ⊔ b → b ⋖ a ⊔ b → a ⊓ b ⋖ b

{α : Type u_1}
[Lattice α]
[IsWeakLowerModularLattice α]
{a b : α}


/-- Any additive functor `C ⥤ D` to a category `D` with finite biproducts extends to
a functor `Mat_ C ⥤ D`. -/
@[simps]
def lift (F : C ⥤ D) [Functor.Additive F] : Mat_ C ⥤ D

(CategoryTheory.Mat_.lift F).obj X = ⨁ fun i => F.obj (X.X i)


/-- Assumes left covariance.
The lemma assuming right covariance is `Right.one_lt_mul'`. -/
@[to_additive Left.add_pos' "Assumes left covariance.
The lemma assuming right covariance is `Right.add_pos'`."]
theorem Left.one_lt_mul' [CovariantClass α α (· * ·) (· ≤ ·)] {a b : α} (ha : 1 < a) (hb : 1 < b) :
    1 < a * b

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


@[simp]
theorem isBigO_prod_left : (fun x => (f' x, g' x)) =O[l] k' ↔ f' =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 α}


@[simp] lemma coe_toEquiv (e : G ≃+c[a, b] H) : ⇑e.toEquiv = e

{G : Type u_1}
{H : Type u_2}
[Add G]
[Add H]
{a : G}
{b : H}
(e : G ≃+c[a, b] H)


protected theorem inf_comm (s : Finset β) (t : Finset γ) (f : β → γ → α) :
    (s.inf fun b => t.inf (f b)) = t.inf fun c => s.inf fun b => f b c

{α : Type u_2}
{β : Type u_3}
{γ : Type u_4}
[SemilatticeInf α]
[OrderTop α]
(s : Finset β)
(t : Finset γ)
(f : β → γ → α)


/-- A diagonal matrix is hermitian if the entries have the trivial `star` operation
(such as on the reals). -/
@[simp]
theorem isHermitian_diagonal [TrivialStar α] [DecidableEq n] (v : n → α) :
    (diagonal v).IsHermitian

{α : Type u_1}
{n : Type u_4}
[AddMonoid α]
[StarAddMonoid α]
[TrivialStar α]
[DecidableEq n]
(v : n → α)


@[simp]
theorem coe_of (α : Type*) [LinearOrder α] : ↥(of α) = α


theorem map_add_left (f₁ f₂ : M →ₗ[R] P) (g : N →ₗ[R] Q) :
    map (f₁ + f₂) g = map f₁ g + map f₂ g

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

TensorProduct.map (f₁ + f₂) g = TensorProduct.map f₁ g + TensorProduct.map f₂ g


@[to_additive]
theorem sound (U : Set (G ⧸ N)) (g : N.op) :
    g • (mk' N) ⁻¹' U = (mk' N) ⁻¹' U

{G : Type u}
[AddGroup G]
(N : AddSubgroup G)
[nN : N.Normal]
(U : Set (G ⧸ N))
(g : ↥N.op)

g +ᵥ ⇑(QuotientAddGroup.mk' N) ⁻¹' U = ⇑(QuotientAddGroup.mk' N) ⁻¹' U


protected theorem Tendsto.eventually_ne_atBot [Preorder β] [NoMinOrder β] {f : α → β} {l : Filter α}
    (hf : Tendsto f l atBot) (c : β) : ∀ᶠ x in l, f x ≠ c

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


theorem toMeasureEquiv_symm : f.toMeasureEquiv.symm = f.symm.toMeasureEquiv

{E : Type u_2}
{F : Type u_3}
[NormedAddCommGroup F]
[InnerProductSpace ℝ F]
[MeasurableSpace F]
[BorelSpace F]
[NormedAddCommGroup E]
[InnerProductSpace ℝ E]
[MeasurableSpace E]
[BorelSpace E]
(f : E ≃ₗᵢ[ℝ] F)


@[to_additive IsCompact.exists_bound_of_continuousOn]
lemma IsCompact.exists_bound_of_continuousOn' [TopologicalSpace α] {s : Set α} (hs : IsCompact s)
    {f : α → E} (hf : ContinuousOn f s) : ∃ C, ∀ x ∈ s, ‖f x‖ ≤ C

{α : Type u_1}
{E : Type u_3}
[SeminormedGroup E]
[TopologicalSpace α]
{s : Set α}
(hs : IsCompact s)
{f : α → E}
(hf : ContinuousOn f s)


/-- The Čech nerve associated to an arrow. -/
@[simps]
def cechNerve : SimplicialObject C

[∀ (n : ℕ), CategoryTheory.Limits.HasWidePullback f.right (fun x => f.left) fun x => f.hom]

f.cechNerve.obj n = CategoryTheory.Limits.widePullback f.right (fun x => f.left) fun x => f.hom


@[simp]
theorem lift_univ : lift.{w} univ.{u, v} = univ.{u, max v w}

Ordinal.lift.{w, max (u + 1) v} Ordinal.univ.{u, v} = Ordinal.univ.{u, max v w}


protected theorem leftMulMatrix (pb : PowerBasis A S) : Algebra.leftMulMatrix pb.basis pb.gen =
    @Matrix.of (Fin pb.dim) (Fin pb.dim) _ fun i j =>
      if ↑j + 1 = pb.dim then -pb.minpolyGen.coeff ↑i else if (i : ℕ) = j + 1 then 1 else 0

{S : Type u_2}
[Ring S]
{A : Type u_4}
[CommRing A]
[Algebra A S]
(pb : PowerBasis A S)

(Algebra.leftMulMatrix pb.basis) pb.gen =
  Matrix.of fun i j => if ↑j + 1 = pb.dim then -pb.minpolyGen.coeff ↑i else if ↑i = ↑j + 1 then 1 else 0


/-- In an oriented inner product space, the measure coming from the canonical volume form
associated to an orientation coincides with the volume. -/
theorem Orientation.measure_eq_volume (o : Orientation ℝ F (Fin n)) :
    o.volumeForm.measure = volume

[_i : Fact (FiniteDimensional.finrank ℝ F = n)]


lemma exact_iff_isZero_rightHomology [S.HasHomology] :
    S.Exact ↔ IsZero S.rightHomology

S.Exact ↔ CategoryTheory.Limits.IsZero S.rightHomology


/-- The set of `x : Option α` such that `isSome x` is equivalent to `α`. -/
@[simps]
def optionIsSomeEquiv (α) : { x : Option α // x.isSome } ≃ α

(α : Type u_1)
(o : { x // x.isSome = true })

(Equiv.optionIsSomeEquiv α) o = (↑o).get ⋯


theorem enumerate_eq_none_of_sel {s : Set α} (h : sel s = none) : ∀ {n}, enumerate sel s n = none

{α : Type u_1}
(sel : Set α → Option α)
{s : Set α}
(h : sel s = none)
{n : ℕ}


protected theorem _root_.MeasureTheory.AEDisjoint.of_absolutelyContinuous
    (h : AEDisjoint μ s t) {ν : Measure α} (h' : ν ≪ μ) :
    AEDisjoint ν s t

{α : Type u_1}
{m0 : MeasurableSpace α}
{μ : MeasureTheory.Measure α}
{s t : Set α}
(h : MeasureTheory.AEDisjoint μ s t)
{ν : MeasureTheory.Measure α}
(h' : ν.AbsolutelyContinuous μ)


@[fun_prop]
theorem DifferentiableWithinAt.restrictScalars (h : DifferentiableWithinAt 𝕜' f s x) :
    DifferentiableWithinAt 𝕜 f s x

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


protected theorem div_eq_of_eq_mul_left {a b c : Int}
    (H1 : b ≠ 0) (H2 : a = c * b) : a.div b = c


theorem unique (f : Ultrafilter α) {g : Filter α} (h : g ≤ f) (hne : NeBot g := by infer_instance) :
    g = f

{α : Type u}
(f : Ultrafilter α)
{g : Filter α}
(h : g ≤ ↑f)
(hne : g.NeBot := by infer_instance)


theorem init_neg (x : 𝕎 R) (n : ℕ) : init n (-x) = init n (-init n x)

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

WittVector.init n (-x) = WittVector.init n (-WittVector.init n x)


theorem nonempty_iso_refl (X : C) : Nonempty (X ≅ X)

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


theorem IsReflexivePair.common_section (f g : A ⟶ B) [IsReflexivePair f g] :
    ∃ s : B ⟶ A, s ≫ f = 𝟙 B ∧ s ≫ g = 𝟙 B

{C : Type u}
[CategoryTheory.Category.{v, u} C]
{A B : C}
(f g : A ⟶ B)
[CategoryTheory.IsReflexivePair f g]

∃ s,
  CategoryTheory.CategoryStruct.comp s f = CategoryTheory.CategoryStruct.id B ∧
    CategoryTheory.CategoryStruct.comp s g = CategoryTheory.CategoryStruct.id B


@[simp] lemma compls_infs (s t : Finset α) : (s ⊼ t)ᶜˢ = sᶜˢ ⊻ tᶜˢ

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


/-- Given a Localization map `f : M →* N` for a Submonoid `S ⊆ M` and a map of `CommMonoid`s
`g : M →* P` such that `g y` is invertible for all `y : S`, the homomorphism induced from
`N` to `P` maps `f x * (f y)⁻¹` to `g x * (g y)⁻¹` for all `x : M, y ∈ S`. -/
@[to_additive
    "Given a Localization map `f : M →+ N` for a Submonoid `S ⊆ M` and a map of
`AddCommMonoid`s `g : M →+ P` such that `g y` is invertible for all `y : S`, the homomorphism
induced from `N` to `P` maps `f x - f y` to `g x - g y` for all `x : M, y ∈ S`."]
theorem lift_mk' (x y) : f.lift hg (f.mk' x y) = g x * (IsUnit.liftRight (g.restrict S) hg y)⁻¹

{M : Type u_1}
[AddCommMonoid M]
{S : AddSubmonoid M}
{N : Type u_2}
[AddCommMonoid N]
{P : Type u_3}
[AddCommMonoid P]
(f : S.LocalizationMap N)
{g : M →+ P}
(hg : ∀ (y : ↥S), IsAddUnit (g ↑y))
(x : M)
(y : ↥S)

(f.lift hg) (f.mk' x y) = g x + ↑(-(IsAddUnit.liftRight (g.restrict S) hg) y)


theorem isOpen_inter_preimage_symm {s : Set X} (hs : IsOpen s) : IsOpen (e.target ∩ e.symm ⁻¹' s)

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


/-- `Multifork.toPiFork` as a functor. -/
@[simps]
noncomputable def toPiForkFunctor : Multifork I ⥤ Fork I.fstPiMap I.sndPiMap

(I : CategoryTheory.Limits.MulticospanIndex C)


lemma optionEquivLeft_X_some (x : S₁) : optionEquivLeft R S₁ (X (some x)) = Polynomial.C (X x)

(R : Type u)
(S₁ : Type v)
[CommSemiring R]
(x : S₁)

(MvPolynomial.optionEquivLeft R S₁) (MvPolynomial.X (some x)) = Polynomial.C (MvPolynomial.X x)


@[simp]
theorem mulRight_apply (a b : A) : mulRight R a b = b * a

{R : Type u_1}
{A : Type u_2}
[CommSemiring R]
[NonUnitalNonAssocSemiring A]
[Module R A]
[SMulCommClass R A A]
[IsScalarTower R A A]
(a b : A)


theorem add_one_le_iff : n + 1 ≤ m ↔ n < m


@[simp] lemma coe_mk (f : sInfHom α β) (hf) : ⇑(mk f hf) = f

(hf : ∀ (s : Set α), f.toFun (sSup s) = sSup (f.toFun '' s))

⇑{ tosInfHom := f, map_sSup' := hf } = ⇑f


@[to_additive]
theorem map_map {M'' N''} [MulOneClass M''] [MulOneClass N''] (f' : M' →* M'') (g' : N' →* N'')
    (f : M →* M') (g : N →* N') (x : M ∗ N) :
    map f' g' (map f g x) = map (f'.comp f) (g'.comp g) x

{M : Type u_1}
{N : Type u_2}
{M' : Type u_3}
{N' : Type u_4}
[AddZeroClass M]
[AddZeroClass N]
[AddZeroClass M']
[AddZeroClass N']
{M'' : Type u_6}
{N'' : Type u_7}
[AddZeroClass M'']
[AddZeroClass N'']
(f' : M' →+ M'')
(g' : N' →+ N'')
(f : M →+ M')
(g : N →+ N')
(x : AddMonoid.Coprod M N)

(AddMonoid.Coprod.map f' g') ((AddMonoid.Coprod.map f g) x) = (AddMonoid.Coprod.map (f'.comp f) (g'.comp g)) x


@[simps id_val comp_val]
instance instCategorySheaf : Category (Sheaf J A)

{J : CategoryTheory.GrothendieckTopology C}

∀ (x : CategoryTheory.Sheaf J A), (CategoryTheory.CategoryStruct.id x).val = CategoryTheory.CategoryStruct.id x.val


theorem Nonempty.image₂ (hs : s.Nonempty) (ht : t.Nonempty) : (image₂ f s t).Nonempty

{α : Type u_1}
{β : Type u_3}
{γ : Type u_5}
[DecidableEq γ]
{f : α → β → γ}
{s : Finset α}
{t : Finset β}
(hs : s.Nonempty)
(ht : t.Nonempty)


/-- `AnalyticWithinAt` is trivial if `{x} ∈ 𝓝[s] x` -/
lemma analyticWithinAt_of_singleton_mem {f : E → F} {s : Set E} {x : E} (h : {x} ∈ 𝓝[s] x) :
    AnalyticWithinAt 𝕜 f s x

{𝕜 : Type u_2}
[NontriviallyNormedField 𝕜]
{E : Type u_3}
{F : Type u_4}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{f : E → F}
{s : Set E}
{x : E}
(h : {x} ∈ 𝓝[s] x)


theorem sup_sdiff : (a ⊔ b) \ c = a \ c ⊔ b \ c

{α : Type u_2}
[GeneralizedCoheytingAlgebra α]
{a b c : α}


theorem isCoprime_span_singleton_iff (x y : R) :
    IsCoprime (span <| singleton x) (span <| singleton y) ↔ IsCoprime x y

IsCoprime (Ideal.span {x}) (Ideal.span {y}) ↔ IsCoprime x y


@[simp]
lemma decomposeAlgEquiv_apply (a : A) :
    decomposeAlgEquiv 𝒜 a = decompose 𝒜 a

{ι : Type u_1}
{R : Type u_2}
{A : Type u_3}
[DecidableEq ι]
[AddMonoid ι]
[CommSemiring R]
[Semiring A]
[Algebra R A]
(𝒜 : ι → Submodule R A)
[GradedAlgebra 𝒜]
(a : A)

(DirectSum.decomposeAlgEquiv 𝒜) a = (DirectSum.decompose 𝒜) a


@[simp]
theorem mem_toList [FinEnum α] (x : α) : x ∈ toList α


@[to_additive]
theorem NeBot.of_div_right : (f / g).NeBot → g.NeBot


theorem valuation_apply (x : K) : valuation h x = ‖x‖₊

{K : Type u_1}
[hK : NormedField K]
(h : IsNonarchimedean norm)
(x : K)


theorem splits_map_iff (j : L →+* F) {f : K[X]} : Splits j (f.map i) ↔ Splits (j.comp i) f

{F : Type u}
{K : Type v}
{L : Type w}
[CommRing K]
[Field L]
[Field F]
(i : K →+* L)
(j : L →+* F)
{f : K[X]}

Polynomial.Splits j (Polynomial.map i f) ↔ Polynomial.Splits (j.comp i) f


theorem ground_indep_iff_base : M.Indep M.E ↔ M.Base M.E


theorem charpoly_reindex (e : n ≃ m)
    (M : Matrix n n R) : (reindex e e M).charpoly = M.charpoly

{R : Type u_1}
[CommRing R]
{m : Type u_3}
{n : Type u_4}
[DecidableEq m]
[DecidableEq n]
[Fintype m]
[Fintype n]
(e : n ≃ m)
(M : Matrix n n R)

((Matrix.reindex e e) M).charpoly = M.charpoly


@[simp]
theorem neg_re (z : ℂ) : (-z).re = -z.re


/-- `WeakDual.CharacterSpace.compContinuousMap` is functorial. -/
@[simp]
theorem compContinuousMap_comp (ψ₂ : B →⋆ₐ[𝕜] C) (ψ₁ : A →⋆ₐ[𝕜] B) :
    compContinuousMap (ψ₂.comp ψ₁) = (compContinuousMap ψ₁).comp (compContinuousMap ψ₂)

{A : Type u_1}
{B : Type u_2}
{C : Type u_3}
{𝕜 : Type u_4}
[NontriviallyNormedField 𝕜]
[NormedRing A]
[NormedAlgebra 𝕜 A]
[CompleteSpace A]
[StarRing A]
[NormedRing B]
[NormedAlgebra 𝕜 B]
[CompleteSpace B]
[StarRing B]
[NormedRing C]
[NormedAlgebra 𝕜 C]
[CompleteSpace C]
[StarRing C]
(ψ₂ : B →⋆ₐ[𝕜] C)
(ψ₁ : A →⋆ₐ[𝕜] B)

WeakDual.CharacterSpace.compContinuousMap (ψ₂.comp ψ₁) =
  (WeakDual.CharacterSpace.compContinuousMap ψ₁).comp (WeakDual.CharacterSpace.compContinuousMap ψ₂)


@[to_additive (attr := simp)]
theorem map_comp : (f.map hy k).comp f.toMap = k.toMap.comp g

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


/-- We say that a type has `MeasurableSub₂` if `uncurry (· - ·)` is a measurable functions.
For a typeclass assuming measurability of `(c - ·)` and `(· - c)` see `MeasurableSub`. -/
class MeasurableSub₂ (G : Type*) [MeasurableSpace G] [Sub G] : Prop where
  measurable_sub : Measurable fun p : G × G => p.1 - p.2

{G : Type u_2}
[MeasurableSpace G]
[Sub G]
[self : MeasurableSub₂ G]


/-- This wraps the predicate `P : TopCat → Prop` in a typeclass. -/
class HasProp : Prop where
  hasProp : P (TopCat.of X)

{P : TopCat → Prop}
{X : Type u}
[TopologicalSpace X]
[self : CompHausLike.HasProp P X]


@[simp]
theorem codRestrict_apply_cod {f : M →ₗ[S] M} (h : IsProj m f) (x : m) : h.codRestrict x = x

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


theorem minFacHelper_1 {n k k' : ℕ} (e : k + 2 = k') (h : MinFacHelper n k)
    (np : minFac n ≠ k) : MinFacHelper n k'

(h : Mathlib.Meta.NormNum.MinFacHelper n k)


/-- `J` is connected if: given any function `F : J → α` which is constant for any
`j₁, j₂` for which there is a morphism `j₁ ⟶ j₂`, then `F` is constant.
This can be thought of as a local-to-global property.

The converse of `constant_of_preserves_morphisms`.
-/
theorem IsConnected.of_constant_of_preserves_morphisms [Nonempty J]
    (h : ∀ {α : Type u₁} (F : J → α),
      (∀ {j₁ j₂ : J} (_ : j₁ ⟶ j₂), F j₁ = F j₂) → ∀ j j' : J, F j = F j') :
    IsConnected J

(h : ∀ {α : Type u₁} (F : J → α), (∀ {j₁ j₂ : J}, (j₁ ⟶ j₂) → F j₁ = F j₂) → ∀ (j j' : J), F j = F j')


theorem mul_assoc_flip :
    (M.X ◁ M.mul) ≫ M.mul = (α_ M.X M.X M.X).inv ≫ (M.mul ▷ M.X) ≫ M.mul

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

M.X ◁ M.mul ≫ M.mul = (α_ M.X M.X M.X).inv ≫ M.mul ▷ M.X ≫ M.mul


@[simp]
theorem coe_toEquiv (f : R ≃+* S) : ⇑(f : R ≃ S) = f

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


/-- A function `-f` is concave iff `f` is convex. -/
@[simp]
theorem neg_concaveOn_iff : ConcaveOn 𝕜 s (-f) ↔ ConvexOn 𝕜 s f

{𝕜 : Type u_1}
{E : Type u_2}
{β : Type u_5}
[OrderedSemiring 𝕜]
[AddCommMonoid E]
[OrderedAddCommGroup β]
[SMul 𝕜 E]
[Module 𝕜 β]
{s : Set E}
{f : E → β}


theorem support_smul [SMulZeroClass S R] (r : S) (p : R[X]) :
    support (r • p) ⊆ support p

{R : Type u}
{S : Type v}
[Semiring R]
[SMulZeroClass S R]
(r : S)
(p : R[X])


theorem univ_sigma_univ : (@univ ι).sigma (fun _ ↦ @univ (α i)) = univ

{ι : Type u_1}
{α : ι → Type u_3}
{i : ι}

(Set.univ.sigma fun x => Set.univ) = Set.univ


theorem ManyOneEquiv.congr_right {α β γ} [Primcodable α] [Primcodable β] [Primcodable γ]
    {p : α → Prop} {q : β → Prop} {r : γ → Prop} (h : ManyOneEquiv q r) :
    ManyOneEquiv p q ↔ ManyOneEquiv p r

{α : Type u_1}
{β : Type u_2}
{γ : Type u_3}
[Primcodable α]
[Primcodable β]
[Primcodable γ]
{p : α → Prop}
{q : β → Prop}
{r : γ → Prop}
(h : ManyOneEquiv q r)


/-- If `f` and `g` are independent random variables with values in `ℝ≥0∞`,
   then `E[f * g] = E[f] * E[g]`. However, instead of directly using the independence
   of the random variables, it uses the independence of measurable spaces for the
   domains of `f` and `g`. This is similar to the sigma-algebra approach to
   independence. See `lintegral_mul_eq_lintegral_mul_lintegral_of_indepFun` for
   a more common variant of the product of independent variables. -/
theorem lintegral_mul_eq_lintegral_mul_lintegral_of_independent_measurableSpace
    {Mf Mg mΩ : MeasurableSpace Ω} {μ : Measure Ω} (hMf : Mf ≤ mΩ) (hMg : Mg ≤ mΩ)
    (h_ind : Indep Mf Mg μ) (h_meas_f : Measurable[Mf] f) (h_meas_g : Measurable[Mg] g) :
    ∫⁻ ω, f ω * g ω ∂μ = (∫⁻ ω, f ω ∂μ) * ∫⁻ ω, g ω ∂μ

(h_ind : ProbabilityTheory.Indep Mf Mg μ)

∫⁻ (ω : Ω), f ω * g ω ∂μ = (∫⁻ (ω : Ω), f ω ∂μ) * ∫⁻ (ω : Ω), g ω ∂μ


theorem perm_permutations'Aux_comm (a b : α) (l : List α) :
    (permutations'Aux a l).bind (permutations'Aux b) ~
      (permutations'Aux b l).bind (permutations'Aux a)

((List.permutations'Aux a l).bind (List.permutations'Aux b)).Perm
  ((List.permutations'Aux b l).bind (List.permutations'Aux a))


@[simp]
theorem coe_neg (f : CuspForm Γ k) : ⇑(-f) = -f

{Γ : Subgroup SL(2, ℤ)}
{k : ℤ}
(f : CuspForm Γ k)


theorem gronwallBound_K0 (δ ε : ℝ) : gronwallBound δ 0 ε = fun x => δ + ε * x


@[simp]
theorem mem_iUnion : x ∈ π.iUnion ↔ ∃ J ∈ π, x ∈ J

{ι : Type u_1}
{I : BoxIntegral.Box ι}
(π : BoxIntegral.Prepartition I)
{x : ι → ℝ}


theorem IsCompactOperator.add [ContinuousAdd M₂] {f g : M₁ → M₂} (hf : IsCompactOperator f)
    (hg : IsCompactOperator g) : IsCompactOperator (f + g)

{M₁ : Type u_5}
{M₂ : Type u_6}
[TopologicalSpace M₁]
[AddCommMonoid M₁]
[TopologicalSpace M₂]
[AddCommMonoid M₂]
[ContinuousAdd M₂]
{f g : M₁ → M₂}
(hf : IsCompactOperator f)
(hg : IsCompactOperator g)


/-- The tangent of an angle in a right-angled triangle multiplied by the adjacent side equals
the opposite side. -/
theorem tan_oangle_right_mul_dist_of_oangle_eq_pi_div_two {p₁ p₂ p₃ : P}
    (h : ∡ p₁ p₂ p₃ = ↑(π / 2)) : Real.Angle.tan (∡ p₂ p₃ p₁) * dist p₃ p₂ = dist p₁ p₂

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

(∡ p₂ p₃ p₁).tan * dist p₃ p₂ = dist p₁ p₂


theorem map_ciInf (hf : RightOrdContinuous f) {g : ι → α} (hg : BddBelow (range g)) :
    f (⨅ i, g i) = ⨅ i, f (g i)

{α : Type u}
{β : Type v}
{ι : Sort x}
[ConditionallyCompleteLattice α]
[ConditionallyCompleteLattice β]
[Nonempty ι]
{f : α → β}
(hf : RightOrdContinuous f)
{g : ι → α}
(hg : BddBelow (Set.range g))


/-- The identity comonad. -/
@[simps!]
def id : Comonad C

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

(CategoryTheory.Comonad.id C).δ.app X = CategoryTheory.CategoryStruct.id X


protected theorem ext_iff {f g : M [⋀^ι]→ₗ[R] N} : f = g ↔ ∀ x, f x = g x

{R : Type u_1}
[Semiring R]
{M : Type u_2}
[AddCommMonoid M]
[Module R M]
{N : Type u_3}
[AddCommMonoid N]
[Module R N]
{ι : Type u_7}
{f g : M [⋀^ι]→ₗ[R] N}


theorem Base.infiniteRk_of_infinite (hB : M.Base B) (h : B.Infinite) : InfiniteRk M

{α : Type u_1}
{M : Matroid α}
{B : Set α}
(hB : M.Base B)
(h : B.Infinite)


/-- `LinearMap.toMatrix'` is a particular case of `LinearMap.toMatrix`, for the standard basis
`Pi.basisFun R n`. -/
theorem LinearMap.toMatrix_eq_toMatrix' :
    LinearMap.toMatrix (Pi.basisFun R n) (Pi.basisFun R n) = LinearMap.toMatrix'

{R : Type u_1}
[CommSemiring R]
{n : Type u_4}
[Fintype n]
[DecidableEq n]


/-- If the indicator functions of measurable sets `Aᵢ` converge to the indicator function of
a set `A` along a nontrivial countably generated filter, then `A` is also measurable. -/
lemma measurableSet_of_tendsto_indicator [NeBot L] (As_mble : ∀ i, MeasurableSet (As i))
    (h_lim : ∀ x, ∀ᶠ i in L, x ∈ As i ↔ x ∈ A) :
    MeasurableSet A

(As_mble : ∀ (i : ι), MeasurableSet (As i))

(h_lim : ∀ (x : α), ∀ᶠ (i : ι) in L, x ∈ As i ↔ x ∈ A)


@[simp]
theorem diagonal_apply_eq [Zero α] (d : n → α) (i : n) : (diagonal d) i i = d i

{n : Type u_3}
{α : Type v}
[DecidableEq n]
[Zero α]
(d : n → α)
(i : n)


theorem ball_infDist_compl_subset : ball x (infDist x sᶜ) ⊆ s

{α : Type u}
[PseudoMetricSpace α]
{s : Set α}
{x : α}


theorem annIdealGenerator_aeval_eq_zero (a : A) : aeval a (annIdealGenerator 𝕜 a) = 0

(𝕜 : Type u_1)
{A : Type u_2}
[Field 𝕜]
[Ring A]
[Algebra 𝕜 A]
(a : A)

(Polynomial.aeval a) (Polynomial.annIdealGenerator 𝕜 a) = 0


@[rclike_simps] -- porting note (#10618): was `simp`
theorem conj_inv (x : K) : conj x⁻¹ = (conj x)⁻¹

(starRingEnd K) x⁻¹ = ((starRingEnd K) x)⁻¹


@[simp]
theorem natTrailingDegree_X : (X : R[X]).natTrailingDegree = 1

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


/-- `Solution'` is a tuple given by a solution to `a ^ 3 + b ^ 3 = u * c ^ 3`,
where `a`, `b`, `c` and `u` are as in `FermatLastTheoremForThreeGen`.
See `Solution` for the actual structure on which we will do the descent. -/
structure Solution' where
  a : 𝓞 K
  b : 𝓞 K
  c : 𝓞 K
  u : (𝓞 K)ˣ
  ha : ¬ λ ∣ a
  hb : ¬ λ ∣ b
  hc : c ≠ 0
  coprime : IsCoprime a b
  hcdvd : λ ∣ c
  H : a ^ 3 + b ^ 3 = u * c ^ 3

(self : FermatLastTheoremForThreeGen.Solution' hζ)


@[to_additive]
theorem map_inl (s : Submonoid M) : s.map (inl M N) = s.prod ⊥

{M : Type u_1}
{N : Type u_2}
[AddZeroClass M]
[AddZeroClass N]
(s : AddSubmonoid M)

AddSubmonoid.map (AddMonoidHom.inl M N) s = s.prod ⊥


theorem abs_re_le_norm (z : K) : |re z| ≤ ‖z‖


@[simp]
theorem algebraMap_apply (k : 𝕜) (a : α) : algebraMap 𝕜 (α →ᵇ γ) k a = k • (1 : γ)

{α : Type u}
{γ : Type w}
{𝕜 : Type u_2}
[NormedField 𝕜]
[TopologicalSpace α]
[NormedRing γ]
[NormedAlgebra 𝕜 γ]
(k : 𝕜)
(a : α)

((algebraMap 𝕜 (BoundedContinuousFunction α γ)) k) a = k • 1


theorem extend_apply_self (hs : LinearIndependent K ((↑) : s → V)) (x : hs.extend _) :
    Basis.extend hs x = x

(hs : LinearIndependent (ι := { x // x ∈ s }) K Subtype.val)


theorem measurable_of_Ioi {f : δ → α} (hf : ∀ x, MeasurableSet (f ⁻¹' Ioi x)) : Measurable f

(hf : ∀ (x : α), MeasurableSet (f ⁻¹' Set.Ioi x))


/-- The object `X ⊗ Y` in the `Dial C` category just tuples the left and right components. -/
@[simps] def tensorObj (X Y : Dial C) : Dial C


lemma cast_le_neg_one_of_neg (h : a < 0) : (a : R) ≤ -1

{R : Type u_1}
[LinearOrderedRing R]
{a : ℤ}
(h : a < 0)


theorem ext_iff {f g : A ≃⋆+* B} : f = g ↔ ∀ a, f a = g a

{A : Type u_1}
{B : Type u_2}
[Add A]
[Add B]
[Mul A]
[Mul B]
[Star A]
[Star B]
{f g : A ≃⋆+* B}


@[simp]
theorem Embedding.realize_term {v : α → M} (t : L.Term α) (g : M ↪[L] N) :
    t.realize (g ∘ v) = g (t.realize v)

{L : FirstOrder.Language}
{M : Type w}
{N : Type u_1}
[L.Structure M]
[L.Structure N]
{α : Type u'}
{v : α → M}
(t : L.Term α)
(g : L.Embedding M N)

FirstOrder.Language.Term.realize (⇑g ∘ v) t = g (FirstOrder.Language.Term.realize v t)


@[to_additive (attr := simp)]
theorem unbot_one : (1 : WithBot α).unbot coe_ne_bot = 1


@[simp] theorem size_toArray (as : List α) : as.toArray.size = as.length


/-- The operator norm satisfies the triangle inequality. -/
theorem opNorm_add_le : ‖f + g‖ ≤ ‖f‖ + ‖g‖

{𝕜 : Type u_1}
{𝕜₂ : Type u_2}
{E : Type u_4}
{F : Type u_6}
[SeminormedAddCommGroup E]
[SeminormedAddCommGroup F]
[NontriviallyNormedField 𝕜]
[NontriviallyNormedField 𝕜₂]
[NormedSpace 𝕜 E]
[NormedSpace 𝕜₂ F]
{σ₁₂ : 𝕜 →+* 𝕜₂}
[RingHomIsometric σ₁₂]
(f g : E →SL[σ₁₂] F)

‖f + g‖ ≤ ‖f‖ + ‖g‖


lemma LeftResolution.mk_surjective (L : Φ.LeftResolution X₂) :
    ∃ (X₁ : C₁) (w : Φ.functor.obj X₁ ⟶ X₂) (hw : W₂ w), L = LeftResolution.mk w hw

{W₁ : CategoryTheory.MorphismProperty C₁}

{W₂ : CategoryTheory.MorphismProperty C₂}

{Φ : CategoryTheory.LocalizerMorphism W₁ W₂}

∃ X₁ w, ∃ (hw : W₂ w), L = CategoryTheory.LocalizerMorphism.LeftResolution.mk w hw


/-- The image under a monoid homomorphism of the subgroup generated by a set equals the subgroup
generated by the image of the set. -/
@[to_additive
      "The image under an `AddMonoid` hom of the `AddSubgroup` generated by a set equals
      the `AddSubgroup` generated by the image of the set."]
theorem map_closure (f : G →* N) (s : Set G) : (closure s).map f = closure (f '' s)

{G : Type u_1}
[Group G]
{N : Type u_5}
[Group N]
(f : G →* N)
(s : Set G)

Subgroup.map f (Subgroup.closure s) = Subgroup.closure (⇑f '' s)


/-- The canonical isomorphism `G/⊥ ≃* G`. -/
@[to_additive (attr := simps!) "The canonical isomorphism `G/⊥ ≃+ G`."]
def quotientBot : G ⧸ (⊥ : Subgroup G) ≃* G

{G : Type u}
[Group G]
(a : G ⧸ (MonoidHom.id G).ker)

QuotientGroup.quotientBot a = (QuotientGroup.kerLift (MonoidHom.id G)) a


@[simp] lemma measurableAtom_of_measurableSingletonClass [MeasurableSingletonClass β] (x : β) :
    measurableAtom x = {x}

{β : Type u_2}
[MeasurableSpace β]
[MeasurableSingletonClass β]
(x : β)


theorem half_le_symm_iff (t : I) : 1 / 2 ≤ (σ t : ℝ) ↔ (t : ℝ) ≤ 1 / 2

1 / 2 ≤ ↑(unitInterval.symm t) ↔ ↑t ≤ 1 / 2


@[simp]
theorem singleton_inter_eq_empty : {a} ∩ s = ∅ ↔ a ∉ s


theorem eLpNormEssSup_congr_ae {f g : α → F} (hfg : f =ᵐ[μ] g) :
    eLpNormEssSup f μ = eLpNormEssSup g μ

{α : Type u_1}
{F : Type u_3}
{m0 : MeasurableSpace α}
{μ : MeasureTheory.Measure α}
[NormedAddCommGroup F]
{f g : α → F}
(hfg : f =ᵐ[μ] g)

MeasureTheory.eLpNormEssSup f μ = MeasureTheory.eLpNormEssSup g μ


@[to_additive]
theorem continuousSMul_sInf {ts : Set (TopologicalSpace X)}
    (h : ∀ t ∈ ts, @ContinuousSMul M X _ _ t) : @ContinuousSMul M X _ _ (sInf ts)

{M : Type u_2}
{X : Type u_3}
[TopologicalSpace M]
[SMul M X]
{ts : Set (TopologicalSpace X)}
(h : ∀ t ∈ ts, ContinuousSMul M X)


theorem preErgodic_conjugate_iff {e : α ≃ᵐ β} (h : MeasurePreserving e μ μ') :
    PreErgodic (e ∘ f ∘ e.symm) μ' ↔ PreErgodic f μ

{e : α ≃ᵐ β}

(h : MeasureTheory.MeasurePreserving (⇑e) μ μ')

PreErgodic (⇑e ∘ f ∘ ⇑e.symm) μ' ↔ PreErgodic f μ


theorem map_roots_le_of_injective [IsDomain A] [IsDomain B] (p : A[X]) {f : A →+* B}
    (hf : Function.Injective f) : p.roots.map f ≤ (p.map f).roots

{A : Type u_1}
{B : Type u_2}
[CommRing A]
[CommRing B]
[IsDomain A]
[IsDomain B]
(p : Polynomial A)
{f : A →+* B}
(hf : Function.Injective ⇑f)

Multiset.map (⇑f) p.roots ≤ (Polynomial.map f p).roots


/-- If a functor `G : J ⥤ C` to a concrete category has a limit and that `forget C`
is corepresentable, then `(G ⋙ forget C).sections` is small. -/
lemma small_sections_of_hasLimit
    {C : Type u} [Category.{v} C] [ConcreteCategory.{v} C]
    [(forget C).Corepresentable] {J : Type w} [Category.{t} J] (G : J ⥤ C) [HasLimit G] :
    Small.{v} (G ⋙ forget C).sections

Small.{v, max v w} ↑(G ⋙ CategoryTheory.forget C).sections


theorem eval₂_one_cyclotomic_prime {R S : Type*} [CommRing R] [Semiring S] (f : R →+* S) {p : ℕ}
    [Fact p.Prime] : eval₂ f 1 (cyclotomic p R) = p

{R : Type u_1}
{S : Type u_2}
[CommRing R]
[Semiring S]
(f : R →+* S)
{p : ℕ}
[Fact (Nat.Prime p)]

Polynomial.eval₂ f 1 (Polynomial.cyclotomic p R) = ↑p


/-- Boxes of countably spanning sets are countably spanning. -/
theorem IsCountablySpanning.pi {C : ∀ i, Set (Set (α i))} (hC : ∀ i, IsCountablySpanning (C i)) :
    IsCountablySpanning (pi univ '' pi univ C)

(hC : ∀ (i : ι), IsCountablySpanning (C i))

IsCountablySpanning (Set.univ.pi '' Set.univ.pi C)


theorem int_gcd_helper' {d : ℕ} {x y : ℤ} (a b : ℤ) (h₁ : (d : ℤ) ∣ x) (h₂ : (d : ℤ) ∣ y)
    (h₃ : x * a + y * b = d) : Int.gcd x y = d

{d : ℕ}
{x y : ℤ}
(a b : ℤ)
(h₁ : ↑d ∣ x)
(h₂ : ↑d ∣ y)
(h₃ : x * a + y * b = ↑d)


theorem mod_eq_emod {a b : Int} (ha : 0 ≤ a) (hb : 0 ≤ b) : mod a b = a % b


/-- Special case of the sandwich theorem: if the norm of `f` is bounded by a real function `a` which
tends to `0`, then `f` tends to `1`. -/
@[to_additive "Special case of the sandwich theorem: if the norm of `f` is bounded by a real
function `a` which tends to `0`, then `f` tends to `0`."]
theorem squeeze_one_norm {f : α → E} {a : α → ℝ} {t₀ : Filter α} (h : ∀ n, ‖f n‖ ≤ a n) :
    Tendsto a t₀ (𝓝 0) → Tendsto f t₀ (𝓝 1)

{α : Type u_3}
{E : Type u_6}
[SeminormedAddGroup E]
{f : α → E}
{a : α → ℝ}
{t₀ : Filter α}
(h : ∀ (n : α), ‖f n‖ ≤ a n)

Filter.Tendsto a t₀ (𝓝 0) → Filter.Tendsto f t₀ (𝓝 0)


/-- If `s` has the unique differential property at `x`, `f` is differentiable within `s` at x` and
its derivative has dense range, then `f '' s` has the unique differential property at `f x`. -/
theorem UniqueMDiffWithinAt.image_denseRange (hs : UniqueMDiffWithinAt I s x)
    {f : M → M'} {f' : E →L[𝕜] E'} (hf : HasMFDerivWithinAt I I' f s x f')
    (hd : DenseRange f') : UniqueMDiffWithinAt I' (f '' s) (f x)

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{H : Type u_3}
[TopologicalSpace H]
{I : ModelWithCorners 𝕜 E H}
{M : Type u_4}
[TopologicalSpace M]
[ChartedSpace H M]
[SmoothManifoldWithCorners I M]
{E' : Type u_5}
[NormedAddCommGroup E']
[NormedSpace 𝕜 E']
{H' : Type u_6}
[TopologicalSpace H']
{I' : ModelWithCorners 𝕜 E' H'}
{M' : Type u_7}
[TopologicalSpace M']
[ChartedSpace H' M']
[SmoothManifoldWithCorners I' M']
{s : Set M}
{x : M}
(hs : UniqueMDiffWithinAt I s x)
{f : M → M'}
{f' : E →L[𝕜] E'}
(hf : HasMFDerivWithinAt I I' f s x f')
(hd : DenseRange ⇑f')


@[gcongr]
lemma verticalStrip_mono {A B A' B' : ℝ} (hA : A ≤ A') (hB : B' ≤ B) :
    verticalStrip A B ⊆ verticalStrip A' B'

UpperHalfPlane.verticalStrip A B ⊆ UpperHalfPlane.verticalStrip A' B'


@[simp]
theorem Tape.mk'_right₀ {Γ} [Inhabited Γ] (L R : ListBlank Γ) : (Tape.mk' L R).right₀ = R

{Γ : Type u_1}
[Inhabited Γ]
(L R : Turing.ListBlank Γ)


@[to_additive (attr := simp)]
theorem smul_set_nonempty : (a • s).Nonempty ↔ s.Nonempty

{α : Type u_2}
{β : Type u_3}
[SMul α β]
{s : Set β}
{a : α}


theorem integral_Ico_eq_integral_Ioo : ∫ t in Ico x y, f t ∂μ = ∫ t in Ioo x y, f t ∂μ

{X : Type u_1}
{E : Type u_3}
[MeasurableSpace X]
[NormedAddCommGroup E]
[NormedSpace ℝ E]
{f : X → E}
{μ : MeasureTheory.Measure X}
[PartialOrder X]
{x y : X}
[MeasureTheory.NoAtoms μ]

∫ (t : X) in Set.Ico x y, f t ∂μ = ∫ (t : X) in Set.Ioo x y, f t ∂μ


/-- `#(WType β)` is the least cardinal `κ` such that `sum (fun a : α ↦ κ ^ #(β a)) ≤ κ` -/
theorem cardinal_mk_le_of_le {κ : Cardinal.{u}} (hκ : (sum fun a : α => κ ^ #(β a)) ≤ κ) :
    #(WType β) ≤ κ

(hκ : (Cardinal.sum fun a => κ ^ Cardinal.mk (β a)) ≤ κ)


theorem ContinuousOn.isOpen_preimage {f : α → β} {s : Set α} {t : Set β} (h : ContinuousOn f s)
    (hs : IsOpen s) (hp : f ⁻¹' t ⊆ s) (ht : IsOpen t) : IsOpen (f ⁻¹' t)

{α : Type u_1}
{β : Type u_2}
[TopologicalSpace α]
[TopologicalSpace β]
{f : α → β}
{s : Set α}
{t : Set β}
(h : ContinuousOn f s)
(hs : IsOpen s)
(hp : f ⁻¹' t ⊆ s)
(ht : IsOpen t)


theorem count_map_roots_of_injective [IsDomain A] [DecidableEq B] (p : A[X]) {f : A →+* B}
    (hf : Function.Injective f) (b : B) :
    (p.roots.map f).count b ≤ rootMultiplicity b (p.map f)

{A : Type u_1}
{B : Type u_2}
[CommRing A]
[CommRing B]
[IsDomain A]
[DecidableEq B]
(p : Polynomial A)
{f : A →+* B}
(hf : Function.Injective ⇑f)
(b : B)

Multiset.count b (Multiset.map (⇑f) p.roots) ≤ Polynomial.rootMultiplicity b (Polynomial.map f p)


@[to_additive]
theorem dist_div_div_le (a₁ a₂ b₁ b₂ : E) : dist (a₁ / a₂) (b₁ / b₂) ≤ dist a₁ b₁ + dist a₂ b₂

{E : Type u_3}
[SeminormedAddCommGroup E]
(a₁ a₂ b₁ b₂ : E)

dist (a₁ - a₂) (b₁ - b₂) ≤ dist a₁ b₁ + dist a₂ b₂


/-- The product over `Option α` of `β a` is the binary product of the
product over `α` of `β (some α)` and `β none` -/
@[simps]
def piOptionEquivProd {β : Option α → Type*} :
    (∀ a : Option α, β a) ≃ β none × ∀ a : α, β (some a)

{α : Type u_2}
{β : Option α → Type u_1}
(f : (a : Option α) → β a)

Equiv.piOptionEquivProd f = (f none, fun a => f (some a))


theorem zeroLocus_anti_mono_homogeneousIdeal {s t : HomogeneousIdeal 𝒜} (h : s ≤ t) :
    zeroLocus 𝒜 (t : Set A) ⊆ zeroLocus 𝒜 (s : Set A)

{R : Type u_1}
{A : Type u_2}
[CommSemiring R]
[CommRing A]
[Algebra R A]
(𝒜 : ℕ → Submodule R A)
[GradedAlgebra 𝒜]
{s t : HomogeneousIdeal 𝒜}
(h : s ≤ t)

ProjectiveSpectrum.zeroLocus 𝒜 ↑t ⊆ ProjectiveSpectrum.zeroLocus 𝒜 ↑s


theorem map_surjective_of_surjective : Surjective (map f)

{R : Type u}
{S : Type v}
{F : Type u_1}
[Semiring R]
[Semiring S]
[FunLike F R S]
[rc : RingHomClass F R S]
(f : F)
(hf : Function.Surjective ⇑f)


@[symm]
theorem Joined.symm {x y : X} (h : Joined x y) : Joined y x

{X : Type u_1}
[TopologicalSpace X]
{x y : X}
(h : Joined x y)


lemma exists_norm_mul_eq_self (z : ℂ) : ∃ c, ‖c‖ = 1 ∧ c * ‖z‖ = z


theorem basis_singleton_iff {R M : Type*} [Ring R] [Nontrivial R] [AddCommGroup M] [Module R M]
    [NoZeroSMulDivisors R M] (ι : Type*) [Unique ι] :
    Nonempty (Basis ι R M) ↔ ∃ x ≠ 0, ∀ y : M, ∃ r : R, r • x = y

{R : Type u_10}
{M : Type u_11}
[Ring R]
[Nontrivial R]
[AddCommGroup M]
[Module R M]
[NoZeroSMulDivisors R M]
(ι : Type u_12)
[Unique ι]

Nonempty (Basis ι R M) ↔ ∃ x, x ≠ 0 ∧ ∀ (y : M), ∃ r, r • x = y


theorem subset_span {s : Set α} : s ⊆ span s


/-- If `F.leftOp : Jᵒᵖ ⥤ C` has a colimit, we can construct a limit for `F : J ⥤ Cᵒᵖ`.
-/
theorem hasLimit_of_hasColimit_leftOp (F : J ⥤ Cᵒᵖ) [HasColimit F.leftOp] : HasLimit F


@[simp]
theorem smeval_ascPochhammer_neg_of_lt {n k : ℕ} (h : n < k) :
    smeval (ascPochhammer ℕ k) (-n : ℤ) = 0


@[simp, reassoc]
lemma homOfLE_comp_eqToHom {a b c : X} (hab : a ≤ b) (hbc : b = c) :
    homOfLE hab ≫ eqToHom hbc = homOfLE (hab.trans (le_of_eq hbc))

{X : Type u}
[Preorder X]
{a b c : X}
(hab : a ≤ b)
(hbc : b = c)

CategoryTheory.CategoryStruct.comp (CategoryTheory.homOfLE hab) (CategoryTheory.eqToHom hbc) = CategoryTheory.homOfLE ⋯


@[to_additive (attr := simp)]
lemma UniformFun.toFun_inv [Inv β] (f : α →ᵤ β) : toFun (f⁻¹) = (toFun f)⁻¹

{α : Type u_1}
{β : Type u_2}
[Neg β]
(f : α →ᵤ β)

UniformFun.toFun (-f) = -UniformFun.toFun f


/-- The counit isomorphism of the auto-equivalence of categories `triangleRotation C` of
`Triangle C` given by the rotation of triangles. -/
@[simps!]
def invRotCompRot : invRotate C ⋙ rotate C ≅ 𝟭 (Triangle C)

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

(X : CategoryTheory.Pretriangulated.Triangle C)

(CategoryTheory.Pretriangulated.invRotCompRot.hom.app X).hom₁ = 𝟙 X.obj₁


theorem zero_le_orderTop_iff {x : HahnSeries Γ R} : 0 ≤ x.orderTop ↔ 0 ≤ x.order

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


/-- The underlying oplax natural transformation of a strong natural transformation. -/
@[simps]
def toOplax {F G : OplaxFunctor B C} (η : StrongOplaxNatTrans F G) : OplaxNatTrans F G

(η : CategoryTheory.StrongOplaxNatTrans F G)

∀ {a b : B} (f : a ⟶ b), η.toOplax.naturality f = (η.naturality f).hom


/-- The cosine of the angle between two vectors is -1 if and only if the angle is π. -/
theorem cos_eq_neg_one_iff_angle_eq_pi : cos (angle x y) = -1 ↔ angle x y = π

{V : Type u_1}
[NormedAddCommGroup V]
[InnerProductSpace ℝ V]
{x y : V}

Real.cos (InnerProductGeometry.angle x y) = -1 ↔ InnerProductGeometry.angle x y = π


theorem ball {p : α → Prop} {a b : α} : (∀ c ∈ s(a, b), p c) ↔ p a ∧ p b


/-- Construct a pseudofunctor from an oplax functor whose `mapId` and `mapComp` are isomorphisms. -/
@[simps!]
noncomputable def mkOfOplax' (F : OplaxFunctor B C) [∀ a, IsIso (F.mapId a)]
    [∀ {a b c} (f : a ⟶ b) (g : b ⟶ c), IsIso (F.mapComp f g)] : Pseudofunctor B C

[∀ (a : B), CategoryTheory.IsIso (F.mapId a)]

[∀ {a b c : B} (f : a ⟶ b) (g : b ⟶ c), CategoryTheory.IsIso (F.mapComp f g)]

((CategoryTheory.Pseudofunctor.mkOfOplax' F).mapId a).hom = F.mapId a


@[simp, mfld_simps]
theorem preimage_univ : f ⁻¹' univ = univ

{α : Type u_1}
{β : Type u_2}
{f : α → β}


/-- The short complex `L₀.X₃ ⟶ L₃.X₁ ⟶ L₃.X₂`. -/
@[simps]
noncomputable def L₂' : ShortComplex C

(S : CategoryTheory.ShortComplex.SnakeInput C)


theorem lowerSemicontinuousOn_iff_le_liminf {f : α → γ} :
    LowerSemicontinuousOn f s ↔ ∀ x ∈ s, f x ≤ liminf f (𝓝[s] x)

{α : Type u_1}
[TopologicalSpace α]
{s : Set α}
{γ : Type u_3}
[CompleteLinearOrder γ]
[DenselyOrdered γ]
{f : α → γ}

LowerSemicontinuousOn f s ↔ ∀ x ∈ s, f x ≤ Filter.liminf f (𝓝[s] x)


/-- A strictly monotone function from a linear order is an order isomorphism between its domain and
its range. -/
@[simps! apply]
protected noncomputable def orderIso :
    α ≃o Set.range f

{α : Type u_2}
{β : Type u_3}
[LinearOrder α]
[Preorder β]
(f : α → β)
(h_mono : StrictMono f)
(a : α)

(StrictMono.orderIso f h_mono) a = ⟨f a, ⋯⟩


theorem leftMoves_ofLists (L R : List PGame) : (ofLists L R).LeftMoves = ULift (Fin L.length)

(SetTheory.PGame.ofLists L R).LeftMoves = ULift.{u_1, 0} (Fin L.length)


lemma quasiIsoAt_iff (f : K ⟶ L) (i : ι) [K.HasHomology i] [L.HasHomology i] :
    QuasiIsoAt f i ↔
      ShortComplex.QuasiIso ((shortComplexFunctor C c i).map f)

QuasiIsoAt f i ↔ CategoryTheory.ShortComplex.QuasiIso ((HomologicalComplex.shortComplexFunctor C c i).map f)


@[simp]
theorem xor_right_inj {n m m' : ℕ} : n ^^^ m = n ^^^ m' ↔ m = m'


theorem getOrElse_of_dom (a : Part α) (h : a.Dom) [Decidable a.Dom] (d : α) :
    getOrElse a d = a.get h

{α : Type u_1}
(a : Part α)
(h : a.Dom)
[Decidable a.Dom]
(d : α)


@[simp]
theorem insert_entries {a} {b : β a} {s : AList β} :
    (insert a b s).entries = Sigma.mk a b :: kerase a s.entries

{α : Type u}
{β : α → Type v}
[DecidableEq α]
{a : α}
{b : β a}
{s : AList β}

(AList.insert a b s).entries = ⟨a, b⟩ :: List.kerase a s.entries


theorem isEqv_cons₂ : isEqv (a::as) (b::bs) eqv = (eqv a b && isEqv as bs eqv)

∀ {α : Type u_1} {a : α} {as : List α} {b : α} {bs : List α} {eqv : α → α → Bool},
  (a :: as).isEqv (b :: bs) eqv = (eqv a b && as.isEqv bs eqv)


theorem ae_restrict_iff {p : α → Prop} (hp : MeasurableSet { x | p x }) :
    (∀ᵐ x ∂μ.restrict s, p x) ↔ ∀ᵐ x ∂μ, x ∈ s → p x

{α : Type u_2}
{m0 : MeasurableSpace α}
{μ : MeasureTheory.Measure α}
{s : Set α}
{p : α → Prop}
(hp : MeasurableSet {x | p x})

(∀ᵐ (x : α) ∂μ.restrict s, p x) ↔ ∀ᵐ (x : α) ∂μ, x ∈ s → p x


@[simp]
theorem discr_reindex (b : Basis ι A B) (f : ι ≃ ι') : discr A (b ∘ ⇑f.symm) = discr A b

(A : Type u)
{B : Type v}
{ι : Type w}
[DecidableEq ι]
[CommRing A]
[CommRing B]
[Algebra A B]
{ι' : Type u_1}
[Fintype ι']
[Fintype ι]
[DecidableEq ι']
(b : Basis ι A B)
(f : ι ≃ ι')

Algebra.discr A (⇑b ∘ ⇑f.symm) = Algebra.discr A ⇑b


theorem dimH_of_nonempty_interior {s : Set E} (h : (interior s).Nonempty) : dimH s = finrank ℝ E

{E : Type u_4}
[NormedAddCommGroup E]
[NormedSpace ℝ E]
[FiniteDimensional ℝ E]
{s : Set E}
(h : (interior s).Nonempty)

dimH s = ↑(FiniteDimensional.finrank ℝ E)


@[simp]
theorem mem_graph_iff (f : E →ₗ.[R] F) {x : E × F} :
    x ∈ f.graph ↔ ∃ y : f.domain, (↑y : E) = x.1 ∧ f y = x.2

{R : Type u_1}
[Ring R]
{E : Type u_2}
[AddCommGroup E]
[Module R E]
{F : Type u_3}
[AddCommGroup F]
[Module R F]
(f : E →ₗ.[R] F)
{x : E × F}

x ∈ f.graph ↔ ∃ y, ↑y = x.1 ∧ ↑f y = x.2


@[simp] theorem gcd_zero_left (y : Nat) : gcd 0 y = y


@[simp]
theorem symm_dual_comp (g : TopHom βᵒᵈ γᵒᵈ) (f : TopHom αᵒᵈ βᵒᵈ) :
    BotHom.dual.symm (g.comp f) = (BotHom.dual.symm g).comp (BotHom.dual.symm f)

{α : Type u_2}
{β : Type u_3}
{γ : Type u_4}
[LE α]
[OrderBot α]
[LE β]
[OrderBot β]
[LE γ]
[OrderBot γ]
(g : TopHom βᵒᵈ γᵒᵈ)
(f : TopHom αᵒᵈ βᵒᵈ)


/-- A set is residual iff it includes a countable intersection of dense open sets. -/
theorem mem_residual_iff {s : Set X} :
    s ∈ residual X ↔
      ∃ S : Set (Set X), (∀ t ∈ S, IsOpen t) ∧ (∀ t ∈ S, Dense t) ∧ S.Countable ∧ ⋂₀ S ⊆ s

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

s ∈ residual X ↔ ∃ S, (∀ t ∈ S, IsOpen t) ∧ (∀ t ∈ S, Dense t) ∧ S.Countable ∧ ⋂₀ S ⊆ s


@[to_additive]
theorem closure_singleton_le_iff_mem (m : M) (p : Subsemigroup M) : closure {m} ≤ p ↔ m ∈ p

{M : Type u_1}
[Add M]
(m : M)
(p : AddSubsemigroup M)


@[to_additive (attr := simp)]
theorem liftRight_inv_mul {f : M →* N} {g : M → Nˣ} (h : ∀ x, ↑(g x) = f x) (x) :
    ↑(liftRight f g h x)⁻¹ * f x = 1

{M : Type u}
{N : Type v}
[Monoid M]
[Monoid N]
{f : M →* N}
{g : M → Nˣ}
(h : ∀ (x : M), ↑(g x) = f x)
(x : M)

↑((Units.liftRight f g h) x)⁻¹ * f x = 1


theorem tendsto_neg_atBot_atTop : Tendsto (Neg.neg : β → β) atBot atTop

Filter.Tendsto Neg.neg Filter.atBot Filter.atTop


theorem coe_zsmul (z : ℤ) (x : ℝ) : ↑(z • x : ℝ) = z • (↑x : Angle)


theorem sumFinsuppEquivProdFinsupp_symm_inr {α β γ : Type*} [Zero γ] (fg : (α →₀ γ) × (β →₀ γ))
    (y : β) : (sumFinsuppEquivProdFinsupp.symm fg) (Sum.inr y) = fg.2 y

{α : Type u_13}
{β : Type u_14}
{γ : Type u_15}
[Zero γ]
(fg : (α →₀ γ) × (β →₀ γ))
(y : β)

(Finsupp.sumFinsuppEquivProdFinsupp.symm fg) (Sum.inr y) = fg.2 y


theorem lt_pow_two_of_testBit (x : Nat) (p : ∀i, i ≥ n → testBit x i = false) : x < 2^n

(p : ∀ (i : Nat), i ≥ n → x.testBit i = false)


@[simp]
theorem inv_trans_self (e : Perm α) : e⁻¹.trans e = 1


theorem fderivWithin_zero_of_not_differentiableWithinAt (h : ¬DifferentiableWithinAt 𝕜 f s x) :
    fderivWithin 𝕜 f s x = 0

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


@[simp]
lemma neg_iso_hom (e : X ≅ Y) : (-e).hom = -e.hom

{C : Type u_1}
[CategoryTheory.Category.{u_2, u_1} C]
[CategoryTheory.Preadditive C]
{X Y : C}
(e : X ≅ Y)


@[simp]
theorem Iio_diff_Iic : Iio b \ Iic a = Ioo a b

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


theorem Collinear.wbtw_or_wbtw_or_wbtw {x y z : P} (h : Collinear R ({x, y, z} : Set P)) :
    Wbtw R x y z ∨ Wbtw R y z x ∨ Wbtw R z x y

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


theorem mem_pregroupoid_of_eqOnSource (PG : Pregroupoid H) {e e' : PartialHomeomorph H H}
    (he' : e ≈ e') (he : PG.property e e.source) : PG.property e' e'.source

{H : Type u}
[TopologicalSpace H]
(PG : Pregroupoid H)
{e e' : PartialHomeomorph H H}
(he' : e ≈ e')
(he : PG.property (↑e) e.source)


/-- The pigeonhole principle for finitely many pigeons counted by weight, strict inequality version:
if the total weight of a finite set of pigeons is greater than `n • b`, they are sorted into some
pigeonholes, and for all but `n` pigeonholes the total weight of the pigeons there is nonpositive,
then for at least one of these `n` pigeonholes, the total weight of the pigeons in this pigeonhole
is greater than `b`. -/
theorem exists_lt_sum_fiber_of_sum_fiber_nonpos_of_nsmul_lt_sum
    (ht : ∀ y ∉ t, ∑ x ∈ s.filter fun x => f x = y, w x ≤ 0)
    (hb : t.card • b < ∑ x ∈ s, w x) : ∃ y ∈ t, b < ∑ x ∈ s.filter fun x => f x = y, w x

(ht : ∀ y ∉ t, ∑ x ∈ Finset.filter (fun x => f x = y) s, w x ≤ 0)

∃ y ∈ t, b < ∑ x ∈ Finset.filter (fun x => f x = y) s, w x


@[to_additive]
theorem ContMDiffWithinAt.div {f g : M → G} {s : Set M} {x₀ : M}
    (hf : ContMDiffWithinAt I' I n f s x₀) (hg : ContMDiffWithinAt I' I n g s x₀) :
    ContMDiffWithinAt I' I n (fun x => f x / g x) s x₀

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{H : Type u_2}
[TopologicalSpace H]
{E : Type u_3}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{I : ModelWithCorners 𝕜 E H}
{G : Type u_5}
[TopologicalSpace G]
[ChartedSpace H G]
[Group G]
[LieGroup I G]
{E' : Type u_6}
[NormedAddCommGroup E']
[NormedSpace 𝕜 E']
{H' : Type u_7}
[TopologicalSpace H']
{I' : ModelWithCorners 𝕜 E' H'}
{M : Type u_8}
[TopologicalSpace M]
[ChartedSpace H' M]
{n : ℕ∞}
{f g : M → G}
{s : Set M}
{x₀ : M}
(hf : ContMDiffWithinAt I' I n f s x₀)
(hg : ContMDiffWithinAt I' I n g s x₀)


@[fun_prop]
theorem HasFDerivWithinAt.clm_apply (hc : HasFDerivWithinAt c c' s x)
    (hu : HasFDerivWithinAt u u' s x) :
    HasFDerivWithinAt (fun y => (c y) (u y)) ((c x).comp u' + c'.flip (u x)) s x

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{G : Type u_4}
[NormedAddCommGroup G]
[NormedSpace 𝕜 G]
{x : E}
{s : Set E}
{H : Type u_6}
[NormedAddCommGroup H]
[NormedSpace 𝕜 H]
{c : E → G →L[𝕜] H}
{c' : E →L[𝕜] G →L[𝕜] H}
{u : E → G}
{u' : E →L[𝕜] G}
(hc : HasFDerivWithinAt c c' s x)
(hu : HasFDerivWithinAt u u' s x)


@[to_additive]
lemma mul_mem_units (S : Submonoid M) {x y : Mˣ} (h₁ : x ∈ S.units) (h₂ : y ∈ S.units) :
    x * y ∈ S.units

{M : Type u_1}
[Monoid M]
(S : Submonoid M)
{x y : Mˣ}
(h₁ : x ∈ S.units)
(h₂ : y ∈ S.units)


/-- If three points are not collinear, the first and third are different. -/
theorem ne₁₃_of_not_collinear {p₁ p₂ p₃ : P} (h : ¬Collinear k ({p₁, p₂, p₃} : Set P)) :
    p₁ ≠ p₃

{k : Type u_1}
{V : Type u_2}
{P : Type u_3}
[DivisionRing k]
[AddCommGroup V]
[Module k V]
[AffineSpace V P]
{p₁ p₂ p₃ : P}
(h : ¬Collinear k {p₁, p₂, p₃})


theorem smoothCoordChange_apply (he : e ∈ a.pretrivializationAtlas)
    (he' : e' ∈ a.pretrivializationAtlas) {b : B} (hb : b ∈ e.baseSet ∩ e'.baseSet) (v : F) :
    a.smoothCoordChange IB he he' b v = (e' ⟨b, e.symm b v⟩).2

{e e' : Pretrivialization F Bundle.TotalSpace.proj}

(VectorPrebundle.smoothCoordChange IB a he he' b) v = (↑e' { proj := b, snd := e.symm b v }).2


/-- The elliptic curve mapped over a ring homomorphism `φ : R →+* A`. -/
@[simps (config := { rhsMd := .default }) a₁ a₂ a₃ a₄ a₆ Δ' toWeierstrassCurve]
def map : EllipticCurve A

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


@[simp]
theorem levenshtein_cons_cons
    (x : α) (xs : List α) (y : β) (ys : List β) :
    levenshtein C (x :: xs) (y :: ys) =
      min (C.delete x + levenshtein C xs (y :: ys))
        (min (C.insert y + levenshtein C (x :: xs) ys)
          (C.substitute x y + levenshtein C xs ys))

{α : Type u_1}
{β : Type u_2}
{δ : Type u_3}
[AddZeroClass δ]
[Min δ]
{C : Levenshtein.Cost α β δ}
(x : α)
(xs : List α)
(y : β)
(ys : List β)


theorem IsRoot.dvd {R : Type*} [CommSemiring R] {p q : R[X]} {x : R} (h : p.IsRoot x)
    (hpq : p ∣ q) : q.IsRoot x

{R : Type u_1}
[CommSemiring R]
{p q : R[X]}
{x : R}
(h : p.IsRoot x)
(hpq : p ∣ q)


@[to_additive (attr := simp)]
theorem piecewise_eq_mulIndicator [DecidablePred (· ∈ s)] : s.piecewise f 1 = s.mulIndicator f

{α : Type u_1}
{M : Type u_4}
[Zero M]
{s : Set α}
{f : α → M}
[DecidablePred fun x => x ∈ s]


@[simp]
theorem mkPiAlgebraFin_apply (m : Fin n → A) :
    MultilinearMap.mkPiAlgebraFin R n A m = (List.ofFn m).prod

{R : Type uR}
{n : ℕ}
[CommSemiring R]
{A : Type u_1}
[Semiring A]
[Algebra R A]
(m : Fin n → A)

(MultilinearMap.mkPiAlgebraFin R n A) m = (List.ofFn m).prod


theorem summable_geometric_two : Summable fun n : ℕ ↦ ((1 : ℝ) / 2) ^ n


theorem preimage_range_inter {f : α → β} {s : Set β} : f ⁻¹' (range f ∩ s) = f ⁻¹' s

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


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

(F : CategoryTheory.LaxBraidedFunctor C D)

(G : CategoryTheory.LaxBraidedFunctor D E)


theorem hasGradientAtFilter_iff_isLittleO :
    HasGradientAtFilter f f' x L ↔
    (fun x' : F => f x' - f x - ⟪f', x' - x⟫) =o[L] fun x' => x' - x

{𝕜 : Type u_1}
{F : Type u_2}
[RCLike 𝕜]
[NormedAddCommGroup F]
[InnerProductSpace 𝕜 F]
[CompleteSpace F]
{f : F → 𝕜}
{f' x : F}
{L : Filter F}

HasGradientAtFilter f f' x L ↔ (fun x' => f x' - f x - ⟪f', x' - x⟫_𝕜) =o[L] fun x' => x' - x


/-- This left homology map data expresses compatibilities of the left homology data
constructed by `LeftHomologyData.ofEpiOfIsIsoOfMono'` -/
@[simps]
noncomputable def ofEpiOfIsIsoOfMono' (φ : S₁ ⟶ S₂) (h : LeftHomologyData S₂)
    [Epi φ.τ₁] [IsIso φ.τ₂] [Mono φ.τ₃] :
    LeftHomologyMapData φ (LeftHomologyData.ofEpiOfIsIsoOfMono' φ h) h

(CategoryTheory.ShortComplex.LeftHomologyMapData.ofEpiOfIsIsoOfMono' φ h).φH =
  CategoryTheory.CategoryStruct.id (CategoryTheory.ShortComplex.LeftHomologyData.ofEpiOfIsIsoOfMono' φ h).H


theorem tendsto_eval_pi (f : ∀ i, Filter (α i)) (i : ι) : Tendsto (eval i) (pi f) (f i)

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

Filter.Tendsto (Function.eval i) (Filter.pi f) (f i)


@[to_additive]
theorem smooth_mul : Smooth (I.prod I) I fun p : G × G => p.1 * p.2

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


theorem preimage_val_eq_preimage_val_iff (s t u : Set α) :
    (Subtype.val : s → α) ⁻¹' t = Subtype.val ⁻¹' u ↔ s ∩ t = s ∩ u

Subtype.val ⁻¹' t = Subtype.val ⁻¹' u ↔ s ∩ t = s ∩ u


theorem thickenedIndicator_le_one {δ : ℝ} (δ_pos : 0 < δ) (E : Set α) (x : α) :
    thickenedIndicator δ_pos E x ≤ 1

{α : Type u_1}
[PseudoEMetricSpace α]
{δ : ℝ}
(δ_pos : 0 < δ)
(E : Set α)
(x : α)


@[simp]
theorem mapRange.linearEquiv_symm (f : M ≃ₗ[R] N) :
    ((mapRange.linearEquiv f).symm : (α →₀ _) ≃ₗ[R] _) = mapRange.linearEquiv f.symm

{α : Type u_1}
{M : Type u_2}
{N : Type u_3}
{R : Type u_5}
[Semiring R]
[AddCommMonoid M]
[Module R M]
[AddCommMonoid N]
[Module R N]
(f : M ≃ₗ[R] N)

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


theorem existsUnique_add_zsmul_mem_Ioc {a : α} (ha : 0 < a) (b c : α) :
    ∃! m : ℤ, b + m • a ∈ Set.Ioc c (c + a)

{α : Type u_1}
[LinearOrderedAddCommGroup α]
[Archimedean α]
{a : α}
(ha : 0 < a)
(b c : α)


@[simp] lemma piAntidiag_empty_zero : piAntidiag (∅ : Finset ι) (0 : μ) = {0}

{ι : Type u_1}
{μ : Type u_2}
[DecidableEq ι]
[AddCommMonoid μ]
[Finset.HasAntidiagonal μ]
[DecidableEq μ]


@[to_additive (attr := simp)]
theorem OneHom.toFun_eq_coe [One M] [One N] (f : OneHom M N) : f.toFun = f

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


@[simp]
theorem equiv_symm_fst (x : α × β) : ((WithLp.equiv p (α × β)).symm x).fst = x.fst

{p : ℝ≥0∞}
{α : Type u_2}
{β : Type u_3}
(x : α × β)

((WithLp.equiv p (α × β)).symm x).1 = x.1


@[ext] theorem UInt32.ext : {x y : UInt32} → x.toNat = y.toNat → x = y


theorem listEncode_injective :
    Function.Injective (listEncode : L.Term α → List (α ⊕ (Σi, L.Functions i)))


@[to_additive]
protected lemma mul_eq_one_iff_eq_inv (h : IsUnit b) : a * b = 1 ↔ a = b⁻¹

{α : Type u}
[DivisionMonoid α]
{a b : α}
(h : IsUnit b)


/-- The zero locus of a set of sections over a compact open of a scheme is `X` if and only if
`s` is contained in the nilradical of `Γ(X, U)`. -/
lemma Scheme.zeroLocus_eq_top_iff_subset_nilradical_of_isCompact {X : Scheme.{u}} {U : X.Opens}
    (hU : IsCompact (U : Set X)) (s : Set Γ(X, U)) :
    X.zeroLocus s = ⊤ ↔ s ⊆ nilradical Γ(X, U)

{X : AlgebraicGeometry.Scheme}
{U : X.Opens}
(hU : IsCompact ↑U)
(s : Set ↑Γ(X, U))

X.zeroLocus s = ⊤ ↔ s ⊆ ↑(nilradical ↑Γ(X, U))


@[to_additive (attr := simp)]
theorem isUnit_op {M} [Monoid M] {m : M} : IsUnit (op m) ↔ IsUnit m

IsAddUnit (AddOpposite.op m) ↔ IsAddUnit m


@[simp]
theorem snd_sup (s t : NonemptyInterval α) : (s ⊔ t).snd = s.snd ⊔ t.snd

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

(s ⊔ t).toProd.2 = s.toProd.2 ⊔ t.toProd.2


@[simp]
theorem lookup_singleton_eq {a : α} {b : β a} : (singleton a b).lookup a = some b

{α : Type u}
{β : α → Type v}
[DecidableEq α]
{a : α}
{b : β a}

Finmap.lookup a (Finmap.singleton a b) = some b


theorem codisjoint_iff [∀ i, OrderTop (α' i)] {f g : ∀ i, α' i} :
    Codisjoint f g ↔ ∀ i, Codisjoint (f i) (g i)

{ι : Type u_1}
{α' : ι → Type u_2}
[(i : ι) → PartialOrder (α' i)]
[(i : ι) → OrderTop (α' i)]
{f g : (i : ι) → α' i}

Codisjoint f g ↔ ∀ (i : ι), Codisjoint (f i) (g i)


/-- The space of functions `Fin 2 → α` is equivalent to `α × α`. See also `piFinTwoEquiv` and
`prodEquivPiFinTwo`. -/
@[simps (config := .asFn)]
def finTwoArrowEquiv (α : Type*) : (Fin 2 → α) ≃ α × α

⇑(finTwoArrowEquiv α).symm = fun x => ![x.1, x.2]


@[simp]
theorem continuum_lt_lift {c : Cardinal.{u}} : 𝔠 < lift.{v} c ↔ 𝔠 < c

Cardinal.continuum < Cardinal.lift.{v, u} c ↔ Cardinal.continuum < c


theorem comap_sInf' (s : Set (Ideal S)) : (sInf s).comap f = ⨅ I ∈ comap f '' s, I

{R : Type u}
{S : Type v}
{F : Type u_1}
[Semiring R]
[Semiring S]
[FunLike F R S]
[rc : RingHomClass F R S]
(f : F)
(s : Set (Ideal S))

Ideal.comap f (sInf s) = ⨅ I ∈ Ideal.comap f '' s, I


/-- This is the homology data for a short complex `S` that is obtained
from a left homology data `h₁` and a right homology data `h₂` when the comparison
morphism `leftRightHomologyComparison' h₁ h₂ : h₁.H ⟶ h₂.H` is an isomorphism. -/
@[simps]
noncomputable def ofIsIsoLeftRightHomologyComparison'
    (h₁ : S.LeftHomologyData) (h₂ : S.RightHomologyData)
    [IsIso (leftRightHomologyComparison' h₁ h₂)] :
    S.HomologyData

[CategoryTheory.IsIso (CategoryTheory.ShortComplex.leftRightHomologyComparison' h₁ h₂)]

(CategoryTheory.ShortComplex.HomologyData.ofIsIsoLeftRightHomologyComparison' h₁ h₂).iso =
  CategoryTheory.asIso (CategoryTheory.ShortComplex.leftRightHomologyComparison' h₁ h₂)


theorem mono_of_stalk_mono {F G : Sheaf C X} (f : F ⟶ G) [∀ x, Mono <| (stalkFunctor C x).map f.1] :
    Mono f

[∀ (x : ↑X), CategoryTheory.Mono ((TopCat.Presheaf.stalkFunctor C x).map f.val)]


theorem inner_sub_sub_self (x y : E) : ⟪x - y, x - y⟫ = ⟪x, x⟫ - ⟪x, y⟫ - ⟪y, x⟫ + ⟪y, y⟫

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

⟪x - y, x - y⟫_𝕜 = ⟪x, x⟫_𝕜 - ⟪x, y⟫_𝕜 - ⟪y, x⟫_𝕜 + ⟪y, y⟫_𝕜


theorem insertNthTR_go_eq : ∀ n l, insertNthTR.go a n l acc = acc.data ++ insertNth n a l

∀ {α : Type u_1} {a : α} {acc : Array α} (n : Nat) (l : List α),
  List.insertNthTR.go a n l acc = acc.data ++ List.insertNth n a l


@[to_additive prod_mono_left]
theorem prod_mono_left (H : Subgroup N) : Monotone fun K : Subgroup G => K.prod H

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


/-- `Finset.noncommProd` is “injective” in `f` if `f` maps into independent subgroups.  This
generalizes (one direction of) `Subgroup.disjoint_iff_mul_eq_one`. -/
@[to_additive "`Finset.noncommSum` is “injective” in `f` if `f` maps into independent subgroups.
This generalizes (one direction of) `AddSubgroup.disjoint_iff_add_eq_zero`. "]
theorem eq_one_of_noncommProd_eq_one_of_independent {ι : Type*} (s : Finset ι) (f : ι → G) (comm)
    (K : ι → Subgroup G) (hind : CompleteLattice.Independent K) (hmem : ∀ x ∈ s, f x ∈ K x)
    (heq1 : s.noncommProd f comm = 1) : ∀ i ∈ s, f i = 1

(comm : (↑s).Pairwise fun a b => AddCommute (f a) (f b))


theorem nonunits_injective : Function.Injective (nonunits : ValuationSubring K → Subsemigroup _)


@[to_additive (attr := simp)]
theorem mem_mrange {f : F} {y : N} : y ∈ mrange f ↔ ∃ x, f x = y

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


@[simp]
theorem val_lt_iff {s₁ s₂ : Finset α} : s₁.1 < s₂.1 ↔ s₁ ⊂ s₂


@[simp]
theorem prod.lift_fst_snd {X Y : C} [HasBinaryProduct X Y] :
    prod.lift prod.fst prod.snd = 𝟙 (X ⨯ Y)

CategoryTheory.Limits.prod.lift CategoryTheory.Limits.prod.fst CategoryTheory.Limits.prod.snd = 𝟙 (X ⨯ Y)


theorem smul_inv₀ [SMulCommClass α β β] [IsScalarTower α β β] (c : α) (x : β) :
    (c • x)⁻¹ = c⁻¹ • x⁻¹

{α : Type u_5}
{β : Type u_6}
[GroupWithZero α]
[GroupWithZero β]
[MulActionWithZero α β]
[SMulCommClass α β β]
[IsScalarTower α β β]
(c : α)
(x : β)

(c • x)⁻¹ = c⁻¹ • x⁻¹


theorem ofReal_rpow_of_pos {x p : ℝ} (hx_pos : 0 < x) :
    ENNReal.ofReal x ^ p = ENNReal.ofReal (x ^ p)


theorem eq_succ_of_zero_lt {a : Int} (h : 0 < a) : ∃ n : Nat, a = n.succ


/-- Commuting elements of finite order are closed under multiplication. -/
@[to_additive "Commuting elements of finite additive order are closed under addition."]
theorem isOfFinOrder_mul (h : Commute x y) (hx : IsOfFinOrder x) (hy : IsOfFinOrder y) :
    IsOfFinOrder (x * y)

{G : Type u_1}
[AddMonoid G]
{x y : G}
(h : AddCommute x y)
(hx : IsOfFinAddOrder x)
(hy : IsOfFinAddOrder y)


theorem rfind_min {p : ℕ →. Bool} {n : ℕ} (h : n ∈ rfind p) : ∀ {m : ℕ}, m < n → false ∈ p m

{p : ℕ →. Bool}
{n : ℕ}
(h : n ∈ Nat.rfind p)
{m : ℕ}


@[simp]
theorem leftUnitor_hom (X : C) : (λ_ X).hom = Limits.prod.snd

(CategoryTheory.MonoidalCategory.leftUnitor X).hom = CategoryTheory.Limits.prod.snd


@[to_additive]
theorem IsUpperSet.inv (hs : IsUpperSet s) : IsLowerSet s⁻¹

{α : Type u_1}
[OrderedCommGroup α]
{s : Set α}
(hs : IsUpperSet s)


@[arith_mult]
theorem isMultiplicative_one [MonoidWithZero R] : IsMultiplicative (1 : ArithmeticFunction R)


nonrec theorem OrderIso.map_mem_minimals (f : s ≃o t) {x : α}
    (hx : x ∈ minimals (· ≤ ·) s) : (f ⟨x, hx.1⟩).val ∈ minimals (· ≤ ·) t

(hx : x ∈ minimals (fun x x_1 => x ≤ x_1) s)

↑(f ⟨x, ⋯⟩) ∈ minimals (fun x x_1 => x ≤ x_1) t


@[instance]
theorem ordConnected_Ioi {a : α} : OrdConnected (Ioi a)


@[reassoc (attr := simp)]
theorem pullbackAssoc_hom_fst [HasPullback ((pullback.snd _ _ : Z₁ ⟶ X₂) ≫ f₃) f₄]
    [HasPullback f₁ ((pullback.fst _ _ : Z₂ ⟶ X₂) ≫ f₂)] :
    (pullbackAssoc f₁ f₂ f₃ f₄).hom ≫ pullback.fst _ _ = pullback.fst _ _ ≫ pullback.fst _ _

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

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

(CategoryTheory.Limits.pullbackAssoc f₁ f₂ f₃ f₄).hom ≫
    CategoryTheory.Limits.pullback.fst f₁ (CategoryTheory.Limits.pullback.fst f₃ f₄ ≫ f₂) =
  CategoryTheory.Limits.pullback.fst (CategoryTheory.Limits.pullback.snd f₁ f₂ ≫ f₃) f₄ ≫
    CategoryTheory.Limits.pullback.fst f₁ f₂


@[simp]
theorem prod_union : s ×ˢ (t₁ ∪ t₂) = s ×ˢ t₁ ∪ s ×ˢ t₂

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

s ×ˢ (t₁ ∪ t₂) = s ×ˢ t₁ ∪ s ×ˢ t₂


lemma iff_isPreimmersion {X Y : Scheme} {f : X ⟶ Y} :
    IsClosedImmersion f ↔ IsPreimmersion f ∧ IsClosed (Set.range f.1.base)

{X Y : AlgebraicGeometry.Scheme}
{f : X ⟶ Y}

AlgebraicGeometry.IsClosedImmersion f ↔ AlgebraicGeometry.IsPreimmersion f ∧ IsClosed (Set.range ⇑f.val.base)


theorem add_left (h₁ : ν₁ ⟂ₘ μ) (h₂ : ν₂ ⟂ₘ μ) : ν₁ + ν₂ ⟂ₘ μ

{α : Type u_1}
{m0 : MeasurableSpace α}
{μ ν₁ ν₂ : MeasureTheory.Measure α}
(h₁ : ν₁ ⟂ₘ μ)
(h₂ : ν₂ ⟂ₘ μ)

ν₁ + ν₂ ⟂ₘ μ


@[simp]
theorem trop_coe_ne_zero (x : R) : trop (x : WithTop R) ≠ 0


@[to_additive]
-- Porting note (#11119): removed `simp` attribute because `simpNF` says it can prove it.
theorem pure_div_pure : (pure a : Filter α) / pure b = pure (a / b)


theorem Uncountable.of_equiv (α : Sort*) [Uncountable α] (e : α ≃ β) : Uncountable β

{β : Sort v}
(α : Sort u_1)
[Uncountable α]
(e : α ≃ β)


@[to_additive (attr := simp)]
lemma mul_stabilizer_self : s * stabilizer G s = s

{G : Type u_1}
[CommGroup G]
(s : Set G)


@[continuity, fun_prop]
protected theorem continuous (h : X ≃ₜ Y) : Continuous h

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


theorem hermite_eq_iterate (n : ℕ) : hermite n = (fun p => X * p - derivative p)^[n] 1

Polynomial.hermite n = (fun p => Polynomial.X * p - Polynomial.derivative p)^[n] 1


/-- Build an isomorphism in the category `AlgebraCat R` from a `AlgEquiv` between `Algebra`s. -/
@[simps]
def AlgEquiv.toAlgebraIso {g₁ : Ring X₁} {g₂ : Ring X₂} {m₁ : Algebra R X₁} {m₂ : Algebra R X₂}
    (e : X₁ ≃ₐ[R] X₂) : AlgebraCat.of R X₁ ≅ AlgebraCat.of R X₂

{R : Type u}
[CommRing R]
{X₁ X₂ : Type u}
{g₁ : Ring X₁}
{g₂ : Ring X₂}
{m₁ : Algebra R X₁}
{m₂ : Algebra R X₂}
(e : X₁ ≃ₐ[R] X₂)


theorem LeftInverse.comp_eq_id {f : α → β} {g : β → α} (h : LeftInverse f g) : f ∘ g = id

{α : Sort u_1}
{β : Sort u_2}
{f : α → β}
{g : β → α}
(h : Function.LeftInverse f g)


theorem filter_eq : ∀ {f g : Filter α}, f.sets = g.sets → f = g


/-- The category of coalgebras over an additive comonad on a preadditive category is preadditive. -/
@[simps]
instance Comonad.coalgebraPreadditive : Preadditive (Comonad.Coalgebra U)

(C : Type u₁)
[CategoryTheory.Category.{v₁, u₁} C]
[CategoryTheory.Preadditive C]
(U : CategoryTheory.Comonad C)
[U.Additive]
(F G : U.Coalgebra)
(α : F ⟶ G)


/-- The natural isomorphism `K.homology i ≅ (K.sc i).homology`
for all homological complexes `K`. -/
@[simps!]
noncomputable def homologyFunctorIso [CategoryWithHomology C] :
    homologyFunctor C c i ≅
      shortComplexFunctor C c i ⋙ ShortComplex.homologyFunctor C

(HomologicalComplex.homologyFunctorIso C c i).hom.app X = 𝟙 (X.homology i)


@[to_additive]
lemma preimage_div (hm : Injective m) {s t : Set β} (hs : s ⊆ range m) (ht : t ⊆ range m) :
    m ⁻¹' (s / t) = m ⁻¹' s / m ⁻¹' t

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


@[to_additive (attr := simp)]
theorem card_inv (s : Finset α) : s⁻¹.card = s.card

{α : Type u_2}
[DecidableEq α]
[InvolutiveNeg α]
(s : Finset α)


theorem range_eq_univ (e : P ≃ᵃⁱ[𝕜] P₂) : Set.range e = Set.univ

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


/-- The function `ℤ ^ 2 → ℝ` given by `x ↦ ‖x‖ ^ (-k)` is summable if `2 < k`. We prove this by
splitting into boxes using `Finset.box`. -/
lemma summable_one_div_norm_rpow {k : ℝ} (hk : 2 < k) :
    Summable fun (x : Fin 2 → ℤ) ↦ ‖x‖ ^ (-k)


@[to_additive]
theorem relindex_le_of_le_right (hKL : K ≤ L) (hHL : H.relindex L ≠ 0) :
    H.relindex K ≤ H.relindex L

{G : Type u_1}
[Group G]
{H K L : Subgroup G}
(hKL : K ≤ L)
(hHL : H.relindex L ≠ 0)


@[simp]
theorem sInf_empty : sInf (∅ : Set Cardinal.{u}) = 0


@[to_additive]
lemma isOpenMap_mul_left (a : G) : IsOpenMap (a * ·)

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


theorem coequalizer_isOpen_iff (F : WalkingParallelPair ⥤ TopCat.{u})
    (U : Set ((colimit F : _) : Type u)) :
    IsOpen U ↔ IsOpen (colimit.ι F WalkingParallelPair.one ⁻¹' U)

(F : CategoryTheory.Limits.WalkingParallelPair ⥤ TopCat)

(U : Set ↑(CategoryTheory.Limits.colimit F))

IsOpen U ↔ IsOpen (⇑(CategoryTheory.Limits.colimit.ι F CategoryTheory.Limits.WalkingParallelPair.one) ⁻¹' U)


/-- On non-dependent functions, `Function.update` can be expressed as an `ite` -/
theorem update_apply {β : Sort*} (f : α → β) (a' : α) (b : β) (a : α) :
    update f a' b a = if a = a' then b else f a

{α : Sort u}
[DecidableEq α]
{β : Sort u_1}
(f : α → β)
(a' : α)
(b : β)
(a : α)

Function.update f a' b a = if a = a' then b else f a


lemma gaussianPDFReal_add {μ : ℝ} {v : ℝ≥0} (x y : ℝ) :
    gaussianPDFReal μ v (x + y) = gaussianPDFReal (μ - y) v x

ProbabilityTheory.gaussianPDFReal μ v (x + y) = ProbabilityTheory.gaussianPDFReal (μ - y) v x


protected theorem add_mem_iff_left : b ∈ I → (a + b ∈ I ↔ a ∈ I)

{α : Type u}
[Ring α]
(I : Ideal α)
{a b : α}


lemma Antitone.vecCons (hf : Antitone f) (ha : f 0 ≤ a) : Antitone (vecCons a f)

{α : Type u_1}
[Preorder α]
{n : ℕ}
{f : Fin (n + 1) → α}
{a : α}
(hf : Antitone f)
(ha : f 0 ≤ a)


/-- A non_unital `k`-algebra homomorphism from `MonoidAlgebra k G` is uniquely defined by its
values on the functions `single a 1`. -/
theorem nonUnitalAlgHom_ext [DistribMulAction k A] {φ₁ φ₂ : MonoidAlgebra k G →ₙₐ[k] A}
    (h : ∀ x, φ₁ (single x 1) = φ₂ (single x 1)) : φ₁ = φ₂

(h : ∀ (x : G), φ₁ (MonoidAlgebra.single x 1) = φ₂ (MonoidAlgebra.single x 1))


/-- If `f : G → H` is a multiplicative homomorphism between two monoids, then
`Finsupp.mapDomain f` is a ring homomorphism between their monoid algebras. -/
@[simps]
def mapDomainRingHom (k : Type*) {H F : Type*} [Semiring k] [Monoid G] [Monoid H]
    [FunLike F G H] [MonoidHomClass F G H] (f : F) : MonoidAlgebra k G →+* MonoidAlgebra k H

{G : Type u₂}
(k : Type u_3)
{H : Type u_4}
{F : Type u_5}
[Semiring k]
[Monoid G]
[Monoid H]
[FunLike F G H]
[MonoidHomClass F G H]
(f : F)

∀ (a : G →₀ k), (MonoidAlgebra.mapDomainRingHom k f) a = (↑(Finsupp.mapDomain.addMonoidHom ⇑f)).toFun a


@[to_additive (attr := simp 1100)]
protected theorem one_le_div_iff : 1 ≤ f / g ↔ ¬Disjoint f g

{α : Type u_2}
[AddGroup α]
{f g : Filter α}


/-- If `∑' i, ‖f i‖₊` is summable, then `‖∑' i, f i‖₊ ≤ ∑' i, ‖f i‖₊`. Note that
we do not assume that `∑' i, f i` is summable, and it might not be the case if `α` is not a complete
space. -/
theorem nnnorm_tsum_le {f : ι → E} (hf : Summable fun i => ‖f i‖₊) : ‖∑' i, f i‖₊ ≤ ∑' i, ‖f i‖₊

{ι : Type u_1}
{E : Type u_3}
[SeminormedAddCommGroup E]
{f : ι → E}
(hf : Summable fun i => ‖f i‖₊)


theorem mem_of_le (h : s ≤ t) : a ∈ s → a ∈ t

{α : Type u_1}
{s t : Multiset α}
{a : α}
(h : s ≤ t)


@[deprecated getElem_cons_length (since := "2024-06-12")]
theorem get_cons_length (x : α) (xs : List α) (n : Nat) (h : n = xs.length) :
    (x :: xs).get ⟨n, by simp [h]⟩ = (x :: xs).getLast (cons_ne_nil x xs)

{α : Type u_1}
(x : α)
(xs : List α)
(n : Nat)
(h : n = xs.length)

(x :: xs).get ⟨n, ⋯⟩ = (x :: xs).getLast ⋯


@[simp]
theorem toConvexCone_inf (S T : Submodule 𝕜 E) :
    (S ⊓ T).toConvexCone = S.toConvexCone ⊓ T.toConvexCone

{𝕜 : Type u_1}
{E : Type u_2}
[OrderedSemiring 𝕜]
[AddCommMonoid E]
[Module 𝕜 E]
(S T : Submodule 𝕜 E)


/-- Explicit formula for the derivative of the complex Gamma function at positive integers, in
terms of harmonic numbers and the Euler-Mascheroni constant `γ`. -/
lemma deriv_Gamma_nat (n : ℕ) :
    deriv Gamma (n + 1) = n ! * (-γ + harmonic n)

deriv Complex.Gamma (↑n + 1) = ↑n ! * (-↑γ + ↑(harmonic n))


@[simp 1100]
lemma mk₀_comp_mk₀_assoc (f : X ⟶ Y) (g : Y ⟶ Z) {n : ℕ} (α : Ext Z T n) :
    (mk₀ f).comp ((mk₀ g).comp α (zero_add n)) (zero_add n) =
      (mk₀ (f ≫ g)).comp α (zero_add n)

{C : Type u}
[CategoryTheory.Category.{v, u} C]
[CategoryTheory.Abelian C]
[CategoryTheory.HasExt C]
{X Y Z T : C}
(f : X ⟶ Y)
(g : Y ⟶ Z)
{n : ℕ}
(α : CategoryTheory.Abelian.Ext Z T n)

(CategoryTheory.Abelian.Ext.mk₀ f).comp ((CategoryTheory.Abelian.Ext.mk₀ g).comp α ⋯) ⋯ =
  (CategoryTheory.Abelian.Ext.mk₀ (CategoryTheory.CategoryStruct.comp f g)).comp α ⋯


/-- A nondegenerate configuration in which every pair of lines has an intersection point. -/
class HasPoints extends Nondegenerate P L where
  mkPoint : ∀ {l₁ l₂ : L}, l₁ ≠ l₂ → P
  mkPoint_ax : ∀ {l₁ l₂ : L} (h : l₁ ≠ l₂), mkPoint h ∈ l₁ ∧ mkPoint h ∈ l₂

{P : Type u_1}
{L : Type u_2}
[Membership P L]
[self : Configuration.HasPoints P L]
{l₁ l₂ : L}
(h : l₁ ≠ l₂)

Configuration.HasPoints.mkPoint h ∈ l₁ ∧ Configuration.HasPoints.mkPoint h ∈ l₂


theorem hasGradientAtFilter_const : HasGradientAtFilter (fun _ => c) 0 x L

{𝕜 : Type u_1}
{F : Type u_2}
[RCLike 𝕜]
[NormedAddCommGroup F]
[InnerProductSpace 𝕜 F]
[CompleteSpace F]
(x : F)
(L : Filter F)
(c : 𝕜)


lemma mul_left_injective_of_invertible [Invertible A] :
    Function.Injective (fun (x : Matrix m n α) => x * A)

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


nonrec theorem sin_two_mul : sin (2 * x) = 2 * sin x * cos x

Real.sin (2 * x) = 2 * Real.sin x * Real.cos x


@[simp]
theorem deriv_succ (f o) : deriv f (succ o) = nfp f (succ (deriv f o))

(f : Ordinal.{u_1} → Ordinal.{u_1})
(o : Ordinal.{u_1})

Ordinal.deriv f (Order.succ o) = Ordinal.nfp f (Order.succ (Ordinal.deriv f o))


/--
Given `F : Homotopy p q`, and `f : C(X, Y)`, we can define a homotopy from `p.map f.continuous` to
`q.map f.continuous`.
-/
@[simps]
def map {p q : Path x₀ x₁} (F : p.Homotopy q) (f : C(X, Y)) :
    Homotopy (p.map f.continuous) (q.map f.continuous)

{X : Type u}
{Y : Type v}
[TopologicalSpace X]
[TopologicalSpace Y]
{x₀ x₁ : X}
{p q : Path x₀ x₁}
(F : p.Homotopy q)
(f : C(X, Y))

∀ (a : ↑I × ↑I), (F.map f) a = (⇑f ∘ ⇑F) a


@[to_additive (attr := simp)]
theorem neBot_inv_iff : f⁻¹.NeBot ↔ NeBot f


@[reassoc (attr := simp)]
theorem left_triangle_components :
    F.map (adj.unit.app X) ≫ adj.counit.app (F.obj X) = 𝟙 (F.obj X)

{C : Type u₁}
[CategoryTheory.Category.{v₁, u₁} C]
{D : Type u₂}
[CategoryTheory.Category.{v₂, u₂} D]
{F : CategoryTheory.Functor C D}
{G : CategoryTheory.Functor D C}
(adj : F ⊣ G)
(X : C)

CategoryTheory.CategoryStruct.comp (F.map (adj.unit.app X)) (adj.counit.app (F.obj X)) =
  CategoryTheory.CategoryStruct.id (F.obj X)


theorem eval₂Hom_zero'_apply (f : R →+* S₂) (p : MvPolynomial σ R) :
    eval₂Hom f (fun _ => 0 : σ → S₂) p = f (constantCoeff p)

{R : Type u}
{S₂ : Type w}
{σ : Type u_1}
[CommSemiring R]
[CommSemiring S₂]
(f : R →+* S₂)
(p : MvPolynomial σ R)

(MvPolynomial.eval₂Hom f fun x => 0) p = f (MvPolynomial.constantCoeff p)


@[simp]
theorem mapMatrix_refl : (AddEquiv.refl α).mapMatrix = AddEquiv.refl (Matrix m n α)

{m : Type u_2}
{n : Type u_3}
{α : Type v}
[Add α]


/-- A continuous partition of unity on a set `s : Set X` is a collection of continuous functions
`f i` such that

* the supports of `f i` form a locally finite family of sets, i.e., for every point `x : X` there
  exists a neighborhood `U ∋ x` such that all but finitely many functions `f i` are zero on `U`;
* the functions `f i` are nonnegative;
* the sum `∑ᶠ i, f i x` is equal to one for every `x ∈ s` and is less than or equal to one
  otherwise.

If `X` is a normal paracompact space, then `PartitionOfUnity.exists_isSubordinate` guarantees
that for every open covering `U : Set (Set X)` of `s` there exists a partition of unity that is
subordinate to `U`.
-/
structure PartitionOfUnity (ι X : Type*) [TopologicalSpace X] (s : Set X := univ) where
  /-- The collection of continuous functions underlying this partition of unity -/
  toFun : ι → C(X, ℝ)
  /-- the supports of the underlying functions are a locally finite family of sets -/
  locallyFinite' : LocallyFinite fun i => support (toFun i)
  /-- the functions are non-negative -/
  nonneg' : 0 ≤ toFun
  /-- the functions sum up to one on `s` -/
  sum_eq_one' : ∀ x ∈ s, ∑ᶠ i, toFun i x = 1
  /-- the functions sum up to at most one, globally -/
  sum_le_one' : ∀ x, ∑ᶠ i, toFun i x ≤ 1

{ι : Type u_1}
{X : Type u_2}
[TopologicalSpace X]
{s : optParam (Set X) Set.univ}
(self : PartitionOfUnity ι X s)

LocallyFinite fun i => Function.support ⇑(self.toFun i)


/-- In a module over a Noetherian ring, the submodule generated by finitely many vectors is
Noetherian. -/
theorem isNoetherian_span_of_finite (R) {M} [Ring R] [AddCommGroup M] [Module R M]
    [IsNoetherianRing R] {A : Set M} (hA : A.Finite) : IsNoetherian R (Submodule.span R A)

(R : Type u_1)
{M : Type u_2}
[Ring R]
[AddCommGroup M]
[Module R M]
[IsNoetherianRing R]
{A : Set M}
(hA : A.Finite)


theorem toJordanDecomposition_neg (s : SignedMeasure α) :
    (-s).toJordanDecomposition = -s.toJordanDecomposition

{α : Type u_1}
[MeasurableSpace α]
(s : MeasureTheory.SignedMeasure α)


theorem replaceF_of_forall_none {l : List α} (h : ∀ a, a ∈ l → p a = none) : l.replaceF p = l

{α : Type u_1}
{p : α → Option α}
{l : List α}
(h : ∀ (a : α), a ∈ l → p a = none)


@[simp]
theorem inf_eq_top_iff : a ⊓ b = ⊤ ↔ a = ⊤ ∧ b = ⊤

{α : Type u}
[SemilatticeInf α]
[OrderTop α]
{a b : α}


@[simp]
theorem ennreal_mass {μ : FiniteMeasure Ω} : (μ.mass : ℝ≥0∞) = (μ : Measure Ω) univ

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


theorem IsCompactOperator.isCompact_closure_image_closedBall [ContinuousConstSMul 𝕜₂ M₂]
    [T2Space M₂] {f : M₁ →ₛₗ[σ₁₂] M₂} (hf : IsCompactOperator f) (r : ℝ) :
    IsCompact (closure <| f '' Metric.closedBall 0 r)

{𝕜₁ : Type u_1}
{𝕜₂ : Type u_2}
[NontriviallyNormedField 𝕜₁]
[SeminormedRing 𝕜₂]
{σ₁₂ : 𝕜₁ →+* 𝕜₂}
{M₁ : Type u_3}
{M₂ : Type u_4}
[SeminormedAddCommGroup M₁]
[TopologicalSpace M₂]
[AddCommMonoid M₂]
[NormedSpace 𝕜₁ M₁]
[Module 𝕜₂ M₂]
[ContinuousConstSMul 𝕜₂ M₂]
[T2Space M₂]
{f : M₁ →ₛₗ[σ₁₂] M₂}
(hf : IsCompactOperator ⇑f)
(r : ℝ)

IsCompact (closure (⇑f '' Metric.closedBall 0 r))


theorem IsCompact.sSup_mem [ClosedIciTopology α] {s : Set α} (hs : IsCompact s)
    (ne_s : s.Nonempty) : sSup s ∈ s

{α : Type u_2}
[ConditionallyCompleteLinearOrder α]
[TopologicalSpace α]
[ClosedIciTopology α]
{s : Set α}
(hs : IsCompact s)
(ne_s : s.Nonempty)


theorem RelEmbedding.inter_preimage_minimals_eq_of_subset {y : Set β} {x : Set α}
    (f : r ↪r s) (h : y ⊆ f '' x) :
    x ∩ f ⁻¹' (minimals s y) = minimals r (x ∩ f ⁻¹' y)

{α : Type u_1}
{β : Type u_2}
{r : α → α → Prop}
{s : β → β → Prop}
{y : Set β}
{x : Set α}
(f : r ↪r s)
(h : y ⊆ ⇑f '' x)

x ∩ ⇑f ⁻¹' minimals s y = minimals r (x ∩ ⇑f ⁻¹' y)


@[to_additive]
theorem op_iInf (S : ι → Subgroup G) : (iInf S).op = ⨅ i, (S i).op

{ι : Sort u_1}
{G : Type u_2}
[AddGroup G]
(S : ι → AddSubgroup G)


@[simp]
theorem ContinuousLinearMap.curry_uncurryLeft
    (f : Ei 0 →L[𝕜] ContinuousMultilinearMap 𝕜 (fun i : Fin n => Ei i.succ) G) :
    f.uncurryLeft.curryLeft = f

[(i : Fin n.succ) → NormedAddCommGroup (Ei i)]

[(i : Fin n.succ) → NormedSpace 𝕜 (Ei i)]

(f : Ei 0 →L[𝕜] ContinuousMultilinearMap 𝕜 (fun i => Ei i.succ) G)


theorem nonpos_iff : z ≤ 0 ↔ re z ≤ 0 ∧ im z = 0

z ≤ 0 ↔ RCLike.re z ≤ 0 ∧ RCLike.im z = 0


@[simp]
theorem self_sub_fract (a : α) : a - fract a = ⌊a⌋

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