theorem hasFDerivAtFilter_const (c : F) (x : E) (L : Filter E) :
    HasFDerivAtFilter (fun _ => c) (0 : E →L[𝕜] F) x L

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


@[to_additive]
theorem prod_range_div_prod_range {α : Type*} [CommGroup α] {f : ℕ → α} {n m : ℕ} (hnm : n ≤ m) :
    ((∏ k ∈ range m, f k) / ∏ k ∈ range n, f k) =
    ∏ k ∈ (range m).filter fun k => n ≤ k, f k

{α : Type u_3}
[AddCommGroup α]
{f : ℕ → α}
{n m : ℕ}
(hnm : n ≤ m)

∑ k ∈ Finset.range m, f k - ∑ k ∈ Finset.range n, f k = ∑ k ∈ Finset.filter (fun k => n ≤ k) (Finset.range m), f k


lemma levyProkhorovDist_comm (μ ν : Measure Ω) :
    levyProkhorovDist μ ν = levyProkhorovDist ν μ

{Ω : Type u_2}
[MeasurableSpace Ω]
[PseudoEMetricSpace Ω]
(μ ν : MeasureTheory.Measure Ω)

MeasureTheory.levyProkhorovDist μ ν = MeasureTheory.levyProkhorovDist ν μ


/-- A strongly measurable function is measurable. -/
@[aesop 5% apply (rule_sets := [Measurable])]
protected theorem measurable {_ : MeasurableSpace α} [TopologicalSpace β] [PseudoMetrizableSpace β]
    [MeasurableSpace β] [BorelSpace β] (hf : StronglyMeasurable f) : Measurable f

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

∀ {x : MeasurableSpace α} [inst : TopologicalSpace β] [inst_1 : TopologicalSpace.PseudoMetrizableSpace β]
  [inst_2 : MeasurableSpace β] [inst_3 : BorelSpace β], MeasureTheory.StronglyMeasurable f → Measurable f


/-- The functor `Γ` for the equivalence is `Γ'`. -/
@[simps!, nolint unusedArguments]
def Γ [IsIdempotentComplete C] [HasFiniteCoproducts C] : ChainComplex C ℕ ⥤ SimplicialObject C

∀ {X Y : ChainComplex C ℕ} (f : X ⟶ Y) (Δ : SimplexCategoryᵒᵖ),
  (CategoryTheory.Idempotents.DoldKan.Γ.map f).app Δ =
    (AlgebraicTopology.DoldKan.Γ₀.splitting X).desc Δ fun A =>
      f.f (Opposite.unop A.fst).len ≫ ((AlgebraicTopology.DoldKan.Γ₀.splitting Y).cofan Δ).inj A


@[simp]
theorem coord_norm (x : E) (h : x ≠ 0) : ‖coord 𝕜 x h‖ = ‖x‖⁻¹

(𝕜 : Type u_1)
{E : Type u_4}
[NormedAddCommGroup E]
[NontriviallyNormedField 𝕜]
[NormedSpace 𝕜 E]
(x : E)
(h : x ≠ 0)

‖ContinuousLinearEquiv.coord 𝕜 x h‖ = ‖x‖⁻¹


@[simp]
theorem swap_le_swap [LE α] [LE β] {x y : α × β} : x.swap ≤ y.swap ↔ x ≤ y

{α : Type u_2}
{β : Type u_3}
[LE α]
[LE β]
{x y : α × β}


@[simp]
theorem total_zero : Finsupp.total α M R 0 = 0

(α : Type u_1)
(M : Type u_2)
(R : Type u_5)
[Semiring R]
[AddCommMonoid M]
[Module R M]


@[simp]
theorem num_div (p q : K[X]) :
    num (algebraMap _ _ p / algebraMap _ _ q) =
      Polynomial.C (q / gcd p q).leadingCoeff⁻¹ * (p / gcd p q)

((algebraMap K[X] (RatFunc K)) p / (algebraMap K[X] (RatFunc K)) q).num =
  Polynomial.C (q / gcd p q).leadingCoeff⁻¹ * (p / gcd p q)


theorem eval_surjective (x : R) : Function.Surjective <| eval x


/-- When `D` is a monoidal category,
comonoid objects in `C ⥤ D` are the same thing
as functors from `C` into the comonoid objects of `D`.
-/
@[simps]
def comonFunctorCategoryEquivalence : Comon_ (C ⥤ D) ≌ C ⥤ Comon_ D

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

(CategoryTheory.Monoidal.comonFunctorCategoryEquivalence C D).inverse =
  CategoryTheory.Monoidal.ComonFunctorCategoryEquivalence.inverse


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

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

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


lemma even_mul_pred_self : ∀ n : ℕ, Even (n * (n - 1))


@[to_additive (attr := simp)]
theorem subgroupOf_eq_bot {H K : Subgroup G} : H.subgroupOf K = ⊥ ↔ Disjoint H K

{G : Type u_1}
[AddGroup G]
{H K : AddSubgroup G}


@[simp]
theorem zipWith3_same_left (f : α → α → β → γ) :
    ∀ (la : List α) (lb : List β), zipWith3 f la la lb = zipWith (fun a b => f a a b) la lb

{α : Type u}
{β : Type u_1}
{γ : Type u_2}
(f : α → α → β → γ)
(la : List α)
(lb : List β)

List.zipWith3 f la la lb = List.zipWith (fun a b => f a a b) la lb


/-- A semiring is local if it is nontrivial and `a` or `b` is a unit whenever `a + b = 1`.
Note that `LocalRing` is a predicate. -/
class LocalRing (R : Type*) [Semiring R] extends Nontrivial R : Prop where
  of_is_unit_or_is_unit_of_add_one ::
  /-- in a local ring `R`, if `a + b = 1`, then either `a` is a unit or `b` is a unit. In another
    word, for every `a : R`, either `a` is a unit or `1 - a` is a unit. -/
  isUnit_or_isUnit_of_add_one {a b : R} (h : a + b = 1) : IsUnit a ∨ IsUnit b

{R : Type u_1}
[Semiring R]
[self : LocalRing R]
{a b : R}
(h : a + b = 1)


theorem map_mem_closure {t : Set Y} (hf : Continuous f)
    (hx : x ∈ closure s) (ht : MapsTo f s t) : f x ∈ closure t

{X : Type u_1}
{Y : Type u_2}
[TopologicalSpace X]
[TopologicalSpace Y]
{f : X → Y}
{s : Set X}
{x : X}
{t : Set Y}
(hf : Continuous f)
(hx : x ∈ closure s)
(ht : Set.MapsTo f s t)


/-- If `R` is of characteristic zero, then `ζ` is a root of `cyclotomic n R` if and only if it is a
primitive `n`-th root of unity. -/
theorem isRoot_cyclotomic_iff_charZero {n : ℕ} {R : Type*} [CommRing R] [IsDomain R] [CharZero R]
    {μ : R} (hn : 0 < n) : (Polynomial.cyclotomic n R).IsRoot μ ↔ IsPrimitiveRoot μ n

{n : ℕ}
{R : Type u_2}
[CommRing R]
[IsDomain R]
[CharZero R]
{μ : R}
(hn : 0 < n)


/-- A multiplicative morphism between commutative monoids gives a braided functor between
the corresponding discrete braided monoidal categories.
-/
@[simps!]
def Discrete.braidedFunctor (F : M →* N) : BraidedFunctor (Discrete M) (Discrete N)

{M : Type u}
[CommMonoid M]
{N : Type u}
[CommMonoid N]
(F : M →* N)

∀ {X Y : CategoryTheory.Discrete M} (f : X ⟶ Y),
  (CategoryTheory.Discrete.braidedFunctor F).map f = CategoryTheory.Discrete.eqToHom ⋯


@[simp]
theorem natDegree_multiset_prod_X_sub_C_eq_card (s : Multiset R) :
    (s.map fun a => X - C a).prod.natDegree = Multiset.card s

{R : Type u}
[CommRing R]
[IsDomain R]
(s : Multiset R)

(Multiset.map (fun a => Polynomial.X - Polynomial.C a) s).prod.natDegree = Multiset.card s


@[simp]
theorem mem_rotate : ∀ {l : List α} {a : α} {n : ℕ}, a ∈ l.rotate n ↔ a ∈ l

{α : Type u}
{l : List α}
{a : α}
{n : ℕ}


/-- If the inner product of two unit vectors is strictly less than `1`, then the two vectors are
distinct. One form of the equality case for Cauchy-Schwarz. -/
theorem inner_lt_one_iff_real_of_norm_one {x y : F} (hx : ‖x‖ = 1) (hy : ‖y‖ = 1) :
    ⟪x, y⟫_ℝ < 1 ↔ x ≠ y

{F : Type u_3}
[NormedAddCommGroup F]
[InnerProductSpace ℝ F]
{x y : F}
(hx : ‖x‖ = 1)
(hy : ‖y‖ = 1)


@[simp]
theorem ofNat_re (n : ℕ) [n.AtLeastTwo] : (no_index (OfNat.ofNat n) : ℤ√d).re = n


/-- The equivalence `Karoubi C ≌ Karoubi (Karoubi C)` -/
@[simps]
def equivalence : Karoubi C ≌ Karoubi (Karoubi C)

(C : Type u_1)
[CategoryTheory.Category.{u_2, u_1} C]

(CategoryTheory.Idempotents.KaroubiKaroubi.equivalence C).unitIso = CategoryTheory.Idempotents.KaroubiKaroubi.unitIso C


lemma isPreimmersion_eq_inf :
    @IsPreimmersion = topologically Embedding ⊓ stalkwise (Function.Surjective ·)

@AlgebraicGeometry.IsPreimmersion =
  (AlgebraicGeometry.topologically fun {α β} [TopologicalSpace α] [TopologicalSpace β] => Embedding) ⊓
    AlgebraicGeometry.stalkwise fun {R S} [CommRing R] [CommRing S] x => Function.Surjective ⇑x


theorem natCast_natAbs_valMinAbs {n : ℕ} [NeZero n] (a : ZMod n) :
    (a.valMinAbs.natAbs : ZMod n) = if a.val ≤ (n : ℕ) / 2 then a else -a

↑a.valMinAbs.natAbs = if a.val ≤ n / 2 then a else -a


@[to_additive] lemma AntivaryOn.mul_right (h₁ : AntivaryOn f g₁ s) (h₂ : AntivaryOn f g₂ s) :
    AntivaryOn f (g₁ * g₂) s

{ι : Type u_1}
{α : Type u_2}
{β : Type u_3}
[OrderedCommGroup α]
[LinearOrderedCommGroup β]
{s : Set ι}
{f : ι → α}
{g₁ g₂ : ι → β}
(h₁ : AntivaryOn f g₁ s)
(h₂ : AntivaryOn f g₂ s)


theorem nhdsWithin_Iic_basis' [TopologicalSpace α] [LinearOrder α] [OrderTopology α] {a : α}
    (ha : ∃ l, l < a) : (𝓝[≤] a).HasBasis (fun l => l < a) fun l => Ioc l a

{α : Type u}
[TopologicalSpace α]
[LinearOrder α]
[OrderTopology α]
{a : α}
(ha : ∃ l, l < a)

(𝓝[≤] a).HasBasis (fun l => l < a) fun l => Set.Ioc l a


@[to_additive]
theorem MonoidHom.copy_eq {_ : MulOneClass M} {_ : MulOneClass N} (f : M →* N) (f' : M → N)
    (h : f' = f) : f.copy f' h = f

∀ {x : MulOneClass M} {x_1 : MulOneClass N} (f : M →* N) (f' : M → N) (h : f' = ⇑f), f.copy f' h = f


/-- The change-of-basis matrix between two orthonormal bases `a`, `b` is a unitary matrix. -/
theorem OrthonormalBasis.toMatrix_orthonormalBasis_mem_unitary :
    a.toBasis.toMatrix b ∈ Matrix.unitaryGroup ι 𝕜

{ι : Type u_1}
{𝕜 : Type u_3}
[RCLike 𝕜]
{E : Type u_4}
[NormedAddCommGroup E]
[InnerProductSpace 𝕜 E]
[Fintype ι]
[DecidableEq ι]
(a b : OrthonormalBasis ι 𝕜 E)

a.toBasis.toMatrix ⇑b ∈ Matrix.unitaryGroup ι 𝕜


@[simp] lemma rangeInl_apply_inl {α : Type*} (β : Type*) (x : α) :
    (rangeInl α β) ⟨.inl x, mem_range_self _⟩ = x

(Equiv.Set.rangeInl α β) ⟨Sum.inl x, ⋯⟩ = x


@[simp]
theorem terminal.comp_from [HasTerminal C] {P Q : C} (f : P ⟶ Q) :
    f ≫ terminal.from Q = terminal.from P

{C : Type u₁}
[CategoryTheory.Category.{v₁, u₁} C]
[CategoryTheory.Limits.HasTerminal C]
{P Q : C}
(f : P ⟶ Q)

f ≫ CategoryTheory.Limits.terminal.from Q = CategoryTheory.Limits.terminal.from P


/-- If the `R`-integral element `a : S` has coordinates `≤ y` with respect to some basis `b`,
its norm is less than `normBound abv b * y ^ dim S`. -/
theorem norm_le (a : S) {y : ℤ} (hy : ∀ k, abv (bS.repr a k) ≤ y) :
    abv (Algebra.norm R a) ≤ normBound abv bS * y ^ Fintype.card ι

(hy : ∀ (k : ι), abv ((bS.repr a) k) ≤ y)

abv ((Algebra.norm R) a) ≤ ClassGroup.normBound abv bS * y ^ Fintype.card ι


theorem norm_eq_one_iff {x : ℤ√d} : x.norm.natAbs = 1 ↔ IsUnit x


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

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


@[to_additive]
lemma inf_div (a b c : α) : (a ⊓ b) / c = a / c ⊓ b / c

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


/-- If `x` is a root of unity (spelled as `IsOfFinOrder x`) in an `n`-th cyclotomic extension of
`ℚ`, where `n` is odd, and `ζ` is a primitive `n`-th root of unity, then there exists `r < n`
such that `x = ζ^r` or `x = -ζ^r`. -/
theorem exists_pow_or_neg_mul_pow_of_isOfFinOrder [NumberField K] [IsCyclotomicExtension {n} ℚ K]
    (hno : Odd (n : ℕ)) {ζ x : K} (hζ : IsPrimitiveRoot ζ n) (hx : IsOfFinOrder x) :
    ∃ r : ℕ, r < n ∧ (x = ζ ^ r ∨ x = -ζ ^ r)

{n : ℕ+}
{K : Type u}
[Field K]
[NumberField K]
[IsCyclotomicExtension {n} ℚ K]
(hno : Odd ↑n)
{ζ x : K}
(hζ : IsPrimitiveRoot ζ ↑n)
(hx : IsOfFinOrder x)


@[to_additive]
theorem ext_iff_mulSupport {f g : α → M} :
    f = g ↔ f.mulSupport = g.mulSupport ∧ ∀ x ∈ f.mulSupport, f x = g x

{α : Type u_1}
{M : Type u_5}
[One M]
{f g : α → M}

f = g ↔ Function.mulSupport f = Function.mulSupport g ∧ ∀ x ∈ Function.mulSupport f, f x = g x


theorem equivPair_eq_of_fstIdx_ne {i} {w : Word M} (h : fstIdx w ≠ some i) :
    equivPair i w = ⟨1, w, h⟩

{ι : Type u_1}
{M : ι → Type u_2}
[(i : ι) → Monoid (M i)]
[(i : ι) → DecidableEq (M i)]
[DecidableEq ι]
{i : ι}
{w : Monoid.CoprodI.Word M}
(h : w.fstIdx ≠ some i)

(Monoid.CoprodI.Word.equivPair i) w = { head := 1, tail := w, fstIdx_ne := h }


theorem of_rat_div (h : Irrational (q / x)) : Irrational x

(q : ℚ)
{x : ℝ}
(h : Irrational (↑q / x))


theorem totalDegree_eq_zero_iff (p : MvPolynomial σ R) :
    p.totalDegree = 0 ↔ ∀ (m : σ →₀ ℕ) (_ : m ∈ p.support) (x : σ), m x = 0

(σ : Type u_1)
{R : Type u_3}
[CommSemiring R]
(p : MvPolynomial σ R)

p.totalDegree = 0 ↔ ∀ m ∈ p.support, ∀ (x : σ), m x = 0


@[simp]
lemma fiberPullbackEquiv_symm_snd_apply {X A B : C} {f : A ⟶ X} {g : B ⟶ X}
    (a : F.obj A) (b : F.obj B) (h : F.map f a = F.map g b) :
    F.map (pullback.snd f g) ((fiberPullbackEquiv F f g).symm ⟨(a, b), h⟩) = b

(F : CategoryTheory.Functor C FintypeCat)

F.map (CategoryTheory.Limits.pullback.snd f g)
    ((CategoryTheory.PreGaloisCategory.fiberPullbackEquiv F f g).symm ⟨(a, b), h⟩) =
  b


lemma toList_ne_nil (x : RelSeries r) : x.toList ≠ []

{α : Type u_1}
{r : Rel α α}
(x : RelSeries r)


theorem Filter.EventuallyEq.lineDeriv_eq (h : f₁ =ᶠ[𝓝 x] f) :
    lineDeriv 𝕜 f₁ x v = lineDeriv 𝕜 f x v

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{F : Type u_2}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{E : Type u_3}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{f f₁ : E → F}
{x v : E}
(h : f₁ =ᶠ[𝓝 x] f)


theorem squarefree_mul_iff {m n : ℕ} :
    Squarefree (m * n) ↔ m.Coprime n ∧ Squarefree m ∧ Squarefree n


@[simp] lemma cast_eq_id : NNRat.cast = id


/--
This typeclass captures properties shared by ℝ and ℂ, with an API that closely matches that of ℂ.
-/
class RCLike (K : semiOutParam Type*) extends DenselyNormedField K, StarRing K,
    NormedAlgebra ℝ K, CompleteSpace K where
  re : K →+ ℝ
  im : K →+ ℝ
  /-- Imaginary unit in `K`. Meant to be set to `0` for `K = ℝ`. -/
  I : K
  I_re_ax : re I = 0
  I_mul_I_ax : I = 0 ∨ I * I = -1
  re_add_im_ax : ∀ z : K, 𝓚 (re z) + 𝓚 (im z) * I = z
  ofReal_re_ax : ∀ r : ℝ, re (𝓚 r) = r
  ofReal_im_ax : ∀ r : ℝ, im (𝓚 r) = 0
  mul_re_ax : ∀ z w : K, re (z * w) = re z * re w - im z * im w
  mul_im_ax : ∀ z w : K, im (z * w) = re z * im w + im z * re w
  conj_re_ax : ∀ z : K, re (conj z) = re z
  conj_im_ax : ∀ z : K, im (conj z) = -im z
  conj_I_ax : conj I = -I
  norm_sq_eq_def_ax : ∀ z : K, ‖z‖ ^ 2 = re z * re z + im z * im z
  mul_im_I_ax : ∀ z : K, im z * im I = im z
  /-- only an instance in the `ComplexOrder` locale -/
  [toPartialOrder : PartialOrder K]
  le_iff_re_im {z w : K} : z ≤ w ↔ re z ≤ re w ∧ im z = im w
  -- note we cannot put this in the `extends` clause
  [toDecidableEq : DecidableEq K]

{K : semiOutParam (Type u_1)}
[self : RCLike K]
(z : K)

‖z‖ ^ 2 = RCLike.re z * RCLike.re z + RCLike.im z * RCLike.im z


theorem comp_c {X Y Z : PresheafedSpace C} (α : Hom X Y) (β : Hom Y Z) :
    (comp α β).c = β.c ≫ (Presheaf.pushforward _ β.base).map α.c

{X Y Z : AlgebraicGeometry.PresheafedSpace C}

(AlgebraicGeometry.PresheafedSpace.comp α β).c = β.c ≫ (TopCat.Presheaf.pushforward C β.base).map α.c


theorem liminf_eq : liminf u f = sSup { a | ∀ᶠ n in f, a ≤ u n }

{α : Type u_1}
{β : Type u_2}
[ConditionallyCompleteLattice α]
{f : Filter β}
{u : β → α}

Filter.liminf u f = sSup {a | ∀ᶠ (n : β) in f, a ≤ u n}


@[simp]
lemma comp_add (α : Ext X Y n) {m : ℕ} (β₁ β₂ : Ext Y Z m) {p : ℕ} (h : n + m = p) :
    α.comp (β₁ + β₂) h = α.comp β₁ h + α.comp β₂ h

(β₁ β₂ : CategoryTheory.Abelian.Ext Y Z m)


@[simp]
theorem coe_mulLeft [NonUnitalNonAssocSemiring R] (r : R) :
    (mulLeft r : R → R) = HMul.hMul r

{R : Type u_1}
[NonUnitalNonAssocSemiring R]
(r : R)


theorem embeddingsMatrixReindex_eq_vandermonde (pb : PowerBasis A B)
    (e : Fin pb.dim ≃ (B →ₐ[A] C)) :
    embeddingsMatrixReindex A C pb.basis e = (vandermonde fun i => e i pb.gen)ᵀ

{A : Type u}
{B : Type v}
(C : Type z)
[CommRing A]
[CommRing B]
[Algebra A B]
[CommRing C]
[Algebra A C]
(pb : PowerBasis A B)
(e : Fin pb.dim ≃ (B →ₐ[A] C))

Algebra.embeddingsMatrixReindex A C (⇑pb.basis) e = (Matrix.vandermonde fun i => (e i) pb.gen)ᵀ


theorem rangeS_le : (algebraMap R A).rangeS ≤ S.toSubalgebra.toSubsemiring

{R : Type u_2}
{A : Type u_3}
[CommSemiring R]
[StarRing R]
[Semiring A]
[StarRing A]
[Algebra R A]
[StarModule R A]
(S : StarSubalgebra R A)

(algebraMap R A).rangeS ≤ S.toSubsemiring


protected theorem dvd_mul_right (a b : Nat) : a ∣ a * b


theorem isCaratheodory_iUnion_lt {s : ℕ → Set α} :
    ∀ {n : ℕ}, (∀ i < n, IsCaratheodory m (s i)) → IsCaratheodory m (⋃ i < n, s i)

{α : Type u}
(m : MeasureTheory.OuterMeasure α)
{s : ℕ → Set α}
{n : ℕ}

(∀ i < n, m.IsCaratheodory (s i)) → m.IsCaratheodory (⋃ i, ⋃ (_ : i < n), s i)


@[simp]
theorem kernelIsoKer_hom_comp_subtype {G H : AddCommGrp.{u}} (f : G ⟶ H) :
    (kernelIsoKer f).hom ≫ AddSubgroup.subtype f.ker = kernel.ι f

(AddCommGrp.kernelIsoKer f).hom ≫ (AddMonoidHom.ker f).subtype = CategoryTheory.Limits.kernel.ι f


@[simp]
theorem IsTrail.nil {u : V} : (nil : G.Walk u u).IsTrail

{V : Type u}
{G : SimpleGraph V}
{u : V}


@[simp]
theorem val_mk0 {a : G₀} (h : a ≠ 0) : (mk0 a h : G₀) = a

{G₀ : Type u_3}
[GroupWithZero G₀]
{a : G₀}
(h : a ≠ 0)


lemma dual_inv :
    dual A K I⁻¹ = dual A K 1 * I

(A : Type u_1)
(K : Type u_2)
{L : Type u}
{B : Type u_3}
[CommRing A]
[Field K]
[CommRing B]
[Field L]
[Algebra A K]
[Algebra B L]
[Algebra A B]
[Algebra K L]
[Algebra A L]
[IsScalarTower A K L]
[IsScalarTower A B L]
[IsDomain A]
[IsFractionRing A K]
[IsIntegralClosure B A L]
[IsFractionRing B L]
[FiniteDimensional K L]
[Algebra.IsSeparable K L]
[IsIntegrallyClosed A]
[IsDedekindDomain B]
{I : FractionalIdeal B⁰ L}

FractionalIdeal.dual A K I⁻¹ = FractionalIdeal.dual A K 1 * I


theorem all_balanceL {P l x r} (hl : Balanced l) (hr : Balanced r) (sl : Sized l) (sr : Sized r)
    (H :
      (∃ l', Raised l' (size l) ∧ BalancedSz l' (size r)) ∨
        ∃ r', Raised (size r) r' ∧ BalancedSz (size l) r') :
    All P (@balanceL α l x r) ↔ All P l ∧ P x ∧ All P r

(H :
  (∃ l', Ordnode.Raised l' l.size ∧ Ordnode.BalancedSz l' r.size) ∨
    ∃ r', Ordnode.Raised r.size r' ∧ Ordnode.BalancedSz l.size r')

Ordnode.All P (l.balanceL x r) ↔ Ordnode.All P l ∧ P x ∧ Ordnode.All P r


@[simp]
lemma coprod.desc_inl {F₁ F₂ : C ⥤ Type w} (τ₁ : F₁ ⟶ F) (τ₂ : F₂ ⟶ F) :
    coprod.inl ≫ coprod.desc τ₁ τ₂ = τ₁

{F F₁ F₂ : CategoryTheory.Functor C (Type w)}

CategoryTheory.CategoryStruct.comp CategoryTheory.FunctorToTypes.coprod.inl
    (CategoryTheory.FunctorToTypes.coprod.desc τ₁ τ₂) =
  τ₁


theorem ContMDiff.smul {f : M → 𝕜} {g : M → V} (hf : ContMDiff I 𝓘(𝕜) n f)
    (hg : ContMDiff I 𝓘(𝕜, V) n g) : ContMDiff I 𝓘(𝕜, V) n fun p => f p • g p

{𝕜 : 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]
{n : ℕ∞}
{V : Type u_18}
[NormedAddCommGroup V]
[NormedSpace 𝕜 V]
{f : M → 𝕜}
{g : M → V}
(hf : ContMDiff I 𝓘(𝕜, 𝕜) n f)
(hg : ContMDiff I 𝓘(𝕜, V) n g)


@[simp]
theorem Basis.equivFun_self [Finite ι] [DecidableEq ι] (b : Basis ι R M) (i j : ι) :
    b.equivFun (b i) j = if i = j then 1 else 0

{ι : Type u_1}
{R : Type u_3}
{M : Type u_6}
[Semiring R]
[AddCommMonoid M]
[Module R M]
[Finite ι]
[DecidableEq ι]
(b : Basis ι R M)
(i j : ι)


/--
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


theorem mk_isDiag_iff {x y : α} : IsDiag s(x, y) ↔ x = y


@[simp]
theorem map_C (r : R) : map f (C _ r) = C _ (f r)

{R : Type u_1}
[Semiring R]
{S : Type u_2}
[Semiring S]
(f : R →+* S)
(r : R)

(PowerSeries.map f) ((PowerSeries.C R) r) = (PowerSeries.C S) (f r)


theorem IsPrimitive.mul {p q : R[X]} (hp : p.IsPrimitive) (hq : q.IsPrimitive) :
    (p * q).IsPrimitive

{R : Type u_1}
[CommRing R]
[IsDomain R]
[NormalizedGCDMonoid R]
{p q : Polynomial R}
(hp : p.IsPrimitive)
(hq : q.IsPrimitive)


protected theorem Nodup.disjSum (hs : s.Nodup) (ht : t.Nodup) : (s.disjSum t).Nodup

{α : Type u_1}
{β : Type u_2}
{s : Multiset α}
{t : Multiset β}
(hs : s.Nodup)
(ht : t.Nodup)


theorem card_image_of_injective (s : Set α) [Fintype s] {f : α → β} [Fintype (f '' s)]
    (H : Function.Injective f) : Fintype.card (f '' s) = Fintype.card s

{α : Type u}
{β : Type v}
(s : Set α)
[Fintype ↑s]
{f : α → β}
[Fintype ↑(f '' s)]
(H : Function.Injective f)

Fintype.card ↑(f '' s) = Fintype.card ↑s


lemma abs_prod [LinearOrderedCommRing R] (s : Finset ι) (f : ι → R) :
    |∏ x ∈ s, f x| = ∏ x ∈ s, |f x|

{ι : Type u_1}
{R : Type u_2}
[LinearOrderedCommRing R]
(s : Finset ι)
(f : ι → R)


/-- A monotone map has a limit to the right of any point `x`, equal to `sInf (f '' (Ioi x))`. -/
theorem Monotone.tendsto_nhdsWithin_Ioi {α β : Type*} [LinearOrder α] [TopologicalSpace α]
    [OrderTopology α] [ConditionallyCompleteLinearOrder β] [TopologicalSpace β] [OrderTopology β]
    {f : α → β} (Mf : Monotone f) (x : α) : Tendsto f (𝓝[>] x) (𝓝 (sInf (f '' Ioi x)))

{α : Type u_4}
{β : Type u_5}
[LinearOrder α]
[TopologicalSpace α]
[OrderTopology α]
[ConditionallyCompleteLinearOrder β]
[TopologicalSpace β]
[OrderTopology β]
{f : α → β}
(Mf : Monotone f)
(x : α)

Filter.Tendsto f (𝓝[>] x) (𝓝 (sInf (f '' Set.Ioi x)))


@[to_additive]
theorem Fintype.prod_sum_elim (f : α₁ → M) (g : α₂ → M) :
    ∏ x, Sum.elim f g x = (∏ a₁, f a₁) * ∏ a₂, g a₂

{α₁ : Type u_4}
{α₂ : Type u_5}
{M : Type u_6}
[Fintype α₁]
[Fintype α₂]
[CommMonoid M]
(f : α₁ → M)
(g : α₂ → M)

∏ x : α₁ ⊕ α₂, Sum.elim f g x = (∏ a₁ : α₁, f a₁) * ∏ a₂ : α₂, g a₂


/-- Reinterpret `Function.Commute f g` as `Function.Semiconj f g g`. These two predicates are
definitionally equal but have different dot-notation lemmas. -/
theorem semiconj (h : Commute f g) : Semiconj f g g

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


@[simp] lemma unop_eq_one_iff [One α] {a : αᵃᵒᵖ} : unop a = 1 ↔ a = 1


nonrec theorem totallyBounded_Icc (a b : ℚ) : TotallyBounded (Icc a b)


/-- `Equiv.mulLeft₀` as an `OrderIso` on a `LinearOrderedCommGroupWithZero.`.

Note that `OrderIso.mulLeft₀` refers to the `LinearOrderedField` version. -/
@[simps! (config := { simpRhs := true }) apply toEquiv]
def OrderIso.mulLeft₀' {a : α} (ha : a ≠ 0) : α ≃o α

{α : Type u_1}
[LinearOrderedCommGroupWithZero α]
{a : α}
(ha : a ≠ 0)

(OrderIso.mulLeft₀' ha).toEquiv = Equiv.mulLeft₀ a ha


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

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


protected theorem Prime.irreducible (hp : Prime p) : Irreducible p

{α : Type u_1}
[CancelCommMonoidWithZero α]
{p : α}
(hp : Prime p)


theorem Chain'.take (h : Chain' R l) (n : ℕ) : Chain' R (take n l)

{α : Type u}
{R : α → α → Prop}
{l : List α}
(h : List.Chain' R l)
(n : ℕ)


theorem range_diff_image_subset (f : α → β) (s : Set α) : range f \ f '' s ⊆ f '' sᶜ

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


@[simp]
theorem swap_idRel : Prod.swap '' idRel = @idRel α


theorem Function.LeftInverse.eq_rec_on_eq {γ : β → Sort v} {f : α → β} {g : β → α}
    (h : Function.LeftInverse g f) (C : ∀ a : α, γ (f a)) (a : α) :
    -- TODO: mathlib3 uses `(congr_arg f (h a)).recOn (C (g (f a)))` for LHS
    @Eq.recOn β (f (g (f a))) (fun x _ ↦ γ x) (f a) (congr_arg f (h a)) (C (g (f a))) = C a

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


@[simp, nolint simpNF]
theorem ε_apply (r : R) : ε R r = Finsupp.single PUnit.unit r

(ModuleCat.Free.ε R) r = Finsupp.single PUnit.unit r


@[simp] lemma floorDiv_of_nonpos (ha : a ≤ 0) (b : β) : b ⌊/⌋ a = 0

{α : Type u_2}
{β : Type u_3}
[OrderedAddCommMonoid α]
[OrderedAddCommMonoid β]
[SMulZeroClass α β]
[FloorDiv α β]
{a : α}
(ha : a ≤ 0)
(b : β)


lemma Construction.wInv_eq_isoOfHom_inv {X Y : C} (f : X ⟶ Y) (hf : W f) :
    Construction.wInv f hf = (isoOfHom W.Q W f hf).inv

{C : Type u_1}
[CategoryTheory.Category.{u_4, u_1} C]
{W : CategoryTheory.MorphismProperty C}
{X Y : C}
(f : X ⟶ Y)
(hf : W f)

CategoryTheory.Localization.Construction.wInv f hf = (CategoryTheory.Localization.isoOfHom W.Q W f hf).inv


@[simp]
theorem valuation_zero : valuation (0 : ℤ_[p]) = 0


/-- An algebra of sets is a family of sets containing the empty set and closed by complement and
union. Consequently it is also closed by difference (see `IsSetAlgebra.diff_mem`) and intersection
(see `IsSetAlgebra.inter_mem`). -/
structure IsSetAlgebra (𝒜 : Set (Set α)) : Prop where
  empty_mem : ∅ ∈ 𝒜
  compl_mem : ∀ ⦃s⦄, s ∈ 𝒜 → sᶜ ∈ 𝒜
  union_mem : ∀ ⦃s t⦄, s ∈ 𝒜 → t ∈ 𝒜 → s ∪ t ∈ 𝒜

{α : Type u_1}
{𝒜 : Set (Set α)}
(self : MeasureTheory.IsSetAlgebra 𝒜)


theorem right_mem_affineSegment (x y : P) : y ∈ affineSegment R x y

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


theorem sub_succ_lt_self (a i : Nat) (h : i < a) : a - (i + 1) < a - i


/--
The closure of a singleton `{a}` in the lower set topology is the right-closed left-infinite
interval (-∞,a].
-/
@[simp] lemma closure_singleton {a : α} : closure {a} = Ici a

{α : Type u_1}
[Preorder α]
[TopologicalSpace α]
[Topology.IsLowerSet α]
{a : α}


theorem OpenCover.iSup_opensRange {X : Scheme.{u}} (𝒰 : X.OpenCover) :
    ⨆ i, (𝒰.map i).opensRange = ⊤

{X : AlgebraicGeometry.Scheme}
(𝒰 : X.OpenCover)

⨆ i, AlgebraicGeometry.Scheme.Hom.opensRange (𝒰.map i) = ⊤


@[simp]
theorem binomial_apply_zero (p : ℝ≥0∞) (h : p ≤ 1) (n : ℕ) :
    binomial p h n 0 = (1-p)^n


@[simp] theorem lTensor_zpow (f : N ≃ₗ[R] N) (n : ℤ) : f.lTensor M ^ n = (f ^ n).lTensor M

{R : Type u_1}
[CommSemiring R]
{M : Type u_4}
{N : Type u_5}
[AddCommMonoid M]
[AddCommMonoid N]
[Module R M]
[Module R N]
(f : N ≃ₗ[R] N)
(n : ℤ)

LinearEquiv.lTensor M f ^ n = LinearEquiv.lTensor M (f ^ n)


/-- Express `dist` in terms of `edist`-/
theorem dist_edist (x y : α) : dist x y = (edist x y).toReal

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


lemma bijOn_coreflection_coroot : BijOn (P.coreflection i) (range P.coroot) (range P.coroot)

{ι : Type u_1}
{R : Type u_2}
{M : Type u_3}
{N : Type u_4}
[CommRing R]
[AddCommGroup M]
[Module R M]
[AddCommGroup N]
[Module R N]
(P : RootPairing ι R M N)
(i : ι)

Set.BijOn (⇑(P.coreflection i)) (Set.range ⇑P.coroot) (Set.range ⇑P.coroot)


/-- The Hausdorff edistance between sets or their closures is the same. -/
-- @[simp] -- Porting note (#10618): simp can prove this
theorem hausdorffEdist_closure : hausdorffEdist (closure s) (closure t) = hausdorffEdist s t

{α : Type u}
[PseudoEMetricSpace α]
{s t : Set α}

EMetric.hausdorffEdist (closure s) (closure t) = EMetric.hausdorffEdist s t


theorem nodup_iff_injective_get {v : Vector α n} : v.toList.Nodup ↔ Function.Injective v.get

{n : ℕ}
{α : Type u_1}
{v : Mathlib.Vector α n}


theorem get_push (a : Array α) (x : α) (i : Nat) (h : i < (a.push x).size) :
    (a.push x)[i] = if h : i < a.size then a[i] else x

{α : Type u_1}
(a : Array α)
(x : α)
(i : Nat)
(h : i < (a.push x).size)


theorem sdiff_sdiff_sdiff_le_sdiff : (a \ b) \ (a \ c) ≤ c \ b

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


theorem contMDiffWithinAt_congr_nhds (hst : 𝓝[s] x = 𝓝[t] x) :
    ContMDiffWithinAt I I' n f s x ↔ ContMDiffWithinAt I I' n f t x

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{H : Type u_3}
[TopologicalSpace H]
{I : ModelWithCorners 𝕜 E H}
{M : Type u_4}
[TopologicalSpace M]
[ChartedSpace H M]
{E' : Type u_5}
[NormedAddCommGroup E']
[NormedSpace 𝕜 E']
{H' : Type u_6}
[TopologicalSpace H']
{I' : ModelWithCorners 𝕜 E' H'}
{M' : Type u_7}
[TopologicalSpace M']
[ChartedSpace H' M']
{f : M → M'}
{s t : Set M}
{x : M}
{n : ℕ∞}
(hst : 𝓝[s] x = 𝓝[t] x)


theorem sumFinsuppAddEquivProdFinsupp_symm_inl {α β : Type*} (fg : (α →₀ M) × (β →₀ M)) (x : α) :
    (sumFinsuppAddEquivProdFinsupp.symm fg) (Sum.inl x) = fg.1 x

{M : Type u_5}
[AddMonoid M]
{α : Type u_13}
{β : Type u_14}
(fg : (α →₀ M) × (β →₀ M))
(x : α)

(Finsupp.sumFinsuppAddEquivProdFinsupp.symm fg) (Sum.inl x) = fg.1 x


theorem isVonNBounded_add_of_nonempty (hs : s.Nonempty) (ht : t.Nonempty) :
    IsVonNBounded 𝕜 (s + t) ↔ IsVonNBounded 𝕜 s ∧ IsVonNBounded 𝕜 t

{𝕜 : Type u_1}
{E : Type u_3}
[NormedField 𝕜]
[AddCommGroup E]
[Module 𝕜 E]
[TopologicalSpace E]
[ContinuousSMul 𝕜 E]
[ContinuousAdd E]
{s t : Set E}
(hs : s.Nonempty)
(ht : t.Nonempty)

Bornology.IsVonNBounded 𝕜 (s + t) ↔ Bornology.IsVonNBounded 𝕜 s ∧ Bornology.IsVonNBounded 𝕜 t


/-- A version of `right_iff_left_not_left` with explicit `r` and `s`. -/
theorem right_iff_left_not_left_of (r s : α → α → Prop) [IsNonstrictStrictOrder α r s] {a b : α} :
    s a b ↔ r a b ∧ ¬r b a

{α : Type u}
(r s : α → α → Prop)
[IsNonstrictStrictOrder α r s]
{a b : α}


@[simp]
theorem toAddEquiv_eq_coe (f : R ≃+* S) : f.toAddEquiv = ↑f

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


theorem vertices_eq : K.vertices = ⋃ k ∈ K.faces, (k : Set E)

{𝕜 : Type u_1}
{E : Type u_2}
[OrderedRing 𝕜]
[AddCommGroup E]
[Module 𝕜 E]
{K : Geometry.SimplicialComplex 𝕜 E}


@[to_additive tendsto_norm]
theorem tendsto_norm' {x : E} : Tendsto (fun a => ‖a‖) (𝓝 x) (𝓝 ‖x‖)

{E : Type u_6}
[SeminormedAddGroup E]
{x : E}

Filter.Tendsto (fun a => ‖a‖) (𝓝 x) (𝓝 ‖x‖)


@[simp]
theorem aleph_le {o₁ o₂ : Ordinal} : aleph o₁ ≤ aleph o₂ ↔ o₁ ≤ o₂

Cardinal.aleph o₁ ≤ Cardinal.aleph o₂ ↔ o₁ ≤ o₂


theorem disjoint_nhds_atBot (a : α) : Disjoint (𝓝 a) atBot

{α : Type u}
[Preorder α]
[NoBotOrder α]
[TopologicalSpace α]
[ClosedIicTopology α]
(a : α)


@[simp] theorem normalize_eq_zero (d0 : d ≠ 0) : normalize n d d0 = 0 ↔ n = 0


theorem mem_sections {s : Multiset (Multiset α)} :
    ∀ {a}, a ∈ Sections s ↔ s.Rel (fun s a => a ∈ s) a

{α : Type u_1}
{s : Multiset (Multiset α)}
{a : Multiset α}

a ∈ s.Sections ↔ Multiset.Rel (fun s a => a ∈ s) s a


@[simp] lemma smul_apply (x) : (σ • w) x = w (σ.symm x)

{k : Type u_1}
[Field k]
{K : Type u_2}
[Field K]
[Algebra k K]
(σ : K ≃ₐ[k] K)
(w : NumberField.InfinitePlace K)
(x : K)


theorem generateFrom_setOf_isOpen (t : TopologicalSpace α) :
    generateFrom { s | IsOpen[t] s } = t

TopologicalSpace.generateFrom {s | IsOpen s} = t


theorem iterate_commute (m n : ℕ) : Commute (fun f : α → α ↦ f^[m]) fun f ↦ f^[n]

Function.Commute (fun f => f^[m]) fun f => f^[n]


theorem isComplex_iff {w : InfinitePlace K} :
    IsComplex w ↔ ¬ComplexEmbedding.IsReal (embedding w)

{K : Type u_2}
[Field K]
{w : NumberField.InfinitePlace K}

w.IsComplex ↔ ¬NumberField.ComplexEmbedding.IsReal w.embedding


theorem toNonUnitalSemiring_injective :
    Function.Injective (@toNonUnitalSemiring R)


@[to_additive]
theorem smul_opposite_image_mul_preimage' (g : G) (h : Gᵐᵒᵖ) (s : Set G) :
    (fun y => h • y) '' ((g * ·) ⁻¹' s) = (g * ·) ⁻¹' ((fun y => h • y) '' s)

{G : Type u_2}
[Group G]
(g : G)
(h : Gᵐᵒᵖ)
(s : Set G)

(fun y => h • y) '' ((fun x => g * x) ⁻¹' s) = (fun x => g * x) ⁻¹' ((fun y => h • y) '' s)


/-- The second morphism of triangles given an octahedron. -/
@[simps]
def triangleMorphism₂ : Triangle.mk u₁₃ v₁₃ w₁₃ ⟶ Triangle.mk u₂₃ v₂₃ w₂₃

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

{comm : CategoryTheory.CategoryStruct.comp u₁₂ u₂₃ = u₁₃}

{v₁₂ : X₂ ⟶ Z₁₂}

{w₁₂ : Z₁₂ ⟶ (CategoryTheory.shiftFunctor C 1).obj X₁}

{h₁₂ : CategoryTheory.Pretriangulated.Triangle.mk u₁₂ v₁₂ w₁₂ ∈ CategoryTheory.Pretriangulated.distinguishedTriangles}

{v₂₃ : X₃ ⟶ Z₂₃}

{w₂₃ : Z₂₃ ⟶ (CategoryTheory.shiftFunctor C 1).obj X₂}

{h₂₃ : CategoryTheory.Pretriangulated.Triangle.mk u₂₃ v₂₃ w₂₃ ∈ CategoryTheory.Pretriangulated.distinguishedTriangles}

{v₁₃ : X₃ ⟶ Z₁₃}

{w₁₃ : Z₁₃ ⟶ (CategoryTheory.shiftFunctor C 1).obj X₁}

{h₁₃ : CategoryTheory.Pretriangulated.Triangle.mk u₁₃ v₁₃ w₁₃ ∈ CategoryTheory.Pretriangulated.distinguishedTriangles}

(h : CategoryTheory.Triangulated.Octahedron comm h₁₂ h₂₃ h₁₃)


@[to_additive]
theorem mulIndicator_mul_compl_eq_piecewise [DecidablePred (· ∈ s)] (f g : α → M) :
    s.mulIndicator f * sᶜ.mulIndicator g = s.piecewise f g

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


theorem sub_congr {R} [Ring R] {a a' b b' c : R} (_ : a = a') (_ : b = b')
    (_ : a' - b' = c) : (a - b : R) = c

{R : Type u_2}
[Ring R]
{a a' b b' c : R}

a = a' → b = b' → a' - b' = c → a - b = c


@[simp]
lemma rightHomologyMap_nullHomotopic [S₁.HasRightHomology] [S₂.HasRightHomology]
    (h₀ : S₁.X₁ ⟶ S₂.X₁) (h₀_f : h₀ ≫ S₂.f = 0)
    (h₁ : S₁.X₂ ⟶ S₂.X₁) (h₂ : S₁.X₃ ⟶ S₂.X₂) (h₃ : S₁.X₃ ⟶ S₂.X₃) (g_h₃ : S₁.g ≫ h₃ = 0) :
    rightHomologyMap (nullHomotopic _ _ h₀ h₀_f h₁ h₂ h₃ g_h₃) = 0

(h₀_f : CategoryTheory.CategoryStruct.comp h₀ S₂.f = 0)

(g_h₃ : CategoryTheory.CategoryStruct.comp S₁.g h₃ = 0)

CategoryTheory.ShortComplex.rightHomologyMap (S₁.nullHomotopic S₂ h₀ h₀_f h₁ h₂ h₃ g_h₃) = 0


@[to_additive]
theorem continuousOn_const_smul_iff (c : G) :
    ContinuousOn (fun x => c • f x) s ↔ ContinuousOn f s

{α : Type u_2}
{β : Type u_3}
{G : Type u_4}
[TopologicalSpace α]
[Group G]
[MulAction G α]
[ContinuousConstSMul G α]
[TopologicalSpace β]
{f : β → α}
{s : Set β}
(c : G)


theorem iIndepSet.indep_generateFrom_lt [Preorder ι] [IsMarkovKernel κ] {s : ι → Set Ω}
    (hsm : ∀ n, MeasurableSet (s n)) (hs : iIndepSet s κ μ) (i : ι) :
    Indep (generateFrom {s i}) (generateFrom { t | ∃ j < i, s j = t }) κ μ

(hs : ProbabilityTheory.Kernel.iIndepSet s κ μ)

ProbabilityTheory.Kernel.Indep (MeasurableSpace.generateFrom {s i})
  (MeasurableSpace.generateFrom {t | ∃ j < i, s j = t}) κ μ


theorem compLinearMap_inj (f : M₂ →ₗ[R] M) (hf : Function.Surjective f)
    (g₁ g₂ : M [⋀^ι]→ₗ[R] N) : g₁.compLinearMap f = g₂.compLinearMap f ↔ g₁ = g₂

{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}
{M₂ : Type u_10}
[AddCommMonoid M₂]
[Module R M₂]
(f : M₂ →ₗ[R] M)
(hf : Function.Surjective ⇑f)
(g₁ g₂ : M [⋀^ι]→ₗ[R] N)


/-- Given a pair of monoid homomorphisms `f`, `g` such that `g.comp f = id` and `f.comp g = id`,
returns a multiplicative equivalence with `toFun = f` and `invFun = g`.  This constructor is
useful if the underlying type(s) have specialized `ext` lemmas for monoid homomorphisms. -/
@[to_additive (attr := simps (config := .asFn))
  "Given a pair of additive monoid homomorphisms `f`, `g` such that `g.comp f = id`
  and `f.comp g = id`, returns an additive equivalence with `toFun = f` and `invFun = g`.  This
  constructor is useful if the underlying type(s) have specialized `ext` lemmas for additive
  monoid homomorphisms."]
def MonoidHom.toMulEquiv [MulOneClass M] [MulOneClass N] (f : M →* N) (g : N →* M)
    (h₁ : g.comp f = MonoidHom.id _) (h₂ : f.comp g = MonoidHom.id _) : M ≃* N

{M : Type u_6}
{N : Type u_7}
[AddZeroClass M]
[AddZeroClass N]
(f : M →+ N)
(g : N →+ M)
(h₁ : g.comp f = AddMonoidHom.id M)
(h₂ : f.comp g = AddMonoidHom.id N)


lemma isAtomistic_of_sSup_eq_top (hS : BooleanGenerators S) (h : sSup S = ⊤) :
    IsAtomistic α

(hS : IsCompactlyGenerated.BooleanGenerators S)


/-- A functor which preserves exactness preserves monomorphisms. -/
theorem preservesMonomorphisms_of_map_exact : L.PreservesMonomorphisms

(hL : ∀ (S : CategoryTheory.ShortComplex A), S.Exact → (S.map L).Exact)


@[to_additive sub_image_prod]
theorem image_div_prod : (fun x : α × α => x.fst / x.snd) '' s ×ˢ t = s / t


theorem EventuallyLE.antisymm [PartialOrder β] {l : Filter α} {f g : α → β} (h₁ : f ≤ᶠ[l] g)
    (h₂ : g ≤ᶠ[l] f) : f =ᶠ[l] g

{α : Type u}
{β : Type v}
[PartialOrder β]
{l : Filter α}
{f g : α → β}
(h₁ : f ≤ᶠ[l] g)
(h₂ : g ≤ᶠ[l] f)


theorem seq_continuous' {β γ : Type v} (f : α → Part (β → γ)) (g : α → Part β) (hf : Continuous' f)
    (hg : Continuous' g) : Continuous' fun x => f x <*> g x

(hf : OmegaCompletePartialOrder.Continuous' f)

(hg : OmegaCompletePartialOrder.Continuous' g)

OmegaCompletePartialOrder.Continuous' fun x => Seq.seq (f x) fun x_1 => g x


@[simp]
theorem bot_ne_pure {a : α} : ⊥ ≠ pure a


@[to_additive (attr := simp)]
theorem prod_empty : ∏ x ∈ ∅, f x = 1

{α : Type u_3}
{β : Type u_4}
{f : α → β}
[CommMonoid β]


/-- Define a closure operator from a predicate that's preserved under infima. -/
@[simps!]
def ofCompletePred (p : α → Prop) (hsinf : ∀ s, (∀ a ∈ s, p a) → p (sInf s)) : ClosureOperator α

(hsinf : ∀ (s : Set α), (∀ a ∈ s, p a) → p (sInf s))

(ClosureOperator.ofCompletePred p hsinf) a = ⨅ b, ↑b


theorem covering_iff_covers_id (S : Sieve X) : S ∈ J X ↔ J.Covers S (𝟙 X)

(J : CategoryTheory.GrothendieckTopology C)

S ∈ J.sieves X ↔ J.Covers S (CategoryTheory.CategoryStruct.id X)


theorem ExtensionOf.le_max {c : Set (ExtensionOf i f)} (hchain : IsChain (· ≤ ·) c)
    (hnonempty : c.Nonempty) (a : ExtensionOf i f) (ha : a ∈ c) :
    a ≤ ExtensionOf.max hchain hnonempty

(hchain : IsChain (fun x x_1 => x ≤ x_1) c)

a ≤ Module.Baer.ExtensionOf.max hchain hnonempty


theorem one_def : (1 : MonoidAlgebra k G) = single 1 1

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


theorem mclosure_isSwap [Finite α] : Submonoid.closure { σ : Perm α | IsSwap σ } = ⊤


/-- Composition of monoid morphisms (`MonoidHom.comp`) as a monoid morphism.

Note that unlike `MonoidHom.comp_hom'` this requires commutativity of `N`. -/
@[to_additive (attr := simps)
      "Composition of additive monoid morphisms (`AddMonoidHom.comp`) as an additive
      monoid morphism.

      Note that unlike `AddMonoidHom.comp_hom'` this requires commutativity of `N`.

      This also exists in a `LinearMap` version, `LinearMap.llcomp`."]
def compHom [MulOneClass M] [CommMonoid N] [CommMonoid P] :
    (N →* P) →* (M →* N) →* M →* P

{M : Type uM}
{N : Type uN}
{P : Type uP}
[AddZeroClass M]
[AddCommMonoid N]
[AddCommMonoid P]
(g : N →+ P)
(hmn : M →+ N)

(AddMonoidHom.compHom g) hmn = g.comp hmn


@[simp] theorem sigma_empty : s.sigma (fun i ↦ (∅ : Set (α i))) = ∅

{ι : Type u_1}
{α : ι → Type u_3}
{s : Set ι}


protected theorem codisjoint_inf_left :
    Codisjoint (s.inf f) a ↔ ∀ ⦃i⦄, i ∈ s → Codisjoint (f i) a

{α : Type u_2}
{ι : Type u_5}
[DistribLattice α]
[OrderTop α]
{f : ι → α}
{s : Finset ι}
{a : α}

Codisjoint (s.inf f) a ↔ ∀ ⦃i : ι⦄, i ∈ s → Codisjoint (f i) a


/-- Multiplicative congruence relations preserve division. -/
@[to_additive "Additive congruence relations preserve subtraction."]
protected theorem div : ∀ {w x y z}, c w x → c y z → c (w / y) (x / z)

{M : Type u_1}
[Group M]
(c : Con M)
{w x y z : M}


theorem log_pow_int_eq_self {x : ℤ} (h : 1 < x.natAbs) (m : ℕ) : log (pow x m) = m


theorem suffixLevenshtein_length (xs : List α) (ys : List β) :
    (suffixLevenshtein C xs ys).1.length = xs.length + 1

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

(suffixLevenshtein C xs ys).val.length = xs.length + 1


theorem Balanced.smul_mem_iff (hs : Balanced 𝕜 s) (h : ‖a‖ = ‖b‖) : a • x ∈ s ↔ b • x ∈ s

{𝕜 : Type u_1}
{E : Type u_3}
[NormedField 𝕜]
[AddCommGroup E]
[Module 𝕜 E]
{s : Set E}
{x : E}
{a b : 𝕜}
(hs : Balanced 𝕜 s)
(h : ‖a‖ = ‖b‖)


theorem smul_sub (r : M) (x y : A) : r • (x - y) = r • x - r • y

{M : Type u_1}
{A : Type u_4}
[Monoid M]
[AddGroup A]
[DistribMulAction M A]
(r : M)
(x y : A)


/-- A language consisting of Skolem functions for another language.
Called `skolem₁` because it is the first step in building a Skolemization of a language. -/
@[simps]
def skolem₁ : Language

∀ (x : ℕ), L.skolem₁.Relations x = Empty


/-- The backward direction of the equivalence from algebras for the coproduct monad to the under
category.
-/
@[simps]
def underToAlgebra : Under X ⥤ Monad.Algebra (coprodMonad X)

∀ {X_1 Y : CategoryTheory.Under X} (g : X_1 ⟶ Y), ((CategoryTheory.underToAlgebra X).map g).f = g.right


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

{A₀ A₁ A₂ : CategoryTheory.Endofunctor.Algebra F}

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


@[simp]
theorem mem_skewAdjointSubmodule (f : Module.End R M) :
    f ∈ B.skewAdjointSubmodule ↔ B.IsSkewAdjoint f

{R : Type u_1}
{M : Type u_5}
{M₂ : Type u_7}
[CommRing R]
[AddCommGroup M]
[Module R M]
[AddCommGroup M₂]
[Module R M₂]
{B : M →ₗ[R] M →ₗ[R] M₂}
(f : Module.End R M)


theorem volume_preserving_piFinTwo (α : Fin 2 → Type u) [∀ i, MeasureSpace (α i)]
    [∀ i, SigmaFinite (volume : Measure (α i))] :
    MeasurePreserving (MeasurableEquiv.piFinTwo α) volume volume

[(i : Fin 2) → MeasureTheory.MeasureSpace (α i)]

[∀ (i : Fin 2), MeasureTheory.SigmaFinite MeasureTheory.volume]

MeasureTheory.MeasurePreserving (⇑(MeasurableEquiv.piFinTwo α)) MeasureTheory.volume MeasureTheory.volume


/-- `id` as an `InfTopHom`. -/
@[simps]
protected def id : InfTopHom α α


@[ext] theorem unit_ext {X : C} (f g : X ⟶ 𝟙_ C) : f = g


lemma smulPosMono_iff_smulPosStrictMono : SMulPosMono α β ↔ SMulPosStrictMono α β

{α : Type u_1}
{β : Type u_2}
[Ring α]
[AddCommGroup β]
[Module α β]
[NoZeroSMulDivisors α β]
[PartialOrder α]
[PartialOrder β]


lemma mulAction_def {X : C} (σ : Aut F) (x : F.obj X) :
    σ • x = σ.hom.app X x

(F : CategoryTheory.Functor C FintypeCat)


/-- In a non-trivial `MulZeroClass`, the `0` element is not left-regular. -/
theorem not_isLeftRegular_zero_iff : ¬IsLeftRegular (0 : R) ↔ Nontrivial R


theorem crossing_eq_crossing_of_upperCrossingTime_lt {M : ℕ} (hNM : N ≤ M)
    (h : upperCrossingTime a b f N (n + 1) ω < N) :
    upperCrossingTime a b f M (n + 1) ω = upperCrossingTime a b f N (n + 1) ω ∧
      lowerCrossingTime a b f M n ω = lowerCrossingTime a b f N n ω

{f : ℕ → Ω → ℝ}

(h : MeasureTheory.upperCrossingTime a b f N (n + 1) ω < N)

MeasureTheory.upperCrossingTime a b f M (n + 1) ω = MeasureTheory.upperCrossingTime a b f N (n + 1) ω ∧
  MeasureTheory.lowerCrossingTime a b f M n ω = MeasureTheory.lowerCrossingTime a b f N n ω


lemma mapₗ_ne_zero_iff (hf : Measurable f) : Measure.mapₗ f μ ≠ 0 ↔ μ ≠ 0

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

(MeasureTheory.Measure.mapₗ f) μ ≠ 0 ↔ μ ≠ 0


theorem tendsto_nhds_iff {g : ι → X} {l : Filter ι} {x : X} (hf : ClosedEmbedding f) :
    Tendsto g l (𝓝 x) ↔ Tendsto (f ∘ g) l (𝓝 (f x))

{X : Type u_1}
{Y : Type u_2}
{ι : Type u_4}
{f : X → Y}
[TopologicalSpace X]
[TopologicalSpace Y]
{g : ι → X}
{l : Filter ι}
{x : X}
(hf : ClosedEmbedding f)

Filter.Tendsto g l (𝓝 x) ↔ Filter.Tendsto (f ∘ g) l (𝓝 (f x))


@[to_additive] lemma range_smul [SMul α β] {ι : Sort*} (a : α) (f : ι → β) :
    range (fun i ↦ a • f i) = a • range f

{α : Type u_2}
{β : Type u_3}
[VAdd α β]
{ι : Sort u_5}
(a : α)
(f : ι → β)

(Set.range fun i => a +ᵥ f i) = a +ᵥ Set.range f


@[trans]
theorem OneOneEquiv.trans {α β γ} [Primcodable α] [Primcodable β] [Primcodable γ] {p : α → Prop}
    {q : β → Prop} {r : γ → Prop} : OneOneEquiv p q → OneOneEquiv q r → OneOneEquiv p r

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


lemma IsMatching.map_ofLE (h : M.IsMatching) (hGG' : G ≤ G') :
    (M.map (Hom.ofLE hGG')).IsMatching

{V : Type u_1}
{G G' : SimpleGraph V}
{M : G.Subgraph}
(h : M.IsMatching)
(hGG' : G ≤ G')

(SimpleGraph.Subgraph.map (SimpleGraph.Hom.ofLE hGG') M).IsMatching


/-- **Fermat's Theorem**: the derivative of a function at a local minimum equals zero. -/
theorem IsLocalMin.deriv_eq_zero (h : IsLocalMin f a) : deriv f a = 0

{f : ℝ → ℝ}
{a : ℝ}
(h : IsLocalMin f a)


theorem mem_eraseIdx_iff_getElem? {x : α} {l} {k} : x ∈ eraseIdx l k ↔ ∃ i ≠ k, l[i]? = some x

{α : Type u}
{x : α}
{l : List α}
{k : Nat}

x ∈ l.eraseIdx k ↔ ∃ i, i ≠ k ∧ l[i]? = some x


theorem intCast_eq_iff (p : ℕ) (n : ℤ) (z : ZMod p) [NeZero p] :
    ↑n = z ↔ ∃ k, n = z.val + p * k


theorem star_mono : Monotone (star : Subalgebra R A → Subalgebra R A)

{R : Type u_2}
{A : Type u_3}
[CommSemiring R]
[StarRing R]
[Semiring A]
[Algebra R A]
[StarRing A]
[StarModule R A]


theorem filter_ge_eq_Iic [DecidablePred (· ≤ a)] : univ.filter (· ≤ a) = Iic a

{α : Type u_2}
[Preorder α]
[LocallyFiniteOrderBot α]
{a : α}
[Fintype α]
[DecidablePred fun x => x ≤ a]

Finset.filter (fun x => x ≤ a) Finset.univ = Finset.Iic a


lemma liftFun_vecCons {n : ℕ} (r : α → α → Prop) [IsTrans α r] {f : Fin (n + 1) → α} {a : α} :
    ((· < ·) ⇒ r) (vecCons a f) (vecCons a f) ↔ r a (f 0) ∧ ((· < ·) ⇒ r) f f

{α : Type u_1}
{n : ℕ}
(r : α → α → Prop)
[IsTrans α r]
{f : Fin (n + 1) → α}
{a : α}

((fun x x_1 => x < x_1) ⇒ r) (Matrix.vecCons a f) (Matrix.vecCons a f) ↔ r a (f 0) ∧ ((fun x x_1 => x < x_1) ⇒ r) f f


theorem toLin'_to_linearMap (A : SpecialLinearGroup n R) :
    ↑(SpecialLinearGroup.toLin' A) = Matrix.toLin' ↑ₘA

{n : Type u}
[DecidableEq n]
[Fintype n]
{R : Type v}
[CommRing R]
(A : Matrix.SpecialLinearGroup n R)

↑(Matrix.SpecialLinearGroup.toLin' A) = Matrix.toLin' ↑A


/-- The tangent cone of a product contains the tangent cone of its right factor. -/
theorem subset_tangentCone_prod_right {t : Set F} {y : F} (hs : x ∈ closure s) :
    LinearMap.inr 𝕜 E F '' tangentConeAt 𝕜 t y ⊆ tangentConeAt 𝕜 (s ×ˢ t) (x, y)

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{F : Type u_3}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{x : E}
{s : Set E}
{t : Set F}
{y : F}
(hs : x ∈ closure s)

⇑(LinearMap.inr 𝕜 E F) '' tangentConeAt 𝕜 t y ⊆ tangentConeAt 𝕜 (s ×ˢ t) (x, y)


@[simp]
theorem res_apply (U V : Opens (PrimeSpectrum.Top R)) (i : V ⟶ U)
    (s : (structureSheaf R).1.obj (op U)) (x : V) :
    ((structureSheaf R).1.map i.op s).1 x = (s.1 (i x) : _)

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

(s : ↑((AlgebraicGeometry.Spec.structureSheaf R).val.obj (Opposite.op U)))

↑(((AlgebraicGeometry.Spec.structureSheaf R).val.map i.op) s) x = ↑s ((fun x => ⟨↑x, ⋯⟩) x)


theorem exists_finset_toSmoothPartitionOfUnity_eventuallyEq (i : ι) (x : M) :
    ∃ t : Finset ι,
      fs.toSmoothPartitionOfUnity i =ᶠ[𝓝 x]
        fs i * ∏ j ∈ t.filter fun j => WellOrderingRel j i, ((1 : M → ℝ) - fs j)

{ι : Type uι}
{E : Type uE}
[NormedAddCommGroup E]
[NormedSpace ℝ E]
[FiniteDimensional ℝ E]
{H : Type uH}
[TopologicalSpace H]
{I : ModelWithCorners ℝ E H}
{M : Type uM}
[TopologicalSpace M]
[ChartedSpace H M]
[SmoothManifoldWithCorners I M]
{s : Set M}
(fs : SmoothBumpCovering ι I M s)
[T2Space M]
(i : ι)
(x : M)

∃ t,
  ⇑(fs.toSmoothPartitionOfUnity i) =ᶠ[𝓝 x]
    ↑(fs.toFun i) * ∏ j ∈ Finset.filter (fun j => WellOrderingRel j i) t, (1 - ↑(fs.toFun j))


lemma dblU_eq (P : Fin 3 → R) : W'.dblU P =
    W'.a₁ * P y * P z - (3 * P x ^ 2 + 2 * W'.a₂ * P x * P z ^ 2 + W'.a₄ * P z ^ 4)

{R : Type u}
[CommRing R]
{W' : WeierstrassCurve.Jacobian R}
(P : Fin 3 → R)


/-- Assume that `f` is differentiable inside a convex set `s`, and that its derivative `f'` is
differentiable at a point `x`. Then, given two vectors `v` and `w` pointing inside `s`, one
has `f'' v w = f'' w v`. Superseded by `Convex.second_derivative_within_at_symmetric`, which
removes the assumption that `v` and `w` point inside `s`. -/
theorem Convex.second_derivative_within_at_symmetric_of_mem_interior {v w : E}
    (h4v : x + (4 : ℝ) • v ∈ interior s) (h4w : x + (4 : ℝ) • w ∈ interior s) :
    f'' w v = f'' v w

(hf : ∀ x ∈ interior s, HasFDerivAt f (f' x) x)

(hx : HasFDerivWithinAt f' f'' (interior s) x)


lemma finset_sup_nhds [SemilatticeSup L] [OrderBot L] [ContinuousSup L]
    (hs : ∀ i ∈ s, Tendsto (f i) l (𝓝 (g i))) : Tendsto (s.sup f) l (𝓝 (s.sup g))

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

Filter.Tendsto (s.sup f) l (𝓝 (s.sup g))


@[to_additive measure_isAddHaarMeasure_eq_smul_of_isEverywherePos]
theorem measure_isHaarMeasure_eq_smul_of_isEverywherePos [LocallyCompactSpace G]
    (μ' μ : Measure G) [IsHaarMeasure μ] [IsHaarMeasure μ']
    {s : Set G} (hs : MeasurableSet s) (h's : IsEverywherePos μ s) :
    μ' s = haarScalarFactor μ' μ • μ s

{G : Type u_1}
[TopologicalSpace G]
[Group G]
[TopologicalGroup G]
[MeasurableSpace G]
[BorelSpace G]
[LocallyCompactSpace G]
(μ' μ : MeasureTheory.Measure G)
[μ.IsHaarMeasure]
[μ'.IsHaarMeasure]
{s : Set G}
(hs : MeasurableSet s)
(h's : μ.IsEverywherePos s)


lemma differentiableAt_comp_neg_iff {a : 𝕜} :
    DifferentiableAt 𝕜 f (-a) ↔ DifferentiableAt 𝕜 (fun x ↦ f (-x)) a

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

DifferentiableAt 𝕜 f (-a) ↔ DifferentiableAt 𝕜 (fun x => f (-x)) a


/-- A `biSup` version of `iSup_symmDiff_iSup_le`. -/
theorem biSup_symmDiff_biSup_le {p : ι → Prop} {f g : (i : ι) → p i → α} :
    (⨆ i, ⨆ (h : p i), f i h) ∆ (⨆ i, ⨆ (h : p i), g i h) ≤
    ⨆ i, ⨆ (h : p i), ((f i h) ∆ (g i h))

{α : Type u}
{ι : Sort w}
[CompleteBooleanAlgebra α]
{p : ι → Prop}
{f g : (i : ι) → p i → α}

symmDiff (⨆ i, ⨆ (h : p i), f i h) (⨆ i, ⨆ (h : p i), g i h) ≤ ⨆ i, ⨆ (h : p i), symmDiff (f i h) (g i h)


@[simp]
theorem lift_le {a b : Ordinal} : lift.{u,v} a ≤ lift.{u,v} b ↔ a ≤ b

Ordinal.lift.{u, v} a ≤ Ordinal.lift.{u, v} b ↔ a ≤ b


@[to_additive]
protected theorem Specializes.smul {a b : M} {x y : X} (h₁ : a ⤳ b) (h₂ : x ⤳ y) :
    (a • x) ⤳ (b • y)

{M : Type u_1}
{X : Type u_2}
[TopologicalSpace M]
[TopologicalSpace X]
[VAdd M X]
[ContinuousVAdd M X]
{a b : M}
{x y : X}
(h₁ : a ⤳ b)
(h₂ : x ⤳ y)


@[simp]
theorem cast_pow (h : m ∣ n) (a : ZMod n) (k : ℕ) : (cast (a ^ k : ZMod n) : R) = (cast a) ^ k

{n : ℕ}
{R : Type u_1}
[Ring R]
{m : ℕ}
[CharP R m]
(h : m ∣ n)
(a : ZMod n)
(k : ℕ)


theorem prod_assoc (f : Filter α) (g : Filter β) (h : Filter γ) :
    map (Equiv.prodAssoc α β γ) ((f ×ˢ g) ×ˢ h) = f ×ˢ (g ×ˢ h)

{α : Type u_1}
{β : Type u_2}
{γ : Type u_3}
(f : Filter α)
(g : Filter β)
(h : Filter γ)

Filter.map (⇑(Equiv.prodAssoc α β γ)) ((f ×ˢ g) ×ˢ h) = f ×ˢ g ×ˢ h


/-- Constructor for isomorphisms in `ComposableArrows C 3`. -/
@[simps]
def isoMk₃ {f g : ComposableArrows C 3}
    (app₀ : f.obj' 0 ≅ g.obj' 0) (app₁ : f.obj' 1 ≅ g.obj' 1) (app₂ : f.obj' 2 ≅ g.obj' 2)
    (app₃ : f.obj' 3 ≅ g.obj' 3)
    (w₀ : f.map' 0 1 ≫ app₁.hom = app₀.hom ≫ g.map' 0 1)
    (w₁ : f.map' 1 2 ≫ app₂.hom = app₁.hom ≫ g.map' 1 2)
    (w₂ : f.map' 2 3 ≫ app₃.hom = app₂.hom ≫ g.map' 2 3) : f ≅ g

{f g : CategoryTheory.ComposableArrows C 3}

(w₀ :
  CategoryTheory.CategoryStruct.comp (f.map' 0 1 ⋯ ⋯) app₁.hom =
    CategoryTheory.CategoryStruct.comp app₀.hom (g.map' 0 1 ⋯ ⋯))

(w₁ :
  CategoryTheory.CategoryStruct.comp (f.map' 1 2 ⋯ ⋯) app₂.hom =
    CategoryTheory.CategoryStruct.comp app₁.hom (g.map' 1 2 ⋯ ⋯))

(w₂ :
  CategoryTheory.CategoryStruct.comp (f.map' 2 3 ⋯ ⋯) app₃.hom =
    CategoryTheory.CategoryStruct.comp app₂.hom (g.map' 2 3 ⋯ ⋯))

(CategoryTheory.ComposableArrows.isoMk₃ app₀ app₁ app₂ app₃ w₀ w₁ w₂).hom =
  CategoryTheory.ComposableArrows.homMk₃ app₀.hom app₁.hom app₂.hom app₃.hom w₀ w₁ w₂


@[simp, norm_cast] lemma coe_inf (f g : C(α, β)) : ⇑(f ⊓ g) = ⇑f ⊓ g

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


/-- Being `C^n` is a local property. -/
theorem contMDiffOn_of_locally_contMDiffOn
    (h : ∀ x ∈ s, ∃ u, IsOpen u ∧ x ∈ u ∧ ContMDiffOn I I' n f (s ∩ u)) : ContMDiffOn I I' n f s


@[simp]
theorem coeff_rescale (f : R⟦X⟧) (a : R) (n : ℕ) :
    coeff R n (rescale a f) = a ^ n * coeff R n f

{R : Type u_1}
[CommSemiring R]
(f : PowerSeries R)
(a : R)
(n : ℕ)

(PowerSeries.coeff R n) ((PowerSeries.rescale a) f) = a ^ n * (PowerSeries.coeff R n) f


@[simp, norm_cast] lemma num_natCast (n : ℕ) : num n = n


@[deprecated drop_take_succ_join_eq_getElem' (since := "2024-06-11")]
theorem drop_take_succ_join_eq_get' (L : List (List α)) (i : Fin L.length) :
    (L.join.take (Nat.sum ((L.map length).take (i + 1)))).drop (Nat.sum ((L.map length).take i)) =
      get L i

{α : Type u_1}
(L : List (List α))
(i : Fin L.length)

List.drop (Nat.sum (List.take (↑i) (List.map List.length L)))
    (List.take (Nat.sum (List.take (↑i + 1) (List.map List.length L))) L.join) =
  L.get i


lemma cfc_nonpos (f : R → R) (a : A) (h : ∀ x ∈ spectrum R a, f x ≤ 0) :
    cfc f a ≤ 0

[∀ (α : Type u_1) [inst : TopologicalSpace α], StarOrderedRing C(α, R)]


/-- Two non-unital subsemirings are equal if they have the same elements. -/
@[ext]
theorem ext {S T : NonUnitalSubsemiring R} (h : ∀ x, x ∈ S ↔ x ∈ T) : S = T

{R : Type u}
[NonUnitalNonAssocSemiring R]
{S T : NonUnitalSubsemiring R}
(h : ∀ (x : R), x ∈ S ↔ x ∈ T)


/-- `InfTopHomClass F α β` states that `F` is a type of finitary infimum-preserving morphisms.

You should extend this class when you extend `SupBotHom`. -/
class InfTopHomClass (F α β : Type*) [Inf α] [Inf β] [Top α] [Top β] [FunLike F α β]
  extends InfHomClass F α β : Prop where
  /-- An `InfTopHomClass` morphism preserves the top element. -/
  map_top (f : F) : f ⊤ = ⊤

{F : Type u_7}
{α : Type u_8}
{β : Type u_9}
[Inf α]
[Inf β]
[Top α]
[Top β]
[FunLike F α β]
[self : InfTopHomClass F α β]
(f : F)


@[simp]
theorem ae_eq_set_compl_compl {s t : Set α} : sᶜ =ᵐ[μ] tᶜ ↔ s =ᵐ[μ] t

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


private lemma tens_exact : Function.Exact (lTensorKerIncl I M f) (lTensorf I M f)

{R : Type u}
[CommRing R]
(I : Ideal R)
(M : Type u)
[AddCommGroup M]
[Module R M]
{ι : Type}
(f : (ι → R) →ₗ[R] M)
(hf : Function.Surjective ⇑f)

Function.Exact ⇑(AdicCompletion.lTensorKerIncl I M f) ⇑(AdicCompletion.lTensorf I M f)


theorem explicitCokernelDesc_comp_eq_desc {X Y Z W : SemiNormedGrp.{u}} {f : X ⟶ Y} {g : Y ⟶ Z}
    -- Porting note: renamed `cond` to `cond'` to avoid
    -- failed to rewrite using equation theorems for 'cond'
    {h : Z ⟶ W} {cond' : f ≫ g = 0} :
    explicitCokernelDesc cond' ≫ h =
      explicitCokernelDesc
        (show f ≫ g ≫ h = 0 by rw [← CategoryTheory.Category.assoc, cond', Limits.zero_comp])

{X Y Z W : SemiNormedGrp}
{f : X ⟶ Y}
{g : Y ⟶ Z}
{h : Z ⟶ W}
{cond' : f ≫ g = 0}

SemiNormedGrp.explicitCokernelDesc cond' ≫ h = SemiNormedGrp.explicitCokernelDesc ⋯


@[to_additive]
lemma dite_le_one [LE α] (ha : ∀ h, a h ≤ 1) (hb : ∀ h, b h ≤ 1) : dite p a b ≤ 1

{α : Type u_2}
[One α]
{p : Prop}
[Decidable p]
{a : p → α}
{b : ¬p → α}
[LE α]
(ha : ∀ (h : p), a h ≤ 1)
(hb : ∀ (h : ¬p), b h ≤ 1)


/-- If a function has zero Fréchet derivative at every point of a convex set,
then it is a constant on this set. -/
theorem is_const_of_fderivWithin_eq_zero (hs : Convex ℝ s) (hf : DifferentiableOn 𝕜 f s)
    (hf' : ∀ x ∈ s, fderivWithin 𝕜 f s x = 0) (hx : x ∈ s) (hy : y ∈ s) : f x = f y


protected theorem eq : mk I x = mk I y ↔ x - y ∈ I

{R : Type u}
[CommRing R]
{I : Ideal R}
{x y : R}

(Ideal.Quotient.mk I) x = (Ideal.Quotient.mk I) y ↔ x - y ∈ I


theorem ofBoolUsing_eq_false {p : Prop} {d : Decidable p} (h : toBoolUsing d = false) : ¬ p


/-- **Fundamental theorem of calculus-1**, strict differentiability in the right endpoint.

If `f : ℝ → E` is integrable on `a..b` and `f` is continuous at `b`, then `u ↦ ∫ x in a..u, f x` has
derivative `f b` at `b` in the sense of strict differentiability. -/
theorem integral_hasStrictDerivAt_right (hf : IntervalIntegrable f volume a b)
    (hmeas : StronglyMeasurableAtFilter f (𝓝 b)) (hb : ContinuousAt f b) :
    HasStrictDerivAt (fun u => ∫ x in a..u, f x) (f b) b

(hf : IntervalIntegrable f MeasureTheory.volume a b)

(hmeas : StronglyMeasurableAtFilter f (𝓝 b) MeasureTheory.volume)

HasStrictDerivAt (fun u => ∫ (x : ℝ) in a..u, f x) (f b) b


@[to_additive (attr := simp)]
theorem mulIndicator_inter_mulSupport (s : Set α) (f : α → M) :
    mulIndicator (s ∩ mulSupport f) f = mulIndicator s f

{α : Type u_1}
{M : Type u_4}
[One M]
(s : Set α)
(f : α → M)

(s ∩ Function.mulSupport f).mulIndicator f = s.mulIndicator f


/-- If you actually have an element of `Fin n`, then the `n` is always positive -/
lemma size_positive : Fin n → 0 < n


@[simp]
theorem map_rel (φ : M ↪[L] N) {n : ℕ} (r : L.Relations n) (x : Fin n → M) :
    RelMap r (φ ∘ x) ↔ RelMap r x

{L : FirstOrder.Language}
{M : Type w}
{N : Type w'}
[L.Structure M]
[L.Structure N]
(φ : L.Embedding M N)
{n : ℕ}
(r : L.Relations n)
(x : Fin n → M)

FirstOrder.Language.Structure.RelMap r (⇑φ ∘ x) ↔ FirstOrder.Language.Structure.RelMap r x


theorem sSup_closed_unit_ball_eq_nnnorm {𝕜 𝕜₂ E F : Type*} [NormedAddCommGroup E]
    [SeminormedAddCommGroup F] [DenselyNormedField 𝕜] [NontriviallyNormedField 𝕜₂] {σ₁₂ : 𝕜 →+* 𝕜₂}
    [NormedSpace 𝕜 E] [NormedSpace 𝕜₂ F] [RingHomIsometric σ₁₂] (f : E →SL[σ₁₂] F) :
    sSup ((fun x => ‖f x‖₊) '' closedBall 0 1) = ‖f‖₊

{𝕜 : Type u_11}
{𝕜₂ : Type u_12}
{E : Type u_13}
{F : Type u_14}
[NormedAddCommGroup E]
[SeminormedAddCommGroup F]
[DenselyNormedField 𝕜]
[NontriviallyNormedField 𝕜₂]
{σ₁₂ : 𝕜 →+* 𝕜₂}
[NormedSpace 𝕜 E]
[NormedSpace 𝕜₂ F]
[RingHomIsometric σ₁₂]
(f : E →SL[σ₁₂] F)

sSup ((fun x => ‖f x‖₊) '' Metric.closedBall 0 1) = ‖f‖₊


@[simp] lemma op_one [One α] : op (1 : α) = 1


/-- An encoding of bounded formulas as lists. -/
@[simps]
protected def encoding : Encoding (Σn, L.BoundedFormula α n)

FirstOrder.Language.BoundedFormula.encoding.Γ = ((k : ℕ) × L.Term (α ⊕ Fin k) ⊕ (n : ℕ) × L.Relations n ⊕ ℕ)


@[to_additive]
theorem subset_smul_finset_iff : s ⊆ a • t ↔ a⁻¹ • s ⊆ t

{α : Type u_2}
{β : Type u_3}
[DecidableEq β]
[Group α]
[MulAction α β]
{s t : Finset β}
{a : α}

s ⊆ a • t ↔ a⁻¹ • s ⊆ t


@[to_additive]
theorem CauchySeq.const_mul {ι : Type*} [Preorder ι] {u : ι → α} {x : α} (hu : CauchySeq u) :
    CauchySeq fun n => x * u n

{α : Type u_1}
[UniformSpace α]
[AddGroup α]
[UniformAddGroup α]
{ι : Type u_3}
[Preorder ι]
{u : ι → α}
{x : α}
(hu : CauchySeq u)


/-- The cardinality of the fiber of a coproduct is the sum of the cardinalities of the fibers. -/
lemma card_fiber_coprod_eq_sum (X Y : C) :
    Nat.card (F.obj (X ⨿ Y)) = Nat.card (F.obj X) + Nat.card (F.obj Y)

(F : CategoryTheory.Functor C FintypeCat)

Nat.card ↑(F.obj (X ⨿ Y)) = Nat.card ↑(F.obj X) + Nat.card ↑(F.obj Y)


@[simp]
theorem lift_comp_proj : f.lift ∘ f.discreteQuotient.proj = f

{α : Type u_1}
{X : Type u_2}
[TopologicalSpace X]
(f : LocallyConstant X α)


theorem rotation_eq_matrix_toLin (θ : Real.Angle) {x : V} (hx : x ≠ 0) :
    (o.rotation θ).toLinearMap =
      Matrix.toLin (o.basisRightAngleRotation x hx) (o.basisRightAngleRotation x hx)
        !![θ.cos, -θ.sin; θ.sin, θ.cos]

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

↑(o.rotation θ).toLinearEquiv =
  (Matrix.toLin (o.basisRightAngleRotation x hx) (o.basisRightAngleRotation x hx)) !![θ.cos, -θ.sin; θ.sin, θ.cos]


theorem imageProdLex [PartialOrder α] [Preorder β] {s : Set (α ×ₗ β)}
    (hαβ : s.IsPWO) : ((fun (x : α ×ₗ β) => (ofLex x).1)'' s).IsPWO

{α : Type u_2}
{β : Type u_3}
[PartialOrder α]
[Preorder β]
{s : Set (Lex (α × β))}
(hαβ : s.IsPWO)


lemma analyticWithinOn_univ {f : E → F} :
    AnalyticWithinOn 𝕜 f univ ↔ AnalyticOn 𝕜 f univ

{𝕜 : Type u_2}
[NontriviallyNormedField 𝕜]
{E : Type u_3}
{F : Type u_4}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{f : E → F}

AnalyticWithinOn 𝕜 f Set.univ ↔ AnalyticOn 𝕜 f Set.univ


@[simp]
theorem add_bot (a : WithBot α) : a + ⊥ = ⊥


/-- If every element belongs to at least `n` Finsets, then the sum of their sizes is at least `n`
times how many they are. -/
theorem le_sum_card_inter (h : ∀ a ∈ s, n ≤ (B.filter (a ∈ ·)).card) :
    s.card * n ≤ ∑ t ∈ B, (s ∩ t).card

(h : ∀ a ∈ s, n ≤ (Finset.filter (fun x => a ∈ x) B).card)


@[to_additive add_const]
theorem StrictAnti.mul_const' (hf : StrictAnti f) (c : α) : StrictAnti fun x => f x * c

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


@[simp] theorem coe_comp_of {X Y Z : Type u} [Semiring X] [Semiring Y] [Semiring Z]
    (f : X →+* Y) (g : Y →+* Z) :
    @DFunLike.coe no_index (SemiRingCat.of X ⟶ SemiRingCat.of Z) X
      (fun _ ↦ Z) _
      (CategoryStruct.comp (X := SemiRingCat.of X) (Y := SemiRingCat.of Y) (Z := SemiRingCat.of Z)
        f g) =
    @DFunLike.coe (X →+* Z) X (fun _ ↦ Z) _ (RingHom.comp g f)


theorem maximals_Ioc (hab : a < b) : maximals (· ≤ ·) (Ioc a b) = {b}

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

maximals (fun x x_1 => x ≤ x_1) (Set.Ioc a b) = {b}


@[simp]
theorem arrowCongr_refl : arrowCongr AlgEquiv.refl AlgEquiv.refl = Equiv.refl (A₁ →ₐ[R] A₂)

{R : Type uR}
{A₁ : Type uA₁}
{A₂ : Type uA₂}
[CommSemiring R]
[Semiring A₁]
[Semiring A₂]
[Algebra R A₁]
[Algebra R A₂]

AlgEquiv.refl.arrowCongr AlgEquiv.refl = Equiv.refl (A₁ →ₐ[R] A₂)


@[simp]
theorem reindex_apply (eₘ : m ≃ l) (eₙ : n ≃ o) (M : Matrix m n α) :
    reindex eₘ eₙ M = M.submatrix eₘ.symm eₙ.symm

{l : Type u_1}
{m : Type u_2}
{n : Type u_3}
{o : Type u_4}
{α : Type v}
(eₘ : m ≃ l)
(eₙ : n ≃ o)
(M : Matrix m n α)

(Matrix.reindex eₘ eₙ) M = M.submatrix ⇑eₘ.symm ⇑eₙ.symm


theorem length_mul_le (w₁ w₂ : W) :
    ℓ (w₁ * w₂) ≤ ℓ w₁ + ℓ w₂

{B : Type u_1}
{W : Type u_2}
[Group W]
{M : CoxeterMatrix B}
(cs : CoxeterSystem M W)
(w₁ w₂ : W)

cs.length (w₁ * w₂) ≤ cs.length w₁ + cs.length w₂


@[simp] lemma powMonoidWithZeroHom_apply (a : M₀) : powMonoidWithZeroHom hn a = a ^ n

{M₀ : Type u_6}
[CommMonoidWithZero M₀]
{n : ℕ}
(hn : n ≠ 0)
(a : M₀)


theorem coe_addEquiv_lpPiLp  (f : lp E p) : AddEquiv.lpPiLp f = ⇑f

{α : Type u_1}
{E : α → Type u_2}
[(i : α) → NormedAddCommGroup (E i)]
{p : ℝ≥0∞}
[Finite α]
(f : ↥(lp E p))


theorem eq_maximalIdeal {I : Ideal R} (hI : I.IsMaximal) : I = maximalIdeal R

{R : Type u_1}
[CommSemiring R]
[LocalRing R]
{I : Ideal R}
(hI : I.IsMaximal)


/-- The isomorphism `(Γ₀.splitting K).nondegComplex ≅ K` for all `K : ChainComplex C ℕ`. -/
@[simps!]
def Γ₀NondegComplexIso (K : ChainComplex C ℕ) : (Γ₀.splitting K).nondegComplex ≅ K

(AlgebraicTopology.DoldKan.Γ₀NondegComplexIso K).inv.f i = 𝟙 ((AlgebraicTopology.DoldKan.Γ₀.splitting K).N i)


/-- Make a `SmoothVectorBundle` from a `SmoothVectorPrebundle`. -/
theorem smoothVectorBundle : @SmoothVectorBundle
    _ _ F E _ _ _ _ _ _ IB _ _ _ _ _ _ a.totalSpaceTopology _ a.toFiberBundle a.toVectorBundle

{𝕜 : Type u_1}
{B : Type u_2}
{F : Type u_4}
{E : B → Type u_6}
[NontriviallyNormedField 𝕜]
{EB : Type u_7}
[NormedAddCommGroup EB]
[NormedSpace 𝕜 EB]
{HB : Type u_8}
[TopologicalSpace HB]
(IB : ModelWithCorners 𝕜 EB HB)
[TopologicalSpace B]
[ChartedSpace HB B]
[(x : B) → AddCommMonoid (E x)]
[(x : B) → Module 𝕜 (E x)]
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
[(x : B) → TopologicalSpace (E x)]
(a : VectorPrebundle 𝕜 F E)
[ha : VectorPrebundle.IsSmooth IB a]


@[reassoc, simp]
theorem neg_comp : (-f) ≫ g = -f ≫ g

{C : Type u}
[CategoryTheory.Category.{v, u} C]
[CategoryTheory.Preadditive C]
{P Q R : C}
(f : P ⟶ Q)
(g : Q ⟶ R)


@[to_additive (attr := simp)]
theorem mem_comap {S : Subsemigroup N} {f : M →ₙ* N} {x : M} : x ∈ S.comap f ↔ f x ∈ S

{M : Type u_1}
{N : Type u_2}
[Add M]
[Add N]
{S : AddSubsemigroup N}
{f : AddHom M N}
{x : M}


theorem stdBasis_eq_stdBasisMatrix (i : m) (j : n) [DecidableEq m] [DecidableEq n] :
    stdBasis R m n (i, j) = stdBasisMatrix i j (1 : R)

(R : Type u_1)
{m : Type u_2}
{n : Type u_3}
[Fintype m]
[Finite n]
[Semiring R]
(i : m)
(j : n)
[DecidableEq m]
[DecidableEq n]

(Matrix.stdBasis R m n) (i, j) = Matrix.stdBasisMatrix i j 1


/-- Surjective monoid homomorphisms constant on a congruence relation `c`'s equivalence classes
    induce a surjective homomorphism on `c`'s quotient. -/
@[to_additive "Surjective `AddMonoid` homomorphisms constant on an additive congruence
relation `c`'s equivalence classes induce a surjective homomorphism on `c`'s quotient."]
theorem lift_surjective_of_surjective (h : c ≤ ker f) (hf : Surjective f) :
    Surjective (c.lift f h)

{M : Type u_1}
{P : Type u_3}
[MulOneClass M]
[MulOneClass P]
{c : Con M}
{f : M →* P}
(h : c ≤ Con.ker f)
(hf : Function.Surjective ⇑f)


theorem IsNormal.limit_le {f} (H : IsNormal f) :
    ∀ {o}, IsLimit o → ∀ {a}, f o ≤ a ↔ ∀ b < o, f b ≤ a

{f : Ordinal.{u_4} → Ordinal.{u_5}}
(H : Ordinal.IsNormal f)
{o : Ordinal.{u_4}}

o.IsLimit → ∀ {a : Ordinal.{u_5}}, f o ≤ a ↔ ∀ b < o, f b ≤ a


@[ext]
theorem ext {σ τ : p.Gal} (h : ∀ x ∈ p.rootSet p.SplittingField, σ x = τ x) : σ = τ


theorem LinearMap.bound_of_sphere_bound {r : ℝ} (r_pos : 0 < r) (c : ℝ) (f : E →ₗ[𝕜] 𝕜)
    (h : ∀ z ∈ sphere (0 : E) r, ‖f z‖ ≤ c) (z : E) : ‖f z‖ ≤ c / r * ‖z‖

(h : ∀ z ∈ Metric.sphere 0 r, ‖f z‖ ≤ c)


theorem Filter.HasBasis.hasBasis_of_denseInducing [TopologicalSpace α] [TopologicalSpace β]
    [T3Space β] {ι : Type*} {s : ι → Set α} {p : ι → Prop} {x : α} (h : (𝓝 x).HasBasis p s)
    {f : α → β} (hf : DenseInducing f) : (𝓝 (f x)).HasBasis p fun i => closure <| f '' s i

{α : Type u_1}
{β : Type u_2}
[TopologicalSpace α]
[TopologicalSpace β]
[T3Space β]
{ι : Type u_5}
{s : ι → Set α}
{p : ι → Prop}
{x : α}
(h : (𝓝 x).HasBasis p s)
{f : α → β}
(hf : DenseInducing f)

(𝓝 (f x)).HasBasis p fun i => closure (f '' s i)


lemma triangleRemovalBound_mul_cube_lt (hε : 0 < ε) :
    triangleRemovalBound ε * ⌈4 / ε⌉₊ ^ 3 < 1

SimpleGraph.triangleRemovalBound ε * ↑⌈4 / ε⌉₊ ^ 3 < 1


/-- If two locally integrable functions on a finite-dimensional real vector space have the same
integral when multiplied by any smooth compactly supported function, then they coincide almost
everywhere. -/
theorem ae_eq_of_integral_contDiff_smul_eq
    (hf : LocallyIntegrable f μ) (hf' : LocallyIntegrable f' μ) (h : ∀ (g : E → ℝ),
      ContDiff ℝ ⊤ g → HasCompactSupport g → ∫ x, g x • f x ∂μ = ∫ x, g x • f' x ∂μ) :
    ∀ᵐ x ∂μ, f x = f' x

(hf : MeasureTheory.LocallyIntegrable f μ)

(hf' : MeasureTheory.LocallyIntegrable f' μ)

(h : ∀ (g : E → ℝ), ContDiff ℝ ⊤ g → HasCompactSupport g → ∫ (x : E), g x • f x ∂μ = ∫ (x : E), g x • f' x ∂μ)


/-- Compactness criterion: a closed set of compact metric spaces is compact if the spaces have
a uniformly bounded diameter, and for all `ε` the number of balls of radius `ε` required
to cover the spaces is uniformly bounded. This is an equivalence, but we only prove the
interesting direction that these conditions imply compactness. -/
theorem totallyBounded {t : Set GHSpace} {C : ℝ} {u : ℕ → ℝ} {K : ℕ → ℕ}
    (ulim : Tendsto u atTop (𝓝 0)) (hdiam : ∀ p ∈ t, diam (univ : Set (GHSpace.Rep p)) ≤ C)
    (hcov : ∀ p ∈ t, ∀ n : ℕ, ∃ s : Set (GHSpace.Rep p),
      (#s) ≤ K n ∧ univ ⊆ ⋃ x ∈ s, ball x (u n)) :
    TotallyBounded t

(ulim : Filter.Tendsto u Filter.atTop (𝓝 0))

(hdiam : ∀ p ∈ t, Metric.diam Set.univ ≤ C)

(hcov : ∀ p ∈ t, ∀ (n : ℕ), ∃ s, #↑s ≤ ↑(K n) ∧ Set.univ ⊆ ⋃ x ∈ s, Metric.ball x (u n))


theorem support_update_zero (p : R[X]) (n : ℕ) : support (p.update n 0) = p.support.erase n

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

(p.update n 0).support = p.support.erase n


/-- The object in the category of `R`-Hopf algebras associated to an `R`-Hopf algebra. -/
@[simps]
def of (X : Type v) [Ring X] [HopfAlgebra R X] :
    HopfAlgebraCat R

(R : Type u)
[CommRing R]
(X : Type v)
[Ring X]
[HopfAlgebra R X]

(HopfAlgebraCat.of R X).instHopfAlgebra = inferInstance


@[local simp]
private theorem adicCompletionAux_val_apply (f : M →ₗ[R] N) {n : ℕ} (x : AdicCompletion I M) :
    (adicCompletionAux I f x).val n = f.reduceModIdeal (I ^ n) (x.val n)

{R : Type u_1}
[CommRing R]
(I : Ideal R)
{M : Type u_2}
[AddCommGroup M]
[Module R M]
{N : Type u_3}
[AddCommGroup N]
[Module R N]
(f : M →ₗ[R] N)
{n : ℕ}
(x : AdicCompletion I M)

↑((AdicCompletion.adicCompletionAux I f) x) n = (LinearMap.reduceModIdeal (I ^ n) f) (↑x n)


protected theorem Subsingleton.antitoneOn (h : s.Subsingleton) : AntitoneOn f s

{α : Type u}
{β : Type v}
{s : Set α}
[Preorder α]
[Preorder β]
(f : α → β)
(h : s.Subsingleton)


@[simp] theorem minimum?_replicate_of_pos [Min α] {n : Nat} {a : α} (w : min a a = a) (h : 0 < n) :
    (replicate n a).minimum? = some a

{α : Type u_1}
[Min α]
{n : Nat}
{a : α}
(w : min a a = a)
(h : 0 < n)


theorem pmap_congr {p q : α → Prop} {f : ∀ a, p a → β} {g : ∀ a, q a → β} (s : Multiset α) :
    ∀ {H₁ H₂}, (∀ a ∈ s, ∀ (h₁ h₂), f a h₁ = g a h₂) → pmap f s H₁ = pmap g s H₂

{α : Type u_1}
{β : Type v}
{p q : α → Prop}
{f : (a : α) → p a → β}
{g : (a : α) → q a → β}
(s : Multiset α)
{H₁ : ∀ a ∈ s, p a}
{H₂ : ∀ a ∈ s, q a}

(∀ a ∈ s, ∀ (h₁ : p a) (h₂ : q a), f a h₁ = g a h₂) → Multiset.pmap f s H₁ = Multiset.pmap g s H₂


theorem Context.evalList_sort (ctx : Context α) (h : ContextInformation.isComm ctx) (e : List Nat) : evalList α ctx (sort e) = evalList α ctx e

(h : Lean.Data.AC.ContextInformation.isComm ctx = true)

Lean.Data.AC.evalList α ctx (Lean.Data.AC.sort e) = Lean.Data.AC.evalList α ctx e


theorem mem_of_eq_bot {f : Filter α} {s : Set α} (h : f ⊓ 𝓟 sᶜ = ⊥) : s ∈ f

{α : Type u}
{f : Filter α}
{s : Set α}
(h : f ⊓ 𝓟 sᶜ = ⊥)


theorem prod_def {f : Filter α} {g : Filter β} :
    f ×ˢ g = f.lift fun s => g.lift' fun t => s ×ˢ t

{α : Type u_1}
{β : Type u_2}
{f : Filter α}
{g : Filter β}


/-- Recursive definition for the Cantor normal form. -/
theorem CNF_ne_zero {b o : Ordinal} (ho : o ≠ 0) :
    CNF b o = (log b o, o / b ^ log b o)::CNF b (o % b ^ log b o)

Ordinal.CNF b o = (Ordinal.log b o, o / b ^ Ordinal.log b o) :: Ordinal.CNF b (o % b ^ Ordinal.log b o)


@[reassoc (attr := simp)]
lemma Fork.IsLimit.lift_ι' {s : Fork f g} (hs : IsLimit s) {W : C} (k : W ⟶ X) (h : k ≫ f = k ≫ g) :
    Fork.IsLimit.lift hs k h ≫ Fork.ι s = k

(h : CategoryTheory.CategoryStruct.comp k f = CategoryTheory.CategoryStruct.comp k g)

CategoryTheory.CategoryStruct.comp (CategoryTheory.Limits.Fork.IsLimit.lift hs k h) s.ι = k


@[simp]
theorem tendsto_const_nhds_iff [T1Space X] {l : Filter Y} [NeBot l] {c d : X} :
    Tendsto (fun _ => c) l (𝓝 d) ↔ c = d

{X : Type u_1}
{Y : Type u_2}
[TopologicalSpace X]
[T1Space X]
{l : Filter Y}
[l.NeBot]
{c d : X}

Filter.Tendsto (fun x => c) l (𝓝 d) ↔ c = d


theorem LinearMap.toMatrix_reindexRange [DecidableEq M₁] (f : M₁ →ₗ[R] M₂) (k : m) (i : n) :
    LinearMap.toMatrix v₁.reindexRange v₂.reindexRange f ⟨v₂ k, Set.mem_range_self k⟩
        ⟨v₁ i, Set.mem_range_self i⟩ =
      LinearMap.toMatrix v₁ v₂ f k i

{R : Type u_1}
[CommSemiring R]
{m : Type u_3}
{n : Type u_4}
[Fintype n]
[Finite m]
[DecidableEq n]
{M₁ : Type u_5}
{M₂ : Type u_6}
[AddCommMonoid M₁]
[AddCommMonoid M₂]
[Module R M₁]
[Module R M₂]
(v₁ : Basis n R M₁)
(v₂ : Basis m R M₂)
[DecidableEq M₁]
(f : M₁ →ₗ[R] M₂)
(k : m)
(i : n)

(LinearMap.toMatrix v₁.reindexRange v₂.reindexRange) f ⟨v₂ k, ⋯⟩ ⟨v₁ i, ⋯⟩ = (LinearMap.toMatrix v₁ v₂) f k i


@[to_additive]
protected theorem inj_left [Mul α] [IsSymmOp α α (· * ·)] [PartialOrder α] {a b c : α}
    (hc : MulLECancellable c) :
    a * c = b * c ↔ a = b

{α : Type u_1}
[Add α]
[IsSymmOp α α fun x x_1 => x + x_1]
[PartialOrder α]
{a b c : α}
(hc : AddLECancellable c)


theorem usize_size_gt_zero : USize.size > 0


@[to_additive sum_nonneg]
theorem one_le_prod' (h : ∀ i ∈ s, 1 ≤ f i) : 1 ≤ ∏ i ∈ s, f i

{ι : Type u_1}
{N : Type u_5}
[OrderedAddCommMonoid N]
{f : ι → N}
{s : Finset ι}
(h : ∀ i ∈ s, 0 ≤ f i)


theorem supDegree_single (a : A) (r : R) :
    (single a r).supDegree D = if r = 0 then ⊥ else D a

{R : Type u_1}
{A : Type u_3}
{B : Type u_5}
[Semiring R]
[SemilatticeSup B]
[OrderBot B]
{D : A → B}
(a : A)
(r : R)

AddMonoidAlgebra.supDegree D (AddMonoidAlgebra.single a r) = if r = 0 then ⊥ else D a


@[simp]
theorem SlashAction.neg_slash {β G α γ : Type*} [Group G] [AddGroup α] [SMul γ α]
    [SlashAction β G α γ] (k : β) (g : G) (a : α) : (-a) ∣[k;γ] g = -a ∣[k;γ] g

{β : Type u_1}
{G : Type u_2}
{α : Type u_3}
{γ : Type u_4}
[Group G]
[AddGroup α]
[SMul γ α]
[SlashAction β G α γ]
(k : β)
(g : G)
(a : α)


theorem lintegral_le_of_lmarginal_le [Fintype δ] (s : Finset δ) {f g : (∀ i, π i) → ℝ≥0∞}
    (hf : Measurable f) (hg : Measurable g) (hfg : ∫⋯∫⁻_s, f ∂μ ≤ ∫⋯∫⁻_s, g ∂μ) :
    ∫⁻ x, f x ∂Measure.pi μ ≤ ∫⁻ x, g x ∂Measure.pi μ

{μ : (i : δ) → MeasureTheory.Measure (π i)}

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

∫⁻ (x : (i : δ) → π i), f x ∂MeasureTheory.Measure.pi μ ≤ ∫⁻ (x : (i : δ) → π i), g x ∂MeasureTheory.Measure.pi μ


@[simp]
theorem sumInl_toMatrix_prod_mul [Fintype n] [Fintype p] (M : Matrix n n R)
    (L : List (TransvectionStruct n R)) (N : Matrix p p R) :
    (L.map (toMatrix ∘ sumInl p)).prod * fromBlocks M 0 0 N =
      fromBlocks ((L.map toMatrix).prod * M) 0 0 N

(L : List (Matrix.TransvectionStruct n R))

(List.map (Matrix.TransvectionStruct.toMatrix ∘ Matrix.TransvectionStruct.sumInl p) L).prod *
    Matrix.fromBlocks M 0 0 N =
  Matrix.fromBlocks ((List.map Matrix.TransvectionStruct.toMatrix L).prod * M) 0 0 N


@[simp] lemma isUpperSet_toUpperSet_preimage {s : Set (WithUpperSet α)} :
    IsUpperSet (toUpperSet ⁻¹' s) ↔ IsOpen s

{α : Type u_1}
[Preorder α]
{s : Set (Topology.WithUpperSet α)}

IsUpperSet (⇑Topology.WithUpperSet.toUpperSet ⁻¹' s) ↔ IsOpen s


@[simp]
lemma roots_neg (p : R[X]) : (-p).roots = p.roots

{R : Type u}
[CommRing R]
[IsDomain R]
(p : Polynomial R)


theorem isSublist_iff_sublist [BEq α] [LawfulBEq α] {l₁ l₂ : List α} :
    l₁.isSublist l₂ ↔ l₁ <+ l₂

{α : Type u_1}
[BEq α]
[LawfulBEq α]
{l₁ l₂ : List α}


@[to_additive]
theorem mul_iff_left [CommGroup β] [TopologicalGroup β] (hf : StronglyMeasurable f) :
    StronglyMeasurable (g * f) ↔ StronglyMeasurable g

(hf : MeasureTheory.StronglyMeasurable f)

MeasureTheory.StronglyMeasurable (g + f) ↔ MeasureTheory.StronglyMeasurable g


theorem Algebra.adjoin_int {R : Type*} [Ring R] (s : Set R) :
    adjoin ℤ s = subalgebraOfSubring (Subring.closure s)

Algebra.adjoin ℤ s = subalgebraOfSubring (Subring.closure s)


theorem IsConformalMap.preserves_angle {f' : E →L[ℝ] F} (h : IsConformalMap f') (u v : E) :
    angle (f' u) (f' v) = angle u v

{E : Type u_1}
{F : Type u_2}
[NormedAddCommGroup E]
[NormedAddCommGroup F]
[InnerProductSpace ℝ E]
[InnerProductSpace ℝ F]
{f' : E →L[ℝ] F}
(h : IsConformalMap f')
(u v : E)

InnerProductGeometry.angle (f' u) (f' v) = InnerProductGeometry.angle u v


@[simp]
theorem iterate_derivative_map [Semiring S] (p : R[X]) (f : R →+* S) (k : ℕ) :
    Polynomial.derivative^[k] (p.map f) = (Polynomial.derivative^[k] p).map f

{R : Type u}
{S : Type v}
[Semiring R]
[Semiring S]
(p : R[X])
(f : R →+* S)
(k : ℕ)

(⇑Polynomial.derivative)^[k] (Polynomial.map f p) = Polynomial.map f ((⇑Polynomial.derivative)^[k] p)


@[simp]
theorem LocalizationMap.sec_zero_fst {f : LocalizationMap S N} : f.toMap (f.sec 0).fst = 0

{M : Type u_1}
[CommMonoidWithZero M]
{S : Submonoid M}
{N : Type u_2}
[CommMonoidWithZero N]
{f : S.LocalizationMap N}


theorem trinomial_def : trinomial k m n u v w = C u * X ^ k + C v * X ^ m + C w * X ^ n

{R : Type u_1}
[Semiring R]
(k m n : ℕ)
(u v w : R)

Polynomial.trinomial k m n u v w =
  Polynomial.C u * Polynomial.X ^ k + Polynomial.C v * Polynomial.X ^ m + Polynomial.C w * Polynomial.X ^ n


theorem not_mem_keys {a} {l : List (Sigma β)} : a ∉ l.keys ↔ ∀ b : β a, Sigma.mk a b ∉ l

{α : Type u}
{β : α → Type v}
{a : α}
{l : List (Sigma β)}


theorem wellFoundedLT_of_chainHeight_ne_top (s : Set α) (hs : s.chainHeight ≠ ⊤) :
    WellFoundedLT s

{α : Type u_1}
[Preorder α]
(s : Set α)
(hs : s.chainHeight ≠ ⊤)


theorem some_index (x : α) : hs.setoid.Rel (hs.some (hs.index x)) x

{ι : Type u_1}
{α : Type u_2}
{s : ι → Set α}
(hs : IndexedPartition s)
(x : α)


@[simp]
theorem monovary_id_iff : Monovary f id ↔ Monotone f

{ι : Type u_1}
{α : Type u_3}
[Preorder α]
{f : ι → α}
[PartialOrder ι]


/--The injection into the free product of any `1 : A i` is the 1 of the free product.-/
theorem identify_one (i : I) : ι' R A (DirectSum.lof R I A i 1) = 1

{I : Type u}
[DecidableEq I]
(R : Type v)
[CommSemiring R]
(A : I → Type w)
[(i : I) → Semiring (A i)]
[(i : I) → Algebra R (A i)]
(i : I)

(LinearAlgebra.FreeProduct.ι' R A) ((DirectSum.lof R I A i) 1) = 1


@[to_additive]
theorem smul_def (f : α → β → β) (l : FreeMonoid α) (b : β) :
    haveI := mkMulAction f
    l • b = l.toList.foldr f b

{α : Type u_1}
{β : Type u_2}
(f : α → β → β)
(l : FreeMonoid α)
(b : β)

l • b = List.foldr f b (FreeMonoid.toList l)


/-- The oriented angle between two vectors is zero if and only if the angle with the vectors
swapped is zero. -/
theorem oangle_eq_zero_iff_oangle_rev_eq_zero {x y : V} : o.oangle x y = 0 ↔ o.oangle y x = 0

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


/-- Multiplication `y ↦ x * y` as an `IsometryEquiv`. -/
@[to_additive (attr := simps! apply toEquiv) "Addition `y ↦ x + y` as an `IsometryEquiv`."]
def mulLeft [IsometricSMul G G] (c : G) : G ≃ᵢ G

{G : Type v}
[Group G]
[PseudoEMetricSpace G]
[IsometricSMul G G]
(c : G)

(IsometryEquiv.mulLeft c).toEquiv = Equiv.mulLeft c


theorem omegaLimit_iUnion (p : ι → Set α) : ⋃ i, ω f ϕ (p i) ⊆ ω f ϕ (⋃ i, p i)

{τ : Type u_1}
{α : Type u_2}
{β : Type u_3}
{ι : Type u_4}
[TopologicalSpace β]
(f : Filter τ)
(ϕ : τ → α → β)
(p : ι → Set α)

⋃ i, omegaLimit f ϕ (p i) ⊆ omegaLimit f ϕ (⋃ i, p i)


/-- TODO: prove this in greater generality. -/
@[simp]
theorem rank_transpose (A : Matrix m n R) : Aᵀ.rank = A.rank

{m : Type u_2}
{n : Type u_3}
{R : Type u_5}
[Fintype n]
[Fintype m]
[LinearOrderedField R]
(A : Matrix m n R)


/-- `SameRay` follows from membership of `MulAction.orbit` for the `Units.posSubgroup`. -/
theorem sameRay_of_mem_orbit {v₁ v₂ : M} (h : v₁ ∈ MulAction.orbit ↥(Units.posSubgroup R) v₂) :
    SameRay R v₁ v₂

(h : v₁ ∈ MulAction.orbit (↥(Units.posSubgroup R)) v₂)


@[to_additive]
theorem prod_coe_sort_eq_attach (f : s → β) : ∏ i : s, f i = ∏ i ∈ s.attach, f i

{α : Type u_3}
{β : Type u_4}
(s : Finset α)
[CommMonoid β]
(f : { x // x ∈ s } → β)

∏ i : { x // x ∈ s }, f i = ∏ i ∈ s.attach, f i


/-- A relation is well-founded iff it doesn't have any infinite decreasing sequence. -/
theorem wellFounded_iff_no_descending_seq :
    WellFounded r ↔ IsEmpty (((· > ·) : ℕ → ℕ → Prop) ↪r r)

{α : Type u_1}
{r : α → α → Prop}
[IsStrictOrder α r]

WellFounded r ↔ IsEmpty ((fun x x_1 => x > x_1) ↪r r)


theorem quasiCompact_iff_spectral : QuasiCompact f ↔ IsSpectralMap f.1.base

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

AlgebraicGeometry.QuasiCompact f ↔ IsSpectralMap ⇑f.val.base


@[to_additive mem_own_rightAddCoset]
theorem mem_own_rightCoset (a : α) : a ∈ op a • (s : Set α)

{α : Type u_1}
[AddMonoid α]
(s : AddSubmonoid α)
(a : α)


theorem insert_subset_iff : insert a s ⊆ t ↔ a ∈ t ∧ s ⊆ t

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


@[simp]
theorem expand_aeval {A : Type*} [Semiring A] [Algebra R A] (p : ℕ) (P : R[X]) (r : A) :
    aeval r (expand R p P) = aeval (r ^ p) P

{R : Type u}
[CommSemiring R]
{A : Type u_1}
[Semiring A]
[Algebra R A]
(p : ℕ)
(P : R[X])
(r : A)

(Polynomial.aeval r) ((Polynomial.expand R p) P) = (Polynomial.aeval (r ^ p)) P


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

[IsDirected ι' (Function.swap fun x x_1 => x ≤ x_1)]


@[simp] theorem getRight_eq_iff (h : x.isRight) : x.getRight h = b ↔ x = inr b

∀ {β : Type u_1} {b : β} {α : Type u_2} {x : α ⊕ β} (h : x.isRight = true), x.getRight h = b ↔ x = Sum.inr b


/-- The Galois connection between fixing subgroups and fixed points of a group action -/
theorem fixingSubgroup_fixedPoints_gc :
    GaloisConnection (OrderDual.toDual ∘ fixingSubgroup M)
      ((fun P : Subgroup M => fixedPoints P α) ∘ OrderDual.ofDual)

(M : Type u_1)
(α : Type u_2)
[Group M]
[MulAction M α]

GaloisConnection (⇑OrderDual.toDual ∘ fixingSubgroup M) ((fun P => MulAction.fixedPoints (↥P) α) ∘ ⇑OrderDual.ofDual)


theorem angle_smul_smul {c : ℝ} (hc : c ≠ 0) (x y : V) : angle (c • x) (c • y) = angle x y

{V : Type u_1}
[NormedAddCommGroup V]
[InnerProductSpace ℝ V]
{c : ℝ}
(hc : c ≠ 0)
(x y : V)

InnerProductGeometry.angle (c • x) (c • y) = InnerProductGeometry.angle x y


@[simp]
theorem bot_boxes : (⊥ : Prepartition I).boxes = ∅


theorem exists_dist_lt_lt (hδ : 0 < δ) (hε : 0 < ε) (h : dist x z < ε + δ) :
    ∃ y, dist x y < δ ∧ dist y z < ε

{E : Type u_2}
[SeminormedAddCommGroup E]
[NormedSpace ℝ E]
{x z : E}
{δ ε : ℝ}
(hδ : 0 < δ)
(hε : 0 < ε)
(h : dist x z < ε + δ)


theorem derivWithin_inv' (hc : DifferentiableWithinAt 𝕜 c s x) (hx : c x ≠ 0)
    (hxs : UniqueDiffWithinAt 𝕜 s x) :
    derivWithin (fun x => (c x)⁻¹) s x = -derivWithin c s x / c x ^ 2

{𝕜 : Type u}
[NontriviallyNormedField 𝕜]
{x : 𝕜}
{s : Set 𝕜}
{c : 𝕜 → 𝕜}
(hc : DifferentiableWithinAt 𝕜 c s x)
(hx : c x ≠ 0)
(hxs : UniqueDiffWithinAt 𝕜 s x)


theorem noetherianSpace_of_surjective [NoetherianSpace α] (f : α → β) (hf : Continuous f)
    (hf' : Function.Surjective f) : NoetherianSpace β

{α : Type u_1}
{β : Type u_2}
[TopologicalSpace α]
[TopologicalSpace β]
[TopologicalSpace.NoetherianSpace α]
(f : α → β)
(hf : Continuous f)
(hf' : Function.Surjective f)


theorem neg_add {R} [Ring R] {a₁ a₂ b₁ b₂ : R}
    (_ : -a₁ = b₁) (_ : -a₂ = b₂) : -(a₁ + a₂) = b₁ + b₂

{R : Type u_2}
[Ring R]
{a₁ a₂ b₁ b₂ : R}

-a₁ = b₁ → -a₂ = b₂ → -(a₁ + a₂) = b₁ + b₂


theorem uniq_cone_morphism {s t : Cone F} (h : IsLimit t) {f f' : s ⟶ t} : f = f'

{J : Type u₁}
[CategoryTheory.Category.{v₁, u₁} J]
{C : Type u₃}
[CategoryTheory.Category.{v₃, u₃} C]
{F : J ⥤ C}
{s t : CategoryTheory.Limits.Cone F}
(h : CategoryTheory.Limits.IsLimit t)
{f f' : s ⟶ t}


@[simp]
theorem map₂_snoc : map₂ f (xs.snoc x) (ys.snoc y) = (map₂ f xs ys).snoc (f x y)

{α : Type u_2}
{n : ℕ}
{β : Type u_3}
(xs : Mathlib.Vector α n)
(ys : Mathlib.Vector β n)

∀ {α_1 : Type u_1} {f : α → β → α_1} {x : α} {y : β},
  Mathlib.Vector.map₂ f (xs.snoc x) (ys.snoc y) = (Mathlib.Vector.map₂ f xs ys).snoc (f x y)


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

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

⇑e ⁻¹' Set.Icc a b = Set.Icc (e.symm a) (e.symm b)


theorem lookup_replicate_self {a : α} :
    (replicate n (a, b)).lookup a = if n = 0 then none else some b

{α : Type u_2}
[BEq α]
[LawfulBEq α]
{n : Nat}

∀ {α_1 : Type u_1} {b : α_1} {a : α}, List.lookup a (List.replicate n (a, b)) = if n = 0 then none else some b


/-- The product of a Liouville number and a nonzero rational number is again a Liouville number.  -/
theorem mul_rat (h : LiouvilleWith p x) (hr : r ≠ 0) : LiouvilleWith p (x * r)

{p x : ℝ}
{r : ℚ}
(h : LiouvilleWith p x)
(hr : r ≠ 0)


@[to_additive (attr := simp)]
theorem unit_one (h : IsUnit (1 : M)) : h.unit = 1

{M : Type u_1}
[Monoid M]
(h : IsUnit 1)


theorem eqOn_Ioc_of_ae_eq [DenselyOrdered X] {a b : X} {f g : X → Y}
    (hfg : f =ᵐ[μ.restrict (Ioc a b)] g) (hf : ContinuousOn f (Ioc a b))
    (hg : ContinuousOn g (Ioc a b)) : EqOn f g (Ioc a b)

(hfg : f =ᵐ[μ.restrict (Set.Ioc a b)] g)


/-- In a space with an inner regular measure for finite measure sets, any measurable set of finite
measure coincides almost everywhere with its everywhere positive subset. -/
lemma everywherePosSubset_ae_eq_of_measure_ne_top
    [OpensMeasurableSpace α] [InnerRegularCompactLTTop μ] (hs : MeasurableSet s) (h's : μ s ≠ ∞) :
    μ.everywherePosSubset s =ᵐ[μ] s

{α : Type u_1}
[TopologicalSpace α]
[MeasurableSpace α]
{μ : MeasureTheory.Measure α}
{s : Set α}
[OpensMeasurableSpace α]
[μ.InnerRegularCompactLTTop]
(hs : MeasurableSet s)
(h's : μ s ≠ ⊤)


theorem isGLB_pair [SemilatticeInf γ] {a b : γ} : IsGLB {a, b} (a ⊓ b)

{γ : Type w}
[SemilatticeInf γ]
{a b : γ}


theorem Filter.EventuallyEq.hasGradientAtFilter_iff (h₀ : f₀ =ᶠ[L] f₁) (hx : f₀ x = f₁ x)
    (h₁ : f₀' = f₁') : HasGradientAtFilter f₀ f₀' x L ↔ HasGradientAtFilter f₁ f₁' x L

{𝕜 : Type u_1}
{F : Type u_2}
[RCLike 𝕜]
[NormedAddCommGroup F]
[InnerProductSpace 𝕜 F]
[CompleteSpace F]
{x : F}
{L : Filter F}
{f₀ f₁ : F → 𝕜}
{f₀' f₁' : F}
(h₀ : f₀ =ᶠ[L] f₁)
(hx : f₀ x = f₁ x)
(h₁ : f₀' = f₁')


/-- Reinterpret `Additive α →+ β` as `α →* Multiplicative β`. -/
@[simps]
def AddMonoidHom.toMultiplicative' [MulOneClass α] [AddZeroClass β] :
    (Additive α →+ β) ≃ (α →* Multiplicative β)

{α : Type u}
{β : Type v}
[MulOneClass α]
[AddZeroClass β]
(f : α →* Multiplicative β)
(a : Additive α)

(AddMonoidHom.toMultiplicative'.symm f) a = Multiplicative.toAdd (f (Additive.toMul a))


/-- Given a colimit cocone over `F ⋙ G` we can construct a colimit cocone over `G`. -/
@[simps]
def colimitCoconeOfComp (t : ColimitCocone (F ⋙ G)) : ColimitCocone G

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

(CategoryTheory.Functor.Final.colimitCoconeOfComp F t).isColimit =
  (CategoryTheory.Functor.Final.isColimitExtendCoconeEquiv F t.cocone).symm t.isColimit


@[norm_cast]
theorem coe_add' (f g : M₁ →SL[σ₁₂] M₂) : ⇑(f + g) = f + g

{R₁ : Type u_1}
{R₂ : Type u_2}
[Semiring R₁]
[Semiring R₂]
{σ₁₂ : R₁ →+* R₂}
{M₁ : Type u_4}
[TopologicalSpace M₁]
[AddCommMonoid M₁]
{M₂ : Type u_6}
[TopologicalSpace M₂]
[AddCommMonoid M₂]
[Module R₁ M₁]
[Module R₂ M₂]
[ContinuousAdd M₂]
(f g : M₁ →SL[σ₁₂] M₂)


/-- The uniform norm of the Fourier integral of `f` is bounded by the `L¹` norm of `f`. -/
theorem norm_fourierIntegral_le_integral_norm (e : AddChar 𝕜 𝕊) (μ : Measure V)
    (L : V →ₗ[𝕜] W →ₗ[𝕜] 𝕜) (f : V → E) (w : W) :
    ‖fourierIntegral e μ L f w‖ ≤ ∫ v : V, ‖f v‖ ∂μ

{𝕜 : Type u_1}
[CommRing 𝕜]
{V : Type u_2}
[AddCommGroup V]
[Module 𝕜 V]
[MeasurableSpace V]
{W : Type u_3}
[AddCommGroup W]
[Module 𝕜 W]
{E : Type u_4}
[NormedAddCommGroup E]
[NormedSpace ℂ E]
(e : AddChar 𝕜 ↥𝕊)
(μ : MeasureTheory.Measure V)
(L : V →ₗ[𝕜] W →ₗ[𝕜] 𝕜)
(f : V → E)
(w : W)

‖VectorFourier.fourierIntegral e μ L f w‖ ≤ ∫ (v : V), ‖f v‖ ∂μ


theorem toReal_div (a b : ℝ≥0∞) : (a / b).toReal = a.toReal / b.toReal


/-- The range of a surjective monoid homomorphism is the whole of the codomain. -/
@[to_additive (attr := simp)
  "The range of a surjective `AddMonoid` homomorphism is the whole of the codomain."]
theorem range_top_of_surjective {N} [Group N] (f : G →* N) (hf : Function.Surjective f) :
    f.range = (⊤ : Subgroup N)

{G : Type u_1}
[AddGroup G]
{N : Type u_7}
[AddGroup N]
(f : G →+ N)
(hf : Function.Surjective ⇑f)


@[measurability]
theorem ContinuousMap.measurable (f : C(α, γ)) : Measurable f

{α : Type u_1}
{γ : Type u_3}
[TopologicalSpace α]
[MeasurableSpace α]
[OpensMeasurableSpace α]
[TopologicalSpace γ]
[MeasurableSpace γ]
[BorelSpace γ]
(f : C(α, γ))


theorem comul_comp_lapply (i : ι) :
    comul ∘ₗ (lapply i : _ →ₗ[R] A) = TensorProduct.map (lapply i) (lapply i) ∘ₗ comul

(R : Type u)
(ι : Type v)
(A : Type w)
[CommSemiring R]
[AddCommMonoid A]
[Module R A]
[Coalgebra R A]
(i : ι)

Coalgebra.comul ∘ₗ Finsupp.lapply i = TensorProduct.map (Finsupp.lapply i) (Finsupp.lapply i) ∘ₗ Coalgebra.comul


lemma prod_nat_mod (l : List ℕ) (n : ℕ) : l.prod % n = (l.map (· % n)).prod % n

l.prod % n = (List.map (fun x => x % n) l).prod % n


@[to_additive]
theorem multipliable_of_finite_mulSupport (h : (mulSupport f).Finite) : Multipliable f

{α : Type u_1}
{β : Type u_2}
[AddCommMonoid α]
[TopologicalSpace α]
{f : β → α}
(h : (Function.support f).Finite)


theorem toFinset_replicate_of_ne_zero {n : ℕ} (hn : n ≠ 0) :
    (List.replicate n a).toFinset = {a}

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


lemma of_isOpenImmersion [P.ContainsIdentities] [IsOpenImmersion f] : P f

{P : CategoryTheory.MorphismProperty AlgebraicGeometry.Scheme}


theorem IsBigOWith.triangle (h₁ : IsBigOWith c l (fun x => f₁ x - f₂ x) g)
    (h₂ : IsBigOWith c' l (fun x => f₂ x - f₃ x) g) :
    IsBigOWith (c + c') l (fun x => f₁ x - f₃ x) g

(h₁ : Asymptotics.IsBigOWith c l (fun x => f₁ x - f₂ x) g)

(h₂ : Asymptotics.IsBigOWith c' l (fun x => f₂ x - f₃ x) g)

Asymptotics.IsBigOWith (c + c') l (fun x => f₁ x - f₃ x) g


@[simp]
theorem infs_subset_iff : s ⊼ t ⊆ u ↔ ∀ a ∈ s, ∀ b ∈ t, a ⊓ b ∈ u

{α : Type u_2}
[SemilatticeInf α]
{s t u : Set α}


@[simp]
theorem vars_monomial (h : r ≠ 0) : (monomial s r).vars = s.support

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

((MvPolynomial.monomial s) r).vars = s.support


@[simp]
lemma preimage_coe_Icc (x y : ℝ) : Real.toEReal ⁻¹' Icc x y = Icc x y

Real.toEReal ⁻¹' Set.Icc ↑x ↑y = Set.Icc x y


theorem bounded_ge_inter_ge [LinearOrder α] (a : α) :
    Bounded (· ≥ ·) (s ∩ { b | b ≤ a }) ↔ Bounded (· ≥ ·) s

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

Set.Bounded (fun x x_1 => x ≥ x_1) (s ∩ {b | b ≤ a}) ↔ Set.Bounded (fun x x_1 => x ≥ x_1) s


@[to_additive (attr := simp) natAbs_nsmul_eq_zero]
lemma pow_natAbs_eq_one : a ^ n.natAbs = 1 ↔ a ^ n = 1

{G : Type u_3}
[Group G]
{a : G}
{n : ℤ}


theorem add_tsub_eq_max : a + (b - a) = max a b


theorem continuous_Prop {p : α → Prop} : Continuous p ↔ IsOpen { x | p x }

{α : Type u_1}
[TopologicalSpace α]
{p : α → Prop}


theorem localInverse_def (hf : HasStrictFDerivAt f (f' : E →L[𝕜] F) a) :
    hf.localInverse f _ _ = (hf.toPartialHomeomorph f).symm

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{F : Type u_3}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
[CompleteSpace E]
{f : E → F}
{f' : E ≃L[𝕜] F}
{a : E}
(hf : HasStrictFDerivAt f (↑f') a)

HasStrictFDerivAt.localInverse f f' a hf = ↑(HasStrictFDerivAt.toPartialHomeomorph f hf).symm


/-- The functor `Γ₀' : ChainComplex C ℕ ⥤ SimplicialObject.Split C`
that induces `Γ₀ : ChainComplex C ℕ ⥤ SimplicialObject C`, which
shall be the inverse functor of the Dold-Kan equivalence for
abelian or pseudo-abelian categories. -/
@[simps]
def Γ₀' : ChainComplex C ℕ ⥤ SimplicialObject.Split C

AlgebraicTopology.DoldKan.Γ₀'.obj K = SimplicialObject.Split.mk' (AlgebraicTopology.DoldKan.Γ₀.splitting K)


theorem t1Space_antitone : Antitone (@T1Space X)


@[simp]
theorem round_sub_int (x : α) (y : ℤ) : round (x - y) = round x - y

{α : Type u_2}
[LinearOrderedRing α]
[FloorRing α]
(x : α)
(y : ℤ)


theorem count_false_eq_count_true (hl : Chain' (· ≠ ·) l) (h2 : Even (length l)) :
    count false l = count true l

(hl : List.Chain' (fun x x_1 => x ≠ x_1) l)


theorem DimensionLEOne.isIntegralClosure (B : Type*) [CommRing B] [IsDomain B] [Nontrivial R]
    [Algebra R A] [Algebra R B] [Algebra B A] [IsScalarTower R B A] [IsIntegralClosure B R A]
    [DimensionLEOne R] : DimensionLEOne B

(R : Type u_1)
(A : Type u_2)
[CommRing R]
[CommRing A]
(B : Type u_4)
[CommRing B]
[IsDomain B]
[Nontrivial R]
[Algebra R A]
[Algebra R B]
[Algebra B A]
[IsScalarTower R B A]
[IsIntegralClosure B R A]
[Ring.DimensionLEOne R]


theorem lipschitz : LipschitzWith (ratio f) (f : α → β)

{α : Type u_1}
{β : Type u_2}
{F : Type u_4}
[PseudoEMetricSpace α]
[PseudoEMetricSpace β]
[FunLike F α β]
[DilationClass F α β]
(f : F)


/-- Multiplicativity of a continuous alternating map along all coordinates at the same time,
writing `f (fun i ↦ c i • m i)` as `(∏ i, c i) • f m`. -/
theorem map_smul_univ [Fintype ι] (c : ι → R) (m : ι → M) :
    (f fun i => c i • m i) = (∏ i, c i) • f m

{R : Type u_1}
{M : Type u_2}
{N : Type u_4}
{ι : Type u_6}
[CommSemiring R]
[AddCommMonoid M]
[Module R M]
[TopologicalSpace M]
[AddCommMonoid N]
[Module R N]
[TopologicalSpace N]
(f : M [⋀^ι]→L[R] N)
[Fintype ι]
(c : ι → R)
(m : ι → M)

(f fun i => c i • m i) = (∏ i : ι, c i) • f m


/-- If `C` has an object such that every morphism *from* it is an isomorphism, then `C`
has strict terminal objects. -/
theorem hasStrictTerminalObjects_of_terminal_is_strict (I : C) (h : ∀ (A) (f : I ⟶ A), IsIso f) :
    HasStrictTerminalObjects C

(h : ∀ (A : C) (f : I ⟶ A), CategoryTheory.IsIso f)


@[to_additive]
theorem mul_eq_of_eq_div' (h : b = c / a) : a * b = c

{G : Type u_3}
[CommGroup G]
{a b c : G}
(h : b = c / a)


@[ext]
theorem hom_ext {S₁ S₂ : Split C} (Φ₁ Φ₂ : S₁ ⟶ S₂) (h : ∀ n : ℕ, Φ₁.f n = Φ₂.f n) : Φ₁ = Φ₂

{C : Type u_1}
[CategoryTheory.Category.{u_2, u_1} C]
{S₁ S₂ : SimplicialObject.Split C}
(Φ₁ Φ₂ : S₁ ⟶ S₂)
(h : ∀ (n : ℕ), Φ₁.f n = Φ₂.f n)


lemma nonempty_leftResolution_iff_op (X₂ : C₂) :
    Nonempty (Φ.LeftResolution X₂) ↔ Nonempty (Φ.op.RightResolution (Opposite.op X₂))

{W₁ : CategoryTheory.MorphismProperty C₁}

{W₂ : CategoryTheory.MorphismProperty C₂}

(Φ : CategoryTheory.LocalizerMorphism W₁ W₂)


/-- The composition of morphisms of differential objects. -/
@[simps]
def comp {X Y Z : DifferentialObject S C} (f : Hom X Y) (g : Hom Y Z) : Hom X Z

{X Y Z : CategoryTheory.DifferentialObject S C}

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


theorem exists_apply_eq (a : α) (b : β) : ∃ f : α → β, f a = b

{α : Sort u_1}
{β : Sort u_2}
(a : α)
(b : β)


theorem Poly.denote_insertSorted (ctx : Context) (k : Nat) (m : Mon) (p : Poly) : (p.insertSorted k m).denote ctx = p.denote ctx + k * m.denote ctx

(ctx : Nat.Linear.Context)
(k : Nat)
(m : Nat.SOM.Mon)
(p : Nat.SOM.Poly)

Nat.SOM.Poly.denote ctx (Nat.SOM.Poly.insertSorted k m p) = Nat.SOM.Poly.denote ctx p + k * Nat.SOM.Mon.denote ctx m


@[simp]
theorem not_bounded_iff {r : α → α → Prop} (s : Set α) : ¬Bounded r s ↔ Unbounded r s

{α : Type u}
{r : α → α → Prop}
(s : Set α)


/-- The `n`-th Chebyshev polynomial of the second kind evaluates on `cos θ` to the
value `sin ((n + 1) * θ) / sin θ`. -/
@[simp]
theorem U_real_cos : (U ℝ n).eval (cos θ) * sin θ = sin ((n + 1) * θ)

Polynomial.eval (Real.cos θ) (Polynomial.Chebyshev.U ℝ n) * Real.sin θ = Real.sin ((↑n + 1) * θ)


theorem add_tmul (m₁ m₂ : M) (n : N) : (m₁ + m₂) ⊗ₜ n = m₁ ⊗ₜ n + m₂ ⊗ₜ[R] n

{R : Type u_1}
[CommSemiring R]
{M : Type u_4}
{N : Type u_5}
[AddCommMonoid M]
[AddCommMonoid N]
[Module R M]
[Module R N]
(m₁ m₂ : M)
(n : N)

(m₁ + m₂) ⊗ₜ[R] n = m₁ ⊗ₜ[R] n + m₂ ⊗ₜ[R] n


@[to_additive (attr := simp)]
theorem Iic_one : Iic (1 : α) = 1


@[simp]
theorem diag_neg [Neg α] (A : Matrix n n α) : diag (-A) = -diag A

{n : Type u_3}
{α : Type v}
[Neg α]
(A : Matrix n n α)


/-- A category is noetherian if it is essentially small and all objects are noetherian. -/
class Noetherian extends EssentiallySmall C : Prop where
  noetherianObject : ∀ X : C, NoetherianObject X

{C : Type u_1}
[CategoryTheory.Category.{u_2, u_1} C]
[self : CategoryTheory.Noetherian C]
(X : C)


theorem frontier_preimage (hsurj : Surjective f) (s : Set F) :
    frontier (f ⁻¹' s) = f ⁻¹' frontier s

{𝕜 : Type u_1}
{𝕜' : Type u_2}
[NontriviallyNormedField 𝕜]
[NontriviallyNormedField 𝕜']
{σ : 𝕜 →+* 𝕜'}
{σ' : 𝕜' →+* 𝕜}
[RingHomInvPair σ σ']
[RingHomIsometric σ]
[RingHomIsometric σ']
{E : Type u_3}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{F : Type u_4}
[NormedAddCommGroup F]
[NormedSpace 𝕜' F]
(f : E →SL[σ] F)
[CompleteSpace F]
[CompleteSpace E]
(hsurj : Function.Surjective ⇑f)
(s : Set F)


/-- The standard one-dimensional simplex in `ℝ² = Fin 2 → ℝ`
is homeomorphic to the unit interval. -/
@[simps! (config := .asFn)]
def stdSimplexHomeomorphUnitInterval : stdSimplex ℝ (Fin 2) ≃ₜ unitInterval

↑(stdSimplexHomeomorphUnitInterval f) = ↑f 0


theorem pi_mono {s : Set ι} (h : ∀ i ∈ s, p i ≤ q i) : pi s p ≤ pi s q

{R : Type u}
{ι : Type x}
[Semiring R]
{φ : ι → Type u_1}
[(i : ι) → AddCommMonoid (φ i)]
[(i : ι) → Module R (φ i)]
{p q : (i : ι) → Submodule R (φ i)}
{s : Set ι}
(h : ∀ i ∈ s, p i ≤ q i)


theorem coeff_isUnit (hp : p.IsUnitTrinomial) {k : ℕ} (hk : k ∈ p.support) :
    IsUnit (p.coeff k)

{p : Polynomial ℤ}
(hp : p.IsUnitTrinomial)
{k : ℕ}
(hk : k ∈ p.support)


theorem IsBilimit.binary_total {X Y : C} {b : BinaryBicone X Y} (i : b.IsBilimit) :
    b.fst ≫ b.inl + b.snd ≫ b.inr = 𝟙 b.pt

{b : CategoryTheory.Limits.BinaryBicone X Y}


@[simp]
theorem nonempty_psigma {α} {β : α → Sort*} : Nonempty (PSigma β) ↔ ∃ a : α, Nonempty (β a)

Nonempty (PSigma β) ↔ ∃ a, Nonempty (β a)


/-- If the union of s is unbounded and s is smaller than the cofinality,
  then s has an unbounded member -/
theorem unbounded_of_unbounded_iUnion {α β : Type u} (r : α → α → Prop) [wo : IsWellOrder α r]
    (s : β → Set α) (h₁ : Unbounded r <| ⋃ x, s x) (h₂ : #β < StrictOrder.cof r) :
    ∃ x : β, Unbounded r (s x)

{α β : Type u}
(r : α → α → Prop)
[wo : IsWellOrder α r]
(s : β → Set α)
(h₁ : Set.Unbounded r (⋃ x, s x))
(h₂ : #β < StrictOrder.cof r)


@[simp]
theorem coe_moebius_mul_coe_zeta [Ring R] : (μ * ζ : ArithmeticFunction R) = 1

↑ArithmeticFunction.moebius * ↑ArithmeticFunction.zeta = 1


/-- A unit in a monoid is regular. -/
@[to_additive "An additive unit in an additive monoid is add-regular."]
theorem IsUnit.isRegular (ua : IsUnit a) : IsRegular a

{R : Type u_1}
[AddMonoid R]
{a : R}
(ua : IsAddUnit a)


theorem Measurable.eq_mp {β} [MeasurableSpace β] {i i' : δ} (h : i = i') {f : β → π i}
    (hf : Measurable f) : Measurable fun x => (congr_arg π h).mp (f x)

{δ : Type u_4}
(π : δ → Type u_6)
[(a : δ) → MeasurableSpace (π a)]
{β : Type u_7}
[MeasurableSpace β]
{i i' : δ}
(h : i = i')
{f : β → π i}
(hf : Measurable f)


/-- `PUnit` is a right identity for dependent type product up to an equivalence. -/
@[simps]
def sigmaPUnit (α) : (_ : α) × PUnit ≃ α


theorem sup_limsup [NeBot f] (a : α) : a ⊔ limsup u f = limsup (fun x => a ⊔ u x) f

{α : Type u_1}
{β : Type u_2}
[CompleteDistribLattice α]
{f : Filter β}
{u : β → α}
[f.NeBot]
(a : α)

a ⊔ Filter.limsup u f = Filter.limsup (fun x => a ⊔ u x) f


/-- Compatibility of notions of `order` for analytic and meromorphic functions. -/
lemma _root_.AnalyticAt.meromorphicAt_order {f : 𝕜 → E} {x : 𝕜} (hf : AnalyticAt 𝕜 f x) :
    hf.meromorphicAt.order = hf.order.map (↑)

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{f : 𝕜 → E}
{x : 𝕜}
(hf : AnalyticAt 𝕜 f x)


@[simp]
theorem coe_top [Top β] : ⇑(⊤ : InfHom α β) = ⊤

{α : Type u_3}
{β : Type u_4}
[Inf α]
[SemilatticeInf β]
[Top β]


@[simp]
theorem mem_segment_translate (a : E) {x b c} : a + x ∈ [a + b -[𝕜] a + c] ↔ x ∈ [b -[𝕜] c]

(𝕜 : Type u_1)
{E : Type u_2}
[OrderedRing 𝕜]
[AddCommGroup E]
[Module 𝕜 E]
(a : E)
{x b c : E}


@[simp]
lemma finsuppScalarRight_symm_apply_single (i : ι) (m : M) :
    (finsuppScalarRight R M ι).symm (Finsupp.single i m) =
      m ⊗ₜ[R] (Finsupp.single i 1)

{R : Type u_1}
[CommSemiring R]
{M : Type u_2}
[AddCommMonoid M]
[Module R M]
{ι : Type u_4}
[DecidableEq ι]
(i : ι)
(m : M)

(TensorProduct.finsuppScalarRight R M ι).symm (Finsupp.single i m) = m ⊗ₜ[R] Finsupp.single i 1


theorem indicator_le_thickenedIndicator {δ : ℝ} (δ_pos : 0 < δ) (E : Set α) :
    (E.indicator fun _ => (1 : ℝ≥0)) ≤ thickenedIndicator δ_pos E

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

(E.indicator fun x => 1) ≤ ⇑(thickenedIndicator δ_pos E)


@[to_additive (attr := simp)]
theorem coe_map (f : F) (S : Submonoid M) : (S.map f : Set N) = f '' S

{M : Type u_1}
{N : Type u_2}
[AddZeroClass M]
[AddZeroClass N]
{F : Type u_4}
[FunLike F M N]
[mc : AddMonoidHomClass F M N]
(f : F)
(S : AddSubmonoid M)


theorem sub_quot {R : Type uR} [Ring R] (r : R → R → Prop) {a b} :
    (⟨Quot.mk _ a⟩ - ⟨Quot.mk _ b⟩ : RingQuot r) = ⟨Quot.mk _ (a - b)⟩

{R : Type uR}
[Ring R]
(r : R → R → Prop)
{a b : R}

{ toQuot := Quot.mk (RingQuot.Rel r) a } - { toQuot := Quot.mk (RingQuot.Rel r) b } =
  { toQuot := Quot.mk (RingQuot.Rel r) (a - b) }


@[simp] theorem Bool.not_eq_false' (b : Bool) : ((!b) = false) = (b = true)


/-- The identity morphism of a snake input. -/
@[simps]
def id : Hom S S

(S : CategoryTheory.ShortComplex.SnakeInput C)

(CategoryTheory.ShortComplex.SnakeInput.Hom.id S).f₂ = CategoryTheory.CategoryStruct.id S.L₂


protected theorem lower (s : Ideal P) : IsLowerSet (s : Set P)

{P : Type u_1}
[LE P]
(s : Order.Ideal P)


protected theorem zsmul_mem {R : Type u} {A : Type v} [CommRing R] [Ring A] [Algebra R A]
    (S : Subalgebra R A) {x : A} (hx : x ∈ S) (n : ℤ) : n • x ∈ S