/-- **Intersecting Secants Theorem**. -/
theorem mul_dist_eq_mul_dist_of_cospherical_of_angle_eq_zero {a b c d p : P}
    (h : Cospherical ({a, b, c, d} : Set P)) (hab : a ≠ b) (hcd : c ≠ d) (hapb : ∠ a p b = 0)
    (hcpd : ∠ c p d = 0) : dist a p * dist b p = dist c p * dist d p

(h : EuclideanGeometry.Cospherical {a, b, c, d})


lemma ThreeGPFree.eq_right (hs : ThreeGPFree s) :
    ∀ ⦃a⦄, a ∈ s → ∀ ⦃b⦄, b ∈ s → ∀ ⦃c⦄, c ∈ s → a * c = b * b → b = c

{α : Type u_2}
[CancelCommMonoid α]
{s : Set α}
(hs : ThreeGPFree s)
⦃a : α⦄

a ∈ s → ∀ ⦃b : α⦄, b ∈ s → ∀ ⦃c : α⦄, c ∈ s → a * c = b * b → b = c


@[reassoc (attr := simp)]
lemma LeftHomologyData.homologyπ_comp_homologyIso_hom (h : S.LeftHomologyData) :
    S.homologyπ ≫ h.homologyIso.hom = h.cyclesIso.hom ≫ h.π

CategoryTheory.CategoryStruct.comp S.homologyπ h.homologyIso.hom =
  CategoryTheory.CategoryStruct.comp h.cyclesIso.hom h.π


@[simp]
theorem to_fun_eq_coe {μ : YoungDiagram} {T : SemistandardYoungTableau μ} :
    T.entry = (T : ℕ → ℕ → ℕ)


private theorem glueDist_triangle (Φ : Z → X) (Ψ : Z → Y) (ε : ℝ)
    (H : ∀ p q, |dist (Φ p) (Φ q) - dist (Ψ p) (Ψ q)| ≤ 2 * ε) :
    ∀ x y z, glueDist Φ Ψ ε x z ≤ glueDist Φ Ψ ε x y + glueDist Φ Ψ ε y z

(H : ∀ (p q : Z), |dist (Φ p) (Φ q) - dist (Ψ p) (Ψ q)| ≤ 2 * ε)

Metric.glueDist Φ Ψ ε x z ≤ Metric.glueDist Φ Ψ ε x y + Metric.glueDist Φ Ψ ε y z


@[to_additive]
theorem Set.Subsingleton.threeGPFree (hs : s.Subsingleton) : ThreeGPFree s

{α : Type u_2}
[Monoid α]
{s : Set α}
(hs : s.Subsingleton)


lemma map_eq_iff {X Y : C} (f g : LeftFraction W X Y) :
    f.map (LeftFraction.Localization.Q W) (Localization.inverts _ _) =
        g.map (LeftFraction.Localization.Q W) (Localization.inverts _ _) ↔
      LeftFractionRel f g

{C : Type u_1}
[CategoryTheory.Category.{u_3, u_1} C]
{W : CategoryTheory.MorphismProperty C}
[W.HasLeftCalculusOfFractions]
{X Y : C}
(f g : W.LeftFraction X Y)

f.map (CategoryTheory.MorphismProperty.LeftFraction.Localization.Q W) ⋯ =
    g.map (CategoryTheory.MorphismProperty.LeftFraction.Localization.Q W) ⋯ ↔
  CategoryTheory.MorphismProperty.LeftFractionRel f g


lemma prod_ne_zero_iff : f.prod g ≠ 0 ↔ ∀ i ∈ f.support, g i (f i) ≠ 0

{α : Type u_1}
{ι : Type u_2}
{β : Type u_7}
[Zero α]
[CommMonoidWithZero β]
[Nontrivial β]
[NoZeroDivisors β]
{f : ι →₀ α}
{g : ι → α → β}


@[to_additive]
theorem mem_leftTransversals_iff_existsUnique_quotient_mk''_eq :
    S ∈ leftTransversals (H : Set G) ↔
      ∀ q : Quotient (QuotientGroup.leftRel H), ∃! s : S, Quotient.mk'' s.1 = q

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

S ∈ AddSubgroup.leftTransversals ↑H ↔ ∀ (q : Quotient (QuotientAddGroup.leftRel H)), ∃! s, Quotient.mk'' ↑s = q


@[to_additive]
theorem MonoidHom.map_finprod_plift (f : M →* N) (g : α → M)
    (h : (mulSupport <| g ∘ PLift.down).Finite) : f (∏ᶠ x, g x) = ∏ᶠ x, f (g x)

(h : (Function.mulSupport (g ∘ PLift.down)).Finite)

f (∏ᶠ (x : α), g x) = ∏ᶠ (x : α), f (g x)


private theorem sup_le_sup {ι ι' : Type u} (r : ι → ι → Prop) (r' : ι' → ι' → Prop)
    [IsWellOrder ι r] [IsWellOrder ι' r'] {o} (ho : type r = o) (ho' : type r' = o)
    (f : ∀ a < o, Ordinal.{max u v}) :
    sup.{_, v} (familyOfBFamily' r ho f) ≤ sup.{_, v} (familyOfBFamily' r' ho' f)

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

Ordinal.sup (Ordinal.familyOfBFamily' r ho f) ≤ Ordinal.sup (Ordinal.familyOfBFamily' r' ho' f)


lemma isProbabilityMeasure (hf_bot : Tendsto f atBot (𝓝 0)) (hf_top : Tendsto f atTop (𝓝 1)) :
    IsProbabilityMeasure f.measure

(hf_bot : Filter.Tendsto (↑f) Filter.atBot (𝓝 0))

(hf_top : Filter.Tendsto (↑f) Filter.atTop (𝓝 1))


theorem iff_of_arrow_iso_right {A B X Y X' Y' : C} (i : A ⟶ B) {p : X ⟶ Y} {p' : X' ⟶ Y'}
    (e : Arrow.mk p ≅ Arrow.mk p') : HasLiftingProperty i p ↔ HasLiftingProperty i p'

(e : CategoryTheory.Arrow.mk p ≅ CategoryTheory.Arrow.mk p')

CategoryTheory.HasLiftingProperty i p ↔ CategoryTheory.HasLiftingProperty i p'


/-- For every open cover of a compact set, there exists a finite subcover. -/
theorem IsCompact.elim_finite_subcover_image {b : Set ι} {c : ι → Set X} (hs : IsCompact s)
    (hc₁ : ∀ i ∈ b, IsOpen (c i)) (hc₂ : s ⊆ ⋃ i ∈ b, c i) :
    ∃ b', b' ⊆ b ∧ Set.Finite b' ∧ s ⊆ ⋃ i ∈ b', c i

{X : Type u}
{ι : Type u_1}
[TopologicalSpace X]
{s : Set X}
{b : Set ι}
{c : ι → Set X}
(hs : IsCompact s)
(hc₁ : ∀ i ∈ b, IsOpen (c i))
(hc₂ : s ⊆ ⋃ i ∈ b, c i)


/-- `x * (y + z)` is equivalent to `x * y + x * z.`-/
theorem left_distrib_equiv (x y z : PGame) : x * (y + z) ≈ x * y + x * z


theorem _root_.IsBot.atBot_eq [Preorder α] {a : α} (ha : IsBot a) : atBot = 𝓟 (Iic a)

{α : Type u_3}
[Preorder α]
{a : α}
(ha : IsBot a)


/-- Swapping the second and third points in an oriented angle negates the sign of that angle. -/
theorem oangle_swap₂₃_sign (p₁ p₂ p₃ : P) : -(∡ p₁ p₂ p₃).sign = (∡ p₁ p₃ p₂).sign

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


@[simp]
theorem mem_rootsOfUnity (k : ℕ+) (ζ : Mˣ) : ζ ∈ rootsOfUnity k M ↔ ζ ^ (k : ℕ) = 1

{M : Type u_1}
[CommMonoid M]
(k : ℕ+)
(ζ : Mˣ)


@[reassoc]
theorem w {f g : MonoOver X} (k : f ⟶ g) : k.left ≫ g.arrow = f.arrow

{C : Type u₁}
[CategoryTheory.Category.{v₁, u₁} C]
{X : C}
{f g : CategoryTheory.MonoOver X}
(k : f ⟶ g)

CategoryTheory.CategoryStruct.comp k.left g.arrow = f.arrow


/-- This core description of a uniform space is outside of the type class hierarchy. It is useful
  for constructions of uniform spaces, when the topology is derived from the uniform space. -/
structure UniformSpace.Core (α : Type u) where
  /-- The uniformity filter. Once `UniformSpace` is defined, `𝓤 α` (`_root_.uniformity`) becomes the
  normal form. -/
  uniformity : Filter (α × α)
  /-- Every set in the uniformity filter includes the diagonal. -/
  refl : 𝓟 idRel ≤ uniformity
  /-- If `s ∈ uniformity`, then `Prod.swap ⁻¹' s ∈ uniformity`. -/
  symm : Tendsto Prod.swap uniformity uniformity
  /-- For every set `u ∈ uniformity`, there exists `v ∈ uniformity` such that `v ○ v ⊆ u`. -/
  comp : (uniformity.lift' fun s => s ○ s) ≤ uniformity

{α : Type u}
(self : UniformSpace.Core α)

(self.uniformity.lift' fun s => s ○ s) ≤ self.uniformity


/-- An anti-equivalence between the categories of triangles in `C` and in `Cᵒᵖ`.
A triangle in `Cᵒᵖ` shall be distinguished iff it correspond to a distinguished
triangle in `C` via this equivalence. -/
@[simps]
noncomputable def triangleOpEquivalence :
    (Triangle C)ᵒᵖ ≌ Triangle Cᵒᵖ

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

(CategoryTheory.Pretriangulated.triangleOpEquivalence C).inverse =
  CategoryTheory.Pretriangulated.TriangleOpEquivalence.inverse C


@[simp]
theorem divp_left_inj (u : αˣ) {a b : α} : a /ₚ u = b /ₚ u ↔ a = b

{α : Type u}
[Monoid α]
(u : αˣ)
{a b : α}


/-- The unit for the equivalence `CommMon_ (C ⥤ D) ≌ C ⥤ CommMon_ D`.
-/
@[simps!]
def unitIso : 𝟭 (CommMon_ (C ⥤ D)) ≅ functor ⋙ inverse

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

∀ (x : C), (CategoryTheory.Monoidal.CommMonFunctorCategoryEquivalence.unitIso.hom.app X).hom.app x = 𝟙 (X.X.obj x)


@[simp, deprecated formPerm_apply_get_length (since := "2024-05-30")]
theorem formPerm_apply_nthLe_length (x : α) (xs : List α) :
    formPerm (x :: xs) ((x :: xs).nthLe xs.length (by simp)) = x

{α : Type u_1}
[DecidableEq α]
(x : α)
(xs : List α)

(x :: xs).formPerm ((x :: xs).nthLe xs.length ⋯) = x


theorem head_succ (n m : ℕ) (x : M F) : head' (x.approx (succ n)) = head' (x.approx (succ m))

PFunctor.Approx.head' (x.approx n.succ) = PFunctor.Approx.head' (x.approx m.succ)


theorem yn_add (m n) : yn a1 (m + n) = xn a1 m * yn a1 n + yn a1 m * xn a1 n

Pell.yn a1 (m + n) = Pell.xn a1 m * Pell.yn a1 n + Pell.yn a1 m * Pell.xn a1 n


@[to_additive]
theorem IsLowerSet.smul (hs : IsLowerSet s) : IsLowerSet (a • s)

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


@[simp]
theorem zipRight_cons_cons : zipRight (a :: as) (b :: bs) = (some a, b) :: zipRight as bs

{α : Type u}
{β : Type v}
(a : α)
(as : List α)
(b : β)
(bs : List β)

(a :: as).zipRight (b :: bs) = (some a, b) :: as.zipRight bs


theorem mem_powerset {x s : Set α} (h : x ⊆ s) : x ∈ 𝒫 s


theorem Pairwise.set_pairwise (h : Pairwise r) (s : Set α) : s.Pairwise r

{α : Type u_1}
{r : α → α → Prop}
(h : Pairwise r)
(s : Set α)


@[simp]
theorem Differentiable.csinh (hc : Differentiable ℂ f) :
    Differentiable ℂ fun x => Complex.sinh (f x)

{E : Type u_1}
[NormedAddCommGroup E]
[NormedSpace ℂ E]
{f : E → ℂ}
(hc : Differentiable ℂ f)


private theorem pow_aux (hf : ∀ x, p x ↔ p (f x)) : ∀ {n : ℕ} (x), p x ↔ p ((f ^ n) x)

{α : Type u}
{p : α → Prop}
{f : Equiv.Perm α}
(hf : ∀ (x : α), p x ↔ p (f x))
{n : ℕ}
(x : α)


theorem le_sum_schlomilch (hf : ∀ ⦃m n⦄, 0 < m → m ≤ n → f n ≤ f m) (h_pos : ∀ n, 0 < u n)
    (hu : Monotone u) (n : ℕ) :
    (∑ k ∈ range (u n), f k) ≤
      ∑ k ∈ range (u 0), f k + ∑ k ∈ range n, (u (k + 1) - u k) • f (u k)

(hf : ∀ ⦃m n : ℕ⦄, 0 < m → m ≤ n → f n ≤ f m)

∑ k ∈ Finset.range (u n), f k ≤ ∑ k ∈ Finset.range (u 0), f k + ∑ k ∈ Finset.range n, (u (k + 1) - u k) • f (u k)


/-- Group homomorphisms preserve division. -/
@[to_additive "Additive group homomorphisms preserve subtraction."]
protected theorem map_mul_inv [Group α] [DivisionMonoid β] (f : α →* β) (g h : α) :
    f (g * h⁻¹) = f g * (f h)⁻¹

{α : Type u_2}
{β : Type u_3}
[Group α]
[DivisionMonoid β]
(f : α →* β)
(g h : α)


theorem Set.LeftInvOn.map_nhdsWithin_eq {f : α → β} {g : β → α} {x : β} {s : Set β}
    (h : LeftInvOn f g s) (hx : f (g x) = x) (hf : ContinuousWithinAt f (g '' s) (g x))
    (hg : ContinuousWithinAt g s x) : map g (𝓝[s] x) = 𝓝[g '' s] g x


theorem sizeOf_lt_sizeOf_of_mem [SizeOf α] {x : α} {s : Finset α} (hx : x ∈ s) :
    SizeOf.sizeOf x < SizeOf.sizeOf s

{α : Type u_1}
[SizeOf α]
{x : α}
{s : Finset α}
(hx : x ∈ s)


@[simp]
theorem polynomialQuotientEquivQuotientPolynomial_symm_mk (I : Ideal R) (f : R[X]) :
    I.polynomialQuotientEquivQuotientPolynomial.symm (Quotient.mk _ f) = f.map (Quotient.mk I)

{R : Type u_1}
[CommRing R]
(I : Ideal R)
(f : R[X])

I.polynomialQuotientEquivQuotientPolynomial.symm ((Ideal.Quotient.mk (Ideal.map Polynomial.C I)) f) =
  Polynomial.map (Ideal.Quotient.mk I) f


theorem EventuallyLE.cardinal_iInter {s t : ι → Set α} (hic : #ι < c)
    (h : ∀ i, s i ≤ᶠ[l] t i) : ⋂ i, s i ≤ᶠ[l] ⋂ i, t i

{ι α : Type u}
{c : Cardinal.{u}}
{l : Filter α}
[CardinalInterFilter l c]
{s t : ι → Set α}
(hic : #ι < c)
(h : ∀ (i : ι), s i ≤ᶠ[l] t i)


/-- An infinite sum of functions with summable sup norm is continuous if each individual
function is. -/
theorem continuous_tsum [TopologicalSpace β] {f : α → β → F} (hf : ∀ i, Continuous (f i))
    (hu : Summable u) (hfu : ∀ n x, ‖f n x‖ ≤ u n) : Continuous fun x => ∑' n, f n x

(hfu : ∀ (n : α) (x : β), ‖f n x‖ ≤ u n)


lemma id_lift_eqToHom_domain {p : 𝒳 ⥤ 𝒮} {R S : 𝒮} (hRS : R = S) {a : 𝒳} (ha : p.obj a = R) :
    p.IsHomLift (eqToHom hRS) (𝟙 a)

{𝒮 : Type u₁}
{𝒳 : Type u₂}
[CategoryTheory.Category.{v₁, u₂} 𝒳]
[CategoryTheory.Category.{v₂, u₁} 𝒮]
{p : 𝒳 ⥤ 𝒮}
{R S : 𝒮}
(hRS : R = S)
{a : 𝒳}
(ha : p.obj a = R)

p.IsHomLift (CategoryTheory.eqToHom hRS) (𝟙 a)


@[simp]
theorem biproduct.bicone_π (f : J → C) [HasBiproduct f] (b : J) :
    (biproduct.bicone f).π b = biproduct.π f b

(CategoryTheory.Limits.biproduct.bicone f).π b = CategoryTheory.Limits.biproduct.π f b


@[to_additive]
theorem le_comap_map {f : M →ₙ* N} : S ≤ (S.map f).comap f

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

S ≤ AddSubsemigroup.comap f (AddSubsemigroup.map f S)


theorem disjoint_erase_comm : Disjoint (s.erase a) t ↔ Disjoint s (t.erase a)

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


lemma IsAntichain.interior_eq_empty' [∀ x : α, (𝓝[>] x).NeBot] {s : Set α}
    (hs : IsAntichain (· ≤ ·) s) : interior s = ∅

(hs : IsAntichain (fun x x_1 => x ≤ x_1) s)


@[simp]
theorem mirror_leadingCoeff : p.mirror.leadingCoeff = p.trailingCoeff

{R : Type u_1}
[Semiring R]
(p : Polynomial R)


protected theorem smul_zero (x : R[S⁻¹]) : x • (0 : X[S⁻¹]) = 0

{R : Type u_1}
[Monoid R]
{S : Submonoid R}
[OreLocalization.OreSet S]
{X : Type u_2}
[AddMonoid X]
[DistribMulAction R X]
(x : OreLocalization S R)


theorem IsLittleO.smul (h₁ : k₁ =o[l] k₂) (h₂ : f' =o[l] g') :
    (fun x => k₁ x • f' x) =o[l] fun x => k₂ x • g' x

{α : Type u_1}
{E' : Type u_6}
{F' : Type u_7}
{R : Type u_13}
{𝕜' : Type u_16}
[SeminormedAddCommGroup E']
[SeminormedAddCommGroup F']
[SeminormedRing R]
[NormedDivisionRing 𝕜']
{f' : α → E'}
{g' : α → F'}
{l : Filter α}
[Module R E']
[BoundedSMul R E']
[Module 𝕜' F']
[BoundedSMul 𝕜' F']
{k₁ : α → R}
{k₂ : α → 𝕜'}
(h₁ : k₁ =o[l] k₂)
(h₂ : f' =o[l] g')


/-- `F.mapTriangle` commutes with the inverse of the rotation of triangles. -/
@[simps!]
noncomputable def mapTriangleInvRotateIso [F.Additive] :
    F.mapTriangle ⋙ Pretriangulated.invRotate D ≅
      Pretriangulated.invRotate C ⋙ F.mapTriangle

(X : CategoryTheory.Pretriangulated.Triangle C)

(F.mapTriangleInvRotateIso.hom.app X).hom₂ = CategoryTheory.CategoryStruct.id (F.obj X.obj₁)


theorem span_singleton_smul_le {S} [Monoid S] [SMul S R] [MulAction S M] [IsScalarTower S R M]
    (r : S) (x : M) : (R ∙ r • x) ≤ R ∙ x

(R : Type u_1)
{M : Type u_4}
[Semiring R]
[AddCommMonoid M]
[Module R M]
{S : Type u_9}
[Monoid S]
[SMul S R]
[MulAction S M]
[IsScalarTower S R M]
(r : S)
(x : M)

Submodule.span R {r • x} ≤ Submodule.span R {x}


@[simp]
theorem id_apply (x : α) : RingHom.id α x = x

∀ {x : NonAssocSemiring α} (x_1 : α), (RingHom.id α) x_1 = x_1


protected theorem add_max_add_right : ∀ (a b c : Nat), max (a + c) (b + c) = max a b + c


theorem exists_primitive_lcm_of_isPrimitive {p q : R[X]} (hp : p.IsPrimitive) (hq : q.IsPrimitive) :
    ∃ r : R[X], r.IsPrimitive ∧ ∀ s : R[X], p ∣ s ∧ q ∣ s ↔ r ∣ s

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

∃ r, r.IsPrimitive ∧ ∀ (s : Polynomial R), p ∣ s ∧ q ∣ s ↔ r ∣ s


@[simp]
theorem inv_mk (hx : 0 ≤ x) :
    (⟨x, hx⟩ : { x : α // 0 ≤ x })⁻¹ = ⟨x⁻¹, inv_nonneg (α := α) |>.2 hx⟩

{α : Type u_1}
[LinearOrderedSemifield α]
{x : α}
(hx : 0 ≤ x)

⟨x, hx⟩⁻¹ = ⟨x⁻¹, ⋯⟩


@[simp] lemma zsmul_one [AddGroupWithOne α] (n : ℤ) : n • (1 : α) = n

{α : Type u_3}
[AddGroupWithOne α]
(n : ℤ)


lemma countP_attach (l : List α) : l.attach.countP (fun a : {x // x ∈ l} ↦ p a) = l.countP p

{α : Type u_1}
(p : α → Bool)
(l : List α)

List.countP (fun a => p ↑a) l.attach = List.countP p l


lemma succAbove_rev_right (p : Fin (n + 1)) (i : Fin n) :
    p.succAbove i.rev = (p.rev.succAbove i).rev


theorem compress_disjoint :
    Disjoint (s.filter (compress u v · ∈ s)) ((s.image <| compress u v).filter (· ∉ s))

{α : Type u_1}
[GeneralizedBooleanAlgebra α]
[DecidableRel Disjoint]
[DecidableRel fun x x_1 => x ≤ x_1]
{s : Finset α}
{u v : α}
[DecidableEq α]

Disjoint (Finset.filter (fun x => UV.compress u v x ∈ s) s)
  (Finset.filter (fun x => x ∉ s) (Finset.image (UV.compress u v) s))


theorem composition (g : Stream' (β → δ)) (f : Stream' (α → β)) (s : Stream' α) :
    pure comp ⊛ g ⊛ f ⊛ s = g ⊛ (f ⊛ s)

{α : Type u}
{β : Type v}
{δ : Type w}
(g : Stream' (β → δ))
(f : Stream' (α → β))
(s : Stream' α)

Stream'.pure Function.comp ⊛ g ⊛ f ⊛ s = g ⊛ (f ⊛ s)


theorem mk_symm (e : Pretrivialization F (π F E)) {b : B} (hb : b ∈ e.baseSet) (y : F) :
    TotalSpace.mk b (e.symm b y) = e.toPartialEquiv.symm (b, y)

(e : Pretrivialization F Bundle.TotalSpace.proj)

{ proj := b, snd := e.symm b y } = ↑e.symm (b, y)


@[to_additive addOrderOf_smul_dvd]
theorem orderOf_pow_dvd (n : ℕ) : orderOf (x ^ n) ∣ orderOf x

{G : Type u_1}
[AddMonoid G]
{x : G}
(n : ℕ)


lemma scottHausdorff_le_isLawson : scottHausdorff α ≤ L

{α : Type u_1}
[Preorder α]
(L : TopologicalSpace α)
[Topology.IsLawson α]


theorem inverse_mul_cancel_right (x y : M₀) (h : IsUnit x) : y * inverse x * x = y

{M₀ : Type u_2}
[MonoidWithZero M₀]
(x y : M₀)
(h : IsUnit x)


protected theorem le_of_lt : ∀ {x y : Bool}, x < y → x ≤ y


/-- A dilation is a map that uniformly scales the edistance between any two points. -/
structure Dilation where
  toFun : α → β
  edist_eq' : ∃ r : ℝ≥0, r ≠ 0 ∧ ∀ x y : α, edist (toFun x) (toFun y) = r * edist x y

{α : Type u_1}
{β : Type u_2}
[PseudoEMetricSpace α]
[PseudoEMetricSpace β]
(self : α →ᵈ β)

∃ r, r ≠ 0 ∧ ∀ (x y : α), edist (self.toFun x) (self.toFun y) = ↑r * edist x y


@[simp] lemma coe_ofNat (n : ℕ) [n.AtLeastTwo] :
    (no_index (OfNat.ofNat n : α) : WithBot α) = OfNat.ofNat n

{α : Type u}
[AddMonoidWithOne α]
(n : ℕ)
[n.AtLeastTwo]


theorem regularity (x : ZFSet.{u}) (h : x ≠ ∅) : ∃ y ∈ x, x ∩ y = ∅


@[simp]
theorem gcd_add_mul_right_right (m n k : ℕ) : gcd m (n + k * m) = gcd m n


@[simp]
theorem sum_single (f : k[G]) : f.sum single = f

{k : Type u₁}
{G : Type u₂}
[Semiring k]
(f : AddMonoidAlgebra k G)

Finsupp.sum f AddMonoidAlgebra.single = f


theorem isNilpotent_toEnd_of_isNilpotent₂ [IsNilpotent R L M] (x y : L) :
    _root_.IsNilpotent (toEnd R L M x ∘ₗ toEnd R L M y)

(R : Type u)
(L : Type v)
(M : Type w)
[CommRing R]
[LieRing L]
[LieAlgebra R L]
[AddCommGroup M]
[Module R M]
[LieRingModule L M]
[LieModule R L M]
[LieModule.IsNilpotent R L M]
(x y : L)

IsNilpotent ((LieModule.toEnd R L M) x ∘ₗ (LieModule.toEnd R L M) y)


theorem Commute.mul_neg_geom_sum₂ [Ring α] {x y : α} (h : Commute x y) (n : ℕ) :
    ((y - x) * ∑ i ∈ range n, x ^ i * y ^ (n - 1 - i)) = y ^ n - x ^ n

{α : Type u}
[Ring α]
{x y : α}
(h : Commute x y)
(n : ℕ)

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


@[simp]
theorem coe_sup [FaithfulSMul M X] (P Q : { P : M // IsLprojection X P }) :
    ↑(P ⊔ Q) = (↑P : M) + ↑Q - ↑P * ↑Q

{X : Type u_1}
[NormedAddCommGroup X]
{M : Type u_2}
[Ring M]
[Module M X]
[FaithfulSMul M X]
(P Q : { P // IsLprojection X P })


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

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

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


@[simp] theorem restrict_indep_iff : (M ↾ R).Indep I ↔ M.Indep I ∧ I ⊆ R

{α : Type u_1}
{M : Matroid α}
{R I : Set α}

(M.restrict R).Indep I ↔ M.Indep I ∧ I ⊆ R


@[simp]
theorem log_abs (x : ℝ) : log |x| = log x


theorem isSeparator_iff_faithful_preadditiveCoyoneda (G : C) :
    IsSeparator G ↔ (preadditiveCoyoneda.obj (op G)).Faithful

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

CategoryTheory.IsSeparator G ↔ (CategoryTheory.preadditiveCoyoneda.obj (Opposite.op G)).Faithful


@[to_additive]
theorem map_mono {f : G →* N} {K K' : Subgroup G} : K ≤ K' → map f K ≤ map f K'

{G : Type u_1}
[AddGroup G]
{N : Type u_5}
[AddGroup N]
{f : G →+ N}
{K K' : AddSubgroup G}

K ≤ K' → AddSubgroup.map f K ≤ AddSubgroup.map f K'


@[to_additive]
nonrec theorem Smooth.div_const (hf : Smooth I' I f) : Smooth I' I (fun x ↦ f x / c)

{𝕜 : 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}
[DivInvMonoid G]
[TopologicalSpace G]
[ChartedSpace H 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 : M → G}
(c : G)
(hf : Smooth I' I f)


/-- The **sum of the angles of a triangle** (possibly degenerate, where the
given vertex is distinct from the others), angle-at-point. -/
theorem angle_add_angle_add_angle_eq_pi {p1 p2 p3 : P} (h2 : p2 ≠ p1) (h3 : p3 ≠ p1) :
    ∠ p1 p2 p3 + ∠ p2 p3 p1 + ∠ p3 p1 p2 = π

{V : Type u_1}
{P : Type u_2}
[NormedAddCommGroup V]
[InnerProductSpace ℝ V]
[MetricSpace P]
[NormedAddTorsor V P]
{p1 p2 p3 : P}
(h2 : p2 ≠ p1)
(h3 : p3 ≠ p1)

EuclideanGeometry.angle p1 p2 p3 + EuclideanGeometry.angle p2 p3 p1 + EuclideanGeometry.angle p3 p1 p2 = π


theorem opNorm_mulLeftRight_le :
    ‖mulLeftRight 𝕜 𝕜'‖ ≤ 1

(𝕜 : Type u_1)
[NontriviallyNormedField 𝕜]
(𝕜' : Type u_3)
[NonUnitalSeminormedRing 𝕜']
[NormedSpace 𝕜 𝕜']
[IsScalarTower 𝕜 𝕜' 𝕜']
[SMulCommClass 𝕜 𝕜' 𝕜']

‖ContinuousLinearMap.mulLeftRight 𝕜 𝕜'‖ ≤ 1


@[mono]
theorem prod_mono : s₁ ≤ s₂ → t₁ ≤ t₂ → s₁ ×ˢ t₁ ≤ s₂ ×ˢ t₂

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

s₁ ≤ s₂ → t₁ ≤ t₂ → s₁ ×ˢ t₁ ≤ s₂ ×ˢ t₂


theorem ext {C₁ C₂ : HomologicalComplex V c} (h_X : C₁.X = C₂.X)
    (h_d :
      ∀ i j : ι,
        c.Rel i j → C₁.d i j ≫ eqToHom (congr_fun h_X j) = eqToHom (congr_fun h_X i) ≫ C₂.d i j) :
    C₁ = C₂

(h_d : ∀ (i j : ι), c.Rel i j → C₁.d i j ≫ CategoryTheory.eqToHom ⋯ = CategoryTheory.eqToHom ⋯ ≫ C₂.d i j)


lemma self_add_sub_one : ∀ n, n + (n - 1) = 2 * n - 1


lemma monotone_to_lowerTopology_continuous [TopologicalSpace α] [TopologicalSpace β]
    [Topology.IsLowerSet α] [IsLower β] {f : α → β} (hf : Monotone f) : Continuous f

{α : Type u_1}
{β : Type u_2}
[Preorder α]
[Preorder β]
[TopologicalSpace α]
[TopologicalSpace β]
[Topology.IsLowerSet α]
[Topology.IsLower β]
{f : α → β}
(hf : Monotone f)


theorem cramer_smul (r : α) (A : Matrix n n α) :
    cramer (r • A) = r ^ (Fintype.card n - 1) • cramer A

{n : Type v}
{α : Type w}
[DecidableEq n]
[Fintype n]
[CommRing α]
(r : α)
(A : Matrix n n α)

(r • A).cramer = r ^ (Fintype.card n - 1) • A.cramer


@[simp]
theorem expand_X : expand R p X = X ^ p

(Polynomial.expand R p) Polynomial.X = Polynomial.X ^ p


@[simp]
lemma const_eq_id : const [0] [0] 0 = 𝟙 _

(SimplexCategory.mk 0).const (SimplexCategory.mk 0) 0 = 𝟙 (SimplexCategory.mk 0)


@[simp]
theorem DifferentiableAt.div (hc : DifferentiableAt 𝕜 c x) (hd : DifferentiableAt 𝕜 d x)
    (hx : d x ≠ 0) : DifferentiableAt 𝕜 (fun x => c x / d x) x

{𝕜 : Type u}
[NontriviallyNormedField 𝕜]
{x : 𝕜}
{𝕜' : Type u_1}
[NontriviallyNormedField 𝕜']
[NormedAlgebra 𝕜 𝕜']
{c d : 𝕜 → 𝕜'}
(hc : DifferentiableAt 𝕜 c x)
(hd : DifferentiableAt 𝕜 d x)
(hx : d x ≠ 0)


theorem mapIdxM_eq_mmap_enum [LawfulMonad m] {β} (f : ℕ → α → m β) (as : List α) :
    as.mapIdxM f = List.traverse (uncurry f) (enum as)

{α : Type u}
{m : Type u → Type v}
[Monad m]
[LawfulMonad m]
{β : Type u}
(f : ℕ → α → m β)
(as : List α)

as.mapIdxM f = List.traverse (Function.uncurry f) as.enum


/-- Construct a pseudofunctor from a lax functor whose `mapId` and `mapComp` are isomorphisms. -/
@[simps]
def mkOfLax (F : LaxFunctor B C) (F' : F.PseudoCore) : Pseudofunctor B C

{B : Type u₁}
[CategoryTheory.Bicategory B]
{C : Type u₂}
[CategoryTheory.Bicategory C]
(F : CategoryTheory.LaxFunctor B C)
(F' : F.PseudoCore)
(a : B)

(CategoryTheory.Pseudofunctor.mkOfLax F F').mapId a = F'.mapIdIso a


@[to_additive]
theorem mulSupport_binop_subset (op : M → N → P) (op1 : op 1 1 = 1) (f : α → M) (g : α → N) :
    (mulSupport fun x => op (f x) (g x)) ⊆ mulSupport f ∪ mulSupport g

{α : Type u_1}
{M : Type u_5}
{N : Type u_7}
{P : Type u_8}
[Zero M]
[Zero N]
[Zero P]
(op : M → N → P)
(op1 : op 0 0 = 0)
(f : α → M)
(g : α → N)

(Function.support fun x => op (f x) (g x)) ⊆ Function.support f ∪ Function.support g


lemma toClass_eq_zero (P : W.Point) : toClass P = 0 ↔ P = 0

{F : Type u}
[Field F]
{W : WeierstrassCurve.Affine F}
(P : W.Point)

WeierstrassCurve.Affine.Point.toClass P = 0 ↔ P = 0


theorem symm_apply_of_not_mem (e : Trivialization F (π F E)) {b : B} (hb : b ∉ e.baseSet) (y : F) :
    e.symm b y = 0

[TopologicalSpace (Bundle.TotalSpace F E)]

(e : Trivialization F Bundle.TotalSpace.proj)


/-- Uses `right` co(ntra)variant. -/
@[to_additive (attr := simp) "Uses `right` co(ntra)variant."]
theorem Right.one_le_inv_iff : 1 ≤ a⁻¹ ↔ a ≤ 1

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


lemma isOpen_iff_of_cover {f : α → Set X} (ho : ∀ i, IsOpen (f i)) (hU : (⋃ i, f i) = univ) :
    IsOpen s ↔ ∀ i, IsOpen (f i ∩ s)

{X : Type u}
{α : Type u_1}
{s : Set X}
[TopologicalSpace X]
{f : α → Set X}
(ho : ∀ (i : α), IsOpen (f i))
(hU : ⋃ i, f i = Set.univ)


theorem modEq_mersenne (n k : ℕ) : k ≡ k / 2 ^ n + k % 2 ^ n [MOD 2 ^ n - 1]


theorem lintegral_singleton' {f : α → ℝ≥0∞} (hf : Measurable f) (a : α) :
    ∫⁻ x in {a}, f x ∂μ = f a * μ {a}

{α : Type u_1}
{m : MeasurableSpace α}
{μ : MeasureTheory.Measure α}
{f : α → ℝ≥0∞}
(hf : Measurable f)
(a : α)


theorem map_init (g₁ : PointedMap Λ Λ') (l : List Γ) : (init l).map f₁ g₁ = init (l.map f₁)

{Γ : Type u_1}
[Inhabited Γ]
{Γ' : Type u_2}
[Inhabited Γ']
{Λ : Type u_3}
[Inhabited Λ]
{Λ' : Type u_4}
[Inhabited Λ']
(f₁ : Turing.PointedMap Γ Γ')
(g₁ : Turing.PointedMap Λ Λ')
(l : List Γ)

Turing.TM0.Cfg.map f₁ g₁.f (Turing.TM0.init l) = Turing.TM0.init (List.map f₁.f l)


@[simp] lemma toDual_intCast [IntCast R] (n : ℤ) : toDual (n : R) = n


theorem eq_endpoints_or_mem_Ioo_of_mem_Icc {x : α} (hmem : x ∈ Icc a b) :
    x = a ∨ x = b ∨ x ∈ Ioo a b

{α : Type u_1}
[PartialOrder α]
{a b x : α}
(hmem : x ∈ Set.Icc a b)


@[simp]
theorem derivFamily_zero (f : ι → Ordinal → Ordinal) :
    derivFamily.{u, v} f 0 = nfpFamily.{u, v} f 0

(f : ι → Ordinal.{max u v} → Ordinal.{max u v})

Ordinal.derivFamily f 0 = Ordinal.nfpFamily f 0


theorem Multiset.smul_prod {r : α} {s : Multiset β} : r • s.prod = (s.map (r • ·)).prod

{α : Type u_1}
{β : Type u_2}
[Monoid α]
[CommMonoid β]
[MulDistribMulAction α β]
{r : α}
{s : Multiset β}

r • s.prod = (Multiset.map (fun x => r • x) s).prod


theorem isNat_natAbs_neg : {n : ℤ} → {a : ℕ} → IsInt n (.negOfNat a) → IsNat n.natAbs a

Mathlib.Meta.NormNum.IsInt n (Int.negOfNat a) → Mathlib.Meta.NormNum.IsNat n.natAbs a


theorem Iic_union_Ioc' (h₁ : c < b) : Iic b ∪ Ioc c d = Iic (max b d)

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

Set.Iic b ∪ Set.Ioc c d = Set.Iic (max b d)


@[simp]
theorem mem_toFilter_sets (F : CFilter (Set α) σ) {a : Set α} : a ∈ F.toFilter ↔ ∃ b, F b ⊆ a

{α : Type u_1}
{σ : Type u_3}
(F : CFilter (Set α) σ)
{a : Set α}


/-- A side of a right-angled triangle divided by the sine of the opposite angle equals the
hypotenuse, version subtracting vectors. -/
theorem norm_div_sin_oangle_sub_left_of_oangle_eq_pi_div_two {x y : V}
    (h : o.oangle x y = ↑(π / 2)) : ‖y‖ / Real.Angle.sin (o.oangle (x - y) x) = ‖x - y‖

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

‖y‖ / (o.oangle (x - y) x).sin = ‖x - y‖


@[simp]
theorem AwayMap.lift_eq (hg : IsAddUnit (g x)) (a : A) : F.lift x hg (F.toMap a) = g a

(F : AddSubmonoid.LocalizationMap.AwayMap x B)

(AddSubmonoid.LocalizationMap.AwayMap.lift x F hg) ((AddSubmonoid.LocalizationMap.toMap F) a) = g a


@[simp]
theorem coe_comp (f : BiheytingHom β γ) (g : BiheytingHom α β) : ⇑(f.comp g) = f ∘ g

{α : Type u_2}
{β : Type u_3}
{γ : Type u_4}
[BiheytingAlgebra α]
[BiheytingAlgebra β]
[BiheytingAlgebra γ]
(f : BiheytingHom β γ)
(g : BiheytingHom α β)


@[simp, norm_cast]
theorem coe_dual (s : Interval α) : (dual s : Set αᵒᵈ) = ofDual ⁻¹' s

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

↑(Interval.dual s) = ⇑OrderDual.ofDual ⁻¹' ↑s


/-- The Jacobi symbol is multiplicative in its second argument. -/
theorem mul_right' (a : ℤ) {b₁ b₂ : ℕ} (hb₁ : b₁ ≠ 0) (hb₂ : b₂ ≠ 0) :
    J(a | b₁ * b₂) = J(a | b₁) * J(a | b₂)

jacobiSym a (b₁ * b₂) = jacobiSym a b₁ * jacobiSym a b₂


theorem nndist_le_two_nnnorm (x y : α) : nndist (f x) (f y) ≤ 2 * ‖f‖₊

{α : Type u}
{β : Type v}
[TopologicalSpace α]
[SeminormedAddCommGroup β]
(f : BoundedContinuousFunction α β)
(x y : α)


@[to_additive (attr := simp)]
theorem mul_left_eq_self : a * b = b ↔ a = 1

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


@[to_additive (attr := simp)]
theorem uncurry_mulSingle_mulSingle [DecidableEq α] [∀ a, DecidableEq (β a)] [∀ a b, One (γ a b)]
    (a : α) (b : β a) (x : γ a b) :
    Sigma.uncurry (Pi.mulSingle a (Pi.mulSingle b x)) = Pi.mulSingle (Sigma.mk a b) x

{α : Type u_3}
{β : α → Type u_4}
{γ : (a : α) → β a → Type u_5}
[DecidableEq α]
[(a : α) → DecidableEq (β a)]
[(a : α) → (b : β a) → Zero (γ a b)]
(a : α)
(b : β a)
(x : γ a b)

Sigma.uncurry (Pi.single a (Pi.single b x)) = Pi.single ⟨a, b⟩ x


@[to_additive]
theorem finprod_eq_one_of_forall_eq_one {f : α → M} (h : ∀ x, f x = 1) : ∏ᶠ i, f i = 1

{α : Type u_1}
{M : Type u_5}
[AddCommMonoid M]
{f : α → M}
(h : ∀ (x : α), f x = 0)


@[to_additive]
nonrec theorem Smooth.div_const (hf : Smooth I' I f) : Smooth I' I (fun x ↦ f x / c)

{𝕜 : 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}
[SubNegMonoid G]
[TopologicalSpace G]
[ChartedSpace H G]
[SmoothAdd 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 : M → G}
(c : G)
(hf : Smooth I' I f)


theorem T0Space.of_open_cover (h : ∀ x, ∃ s : Set X, x ∈ s ∧ IsOpen s ∧ T0Space s) : T0Space X

(h : ∀ (x : X), ∃ s, x ∈ s ∧ IsOpen s ∧ T0Space ↑s)


protected theorem mul_max_mul_left (a b c : Nat) : max (a * b) (a * c) = a * max b c


theorem HasBiproduct.mk {F : J → C} (d : LimitBicone F) : HasBiproduct F

(d : CategoryTheory.Limits.LimitBicone F)


theorem _root_.Real.tendsto_toNNReal_atTop : Tendsto Real.toNNReal atTop atTop

Filter.Tendsto Real.toNNReal Filter.atTop Filter.atTop


/-- The image of `stoneCechUnit` is dense. (But `stoneCechUnit` need
  not be an embedding, for example if the original space is not Hausdorff.) -/
theorem denseRange_stoneCechUnit : DenseRange (stoneCechUnit : α → StoneCech α)


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

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

ContMDiffAt I' I n (fun x => f x - g x) x₀


@[simp]
theorem takeI_length : ∀ n l, length (@takeI α _ n l) = n

{α : Type u}
[Inhabited α]
(n : ℕ)
(l : List α)


theorem IsOpen.inter (hs : IsOpen s) (ht : IsOpen t) : IsOpen (s ∩ t)

{X : Type u}
[TopologicalSpace X]
{s t : Set X}
(hs : IsOpen s)
(ht : IsOpen t)


theorem cos_arctan (x : ℝ) : cos (arctan x) = 1 / √(1 + x ^ 2)

Real.cos (Real.arctan x) = 1 / √(1 + x ^ 2)


theorem mem_nhds_iff {x : CofiniteTopology X} {s : Set (CofiniteTopology X)} :
    s ∈ 𝓝 x ↔ x ∈ s ∧ sᶜ.Finite

{X : Type u}
{x : CofiniteTopology X}
{s : Set (CofiniteTopology X)}


/-- The category of sheaves taking values in Type is the same as the category of set-valued sheaves.
-/
@[simps]
def sheafEquivSheafOfTypes : Sheaf J (Type w) ≌ SheafOfTypes J

(J : CategoryTheory.GrothendieckTopology C)

((CategoryTheory.sheafEquivSheafOfTypes J).functor.obj S).val = S.val


theorem ciSup_le_iff [Nonempty ι] {f : ι → α} {a : α} (hf : BddAbove (range f)) :
    iSup f ≤ a ↔ ∀ i, f i ≤ a

{α : Type u_1}
{ι : Sort u_4}
[ConditionallyCompleteLattice α]
[Nonempty ι]
{f : ι → α}
{a : α}
(hf : BddAbove (Set.range f))


@[simp]
theorem adjoin_X : Algebra.adjoin R ({X} : Set R[X]) = ⊤


@[simp]
theorem toSet_inj {x y : ZFSet} : x.toSet = y.toSet ↔ x = y


theorem InjOn.image_eq_image_iff (h : s.InjOn f) (h₁ : s₁ ⊆ s) (h₂ : s₂ ⊆ s) :
    f '' s₁ = f '' s₂ ↔ s₁ = s₂

{α : Type u_1}
{β : Type u_2}
{s s₁ s₂ : Set α}
{f : α → β}
(h : Set.InjOn f s)
(h₁ : s₁ ⊆ s)
(h₂ : s₂ ⊆ s)


theorem divInt_mul_right {a : Int} (a0 : a ≠ 0) : (n * a) /. (d * a) = n /. d


/-- If g(t)=t^c for all roots of unity, then c=χ(g). -/
theorem toFun_unique (g : L ≃+* L) (c : ZMod (Fintype.card (rootsOfUnity n L)))
    (hc : ∀ t : rootsOfUnity n L, g (t : Lˣ) = (t ^ c.val : Lˣ)) : c = χ₀ n g

(c : ZMod (Fintype.card ↥(rootsOfUnity n L)))

(hc : ∀ (t : ↥(rootsOfUnity n L)), g ↑↑t = ↑(↑t ^ c.val))

c = ModularCyclotomicCharacter.toFun n g


theorem isIntegral_of_noetherian (_ : IsNoetherian R B) (x : B) : IsIntegral R x

{R : Type u_1}
{B : Type u_3}
[CommRing R]
[Ring B]
[Algebra R B]

IsNoetherian R B → ∀ (x : B), IsIntegral R x


/-- If a globally contracting map `f` has two complete forward-invariant sets `s`, `t`,
and `x ∈ s` is at a finite distance from `y ∈ t`, then the `efixedPoint'` constructed by `x`
is the same as the `efixedPoint'` constructed by `y`.

This lemma takes additional arguments stating that `f` contracts on `s` and `t` because this way
it can be used to prove the desired equality with non-trivial proofs of these facts. -/
theorem efixedPoint_eq_of_edist_lt_top' (hf : ContractingWith K f) {s : Set α} (hsc : IsComplete s)
    (hsf : MapsTo f s s) (hfs : ContractingWith K <| hsf.restrict f s s) {x : α} (hxs : x ∈ s)
    (hx : edist x (f x) ≠ ∞) {t : Set α} (htc : IsComplete t) (htf : MapsTo f t t)
    (hft : ContractingWith K <| htf.restrict f t t) {y : α} (hyt : y ∈ t) (hy : edist y (f y) ≠ ∞)
    (hxy : edist x y ≠ ∞) :
    efixedPoint' f hsc hsf hfs x hxs hx = efixedPoint' f htc htf hft y hyt hy

(hfs : ContractingWith K (Set.MapsTo.restrict f s s hsf))

(hft : ContractingWith K (Set.MapsTo.restrict f t t htf))

ContractingWith.efixedPoint' f hsc hsf hfs x hxs hx = ContractingWith.efixedPoint' f htc htf hft y hyt hy


@[simp]
theorem roots_C (x : R) : (C x).roots = 0

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


@[simp, reassoc]
theorem pullbackP1Iso_hom_snd (i : 𝒰.J) :
    (pullbackP1Iso 𝒰 f g i).hom ≫ pullback.snd _ _ = pullback.fst _ _ ≫ p2 𝒰 f g

[∀ (i : 𝒰.J), CategoryTheory.Limits.HasPullback (𝒰.map i ≫ f) g]

(AlgebraicGeometry.Scheme.Pullback.pullbackP1Iso 𝒰 f g i).hom ≫ CategoryTheory.Limits.pullback.snd (𝒰.map i ≫ f) g =
  CategoryTheory.Limits.pullback.fst (AlgebraicGeometry.Scheme.Pullback.p1 𝒰 f g) (𝒰.map i) ≫
    AlgebraicGeometry.Scheme.Pullback.p2 𝒰 f g


@[simp]
theorem ofFinsupp_pow (a) (n : ℕ) : (⟨a ^ n⟩ : R[X]) = ⟨a⟩ ^ n

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

{ toFinsupp := a ^ n } = { toFinsupp := a } ^ n


@[simp] lemma card_pos [Nonempty α] [Finite α] : 0 < Nat.card α


@[to_additive]
theorem subtype_injective : Function.Injective (Subgroup.subtype H)

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


theorem coe_injective : Injective ((↑) : 𝔻 → ℂ)


theorem jacobiSymNat.even_odd₅ (a b c : ℕ) (r : ℤ) (ha : a % 2 = 0) (hb : b % 8 = 5)
    (hc : a / 2 = c) (hr : jacobiSymNat c b = r) : jacobiSymNat a b = -r

(hr : Mathlib.Meta.NormNum.jacobiSymNat c b = r)

Mathlib.Meta.NormNum.jacobiSymNat a b = -r


lemma neg_def (q : ℚ) : -q = -q.num /. q.den


theorem not_small_type : ¬Small.{u} (Type max u v)

¬Small.{u, max (u + 1) (v + 1)} (Type (max u v))


@[simp]
theorem inl_natCast [AddMonoidWithOne R] [AddMonoid M] (n : ℕ) : (inl n : tsze R M) = n

{R : Type u}
{M : Type v}
[AddMonoidWithOne R]
[AddMonoid M]
(n : ℕ)


theorem HasDerivAtFilter.scomp_of_eq (hg : HasDerivAtFilter g₁ g₁' y L')
    (hh : HasDerivAtFilter h h' x L) (hy : y = h x) (hL : Tendsto h L L') :
    HasDerivAtFilter (g₁ ∘ h) (h' • g₁') x L

{𝕜 : Type u}
[NontriviallyNormedField 𝕜]
{F : Type v}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
(x : 𝕜)
{L : Filter 𝕜}
{𝕜' : Type u_1}
[NontriviallyNormedField 𝕜']
[NormedAlgebra 𝕜 𝕜']
[NormedSpace 𝕜' F]
[IsScalarTower 𝕜 𝕜' F]
{h : 𝕜 → 𝕜'}
{h' : 𝕜'}
{g₁ : 𝕜' → F}
{g₁' : F}
{L' : Filter 𝕜'}
{y : 𝕜'}
(hg : HasDerivAtFilter g₁ g₁' y L')
(hh : HasDerivAtFilter h h' x L)
(hy : y = h x)
(hL : Filter.Tendsto h L L')


/-- **Maximum modulus principle**: if `f : E → F` is complex differentiable in a neighborhood of `c`
and the norm `‖f z‖` has a local maximum at `c`, then `‖f z‖` is locally constant in a neighborhood
of `c`. -/
theorem norm_eventually_eq_of_isLocalMax {f : E → F} {c : E}
    (hd : ∀ᶠ z in 𝓝 c, DifferentiableAt ℂ f z) (hc : IsLocalMax (norm ∘ f) c) :
    ∀ᶠ y in 𝓝 c, ‖f y‖ = ‖f c‖

(hd : ∀ᶠ (z : E) in 𝓝 c, DifferentiableAt ℂ f z)


theorem ae_lt_of_lt_essInf (hx : x < essInf f μ)
    (hf : IsBoundedUnder (· ≥ ·) (ae μ) f := by isBoundedDefault) :
    ∀ᵐ y ∂μ, x < f y

(hf : Filter.IsBoundedUnder (fun x x_1 => x ≥ x_1) (MeasureTheory.ae μ) f := by isBoundedDefault)


lemma egauge_ball_one_le_of_one_lt_norm (hc : 1 < ‖c‖) (x : E) :
    egauge 𝕜 (ball 0 1) x ≤ ‖c‖₊ * ‖x‖₊

{𝕜 : Type u_1}
[NormedField 𝕜]
{E : Type u_3}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{c : 𝕜}
(hc : 1 < ‖c‖)
(x : E)

egauge 𝕜 (Metric.ball 0 1) x ≤ ↑‖c‖₊ * ↑‖x‖₊


lemma Exact.op (h : S.Exact) : S.op.Exact


@[simp]
theorem valuation_p_pow_mul (n : ℕ) (c : ℤ_[p]) (hc : c ≠ 0) :
    ((p : ℤ_[p]) ^ n * c).valuation = n + c.valuation

{p : ℕ}
[hp : Fact (Nat.Prime p)]
(n : ℕ)
(c : ℤ_[p])
(hc : c ≠ 0)

(↑p ^ n * c).valuation = ↑n + c.valuation


lemma two_pow_mul_factorial_le_factorial_two_mul (n : ℕ) : 2 ^ n * n ! ≤ (2 * n) !


/-- If `s` is a measurable set, then the outer measure of `t` with respect to the restriction of
the measure to `s` equals the outer measure of `t ∩ s`. This is an alternate version of
`Measure.restrict_apply`, requiring that `s` is measurable instead of `t`. -/
@[simp]
theorem restrict_apply' (hs : MeasurableSet s) : μ.restrict s t = μ (t ∩ s)

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


theorem left_le_pair (a b : ℕ) : a ≤ pair a b


/-- image2 is monotone with respect to `⊆`. -/
theorem image2_subset (hs : s ⊆ s') (ht : t ⊆ t') : image2 f s t ⊆ image2 f s' t'

{α : Type u_1}
{β : Type u_3}
{γ : Type u_5}
{f : α → β → γ}
{s s' : Set α}
{t t' : Set β}
(hs : s ⊆ s')
(ht : t ⊆ t')


theorem mem_skewAdjointMatricesLieSubalgebra_unit_smul (u : Rˣ) (J A : Matrix n n R) :
    A ∈ skewAdjointMatricesLieSubalgebra (u • J) ↔ A ∈ skewAdjointMatricesLieSubalgebra J

{R : Type u}
{n : Type w}
[CommRing R]
[DecidableEq n]
[Fintype n]
(u : Rˣ)
(J A : Matrix n n R)


theorem exists_nat_mul_gt (ha : a ≠ 0) (hb : b ≠ ∞) : ∃ n : ℕ, b < n * a

{a b : ENNReal}
(ha : a ≠ 0)
(hb : b ≠ ⊤)


@[to_additive]
protected theorem NeBot.le_one_iff (h : f.NeBot) : f ≤ 1 ↔ f = 1

{α : Type u_2}
[Zero α]
{f : Filter α}
(h : f.NeBot)


/-- The canonical isomorphism `Triangle.shiftFunctor C 0 ≅ 𝟭 (Triangle C)`. -/
@[simps!]
noncomputable def Triangle.shiftFunctorZero : Triangle.shiftFunctor C 0 ≅ 𝟭 _

(X : CategoryTheory.Pretriangulated.Triangle C)

((CategoryTheory.Pretriangulated.Triangle.shiftFunctorZero C).inv.app X).hom₁ =
  (CategoryTheory.shiftFunctorZero C ℤ).inv.app X.obj₁


/-- The product of two strictly monotone functions is strictly monotone. -/
@[to_additive add "The sum of two strictly monotone functions is strictly monotone."]
theorem StrictMonoOn.mul' [CovariantClass α α (· * ·) (· < ·)]
    [CovariantClass α α (swap (· * ·)) (· < ·)] (hf : StrictMonoOn f s) (hg : StrictMonoOn g s) :
    StrictMonoOn (fun x => f x * g x) s

[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]


@[simp]
theorem toSubalgebra_subtype : S.toSubalgebra.val = S.subtype.toAlgHom

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


theorem Memℒp.integral_indicator_norm_ge_nonneg_le (hf : Memℒp f 1 μ) {ε : ℝ} (hε : 0 < ε) :
    ∃ M : ℝ, 0 ≤ M ∧ (∫⁻ x, ‖{ x | M ≤ ‖f x‖₊ }.indicator f x‖₊ ∂μ) ≤ ENNReal.ofReal ε

{α : Type u_1}
{β : Type u_2}
{m : MeasurableSpace α}
{μ : MeasureTheory.Measure α}
[NormedAddCommGroup β]
{f : α → β}
(hf : MeasureTheory.Memℒp f 1 μ)
{ε : ℝ}
(hε : 0 < ε)

∃ M, 0 ≤ M ∧ ∫⁻ (x : α), ↑‖{x | M ≤ ↑‖f x‖₊}.indicator f x‖₊ ∂μ ≤ ENNReal.ofReal ε


theorem mem_trivialization_at_source (b : B) (x : E b) :
    ⟨b, x⟩ ∈ (a.pretrivializationAt b).source

{R : Type u_1}
{B : Type u_2}
{F : Type u_3}
{E : B → Type u_4}
[NontriviallyNormedField R]
[(x : B) → AddCommMonoid (E x)]
[(x : B) → Module R (E x)]
[NormedAddCommGroup F]
[NormedSpace R F]
[TopologicalSpace B]
[(x : B) → TopologicalSpace (E x)]
(a : VectorPrebundle R F E)
(b : B)
(x : E b)

{ proj := b, snd := x } ∈ (a.pretrivializationAt b).source


theorem toSet_sInter {x : ZFSet.{u}} (h : x.Nonempty) : (⋂₀ x).toSet = ⋂₀ (toSet '' x.toSet)

(⋂₀ x).toSet = ⋂₀ (ZFSet.toSet '' x.toSet)


@[simp] theorem matPolyEquiv_symm_X :
    matPolyEquiv.symm X = diagonal fun _ : n => (X : R[X])

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

matPolyEquiv.symm Polynomial.X = Matrix.diagonal fun x => Polynomial.X


@[simp, norm_cast]
theorem coe_eq_univ {s : Closeds α} : (s : Set α) = univ ↔ s = ⊤

{α : Type u_2}
[TopologicalSpace α]
{s : TopologicalSpace.Closeds α}


lemma disjoint_weightSpaceOf [NoZeroSMulDivisors R M] {x : L} {φ₁ φ₂ : R} (h : φ₁ ≠ φ₂) :
    Disjoint (weightSpaceOf M φ₁ x) (weightSpaceOf M φ₂ x)

(R : Type u_2)
(L : Type u_3)
(M : Type u_4)
[CommRing R]
[LieRing L]
[LieAlgebra R L]
[LieAlgebra.IsNilpotent R L]
[AddCommGroup M]
[Module R M]
[LieRingModule L M]
[LieModule R L M]
[NoZeroSMulDivisors R M]
{x : L}
{φ₁ φ₂ : R}
(h : φ₁ ≠ φ₂)

Disjoint (LieModule.weightSpaceOf M φ₁ x) (LieModule.weightSpaceOf M φ₂ x)


@[simp]
theorem mk_coe' (e : R ≃+* S) (f h₁ h₂ h₃ h₄) :
    (⟨⟨f, ⇑e, h₁, h₂⟩, h₃, h₄⟩ : S ≃+* R) = e.symm

(h₃ :
  ∀ (x y : S),
    { toFun := f, invFun := ⇑e, left_inv := h₁, right_inv := h₂ }.toFun (x * y) =
      { toFun := f, invFun := ⇑e, left_inv := h₁, right_inv := h₂ }.toFun x *
        { toFun := f, invFun := ⇑e, left_inv := h₁, right_inv := h₂ }.toFun y)

(h₄ :
  ∀ (x y : S),
    { toFun := f, invFun := ⇑e, left_inv := h₁, right_inv := h₂ }.toFun (x + y) =
      { toFun := f, invFun := ⇑e, left_inv := h₁, right_inv := h₂ }.toFun x +
        { toFun := f, invFun := ⇑e, left_inv := h₁, right_inv := h₂ }.toFun y)

{ toFun := f, invFun := ⇑e, left_inv := h₁, right_inv := h₂, map_mul' := h₃, map_add' := h₄ } = e.symm


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

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

(HomologicalComplex.HomologySequence.snakeInput hS i j hij).v₂₃ =
  S.mapNatTrans (HomologicalComplex.natTransHomologyπ C c j)


theorem upperSemicontinuous_iff_IsClosed_hypograph {f : α → γ} :
    UpperSemicontinuous f ↔ IsClosed {p : α × γ | p.2 ≤ f p.1}

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

UpperSemicontinuous f ↔ IsClosed {p | p.2 ≤ f p.1}


@[to_additive (attr := simp)]
lemma Submonoid.ofUnits_units_le (S : Submonoid M) : S.units.ofUnits ≤ S

{M : Type u_1}
[AddMonoid M]
(S : AddSubmonoid M)


theorem log2_le_self (n : Nat) : Nat.log2 n ≤ n


theorem isCoatom_iff' [OrderTop α] [OrderTop β] [IsCoatomic β] {l : α → β} {u : β → α}
    (gi : GaloisCoinsertion l u) (htop : l ⊤ = ⊤) (h_coatom : ∀ b, IsCoatom b → l (u b) = b)
    (a : α) : IsCoatom (l a) ↔ IsCoatom a

(h_coatom : ∀ (b : β), IsCoatom b → l (u b) = b)


theorem norm_int_le_pow_iff_dvd {k : ℤ} {n : ℕ} :
    ‖(k : ℤ_[p])‖ ≤ (p : ℝ) ^ (-n : ℤ) ↔ (p ^ n : ℤ) ∣ k

{p : ℕ}
[hp : Fact (Nat.Prime p)]
{k : ℤ}
{n : ℕ}


/-- The central binomial coefficient is the largest binomial coefficient.
-/
theorem choose_le_centralBinom (r n : ℕ) : choose (2 * n) r ≤ centralBinom n


theorem KaehlerDifferential.map_compDer :
    (KaehlerDifferential.map R S A B).compDer (KaehlerDifferential.D R A) =
      ((KaehlerDifferential.D S B).restrictScalars R).compAlgebraMap A

(R : Type u)
(S : Type v)
[CommRing R]
[CommRing S]
[Algebra R S]
(A : Type u_2)
(B : Type u_3)
[CommRing A]
[CommRing B]
[Algebra R A]
[Algebra R B]
[Algebra A B]
[Algebra S B]
[IsScalarTower R A B]
[IsScalarTower R S B]
[SMulCommClass S A B]

(KaehlerDifferential.map R S A B).compDer (KaehlerDifferential.D R A) =
  Derivation.compAlgebraMap A (Derivation.restrictScalars R (KaehlerDifferential.D S B))


theorem xor_self : ∀ (x : Bool), xor x x = false


theorem conjugate_le_conjugate' {a b : R} (hab : a ≤ b) (c : R) :
    c * a * star c ≤ c * b * star c

{R : Type u}
[NonUnitalSemiring R]
[PartialOrder R]
[StarRing R]
[StarOrderedRing R]
{a b : R}
(hab : a ≤ b)
(c : R)


@[simp]
theorem range_zero : range 0 = 0


@[mono]
protected lemma Preconnected.mono  {G G' : SimpleGraph V} (h : G ≤ G') (hG : G.Preconnected) :
    G'.Preconnected

{V : Type u}
{G G' : SimpleGraph V}
(h : G ≤ G')
(hG : G.Preconnected)


@[reassoc]
lemma D₁_D₂ (i₁₂ i₁₂' i₁₂'' : I₁₂) :
    K.D₁ c₁₂ i₁₂ i₁₂' ≫ K.D₂ c₁₂ i₁₂' i₁₂'' = - K.D₂ c₁₂ i₁₂ i₁₂' ≫ K.D₁ c₁₂ i₁₂' i₁₂''

{C : Type u_1}
[CategoryTheory.Category.{u_5, u_1} C]
[CategoryTheory.Preadditive C]
{I₁ : Type u_2}
{I₂ : Type u_3}
{I₁₂ : Type u_4}
{c₁ : ComplexShape I₁}
{c₂ : ComplexShape I₂}
(K : HomologicalComplex₂ C c₁ c₂)
(c₁₂ : ComplexShape I₁₂)
[DecidableEq I₁₂]
[TotalComplexShape c₁ c₂ c₁₂]
[K.HasTotal c₁₂]
(i₁₂ i₁₂' i₁₂'' : I₁₂)

K.D₁ c₁₂ i₁₂ i₁₂' ≫ K.D₂ c₁₂ i₁₂' i₁₂'' = -K.D₂ c₁₂ i₁₂ i₁₂' ≫ K.D₁ c₁₂ i₁₂' i₁₂''


@[to_additive]
theorem Monotone.smul {γ : Type*} [Preorder G] [Preorder P] [Preorder γ] [SMul G P]
    [IsOrderedSMul G P] {f : γ → G} {g : γ → P} (hf : Monotone f) (hg : Monotone g) :
    Monotone fun x => f x • g x

{G : Type u_1}
{P : Type u_2}
{γ : Type u_3}
[Preorder G]
[Preorder P]
[Preorder γ]
[SMul G P]
[IsOrderedSMul G P]
{f : γ → G}
{g : γ → P}
(hf : Monotone f)
(hg : Monotone g)


/-- The functor `(S, F ⋙ G) ⥤ (S, G)`. -/
@[simps!]
def pre (S : D) (F : B ⥤ C) (G : C ⥤ D) : StructuredArrow S (F ⋙ G) ⥤ StructuredArrow S G

(X : CategoryTheory.Comma (CategoryTheory.Functor.fromPUnit S) (F.comp G))

((CategoryTheory.StructuredArrow.pre S F G).obj X).hom = X.hom


@[trans]
theorem SemanticallyEquivalent.trans {φ ψ θ : L.BoundedFormula α n}
    (h1 : T.SemanticallyEquivalent φ ψ) (h2 : T.SemanticallyEquivalent ψ θ) :
    T.SemanticallyEquivalent φ θ

{L : FirstOrder.Language}
{T : L.Theory}
{α : Type w}
{n : ℕ}
{φ ψ θ : L.BoundedFormula α n}
(h1 : T.SemanticallyEquivalent φ ψ)
(h2 : T.SemanticallyEquivalent ψ θ)


@[to_additive]
theorem eq_mk'_iff_mul_eq {x} {y : S} {z} : z = f.mk' x y ↔ z * f.toMap y = f.toMap x

{M : Type u_1}
[CommMonoid M]
{S : Submonoid M}
{N : Type u_2}
[CommMonoid N]
(f : S.LocalizationMap N)
{x : M}
{y : ↥S}
{z : N}

z = f.mk' x y ↔ z * f.toMap ↑y = f.toMap x


lemma cfcₙ_star : cfcₙ (fun x ↦ star (f x)) a = star (cfcₙ f a)

cfcₙ (fun x => star (f x)) a = star (cfcₙ f a)


@[simp]
theorem preimage_Icc {a b : α} (hb : 0 ≤ b) :
    (Nat.cast : ℕ → α) ⁻¹' Set.Icc a b = Set.Icc ⌈a⌉₊ ⌊b⌋₊

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

Nat.cast ⁻¹' Set.Icc a b = Set.Icc ⌈a⌉₊ ⌊b⌋₊


/-- Updating an element and taking the beginning commute. -/
@[simp]
theorem init_update_castSucc : init (update q (castSucc i) y) = update (init q) i y

{n : ℕ}
{α : Fin (n + 1) → Type u}
(q : (i : Fin (n + 1)) → α i)
(i : Fin n)
(y : α i.castSucc)

Fin.init (Function.update q i.castSucc y) = Function.update (Fin.init q) i y


/-- The pushforward of an open cover along an isomorphism. -/
@[simps! J obj map]
def OpenCover.pushforwardIso {X Y : Scheme.{u}} (𝒰 : OpenCover.{v} X) (f : X ⟶ Y) [IsIso f] :
    OpenCover.{v} Y

{X Y : AlgebraicGeometry.Scheme}
(𝒰 : X.OpenCover)
(f : X ⟶ Y)
[CategoryTheory.IsIso f]


theorem isCoprime_one_right : IsCoprime x 1


@[simp] lemma num_ofNat (n : ℕ) [n.AtLeastTwo] : num (no_index (OfNat.ofNat n)) = OfNat.ofNat n


theorem isKernelCompMono_lift {c : KernelFork f} (i : IsLimit c) {Z} (g : Y ⟶ Z) [hg : Mono g]
    {h : X ⟶ Z} (hh : h = f ≫ g) (s : KernelFork h) :
    (isKernelCompMono i g hh).lift s = i.lift (Fork.ofι s.ι (by
      rw [← cancel_mono g, Category.assoc, ← hh]
      simp))

{c : CategoryTheory.Limits.KernelFork f}

(s : CategoryTheory.Limits.KernelFork h)

(CategoryTheory.Limits.isKernelCompMono i g hh).lift s =
  i.lift (CategoryTheory.Limits.Fork.ofι (CategoryTheory.Limits.Fork.ι s) ⋯)


theorem Specializes.antisymm (h₁ : x ⤳ y) (h₂ : y ⤳ x) : x ~ᵢ y

{X : Type u_1}
[TopologicalSpace X]
{x y : X}
(h₁ : x ⤳ y)
(h₂ : y ⤳ x)


theorem nhds_zero_basis : (𝓝 (0 : ℝ≥0)).HasBasis (fun a : ℝ≥0 => 0 < a) fun a => Iio a

(𝓝 0).HasBasis (fun a => 0 < a) fun a => Set.Iio a


@[simp] lemma δ_neg (z : Cochain F G n) : δ n m (-z) = - δ n m z

(z : CochainComplex.HomComplex.Cochain F G n)

CochainComplex.HomComplex.δ n m (-z) = -CochainComplex.HomComplex.δ n m z


theorem Perm.map (f : α → β) {l₁ l₂ : List α} (p : l₁ ~ l₂) : map f l₁ ~ map f l₂

{α : Type u_1}
{β : Type u_2}
(f : α → β)
{l₁ l₂ : List α}
(p : l₁ ~ l₂)


theorem basis_nhds {p : ι → Prop} {s : ι → Set Y} (hf : Inducing f) {x : X}
    (h_basis : (𝓝 (f x)).HasBasis p s) : (𝓝 x).HasBasis p (preimage f ∘ s)

{X : Type u_1}
{Y : Type u_2}
{ι : Type u_4}
{f : X → Y}
[TopologicalSpace X]
[TopologicalSpace Y]
{p : ι → Prop}
{s : ι → Set Y}
(hf : Inducing f)
{x : X}
(h_basis : (𝓝 (f x)).HasBasis p s)


/-- The natural floor of the real square root is the same as the natural square root. -/
@[simp]
theorem nat_floor_real_sqrt_eq_nat_sqrt {a : ℕ} : ⌊√(a : ℝ)⌋₊ = Nat.sqrt a


theorem toList_push (x : α) (l : DList α) : toList (push l x) = toList l ++ [x]

{α : Type u}
(x : α)
(l : Batteries.DList α)


/-- This is slightly more general than `IsAlgebraic.algebraMap` in that it
  allows noncommutative intermediate rings `A`. -/
protected theorem IsAlgebraic.algHom (f : A →ₐ[R] B) {a : A}
    (h : IsAlgebraic R a) : IsAlgebraic R (f a)

{R : Type u}
{A : Type v}
[CommRing R]
[Ring A]
[Algebra R A]
{B : Type u_2}
[Ring B]
[Algebra R B]
(f : A →ₐ[R] B)
{a : A}
(h : IsAlgebraic R a)


/-- The categories of cones over `F` and `G` are equivalent if `F` and `G` are naturally isomorphic
(possibly after changing the indexing category by an equivalence).
-/
@[simps! functor inverse unitIso counitIso]
def equivalenceOfReindexing {G : K ⥤ C} (e : K ≌ J) (α : e.functor ⋙ F ≅ G) : Cone F ≌ Cone G

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

(CategoryTheory.Limits.Cones.equivalenceOfReindexing e α).functor =
  CategoryTheory.Limits.Cones.whiskering e.functor ⋙ CategoryTheory.Limits.Cones.postcompose α.hom


lemma directedOn_ge_Ico (a b : α) : DirectedOn (· ≥ ·) (Ico a b)

DirectedOn (fun x x_1 => x ≥ x_1) (Set.Ico a b)


@[simp]
theorem realize_relabel {φ : L.Formula α} {g : α → β} {v : β → M} :
    (φ.relabel g).Realize v ↔ φ.Realize (v ∘ g)

{L : FirstOrder.Language}
{M : Type w}
[L.Structure M]
{α : Type u'}
{β : Type v'}
{φ : L.Formula α}
{g : α → β}
{v : β → M}

(FirstOrder.Language.Formula.relabel g φ).Realize v ↔ φ.Realize (v ∘ g)


/-- If a stochastic process has bounded upcrossing from below `a` to above `b`,
then it does not frequently visit both below `a` and above `b`. -/
theorem not_frequently_of_upcrossings_lt_top (hab : a < b) (hω : upcrossings a b f ω ≠ ∞) :
    ¬((∃ᶠ n in atTop, f n ω < a) ∧ ∃ᶠ n in atTop, b < f n ω)

{f : ℕ → Ω → ℝ}

(hω : MeasureTheory.upcrossings a b f ω ≠ ⊤)

¬((∃ᶠ (n : ℕ) in Filter.atTop, f n ω < a) ∧ ∃ᶠ (n : ℕ) in Filter.atTop, b < f n ω)


theorem isPrimePow_pow_iff {n k : ℕ} (hk : k ≠ 0) : IsPrimePow (n ^ k) ↔ IsPrimePow n


theorem univ_id : univ.{u, u + 1} = @type Ordinal (· < ·) _

Ordinal.univ.{u, u + 1} = Ordinal.type fun x x_1 => x < x_1


lemma chainLength_nsmul {x} (hx : x ∈ rootSpace H (chainTop α β)) :
    chainLength α β • x = ⁅coroot α, x⁆

(hx : x ∈ LieAlgebra.rootSpace H ⇑(LieModule.chainTop (⇑α) β))

LieAlgebra.IsKilling.chainLength α β • x = ⁅LieAlgebra.IsKilling.coroot α, x⁆


/-- If a set of points in projective space is contained in a subspace, and that subspace is
contained in the span of the set of points, then the span of the set of points is equal to
the subspace. -/
theorem span_eq_of_le {S : Set (ℙ K V)} {W : Subspace K V} (hS : S ⊆ W) (hW : W ≤ span S) :
    span S = W

(hW : W ≤ Projectivization.Subspace.span S)


@[simp]
theorem mk_re (z : ℂ) (h : 0 < z.im) : (mk z h).re = z.re


@[elab_as_elim]
protected theorem strong_induction_on {p : Nat → Prop} (n : Nat)
    (h : ∀ n, (∀ m, m < n → p m) → p n) : p n

(h : ∀ (n : ℕ), (∀ (m : ℕ), m < n → p m) → p n)


@[simp, norm_cast] lemma ofReal_nnratCast (q : ℚ≥0) : ofReal' q = q


theorem MonotoneOn.convex_ge (hf : MonotoneOn f s) (hs : Convex 𝕜 s) (r : β) :
    Convex 𝕜 ({ x ∈ s | r ≤ f x })

{𝕜 : Type u_1}
{E : Type u_2}
{β : Type u_4}
[OrderedSemiring 𝕜]
[LinearOrderedAddCommMonoid E]
[OrderedAddCommMonoid β]
[Module 𝕜 E]
[OrderedSMul 𝕜 E]
{s : Set E}
{f : E → β}
(hf : MonotoneOn f s)
(hs : Convex 𝕜 s)
(r : β)


@[simp]
theorem re_fst_dualNumberEquiv (q : Quaternion (DualNumber R)) :
    (dualNumberEquiv q).fst.re = q.re.fst

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

(TrivSqZeroExt.fst (Quaternion.dualNumberEquiv q)).re = TrivSqZeroExt.fst q.re


/-- A relation homomorphism with respect to a given pair of relations `r` and `s`
is a function `f : α → β` such that `r a b → s (f a) (f b)`. -/
structure RelHom {α β : Type*} (r : α → α → Prop) (s : β → β → Prop) where
  /-- The underlying function of a `RelHom` -/
  toFun : α → β
  /-- A `RelHom` sends related elements to related elements -/
  map_rel' : ∀ {a b}, r a b → s (toFun a) (toFun b)

{α : Type u_5}
{β : Type u_6}
{r : α → α → Prop}
{s : β → β → Prop}
(self : r →r s)
{a b : α}


theorem summable_sigma_of_nonneg {β : α → Type*} {f : (Σ x, β x) → ℝ} (hf : ∀ x, 0 ≤ f x) :
    Summable f ↔ (∀ x, Summable fun y => f ⟨x, y⟩) ∧ Summable fun x => ∑' y, f ⟨x, y⟩

{α : Type u_1}
{β : α → Type u_3}
{f : (x : α) × β x → ℝ}
(hf : ∀ (x : (x : α) × β x), 0 ≤ f x)

Summable f ↔ (∀ (x : α), Summable fun y => f ⟨x, y⟩) ∧ Summable fun x => ∑' (y : β x), f ⟨x, y⟩


theorem sSup_continuous (s : Set <| α →o β) (hs : ∀ f ∈ s, Continuous f) : Continuous (sSup s)

(hs : ∀ f ∈ s, OmegaCompletePartialOrder.Continuous f)


theorem ContDiffAt.real_of_complex {n : ℕ∞} (h : ContDiffAt ℂ n e z) :
    ContDiffAt ℝ n (fun x : ℝ => (e x).re) z

{e : ℂ → ℂ}
{z : ℝ}
{n : ℕ∞}
(h : ContDiffAt ℂ n e ↑z)


/-- A family of continuous functions yields a continuous family of functions. -/
@[simps]
def flip {α : Type*} (f : α → β →𝒄 γ) : β →𝒄 α → γ

{β : Type v}
{γ : Type u_3}
[OmegaCompletePartialOrder β]
[OmegaCompletePartialOrder γ]
{α : Type u_5}
(f : α → β →𝒄 γ)
(x : β)
(y : α)

(OmegaCompletePartialOrder.ContinuousHom.flip f) x y = (f y) x


@[to_additive (attr := simp)] lemma inv_symm_left_iff : SemiconjBy a⁻¹ y x ↔ SemiconjBy a x y


theorem supp_eq_of_isUniform (h : q.IsUniform) {α : Type u} (a : q.P.A) (f : q.P.B a → α) :
    supp (abs ⟨a, f⟩) = f '' univ

{F : Type u → Type u}
[q : QPF F]
(h : QPF.IsUniform)
{α : Type u}
(a : (QPF.P F).A)
(f : (QPF.P F).B a → α)

Functor.supp (QPF.abs ⟨a, f⟩) = f '' Set.univ


lemma fromAffine_zero [Nontrivial R] : fromAffine 0 = (0 : W'.Point)

{R : Type u}
[CommRing R]
{W' : WeierstrassCurve.Jacobian R}
[Nontrivial R]

WeierstrassCurve.Jacobian.Point.fromAffine 0 = 0


theorem contMDiffOn_snd {s : Set (M × N)} : ContMDiffOn (I.prod J) J n Prod.snd s

{𝕜 : 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]
{F : Type u_11}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{G : Type u_12}
[TopologicalSpace G]
{J : ModelWithCorners 𝕜 F G}
{N : Type u_13}
[TopologicalSpace N]
[ChartedSpace G N]
{n : ℕ∞}
{s : Set (M × N)}


theorem gal_X_pow_sub_C_isSolvable_aux (n : ℕ) (a : F)
    (h : (X ^ n - 1 : F[X]).Splits (RingHom.id F)) : IsSolvable (X ^ n - C a).Gal

(h : Polynomial.Splits (RingHom.id F) (Polynomial.X ^ n - 1))

IsSolvable (Polynomial.X ^ n - Polynomial.C a).Gal


lemma leftHomologyMap'_eq : leftHomologyMap' φ h₁ h₂ = γ.φH

(γ : CategoryTheory.ShortComplex.LeftHomologyMapData φ h₁ h₂)

CategoryTheory.ShortComplex.leftHomologyMap' φ h₁ h₂ = γ.φH


protected theorem eq (h : AEDisjoint μ s t) : μ (s ∩ t) = 0

{α : Type u_2}
{m : MeasurableSpace α}
{μ : MeasureTheory.Measure α}
{s t : Set α}
(h : MeasureTheory.AEDisjoint μ s t)


theorem basis'_iff_basis_inter_ground : M.Basis' I X ↔ M.Basis I (X ∩ M.E)

{α : Type u_1}
{M : Matroid α}
{I X : Set α}


theorem getElem_pmap {p : α → Prop} (f : ∀ a, p a → β) {l : List α} (h : ∀ a ∈ l, p a) {n : ℕ}
    (hn : n < (pmap f l h).length) :
    (pmap f l h)[n] =
      f (l[n]'(@length_pmap _ _ p f l h ▸ hn))
        (h _ (getElem_mem l n (@length_pmap _ _ p f l h ▸ hn)))

{α : Type u}
{β : Type v}
{p : α → Prop}
(f : (a : α) → p a → β)
{l : List α}
(h : ∀ (a : α), a ∈ l → p a)
{n : ℕ}
(hn : n < (List.pmap f l h).length)


/-- An Eilenberg-Moore algebra for a monad `T`.
    cf Definition 5.2.3 in [Riehl][riehl2017]. -/
structure Algebra (T : Monad C) : Type max u₁ v₁ where
  /-- The underlying object associated to an algebra. -/
  A : C
  /-- The structure morphism associated to an algebra. -/
  a : (T : C ⥤ C).obj A ⟶ A
  /-- The unit axiom associated to an algebra. -/
  unit : T.η.app A ≫ a = 𝟙 A := by aesop_cat
  /-- The associativity axiom associated to an algebra. -/
  assoc : T.μ.app A ≫ a = (T : C ⥤ C).map a ≫ a := by aesop_cat

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

CategoryTheory.CategoryStruct.comp (T.μ.app self.A) self.a = CategoryTheory.CategoryStruct.comp (T.map self.a) self.a


theorem integral_comp_add_div (hc : c ≠ 0) (d) :
    (∫ x in a..b, f (d + x / c)) = c • ∫ x in d + a / c..d + b / c, f x

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

∫ (x : ℝ) in a..b, f (d + x / c) = c • ∫ (x : ℝ) in d + a / c..d + b / c, f x


@[to_additive]
theorem multipliable_iff_of_multipliable_div (hfg : Multipliable fun b ↦ f b / g b) :
    Multipliable f ↔ Multipliable g

{α : Type u_1}
{β : Type u_2}
[AddCommGroup α]
[TopologicalSpace α]
[TopologicalAddGroup α]
{f g : β → α}
(hfg : Summable fun b => f b - g b)


theorem mem_iff {x : R} : x ∈ selfAdjoint R ↔ star x = x

{R : Type u_1}
[AddGroup R]
[StarAddMonoid R]
{x : R}


@[to_additive]
theorem le_op_iff {S₁ : Submonoid Mᵐᵒᵖ} {S₂ : Submonoid M} : S₁ ≤ S₂.op ↔ S₁.unop ≤ S₂

{M : Type u_2}
[AddZeroClass M]
{S₁ : AddSubmonoid Mᵃᵒᵖ}
{S₂ : AddSubmonoid M}


theorem isNoetherian_of_ker_bot [IsNoetherian R P] (f : M →ₗ[R] P) (hf : LinearMap.ker f = ⊥) :
    IsNoetherian R M

{R : Type u_1}
{M : Type u_2}
{P : Type u_3}
[Ring R]
[AddCommGroup M]
[AddCommGroup P]
[Module R M]
[Module R P]
[IsNoetherian R P]
(f : M →ₗ[R] P)
(hf : LinearMap.ker f = ⊥)


@[simp]
theorem forall₂_eq_eq_eq : Forall₂ ((· = ·) : α → α → Prop) = Eq

(List.Forall₂ fun x x_1 => x = x_1) = Eq


@[simps]
instance refl (X : C) : MonoidalCoherence X X

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


/-- The obvious triangle `X₁ ⟶ X₁ ⊞ X₂ ⟶ X₂ ⟶ X₁⟦1⟧`. -/
@[simps!]
def binaryBiproductTriangle (X₁ X₂ : C) [HasZeroMorphisms C] [HasBinaryBiproduct X₁ X₂] :
    Triangle C

(CategoryTheory.Pretriangulated.binaryBiproductTriangle X₁ X₂).mor₃ = 0


theorem comp_assoc (f : γ →+*o δ) (g : β →+*o γ) (h : α →+*o β) :
    (f.comp g).comp h = f.comp (g.comp h)

{α : Type u_2}
{β : Type u_3}
{γ : Type u_4}
{δ : Type u_5}
[NonAssocSemiring α]
[Preorder α]
[NonAssocSemiring β]
[Preorder β]
[NonAssocSemiring γ]
[Preorder γ]
[NonAssocSemiring δ]
[Preorder δ]
(f : γ →+*o δ)
(g : β →+*o γ)
(h : α →+*o β)


theorem revPosOfAux_eq (s c) : revPosOfAux s c = revFindAux s (· == c)

s.revPosOfAux c = s.revFindAux fun x => x == c


@[to_additive (attr := simp)]
theorem subsingleton_iff : Subsingleton (Submonoid M) ↔ Subsingleton M


@[simp]
theorem coe_eq_zero (l : List α) : (l : Multiset α) = 0 ↔ l = []


/-- In dimension one, `torusIntegral` is the same as `circleIntegral`
(up to the natural equivalence between `ℂ` and `Fin 1 → ℂ`). -/
theorem torusIntegral_dim1 (f : ℂ¹ → E) (c : ℂ¹) (R : ℝ¹) :
    (∯ x in T(c, R), f x) = ∮ z in C(c 0, R 0), f fun _ => z

{E : Type u_1}
[NormedAddCommGroup E]
[NormedSpace ℂ E]
(f : (Fin 1 → ℂ) → E)
(c : Fin 1 → ℂ)
(R : Fin 1 → ℝ)

(∯ (x : Fin 1 → ℂ) in T(c, R), f x) = ∮ (z : ℂ) in C(c 0, R 0), f fun x => z


@[simp] lemma op_hom_leftUnitor (X : C) : (λ_ X).hom.op = (λ_ (op X)).inv

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

(CategoryTheory.MonoidalCategory.leftUnitor X).hom.op = (CategoryTheory.MonoidalCategory.leftUnitor (Opposite.op X)).inv


@[to_additive nsmul_nonpos]
theorem pow_le_one' {a : M} (H : a ≤ 1) (n : ℕ) : a ^ n ≤ 1

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


theorem DifferentiableOn.diffContOnCl (h : DifferentiableOn 𝕜 f (closure s)) : DiffContOnCl 𝕜 f s

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


/-- Here we combine the two inductive steps into a full strong induction proof,
completing the proof the harder direction of **Hall's Marriage Theorem**.
-/
theorem hall_hard_inductive (ht : ∀ s : Finset ι, s.card ≤ (s.biUnion t).card) :
    ∃ f : ι → α, Function.Injective f ∧ ∀ x, f x ∈ t x

(ht : ∀ (s : Finset ι), s.card ≤ (s.biUnion t).card)

∃ f, Function.Injective f ∧ ∀ (x : ι), f x ∈ t x


theorem symm_map_nhds_eq {x} (hx : x ∈ e.source) : map e.symm (𝓝 (e x)) = 𝓝 x

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


@[simp]
theorem empty (v : VectorMeasure α M) : v ∅ = 0

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


theorem byContradiction [dec : Decidable p] (h : ¬p → False) : p

{p : Prop}
[dec : Decidable p]
(h : ¬p → False)


theorem T_add (m n : ℤ) : (T (m + n) : R[T;T⁻¹]) = T m * T n

LaurentPolynomial.T (m + n) = LaurentPolynomial.T m * LaurentPolynomial.T n


lemma stalkMap_germ_apply (U : Opens Y) (x : (Opens.map f.val.base).obj U) (y) :
    f.stalkMap x.val (Y.presheaf.germ ⟨f.val.base x.val, x.property⟩ y) =
      X.presheaf.germ x (f.val.c.app (op U) y)

{X Y : AlgebraicGeometry.LocallyRingedSpace}

(U : TopologicalSpace.Opens ↑Y.toTopCat)

(x : ↥((TopologicalSpace.Opens.map f.val.base).obj U))

(AlgebraicGeometry.LocallyRingedSpace.Hom.stalkMap f ↑x) ((Y.presheaf.germ ⟨f.val.base ↑x, ⋯⟩) y) =
  (X.presheaf.germ x) ((f.val.c.app (Opposite.op U)) y)


theorem sin_sq_pi_over_two_pow (n : ℕ) :
    sin (π / 2 ^ (n + 1)) ^ 2 = 1 - (sqrtTwoAddSeries 0 n / 2) ^ 2

Real.sin (Real.pi / 2 ^ (n + 1)) ^ 2 = 1 - (Real.sqrtTwoAddSeries 0 n / 2) ^ 2


theorem setIntegral_dirac [MeasurableSpace α] [MeasurableSingletonClass α] (f : α → E) (a : α)
    (s : Set α) [Decidable (a ∈ s)] :
    ∫ x in s, f x ∂Measure.dirac a = if a ∈ s then f a else 0

{α : Type u_1}
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace ℝ E]
[hE : CompleteSpace E]
[MeasurableSpace α]
[MeasurableSingletonClass α]
(f : α → E)
(a : α)
(s : Set α)
[Decidable (a ∈ s)]

∫ (x : α) in s, f x ∂MeasureTheory.Measure.dirac a = if a ∈ s then f a else 0


@[ext] theorem Prod.ext : {x y : Prod α β} → x.fst = y.fst → x.snd = y.snd → x = y

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


@[simp]
theorem AlgebraicIndependent.mvPolynomialOptionEquivPolynomialAdjoin_apply
    (hx : AlgebraicIndependent R x) (y) :
    hx.mvPolynomialOptionEquivPolynomialAdjoin y =
      Polynomial.map (hx.aevalEquiv : MvPolynomial ι R →+* adjoin R (range x))
        (aeval (fun o : Option ι => o.elim Polynomial.X fun s : ι => Polynomial.C (X s)) y)

{ι : Type u_1}
{R : Type u_3}
{A : Type u_5}
{x : ι → A}
[CommRing R]
[CommRing A]
[Algebra R A]
(hx : AlgebraicIndependent R x)
(y : MvPolynomial (Option ι) R)

hx.mvPolynomialOptionEquivPolynomialAdjoin y =
  Polynomial.map (↑hx.aevalEquiv)
    ((MvPolynomial.aeval fun o => o.elim Polynomial.X fun s => Polynomial.C (MvPolynomial.X s)) y)


lemma induce_connected_adj_union {v w : V} {s t : Set V}
    (sconn : (G.induce s).Connected) (tconn : (G.induce t).Connected)
    (hv : v ∈ s) (hw : w ∈ t) (ha : G.Adj v w) :
    (G.induce (s ∪ t)).Connected

(sconn : (SimpleGraph.induce s G).Connected)

(tconn : (SimpleGraph.induce t G).Connected)

(SimpleGraph.induce (s ∪ t) G).Connected


lemma toComplex_injective : Function.Injective GaussianInt.toComplex


theorem mem_restrictDegree (p : MvPolynomial σ R) (n : ℕ) :
    p ∈ restrictDegree σ R n ↔ ∀ s ∈ p.support, ∀ i, (s : σ →₀ ℕ) i ≤ n

(σ : Type u)
{R : Type v}
[CommSemiring R]
(p : MvPolynomial σ R)
(n : ℕ)

p ∈ MvPolynomial.restrictDegree σ R n ↔ ∀ s ∈ p.support, ∀ (i : σ), s i ≤ n


theorem uniformSpace_mono [UniformSpace F] [UniformAddGroup F] (h : 𝔖₂ ⊆ 𝔖₁) :
    instUniformSpace σ F 𝔖₁ ≤ instUniformSpace σ F 𝔖₂

{𝕜₁ : Type u_1}
{𝕜₂ : Type u_2}
[NormedField 𝕜₁]
[NormedField 𝕜₂]
(σ : 𝕜₁ →+* 𝕜₂)
{E : Type u_3}
(F : Type u_4)
[AddCommGroup E]
[Module 𝕜₁ E]
[TopologicalSpace E]
[AddCommGroup F]
[Module 𝕜₂ F]
{𝔖₁ 𝔖₂ : Set (Set E)}
[UniformSpace F]
[UniformAddGroup F]
(h : 𝔖₂ ⊆ 𝔖₁)

UniformConvergenceCLM.instUniformSpace σ F 𝔖₁ ≤ UniformConvergenceCLM.instUniformSpace σ F 𝔖₂


theorem mem_annihilator {r} : r ∈ N.annihilator ↔ ∀ n ∈ N, r • n = (0 : M)

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


theorem coe_T_zpow_smul_eq {n : ℤ} : (↑(T ^ n • z) : ℂ) = z + n


theorem le_lift {f : Filter α} {g : Set α → Filter β} {h : Filter β} :
    h ≤ f.lift g ↔ ∀ s ∈ f, h ≤ g s

{α : Type u_1}
{β : Type u_2}
{f : Filter α}
{g : Set α → Filter β}
{h : Filter β}


theorem Ideal.isRadical_iff_quotient_reduced {R : Type*} [CommRing R] (I : Ideal R) :
    I.IsRadical ↔ IsReduced (R ⧸ I)

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


theorem lintegral_tsum [Countable β] {f : β → α → ℝ≥0∞} (hf : ∀ i, AEMeasurable (f i) μ) :
    ∫⁻ a, ∑' i, f i a ∂μ = ∑' i, ∫⁻ a, f i a ∂μ

{α : Type u_1}
{β : Type u_2}
{m : MeasurableSpace α}
{μ : MeasureTheory.Measure α}
[Countable β]
{f : β → α → ℝ≥0∞}
(hf : ∀ (i : β), AEMeasurable (f i) μ)

∫⁻ (a : α), ∑' (i : β), f i a ∂μ = ∑' (i : β), ∫⁻ (a : α), f i a ∂μ


@[simp]
theorem add_tsub_tsub_cancel (h : c ≤ a) : a + b - (a - c) = b + c

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

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


@[simp]
theorem orthogonalProjection_mem_subspace_eq_self {s : AffineSubspace ℝ P} [Nonempty s]
    [HasOrthogonalProjection s.direction] (p : s) : orthogonalProjection s p = p

{V : Type u_1}
{P : Type u_2}
[NormedAddCommGroup V]
[InnerProductSpace ℝ V]
[MetricSpace P]
[NormedAddTorsor V P]
{s : AffineSubspace ℝ P}
[Nonempty ↥s]
[HasOrthogonalProjection s.direction]
(p : ↥s)

(EuclideanGeometry.orthogonalProjection s) ↑p = p


@[to_additive]
theorem Fintype.prod_apply {α : Type*} {β : α → Type*} {γ : Type*} [Fintype γ]
    [∀ a, CommMonoid (β a)] (a : α) (g : γ → ∀ a, β a) : (∏ c, g c) a = ∏ c, g c a

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


theorem initial_iff_initial_comp [Initial F] : Initial G ↔ Initial (F ⋙ G)

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


theorem choose_mul_factorial_mul_factorial : ∀ {n k}, k ≤ n → choose n k * k ! * (n - k)! = n !

k ≤ n → n.choose k * k ! * (n - k)! = n !


@[deprecated get?_eq_get (since := "2023-01-05")]
theorem nthLe_get? {l : List α} {n} (h) : get? l n = some (nthLe l n h)

{α : Type u}
{l : List α}
{n : ℕ}
(h : n < l.length)


theorem le_u {a : α} {b : β} : l a ≤ b → a ≤ u b

{α : Type u}
{β : Type v}
[Preorder α]
[Preorder β]
{l : α → β}
{u : β → α}
(gc : GaloisConnection l u)
{a : α}
{b : β}


@[simp]
theorem measurableSet_preimage (e : α ≃ᵐ β) {s : Set β} :
    MeasurableSet (e ⁻¹' s) ↔ MeasurableSet s

{α : Type u_1}
{β : Type u_2}
[MeasurableSpace α]
[MeasurableSpace β]
(e : α ≃ᵐ β)
{s : Set β}

MeasurableSet (⇑e ⁻¹' s) ↔ MeasurableSet s


theorem mul_left_mono (I : FractionalIdeal S P) : Monotone (I * ·)

{R : Type u_1}
[CommRing R]
{S : Submonoid R}
{P : Type u_2}
[CommRing P]
[Algebra R P]
(I : FractionalIdeal S P)


/-- The equivalence between `TwoP` and itself induced by `Prod.swap` both ways. -/
@[simps!]
noncomputable def swapEquiv : TwoP ≌ TwoP


/-- This lemma is superceded by `unifIntegrable_of` which do not require `C` to be positive. -/
theorem unifIntegrable_of' (hp : 1 ≤ p) (hp' : p ≠ ∞) {f : ι → α → β}
    (hf : ∀ i, StronglyMeasurable (f i))
    (h : ∀ ε : ℝ, 0 < ε → ∃ C : ℝ≥0, 0 < C ∧
      ∀ i, eLpNorm ({ x | C ≤ ‖f i x‖₊ }.indicator (f i)) p μ ≤ ENNReal.ofReal ε) :
    UnifIntegrable f p μ

{f : ι → α → β}

(hf : ∀ (i : ι), MeasureTheory.StronglyMeasurable (f i))

(h :
  ∀ (ε : ℝ),
    0 < ε → ∃ C, 0 < C ∧ ∀ (i : ι), MeasureTheory.eLpNorm ({x | C ≤ ‖f i x‖₊}.indicator (f i)) p μ ≤ ENNReal.ofReal ε)


/-- If a nontrivial additive subgroup of a linear ordered additive commutative group is disjoint
with the interval `Set.Ioo 0 a` for some positive `a`, then the set of positive elements of this
group admits the least element. -/
theorem AddSubgroup.exists_isLeast_pos {H : AddSubgroup G} (hbot : H ≠ ⊥) {a : G} (h₀ : 0 < a)
    (hd : Disjoint (H : Set G) (Ioo 0 a)) : ∃ b, IsLeast { g : G | g ∈ H ∧ 0 < g } b

{G : Type u_1}
[LinearOrderedAddCommGroup G]
[Archimedean G]
{H : AddSubgroup G}
(hbot : H ≠ ⊥)
{a : G}
(h₀ : 0 < a)
(hd : Disjoint (↑H) (Set.Ioo 0 a))


theorem fderiv_deriv : (fderiv 𝕜 f x : 𝕜 → F) 1 = deriv f x

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


theorem Ioo_succ_right_of_not_isMax (hb : ¬IsMax b) : Ioo a (succ b) = Ioc a b

{α : Type u_1}
[Preorder α]
[SuccOrder α]
{a b : α}
(hb : ¬IsMax b)


theorem imp_iff_right {a : Prop} (ha : a) : (a → b) ↔ b


@[symm]
theorem CondIndepSets.symm {s₁ s₂ : Set (Set Ω)}
    (h : CondIndepSets m' hm' s₁ s₂ μ) : CondIndepSets m' hm' s₂ s₁ μ

(h : ProbabilityTheory.CondIndepSets m' hm' s₁ s₂ μ)

ProbabilityTheory.CondIndepSets m' hm' s₂ s₁ μ


@[to_additive IsClosed.right_addCoset]
theorem IsClosed.rightCoset {U : Set G} (h : IsClosed U) (x : G) : IsClosed (op x • U)

{G : Type w}
[TopologicalSpace G]
[AddGroup G]
[ContinuousAdd G]
{U : Set G}
(h : IsClosed U)
(x : G)


/-- Each element of the monoid defines a linear map.

This is a stronger version of `DistribMulAction.toAddMonoidHom`. -/
@[simps]
def toLinearMap (s : S) : M →ₗ[R] M

(R : Type u_1)
{S : Type u_4}
(M : Type u_5)
[Semiring R]
[AddCommMonoid M]
[Module R M]
[Monoid S]
[DistribMulAction S M]
[SMulCommClass S R M]
(s : S)

∀ (a : M), (DistribMulAction.toLinearMap R M s) a = s • a


theorem valuation_nonneg (x : ℤ_[p]) : 0 ≤ x.valuation

{p : ℕ}
[hp : Fact (Nat.Prime p)]
(x : ℤ_[p])


/-- `MulLEAddHomClass F α β` states that `F` is a type of subadditive morphisms. -/
@[to_additive SubadditiveHomClass]
class MulLEAddHomClass (F α β : Type*) [Mul α] [Add β] [LE β] [FunLike F α β] : Prop where
  /-- the image of a product is less or equal than the sum of the images. -/
  map_mul_le_add (f : F) : ∀ a b, f (a * b) ≤ f a + f b

{F : Type u_7}
{α : Type u_8}
{β : Type u_9}
[Mul α]
[Add β]
[LE β]
[FunLike F α β]
[self : MulLEAddHomClass F α β]
(f : F)
(a b : α)


lemma aeval_ne_zero_of_isCoprime [CommSemiring R] [Nontrivial S] [Semiring S] [Algebra R S]
    {p q : R[X]} (h : IsCoprime p q) (s : S) : aeval s p ≠ 0 ∨ aeval s q ≠ 0

{R : Type u}
{S : Type v}
[CommSemiring R]
[Nontrivial S]
[Semiring S]
[Algebra R S]
{p q : R[X]}
(h : IsCoprime p q)
(s : S)

(Polynomial.aeval s) p ≠ 0 ∨ (Polynomial.aeval s) q ≠ 0


/-- A rewrite lemma for `padicValRat p (q⁻¹)` with condition `q ≠ 0`. -/
protected theorem inv (q : ℚ) : padicValRat p q⁻¹ = -padicValRat p q

{p : ℕ}
[hp : Fact (Nat.Prime p)]
(q : ℚ)


theorem open_source' (i : ι) : IsOpen (Z.localTrivAsPartialEquiv i).source

{ι : Type u_1}
{B : Type u_2}
{F : Type u_3}
[TopologicalSpace B]
[TopologicalSpace F]
(Z : FiberBundleCore ι B F)
(i : ι)


theorem finallySmall_of_essentiallySmall [EssentiallySmall.{w} J] : FinallySmall.{w} J

[CategoryTheory.EssentiallySmall.{w, v, u} J]


/-- A measurable set `s` is a *fundamental domain* for an additive action of an additive group `G`
on a measurable space `α` with respect to a measure `α` if the sets `g +ᵥ s`, `g : G`, are pairwise
a.e. disjoint and cover the whole space. -/
structure IsAddFundamentalDomain (G : Type*) {α : Type*} [Zero G] [VAdd G α] [MeasurableSpace α]
    (s : Set α) (μ : Measure α := by volume_tac) : Prop where
  protected nullMeasurableSet : NullMeasurableSet s μ
  protected ae_covers : ∀ᵐ x ∂μ, ∃ g : G, g +ᵥ x ∈ s
  protected aedisjoint : Pairwise <| (AEDisjoint μ on fun g : G => g +ᵥ s)

{μ : autoParam (MeasureTheory.Measure α) _auto✝}

(self : MeasureTheory.IsAddFundamentalDomain G s μ)


theorem le_filter {s t} : s ≤ filter p t ↔ s ≤ t ∧ ∀ a ∈ s, p a

{α : Type u_1}
{p : α → Prop}
[DecidablePred p]
{s t : Multiset α}

s ≤ Multiset.filter p t ↔ s ≤ t ∧ ∀ a ∈ s, p a


@[simp]
lemma sheafCompose_comp :
    sheafCompose_map J (η ≫ γ) = sheafCompose_map J η ≫ sheafCompose_map J γ

(J : CategoryTheory.GrothendieckTopology C)

CategoryTheory.sheafCompose_map J (CategoryTheory.CategoryStruct.comp η γ) =
  CategoryTheory.CategoryStruct.comp (CategoryTheory.sheafCompose_map J η) (CategoryTheory.sheafCompose_map J γ)


theorem lt_coe_iff (x : PartENat) (n : ℕ) : x < n ↔ ∃ h : x.Dom, x.get h < n


theorem mul_rat (h : Irrational x) {q : ℚ} (hq : q ≠ 0) : Irrational (x * q)

{x : ℝ}
(h : Irrational x)
{q : ℚ}
(hq : q ≠ 0)


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

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

(adj1.rightAdjointUniq adj2).hom ≫ (adj2.rightAdjointUniq adj3).hom = (adj1.rightAdjointUniq adj3).hom


theorem totalDegree_monomial_le (s : σ →₀ ℕ) (c : R) :
    (monomial s c).totalDegree ≤ s.sum fun _ ↦ id

{R : Type u}
{σ : Type u_1}
[CommSemiring R]
(s : σ →₀ ℕ)
(c : R)

((MvPolynomial.monomial s) c).totalDegree ≤ s.sum fun x => id


theorem floor_add_nat (ha : 0 ≤ a) (n : ℕ) : ⌊a + n⌋₊ = ⌊a⌋₊ + n

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

⌊a + ↑n⌋₊ = ⌊a⌋₊ + n


theorem coe_smul (c : R') (f : MultilinearMap A M₁ M₂) : ⇑(c • f) = c • (⇑ f)

{ι : Type uι}
{M₁ : ι → Type v₁}
{M₂ : Type v₂}
[(i : ι) → AddCommMonoid (M₁ i)]
[AddCommMonoid M₂]
{R' : Type u_1}
{A : Type u_2}
[Monoid R']
[Semiring A]
[(i : ι) → Module A (M₁ i)]
[DistribMulAction R' M₂]
[Module A M₂]
[SMulCommClass A R' M₂]
(c : R')
(f : MultilinearMap A M₁ M₂)


{α : Type u_2}
[Preorder α]
[LocallyFiniteOrder α]
{a b : α}


theorem contMDiffOn_extend_symm (he : e ∈ maximalAtlas I M) :
    ContMDiffOn 𝓘(𝕜, E) I n (e.extend I).symm (I '' e.target)

(he : e ∈ SmoothManifoldWithCorners.maximalAtlas I M)

ContMDiffOn 𝓘(𝕜, E) I n (↑(e.extend I).symm) (↑I '' e.target)


theorem exists_set_sigmaFinite [Zero β] [TopologicalSpace β] [T2Space β]
    (hf : FinStronglyMeasurable f μ) :
    ∃ t, MeasurableSet t ∧ (∀ x ∈ tᶜ, f x = 0) ∧ SigmaFinite (μ.restrict t)

(hf : MeasureTheory.FinStronglyMeasurable f μ)

∃ t, MeasurableSet t ∧ (∀ x ∈ tᶜ, f x = 0) ∧ MeasureTheory.SigmaFinite (μ.restrict t)


theorem getLsb_add {i : Nat} (i_lt : i < w) (x y : BitVec w) :
    getLsb (x + y) i =
      Bool.xor (getLsb x i) (Bool.xor (getLsb y i) (carry i x y false))

{w i : Nat}
(i_lt : i < w)
(x y : BitVec w)

(x + y).getLsb i = (x.getLsb i).xor ((y.getLsb i).xor (BitVec.carry i x y false))


/-- Auxiliary lemma for `condexp_stronglyMeasurable_mul`. -/
theorem condexp_stronglyMeasurable_simpleFunc_mul (hm : m ≤ m0) (f : @SimpleFunc α m ℝ) {g : α → ℝ}
    (hg : Integrable g μ) : μ[(f * g : α → ℝ)|m] =ᵐ[μ] f * μ[g|m]

{α : Type u_1}
{m m0 : MeasurableSpace α}
{μ : MeasureTheory.Measure α}
(hm : m ≤ m0)
(f : MeasureTheory.SimpleFunc α ℝ)
{g : α → ℝ}
(hg : MeasureTheory.Integrable g μ)


theorem StrictMonoOn.lt_iff_lt (hf : StrictMonoOn f s) {a b : α} (ha : a ∈ s) (hb : b ∈ s) :
    f a < f b ↔ a < b

{α : Type u}
{β : Type v}
[LinearOrder α]
[Preorder β]
{f : α → β}
{s : Set α}
(hf : StrictMonoOn f s)
{a b : α}
(ha : a ∈ s)
(hb : b ∈ s)


theorem wOppSide_of_right_mem {s : AffineSubspace R P} (x : P) {y : P} (hy : y ∈ s) :
    s.WOppSide x y

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


theorem exp_units_conj (y : 𝔸ˣ) (x : 𝔸) : exp 𝕂 (y * x * ↑y⁻¹ : 𝔸) = y * exp 𝕂 x * ↑y⁻¹

(𝕂 : Type u_1)
{𝔸 : Type u_2}
[RCLike 𝕂]
[NormedRing 𝔸]
[NormedAlgebra 𝕂 𝔸]
[CompleteSpace 𝔸]
(y : 𝔸ˣ)
(x : 𝔸)

NormedSpace.exp 𝕂 (↑y * x * ↑y⁻¹) = ↑y * NormedSpace.exp 𝕂 x * ↑y⁻¹


theorem finRange_succ (n : ℕ) :
    finRange n.succ = (finRange n |>.map Fin.castSucc |>.concat (.last _))

List.finRange n.succ = (List.map Fin.castSucc (List.finRange n)).concat (Fin.last n)


@[to_additive]
theorem inv_eq_iff_eq_inv : a⁻¹ = b ↔ a = b⁻¹

{G : Type u_3}
[InvolutiveInv G]
{a b : G}


lemma div_mul_div_le_div (a b c : ℕ) : a / c * b / a ≤ b / c


@[to_additive (attr := simp)]
protected theorem conj_iff (h : G) : Commute (h * a * h⁻¹) (h * b * h⁻¹) ↔ Commute a b

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

AddCommute (h + a + -h) (h + b + -h) ↔ AddCommute a b


/-- At a continuous linear equivalence `e : E ≃L[𝕜] F` between Banach spaces, the operation of
inversion is `C^n`, for all `n`. -/
theorem contDiffAt_map_inverse [CompleteSpace E] (e : E ≃L[𝕜] F) :
    ContDiffAt 𝕜 n inverse (e : E →L[𝕜] F)

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type uE}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{F : Type uF}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{n : ℕ∞}
[CompleteSpace E]
(e : E ≃L[𝕜] F)

ContDiffAt 𝕜 n ContinuousLinearMap.inverse ↑e


@[simp]
theorem run_mk (f : σ → m α) (r : σ) : ReaderT.run (ReaderT.mk f) r = f r

{m : Type u → Type v}
{α σ : Type u}
(f : σ → m α)
(r : σ)


theorem δ_comp_δ' {n} {i : Fin (n + 2)} {j : Fin (n + 3)} (H : Fin.castSucc i < j) :
    δ i ≫ δ j =
      δ (j.pred fun (hj : j = 0) => by simp [hj, Fin.not_lt_zero] at H) ≫
        δ (Fin.castSucc i)

{n : ℕ}
{i : Fin (n + 2)}
{j : Fin (n + 3)}
(H : i.castSucc < j)

SimplexCategory.δ i ≫ SimplexCategory.δ j = SimplexCategory.δ (j.pred ⋯) ≫ SimplexCategory.δ i.castSucc


theorem eq_some_iff_get_eq : o = some a ↔ ∃ h : o.isSome, o.get h = a

∀ {α : Type u_1} {o : Option α} {a : α}, o = some a ↔ ∃ h, o.get h = a


@[simp]
theorem Ioo_union_Ici_eq_Ioi (h : a < b) : Ioo a b ∪ Ici b = Ioi a

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


theorem Filter.EventuallyEq.hasLineDerivWithinAt_iff_of_mem (h : f₀ =ᶠ[𝓝[s] x] f₁) (hx : x ∈ s) :
    HasLineDerivWithinAt 𝕜 f₀ f' s x v ↔ HasLineDerivWithinAt 𝕜 f₁ f' s x v

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


theorem sSup_image2_eq_sInf_sSup (h₁ : ∀ b, GaloisConnection (swap l b ∘ ofDual) (toDual ∘ u₁ b))
    (h₂ : ∀ a, GaloisConnection (l a) (u₂ a)) : sSup (image2 l s t) = l (sInf s) (sSup t)

{l : α → β → γ}

{u₁ : β → γ → α}

{u₂ : α → γ → β}

(h₁ : ∀ (b : β), GaloisConnection (Function.swap l b ∘ ⇑OrderDual.ofDual) (⇑OrderDual.toDual ∘ u₁ b))

(h₂ : ∀ (a : α), GaloisConnection (l a) (u₂ a))

sSup (Set.image2 l s t) = l (sInf s) (sSup t)


protected theorem IsBigOWith.insert [TopologicalSpace α] {x : α} {s : Set α} {C : ℝ} {g : α → E}
    {g' : α → F} (h1 : IsBigOWith C (𝓝[s] x) g g') (h2 : ‖g x‖ ≤ C * ‖g' x‖) :
    IsBigOWith C (𝓝[insert x s] x) g g'

(h1 : Asymptotics.IsBigOWith C (𝓝[s] x) g g')

Asymptotics.IsBigOWith C (𝓝[insert x s] x) g g'


theorem term_smul {α} [AddCommMonoid α] (c n x a n' a')
    (h₁ : c * n = n') (h₂ : smul c a = a') :
    smul c (@term α _ n x a) = term n' x a'

(h₂ : Mathlib.Tactic.Abel.smul c a = a')

Mathlib.Tactic.Abel.smul c (Mathlib.Tactic.Abel.term n x a) = Mathlib.Tactic.Abel.term n' x a'


@[to_additive]
theorem hasProd_subtype_iff_of_mulSupport_subset {s : Set β} (hf : mulSupport f ⊆ s) :
    HasProd (f ∘ (↑) : s → α) a ↔ HasProd f a

{α : Type u_1}
{β : Type u_2}
[CommMonoid α]
[TopologicalSpace α]
{f : β → α}
{a : α}
{s : Set β}
(hf : Function.mulSupport f ⊆ s)

HasProd (f ∘ Subtype.val) a ↔ HasProd f a


theorem quotientMap_quot_mk : QuotientMap (@Quot.mk X r)

{X : Type u}
[TopologicalSpace X]
{r : X → X → Prop}


theorem AnalyticOn.aeval_mvPolynomial (hf : ∀ i, AnalyticOn 𝕜 (f · i) s) (p : MvPolynomial σ A) :
    AnalyticOn 𝕜 (fun x ↦ aeval (f x) p) s

(hf : ∀ (i : σ), AnalyticOn 𝕜 (fun x => f x i) s)

AnalyticOn 𝕜 (fun x => (MvPolynomial.aeval (f x)) p) s


@[simp]
theorem PreservesColimitPair.iso_hom :
    (PreservesColimitPair.iso G X Y).hom = coprodComparison G X Y

[CategoryTheory.Limits.HasBinaryCoproduct (G.obj X) (G.obj Y)]

[CategoryTheory.Limits.PreservesColimit (CategoryTheory.Limits.pair X Y) G]

(CategoryTheory.Limits.PreservesColimitPair.iso G X Y).hom = CategoryTheory.Limits.coprodComparison G X Y


/-- Finitely summable non-negative functions have countable support -/
theorem _root_.Summable.countable_support_ennreal {f : α → ℝ≥0∞} (h : ∑' (i : α), f i ≠ ∞) :
    f.support.Countable

{α : Type u_1}
{f : α → ℝ≥0∞}
(h : ∑' (i : α), f i ≠ ⊤)


@[simp] lemma map_apply_of (g : (i : ι) → G i →+* G' i)
    (hg : ∀ i j h, (g j).comp (f i j h) = (f' i j h).comp (g i))
    {i : ι} (x : G i) :
    map g hg (of G _ _ x) = of G' (fun _ _ h ↦ f' _ _ h) i (g i x)

{f' : (i j : ι) → i ≤ j → G' i →+* G' j}

(hg : ∀ (i j : ι) (h : i ≤ j), (g j).comp (f i j h) = (f' i j h).comp (g i))

(Ring.DirectLimit.map g hg) ((Ring.DirectLimit.of G (fun x x_1 h => ⇑(f x x_1 h)) i) x) =
  (Ring.DirectLimit.of G' (fun x x_1 h => ⇑(f' x x_1 h)) i) ((g i) x)


@[simp]
theorem reverse_inj {l₁ l₂ : List α} : reverse l₁ = reverse l₂ ↔ l₁ = l₂


@[to_additive vadd_image_prod]
theorem image_smul_prod : (fun x : α × β ↦ x.fst • x.snd) '' s ×ˢ t = s • t

{α : Type u_2}
{β : Type u_3}
[VAdd α β]
{s : Set α}
{t : Set β}

(fun x => x.1 +ᵥ x.2) '' s ×ˢ t = s +ᵥ t


/-- An element `a` divides the difference `a - b` if and only if `a` divides `b`. -/
@[simp]
theorem dvd_sub_self_left : a ∣ a - b ↔ a ∣ b


@[simp]
theorem map_singleton (f : α ↪ β) (a : α) : map f {a} = {f a}

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


@[to_additive (attr := simp)]
theorem preimage_mul_right_closedBall [IsometricSMul Gᵐᵒᵖ G] (a b : G) (r : ℝ≥0∞) :
    (fun x => x * a) ⁻¹' closedBall b r = closedBall (b / a) r

{G : Type v}
[Group G]
[PseudoEMetricSpace G]
[IsometricSMul Gᵐᵒᵖ G]
(a b : G)
(r : ℝ≥0∞)

(fun x => x * a) ⁻¹' EMetric.closedBall b r = EMetric.closedBall (b / a) r


/-- If a finset `u` is contained in the product of two sets `s / t`, we can find two finsets `s'`,
`t'` such that `s' ⊆ s`, `t' ⊆ t` and `u ⊆ s' / t'`. -/
@[to_additive
      "If a finset `u` is contained in the sum of two sets `s - t`, we can find two finsets
      `s'`, `t'` such that `s' ⊆ s`, `t' ⊆ t` and `u ⊆ s' - t'`."]
theorem subset_div {s t : Set α} :
    ↑u ⊆ s / t → ∃ s' t' : Finset α, ↑s' ⊆ s ∧ ↑t' ⊆ t ∧ u ⊆ s' / t'

{α : Type u_2}
[DecidableEq α]
[Div α]
{u : Finset α}
{s t : Set α}

↑u ⊆ s / t → ∃ s' t', ↑s' ⊆ s ∧ ↑t' ⊆ t ∧ u ⊆ s' / t'


@[measurability]
theorem Measurable.min {f g : δ → α} (hf : Measurable f) (hg : Measurable g) :
    Measurable fun a => min (f a) (g a)

{α : Type u_1}
{δ : Type u_4}
[TopologicalSpace α]
[MeasurableSpace α]
[OpensMeasurableSpace α]
[MeasurableSpace δ]
[LinearOrder α]
[OrderClosedTopology α]
[SecondCountableTopology α]
{f g : δ → α}
(hf : Measurable f)
(hg : Measurable g)


theorem IsPositive.conj_adjoint {T : E →L[𝕜] E} (hT : T.IsPositive) (S : E →L[𝕜] F) :
    (S ∘L T ∘L S†).IsPositive

{𝕜 : Type u_1}
{E : Type u_2}
{F : Type u_3}
[RCLike 𝕜]
[NormedAddCommGroup E]
[NormedAddCommGroup F]
[InnerProductSpace 𝕜 E]
[InnerProductSpace 𝕜 F]
[CompleteSpace E]
[CompleteSpace F]
{T : E →L[𝕜] E}
(hT : T.IsPositive)
(S : E →L[𝕜] F)

(S.comp (T.comp (ContinuousLinearMap.adjoint S))).IsPositive


/-- A Lipschitz function is locally Lipschitz. -/
protected lemma _root_.LipschitzWith.locallyLipschitz {K : ℝ≥0} (hf : LipschitzWith K f) :
    LocallyLipschitz f

{α : Type u}
{β : Type v}
[PseudoEMetricSpace α]
[PseudoEMetricSpace β]
{f : α → β}
{K : ℝ≥0}
(hf : LipschitzWith K f)


lemma restrictScalarsId'App_hom_apply (M : ModuleCat R) (x : M) :
    (restrictScalarsId'App f hf M).hom x = x

{R : Type u₁}
[Ring R]
(f : R →+* R)
(hf : f = RingHom.id R)
(M : ModuleCat R)
(x : ↑M)

(ModuleCat.restrictScalarsId'App f hf M).hom x = x


theorem Embedding.closure_eq_preimage_closure_image (hf : Embedding f) (s : Set X) :
    closure s = f ⁻¹' closure (f '' s)

{X : Type u_1}
{Y : Type u_2}
{f : X → Y}
[TopologicalSpace X]
[TopologicalSpace Y]
(hf : Embedding f)
(s : Set X)


@[to_additive]
theorem map_pos_of_ne_one [Group α] [LinearOrderedAddCommMonoid β] [GroupNormClass F α β] (f : F)
    {x : α} (hx : x ≠ 1) : 0 < f x

{F : Type u_2}
{α : Type u_3}
{β : Type u_4}
[FunLike F α β]
[AddGroup α]
[LinearOrderedAddCommMonoid β]
[AddGroupNormClass F α β]
(f : F)
{x : α}
(hx : x ≠ 0)


@[simp] theorem cond_not (b : Bool) (t e : α) : cond (!b) t e = cond b e t

(bif !b then t else e) = bif b then e else t


@[simp]
lemma unbot'_zero_mul (a b : WithBot α) : (a * b).unbot' 0 = a.unbot' 0 * b.unbot' 0

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

WithBot.unbot' 0 (a * b) = WithBot.unbot' 0 a * WithBot.unbot' 0 b


theorem prod_iInter {s : Set α} {t : ι → Set β} [hι : Nonempty ι] :
    (s ×ˢ ⋂ i, t i) = ⋂ i, s ×ˢ t i

{α : Type u_1}
{β : Type u_2}
{ι : Sort u_4}
{s : Set α}
{t : ι → Set β}
[hι : Nonempty ι]


@[simp]
theorem restrict_dite_compl {s : Set α} [∀ x, Decidable (x ∈ s)] (f : ∀ a ∈ s, β)
    (g : ∀ a ∉ s, β) :
    (sᶜ.restrict fun a => if h : a ∈ s then f a h else g a h) = (fun a : (sᶜ : Set α) => g a a.2)

{α : Type u_1}
{β : Type u_2}
{s : Set α}
[(x : α) → Decidable (x ∈ s)]
(f : (a : α) → a ∈ s → β)
(g : (a : α) → a ∉ s → β)

(sᶜ.restrict fun a => if h : a ∈ s then f a h else g a h) = fun a => g ↑a ⋯


theorem ball_eq_of_symmetry {V : Set (β × β)} (hV : SymmetricRel V) {x} :
    ball x V = { y | (y, x) ∈ V }

{β : Type ub}
{V : Set (β × β)}
(hV : SymmetricRel V)
{x : β}

UniformSpace.ball x V = {y | (y, x) ∈ V}


/-- If `J(a | n) = -1`, then `n` has a prime divisor `p` such that `J(a | p) = -1`. -/
theorem eq_neg_one_at_prime_divisor_of_eq_neg_one {a : ℤ} {n : ℕ} (h : J(a | n) = -1) :
    ∃ p : ℕ, p.Prime ∧ p ∣ n ∧ J(a | p) = -1

{a : ℤ}
{n : ℕ}
(h : jacobiSym a n = -1)

∃ p, Nat.Prime p ∧ p ∣ n ∧ jacobiSym a p = -1


@[simp, norm_cast]
theorem intCast_modEq_intCast {a b z : ℤ} : a ≡ b [PMOD (z : α)] ↔ a ≡ b [PMOD z]

{α : Type u_1}
[AddCommGroupWithOne α]
[CharZero α]
{a b z : ℤ}


@[to_additive]
theorem ofQuotientStabilizer_smul (g : α) (g' : α ⧸ MulAction.stabilizer α x) :
    ofQuotientStabilizer α x (g • g') = g • ofQuotientStabilizer α x g'

(α : Type u)
{β : Type v}
[AddGroup α]
[AddAction α β]
(x : β)
(g : α)
(g' : α ⧸ AddAction.stabilizer α x)

AddAction.ofQuotientStabilizer α x (g +ᵥ g') = g +ᵥ AddAction.ofQuotientStabilizer α x g'


theorem principal_bind {s : Set α} {f : α → Filter β} : bind (𝓟 s) f = ⨆ x ∈ s, f x

{α : Type u}
{β : Type v}
{s : Set α}
{f : α → Filter β}


@[simp]
theorem Quotient.choice_eq {ι : Type*} {α : ι → Type*} [∀ i, Setoid (α i)] (f : ∀ i, α i) :
    (Quotient.choice fun i ↦ ⟦f i⟧) = ⟦f⟧

{ι : Type u_3}
{α : ι → Type u_4}
[(i : ι) → Setoid (α i)]
(f : (i : ι) → α i)


theorem mem_eq (a : α) (o : Part α) : (a ∈ o) = ∃ h, o.get h = a


theorem srange_eq_map : srange f = (⊤ : NonUnitalSubsemiring R).map f

{R : Type u}
{S : Type v}
[NonUnitalNonAssocSemiring R]
[NonUnitalNonAssocSemiring S]
{F : Type u_1}
[FunLike F R S]
[NonUnitalRingHomClass F R S]
(f : F)

NonUnitalRingHom.srange f = NonUnitalSubsemiring.map f ⊤


theorem ext {a b : Set α} (h : ∀ (x : α), x ∈ a ↔ x ∈ b) : a = b

{α : Type u}
{a b : Set α}
(h : ∀ (x : α), x ∈ a ↔ x ∈ b)


@[fun_prop]
theorem DifferentiableWithinAt.comp {g : F → G} {t : Set F}
    (hg : DifferentiableWithinAt 𝕜 g t (f x)) (hf : DifferentiableWithinAt 𝕜 f s x)
    (h : MapsTo f s t) : DifferentiableWithinAt 𝕜 (g ∘ f) s x


/-- The identity enriched functor. -/
@[simps]
def EnrichedFunctor.id (C : Type u₁) [EnrichedCategory V C] : EnrichedFunctor V C C

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

(CategoryTheory.EnrichedFunctor.id V C).obj X = X


@[to_additive (attr := simp)]
lemma coe_monoidHom_comp_coe_monoidHom_symm (e : M ≃* N) :
    (e : M →* N).comp e.symm = MonoidHom.id _

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


theorem Ioo_subset_Ioi_self : Ioo a b ⊆ Ioi a

{α : Type u_2}
[Preorder α]
[LocallyFiniteOrder α]
{a b : α}
[LocallyFiniteOrderTop α]


@[reassoc (attr := simp)]
lemma finiteCoproduct.ι_desc {B : CompHaus} (e : (a : α) → (X a ⟶ B)) (a : α) :
    finiteCoproduct.ι X a ≫ finiteCoproduct.desc X e = e a

{α : Type w}
[Finite α]
(X : α → CompHaus)
{B : CompHaus}
(e : (a : α) → X a ⟶ B)
(a : α)

CategoryTheory.CategoryStruct.comp (CompHaus.finiteCoproduct.ι X a) (CompHaus.finiteCoproduct.desc X e) = e a


theorem lintegral_nnnorm_zero : (∫⁻ _ : α, ‖(0 : β)‖₊ ∂μ) = 0

{α : Type u_1}
{β : Type u_2}
{m : MeasurableSpace α}
{μ : MeasureTheory.Measure α}
[NormedAddCommGroup β]

∫⁻ (x : α), ↑‖0‖₊ ∂μ = 0


theorem MemBaseSet.exists_common_compl (h₁ : l.MemBaseSet I c₁ r₁ π₁) (h₂ : l.MemBaseSet I c₂ r₂ π₂)
    (hU : π₁.iUnion = π₂.iUnion) :
    ∃ π : Prepartition I, π.iUnion = ↑I \ π₁.iUnion ∧
      (l.bDistortion → π.distortion ≤ c₁) ∧ (l.bDistortion → π.distortion ≤ c₂)

{π₁ π₂ : BoxIntegral.TaggedPrepartition I}

∃ π, π.iUnion = ↑I \ π₁.iUnion ∧ (l.bDistortion = true → π.distortion ≤ c₁) ∧ (l.bDistortion = true → π.distortion ≤ c₂)


theorem LipschitzWith.vsub [PseudoEMetricSpace α] {f g : α → P} {Kf Kg : ℝ≥0}
    (hf : LipschitzWith Kf f) (hg : LipschitzWith Kg g) : LipschitzWith (Kf + Kg) (f -ᵥ g)

{α : Type u_1}
{V : Type u_2}
{P : Type u_3}
[SeminormedAddCommGroup V]
[PseudoMetricSpace P]
[NormedAddTorsor V P]
[PseudoEMetricSpace α]
{f g : α → P}
{Kf Kg : ℝ≥0}
(hf : LipschitzWith Kf f)
(hg : LipschitzWith Kg g)


theorem mk_bounded_subset_le {α : Type u} (s : Set α) (c : Cardinal.{u}) :
    #{ t : Set α // t ⊆ s ∧ #t ≤ c } ≤ max #s ℵ₀ ^ c

#{ t // t ⊆ s ∧ #↑t ≤ c } ≤ max #↑s ℵ₀ ^ c


theorem LeftInverse.rightInverse_of_surjective {f : α → β} {g : β → α} (h : LeftInverse f g)
    (hg : Surjective g) : RightInverse f g

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


theorem div_mem {x y : ℝ} (hx : 0 ≤ x) (hy : 0 ≤ y) (hxy : x ≤ y) : x / y ∈ I


@[simp, norm_cast]
theorem mem_coe : s ∈ (f : Filter α) ↔ s ∈ f

{α : Type u}
{f : Ultrafilter α}
{s : Set α}

s ∈ ↑f ↔ s ∈ f


theorem Matrix.toLinearMapₛₗ₂'_apply (M : Matrix n m N₂) (x : n → R₁) (y : m → R₂) :
    -- porting note: we don't seem to have `∑ i j` as valid notation yet
    Matrix.toLinearMapₛₗ₂' R σ₁ σ₂ M x y = ∑ i, ∑ j, σ₁ (x i) •  σ₂ (y j) • M i j

{R : Type u_1}
{R₁ : Type u_2}
{S₁ : Type u_3}
{R₂ : Type u_4}
{S₂ : Type u_5}
{N₂ : Type u_11}
{n : Type u_12}
{m : Type u_13}
[CommSemiring R]
[AddCommMonoid N₂]
[Module R N₂]
[Semiring R₁]
[Semiring R₂]
[Semiring S₁]
[Semiring S₂]
[Module S₁ N₂]
[Module S₂ N₂]
[SMulCommClass S₁ R N₂]
[SMulCommClass S₂ R N₂]
[SMulCommClass S₂ S₁ N₂]
(σ₁ : R₁ →+* S₁)
(σ₂ : R₂ →+* S₂)
[Fintype n]
[Fintype m]
[DecidableEq n]
[DecidableEq m]
(M : Matrix n m N₂)
(x : n → R₁)
(y : m → R₂)

(((Matrix.toLinearMapₛₗ₂' R σ₁ σ₂) M) x) y = ∑ i : n, ∑ j : m, σ₁ (x i) •> σ₂ (y j) •> M i j


lemma sheafComposeNatIso_app_counit (P : Sheaf J A) :
    (sheafComposeNatIso J U (sheafificationAdjunction J A)
      (sheafificationAdjunction J B)).hom.app _ ≫ (sheafCompose J U).map
        ((sheafificationAdjunction J A).counit.app P) =
          (sheafificationAdjunction J B).counit.app ((sheafCompose J U).obj P)

(J : CategoryTheory.GrothendieckTopology C)

(CategoryTheory.sheafComposeNatIso J U (CategoryTheory.sheafificationAdjunction J A)
            (CategoryTheory.sheafificationAdjunction J B)).hom.app
      ((CategoryTheory.sheafToPresheaf J A).obj P) ≫
    (CategoryTheory.sheafCompose J U).map ((CategoryTheory.sheafificationAdjunction J A).counit.app P) =
  (CategoryTheory.sheafificationAdjunction J B).counit.app ((CategoryTheory.sheafCompose J U).obj P)


theorem Multiplicative.isMulHom [Add α] [Add β] {f : α → β} (hf : IsAddHom f) :
    @IsMulHom (Multiplicative α) (Multiplicative β) _ _ f

{α : Type u}
{β : Type v}
[Add α]
[Add β]
{f : α → β}
(hf : IsAddHom f)


@[simp]
lemma Φ_three : W.Φ 3 = X * W.Ψ₃ ^ 2 - W.preΨ₄ * W.Ψ₂Sq

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

W.Φ 3 = Polynomial.X * W.Ψ₃ ^ 2 - W.preΨ₄ * W.Ψ₂Sq


protected theorem nhdsWithin_neBot (di : DenseInducing i) (b : β) : NeBot (𝓝[range i] b)

{α : Type u_1}
{β : Type u_2}
[TopologicalSpace α]
[TopologicalSpace β]
{i : α → β}
(di : DenseInducing i)
(b : β)


@[simp]
theorem colimit.homIso_hom (F : J ⥤ C) [HasColimit F] {W : C} (f : ULift (colimit F ⟶ W)) :
    (colimit.homIso F W).hom f = (colimit.cocone F).ι ≫ (const J).map f.down

(f : ULift.{u₁, v} (CategoryTheory.Limits.colimit F ⟶ W))

(CategoryTheory.Limits.colimit.homIso F W).hom f =
  (CategoryTheory.Limits.colimit.cocone F).ι ≫ (CategoryTheory.Functor.const J).map f.down


theorem bind₁_comp_bind₁ {υ : Type*} (f : σ → MvPolynomial τ R) (g : τ → MvPolynomial υ R) :
    (bind₁ g).comp (bind₁ f) = bind₁ fun i => bind₁ g (f i)

{σ : Type u_1}
{τ : Type u_2}
{R : Type u_3}
[CommSemiring R]
{υ : Type u_6}
(f : σ → MvPolynomial τ R)
(g : τ → MvPolynomial υ R)

(MvPolynomial.bind₁ g).comp (MvPolynomial.bind₁ f) = MvPolynomial.bind₁ fun i => (MvPolynomial.bind₁ g) (f i)


protected theorem zero_ne_one : 0 ≠ (1 : ℚ)


/-- The summation of a `summable_family` as a `LinearMap`. -/
@[simps]
def lsum : SummableFamily Γ R α →ₗ[HahnSeries Γ R] HahnSeries Γ R

{Γ : Type u_1}
{R : Type u_2}
[OrderedCancelAddCommMonoid Γ]
[Semiring R]
{α : Type u_3}
(s : HahnSeries.SummableFamily Γ R α)

HahnSeries.SummableFamily.lsum s = s.hsum


theorem norm_compSL_le : ‖compSL E F G σ₁₂ σ₂₃‖ ≤ 1

{𝕜 : Type u_1}
{𝕜₂ : Type u_2}
{𝕜₃ : Type u_3}
(E : Type u_4)
(F : Type u_6)
(G : Type u_8)
[SeminormedAddCommGroup E]
[SeminormedAddCommGroup F]
[SeminormedAddCommGroup G]
[NontriviallyNormedField 𝕜]
[NontriviallyNormedField 𝕜₂]
[NontriviallyNormedField 𝕜₃]
[NormedSpace 𝕜 E]
[NormedSpace 𝕜₂ F]
[NormedSpace 𝕜₃ G]
(σ₁₂ : 𝕜 →+* 𝕜₂)
(σ₂₃ : 𝕜₂ →+* 𝕜₃)
{σ₁₃ : 𝕜 →+* 𝕜₃}
[RingHomCompTriple σ₁₂ σ₂₃ σ₁₃]
[RingHomIsometric σ₂₃]
[RingHomIsometric σ₁₃]
[RingHomIsometric σ₁₂]

‖ContinuousLinearMap.compSL E F G σ₁₂ σ₂₃‖ ≤ 1


theorem act_rel_act_of_rel (m : M) {a b : N} (ab : r a b) : r (μ m a) (μ m b)

{M : Type u_1}
{N : Type u_2}
{μ : M → N → N}
{r : N → N → Prop}
[CovariantClass M N μ r]
(m : M)
{a b : N}
(ab : r a b)


@[simp]
theorem countP_filter (q) [DecidablePred q] (s : Multiset α) :
    countP p (filter q s) = countP (fun a => p a ∧ q a) s

{α : Type u_1}
(p : α → Prop)
[DecidablePred p]
(q : α → Prop)
[DecidablePred q]
(s : Multiset α)

Multiset.countP p (Multiset.filter q s) = Multiset.countP (fun a => p a ∧ q a) s


@[simp]
theorem mk_zero (h : (0 : α) ∈ Icc (0 : α) 1) : (⟨0, h⟩ : Icc (0 : α) 1) = 0

{α : Type u_1}
[OrderedSemiring α]
(h : 0 ∈ Set.Icc 0 1)


@[simp]
theorem arcsin_lt_zero {x : ℝ} : arcsin x < 0 ↔ x < 0


theorem OrderEmbedding.map_inf_le [SemilatticeInf α] [SemilatticeInf β] (f : α ↪o β) (x y : α) :
    f (x ⊓ y) ≤ f x ⊓ f y

{α : Type u_2}
{β : Type u_3}
[SemilatticeInf α]
[SemilatticeInf β]
(f : α ↪o β)
(x y : α)


@[to_additive norm_nsmul_le]
theorem norm_pow_le_mul_norm (n : ℕ) (a : E) : ‖a ^ n‖ ≤ n * ‖a‖

{E : Type u_6}
[SeminormedAddCommGroup E]
(n : ℕ)
(a : E)

‖n • a‖ ≤ ↑n * ‖a‖


@[to_additive]
theorem op_smul_set_smul_eq_smul_smul_set (a : α) (s : Set β) (t : Set γ)
    (h : ∀ (a : α) (b : β) (c : γ), (op a • b) • c = b • a • c) : (op a • s) • t = s • a • t

(h : ∀ (a : α) (b : β) (c : γ), AddOpposite.op a +ᵥ b +ᵥ c = b +ᵥ (a +ᵥ c))

AddOpposite.op a +ᵥ s +ᵥ t = s +ᵥ (a +ᵥ t)


/-- Rewrite `ContinuousLinearMap.inCoordinates` using continuous linear equivalences. -/
theorem inCoordinates_eq (x₀ x : B) (y₀ y : B') (ϕ : E x →SL[σ] E' y)
    (hx : x ∈ (trivializationAt F E x₀).baseSet) (hy : y ∈ (trivializationAt F' E' y₀).baseSet) :
    inCoordinates F E F' E' x₀ x y₀ y ϕ =
      ((trivializationAt F' E' y₀).continuousLinearEquivAt 𝕜₂ y hy : E' y →L[𝕜₂] F').comp
        (ϕ.comp <|
          (((trivializationAt F E x₀).continuousLinearEquivAt 𝕜₁ x hx).symm : F →L[𝕜₁] E x))

{σ : 𝕜₁ →+* 𝕜₂}

[TopologicalSpace (Bundle.TotalSpace F E)]

[TopologicalSpace (Bundle.TotalSpace F' E')]

ContinuousLinearMap.inCoordinates F E F' E' x₀ x y₀ y ϕ =
  (↑(Trivialization.continuousLinearEquivAt 𝕜₂ (trivializationAt F' E' y₀) y hy)).comp
    (ϕ.comp ↑(Trivialization.continuousLinearEquivAt 𝕜₁ (trivializationAt F E x₀) x hx).symm)


@[to_additive]
theorem min_mul_distrib' (a b c : α) : min (a * b) c = min (min a c * min b c) c

{α : Type u}
[CanonicallyLinearOrderedCommMonoid α]
(a b c : α)


theorem exists_ultrafilter_iff {f : Filter α} : (∃ u : Ultrafilter α, ↑u ≤ f) ↔ NeBot f


@[to_additive]
theorem Pi.mulSingle_div [∀ i, Group <| f i] (i : I) (x y : f i) :
    mulSingle i (x / y) = mulSingle i x / mulSingle i y

{I : Type u}
{f : I → Type v}
[DecidableEq I]
[(i : I) → Group (f i)]
(i : I)
(x y : f i)

Pi.mulSingle i (x / y) = Pi.mulSingle i x / Pi.mulSingle i y


@[simp, norm_cast]
theorem coe_sub (f g : CentroidHom α) : ⇑(f - g) = f - g

{α : Type u_5}
[NonUnitalNonAssocRing α]
(f g : CentroidHom α)


/-- If `s` is a countable set, then the measure of its preimage can be found as the sum of measures
of the fibers `f ⁻¹' {y}`. -/
theorem tsum_measure_preimage_singleton {s : Set β} (hs : s.Countable) {f : α → β}
    (hf : ∀ y ∈ s, MeasurableSet (f ⁻¹' {y})) : (∑' b : s, μ (f ⁻¹' {↑b})) = μ (f ⁻¹' s)

∑' (b : ↑s), μ (f ⁻¹' {↑b}) = μ (f ⁻¹' s)


@[simp, mfld_simps]
theorem symm_source : e.symm.source = e.target

{α : Type u_1}
{β : Type u_2}
(e : PartialEquiv α β)


/-- If `F : C ⥤ D` is fully faithful, every isomorphism `F.obj X ≅ F.obj Y` has a preimage. -/
@[simps]
noncomputable def preimageIso (f : F.obj X ≅ F.obj Y) :
    X ≅ Y

{C : Type u₁}
[CategoryTheory.Category.{v₁, u₁} C]
{D : Type u₂}
[CategoryTheory.Category.{v₂, u₂} D]
(F : CategoryTheory.Functor C D)
{X Y : C}
[F.Full]
[F.Faithful]
(f : F.obj X ≅ F.obj Y)

(F.preimageIso f).hom = F.preimage f.hom