theorem IsRelPrime.of_dvd_right (h : IsRelPrime z y) (dvd : x ∣ y) : IsRelPrime z x

{α : Type u_1}
[CommMonoid α]
{x y z : α}
(h : IsRelPrime z y)
(dvd : x ∣ y)


lemma neg_one_pow_eq_or : ∀ n : ℕ, (-1 : R) ^ n = 1 ∨ (-1 : R) ^ n = -1

(R : Type x)
[Monoid R]
[HasDistribNeg R]
(n : ℕ)


lemma infClosure_mono : Monotone (infClosure : Set α → Set α)


@[simp]
theorem zero_hadamard : (0 : Matrix m n α) ⊙ A = 0

{α : Type u_1}
{m : Type u_4}
{n : Type u_5}
(A : Matrix m n α)
[MulZeroClass α]


@[simp]
theorem count_zero : count p 0 = 0


theorem lift_comp_map (i : P →ₗ[R] Q →ₗ[R] Q') (f : M →ₗ[R] P) (g : N →ₗ[R] Q) :
    (lift i).comp (map f g) = lift ((i.comp f).compl₂ g)

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

TensorProduct.lift i ∘ₗ TensorProduct.map f g = TensorProduct.lift ((i ∘ₗ f).compl₂ g)


theorem aux_pid_of_ufd_of_unique_irreducible (R : Type u) [CommRing R] [IsDomain R]
    [UniqueFactorizationMonoid R] (h₁ : ∃ p : R, Irreducible p)
    (h₂ : ∀ ⦃p q : R⦄, Irreducible p → Irreducible q → Associated p q) :
    IsPrincipalIdealRing R


theorem subtypeCongrHom_injective (p : α → Prop) [DecidablePred p] :
    Function.Injective (subtypeCongrHom p)

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


@[deprecated getElem?_concat_length (since := "2024-06-12")]
theorem get?_concat_length (l : List α) (a : α) : (l ++ [a]).get? l.length = some a


@[simp]
theorem coe_zero : ⇑(0 : α →ₙ+* β) = 0

{α : Type u_2}
{β : Type u_3}
[NonUnitalNonAssocSemiring α]
[NonUnitalNonAssocSemiring β]


theorem lt_congr_imp {x₁ y₁ x₂ y₂ : PGame} (hx : x₁ ≈ x₂) (hy : y₁ ≈ y₂) (h : x₁ < y₁) : x₂ < y₂

{x₁ y₁ x₂ y₂ : SetTheory.PGame}
(hx : x₁ ≈ x₂)
(hy : y₁ ≈ y₂)
(h : x₁ < y₁)


/-- `cyclotomic n ℚ` is the minimal polynomial of a primitive `n`-th root of unity `μ`. -/
theorem cyclotomic_eq_minpoly_rat {n : ℕ} {K : Type*} [Field K] {μ : K} (h : IsPrimitiveRoot μ n)
    (hpos : 0 < n) [CharZero K] : cyclotomic n ℚ = minpoly ℚ μ

{n : ℕ}
{K : Type u_2}
[Field K]
{μ : K}
(h : IsPrimitiveRoot μ n)
(hpos : 0 < n)
[CharZero K]


@[simp]
theorem ι_comp_lift (f : M →ₗ[R] A) (cond : ∀ m, f m * f m = 0) :
    (lift R ⟨f, cond⟩).toLinearMap.comp (ι R) = f

(R : Type u1)
[CommRing R]
{M : Type u2}
[AddCommGroup M]
[Module R M]
{A : Type u_1}
[Semiring A]
[Algebra R A]
(f : M →ₗ[R] A)
(cond : ∀ (m : M), f m * f m = 0)

((ExteriorAlgebra.lift R) ⟨f, cond⟩).toLinearMap ∘ₗ ExteriorAlgebra.ι R = f


theorem MDifferentiableOn.congr_mono (h : MDifferentiableOn I I' f s) (h' : ∀ x ∈ t, f₁ x = f x)
    (h₁ : t ⊆ s) : MDifferentiableOn I I' f₁ t

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{H : Type u_3}
[TopologicalSpace H]
{I : ModelWithCorners 𝕜 E H}
{M : Type u_4}
[TopologicalSpace M]
[ChartedSpace H M]
{E' : Type u_5}
[NormedAddCommGroup E']
[NormedSpace 𝕜 E']
{H' : Type u_6}
[TopologicalSpace H']
{I' : ModelWithCorners 𝕜 E' H'}
{M' : Type u_7}
[TopologicalSpace M']
[ChartedSpace H' M']
{f f₁ : M → M'}
{s t : Set M}
[Is : SmoothManifoldWithCorners I M]
[I's : SmoothManifoldWithCorners I' M']
(h : MDifferentiableOn I I' f s)
(h' : ∀ x ∈ t, f₁ x = f x)
(h₁ : t ⊆ s)


@[simp]
theorem coe_foldr (f : α → β → β) (H : LeftCommutative f) (b : β) (l : List α) :
    foldr f H b l = l.foldr f b

{α : Type u_1}
{β : Type v}
(f : α → β → β)
(H : LeftCommutative f)
(b : β)
(l : List α)

Multiset.foldr f H b ↑l = List.foldr f b l


theorem gt_or_eq_of_le [PartialOrder α] {a b : α} (h : a ≤ b) : a < b ∨ b = a

{α : Type u_2}
[PartialOrder α]
{a b : α}
(h : a ≤ b)


@[simp]
theorem coe_sort (l : List α) : sort r l = mergeSort r l

{α : Type u_1}
(r : α → α → Prop)
[DecidableRel r]
[IsTrans α r]
[IsAntisymm α r]
[IsTotal α r]
(l : List α)


/-- For any natural `k` and a real `r > 1` we have `n ^ k = o(r ^ n)` as `n → ∞`. -/
theorem isLittleO_pow_const_const_pow_of_one_lt {R : Type*} [NormedRing R] (k : ℕ) {r : ℝ}
    (hr : 1 < r) : (fun n ↦ (n : R) ^ k : ℕ → R) =o[atTop] fun n ↦ r ^ n

{R : Type u_4}
[NormedRing R]
(k : ℕ)
{r : ℝ}
(hr : 1 < r)

(fun n => ↑n ^ k) =o[Filter.atTop] fun n => r ^ n


@[simp]
theorem getOrElse_some (a : α) (d : α) [Decidable (some a).Dom] : getOrElse (some a) d = a

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


@[simp]
theorem val_succEmb : ⇑(succEmb n) = Fin.succ


theorem sup_liminf (a : α) : a ⊔ liminf u f = liminf (fun x => a ⊔ u x) f

{α : Type u_1}
{β : Type u_2}
[CompleteDistribLattice α]
{f : Filter β}
{u : β → α}
(a : α)

a ⊔ Filter.liminf u f = Filter.liminf (fun x => a ⊔ u x) f


/-- When a function has a limit at infinity, and its derivative is nonpositive, then the derivative
is automatically integrable on `(a, +∞)`. Version assuming differentiability
on `[a, +∞)`. -/
theorem integrableOn_Ioi_deriv_of_nonpos' (hderiv : ∀ x ∈ Ici a, HasDerivAt g (g' x) x)
    (g'neg : ∀ x ∈ Ioi a, g' x ≤ 0) (hg : Tendsto g atTop (𝓝 l)) : IntegrableOn g' (Ioi a)

(hderiv : ∀ x ∈ Set.Ici a, HasDerivAt g (g' x) x)

(hg : Filter.Tendsto g Filter.atTop (𝓝 l))

MeasureTheory.IntegrableOn g' (Set.Ioi a) MeasureTheory.volume


lemma add_eq_of_lt {q r : ℚ} (hqr : q + r ≠ 0)
    (hq : q ≠ 0) (hr : r ≠ 0) (hval : padicValRat p q < padicValRat p r) :
    padicValRat p (q + r) = padicValRat p q


lemma div_le_egauge_closedBall (r : ℝ≥0) (x : E) : ‖x‖₊ / r ≤ egauge 𝕜 (closedBall 0 r) x

(𝕜 : Type u_1)
[NormedField 𝕜]
{E : Type u_3}
[SeminormedAddCommGroup E]
[NormedSpace 𝕜 E]
(r : ℝ≥0)
(x : E)

↑‖x‖₊ / ↑r ≤ egauge 𝕜 (Metric.closedBall 0 ↑r) x


/-- This lemma expresses the vanishing of
`(P q).f (n+1) ≫ X.δ k : X _[n+1] ⟶ X _[n]` when `k≠0` and `k≥n-q+2` -/
theorem of_P : ∀ q n : ℕ, HigherFacesVanish q ((P q).f (n + 1) : X _[n + 1] ⟶ X _[n + 1])

{C : Type u_1}
[CategoryTheory.Category.{u_2, u_1} C]
[CategoryTheory.Preadditive C]
{X : CategoryTheory.SimplicialObject C}
(q n : ℕ)

AlgebraicTopology.DoldKan.HigherFacesVanish q ((AlgebraicTopology.DoldKan.P q).f (n + 1))


/-- A vector with coprime entries, right-multiplied by a matrix in `SL(2, R)`, has
coprime entries. -/
lemma vecMulSL {v : Fin 2 → R} (hab : IsCoprime (v 0) (v 1)) (A : SL(2, R)) :
    IsCoprime ((v ᵥ* A.1) 0) ((v ᵥ* A.1) 1)

(A : Matrix.SpecialLinearGroup (Fin 2) R)

IsCoprime (Matrix.vecMul v (↑A) 0) (Matrix.vecMul v (↑A) 1)


lemma mor₁_eq_zero_of_mono₂ (h : Mono T.mor₂) : T.mor₁ = 0

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

(T : CategoryTheory.Pretriangulated.Triangle C)

(hT : T ∈ CategoryTheory.Pretriangulated.distinguishedTriangles)


theorem _root_.Function.leftInvOn_invFunOn_of_subset_image_image [Nonempty α]
    (h : s ⊆ (invFunOn f s) '' (f '' s)) : LeftInvOn (invFunOn f s) f s

(h : s ⊆ Function.invFunOn f s '' (f '' s))

Set.LeftInvOn (Function.invFunOn f s) f s


/-- An 'unapplied' analogue of `Finset.prod_apply`. -/
@[to_additive "An 'unapplied' analogue of `Finset.sum_apply`."]
theorem Finset.prod_fn {α : Type*} {β : α → Type*} {γ} [∀ a, CommMonoid (β a)] (s : Finset γ)
    (g : γ → ∀ a, β a) : ∏ c ∈ s, g c = fun a ↦ ∏ c ∈ s, g c a

{α : Type u_1}
{β : α → Type u_2}
{γ : Type u_3}
[(a : α) → CommMonoid (β a)]
(s : Finset γ)
(g : γ → (a : α) → β a)


/-- The binary product in the category of a `SemilatticeInf` with `OrderTop` is the same as the
infimum.
-/
@[simp]
theorem prod_eq_inf [SemilatticeInf α] [OrderTop α] (x y : α) : Limits.prod x y = x ⊓ y

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


@[to_additive (attr := simp)]
lemma mulSupport_along_fiber_finite_of_finite (f : α × β → γ) (a : α) (h : (mulSupport f).Finite) :
    (mulSupport fun b ↦ f (a, b)).Finite

{α : Type u_1}
{β : Type u_2}
{γ : Type u_3}
[Zero γ]
(f : α × β → γ)
(a : α)
(h : (Function.support f).Finite)

(Function.support fun b => f (a, b)).Finite


@[to_additive]
theorem one_mem_one : (1 : α) ∈ (1 : Finset α)


private theorem candidatesB_nonempty : (candidatesB X Y).Nonempty

{X : Type u}
{Y : Type v}
[MetricSpace X]
[CompactSpace X]
[Nonempty X]
[MetricSpace Y]
[CompactSpace Y]
[Nonempty Y]


lemma insert_le_insert (ha : a ∉ s) (hb : b ∉ s) :
    toColex (insert a s) ≤ toColex (insert b s) ↔ a ≤ b

{α : Type u_1}
[PartialOrder α]
{s : Finset α}
{a b : α}
[DecidableEq α]
(ha : a ∉ s)
(hb : b ∉ s)

{ ofColex := insert a s } ≤ { ofColex := insert b s } ↔ a ≤ b


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

{f g : CategoryTheory.ComposableArrows C 2}

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

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

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


theorem sublistsLen_sublist_sublists' :
    ∀ (n) (l : List α), sublistsLen n l <+ sublists' l

(List.sublistsLen n l).Sublist l.sublists'


theorem iUnion_Iic_of_not_bddAbove_range (hf : ¬ BddAbove (range f)) : ⋃ i, Iic (f i) = univ

{ι : Sort u}
{α : Type v}
[LinearOrder α]
{f : ι → α}
(hf : ¬BddAbove (Set.range f))


theorem isPiSystem_Ixx {Ixx : α → α → Set α} {p : α → α → Prop}
    (Hne : ∀ {a b}, (Ixx a b).Nonempty → p a b)
    (Hi : ∀ {a₁ b₁ a₂ b₂}, Ixx a₁ b₁ ∩ Ixx a₂ b₂ = Ixx (max a₁ a₂) (min b₁ b₂)) (f : ι → α)
    (g : ι' → α) : @IsPiSystem α { S | ∃ i j, p (f i) (g j) ∧ Ixx (f i) (g j) = S }

(Hne : ∀ {a b : α}, (Ixx a b).Nonempty → p a b)

(Hi : ∀ {a₁ b₁ a₂ b₂ : α}, Ixx a₁ b₁ ∩ Ixx a₂ b₂ = Ixx (max a₁ a₂) (min b₁ b₂))

IsPiSystem {S | ∃ i j, p (f i) (g j) ∧ Ixx (f i) (g j) = S}


theorem toAddSubgroup_injective :
    Function.Injective (toAddSubgroup : NonUnitalSubring R → AddSubgroup R)


theorem pred_eq_iff_not_succ' {o} : pred o = o ↔ ∀ a, o ≠ succ a

o.pred = o ↔ ∀ (a : Ordinal.{u_4}), o ≠ Order.succ a


theorem lift_apply (F : G →* A) (f : MonoidAlgebra k G) :
    lift k G A F f = f.sum fun a b => b • F a

{k : Type u₁}
{G : Type u₂}
[CommSemiring k]
[Monoid G]
{A : Type u₃}
[Semiring A]
[Algebra k A]
(F : G →* A)
(f : MonoidAlgebra k G)

((MonoidAlgebra.lift k G A) F) f = Finsupp.sum f fun a b => b • F a


theorem adjoin_le_equalizer {s : Set A} (h : s.EqOn f g) : adjoin R s ≤ StarAlgHom.equalizer f g

{F : Type u_1}
{R : Type u_2}
{A : Type u_3}
{B : Type u_4}
[CommSemiring R]
[StarRing R]
[Semiring A]
[Algebra R A]
[StarRing A]
[StarModule R A]
[Semiring B]
[Algebra R B]
[StarRing B]
[FunLike F A B]
[AlgHomClass F R A B]
[StarAlgHomClass F R A B]
(f g : F)
{s : Set A}
(h : Set.EqOn (⇑f) (⇑g) s)

StarAlgebra.adjoin R s ≤ StarAlgHom.equalizer f g


theorem integral_comp_comm' (L : E →L[𝕜] F) {K} (hL : AntilipschitzWith K L) (φ : X → E) :
    ∫ x, L (φ x) ∂μ = L (∫ x, φ x ∂μ)

{X : Type u_1}
{E : Type u_3}
{F : Type u_4}
[MeasurableSpace X]
{μ : MeasureTheory.Measure X}
{𝕜 : Type u_5}
[RCLike 𝕜]
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
[NormedSpace ℝ F]
[CompleteSpace F]
[NormedSpace ℝ E]
[CompleteSpace E]
(L : E →L[𝕜] F)
{K : ℝ≥0}
(hL : AntilipschitzWith K ⇑L)
(φ : X → E)

∫ (x : X), L (φ x) ∂μ = L (∫ (x : X), φ x ∂μ)


@[simp]
protected theorem liftOn'_mk'' (f : α → φ) (h) (x : α) :
    Quotient.liftOn' (@Quotient.mk'' _ s₁ x) f h = f x

(h : ∀ (a b : α), Setoid.r a b → f a = f b)


/-- A typeclass saying that `p : G × G ↦ p.1 / p.2` is a continuous function. This property
automatically holds for topological groups. Lemmas using this class have primes.
The unprimed version is for `GroupWithZero`. -/
@[to_additive existing]
class ContinuousDiv (G : Type*) [TopologicalSpace G] [Div G] : Prop where
  continuous_div' : Continuous fun p : G × G => p.1 / p.2

{G : Type u_1}
[TopologicalSpace G]
[Div G]
[self : ContinuousDiv G]


@[to_additive]
theorem mem_div : a ∈ s / t ↔ ∃ b ∈ s, ∃ c ∈ t, b / c = a

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


theorem Gamma0_is_congruence (N : ℕ+) : IsCongruenceSubgroup (Gamma0 N)


@[simp]
theorem Ioc_insert_left (h : a ≤ b) : insert a (Ioc a b) = Icc a b

{α : Type u_1}
[PartialOrder α]
{a b : α}
(h : a ≤ b)


/-- Let `K` a subfield of `ℂ` and let `ψ : K →+* ℂ` a ring homomorphism. Assume that `ψ` is uniform
continuous, then `ψ` is either the inclusion map or the composition of the inclusion map with the
complex conjugation. -/
theorem Complex.uniformContinuous_ringHom_eq_id_or_conj (K : Subfield ℂ) {ψ : K →+* ℂ}
    (hc : UniformContinuous ψ) : ψ.toFun = K.subtype ∨ ψ.toFun = conj ∘ K.subtype

(K : Subfield ℂ)
{ψ : ↥K →+* ℂ}
(hc : UniformContinuous ⇑ψ)

(↑↑ψ).toFun = ⇑K.subtype ∨ (↑↑ψ).toFun = ⇑(starRingEnd ℂ) ∘ ⇑K.subtype


theorem swap_smul_involutive [MulAction (Perm α) β] (i j : α) :
    Function.Involutive (swap i j • · : β → β)

{α : Type u}
{β : Type v}
[DecidableEq α]
[MulAction (Equiv.Perm α) β]
(i j : α)

Function.Involutive fun x => Equiv.swap i j • x


protected theorem Equiv.rfl {x} : Equiv x x


@[to_additive]
theorem Commute.function_commute_mul_left (h : Commute a b) :
    Function.Commute (a * ·) (b * ·)

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

Function.Commute (fun x => a * x) fun x => b * x


theorem iterate_derivative_at_1_eq_zero_of_lt (n : ℕ) {ν k : ℕ} :
    k < n - ν → (Polynomial.derivative^[k] (bernsteinPolynomial R n ν)).eval 1 = 0

(R : Type u_1)
[CommRing R]
(n : ℕ)
{ν k : ℕ}

k < n - ν → Polynomial.eval 1 ((⇑Polynomial.derivative)^[k] (bernsteinPolynomial R n ν)) = 0


private lemma lambda_not_dvd_X : ¬ λ ∣ S.X

(S : FermatLastTheoremForThreeGen.Solution hζ)

¬hζ.toInteger - 1 ∣ FermatLastTheoremForThreeGen.Solution.X S


@[simp]
theorem lintegral_zero_measure {m : MeasurableSpace α} (f : α → ℝ≥0∞) :
    ∫⁻ a, f a ∂(0 : Measure α) = 0

{α : Type u_1}
{m : MeasurableSpace α}
(f : α → ℝ≥0∞)


protected theorem sound {a b : C} {f₁ f₂ : a ⟶ b} (h : r f₁ f₂) :
    (functor r).map f₁ = (functor r).map f₂

{C : Type u_2}
[CategoryTheory.Category.{u_1, u_2} C]
(r : HomRel C)
{a b : C}
{f₁ f₂ : a ⟶ b}
(h : r f₁ f₂)

(CategoryTheory.Quotient.functor r).map f₁ = (CategoryTheory.Quotient.functor r).map f₂


@[simp]
theorem isBot_toDual_iff : IsBot (toDual a) ↔ IsTop a


theorem Preadditive.isSeparating_iff (𝒢 : Set C) :
    IsSeparating 𝒢 ↔ ∀ ⦃X Y : C⦄ (f : X ⟶ Y), (∀ G ∈ 𝒢, ∀ (h : G ⟶ X), h ≫ f = 0) → f = 0

{C : Type u}
[CategoryTheory.Category.{v, u} C]
[CategoryTheory.Preadditive C]
(𝒢 : Set C)

CategoryTheory.IsSeparating 𝒢 ↔ ∀ ⦃X Y : C⦄ (f : X ⟶ Y), (∀ G ∈ 𝒢, ∀ (h : G ⟶ X), h ≫ f = 0) → f = 0


@[simp] lemma unmop_tensorHom {X₁ Y₁ X₂ Y₂ : Cᴹᵒᵖ} (f : X₁ ⟶ Y₁) (g : X₂ ⟶ Y₂) :
    (f ⊗ g).unmop = g.unmop ⊗ f.unmop

{C : Type u₁}
[CategoryTheory.Category.{v₁, u₁} C]
[CategoryTheory.MonoidalCategory C]
{X₁ Y₁ X₂ Y₂ : Cᴹᵒᵖ}
(f : X₁ ⟶ Y₁)
(g : X₂ ⟶ Y₂)

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


theorem mkContinuous₂_norm_le (f : E →ₛₗ[σ₁₃] F →ₛₗ[σ₂₃] G) {C : ℝ} (h0 : 0 ≤ C)
    (hC : ∀ x y, ‖f x y‖ ≤ C * ‖x‖ * ‖y‖) : ‖f.mkContinuous₂ C hC‖ ≤ C

{σ₂₃ : 𝕜₂ →+* 𝕜₃}

{σ₁₃ : 𝕜 →+* 𝕜₃}

(f : E →ₛₗ[σ₁₃] F →ₛₗ[σ₂₃] G)

(hC : ∀ (x : E) (y : F), ‖(f x) y‖ ≤ C * ‖x‖ * ‖y‖)


@[to_additive]
theorem mem_sSup_of_directedOn {S : Set (Submonoid M)} (Sne : S.Nonempty)
    (hS : DirectedOn (· ≤ ·) S) {x : M} : x ∈ sSup S ↔ ∃ s ∈ S, x ∈ s

(hS : DirectedOn (fun x x_1 => x ≤ x_1) S)


@[simp]
theorem unitization_apply (x : Unitization R s) : unitization s x = algebraMap R A x.fst + x.snd

{R : Type u_1}
{S : Type u_2}
{A : Type u_3}
[CommSemiring R]
[StarRing R]
[Semiring A]
[StarRing A]
[Algebra R A]
[StarModule R A]
[SetLike S A]
[hSA : NonUnitalSubsemiringClass S A]
[hSRA : SMulMemClass S R A]
[StarMemClass S A]
(s : S)
(x : Unitization R ↥s)

(NonUnitalStarSubalgebra.unitization s) x = (algebraMap R A) x.fst + ↑x.snd


theorem ae_map_iff {p : β → Prop} {μ : Measure α} : (∀ᵐ x ∂μ.map f, p x) ↔ ∀ᵐ x ∂μ, p (f x)

{α : Type u_2}
{β : Type u_3}
{m0 : MeasurableSpace α}
{m1 : MeasurableSpace β}
{f : α → β}
(hf : MeasurableEmbedding f)
{p : β → Prop}
{μ : MeasureTheory.Measure α}

(∀ᵐ (x : β) ∂MeasureTheory.Measure.map f μ, p x) ↔ ∀ᵐ (x : α) ∂μ, p (f x)


theorem source_inter_preimage_inv_preimage (s : Set X) :
    e.source ∩ e ⁻¹' (e.symm ⁻¹' s) = e.source ∩ s

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

e.source ∩ ↑e ⁻¹' (↑e.symm ⁻¹' s) = e.source ∩ s


theorem mem_divisors_self (n : ℕ) (h : n ≠ 0) : n ∈ n.divisors


@[ext]
theorem ext ⦃f g : ArithmeticFunction R⦄ (h : ∀ x, f x = g x) : f = g

{R : Type u_1}
[Zero R]
⦃f g : ArithmeticFunction R⦄
(h : ∀ (x : ℕ), f x = g x)


@[to_additive (attr := simp)]
theorem coe_map (f : F) (S : Submonoid M) : (S.map f : Set N) = f '' S

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


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

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

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


@[to_additive]
theorem finprod_eq_finset_prod_of_mulSupport_subset (f : α → M) {s : Finset α}
    (h : mulSupport f ⊆ (s : Set α)) : ∏ᶠ i, f i = ∏ i ∈ s, f i

{α : Type u_1}
{M : Type u_5}
[AddCommMonoid M]
(f : α → M)
{s : Finset α}
(h : Function.support f ⊆ ↑s)


theorem lfp_le {a : α} (h : f a ≤ a) : lfp f ≤ a

{α : Type u}
[CompleteLattice α]
(f : α →o α)
{a : α}
(h : f a ≤ a)


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

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

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


theorem vsub_mem_vsub : b ∈ s → c ∈ t → b -ᵥ c ∈ s -ᵥ t

{α : Type u_2}
{β : Type u_3}
[VSub α β]
[DecidableEq α]
{s t : Finset β}
{b c : β}


theorem volume_subtype_coe_eq_zero_of_volume_eq_zero (hu : NullMeasurableSet u) {t : Set u}
    (ht : volume t = 0) : volume (((↑) : u → δ) '' t) = 0

(hu : MeasureTheory.NullMeasurableSet u MeasureTheory.volume)

MeasureTheory.volume (Subtype.val '' t) = 0


/-- If `X` is a paracompact normal topological space and `U` is an open covering of a closed set
`s`, then there exists a `BumpCovering ι X s` that is subordinate to `U`. This version assumes that
`p : (X → ℝ) → Prop` is a predicate that satisfies Urysohn's lemma, and provides a
`BumpCovering` such that each function of the covering satisfies `p`. -/
theorem exists_isSubordinate_of_prop [NormalSpace X] [ParacompactSpace X] (p : (X → ℝ) → Prop)
    (h01 : ∀ s t, IsClosed s → IsClosed t → Disjoint s t →
      ∃ f : C(X, ℝ), p f ∧ EqOn f 0 s ∧ EqOn f 1 t ∧ ∀ x, f x ∈ Icc (0 : ℝ) 1)
    (hs : IsClosed s) (U : ι → Set X) (ho : ∀ i, IsOpen (U i)) (hU : s ⊆ ⋃ i, U i) :
    ∃ f : BumpCovering ι X s, (∀ i, p (f i)) ∧ f.IsSubordinate U

(h01 :
  ∀ (s t : Set X),
    IsClosed s →
      IsClosed t → Disjoint s t → ∃ f, p ⇑f ∧ Set.EqOn (⇑f) 0 s ∧ Set.EqOn (⇑f) 1 t ∧ ∀ (x : X), f x ∈ Set.Icc 0 1)

∃ f, (∀ (i : ι), p ⇑(f i)) ∧ f.IsSubordinate U


theorem finite_range (f : ι → α) [Finite ι] : (range f).Finite

{α : Type u}
{ι : Sort w}
(f : ι → α)
[Finite ι]


theorem eq_rootMultiplicity_map {p : A[X]} {f : A →+* B} (hf : Function.Injective f) (a : A) :
    rootMultiplicity a p = rootMultiplicity (f a) (p.map f)

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

Polynomial.rootMultiplicity a p = Polynomial.rootMultiplicity (f a) (Polynomial.map f p)


theorem prod_comp {ι : Type*} (s : Finset ι) (p : ι → R[X]) (q : R[X]) :
    (∏ j ∈ s, p j).comp q = ∏ j ∈ s, (p j).comp q

{R : Type u}
[CommSemiring R]
{ι : Type u_1}
(s : Finset ι)
(p : ι → R[X])
(q : R[X])


@[simp]
theorem transpose_mul [AddCommMonoid α] [CommSemigroup α] [Fintype n] (M : Matrix m n α)
    (N : Matrix n l α) : (M * N)ᵀ = Nᵀ * Mᵀ

{l : Type u_1}
{m : Type u_2}
{n : Type u_3}
{α : Type v}
[AddCommMonoid α]
[CommSemigroup α]
[Fintype n]
(M : Matrix m n α)
(N : Matrix n l α)


theorem IsSelfAdjoint.coe_selfAdjointPart_apply {x : A} (hx : IsSelfAdjoint x) :
    (selfAdjointPart R x : A) = x

(R : Type u_1)
{A : Type u_2}
[Semiring R]
[StarMul R]
[TrivialStar R]
[AddCommGroup A]
[Module R A]
[StarAddMonoid A]
[StarModule R A]
[Invertible 2]
{x : A}
(hx : IsSelfAdjoint x)


@[simp]
theorem absNorm_eq_one_iff {I : Ideal S} : absNorm I = 1 ↔ I = ⊤

{S : Type u_1}
[CommRing S]
[IsDomain S]
[Nontrivial S]
[IsDedekindDomain S]
[Module.Free ℤ S]
{I : Ideal S}


@[to_additive]
theorem one_mul_eq_id : ((1 : M) * ·) = id


protected theorem lt_trans : ∀ {x y z : Bool}, x < y → y < z → x < z


@[simp]
theorem op_geom_sum₂ (x y : α) (n : ℕ) : ∑ i ∈ range n, op y ^ (n - 1 - i) * op x ^ i =
    ∑ i ∈ range n, op y ^ i * op x ^ (n - 1 - i)

{α : Type u}
[Semiring α]
(x y : α)
(n : ℕ)

∑ i ∈ Finset.range n, MulOpposite.op y ^ (n - 1 - i) * MulOpposite.op x ^ i =
  ∑ i ∈ Finset.range n, MulOpposite.op y ^ i * MulOpposite.op x ^ (n - 1 - i)


/-- `yoneda'` induces an equivalence of category between `Type u` and
`SheafOfTypes typesGrothendieckTopology`. -/
@[simps!]
noncomputable def typeEquiv : Type u ≌ SheafOfTypes typesGrothendieckTopology

∀
  (a :
    (CategoryTheory.yoneda'.comp
          ((CategoryTheory.sheafOfTypesToPresheaf CategoryTheory.typesGrothendieckTopology).comp
            ((CategoryTheory.evaluation Type uᵒᵖ (Type u)).obj (Opposite.op PUnit.{u + 1})))).obj
      X),
  CategoryTheory.typeEquiv.unitIso.inv.app X a =
    (CategoryTheory.evalEquiv (CategoryTheory.yoneda.obj X) ⋯ PUnit.{u + 1}).symm
      (CategoryTheory.CategoryStruct.comp a fun x x_1 => x) PUnit.unit


@[simp]
theorem infs_eq_empty : s ⊼ t = ∅ ↔ s = ∅ ∨ t = ∅

{α : Type u_2}
[DecidableEq α]
[SemilatticeInf α]
{s t : Finset α}


theorem indicator_summable {f : α → ℝ≥0} (hf : Summable f) (s : Set α) :
    Summable (s.indicator f)

{α : Type u_1}
{f : α → ℝ≥0}
(hf : Summable f)
(s : Set α)


theorem sub_modByMonic (a b mod : R[X]) : (a - b) %ₘ mod = a %ₘ mod - b %ₘ mod

{R : Type u}
[CommRing R]
(a b mod : R[X])


theorem atom_le_iSup [Order.Frame α] {a : α} (ha : IsAtom a) {f : ι → α} :
    a ≤ iSup f ↔ ∃ i, a ≤ f i

{ι : Sort u_1}
{α : Type u_2}
[Order.Frame α]
{a : α}
(ha : IsAtom a)
{f : ι → α}


theorem ssubset_insert {s : Set α} {a : α} (h : a ∉ s) : s ⊂ insert a s

{α : Type u}
{s : Set α}
{a : α}
(h : a ∉ s)


theorem ι_jointly_surjective (x : 𝖣.glued) : ∃ (i : D.J) (y : D.U i), (𝖣.ι i).base y = x

(D : AlgebraicGeometry.PresheafedSpace.GlueData C)


@[simp]
lemma algebraTensorAlgEquiv_tmul (a : A) (p : MvPolynomial σ R) :
    algebraTensorAlgEquiv R A (a ⊗ₜ p) = a • MvPolynomial.map (algebraMap R A) p

(R : Type u)
[CommSemiring R]
{σ : Type u_1}
(A : Type u_3)
[CommSemiring A]
[Algebra R A]
(a : A)
(p : MvPolynomial σ R)

(MvPolynomial.algebraTensorAlgEquiv R A) (a ⊗ₜ[R] p) = a • (MvPolynomial.map (algebraMap R A)) p


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


@[to_additive (attr := simp)]
theorem snd_mul [Mul M] [Mul N] (p q : M × N) : (p * q).2 = p.2 * q.2

{M : Type u_5}
{N : Type u_6}
[Add M]
[Add N]
(p q : M × N)


@[simp]
theorem iget_map [DecidableEq P.A] [Inhabited α] [Inhabited β] (x : P α)
    (f : α → β) (i : P.Idx) (h : i.1 = x.1) : (P.map f x).iget i = f (x.iget i)

{P : PFunctor.{u}}
{α : Type v₁}
{β : Type v₂}
[DecidableEq P.A]
[Inhabited α]
[Inhabited β]
(x : ↑P α)
(f : α → β)
(i : P.Idx)
(h : i.fst = x.fst)


theorem AnalyticOn.neg {s : Set E} (hf : AnalyticOn 𝕜 f s) : AnalyticOn 𝕜 (-f) s

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


@[simp]
theorem set_biUnion_preimage_singleton (f : α → β) (s : Finset β) :
    ⋃ y ∈ s, f ⁻¹' {y} = f ⁻¹' s

{α : Type u_2}
{β : Type u_3}
(f : α → β)
(s : Finset β)


theorem measure_diff_add_inter (s : Set α) (ht : MeasurableSet t) : μ (s \ t) + μ (s ∩ t) = μ s

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


theorem le_minimum?_iff [Min α] [LE α]
    (le_min_iff : ∀ a b c : α, a ≤ min b c ↔ a ≤ b ∧ a ≤ c) :
    {xs : List α} → xs.minimum? = some a → ∀ x, x ≤ a ↔ ∀ b, b ∈ xs → x ≤ b

(le_min_iff : ∀ (a b c : α), a ≤ min b c ↔ a ≤ b ∧ a ≤ c)

xs.minimum? = some a → ∀ (x : α), x ≤ a ↔ ∀ (b : α), b ∈ xs → x ≤ b


/-- The **Four Functions Theorem** on a powerset algebra. See `four_functions_theorem` for the
finite distributive lattice generalisation. -/
protected lemma Finset.four_functions_theorem (u : Finset α)
    (h₁ : 0 ≤ f₁) (h₂ : 0 ≤ f₂) (h₃ : 0 ≤ f₃) (h₄ : 0 ≤ f₄)
    (h : ∀ ⦃s⦄, s ⊆ u → ∀ ⦃t⦄, t ⊆ u → f₁ s * f₂ t ≤ f₃ (s ∩ t) * f₄ (s ∪ t))
    {𝒜 ℬ : Finset (Finset α)} (h𝒜 : 𝒜 ⊆ u.powerset) (hℬ : ℬ ⊆ u.powerset) :
    (∑ s ∈ 𝒜, f₁ s) * ∑ s ∈ ℬ, f₂ s ≤ (∑ s ∈ 𝒜 ⊼ ℬ, f₃ s) * ∑ s ∈ 𝒜 ⊻ ℬ, f₄ s

(h : ∀ ⦃s : Finset α⦄, s ⊆ u → ∀ ⦃t : Finset α⦄, t ⊆ u → f₁ s * f₂ t ≤ f₃ (s ∩ t) * f₄ (s ∪ t))


theorem mul_nat (h : Irrational x) {m : ℕ} (hm : m ≠ 0) : Irrational (x * m)

{x : ℝ}
(h : Irrational x)
{m : ℕ}
(hm : m ≠ 0)


/-- Construct a left unitor from specified limit cones.
-/
@[simps]
def BinaryFan.leftUnitor {X : C} {s : Cone (Functor.empty.{0} C)} (P : IsLimit s)
    {t : BinaryFan s.pt X} (Q : IsLimit t) : t.pt ≅ X

{s : CategoryTheory.Limits.Cone (CategoryTheory.Functor.empty C)}

{t : CategoryTheory.Limits.BinaryFan s.pt X}

(CategoryTheory.Limits.BinaryFan.leftUnitor P Q).hom = t.snd


theorem DifferentiableOn.sqrt (hf : DifferentiableOn ℝ f s) (hs : ∀ x ∈ s, f x ≠ 0) :
    DifferentiableOn ℝ (fun y => √(f y)) s

{E : Type u_1}
[NormedAddCommGroup E]
[NormedSpace ℝ E]
{f : E → ℝ}
{s : Set E}
(hf : DifferentiableOn ℝ f s)
(hs : ∀ x ∈ s, f x ≠ 0)


theorem ofReal_cpow {x : ℝ} (hx : 0 ≤ x) (y : ℝ) : ((x ^ y : ℝ) : ℂ) = (x : ℂ) ^ (y : ℂ)


/-- Given a cocone morphism whose object part is an isomorphism, produce an
isomorphism of cocones.
-/
theorem cocone_iso_of_hom_iso {K : J ⥤ C} {c d : Cocone K} (f : c ⟶ d) [i : IsIso f.hom] :
    IsIso f

{J : Type u₁}
[CategoryTheory.Category.{v₁, u₁} J]
{C : Type u₃}
[CategoryTheory.Category.{v₃, u₃} C]
{K : J ⥤ C}
{c d : CategoryTheory.Limits.Cocone K}
(f : c ⟶ d)
[i : CategoryTheory.IsIso f.hom]


theorem Differentiable.fderiv_norm_rpow {f : F → E} (hf : Differentiable ℝ f)
    {x : F} {p : ℝ} (hp : 1 < p) :
    fderiv ℝ (fun x ↦ ‖f x‖ ^ p) x =
    (p * ‖f x‖ ^ (p - 2)) • (innerSL ℝ (f x)).comp (fderiv ℝ f x)

{E : Type u_1}
[NormedAddCommGroup E]
[InnerProductSpace ℝ E]
{F : Type u_2}
[NormedAddCommGroup F]
[NormedSpace ℝ F]
{f : F → E}
(hf : Differentiable ℝ f)
{x : F}
{p : ℝ}
(hp : 1 < p)

fderiv ℝ (fun x => ‖f x‖ ^ p) x = (p * ‖f x‖ ^ (p - 2)) • ((innerSL ℝ) (f x)).comp (fderiv ℝ f x)


theorem mul_le_mul_iff_left {a b c : Ordinal} (a0 : 0 < a) : a * b ≤ a * c ↔ b ≤ c


/-- The **rank-nullity theorem** -/
theorem rank_range_add_rank_ker (f : M →ₗ[R] M₁) :
    Module.rank R (LinearMap.range f) + Module.rank R (LinearMap.ker f) = Module.rank R M

{R : Type u_1}
{M M₁ : Type u}
[Ring R]
[AddCommGroup M]
[AddCommGroup M₁]
[Module R M]
[Module R M₁]
[HasRankNullity.{u, u_1} R]
(f : M →ₗ[R] M₁)

Module.rank R ↥(LinearMap.range f) + Module.rank R ↥(LinearMap.ker f) = Module.rank R M


theorem eq_of_eqOn_top {f g : M →[L] N} (h : Set.EqOn f g (⊤ : Substructure L M)) : f = g

{L : FirstOrder.Language}
{M : Type w}
{N : Type u_1}
[L.Structure M]
[L.Structure N]
{f g : L.Hom M N}
(h : Set.EqOn ⇑f ⇑g ↑⊤)


lemma top_mul' : ∀ (b : WithTop α), ⊤ * b = if b = 0 then 0 else ⊤

{α : Type u_1}
[DecidableEq α]
[MulZeroClass α]
(b : WithTop α)


theorem stronglyMeasurable_condexp : StronglyMeasurable[m] (μ[f|m])

{α : Type u_1}
{F' : Type u_3}
[NormedAddCommGroup F']
[NormedSpace ℝ F']
[CompleteSpace F']
{m m0 : MeasurableSpace α}
{μ : MeasureTheory.Measure α}
{f : α → F'}


@[simp, aesop safe apply (rule_sets := [finsetNonempty])]
lemma diffs_nonempty : (s \\ t).Nonempty ↔ s.Nonempty ∧ t.Nonempty

{α : Type u_2}
[DecidableEq α]
[GeneralizedBooleanAlgebra α]
{s t : Finset α}

(s.diffs t).Nonempty ↔ s.Nonempty ∧ t.Nonempty


theorem dist_zero_right (n : ℕ) : dist n 0 = n


/-- The **Heine–Borel theorem**: In a proper space, a closed bounded set is compact. -/
theorem isCompact_of_isClosed_isBounded [ProperSpace α] (hc : IsClosed s) (hb : IsBounded s) :
    IsCompact s

{α : Type u}
[PseudoMetricSpace α]
{s : Set α}
[ProperSpace α]
(hc : IsClosed s)
(hb : Bornology.IsBounded s)


lemma injective_eq_monomorphisms_iff :
    MorphismProperty.injective C = monomorphisms C ↔ (forget C).PreservesMonomorphisms

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

CategoryTheory.MorphismProperty.injective C = CategoryTheory.MorphismProperty.monomorphisms C ↔
  (CategoryTheory.forget C).PreservesMonomorphisms


@[measurability, fun_prop]
theorem Measurable.coe_ereal_ennreal {f : α → ℝ≥0∞} (hf : Measurable f) :
    Measurable fun x => (f x : EReal)

{α : Type u_1}
[MeasurableSpace α]
{f : α → ℝ≥0∞}
(hf : Measurable f)


theorem get_of_mem {a} {l : List α} (h : a ∈ l) : ∃ n, get l n = a

{α : Type u_1}
{a : α}
{l : List α}
(h : a ∈ l)


/-- For rewriting in the reverse direction, see `Fin.cast_castAdd_left`. -/
theorem castAdd_cast {n n' : Nat} (m : Nat) (i : Fin n') (h : n' = n) :
    castAdd m (Fin.cast h i) = Fin.cast (congrArg (. + m) h) (castAdd m i)

Fin.castAdd m (Fin.cast h i) = Fin.cast ⋯ (Fin.castAdd m i)


theorem norm_pos [RingHomIsometric σ₁₂] [Nontrivial E] (e : E ≃SL[σ₁₂] F) :
    0 < ‖(e : E →SL[σ₁₂] F)‖

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


protected theorem leftInverse : LeftInverse f f

{α : Sort u}
{f : α → α}
(h : Function.Involutive f)


lemma mem_iInf {ι : Type*} {I : ι → TwoSidedIdeal R} {x : R} :
    x ∈ iInf I ↔ ∀ i, x ∈ I i

(R : Type u_1)
[NonUnitalNonAssocRing R]
{ι : Type u_2}
{I : ι → TwoSidedIdeal R}
{x : R}


theorem pow_apply (n : M) (m : ℕ) : Submonoid.pow n m = ⟨n ^ m, m, rfl⟩

{M : Type u_1}
[Monoid M]
(n : M)
(m : ℕ)


/-- The functor `ComposableArrows C (n + 1) ⥤ ComposableArrows C n` which forgets
the last arrow. -/
@[simps!]
def δlastFunctor : ComposableArrows C (n + 1) ⥤ ComposableArrows C n

(F : CategoryTheory.ComposableArrows C (n + 1))

∀ {X Y : Fin (n + 1)} (f : X ⟶ Y), (CategoryTheory.ComposableArrows.δlastFunctor.obj F).map f = F.map f


@[simp]
theorem coe_extendScalars : (extendScalars h : Set L) = (E : Set L)

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

↑(IntermediateField.extendScalars h) = ↑E


theorem pow_inv_comm₀ (a : G₀) (m n : ℕ) : a⁻¹ ^ m * a ^ n = a ^ n * a⁻¹ ^ m

{G₀ : Type u_8}
[GroupWithZero G₀]
(a : G₀)
(m n : ℕ)


theorem coe_map_subset_range (f : α ↪ β) (s : Finset α) : (s.map f : Set β) ⊆ Set.range f

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


nonrec theorem sinh_two_mul : sinh (2 * x) = 2 * sinh x * cosh x

Real.sinh (2 * x) = 2 * Real.sinh x * Real.cosh x


@[simp]
theorem toEquiv_eq_coe (f : R ≃+* S) : f.toEquiv = f

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


@[simp]
theorem coe_toLieHom : ((f : A →ₗ⁅R⁆ B) : A → B) = f

{A : Type v}
[Ring A]
{R : Type u}
[CommRing R]
[Algebra R A]
{B : Type w}
[Ring B]
[Algebra R B]
(f : A →ₐ[R] B)


@[simp] theorem any_nil : [].any f = false

∀ {α : Type u_1} {f : α → Bool}, List.nil.any f = false


/-- Let `f` be a contracting map with constant `K`; let `g` be another map uniformly
`C`-close to `f`. If `x` and `y` are their fixed points, then `dist x y ≤ C / (1 - K)`. -/
theorem dist_fixedPoint_fixedPoint_of_dist_le' (g : α → α) {x y} (hx : IsFixedPt f x)
    (hy : IsFixedPt g y) {C} (hfg : ∀ z, dist (f z) (g z) ≤ C) : dist x y ≤ C / (1 - K)

{α : Type u_1}
[MetricSpace α]
{K : ℝ≥0}
{f : α → α}
(hf : ContractingWith K f)
(g : α → α)
{x y : α}
(hx : Function.IsFixedPt f x)
(hy : Function.IsFixedPt g y)
{C : ℝ}
(hfg : ∀ (z : α), dist (f z) (g z) ≤ C)


theorem zero_of_testBit_eq_false {n : ℕ} (h : ∀ i, testBit n i = false) : n = 0

{n : ℕ}
(h : ∀ (i : ℕ), n.testBit i = false)


/-- If `G` is adjoint to `F` then `F.op` is adjoint to `G.op`. -/
@[simps! unit_app counit_app]
-- Porting note: in mathlib3 we generated all the default `simps` lemmas.
-- However the `simpNF` linter correctly flags some of these as unsuitable simp lemmas.
-- `unit_app` and `counit_app` appear to suffice (tested in mathlib3).
-- See also the porting note on adjointOfOpAdjointOp
def opAdjointOpOfAdjoint (F : C ⥤ D) (G : D ⥤ C) (h : G ⊣ F) : F.op ⊣ G.op

{C : Type u₁}
[CategoryTheory.Category.{v₁, u₁} C]
{D : Type u₂}
[CategoryTheory.Category.{v₂, u₂} D]
(F : C ⥤ D)
(G : D ⥤ C)
(h : G ⊣ F)
(X : Cᵒᵖ)

(CategoryTheory.Adjunction.opAdjointOpOfAdjoint F G h).unit.app X =
  (CategoryTheory.opEquiv X (Opposite.op (G.toPrefunctor.1 (F.obj (Opposite.unop X))))).symm
    (G.map
        ((CategoryTheory.opEquiv (Opposite.op (F.obj (Opposite.unop X))) (Opposite.op (F.obj (Opposite.unop X))))
          (𝟙 (Opposite.op (F.obj (Opposite.unop X))))) ≫
      h.counit.app (Opposite.unop X))


/-- The intersection of distinct prime powers in a Dedekind domain is the product of these
prime powers. -/
theorem IsDedekindDomain.inf_prime_pow_eq_prod {ι : Type*} (s : Finset ι) (f : ι → Ideal R)
    (e : ι → ℕ) (prime : ∀ i ∈ s, Prime (f i))
    (coprime : ∀ᵉ (i ∈ s) (j ∈ s), i ≠ j → f i ≠ f j) :
    (s.inf fun i => f i ^ e i) = ∏ i ∈ s, f i ^ e i

(coprime : ∀ i ∈ s, ∀ j ∈ s, i ≠ j → f i ≠ f j)


theorem limit.coneMorphism_π {F : J ⥤ C} [HasLimit F] (c : Cone F) (j : J) :
    (limit.coneMorphism c).hom ≫ limit.π F j = c.π.app j

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

(CategoryTheory.Limits.limit.coneMorphism c).hom ≫ CategoryTheory.Limits.limit.π F j = c.π.app j


/-- Taking the first `l₁.length + i` elements in `l₁ ++ l₂` is the same as appending the first
`i` elements of `l₂` to `l₁`. -/
theorem take_append {l₁ l₂ : List α} (i : Nat) :
    take (l₁.length + i) (l₁ ++ l₂) = l₁ ++ take i l₂

{α : Type u_1}
{l₁ l₂ : List α}
(i : Nat)

List.take (l₁.length + i) (l₁ ++ l₂) = l₁ ++ List.take i l₂


@[norm_cast, simp]
theorem coe_zsmul (z : ℤ) (f : M →ₗ⁅R,L⁆ N) : ⇑(z • f) = z • (⇑f)

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


protected theorem lawfulFunctor' [F : Functor t']
    (h₀ : ∀ {α β} (f : α → β), Functor.map f = Equiv.map eqv f)
    (h₁ : ∀ {α β} (f : β), Functor.mapConst f = (Equiv.map eqv ∘ Function.const α) f) :
    LawfulFunctor t'

(h₀ : ∀ {α β : Type u} (f : α → β), Functor.map f = Equiv.map eqv f)

(h₁ : ∀ {α β : Type u} (f : β), Functor.mapConst f = (Equiv.map eqv ∘ Function.const α) f)


@[simp]
lemma DifferentiableAt.add_iff_left (hg : DifferentiableAt 𝕜 g x) :
    DifferentiableAt 𝕜 (fun y => f y + g y) x ↔ DifferentiableAt 𝕜 f x

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{F : Type u_3}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{f g : E → F}
{x : E}
(hg : DifferentiableAt 𝕜 g x)


protected theorem traverse_eq_map_id {α β} (f : α → β) (x : List α) :
    List.traverse ((pure : _ → Id _) ∘ f) x = (pure : _ → Id _) (f <$> x)

{α β : Type u_1}
(f : α → β)
(x : List α)

List.traverse (pure ∘ f) x = pure (f <$> x)


lemma isMaximal_comap_C_of_isJacobson' {P : Ideal R[X]} (hP : IsMaximal P) :
    (P.comap (C : R →+* R[X])).IsMaximal

{R : Type u_1}
[CommRing R]
[Ideal.IsJacobson R]
{P : Ideal (Polynomial R)}
(hP : P.IsMaximal)


/-- Third (main) version, with pointwise equicontinuity and range in a compact subset, but
without closedness. The closure is then compact. -/
theorem arzela_ascoli [T2Space β] (s : Set β) (hs : IsCompact s) (A : Set (α →ᵇ β))
    (in_s : ∀ (f : α →ᵇ β) (x : α), f ∈ A → f x ∈ s) (H : Equicontinuous ((↑) : A → α → β)) :
    IsCompact (closure A)

(A : Set (BoundedContinuousFunction α β))

(in_s : ∀ (f : BoundedContinuousFunction α β) (x : α), f ∈ A → f x ∈ s)


@[simp] lemma diracProba_toMeasure_apply_of_mem {x : X} {A : Set X} (x_in_A : x ∈ A) :
    (diracProba x).toMeasure A = 1

{X : Type u_1}
[MeasurableSpace X]
{x : X}
{A : Set X}
(x_in_A : x ∈ A)


theorem support_map_of_injective [Semiring R] [Semiring S] (p : R[X]) {f : R →+* S}
    (hf : Function.Injective f) : (map f p).support = p.support

{R : Type u}
{S : Type v}
[Semiring R]
[Semiring S]
(p : R[X])
{f : R →+* S}
(hf : Function.Injective ⇑f)

(Polynomial.map f p).support = p.support


@[simp]
theorem liftCover_restrict' {s : Set α} {hs : s ∈ A} :
    (liftCover' A F hF hA).restrict s = F s hs

{hF :
  ∀ (s : Set α) (hs : s ∈ A) (t : Set α) (ht : t ∈ A) (x : α) (hxi : x ∈ s) (hxj : x ∈ t),
    (F s hs) ⟨x, hxi⟩ = (F t ht) ⟨x, hxj⟩}

ContinuousMap.restrict s (ContinuousMap.liftCover' A F hF hA) = F s hs


/-- The tensor product functor from `C × C` to `C` as a monoidal functor. -/
@[simps!]
def tensorMonoidal : MonoidalFunctor (C × C) C

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

(CategoryTheory.tensorMonoidal C).obj X = X.1 ⊗ X.2


lemma closure_biUnion_congr (M : Matroid α) (Xs Ys : ι → Set α) (A : Set ι)
    (h : ∀ i ∈ A, M.closure (Xs i) = M.closure (Ys i)) :
    M.closure (⋃ i ∈ A, Xs i) = M.closure (⋃ i ∈ A, Ys i)


/-- Write `wittStructureRat p φ n` in terms of `wittStructureRat p φ i` for `i < n`. -/
theorem wittStructureRat_rec (Φ : MvPolynomial idx ℚ) (n : ℕ) :
    wittStructureRat p Φ n =
      C (1 / (p : ℚ) ^ n) *
        (bind₁ (fun b => rename (fun i => (b, i)) (W_ ℚ n)) Φ -
          ∑ i ∈ range n, C ((p : ℚ) ^ i) * wittStructureRat p Φ i ^ p ^ (n - i))

(p : ℕ)
{idx : Type u_2}
[hp : Fact (Nat.Prime p)]
(Φ : MvPolynomial idx ℚ)
(n : ℕ)

wittStructureRat p Φ n =
  MvPolynomial.C (1 / ↑p ^ n) *
    ((MvPolynomial.bind₁ fun b => (MvPolynomial.rename fun i => (b, i)) (W_ ℚ n)) Φ -
      ∑ i ∈ Finset.range n, MvPolynomial.C (↑p ^ i) * wittStructureRat p Φ i ^ p ^ (n - i))


theorem Subperm.perm_of_length_le {l₁ l₂ : List α} : l₁ <+~ l₂ → length l₂ ≤ length l₁ → l₁ ~ l₂

l₁ <+~ l₂ → l₂.length ≤ l₁.length → l₁ ~ l₂


theorem ContMDiffAt.div₀ (hf : ContMDiffAt I' I n f a) (hg : ContMDiffAt I' I n g a)
    (h₀ : g a ≠ 0) : ContMDiffAt I' I n (f / g) a

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{H : Type u_2}
[TopologicalSpace H]
{E : Type u_3}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{I : ModelWithCorners 𝕜 E H}
{G : Type u_4}
[TopologicalSpace G]
[ChartedSpace H G]
[GroupWithZero G]
[SmoothInv₀ I G]
[SmoothMul I G]
{E' : Type u_5}
[NormedAddCommGroup E']
[NormedSpace 𝕜 E']
{H' : Type u_6}
[TopologicalSpace H']
{I' : ModelWithCorners 𝕜 E' H'}
{M : Type u_7}
[TopologicalSpace M]
[ChartedSpace H' M]
{f g : M → G}
{a : M}
{n : ℕ∞}
(hf : ContMDiffAt I' I n f a)
(hg : ContMDiffAt I' I n g a)
(h₀ : g a ≠ 0)


@[to_additive]
theorem ContMDiffWithinAt.prod (h : ∀ i ∈ t, ContMDiffWithinAt I' I n (f i) s x₀) :
    ContMDiffWithinAt I' I n (fun x ↦ ∏ i ∈ t, f i x) s x₀

ContMDiffWithinAt I' I n (fun x => ∏ i ∈ t, f i x) s x₀


lemma cliqueFinset_eq_map [NoAccidental t] : (graph t).cliqueFinset 3 = t.map toTriangle

(SimpleGraph.TripartiteFromTriangles.graph t).cliqueFinset 3 =
  Finset.map SimpleGraph.TripartiteFromTriangles.toTriangle t


theorem RightInverse.injective {f : α → β} {g : β → α} (h : RightInverse f g) : Injective f

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


@[simp]
theorem sumCompl_symm_apply_compl {α : Type*} {s : Set α} [DecidablePred (· ∈ s)]
    {x : (sᶜ : Set α)} : (Equiv.Set.sumCompl s).symm x = Sum.inr x

{α : Type u_1}
{s : Set α}
[DecidablePred fun x => x ∈ s]
{x : ↑sᶜ}

(Equiv.Set.sumCompl s).symm ↑x = Sum.inr x


theorem eq_zero_of_forall_pow_sum_mul_pow_eq_zero {R : Type*} [CommRing R] [IsDomain R] {n : ℕ}
    {f v : Fin n → R} (hf : Function.Injective f)
    (hfv : ∀ i : Fin n, (∑ j : Fin n, v j * f j ^ (i : ℕ)) = 0) : v = 0

(hfv : ∀ (i : Fin n), ∑ j : Fin n, v j * f j ^ ↑i = 0)


@[simp]
theorem ι_app_right (c : PushoutCocone f g) : c.ι.app WalkingSpan.right = c.inr

(c : CategoryTheory.Limits.PushoutCocone f g)

c.ι.app CategoryTheory.Limits.WalkingSpan.right = c.inr


lemma Exact.linearMap_ker_eq (hfg : Exact f g) : ker g = range f

{R : Type u_1}
{M : Type u_2}
{N : Type u_4}
{P : Type u_6}
[Semiring R]
[AddCommMonoid M]
[AddCommMonoid N]
[AddCommMonoid P]
[Module R M]
[Module R N]
[Module R P]
{f : M →ₗ[R] N}
{g : N →ₗ[R] P}
(hfg : Function.Exact ⇑f ⇑g)


/-- The snake input in the opposite category that is deduced from a snake input. -/
@[simps]
noncomputable def op : SnakeInput Cᵒᵖ

(S : CategoryTheory.ShortComplex.SnakeInput C)

S.op.v₁₂ = CategoryTheory.ShortComplex.opMap S.v₁₂


theorem log_antitone_left {n : ℕ} : AntitoneOn (fun b => log b n) (Set.Ioi 1)

AntitoneOn (fun b => Nat.log b n) (Set.Ioi 1)


lemma quasiIso_iff_comp_right (φ : S₁ ⟶ S₂) (φ' : S₂ ⟶ S₃) [hφ' : QuasiIso φ'] :
    QuasiIso (φ ≫ φ') ↔ QuasiIso φ

{S₁ S₂ S₃ : CategoryTheory.ShortComplex C}

[hφ' : CategoryTheory.ShortComplex.QuasiIso φ']

CategoryTheory.ShortComplex.QuasiIso (CategoryTheory.CategoryStruct.comp φ φ') ↔ CategoryTheory.ShortComplex.QuasiIso φ


theorem PGame.le_iff_game_le {x y : PGame} : x ≤ y ↔ (⟦x⟧ : Game) ≤ ⟦y⟧

x ≤ y ↔ ⟦x⟧ ≤ ⟦y⟧


lemma isPrime_iff_isMaximal (p : Ideal R) : p.IsPrime ↔ p.IsMaximal

{R : Type u_1}
[CommRing R]
[IsArtinianRing R]
(p : Ideal R)


@[simp]
theorem natCoe_apply [AddMonoidWithOne R] {f : ArithmeticFunction ℕ} {x : ℕ} :
    (f : ArithmeticFunction R) x = f x

{R : Type u_1}
[AddMonoidWithOne R]
{f : ArithmeticFunction ℕ}
{x : ℕ}


theorem InftyValuation.map_zero' : inftyValuationDef Fq 0 = 0

(Fq : Type)
[Field Fq]
[DecidableEq (RatFunc Fq)]

FunctionField.inftyValuationDef Fq 0 = 0


theorem models_sentence_iff {φ : L.Sentence} : T ⊨ᵇ φ ↔ ∀ M : ModelType.{u, v, max u v} T, M ⊨ φ

{L : FirstOrder.Language}
{T : L.Theory}
{φ : L.Sentence}


theorem kernel_eq_kernel [HasKernels V] {i j j' : ι} (r : c.Rel i j) (r' : c.Rel i j') :
    kernelSubobject (C.d i j) = kernelSubobject (C.d i j')

CategoryTheory.Limits.kernelSubobject (C.d i j) = CategoryTheory.Limits.kernelSubobject (C.d i j')


theorem hasColimit_of_hasLimit_op (F : J ⥤ C) [HasLimit F.op] : HasColimit F

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


nonrec theorem integral_congr {f g : α →₁ₛ[μ] E} (h : toSimpleFunc f =ᵐ[μ] toSimpleFunc g) :
    integral f = integral g

{f g : ↥(MeasureTheory.Lp.simpleFunc E 1 μ)}

(h : ↑(MeasureTheory.Lp.simpleFunc.toSimpleFunc f) =ᵐ[μ] ↑(MeasureTheory.Lp.simpleFunc.toSimpleFunc g))

MeasureTheory.L1.SimpleFunc.integral f = MeasureTheory.L1.SimpleFunc.integral g


theorem eq_replicate_card {a : α} {s : Multiset α} : s = replicate (card s) a ↔ ∀ b ∈ s, b = a

s = Multiset.replicate (Multiset.card s) a ↔ ∀ b ∈ s, b = a


@[to_additive (attr := simp)]
theorem mulIndicator_eq_self : s.mulIndicator f = f ↔ mulSupport f ⊆ s

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

s.mulIndicator f = f ↔ Function.mulSupport f ⊆ s


theorem IsLittleO.trans_tendsto (hfg : f'' =o[l] g'') (hg : Tendsto g'' l (𝓝 0)) :
    Tendsto f'' l (𝓝 0)

{α : Type u_1}
{E'' : Type u_9}
{F'' : Type u_10}
[NormedAddCommGroup E'']
[NormedAddCommGroup F'']
{f'' : α → E''}
{g'' : α → F''}
{l : Filter α}
(hfg : f'' =o[l] g'')
(hg : Filter.Tendsto g'' l (𝓝 0))


@[to_additive]
lemma ofUnits_units_gc : GaloisConnection (Subgroup.ofUnits (M := M)) (Submonoid.units)


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

{G : Type u_1}
[Group G]
[TopologicalSpace G]
(x : G)


@[to_additive]
theorem unop_bijective : Bijective (unop : αᵐᵒᵖ → α)


@[to_additive (attr := simp)]
theorem mul_bind (f : α → FreeMagma β) (x y : FreeMagma α) : x * y >>= f = (x >>= f) * (y >>= f)

{α β : Type u}
(f : α → FreeAddMagma β)
(x y : FreeAddMagma α)


/-- Given a closed set `S` in a compact T₀ space, there is some `x ∈ S` such that `{x}` is
closed. -/
theorem IsClosed.exists_closed_singleton [T0Space X] [CompactSpace X] {S : Set X}
    (hS : IsClosed S) (hne : S.Nonempty) : ∃ x : X, x ∈ S ∧ IsClosed ({x} : Set X)

{X : Type u_1}
[TopologicalSpace X]
[T0Space X]
[CompactSpace X]
{S : Set X}
(hS : IsClosed S)
(hne : S.Nonempty)


lemma finsuppScalarRight_apply_tmul (m : M) (p : ι →₀ R) :
    finsuppScalarRight R M ι (m ⊗ₜ[R] p) = p.sum fun i n ↦ Finsupp.single i (n • m)

{R : Type u_1}
[CommSemiring R]
{M : Type u_2}
[AddCommMonoid M]
[Module R M]
{ι : Type u_4}
[DecidableEq ι]
(m : M)
(p : ι →₀ R)

(TensorProduct.finsuppScalarRight R M ι) (m ⊗ₜ[R] p) = p.sum fun i n => Finsupp.single i (n • m)


@[simp]
theorem compAlternatingMap_apply (g : N →ₗ[R] N₂) (f : M [⋀^ι]→ₗ[R] N) (m : ι → M) :
    g.compAlternatingMap f m = g (f m)

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


/-- Lower bound on the edge densities between non-uniform parts of `SzemerediRegularity.star`. -/
private theorem edgeDensity_star_not_uniform [Nonempty α]
    (hPα : P.parts.card * 16 ^ P.parts.card ≤ card α) (hPε : ↑100 ≤ ↑4 ^ P.parts.card * ε ^ 5)
    (hε₁ : ε ≤ 1) {hU : U ∈ P.parts} {hV : V ∈ P.parts} (hUVne : U ≠ V) (hUV : ¬G.IsUniform ε U V) :
    ↑3 / ↑4 * ε ≤
    |(∑ ab ∈ (star hP G ε hU V).product (star hP G ε hV U), (G.edgeDensity ab.1 ab.2 : ℝ)) /
      ((star hP G ε hU V).card * (star hP G ε hV U).card) -
        (∑ ab ∈ (chunk hP G ε hU).parts.product (chunk hP G ε hV).parts,
          (G.edgeDensity ab.1 ab.2 : ℝ)) / (16 : ℝ) ^ P.parts.card|

(hPα : P.parts.card * 16 ^ P.parts.card ≤ Fintype.card α)

3 / 4 * ε ≤
  |(∑ ab ∈ (SzemerediRegularity.star hP G ε hU V).product (SzemerediRegularity.star hP G ε hV U),
          ↑(G.edgeDensity ab.1 ab.2)) /
        (↑(SzemerediRegularity.star hP G ε hU V).card * ↑(SzemerediRegularity.star hP G ε hV U).card) -
      (∑ ab ∈ (SzemerediRegularity.chunk hP G ε hU).parts.product (SzemerediRegularity.chunk hP G ε hV).parts,
          ↑(G.edgeDensity ab.1 ab.2)) /
        16 ^ P.parts.card|


/-- Construct a Hahn series from any function whose support is bounded below. -/
@[simps]
def ofSuppBddBelow (f : Γ → R) (hf : BddBelow (Function.support f)) : HahnSeries Γ R

{Γ : Type u_1}
{R : Type u_2}
[Zero R]
[LinearOrder Γ]
[LocallyFiniteOrder Γ]
(f : Γ → R)
(hf : BddBelow (Function.support f))

∀ (a : Γ), (HahnSeries.ofSuppBddBelow f hf).coeff a = f a


protected theorem le_of_add_le_add_right [LE α] [ContravariantClass α α (swap (· + ·)) (· ≤ ·)]
    (ha : a ≠ ⊤) (h : b + a ≤ c + a) : b ≤ c

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


/-- The bottom subalgebra is isomorphic to the field. -/
@[simps! symm_apply]
noncomputable def botEquiv (F R : Type*) [Field F] [Semiring R] [Nontrivial R] [Algebra F R] :
    (⊥ : Subalgebra F R) ≃ₐ[F] F

(F : Type u_1)
(R : Type u_2)
[Field F]
[Semiring R]
[Nontrivial R]
[Algebra F R]

∀ (a : F), (Algebra.botEquiv F R).symm a = (Algebra.ofId F ↥⊥) a


theorem preimage_smul₀ (ha : a ≠ 0) (t : Set β) : (fun x ↦ a • x) ⁻¹' t = a⁻¹ • t

{α : Type u_2}
{β : Type u_3}
[GroupWithZero α]
[MulAction α β]
{a : α}
(ha : a ≠ 0)
(t : Set β)


theorem quasiconvexOn_iff_le_max : QuasiconvexOn 𝕜 s f ↔ Convex 𝕜 s ∧ ∀ ⦃x⦄, x ∈ s → ∀ ⦃y⦄,
    y ∈ s → ∀ ⦃a b : 𝕜⦄, 0 ≤ a → 0 ≤ b → a + b = 1 → f (a • x + b • y) ≤ max (f x) (f y)

{𝕜 : Type u_1}
{E : Type u_2}
{β : Type u_4}
[OrderedSemiring 𝕜]
[AddCommMonoid E]
[LinearOrder β]
[SMul 𝕜 E]
{s : Set E}
{f : E → β}

QuasiconvexOn 𝕜 s f ↔
  Convex 𝕜 s ∧
    ∀ ⦃x : E⦄, x ∈ s → ∀ ⦃y : E⦄, y ∈ s → ∀ ⦃a b : 𝕜⦄, 0 ≤ a → 0 ≤ b → a + b = 1 → f (a • x + b • y) ≤ max (f x) (f y)


/-- Any nonzero natural number is the product of an odd part `m` and a power of
two `2 ^ k`. -/
theorem exists_eq_two_pow_mul_odd {n : ℕ} (hn : n ≠ 0) :
    ∃ k m : ℕ, Odd m ∧ n = 2 ^ k * m


/-- `WithOne.coe` as a bundled morphism -/
@[to_additive (attr := simps apply) "`WithZero.coe` as a bundled morphism"]
def coeMulHom [Mul α] : α →ₙ* WithOne α


theorem hammingNorm_smul_le_hammingNorm [Zero α] [∀ i, SMulWithZero α (β i)] {k : α}
    {x : ∀ i, β i} : hammingNorm (k • x) ≤ hammingNorm x

{α : Type u_1}
{ι : Type u_2}
{β : ι → Type u_3}
[Fintype ι]
[(i : ι) → DecidableEq (β i)]
[(i : ι) → Zero (β i)]
[Zero α]
[(i : ι) → SMulWithZero α (β i)]
{k : α}
{x : (i : ι) → β i}


@[simp]
theorem preimage_Ioi {a : α} (ha : 0 ≤ a) : (Nat.cast : ℕ → α) ⁻¹' Set.Ioi a = Set.Ioi ⌊a⌋₊

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


@[to_additive]
theorem tprod_comm' {f : β → γ → α} (h : Multipliable (Function.uncurry f))
    (h₁ : ∀ b, Multipliable (f b)) (h₂ : ∀ c, Multipliable fun b ↦ f b c) :
    ∏' (c) (b), f b c = ∏' (b) (c), f b c

{f : β → γ → α}

(h₂ : ∀ (c : γ), Summable fun b => f b c)


@[simp]
theorem lcm_ndinsert (a : α) (s : Multiset α) : (ndinsert a s).lcm = GCDMonoid.lcm a s.lcm

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

(Multiset.ndinsert a s).lcm = lcm a s.lcm


@[simp]
theorem lintegral_eq_zero_iff {f : α →ₘ[μ] ℝ≥0∞} : lintegral f = 0 ↔ f = 0

{α : Type u_1}
[MeasurableSpace α]
{μ : MeasureTheory.Measure α}
{f : α →ₘ[μ] ℝ≥0∞}


@[simp]
theorem mem_carrier {s : L.Substructure M} {x : M} : x ∈ s.carrier ↔ x ∈ s

{L : FirstOrder.Language}
{M : Type w}
[L.Structure M]
{s : L.Substructure M}
{x : M}

x ∈ ↑s ↔ x ∈ s


@[simp]
theorem tendsto_atTop_iff {l : Filter γ} {f : γ → α} (e : α ≃o β) :
    Tendsto (fun x => e (f x)) l atTop ↔ Tendsto f l atTop

{α : Type u_3}
{β : Type u_4}
{γ : Type u_5}
[Preorder α]
[Preorder β]
{l : Filter γ}
{f : γ → α}
(e : α ≃o β)

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


@[simp]
theorem mem_restrict {f : α →. β} {s : Set α} (h : s ⊆ f.Dom) (a : α) (b : β) :
    b ∈ f.restrict h a ↔ a ∈ s ∧ b ∈ f a

{α : Type u_1}
{β : Type u_2}
{f : α →. β}
{s : Set α}
(h : s ⊆ f.Dom)
(a : α)
(b : β)


@[simp]
theorem seqLeft_def (s : Finset α) (t : Finset β) : s <* t = if t = ∅ then ∅ else s

{α β : Type u}
[(P : Prop) → Decidable P]
(s : Finset α)
(t : Finset β)

(SeqLeft.seqLeft s fun x => t) = if t = ∅ then ∅ else s


theorem head'_iff : TransGen r a c ↔ ∃ b, r a b ∧ ReflTransGen r b c

{α : Type u_1}
{r : α → α → Prop}
{a c : α}

Relation.TransGen r a c ↔ ∃ b, r a b ∧ Relation.ReflTransGen r b c


lemma map_comp_map_eq_map {X Y Z : C} (z₁ : W.LeftFraction X Y) (z₂ : W.LeftFraction Y Z)
    (z₃ : W.LeftFraction z₁.Y' z₂.Y') (h₃ : z₂.f ≫ z₃.s = z₁.s ≫ z₃.f)
    (L : C ⥤ D) [L.IsLocalization W] :
    z₁.map L (Localization.inverts L W) ≫ z₂.map L (Localization.inverts L W) =
      (z₁.comp₀ z₂ z₃).map L (Localization.inverts L W)

(h₃ : CategoryTheory.CategoryStruct.comp z₂.f z₃.s = CategoryTheory.CategoryStruct.comp z₁.s z₃.f)

CategoryTheory.CategoryStruct.comp (z₁.map L ⋯) (z₂.map L ⋯) = (z₁.comp₀ z₂ z₃).map L ⋯


/-- If a compact set is covered by two open sets, then we can cover it by two compact subsets. -/
theorem IsCompact.binary_compact_cover {K U V : Set X}
    (hK : IsCompact K) (hU : IsOpen U) (hV : IsOpen V) (h2K : K ⊆ U ∪ V) :
    ∃ K₁ K₂ : Set X, IsCompact K₁ ∧ IsCompact K₂ ∧ K₁ ⊆ U ∧ K₂ ⊆ V ∧ K = K₁ ∪ K₂

{X : Type u_1}
[TopologicalSpace X]
[R1Space X]
{K U V : Set X}
(hK : IsCompact K)
(hU : IsOpen U)
(hV : IsOpen V)
(h2K : K ⊆ U ∪ V)

∃ K₁ K₂, IsCompact K₁ ∧ IsCompact K₂ ∧ K₁ ⊆ U ∧ K₂ ⊆ V ∧ K = K₁ ∪ K₂


/-- The kernel of the composition of two linear maps is finitely generated if both kernels are and
the first morphism is surjective. -/
theorem fg_ker_comp {R M N P : Type*} [Ring R] [AddCommGroup M] [Module R M] [AddCommGroup N]
    [Module R N] [AddCommGroup P] [Module R P] (f : M →ₗ[R] N) (g : N →ₗ[R] P)
    (hf1 : (LinearMap.ker f).FG) (hf2 : (LinearMap.ker g).FG)
    (hsur : Function.Surjective f) : (g.comp f).ker.FG

{R : Type u_4}
{M : Type u_5}
{N : Type u_6}
{P : Type u_7}
[Ring R]
[AddCommGroup M]
[Module R M]
[AddCommGroup N]
[Module R N]
[AddCommGroup P]
[Module R P]
(f : M →ₗ[R] N)
(g : N →ₗ[R] P)
(hf1 : (LinearMap.ker f).FG)
(hf2 : (LinearMap.ker g).FG)
(hsur : Function.Surjective ⇑f)


/-- Colex is an extension of the base order. -/
lemma singleton_lt_singleton : (toColex {a} : Colex α) < toColex {b} ↔ a < b

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

{ ofColex := {a} } < { ofColex := {b} } ↔ a < b


theorem Filter.EventuallyLE.isLocalMin {f g : α → β} {a : α} (hle : f ≤ᶠ[𝓝 a] g) (hfga : f a = g a)
    (h : IsLocalMin f a) : IsLocalMin g a

{α : Type u}
{β : Type v}
[TopologicalSpace α]
[Preorder β]
{f g : α → β}
{a : α}
(hle : f ≤ᶠ[𝓝 a] g)
(hfga : f a = g a)
(h : IsLocalMin f a)


/-- `Groupoid.inv` is involutive. -/
@[simps]
def Groupoid.invEquiv : (X ⟶ Y) ≃ (Y ⟶ X)

{C : Type u}
[CategoryTheory.Groupoid C]
{X Y : C}

∀ (a : X ⟶ Y), CategoryTheory.Groupoid.invEquiv a = CategoryTheory.Groupoid.inv a


@[to_additive]
theorem smul_iInter_subset (s : Set α) (t : ι → Set β) : (s • ⋂ i, t i) ⊆ ⋂ i, s • t i

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


/-- A ring involution -/
structure RingInvo [Semiring R] extends R ≃+* Rᵐᵒᵖ where
  /-- The requirement that the ring homomorphism is its own inverse -/
  involution' : ∀ x, (toFun (toFun x).unop).unop = x

{R : Type u_2}
[Semiring R]
(self : RingInvo R)
(x : R)

MulOpposite.unop (self.toFun (MulOpposite.unop (self.toFun x))) = x


theorem IsIntegral.zsmul {x : B} (h : IsIntegral R x) (n : ℤ) : IsIntegral R (n • x)

{R : Type u_1}
{B : Type u_3}
[CommRing R]
[Ring B]
[Algebra R B]
{x : B}
(h : IsIntegral R x)
(n : ℤ)


@[to_additive (attr := simp)]
theorem map_map {I : Type*} [Group I] (M : Subgroup H) (O : Subgroup I) [M.Normal] [O.Normal]
    (f : G →* H) (g : H →* I) (hf : N ≤ Subgroup.comap f M) (hg : M ≤ Subgroup.comap g O)
    (hgf : N ≤ Subgroup.comap (g.comp f) O :=
      hf.trans ((Subgroup.comap_mono hg).trans_eq (Subgroup.comap_comap _ _ _)))
    (x : G ⧸ N) : map M O g hg (map N M f hf x) = map N O (g.comp f) hgf x

(hgf : N ≤ Subgroup.comap (g.comp f) O := ⋯)

(QuotientGroup.map M O g hg) ((QuotientGroup.map N M f hf) x) = (QuotientGroup.map N O (g.comp f) hgf) x


nonrec theorem ContMDiffAt.clm_postcomp {f : M → F₂ →L[𝕜] F₃} {x : M}
    (hf : ContMDiffAt I 𝓘(𝕜, F₂ →L[𝕜] F₃) n f x) :
    ContMDiffAt I 𝓘(𝕜, (F₁ →L[𝕜] F₂) →L[𝕜] (F₁ →L[𝕜] F₃)) n
      (fun y ↦ (f y).postcomp F₁ : M → (F₁ →L[𝕜] F₂) →L[𝕜] (F₁ →L[𝕜] F₃)) x

ContMDiffAt I 𝓘(𝕜, (F₁ →L[𝕜] F₂) →L[𝕜] F₁ →L[𝕜] F₃) n (fun y => ContinuousLinearMap.postcomp F₁ (f y)) x


/-- A T₀ uniform space with countably generated `𝓤 X` is metrizable. This is not an instance to
avoid loops. -/
theorem UniformSpace.metrizableSpace [UniformSpace X] [IsCountablyGenerated (𝓤 X)] [T0Space X] :
    TopologicalSpace.MetrizableSpace X

{X : Type u_1}
[UniformSpace X]
[(𝓤 X).IsCountablyGenerated]
[T0Space X]


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

(AlgebraicTopology.DoldKan.Γ₀'.map f).f i = f.f i


theorem setToSimpleFunc_const (T : Set α → F →L[ℝ] F') (hT_empty : T ∅ = 0) (x : F)
    {m : MeasurableSpace α} : SimpleFunc.setToSimpleFunc T (SimpleFunc.const α x) = T univ x

{α : Type u_1}
{F : Type u_3}
{F' : Type u_4}
[NormedAddCommGroup F]
[NormedSpace ℝ F]
[NormedAddCommGroup F']
[NormedSpace ℝ F']
(T : Set α → F →L[ℝ] F')
(hT_empty : T ∅ = 0)
(x : F)
{m : MeasurableSpace α}

MeasureTheory.SimpleFunc.setToSimpleFunc T (MeasureTheory.SimpleFunc.const α x) = (T Set.univ) x


theorem neg_ne_self_iff {θ : Angle} : -θ ≠ θ ↔ θ ≠ 0 ∧ θ ≠ π

-θ ≠ θ ↔ θ ≠ 0 ∧ θ ≠ ↑π


@[to_additive]
theorem mul_right_ne_self : a * b ≠ a ↔ b ≠ 1

{M : Type u}
[AddLeftCancelMonoid M]
{a b : M}


protected lemma ge_of_eq (hab : a = b) : b ≤ a


theorem continuousAt_symm {x} : ContinuousAt I.symm x

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


theorem LieHom.isNilpotent_range [IsNilpotent R L] (f : L →ₗ⁅R⁆ L') : IsNilpotent R f.range

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


theorem exists_cons_of_mem {s : Multiset α} {a : α} : a ∈ s → ∃ t, s = a ::ₘ t


@[simp]
theorem one_le_blocks' {i : ℕ} (h : i < c.length) : 1 ≤ c.blocks[i]

{n : ℕ}
(c : Composition n)
{i : ℕ}
(h : i < c.length)


theorem of_hasBinaryProduct' [HasBinaryProduct X Y] [HasTerminal C] :
    IsPullback Limits.prod.fst Limits.prod.snd (terminal.from X) (terminal.from Y)

CategoryTheory.IsPullback CategoryTheory.Limits.prod.fst CategoryTheory.Limits.prod.snd
  (CategoryTheory.Limits.terminal.from X) (CategoryTheory.Limits.terminal.from Y)


@[to_additive (attr := simp)]
theorem toFreeSemigroup_comp_of : @toFreeSemigroup α ∘ of = FreeSemigroup.of

⇑FreeMagma.toFreeSemigroup ∘ FreeMagma.of = FreeSemigroup.of


/-- A ring homomorphism is also a semiring homomorphism. -/
theorem to_isSemiringHom (hf : IsRingHom f) : IsSemiringHom f

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


theorem coe_injective : @Function.Injective (P →ᴬ[R] Q) (P → Q) (⇑)

{R : Type u_1}
{V : Type u_2}
{W : Type u_3}
{P : Type u_4}
{Q : Type u_5}
[Ring R]
[AddCommGroup V]
[Module R V]
[TopologicalSpace P]
[AddTorsor V P]
[AddCommGroup W]
[Module R W]
[TopologicalSpace Q]
[AddTorsor W Q]


/-- The description of the inverse of the bijection `unitCompPartialBijectiveAux`. -/
theorem unitCompPartialBijectiveAux_symm_apply [Reflective i] {A : C} {B : D}
    (f : i.obj ((reflector i).obj A) ⟶ i.obj B) :
    (unitCompPartialBijectiveAux _ _).symm f = (reflectorAdjunction i).unit.app A ≫ f

(f : i.obj ((CategoryTheory.reflector i).obj A) ⟶ i.obj B)

(CategoryTheory.unitCompPartialBijectiveAux A B).symm f =
  CategoryTheory.CategoryStruct.comp ((CategoryTheory.reflectorAdjunction i).unit.app A) f


theorem min_firstDiff_le (x y z : ∀ n, E n) (h : x ≠ z) :
    min (firstDiff x y) (firstDiff y z) ≤ firstDiff x z

{E : ℕ → Type u_1}
(x y z : (n : ℕ) → E n)
(h : x ≠ z)

min (PiNat.firstDiff x y) (PiNat.firstDiff y z) ≤ PiNat.firstDiff x z


theorem hasSum_of_disjoint_iUnion [Countable β] {f : β → Set α} (hf₁ : ∀ i, MeasurableSet (f i))
    (hf₂ : Pairwise (Disjoint on f)) : HasSum (fun i => v (f i)) (v (⋃ i, f i))

{α : Type u_1}
{β : Type u_2}
{m : MeasurableSpace α}
{M : Type u_3}
[AddCommMonoid M]
[TopologicalSpace M]
[T2Space M]
{v : MeasureTheory.VectorMeasure α M}
[Countable β]
{f : β → Set α}
(hf₁ : ∀ (i : β), MeasurableSet (f i))
(hf₂ : Pairwise (Disjoint on f))

HasSum (fun i => ↑v (f i)) (↑v (⋃ i, f i))


/-- Any function in `ℒp` can be approximated by a simple function if `p < ∞`. -/
theorem _root_.MeasureTheory.Memℒp.exists_simpleFunc_eLpNorm_sub_lt {E : Type*}
    [NormedAddCommGroup E] {f : β → E} {μ : Measure β} (hf : Memℒp f p μ) (hp_ne_top : p ≠ ∞)
    {ε : ℝ≥0∞} (hε : ε ≠ 0) : ∃ g : β →ₛ E, eLpNorm (f - ⇑g) p μ < ε ∧ Memℒp g p μ

{β : Type u_2}
[MeasurableSpace β]
{p : ℝ≥0∞}
{E : Type u_7}
[NormedAddCommGroup E]
{f : β → E}
{μ : MeasureTheory.Measure β}
(hf : MeasureTheory.Memℒp f p μ)
(hp_ne_top : p ≠ ⊤)
{ε : ℝ≥0∞}
(hε : ε ≠ 0)

∃ g, MeasureTheory.eLpNorm (f - ↑g) p μ < ε ∧ MeasureTheory.Memℒp (↑g) p μ


lemma smul_nonneg_of_nonpos_of_nonpos [SMulPosMono α β] (ha : a ≤ 0) (hb : b ≤ 0) : 0 ≤ a • b

{α : Type u_1}
{β : Type u_2}
{a : α}
{b : β}
[OrderedRing α]
[OrderedAddCommGroup β]
[Module α β]
[SMulPosMono α β]
(ha : a ≤ 0)
(hb : b ≤ 0)


theorem IsTrichotomous.swap (r) [IsTrichotomous α r] : IsTrichotomous α (swap r)

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


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

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


@[simp]
theorem trailingCoeff_zero : trailingCoeff (0 : R[X]) = 0


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


@[simp]
theorem eval₂_natCast (n : ℕ) : (n : R[X]).eval₂ f x = n

{R : Type u}
{S : Type v}
[Semiring R]
[Semiring S]
(f : R →+* S)
(x : S)
(n : ℕ)


theorem ofCauchy_sup (a b) : (⟨⟦a ⊔ b⟧⟩ : ℝ) = ⟨⟦a⟧⟩ ⊔ ⟨⟦b⟧⟩

{ cauchy := ⟦a ⊔ b⟧ } = { cauchy := ⟦a⟧ } ⊔ { cauchy := ⟦b⟧ }


@[fun_prop]
theorem HasStrictFDerivAt.const_sub (hf : HasStrictFDerivAt f f' x) (c : F) :
    HasStrictFDerivAt (fun x => c - f x) (-f') x

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{F : Type u_3}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{f : E → F}
{f' : E →L[𝕜] F}
{x : E}
(hf : HasStrictFDerivAt f f' x)
(c : F)


lemma mulOption_lt (hx : x.Numeric) (hy : y.Numeric) (ihxy : IH1 x y) (ihyx : IH1 y x) (i j k l) :
    (⟦mulOption x y i k⟧ : Game) < -⟦mulOption x (-y) j l⟧

{x y : SetTheory.PGame}
(hx : x.Numeric)
(hy : y.Numeric)
(ihxy : Surreal.Multiplication.IH1 x y)
(ihyx : Surreal.Multiplication.IH1 y x)
(i j : x.LeftMoves)
(k : y.LeftMoves)
(l : (-y).LeftMoves)

⟦x.mulOption y i k⟧ < -⟦x.mulOption (-y) j l⟧


/-- If a point belongs to the closure of `s`, then its infimum distance to `s` equals zero.
The converse is true provided that `s` is nonempty, see `Metric.mem_closure_iff_infDist_zero`. -/
theorem infDist_zero_of_mem_closure (hx : x ∈ closure s) : infDist x s = 0

{α : Type u}
[PseudoMetricSpace α]
{s : Set α}
{x : α}
(hx : x ∈ closure s)


theorem isLittleO_abs_abs : ((fun x => |u x|) =o[l] fun x => |v x|) ↔ u =o[l] v

{α : Type u_1}
{l : Filter α}
{u v : α → ℝ}


theorem strictMono_y : StrictMono (yn a1)


theorem congr_fun (h : D1 = D2) (a : L) : D1 a = D2 a

{R : Type u_1}
{L : Type u_2}
{M : Type u_3}
[CommRing R]
[LieRing L]
[LieAlgebra R L]
[AddCommGroup M]
[Module R M]
[LieRingModule L M]
[LieModule R L M]
{D1 D2 : LieDerivation R L M}
(h : D1 = D2)
(a : L)


@[simp]
theorem cancel_left {g : SupHom β γ} {f₁ f₂ : SupHom α β} (hg : Injective g) :
    g.comp f₁ = g.comp f₂ ↔ f₁ = f₂

{α : Type u_3}
{β : Type u_4}
{γ : Type u_5}
[Sup α]
[Sup β]
[Sup γ]
{g : SupHom β γ}
{f₁ f₂ : SupHom α β}
(hg : Function.Injective ⇑g)


theorem extend_apply_of_one_le (F : Homotopy f₀ f₁) {t : ℝ} (ht : 1 ≤ t) (x : X) :
    F.extend t x = f₁ x

{X : Type u}
{Y : Type v}
[TopologicalSpace X]
[TopologicalSpace Y]
{f₀ f₁ : C(X, Y)}
(F : f₀.Homotopy f₁)
{t : ℝ}
(ht : 1 ≤ t)
(x : X)


theorem mk_quaternion_of_infinite [Infinite R] : #(ℍ[R]) = #R

(R : Type u_1)
[One R]
[Neg R]
[Infinite R]


lemma limsup_add_le_of_le (ha : limsup u f < a) (hb : limsup v f ≤ b) :
    limsup (u + v) f ≤ a + b

{α : Type u_2}
{f : Filter α}
{u v : α → EReal}
{a b : EReal}
(ha : Filter.limsup u f < a)
(hb : Filter.limsup v f ≤ b)


/-- The `a`-torsion submodule for `a` in `R`, containing all elements `x` of `M` such that
  `a • x = 0`. -/
@[simps!]
def torsionBy (a : R) : Submodule R M

(R : Type u_1)
(M : Type u_2)
[CommSemiring R]
[AddCommMonoid M]
[Module R M]
(a : R)

↑(Submodule.torsionBy R M a) = ⇑(DistribMulAction.toLinearMap R M a) ⁻¹' {0}


@[simp]
theorem frequently_or_distrib {f : Filter α} {p q : α → Prop} :
    (∃ᶠ x in f, p x ∨ q x) ↔ (∃ᶠ x in f, p x) ∨ ∃ᶠ x in f, q x

{α : Type u}
{f : Filter α}
{p q : α → Prop}

(∃ᶠ (x : α) in f, p x ∨ q x) ↔ (∃ᶠ (x : α) in f, p x) ∨ ∃ᶠ (x : α) in f, q x


@[simp]
theorem pointwise_smul_toSubmonoid (a : α) (S : Subgroup G) :
    (a • S).toSubmonoid = a • S.toSubmonoid

{α : Type u_1}
{G : Type u_2}
[Group G]
[Monoid α]
[MulDistribMulAction α G]
(a : α)
(S : Subgroup G)


@[simp] protected theorem zero_sub (n : Nat) : 0 - n = 0


theorem inv_smul (k : α) [Invertible k] (h : IsUnit A.det) : (k • A)⁻¹ = ⅟ k • A⁻¹

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

(k • A)⁻¹ = ⅟k • A⁻¹


@[to_additive (attr := simp)]
theorem MulHom.toMulEquiv_apply [Mul M] [Mul N] (f : M →ₙ* N) (g : N →ₙ* M)
    (h₁ : g.comp f = MulHom.id _) (h₂ : f.comp g = MulHom.id _) :
    ((MulHom.toMulEquiv f g h₁ h₂) : M → N) = f

{M : Type u_6}
{N : Type u_7}
[Mul M]
[Mul N]
(f : M →ₙ* N)
(g : N →ₙ* M)
(h₁ : g.comp f = MulHom.id M)
(h₂ : f.comp g = MulHom.id N)


theorem IsClosed.sigmaCompactSpace {s : Set X} (hs : IsClosed s) : SigmaCompactSpace s

{X : Type u_1}
[TopologicalSpace X]
[SigmaCompactSpace X]
{s : Set X}
(hs : IsClosed s)


lemma functor_additive :
    letI := preadditive L W
    L.Additive

{C : Type u_1}
{D : Type u_2}
[CategoryTheory.Category.{u_3, u_1} C]
[CategoryTheory.Category.{u_4, u_2} D]
[CategoryTheory.Preadditive C]
(L : CategoryTheory.Functor C D)
(W : CategoryTheory.MorphismProperty C)
[L.IsLocalization W]
[W.HasLeftCalculusOfFractions]


theorem limsup_finset_sup' [ConditionallyCompleteLinearOrder β] {f : Filter α}
    {F : ι → α → β} {s : Finset ι} (hs : s.Nonempty)
    (h₁ : ∀ i ∈ s, f.IsCoboundedUnder (· ≤ ·) (F i) := by exact fun _ _ ↦ by isBoundedDefault)
    (h₂ : ∀ i ∈ s, f.IsBoundedUnder (· ≤ ·) (F i) := by exact fun _ _ ↦ by isBoundedDefault) :
    limsup (fun a ↦ sup' s hs (fun i ↦ F i a)) f = sup' s hs (fun i ↦ limsup (F i) f)

{F : ι → α → β}

(h₁ : ∀ i ∈ s, Filter.IsCoboundedUnder (fun x x_1 => x ≤ x_1) f (F i) := by exact fun _ _ ↦ by isBoundedDefault)

(h₂ : ∀ i ∈ s, Filter.IsBoundedUnder (fun x x_1 => x ≤ x_1) f (F i) := by exact fun _ _ ↦ by isBoundedDefault)

Filter.limsup (fun a => s.sup' hs fun i => F i a) f = s.sup' hs fun i => Filter.limsup (F i) f


theorem monomial_left_inj {a : R} (ha : a ≠ 0) {i j : ℕ} :
    monomial i a = monomial j a ↔ i = j

{R : Type u}
[Semiring R]
{a : R}
(ha : a ≠ 0)
{i j : ℕ}

(Polynomial.monomial i) a = (Polynomial.monomial j) a ↔ i = j


/-- A typeclass stating that multiplication is left and right distributive
over addition. -/
class Distrib (R : Type*) extends Mul R, Add R where
  /-- Multiplication is left distributive over addition -/
  protected left_distrib : ∀ a b c : R, a * (b + c) = a * b + a * c
  /-- Multiplication is right distributive over addition -/
  protected right_distrib : ∀ a b c : R, (a + b) * c = a * c + b * c

{R : Type u_1}
[self : Distrib R]
(a b c : R)


@[to_additive]
theorem Antitone.inv (hf : Antitone f) : Monotone fun x => (f x)⁻¹

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

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


theorem insert_ne_self : insert a s ≠ s ↔ a ∉ s


/-- The zero morphism has a `MonoFactorisation` through the zero object.
-/
@[simps]
def monoFactorisationZero (X Y : C) : MonoFactorisation (0 : X ⟶ Y)

(CategoryTheory.Limits.monoFactorisationZero X Y).e = 0


@[to_additive (attr := simp)]
theorem casesOn_one {C : FreeMonoid α → Sort*} (h0 : C 1) (ih : ∀ x xs, C (of x * xs)) :
    @casesOn α C 1 h0 ih = h0

(ih : (x : α) → (xs : FreeAddMonoid α) → C (FreeAddMonoid.of x + xs))


theorem isSatisfiable_union_distinctConstantsTheory_of_infinite (T : L.Theory) (s : Set α)
    (M : Type w') [L.Structure M] [M ⊨ T] [Infinite M] :
    ((L.lhomWithConstants α).onTheory T ∪ L.distinctConstantsTheory s).IsSatisfiable

{L : FirstOrder.Language}
{α : Type w}
(T : L.Theory)
(s : Set α)
(M : Type w')
[L.Structure M]
[M ⊨ T]
[Infinite M]


theorem eLpNorm_le_mul_eLpNorm_of_ae_le_mul {f : α → F} {g : α → G} {c : ℝ}
    (h : ∀ᵐ x ∂μ, ‖f x‖ ≤ c * ‖g x‖) (p : ℝ≥0∞) :
    eLpNorm f p μ ≤ ENNReal.ofReal c * eLpNorm g p μ

{α : Type u_1}
{F : Type u_3}
{G : Type u_4}
{m0 : MeasurableSpace α}
{μ : MeasureTheory.Measure α}
[NormedAddCommGroup F]
[NormedAddCommGroup G]
{f : α → F}
{g : α → G}
{c : ℝ}
(h : ∀ᵐ (x : α) ∂μ, ‖f x‖ ≤ c * ‖g x‖)
(p : ℝ≥0∞)

MeasureTheory.eLpNorm f p μ ≤ ENNReal.ofReal c * MeasureTheory.eLpNorm g p μ


@[simp] lemma ofENat_le_one {m : ℕ∞} : ofENat m ≤ 1 ↔ m ≤ 1

↑m ≤ 1 ↔ m ≤ 1


lemma absolutelyContinuous_tilted (hf : Integrable (fun x ↦ exp (f x)) μ) : μ ≪ μ.tilted f

(hf : MeasureTheory.Integrable (fun x => rexp (f x)) μ)


@[simp]
theorem num_add (c1 c2 : NumDenSameDeg 𝒜 x) :
    ((c1 + c2).num : A) = c1.den * c2.num + c2.den * c1.num

(c1 c2 : HomogeneousLocalization.NumDenSameDeg 𝒜 x)

↑(c1 + c2).num = ↑c1.den * ↑c2.num + ↑c2.den * ↑c1.num


protected theorem sigmaFinite {f : α → β} (hf : MeasurePreserving f μa μb) [SigmaFinite μb] :
    SigmaFinite μa

(hf : MeasureTheory.MeasurePreserving f μa μb)


/-- For finite index types, the `Subgroup.pi` is generated by the embeddings of the groups.  -/
@[to_additive "For finite index types, the `Subgroup.pi` is generated by the embeddings of the
 additive groups."]
theorem pi_le_iff [DecidableEq η] [Finite η] {H : ∀ i, Subgroup (f i)} {J : Subgroup (∀ i, f i)} :
    pi univ H ≤ J ↔ ∀ i : η, map (MonoidHom.mulSingle f i) (H i) ≤ J

{η : Type u_3}
{f : η → Type u_4}
[(i : η) → Group (f i)]
[DecidableEq η]
[Finite η]
{H : (i : η) → Subgroup (f i)}
{J : Subgroup ((i : η) → f i)}

Subgroup.pi Set.univ H ≤ J ↔ ∀ (i : η), Subgroup.map (MonoidHom.mulSingle f i) (H i) ≤ J


lemma infClosed_iInter (hf : ∀ i, InfClosed (f i)) : InfClosed (⋂ i, f i)

{α : Type u_2}
[SemilatticeInf α]
{ι : Sort u_4}
{f : ι → Set α}
(hf : ∀ (i : ι), InfClosed (f i))


/-- The direction of the span of the result of adding a point to a nonempty affine subspace is the
sup of the direction of that subspace and of any one difference between that point and a point in
the subspace. -/
theorem direction_affineSpan_insert {s : AffineSubspace k P} {p1 p2 : P} (hp1 : p1 ∈ s) :
    (affineSpan k (insert p2 (s : Set P))).direction =
    Submodule.span k {p2 -ᵥ p1} ⊔ s.direction

{k : Type u_1}
{V : Type u_2}
{P : Type u_3}
[Ring k]
[AddCommGroup V]
[Module k V]
[AffineSpace V P]
{s : AffineSubspace k P}
{p1 p2 : P}
(hp1 : p1 ∈ s)

(affineSpan k (insert p2 ↑s)).direction = Submodule.span k {p2 -ᵥ p1} ⊔ s.direction


theorem le_comap_top (f : α → β) (l : Filter α) : l ≤ comap f ⊤

{α : Type u}
{β : Type v}
(f : α → β)
(l : Filter α)


@[simp] lemma const_apply (c x : ℝ) : (StieltjesFunction.const c) x = c


theorem mem_smul_top_iff (N : Submodule R M) (x : N) :
    x ∈ I • (⊤ : Submodule R N) ↔ (x : M) ∈ I • N

{R : Type u}
{M : Type v}
[CommSemiring R]
[AddCommMonoid M]
[Module R M]
(I : Ideal R)
(N : Submodule R M)
(x : ↥N)

x ∈ I • ⊤ ↔ ↑x ∈ I • N


theorem sInter_eq_iInter {s : Set (Set α)} : ⋂₀ s = ⋂ i : s, i


@[reassoc (attr := simp)]
theorem limit_map_limitObjIsoLimitCompEvaluation_hom [HasLimitsOfShape J C] {i j : K}
    (F : J ⥤ K ⥤ C) (f : i ⟶ j) : (limit F).map f ≫ (limitObjIsoLimitCompEvaluation _ _).hom =
    (limitObjIsoLimitCompEvaluation _ _).hom ≫ limMap (whiskerLeft _ ((evaluation _ _).map f))

(CategoryTheory.Limits.limit F).map f ≫ (CategoryTheory.Limits.limitObjIsoLimitCompEvaluation F j).hom =
  (CategoryTheory.Limits.limitObjIsoLimitCompEvaluation F i).hom ≫
    CategoryTheory.Limits.limMap (CategoryTheory.whiskerLeft F ((CategoryTheory.evaluation K C).map f))


lemma isIso_lanAdjunction_counit_app_iff (G : D ⥤ H) :
    IsIso ((L.lanAdjunction H).counit.app G) ↔ G.IsLeftKanExtension (𝟙 (L ⋙ G))

[∀ (F : CategoryTheory.Functor C H), L.HasLeftKanExtension F]

CategoryTheory.IsIso ((L.lanAdjunction H).counit.app G) ↔
  G.IsLeftKanExtension (CategoryTheory.CategoryStruct.id (L.comp G))


theorem IsSimpleOrder.bot_ne_top [LE α] [BoundedOrder α] [IsSimpleOrder α] : (⊥ : α) ≠ (⊤ : α)

{α : Type u_2}
[LE α]
[BoundedOrder α]
[IsSimpleOrder α]


theorem isBigOWith_self_const_mul' (u : Rˣ) (f : α → R) (l : Filter α) :
    IsBigOWith ‖(↑u⁻¹ : R)‖ l f fun x => ↑u * f x

{α : Type u_1}
{R : Type u_13}
[SeminormedRing R]
(u : Rˣ)
(f : α → R)
(l : Filter α)

Asymptotics.IsBigOWith ‖↑u⁻¹‖ l f fun x => ↑u * f x


@[simp]
theorem Surjective.nonempty_preimage (hf : Surjective f) {s : Set β} :
    (f ⁻¹' s).Nonempty ↔ s.Nonempty

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


/-- An equivalent expression of `Monoid.FG` in terms of `Set.Finite` instead of `Finset`. -/
@[to_additive
      "An equivalent expression of `AddMonoid.FG` in terms of `Set.Finite` instead of `Finset`."]
theorem Monoid.fg_iff :
    Monoid.FG M ↔ ∃ S : Set M, Submonoid.closure S = (⊤ : Submonoid M) ∧ S.Finite

Monoid.FG M ↔ ∃ S, Submonoid.closure S = ⊤ ∧ S.Finite


theorem IsProbabilityMeasure.ne_zero (μ : Measure α) [IsProbabilityMeasure μ] : μ ≠ 0

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


@[simp]
theorem valMinAbs_natCast_eq_self [NeZero n] : (a : ZMod n).valMinAbs = a ↔ a ≤ n / 2


@[simp]
theorem mul_fst (a b : 𝓜(𝕜, A)) : (a * b).fst = a.fst * b.fst

{𝕜 : Type u_1}
{A : Type u_2}
[NontriviallyNormedField 𝕜]
[NonUnitalNormedRing A]
[NormedSpace 𝕜 A]
[SMulCommClass 𝕜 A A]
[IsScalarTower 𝕜 A A]
(a b : 𝓜(𝕜, A))

(a * b).toProd.1 = a.toProd.1 * b.toProd.1


private lemma id_map : (id : VariableChange R).map φ = id

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

WeierstrassCurve.VariableChange.map φ WeierstrassCurve.VariableChange.id = WeierstrassCurve.VariableChange.id


theorem add_int (h : LiouvilleWith p x) (m : ℤ) : LiouvilleWith p (x + m)

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


lemma biSup_comap_eq_top_of_range_eq_biSup
    {R R₂ : Type*} [Ring R] [Ring R₂] {τ₁₂ : R →+* R₂} [RingHomSurjective τ₁₂]
    [Module R M] [Module R₂ M₂] {ι : Type*} (s : Set ι) (hs : s.Nonempty)
    (p : ι → Submodule R₂ M₂) (f : M →ₛₗ[τ₁₂] M₂) (hf : LinearMap.range f = ⨆ i ∈ s, p i) :
    ⨆ i ∈ s, (p i).comap f = ⊤

{M : Type u_4}
{M₂ : Type u_5}
[AddCommGroup M]
[AddCommGroup M₂]
{R : Type u_9}
{R₂ : Type u_10}
[Ring R]
[Ring R₂]
{τ₁₂ : R →+* R₂}
[RingHomSurjective τ₁₂]
[Module R M]
[Module R₂ M₂]
{ι : Type u_11}
(s : Set ι)
(hs : s.Nonempty)
(p : ι → Submodule R₂ M₂)
(f : M →ₛₗ[τ₁₂] M₂)
(hf : LinearMap.range f = ⨆ i ∈ s, p i)


/-- A bijection between two sets `s : Set α` and `t : Set β` provides a partial equivalence
between `α` and `β`. -/
@[simps (config := .asFn)]
noncomputable def BijOn.toPartialEquiv [Nonempty α] (f : α → β) (s : Set α) (t : Set β)
    (hf : BijOn f s t) : PartialEquiv α β

{α : Type u_1}
{β : Type u_2}
[Nonempty α]
(f : α → β)
(s : Set α)
(t : Set β)
(hf : Set.BijOn f s t)

(Set.BijOn.toPartialEquiv f s t hf).target = t


/-- The equivalence between the category of elements `F.Elements`
    and the comma category `(*, F)`. -/
@[simps! functor_obj functor_map inverse_obj inverse_map unitIso_hom
  unitIso_inv counitIso_hom counitIso_inv]
def structuredArrowEquivalence : F.Elements ≌ StructuredArrow PUnit F

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

(CategoryTheory.CategoryOfElements.structuredArrowEquivalence F).functor.obj X =
  CategoryTheory.StructuredArrow.mk fun x => X.snd


@[to_additive (attr := simp)]
theorem leftInvEquiv_symm_eq_inv (x : S) : ((S.leftInvEquiv hS).symm x : M) = (x : M)⁻¹

{M : Type u_1}
[CommGroup M]
(S : Submonoid M)
(hS : S ≤ IsUnit.submonoid M)
(x : ↥S)


theorem centerMass_le_sup {s : Finset ι} {f : ι → α} {w : ι → R} (hw₀ : ∀ i ∈ s, 0 ≤ w i)
    (hw₁ : 0 < ∑ i ∈ s, w i) :
    s.centerMass w f ≤ s.sup' (nonempty_of_ne_empty <| by rintro rfl; simp at hw₁) f

{R : Type u_1}
{ι : Type u_5}
{α : Type u_7}
[LinearOrderedField R]
[LinearOrderedAddCommGroup α]
[Module R α]
[OrderedSMul R α]
{s : Finset ι}
{f : ι → α}
{w : ι → R}
(hw₀ : ∀ i ∈ s, 0 ≤ w i)
(hw₁ : 0 < ∑ i ∈ s, w i)


@[to_additive]
theorem prod_eq_mul_prod_diff_singleton [DecidableEq α] {s : Finset α} {i : α} (h : i ∈ s)
    (f : α → β) : ∏ x ∈ s, f x = f i * ∏ x ∈ s \ {i}, f x

{α : Type u_3}
{β : Type u_4}
[AddCommMonoid β]
[DecidableEq α]
{s : Finset α}
{i : α}
(h : i ∈ s)
(f : α → β)


theorem inner_add_left (x y z : F) : ⟪x + y, z⟫ = ⟪x, z⟫ + ⟪y, z⟫

{𝕜 : Type u_1}
{F : Type u_3}
[RCLike 𝕜]
[AddCommGroup F]
[Module 𝕜 F]
[c : InnerProductSpace.Core 𝕜 F]
(x y z : F)


@[simp] theorem findIdx?_replicate :
    (replicate n a).findIdx? p = if 0 < n ∧ p a then some 0 else none

∀ {α : Type u_1} {a : α} {p : α → Bool},
  List.findIdx? p (List.replicate n a) = if 0 < n ∧ p a = true then some 0 else none


theorem submodule_pow_eq_zero_of_pow_eq_zero {N : Submodule R M} {g : Module.End R N}
    {G : Module.End R M} (h : G.comp N.subtype = N.subtype.comp g) {k : ℕ} (hG : G ^ k = 0) :
    g ^ k = 0

{R : Type u_1}
{M : Type u_5}
[Semiring R]
[AddCommMonoid M]
[Module R M]
{N : Submodule R M}
{g : Module.End R ↥N}
{G : Module.End R M}
(h : G ∘ₗ N.subtype = N.subtype ∘ₗ g)
{k : ℕ}
(hG : G ^ k = 0)


@[simp]
theorem head_think (s : Computation α) : head (think s) = none


@[simp] theorem prefix_append (l₁ l₂ : List α) : l₁ <+: l₁ ++ l₂


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

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


theorem eq_zero_cpow_iff {x : ℂ} {a : ℂ} : a = (0 : ℂ) ^ x ↔ x ≠ 0 ∧ a = 0 ∨ x = 0 ∧ a = 1

a = 0 ^ x ↔ x ≠ 0 ∧ a = 0 ∨ x = 0 ∧ a = 1


@[simp, norm_cast]
theorem inv_apply {f : CauSeq β abv} (hf i) : inv f hf i = (f i)⁻¹

{α : Type u_1}
{β : Type u_2}
[LinearOrderedField α]
[DivisionRing β]
{abv : β → α}
[IsAbsoluteValue abv]
{f : CauSeq β abv}
(hf : ¬f.LimZero)
(i : ℕ)


@[to_additive sum_lt_sum]
lemma prod_lt_prod' [Preorder M] [CovariantClass M M (· * ·) (· < ·)]
    [CovariantClass M M (· * ·) (· ≤ ·)] [CovariantClass M M (Function.swap (· * ·)) (· < ·)]
    [CovariantClass M M (Function.swap (· * ·)) (· ≤ ·)] {l : List ι} (f g : ι → M)
    (h₁ : ∀ i ∈ l, f i ≤ g i) (h₂ : ∃ i ∈ l, f i < g i) : (l.map f).prod < (l.map g).prod

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

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

[CovariantClass M M (Function.swap fun x x_1 => x + x_1) fun x x_1 => x < x_1]

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


theorem finitaryExtensive_iff_of_isTerminal (C : Type u) [Category.{v} C] [HasFiniteCoproducts C]
    [HasPullbacksOfInclusions C]
    (T : C) (HT : IsTerminal T) (c₀ : BinaryCofan T T) (hc₀ : IsColimit c₀) :
    FinitaryExtensive C ↔ IsVanKampenColimit c₀

(HT : CategoryTheory.Limits.IsTerminal T)

(c₀ : CategoryTheory.Limits.BinaryCofan T T)

(hc₀ : CategoryTheory.Limits.IsColimit c₀)

CategoryTheory.FinitaryExtensive C ↔ CategoryTheory.IsVanKampenColimit c₀


theorem toGlue_commute (hΦ : Isometry Φ) (hΨ : Isometry Ψ) :
    toGlueL hΦ hΨ ∘ Φ = toGlueR hΦ hΨ ∘ Ψ

{X : Type u}
{Y : Type v}
{Z : Type w}
[Nonempty Z]
[MetricSpace Z]
[MetricSpace X]
[MetricSpace Y]
{Φ : Z → X}
{Ψ : Z → Y}
(hΦ : Isometry Φ)
(hΨ : Isometry Ψ)

Metric.toGlueL hΦ hΨ ∘ Φ = Metric.toGlueR hΦ hΨ ∘ Ψ


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

(hf' : HasDerivWithinAt f f' (Set.Iio y) y)


/-- The angle between two vectors, with respect to an orientation given by `Orientation.map`
with a linear isometric equivalence, equals the angle between those two vectors, transformed by
the inverse of that equivalence, with respect to the original orientation. -/
@[simp]
theorem oangle_map (x y : V') (f : V ≃ₗᵢ[ℝ] V') :
    (Orientation.map (Fin 2) f.toLinearEquiv o).oangle x y = o.oangle (f.symm x) (f.symm y)

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

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

((Orientation.map (Fin 2) f.toLinearEquiv) o).oangle x y = o.oangle (f.symm x) (f.symm y)


/-- Application of a natural transformation at a fixed object,
as group homomorphism -/
@[simps]
def appHom (X : C) : (F ⟶ G) →+ (F.obj X ⟶ G.obj X)

{C : Type u_1}
{D : Type u_2}
[CategoryTheory.Category.{u_3, u_1} C]
[CategoryTheory.Category.{u_4, u_2} D]
[CategoryTheory.Preadditive D]
{F G : CategoryTheory.Functor C D}
(X : C)
(α : F ⟶ G)

(CategoryTheory.NatTrans.appHom X) α = α.app X


protected theorem isCompact (K : ConvexBody V) : IsCompact (K : Set V)

{V : Type u_1}
[TopologicalSpace V]
[AddCommGroup V]
[Module ℝ V]
(K : ConvexBody V)


@[to_additive (attr := simp) addCenter_eq_univ]
theorem center_eq_univ : center M = univ


lemma setIntegral_condKernel_univ_right (a : α) {s : Set β} (hs : MeasurableSet s)
    (hf : IntegrableOn f (s ×ˢ Set.univ) (κ a)) :
    ∫ b in s, ∫ ω, f (b, ω) ∂(Kernel.condKernel κ (a, b)) ∂(Kernel.fst κ a)
      = ∫ x in s ×ˢ Set.univ, f x ∂(κ a)

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

(hf : MeasureTheory.IntegrableOn f (s ×ˢ Set.univ) (κ a))

∫ (b : β) in s, ∫ (ω : Ω), f (b, ω) ∂κ.condKernel (a, b) ∂κ.fst a = ∫ (x : β × Ω) in s ×ˢ Set.univ, f x ∂κ a


lemma Module.support_subset_preimage_comap [IsScalarTower R A M] :
    Module.support A M ⊆ PrimeSpectrum.comap (algebraMap R A) ⁻¹' Module.support R M

{R : Type u_1}
{A : Type u_2}
{M : Type u_3}
[CommRing R]
[AddCommGroup M]
[Module R M]
[CommRing A]
[Algebra R A]
[Module A M]
[IsScalarTower R A M]

Module.support A M ⊆ ⇑(PrimeSpectrum.comap (algebraMap R A)) ⁻¹' Module.support R M


@[to_additive]
theorem prod_inter_mul_prod_diff [DecidableEq α] (s t : Finset α) (f : α → β) :
    (∏ x ∈ s ∩ t, f x) * ∏ x ∈ s \ t, f x = ∏ x ∈ s, f x

{α : Type u_3}
{β : Type u_4}
[AddCommMonoid β]
[DecidableEq α]
(s t : Finset α)
(f : α → β)

∑ x ∈ s ∩ t, f x + ∑ x ∈ s \ t, f x = ∑ x ∈ s, f x


theorem HasBasis.isBasis (h : l.HasBasis p s) : IsBasis p s

{α : Type u_1}
{ι : Sort u_4}
{l : Filter α}
{p : ι → Prop}
{s : ι → Set α}
(h : l.HasBasis p s)


theorem natPair : @Primrec' 2 fun v => v.head.pair v.tail.head

Nat.Primrec' fun v => Nat.pair v.head v.tail.head


/-- If `b` is a basis of a finite separable field extension `L/K`,
  then `Algebra.discr K b` is a unit. -/
theorem discr_isUnit_of_basis [Algebra.IsSeparable K L] (b : Basis ι K L) : IsUnit (discr K b)

{ι : Type w}
[DecidableEq ι]
[Fintype ι]
(K : Type u)
{L : Type v}
[Field K]
[Field L]
[Algebra K L]
[Module.Finite K L]
[Algebra.IsSeparable K L]
(b : Basis ι K L)


theorem natDegree_X_le : (X : R[X]).natDegree ≤ 1


lemma quasiIso_of_comp_left (φ : K ⟶ L) (φ' : L ⟶ M) [∀ i, K.HasHomology i]
    [∀ i, L.HasHomology i] [∀ i, M.HasHomology i]
    [hφ : QuasiIso φ] [hφφ' : QuasiIso (φ ≫ φ')] :
    QuasiIso φ'


@[simp] lemma chainTopCoeff_neg : chainTopCoeff (-α) β = chainBotCoeff α β

{R : Type u_1}
{L : Type u_2}
[CommRing R]
[LieRing L]
[LieAlgebra R L]
{M : Type u_3}
[AddCommGroup M]
[Module R M]
[LieRingModule L M]
[LieModule R L M]
[LieAlgebra.IsNilpotent R L]
[NoZeroSMulDivisors ℤ R]
[NoZeroSMulDivisors R M]
[IsNoetherian R M]
(α : L → R)
(β : LieModule.Weight R L M)

LieModule.chainTopCoeff (-α) β = LieModule.chainBotCoeff α β


@[simp]
theorem refl_symm : (refl k P₁).symm = refl k P₁

{k : Type u_1}
{P₁ : Type u_2}
{V₁ : Type u_6}
[Ring k]
[AddCommGroup V₁]
[Module k V₁]
[AddTorsor V₁ P₁]
[TopologicalSpace P₁]

(ContinuousAffineEquiv.refl k P₁).symm = ContinuousAffineEquiv.refl k P₁


/-- The **Cauchy criterion** for infinite products, also known as the **Cauchy convergence test** -/
@[to_additive "The **Cauchy criterion** for infinite sums, also known as the
**Cauchy convergence test**"]
theorem multipliable_iff_cauchySeq_finset [CompleteSpace α] {f : β → α} :
    Multipliable f ↔ CauchySeq fun s : Finset β ↦ ∏ b ∈ s, f b

{α : Type u_1}
{β : Type u_2}
[CommGroup α]
[UniformSpace α]
[CompleteSpace α]
{f : β → α}

Multipliable f ↔ CauchySeq fun s => ∏ b ∈ s, f b


/-- The multiplicative indicators of closed δ-thickenings of a set tend pointwise to the
multiplicative indicator of the set, as δ tends to zero. -/
@[to_additive "The indicators of closed δ-thickenings of a set tend pointwise to the indicator
of the set, as δ tends to zero."]
lemma tendsto_mulIndicator_cthickening_mulIndicator_closure (f : α → β) (E : Set α) :
    Tendsto (fun δ ↦ (Metric.cthickening δ E).mulIndicator f) (𝓝 0)
      (𝓝 ((closure E).mulIndicator f))

{α : Type u_1}
[PseudoEMetricSpace α]
{β : Type u_2}
[One β]
[TopologicalSpace β]
(f : α → β)
(E : Set α)

Filter.Tendsto (fun δ => (Metric.cthickening δ E).mulIndicator f) (𝓝 0) (𝓝 ((closure E).mulIndicator f))


@[simp]
theorem InitialSeg.leLT_apply [IsWellOrder β s] [IsTrans γ t] (f : r ≼i s) (g : s ≺i t) (a : α) :
    (f.leLT g) a = g (f a)

{α : Type u_1}
{β : Type u_2}
{γ : Type u_3}
{r : α → α → Prop}
{s : β → β → Prop}
{t : γ → γ → Prop}
[IsWellOrder β s]
[IsTrans γ t]
(f : r ≼i s)
(g : s ≺i t)
(a : α)

(f.leLT g).toRelEmbedding a = g.toRelEmbedding (f a)


/-- A graph is connected if it's preconnected and contains at least one vertex.
This follows the convention observed by mathlib that something is connected iff it has
exactly one connected component.

There is a `CoeFun` instance so that `h u v` can be used instead of `h.Preconnected u v`. -/
@[mk_iff]
structure Connected : Prop where
  protected preconnected : G.Preconnected
  protected [nonempty : Nonempty V]

{V : Type u}
{G : SimpleGraph V}
(self : G.Connected)


theorem Filter.Tendsto.bddAbove_range [IsDirected α (· ≤ ·)] {u : ℕ → α}
    (h : Tendsto u atTop (𝓝 a)) : BddAbove (Set.range u)

(h : Filter.Tendsto u Filter.atTop (𝓝 a))


/-- If `M ⟶ N` is an epimorphisms and that `M` is generated by some sections,
then `N` is generated by the images of these sections. -/
@[simps]
def ofEpi (σ : M.GeneratingSections) (p : M ⟶ N) [Epi p] :
    N.GeneratingSections

{J : CategoryTheory.GrothendieckTopology C}

[J.HasSheafCompose (CategoryTheory.forget₂ RingCat AddCommGrp)]


@[simp] theorem add_bmod_bmod : Int.bmod (x + Int.bmod y n) n = Int.bmod (x + y) n


lemma isCoatom_comap_of_surjective
    {H : Type*} [Group H] {φ : G →* H} (hφ : Function.Surjective φ)
    {M : Subgroup H} (hM : IsCoatom M) : IsCoatom (M.comap φ)

{G : Type u_1}
[Group G]
{H : Type u_2}
[Group H]
{φ : G →* H}
(hφ : Function.Surjective ⇑φ)
{M : Subgroup H}
(hM : IsCoatom M)


@[simp]
theorem disjoint_sUnion_left {S : Set (Set α)} {t : Set α} :
    Disjoint (⋃₀S) t ↔ ∀ s ∈ S, Disjoint s t

{α : Type u_1}
{S : Set (Set α)}
{t : Set α}

Disjoint (⋃₀ S) t ↔ ∀ s ∈ S, Disjoint s t


@[simp]
theorem aestronglyMeasurable_zero_measure [MeasurableSpace α] [TopologicalSpace β] (f : α → β) :
    AEStronglyMeasurable f (0 : Measure α)

{α : Type u_1}
{β : Type u_2}
[MeasurableSpace α]
[TopologicalSpace β]
(f : α → β)


theorem bsup_eq_blsub_iff_lt_bsup {o : Ordinal.{u}} (f : ∀ a < o, Ordinal.{max u v}) :
    bsup.{_, v} o f = blsub.{_, v} o f ↔ ∀ i hi, f i hi < bsup.{_, v} o f

(f : (a : Ordinal.{u}) → a < o → Ordinal.{max u v})

o.bsup f = o.blsub f ↔ ∀ (i : Ordinal.{u}) (hi : i < o), f i hi < o.bsup f


@[simp] theorem Bool.and_true (b : Bool) : (b && true) = b


/-- Computing the norm of a difference between two L¹-functions. Note that this is not a
  special case of `norm_def` since `(f - g) x` and `f x - g x` are not equal
  (but only a.e.-equal). -/
theorem norm_sub_eq_lintegral (f g : α →₁[μ] β) :
    ‖f - g‖ = (∫⁻ x, (‖f x - g x‖₊ : ℝ≥0∞) ∂μ).toReal

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

‖f - g‖ = (∫⁻ (x : α), ↑‖↑↑f x - ↑↑g x‖₊ ∂μ).toReal


theorem blsub_eq (hf : IsFundamentalSequence a o f) : blsub.{u, u} o f = a

{f : (b : Ordinal.{u}) → b < o → Ordinal.{u}}


/-- If `X` is a real random variable with Gaussian law with mean `μ` and variance `v`, then `X * c`
has Gaussian law with mean `c * μ` and variance `c^2 * v`. -/
lemma gaussianReal_mul_const {X : Ω → ℝ} (hX : Measure.map X ℙ = gaussianReal μ v) (c : ℝ) :
    Measure.map (fun ω ↦ X ω * c) ℙ = gaussianReal (c * μ) (⟨c^2, sq_nonneg _⟩ * v)

(hX : MeasureTheory.Measure.map X MeasureTheory.volume = ProbabilityTheory.gaussianReal μ v)

MeasureTheory.Measure.map (fun ω => X ω * c) MeasureTheory.volume =
  ProbabilityTheory.gaussianReal (c * μ) (⟨c ^ 2, ⋯⟩ * v)


theorem _root_.Function.RightInverse.leftInverse_of_card_le {f : α → β} {g : β → α}
    (hfg : RightInverse f g) (hcard : card β ≤ card α) : LeftInverse f g

(hcard : Fintype.card β ≤ Fintype.card α)


/-- The orthogonal complement satisfies `Kᗮᗮᗮ = Kᗮ`. -/
theorem Submodule.triorthogonal_eq_orthogonal [CompleteSpace E] : Kᗮᗮᗮ = Kᗮ

{𝕜 : Type u_1}
{E : Type u_2}
[RCLike 𝕜]
[NormedAddCommGroup E]
[InnerProductSpace 𝕜 E]
{K : Submodule 𝕜 E}
[CompleteSpace E]


lemma CompleteOrthogonalIdempotents.of_prod_one_sub
    (he : OrthogonalIdempotents e) (he' : ∏ i, (1 - e i) = 0) :
    CompleteOrthogonalIdempotents e

{R : Type u_1}
[CommRing R]
{I : Type u_3}
[Fintype I]
{e : I → R}
(he : OrthogonalIdempotents e)
(he' : ∏ i : I, (1 - e i) = 0)


/-- If a sigma-algebra is generated by a set of sets `s` with cardinality at most the continuum,
then the sigma algebra has the same cardinality bound. -/
theorem cardinal_measurableSet_le_continuum {s : Set (Set α)} :
    #s ≤ 𝔠 → #{ t | @MeasurableSet α (generateFrom s) t } ≤ 𝔠


theorem strictMonoOn_natAbs : StrictMonoOn natAbs (Ici 0)


theorem map_swap_antidiagonal {n : ℕ} :
    (antidiagonal n).map Prod.swap = (antidiagonal n).reverse

List.map Prod.swap (List.Nat.antidiagonal n) = (List.Nat.antidiagonal n).reverse


@[simp]
theorem ball_union_sphere : ball x ε ∪ sphere x ε = closedBall x ε

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

Metric.ball x ε ∪ Metric.sphere x ε = Metric.closedBall x ε


@[simp] theorem diff_nil (l : List α) : l.diff [] = l


theorem pair_eq_mk (f : α →ₘ[μ] β) (g : α →ₘ[μ] γ) :
    f.pair g =
      mk (fun x => (f x, g x)) (f.aestronglyMeasurable.prod_mk g.aestronglyMeasurable)

{α : Type u_1}
{β : Type u_2}
{γ : Type u_3}
[MeasurableSpace α]
{μ : MeasureTheory.Measure α}
[TopologicalSpace β]
[TopologicalSpace γ]
(f : α →ₘ[μ] β)
(g : α →ₘ[μ] γ)

f.pair g = MeasureTheory.AEEqFun.mk (fun x => (↑f x, ↑g x)) ⋯


/--
An equivalence relation `~ : α → α → Prop` is a relation that is:

* reflexive: `x ~ x`
* symmetric: `x ~ y` implies `y ~ x`
* transitive: `x ~ y` and `y ~ z` implies `x ~ z`

Equality is an equivalence relation, and equivalence relations share many of
the properties of equality. In particular, `Quot α r` is most well behaved
when `r` is an equivalence relation, and in this case we use `Quotient` instead.
-/
structure Equivalence {α : Sort u} (r : α → α → Prop) : Prop where
  /-- An equivalence relation is reflexive: `x ~ x` -/
  refl  : ∀ x, r x x
  /-- An equivalence relation is symmetric: `x ~ y` implies `y ~ x` -/
  symm  : ∀ {x y}, r x y → r y x
  /-- An equivalence relation is transitive: `x ~ y` and `y ~ z` implies `x ~ z` -/
  trans : ∀ {x y z}, r x y → r y z → r x z

{α : Sort u}
{r : α → α → Prop}
(self : Equivalence r)
{x y z : α}


@[to_additive]
theorem inf_relindex_left : (H ⊓ K).relindex H = K.relindex H

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


theorem inf_le_ite (s s' : α) (P : Prop) [Decidable P] : s ⊓ s' ≤ ite P s s'

{α : Type u}
[SemilatticeInf α]
(s s' : α)
(P : Prop)
[Decidable P]


theorem eq_of_length_eq_zero {u v : V} : ∀ {p : G.Walk u v}, p.length = 0 → u = v

{V : Type u}
{G : SimpleGraph V}
{u v : V}
{p : G.Walk u v}


@[simp]
theorem coeff_succ_mul_X (n : ℕ) (φ : R⟦X⟧) : coeff R (n + 1) (φ * X) = coeff R n φ

{R : Type u_1}
[Semiring R]
(n : ℕ)
(φ : PowerSeries R)

(PowerSeries.coeff R (n + 1)) (φ * PowerSeries.X) = (PowerSeries.coeff R n) φ


@[to_additive]
theorem uniformGroup_inf {u₁ u₂ : UniformSpace β} (h₁ : @UniformGroup β u₁ _)
    (h₂ : @UniformGroup β u₂ _) : @UniformGroup β (u₁ ⊓ u₂) _

{β : Type u_2}
[AddGroup β]
{u₁ u₂ : UniformSpace β}
(h₁ : UniformAddGroup β)
(h₂ : UniformAddGroup β)


lemma uniq_symm : (uniq L₁ L₂ W').symm = uniq L₂ L₁ W'

(W' : CategoryTheory.MorphismProperty C)

(CategoryTheory.Localization.uniq L₁ L₂ W').symm = CategoryTheory.Localization.uniq L₂ L₁ W'


theorem algebraMap_eq_inl : ⇑(algebraMap R' (tsze R' M)) = inl

(R' : Type u)
(M : Type v)
[CommSemiring R']
[AddCommMonoid M]
[Module R' M]
[Module R'ᵐᵒᵖ M]
[IsCentralScalar R' M]

⇑(algebraMap R' (tsze R' M)) = TrivSqZeroExt.inl


protected lemma EventuallyLE.iUnion [Finite ι] {s t : ι → Set α}
    (h : ∀ i, s i ≤ᶠ[l] t i) : (⋃ i, s i) ≤ᶠ[l] ⋃ i, t i

{α : Type u}
{ι : Sort x}
{l : Filter α}
[Finite ι]
{s t : ι → Set α}
(h : ∀ (i : ι), s i ≤ᶠ[l] t i)


theorem fst_eq_iff : ∀ {p : α × β} {x : α}, p.1 = x ↔ p = (x, p.2)

{α : Type u_1}
{β : Type u_2}
{p : α × β}
{x : α}


private theorem add_left_aux4 (y z : E) :
    ‖y - 2 • z‖ * ‖y - 2 • z‖ = 2 * (‖y - z‖ * ‖y - z‖ + ‖z‖ * ‖z‖) - ‖y‖ * ‖y‖

{E : Type u_2}
[NormedAddCommGroup E]
[InnerProductSpaceable E]
(y z : E)


@[simp]
theorem fract_one_add (a : α) : fract (1 + a) = fract a

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


theorem submoduleMap_surjective (f : M →ₗ[R] M₁) (p : Submodule R M) :
    Function.Surjective (f.submoduleMap p)

{R : Type u_1}
{M : Type u_5}
{M₁ : Type u_6}
[Semiring R]
[AddCommMonoid M]
[AddCommMonoid M₁]
[Module R M]
[Module R M₁]
(f : M →ₗ[R] M₁)
(p : Submodule R M)


@[fun_prop]
theorem differentiable_snd : Differentiable 𝕜 (Prod.snd : E × F → F)

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{F : Type u_3}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]


theorem valMinAbs_mem_Ioc {n : ℕ} [NeZero n] (x : ZMod n) :
    x.valMinAbs * 2 ∈ Set.Ioc (-n : ℤ) n


theorem neg_add {X Y : C} (a b : X ⟶ Y) : -(a + b) = -a - b


@[simp]
nonrec theorem smul_im [SMulZeroClass S R] (s : S) : (s • a).im = s • a.im

{S : Type u_1}
{R : Type u_3}
[CommRing R]
(a : ℍ[R])
[SMulZeroClass S R]
(s : S)


@[to_additive]
theorem measure_smul_null {s} (h : μ s = 0) (c : G) : μ (c • s) = 0

[MeasureTheory.SMulInvariantMeasure G α μ]


@[to_additive indicator_compl]
theorem mulIndicator_compl' (s : Set α) (f : α → G) :
    mulIndicator sᶜ f = f / mulIndicator s f

{α : Type u_1}
{G : Type u_6}
[AddGroup G]
(s : Set α)
(f : α → G)


lemma prev_π₁ {i₁ i₁' : I₁} (h : c₁.Rel i₁ i₁') (i₂ : I₂) :
    c₁₂.prev (π c₁ c₂ c₁₂ ⟨i₁', i₂⟩) = π c₁ c₂ c₁₂ ⟨i₁, i₂⟩

{I₁ : Type u_1}
{I₂ : Type u_2}
{I₁₂ : Type u_3}
{c₁ : ComplexShape I₁}
(c₂ : ComplexShape I₂)
(c₁₂ : ComplexShape I₁₂)
[TotalComplexShape c₁ c₂ c₁₂]
{i₁ i₁' : I₁}
(h : c₁.Rel i₁ i₁')
(i₂ : I₂)

c₁₂.prev (c₁.π c₂ c₁₂ (i₁', i₂)) = c₁.π c₂ c₁₂ (i₁, i₂)


/-- A characterization lemma for the scalar multiplication on the Ore localization,
allowing for a choice of Ore numerator and Ore denominator. -/
@[to_additive "A characterization lemma for the vector addition on the Ore localization,
allowing for a choice of Ore minuend and Ore subtrahend."]
theorem oreDiv_smul_char (r₁ : R) (r₂ : X) (s₁ s₂ : S) (r' : R) (s' : S) (huv : s' * r₁ = r' * s₂) :
    (r₁ /ₒ s₁) • (r₂ /ₒ s₂) = r' • r₂ /ₒ (s' * s₁)

{R : Type u_1}
[Monoid R]
{S : Submonoid R}
[OreLocalization.OreSet S]
{X : Type u_2}
[MulAction R X]
(r₁ : R)
(r₂ : X)
(s₁ s₂ : ↥S)
(r' : R)
(s' : ↥S)
(huv : ↑s' * r₁ = r' * ↑s₂)


@[simp]
theorem toLex_symm_eq : (@toLex α).symm = ofLex


theorem Filter.EventuallyEq.isLocalMaxOn_iff {f g : α → β} {a : α} (heq : f =ᶠ[𝓝[s] a] g)
    (hmem : a ∈ s) : IsLocalMaxOn f s a ↔ IsLocalMaxOn g s a

{α : Type u}
{β : Type v}
[TopologicalSpace α]
[Preorder β]
{s : Set α}
{f g : α → β}
{a : α}
(heq : f =ᶠ[𝓝[s] a] g)
(hmem : a ∈ s)


lemma image_iterate {s : Set α} (h : IsFixedPt (Set.image f) s) (n : ℕ) :
    IsFixedPt (Set.image f^[n]) s

(h : Function.IsFixedPt (Set.image f) s)


protected theorem continuous : Continuous f

{E : Type u_1}
[NormedAddCommGroup E]
[NormedSpace ℝ E]
{v : PicardLindelof E}
(f : v.FunSpace)


protected theorem antilipschitz (hf : ApproximatesLinearOn f (f' : E →L[𝕜] F) s c)
    (hc : Subsingleton E ∨ c < N⁻¹) : AntilipschitzWith (N⁻¹ - c)⁻¹ (s.restrict f)

(hc : Subsingleton E ∨ c < ‖↑f'.symm‖₊⁻¹)

AntilipschitzWith (‖↑f'.symm‖₊⁻¹ - c)⁻¹ (s.restrict f)


theorem map_le_of_le_comap : I ≤ K.comap f → I.map f ≤ K

{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}
{I : Ideal R}
{K : Ideal S}


theorem laverage_mem_openSegment_compl_self [IsFiniteMeasure μ] (hs : NullMeasurableSet s μ)
    (hs₀ : μ s ≠ 0) (hsc₀ : μ sᶜ ≠ 0) :
    ⨍⁻ x, f x ∂μ ∈ openSegment ℝ≥0∞ (⨍⁻ x in s, f x ∂μ) (⨍⁻ x in sᶜ, f x ∂μ)

{f : α → ℝ≥0∞}

(hs : MeasureTheory.NullMeasurableSet s μ)

⨍⁻ (x : α), f x ∂μ ∈ openSegment ℝ≥0∞ (⨍⁻ (x : α) in s, f x ∂μ) (⨍⁻ (x : α) in sᶜ, f x ∂μ)


@[to_additive]
theorem Multipliable.of_inv (hf : Multipliable fun b ↦ (f b)⁻¹) : Multipliable f

{α : Type u_1}
{β : Type u_2}
[AddCommGroup α]
[TopologicalSpace α]
[TopologicalAddGroup α]
{f : β → α}
(hf : Summable fun b => -f b)


@[simp]
theorem delta_apply (x₀ : E) (f : 𝓢(E, F)) : delta 𝕜 F x₀ f = f x₀

(𝕜 : Type u_1)
{E : Type u_4}
(F : Type u_5)
[NormedAddCommGroup E]
[NormedSpace ℝ E]
[NormedAddCommGroup F]
[NormedSpace ℝ F]
[RCLike 𝕜]
[NormedSpace 𝕜 F]
[SMulCommClass ℝ 𝕜 F]
(x₀ : E)
(f : SchwartzMap E F)


theorem wOppSide_iff_exists_left {s : AffineSubspace R P} {x y p₁ : P} (h : p₁ ∈ s) :
    s.WOppSide x y ↔ x ∈ s ∨ ∃ p₂ ∈ s, SameRay R (x -ᵥ p₁) (p₂ -ᵥ y)

{R : Type u_1}
{V : Type u_2}
{P : Type u_4}
[LinearOrderedField R]
[AddCommGroup V]
[Module R V]
[AddTorsor V P]
{s : AffineSubspace R P}
{x y p₁ : P}
(h : p₁ ∈ s)


@[simp]
theorem ndunion_eq_union {s t : Multiset α} (d : Nodup s) : ndunion s t = s ∪ t

{α : Type u_1}
[DecidableEq α]
{s t : Multiset α}
(d : s.Nodup)


@[simp]
theorem compl_apply [Zero α] [One α] (i j : V) : A.compl i j = 0 ∨ A.compl i j = 1

{V : Type u_1}
{α : Type u_2}
[DecidableEq α]
[DecidableEq V]
(A : Matrix V V α)
[Zero α]
[One α]
(i j : V)


/-- A subalgebra is a sub(semi)ring that includes the range of `algebraMap`. -/
structure Subalgebra (R : Type u) (A : Type v) [CommSemiring R] [Semiring A] [Algebra R A] extends
  Subsemiring A : Type v where
  /-- The image of `algebraMap` is contained in the underlying set of the subalgebra -/
  algebraMap_mem' : ∀ r, algebraMap R A r ∈ carrier
  zero_mem' := (algebraMap R A).map_zero ▸ algebraMap_mem' 0
  one_mem' := (algebraMap R A).map_one ▸ algebraMap_mem' 1

{R : Type u}
{A : Type v}
[CommSemiring R]
[Semiring A]
[Algebra R A]
(self : Subalgebra R A)
(r : R)


theorem toReal_ofReal_mul (c : ℝ) (a : ℝ≥0∞) (h : 0 ≤ c) :
    ENNReal.toReal (ENNReal.ofReal c * a) = c * ENNReal.toReal a

(ENNReal.ofReal c * a).toReal = c * a.toReal