/-- If `u` is a neighborhood of `x`, then for small enough `r`, the closed ball
`Metric.closedBall x r` is contained in `u`. -/
lemma eventually_closedBall_subset {x : α} {u : Set α} (hu : u ∈ 𝓝 x) :
    ∀ᶠ r in 𝓝 (0 : ℝ), closedBall x r ⊆ u

{α : Type u_2}
[PseudoMetricSpace α]
{x : α}
{u : Set α}
(hu : u ∈ 𝓝 x)

∀ᶠ (r : ℝ) in 𝓝 0, Metric.closedBall x r ⊆ u


theorem choose_zero_ite (R) [NonAssocRing R] [Pow R ℕ] [NatPowAssoc R] [BinomialRing R]
    (k : ℕ) : choose (0 : R) k = if k = 0 then 1 else 0

(R : Type u_2)
[NonAssocRing R]
[Pow R ℕ]
[NatPowAssoc R]
[BinomialRing R]
(k : ℕ)

Ring.choose 0 k = if k = 0 then 1 else 0


@[simp]
theorem rank_eq_one_iff [Nontrivial E] [Module.Free F S] : Module.rank F S = 1 ↔ S = ⊥

{F : Type u_1}
{E : Type u_2}
[CommRing F]
[StrongRankCondition F]
[Ring E]
[Algebra F E]
{S : Subalgebra F E}
[Nontrivial E]
[Module.Free F ↥S]


theorem contractNth_apply_of_lt (j : Fin (n + 1)) (op : α → α → α) (g : Fin (n + 1) → α) (k : Fin n)
    (h : (k : ℕ) < j) : contractNth j op g k = g (Fin.castSucc k)

{n : ℕ}
{α : Type u_1}
(j : Fin (n + 1))
(op : α → α → α)
(g : Fin (n + 1) → α)
(k : Fin n)
(h : ↑k < ↑j)


theorem monic_of_d_eq_one (ha : P.a = 0) (hb : P.b = 0) (hc : P.c = 0) (hd : P.d = 1) :
    P.toPoly.Monic

{R : Type u_1}
{P : Cubic R}
[Semiring R]
(ha : P.a = 0)
(hb : P.b = 0)
(hc : P.c = 0)
(hd : P.d = 1)


lemma comap_weightSpace_eq_of_injective (hf : Injective f) :
    (weightSpace M₂ χ).comap f = weightSpace M χ

{R : Type u_2}
{L : Type u_3}
{M : Type u_4}
[CommRing R]
[LieRing L]
[LieAlgebra R L]
[LieAlgebra.IsNilpotent R L]
[AddCommGroup M]
[Module R M]
[LieRingModule L M]
[LieModule R L M]
{M₂ : Type u_5}
[AddCommGroup M₂]
[Module R M₂]
[LieRingModule L M₂]
[LieModule R L M₂]
{χ : L → R}
{f : M →ₗ⁅R,L⁆ M₂}
(hf : Function.Injective ⇑f)

LieSubmodule.comap f (LieModule.weightSpace M₂ χ) = LieModule.weightSpace M χ


/-- In a preadditive category, if the product over `f : J → C` exists,
    then the biproduct over `f` exists. -/
theorem HasBiproduct.of_hasProduct (f : J → C) [HasProduct f] : HasBiproduct f

{C : Type u}
[CategoryTheory.Category.{v, u} C]
[CategoryTheory.Preadditive C]
{J : Type}
[Finite J]
(f : J → C)
[CategoryTheory.Limits.HasProduct f]


theorem cos_add_nat_mul_pi (x : ℝ) (n : ℕ) : cos (x + n * π) = (-1) ^ n * cos x

Real.cos (x + ↑n * Real.pi) = (-1) ^ n * Real.cos x


lemma IsRightRegular.prod (h : ∀ i ∈ s, IsRightRegular (f i)) :
    IsRightRegular (∏ i ∈ s, f i)

{ι : Type u_2}
{R : Type u_3}
[CommMonoid R]
{s : Finset ι}
{f : ι → R}
(h : ∀ i ∈ s, IsRightRegular (f i))


@[simp]
theorem realize_relabelEquiv {g : α ≃ β} {k} {φ : L.BoundedFormula α k} {v : β → M}
    {xs : Fin k → M} : (relabelEquiv g φ).Realize v xs ↔ φ.Realize (v ∘ g) xs

{L : FirstOrder.Language}
{M : Type w}
[L.Structure M]
{α : Type u'}
{β : Type v'}
{g : α ≃ β}
{k : ℕ}
{φ : L.BoundedFormula α k}
{v : β → M}
{xs : Fin k → M}

((FirstOrder.Language.BoundedFormula.relabelEquiv g) φ).Realize v xs ↔ φ.Realize (v ∘ ⇑g) xs


@[simp] theorem zero_le (a : Fin (n + 1)) : 0 ≤ a


@[simp] lemma exp_lt_exp_iff {a b : EReal} : exp a < exp b ↔ a < b


@[to_additive]
protected theorem mul_div_mul_comm (hcd : Commute c d) (hbc : Commute b c⁻¹) :
    a * b / (c * d) = a / c * (b / d)

{G : Type u_1}
[SubtractionMonoid G]
{a b c d : G}
(hcd : AddCommute c d)
(hbc : AddCommute b (-c))


/-- Non-unital star algebra homomorphisms from `A` into a unital star `R`-algebra `C` lift uniquely
to `Unitization R A →⋆ₐ[R] C`. This is the universal property of the unitization. -/
@[simps! apply symm_apply apply_apply]
def starLift : (A →⋆ₙₐ[R] C) ≃ (Unitization R A →⋆ₐ[R] C)

{R : Type u_1}
{A : Type u_2}
{C : Type u_3}
[CommSemiring R]
[StarRing R]
[NonUnitalSemiring A]
[StarRing A]
[Module R A]
[SMulCommClass R A A]
[IsScalarTower R A A]
[Semiring C]
[Algebra R C]
[StarRing C]
[StarModule R C]
(φ : A →⋆ₙₐ[R] C)
(x : Unitization R A)

(Unitization.starLift φ) x = (algebraMap R C) x.fst + φ x.snd


lemma finiteCoproduct.ι_desc_apply {B : Profinite} {π : (a : α) → X a ⟶ B} (a : α) :
    ∀ x, finiteCoproduct.desc X π (finiteCoproduct.ι X a x) = π a x

(x : (CategoryTheory.forget Profinite).obj (X a))

(Profinite.finiteCoproduct.desc X π) ((Profinite.finiteCoproduct.ι X a) x) = (π a) x


/-- `Finsupp.single 1` as a `RingHom` -/
@[simps]
def singleOneRingHom [Semiring k] [MulOneClass G] : k →+* MonoidAlgebra k G

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

∀ (a : k), MonoidAlgebra.singleOneRingHom a = (↑(Finsupp.singleAddHom 1)).toFun a


theorem integral_deriv_comp_smul_deriv {f f' : ℝ → ℝ} {g g' : ℝ → E}
    (hf : ∀ x ∈ uIcc a b, HasDerivAt f (f' x) x)
    (hg : ∀ x ∈ uIcc a b, HasDerivAt g (g' (f x)) (f x)) (hf' : ContinuousOn f' (uIcc a b))
    (hg' : Continuous g') : (∫ x in a..b, f' x • (g' ∘ f) x) = (g ∘ f) b - (g ∘ f) a

(hf : ∀ x ∈ [[a, b]], HasDerivAt f (f' x) x)

(hg : ∀ x ∈ [[a, b]], HasDerivAt g (g' (f x)) (f x))

∫ (x : ℝ) in a..b, f' x • (g' ∘ f) x = (g ∘ f) b - (g ∘ f) a


theorem differentiableAt_pow : DifferentiableAt 𝕜 (fun x : 𝕜 => x ^ n) x

{𝕜 : Type u}
[NontriviallyNormedField 𝕜]
{x : 𝕜}
(n : ℕ)


theorem zipWith_comm (f : α → β → γ) :
    ∀ (la : List α) (lb : List β), zipWith f la lb = zipWith (fun b a => f a b) lb la

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

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


theorem Finite.iSup_biInf_of_antitone {ι ι' α : Type*} [Preorder ι'] [Nonempty ι']
    [IsDirected ι' (swap (· ≤ ·))] [Order.Frame α] {s : Set ι} (hs : s.Finite) {f : ι → ι' → α}
    (hf : ∀ i ∈ s, Antitone (f i)) : ⨆ j, ⨅ i ∈ s, f i j = ⨅ i ∈ s, ⨆ j, f i j

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

{f : ι → ι' → α}


theorem sum_pow [CommSemiring R] (x : α → R) (n : ℕ) :
    s.sum x ^ n = ∑ k ∈ s.sym n, k.val.multinomial * (k.val.map x).prod

{α : Type u_1}
{R : Type u_2}
[DecidableEq α]
{s : Finset α}
[CommSemiring R]
(x : α → R)
(n : ℕ)

s.sum x ^ n = ∑ k ∈ s.sym n, ↑(↑k).multinomial * (Multiset.map x ↑k).prod


theorem basicOpen_mul_le_left (f g : A) : basicOpen 𝒜 (f * g) ≤ basicOpen 𝒜 f

{R : Type u_1}
{A : Type u_2}
[CommSemiring R]
[CommRing A]
[Algebra R A]
(𝒜 : ℕ → Submodule R A)
[GradedAlgebra 𝒜]
(f g : A)

ProjectiveSpectrum.basicOpen 𝒜 (f * g) ≤ ProjectiveSpectrum.basicOpen 𝒜 f


@[simp]
lemma predicateShift_zero [ClosedUnderIsomorphisms P] : PredicateShift P (0 : A) = P


@[simp]
theorem Equiv.coe_toEmbedding : (f.toEmbedding : α → β) = f


@[simp]
theorem listDecode_encode_list (l : List (Σn, L.BoundedFormula α n)) :
    listDecode (l.bind (fun φ => φ.2.listEncode)) = l

(l : List ((n : ℕ) × L.BoundedFormula α n))

FirstOrder.Language.BoundedFormula.listDecode (l.bind fun φ => φ.snd.listEncode) = l


@[simp, norm_cast]
theorem rpow_natCast (x : ℝ≥0) (n : ℕ) : x ^ (n : ℝ) = x ^ n


theorem sum_eq_iff_sum_smul_moebius_eq_on' [AddCommGroup R] {f g : ℕ → R}
    (s : Set ℕ) (hs : ∀ m n, m ∣ n → n ∈ s → m ∈ s) (hs₀ : 0 ∉ s) :
    (∀ n ∈ s, (∑ i ∈ n.divisors, f i) = g n) ↔
     ∀ n ∈ s, (∑ x ∈ n.divisorsAntidiagonal, μ x.fst • g x.snd) = f n

(hs : ∀ (m n : ℕ), m ∣ n → n ∈ s → m ∈ s)

(∀ n ∈ s, ∑ i ∈ n.divisors, f i = g n) ↔
  ∀ n ∈ s, ∑ x ∈ n.divisorsAntidiagonal, ArithmeticFunction.moebius x.1 • g x.2 = f n


/-- Constructor for `FinallySmall C` from an explicit small category witness. -/
theorem FinallySmall.mk' {J : Type u} [Category.{v} J] {S : Type w} [SmallCategory S]
    (F : S ⥤ J) [Final F] : FinallySmall.{w} J

{J : Type u}
[CategoryTheory.Category.{v, u} J]
{S : Type w}
[CategoryTheory.SmallCategory S]
(F : S ⥤ J)
[F.Final]


/-- The group of `AffineEquiv`s are equivalent to the group of units of `AffineMap`.

This is the affine version of `LinearMap.GeneralLinearGroup.generalLinearEquiv`. -/
@[simps]
def equivUnitsAffineMap : (P₁ ≃ᵃ[k] P₁) ≃* (P₁ →ᵃ[k] P₁)ˣ

{k : Type u_1}
{P₁ : Type u_2}
{V₁ : Type u_6}
[Ring k]
[AddCommGroup V₁]
[Module k V₁]
[AffineSpace V₁ P₁]
(u : (P₁ →ᵃ[k] P₁)ˣ)
(a : P₁)

(AffineEquiv.equivUnitsAffineMap.symm u) a = ↑u a


/-- Inversion is a group homomorphism if the group is commutative. -/
@[to_additive
      "Negation is an `AddGroup` homomorphism if the `AddGroup` is commutative."]
theorem Inv.isGroupHom [CommGroup α] : IsGroupHom (Inv.inv : α → α)


theorem image_iUnion {f : α → β} {s : ι → Set α} : (f '' ⋃ i, s i) = ⋃ i, f '' s i

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


theorem Ico_def (a b : α) : { x | a ≤ x ∧ x < b } = Ico a b


@[simp]
theorem insert_singleton_eq {a : α} {b b' : β a} : insert a b (singleton a b') = singleton a b

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

Finmap.insert a b (Finmap.singleton a b') = Finmap.singleton a b


theorem copy_eq (f : CocompactMap α β) (f' : α → β) (h : f' = f) : f.copy f' h = f

{α : Type u_1}
{β : Type u_2}
[TopologicalSpace α]
[TopologicalSpace β]
(f : CocompactMap α β)
(f' : α → β)
(h : f' = ⇑f)


@[to_additive]
theorem orbitZPowersEquiv_symm_apply (k : ZMod (minimalPeriod (a • ·) b)) :
    (orbitZPowersEquiv a b).symm k =
      (⟨a, mem_zpowers a⟩ : zpowers a) ^ (cast k : ℤ) • ⟨b, mem_orbit_self b⟩

(k : ZMod (Function.minimalPeriod (fun x => a +ᵥ x) b))

(AddAction.orbitZMultiplesEquiv a b).symm k = k.cast • ⟨a, ⋯⟩ +ᵥ ⟨b, ⋯⟩


@[simp]
theorem HasColimit.isoOfEquivalence_hom_π {F : J ⥤ C} [HasColimit F] {G : K ⥤ C} [HasColimit G]
    (e : J ≌ K) (w : e.functor ⋙ G ≅ F) (j : J) :
    colimit.ι F j ≫ (HasColimit.isoOfEquivalence e w).hom =
      F.map (e.unit.app j) ≫ w.inv.app _ ≫ colimit.ι G _

{J : Type u₁}
[CategoryTheory.Category.{v₁, u₁} J]
{K : Type u₂}
[CategoryTheory.Category.{v₂, u₂} K]
{C : Type u}
[CategoryTheory.Category.{v, u} C]
{F : J ⥤ C}
[CategoryTheory.Limits.HasColimit F]
{G : K ⥤ C}
[CategoryTheory.Limits.HasColimit G]
(e : J ≌ K)
(w : e.functor ⋙ G ≅ F)
(j : J)

CategoryTheory.Limits.colimit.ι F j ≫ (CategoryTheory.Limits.HasColimit.isoOfEquivalence e w).hom =
  F.map (e.unit.app j) ≫
    w.inv.app ((e.functor ⋙ e.inverse).obj j) ≫
      CategoryTheory.Limits.colimit.ι G (e.functor.obj ((e.functor ⋙ e.inverse).obj j))


theorem continuous_of_dominated {F : X → α → G} {bound : α → ℝ}
    (hF_meas : ∀ x, AEStronglyMeasurable (F x) μ) (h_bound : ∀ x, ∀ᵐ a ∂μ, ‖F x a‖ ≤ bound a)
    (bound_integrable : Integrable bound μ) (h_cont : ∀ᵐ a ∂μ, Continuous fun x => F x a) :
    Continuous fun x => ∫ a, F x a ∂μ

(hF_meas : ∀ (x : X), MeasureTheory.AEStronglyMeasurable (F x) μ)

(h_bound : ∀ (x : X), ∀ᵐ (a : α) ∂μ, ‖F x a‖ ≤ bound a)

(bound_integrable : MeasureTheory.Integrable bound μ)

(h_cont : ∀ᵐ (a : α) ∂μ, Continuous fun x => F x a)


theorem extract.go₁_append_right : ∀ (s t : List Char) (i b : Nat) (e : Pos),
    b = utf8Len s + i → go₁ (s ++ t) ⟨i⟩ ⟨b⟩ e = go₂ t ⟨b⟩ e

(s t : List Char)
(i b : Nat)
(e : String.Pos)

b = String.utf8Len s + i →
  String.extract.go₁ (s ++ t) { byteIdx := i } { byteIdx := b } e = String.extract.go₂ t { byteIdx := b } e


theorem smul_vec2 {R : Type*} [SMul R α] (x : R) (a₀ a₁ : α) :
    x • ![a₀, a₁] = ![x • a₀, x • a₁]

{α : Type u}
{R : Type u_1}
[SMul R α]
(x : R)
(a₀ a₁ : α)


@[simp]
theorem ediam_Ioc (a b : ℝ) : EMetric.diam (Ioc a b) = ENNReal.ofReal (b - a)

EMetric.diam (Set.Ioc a b) = ENNReal.ofReal (b - a)


/-- The isomorphism between the short complex attached to
two isomorphic distinguished triangles. -/
@[simps!]
def shortComplexOfDistTriangleIsoOfIso {T T' : Triangle C} (e : T ≅ T') (hT : T ∈ distTriang C) :
    shortComplexOfDistTriangle T hT ≅ shortComplexOfDistTriangle T'
      (isomorphic_distinguished _ hT _ e.symm)

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

{T T' : CategoryTheory.Pretriangulated.Triangle C}

(hT : T ∈ CategoryTheory.Pretriangulated.distinguishedTriangles)

(CategoryTheory.Pretriangulated.shortComplexOfDistTriangleIsoOfIso e hT).inv.τ₃ = e.inv.hom₃


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

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


@[simp]
theorem grade_toDual [GradeOrder 𝕆 α] (a : α) : grade 𝕆ᵒᵈ (toDual a) = toDual (grade 𝕆 a)

{𝕆 : Type u_1}
{α : Type u_3}
[Preorder 𝕆]
[Preorder α]
[GradeOrder 𝕆 α]
(a : α)

grade 𝕆ᵒᵈ (OrderDual.toDual a) = OrderDual.toDual (grade 𝕆 a)


/-- This structure contains the data and axioms in order to
produce a `PresheafOfModules R` from a collection of types
equipped with module structures over the various rings `R.obj X`.
(See the constructor `PresheafOfModules.mk'`.) -/
structure CorePresheafOfModules where
  /-- the datum of a type for each object in `Cᵒᵖ` -/
  obj (X : Cᵒᵖ) : Type v
  /-- the abelian group structure on the types `obj X` -/
  addCommGroup (X : Cᵒᵖ) : AddCommGroup (obj X) := by infer_instance
  /-- the module structure on the types `obj X` over the various rings `R.obj X` -/
  module (X : Cᵒᵖ) : Module (R.obj X) (obj X) := by infer_instance
  /-- the semi-linear restriction maps -/
  map {X Y : Cᵒᵖ} (f : X ⟶ Y) : obj X →ₛₗ[R.map f] obj Y
  /-- `map` is compatible with the identities -/
  map_id (X : Cᵒᵖ) (x : obj X) : map (𝟙 X) x = x := by aesop_cat
  /-- `map` is compatible with the composition -/
  map_comp {X Y Z : Cᵒᵖ} (f : X ⟶ Y) (g : Y ⟶ Z) (x : obj X) :
    map (f ≫ g) x = map g (map f x) := by aesop_cat

{C : Type u₁}
[CategoryTheory.Category.{v₁, u₁} C]
{R : Cᵒᵖ ⥤ RingCat}
(self : CorePresheafOfModules R)
(X : Cᵒᵖ)
(x : self.obj X)


@[to_additive]
theorem Integrable.comp_div_left {f : G → F} [IsInvInvariant μ] [IsMulLeftInvariant μ]
    (hf : Integrable f μ) (g : G) : Integrable (fun t => f (g / t)) μ

{G : Type u_4}
{F : Type u_6}
[MeasurableSpace G]
[NormedAddCommGroup F]
{μ : MeasureTheory.Measure G}
[Group G]
[MeasurableMul G]
[MeasurableInv G]
{f : G → F}
[μ.IsInvInvariant]
[μ.IsMulLeftInvariant]
(hf : MeasureTheory.Integrable f μ)
(g : G)

MeasureTheory.Integrable (fun t => f (g / t)) μ


/-- If `f` has derivative `f'` within `(x, +∞)` at `x`, then for any `r > ‖f'‖` the ratio
`‖f z - f x‖ / ‖z - x‖` is frequently less than `r` as `z → x+0`.
In other words, the limit inferior of this ratio as `z` tends to `x+0`
is less than or equal to `‖f'‖`. See also `HasDerivWithinAt.limsup_norm_slope_le`
for a stronger version using limit superior and any set `s`. -/
theorem HasDerivWithinAt.liminf_right_norm_slope_le (hf : HasDerivWithinAt f f' (Ici x) x)
    (hr : ‖f'‖ < r) : ∃ᶠ z in 𝓝[>] x, ‖z - x‖⁻¹ * ‖f z - f x‖ < r

(hf : HasDerivWithinAt f f' (Set.Ici x) x)

∃ᶠ (z : ℝ) in 𝓝[>] x, ‖z - x‖⁻¹ * ‖f z - f x‖ < r


@[norm_cast, simp]
theorem coe_iSup_of_chain (a : ℕ →o Submodule R M) : (↑(⨆ k, a k) : Set M) = ⋃ k, (a k : Set M)

{R : Type u_1}
{M : Type u_4}
[Semiring R]
[AddCommMonoid M]
[Module R M]
(a : ℕ →o Submodule R M)


@[to_additive] private lemma mabs_mul_eq_mul_mabs_le (hab : a ≤ b) :
    |a * b|ₘ = |a|ₘ * |b|ₘ ↔ 1 ≤ a ∧ 1 ≤ b ∨ a ≤ 1 ∧ b ≤ 1

{α : Type u_1}
[LinearOrderedAddCommGroup α]
{a b : α}
(hab : a ≤ b)

|a + b| = |a| + |b| ↔ 0 ≤ a ∧ 0 ≤ b ∨ a ≤ 0 ∧ b ≤ 0


theorem AEStronglyMeasurable.convolution_integrand' [MeasurableAdd₂ G]
    [MeasurableNeg G] [SFinite ν] (hf : AEStronglyMeasurable f ν)
    (hg : AEStronglyMeasurable g <| map (fun p : G × G => p.1 - p.2) (μ.prod ν)) :
    AEStronglyMeasurable (fun p : G × G => L (f p.2) (g (p.1 - p.2))) (μ.prod ν)

(hf : MeasureTheory.AEStronglyMeasurable f ν)

(hg : MeasureTheory.AEStronglyMeasurable g (MeasureTheory.Measure.map (fun p => p.1 - p.2) (μ.prod ν)))

MeasureTheory.AEStronglyMeasurable (fun p => (L (f p.2)) (g (p.1 - p.2))) (μ.prod ν)


@[simp]
theorem coe_mul (e₁ e₂ : AddAut A) : ⇑(e₁ * e₂) = e₁ ∘ e₂

(A : Type u_1)
[Add A]
(e₁ e₂ : AddAut A)

⇑(e₁ * e₂) = ⇑e₁ ∘ ⇑e₂


theorem sigma_univ_range_eq {f : ∀ i, α i → β i} :
    (univ : Set ι).sigma (fun i ↦ range (f i)) = range fun x : Σ i, α i ↦ ⟨x.1, f _ x.2⟩

{ι : Type u_1}
{α : ι → Type u_3}
{β : ι → Type u_7}
{f : (i : ι) → α i → β i}

(Set.univ.sigma fun i => Set.range (f i)) = Set.range fun x => ⟨x.fst, f x.fst x.snd⟩


lemma Sieve.generateSingleton_eq {X Y : C} (f : Y ⟶ X) :
    Sieve.generate (Presieve.singleton f) = Sieve.generateSingleton f

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

CategoryTheory.Sieve.generate (CategoryTheory.Presieve.singleton f) = CategoryTheory.Sieve.generateSingleton f


theorem isLUB_image' {s : Set α} {x : α} : IsLUB (f '' s) (f x) ↔ IsLUB s x

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


lemma indicator_mul (s : Set ι) (f g : ι → M₀) :
    indicator s (fun i ↦ f i * g i) = fun i ↦ indicator s f i * indicator s g i

{ι : Type u_1}
{M₀ : Type u_4}
[MulZeroClass M₀]
(s : Set ι)
(f g : ι → M₀)

(s.indicator fun i => f i * g i) = fun i => s.indicator f i * s.indicator g i


theorem integral_fintype [MeasurableSingletonClass α] [Fintype α] (f : α → E)
    (hf : Integrable f μ) :
    ∫ x, f x ∂μ = ∑ x, (μ {x}).toReal • f x

{α : Type u_1}
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace ℝ E]
[hE : CompleteSpace E]
{m : MeasurableSpace α}
{μ : MeasureTheory.Measure α}
[MeasurableSingletonClass α]
[Fintype α]
(f : α → E)
(hf : MeasureTheory.Integrable f μ)

∫ (x : α), f x ∂μ = ∑ x : α, (μ {x}).toReal • f x


@[to_additive]
theorem dist_eq_norm_div (a b : E) : dist a b = ‖a / b‖

{E : Type u_6}
[SeminormedGroup E]
(a b : E)


@[simp]
theorem LinearMap.vecCons_apply {n} (f : M →ₗ[R] M₂) (g : M →ₗ[R] Fin n → M₂) (m : M) :
    f.vecCons g m = Matrix.vecCons (f m) (g m)

{R : Type u}
{M : Type v}
{M₂ : Type w}
[Semiring R]
[AddCommMonoid M]
[AddCommMonoid M₂]
[Module R M]
[Module R M₂]
{n : ℕ}
(f : M →ₗ[R] M₂)
(g : M →ₗ[R] Fin n → M₂)
(m : M)

(f.vecCons g) m = Matrix.vecCons (f m) (g m)


@[instance]
theorem hasEqualizer_comp_mono [HasEqualizer f g] {Z : C} (h : Y ⟶ Z) [Mono h] :
    HasEqualizer (f ≫ h) (g ≫ h)

CategoryTheory.Limits.HasEqualizer (CategoryTheory.CategoryStruct.comp f h) (CategoryTheory.CategoryStruct.comp g h)


/-- If `f : R → ℝ` is a nonnegative, multiplicatively bounded function and `x : R` is
  multiplicative for `f`, then `x` is multiplicative for `seminormFromBounded' f`. -/
theorem seminormFromBounded_of_mul_is_mul (f_nonneg : 0 ≤ f)
    (f_mul : ∀ x y : R, f (x * y) ≤ c * f x * f y) {x : R}
    (hx : ∀ y : R, f (x * y) = f x * f y) (y : R) :
    seminormFromBounded' f (x * y) = seminormFromBounded' f x * seminormFromBounded' f y

(f_mul : ∀ (x y : R), f (x * y) ≤ c * f x * f y)


@[to_additive]
theorem divLeft_eq_inv_trans_mulLeft (a : G) :
    Equiv.divLeft a = (Equiv.inv G).trans (Equiv.mulLeft a)

Equiv.subLeft a = Equiv.trans (Equiv.neg G) (Equiv.addLeft a)


theorem HasStrictDerivAt.log (hf : HasStrictDerivAt f f' x) (hx : f x ≠ 0) :
    HasStrictDerivAt (fun y => log (f y)) (f' / f x) x

{f : ℝ → ℝ}
{x f' : ℝ}
(hf : HasStrictDerivAt f f' x)
(hx : f x ≠ 0)

HasStrictDerivAt (fun y => Real.log (f y)) (f' / f x) x


@[to_additive]
theorem _root_.FreeMonoid.mrange_lift {α} (f : α → M) :
    mrange (FreeMonoid.lift f) = closure (Set.range f)

{M : Type u_1}
[AddMonoid M]
{α : Type u_4}
(f : α → M)

AddMonoidHom.mrange (FreeAddMonoid.lift f) = AddSubmonoid.closure (Set.range f)


nonrec theorem NNReal.tendsto_rpow_atTop {y : ℝ} (hy : 0 < y) :
    Tendsto (fun x : ℝ≥0 => x ^ y) atTop atTop

Filter.Tendsto (fun x => x ^ y) Filter.atTop Filter.atTop


lemma leftUnshift_v {n' a : ℤ} (γ : Cochain (K⟦a⟧) L n') (n : ℤ) (hn : n + a = n')
    (p q : ℤ) (hpq : p + n = q) (p' : ℤ) (hp' : p' + n' = q) :
    (γ.leftUnshift n hn).v p q hpq = (a * n' + ((a * (a-1))/2)).negOnePow •
      (K.shiftFunctorObjXIso a p' p (by omega)).inv ≫ γ.v p' q (by omega)

(γ : CochainComplex.HomComplex.Cochain ((CategoryTheory.shiftFunctor (CochainComplex C ℤ) a).obj K) L n')

(γ.leftUnshift n hn).v p q hpq =
  (a * n' + a * (a - 1) / 2).negOnePow • (K.shiftFunctorObjXIso a p' p ⋯).inv ≫ γ.v p' q ⋯


theorem comap_iInf (K : ι → Ideal S) : (iInf K).comap f = ⨅ i, (K i).comap f

{R : Type u}
{S : Type v}
{F : Type u_1}
[Semiring R]
[Semiring S]
[FunLike F R S]
[rc : RingHomClass F R S]
(f : F)
{ι : Sort u_3}
(K : ι → Ideal S)

Ideal.comap f (iInf K) = ⨅ i, Ideal.comap f (K i)


/-- Adjoins a `⊥` to the codomain of a `LatticeHom`. -/
@[simps]
def withTop' [OrderTop β] (f : LatticeHom α β) : LatticeHom (WithTop α) β

{α : Type u_3}
{β : Type u_4}
[Lattice α]
[Lattice β]
[OrderTop β]
(f : LatticeHom α β)


/-- A weighted sum over `s.subtype pred` equals one over `s.filter pred`. -/
theorem weightedVSubOfPoint_subtype_eq_filter (w : ι → k) (p : ι → P) (b : P) (pred : ι → Prop)
    [DecidablePred pred] :
    ((s.subtype pred).weightedVSubOfPoint (fun i => p i) b fun i => w i) =
      (s.filter pred).weightedVSubOfPoint p b w

{k : Type u_1}
{V : Type u_2}
{P : Type u_3}
[Ring k]
[AddCommGroup V]
[Module k V]
[S : AffineSpace V P]
{ι : Type u_4}
(s : Finset ι)
(w : ι → k)
(p : ι → P)
(b : P)
(pred : ι → Prop)
[DecidablePred pred]

(((Finset.subtype pred s).weightedVSubOfPoint (fun i => p ↑i) b) fun i => w ↑i) =
  ((Finset.filter pred s).weightedVSubOfPoint p b) w


theorem hasColimit_iff_hasInitial_cocone (F : J ⥤ C) : HasColimit F ↔ HasInitial (Cocone F)

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

CategoryTheory.Limits.HasColimit F ↔ CategoryTheory.Limits.HasInitial (CategoryTheory.Limits.Cocone F)


/-- Identity map as a homeomorphism. -/
@[simps! (config := .asFn) apply]
protected def refl (X : Type*) [TopologicalSpace X] : X ≃ₜ X


@[simp]
theorem cospan_map_inl {X Y Z : C} (f : X ⟶ Z) (g : Y ⟶ Z) :
    (cospan f g).map WalkingCospan.Hom.inl = f

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

(CategoryTheory.Limits.cospan f g).map CategoryTheory.Limits.WalkingCospan.Hom.inl = f


protected theorem continuousWithinAt {s x} : ContinuousWithinAt e s x

{R : Type u_1}
{R₂ : Type u_2}
{E : Type u_5}
{E₂ : Type u_6}
[Semiring R]
[Semiring R₂]
{σ₁₂ : R →+* R₂}
{σ₂₁ : R₂ →+* R}
[RingHomInvPair σ₁₂ σ₂₁]
[RingHomInvPair σ₂₁ σ₁₂]
[SeminormedAddCommGroup E]
[SeminormedAddCommGroup E₂]
[Module R E]
[Module R₂ E₂]
(e : E ≃ₛₗᵢ[σ₁₂] E₂)
{s : Set E}
{x : E}


@[simp, reassoc]
theorem stalkToFiberRingHom_localizationToStalk (x : PrimeSpectrum.Top R) :
    stalkToFiberRingHom R x ≫ localizationToStalk R x = 𝟙 _

(x : ↑(AlgebraicGeometry.PrimeSpectrum.Top R))

AlgebraicGeometry.StructureSheaf.stalkToFiberRingHom R x ≫ AlgebraicGeometry.StructureSheaf.localizationToStalk R x =
  𝟙 ((AlgebraicGeometry.Spec.structureSheaf R).presheaf.stalk x)


theorem iSup_disjoint_iff {f : ι → α} : Disjoint (⨆ i, f i) a ↔ ∀ i, Disjoint (f i) a

{α : Type u}
{ι : Sort w}
[Order.Frame α]
{a : α}
{f : ι → α}

Disjoint (⨆ i, f i) a ↔ ∀ (i : ι), Disjoint (f i) a


@[simp, norm_cast]
theorem val_mul (x y : s) : (↑(x * y) : R) = ↑x * ↑y

{R : Type u}
[NonUnitalNonAssocRing R]
(s : NonUnitalSubring R)
(x y : ↥s)


lemma nonsingularLift_some (X Y : R) :
    W'.NonsingularLift ⟦![X, Y, 1]⟧ ↔ W'.toAffine.Nonsingular X Y

{R : Type u}
[CommRing R]
{W' : WeierstrassCurve.Jacobian R}
(X Y : R)


@[simp] lemma one_lt_ofENat {m : ℕ∞} : 1 < (m : Cardinal) ↔ 1 < m


@[simp]
theorem zero_compl : (0 : { p : R // IsIdempotentElem p })ᶜ = 1


theorem ContinuousAt.compMeasurePreservingLp (hf : ContinuousAt f z)
    (hg : ContinuousAt g z) (hgm : ∀ z, MeasurePreserving (g z) μ ν) (hp : p ≠ ∞) :
    ContinuousAt (fun z ↦ Lp.compMeasurePreserving (g z) (hgm z) (f z)) z

(hgm : ∀ (z : Z), MeasureTheory.MeasurePreserving (⇑(g z)) μ ν)

ContinuousAt (fun z => (MeasureTheory.Lp.compMeasurePreserving ⇑(g z) ⋯) (f z)) z


protected theorem MeasurableSet.preimage {t : Set β} (ht : MeasurableSet t) (hf : Measurable f) :
    MeasurableSet (f ⁻¹' t)

{α : Type u_1}
{β : Type u_2}
{f : α → β}
{m : MeasurableSpace α}
{mβ : MeasurableSpace β}
{t : Set β}
(ht : MeasurableSet t)
(hf : Measurable f)


theorem tendsto_atBot_iff_leadingCoeff_nonpos :
    Tendsto (fun x => eval x P) atTop atBot ↔ 0 < P.degree ∧ P.leadingCoeff ≤ 0

{𝕜 : Type u_1}
[NormedLinearOrderedField 𝕜]
(P : 𝕜[X])
[OrderTopology 𝕜]

Filter.Tendsto (fun x => Polynomial.eval x P) Filter.atTop Filter.atBot ↔ 0 < P.degree ∧ P.leadingCoeff ≤ 0


@[simp] lemma prod_map_neg (s : Multiset α) : (s.map Neg.neg).prod = (-1) ^ card s * s.prod

{α : Type u_2}
[CommMonoid α]
[HasDistribNeg α]
(s : Multiset α)

(Multiset.map Neg.neg s).prod = (-1) ^ Multiset.card s * s.prod


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

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


theorem enumerate_inj {n₁ n₂ : ℕ} {a : α} {s : Set α} (h_sel : ∀ s a, sel s = some a → a ∈ s)
    (h₁ : enumerate sel s n₁ = some a) (h₂ : enumerate sel s n₂ = some a) : n₁ = n₂

(h_sel : ∀ (s : Set α) (a : α), sel s = some a → a ∈ s)


protected theorem antitoneOn (hf : LocallyBoundedVariationOn f s) {b : α} (bs : b ∈ s) :
    AntitoneOn (fun a => variationOnFromTo f s a b) s

{α : Type u_1}
[LinearOrder α]
{E : Type u_2}
[PseudoEMetricSpace E]
{f : α → E}
{s : Set α}
(hf : LocallyBoundedVariationOn f s)
{b : α}
(bs : b ∈ s)


theorem divByMonic_add_X_sub_C_mul_derivate_divByMonic_eq_derivative
    {K : Type*} [Field K] (f : K[X]) (a : K) :
    f /ₘ (X - C a) + (X - C a) * derivative (f /ₘ (X - C a)) = derivative f

{K : Type u_1}
[Field K]
(f : K[X])
(a : K)

f /ₘ (Polynomial.X - Polynomial.C a) +
    (Polynomial.X - Polynomial.C a) * Polynomial.derivative (f /ₘ (Polynomial.X - Polynomial.C a)) =
  Polynomial.derivative f


@[to_additive (attr := simp)]
theorem pure_div : pure a / g = g.map (a / ·)

{α : Type u_2}
[Div α]
{g : Filter α}
{a : α}

pure a / g = Filter.map (fun x => a / x) g


@[ext high]
theorem ext_of_ring {f g : R →ₐc[R] A} (h : f 1 = g 1) : f = g

{R : Type u_1}
{A : Type u_2}
[CommSemiring R]
[Semiring A]
[Algebra R A]
[CoalgebraStruct R A]
{f g : R →ₐc[R] A}
(h : f 1 = g 1)


@[simp]
theorem bihimp_bihimp_cancel_left : a ⇔ (a ⇔ b) = b

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


theorem IsBigOWith.congr (h : IsBigOWith c₁ l f₁ g₁) (hc : c₁ = c₂) (hf : ∀ x, f₁ x = f₂ x)
    (hg : ∀ x, g₁ x = g₂ x) : IsBigOWith c₂ l f₂ g₂

{α : Type u_1}
{E : Type u_3}
{F : Type u_4}
[Norm E]
[Norm F]
{c₁ c₂ : ℝ}
{l : Filter α}
{f₁ f₂ : α → E}
{g₁ g₂ : α → F}
(h : Asymptotics.IsBigOWith c₁ l f₁ g₁)
(hc : c₁ = c₂)
(hf : ∀ (x : α), f₁ x = f₂ x)
(hg : ∀ (x : α), g₁ x = g₂ x)


/-- The functor `(C ⥤ D) ⥤ (Arrow C ⥤ Arrow D)` which sends
a functor `F : C ⥤ D` to `F.mapArrow`. -/
@[simps]
def mapArrowFunctor : (C ⥤ D) ⥤ (Arrow C ⥤ Arrow D)

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

∀ {X Y : CategoryTheory.Functor C D} (τ : X ⟶ Y) (f : CategoryTheory.Arrow C),
  (((CategoryTheory.Functor.mapArrowFunctor C D).map τ).app f).right = τ.app f.right


theorem sin_sub_sin : sin x - sin y = 2 * sin ((x - y) / 2) * cos ((x + y) / 2)

Complex.sin x - Complex.sin y = 2 * Complex.sin ((x - y) / 2) * Complex.cos ((x + y) / 2)


@[simp] lemma toNat_toENat (a : Cardinal) : ENat.toNat (toENat a) = toNat a

(Cardinal.toENat a).toNat = Cardinal.toNat a


/-- See also `Finset.prod_ite_eq`. -/
@[to_additive "See also `Finset.sum_ite_eq`."]
lemma prod_ite_eq (i : ι) (f : ι → α) : ∏ j, (if i = j then f j else 1) = f i

{ι : Type u_6}
{α : Type u_8}
[Fintype ι]
[AddCommMonoid α]
[DecidableEq ι]
(i : ι)
(f : ι → α)

(∑ j : ι, if i = j then f j else 0) = f i


/-- Specialisation of `Nat.cast_nonneg'`, which seems to be easier for Lean to use. -/
@[simp]
theorem cast_nonneg {α} [OrderedSemiring α] (n : ℕ) : 0 ≤ (n : α)

{α : Type u_3}
[OrderedSemiring α]
(n : ℕ)


@[to_additive]
theorem ofHom_apply {X Y : Type _} [Group X] [Group Y] (f : X →* Y) (x : X) :
    (ofHom f) x = f x

{X Y : Type u_1}
[AddGroup X]
[AddGroup Y]
(f : X →+ Y)
(x : X)


@[to_additive IsOfFinAddOrder.prod_mk]
theorem IsOfFinOrder.prod_mk : IsOfFinOrder a → IsOfFinOrder b → IsOfFinOrder (a, b)

{α : Type u_4}
{β : Type u_5}
[Monoid α]
[Monoid β]
{a : α}
{b : β}


/-- Every CardinalInterFilter for some c also is a CardinalInterFilter for some a ≤ c -/
theorem CardinalInterFilter.of_cardinalInterFilter_of_le (l : Filter α) [CardinalInterFilter l c]
    {a : Cardinal.{u}} (hac : a ≤ c) :
    CardinalInterFilter l a

{α : Type u}
{c : Cardinal.{u}}
(l : Filter α)
[CardinalInterFilter l c]
{a : Cardinal.{u}}
(hac : a ≤ c)


/-- The product type `X × Y` forms a cone for the binary product of `X` and `Y`. -/
@[simps! pt]
def binaryProductCone (X Y : Type u) : BinaryFan X Y

(CategoryTheory.Limits.Types.binaryProductCone X Y).pt = (X × Y)


/-- The only closed subfields of `ℂ` are `ℝ` and `ℂ`. -/
theorem Complex.subfield_eq_of_closed {K : Subfield ℂ} (hc : IsClosed (K : Set ℂ)) :
    K = ofReal.fieldRange ∨ K = ⊤


theorem vars_def [DecidableEq σ] (p : MvPolynomial σ R) : p.vars = p.degrees.toFinset

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


/-- Each element of the monoid defines a semiring homomorphism. -/
@[simps!]
def MulSemiringAction.toRingHom [MulSemiringAction M R] (x : M) : R →+* R

(M : Type u_1)
[Monoid M]
(R : Type v)
[Semiring R]
[MulSemiringAction M R]
(x : M)

∀ (x_1 : R), (MulSemiringAction.toRingHom M R x) x_1 = x • x_1


@[to_additive (attr := simp)]
theorem mem_top (x : G) : x ∈ (⊤ : Subgroup G)


theorem length_pos_iff_ne_nil {l : List α} : 0 < length l ↔ l ≠ []


theorem IsFiniteMeasure.IicSnd {ρ : Measure (α × ℝ)} [IsFiniteMeasure ρ] (r : ℝ) :
    IsFiniteMeasure (ρ.IicSnd r)

{α : Type u_1}
{mα : MeasurableSpace α}
{ρ : MeasureTheory.Measure (α × ℝ)}
[MeasureTheory.IsFiniteMeasure ρ]
(r : ℝ)


@[simp]
theorem Units.mem_posSubgroup {R : Type*} [LinearOrderedSemiring R] (u : Rˣ) :
    u ∈ Units.posSubgroup R ↔ (0 : R) < u

{R : Type u_1}
[LinearOrderedSemiring R]
(u : Rˣ)


theorem ne_and_not_mem_of_not_mem_cons {a y : α} {l : List α} : a ∉ y::l → a ≠ y ∧ a ∉ l


@[to_additive]
protected theorem surjective (e : M ≃* N) : Function.Surjective e

{M : Type u_6}
{N : Type u_7}
[Add M]
[Add N]
(e : M ≃+ N)


theorem toJordanDecomposition_spec (s : SignedMeasure α) :
    ∃ (i : Set α) (hi₁ : MeasurableSet i) (hi₂ : 0 ≤[i] s) (hi₃ : s ≤[iᶜ] 0),
      s.toJordanDecomposition.posPart = s.toMeasureOfZeroLE i hi₁ hi₂ ∧
        s.toJordanDecomposition.negPart = s.toMeasureOfLEZero iᶜ hi₁.compl hi₃

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

∃ i,
  ∃ (hi₁ : MeasurableSet i) (hi₂ : MeasureTheory.VectorMeasure.restrict 0 i ≤ MeasureTheory.VectorMeasure.restrict s i)
    (hi₃ : MeasureTheory.VectorMeasure.restrict s iᶜ ≤ MeasureTheory.VectorMeasure.restrict 0 iᶜ),
    s.toJordanDecomposition.posPart = s.toMeasureOfZeroLE i hi₁ hi₂ ∧
      s.toJordanDecomposition.negPart = s.toMeasureOfLEZero iᶜ ⋯ hi₃


protected theorem mul_nonpos_of_nonneg_of_nonpos {a b : Int}
  (ha : 0 ≤ a) (hb : b ≤ 0) : a * b ≤ 0


@[simp]
theorem pi_inf_principal_univ_pi_eq_bot :
    pi f ⊓ 𝓟 (Set.pi univ s) = ⊥ ↔ ∃ i, f i ⊓ 𝓟 (s i) = ⊥

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

Filter.pi f ⊓ 𝓟 (Set.univ.pi s) = ⊥ ↔ ∃ i, f i ⊓ 𝓟 (s i) = ⊥


theorem setLIntegral_one (s) : ∫⁻ _ in s, 1 ∂μ = μ s

{α : Type u_1}
{m : MeasurableSpace α}
{μ : MeasureTheory.Measure α}
(s : Set α)


theorem setToFun_congr_left (hT : DominatedFinMeasAdditive μ T C)
    (hT' : DominatedFinMeasAdditive μ T' C') (h : T = T') (f : α → E) :
    setToFun μ T hT f = setToFun μ T' hT' f

(hT : MeasureTheory.DominatedFinMeasAdditive μ T C)

(hT' : MeasureTheory.DominatedFinMeasAdditive μ T' C')

MeasureTheory.setToFun μ T hT f = MeasureTheory.setToFun μ T' hT' f


/-- Construct an isomorphism of bimodules by giving an isomorphism between the underlying objects
and checking compatibility with left and right actions only in the forward direction.
-/
@[simps]
def isoOfIso {X Y : Mon_ C} {P Q : Bimod X Y} (f : P.X ≅ Q.X)
    (f_left_act_hom : P.actLeft ≫ f.hom = (X.X ◁ f.hom) ≫ Q.actLeft)
    (f_right_act_hom : P.actRight ≫ f.hom = (f.hom ▷ Y.X) ≫ Q.actRight) : P ≅ Q

(f_left_act_hom : P.actLeft ≫ f.hom = X.X ◁ f.hom ≫ Q.actLeft)

(f_right_act_hom : P.actRight ≫ f.hom = f.hom ▷ Y.X ≫ Q.actRight)

(Bimod.isoOfIso f f_left_act_hom f_right_act_hom).hom.hom = f.hom


@[to_additive]
theorem QuotientGroup.isClosedMap_coe {H : Subgroup G} (hH : IsCompact (H : Set G)) :
    IsClosedMap ((↑) : G → G ⧸ H)

{G : Type w}
[TopologicalSpace G]
[AddGroup G]
[TopologicalAddGroup G]
{H : AddSubgroup G}
(hH : IsCompact ↑H)


theorem toEnd (it : String.Iterator) : Valid it.toEnd


lemma num_le_mul_inv (I : FractionalIdeal R₁⁰ K) : I.num ≤ I * I⁻¹

{K : Type u_3}
[Field K]
{R₁ : Type u_4}
[CommRing R₁]
[IsDomain R₁]
[Algebra R₁ K]
[IsFractionRing R₁ K]
(I : FractionalIdeal R₁⁰ K)


@[simp]
theorem toLinearEquiv'_apply (P : Matrix n n R) (h : Invertible P) :
    (P.toLinearEquiv' h : Module.End R (n → R)) = Matrix.toLin' P

{n : Type u_1}
[Fintype n]
{R : Type u_2}
[CommRing R]
[DecidableEq n]
(P : Matrix n n R)
(h : Invertible P)


a < USize.size → ↑(USize.ofNat a).val = a


@[simps]
instance limitLaxMonoidal : LaxMonoidal fun F : J ⥤ C => limit F

CategoryTheory.LaxMonoidal.μ F G =
  CategoryTheory.Limits.limit.lift (F ⊗ G)
    { pt := CategoryTheory.Limits.limit F ⊗ CategoryTheory.Limits.limit G,
      π := { app := fun j => CategoryTheory.Limits.limit.π F j ⊗ CategoryTheory.Limits.limit.π G j, naturality := ⋯ } }


/-- Given three nonzero vectors, the angle between the second and the third plus the angle
between the first and the second equals the angle between the first and the third. -/
@[simp]
theorem oangle_add_swap {x y z : V} (hx : x ≠ 0) (hy : y ≠ 0) (hz : z ≠ 0) :
    o.oangle y z + o.oangle x y = o.oangle x z

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


/-- A subtype `{x // p x ∨ q x}` over a disjunction of `p q : α → Prop` is equivalent to a sum of
subtypes `{x // p x} ⊕ {x // q x}` such that `¬ p x` is sent to the right, when
`Disjoint p q`.

See also `Equiv.sumCompl`, for when `IsCompl p q`.  -/
@[simps apply]
def subtypeOrEquiv (p q : α → Prop) [DecidablePred p] (h : Disjoint p q) :
    { x // p x ∨ q x } ≃ { x // p x } ⊕ { x // q x }

{α : Type u_1}
(p q : α → Prop)
[DecidablePred p]
(h : Disjoint p q)
(a : { x // p x ∨ q x })

(subtypeOrEquiv p q h) a = (subtypeOrLeftEmbedding p q) a


/-- A version of `ODE_solution_unique_of_mem_Icc` for uniqueness in an open interval. -/
theorem ODE_solution_unique_of_mem_Ioo
    (ht : t₀ ∈ Ioo a b)
    (hf : ∀ t ∈ Ioo a b, HasDerivAt f (v t (f t)) t ∧ f t ∈ s t)
    (hg : ∀ t ∈ Ioo a b, HasDerivAt g (v t (g t)) t ∧ g t ∈ s t)
    (heq : f t₀ = g t₀) :
    EqOn f g (Ioo a b)

(hv : ∀ (t : ℝ), LipschitzOnWith K (v t) (s t))

(hf : ∀ t ∈ Set.Ioo a b, HasDerivAt f (v t (f t)) t ∧ f t ∈ s t)

(hg : ∀ t ∈ Set.Ioo a b, HasDerivAt g (v t (g t)) t ∧ g t ∈ s t)


theorem IsChain.succ (hs : IsChain r s) : IsChain r (SuccChain r s)

{α : Type u_1}
{r : α → α → Prop}
{s : Set α}
(hs : IsChain r s)


theorem integrable_martingalePart (hf_int : ∀ n, Integrable (f n) μ) (n : ℕ) :
    Integrable (martingalePart f ℱ μ n) μ

(hf_int : ∀ (n : ℕ), MeasureTheory.Integrable (f n) μ)

MeasureTheory.Integrable (MeasureTheory.martingalePart f ℱ μ n) μ


/--
Another auxiliary lemma for `Basis.le_span`, which does not require assuming the basis is finite,
but still assumes we have a finite spanning set.
-/
theorem basis_le_span' {ι : Type*} (b : Basis ι R M) {w : Set M} [Fintype w] (s : span R w = ⊤) :
    #ι ≤ Fintype.card w

{R : Type u}
{M : Type v}
[Ring R]
[AddCommGroup M]
[Module R M]
[RankCondition R]
{ι : Type u_1}
(b : Basis ι R M)
{w : Set M}
[Fintype ↑w]
(s : Submodule.span R w = ⊤)


/-- The map `Square Cᵒᵖ → Square C` which switches `X₁` and `X₃`, but
does not move `X₂` and `X₃`. -/
@[simps]
protected def unop (sq : Square Cᵒᵖ) : Square C

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


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

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

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


@[simp] theorem lookup_insert_eq_none {l : AList β} {k k' : α} {v : β k} :
    (l.insert k v).lookup k' = none ↔ (k' ≠ k) ∧ l.lookup k' = none

{α : Type u}
{β : α → Type v}
[DecidableEq α]
{l : AList β}
{k k' : α}
{v : β k}

AList.lookup k' (AList.insert k v l) = none ↔ k' ≠ k ∧ AList.lookup k' l = none


@[simp] lemma T_empty (f : (∀ i, A i) → ℝ≥0∞) (x : ∀ i, A i) :
    T μ p f ∅ x = f x ^ (1 + p)

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

MeasureTheory.GridLines.T μ p f ∅ x = f x ^ (1 + p)


theorem projectSubobject_factors [HasLimits C] [PreservesLimits T] {A : StructuredArrow S T} :
    ∀ P : Subobject A, ∃ q, q ≫ T.map (projectSubobject P).arrow = A.hom

{A : CategoryTheory.StructuredArrow S T}

∃ q, CategoryTheory.CategoryStruct.comp q (T.map (CategoryTheory.StructuredArrow.projectSubobject P).arrow) = A.hom


theorem closure_sup_closure_left (x y : α) : c (c x ⊔ y) = c (x ⊔ y)

{α : Type u_1}
[SemilatticeSup α]
(c : ClosureOperator α)
(x y : α)


protected theorem IsBoundedBilinearMap.isBigO (h : IsBoundedBilinearMap 𝕜 f) :
    f =O[⊤] fun p : E × F => ‖p.1‖ * ‖p.2‖

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


protected theorem Periodic.const_smul [AddMonoid α] [Group γ] [DistribMulAction γ α]
    (h : Periodic f c) (a : γ) : Periodic (fun x => f (a • x)) (a⁻¹ • c)

{α : Type u_1}
{β : Type u_2}
{γ : Type u_3}
{f : α → β}
{c : α}
[AddMonoid α]
[Group γ]
[DistribMulAction γ α]
(h : Function.Periodic f c)
(a : γ)

Function.Periodic (fun x => f (a • x)) (a⁻¹ • c)


theorem Decidable.and_or_not_and_not_of_iff {p q : Prop} [Decidable q] (h : p ↔ q) :
    (p ∧ q) ∨ (¬p ∧ ¬q)

p ∧ q ∨ ¬p ∧ ¬q


@[to_additive (attr := simp)]
theorem edist_div_right [DivInvMonoid M] [PseudoEMetricSpace M] [IsometricSMul Mᵐᵒᵖ M]
    (a b c : M) : edist (a / c) (b / c) = edist a b

{M : Type u}
[DivInvMonoid M]
[PseudoEMetricSpace M]
[IsometricSMul Mᵐᵒᵖ M]
(a b c : M)


protected theorem unique [PartialOrder α] [Preorder β] {f : α → β} {g₁ g₂ : β → α}
    (h₁ : IsOrderRightAdjoint f g₁) (h₂ : IsOrderRightAdjoint f g₂) : g₁ = g₂

{α : Type u_1}
{β : Type u_2}
[PartialOrder α]
[Preorder β]
{f : α → β}
{g₁ g₂ : β → α}
(h₁ : IsOrderRightAdjoint f g₁)
(h₂ : IsOrderRightAdjoint f g₂)


@[simp]
theorem deg_one : (1 : NumDenSameDeg 𝒜 x).deg = 0

{ι : Type u_1}
{R : Type u_2}
{A : Type u_3}
[AddCommMonoid ι]
[DecidableEq ι]
[CommRing R]
[CommRing A]
[Algebra R A]
{𝒜 : ι → Submodule R A}
[GradedAlgebra 𝒜]
(x : Submonoid A)

HomogeneousLocalization.NumDenSameDeg.deg 1 = 0


@[to_additive two_nsmul_inf_eq_add_sub_abs_sub]
lemma inf_sq_eq_mul_div_mabs_div (a b : α) : (a ⊓ b) ^ 2 = a * b / |b / a|ₘ

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


theorem toQuadraticMap_associated : (associatedHom S Q).toQuadraticMap = Q

(S : Type u_1)
{R : Type u_3}
{M : Type u_4}
{N : Type u_5}
[CommRing R]
[AddCommGroup M]
[Module R M]
[AddCommGroup N]
[Module R N]
[CommSemiring S]
[Algebra S R]
[Module S N]
[IsScalarTower S R N]
[Invertible 2]
(Q : QuadraticMap R M N)

((QuadraticMap.associatedHom S) Q).toQuadraticMap = Q


@[continuity]
theorem continuous_coe : Continuous (coe : ℝ → ℍ)


/-- This mixin class describes an order where all intervals bounded above are finite. This is
slightly weaker than `LocallyFiniteOrder` + `OrderBot` as it allows empty types. -/
class LocallyFiniteOrderBot (α : Type*) [Preorder α] where
  /-- Left-infinite right-open interval -/
  finsetIio : α → Finset α
  /-- Left-infinite right-closed interval -/
  finsetIic : α → Finset α
  /-- `x ∈ finsetIic a ↔ x ≤ a` -/
  finset_mem_Iic : ∀ a x : α, x ∈ finsetIic a ↔ x ≤ a
  /-- `x ∈ finsetIio a ↔ x < a` -/
  finset_mem_Iio : ∀ a x : α, x ∈ finsetIio a ↔ x < a

{α : Type u_1}
[Preorder α]
[self : LocallyFiniteOrderBot α]
(a x : α)

x ∈ LocallyFiniteOrderBot.finsetIio a ↔ x < a


@[simp]
lemma memPartitionSet_zero (f : ℕ → Set α) (a : α) : memPartitionSet f 0 a = univ


/-- Two measures are equal if they are equal on the π-system generating the σ-algebra,
  and they are both finite on an increasing spanning sequence of sets in the π-system.
  This lemma is formulated using `iUnion`.
  `FiniteSpanningSetsIn.ext` is a reformulation of this lemma. -/
theorem ext_of_generateFrom_of_iUnion (C : Set (Set α)) (B : ℕ → Set α) (hA : ‹_› = generateFrom C)
    (hC : IsPiSystem C) (h1B : ⋃ i, B i = univ) (h2B : ∀ i, B i ∈ C) (hμB : ∀ i, μ (B i) ≠ ∞)
    (h_eq : ∀ s ∈ C, μ s = ν s) : μ = ν

(hA : m0 = MeasurableSpace.generateFrom C)


/-- The second projection of a product is a non-unital alg_hom. -/
@[simps]
def snd : A × B →ₙₐ[R] B

(R : Type u)
[Monoid R]
(A : Type v)
(B : Type w)
[NonUnitalNonAssocSemiring A]
[DistribMulAction R A]
[NonUnitalNonAssocSemiring B]
[DistribMulAction R B]
(self : A × B)

(NonUnitalAlgHom.snd R A B) self = self.2


/-- A group element has finite order iff its order is positive. -/
@[to_additive
      "A group element has finite additive order iff its order is positive."]
theorem orderOf_pos_iff : 0 < orderOf x ↔ IsOfFinOrder x


@[to_additive]
theorem const_div [Div γ] [MeasurableDiv γ] (h : IdentDistrib f g μ ν) (c : γ) :
    IdentDistrib (fun x => c / f x) (fun x => c / g x) μ ν

(h : ProbabilityTheory.IdentDistrib f g μ ν)

ProbabilityTheory.IdentDistrib (fun x => c - f x) (fun x => c - g x) μ ν


/-- Given a linear map `f : N → P`, `f ⊗ M` is bijective if and only if `M ⊗ f` is bijective. -/
theorem lTensor_bij_iff_rTensor_bij :
    Function.Bijective (lTensor M f) ↔ Function.Bijective (rTensor M f)

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

Function.Bijective ⇑(LinearMap.lTensor M f) ↔ Function.Bijective ⇑(LinearMap.rTensor M f)


@[simp] lemma add_apply {f g : E →WOT[𝕜] F} (x : E) : (f + g) x = f x + g x

{𝕜 : Type u_1}
{E : Type u_2}
{F : Type u_3}
[RCLike 𝕜]
[AddCommGroup E]
[TopologicalSpace E]
[Module 𝕜 E]
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{f g : E →WOT[𝕜]F}
(x : E)


@[simp, nolint simpNF]
protected lemma neg_neg_iff_pos : -a < 0 ↔ 0 < a


theorem idealFactorsEquivOfQuotEquiv_symm :
    (idealFactorsEquivOfQuotEquiv f).symm = idealFactorsEquivOfQuotEquiv f.symm

{R : Type u_1}
{A : Type u_2}
[CommRing R]
[CommRing A]
[IsDedekindDomain A]
{I : Ideal R}
{J : Ideal A}
[IsDedekindDomain R]
(f : R ⧸ I ≃+* A ⧸ J)


@[simp]
theorem inv_zero : (0 : Matrix n n α)⁻¹ = 0

{n : Type u'}
{α : Type v}
[Fintype n]
[DecidableEq n]
[CommRing α]


@[simp]
theorem type_fintype (r : α → α → Prop) [IsWellOrder α r] [Fintype α] :
    type r = Fintype.card α

{α : Type u}
(r : α → α → Prop)
[IsWellOrder α r]
[Fintype α]


theorem LocallyFinite.smul_right [Zero M] [SMulZeroClass R M]
    {f : ι → X → M} (h : LocallyFinite fun i ↦ support <| f i) (s : ι → X → R) :
    LocallyFinite fun i ↦ support <| s i • f i

(h : LocallyFinite fun i => Function.support (f i))

LocallyFinite fun i => Function.support (s i • f i)


theorem size_eq_length_data (as : Array α) : as.size = as.data.length


/-- An element is in the closure of a two-element set if it is a linear combination of those two
elements. -/
@[to_additive
      "An element is in the closure of a two-element set if it is a linear combination of
      those two elements."]
theorem mem_closure_pair {A : Type*} [CommMonoid A] (a b c : A) :
    c ∈ Submonoid.closure ({a, b} : Set A) ↔ ∃ m n : ℕ, a ^ m * b ^ n = c

{A : Type u_4}
[AddCommMonoid A]
(a b c : A)

c ∈ AddSubmonoid.closure {a, b} ↔ ∃ m n, m • a + n • b = c


lemma ProbabilityMeasure.toMeasure_add_pos_gt_mem_nhds (P : ProbabilityMeasure Ω)
    {G : Set Ω} (G_open : IsOpen G) {ε : ℝ≥0∞} (ε_pos : 0 < ε) :
    {Q | P.toMeasure G < Q.toMeasure G + ε} ∈ 𝓝 P

(P : MeasureTheory.ProbabilityMeasure Ω)


theorem dist_nonneg {x y : α} : 0 ≤ dist x y

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


theorem isPiSystem_Ico_mem (s t : Set α) :
    IsPiSystem { S | ∃ᵉ (l ∈ s) (u ∈ t), l < u ∧ Ico l u = S }

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

IsPiSystem {S | ∃ l ∈ s, ∃ u ∈ t, l < u ∧ Set.Ico l u = S}


@[simp]
theorem isBigO_neg_left : (fun x => -f' x) =O[l] g ↔ f' =O[l] g

{α : Type u_1}
{F : Type u_4}
{E' : Type u_6}
[Norm F]
[SeminormedAddCommGroup E']
{g : α → F}
{f' : α → E'}
{l : Filter α}


/-- An operator is zero iff its norm vanishes. -/
theorem opNorm_zero_iff [RingHomIsometric σ₁₂] : ‖f‖ = 0 ↔ f = 0

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


protected theorem contMDiffAt (h : M ≃ₘ^n⟮I, I'⟯ M') {x} : ContMDiffAt I I' n h x

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


theorem mul_int (h : LiouvilleWith p x) (hm : m ≠ 0) : LiouvilleWith p (x * m)

{p x : ℝ}
{m : ℤ}
(h : LiouvilleWith p x)
(hm : m ≠ 0)


theorem l_iInf_of_ul_eq_self [CompleteLattice α] [CompleteLattice β] (gi : GaloisInsertion l u)
    {ι : Sort x} (f : ι → α) (hf : ∀ i, u (l (f i)) = f i) : l (⨅ i, f i) = ⨅ i, l (f i)

{α : Type u}
{β : Type v}
{l : α → β}
{u : β → α}
[CompleteLattice α]
[CompleteLattice β]
(gi : GaloisInsertion l u)
{ι : Sort x}
(f : ι → α)
(hf : ∀ (i : ι), u (l (f i)) = f i)


@[to_additive]
lemma ofUnits_injective : Function.Injective (ofUnits (M := M))


/-- Any mono factorisation of `f` gives a mono factorisation of `g ≫ f`. -/
@[simps]
def isoComp (F : MonoFactorisation f) {X' : C} (g : X' ⟶ X) : MonoFactorisation (g ≫ f)

(F : CategoryTheory.Limits.MonoFactorisation f)


/-- The equivalence between arrows of the form `A ⟶ B` and `B.unop ⟶ A.unop`. Useful for building
adjunctions.
Note that this (definitionally) gives variants
```
def opEquiv' (A : C) (B : Cᵒᵖ) : (Opposite.op A ⟶ B) ≃ (B.unop ⟶ A) :=
  opEquiv _ _

def opEquiv'' (A : Cᵒᵖ) (B : C) : (A ⟶ Opposite.op B) ≃ (B ⟶ A.unop) :=
  opEquiv _ _

def opEquiv''' (A B : C) : (Opposite.op A ⟶ Opposite.op B) ≃ (B ⟶ A) :=
  opEquiv _ _
```
-/
@[simps]
def opEquiv (A B : Cᵒᵖ) : (A ⟶ B) ≃ (B.unop ⟶ A.unop)

{C : Type u₁}
[CategoryTheory.Category.{v₁, u₁} C]
(A B : Cᵒᵖ)
(f : A ⟶ B)


theorem filter_coprime_Ico_eq_totient (a n : ℕ) :
    ((Ico n (n + a)).filter (Coprime a)).card = totient a

(Finset.filter a.Coprime (Finset.Ico n (n + a))).card = a.totient


/-- Cauchy's **Mean Value Theorem**, extended `HasDerivAt` version. -/
theorem exists_ratio_hasDerivAt_eq_ratio_slope' {lfa lga lfb lgb : ℝ}
    (hff' : ∀ x ∈ Ioo a b, HasDerivAt f (f' x) x) (hgg' : ∀ x ∈ Ioo a b, HasDerivAt g (g' x) x)
    (hfa : Tendsto f (𝓝[>] a) (𝓝 lfa)) (hga : Tendsto g (𝓝[>] a) (𝓝 lga))
    (hfb : Tendsto f (𝓝[<] b) (𝓝 lfb)) (hgb : Tendsto g (𝓝[<] b) (𝓝 lgb)) :
    ∃ c ∈ Ioo a b, (lgb - lga) * f' c = (lfb - lfa) * g' c

(hff' : ∀ x ∈ Set.Ioo a b, HasDerivAt f (f' x) x)

(hgg' : ∀ x ∈ Set.Ioo a b, HasDerivAt g (g' x) x)

(hfa : Filter.Tendsto f (𝓝[>] a) (𝓝 lfa))

(hga : Filter.Tendsto g (𝓝[>] a) (𝓝 lga))

(hfb : Filter.Tendsto f (𝓝[<] b) (𝓝 lfb))

(hgb : Filter.Tendsto g (𝓝[<] b) (𝓝 lgb))

∃ c ∈ Set.Ioo a b, (lgb - lga) * f' c = (lfb - lfa) * g' c


theorem mul_hatInv_cancel {x : hat K} (x_ne : x ≠ 0) : x * hatInv x = 1

{K : Type u_1}
[Field K]
[UniformSpace K]
[TopologicalDivisionRing K]
[CompletableTopField K]
[UniformAddGroup K]
{x : hat K}
(x_ne : x ≠ 0)


/-- A generalisation of the **Cauchy-Davenport theorem** to arbitrary groups. The size of `s * t` is
lower-bounded by `|s| + |t| - 1` unless this quantity is greater than the size of the smallest
subgroup. -/
@[to_additive "A generalisation of the **Cauchy-Davenport theorem** to arbitrary groups. The size of
`s + t` is lower-bounded by `|s| + |t| - 1` unless this quantity is greater than the size of the
smallest subgroup."]
lemma Finset.min_le_card_mul (hs : s.Nonempty) (ht : t.Nonempty) :
    min (minOrder α) ↑(s.card + t.card - 1) ≤ (s * t).card

{α : Type u_1}
[AddGroup α]
[DecidableEq α]
{s t : Finset α}
(hs : s.Nonempty)
(ht : t.Nonempty)

min (AddMonoid.minOrder α) ↑(s.card + t.card - 1) ≤ ↑(s + t).card


@[to_additive]
lemma iIndepFun.indepFun_mul_mul (hf_indep : iIndepFun (fun _ ↦ m) f κ μ)
    (hf_meas : ∀ i, Measurable (f i))
    (i j k l : ι) (hik : i ≠ k) (hil : i ≠ l) (hjk : j ≠ k) (hjl : j ≠ l) :
    IndepFun (f i * f j) (f k * f l) κ μ

{f : ι → Ω → β}

(hf_indep : ProbabilityTheory.Kernel.iIndepFun (fun x => m) f κ μ)

ProbabilityTheory.Kernel.IndepFun (f i + f j) (f k + f l) κ μ


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

{α : Type u}
[Monoid α]
{u : αˣ}
{a : α}
(h : a * ↑u = 1)


@[reassoc]
lemma shiftMap_comp {X Y Z : C} {n : M} (f : X ⟶ Y⟦n⟧) (g : Y ⟶ Z) (a a' : M) (ha' : n + a = a') :
    F.shiftMap (f ≫ g⟦n⟧') a a' ha' = F.shiftMap f a a' ha' ≫ (F.shift a').map g

(f : X ⟶ (CategoryTheory.shiftFunctor C n).obj Y)

F.shiftMap (f ≫ (CategoryTheory.shiftFunctor C n).map g) a a' ha' = F.shiftMap f a a' ha' ≫ (F.shift a').map g


theorem findIdx?_of_eq_none {xs : List α} {p : α → Bool} (w : xs.findIdx? p = none) :
    ∀ i, match xs.get? i with | some a => ¬ p a | none => true

{α : Type u_1}
{xs : List α}
{p : α → Bool}
(w : List.findIdx? p xs = none)
(i : Nat)

match xs.get? i with
| some a => ¬p a = true
| none => true = true


theorem tendsto_iff_forall_eventually_mem {f : α → β} {l₁ : Filter α} {l₂ : Filter β} :
    Tendsto f l₁ l₂ ↔ ∀ s ∈ l₂, ∀ᶠ x in l₁, f x ∈ s

{α : Type u}
{β : Type v}
{f : α → β}
{l₁ : Filter α}
{l₂ : Filter β}

Filter.Tendsto f l₁ l₂ ↔ ∀ s ∈ l₂, ∀ᶠ (x : α) in l₁, f x ∈ s


@[simp]
theorem coe_restrictScalarsₗ : ⇑(restrictScalarsₗ A M M₂ R S) = restrictScalars R

{A : Type u_1}
{M : Type u_2}
{M₂ : Type u_3}
[Ring A]
[AddCommGroup M]
[AddCommGroup M₂]
[Module A M]
[Module A M₂]
[TopologicalSpace M]
[TopologicalSpace M₂]
{R : Type u_4}
[Ring R]
[Module R M]
[Module R M₂]
[LinearMap.CompatibleSMul M M₂ R A]
{S : Type u_5}
[Ring S]
[Module S M₂]
[ContinuousConstSMul S M₂]
[SMulCommClass A S M₂]
[SMulCommClass R S M₂]
[TopologicalAddGroup M₂]

⇑(ContinuousLinearMap.restrictScalarsₗ A M M₂ R S) = ContinuousLinearMap.restrictScalars R


@[simp]
theorem coe_toHomeomorph_symm (e : α ≃o β) : ⇑e.toHomeomorph.symm = e.symm

{α : Type u_1}
{β : Type u_2}
[PartialOrder α]
[PartialOrder β]
[TopologicalSpace α]
[TopologicalSpace β]
[OrderTopology α]
[OrderTopology β]
(e : α ≃o β)


@[simp, norm_cast]
lemma coe_sup [∀ i, SemilatticeSup (α i)] (f g : Π₀ i, α i) : f ⊔ g = ⇑f ⊔ g

{ι : Type u_1}
{α : ι → Type u_2}
[(i : ι) → Zero (α i)]
[(i : ι) → SemilatticeSup (α i)]
(f g : Π₀ (i : ι), α i)


@[to_additive (attr := simp, nolint simpNF)]
theorem of_mulEquivOfMulEquiv_apply {k : LocalizationMap T Q} {j : M ≃* P}
    (H : S.map j.toMonoidHom = T) (x) :
    (f.ofMulEquivOfLocalizations (f.mulEquivOfMulEquiv k H)).toMap x = k.toMap (j x)

{M : Type u_1}
[CommMonoid M]
{S : Submonoid M}
{N : Type u_2}
[CommMonoid N]
{P : Type u_3}
[CommMonoid P]
(f : S.LocalizationMap N)
{T : Submonoid P}
{Q : Type u_4}
[CommMonoid Q]
{k : T.LocalizationMap Q}
{j : M ≃* P}
(H : Submonoid.map j.toMonoidHom S = T)
(x : M)


@[simp] theorem sub_imK : (a - b).imK = a.imK - b.imK

{R : Type u_3}
[CommRing R]
(a b : ℍ[R])


@[simp]
theorem map_join (f : α → β) (S : Multiset (Multiset α)) :
    map f (join S) = join (map (map f) S)

{α : Type u_1}
{β : Type v}
(f : α → β)
(S : Multiset (Multiset α))

Multiset.map f S.join = (Multiset.map (Multiset.map f) S).join


theorem map_injective {f : α → β} (hf : Injective f) (n : ℕ) :
    Injective (map f : Sym α n → Sym β n)

{α : Type u_1}
{β : Type u_2}
{f : α → β}
(hf : Function.Injective f)
(n : ℕ)


@[simp]
theorem basicOpen_one : basicOpen 𝒜 (1 : A) = ⊤

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


@[to_additive (attr := simp)]
lemma ofHom_apply {X Y : Type u} [Monoid X] [Monoid Y] (f : X →* Y) (x : X) :
    (ofHom f) x = f x


theorem findIdxs_eq_map_indexesValues (p : α → Prop) [DecidablePred p] (as : List α) :
    findIdxs p as = map Prod.fst (indexesValues p as)

{α : Type u}
(p : α → Prop)
[DecidablePred p]
(as : List α)

List.findIdxs (fun b => decide (p b)) as = List.map Prod.fst (List.indexesValues (fun b => decide (p b)) as)


lemma injOn_pow_mul {n : ℕ} {ζ : M₀} (hζ : IsPrimitiveRoot ζ n)
    {α : M₀} (hα : α ≠ 0) :
    Set.InjOn (ζ ^ · * α) (Finset.range n)

{M₀ : Type u_7}
[CancelCommMonoidWithZero M₀]
{n : ℕ}
{ζ : M₀}
(hζ : IsPrimitiveRoot ζ n)
{α : M₀}
(hα : α ≠ 0)

Set.InjOn (fun x => ζ ^ x * α) ↑(Finset.range n)


protected theorem integrable : Integrable f μ


@[to_additive (attr := simp)]
theorem isComplement'_bot_right : IsComplement' H ⊥ ↔ H = ⊤

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


lemma update_eq_piecewise {β : Type*} [DecidableEq ι] (f : ι → β) (i : ι) (v : β) :
    update f i v = piecewise (singleton i) (fun _ => v) f

{ι : Type u_1}
{β : Type u_3}
[DecidableEq ι]
(f : ι → β)
(i : ι)
(v : β)

Function.update f i v = {i}.piecewise (fun x => v) f


/-- Typeclass characterising splitting fields. -/
class IsSplittingField (f : K[X]) : Prop where
  splits' : Splits (algebraMap K L) f
  adjoin_rootSet' : Algebra.adjoin K (f.rootSet L : Set L) = ⊤

[self : Polynomial.IsSplittingField K L f]


/-- Radon-Nikodym derivative with respect to the scalar multiple of a measure.
See also `rnDeriv_smul_right_of_ne_top'`, which requires sigma-finite `ν` and `μ`. -/
theorem rnDeriv_smul_right_of_ne_top (ν μ : Measure α) [IsFiniteMeasure ν]
    [ν.HaveLebesgueDecomposition μ] {r : ℝ≥0∞} (hr : r ≠ 0) (hr_ne_top : r ≠ ∞) :
    ν.rnDeriv (r • μ) =ᵐ[μ] r⁻¹ • ν.rnDeriv μ

{α : Type u_1}
{m : MeasurableSpace α}
(ν μ : MeasureTheory.Measure α)
[MeasureTheory.IsFiniteMeasure ν]
[ν.HaveLebesgueDecomposition μ]
{r : ℝ≥0∞}
(hr : r ≠ 0)
(hr_ne_top : r ≠ ⊤)


theorem finSuccEquiv'_last_apply_castSucc (i : Fin n) :
    finSuccEquiv' (Fin.last n) (Fin.castSucc i) = i

(finSuccEquiv' (Fin.last n)) i.castSucc = some i


@[to_additive] lemma MonovaryOn.pow_left (hfg : MonovaryOn f g s) (n : ℕ) :
    MonovaryOn (f ^ n) g s

{ι : Type u_1}
{α : Type u_2}
{β : Type u_3}
[OrderedAddCommGroup α]
[OrderedAddCommGroup β]
{s : Set ι}
{f : ι → α}
{g : ι → β}
(hfg : MonovaryOn f g s)
(n : ℕ)


theorem Independent.injective (ht : Independent t) (h_ne_bot : ∀ i, t i ≠ ⊥) : Injective t

{α : Type u_1}
{ι : Type u_3}
[CompleteLattice α]
{t : ι → α}
(ht : CompleteLattice.Independent t)
(h_ne_bot : ∀ (i : ι), t i ≠ ⊥)


theorem measure_mul_le_scalingConstantOf_mul {K : ℝ} {x : α} {t r : ℝ} (ht : t ∈ Ioc 0 K)
    (hr : r ≤ scalingScaleOf μ K) :
    μ (closedBall x (t * r)) ≤ scalingConstantOf μ K * μ (closedBall x r)

(hr : r ≤ IsUnifLocDoublingMeasure.scalingScaleOf μ K)

μ (Metric.closedBall x (t * r)) ≤ ↑(IsUnifLocDoublingMeasure.scalingConstantOf μ K) * μ (Metric.closedBall x r)


theorem restrict_le_restrict_iff {i : Set α} (hi : MeasurableSet i) :
    v ≤[i] w ↔ ∀ ⦃j⦄, MeasurableSet j → j ⊆ i → v j ≤ w j

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

v.restrict i ≤ w.restrict i ↔ ∀ ⦃j : Set α⦄, MeasurableSet j → j ⊆ i → ↑v j ≤ ↑w j


theorem IsSeparatedMap.pullback {f : X → Y} (sep : IsSeparatedMap f) (g : A → Y) :
    IsSeparatedMap (@snd X Y A f g)

{X : Type u_1}
{Y : Sort u_2}
{A : Type u_3}
[TopologicalSpace X]
[TopologicalSpace A]
{f : X → Y}
(sep : IsSeparatedMap f)
(g : A → Y)


/-- The forgetful functor from an induced category to the original category,
forgetting the extra data.
-/
@[simps]
def inducedFunctor : InducedCategory D F ⥤ D

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

∀ (a : C), (CategoryTheory.inducedFunctor F).obj a = F a


/-- If the integer `n` is a sum of two squares of coprime integers,
then `-1` is a square modulo `n`. -/
theorem ZMod.isSquare_neg_one_of_eq_sq_add_sq_of_isCoprime {n x y : ℤ} (h : n = x ^ 2 + y ^ 2)
    (hc : IsCoprime x y) : IsSquare (-1 : ZMod n.natAbs)


/-- The difference of two `C^n` functions at a point is `C^n` at this point. -/
theorem ContDiffAt.sub {f g : E → F} (hf : ContDiffAt 𝕜 n f x) (hg : ContDiffAt 𝕜 n g x) :
    ContDiffAt 𝕜 n (fun x => f x - g x) x

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


@[simp] lemma composePath_nil {X : C} : composePath (Path.nil : Path X X) = 𝟙 X

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

CategoryTheory.composePath Quiver.Path.nil = CategoryTheory.CategoryStruct.id X


@[simp]
theorem mk_add_moveLeft_inr {xl xr yl yr} {xL xR yL yR} {i} :
    (mk xl xr xL xR + mk yl yr yL yR).moveLeft (Sum.inr i) =
      mk xl xr xL xR + (mk yl yr yL yR).moveLeft i

{xl xr yl yr : Type u_1}
{xL : xl → SetTheory.PGame}
{xR : xr → SetTheory.PGame}
{yL : yl → SetTheory.PGame}
{yR : yr → SetTheory.PGame}
{i : yl}

(SetTheory.PGame.mk xl xr xL xR + SetTheory.PGame.mk yl yr yL yR).moveLeft (Sum.inr i) =
  SetTheory.PGame.mk xl xr xL xR + (SetTheory.PGame.mk yl yr yL yR).moveLeft i


@[csimp] theorem sections_eq_sectionsTR : @sections = @sectionsTR


@[simp]
theorem lift.equiv_symm_apply (f : M ⊗[R] N →ₗ[R] P) (m : M) (n : N) :
    (lift.equiv R M N P).symm f m n = f (m ⊗ₜ n)

(R : Type u_1)
[CommSemiring R]
(M : Type u_4)
(N : Type u_5)
(P : Type u_6)
[AddCommMonoid M]
[AddCommMonoid N]
[AddCommMonoid P]
[Module R M]
[Module R N]
[Module R P]
(f : TensorProduct R M N →ₗ[R] P)
(m : M)
(n : N)

(((TensorProduct.lift.equiv R M N P).symm f) m) n = f (m ⊗ₜ[R] n)


lemma three_le_girth (hG : ¬ G.IsAcyclic) : 3 ≤ G.girth

{α : Type u_1}
{G : SimpleGraph α}
(hG : ¬G.IsAcyclic)


/-- Kernel associated with the conditional expectation with respect to a σ-algebra. It satisfies
`μ[f | m] =ᵐ[μ] fun ω => ∫ y, f y ∂(condexpKernel μ m ω)`.
It is defined as the conditional distribution of the identity given the identity, where the second
identity is understood as a map from `Ω` with the σ-algebra `mΩ` to `Ω` with σ-algebra `m ⊓ mΩ`.
We use `m ⊓ mΩ` instead of `m` to ensure that it is a sub-σ-algebra of `mΩ`. We then use
`Kernel.comap` to get a kernel from `m` to `mΩ` instead of from `m ⊓ mΩ` to `mΩ`. -/
noncomputable irreducible_def condexpKernel (μ : Measure Ω) [IsFiniteMeasure μ]
    (m : MeasurableSpace Ω) : @Kernel Ω Ω m mΩ

{Ω : Type u_3}
[mΩ : MeasurableSpace Ω]
[StandardBorelSpace Ω]
[Nonempty Ω]
(μ : MeasureTheory.Measure Ω)
[MeasureTheory.IsFiniteMeasure μ]
(m : MeasurableSpace Ω)

ProbabilityTheory.condexpKernel μ m = (ProbabilityTheory.condDistrib id id μ).comap id ⋯


@[simp, norm_cast]
theorem disjoint_coe (s t : Interval α) : Disjoint (s : Set α) t ↔ Disjoint s t

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


lemma truncatedSup_infs (hs : a ∈ lowerClosure s) (ht : a ∈ lowerClosure t) :
    truncatedSup (s ⊼ t) a = truncatedSup s a ⊓ truncatedSup t a

{α : Type u_1}
[DistribLattice α]
[BoundedOrder α]
[DecidableEq α]
[DecidableRel fun x x_1 => x ≤ x_1]
{s t : Finset α}
{a : α}
(hs : a ∈ lowerClosure ↑s)
(ht : a ∈ lowerClosure ↑t)

(s ⊼ t).truncatedSup a = s.truncatedSup a ⊓ t.truncatedSup a


@[simp] theorem getElem_fin [GetElem? Cont Nat Elem Dom] (a : Cont) (i : Fin n) (h : Dom a i) :
    a[i] = a[i.1]

{Cont : Type u_1}
{Elem : Type u_2}
{Dom : Cont → Nat → Prop}
{n : Nat}
[GetElem? Cont Nat Elem Dom]
(a : Cont)
(i : Fin n)
(h : Dom a ↑i)


/-- If a real valued function has bounded variation on a set, then it is a difference of monotone
functions there. -/
theorem LocallyBoundedVariationOn.exists_monotoneOn_sub_monotoneOn {f : α → ℝ} {s : Set α}
    (h : LocallyBoundedVariationOn f s) :
    ∃ p q : α → ℝ, MonotoneOn p s ∧ MonotoneOn q s ∧ f = p - q

{α : Type u_1}
[LinearOrder α]
{f : α → ℝ}
{s : Set α}
(h : LocallyBoundedVariationOn f s)

∃ p q, MonotoneOn p s ∧ MonotoneOn q s ∧ f = p - q


@[simp]
theorem equalizer_eq_top {φ ψ : F} : equalizer φ ψ = ⊤ ↔ φ = ψ

{R : Type u_1}
{A : Type u_2}
{B : Type u_3}
[CommSemiring R]
[Semiring A]
[Algebra R A]
[Semiring B]
[Algebra R B]
{F : Type u_4}
[FunLike F A B]
[AlgHomClass F R A B]
{φ ψ : F}


/-- Isometry between the tangent space `V` of a (semi)normed add torsor `P` and `P` given by
subtraction from `x : P`. -/
@[simps!]
def IsometryEquiv.constVSub (x : P) : P ≃ᵢ V

{V : Type u_2}
{P : Type u_3}
[SeminormedAddCommGroup V]
[PseudoMetricSpace P]
[NormedAddTorsor V P]
(x : P)

∀ (x_1 : V), (IsometryEquiv.constVSub x).symm x_1 = -x_1 +ᵥ x


theorem eventually_right_inverse {x} (hx : x ∈ e.target) :
    ∀ᶠ y in 𝓝 x, e (e.symm y) = y

{X : Type u_1}
{Y : Type u_3}
[TopologicalSpace X]
[TopologicalSpace Y]
(e : PartialHomeomorph X Y)
{x : Y}
(hx : x ∈ e.target)


theorem coe_fun_injective : @Function.Injective (A₁ ≃ₐ[R] A₂) (A₁ → A₂) fun e => (e : A₁ → A₂)

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


lemma of_not_dvd [CharP R p] (h : ¬p ∣ n) : NeZero (n : R)

(R : Type u_1)
[AddMonoidWithOne R]
{n p : ℕ}
[CharP R p]
(h : ¬p ∣ n)


/-- Specialization of `Finset.prod_nbij'` that automatically fills in most arguments.

See `Fintype.prod_equiv` for the version where `s` and `t` are `univ`. -/
@[to_additive "`Specialization of `Finset.sum_nbij'` that automatically fills in most arguments.

See `Fintype.sum_equiv` for the version where `s` and `t` are `univ`."]
lemma prod_equiv (e : ι ≃ κ) (hst : ∀ i, i ∈ s ↔ e i ∈ t) (hfg : ∀ i ∈ s, f i = g (e i)) :
    ∏ i ∈ s, f i = ∏ i ∈ t, g i

{ι : Type u_6}
{κ : Type u_7}
{α : Type u_8}
[CommMonoid α]
{s : Finset ι}
{t : Finset κ}
{f : ι → α}
{g : κ → α}
(e : ι ≃ κ)
(hst : ∀ (i : ι), i ∈ s ↔ e i ∈ t)
(hfg : ∀ i ∈ s, f i = g (e i))


protected theorem coe_injective : Injective ((↑) : ℝ≥0 → ℝ)


@[to_additive]
theorem card_quotient_dvd_card (s : Subgroup α) : Nat.card (α ⧸ s) ∣ Nat.card α

{α : Type u_1}
[AddGroup α]
(s : AddSubgroup α)


/-- Composition by continuous linear equivs on the left respects higher differentiability at a
point in a domain. -/
theorem ContinuousLinearEquiv.comp_contDiffWithinAt_iff (e : F ≃L[𝕜] G) :
    ContDiffWithinAt 𝕜 n (e ∘ f) s x ↔ ContDiffWithinAt 𝕜 n f s x

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type uE}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{F : Type uF}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{G : Type uG}
[NormedAddCommGroup G]
[NormedSpace 𝕜 G]
{s : Set E}
{f : E → F}
{x : E}
{n : ℕ∞}
(e : F ≃L[𝕜] G)

ContDiffWithinAt 𝕜 n (⇑e ∘ f) s x ↔ ContDiffWithinAt 𝕜 n f s x


theorem BilinForm.toMatrix'_compRight (B : BilinForm R₂ (n → R₂)) (f : (n → R₂) →ₗ[R₂] n → R₂) :
    BilinForm.toMatrix' (B.compRight f) = BilinForm.toMatrix' B * LinearMap.toMatrix' f

{R₂ : Type u_5}
[CommSemiring R₂]
{n : Type u_11}
[Fintype n]
[DecidableEq n]
(B : LinearMap.BilinForm R₂ (n → R₂))
(f : (n → R₂) →ₗ[R₂] n → R₂)

LinearMap.BilinForm.toMatrix' (B.compRight f) = LinearMap.BilinForm.toMatrix' B * LinearMap.toMatrix' f


theorem summable_one_div_rpow {p : ℝ} :
    Summable (fun n => 1 / (n : ℝ≥0) ^ p : ℕ → ℝ≥0) ↔ 1 < p


theorem eraseLead_coeff_of_ne (i : ℕ) (hi : i ≠ f.natDegree) : f.eraseLead.coeff i = f.coeff i

{R : Type u_1}
[Semiring R]
{f : R[X]}
(i : ℕ)
(hi : i ≠ f.natDegree)


@[simp]
theorem ofFinsupp_zero : (⟨0⟩ : R[X]) = 0


theorem hasDerivWithinAt_iff_isLittleO :
    HasDerivWithinAt f f' s x ↔
      (fun x' : 𝕜 => f x' - f x - (x' - x) • f') =o[𝓝[s] x] fun x' => x' - x

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

HasDerivWithinAt f f' s x ↔ (fun x' => f x' - f x - (x' - x) • f') =o[𝓝[s] x] fun x' => x' - x


@[to_additive]
theorem units_val : Commute u₁ u₂ → Commute (u₁ : M) u₂

{M : Type u_1}
[AddMonoid M]
{u₁ u₂ : AddUnits M}


lemma embedding_inducingFn : Embedding (inducingFn 𝕜 E F)

{𝕜 : Type u_1}
{E : Type u_2}
{F : Type u_3}
[RCLike 𝕜]
[AddCommGroup E]
[TopologicalSpace E]
[Module 𝕜 E]
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]

Embedding ⇑(ContinuousLinearMapWOT.inducingFn 𝕜 E F)


@[to_additive (attr := simp)]
theorem diam_one [One α] : diam (1 : Set α) = 0

{α : Type u}
[PseudoEMetricSpace α]
[One α]


lemma coe_algEquiv :
    (Localization.algEquiv M S : Localization M →+* S) =
    IsLocalization.map (M := M) (T := M) _ (RingHom.id R) le_rfl

{R : Type u_1}
[CommSemiring R]
{M : Submonoid R}
(S : Type u_2)
[CommSemiring S]
[Algebra R S]
[IsLocalization M S]

↑(Localization.algEquiv M S) = IsLocalization.map S (RingHom.id R) ⋯


/-- `hcomp α β` is the horizontal composition of natural transformations. -/
@[simps]
def hcomp {H I : D ⥤ E} (α : F ⟶ G) (β : H ⟶ I) : F ⋙ H ⟶ G ⋙ I

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

(α ◫ β).app X = CategoryTheory.CategoryStruct.comp (β.app (F.obj X)) (I.map (α.app X))


lemma mem_of_isGE (X : C) (n : ℤ) [t.IsGE X n] : t.GE n X

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

(t : CategoryTheory.Triangulated.TStructure C)


@[to_additive (attr := simp)]
theorem liftOfRightInverse_comp_apply (hf : Function.RightInverse f_inv f)
    (g : { g : G₁ →* G₃ // f.ker ≤ g.ker }) (x : G₁) :
    (f.liftOfRightInverse f_inv hf g) (f x) = g.1 x

{G₁ : Type u_5}
{G₂ : Type u_6}
{G₃ : Type u_7}
[Group G₁]
[Group G₂]
[Group G₃]
(f : G₁ →* G₂)
(f_inv : G₂ → G₁)
(hf : Function.RightInverse f_inv ⇑f)
(g : { g // f.ker ≤ g.ker })
(x : G₁)

((f.liftOfRightInverse f_inv hf) g) (f x) = ↑g x


@[simp]
theorem volume_Iic {a : ℝ} : volume (Iic a) = ∞


theorem PrimrecPred.of_eq {α} [Primcodable α] {p q : α → Prop} [DecidablePred p] [DecidablePred q]
    (hp : PrimrecPred p) (H : ∀ a, p a ↔ q a) : PrimrecPred q

{α : Type u_1}
[Primcodable α]
{p q : α → Prop}
[DecidablePred p]
[DecidablePred q]
(hp : PrimrecPred p)
(H : ∀ (a : α), p a ↔ q a)


/-- The opposite of a functor, i.e. considering a functor `F : C ⥤ D` as a functor `Cᵒᵖ ⥤ Dᵒᵖ`.
In informal mathematics no distinction is made between these. -/
@[simps]
protected def op (F : C ⥤ D) : Cᵒᵖ ⥤ Dᵒᵖ

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

∀ {X Y : Cᵒᵖ} (f : X ⟶ Y), F.op.map f = (F.map f.unop).op


/-- On a locally ringed space `X`, the preimage of the zero locus of the prime spectrum
of `Γ(X, ⊤)` under `toΓSpec` agrees with the associated zero locus on `X`. -/
lemma toΓSpec_preimage_zeroLocus_eq {X : LocallyRingedSpace.{u}}
    (s : Set (X.presheaf.obj (op ⊤))) :
    X.toΓSpec.val.base ⁻¹' PrimeSpectrum.zeroLocus s = X.toRingedSpace.zeroLocus s

(s : Set ↑(X.presheaf.obj (Opposite.op ⊤)))

⇑X.toΓSpec.val.base ⁻¹' PrimeSpectrum.zeroLocus s = X.toRingedSpace.zeroLocus s


/-- Given a short exact short complex `S : HomologicalComplex C c`, and degrees `i` and `j`
such that `c.Rel i j`, this is the snake diagram whose four lines are respectively
obtained by applying the functors `homologyFunctor C c i`, `opcyclesFunctor C c i`,
`cyclesFunctor C c j`, `homologyFunctor C c j` to `S`. Applying the snake lemma to this
gives the homology sequence of `S`. -/
@[simps]
noncomputable def snakeInput : ShortComplex.SnakeInput C

{S : CategoryTheory.ShortComplex (HomologicalComplex C c)}

(HomologicalComplex.HomologySequence.snakeInput hS i j hij).L₁ =
  (HomologicalComplex.opcyclesFunctor C c i).mapShortComplex.obj S


lemma toStalk_specStalkEquiv (f) (x : pbo f) {m} (f_deg : f ∈ 𝒜 m) (hm : 0 < m) :
    StructureSheaf.toStalk (A⁰_ f) ((toSpec 𝒜 f).1.base x) ≫ (specStalkEquiv 𝒜 f x f_deg hm).hom =
      (mapId _ <| Submonoid.powers_le.mpr x.2 : (A⁰_ f) →+* AtPrime 𝒜 x.1.1.toIdeal)

(x : ↥(ProjectiveSpectrum.basicOpen 𝒜 f))

CategoryTheory.CategoryStruct.comp
    (AlgebraicGeometry.StructureSheaf.toStalk (HomogeneousLocalization.Away 𝒜 f)
      ((AlgebraicGeometry.ProjectiveSpectrum.Proj.toSpec 𝒜 f).val.base x))
    (AlgebraicGeometry.ProjectiveSpectrum.Proj.specStalkEquiv 𝒜 f x f_deg hm).hom =
  HomogeneousLocalization.mapId 𝒜 ⋯


/-- `mulEquivAut` as an isomorphism between automorphism groups. -/
@[simps!]
noncomputable def autMulEquivOfFullyFaithful (X : C) :
    Aut X ≃* Aut (f.obj X)

{C : Type u}
[CategoryTheory.Category.{v, u} C]
{D : Type u'}
[CategoryTheory.Category.{v', u'} D]
{f : CategoryTheory.Functor C D}
(hf : f.FullyFaithful)
(X : C)
(i : X ≅ X)

((hf.autMulEquivOfFullyFaithful X) i).hom = f.map i.hom


theorem isClosed_proj (o : Ordinal) (hC : IsClosed C) : IsClosed (π C (ord I · < o))

{I : Type u}
[LinearOrder I]
[IsWellOrder I fun x x_1 => x < x_1]
(C : Set (I → Bool))
(o : Ordinal.{u})
(hC : IsClosed C)

IsClosed (Profinite.NobelingProof.π C fun x => Profinite.NobelingProof.ord I x < o)


/-- Given two continuous maps `f` and `g`, this is the continuous map `(x, y) ↦ (f x, g y)`. -/
@[simps]
def prodMap (f : C(α₁, α₂)) (g : C(β₁, β₂)) : C(α₁ × β₁, α₂ × β₂)

{α₁ : Type u_5}
{α₂ : Type u_6}
{β₁ : Type u_7}
{β₂ : Type u_8}
[TopologicalSpace α₁]
[TopologicalSpace α₂]
[TopologicalSpace β₁]
[TopologicalSpace β₂]
(f : C(α₁, α₂))
(g : C(β₁, β₂))

∀ (a : α₁ × β₁), (f.prodMap g) a = Prod.map (⇑f) (⇑g) a


/-- The sheaf of sections guaranteed by the sheaf condition. -/
@[simps]
def sheafOver {A : Type u₂} [Category.{v₂} A] {J : GrothendieckTopology C} (ℱ : Sheaf J A) (E : A) :
    SheafOfTypes J

{J : CategoryTheory.GrothendieckTopology C}

(CategoryTheory.sheafOver ℱ E).val = ℱ.val.comp (CategoryTheory.coyoneda.obj (Opposite.op E))


/-- Bundled monotone (aka, increasing) function -/
structure OrderHom (α β : Type*) [Preorder α] [Preorder β] where
  /-- The underlying function of an `OrderHom`. -/
  toFun : α → β
  /-- The underlying function of an `OrderHom` is monotone. -/
  monotone' : Monotone toFun

{α : Type u_6}
{β : Type u_7}
[Preorder α]
[Preorder β]
(self : α →o β)


theorem continuousOn_fract [TopologicalAddGroup α] (n : ℤ) :
    ContinuousOn (fract : α → α) (Ico n (n + 1) : Set α)

{α : Type u_1}
[LinearOrderedRing α]
[FloorRing α]
[TopologicalSpace α]
[TopologicalAddGroup α]
(n : ℤ)

ContinuousOn Int.fract (Set.Ico (↑n) (↑n + 1))


/-- `Prop` structure holding the hypotheses of the Picard-Lindelöf theorem.

The similarly named `PicardLindelof` structure is part of the internal API for convenience, so as
not to constantly invoke choice, but is not intended for public use. -/
structure IsPicardLindelof {E : Type*} [NormedAddCommGroup E] (v : ℝ → E → E) (tMin t₀ tMax : ℝ)
    (x₀ : E) (L : ℝ≥0) (R C : ℝ) : Prop where
  ht₀ : t₀ ∈ Icc tMin tMax
  hR : 0 ≤ R
  lipschitz : ∀ t ∈ Icc tMin tMax, LipschitzOnWith L (v t) (closedBall x₀ R)
  cont : ∀ x ∈ closedBall x₀ R, ContinuousOn (fun t : ℝ => v t x) (Icc tMin tMax)
  norm_le : ∀ t ∈ Icc tMin tMax, ∀ x ∈ closedBall x₀ R, ‖v t x‖ ≤ C
  C_mul_le_R : (C : ℝ) * max (tMax - t₀) (t₀ - tMin) ≤ R

(self : IsPicardLindelof v tMin t₀ tMax x₀ L R C)


theorem extract_loop_eq_aux (as bs : Array α) (size start : Nat) :
    extract.loop as size start bs = bs ++ extract.loop as size start #[]

{α : Type u_1}
(as bs : Array α)
(size start : Nat)

Array.extract.loop as size start bs = bs ++ Array.extract.loop as size start #[]


theorem chartAt_subtype_val_symm_eventuallyEq (U : Opens M) {x : U} :
    (chartAt H x.val).symm =ᶠ[𝓝 (chartAt H x.val x.val)] Subtype.val ∘ (chartAt H x).symm

{H : Type u}
{M : Type u_2}
[TopologicalSpace H]
[TopologicalSpace M]
[ChartedSpace H M]
(U : TopologicalSpace.Opens M)
{x : ↥U}

↑(chartAt H ↑x).symm =ᶠ[𝓝 (↑(chartAt H ↑x) ↑x)] Subtype.val ∘ ↑(chartAt H x).symm


@[simp]
theorem supDegree_zero : (0 : R[A]).supDegree D = ⊥

{R : Type u_1}
{A : Type u_3}
{B : Type u_5}
[Semiring R]
[AddZeroClass A]
[SemilatticeSup B]
[OrderBot B]
{D : A → B}


theorem span_inl_union_inr {s : Set M} {t : Set M₂} :
    span R (inl R M M₂ '' s ∪ inr R M M₂ '' t) = (span R s).prod (span R t)

{R : Type u}
{M : Type v}
{M₂ : Type w}
[Semiring R]
[AddCommMonoid M]
[AddCommMonoid M₂]
[Module R M]
[Module R M₂]
{s : Set M}
{t : Set M₂}

Submodule.span R (⇑(LinearMap.inl R M M₂) '' s ∪ ⇑(LinearMap.inr R M M₂) '' t) =
  (Submodule.span R s).prod (Submodule.span R t)


@[simp]
theorem diagramNatTrans_comp {P Q R : Cᵒᵖ ⥤ D} (η : P ⟶ Q) (γ : Q ⟶ R) (X : C) :
    J.diagramNatTrans (η ≫ γ) X = J.diagramNatTrans η X ≫ J.diagramNatTrans γ X

(J : CategoryTheory.GrothendieckTopology C)

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

[∀ (P : CategoryTheory.Functor Cᵒᵖ D) (X : C) (S : J.Cover X), CategoryTheory.Limits.HasMultiequalizer (S.index P)]

J.diagramNatTrans (CategoryTheory.CategoryStruct.comp η γ) X =
  CategoryTheory.CategoryStruct.comp (J.diagramNatTrans η X) (J.diagramNatTrans γ X)


theorem toHom_comp_injective (h : N ↪[L] P) :
    Function.Injective (h.toHom.comp : (M →[L] N) →  (M →[L] P))

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


@[to_additive (attr := simp)]
theorem dist_mul_right [Mul M] [PseudoMetricSpace M] [IsometricSMul Mᵐᵒᵖ M] (a b c : M) :
    dist (a * c) (b * c) = dist a b

{M : Type u}
[Add M]
[PseudoMetricSpace M]
[IsometricVAdd Mᵃᵒᵖ M]
(a b c : M)


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

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


@[to_additive]
theorem sup_eq_closure_mul (H K : Subgroup G) : H ⊔ K = closure ((H : Set G) * (K : Set G))

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


/-- Equivalence between linear maps `M₂ →ₗ[R] M₃` and one-multilinear maps. -/
@[simps]
def ofSubsingleton [Subsingleton ι] (i : ι) :
    (M₂ →ₗ[R] M₃) ≃ MultilinearMap R (fun _ : ι ↦ M₂) M₃

(R : Type uR)
{ι : Type uι}
(M₂ : Type v₂)
(M₃ : Type v₃)
[Semiring R]
[AddCommMonoid M₂]
[AddCommMonoid M₃]
[Module R M₂]
[Module R M₃]
[Subsingleton ι]
(i : ι)
(f : MultilinearMap R (fun x => M₂) M₃)
(x : M₂)

((MultilinearMap.ofSubsingleton R M₂ M₃ i).symm f) x = f fun x_1 => x


theorem differentiableWithinAt_arccos_Ici {x : ℝ} :
    DifferentiableWithinAt ℝ arccos (Ici x) x ↔ x ≠ -1

DifferentiableWithinAt ℝ Real.arccos (Set.Ici x) x ↔ x ≠ -1


@[simp]
lemma denseRange_subtype_val {p : X → Prop} : DenseRange (@Subtype.val _ p) ↔ Dense {x | p x}

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

DenseRange Subtype.val ↔ Dense {x | p x}


@[simp] theorem exists_unique_iff_exists [Subsingleton α] {p : α → Prop} :
    (∃! x, p x) ↔ ∃ x, p x

{α : Sort u_1}
[Subsingleton α]
{p : α → Prop}


{R : Type r}
[CommRing R]
(W : WeierstrassCurve R)


@[to_additive (attr := simp)]
lemma isTorsionFree_of_subsingleton [Subsingleton G] : IsTorsionFree G

{G : Type u_1}
[AddMonoid G]
[Subsingleton G]


@[to_additive]
theorem smul_iUnion₂ (s : Set α) (t : ∀ i, κ i → Set β) :
    (s • ⋃ (i) (j), t i j) = ⋃ (i) (j), s • t i j

{α : Type u_2}
{β : Type u_3}
{ι : Sort u_5}
{κ : ι → Sort u_6}
[VAdd α β]
(s : Set α)
(t : (i : ι) → κ i → Set β)

s +ᵥ ⋃ i, ⋃ j, t i j = ⋃ i, ⋃ j, s +ᵥ t i j


/-- Arithmetic progressions are preserved under 2-Freiman isos. -/
@[to_additive "Arithmetic progressions are preserved under 2-Freiman isos."]
lemma IsMulFreimanIso.mulRothNumber_congr (hf : IsMulFreimanIso 2 A B f) :
    mulRothNumber A = mulRothNumber B

{α : Type u_2}
{β : Type u_3}
[DecidableEq α]
[AddCommMonoid α]
[AddCommMonoid β]
[DecidableEq β]
{A : Finset α}
{B : Finset β}
{f : α → β}
(hf : IsAddFreimanIso 2 (↑A) (↑B) f)


/-- Definition of `x < y` on numeric pre-games, in terms of `≤` -/
theorem lt_iff_exists_le {x y : PGame} (ox : x.Numeric) (oy : y.Numeric) :
    x < y ↔ (∃ i, x ≤ y.moveLeft i) ∨ ∃ j, x.moveRight j ≤ y

{x y : SetTheory.PGame}
(ox : x.Numeric)
(oy : y.Numeric)


@[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 u_1}
{N : Type u_2}
[L.Structure M]
[L.Structure N]
(φ : M ↪ₑ[L] N)
{n : ℕ}
(r : L.Relations n)
(x : Fin n → M)

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


theorem constantCoeff_monomial [DecidableEq σ] (d : σ →₀ ℕ) (r : R) :
    constantCoeff (monomial d r) = if d = 0 then r else 0

{R : Type u}
{σ : Type u_1}
[CommSemiring R]
[DecidableEq σ]
(d : σ →₀ ℕ)
(r : R)

MvPolynomial.constantCoeff ((MvPolynomial.monomial d) r) = if d = 0 then r else 0


theorem contDiffAt_euclidean {n : ℕ∞} :
    ContDiffAt 𝕜 n f y ↔ ∀ i, ContDiffAt 𝕜 n (fun x => f x i) y

{𝕜 : Type u_1}
{ι : Type u_2}
{H : Type u_3}
[RCLike 𝕜]
[NormedAddCommGroup H]
[NormedSpace 𝕜 H]
[Fintype ι]
{f : H → EuclideanSpace 𝕜 ι}
{y : H}
{n : ℕ∞}

ContDiffAt 𝕜 n f y ↔ ∀ (i : ι), ContDiffAt 𝕜 n (fun x => f x i) y


theorem IsLUB.exists_between (h : IsLUB s a) (hb : b < a) : ∃ c ∈ s, b < c ∧ c ≤ a

{α : Type u}
[LinearOrder α]
{s : Set α}
{a b : α}
(h : IsLUB s a)
(hb : b < a)


lemma norm_nsmul [NormedAddCommGroup E] [NormedSpace K E] (n : ℕ) (x : E) : ‖n • x‖ = n • ‖x‖

(K : Type u_1)
{E : Type u_2}
[RCLike K]
[NormedAddCommGroup E]
[NormedSpace K E]
(n : ℕ)
(x : E)

‖n • x‖ = n • ‖x‖


/-- Combine two `PartialEquiv`s using `Set.piecewise`. The source of the new `PartialEquiv` is
`s.ite e.source e'.source = e.source ∩ s ∪ e'.source \ s`, and similarly for target.  The function
sends `e.source ∩ s` to `e.target ∩ t` using `e` and `e'.source \ s` to `e'.target \ t` using `e'`,
and similarly for the inverse function. The definition assumes `e.isImage s t` and
`e'.isImage s t`. -/
@[simps (config := .asFn)]
def piecewise (e e' : PartialEquiv α β) (s : Set α) (t : Set β) [∀ x, Decidable (x ∈ s)]
    [∀ y, Decidable (y ∈ t)] (H : e.IsImage s t) (H' : e'.IsImage s t) :
    PartialEquiv α β

{α : Type u_1}
{β : Type u_2}
(e e' : PartialEquiv α β)
(s : Set α)
(t : Set β)
[(x : α) → Decidable (x ∈ s)]
[(y : β) → Decidable (y ∈ t)]
(H : e.IsImage s t)
(H' : e'.IsImage s t)

↑(e.piecewise e' s t H H').symm = t.piecewise ↑e.symm ↑e'.symm


/-- Mapping intermediate fields along the identity does not change them -/
theorem IntermediateField.map_id {K L : Type*} [Field K] [Field L] [Algebra K L]
    (E : IntermediateField K L) : E.map (AlgHom.id K L) = E

{K : Type u_1}
{L : Type u_2}
[Field K]
[Field L]
[Algebra K L]
(E : IntermediateField K L)

IntermediateField.map (AlgHom.id K L) E = E


@[simp]
theorem hom_eq_iff {X Y : CostructuredArrow S T} (f g : X ⟶ Y) : f = g ↔ f.left = g.left

{X Y : CategoryTheory.CostructuredArrow S T}


@[simp]
theorem sInter_mem {s : Set (Set α)} (hfin : s.Finite) : ⋂₀ s ∈ f ↔ ∀ U ∈ s, U ∈ f

{α : Type u}
{f : Filter α}
{s : Set (Set α)}
(hfin : s.Finite)

⋂₀ s ∈ f ↔ ∀ U ∈ s, U ∈ f


theorem eq_singleton_iff_unique_mem : s = {a} ↔ a ∈ s ∧ ∀ x ∈ s, x = a


@[simp]
theorem norm_conj (x : ℤ√d) : (star x).norm = x.norm


theorem add_const [AddGroup ι] [Preorder ι] [CovariantClass ι ι (Function.swap (· + ·)) (· ≤ ·)]
    [CovariantClass ι ι (· + ·) (· ≤ ·)] {f : Filtration ι m} {τ : Ω → ι} (hτ : IsStoppingTime f τ)
    {i : ι} (hi : 0 ≤ i) : IsStoppingTime f fun ω => τ ω + i

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

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

MeasureTheory.IsStoppingTime f fun ω => τ ω + i


/-- A functor to the category of monoid objects can be translated as a monoid object
in the functor category. -/
@[simps]
def inverseObj (F : C ⥤ Mon_ D) : Mon_ (C ⥤ D)

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

(CategoryTheory.Monoidal.MonFunctorCategoryEquivalence.inverseObj F).mul.app X = (F.obj X).mul


/-- General fencing theorem for continuous functions with an estimate on the derivative.
Let `f` and `B` be continuous functions on `[a, b]` such that

* `‖f a‖ ≤ B a`;
* `B` has right derivative at every point of `[a, b)`;
* for each `x ∈ [a, b)` the right-side limit inferior of `(‖f z‖ - ‖f x‖) / (z - x)`
  is bounded above by a function `f'`;
* we have `f' x < B' x` whenever `‖f x‖ = B x`.

Then `‖f x‖ ≤ B x` everywhere on `[a, b]`. -/
theorem image_norm_le_of_liminf_right_slope_norm_lt_deriv_boundary {E : Type*}
    [NormedAddCommGroup E] {f : ℝ → E} {f' : ℝ → ℝ} (hf : ContinuousOn f (Icc a b))
    -- `hf'` actually says `liminf (‖f z‖ - ‖f x‖) / (z - x) ≤ f' x`
    (hf' : ∀ x ∈ Ico a b, ∀ r, f' x < r → ∃ᶠ z in 𝓝[>] x, slope (norm ∘ f) x z < r)
    {B B' : ℝ → ℝ} (ha : ‖f a‖ ≤ B a) (hB : ContinuousOn B (Icc a b))
    (hB' : ∀ x ∈ Ico a b, HasDerivWithinAt B (B' x) (Ici x) x)
    (bound : ∀ x ∈ Ico a b, ‖f x‖ = B x → f' x < B' x) : ∀ ⦃x⦄, x ∈ Icc a b → ‖f x‖ ≤ B x

(hf' : ∀ x ∈ Set.Ico a b, ∀ (r : ℝ), f' x < r → ∃ᶠ (z : ℝ) in 𝓝[>] x, slope (norm ∘ f) x z < r)

(hB' : ∀ x ∈ Set.Ico a b, HasDerivWithinAt B (B' x) (Set.Ici x) x)

(bound : ∀ x ∈ Set.Ico a b, ‖f x‖ = B x → f' x < B' x)


theorem isBasis_iff_nbhd {B : Set (Opens α)} :
    IsBasis B ↔ ∀ {U : Opens α} {x}, x ∈ U → ∃ U' ∈ B, x ∈ U' ∧ U' ≤ U

{α : Type u_2}
[TopologicalSpace α]
{B : Set (TopologicalSpace.Opens α)}

TopologicalSpace.Opens.IsBasis B ↔ ∀ {U : TopologicalSpace.Opens α} {x : α}, x ∈ U → ∃ U' ∈ B, x ∈ U' ∧ U' ≤ U


@[nontriviality]
theorem Subsingleton.partiallyWellOrderedOn (hs : s.Subsingleton) : PartiallyWellOrderedOn s r

{α : Type u_2}
{r : α → α → Prop}
{s : Set α}
[IsRefl α r]
(hs : s.Subsingleton)


@[simp]
theorem embDomain_mk_coeff {f : Γ → Γ'} (hfi : Function.Injective f)
    (hf : ∀ g g' : Γ, f g ≤ f g' ↔ g ≤ g') {x : HahnSeries Γ R} {a : Γ} :
    (embDomain ⟨⟨f, hfi⟩, hf _ _⟩ x).coeff (f a) = x.coeff a

(hf : ∀ (g g' : Γ), f g ≤ f g' ↔ g ≤ g')

(HahnSeries.embDomain { toFun := f, inj' := hfi, map_rel_iff' := ⋯ } x).coeff (f a) = x.coeff a


@[simp]
theorem map_iSup {ι : Sort*} (f : F) (p : ι → Submodule R M) :
    map f (⨆ i, p i) = ⨆ i, map f (p i)

{R : Type u_1}
{R₂ : Type u_3}
{M : Type u_5}
{M₂ : Type u_7}
[Semiring R]
[Semiring R₂]
[AddCommMonoid M]
[AddCommMonoid M₂]
[Module R M]
[Module R₂ M₂]
{σ₁₂ : R →+* R₂}
{F : Type u_9}
[FunLike F M M₂]
[SemilinearMapClass F σ₁₂ M M₂]
[RingHomSurjective σ₁₂]
{ι : Sort u_10}
(f : F)
(p : ι → Submodule R M)

Submodule.map f (⨆ i, p i) = ⨆ i, Submodule.map f (p i)


@[to_additive]
theorem range_mem_rightTransversals {f : Quotient (QuotientGroup.rightRel H) → G}
    (hf : ∀ q, Quotient.mk'' (f q) = q) : Set.range f ∈ rightTransversals (H : Set G)

{f : Quotient (QuotientAddGroup.rightRel H) → G}

(hf : ∀ (q : Quotient (QuotientAddGroup.rightRel H)), Quotient.mk'' (f q) = q)

Set.range f ∈ AddSubgroup.rightTransversals ↑H


theorem inf_left_le_of_le_sup_right (h : IsCompl x y) (hle : a ≤ b ⊔ y) : a ⊓ x ≤ b

{α : Type u_1}
[DistribLattice α]
[BoundedOrder α]
{a b x y : α}
(h : IsCompl x y)
(hle : a ≤ b ⊔ y)


/-- Analogous construction of `FiberBundleCore` for vector bundles. This
construction gives a way to construct vector bundles from a structure registering how
trivialization changes act on fibers. -/
structure VectorBundleCore (ι : Type*) where
  baseSet : ι → Set B
  isOpen_baseSet : ∀ i, IsOpen (baseSet i)
  indexAt : B → ι
  mem_baseSet_at : ∀ x, x ∈ baseSet (indexAt x)
  coordChange : ι → ι → B → F →L[R] F
  coordChange_self : ∀ i, ∀ x ∈ baseSet i, ∀ v, coordChange i i x v = v
  continuousOn_coordChange : ∀ i j, ContinuousOn (coordChange i j) (baseSet i ∩ baseSet j)
  coordChange_comp : ∀ i j k, ∀ x ∈ baseSet i ∩ baseSet j ∩ baseSet k, ∀ v,
    (coordChange j k x) (coordChange i j x v) = coordChange i k x v

{R : Type u_1}
{B : Type u_2}
{F : Type u_3}
[NontriviallyNormedField R]
[NormedAddCommGroup F]
[NormedSpace R F]
[TopologicalSpace B]
{ι : Type u_5}
(self : VectorBundleCore R B F ι)
(i : ι)
(x : B)

x ∈ self.baseSet i → ∀ (v : F), (self.coordChange i i x) v = v


@[simp]
theorem inv_simple (i : B) : (s i)⁻¹ = s i

{B : Type u_1}
{W : Type u_3}
[Group W]
{M : CoxeterMatrix B}
(cs : CoxeterSystem M W)
(i : B)


@[simp]
theorem imI_snd_dualNumberEquiv (q : Quaternion (DualNumber R)) :
    (dualNumberEquiv q).snd.imI = q.imI.snd

{R : Type u_1}
[CommRing R]
(q : Quaternion (DualNumber R))

(TrivSqZeroExt.snd (Quaternion.dualNumberEquiv q)).imI = TrivSqZeroExt.snd q.imI


/-- The injection map is an embedding between subsets. -/
@[simps apply_coe]
def embeddingOfSubset {α} (s t : Set α) (h : s ⊆ t) : s ↪ t

{α : Type u_1}
(s t : Set α)
(h : s ⊆ t)
(x : ↑s)


theorem IsExtrOn.neg (hf : IsExtrOn f s a) : IsExtrOn (fun x => -f x) s a

{α : Type u}
{β : Type v}
[OrderedAddCommGroup β]
{f : α → β}
{a : α}
{s : Set α}
(hf : IsExtrOn f s a)


lemma eLpNormEssSup_piecewise {s : Set α} (f g : α → E) [DecidablePred (· ∈ s)]
    (hs : MeasurableSet s) :
    eLpNormEssSup (Set.piecewise s f g) μ
      = max (eLpNormEssSup f (μ.restrict s)) (eLpNormEssSup g (μ.restrict sᶜ))

{α : Type u_1}
{E : Type u_2}
{m0 : MeasurableSpace α}
{μ : MeasureTheory.Measure α}
[NormedAddCommGroup E]
{s : Set α}
(f g : α → E)
[DecidablePred fun x => x ∈ s]
(hs : MeasurableSet s)

MeasureTheory.eLpNormEssSup (s.piecewise f g) μ =
  max (MeasureTheory.eLpNormEssSup f (μ.restrict s)) (MeasureTheory.eLpNormEssSup g (μ.restrict sᶜ))


@[simp]
theorem prod_self_le_prod_self : s₁ ×ˢ s₁ ≤ s₂ ×ˢ s₂ ↔ s₁ ≤ s₂

{α : Type u_1}
[Preorder α]
{s₁ s₂ : UpperSet α}

s₁ ×ˢ s₁ ≤ s₂ ×ˢ s₂ ↔ s₁ ≤ s₂


theorem coeFn_zero : (0 : Lp.simpleFunc G p μ) =ᵐ[μ] (0 : α → G)

{α : Type u_1}
[MeasurableSpace α]
(p : ℝ≥0∞)
(μ : MeasureTheory.Measure α)
(G : Type u_7)
[NormedLatticeAddCommGroup G]

↑↑↑0 =ᵐ[μ] 0


theorem mem_falling : s ∈ falling k 𝒜 ↔ (∃ t ∈ 𝒜, s ⊆ t) ∧ s.card = k

{α : Type u_2}
[DecidableEq α]
{k : ℕ}
{𝒜 : Finset (Finset α)}
{s : Finset α}

s ∈ Finset.falling k 𝒜 ↔ (∃ t ∈ 𝒜, s ⊆ t) ∧ s.card = k


theorem valuation_eq_LaurentSeries_valuation (P : RatFunc K) :
    (Polynomial.idealX K).valuation P = (PowerSeries.idealX K).valuation (P : LaurentSeries K)

(K : Type u_2)
[Field K]
(P : RatFunc K)

(Polynomial.idealX K).valuation P = (PowerSeries.idealX K).valuation ↑P


theorem sInf_singleton {a : α} : sInf {a} = a

{α : Type u_1}
[CompleteSemilatticeInf α]
{a : α}


@[simp]
theorem coe_toAlgHom {f : A →⋆ₐ[R] B} : (f.toAlgHom : A → B) = f

{R : Type u_2}
{A : Type u_3}
{B : Type u_4}
[CommSemiring R]
[Semiring A]
[Algebra R A]
[Star A]
[Semiring B]
[Algebra R B]
[Star B]
{f : A →⋆ₐ[R] B}


/-- The identity map from a `MonoidWithZero` to itself. -/
@[simps]
def id (α : Type*) [MulZeroOneClass α] : α →*₀ α

(α : Type u_7)
[MulZeroOneClass α]
(x : α)


/-- When `φ` is injective, `defaultExpansion` expands a model of `T` to a model of `φ.onTheory T`
  arbitrarily. -/
@[simps]
noncomputable def defaultExpansion {L' : Language} {φ : L →ᴸ L'} (h : φ.Injective)
    [∀ (n) (f : L'.Functions n), Decidable (f ∈ Set.range fun f : L.Functions n => φ.onFunction f)]
    [∀ (n) (r : L'.Relations n), Decidable (r ∈ Set.range fun r : L.Relations n => φ.onRelation r)]
    (M : T.ModelType) [Inhabited M] : (φ.onTheory T).ModelType

[(n : ℕ) → (f : L'.Functions n) → Decidable (f ∈ Set.range fun f => φ.onFunction f)]

[(n : ℕ) → (r : L'.Relations n) → Decidable (r ∈ Set.range fun r => φ.onRelation r)]

(FirstOrder.Language.Theory.ModelType.defaultExpansion h M).struc = φ.defaultExpansion ↑M


theorem frequently_nhdsWithin_iff {z : α} {s : Set α} {p : α → Prop} :
    (∃ᶠ x in 𝓝[s] z, p x) ↔ ∃ᶠ x in 𝓝 z, p x ∧ x ∈ s

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

(∃ᶠ (x : α) in 𝓝[s] z, p x) ↔ ∃ᶠ (x : α) in 𝓝 z, p x ∧ x ∈ s


@[simp]
theorem mem_withConstants {x : M} : x ∈ S.withConstants h ↔ x ∈ S

{L : FirstOrder.Language}
{M : Type w}
[L.Structure M]
{S : L.Substructure M}
{A : Set M}
(h : A ⊆ ↑S)
{x : M}


theorem irreducible_of_irreducible_absNorm {I : Ideal S} (hI : Irreducible (Ideal.absNorm I)) :
    Irreducible I

{S : Type u_1}
[CommRing S]
[IsDomain S]
[Nontrivial S]
[IsDedekindDomain S]
[Module.Free ℤ S]
{I : Ideal S}
(hI : Irreducible (Ideal.absNorm I))


@[simp] lemma coe_of (α : Type*) [TopologicalSpace α] [AlexandrovDiscrete α] : ↥(of α) = α

(α : Type u_1)
[TopologicalSpace α]
[AlexandrovDiscrete α]


theorem projIcc_eq_left (h : a < b) : projIcc a b h.le x = ⟨a, left_mem_Icc.mpr h.le⟩ ↔ x ≤ a

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


theorem erase_add_right_pos {a : α} (s) {t : Multiset α} (h : a ∈ t) :
    (s + t).erase a = s + t.erase a

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


/-- A version of `stronglyMeasurable_const` that assumes `f x = f y` for all `x, y`.
This version works for functions between empty types. -/
theorem stronglyMeasurable_const' {α β} {m : MeasurableSpace α} [TopologicalSpace β] {f : α → β}
    (hf : ∀ x y, f x = f y) : StronglyMeasurable f

{α : Type u_5}
{β : Type u_6}
{m : MeasurableSpace α}
[TopologicalSpace β]
{f : α → β}
(hf : ∀ (x y : α), f x = f y)


@[simp]
theorem lie_smul : ⁅x, t • m⁆ = t • ⁅x, m⁆

{R : Type u}
{L : Type v}
{M : Type w}
[CommRing R]
[LieRing L]
[LieAlgebra R L]
[AddCommGroup M]
[Module R M]
[LieRingModule L M]
[LieModule R L M]
(t : R)
(x : L)
(m : M)


/-- If a complex function `e` is differentiable at a real point, then the function `ℝ → ℝ` given by
the real part of `e` is also differentiable at this point, with a derivative equal to the real part
of the complex derivative. -/
theorem HasDerivAt.real_of_complex (h : HasDerivAt e e' z) :
    HasDerivAt (fun x : ℝ => (e x).re) e'.re z

{e : ℂ → ℂ}
{e' : ℂ}
{z : ℝ}
(h : HasDerivAt e e' ↑z)


@[simp] theorem contains_replicate [BEq α] {n : Nat} {a b : α} :
    (replicate n b).contains a = (a == b && !n == 0)

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

(List.replicate n b).contains a = (a == b && !n == 0)


/-- Shows that the sequence of numerators of the fractional parts of the stream is strictly
antitone. -/
theorem stream_succ_nth_fr_num_lt_nth_fr_num_rat {ifp_n ifp_succ_n : IntFractPair ℚ}
    (stream_nth_eq : IntFractPair.stream q n = some ifp_n)
    (stream_succ_nth_eq : IntFractPair.stream q (n + 1) = some ifp_succ_n) :
    ifp_succ_n.fr.num < ifp_n.fr.num

{ifp_n ifp_succ_n : GenContFract.IntFractPair ℚ}

(stream_nth_eq : GenContFract.IntFractPair.stream q n = some ifp_n)

(stream_succ_nth_eq : GenContFract.IntFractPair.stream q (n + 1) = some ifp_succ_n)


theorem mul_add_subset : s * (t + u) ⊆ s * t + s * u

{α : Type u_2}
[Distrib α]
(s t u : Set α)


@[simp]
theorem nsmul_f_apply (n : ℕ) (f : C ⟶ D) (i : ι) : (n • f).f i = n • f.f i

{ι : Type u_1}
{V : Type u}
[CategoryTheory.Category.{v, u} V]
[CategoryTheory.Preadditive V]
{c : ComplexShape ι}
{C D : HomologicalComplex V c}
(n : ℕ)
(f : C ⟶ D)
(i : ι)


lemma himp_ne_right : x ⇨ y ≠ x ↔ x ≠ ⊤ ∨ y ≠ ⊤

{α : Type u}
{x y : α}
[BooleanAlgebra α]

x ⇨ y ≠ x ↔ x ≠ ⊤ ∨ y ≠ ⊤


@[simps!]
instance : Category (Augmented C)

(X : CategoryTheory.Comma (CategoryTheory.CosimplicialObject.const C) (𝟭 (CategoryTheory.CosimplicialObject C)))


@[simp, rclike_simps]
theorem I_to_real : IR = 0


@[simp]
theorem degree_of_b_ne_zero' (hb : b ≠ 0) : (toPoly ⟨0, b, c, d⟩).degree = 2

{R : Type u_1}
{b c d : R}
[Semiring R]
(hb : b ≠ 0)

{ a := 0, b := b, c := c, d := d }.toPoly.degree = 2


theorem infinite_of_finite_compl [Infinite α] {s : Set α} (hs : sᶜ.Finite) : s.Infinite

{α : Type u}
[Infinite α]
{s : Set α}
(hs : sᶜ.Finite)


@[simp]
theorem comap_map_comap : ((K.comap f).map f).comap f = K.comap f

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

Ideal.comap f (Ideal.map f (Ideal.comap f K)) = Ideal.comap f K


@[simp]
theorem preimage_cast_Ioc (p q : ℚ≥0) : (↑) ⁻¹' Ioc (p : K) q = Ioc p q

{K : Type u_5}
[LinearOrderedSemifield K]
(p q : ℚ≥0)

NNRat.cast ⁻¹' Set.Ioc ↑p ↑q = Set.Ioc p q


/-- If self-maps `f` and `g` commute, then `f` is bijective on the set of fixed points of `f ∘ g`.
This is a particular case of `Function.bijOn_fixedPoints_comp`. -/
theorem Commute.left_bijOn_fixedPoints_comp (h : Commute f g) :
    Set.BijOn f (fixedPoints <| f ∘ g) (fixedPoints <| f ∘ g)

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

Set.BijOn f (Function.fixedPoints (f ∘ g)) (Function.fixedPoints (f ∘ g))


@[simp, bv_toNat]
theorem toNat_twoPow (w : Nat) (i : Nat) : (twoPow w i).toNat = 2^i % 2^w

(BitVec.twoPow w i).toNat = 2 ^ i % 2 ^ w


@[simp]
protected theorem inf_idem (a : CauSeq α abs) : a ⊓ a = a

{α : Type u_1}
[LinearOrderedField α]
(a : CauSeq α abs)


/-- See `List.length_sigma` for the corresponding statement using `List.sum`. -/
theorem length_sigma' (l₁ : List α) (l₂ : ∀ a, List (σ a)) :
    length (l₁.sigma l₂) = Nat.sum (l₁.map fun a ↦ length (l₂ a))

{α : Type u_1}
{σ : α → Type u_3}
(l₁ : List α)
(l₂ : (a : α) → List (σ a))

(l₁.sigma l₂).length = Nat.sum (List.map (fun a => (l₂ a).length) l₁)


theorem MeasurePreserving.setIntegral_preimage_emb {Y} {_ : MeasurableSpace Y} {f : X → Y} {ν}
    (h₁ : MeasurePreserving f μ ν) (h₂ : MeasurableEmbedding f) (g : Y → E) (s : Set Y) :
    ∫ x in f ⁻¹' s, g (f x) ∂μ = ∫ y in s, g y ∂ν

{X : Type u_1}
{E : Type u_3}
[MeasurableSpace X]
[NormedAddCommGroup E]
[NormedSpace ℝ E]
{μ : MeasureTheory.Measure X}
{Y : Type u_5}

∀ {x : MeasurableSpace Y} {f : X → Y} {ν : MeasureTheory.Measure Y},
  MeasureTheory.MeasurePreserving f μ ν →
    MeasurableEmbedding f → ∀ (g : Y → E) (s : Set Y), ∫ (x : X) in f ⁻¹' s, g (f x) ∂μ = ∫ (y : Y) in s, g y ∂ν


@[simp]
theorem lift_mk (I : Ideal R) (f : R →+* S) (H : ∀ a : R, a ∈ I → f a = 0) :
    lift I f H (mk I a) = f a

{R : Type u}
[CommRing R]
{a : R}
{S : Type v}
[Semiring S]
(I : Ideal R)
(f : R →+* S)
(H : ∀ a ∈ I, f a = 0)

(Ideal.Quotient.lift I f H) ((Ideal.Quotient.mk I) a) = f a


@[to_additive]
protected theorem mul_inv_cancel (h : Commute a b) : a * b * a⁻¹ = b

{G : Type u_1}
[Group G]
{a b : G}
(h : Commute a b)


@[simp]
theorem zipWith_flip (f : α → β → γ) : ∀ as bs, zipWith (flip f) bs as = zipWith f as bs

{α : Type u}
{β : Type v}
{γ : Type w}
(f : α → β → γ)
(as : List α)
(bs : List β)

List.zipWith (flip f) bs as = List.zipWith f as bs


theorem coev_expComparison (A B : C) :
    F.map ((exp.coev A).app B) ≫ (expComparison F A).app (A ⨯ B) =
      (exp.coev _).app (F.obj B) ≫ (exp (F.obj A)).map (inv (prodComparison F A B))

[CategoryTheory.Limits.PreservesLimitsOfShape (CategoryTheory.Discrete CategoryTheory.Limits.WalkingPair) F]

CategoryTheory.CategoryStruct.comp (F.map ((CategoryTheory.exp.coev A).app B))
    ((CategoryTheory.expComparison F A).app (A ⨯ B)) =
  CategoryTheory.CategoryStruct.comp ((CategoryTheory.exp.coev (F.obj A)).app (F.obj B))
    ((CategoryTheory.exp (F.obj A)).map (CategoryTheory.inv (CategoryTheory.Limits.prodComparison F A B)))


theorem support_single_mul_eq_image [DecidableEq G] [Mul G] (f : MonoidAlgebra k G) {r : k}
    (hr : ∀ y, r * y = 0 ↔ y = 0) {x : G} (lx : IsLeftRegular x) :
    (single x r * f : MonoidAlgebra k G).support = Finset.image (x * ·) f.support

{k : Type u₁}
{G : Type u₂}
[Semiring k]
[DecidableEq G]
[Mul G]
(f : MonoidAlgebra k G)
{r : k}
(hr : ∀ (y : k), r * y = 0 ↔ y = 0)
{x : G}
(lx : IsLeftRegular x)

(MonoidAlgebra.single x r * f).support = Finset.image (fun x_1 => x * x_1) f.support


theorem extraction_forall_of_eventually {P : ℕ → ℕ → Prop} (h : ∀ n, ∀ᶠ k in atTop, P n k) :
    ∃ φ : ℕ → ℕ, StrictMono φ ∧ ∀ n, P n (φ n)

(h : ∀ (n : ℕ), ∀ᶠ (k : ℕ) in Filter.atTop, P n k)

∃ φ, StrictMono φ ∧ ∀ (n : ℕ), P n (φ n)


theorem trNum_natEnd : ∀ (n), ∀ x ∈ trNum n, natEnd x = false

x ∈ Turing.PartrecToTM2.trNum n → Turing.PartrecToTM2.natEnd x = false


theorem ne_zero_of_degree_gt {n : WithBot ℕ} (h : n < degree p) : p ≠ 0

{R : Type u}
[Semiring R]
{p : R[X]}
{n : WithBot ℕ}
(h : n < p.degree)


theorem toSignedMeasure_neg : (-j).toSignedMeasure = -j.toSignedMeasure

(j : MeasureTheory.JordanDecomposition α)


theorem subtypeₐᵢ_linear (s : AffineSubspace 𝕜 P) [Nonempty s] :
    s.subtypeₐᵢ.linear = s.direction.subtype

{𝕜 : Type u_1}
{V : Type u_2}
{P : Type u_10}
[NormedField 𝕜]
[SeminormedAddCommGroup V]
[NormedSpace 𝕜 V]
[PseudoMetricSpace P]
[NormedAddTorsor V P]
(s : AffineSubspace 𝕜 P)
[Nonempty ↥s]


theorem le_of_opNorm_le {c : ℝ} (h : ‖f‖ ≤ c) (x : V₁) : ‖f x‖ ≤ c * ‖x‖

{V₁ : Type u_2}
{V₂ : Type u_3}
[SeminormedAddCommGroup V₁]
[SeminormedAddCommGroup V₂]
(f : NormedAddGroupHom V₁ V₂)
{c : ℝ}
(h : ‖f‖ ≤ c)
(x : V₁)

‖f x‖ ≤ c * ‖x‖


lemma Continuous.finset_sup_apply (hs : ∀ i ∈ s, Continuous (f i)) :
    Continuous (fun a ↦ s.sup (f · a))

{L : Type u_1}
{X : Type u_2}
[TopologicalSpace L]
[TopologicalSpace X]
{ι : Type u_3}
[SemilatticeSup L]
[OrderBot L]
[ContinuousSup L]
{s : Finset ι}
{f : ι → X → L}
(hs : ∀ i ∈ s, Continuous (f i))

Continuous fun a => s.sup fun x => f x a


@[reassoc]
lemma inl_v_d (i j k : ℤ) (hij : i + (-1) = j) (hik : k + (-1) = i) :
    (inl φ).v i j hij ≫ (mappingCone φ).d j i =
      φ.f i ≫ (inr φ).f i - F.d i k ≫ (inl φ).v _ _ hik

(CochainComplex.mappingCone.inl φ).v i j hij ≫ (CochainComplex.mappingCone φ).d j i =
  φ.f i ≫ (CochainComplex.mappingCone.inr φ).f i - F.d i k ≫ (CochainComplex.mappingCone.inl φ).v k i hik


@[simp] theorem cast_last {n' : Nat} {h : n + 1 = n' + 1} : cast h (last n) = last n'


theorem tendsto_nhdsWithin_nhdsWithin {t : Set β} {a b} :
    Tendsto f (𝓝[s] a) (𝓝[t] b) ↔
      ∀ ε > 0, ∃ δ > 0, ∀ ⦃x⦄, x ∈ s → edist x a < δ → f x ∈ t ∧ edist (f x) b < ε

{α : Type u}
{β : Type v}
[PseudoEMetricSpace α]
{s : Set α}
[PseudoEMetricSpace β]
{f : α → β}
{t : Set β}
{a : α}
{b : β}

Filter.Tendsto f (𝓝[s] a) (𝓝[t] b) ↔ ∀ ε > 0, ∃ δ > 0, ∀ ⦃x : α⦄, x ∈ s → edist x a < δ → f x ∈ t ∧ edist (f x) b < ε


@[to_additive]
theorem quot_mk_assoc (x y z : α) : Quot.mk (AssocRel α) (x * y * z) = Quot.mk _ (x * (y * z))

Quot.mk (AddMagma.AssocRel α) (x + y + z) = Quot.mk (AddMagma.AssocRel α) (x + (y + z))


@[to_additive]
protected theorem eq {a₁ b₁} {a₂ b₂ : S} :
    f.mk' a₁ a₂ = f.mk' b₁ b₂ ↔ ∃ c : S, ↑c * (↑b₂ * a₁) = c * (a₂ * b₁)

{M : Type u_1}
[AddCommMonoid M]
{S : AddSubmonoid M}
{N : Type u_2}
[AddCommMonoid N]
(f : S.LocalizationMap N)
{a₁ b₁ : M}
{a₂ b₂ : ↥S}

f.mk' a₁ a₂ = f.mk' b₁ b₂ ↔ ∃ c, ↑c + (↑b₂ + a₁) = ↑c + (↑a₂ + b₁)